src/events/SDL_keyboard_c.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 09 May 2010 20:47:22 -0700
changeset 4465 3e69e077cb95
parent 4434 5c64052fb476
child 4560 95352c671a6e
permissions -rw-r--r--
Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.

Plus, this lets me start implementing cursor support.
slouken@1895
     1
/*
slouken@1895
     2
    SDL - Simple DirectMedia Layer
slouken@3697
     3
    Copyright (C) 1997-2010 Sam Lantinga
slouken@1895
     4
slouken@1895
     5
    This library is free software; you can redistribute it and/or
slouken@1895
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1895
     7
    License as published by the Free Software Foundation; either
slouken@1895
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1895
     9
slouken@1895
    10
    This library is distributed in the hope that it will be useful,
slouken@1895
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1895
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1895
    13
    Lesser General Public License for more details.
slouken@1895
    14
slouken@1895
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1895
    16
    License along with this library; if not, write to the Free Software
slouken@1895
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1895
    18
slouken@1895
    19
    Sam Lantinga
slouken@1895
    20
    slouken@libsdl.org
slouken@1895
    21
*/
slouken@1895
    22
#include "SDL_config.h"
slouken@1895
    23
slouken@1895
    24
#ifndef _SDL_keyboard_c_h
slouken@1895
    25
#define _SDL_keyboard_c_h
slouken@1895
    26
slouken@1895
    27
#include "SDL_keysym.h"
slouken@1895
    28
#include "SDL_events.h"
slouken@1895
    29
slouken@1895
    30
/* Initialize the keyboard subsystem */
slouken@1895
    31
extern int SDL_KeyboardInit(void);
slouken@1895
    32
slouken@4465
    33
/* Clear the state of the keyboard */
slouken@4465
    34
extern void SDL_ResetKeyboard(void);
slouken@1895
    35
slouken@2303
    36
/* Get the default keymap */
slouken@2303
    37
extern void SDL_GetDefaultKeymap(SDLKey * keymap);
slouken@2303
    38
slouken@4465
    39
/* Set the mapping of scancode to key codes */
slouken@4465
    40
extern void SDL_SetKeymap(int start, SDLKey * keys, int length);
slouken@2303
    41
slouken@2268
    42
/* Set a platform-dependent key name, overriding the default platform-agnostic
slouken@2268
    43
   name. Encoded as UTF-8. The string is not copied, thus the pointer given to
slouken@2268
    44
   this function must stay valid forever (or at least until the call to
slouken@2268
    45
   VideoQuit()). */
slouken@2303
    46
extern void SDL_SetScancodeName(SDL_scancode scancode, const char *name);
slouken@2268
    47
slouken@1895
    48
/* Set the keyboard focus window */
slouken@4465
    49
extern void SDL_SetKeyboardFocus(SDL_Window * window);
slouken@1895
    50
slouken@4465
    51
/* Send a keyboard key event */
slouken@4465
    52
extern int SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode);
slouken@1895
    53
slouken@4465
    54
/* Send keyboard text input */
slouken@4465
    55
extern int SDL_SendKeyboardText(const char *text);
slouken@1895
    56
slouken@3280
    57
/* Send editing text for selected range from start to end */
slouken@4465
    58
extern int SDL_SendEditingText(const char *text, int start, int end);
slouken@3280
    59
slouken@1895
    60
/* Shutdown the keyboard subsystem */
slouken@1895
    61
extern void SDL_KeyboardQuit(void);
slouken@1895
    62
slouken@1895
    63
#endif /* _SDL_keyboard_c_h */
slouken@1895
    64
slouken@1895
    65
/* vi: set ts=4 sw=4 expandtab: */