comparison include/SDL_keyboard.h @ 1668:4da1ee79c9af SDL-1.3

more tweaking indent options
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 04:04:35 +0000
parents 782fd950bd46
children 624e1412fbba
comparison
equal deleted inserted replaced
1667:1fddae038bc8 1668:4da1ee79c9af
75 * If 'enable' is 1, translation is enabled. 75 * If 'enable' is 1, translation is enabled.
76 * If 'enable' is 0, translation is disabled. 76 * If 'enable' is 0, translation is disabled.
77 * If 'enable' is -1, the translation state is not changed. 77 * If 'enable' is -1, the translation state is not changed.
78 * It returns the previous state of keyboard translation. 78 * It returns the previous state of keyboard translation.
79 */ 79 */
80 extern DECLSPEC int SDLCALL SDL_EnableUNICODE (int enable); 80 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
81 81
82 /* 82 /*
83 * Enable/Disable keyboard repeat. Keyboard repeat defaults to off. 83 * Enable/Disable keyboard repeat. Keyboard repeat defaults to off.
84 * 'delay' is the initial delay in ms between the time when a key is 84 * 'delay' is the initial delay in ms between the time when a key is
85 * pressed, and keyboard repeat begins. 85 * pressed, and keyboard repeat begins.
88 #define SDL_DEFAULT_REPEAT_DELAY 500 88 #define SDL_DEFAULT_REPEAT_DELAY 500
89 #define SDL_DEFAULT_REPEAT_INTERVAL 30 89 #define SDL_DEFAULT_REPEAT_INTERVAL 30
90 /* 90 /*
91 * If 'delay' is set to 0, keyboard repeat is disabled. 91 * If 'delay' is set to 0, keyboard repeat is disabled.
92 */ 92 */
93 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat (int delay, int interval); 93 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
94 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat (int *delay, int *interval); 94 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
95 95
96 /* 96 /*
97 * Get a snapshot of the current state of the keyboard. 97 * Get a snapshot of the current state of the keyboard.
98 * Returns an array of keystates, indexed by the SDLK_* syms. 98 * Returns an array of keystates, indexed by the SDLK_* syms.
99 * Used: 99 * Used:
100 * Uint8 *keystate = SDL_GetKeyState(NULL); 100 * Uint8 *keystate = SDL_GetKeyState(NULL);
101 * if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed. 101 * if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed.
102 */ 102 */
103 extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState (int *numkeys); 103 extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState(int *numkeys);
104 104
105 /* 105 /*
106 * Get the current key modifier state 106 * Get the current key modifier state
107 */ 107 */
108 extern DECLSPEC SDLMod SDLCALL SDL_GetModState (void); 108 extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
109 109
110 /* 110 /*
111 * Set the current key modifier state 111 * Set the current key modifier state
112 * This does not change the keyboard state, only the key modifier flags. 112 * This does not change the keyboard state, only the key modifier flags.
113 */ 113 */
114 extern DECLSPEC void SDLCALL SDL_SetModState (SDLMod modstate); 114 extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
115 115
116 /* 116 /*
117 * Get the name of an SDL virtual keysym 117 * Get the name of an SDL virtual keysym
118 */ 118 */
119 extern DECLSPEC char *SDLCALL SDL_GetKeyName (SDLKey key); 119 extern DECLSPEC char *SDLCALL SDL_GetKeyName(SDLKey key);
120 120
121 121
122 /* Ends C function definitions when using C++ */ 122 /* Ends C function definitions when using C++ */
123 #ifdef __cplusplus 123 #ifdef __cplusplus
124 /* *INDENT-OFF* */ 124 /* *INDENT-OFF* */