diff options
author | frosch <frosch@openttd.org> | 2013-06-15 15:31:22 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-06-15 15:31:22 +0000 |
commit | fef30983e643943df24a7090a7175cfa66f3ba15 (patch) | |
tree | 5129b4c530168788d3a4ebec180d3c910c37b942 /src/hotkeys.h | |
parent | ee4e68bd5e4882397bc023040a2977047d22ccb7 (diff) | |
download | openttd-fef30983e643943df24a7090a7175cfa66f3ba15.tar.xz |
(svn r25414) -Codechange: Move handling of global hotkeys to HotkeyList.
Diffstat (limited to 'src/hotkeys.h')
-rw-r--r-- | src/hotkeys.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hotkeys.h b/src/hotkeys.h index ce57de6f6..19791663d 100644 --- a/src/hotkeys.h +++ b/src/hotkeys.h @@ -14,6 +14,7 @@ #include "core/smallvec_type.hpp" #include "gfx_type.h" +#include "window_type.h" /** * All data for a single hotkey. The name (for saving/loading a configfile), @@ -38,7 +39,9 @@ struct IniFile; * List of hotkeys for a window. */ struct HotkeyList { - HotkeyList(const char *ini_group, Hotkey *items); + typedef EventState (*GlobalHotkeyHandlerFunc)(int hotkey); + + HotkeyList(const char *ini_group, Hotkey *items, GlobalHotkeyHandlerFunc global_hotkey_handler = NULL); ~HotkeyList(); void Load(IniFile *ini); @@ -46,6 +49,7 @@ struct HotkeyList { int CheckMatch(uint16 keycode, bool global_only = false) const; + GlobalHotkeyHandlerFunc global_hotkey_handler; private: const char *ini_group; Hotkey *items; |