aboutsummaryrefslogtreecommitdiff
path: root/src/Keys.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-20 17:37:57 (GMT)
committerfluxgen <fluxgen>2003-12-20 17:37:57 (GMT)
commit29c778459955d5aaa17e619f8acf09dc3ec1d9b2 (patch)
treecee66d71d15d855b71f2987f6de255ac3e7a92db /src/Keys.hh
parent7e167d9b83e81a634a4bdc09ba78be5d83bbbc37 (diff)
downloadfluxbox-29c778459955d5aaa17e619f8acf09dc3ec1d9b2.zip
fluxbox-29c778459955d5aaa17e619f8acf09dc3ec1d9b2.tar.bz2
addBinding function and some cleaning
Diffstat (limited to 'src/Keys.hh')
-rw-r--r--src/Keys.hh27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/Keys.hh b/src/Keys.hh
index b04cdc8..014f5a1 100644
--- a/src/Keys.hh
+++ b/src/Keys.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Keys.hh,v 1.30 2003/12/16 23:32:29 fluxgen Exp $ 22// $Id: Keys.hh,v 1.31 2003/12/20 17:37:20 fluxgen Exp $
23 23
24#ifndef KEYS_HH 24#ifndef KEYS_HH
25#define KEYS_HH 25#define KEYS_HH
@@ -48,27 +48,34 @@ public:
48 Load configuration from file 48 Load configuration from file
49 @return true on success, else false 49 @return true on success, else false
50 */ 50 */
51 bool load(const char *filename=0); 51 bool load(const char *filename = 0);
52 /**
53 Save keybindings to a file
54 Note: the file will be overwritten
55 @return true on success, else false
56 */
57 bool save(const char *filename = 0) const;
58 /// bind a key action from a string
59 /// @return false on failure
60 bool addBinding(const std::string &binding);
61
52 /** 62 /**
53 do action from XKeyEvent 63 do action from XKeyEvent
54 */ 64 */
55 void doAction(XKeyEvent &ke); 65 void doAction(XKeyEvent &ke);
66
56 /** 67 /**
57 Reload configuration from filename 68 Reload configuration from filename
58 @return true on success, else false 69 @return true on success, else false
59 */ 70 */
60 bool reconfigure(const char *filename); 71 bool reconfigure(const char *filename);
61 72 const std::string filename() const { return m_filename; }
62private: 73private:
63 void deleteTree(); 74 void deleteTree();
64 75
65 void bindKey(unsigned int key, unsigned int mod); 76 void bindKey(unsigned int key, unsigned int mod);
66 /** 77
67 @param modstr modifier string (i.e Mod4, Mod5) 78 std::string m_filename;
68 @return modifier number that match modstr
69 */
70
71 std::string filename;
72 79
73 class t_key { 80 class t_key {
74 public: 81 public:
@@ -111,7 +118,7 @@ private:
111 std::vector<t_key *> m_keylist; 118 std::vector<t_key *> m_keylist;
112 119
113 Display *m_display; ///< display connection 120 Display *m_display; ///< display connection
114 121 unsigned int m_current_line;
115}; 122};
116 123
117#endif // KEYS_HH 124#endif // KEYS_HH