00001 /* 00002 SDL - Simple DirectMedia Layer 00003 Copyright (C) 1997-2009 Sam Lantinga 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 Sam Lantinga 00020 slouken@libsdl.org 00021 */ 00022 00027 #ifndef _SDL_keyboard_h 00028 #define _SDL_keyboard_h 00029 00030 #include "SDL_stdinc.h" 00031 #include "SDL_error.h" 00032 #include "SDL_keysym.h" 00033 00034 #include "begin_code.h" 00035 /* Set up for C function definitions, even when using C++ */ 00036 #ifdef __cplusplus 00037 extern "C" { 00038 #endif 00039 00059 typedef struct SDL_keysym { 00060 Uint8 scancode; 00061 SDLKey sym; 00062 SDLMod mod; 00063 Uint16 unicode; 00064 } SDL_keysym; 00065 00067 #define SDL_ALL_HOTKEYS 0xFFFFFFFF 00068 00069 /* Function prototypes */ 00082 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable); 00083 00084 #define SDL_DEFAULT_REPEAT_DELAY 500 00085 #define SDL_DEFAULT_REPEAT_INTERVAL 30 00086 00098 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval); 00099 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval); 00100 00110 extern DECLSPEC Uint8 * SDLCALL SDL_GetKeyState(int *numkeys); 00111 00115 extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void); 00116 00121 extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate); 00122 00126 extern DECLSPEC char * SDLCALL SDL_GetKeyName(SDLKey key); 00127 00128 00129 /* Ends C function definitions when using C++ */ 00130 #ifdef __cplusplus 00131 } 00132 #endif 00133 #include "close_code.h" 00134 00135 #endif /* _SDL_keyboard_h */