25 Hotkey(uint16 default_keycode,
const char *name,
int num);
26 Hotkey(
const uint16 *default_keycodes,
const char *name,
int num);
35 #define HOTKEY_LIST_END Hotkey((uint16)0, NULL, -1) 43 typedef EventState (*GlobalHotkeyHandlerFunc)(
int hotkey);
45 HotkeyList(
const char *ini_group,
Hotkey *items, GlobalHotkeyHandlerFunc global_hotkey_handler = NULL);
51 int CheckMatch(uint16 keycode,
bool global_only =
false)
const;
53 GlobalHotkeyHandlerFunc global_hotkey_handler;
55 const char *ini_group;
62 HotkeyList(
const HotkeyList &other);
71 void HandleGlobalHotkeys(
WChar key, uint16 keycode);
EventState
State of handling an event.
All data for a single hotkey.
Hotkey(uint16 default_keycode, const char *name, int num)
Create a new Hotkey object with a single default keycode.
Simple vector class that allows allocating an item without the need to copy this->data needlessly...
Types related to windows.
List of hotkeys for a window.
void AddKeycode(uint16 keycode)
Add a keycode to this hotkey, from now that keycode will be matched in addition to any previously add...
Ini file that supports both loading and saving.
bool IsQuitKey(uint16 keycode)
Does the given keycode match one of the keycodes bound to 'quit game'?
void LoadHotkeysFromConfig()
Load the hotkeys from the config file.
void SaveHotkeysToConfig()
Save the hotkeys to the config file.
uint32 WChar
Type for wide characters, i.e.
Types related to the graphics and/or input devices.