Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
64 lines (47 loc) · 2.24 KB

SDL_keyboard_c.h

File metadata and controls

64 lines (47 loc) · 2.24 KB
 
Apr 8, 2011
Apr 8, 2011
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Simple DirectMedia Layer
Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
20
21
22
23
24
25
*/
#include "SDL_config.h"
#ifndef _SDL_keyboard_c_h
#define _SDL_keyboard_c_h
Feb 16, 2011
Feb 16, 2011
26
#include "SDL_keycode.h"
27
28
29
30
31
#include "SDL_events.h"
/* Initialize the keyboard subsystem */
extern int SDL_KeyboardInit(void);
May 10, 2010
May 10, 2010
32
33
/* Clear the state of the keyboard */
extern void SDL_ResetKeyboard(void);
Feb 5, 2008
Feb 5, 2008
35
/* Get the default keymap */
Feb 7, 2011
Feb 7, 2011
36
extern void SDL_GetDefaultKeymap(SDL_Keycode * keymap);
Feb 5, 2008
Feb 5, 2008
37
May 10, 2010
May 10, 2010
38
/* Set the mapping of scancode to key codes */
Feb 7, 2011
Feb 7, 2011
39
extern void SDL_SetKeymap(int start, SDL_Keycode * keys, int length);
Feb 5, 2008
Feb 5, 2008
40
Aug 19, 2007
Aug 19, 2007
41
42
43
44
/* Set a platform-dependent key name, overriding the default platform-agnostic
name. Encoded as UTF-8. The string is not copied, thus the pointer given to
this function must stay valid forever (or at least until the call to
VideoQuit()). */
Feb 7, 2011
Feb 7, 2011
45
extern void SDL_SetScancodeName(SDL_Scancode scancode, const char *name);
Aug 19, 2007
Aug 19, 2007
46
47
/* Set the keyboard focus window */
May 10, 2010
May 10, 2010
48
extern void SDL_SetKeyboardFocus(SDL_Window * window);
May 10, 2010
May 10, 2010
50
/* Send a keyboard key event */
Feb 7, 2011
Feb 7, 2011
51
extern int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode);
May 10, 2010
May 10, 2010
53
54
/* Send keyboard text input */
extern int SDL_SendKeyboardText(const char *text);
Sep 19, 2009
Sep 19, 2009
56
/* Send editing text for selected range from start to end */
May 10, 2010
May 10, 2010
57
extern int SDL_SendEditingText(const char *text, int start, int end);
Sep 19, 2009
Sep 19, 2009
58
59
60
61
62
63
64
/* Shutdown the keyboard subsystem */
extern void SDL_KeyboardQuit(void);
#endif /* _SDL_keyboard_c_h */
/* vi: set ts=4 sw=4 expandtab: */