Mercurial > sdl-ios-xcode
diff include/SDL_keyboard.h @ 1662:782fd950bd46 SDL-1.3
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid.
The code is now run through a consistent indent format:
indent -i4 -nut -nsc -br -ce
The headers are being converted to automatically generate doxygen documentation.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 28 May 2006 13:04:16 +0000 |
parents | 1ff64ad478b2 |
children | 4da1ee79c9af |
line wrap: on
line diff
--- a/include/SDL_keyboard.h Sun May 21 17:27:13 2006 +0000 +++ b/include/SDL_keyboard.h Sun May 28 13:04:16 2006 +0000 @@ -20,7 +20,11 @@ slouken@libsdl.org */ -/* Include file for SDL keyboard event handling */ +/** + * \file SDL_keyboard.h + * + * Include file for SDL keyboard event handling + */ #ifndef _SDL_keyboard_h #define _SDL_keyboard_h @@ -32,7 +36,9 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus +/* *INDENT-OFF* */ extern "C" { +/* *INDENT-ON* */ #endif /* Keysym structure @@ -51,11 +57,12 @@ An international character.. } */ -typedef struct SDL_keysym { - Uint8 scancode; /* hardware specific scancode */ - SDLKey sym; /* SDL virtual keysym */ - SDLMod mod; /* current key modifiers */ - Uint16 unicode; /* translated character */ +typedef struct SDL_keysym +{ + Uint8 scancode; /* hardware specific scancode */ + SDLKey sym; /* SDL virtual keysym */ + SDLMod mod; /* current key modifiers */ + Uint16 unicode; /* translated character */ } SDL_keysym; /* This is the mask which refers to all hotkey bindings */ @@ -70,7 +77,7 @@ * If 'enable' is -1, the translation state is not changed. * It returns the previous state of keyboard translation. */ -extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable); +extern DECLSPEC int SDLCALL SDL_EnableUNICODE (int enable); /* * Enable/Disable keyboard repeat. Keyboard repeat defaults to off. @@ -83,8 +90,8 @@ /* * If 'delay' is set to 0, keyboard repeat is disabled. */ -extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval); -extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval); +extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat (int delay, int interval); +extern DECLSPEC void SDLCALL SDL_GetKeyRepeat (int *delay, int *interval); /* * Get a snapshot of the current state of the keyboard. @@ -93,29 +100,33 @@ * Uint8 *keystate = SDL_GetKeyState(NULL); * if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed. */ -extern DECLSPEC Uint8 * SDLCALL SDL_GetKeyState(int *numkeys); +extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState (int *numkeys); /* * Get the current key modifier state */ -extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void); +extern DECLSPEC SDLMod SDLCALL SDL_GetModState (void); /* * Set the current key modifier state * This does not change the keyboard state, only the key modifier flags. */ -extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate); +extern DECLSPEC void SDLCALL SDL_SetModState (SDLMod modstate); /* * Get the name of an SDL virtual keysym */ -extern DECLSPEC char * SDLCALL SDL_GetKeyName(SDLKey key); +extern DECLSPEC char *SDLCALL SDL_GetKeyName (SDLKey key); /* Ends C function definitions when using C++ */ #ifdef __cplusplus +/* *INDENT-OFF* */ } +/* *INDENT-ON* */ #endif #include "close_code.h" #endif /* _SDL_keyboard_h */ + +/* vi: set ts=4 sw=4 expandtab: */