My Project
Loading...
Searching...
No Matches
SDL_keyboard.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2023 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
39extern "C" {
40#endif
41
47typedef struct SDL_Keysym
48{
51 Uint16 mod;
52 Uint32 unused;
54
55/* Function prototypes */
56
64extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
65
95extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
96
106extern DECLSPEC void SDLCALL SDL_ResetKeyboard(void);
107
119extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
120
138extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
139
154extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
155
171
195extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);
196
210extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
211
229extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
230
244extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
245
261extern DECLSPEC void SDLCALL SDL_StartTextInput(void);
262
272extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);
273
281extern DECLSPEC void SDLCALL SDL_StopTextInput(void);
282
291extern DECLSPEC void SDLCALL SDL_ClearComposition(void);
292
298extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void);
299
318extern DECLSPEC void SDLCALL SDL_SetTextInputRect(const SDL_Rect *rect);
319
331extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);
332
343extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
344
345/* Ends C function definitions when using C++ */
346#ifdef __cplusplus
347}
348#endif
349#include "close_code.h"
350
351#endif /* SDL_keyboard_h_ */
352
353/* vi: set ts=4 sw=4 expandtab: */
DECLSPEC SDL_bool SDLCALL SDL_IsTextInputShown(void)
DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode)
DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name)
DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void)
DECLSPEC void SDLCALL SDL_ClearComposition(void)
DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key)
DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key)
DECLSPEC SDL_Window *SDLCALL SDL_GetKeyboardFocus(void)
DECLSPEC void SDLCALL SDL_SetTextInputRect(const SDL_Rect *rect)
DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void)
DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys)
DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate)
DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void)
DECLSPEC void SDLCALL SDL_ResetKeyboard(void)
DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window)
DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode)
DECLSPEC void SDLCALL SDL_StopTextInput(void)
DECLSPEC void SDLCALL SDL_StartTextInput(void)
DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name)
Sint32 SDL_Keycode
The SDL virtual key representation.
Definition: SDL_keycode.h:45
SDL_Keymod
Enumeration of valid key mods (possibly OR'd together).
Definition: SDL_keycode.h:333
SDL_Scancode
The SDL keyboard scancode representation.
Definition: SDL_scancode.h:44
struct SDL_Window SDL_Window
The type used to identify a window.
Definition: SDL_video.h:95
The SDL keysym structure, used in key events.
Definition: SDL_keyboard.h:48
Uint16 mod
Definition: SDL_keyboard.h:51
SDL_Keycode sym
Definition: SDL_keyboard.h:50
SDL_Scancode scancode
Definition: SDL_keyboard.h:49
Definition: SDL_rect.h:79