1: /*
     2:  ============================================================================
     3:  xoblite™ -> an advanced "extended shell" for Microsoft® Windows® 11
     4:  Copyright © 2002-2026 Karl Henrik Henriksson [qwilk/@xoblite]
     5:  Copyright © 2001-2004 The Blackbox for Windows Development Team
     6:  http://xoblite.net/ + https://github.com/xoblite/
     7:  ============================================================================
     8: 
     9:   Blackbox for Windows is free software, released under the
    10:   GNU General Public License (GPL version 2 or later), with an extension
    11:   that allows linking of proprietary modules under a controlled interface.
    12:   What this means is that plugins etc. are allowed to be released
    13:   under any license the author wishes. Please note, however, that the
    14:   original Blackbox gradient math code used in Blackbox for Windows
    15:   is available under the BSD license.
    16: 
    17:   http://www.fsf.org/licenses/gpl.html
    18:   http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface
    19:   http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5
    20: 
    21:   This program is distributed in the hope that it will be useful,
    22:   but WITHOUT ANY WARRANTY; without even the implied warranty of
    23:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    24:   GNU General Public License for more details.
    25: 
    26:   For additional license information, please read the included license.html.
    27: 
    28:  ============================================================================
    29: */
    30: 
    31: #ifndef __HOTKEYS_H_ 
    32: #define __HOTKEYS_H_ 
    33: 
    34: #include "..\Blackbox.h" 
    35: 
    36: //===========================================================================
    37: 
    38: typedef struct hotkeyItem
    39: {
    40:     unsigned short ID;
    41:     DWORD mods;
    42:     unsigned int key;
    43:     LPSTR cmd;
    44:     LPSTR args;
    45:     LPSTR keyAsString;
    46: } hotkeyItem;
    47: 
    48: //====================
    49: 
    50: class Hotkeys
    51: {
    52: public:
    53:     Hotkeys(HINSTANCE hInstance);
    54:     ~Hotkeys();
    55: 
    56:     void RegisterHotkeys();
    57:     void UnregisterHotkeys();
    58:     bool ParseHotkey(char mods[MAX_LINE_LENGTH], char key[MAX_LINE_LENGTH], char cmd[MAX_LINE_LENGTH], char args[MAX_LINE_LENGTH], bool reportErrors);
    59:     void ExecuteHotkey(int id);
    60: 
    61:     int id, hotkeysRegistered, hotkeysUnregistered;
    62: 
    63:     typedef vector<hotkeyItem*> hotkeyVector;
    64:     hotkeyVector hotkeyList;
    65: };
    66: 
    67: //===========================================================================
    68: 
    69: #endif /* __HOTKEYS_H_ */ 
    70: