src/events/SDL_keyboard_c.h
changeset 4465 3e69e077cb95
parent 4434 5c64052fb476
child 4560 95352c671a6e
     1.1 --- a/src/events/SDL_keyboard_c.h	Sun May 09 19:55:28 2010 -0700
     1.2 +++ b/src/events/SDL_keyboard_c.h	Sun May 09 20:47:22 2010 -0700
     1.3 @@ -27,44 +27,17 @@
     1.4  #include "SDL_keysym.h"
     1.5  #include "SDL_events.h"
     1.6  
     1.7 -typedef struct SDL_Keyboard SDL_Keyboard;
     1.8 -
     1.9 -struct SDL_Keyboard
    1.10 -{
    1.11 -    /* Free the keyboard when it's time */
    1.12 -    void (*FreeKeyboard) (SDL_Keyboard * keyboard);
    1.13 -
    1.14 -    /* Data common to all keyboards */
    1.15 -    SDL_Window *focus;
    1.16 -    Uint16 modstate;
    1.17 -    Uint8 keystate[SDL_NUM_SCANCODES];
    1.18 -    SDLKey keymap[SDL_NUM_SCANCODES];
    1.19 -
    1.20 -    void *driverdata;
    1.21 -};
    1.22 -
    1.23  /* Initialize the keyboard subsystem */
    1.24  extern int SDL_KeyboardInit(void);
    1.25  
    1.26 -/* Get the keyboard at an index */
    1.27 -extern SDL_Keyboard *SDL_GetKeyboard(int index);
    1.28 -
    1.29 -/* Add a keyboard, possibly reattaching at a particular index (or -1),
    1.30 -   returning the index of the keyboard, or -1 if there was an error.
    1.31 - */
    1.32 -extern int SDL_AddKeyboard(const SDL_Keyboard * keyboard, int index);
    1.33 -
    1.34 -/* Remove a keyboard at an index, clearing the slot for later */
    1.35 -extern void SDL_DelKeyboard(int index);
    1.36 -
    1.37 -/* Clear the state of a keyboard at an index */
    1.38 -extern void SDL_ResetKeyboard(int index);
    1.39 +/* Clear the state of the keyboard */
    1.40 +extern void SDL_ResetKeyboard(void);
    1.41  
    1.42  /* Get the default keymap */
    1.43  extern void SDL_GetDefaultKeymap(SDLKey * keymap);
    1.44  
    1.45 -/* Set the mapping of scancode to key codes for this keyboard */
    1.46 -extern void SDL_SetKeymap(int index, int start, SDLKey * keys, int length);
    1.47 +/* Set the mapping of scancode to key codes */
    1.48 +extern void SDL_SetKeymap(int start, SDLKey * keys, int length);
    1.49  
    1.50  /* Set a platform-dependent key name, overriding the default platform-agnostic
    1.51     name. Encoded as UTF-8. The string is not copied, thus the pointer given to
    1.52 @@ -73,16 +46,16 @@
    1.53  extern void SDL_SetScancodeName(SDL_scancode scancode, const char *name);
    1.54  
    1.55  /* Set the keyboard focus window */
    1.56 -extern void SDL_SetKeyboardFocus(int index, SDL_Window * window);
    1.57 +extern void SDL_SetKeyboardFocus(SDL_Window * window);
    1.58  
    1.59 -/* Send a keyboard event for a keyboard at an index */
    1.60 -extern int SDL_SendKeyboardKey(int index, Uint8 state, SDL_scancode scancode);
    1.61 +/* Send a keyboard key event */
    1.62 +extern int SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode);
    1.63  
    1.64 -/* Send keyboard text input for a keyboard at an index */
    1.65 -extern int SDL_SendKeyboardText(int index, const char *text);
    1.66 +/* Send keyboard text input */
    1.67 +extern int SDL_SendKeyboardText(const char *text);
    1.68  
    1.69  /* Send editing text for selected range from start to end */
    1.70 -extern int SDL_SendEditingText(int index, const char *text, int start, int end);
    1.71 +extern int SDL_SendEditingText(const char *text, int start, int end);
    1.72  
    1.73  /* Shutdown the keyboard subsystem */
    1.74  extern void SDL_KeyboardQuit(void);