38 return (x <= ppt->
x) && (ppt->x <
x +
cx) && (y <= ppt->
y) && (ppt->y <
y +
cy);
119#define T1_CLASSNAMEW L"SoftKBDClsT1"
122#define DEFINE_T1K(t1k_code, virtual_key_code, t1k_code_name, virtual_key_name, is_special) \
123 t1k_code_name = t1k_code,
132#define DEFINE_T1K(t1k_code, virtual_key_code, t1k_code_name, virtual_key_name, is_special) \
166#define T1_KEYPOS(iKey) pT1->KeyPos[iKey]
208 ptm->tmMaxCharWidth = textSize.
cx;
218 LONG cxLarge, cyLarge;
219 LONG xKey1, yKey1, xKey2, yKey2, xKey3, yKey3;
220 LONG yKey4, xKey4, xKey5, yKey5, xKey6, xKey7;
225 cxLarge = (3 *
tm.tmMaxCharWidth + 18) / 2;
226 cyLarge =
tm.tmHeight + 8;
229 pT1->cxDefWidth = (2 *
tm.tmMaxCharWidth + 12) / 2;
230 pT1->cxWidth47 = (2 *
tm.tmMaxCharWidth + 12) / 2 + 1;
231 pT1->cxWidth49 = (4 *
tm.tmMaxCharWidth + 24) / 2 + 3;
232 pT1->cxWidth51or52 = (5 *
tm.tmMaxCharWidth + 30) / 2 + 5;
233 pT1->cxWidth58 = 4 * (3 *
tm.tmMaxCharWidth + 18) / 2 + 15;
234 pT1->cxWidth48 = pT1->cxWidth50 = cxLarge + 2;
235 pT1->cxWidth53or54 = pT1->cxWidth55or56 = cxLarge + 2;
236 pT1->cyHeight50 = 2 * (
tm.tmHeight + 8) + 3;
237 pT1->cxWidth57 = cxLarge + 1;
238 pT1->cyDefHeight = cyLarge;
243 for (iKey = 0; iKey < T1K_Q; ++iKey)
247 xKey1 += pT1->cxDefWidth + 3;
254 yKey2 = 3 + yKey1 + cyLarge;
257 for (iKey = T1K_Q; iKey < T1K_A; ++iKey)
261 xKey2 += pT1->cxDefWidth + 3;
268 yKey3 = yKey2 + cyLarge + 3;
271 for (iKey = T1K_A; iKey < T1K_Z; ++iKey)
275 xKey3 += pT1->cxDefWidth + 3;
280 yKey4 = yKey3 + cyLarge + 3;
283 for (iKey = T1K_Z; iKey < T1K_BACKSPACE; ++iKey)
287 xKey4 += pT1->cxDefWidth + 3;
296 T1_KEYPOS(T1K_L_ALT).x = xKey5 + pT1->cxWidth57 + 3;
298 yKey5 = yKey4 + cyLarge + 3;
302 xKey6 = xKey5 + pT1->cxWidth57 + 3 + pT1->cxWidth55or56 + 3;
305 xKey7 = xKey6 + pT1->cxWidth58 + 3;
307 T1_KEYPOS(T1K_R_CTRL).x = xKey7 + pT1->cxWidth57 + pT1->cxWidth55or56 + 6;
356 for (iKey = 0; iKey < T1K_BACKSPACE; ++iKey)
393 pT1->cxWidth53or54, pT1->cyDefHeight);
395 pT1->cxWidth53or54 / 2 +
T1_KEYPOS(T1K_L_CTRL).
x - 8,
396 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_L_CTRL).
y - 4,
402 pT1->cxWidth53or54, pT1->cyDefHeight);
404 pT1->cxWidth53or54 / 2 +
T1_KEYPOS(T1K_R_CTRL).
x - 8,
405 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_R_CTRL).
y - 4,
411 pT1->cxWidth57, pT1->cyDefHeight);
413 pT1->cxWidth57 / 2 +
T1_KEYPOS(T1K_ESCAPE).
x - 9,
414 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_ESCAPE).
y - 4,
420 pT1->cxWidth55or56, pT1->cyDefHeight);
422 pT1->cxWidth55or56 / 2 +
T1_KEYPOS(T1K_L_ALT).
x - 8,
423 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_L_ALT).
y - 4,
429 pT1->cxWidth55or56, pT1->cyDefHeight);
431 pT1->cxWidth55or56 / 2 +
T1_KEYPOS(T1K_R_ALT).
x - 8,
432 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_R_ALT).
y - 4,
438 pT1->cxWidth58, pT1->cyDefHeight);
443 pT1->cxWidth51or52, pT1->cyDefHeight);
445 pT1->cxWidth51or52 / 2 +
T1_KEYPOS(T1K_L_SHIFT).
x - 11,
446 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_L_SHIFT).
y - 4,
452 pT1->cxWidth51or52, pT1->cyDefHeight);
454 pT1->cxWidth51or52 / 2 +
T1_KEYPOS(T1K_R_SHIFT).
x - 11,
455 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_R_SHIFT).
y - 4,
461 pT1->cxWidth49, pT1->cyDefHeight);
463 pT1->cxWidth49 / 2 +
T1_KEYPOS(T1K_CAPS).
x - 11,
464 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_CAPS).
y - 4,
470 pT1->cxWidth48, pT1->cyDefHeight);
472 pT1->cxWidth48 / 2 +
T1_KEYPOS(T1K_TAB).
x - 8,
473 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_TAB).
y - 4,
479 pT1->cxWidth50, pT1->cyHeight50);
481 pT1->cxWidth50 / 2 +
T1_KEYPOS(T1K_ENTER).
x - 13,
482 pT1->cyHeight50 / 2 +
T1_KEYPOS(T1K_ENTER).
y - 4,
488 pT1->cxWidth47, pT1->cyDefHeight);
490 pT1->cxWidth47 / 2 +
T1_KEYPOS(T1K_BACKSPACE).
x - 8,
491 pT1->cyDefHeight / 2 +
T1_KEYPOS(T1K_BACKSPACE).
y - 4,
495 for (iKey = 0; iKey < T1K_BACKSPACE; ++iKey)
540 INT x = ppt1->x - ppt2->x,
y = ppt1->y - ppt2->y;
565 if (!hGlobal || !pT1)
568 if (pT1->
pt1.
x != -1 && pT1->
pt1.
y != -1)
587 INT cxWidth = pT1->cxDefWidth, cyHeight = pT1->cyDefHeight;
590 if (iPressed >= T1K_NONE)
598 if (iPressed >= T1K_BACKSPACE)
603 cxWidth = pT1->cxWidth47;
606 cxWidth = pT1->cxWidth48;
609 cxWidth = pT1->cxWidth50;
610 cyHeight = pT1->cyHeight50;
613 cxWidth = pT1->cxWidth57;
616 cxWidth = pT1->cxWidth58;
629 cxWidth + 2, cyHeight + 2,
649 if (!hGlobal || !pT1)
670 for (iKey = 0; iKey < T1K_BACKSPACE; ++iKey)
673 if (
Imm32PtInRect(ppt, pptKey->
x, pptKey->
y, pT1->cxDefWidth, pT1->cyDefHeight))
678 return T1K_BACKSPACE;
721 if (iKey < T1K_BACKSPACE)
722 return !!pT1->chKeyChar[iKey];
723 return iKey <= T1K_TAB || iKey == T1K_ENTER || (T1K_ESCAPE <= iKey && iKey <= T1K_SPACE);
743 if (!hGlobal || !pT1)
746 if (pT1->
pt1.
x != -1 && pT1->
pt1.
y != -1)
757 if (iKey >= T1K_NONE)
768 if (iPressed < T1K_NONE)
776 if (iKey >= T1K_NONE)
811 if (!hGlobal || !pT1)
814 if (pT1->
pt1.
x != -1 && pT1->
pt1.
y != -1)
838 if (hwndCapture ==
hWnd)
843 if (!hGlobal || !pT1)
847 if (iPressed >= T1K_NONE)
849 if (pT1->
pt1.
x != -1 && pT1->
pt1.
y != -1)
903 if (!hGlobal || !pT1)
928 for (iKey = 0; iKey < T1K_BACKSPACE; ++iKey)
996 TRACE(
"IMC_GETSOFTKBDPOS\n");
1006 TRACE(
"IMC_SETSOFTKBDPOS(%ld, %ld)\n",
pt.x,
pt.y);
1031 TRACE(
"IMC_GETSOFTKBDSUBTYPE/IMC_SETSOFTKBDSUBTYPE\n");
1034 if (!hGlobal || !pT1)
1128#define C1_CLASSNAMEW L"SoftKBDClsC1"
1133#define DEFINE_C1K(c1k_code, virtual_key_code, c1k_code_name, virtual_key_name, is_special) \
1134 c1k_code_name = c1k_code,
1143#define DEFINE_C1K(c1k_code, virtual_key_code, c1k_code_name, virtual_key_name, is_special) \
1164#define FLAG_SHIFT_PRESSED 1
1165#define FLAG_DRAGGING 2
1166#define FLAG_PRESSED 4
1177 for (iKey = C1K_OEM_3; iKey < C1K_Q; ++iKey)
1191 for (; iKey < C1K_A; ++iKey)
1203 for (; iKey < C1K_Z; ++iKey)
1217 for (; iKey < C1K_BACKSPACE; ++iKey)
1278 case C1K_BACKSPACE:
case C1K_TAB:
1281 case C1K_CAPS:
case C1K_ENTER:
1287 case C1K_INSERT:
case C1K_DELETE:
case C1K_ESCAPE:
1316 for (iKey = C1K_OEM_3; iKey < C1K_BACKSPACE; ++iKey)
1319 hMemDC, iKey * 8, 0,
SRCCOPY);
1342 for (iKey = C1K_OEM_3; iKey < C1K_BACKSPACE; ++iKey)
1438 if (!hGlobal || !pC1)
1469 if (
pData->uCount != 2)
1476 if (!hGlobal || !pC1)
1492 for (iKey = C1K_OEM_3; iKey < C1K_BACKSPACE; ++iKey)
1499 for (iKey = C1K_OEM_3; iKey < C1K_BACKSPACE; ++iKey)
1506 bDisabled = (pC1->
Data[0][iKey] == 0);
1515 bDisabled = (pC1->
Data[1][iKey] == 0);
1551 x = ppt1->x - ppt2->x;
1552 y = ppt1->y - ppt2->y;
1553 if (
x < rcWork.
left)
1565 ppt2->x = ppt1->x -
x;
1566 ppt2->y = ppt1->y -
y;
1582 for (iKey = C1K_OEM_3; iKey < C1K_BACKSPACE; ++iKey)
1589 return C1K_BACKSPACE;
1623 iPressedKey = pC1->iPressedKey;
1624 if (iPressedKey == -1)
1631 if (iPressedKey < C1K_BACKSPACE)
1633 wch = pC1->Data[!(pC1->dwFlags & 1)][iPressedKey];
1637 pC1->iPressedKey = -1;
1670 if (!hGlobal || !pC1)
1722 if (!hGlobal || !pC1)
1784 if (!hGlobal || !pC1)
1791 pC1->
dwFlags &= ~FLAG_DRAGGING;
1827 if (iKey == C1K_SHIFT)
1832 pC1->
dwFlags &= ~FLAG_PRESSED;
1869 pC1->
dwFlags &= ~FLAG_SHIFT_PRESSED;
1875 pC1->
dwFlags &= ~FLAG_PRESSED;
1891 if (!hGlobal || !pC1)
1941 if (!hGlobal || !pC1)
1950 TRACE(
"IMC_GETSOFTKBDPOS\n");
1958 TRACE(
"IMC_SETSOFTKBDPOS: %d, %d\n",
pt.x,
pt.y);
1969 if (!hGlobal || !pC1)
2060 wcx.
cbSize =
sizeof(wcx);
2118 INT xSoftKBD, ySoftKBD, cxSoftKBD, cySoftKBD, cxEdge, cyEdge;
2128 ERR(
"uType: %u\n", uType);
2144 ERR(
"UICaps: 0x%X\n", UICaps);
2151 for (iVK = 0; iVK < 0xFF; ++iVK)
2195 xSoftKBD, ySoftKBD, cxSoftKBD, cySoftKBD,
2214 TRACE(
"(%p, %d)\n", hwndSoftKBD, nCmdShow);
2217 WARN(
"nCmdShow %d is unexpected\n", nCmdShow);
2219 return hwndSoftKBD &&
ShowWindow(hwndSoftKBD, nCmdShow);
2231 TRACE(
"(%p)\n", hwndSoftKBD);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void CharSet(RTF_Info *info)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Height *Stride) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Stride)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
PIMEDPI WINAPI ImmLockImeDpi(_In_ HKL hKL)
VOID WINAPI ImmUnlockImeDpi(_Inout_opt_ PIMEDPI pImeDpi)
#define SOFTKEYBOARD_TYPE_C1
#define SOFTKEYBOARD_TYPE_T1
#define IMC_SETSOFTKBDDATA
#define IMC_SETSOFTKBDFONT
LPINPUTCONTEXT WINAPI ImmLockIMC(_In_ HIMC hIMC)
#define IMC_GETSOFTKBDSUBTYPE
#define IMC_GETSOFTKBDPOS
#define IMC_SETSOFTKBDSUBTYPE
#define IMN_SOFTKBDDESTROYED
BOOL WINAPI ImmUnlockIMC(_In_ HIMC hIMC)
#define IMC_SETSOFTKBDPOS
#define IMC_GETSOFTKBDFONT
static ERESOURCE GlobalLock
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
#define WS_EX_DLGMODALFRAME
_Out_opt_ int _Out_opt_ int * cy
static void C1_OnButtonDown(_In_ HWND hWnd, _Inout_ PC1WINDOW pC1)
struct tagSOFTKBDDATAEX * PSOFTKBDDATAEX
static void C1_InitBitmap(_In_ HDC hDC, _In_ INT x, _In_ INT y, _In_ INT width, _In_ INT height)
static POINT gptRaiseEdge
#define FLAG_SHIFT_PRESSED
static BOOL T1_IsValidButton(_In_ UINT iKey, _In_ const T1WINDOW *pT1)
static POINT gptC1ButtonPos[C1K_MAX]
struct tagSOFTKBDDATAEX SOFTKBDDATAEX
static void C1_DrawDragBorder(_In_ HWND hWnd, _In_ LPPOINT ppt1, _Inout_ LPPOINT ppt2)
static BOOL C1_OnButtonUp(_In_ HWND hWnd, _In_ WPARAM wParam, _In_ LPARAM lParam)
static BOOL C1_OnSetCursor(_In_ HWND hWnd, _In_ LPARAM lParam)
static BOOL gbC1ButtonInit
static LRESULT T1_OnImeControl(_In_ HWND hWnd, _Inout_ WPARAM wParam, _Inout_ LPARAM lParam)
static void T1_DrawDragBorder(_In_ HWND hWnd, _In_ const POINT *ppt1, _In_ const POINT *ppt2)
static void C1_OnDraw(_In_ HDC hDC, _In_ HWND hWnd)
static void C1_InitButtonPos(void)
static BOOL T1_OnSetCursor(_In_ HWND hWnd, _In_ LPARAM lParam)
static BOOL Imm32RegisterSoftKeyboard(_In_ UINT uType)
static void Imm32GetSoftKeyboardDimension(_In_ UINT uType, _Out_ LPINT pcx, _Out_ LPINT pcy)
struct C1WINDOW * PC1WINDOW
static void T1_GetTextMetric(_Out_ LPTEXTMETRICW ptm)
BOOL WINAPI ImmDestroySoftKeyboard(_In_ HWND hwndSoftKBD)
const BYTE gC1K2VK[C1K_MAX]
static UINT guScanCode[256]
static void C1_OnDestroy(_In_ HWND hWnd)
static BOOL C1_OnMouseMove(_In_ HWND hWnd, _In_ WPARAM wParam, _In_ LPARAM lParam)
static LRESULT CALLBACK T1_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static INT T1_OnCreate(_In_ HWND hWnd)
static void C1_InvertButton(_In_ HDC hDC, _In_ INT iKey)
static LOGFONTW g_T1LogFont
static void T1_DrawLabels(_In_ HDC hDC, _In_ const T1WINDOW *pT1, _In_ LPCWSTR pszBmpName)
static BOOL C1_SetData(_In_ HWND hWnd, _In_ const SOFTKBDDATA *pData)
static BOOL T1_OnButtonUp(_In_ HWND hWnd)
static void T1_OnDraw(_In_ HDC hDC, _In_ HWND hWnd)
static BOOL T1_OnMouseMove(_In_ HWND hWnd)
static LRESULT C1_OnImeControl(_In_ HWND hWnd, _In_ WPARAM wParam, _In_ LPARAM lParam)
static void Imm32DrawBitmap(_In_ HDC hdc, _In_ INT x, _In_ INT y, _In_ INT width, _In_ INT height, _In_ INT nBitmapID)
static BOOL g_bWantSoftKBDMetrics
static void T1_InitBitmap(_In_ HWND hWnd, _Inout_ PT1WINDOW pT1)
static BOOL Imm32GetNearestWorkArea(_In_opt_ HWND hwnd, _Out_ LPRECT prcWork)
const BYTE gT1K2VK[T1K_MAX]
HWND WINAPI ImmCreateSoftKeyboard(_In_ UINT uType, _In_ HWND hwndParent, _In_ INT x, _In_ INT y)
static void T1_InvertButton(_In_ HWND hWnd, _In_ HDC hDC, _In_ const T1WINDOW *pT1, _In_ UINT iPressed)
static UINT T1_HitTest(_In_ const T1WINDOW *pT1, _In_ const POINT *ppt)
static void T1_DrawConvexRect(_In_ HDC hDC, _In_ INT x, _In_ INT y, _In_ INT width, _In_ INT height)
static VOID Imm32GetAllMonitorSize(_Out_ LPRECT prcWork)
static void C1_DrawConvexRect(_In_ HDC hDC, _In_ INT x, _In_ INT y, _In_ INT width, _In_ INT height)
static BOOL Imm32PtInRect(_In_ const POINT *ppt, _In_ LONG x, _In_ LONG y, _In_ LONG cx, _In_ LONG cy)
static void T1_OnDestroy(_In_ HWND hWnd)
static LRESULT CALLBACK C1_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void T1_InitButtonPos(_Out_ PT1WINDOW pT1)
static INT C1_OnCreate(_In_ HWND hWnd)
static INT C1_HitTest(_In_ const POINT *ppt)
static LRESULT T1_SetData(_In_ HWND hWnd, _In_ const SOFTKBDDATA *pData)
struct T1WINDOW * PT1WINDOW
BOOL WINAPI ImmShowSoftKeyboard(_In_ HWND hwndSoftKBD, _In_ INT nCmdShow)
static void C1_DrawLabel(_In_ HDC hDC, _In_ INT nBitmapID)
static INT Imm32Clamp(_In_ INT x, _In_ INT xMin, _In_ INT xMax)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
WCHAR lfFaceName[LF_FACESIZE]
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
#define IS_NULL_UNEXPECTEDLY(p)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
struct tagLOGFONTW * LPLOGFONTW
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define OUT_TT_ONLY_PRECIS
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI GetTextFaceW(_In_ HDC hdc, _In_ int c, _Out_writes_to_opt_(c, return) LPWSTR lpName)
#define CHINESEBIG5_CHARSET
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
#define CLIP_DEFAULT_PRECIS
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI GetTextExtentPoint32W(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE psizl)
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
#define SM_CYVIRTUALSCREEN
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI ReleaseCapture(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
#define SW_SHOWNOACTIVATE
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
HWND WINAPI GetCapture(void)
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
BOOL WINAPI MessageBeep(_In_ UINT uType)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define SM_CXVIRTUALSCREEN
UINT WINAPI MapVirtualKeyW(_In_ UINT, _In_ UINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define MAKELRESULT(l, h)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
HDC WINAPI GetDC(_In_opt_ HWND)
VOID WINAPI keybd_event(_In_ BYTE, _In_ BYTE, _In_ DWORD, _In_ ULONG_PTR)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HWND WINAPI GetParent(_In_ HWND)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
#define SM_XVIRTUALSCREEN
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SetWindowLongPtrW
#define POINTSTOPOINT(p, ps)
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SM_YVIRTUALSCREEN
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)