diff options
Diffstat (limited to 'src/FbTk/EventManager.hh')
-rw-r--r-- | src/FbTk/EventManager.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FbTk/EventManager.hh b/src/FbTk/EventManager.hh index 5bbaa00..149649b 100644 --- a/src/FbTk/EventManager.hh +++ b/src/FbTk/EventManager.hh | |||
@@ -43,6 +43,10 @@ public: | |||
43 | void add(EventHandler &ev, Window win) { registerEventHandler(ev, win); } | 43 | void add(EventHandler &ev, Window win) { registerEventHandler(ev, win); } |
44 | void remove(Window win) { unregisterEventHandler(win); } | 44 | void remove(Window win) { unregisterEventHandler(win); } |
45 | 45 | ||
46 | bool grabKeyboard(EventHandler &ev, Window win); | ||
47 | void ungrabKeyboard(); | ||
48 | EventHandler *grabbingKeyboard() { return m_grabbing_keyboard; } | ||
49 | |||
46 | EventHandler *find(Window win); | 50 | EventHandler *find(Window win); |
47 | 51 | ||
48 | // Some events have the parent window as the xany.window | 52 | // Some events have the parent window as the xany.window |
@@ -53,13 +57,14 @@ public: | |||
53 | void unregisterEventHandler(Window win); | 57 | void unregisterEventHandler(Window win); |
54 | 58 | ||
55 | private: | 59 | private: |
56 | EventManager() { } | 60 | EventManager(): m_grabbing_keyboard(0) { } |
57 | ~EventManager(); | 61 | ~EventManager(); |
58 | void dispatch(Window win, XEvent &event, bool parent = false); | 62 | void dispatch(Window win, XEvent &event, bool parent = false); |
59 | 63 | ||
60 | typedef std::map<Window, EventHandler *> EventHandlerMap; | 64 | typedef std::map<Window, EventHandler *> EventHandlerMap; |
61 | EventHandlerMap m_eventhandlers; | 65 | EventHandlerMap m_eventhandlers; |
62 | EventHandlerMap m_parent; | 66 | EventHandlerMap m_parent; |
67 | EventHandler *m_grabbing_keyboard; | ||
63 | }; | 68 | }; |
64 | 69 | ||
65 | } //end namespace FbTk | 70 | } //end namespace FbTk |