summaryrefslogtreecommitdiffstats
path: root/dwm.h
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.h')
-rw-r--r--dwm.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/dwm.h b/dwm.h
index a4dc2ba..822c33b 100644
--- a/dwm.h
+++ b/dwm.h
@@ -24,9 +24,8 @@
24 * 24 *
25 * Keys and tagging rules are organized as arrays and defined in the config.h 25 * Keys and tagging rules are organized as arrays and defined in the config.h
26 * file. These arrays are kept static in event.o and tag.o respectively, 26 * file. These arrays are kept static in event.o and tag.o respectively,
27 * because no other part of dwm needs access to them. The current mode is 27 * because no other part of dwm needs access to them. The current layout is
28 * represented by the arrange() function pointer, which wether points to 28 * represented by the lt pointer.
29 * dofloat() or dotile().
30 * 29 *
31 * To understand everything else, start reading main.c:main(). 30 * To understand everything else, start reading main.c:main().
32 */ 31 */
@@ -81,21 +80,26 @@ struct Client {
81 Window win; 80 Window win;
82}; 81};
83 82
83typedef struct {
84 const char *symbol;
85 void (*arrange)(void);
86} Layout;
87
84extern const char *tags[]; /* all tags */ 88extern const char *tags[]; /* all tags */
85extern char stext[256]; /* status text */ 89extern char stext[256]; /* status text */
86extern int bh, bmw; /* bar height, bar mode label width */
87extern int screen, sx, sy, sw, sh; /* screen geometry */ 90extern int screen, sx, sy, sw, sh; /* screen geometry */
88extern int wax, way, wah, waw; /* windowarea geometry */ 91extern int wax, way, wah, waw; /* windowarea geometry */
92extern unsigned int bh, blw; /* bar height, bar layout label width */
89extern unsigned int master, nmaster; /* master percent, number of master clients */ 93extern unsigned int master, nmaster; /* master percent, number of master clients */
90extern unsigned int ntags, numlockmask; /* number of tags, dynamic lock mask */ 94extern unsigned int ntags, numlockmask; /* number of tags, dynamic lock mask */
91extern void (*handler[LASTEvent])(XEvent *); /* event handler */ 95extern void (*handler[LASTEvent])(XEvent *); /* event handler */
92extern void (*arrange)(void); /* arrange function, indicates mode */
93extern Atom wmatom[WMLast], netatom[NetLast]; 96extern Atom wmatom[WMLast], netatom[NetLast];
94extern Bool running, selscreen, *seltag; /* seltag is array of Bool */ 97extern Bool running, selscreen, *seltag; /* seltag is array of Bool */
95extern Client *clients, *sel, *stack; /* global client list and stack */ 98extern Client *clients, *sel, *stack; /* global client list and stack */
96extern Cursor cursor[CurLast]; 99extern Cursor cursor[CurLast];
97extern DC dc; /* global draw context */ 100extern DC dc; /* global draw context */
98extern Display *dpy; 101extern Display *dpy;
102extern Layout *lt;
99extern Window root, barwin; 103extern Window root, barwin;
100 104
101/* client.c */ 105/* client.c */
@@ -124,17 +128,18 @@ extern void sendevent(Window w, Atom a, long value); /* send synthetic event to
124extern int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */ 128extern int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */
125 129
126/* screen.c */ 130/* screen.c */
127extern void compileregexps(void); /* initialize regexps of rules defined in config.h */ 131extern void compileregs(void); /* initialize regexps of rules defined in config.h */
128extern void dofloat(void); /* arranges all windows floating */ 132extern void dofloat(void); /* arranges all windows floating */
129extern void dotile(void); /* arranges all windows tiled */ 133extern void dotile(void); /* arranges all windows tiled */
130extern void incnmaster(Arg *arg); /* increments nmaster with arg's index value */ 134extern void incnmaster(Arg *arg); /* increments nmaster with arg's index value */
135extern void initlayouts(void); /* initialize layout array */
131extern Bool isvisible(Client *c); /* returns True if client is visible */ 136extern Bool isvisible(Client *c); /* returns True if client is visible */
132extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */ 137extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */
133extern void restack(void); /* restores z layers of all clients */ 138extern void restack(void); /* restores z layers of all clients */
134extern void settags(Client *c, Client *trans); /* sets tags of c */ 139extern void settags(Client *c, Client *trans); /* sets tags of c */
135extern void tag(Arg *arg); /* tags c with arg's index */ 140extern void tag(Arg *arg); /* tags c with arg's index */
136extern void togglefloat(Arg *arg); /* toggles focusesd client between floating/non-floating state */ 141extern void togglefloat(Arg *arg); /* toggles focusesd client between floating/non-floating state */
137extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */ 142extern void togglelayout(Arg *arg); /* toggles layout */
138extern void toggletag(Arg *arg); /* toggles c tags with arg's index */ 143extern void toggletag(Arg *arg); /* toggles c tags with arg's index */
139extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */ 144extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */
140extern void view(Arg *arg); /* views the tag with arg's index */ 145extern void view(Arg *arg); /* views the tag with arg's index */