Rename SetWindowGrab() to SetWindowMouseGrab()

This commit is contained in:
Cameron Gutman 2021-01-25 21:42:14 -06:00
parent d133a5f6f7
commit a0d3c6c63c
29 changed files with 36 additions and 36 deletions

View File

@ -232,7 +232,7 @@ struct SDL_VideoDevice
void (*SetWindowFullscreen) (_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
int (*SetWindowGammaRamp) (_THIS, SDL_Window * window, const Uint16 * ramp);
int (*GetWindowGammaRamp) (_THIS, SDL_Window * window, Uint16 * ramp);
void (*SetWindowGrab) (_THIS, SDL_Window * window, SDL_bool grabbed);
void (*SetWindowMouseGrab) (_THIS, SDL_Window * window, SDL_bool grabbed);
void (*SetWindowKeyboardGrab) (_THIS, SDL_Window * window, SDL_bool grabbed);
void (*DestroyWindow) (_THIS, SDL_Window * window);
int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch);

View File

@ -2652,8 +2652,8 @@ SDL_UpdateWindowGrab(SDL_Window * window)
if (grabbed_window && (grabbed_window != window)) {
/* stealing a grab from another window! */
grabbed_window->flags &= ~SDL_WINDOW_INPUT_GRABBED;
if (_this->SetWindowGrab) {
_this->SetWindowGrab(_this, grabbed_window, SDL_FALSE);
if (_this->SetWindowMouseGrab) {
_this->SetWindowMouseGrab(_this, grabbed_window, SDL_FALSE);
}
if (_this->SetWindowKeyboardGrab) {
_this->SetWindowKeyboardGrab(_this, grabbed_window, SDL_FALSE);
@ -2664,8 +2664,8 @@ SDL_UpdateWindowGrab(SDL_Window * window)
_this->grabbed_window = NULL; /* ungrabbing. */
}
if (_this->SetWindowGrab) {
_this->SetWindowGrab(_this, window, grabbed);
if (_this->SetWindowMouseGrab) {
_this->SetWindowMouseGrab(_this, window, grabbed);
}
if (_this->SetWindowKeyboardGrab) {
if (grabbed && SDL_GetHintBoolean(SDL_HINT_GRAB_KEYBOARD, SDL_FALSE)) {

View File

@ -95,7 +95,7 @@ Cocoa_CreateDevice(int devindex)
device->SetWindowFullscreen = Cocoa_SetWindowFullscreen;
device->SetWindowGammaRamp = Cocoa_SetWindowGammaRamp;
device->GetWindowGammaRamp = Cocoa_GetWindowGammaRamp;
device->SetWindowGrab = Cocoa_SetWindowGrab;
device->SetWindowMouseGrab = Cocoa_SetWindowMouseGrab;
device->DestroyWindow = Cocoa_DestroyWindow;
device->GetWindowWMInfo = Cocoa_GetWindowWMInfo;
device->SetWindowHitTest = Cocoa_SetWindowHitTest;

View File

@ -145,7 +145,7 @@ extern void Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resiza
extern void Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
extern int Cocoa_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
extern int Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp);
extern void Cocoa_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void Cocoa_DestroyWindow(_THIS, SDL_Window * window);
extern SDL_bool Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info);
extern int Cocoa_SetWindowHitTest(SDL_Window *window, SDL_bool enabled);

View File

@ -1958,7 +1958,7 @@ Cocoa_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
}
void
Cocoa_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
Cocoa_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
SDL_Mouse *mouse = SDL_GetMouse();
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;

View File

@ -113,7 +113,7 @@ DirectFB_CreateDevice(int devindex)
device->MaximizeWindow = DirectFB_MaximizeWindow;
device->MinimizeWindow = DirectFB_MinimizeWindow;
device->RestoreWindow = DirectFB_RestoreWindow;
device->SetWindowGrab = DirectFB_SetWindowGrab;
device->SetWindowMouseGrab = DirectFB_SetWindowMouseGrab;
device->DestroyWindow = DirectFB_DestroyWindow;
device->GetWindowWMInfo = DirectFB_GetWindowWMInfo;

View File

@ -383,7 +383,7 @@ DirectFB_RestoreWindow(_THIS, SDL_Window * window)
}
void
DirectFB_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
SDL_DFB_DEVICEDATA(_this);
SDL_DFB_WINDOWDATA(window);

View File

@ -69,7 +69,7 @@ extern void DirectFB_RaiseWindow(_THIS, SDL_Window * window);
extern void DirectFB_MaximizeWindow(_THIS, SDL_Window * window);
extern void DirectFB_MinimizeWindow(_THIS, SDL_Window * window);
extern void DirectFB_RestoreWindow(_THIS, SDL_Window * window);
extern void DirectFB_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void DirectFB_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void DirectFB_DestroyWindow(_THIS, SDL_Window * window);
extern SDL_bool DirectFB_GetWindowWMInfo(_THIS, SDL_Window * window,
struct SDL_SysWMinfo *info);

View File

@ -98,7 +98,7 @@ Emscripten_CreateDevice(int devindex)
device->MaximizeWindow = Emscripten_MaximizeWindow;
device->MinimizeWindow = Emscripten_MinimizeWindow;
device->RestoreWindow = Emscripten_RestoreWindow;
device->SetWindowGrab = Emscripten_SetWindowGrab;*/
device->SetWindowMouseGrab = Emscripten_SetWindowMouseGrab;*/
device->DestroyWindow = Emscripten_DestroyWindow;
device->SetWindowFullscreen = Emscripten_SetWindowFullscreen;

View File

@ -88,7 +88,7 @@ HAIKU_CreateDevice(int devindex)
device->SetWindowFullscreen = HAIKU_SetWindowFullscreen;
device->SetWindowGammaRamp = HAIKU_SetWindowGammaRamp;
device->GetWindowGammaRamp = HAIKU_GetWindowGammaRamp;
device->SetWindowGrab = HAIKU_SetWindowGrab;
device->SetWindowMouseGrab = HAIKU_SetWindowMouseGrab;
device->DestroyWindow = HAIKU_DestroyWindow;
device->GetWindowWMInfo = HAIKU_GetWindowWMInfo;
device->CreateWindowFramebuffer = HAIKU_CreateWindowFramebuffer;

View File

@ -205,7 +205,7 @@ int HAIKU_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) {
}
void HAIKU_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) {
void HAIKU_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed) {
/* TODO: Implement this! */
}

View File

@ -43,7 +43,7 @@ extern void HAIKU_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resiza
extern void HAIKU_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
extern int HAIKU_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
extern int HAIKU_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp);
extern void HAIKU_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void HAIKU_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void HAIKU_DestroyWindow(_THIS, SDL_Window * window);
extern SDL_bool HAIKU_GetWindowWMInfo(_THIS, SDL_Window * window,
struct SDL_SysWMinfo *info);

View File

@ -233,7 +233,7 @@ KMSDRM_CreateDevice(int devindex)
device->MaximizeWindow = KMSDRM_MaximizeWindow;
device->MinimizeWindow = KMSDRM_MinimizeWindow;
device->RestoreWindow = KMSDRM_RestoreWindow;
device->SetWindowGrab = KMSDRM_SetWindowGrab;
device->SetWindowMouseGrab = KMSDRM_SetWindowMouseGrab;
device->DestroyWindow = KMSDRM_DestroyWindow;
device->GetWindowWMInfo = KMSDRM_GetWindowWMInfo;
@ -1320,7 +1320,7 @@ KMSDRM_RestoreWindow(_THIS, SDL_Window * window)
{
}
void
KMSDRM_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
KMSDRM_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
}

View File

@ -138,7 +138,7 @@ void KMSDRM_RaiseWindow(_THIS, SDL_Window * window);
void KMSDRM_MaximizeWindow(_THIS, SDL_Window * window);
void KMSDRM_MinimizeWindow(_THIS, SDL_Window * window);
void KMSDRM_RestoreWindow(_THIS, SDL_Window * window);
void KMSDRM_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
void KMSDRM_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
void KMSDRM_DestroyWindow(_THIS, SDL_Window * window);
/* Window manager function */

