21 #include "../../SDL_internal.h"
23 #if SDL_VIDEO_DRIVER_OS2
26 #include "../../events/SDL_mouse_c.h"
33 ULONG ulMaxW = WinQuerySysValue(HWND_DESKTOP, SV_CXPOINTER);
34 ULONG ulMaxH = WinQuerySysValue(HWND_DESKTOP, SV_CYPOINTER);
39 debug_os2(
"Given image size is %u x %u, maximum allowed size is %u x %u",
45 if (hptr == NULLHANDLE)
49 if (pSDLCursor ==
NULL) {
50 WinDestroyPointer(hptr);
85 hptr = WinQuerySysPointer(HWND_DESKTOP, lSysId,
87 if (hptr == NULLHANDLE) {
88 debug_os2(
"Cannot load OS/2 system pointer %u for SDL cursor id %u",
94 if (pSDLCursor ==
NULL) {
95 WinDestroyPointer(hptr);
108 WinDestroyPointer(hptr);
116 WinSetPointer(HWND_DESKTOP,
hptrCursor))? 0 : -1;
126 WinMapWindowPoints(pWinData->
hwnd, HWND_DESKTOP, &pointl, 1);
128 WinSetPointerPos(HWND_DESKTOP, pointl.x, pointl.y);
131 static int OS2_WarpMouseGlobal(
int x,
int y)
133 WinSetPointerPos(HWND_DESKTOP,
x,
134 WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN) -
y);
140 return WinSetCapture(HWND_DESKTOP, (
window ==
NULL)? NULLHANDLE :
144 static Uint32 OS2_GetGlobalMouseState(
int *
x,
int *
y)
149 WinQueryPointerPos(HWND_DESKTOP, &pointl);
151 *
y = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN) - pointl.y - 1;
153 ulRes = (WinGetKeyState(HWND_DESKTOP, VK_BUTTON1) & 0x8000)?
SDL_BUTTON_LMASK : 0;
154 if (WinGetKeyState(HWND_DESKTOP, VK_BUTTON2) & 0x8000)
156 if (WinGetKeyState(HWND_DESKTOP, VK_BUTTON3) & 0x8000)
#define SDL_GetMouseFocus
#define SDL_OutOfMemory()
int uint32_t uint32_t uint32_t uint32_t uint32_t int drmModeModeInfoPtr mode int uint32_t uint32_t uint32_t uint32_t int32_t hot_x
SDL_Mouse * SDL_GetMouse(void)
void SDL_SetDefaultCursor(SDL_Cursor *cursor)
SDL_SystemCursor
Cursor types for SDL_CreateSystemCursor().
@ SDL_SYSTEM_CURSOR_SIZENS
@ SDL_SYSTEM_CURSOR_ARROW
@ SDL_SYSTEM_CURSOR_SIZENWSE
@ SDL_SYSTEM_CURSOR_SIZENESW
@ SDL_SYSTEM_CURSOR_IBEAM
@ SDL_SYSTEM_CURSOR_WAITARROW
@ SDL_SYSTEM_CURSOR_SIZEALL
@ SDL_SYSTEM_CURSOR_SIZEWE
@ SDL_SYSTEM_CURSOR_CROSSHAIR
GLint GLint GLint GLint GLint GLint y
GLint GLint GLint GLint GLint x
void OS2_QuitMouse(_THIS)
void OS2_InitMouse(_THIS, ULONG hab)
HPOINTER utilCreatePointer(SDL_Surface *surface, ULONG ulHotX, ULONG ulHotY)
EGLSurface EGLNativeWindowType * window
void(* WarpMouse)(SDL_Window *window, int x, int y)
SDL_Cursor *(* CreateCursor)(SDL_Surface *surface, int hot_x, int hot_y)
void(* FreeCursor)(SDL_Cursor *cursor)
int(* ShowCursor)(SDL_Cursor *cursor)
int(* WarpMouseGlobal)(int x, int y)
SDL_Cursor *(* CreateSystemCursor)(SDL_SystemCursor id)
Uint32(* GetGlobalMouseState)(int *x, int *y)
int(* CaptureMouse)(SDL_Window *window)
A collection of pixels used in software blitting.
The type used to identify a window.