You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.4 KiB

19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
  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 { NetSupported, NetWMName, NetLast };
  11. /* cursor */
  12. enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
  13. /* rects */
  14. enum { RFloat, RGrid, RLast };
  15. typedef struct Client Client;
  16. typedef struct Key Key;
  17. struct Client {
  18. char name[256];
  19. char tag[256];
  20. unsigned int border;
  21. Bool fixedsize;
  22. Window win;
  23. Window trans;
  24. Window title;
  25. XSizeHints size;
  26. XRectangle r[RLast];
  27. Client *next;
  28. Client *snext;
  29. };
  30. struct Key {
  31. unsigned long mod;
  32. KeySym keysym;
  33. void (*func)(char *arg);
  34. char *arg;
  35. };
  36. extern Display *dpy;
  37. extern Window root, barwin;
  38. extern Atom net_atom[NetLast];
  39. extern Cursor cursor[CurLast];
  40. extern XRectangle rect, barrect;
  41. extern Bool running;
  42. extern Bool grid;
  43. extern void (*handler[LASTEvent]) (XEvent *);
  44. extern int screen, sel_screen;
  45. extern char *bartext, tag[256];
  46. extern Brush brush;
  47. extern Client *clients;
  48. /* bar.c */
  49. extern void draw_bar();
  50. /* cmd.c */
  51. extern void run(char *arg);
  52. extern void quit(char *arg);
  53. /* client.c */
  54. extern void manage(Window w, XWindowAttributes *wa);
  55. void unmanage(Client *c);
  56. extern Client * getclient(Window w);
  57. /* key.c */
  58. extern void update_keys();
  59. extern void keypress(XEvent *e);
  60. /* wm.c */
  61. extern int error_handler(Display *dpy, XErrorEvent *error);