View File

@ -1147,7 +1147,7 @@ static int OS2_SetWindowHitTest(SDL_Window *window, SDL_bool enabled)
return 0;
}
static void OS2_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
static void OS2_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
{
WINDATA *pWinData = (WINDATA *)window->driverdata;
@ -1616,7 +1616,7 @@ static SDL_VideoDevice *OS2_CreateDevice(int devindex)
device->GetWindowWMInfo = OS2_GetWindowWMInfo;
device->OnWindowEnter = OS2_OnWindowEnter;
device->SetWindowHitTest = OS2_SetWindowHitTest;
device->SetWindowGrab = OS2_SetWindowGrab;
device->SetWindowMouseGrab = OS2_SetWindowMouseGrab;
device->CreateWindowFramebuffer = OS2_CreateWindowFramebuffer;
device->UpdateWindowFramebuffer = OS2_UpdateWindowFramebuffer;
device->DestroyWindowFramebuffer = OS2_DestroyWindowFramebuffer;

View File

@ -114,7 +114,7 @@ PND_create()
device->MaximizeWindow = PND_maximizewindow;
device->MinimizeWindow = PND_minimizewindow;
device->RestoreWindow = PND_restorewindow;
device->SetWindowGrab = PND_setwindowgrab;
device->SetWindowMouseGrab = PND_setwindowgrab;
device->DestroyWindow = PND_destroywindow;
#if 0
device->GetWindowWMInfo = PND_getwindowwminfo;

View File

@ -112,7 +112,7 @@ PSP_Create()
device->MaximizeWindow = PSP_MaximizeWindow;
device->MinimizeWindow = PSP_MinimizeWindow;
device->RestoreWindow = PSP_RestoreWindow;
device->SetWindowGrab = PSP_SetWindowGrab;
device->SetWindowMouseGrab = PSP_SetWindowMouseGrab;
device->DestroyWindow = PSP_DestroyWindow;
#if 0
device->GetWindowWMInfo = PSP_GetWindowWMInfo;
@ -267,7 +267,7 @@ PSP_RestoreWindow(_THIS, SDL_Window * window)
{
}
void
PSP_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
PSP_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
}

View File

@ -73,7 +73,7 @@ void PSP_RaiseWindow(_THIS, SDL_Window * window);
void PSP_MaximizeWindow(_THIS, SDL_Window * window);
void PSP_MinimizeWindow(_THIS, SDL_Window * window);
void PSP_RestoreWindow(_THIS, SDL_Window * window);
void PSP_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
void PSP_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
void PSP_DestroyWindow(_THIS, SDL_Window * window);
/* Window manager function */

View File

@ -120,7 +120,7 @@ RPI_Create()
device->MaximizeWindow = RPI_MaximizeWindow;
device->MinimizeWindow = RPI_MinimizeWindow;
device->RestoreWindow = RPI_RestoreWindow;
device->SetWindowGrab = RPI_SetWindowGrab;
device->SetWindowMouseGrab = RPI_SetWindowMouseGrab;
device->DestroyWindow = RPI_DestroyWindow;
#if 0
device->GetWindowWMInfo = RPI_GetWindowWMInfo;
@ -422,7 +422,7 @@ RPI_RestoreWindow(_THIS, SDL_Window * window)
{
}
void
RPI_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
RPI_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
}

View File

@ -81,7 +81,7 @@ void RPI_RaiseWindow(_THIS, SDL_Window * window);
void RPI_MaximizeWindow(_THIS, SDL_Window * window);
void RPI_MinimizeWindow(_THIS, SDL_Window * window);
void RPI_RestoreWindow(_THIS, SDL_Window * window);
void RPI_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
void RPI_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
void RPI_DestroyWindow(_THIS, SDL_Window * window);
/* Window manager function */

