1 /* treewm - an X11 window manager.
2  * Copyright (c) 2001-2002 Thomas J�ger <TheHunter2000 at web dot de>
3  * This code is released under the terms of the GNU GPL.
4  * See the included file LICENSE for details.
5  *
6  * changed<05.02.2003> by Rudolf Polzer: replaced hash_map by map (C++)
7  */
8 
9 #ifndef UEHANDLER_H
10 #define UEHANDLER_H
11 
12 #include "global.h"
13 #include "client.h"
14 #include <regex.h>
15 #include <map>
16 
17 #define RESIZERATIO 5
18 #define RESIZEMIN 40
19 #define RESIZEMAX 20
20 
21 struct ModList {
22   unsigned int mod;
23   char *cmd;
24   ModList *next;
25 };
26 
27 typedef map<KeyCode,ModList *> KeyMap;
28 typedef KeyMap::iterator KeyMapIter;
29 
30 class UEHandler {
31   public:
32 	  UEHandler();
33     ~UEHandler();
34     void AddKey(KeySym,unsigned int,char *);
35     void Press(XButtonEvent &);
36     void Motion(XMotionEvent &);
37     void Release(XButtonEvent &);
38     void Key(XKeyEvent &);
39     void RemoveClientReferences(Client *);
40     void SetCurrent(Client *,Icon *);
41     bool ExecCommand(Client *, Icon *,char *,bool,bool = false);
42     void ExecCommands(char *);
43     void ExecTextCommand(Client *,char *,bool);
44     Desktop *SelDesktop;
45     Client *SelEntry;
46     Client *SelClient;
47     Client *RefClient;
48     Menu *menu;
49     MenuItem *menuitems;
50     unsigned long Seltype;
51     TextDialog *dialog;
52     Client *Current;
53     Icon *CurrentIcon;
54   protected:
55     KeyMap keys;
56     KeyCode AltSpace;
57     Client *reg['z'-'a'+1];
58     Client *dreg;
59     Window MoveWin;
60     int xdown,ydown;
61     Client *NewTarget;
62     Icon *SelIcon;
63     Time downtime;
64     bool motion;
65     regex_t *preg;
66 
67 };
68 
69 #endif
70