diff include/SDL_keyboard.h @ 3407:d3baf5ac4e37

Partial fix for bug #859 Header file update from Ken for improved doxygen output
author Sam Lantinga <slouken@libsdl.org>
date Mon, 19 Oct 2009 13:31:58 +0000
parents 00cace2d9080
children f7b03b6838cb
line wrap: on
line diff
--- a/include/SDL_keyboard.h	Sun Oct 18 23:21:15 2009 +0000
+++ b/include/SDL_keyboard.h	Mon Oct 19 13:31:58 2009 +0000
@@ -21,9 +21,9 @@
 */
 
 /**
- * \file SDL_keyboard.h
- *
- * Include file for SDL keyboard event handling
+ *  \file SDL_keyboard.h
+ *  
+ *  Include file for SDL keyboard event handling
  */
 
 #ifndef _SDL_keyboard_h
@@ -42,143 +42,129 @@
 #endif
 
 /**
- * \struct SDL_keysym
- *
- * \brief The SDL keysym structure, used in key events.
+ *  \brief The SDL keysym structure, used in key events.
  */
 typedef struct SDL_keysym
 {
     SDL_scancode scancode;      /**< SDL physical key code - see ::SDL_scancode for details */
     SDLKey sym;                 /**< SDL virtual key code - see ::SDLKey for details */
     Uint16 mod;                 /**< current key modifiers */
-    Uint32 unicode;             /**< OBSOLETE, use SDL_TextInputEvent instead */
+    Uint32 unicode;             /**< \deprecated use SDL_TextInputEvent instead */
 } SDL_keysym;
 
 /* Function prototypes */
 
 /**
- * \fn int SDL_GetNumKeyboards(void)
- *
- * \brief Get the number of keyboard input devices available.
- *
- * \sa SDL_SelectKeyboard()
+ *  \brief Get the number of keyboard input devices available.
+ *  
+ *  \sa SDL_SelectKeyboard()
  */
 extern DECLSPEC int SDLCALL SDL_GetNumKeyboards(void);
 
 /**
- * \fn int SDL_SelectKeyboard(int index)
- *
- * \brief Set the index of the currently selected keyboard.
- *
- * \return The index of the previously selected keyboard.
- *
- * \note You can query the currently selected keyboard by passing an index of -1.
- *
- * \sa SDL_GetNumKeyboards()
+ *  \brief Set the index of the currently selected keyboard.
+ *  
+ *  \return The index of the previously selected keyboard.
+ *  
+ *  \note You can query the currently selected keyboard by passing an index of -1.
+ *  
+ *  \sa SDL_GetNumKeyboards()
  */
 extern DECLSPEC int SDLCALL SDL_SelectKeyboard(int index);
 
 /**
- * \fn Uint8 *SDL_GetKeyboardState(int *numkeys)
- *
- * \brief Get a snapshot of the current state of the selected keyboard.
- *
- * \param numkeys if non-NULL, receives the length of the returned array.
- *
- * \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values.
- *
- * Example:
- * 	Uint8 *state = SDL_GetKeyboardState(NULL);
- *	if ( state[SDL_SCANCODE_RETURN)] ) ... <RETURN> is pressed.
+ *  \brief Get a snapshot of the current state of the selected keyboard.
+ *  
+ *  \param numkeys if non-NULL, receives the length of the returned array.
+ *  
+ *  \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values.
+ *  
+ *  \b Example:
+ *  \code
+ *  Uint8 *state = SDL_GetKeyboardState(NULL);
+ *  if ( state[SDL_SCANCODE_RETURN] )   {
+ *      printf("<RETURN> is pressed.\n");
+ *  }
+ *  \endcode
  */
 extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
 
 /**
- * \fn SDLMod SDL_GetModState(void)
- *
- * \brief Get the current key modifier state for the selected keyboard.
+ *  \brief Get the current key modifier state for the selected keyboard.
  */
 extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
 
 /**
- * \fn void SDL_SetModState(SDLMod modstate)
- *
- * \brief Set the current key modifier state for the selected keyboard.
- *
- * \note This does not change the keyboard state, only the key modifier flags.
+ *  \brief Set the current key modifier state for the selected keyboard.
+ *  
+ *  \note This does not change the keyboard state, only the key modifier flags.
  */
 extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
 
 /**
- * \fn SDLKey SDL_GetKeyFromScancode(SDL_scancode scancode)
- * 
- * \brief Get the key code corresponding to the given scancode according to the current keyboard layout.
- *
- * See ::SDLKey for details.
- *
- * \sa SDL_GetKeyName()
+ *  \brief Get the key code corresponding to the given scancode according to the
+ *         current keyboard layout.
+ *  
+ *  See ::SDLKey for details.
+ *  
+ *  \sa SDL_GetKeyName()
  */
 extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_scancode scancode);
 
 /**
- * \fn SDL_scancode SDL_GetScancodeFromKey(SDLKey key)
- * 
- * \brief Get the scancode corresponding to the given key code according to the current keyboard layout.
- *
- * See ::SDL_scancode for details.
- *
- * \sa SDL_GetScancodeName()
+ *  \brief Get the scancode corresponding to the given key code according to the
+ *         current keyboard layout.
+ *  
+ *  See ::SDL_scancode for details.
+ *  
+ *  \sa SDL_GetScancodeName()
  */
 extern DECLSPEC SDL_scancode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
 
 /**
- * \fn const char *SDL_GetScancodeName(SDL_scancode scancode)
- * 
- * \brief Get a human-readable name for a scancode.
+ *  \brief Get a human-readable name for a scancode.
+ *  
+ *  \return A pointer to a UTF-8 string that stays valid at least until the next
+ *          call to this function. If you need it around any longer, you must 
+ *          copy it.  If the scancode doesn't have a name, this function returns
+ *          an empty string ("").
  *
- * \return A pointer to a UTF-8 string that stays valid at least until the next call to this function. If you need it around any longer, you must copy it.  If the scancode doesn't have a name, this function returns "".
- *
- * \sa SDL_scancode
+ *  \sa SDL_scancode
  */
 extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_scancode
                                                         scancode);
 
 /**
- * \fn const char *SDL_GetKeyName(SDLKey key)
- * 
- * \brief Get a human-readable name for a key.
- *
- * \return A pointer to a UTF-8 string that stays valid at least until the next call to this function. If you need it around any longer, you must copy it.  If the key doesn't have a name, this function returns "".
- *
- * \sa SDLKey
+ *  \brief Get a human-readable name for a key.
+ *  
+ *  \return A pointer to a UTF-8 string that stays valid at least until the next
+ *          call to this function. If you need it around any longer, you must 
+ *          copy it.  If the key doesn't have a name, this function returns an 
+ *          empty string ("").
+ *  
+ *  \sa SDLKey
  */
 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDLKey key);
 
 /**
- * \fn void SDL_StartTextInput(void)
- *
- * \brief Start accepting Unicode text input events.
- *
- * \sa SDL_StopTextInput()
- * \sa SDL_SetTextInputRect()
+ *  \brief Start accepting Unicode text input events.
+ *  
+ *  \sa SDL_StopTextInput()
+ *  \sa SDL_SetTextInputRect()
  */
 extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
 
 /**
- * \fn void SDL_StopTextInput(void)
- *
- * \brief Stop receiving any text input events.
- *
- * \sa SDL_StartTextInput()
+ *  \brief Stop receiving any text input events.
+ *  
+ *  \sa SDL_StartTextInput()
  */
 extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
 
 /**
- * \fn void SDL_SetTextInputRect(SDL_Rect *rect)
- *
- * \brief Set the rectangle used to type Unicode text inputs.
- *
- * \sa SDL_StartTextInput()
+ *  \brief Set the rectangle used to type Unicode text inputs.
+ *  
+ *  \sa SDL_StartTextInput()
  */
 extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);