aboutsummaryrefslogtreecommitdiff
path: root/src/Keys.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Keys.hh')
-rw-r--r--src/Keys.hh8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Keys.hh b/src/Keys.hh
index 2fca460..a8684ed 100644
--- a/src/Keys.hh
+++ b/src/Keys.hh
@@ -34,6 +34,10 @@
34#include "FbTk/Command.hh" 34#include "FbTk/Command.hh"
35#include "FbTk/KeyUtil.hh" 35#include "FbTk/KeyUtil.hh"
36 36
37namespace FbTk {
38 class EventHandler;
39}
40
37class Keys:private FbTk::NotCopyable { 41class Keys:private FbTk::NotCopyable {
38public: 42public:
39 43
@@ -78,7 +82,7 @@ public:
78 bool doAction(int type, unsigned int mods, unsigned int key, int context); 82 bool doAction(int type, unsigned int mods, unsigned int key, int context);
79 83
80 /// register a window so that proper keys/buttons get grabbed on it 84 /// register a window so that proper keys/buttons get grabbed on it
81 void registerWindow(Window win, int context); 85 void registerWindow(Window win, FbTk::EventHandler &handler, int context);
82 /// unregister window 86 /// unregister window
83 void unregisterWindow(Window win); 87 void unregisterWindow(Window win);
84 88
@@ -145,7 +149,9 @@ private:
145 Display *m_display; ///< display connection 149 Display *m_display; ///< display connection
146 150
147 typedef std::map<Window, int> WindowMap; 151 typedef std::map<Window, int> WindowMap;
152 typedef std::map<Window, FbTk::EventHandler*> HandlerMap;
148 WindowMap m_window_map; 153 WindowMap m_window_map;
154 HandlerMap m_handler_map;
149}; 155};
150 156
151#endif // KEYS_HH 157#endif // KEYS_HH