diff options
Diffstat (limited to 'src/Keys.hh')
-rw-r--r-- | src/Keys.hh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Keys.hh b/src/Keys.hh index 75a8a68..6b393e7 100644 --- a/src/Keys.hh +++ b/src/Keys.hh | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <string> | 27 | #include <string> |
28 | #include <vector> | 28 | #include <vector> |
29 | #include <map> | ||
29 | #include <X11/Xlib.h> | 30 | #include <X11/Xlib.h> |
30 | 31 | ||
31 | #include "FbTk/NotCopyable.hh" | 32 | #include "FbTk/NotCopyable.hh" |
@@ -41,7 +42,7 @@ public: | |||
41 | @param display display connection | 42 | @param display display connection |
42 | @param filename file to load, default none | 43 | @param filename file to load, default none |
43 | */ | 44 | */ |
44 | explicit Keys(const char *filename=0); | 45 | explicit Keys(); |
45 | /// destructor | 46 | /// destructor |
46 | ~Keys(); | 47 | ~Keys(); |
47 | 48 | ||
@@ -61,9 +62,9 @@ public: | |||
61 | bool addBinding(const std::string &binding); | 62 | bool addBinding(const std::string &binding); |
62 | 63 | ||
63 | /** | 64 | /** |
64 | do action from XKeyEvent | 65 | do action from XKeyEvent; return false if not bound to anything |
65 | */ | 66 | */ |
66 | void doAction(XKeyEvent &ke); | 67 | bool doAction(XKeyEvent &ke); |
67 | 68 | ||
68 | /** | 69 | /** |
69 | Reload configuration from filename | 70 | Reload configuration from filename |
@@ -71,6 +72,7 @@ public: | |||
71 | */ | 72 | */ |
72 | bool reconfigure(const char *filename); | 73 | bool reconfigure(const char *filename); |
73 | const std::string filename() const { return m_filename; } | 74 | const std::string filename() const { return m_filename; } |
75 | void keyMode(std::string keyMode); | ||
74 | private: | 76 | private: |
75 | void deleteTree(); | 77 | void deleteTree(); |
76 | 78 | ||
@@ -120,7 +122,9 @@ private: | |||
120 | */ | 122 | */ |
121 | bool mergeTree(t_key *newtree, t_key *basetree=0); | 123 | bool mergeTree(t_key *newtree, t_key *basetree=0); |
122 | 124 | ||
123 | keylist_t m_keylist; | 125 | typedef std::map<std::string, keylist_t *> keyspace_t; |
126 | keylist_t *m_keylist; | ||
127 | keyspace_t m_map; | ||
124 | 128 | ||
125 | Display *m_display; ///< display connection | 129 | Display *m_display; ///< display connection |
126 | unsigned int m_current_line; | 130 | unsigned int m_current_line; |