dwm.h
changeset 734 6283adb1fcf2
parent 731 29c9b557ed95
child 760 8ed842c35e8d
equal deleted inserted replaced
733:1950833a5614 734:6283adb1fcf2
    34 #include "config.h"
    34 #include "config.h"
    35 #include <X11/Xlib.h>
    35 #include <X11/Xlib.h>
    36 
    36 
    37 /* mask shorthands, used in event.c and client.c */
    37 /* mask shorthands, used in event.c and client.c */
    38 #define BUTTONMASK		(ButtonPressMask | ButtonReleaseMask)
    38 #define BUTTONMASK		(ButtonPressMask | ButtonReleaseMask)
    39 /* other stuff used in different places */
       
    40 #define PROTODELWIN		1
       
    41 
    39 
    42 enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
    40 enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
    43 enum { WMProtocols, WMDelete, WMState, WMLast };	/* default atoms */
    41 enum { WMProtocols, WMDelete, WMState, WMLast };	/* default atoms */
    44 enum { CurNormal, CurResize, CurMove, CurLast };	/* cursor */
    42 enum { CurNormal, CurResize, CurMove, CurLast };	/* cursor */
    45 enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
    43 enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
    67 } DC; /* draw context */
    65 } DC; /* draw context */
    68 
    66 
    69 typedef struct Client Client;
    67 typedef struct Client Client;
    70 struct Client {
    68 struct Client {
    71 	char name[256];
    69 	char name[256];
    72 	int proto;
       
    73 	int x, y, w, h;
    70 	int x, y, w, h;
    74 	int rx, ry, rw, rh; /* revert geometry */
    71 	int rx, ry, rw, rh; /* revert geometry */
    75 	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
    72 	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
    76 	int minax, minay, maxax, maxay;
    73 	int minax, minay, maxax, maxay;
    77 	long flags; 
    74 	long flags; 
    78 	unsigned int border;
    75 	unsigned int border;
    79 	Bool isfloat, isfixed, ismax;
    76 	Bool isfixed, isfloat, ismax;
    80 	Bool *tags;
    77 	Bool *tags;
    81 	Client *next;
    78 	Client *next;
    82 	Client *prev;
    79 	Client *prev;
    83 	Client *snext;
    80 	Client *snext;
    84 	Window win;
    81 	Window win;
   103 
   100 
   104 /* client.c */
   101 /* client.c */
   105 extern void configure(Client *c);		/* send synthetic configure event */
   102 extern void configure(Client *c);		/* send synthetic configure event */
   106 extern void focus(Client *c);			/* focus c, c may be NULL */
   103 extern void focus(Client *c);			/* focus c, c may be NULL */
   107 extern Client *getclient(Window w);		/* return client of w */
   104 extern Client *getclient(Window w);		/* return client of w */
       
   105 extern Bool isprotodel(Client *c);		/* returns True if c->win supports wmatom[WMDelete] */
   108 extern void killclient(Arg *arg);		/* kill c nicely */
   106 extern void killclient(Arg *arg);		/* kill c nicely */
   109 extern void manage(Window w, XWindowAttributes *wa);	/* manage new client */
   107 extern void manage(Window w, XWindowAttributes *wa);	/* manage new client */
   110 extern void resize(Client *c, Bool sizehints);	/* resize c*/
   108 extern void resize(Client *c, Bool sizehints);	/* resize c*/
   111 extern void updatesizehints(Client *c);		/* update the size hint variables of c */
   109 extern void updatesizehints(Client *c);		/* update the size hint variables of c */
   112 extern void updatetitle(Client *c);		/* update the name of c */
   110 extern void updatetitle(Client *c);		/* update the name of c */
   121 /* event.c */
   119 /* event.c */
   122 extern void grabkeys(void);			/* grab all keys defined in config.h */
   120 extern void grabkeys(void);			/* grab all keys defined in config.h */
   123 extern void procevent(void);			/* process pending X events */
   121 extern void procevent(void);			/* process pending X events */
   124 
   122 
   125 /* main.c */
   123 /* main.c */
   126 extern int getproto(Window w);			/* return protocol mask of WMProtocols property of w */
       
   127 extern void quit(Arg *arg);			/* quit dwm nicely */
   124 extern void quit(Arg *arg);			/* quit dwm nicely */
   128 extern void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
   125 extern void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
   129 extern int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
   126 extern int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
   130 
   127 
   131 /* tag.c */
   128 /* tag.c */