Configuration of dwm for Mac Computers
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.

93 lines
1.9 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 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. #define WM_PROTOCOL_DELWIN 1
  10. typedef struct Client Client;
  11. typedef struct Key Key;
  12. /* atoms */
  13. enum { WMProtocols, WMDelete, WMLast };
  14. enum { NetSupported, NetWMName, NetLast };
  15. /* cursor */
  16. enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
  17. /* rects */
  18. enum { RFloat, RGrid, RLast };
  19. struct Client {
  20. char name[256];
  21. char tag[256];
  22. int proto;
  23. Bool fixedsize;
  24. Window win;
  25. Window trans;
  26. Window title;
  27. XSizeHints size;
  28. XRectangle r[RLast];
  29. Client *next;
  30. Client *snext;
  31. };
  32. struct Key {
  33. unsigned long mod;
  34. KeySym keysym;
  35. void (*func)(void *aux);
  36. void *aux;
  37. };
  38. extern Display *dpy;
  39. extern Window root, barwin;
  40. extern Atom wm_atom[WMLast], net_atom[NetLast];
  41. extern Cursor cursor[CurLast];
  42. extern XRectangle rect, barrect;
  43. extern Bool running, sel_screen, grid;
  44. extern void (*handler[LASTEvent]) (XEvent *);
  45. extern int screen;
  46. extern char statustext[1024], tag[256];
  47. extern Brush brush;
  48. extern Client *clients, *stack;
  49. /* bar.c */
  50. extern void draw_bar();
  51. /* cmd.c */
  52. extern void run(void *aux);
  53. extern void quit(void *aux);
  54. extern void kill(void *aux);
  55. /* client.c */
  56. extern void manage(Window w, XWindowAttributes *wa);
  57. extern void unmanage(Client *c);
  58. extern Client *getclient(Window w);
  59. extern void focus(Client *c);
  60. extern void update_name(Client *c);
  61. extern void draw_client(Client *c);
  62. extern void resize(Client *c);
  63. /* event.c */
  64. extern unsigned int discard_events(long even_mask);
  65. /* key.c */
  66. extern void update_keys();
  67. extern void keypress(XEvent *e);
  68. /* mouse.c */
  69. extern void mresize(Client *c);
  70. extern void mmove(Client *c);
  71. /* wm.c */
  72. extern int error_handler(Display *dpy, XErrorEvent *error);
  73. extern void send_message(Window w, Atom a, long value);
  74. extern int win_proto(Window w);