21 #include "../../SDL_internal.h"
23 #if SDL_VIDEO_DRIVER_WINDOWS
32 #include "../../events/SDL_events_c.h"
33 #include "../../events/SDL_touch_c.h"
34 #include "../../events/scancodes_windows.h"
50 #define REPEATED_KEYMASK (1<<30)
51 #define EXTENDED_KEYMASK (1<<24)
54 #ifndef VK_OEM_NEC_EQUAL
55 #define VK_OEM_NEC_EQUAL 0x92
59 #ifndef WM_XBUTTONDOWN
60 #define WM_XBUTTONDOWN 0x020B
63 #define WM_XBUTTONUP 0x020C
65 #ifndef GET_XBUTTON_WPARAM
66 #define GET_XBUTTON_WPARAM(w) (HIWORD(w))
69 #define WM_INPUT 0x00ff
72 #define WM_TOUCH 0x0240
74 #ifndef WM_MOUSEHWHEEL
75 #define WM_MOUSEHWHEEL 0x020E
77 #ifndef WM_POINTERUPDATE
78 #define WM_POINTERUPDATE 0x0245
81 #define WM_UNICHAR 0x0109
85 VKeytoScancodeFallback(WPARAM vkey)
98 VKeytoScancode(WPARAM vkey)
155 WindowsScanCodeToSDLScanCode(LPARAM lParam, WPARAM wParam)
158 int nScanCode = (lParam >> 16) & 0xFF;
159 SDL_bool bIsExtended = (lParam & (1 << 24)) != 0;
161 code = VKeytoScancode(wParam);
233 code = VKeytoScancodeFallback(wParam);
240 WIN_ShouldIgnoreFocusClick()
259 if (!bwParamMousePressed) {
263 if (WIN_ShouldIgnoreFocusClick()) {
282 if (wParam !=
data->mouse_button_flags) {
292 data->mouse_button_flags = wParam;
299 if (rawButtons !=
data->mouse_button_flags) {
301 SDL_bool swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0;
302 if ((rawButtons & RI_MOUSE_BUTTON_1_DOWN))
303 WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_1_DOWN), mouseFlags, swapButtons,
data,
SDL_BUTTON_LEFT, 0);
304 if ((rawButtons & RI_MOUSE_BUTTON_1_UP))
305 WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_1_UP), mouseFlags, swapButtons,
data,
SDL_BUTTON_LEFT, 0);
306 if ((rawButtons & RI_MOUSE_BUTTON_2_DOWN))
307 WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_2_DOWN), mouseFlags, swapButtons,
data,
SDL_BUTTON_RIGHT, 0);
308 if ((rawButtons & RI_MOUSE_BUTTON_2_UP))
309 WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_2_UP), mouseFlags, swapButtons,
data,
SDL_BUTTON_RIGHT, 0);
310 if ((rawButtons & RI_MOUSE_BUTTON_3_DOWN))
311 WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_3_DOWN), mouseFlags, swapButtons,
data,
SDL_BUTTON_MIDDLE, 0);
312 if ((rawButtons & RI_MOUSE_BUTTON_3_UP))
313 WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_3_UP), mouseFlags, swapButtons,
data,
SDL_BUTTON_MIDDLE, 0);
314 if ((rawButtons & RI_MOUSE_BUTTON_4_DOWN))
315 WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_4_DOWN), mouseFlags, swapButtons,
data,
SDL_BUTTON_X1, 0);
316 if ((rawButtons & RI_MOUSE_BUTTON_4_UP))
317 WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_4_UP), mouseFlags, swapButtons,
data,
SDL_BUTTON_X1, 0);
318 if ((rawButtons & RI_MOUSE_BUTTON_5_DOWN))
319 WIN_CheckWParamMouseButton((rawButtons & RI_MOUSE_BUTTON_5_DOWN), mouseFlags, swapButtons,
data,
SDL_BUTTON_X2, 0);
320 if ((rawButtons & RI_MOUSE_BUTTON_5_UP))
321 WIN_CheckWParamMouseButton(!(rawButtons & RI_MOUSE_BUTTON_5_UP), mouseFlags, swapButtons,
data,
SDL_BUTTON_X2, 0);
322 data->mouse_button_flags = rawButtons;
337 swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0;
339 keyState = GetAsyncKeyState(VK_LBUTTON);
340 if (!(keyState & 0x8000)) {
343 keyState = GetAsyncKeyState(VK_RBUTTON);
344 if (!(keyState & 0x8000)) {
347 keyState = GetAsyncKeyState(VK_MBUTTON);
348 if (!(keyState & 0x8000)) {
351 keyState = GetAsyncKeyState(VK_XBUTTON1);
352 if (!(keyState & 0x8000)) {
355 keyState = GetAsyncKeyState(VK_XBUTTON2);
356 if (!(keyState & 0x8000)) {
359 data->mouse_button_flags = 0;
363 WIN_ConvertUTF32toUTF8(UINT32 codepoint,
char *
text)
365 if (codepoint <= 0x7F) {
366 text[0] = (char) codepoint;
368 }
else if (codepoint <= 0x7FF) {
369 text[0] = 0xC0 | (char) ((codepoint >> 6) & 0x1F);
370 text[1] = 0x80 | (char) (codepoint & 0x3F);
372 }
else if (codepoint <= 0xFFFF) {
373 text[0] = 0xE0 | (char) ((codepoint >> 12) & 0x0F);
374 text[1] = 0x80 | (char) ((codepoint >> 6) & 0x3F);
375 text[2] = 0x80 | (char) (codepoint & 0x3F);
377 }
else if (codepoint <= 0x10FFFF) {
378 text[0] = 0xF0 | (char) ((codepoint >> 18) & 0x0F);
379 text[1] = 0x80 | (char) ((codepoint >> 12) & 0x3F);
380 text[2] = 0x80 | (char) ((codepoint >> 6) & 0x3F);
381 text[3] = 0x80 | (char) (codepoint & 0x3F);
390 ShouldGenerateWindowCloseOnAltF4(
void)
401 #define MI_WP_SIGNATURE 0xFF515700
402 #define MI_WP_SIGNATURE_MASK 0xFFFFFF00
403 #define IsTouchEvent(dw) ((dw) & MI_WP_SIGNATURE_MASK) == MI_WP_SIGNATURE
407 SDL_MOUSE_EVENT_SOURCE_UNKNOWN,
408 SDL_MOUSE_EVENT_SOURCE_MOUSE,
409 SDL_MOUSE_EVENT_SOURCE_TOUCH,
410 SDL_MOUSE_EVENT_SOURCE_PEN,
411 } SDL_MOUSE_EVENT_SOURCE;
413 static SDL_MOUSE_EVENT_SOURCE GetMouseMessageSource()
415 LPARAM extrainfo = GetMessageExtraInfo();
421 if (IsTouchEvent(extrainfo)) {
422 if (extrainfo & 0x80) {
423 return SDL_MOUSE_EVENT_SOURCE_TOUCH;
425 return SDL_MOUSE_EVENT_SOURCE_PEN;
428 return SDL_MOUSE_EVENT_SOURCE_MOUSE;
435 LRESULT returnCode = -1;
443 wmmsg.
msg.win.hwnd = hwnd;
445 wmmsg.
msg.win.wParam = wParam;
446 wmmsg.
msg.win.lParam = lParam;
453 return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam);
460 SDL_snprintf(
message,
sizeof(
message),
"Received windows message: %p UNKNOWN (%d) -- 0x%X, 0x%X\n", hwnd, msg, wParam, lParam);
495 minimized = HIWORD(wParam);
496 if (!minimized && (LOWORD(wParam) != WA_INACTIVE)) {
498 if (!IsWindowVisible(hwnd)) {
501 if (LOWORD(wParam) == WA_CLICKACTIVE) {
502 SDL_bool swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0;
503 if (GetAsyncKeyState(VK_LBUTTON)) {
506 if (GetAsyncKeyState(VK_RBUTTON)) {
509 if (GetAsyncKeyState(VK_MBUTTON)) {
512 if (GetAsyncKeyState(VK_XBUTTON1)) {
515 if (GetAsyncKeyState(VK_XBUTTON2)) {
525 GetCursorPos(&cursorPos);
526 ScreenToClient(hwnd, &cursorPos);
529 WIN_CheckAsyncMouseRelease(
data);
560 case WM_POINTERUPDATE:
562 data->last_pointer_update = lParam;
571 if (GetMouseMessageSource() != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
572 lParam !=
data->last_pointer_update) {
579 int center_x = 0, center_y = 0;
597 case WM_LBUTTONDBLCLK:
599 case WM_RBUTTONDBLCLK:
601 case WM_MBUTTONDBLCLK:
603 case WM_XBUTTONDBLCLK:
607 if (GetMouseMessageSource() != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
608 lParam !=
data->last_pointer_update) {
609 WIN_CheckWParamMouseButtons(wParam,
data, 0);
618 HRAWINPUT hRawInput = (HRAWINPUT)lParam;
620 UINT
size =
sizeof(inp);
624 if (!isRelative || mouse->
focus !=
data->window) {
630 GetRawInputData(hRawInput, RID_INPUT, &inp, &
size,
sizeof(RAWINPUTHEADER));
633 if (inp.header.dwType == RIM_TYPEMOUSE) {
634 if (GetMouseMessageSource() == SDL_MOUSE_EVENT_SOURCE_TOUCH ||
635 (GetMessageExtraInfo() & 0x82) == 0x82) {
639 RAWMOUSE* rawmouse = &inp.data.mouse;
641 if ((rawmouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) {
643 }
else if (rawmouse->lLastX || rawmouse->lLastY) {
647 int w = GetSystemMetrics(virtual_desktop ? SM_CXVIRTUALSCREEN : SM_CXSCREEN);
648 int h = GetSystemMetrics(virtual_desktop ? SM_CYVIRTUALSCREEN : SM_CYSCREEN);
649 int x = (
int)(((
float)rawmouse->lLastX / 65535.0f) *
w);
650 int y = (
int)(((
float)rawmouse->lLastY / 65535.0f) *
h);
652 if (lastMousePoint.
x == 0 && lastMousePoint.
y == 0) {
653 lastMousePoint.
x =
x;
654 lastMousePoint.
y =
y;
659 lastMousePoint.
x =
x;
660 lastMousePoint.
y =
y;
662 WIN_CheckRawMouseButtons(rawmouse->usButtonFlags,
data);
663 }
else if (isCapture) {
670 currentHnd = WindowFromPoint(pt);
671 ScreenToClient(hwnd, &pt);
672 GetClientRect(hwnd, &hwndRect);
675 if(currentHnd != hwnd || pt.x < 0 || pt.y < 0 || pt.x > hwndRect.right || pt.y > hwndRect.right) {
676 SDL_bool swapButtons = GetSystemMetrics(SM_SWAPBUTTON) != 0;
695 short amount = GET_WHEEL_DELTA_WPARAM(wParam);
696 float fAmount = (float) amount / WHEEL_DELTA;
697 if (msg == WM_MOUSEWHEEL)
707 if (!IsIconic(hwnd)) {
710 GetCursorPos(&cursorPos);
711 ScreenToClient(hwnd, &cursorPos);
733 SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam);
755 SDL_Scancode code = WindowsScanCodeToSDLScanCode(lParam, wParam);
770 if (wParam == UNICODE_NOCHAR) {
778 if (WIN_ConvertUTF32toUTF8((UINT32)wParam,
text)) {
785 #ifdef WM_INPUTLANGCHANGE
786 case WM_INPUTLANGCHANGE:
795 case WM_NCLBUTTONDOWN:
801 case WM_CAPTURECHANGED:
806 WIN_CheckAsyncMouseRelease(
data);
810 #ifdef WM_GETMINMAXINFO
811 case WM_GETMINMAXINFO:
819 BOOL constrain_max_size;
826 if (
data->expected_resize) {
831 GetWindowRect(hwnd, &
size);
844 if (max_w && max_h) {
847 constrain_max_size =
TRUE;
849 constrain_max_size =
FALSE;
853 LONG style = GetWindowLong(hwnd, GWL_STYLE);
859 BOOL menu = (style & WS_CHILDWINDOW) ?
FALSE : (GetMenu(hwnd) !=
NULL);
865 AdjustWindowRectEx(&
size, style, menu, 0);
871 info = (MINMAXINFO *) lParam;
873 info->ptMinTrackSize.x =
w + min_w;
874 info->ptMinTrackSize.y =
h + min_h;
875 if (constrain_max_size) {
876 info->ptMaxTrackSize.x =
w + max_w;
877 info->ptMaxTrackSize.y =
h + max_h;
880 info->ptMaxSize.x =
w;
881 info->ptMaxSize.y =
h;
882 info->ptMaxPosition.x =
x;
883 info->ptMaxPosition.y =
y;
884 info->ptMinTrackSize.x =
w;
885 info->ptMinTrackSize.y =
h;
886 info->ptMaxTrackSize.x =
w;
887 info->ptMaxTrackSize.y =
h;
894 case WM_WINDOWPOSCHANGING:
896 if (
data->expected_resize) {
901 case WM_WINDOWPOSCHANGED:
907 if (
data->initializing ||
data->in_border_change) {
911 if (!GetClientRect(hwnd, &
rect) || IsRectEmpty(&
rect)) {
914 ClientToScreen(hwnd, (LPPOINT) &
rect);
915 ClientToScreen(hwnd, (LPPOINT) &
rect + 1);
957 hittest = LOWORD(lParam);
958 if (hittest == HTCLIENT) {
973 ValidateRect(hwnd,
NULL);
988 if ((wParam & 0xFFF0) == SC_KEYMENU) {
992 #if defined(SC_SCREENSAVE) || defined(SC_MONITORPOWER)
994 if ((wParam & 0xFFF0) == SC_SCREENSAVE ||
995 (wParam & 0xFFF0) == SC_MONITORPOWER) {
1012 if (
data->videodata->GetTouchInputInfo &&
data->videodata->CloseTouchInputHandle) {
1013 UINT
i, num_inputs = LOWORD(wParam);
1016 if (
data->videodata->GetTouchInputInfo((HTOUCHINPUT)lParam, num_inputs, inputs,
sizeof(
TOUCHINPUT))) {
1020 if (!GetClientRect(hwnd, &
rect) ||
1027 ClientToScreen(hwnd, (LPPOINT) &
rect);
1028 ClientToScreen(hwnd, (LPPOINT) &
rect + 1);
1034 for (
i = 0;
i < num_inputs; ++
i) {
1035 PTOUCHINPUT
input = &inputs[
i];
1063 data->videodata->CloseTouchInputHandle((HTOUCHINPUT)lParam);
1071 HDROP drop = (HDROP) wParam;
1072 UINT
count = DragQueryFile(drop, 0xFFFFFFFF,
NULL, 0);
1075 UINT
size = DragQueryFile(drop,
i,
NULL, 0) + 1;
1092 case WM_DISPLAYCHANGE:
1106 NCCALCSIZE_PARAMS *
params = (NCCALCSIZE_PARAMS *)lParam;
1107 w =
data->window->windowed.w;
1108 h =
data->window->windowed.h;
1121 POINT winpoint = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
1122 if (ScreenToClient(hwnd, &winpoint)) {
1123 const SDL_Point point = { (
int) winpoint.
x, (
int) winpoint.y };
1126 #define POST_HIT_TEST(ret) { SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_HIT_TEST, 0, 0); return ret; }
1136 #undef POST_HIT_TEST
1147 if (
data->wndproc) {
1148 return CallWindowProc(
data->wndproc, hwnd, msg, wParam, lParam);
1149 }
else if (returnCode >= 0) {
1152 return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam);
1156 static void WIN_UpdateClipCursorForWindows()
1161 const Uint32 CLIPCURSOR_UPDATE_INTERVAL_MS = 3000;
1167 if (
data->skip_update_clipcursor) {
1170 }
else if ((now -
data->last_updated_clipcursor) >= CLIPCURSOR_UPDATE_INTERVAL_MS) {
1180 static void *g_WindowsMessageHookData =
NULL;
1185 g_WindowsMessageHookData = userdata;
1191 const Uint8 *keystate;
1193 DWORD start_ticks = GetTickCount();
1194 int new_messages = 0;
1197 while (PeekMessage(&msg,
NULL, 0, 0, PM_REMOVE)) {
1198 if (g_WindowsMessageHook) {
1199 g_WindowsMessageHook(g_WindowsMessageHookData, msg.hwnd, msg.message, msg.wParam, msg.lParam);
1203 TranslateMessage(&msg);
1204 DispatchMessage(&msg);
1212 const int MAX_NEW_MESSAGES = 3;
1214 if (new_messages > MAX_NEW_MESSAGES) {
1234 WIN_UpdateClipCursorForWindows();
1241 struct SDL_WIN_OSVERSIONINFOW {
1242 ULONG dwOSVersionInfoSize;
1243 ULONG dwMajorVersion;
1244 ULONG dwMinorVersion;
1245 ULONG dwBuildNumber;
1247 WCHAR szCSDVersion[128];
1251 IsWin10FCUorNewer(
void)
1253 HMODULE
handle = GetModuleHandleW(L
"ntdll.dll");
1255 typedef LONG(WINAPI* RtlGetVersionPtr)(
struct SDL_WIN_OSVERSIONINFOW*);
1256 RtlGetVersionPtr getVersionPtr = (RtlGetVersionPtr)GetProcAddress(
handle,
"RtlGetVersion");
1257 if (getVersionPtr !=
NULL) {
1258 struct SDL_WIN_OSVERSIONINFOW info;
1260 info.dwOSVersionInfoSize =
sizeof(info);
1261 if (getVersionPtr(&info) == 0) {
1262 if ((info.dwMajorVersion == 10 && info.dwMinorVersion == 0 && info.dwBuildNumber >= 16299) ||
1263 (info.dwMajorVersion == 10 && info.dwMinorVersion > 0) ||
1264 (info.dwMajorVersion > 10))
1274 static int app_registered = 0;
1285 TCHAR
path[MAX_PATH];
1288 if (app_registered) {
1294 #if defined(CS_BYTEALIGNCLIENT) || defined(CS_OWNDC)
1307 wcex.cbSize =
sizeof(WNDCLASSEX);
1308 wcex.hCursor =
NULL;
1310 wcex.hIconSm =
NULL;
1311 wcex.lpszMenuName =
NULL;
1314 wcex.hbrBackground =
NULL;
1317 wcex.cbClsExtra = 0;
1318 wcex.cbWndExtra = 0;
1321 if (hint && *hint) {
1325 if (hint && *hint) {
1331 ExtractIconEx(
path, 0, &wcex.hIcon, &wcex.hIconSm, 1);
1334 if (!RegisterClassEx(&wcex)) {
1335 return SDL_SetError(
"Couldn't register application class");
1338 isWin10FCUorNewer = IsWin10FCUorNewer();
1351 if (!app_registered) {
1355 if (app_registered == 0) {
1359 if (wcex.hIcon) DestroyIcon(wcex.hIcon);
1360 if (wcex.hIconSm) DestroyIcon(wcex.hIconSm);
#define SDL_assert(condition)
int SDL_SendDropFile(SDL_Window *window, const char *file)
int SDL_SendDropComplete(SDL_Window *window)
#define SDL_GetWindowSize
#define SDL_GetMouseState
#define SDL_GetWindowFlags
#define SDL_GetKeyboardFocus
#define SDL_GetWindowMinimumSize
#define SDL_GetWindowMaximumSize
#define SDL_GetKeyboardState
#define SDL_GetMouseFocus
#define SDL_GetHintBoolean
#define SDL_IsShapedWindow
int SDL_SendKeymapChangedEvent(void)
int SDL_SendSysWMEvent(SDL_SysWMmsg *message)
#define SDL_GetEventState(type)
#define SDL_HINT_WINDOWS_INTRESOURCE_ICON
A variable to specify custom icon resource id from RC file on Windows platform.
#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH
Allow mouse click events when clicking to focus an SDL window.
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4
Tell SDL not to generate window-close events for Alt+F4 on Windows.
#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL
#define SDL_small_alloc(type, count, pisstack)
#define SDL_small_free(ptr, isstack)
void SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle)
void SDL_SetKeyboardFocus(SDL_Window *window)
int SDL_SendKeyboardText(const char *text)
int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode)
int SDL_RegisterApp(char *name, Uint32 style, void *hInst)
void SDL_UnregisterApp(void)
int SDL_SendMouseButton(SDL_Window *window, SDL_MouseID mouseID, Uint8 state, Uint8 button)
SDL_Mouse * SDL_GetMouse(void)
void SDL_SetMouseFocus(SDL_Window *window)
int SDL_SendMouseWheel(SDL_Window *window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction)
int SDL_SendMouseMotion(SDL_Window *window, SDL_MouseID mouseID, int relative, int x, int y)
#define SDL_BUTTON_MIDDLE
#define SDL_BUTTON_X1MASK
#define SDL_BUTTON_X2MASK
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLint GLint GLint x
GLuint GLsizei const GLchar * message
GLuint const GLchar * name
GLsizei const GLchar *const * path
GLenum GLenum GLenum input
GLfloat GLfloat GLfloat GLfloat h
GLubyte GLubyte GLubyte GLubyte w
SDL_Scancode
The SDL keyboard scancode representation.
@ SDL_SCANCODE_NONUSBACKSLASH
@ SDL_SCANCODE_AC_REFRESH
@ SDL_SCANCODE_NUMLOCKCLEAR
@ SDL_SCANCODE_PRINTSCREEN
@ SDL_SCANCODE_AC_BOOKMARKS
@ SDL_SCANCODE_KP_MULTIPLY
@ SDL_SCANCODE_VOLUMEDOWN
@ SDL_SCANCODE_MEDIASELECT
@ SDL_SCANCODE_AC_FORWARD
void(* SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam)
Set a function that is called for every windows message, before TranslateMessage()
void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata)
SDL_VideoDevice * SDL_GetVideoDevice(void)
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
#define SDL_TICKS_PASSED(A, B)
Compare SDL ticks values, and return true if A has passed B.
int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, SDL_bool down, float x, float y, float pressure)
int SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name)
int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window, float x, float y, float pressure)
@ SDL_TOUCH_DEVICE_DIRECT
#define SDL_TOUCH_MOUSEID
#define SDL_VERSION(x)
Macro to determine SDL version program was compiled against.
static SDL_VideoDevice * _this
SDL_HitTestResult
Possible return values from the SDL_HitTest callback.
@ SDL_HITTEST_RESIZE_LEFT
@ SDL_HITTEST_RESIZE_TOPRIGHT
@ SDL_HITTEST_RESIZE_BOTTOM
@ SDL_HITTEST_RESIZE_BOTTOMRIGHT
@ SDL_HITTEST_RESIZE_BOTTOMLEFT
@ SDL_HITTEST_RESIZE_RIGHT
@ SDL_HITTEST_RESIZE_TOPLEFT
@ SDL_WINDOW_MOUSE_CAPTURE
@ SDL_WINDOWEVENT_RESIZED
@ SDL_WINDOWEVENT_MINIMIZED
@ SDL_WINDOWEVENT_MAXIMIZED
@ SDL_WINDOWEVENT_RESTORED
@ SDL_WINDOWEVENT_EXPOSED
int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, int data2)
#define WIN_UTF8ToString(S)
#define WIN_StringToUTF8(S)
void WIN_CheckClipboardUpdate(struct SDL_VideoData *data)
LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
void WIN_PumpEvents(_THIS)
void WIN_ResetDeadKeys(void)
SDL_bool IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, struct SDL_VideoData *videodata)
void WIN_UpdateKeymap(void)
void WIN_RefreshDisplays(_THIS)
int Win32_ResizeWindowShape(SDL_Window *window)
SDL_bool g_WindowFrameUsableWhileCursorHidden
SDL_bool g_WindowsEnableMessageLoop
void WIN_UpdateClipCursor(SDL_Window *window)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
EGLImageKHR EGLint EGLint * handle
EGLSurface EGLNativeWindowType * window
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
static const SDL_Scancode windows_scancode_table[]
SDL_bool relative_mode_warp
SDL_bool touch_mouse_events
SDL_bool was_touch_mouse_events
The structure that defines a point (integer)
union SDL_SysWMmsg::@8 msg
The type used to identify a window.
static char text[MAX_TEXT_LENGTH]
static Uint32 callback(Uint32 interval, void *param)
struct HINSTANCE__ * HINSTANCE
typedef int(__stdcall *FARPROC)()