From 0fd8d49ee81d7115a2b033bfe5710e2d448293e8 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 29 Jun 2006 19:02:51 -0400 Subject: [PATCH] Some cleanup in wm.h --- cmd/wm/fs.c | 2 +- cmd/wm/wm.h | 46 +++++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c index add5b408..20c43e6b 100644 --- a/cmd/wm/fs.c +++ b/cmd/wm/fs.c @@ -37,7 +37,7 @@ struct FileId { Bar **bar_p; View *view; Client *client; - Rules *rule; + Ruleset *rule; BlitzColor *col; }; unsigned int id; diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h index 0e856871..a8714203 100644 --- a/cmd/wm/wm.h +++ b/cmd/wm/wm.h @@ -44,16 +44,16 @@ enum { enum { MIN_COLWIDTH = 64 }; enum { WM_PROTOCOL_DELWIN = 1 }; +/* Data Structures */ typedef struct View View; typedef struct Area Area; typedef struct Frame Frame; typedef struct Client Client; - -typedef struct ViewLink ViewLink; -struct ViewLink { - ViewLink *next; - View *view; -}; +typedef struct Key Key; +typedef struct Bar Bar; +typedef struct Rule Rule; +typedef struct Ruleset Ruleset; +typedef struct WMScreen WMScreen; struct View { View *next; @@ -93,7 +93,6 @@ struct Frame { struct Client { Client *next; - ViewLink *views; Area *revert; Frame *frame; Frame *sel; @@ -113,7 +112,6 @@ struct Client { GC gc; }; -typedef struct Key Key; struct Key { Key *next; Key *lnext; @@ -124,7 +122,6 @@ struct Key { KeyCode key; }; -typedef struct Bar Bar; struct Bar { Bar *next; Bar *smaller; @@ -135,20 +132,19 @@ struct Bar { BlitzBrush brush; }; -typedef struct Rule Rule; struct Rule { Rule *next; regex_t regex; char value[256]; }; -typedef struct Rules { +struct Ruleset { Rule *rule; char *string; unsigned int size; -} Rules; +}; -/* default values */ +/* global variables */ struct { BlitzColor selcolor; BlitzColor normcolor; @@ -157,45 +153,47 @@ struct { unsigned int snap; char *keys; unsigned int keyssz; - Rules tagrules; - Rules colrules; + Ruleset tagrules; + Ruleset colrules; char grabmod[5]; unsigned long mod; int colmode; } def; -typedef struct WMScreen WMScreen; struct WMScreen { Bar *lbar; Bar *rbar; View *sel; + Window barwin; XRectangle rect; XRectangle brect; - Window barwin; BlitzBrush bbrush; } *screens; /* to be removed */ Bar *lbar; Bar *rbar; View *sel; + Window barwin; XRectangle rect; XRectangle brect; - Window barwin; BlitzBrush bbrush; -/* global variables */ -View *view; Client *client; +View *view; Key *key; enum { BUFFER_SIZE = 8092 }; char buffer[BUFFER_SIZE]; -P9Srv p9srv; -Blitz blz; +/* IXP */ IXPServer srv; +P9Srv p9srv; + +/* X11 */ +unsigned int num_screens; +Blitz blz; GC xorgc; char *user; Atom wm_atom[WMLast]; @@ -205,10 +203,12 @@ Cursor cursor[CurLast]; unsigned int valid_mask; unsigned int num_lock_mask; Bool sel_screen; -Bool starting; Pixmap pmap; void (*handler[LASTEvent]) (XEvent *); +/* Misc */ +Bool starting; + /* wm.c */ char *message_root(char *message);