comparison dwm.h @ 6:0968b3739b8d

apply keymodes patch
author paulo@thepaulopc
date Sun, 12 Jun 2011 14:32:54 -0700
parents faa4cb9d7bd6
children e749c30135e9
comparison
equal deleted inserted replaced
2:c83066108cfd 3:9992ddeca38a
30 * To understand everything else, start reading main.c:main(). 30 * To understand everything else, start reading main.c:main().
31 */ 31 */
32 32
33 #include "config.h" 33 #include "config.h"
34 #include <X11/Xlib.h> 34 #include <X11/Xlib.h>
35
36 #define LENGTH(X) (sizeof X / sizeof X[0])
35 37
36 /* mask shorthands, used in event.c and client.c */ 38 /* mask shorthands, used in event.c and client.c */
37 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask) 39 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask)
38 40
39 enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ 41 enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
85 void (*arrange)(void); 87 void (*arrange)(void);
86 } Layout; 88 } Layout;
87 89
88 extern const char *tags[]; /* all tags */ 90 extern const char *tags[]; /* all tags */
89 extern char stext[256]; /* status text */ 91 extern char stext[256]; /* status text */
92 extern char cmtext[256]; /* command mode text */
90 extern int screen, sx, sy, sw, sh; /* screen geometry */ 93 extern int screen, sx, sy, sw, sh; /* screen geometry */
91 extern int wax, way, wah, waw; /* windowarea geometry */ 94 extern int wax, way, wah, waw; /* windowarea geometry */
92 extern unsigned int bh, blw; /* bar height, bar layout label width */ 95 extern unsigned int bh, blw; /* bar height, bar layout label width */
93 extern unsigned int master, nmaster; /* master percent, number of master clients */ 96 extern unsigned int master, nmaster; /* master percent, number of master clients */
94 extern unsigned int ntags, numlockmask; /* number of tags, dynamic lock mask */ 97 extern unsigned int ntags, numlockmask; /* number of tags, dynamic lock mask */
112 extern void toggleversatile(Arg *arg); /* toggles focused client between versatile/and non-versatile state */ 115 extern void toggleversatile(Arg *arg); /* toggles focused client between versatile/and non-versatile state */
113 extern void updatesizehints(Client *c); /* update the size hint variables of c */ 116 extern void updatesizehints(Client *c); /* update the size hint variables of c */
114 extern void updatetitle(Client *c); /* update the name of c */ 117 extern void updatetitle(Client *c); /* update the name of c */
115 extern void unmanage(Client *c); /* destroy c */ 118 extern void unmanage(Client *c); /* destroy c */
116 extern void zoom(Arg *arg); /* zooms the focused client to master area, arg is ignored */ 119 extern void zoom(Arg *arg); /* zooms the focused client to master area, arg is ignored */
120 extern void zoom_insert(Arg *arg); /* zoom, then go into insert mode */
117 extern void pushup(Arg *arg); 121 extern void pushup(Arg *arg);
118 extern void pushdown(Arg *arg); 122 extern void pushdown(Arg *arg);
119 extern void moveresize(Arg *arg); 123 extern void moveresize(Arg *arg);
120 124
121 /* draw.c */ 125 /* draw.c */
124 unsigned long col[ColLast]); /* draw text */ 128 unsigned long col[ColLast]); /* draw text */
125 extern unsigned int textw(const char *text); /* return the width of text in px*/ 129 extern unsigned int textw(const char *text); /* return the width of text in px*/
126 130
127 /* event.c */ 131 /* event.c */
128 extern void grabkeys(void); /* grab all keys defined in config.h */ 132 extern void grabkeys(void); /* grab all keys defined in config.h */
133 extern void clearcmd(Arg *arg);
134 extern void setkeymode(Arg *arg);
135 extern unsigned int getkeymode(void);
136 extern void func_insert(void (*argfunc)(Arg *), Arg *arg);
129 137
130 /* layout.c */ 138 /* layout.c */
131 extern void focusnext(Arg *arg); /* focuses next visible client, arg is ignored */ 139 extern void focusnext(Arg *arg); /* focuses next visible client, arg is ignored */
132 extern void focusprev(Arg *arg); /* focuses previous visible client, arg is ignored */ 140 extern void focusprev(Arg *arg); /* focuses previous visible client, arg is ignored */
133 extern void incnmaster(Arg *arg); /* increments nmaster with arg's index value */ 141 extern void incnmaster(Arg *arg); /* increments nmaster with arg's index value */
156 164
157 /* util.c */ 165 /* util.c */
158 extern void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */ 166 extern void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */
159 extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */ 167 extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */
160 extern void spawn(Arg *arg); /* forks a new subprocess with arg's cmd */ 168 extern void spawn(Arg *arg); /* forks a new subprocess with arg's cmd */
161 169 extern void spawn_insert(Arg *arg); /* spawn, then go into insert mode */