mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-08 10:56:27 +00:00
Expose the keymap separately from the event keycode
This adds functions to query the keymap: * SDL_GetCurrentKeymap() * SDL_GetKeymapKeycode() * SDL_GetKeymapScancode() * SDL_ReleaseKeymap() and these are distinct from the function to query the event keycode associated with a scancode, which might be affected by SDL_HINT_KEYCODE_OPTIONS. Also added an SDL_bool parameter to SDL_GetKeyName() and SDL_GetKeyFromName() to enable upper case handling of the name.
This commit is contained in:
@@ -199,6 +199,7 @@ SDL3_0.0.0 {
|
||||
SDL_GetCurrentCameraDriver;
|
||||
SDL_GetCurrentDisplayMode;
|
||||
SDL_GetCurrentDisplayOrientation;
|
||||
SDL_GetCurrentKeymap;
|
||||
SDL_GetCurrentRenderOutputSize;
|
||||
SDL_GetCurrentThreadID;
|
||||
SDL_GetCurrentTime;
|
||||
@@ -211,8 +212,6 @@ SDL3_0.0.0 {
|
||||
SDL_GetDaysInMonth;
|
||||
SDL_GetDefaultAssertionHandler;
|
||||
SDL_GetDefaultCursor;
|
||||
SDL_GetDefaultKeyFromScancode;
|
||||
SDL_GetDefaultScancodeFromKey;
|
||||
SDL_GetDesktopDisplayMode;
|
||||
SDL_GetDirect3D9AdapterIndex;
|
||||
SDL_GetDisplayBounds;
|
||||
@@ -329,6 +328,8 @@ SDL3_0.0.0 {
|
||||
SDL_GetKeyboardNameForID;
|
||||
SDL_GetKeyboardState;
|
||||
SDL_GetKeyboards;
|
||||
SDL_GetKeymapKeycode;
|
||||
SDL_GetKeymapScancode;
|
||||
SDL_GetLogOutputFunction;
|
||||
SDL_GetLogPriority;
|
||||
SDL_GetMasksForPixelFormat;
|
||||
@@ -413,7 +414,6 @@ SDL3_0.0.0 {
|
||||
SDL_GetRendererProperties;
|
||||
SDL_GetRevision;
|
||||
SDL_GetSIMDAlignment;
|
||||
SDL_GetScancodeFromKey;
|
||||
SDL_GetScancodeFromName;
|
||||
SDL_GetScancodeName;
|
||||
SDL_GetSemaphoreValue;
|
||||
@@ -644,6 +644,7 @@ SDL3_0.0.0 {
|
||||
SDL_RegisterApp;
|
||||
SDL_RegisterEvents;
|
||||
SDL_ReleaseCameraFrame;
|
||||
SDL_ReleaseKeymap;
|
||||
SDL_ReloadGamepadMappings;
|
||||
SDL_RemovePath;
|
||||
SDL_RemoveStoragePath;
|
||||
|
@@ -224,6 +224,7 @@
|
||||
#define SDL_GetCurrentCameraDriver SDL_GetCurrentCameraDriver_REAL
|
||||
#define SDL_GetCurrentDisplayMode SDL_GetCurrentDisplayMode_REAL
|
||||
#define SDL_GetCurrentDisplayOrientation SDL_GetCurrentDisplayOrientation_REAL
|
||||
#define SDL_GetCurrentKeymap SDL_GetCurrentKeymap_REAL
|
||||
#define SDL_GetCurrentRenderOutputSize SDL_GetCurrentRenderOutputSize_REAL
|
||||
#define SDL_GetCurrentThreadID SDL_GetCurrentThreadID_REAL
|
||||
#define SDL_GetCurrentTime SDL_GetCurrentTime_REAL
|
||||
@@ -236,8 +237,6 @@
|
||||
#define SDL_GetDaysInMonth SDL_GetDaysInMonth_REAL
|
||||
#define SDL_GetDefaultAssertionHandler SDL_GetDefaultAssertionHandler_REAL
|
||||
#define SDL_GetDefaultCursor SDL_GetDefaultCursor_REAL
|
||||
#define SDL_GetDefaultKeyFromScancode SDL_GetDefaultKeyFromScancode_REAL
|
||||
#define SDL_GetDefaultScancodeFromKey SDL_GetDefaultScancodeFromKey_REAL
|
||||
#define SDL_GetDesktopDisplayMode SDL_GetDesktopDisplayMode_REAL
|
||||
#define SDL_GetDirect3D9AdapterIndex SDL_GetDirect3D9AdapterIndex_REAL
|
||||
#define SDL_GetDisplayBounds SDL_GetDisplayBounds_REAL
|
||||
@@ -354,6 +353,8 @@
|
||||
#define SDL_GetKeyboardNameForID SDL_GetKeyboardNameForID_REAL
|
||||
#define SDL_GetKeyboardState SDL_GetKeyboardState_REAL
|
||||
#define SDL_GetKeyboards SDL_GetKeyboards_REAL
|
||||
#define SDL_GetKeymapKeycode SDL_GetKeymapKeycode_REAL
|
||||
#define SDL_GetKeymapScancode SDL_GetKeymapScancode_REAL
|
||||
#define SDL_GetLogOutputFunction SDL_GetLogOutputFunction_REAL
|
||||
#define SDL_GetLogPriority SDL_GetLogPriority_REAL
|
||||
#define SDL_GetMasksForPixelFormat SDL_GetMasksForPixelFormat_REAL
|
||||
@@ -438,7 +439,6 @@
|
||||
#define SDL_GetRendererProperties SDL_GetRendererProperties_REAL
|
||||
#define SDL_GetRevision SDL_GetRevision_REAL
|
||||
#define SDL_GetSIMDAlignment SDL_GetSIMDAlignment_REAL
|
||||
#define SDL_GetScancodeFromKey SDL_GetScancodeFromKey_REAL
|
||||
#define SDL_GetScancodeFromName SDL_GetScancodeFromName_REAL
|
||||
#define SDL_GetScancodeName SDL_GetScancodeName_REAL
|
||||
#define SDL_GetSemaphoreValue SDL_GetSemaphoreValue_REAL
|
||||
@@ -669,6 +669,7 @@
|
||||
#define SDL_RegisterApp SDL_RegisterApp_REAL
|
||||
#define SDL_RegisterEvents SDL_RegisterEvents_REAL
|
||||
#define SDL_ReleaseCameraFrame SDL_ReleaseCameraFrame_REAL
|
||||
#define SDL_ReleaseKeymap SDL_ReleaseKeymap_REAL
|
||||
#define SDL_ReloadGamepadMappings SDL_ReloadGamepadMappings_REAL
|
||||
#define SDL_RemovePath SDL_RemovePath_REAL
|
||||
#define SDL_RemoveStoragePath SDL_RemoveStoragePath_REAL
|
||||
|
@@ -244,6 +244,7 @@ SDL_DYNAPI_PROC(const char*,SDL_GetCurrentAudioDriver,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetCurrentCameraDriver,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const SDL_DisplayMode*,SDL_GetCurrentDisplayMode,(SDL_DisplayID a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_DisplayOrientation,SDL_GetCurrentDisplayOrientation,(SDL_DisplayID a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keymap*,SDL_GetCurrentKeymap,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetCurrentRenderOutputSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_ThreadID,SDL_GetCurrentThreadID,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetCurrentTime,(SDL_Time *a),(a),return)
|
||||
@@ -256,8 +257,6 @@ SDL_DYNAPI_PROC(int,SDL_GetDayOfYear,(int a, int b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDaysInMonth,(int a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_AssertionHandler,SDL_GetDefaultAssertionHandler,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetDefaultCursor,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetDefaultKeyFromScancode,(SDL_Scancode a, SDL_Keymod b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetDefaultScancodeFromKey,(SDL_Keycode a, SDL_Keymod *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(const SDL_DisplayMode*,SDL_GetDesktopDisplayMode,(SDL_DisplayID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDirect3D9AdapterIndex,(SDL_DisplayID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDisplayBounds,(SDL_DisplayID a, SDL_Rect *b),(a,b),return)
|
||||
@@ -367,13 +366,15 @@ SDL_DYNAPI_PROC(SDL_JoystickType,SDL_GetJoystickTypeForID,(SDL_JoystickID a),(a)
|
||||
SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickVendor,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickVendorForID,(SDL_JoystickID a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickID*,SDL_GetJoysticks,(int *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromName,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromName,(const char *a, SDL_bool b),(a, b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromScancode,(SDL_Scancode a, SDL_Keymod b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetKeyName,(SDL_Keycode a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetKeyName,(SDL_Keycode a, SDL_bool b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetKeyboardFocus,(void),(),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetKeyboardNameForID,(SDL_KeyboardID a),(a),return)
|
||||
SDL_DYNAPI_PROC(const Uint8*,SDL_GetKeyboardState,(int *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_KeyboardID*,SDL_GetKeyboards,(int *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeymapKeycode,(SDL_Keymap *a, SDL_Scancode b, SDL_Keymod c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetKeymapScancode,(SDL_Keymap *a, SDL_Keycode b, SDL_Keymod *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GetLogOutputFunction,(SDL_LogOutputFunction *a, void **b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_LogPriority,SDL_GetLogPriority,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetMasksForPixelFormat,(SDL_PixelFormat a, int *b, Uint32 *c, Uint32 *d, Uint32 *e, Uint32 *f),(a,b,c,d,e,f),return)
|
||||
@@ -458,7 +459,6 @@ SDL_DYNAPI_PROC(const char *,SDL_GetRendererName,(SDL_Renderer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_GetRendererProperties,(SDL_Renderer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetRevision,(void),(),return)
|
||||
SDL_DYNAPI_PROC(size_t,SDL_GetSIMDAlignment,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromKey,(SDL_Keycode a, SDL_Keymod *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromName,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetScancodeName,(SDL_Scancode a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetSemaphoreValue,(SDL_Semaphore *a),(a),return)
|
||||
@@ -680,6 +680,7 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_ReadU8,(SDL_IOStream *a, Uint8 *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RegisterApp,(const char *a, Uint32 b, void *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_RegisterEvents,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_ReleaseCameraFrame,(SDL_Camera *a, SDL_Surface *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseKeymap,(SDL_Keymap *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_ReloadGamepadMappings,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RemovePath,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_RemoveStoragePath,(SDL_Storage *a, const char *b),(a,b),return)
|
||||
|
Reference in New Issue
Block a user