77 lines
2 KiB
C
77 lines
2 KiB
C
#ifndef CRYWL_MONITOR_H
|
|
#define CRYWL_MONITOR_H
|
|
|
|
#include "client.h"
|
|
|
|
// client.h contains a forward declaration of Monitor
|
|
typedef struct {
|
|
const char *symbol;
|
|
void (*arrange)(Monitor *);
|
|
} Layout;
|
|
|
|
struct Monitor {
|
|
struct wl_list link;
|
|
struct wlr_output *wlr_output;
|
|
struct wlr_scene_output *scene_output;
|
|
struct wlr_scene_rect *fullscreen_bg; /* See createmon() for info */
|
|
struct wl_listener frame;
|
|
struct wl_listener destroy;
|
|
struct wl_listener request_state;
|
|
struct wl_listener destroy_lock_surface;
|
|
struct wlr_session_lock_surface_v1 *lock_surface;
|
|
struct wlr_box m; /* monitor area, layout-relative */
|
|
struct wlr_box w; /* window area, layout-relative */
|
|
struct wl_list layers[4]; /* LayerSurface.link */
|
|
const Layout *lt[2];
|
|
unsigned int seltags;
|
|
unsigned int sellt;
|
|
uint32_t tagset[2];
|
|
float mfact;
|
|
int gamma_lut_changed;
|
|
int nmaster;
|
|
char ltsymbol[16];
|
|
int asleep;
|
|
};
|
|
|
|
typedef struct {
|
|
const char *name;
|
|
float mfact;
|
|
int nmaster;
|
|
float scale;
|
|
const Layout *lt;
|
|
enum wl_output_transform rr;
|
|
int x, y;
|
|
} MonitorRule;
|
|
|
|
typedef struct {
|
|
const char *id;
|
|
const char *title;
|
|
uint32_t tags;
|
|
int isfloating;
|
|
int monitor;
|
|
} Rule;
|
|
|
|
/* ===== Function Declarations ===== */
|
|
void applyrules(Client *c);
|
|
void arrange(Monitor *m);
|
|
void arrangelayer(Monitor *m, struct wl_list *list,
|
|
struct wlr_box *usable_area, int exclusive);
|
|
void arrangelayers(Monitor *m);
|
|
void cleanupmon(struct wl_listener *listener, void *data);
|
|
void closemon(Monitor *m);
|
|
Monitor *dirtomon(enum wlr_direction dir);
|
|
void focusmon(const Arg *arg);
|
|
void focusstack(const Arg *arg);
|
|
Client *focustop(Monitor *m);
|
|
void incnmaster(const Arg *arg);
|
|
void monocle(Monitor *m);
|
|
void rendermon(struct wl_listener *listener, void *data);
|
|
void setlayout(const Arg *arg);
|
|
void setmfact(const Arg *arg);
|
|
void setmon(Client *c, Monitor *m, uint32_t newtags);
|
|
void tag(const Arg *arg);
|
|
void tagmon(const Arg *arg);
|
|
void tile(Monitor *m);
|
|
Monitor *xytomon(double x, double y);
|
|
|
|
#endif /* CRYWL_MONITOR_H */
|