88 extern const char *tags[]; /* all tags */ |
88 extern const char *tags[]; /* all tags */ |
89 extern char stext[256]; /* status text */ |
89 extern char stext[256]; /* status text */ |
90 extern int screen, sx, sy, sw, sh; /* screen geometry */ |
90 extern int screen, sx, sy, sw, sh; /* screen geometry */ |
91 extern int wax, way, wah, waw; /* windowarea geometry */ |
91 extern int wax, way, wah, waw; /* windowarea geometry */ |
92 extern unsigned int bh, blw; /* bar height, bar layout label width */ |
92 extern unsigned int bh, blw; /* bar height, bar layout label width */ |
93 extern unsigned int master, nmaster; /* master percent, number of master clients */ |
|
94 extern unsigned int ntags, numlockmask; /* number of tags, dynamic lock mask */ |
93 extern unsigned int ntags, numlockmask; /* number of tags, dynamic lock mask */ |
95 extern void (*handler[LASTEvent])(XEvent *); /* event handler */ |
94 extern void (*handler[LASTEvent])(XEvent *); /* event handler */ |
96 extern Atom wmatom[WMLast], netatom[NetLast]; |
95 extern Atom wmatom[WMLast], netatom[NetLast]; |
97 extern Bool selscreen, *seltag; /* seltag is array of Bool */ |
96 extern Bool selscreen, *seltag; /* seltag is array of Bool */ |
98 extern Client *clients, *sel, *stack; /* global client list and stack */ |
97 extern Client *clients, *sel, *stack; /* global client list and stack */ |
103 extern Window root, barwin; |
102 extern Window root, barwin; |
104 |
103 |
105 /* client.c */ |
104 /* client.c */ |
106 extern void configure(Client *c); /* send synthetic configure event */ |
105 extern void configure(Client *c); /* send synthetic configure event */ |
107 extern void focus(Client *c); /* focus c, c may be NULL */ |
106 extern void focus(Client *c); /* focus c, c may be NULL */ |
108 extern void killclient(Arg *arg); /* kill c nicely */ |
107 extern void killclient(Arg arg); /* kill c nicely */ |
109 extern void manage(Window w, XWindowAttributes *wa); /* manage new client */ |
108 extern void manage(Window w, XWindowAttributes *wa); /* manage new client */ |
110 extern void resize(Client *c, int x, int y, |
109 extern void resize(Client *c, int x, int y, |
111 int w, int h, Bool sizehints); /* resize with given coordinates c*/ |
110 int w, int h, Bool sizehints); /* resize with given coordinates c*/ |
112 extern void toggleversatile(Arg *arg); /* toggles focused client between versatile/and non-versatile state */ |
111 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 */ |
112 extern void updatesizehints(Client *c); /* update the size hint variables of c */ |
114 extern void updatetitle(Client *c); /* update the name of c */ |
113 extern void updatetitle(Client *c); /* update the name of c */ |
115 extern void unmanage(Client *c); /* destroy c */ |
114 extern void unmanage(Client *c); /* destroy c */ |
116 extern void zoom(Arg *arg); /* zooms the focused client to master area, arg is ignored */ |
|
117 |
115 |
118 /* draw.c */ |
116 /* draw.c */ |
119 extern void drawstatus(void); /* draw the bar */ |
117 extern void drawstatus(void); /* draw the bar */ |
120 extern void drawtext(const char *text, |
118 extern void drawtext(const char *text, |
121 unsigned long col[ColLast]); /* draw text */ |
119 unsigned long col[ColLast]); /* draw text */ |
123 |
121 |
124 /* event.c */ |
122 /* event.c */ |
125 extern void grabkeys(void); /* grab all keys defined in config.h */ |
123 extern void grabkeys(void); /* grab all keys defined in config.h */ |
126 |
124 |
127 /* layout.c */ |
125 /* layout.c */ |
128 extern void focusnext(Arg *arg); /* focuses next visible client, arg is ignored */ |
126 extern void focusnext(Arg arg); /* focuses next visible client, arg is ignored */ |
129 extern void focusprev(Arg *arg); /* focuses previous visible client, arg is ignored */ |
127 extern void focusprev(Arg arg); /* focuses previous visible client, arg is ignored */ |
130 extern void incnmaster(Arg *arg); /* increments nmaster with arg's index value */ |
128 extern void incmasterw(Arg arg); /* increments the master width with arg's index value */ |
|
129 extern void incnmaster(Arg arg); /* increments nmaster with arg's index value */ |
131 extern void initlayouts(void); /* initialize layout array */ |
130 extern void initlayouts(void); /* initialize layout array */ |
132 extern Client *nexttiled(Client *c); /* returns tiled successor of c */ |
131 extern Client *nexttiled(Client *c); /* returns tiled successor of c */ |
133 extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */ |
|
134 extern void restack(void); /* restores z layers of all clients */ |
132 extern void restack(void); /* restores z layers of all clients */ |
135 extern void setlayout(Arg *arg); /* sets layout, -1 toggles */ |
133 extern void setlayout(Arg arg); /* sets layout, -1 toggles */ |
|
134 extern void togglemax(Arg arg); /* toggles maximization of versatile client */ |
136 extern void versatile(void); /* arranges all windows versatile */ |
135 extern void versatile(void); /* arranges all windows versatile */ |
137 |
136 |
138 /* main.c */ |
137 /* main.c */ |
139 extern void quit(Arg *arg); /* quit dwm nicely */ |
138 extern void quit(Arg arg); /* quit dwm nicely */ |
140 extern void sendevent(Window w, Atom a, long value); /* send synthetic event to w */ |
139 extern void sendevent(Window w, Atom a, long value); /* send synthetic event to w */ |
141 extern int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */ |
140 extern int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */ |
142 |
141 |
143 /* tag.c */ |
142 /* tag.c */ |
144 extern void compileregs(void); /* initialize regexps of rules defined in config.h */ |
143 extern void compileregs(void); /* initialize regexps of rules defined in config.h */ |
145 extern Bool isvisible(Client *c); /* returns True if client is visible */ |
144 extern Bool isvisible(Client *c); /* returns True if client is visible */ |
146 extern void settags(Client *c, Client *trans); /* sets tags of c */ |
145 extern void settags(Client *c, Client *trans); /* sets tags of c */ |
147 extern void tag(Arg *arg); /* tags c with arg's index */ |
146 extern void tag(Arg arg); /* tags c with arg's index */ |
148 extern void toggletag(Arg *arg); /* toggles c tags with arg's index */ |
147 extern void toggletag(Arg arg); /* toggles c tags with arg's index */ |
149 extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */ |
148 extern void toggleview(Arg arg); /* toggles the tag with arg's index (in)visible */ |
150 extern void view(Arg *arg); /* views the tag with arg's index */ |
149 extern void view(Arg arg); /* views the tag with arg's index */ |
|
150 extern void zoom(Arg arg); /* zooms the focused client to master area, arg is ignored */ |
151 |
151 |
152 /* util.c */ |
152 /* util.c */ |
153 extern void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */ |
153 extern void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */ |
154 extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */ |
154 extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */ |
155 extern void spawn(Arg *arg); /* forks a new subprocess with arg's cmd */ |
155 extern void spawn(Arg arg); /* forks a new subprocess with arg's cmd */ |
156 |
156 |