comparison include/SDL_keyboard.h @ 337:9154ec9ca3d2

Explicitly specify the SDL API calling convention (C by default)
author Sam Lantinga <slouken@libsdl.org>
date Thu, 11 Apr 2002 14:35:16 +0000
parents f6ffac90895c
children b8d311d90021
comparison
equal deleted inserted replaced
336:745873ea091f 337:9154ec9ca3d2
72 * If 'enable' is 1, translation is enabled. 72 * If 'enable' is 1, translation is enabled.
73 * If 'enable' is 0, translation is disabled. 73 * If 'enable' is 0, translation is disabled.
74 * If 'enable' is -1, the translation state is not changed. 74 * If 'enable' is -1, the translation state is not changed.
75 * It returns the previous state of keyboard translation. 75 * It returns the previous state of keyboard translation.
76 */ 76 */
77 extern DECLSPEC int SDL_EnableUNICODE(int enable); 77 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
78 78
79 /* 79 /*
80 * Enable/Disable keyboard repeat. Keyboard repeat defaults to off. 80 * Enable/Disable keyboard repeat. Keyboard repeat defaults to off.
81 * 'delay' is the initial delay in ms between the time when a key is 81 * 'delay' is the initial delay in ms between the time when a key is
82 * pressed, and keyboard repeat begins. 82 * pressed, and keyboard repeat begins.
85 #define SDL_DEFAULT_REPEAT_DELAY 500 85 #define SDL_DEFAULT_REPEAT_DELAY 500
86 #define SDL_DEFAULT_REPEAT_INTERVAL 30 86 #define SDL_DEFAULT_REPEAT_INTERVAL 30
87 /* 87 /*
88 * If 'delay' is set to 0, keyboard repeat is disabled. 88 * If 'delay' is set to 0, keyboard repeat is disabled.
89 */ 89 */
90 extern DECLSPEC int SDL_EnableKeyRepeat(int delay, int interval); 90 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
91 91
92 /* 92 /*
93 * Get a snapshot of the current state of the keyboard. 93 * Get a snapshot of the current state of the keyboard.
94 * Returns an array of keystates, indexed by the SDLK_* syms. 94 * Returns an array of keystates, indexed by the SDLK_* syms.
95 * Used: 95 * Used:
96 * Uint8 *keystate = SDL_GetKeyState(NULL); 96 * Uint8 *keystate = SDL_GetKeyState(NULL);
97 * if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed. 97 * if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed.
98 */ 98 */
99 extern DECLSPEC Uint8 * SDL_GetKeyState(int *numkeys); 99 extern DECLSPEC Uint8 * SDLCALL SDL_GetKeyState(int *numkeys);
100 100
101 /* 101 /*
102 * Get the current key modifier state 102 * Get the current key modifier state
103 */ 103 */
104 extern DECLSPEC SDLMod SDL_GetModState(void); 104 extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
105 105
106 /* 106 /*
107 * Set the current key modifier state 107 * Set the current key modifier state
108 * This does not change the keyboard state, only the key modifier flags. 108 * This does not change the keyboard state, only the key modifier flags.
109 */ 109 */
110 extern DECLSPEC void SDL_SetModState(SDLMod modstate); 110 extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
111 111
112 /* 112 /*
113 * Get the name of an SDL virtual keysym 113 * Get the name of an SDL virtual keysym
114 */ 114 */
115 extern DECLSPEC char * SDL_GetKeyName(SDLKey key); 115 extern DECLSPEC char * SDLCALL SDL_GetKeyName(SDLKey key);
116 116
117 117
118 /* Ends C function definitions when using C++ */ 118 /* Ends C function definitions when using C++ */
119 #ifdef __cplusplus 119 #ifdef __cplusplus
120 } 120 }