aewl
view dwm.h @ 262:d659a2dce2b5
implemented viewextend and added M-S-C-n shortcuts for extending the current view... updated man page (works great!) nice feature
author | Anselm R.Garbe <arg@10ksloc.org> |
---|---|
date | Fri, 11 Aug 2006 19:26:12 +0200 |
parents | d6fd632d861c |
children | 118d3e010e5e |
line source
1 /*
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
4 */
6 #include "config.h"
7 #include <X11/Xlib.h>
9 /* mask shorthands, used in event.c and client.c */
10 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask)
11 #define MOUSEMASK (BUTTONMASK | PointerMotionMask)
12 #define PROTODELWIN 1
14 typedef union Arg Arg;
15 typedef struct Client Client;
16 typedef struct DC DC;
17 typedef struct Fnt Fnt;
19 union Arg {
20 const char *cmd;
21 int i;
22 };
24 /* atoms */
25 enum { NetSupported, NetWMName, NetLast };
26 enum { WMProtocols, WMDelete, WMLast };
28 /* cursor */
29 enum { CurNormal, CurResize, CurMove, CurLast };
31 /* windowcorners */
32 typedef enum { TopLeft, TopRight, BotLeft, BotRight } Corner;
34 struct Fnt {
35 int ascent;
36 int descent;
37 int height;
38 XFontSet set;
39 XFontStruct *xfont;
40 };
42 struct DC { /* draw context */
43 int x, y, w, h;
44 unsigned long bg;
45 unsigned long fg;
46 unsigned long border;
47 Drawable drawable;
48 Fnt font;
49 GC gc;
50 };
52 struct Client {
53 char name[256];
54 int proto;
55 int x, y, w, h;
56 int tx, ty, tw, th; /* title */
57 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
58 int grav;
59 long flags;
60 unsigned int border;
61 Bool isfloat;
62 Bool ismax;
63 Bool *tags;
64 Client *next;
65 Client *prev;
66 Window win;
67 Window title;
68 };
70 extern const char *tags[];
71 extern char stext[1024];
72 extern int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
73 extern unsigned int ntags;
74 extern void (*handler[LASTEvent])(XEvent *);
75 extern void (*arrange)(Arg *);
76 extern Atom wmatom[WMLast], netatom[NetLast];
77 extern Bool running, issel, *seltag;
78 extern Client *clients, *sel;
79 extern Cursor cursor[CurLast];
80 extern DC dc;
81 extern Display *dpy;
82 extern Window root, barwin;
84 /* client.c */
85 extern void ban(Client *c);
86 extern void focus(Client *c);
87 extern void focusnext(Arg *arg);
88 extern void focusprev(Arg *arg);
89 extern Client *getclient(Window w);
90 extern Client *getctitle(Window w);
91 extern void gravitate(Client *c, Bool invert);
92 extern void higher(Client *c);
93 extern void killclient(Arg *arg);
94 extern void manage(Window w, XWindowAttributes *wa);
95 extern void resize(Client *c, Bool sizehints, Corner sticky);
96 extern void setsize(Client *c);
97 extern void settitle(Client *c);
98 extern void togglemax(Arg *arg);
99 extern void unmanage(Client *c);
100 extern void zoom(Arg *arg);
102 /* draw.c */
103 extern void drawall();
104 extern void drawstatus();
105 extern void drawtitle(Client *c);
106 extern unsigned long getcolor(const char *colstr);
107 extern void setfont(const char *fontstr);
108 extern unsigned int textw(const char *text);
110 /* event.c */
111 extern void grabkeys();
113 /* main.c */
114 extern int getproto(Window w);
115 extern void quit(Arg *arg);
116 extern void sendevent(Window w, Atom a, long value);
117 extern int xerror(Display *dsply, XErrorEvent *ee);
119 /* tag.c */
120 extern void appendtag(Arg *arg);
121 extern void dofloat(Arg *arg);
122 extern void dotile(Arg *arg);
123 extern void initrregs();
124 extern Bool isvisible(Client *c);
125 extern Client *getnext(Client *c);
126 extern Client *getprev(Client *c);
127 extern void replacetag(Arg *arg);
128 extern void settags(Client *c);
129 extern void togglemode(Arg *arg);
130 extern void view(Arg *arg);
131 extern void viewextend(Arg *arg);
132 extern void viewnext(Arg *arg);
133 extern void viewprev(Arg *arg);
135 /* util.c */
136 extern void *emallocz(unsigned int size);
137 extern void eprint(const char *errstr, ...);
138 extern void spawn(Arg *arg);