mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 23:18:29 +00:00
Expose separate keyboard and mouse grab support
This adds SDL_SetWindowKeyboardGrab(), SDL_GetWindowKeyboardGrab(), SDL_SetWindowMouseGrab(), SDL_GetWindowMouseGrab(), and new SDL_WINDOW_KEYBOARD_GRABBED flag. It also updates the test harness to exercise this functionality and makes a minor fix to X11 that I missed in https://hg.libsdl.org/SDL/rev/02a2d609369b To fit in with this new support, SDL_WINDOW_INPUT_CAPTURE has been renamed to SDL_WINDOW_MOUSE_CAPTURE with the old name remaining as an alias for backwards compatibility with older code.
This commit is contained in:
@@ -795,3 +795,7 @@
|
||||
#define SDL_SoftStretchLinear SDL_SoftStretchLinear_REAL
|
||||
#define SDL_RenderGetD3D11Device SDL_RenderGetD3D11Device_REAL
|
||||
#define SDL_UpdateNVTexture SDL_UpdateNVTexture_REAL
|
||||
#define SDL_SetWindowKeyboardGrab SDL_SetWindowKeyboardGrab_REAL
|
||||
#define SDL_SetWindowMouseGrab SDL_SetWindowMouseGrab_REAL
|
||||
#define SDL_GetWindowKeyboardGrab SDL_GetWindowKeyboardGrab_REAL
|
||||
#define SDL_GetWindowMouseGrab SDL_GetWindowMouseGrab_REAL
|
||||
|
@@ -858,3 +858,7 @@ SDL_DYNAPI_PROC(int,SDL_SoftStretchLinear,(SDL_Surface *a, const SDL_Rect *b, SD
|
||||
SDL_DYNAPI_PROC(ID3D11Device*,SDL_RenderGetD3D11Device,(SDL_Renderer *a),(a),return)
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(int,SDL_UpdateNVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowKeyboardGrab,(SDL_Window *a, SDL_bool b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetWindowMouseGrab,(SDL_Window *a, SDL_bool b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowKeyboardGrab,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowMouseGrab,(SDL_Window *a),(a),return)
|
||||
|
Reference in New Issue
Block a user