Mercurial > sdl-ios-xcode
comparison src/events/SDL_keyboard_c.h @ 1674:7688a73b25b1 SDL-1.3
Finishing up keyboard code revamp, at least for now...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 11 Jun 2006 05:27:10 +0000 |
parents | 624e1412fbba |
children | a1ebb17f9c52 |
comparison
equal
deleted
inserted
replaced
1673:624e1412fbba | 1674:7688a73b25b1 |
---|---|
29 struct SDL_Keyboard | 29 struct SDL_Keyboard |
30 { | 30 { |
31 /* Free the keyboard when it's time */ | 31 /* Free the keyboard when it's time */ |
32 void (*FreeKeyboard) (SDL_Keyboard * keyboard); | 32 void (*FreeKeyboard) (SDL_Keyboard * keyboard); |
33 | 33 |
34 SDLMod modstate; | 34 /* Data common to all keyboards */ |
35 SDL_WindowID focus; | |
36 Uint16 modstate; | |
35 Uint8 keystate[SDLK_LAST]; | 37 Uint8 keystate[SDLK_LAST]; |
36 | 38 |
37 struct | 39 struct |
38 { | 40 { |
39 int firsttime; /* if we check against the delay or repeat value */ | 41 int firsttime; /* if we check against the delay or repeat value */ |
40 int delay; /* the delay before we start repeating */ | 42 int delay; /* the delay before we start repeating */ |
41 int interval; /* the delay between key repeat events */ | 43 int interval; /* the delay between key repeat events */ |
42 Uint32 timestamp; /* the time the first keydown event occurred */ | 44 Uint32 timestamp; /* the time the first keydown event occurred */ |
43 | 45 |
44 SDL_Event evt; /* the event we are supposed to repeat */ | 46 SDL_Event evt; /* the event we are supposed to repeat */ |
45 } keyrepeat; | 47 } repeat; |
46 | 48 |
47 void *driverdata; | 49 void *driverdata; |
48 }; | 50 }; |
49 | 51 |
52 /* Used by the OS keyboard code to detect whether or not to do UNICODE */ | |
53 #ifndef DEFAULT_UNICODE_TRANSLATION | |
54 #define DEFAULT_UNICODE_TRANSLATION 0 /* Default off because of overhead */ | |
55 #endif | |
56 extern int SDL_TranslateUNICODE; | |
50 | 57 |
51 /* Initialize the keyboard subsystem */ | 58 /* Initialize the keyboard subsystem */ |
52 extern int SDL_KeyboardInit(void); | 59 extern int SDL_KeyboardInit(void); |
53 | 60 |
54 /* Get the keyboard at an index */ | 61 /* Get the keyboard at an index */ |
64 | 71 |
65 /* Clear the state of a keyboard at an index */ | 72 /* Clear the state of a keyboard at an index */ |
66 extern void SDL_ResetKeyboard(int index); | 73 extern void SDL_ResetKeyboard(int index); |
67 | 74 |
68 /* Send a keyboard event for a keyboard at an index */ | 75 /* Send a keyboard event for a keyboard at an index */ |
69 extern int SDL_SendKeyboardKey(int index, Uint8 state, | 76 extern int SDL_SendKeyboardKey(int index, SDL_WindowID windowID, Uint8 state, |
70 const SDL_keysym * keysym); | 77 SDL_keysym * keysym); |
78 | |
79 /* Used by the event loop to queue pending keyboard repeat events */ | |
80 extern void SDL_CheckKeyRepeat(void); | |
71 | 81 |
72 /* Shutdown the keyboard subsystem */ | 82 /* Shutdown the keyboard subsystem */ |
73 extern void SDL_KeyboardQuit(void); | 83 extern void SDL_KeyboardQuit(void); |
74 | 84 |
75 #endif /* _SDL_keyboard_c_h */ | 85 #endif /* _SDL_keyboard_c_h */ |