SDL_keyboard.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #ifndef _SDL_keyboard_h
  2. #define _SDL_keyboard_h
  3. #include "SDL_stdinc.h"
  4. #include "SDL_error.h"
  5. #include "SDL_keycode.h"
  6. #include "SDL_video.h"
  7. #include "begin_code.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. typedef struct SDL_Keysym
  12. {
  13. SDL_Scancode scancode;
  14. SDL_Keycode sym;
  15. Uint16 mod;
  16. Uint32 unused;
  17. } SDL_Keysym;
  18. typedef SDL_Window * SDLCALL tSDL_GetKeyboardFocus(void);
  19. typedef const Uint8 * SDLCALL tSDL_GetKeyboardState(int *numkeys);
  20. typedef SDL_Keymod SDLCALL tSDL_GetModState(void);
  21. typedef void SDLCALL tSDL_SetModState(SDL_Keymod modstate);
  22. typedef SDL_Keycode SDLCALL tSDL_GetKeyFromScancode(SDL_Scancode scancode);
  23. typedef SDL_Scancode SDLCALL tSDL_GetScancodeFromKey(SDL_Keycode key);
  24. typedef const char * SDLCALL tSDL_GetScancodeName(SDL_Scancode scancode);
  25. typedef SDL_Scancode SDLCALL tSDL_GetScancodeFromName(const char *name);
  26. typedef const char * SDLCALL tSDL_GetKeyName(SDL_Keycode key);
  27. typedef SDL_Keycode SDLCALL tSDL_GetKeyFromName(const char *name);
  28. typedef void SDLCALL tSDL_StartTextInput(void);
  29. typedef SDL_bool SDLCALL tSDL_IsTextInputActive(void);
  30. typedef void SDLCALL tSDL_StopTextInput(void);
  31. typedef void SDLCALL tSDL_SetTextInputRect(SDL_Rect *rect);
  32. typedef SDL_bool SDLCALL tSDL_HasScreenKeyboardSupport(void);
  33. typedef SDL_bool SDLCALL tSDL_IsScreenKeyboardShown(SDL_Window *window);
  34. extern tSDL_GetKeyboardFocus *SDL_GetKeyboardFocus;
  35. extern tSDL_GetKeyboardState *SDL_GetKeyboardState;
  36. extern tSDL_GetModState *SDL_GetModState;
  37. extern tSDL_SetModState *SDL_SetModState;
  38. extern tSDL_GetKeyFromScancode *SDL_GetKeyFromScancode;
  39. extern tSDL_GetScancodeFromKey *SDL_GetScancodeFromKey;
  40. extern tSDL_GetScancodeName *SDL_GetScancodeName;
  41. extern tSDL_GetScancodeFromName *SDL_GetScancodeFromName;
  42. extern tSDL_GetKeyName *SDL_GetKeyName;
  43. extern tSDL_GetKeyFromName *SDL_GetKeyFromName;
  44. extern tSDL_StartTextInput *SDL_StartTextInput;
  45. extern tSDL_IsTextInputActive *SDL_IsTextInputActive;
  46. extern tSDL_StopTextInput *SDL_StopTextInput;
  47. extern tSDL_SetTextInputRect *SDL_SetTextInputRect;
  48. extern tSDL_HasScreenKeyboardSupport *SDL_HasScreenKeyboardSupport;
  49. extern tSDL_IsScreenKeyboardShown *SDL_IsScreenKeyboardShown;
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #include "close_code.h"
  54. #endif