diff options
Diffstat (limited to 'src/Keys.hh')
-rw-r--r-- | src/Keys.hh | 8 |
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 | ||
37 | namespace FbTk { | ||
38 | class EventHandler; | ||
39 | } | ||
40 | |||
37 | class Keys:private FbTk::NotCopyable { | 41 | class Keys:private FbTk::NotCopyable { |
38 | public: | 42 | public: |
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 |