dwm-meillo

annotate wm.h @ 8:7066ff2fe8bc

added key handling
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 11:50:18 +0200
parents 49e2fc9fb94f
children d567f430a81d
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@5 12 /* atoms */
garbeam@0 13 enum { WMState, WMProtocols, WMDelete, WMLast };
garbeam@0 14 enum { NetSupported, NetWMName, NetLast };
garbeam@0 15
garbeam@5 16 /* cursor */
garbeam@0 17 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
garbeam@0 18
garbeam@5 19 /* rects */
garbeam@0 20 enum { RFloat, RGrid, RLast };
garbeam@0 21
garbeam@0 22 typedef struct Client Client;
garbeam@8 23 typedef struct Key Key;
garbeam@0 24
garbeam@0 25 struct Client {
garbeam@0 26 char name[256];
garbeam@7 27 char tag[256];
garbeam@0 28 int proto;
garbeam@5 29 unsigned int border;
garbeam@5 30 Bool fixedsize;
garbeam@0 31 Window win;
garbeam@0 32 Window trans;
garbeam@0 33 Window title;
garbeam@0 34 XSizeHints size;
garbeam@0 35 XRectangle r[RLast];
garbeam@0 36 Client *next;
garbeam@5 37 Client *snext;
garbeam@0 38 };
garbeam@0 39
garbeam@8 40 struct Key {
garbeam@8 41 unsigned long mod;
garbeam@8 42 KeySym keysym;
garbeam@8 43 void (*func)(char *arg);
garbeam@8 44 char *arg;
garbeam@8 45 };
garbeam@8 46
garbeam@0 47 extern Display *dpy;
garbeam@5 48 extern Window root, barwin;
garbeam@5 49 extern Atom wm_atom[WMLast], net_atom[NetLast];
garbeam@0 50 extern Cursor cursor[CurLast];
garbeam@5 51 extern XRectangle rect, barrect;
garbeam@5 52 extern Bool running;
garbeam@7 53 extern Bool grid;
garbeam@5 54 extern void (*handler[LASTEvent]) (XEvent *);
garbeam@0 55
garbeam@3 56 extern int screen, sel_screen;
garbeam@7 57 extern char *bartext, tag[256];
garbeam@3 58
garbeam@3 59 extern Brush brush;
garbeam@7 60 extern Client *client;
garbeam@3 61
garbeam@5 62 /* bar.c */
garbeam@5 63 extern void draw_bar();
garbeam@5 64
garbeam@8 65 /* cmd.c */
garbeam@8 66 extern void run(char *arg);
garbeam@8 67
garbeam@5 68 /* client.c */
garbeam@5 69 extern Client *create_client(Window w, XWindowAttributes *wa);
garbeam@5 70 extern void manage(Client *c);
garbeam@5 71
garbeam@8 72 /* key.c */
garbeam@8 73 extern void update_keys();
garbeam@8 74
garbeam@0 75 /* wm.c */
garbeam@5 76 extern int win_proto(Window w);