mirror of
https://github.com/0intro/wmii
synced 2025-01-11 20:59:20 +03:00
Some cleanup in wm.h
This commit is contained in:
parent
b71912e999
commit
0fd8d49ee8
@ -37,7 +37,7 @@ struct FileId {
|
|||||||
Bar **bar_p;
|
Bar **bar_p;
|
||||||
View *view;
|
View *view;
|
||||||
Client *client;
|
Client *client;
|
||||||
Rules *rule;
|
Ruleset *rule;
|
||||||
BlitzColor *col;
|
BlitzColor *col;
|
||||||
};
|
};
|
||||||
unsigned int id;
|
unsigned int id;
|
||||||
|
46
cmd/wm/wm.h
46
cmd/wm/wm.h
@ -44,16 +44,16 @@ enum {
|
|||||||
enum { MIN_COLWIDTH = 64 };
|
enum { MIN_COLWIDTH = 64 };
|
||||||
enum { WM_PROTOCOL_DELWIN = 1 };
|
enum { WM_PROTOCOL_DELWIN = 1 };
|
||||||
|
|
||||||
|
/* Data Structures */
|
||||||
typedef struct View View;
|
typedef struct View View;
|
||||||
typedef struct Area Area;
|
typedef struct Area Area;
|
||||||
typedef struct Frame Frame;
|
typedef struct Frame Frame;
|
||||||
typedef struct Client Client;
|
typedef struct Client Client;
|
||||||
|
typedef struct Key Key;
|
||||||
typedef struct ViewLink ViewLink;
|
typedef struct Bar Bar;
|
||||||
struct ViewLink {
|
typedef struct Rule Rule;
|
||||||
ViewLink *next;
|
typedef struct Ruleset Ruleset;
|
||||||
View *view;
|
typedef struct WMScreen WMScreen;
|
||||||
};
|
|
||||||
|
|
||||||
struct View {
|
struct View {
|
||||||
View *next;
|
View *next;
|
||||||
@ -93,7 +93,6 @@ struct Frame {
|
|||||||
|
|
||||||
struct Client {
|
struct Client {
|
||||||
Client *next;
|
Client *next;
|
||||||
ViewLink *views;
|
|
||||||
Area *revert;
|
Area *revert;
|
||||||
Frame *frame;
|
Frame *frame;
|
||||||
Frame *sel;
|
Frame *sel;
|
||||||
@ -113,7 +112,6 @@ struct Client {
|
|||||||
GC gc;
|
GC gc;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct Key Key;
|
|
||||||
struct Key {
|
struct Key {
|
||||||
Key *next;
|
Key *next;
|
||||||
Key *lnext;
|
Key *lnext;
|
||||||
@ -124,7 +122,6 @@ struct Key {
|
|||||||
KeyCode key;
|
KeyCode key;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct Bar Bar;
|
|
||||||
struct Bar {
|
struct Bar {
|
||||||
Bar *next;
|
Bar *next;
|
||||||
Bar *smaller;
|
Bar *smaller;
|
||||||
@ -135,20 +132,19 @@ struct Bar {
|
|||||||
BlitzBrush brush;
|
BlitzBrush brush;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct Rule Rule;
|
|
||||||
struct Rule {
|
struct Rule {
|
||||||
Rule *next;
|
Rule *next;
|
||||||
regex_t regex;
|
regex_t regex;
|
||||||
char value[256];
|
char value[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct Rules {
|
struct Ruleset {
|
||||||
Rule *rule;
|
Rule *rule;
|
||||||
char *string;
|
char *string;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
} Rules;
|
};
|
||||||
|
|
||||||
/* default values */
|
/* global variables */
|
||||||
struct {
|
struct {
|
||||||
BlitzColor selcolor;
|
BlitzColor selcolor;
|
||||||
BlitzColor normcolor;
|
BlitzColor normcolor;
|
||||||
@ -157,45 +153,47 @@ struct {
|
|||||||
unsigned int snap;
|
unsigned int snap;
|
||||||
char *keys;
|
char *keys;
|
||||||
unsigned int keyssz;
|
unsigned int keyssz;
|
||||||
Rules tagrules;
|
Ruleset tagrules;
|
||||||
Rules colrules;
|
Ruleset colrules;
|
||||||
char grabmod[5];
|
char grabmod[5];
|
||||||
unsigned long mod;
|
unsigned long mod;
|
||||||
int colmode;
|
int colmode;
|
||||||
} def;
|
} def;
|
||||||
|
|
||||||
typedef struct WMScreen WMScreen;
|
|
||||||
struct WMScreen {
|
struct WMScreen {
|
||||||
Bar *lbar;
|
Bar *lbar;
|
||||||
Bar *rbar;
|
Bar *rbar;
|
||||||
View *sel;
|
View *sel;
|
||||||
|
Window barwin;
|
||||||
|
|
||||||
XRectangle rect;
|
XRectangle rect;
|
||||||
XRectangle brect;
|
XRectangle brect;
|
||||||
Window barwin;
|
|
||||||
BlitzBrush bbrush;
|
BlitzBrush bbrush;
|
||||||
} *screens;
|
} *screens;
|
||||||
/* to be removed */
|
/* to be removed */
|
||||||
Bar *lbar;
|
Bar *lbar;
|
||||||
Bar *rbar;
|
Bar *rbar;
|
||||||
View *sel;
|
View *sel;
|
||||||
|
Window barwin;
|
||||||
|
|
||||||
XRectangle rect;
|
XRectangle rect;
|
||||||
XRectangle brect;
|
XRectangle brect;
|
||||||
Window barwin;
|
|
||||||
BlitzBrush bbrush;
|
BlitzBrush bbrush;
|
||||||
|
|
||||||
/* global variables */
|
|
||||||
View *view;
|
|
||||||
Client *client;
|
Client *client;
|
||||||
|
View *view;
|
||||||
Key *key;
|
Key *key;
|
||||||
|
|
||||||
enum { BUFFER_SIZE = 8092 };
|
enum { BUFFER_SIZE = 8092 };
|
||||||
char buffer[BUFFER_SIZE];
|
char buffer[BUFFER_SIZE];
|
||||||
|
|
||||||
P9Srv p9srv;
|
/* IXP */
|
||||||
Blitz blz;
|
|
||||||
IXPServer srv;
|
IXPServer srv;
|
||||||
|
P9Srv p9srv;
|
||||||
|
|
||||||
|
/* X11 */
|
||||||
|
unsigned int num_screens;
|
||||||
|
Blitz blz;
|
||||||
GC xorgc;
|
GC xorgc;
|
||||||
char *user;
|
char *user;
|
||||||
Atom wm_atom[WMLast];
|
Atom wm_atom[WMLast];
|
||||||
@ -205,10 +203,12 @@ Cursor cursor[CurLast];
|
|||||||
unsigned int valid_mask;
|
unsigned int valid_mask;
|
||||||
unsigned int num_lock_mask;
|
unsigned int num_lock_mask;
|
||||||
Bool sel_screen;
|
Bool sel_screen;
|
||||||
Bool starting;
|
|
||||||
Pixmap pmap;
|
Pixmap pmap;
|
||||||
void (*handler[LASTEvent]) (XEvent *);
|
void (*handler[LASTEvent]) (XEvent *);
|
||||||
|
|
||||||
|
/* Misc */
|
||||||
|
Bool starting;
|
||||||
|
|
||||||
/* wm.c */
|
/* wm.c */
|
||||||
char *message_root(char *message);
|
char *message_root(char *message);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user