zenilib
0.5.3.0
|
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_keycode.h"
#include "SDL_video.h"
#include "begin_code.h"
#include "close_code.h"
Go to the source code of this file.
Classes | |
struct | SDL_Keysym |
The SDL keysym structure, used in key events. More... | |
Typedefs | |
typedef struct SDL_Keysym | SDL_Keysym |
The SDL keysym structure, used in key events. More... | |
Functions | |
DECLSPEC SDL_Window *SDLCALL | SDL_GetKeyboardFocus (void) |
Get the window which currently has keyboard focus. More... | |
DECLSPEC const Uint8 *SDLCALL | SDL_GetKeyboardState (int *numkeys) |
Get a snapshot of the current state of the keyboard. More... | |
DECLSPEC SDL_Keycode SDLCALL | SDL_GetKeyFromName (const char *name) |
Get a key code from a human-readable name. More... | |
DECLSPEC SDL_Keycode SDLCALL | SDL_GetKeyFromScancode (SDL_Scancode scancode) |
Get the key code corresponding to the given scancode according to the current keyboard layout. More... | |
DECLSPEC const char *SDLCALL | SDL_GetKeyName (SDL_Keycode key) |
Get a human-readable name for a key. More... | |
DECLSPEC SDL_Keymod SDLCALL | SDL_GetModState (void) |
Get the current key modifier state for the keyboard. More... | |
DECLSPEC SDL_Scancode SDLCALL | SDL_GetScancodeFromKey (SDL_Keycode key) |
Get the scancode corresponding to the given key code according to the current keyboard layout. More... | |
DECLSPEC SDL_Scancode SDLCALL | SDL_GetScancodeFromName (const char *name) |
Get a scancode from a human-readable name. More... | |
DECLSPEC const char *SDLCALL | SDL_GetScancodeName (SDL_Scancode scancode) |
Get a human-readable name for a scancode. More... | |
DECLSPEC SDL_bool SDLCALL | SDL_HasScreenKeyboardSupport (void) |
Returns whether the platform has some screen keyboard support. More... | |
DECLSPEC SDL_bool SDLCALL | SDL_IsScreenKeyboardShown (SDL_Window *window) |
Returns whether the screen keyboard is shown for given window. More... | |
DECLSPEC SDL_bool SDLCALL | SDL_IsTextInputActive (void) |
Return whether or not Unicode text input events are enabled. More... | |
DECLSPEC void SDLCALL | SDL_SetModState (SDL_Keymod modstate) |
Set the current key modifier state for the keyboard. More... | |
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 keyboard placement. More... | |
DECLSPEC void SDLCALL | SDL_StartTextInput (void) |
Start accepting Unicode text input events. This function will show the on-screen keyboard if supported. More... | |
DECLSPEC void SDLCALL | SDL_StopTextInput (void) |
Stop receiving any text input events. This function will hide the on-screen keyboard if supported. More... | |
Include file for SDL keyboard event handling
Definition in file SDL_keyboard.h.
typedef struct SDL_Keysym SDL_Keysym |
The SDL keysym structure, used in key events.
DECLSPEC SDL_Window* SDLCALL SDL_GetKeyboardFocus | ( | void | ) |
Get the window which currently has keyboard focus.
Definition at line 603 of file SDL_keyboard.c.
References SDL_keyboard.
Referenced by SDL_DestroyWindow(), SDL_PrivateJoystickShouldIgnoreEvent(), and SDL_SetRelativeMouseMode().
Get a snapshot of the current state of the keyboard.
numkeys | if non-NULL, receives the length of the returned array. |
Example:
Definition at line 832 of file SDL_keyboard.c.
References SDL_keyboard, and SDL_NUM_SCANCODES.
DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName | ( | const char * | name | ) |
Get a key code from a human-readable name.
Definition at line 964 of file SDL_keyboard.c.
References i, NULL, SDL_default_keymap, SDL_GetScancodeFromName(), SDL_strlen(), and SDLK_UNKNOWN.
DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode | ( | SDL_Scancode | scancode | ) |
Get the key code corresponding to the given scancode according to the current keyboard layout.
See SDL_Keycode for details.
Definition at line 859 of file SDL_keyboard.c.
References SDL_InvalidParamError, SDL_keyboard, and SDL_NUM_SCANCODES.
DECLSPEC const char* SDLCALL SDL_GetKeyName | ( | SDL_Keycode | key | ) |
Get a human-readable name for a key.
Definition at line 925 of file SDL_keyboard.c.
References SDL_GetScancodeName(), SDL_SCANCODE_BACKSPACE, SDL_SCANCODE_DELETE, SDL_SCANCODE_ESCAPE, SDL_SCANCODE_RETURN, SDL_SCANCODE_SPACE, SDL_SCANCODE_TAB, SDL_UCS4ToUTF8(), SDLK_BACKSPACE, SDLK_DELETE, SDLK_ESCAPE, SDLK_RETURN, SDLK_SCANCODE_MASK, SDLK_SPACE, and SDLK_TAB.
Referenced by SDLTest_PrintEvent().
DECLSPEC SDL_Keymod SDLCALL SDL_GetModState | ( | void | ) |
Get the current key modifier state for the keyboard.
Definition at line 843 of file SDL_keyboard.c.
References SDL_keyboard.
Referenced by Zeni::Game::run().
DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey | ( | SDL_Keycode | key | ) |
Get the scancode corresponding to the given key code according to the current keyboard layout.
See SDL_Scancode for details.
Definition at line 872 of file SDL_keyboard.c.
References SDL_keyboard, SDL_NUM_SCANCODES, and SDL_SCANCODE_UNKNOWN.
Referenced by PSP_PumpEvents().
DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName | ( | const char * | name | ) |
Get a scancode from a human-readable name.
Definition at line 902 of file SDL_keyboard.c.
References i, SDL_arraysize, SDL_InvalidParamError, SDL_scancode_names, SDL_SCANCODE_UNKNOWN, and SDL_strcasecmp().
Referenced by SDL_GetKeyFromName().
DECLSPEC const char* SDLCALL SDL_GetScancodeName | ( | SDL_Scancode | scancode | ) |
Get a human-readable name for a scancode.
Definition at line 887 of file SDL_keyboard.c.
References SDL_InvalidParamError, SDL_NUM_SCANCODES, and SDL_scancode_names.
Referenced by SDL_GetKeyName(), SDL_SendKeyboardKey(), and SDLTest_PrintEvent().
Returns whether the platform has some screen keyboard support.
Definition at line 3074 of file SDL_video.c.
References SDL_VideoDevice::HasScreenKeyboardSupport, and SDL_FALSE.
Referenced by SDL_VideoInit().
DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown | ( | SDL_Window * | window | ) |
Returns whether the screen keyboard is shown for given window.
window | The window for which screen keyboard should be queried. |
Definition at line 3083 of file SDL_video.c.
References SDL_VideoDevice::IsScreenKeyboardShown, and SDL_FALSE.
Return whether or not Unicode text input events are enabled.
Definition at line 3039 of file SDL_video.c.
References SDL_ENABLE, SDL_GetEventState, and SDL_TEXTINPUT.
DECLSPEC void SDLCALL SDL_SetModState | ( | SDL_Keymod | modstate | ) |
Set the current key modifier state for the keyboard.
Definition at line 851 of file SDL_keyboard.c.
References SDL_keyboard.
Set the rectangle used to type Unicode text inputs. This is used as a hint for IME and on-screen keyboard placement.
Definition at line 3066 of file SDL_video.c.
References SDL_VideoDevice::SetTextInputRect.
Start accepting Unicode text input events. This function will show the on-screen keyboard if supported.
Definition at line 3018 of file SDL_video.c.
References SDL_ENABLE, SDL_EventState(), SDL_GetFocusWindow(), SDL_TEXTEDITING, SDL_TEXTINPUT, SDL_VideoDevice::ShowScreenKeyboard, and SDL_VideoDevice::StartTextInput.
Referenced by SDL_VideoInit().
Stop receiving any text input events. This function will hide the on-screen keyboard if supported.
Definition at line 3045 of file SDL_video.c.
References SDL_VideoDevice::HideScreenKeyboard, SDL_DISABLE, SDL_EventState(), SDL_GetFocusWindow(), SDL_TEXTEDITING, SDL_TEXTINPUT, and SDL_VideoDevice::StopTextInput.