World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
SDL_keyboard.h
См. документацию.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 
28 #ifndef SDL_keyboard_h_
29 #define SDL_keyboard_h_
30 
31 #include "SDL_stdinc.h"
32 #include "SDL_error.h"
33 #include "SDL_keycode.h"
34 #include "SDL_video.h"
35 
36 #include "begin_code.h"
37 /* Set up for C function definitions, even when using C++ */
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
47 typedef struct SDL_Keysym
48 {
53 } SDL_Keysym;
54 
55 /* Function prototypes */
56 
60 extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
61 
77 extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
78 
82 extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
83 
89 extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
90 
99 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
100 
109 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);
110 
120 extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
121 
129 extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
130 
141 extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
142 
150 extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
151 
160 extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
161 
168 extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
169 
177 extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
178 
185 extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);
186 
196 extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
197 
207 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
208 
209 /* Ends C function definitions when using C++ */
210 #ifdef __cplusplus
211 }
212 #endif
213 #include "close_code.h"
214 
215 #endif /* SDL_keyboard_h_ */
216 
217 /* vi: set ts=4 sw=4 expandtab: */
Uint16
uint16_t Uint16
Definition: SDL_stdinc.h:191
SDL_SetModState
DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate)
Set the current key modifier state for the keyboard.
SDL_GetModState
DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void)
Get the current key modifier state for the keyboard.
SDL_HasScreenKeyboardSupport
DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void)
Returns whether the platform has some screen keyboard support.
SDL_Keysym::unused
Uint32 unused
Definition: SDL_keyboard.h:52
SDL_error.h
SDL_StartTextInput
DECLSPEC void SDLCALL SDL_StartTextInput(void)
Start accepting Unicode text input events. This function will show the on-screen keyboard if supporte...
SDL_Keysym::scancode
SDL_Scancode scancode
Definition: SDL_keyboard.h:49
SDL_GetKeyName
const DECLSPEC char *SDLCALL SDL_GetKeyName(SDL_Keycode key)
Get a human-readable name for a key.
SDL_keycode.h
SDL_SetTextInputRect
DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect)
Set the rectangle used to type Unicode text inputs. This is used as a hint for IME and on-screen keyb...
SDL_StopTextInput
DECLSPEC void SDLCALL SDL_StopTextInput(void)
Stop receiving any text input events. This function will hide the on-screen keyboard if supported.
SDL_Scancode
SDL_Scancode
The SDL keyboard scancode representation.
Definition: SDL_scancode.h:43
SDL_Keymod
SDL_Keymod
Enumeration of valid key mods (possibly OR'd together).
Definition: SDL_keycode.h:325
SDL_Keycode
Sint32 SDL_Keycode
The SDL virtual key representation.
Definition: SDL_keycode.h:45
close_code.h
begin_code.h
SDL_GetKeyboardFocus
DECLSPEC SDL_Window *SDLCALL SDL_GetKeyboardFocus(void)
Get the window which currently has keyboard focus.
SDL_IsScreenKeyboardShown
DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window)
Returns whether the screen keyboard is shown for given window.
SDL_GetScancodeName
const DECLSPEC char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode)
Get a human-readable name for a scancode.
SDL_GetScancodeFromKey
DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key)
Get the scancode corresponding to the given key code according to the current keyboard layout.
SDL_GetKeyFromScancode
DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode)
Get the key code corresponding to the given scancode according to the current keyboard layout.
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
SDL_IsTextInputActive
DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void)
Return whether or not Unicode text input events are enabled.
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:161
name
EGLImageKHR EGLint * name
Definition: SDL_egl.h:1497
Uint8
uint8_t Uint8
Definition: SDL_stdinc.h:179
SDL_Window
struct SDL_Window SDL_Window
The type used to identify a window.
Definition: SDL_video.h:90
SDL_Rect
A rectangle, with the origin at the upper left (integer).
Definition: SDL_rect.h:77
SDL_Keysym::sym
SDL_Keycode sym
Definition: SDL_keyboard.h:50
SDL_stdinc.h
SDL_GetKeyFromName
DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name)
Get a key code from a human-readable name.
SDL_Keysym
The SDL keysym structure, used in key events.
Definition: SDL_keyboard.h:47
Uint32
uint32_t Uint32
Definition: SDL_stdinc.h:203
SDL_Keysym
struct SDL_Keysym SDL_Keysym
The SDL keysym structure, used in key events.
SDL_GetKeyboardState
const DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys)
Get a snapshot of the current state of the keyboard.
SDL_Keysym::mod
Uint16 mod
Definition: SDL_keyboard.h:51
SDL_video.h
SDL_GetScancodeFromName
DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name)
Get a scancode from a human-readable name.