23 #if SDL_VIDEO_DRIVER_WINDOWS
28 #include "../../events/SDL_mouse_c.h"
35 WIN_CreateDefaultCursor()
65 bmh.bV4Size =
sizeof(bmh);
66 bmh.bV4Width = surface->
w;
67 bmh.bV4Height = -surface->
h;
71 bmh.bV4AlphaMask = 0xFF000000;
72 bmh.bV4RedMask = 0x00FF0000;
73 bmh.bV4GreenMask = 0x0000FF00;
74 bmh.bV4BlueMask = 0x000000FF;
76 maskbitslen = ((surface->
w + (pad - (surface->
w %
pad))) / 8) * surface->
h;
78 if (maskbits ==
NULL) {
89 ii.xHotspot = (
DWORD)hot_x;
90 ii.yHotspot = (
DWORD)hot_y;
91 ii.hbmColor = CreateDIBSection(hdc, (BITMAPINFO*)&bmh, DIB_RGB_COLORS, &pixels,
NULL, 0);
92 ii.hbmMask = CreateBitmap(surface->
w, surface->
h, 1, 1, maskbits);
100 hicon = CreateIconIndirect(&ii);
102 DeleteObject(ii.hbmColor);
103 DeleteObject(ii.hbmMask);
150 hicon = LoadCursor(
NULL, name);
191 ClientToScreen(hwnd, &pt);
192 SetCursorPos(pt.x, pt.y);
198 RAWINPUTDEVICE rawMouse = { 0x01, 0x02, 0,
NULL };
200 hWnd = GetActiveWindow();
202 rawMouse.hwndTarget = hWnd;
204 rawMouse.dwFlags |= RIDEV_REMOVE;
205 rawMouse.hwndTarget =
NULL;
210 if(RegisterRawInputDevices(&rawMouse, 1,
sizeof(RAWINPUTDEVICE)) ==
FALSE) {
222 GetWindowRect(hWnd, &rect);
224 cx = (rect.left + rect.right) / 2;
225 cy = (rect.top + rect.bottom) / 2;
SDL_Mouse * SDL_GetMouse(void)
DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size)
#define SDL_stack_free(data)
GLenum GLsizei const GLuint GLboolean enabled
DECLSPEC SDL_Window *SDLCALL SDL_GetMouseFocus(void)
Get the window which currently has mouse focus.
A collection of pixels used in software blitting.
DECLSPEC void SDLCALL SDL_free(void *mem)
EGLImageKHR EGLint * name
typedef HDC(WINAPI *PFNWGLGETCURRENTREADDCARBPROC)(VOID)
void WIN_InitMouse(_THIS)
void(* FreeCursor)(SDL_Cursor *cursor)
SDL_Cursor *(* CreateCursor)(SDL_Surface *surface, int hot_x, int hot_y)
int(* ShowCursor)(SDL_Cursor *cursor)
DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len)
SDL_SystemCursor
Cursor types for SDL_CreateSystemCursor.
int(* SetRelativeMouseMode)(SDL_bool enabled)
void SDL_SetDefaultCursor(SDL_Cursor *cursor)
void WIN_QuitMouse(_THIS)
typedef LPVOID(WINAPI *PFNWGLCREATEIMAGEBUFFERI3DPROC)(HDC hDC
#define SDL_assert(condition)
EGLSurface EGLint EGLint y
#define SDL_OutOfMemory()
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
int WIN_SetError(const char *prefix)
DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len)
uint8_t Uint8
An unsigned 8-bit integer type.
typedef DWORD(WINAPI *XInputGetState_t)(DWORD dwUserIndex
#define SDL_stack_alloc(type, count)
#define SDL_Unsupported()
SDL_Cursor *(* CreateSystemCursor)(SDL_SystemCursor id)
void(* WarpMouse)(SDL_Window *window, int x, int y)