aewl

annotate wm.h @ 13:5cc5e55a132d

added protocol killing stuff
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 16:14:22 +0200
parents 703255003abb
children 5c078b66347b
rev   line source
garbeam@0 1 /*
garbeam@0 2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
garbeam@0 3 * See LICENSE file for license details.
garbeam@0 4 */
garbeam@0 5
garbeam@3 6 #include "config.h"
garbeam@2 7 #include "draw.h"
garbeam@2 8 #include "util.h"
garbeam@2 9
garbeam@0 10 #include <X11/Xutil.h>
garbeam@0 11
garbeam@13 12 #define WM_PROTOCOL_DELWIN 1
garbeam@13 13
garbeam@5 14 /* atoms */
garbeam@13 15 enum { WMProtocols, WMDelete, WMLast };
garbeam@0 16 enum { NetSupported, NetWMName, NetLast };
garbeam@0 17
garbeam@5 18 /* cursor */
garbeam@0 19 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
garbeam@0 20
garbeam@5 21 /* rects */
garbeam@0 22 enum { RFloat, RGrid, RLast };
garbeam@0 23
garbeam@0 24 typedef struct Client Client;
garbeam@8 25 typedef struct Key Key;
garbeam@0 26
garbeam@0 27 struct Client {
garbeam@0 28 char name[256];
garbeam@7 29 char tag[256];
garbeam@5 30 unsigned int border;
garbeam@13 31 int proto;
garbeam@5 32 Bool fixedsize;
garbeam@0 33 Window win;
garbeam@0 34 Window trans;
garbeam@0 35 Window title;
garbeam@0 36 XSizeHints size;
garbeam@0 37 XRectangle r[RLast];
garbeam@0 38 Client *next;
garbeam@5 39 Client *snext;
garbeam@0 40 };
garbeam@0 41
garbeam@8 42 struct Key {
garbeam@8 43 unsigned long mod;
garbeam@8 44 KeySym keysym;
garbeam@8 45 void (*func)(char *arg);
garbeam@8 46 char *arg;
garbeam@8 47 };
garbeam@8 48
garbeam@0 49 extern Display *dpy;
garbeam@5 50 extern Window root, barwin;
garbeam@13 51 extern Atom wm_atom[WMLast], net_atom[NetLast];
garbeam@0 52 extern Cursor cursor[CurLast];
garbeam@5 53 extern XRectangle rect, barrect;
garbeam@13 54 extern Bool running, sel_screen, grid;
garbeam@5 55 extern void (*handler[LASTEvent]) (XEvent *);
garbeam@0 56
garbeam@13 57 extern int screen;
garbeam@7 58 extern char *bartext, tag[256];
garbeam@3 59
garbeam@3 60 extern Brush brush;
garbeam@13 61 extern Client *clients, *stack;
garbeam@3 62
garbeam@5 63 /* bar.c */
garbeam@5 64 extern void draw_bar();
garbeam@5 65
garbeam@8 66 /* cmd.c */
garbeam@8 67 extern void run(char *arg);
garbeam@9 68 extern void quit(char *arg);
garbeam@8 69
garbeam@5 70 /* client.c */
garbeam@10 71 extern void manage(Window w, XWindowAttributes *wa);
garbeam@13 72 extern void unmanage(Client *c);
garbeam@13 73 extern Client *getclient(Window w);
garbeam@13 74 extern void focus(Client *c);
garbeam@13 75 extern void update_name(Client *c);
garbeam@13 76
garbeam@13 77 /* event.c */
garbeam@13 78 extern unsigned int flush_events(long even_mask);
garbeam@5 79
garbeam@8 80 /* key.c */
garbeam@8 81 extern void update_keys();
garbeam@9 82 extern void keypress(XEvent *e);
garbeam@8 83
garbeam@0 84 /* wm.c */
garbeam@10 85 extern int error_handler(Display *dpy, XErrorEvent *error);
garbeam@13 86 extern void send_message(Window w, Atom a, long value);
garbeam@13 87 extern int win_proto(Window w);