Merge pull request #4775 from jmarshallnz/empty_episode_playcount
[vuplus_xbmc] / xbmc / input / XBMC_keyboard.h
1 /*
2     SDL - Simple DirectMedia Layer
3     Copyright (C) 1997-2009 Sam Lantinga
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Lesser General Public
7     License as published by the Free Software Foundation; either
8     version 2.1 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Lesser General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with XBMC; see the file COPYING.  If not, see
17     <http://www.gnu.org/licenses/>.
18
19     Sam Lantinga
20     slouken@libsdl.org
21 */
22
23 /* Include file for SDL keyboard event handling */
24
25 #ifndef _XBMC_keyboard_h
26 #define _XBMC_keyboard_h
27
28 #include <stdint.h>
29
30 #include "XBMC_keysym.h"
31
32 /* Keysym structure
33    - The scancode is hardware dependent, and should not be used by general
34      applications.  If no hardware scancode is available, it will be 0.
35
36    - The 'unicode' translated character is only available when character
37      translation is enabled by the XBMC_EnableUNICODE() API.  If non-zero,
38      this is a UNICODE character corresponding to the keypress.  If the
39      high 9 bits of the character are 0, then this maps to the equivalent
40      ASCII character:
41         char ch;
42         if ( (keysym.unicode & 0xFF80) == 0 ) {
43                 ch = keysym.unicode & 0x7F;
44         } else {
45                 An international character..
46         }
47  */
48 typedef struct XBMC_keysym {
49         unsigned char scancode;                 /* hardware specific scancode */
50         XBMCKey sym;                    /* SDL virtual keysym */
51         XBMCMod mod;                    /* current key modifiers */
52         uint16_t unicode;                       /* translated character */
53 } XBMC_keysym;
54
55 /* This is the mask which refers to all hotkey bindings */
56 #define XBMC_ALL_HOTKEYS                0xFFFFFFFF
57
58 #endif /* _XBMC_keyboard_h */