aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/wm/wm.h
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-09-29 12:59:39 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-09-29 12:59:39 -0700
commit7e7fab861a7e5baae9182419f7f320af36ce1ec4 (patch)
treed323b19f009826d437a3216909d38ee1a05f8382 /sys/cmd/wm/wm.h
parentd20be3112770c9fd252c91306675717dcb59e28f (diff)
Feat(wm): prepararation for layout mechanism
Diffstat (limited to 'sys/cmd/wm/wm.h')
-rw-r--r--sys/cmd/wm/wm.h47
1 files changed, 36 insertions, 11 deletions
diff --git a/sys/cmd/wm/wm.h b/sys/cmd/wm/wm.h
index e1d3670..1e9e41e 100644
--- a/sys/cmd/wm/wm.h
+++ b/sys/cmd/wm/wm.h
@@ -62,6 +62,8 @@ typedef struct Layout Layout;
typedef struct Monitor Monitor;
typedef struct Server Server;
+typedef struct MonitorRule MonitorRule;
+
struct Rectangle
{
int x, y;
@@ -113,6 +115,7 @@ struct Client
struct {
struct wl_listener map;
struct wl_listener unmap;
+ struct wl_listener commit;
struct wl_listener destroy;
struct wl_listener request_move;
struct wl_listener request_title;
@@ -122,12 +125,16 @@ struct Client
struct wlr_box geo, oldgeo;
+ Monitor *monitor;
+
uint tags;
int border : 4;
int ismapped : 1;
int isfloating : 1;
int isurgent : 1;
int isfullscreen : 1;
+
+ uint32 resize;
};
struct Layout
@@ -144,18 +151,32 @@ struct Monitor
struct wl_listener render;
struct wl_listener destroy;
} event;
+
+ struct wlr_box geometry;
+ struct wlr_box window;
+
+ Layout *layout[2];
+ struct {
+ uint set[2];
+ uint selected;
+ } tag;
+ struct {
+ double frac;
+ int len;
+ } master;
};
struct MonitorRule
{
- char *name;
- float mfact;
- int nmaster;
- float scale;
- const Layout *lt;
- enum wl_output_transform rr;
- int x;
- int y;
+ char *name;
+ Layout *layout;
+ int x, y;
+ float scale;
+ enum wl_output_transform transform;
+ struct {
+ double frac;
+ int len;
+ } master;
};
struct Rule
@@ -178,8 +199,10 @@ struct Server
struct wlr_xdg_shell *xdg;
} shell;
- struct wl_list clients;
- struct wl_list stack;
+ struct {
+ struct wl_list list;
+ struct wl_list stack;
+ } client;
Client *selected;
struct {
@@ -192,6 +215,7 @@ struct Server
struct {
struct wlr_output_layout *layout;
struct wl_list list;
+ struct wlr_box geometry;
} monitor;
struct {
@@ -249,7 +273,8 @@ void request_cursor(struct wl_listener *, void *);
void request_set_selection(struct wl_listener *, void *);
/* client.c */
-void focus(Client *client, struct wlr_surface *new);
+void focus(Client *, struct wlr_surface *);
+void resize(Client *, int x, int y, int w, int h, int interact);
Client* client_at(double, double, struct wlr_surface **, double *, double *);
int client_has(Client *, double, double, struct wlr_surface **, double *, double *);
void setinteractive(Client *client, int mode, uint32 edges);