View File

@ -200,7 +200,7 @@ Wayland_CreateDevice(int devindex)
device->SetWindowFullscreen = Wayland_SetWindowFullscreen;
device->MaximizeWindow = Wayland_MaximizeWindow;
device->MinimizeWindow = Wayland_MinimizeWindow;
device->SetWindowGrab = Wayland_SetWindowGrab;
device->SetWindowMouseGrab = Wayland_SetWindowMouseGrab;
device->SetWindowKeyboardGrab = Wayland_SetWindowKeyboardGrab;
device->RestoreWindow = Wayland_RestoreWindow;
device->SetWindowBordered = Wayland_SetWindowBordered;

View File

@ -670,7 +670,7 @@ Wayland_MinimizeWindow(_THIS, SDL_Window * window)
}
void
Wayland_SetWindowGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
Wayland_SetWindowMouseGrab(_THIS, SDL_Window *window, SDL_bool grabbed)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;

View File

@ -91,7 +91,7 @@ extern void Wayland_SetWindowFullscreen(_THIS, SDL_Window * window,
SDL_bool fullscreen);
extern void Wayland_MaximizeWindow(_THIS, SDL_Window * window);
extern void Wayland_MinimizeWindow(_THIS, SDL_Window * window);
extern void Wayland_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void Wayland_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void Wayland_SetWindowKeyboardGrab(_THIS, SDL_Window *window, SDL_bool grabbed);
extern void Wayland_RestoreWindow(_THIS, SDL_Window * window);
extern void Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);

View File

@ -160,7 +160,7 @@ WIN_CreateDevice(int devindex)
device->SetWindowFullscreen = WIN_SetWindowFullscreen;
device->SetWindowGammaRamp = WIN_SetWindowGammaRamp;
device->GetWindowGammaRamp = WIN_GetWindowGammaRamp;
device->SetWindowGrab = WIN_SetWindowGrab;
device->SetWindowMouseGrab = WIN_SetWindowMouseGrab;
device->SetWindowKeyboardGrab = WIN_SetWindowKeyboardGrab;
device->DestroyWindow = WIN_DestroyWindow;
device->GetWindowWMInfo = WIN_GetWindowWMInfo;

View File

@ -778,7 +778,7 @@ void WIN_UngrabKeyboard(SDL_Window *window)
}
void
WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
WIN_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
WIN_UpdateClipCursor(window);

View File

@ -76,7 +76,7 @@ extern void WIN_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizabl
extern void WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
extern int WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
extern int WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp);
extern void WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void WIN_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void WIN_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void WIN_DestroyWindow(_THIS, SDL_Window * window);
extern SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window * window,

View File

@ -224,7 +224,7 @@ X11_CreateDevice(int devindex)
device->SetWindowResizable = X11_SetWindowResizable;
device->SetWindowFullscreen = X11_SetWindowFullscreen;
device->SetWindowGammaRamp = X11_SetWindowGammaRamp;
device->SetWindowGrab = X11_SetWindowGrab;
device->SetWindowMouseGrab = X11_SetWindowMouseGrab;
device->SetWindowKeyboardGrab = X11_SetWindowKeyboardGrab;
device->DestroyWindow = X11_DestroyWindow;
device->CreateWindowFramebuffer = X11_CreateWindowFramebuffer;

View File

@ -1561,7 +1561,7 @@ X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
}
void
X11_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;

View File

@ -99,7 +99,7 @@ extern void X11_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
extern void X11_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable);
extern void X11_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
extern int X11_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
extern void X11_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void X11_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
extern void X11_DestroyWindow(_THIS, SDL_Window * window);
extern SDL_bool X11_GetWindowWMInfo(_THIS, SDL_Window * window,