diff options
author | corvid <corvid@lavabit.com> | 2009-06-05 00:57:13 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-06-05 00:57:13 +0000 |
commit | d75d8d25b56183f5e65b03c3d20533cc4c7b3782 (patch) | |
tree | 074c17cc7e66c6c4baa3e4c58eb9503a9946803e /src/keys.hh | |
parent | 03949fea7859bb716ea4389fcf253d04a1b6c6fc (diff) |
KeysCommand_t
This should make it easier for the casual reader to tell what's what in
keys.cc.
Diffstat (limited to 'src/keys.hh')
-rw-r--r-- | src/keys.hh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/keys.hh b/src/keys.hh index cf3f57f3..88b7f89d 100644 --- a/src/keys.hh +++ b/src/keys.hh @@ -13,7 +13,8 @@ #define __KEYS_HH__ -enum { +typedef enum { + KEYS_INVALID = -1, KEYS_NOP, /* No operation bound */ KEYS_OPEN, KEYS_NEW_WINDOW, @@ -35,19 +36,19 @@ enum { KEYS_FORWARD, KEYS_GOTO, KEYS_HOME -}; +} KeysCommand_t; class Keys { public: static void init(); static void free(); static int nodeByKeyCmp(const void *node, const void *key); - static int getKeyCmd(void); + static KeysCommand_t getKeyCmd(void); static void delKeyCmd(int key, int mod); - static int getCmdCode(const char *symbolName); + static KeysCommand_t getCmdCode(const char *symbolName); static int getKeyCode(char *keyName); static int getModifier(char *modifierName); - static int getShortcut(int command); + static int getShortcut(KeysCommand_t cmd); static void parseKey(char *key, char *symbol); static void parse(FILE *fp); }; |