wm.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
  3. * See LICENSE file for license details.
  4. */
  5. #include "config.h"
  6. #include "draw.h"
  7. #include "util.h"
  8. #include <X11/Xutil.h>
  9. /* atoms */
  10. enum { WMState, WMProtocols, WMDelete, WMLast };
  11. enum { NetSupported, NetWMName, NetLast };
  12. /* cursor */
  13. enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
  14. /* rects */
  15. enum { RFloat, RGrid, RLast };
  16. typedef struct Client Client;
  17. struct Client {
  18. char name[256];
  19. char tag[256];
  20. int proto;
  21. unsigned int border;
  22. Bool fixedsize;
  23. Window win;
  24. Window trans;
  25. Window title;
  26. XSizeHints size;
  27. XRectangle r[RLast];
  28. Client *next;
  29. Client *snext;
  30. };
  31. extern Display *dpy;
  32. extern Window root, barwin;
  33. extern Atom wm_atom[WMLast], net_atom[NetLast];
  34. extern Cursor cursor[CurLast];
  35. extern XRectangle rect, barrect;
  36. extern Bool running;
  37. extern Bool grid;
  38. extern void (*handler[LASTEvent]) (XEvent *);
  39. extern int screen, sel_screen;
  40. extern unsigned int lock_mask, numlock_mask;
  41. extern char *bartext, tag[256];
  42. extern Brush brush;
  43. extern Client *client;
  44. /* bar.c */
  45. extern void draw_bar();
  46. /* client.c */
  47. extern Client *create_client(Window w, XWindowAttributes *wa);
  48. extern void manage(Client *c);
  49. /* wm.c */
  50. extern int win_proto(Window w);