user32: Added GetPointerType stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45765 Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
081fd1e997
commit
34408796b9
|
@ -17,7 +17,7 @@
|
||||||
@ stub GetPointerPenInfoHistory
|
@ stub GetPointerPenInfoHistory
|
||||||
@ stub GetPointerTouchInfo
|
@ stub GetPointerTouchInfo
|
||||||
@ stub GetPointerTouchInfoHistory
|
@ stub GetPointerTouchInfoHistory
|
||||||
@ stub GetPointerType
|
@ stdcall GetPointerType(long ptr) user32.GetPointerType
|
||||||
@ stub GetRawPointerDeviceData
|
@ stub GetRawPointerDeviceData
|
||||||
@ stub InitializeTouchInjection
|
@ stub InitializeTouchInjection
|
||||||
@ stub InjectTouchInput
|
@ stub InjectTouchInput
|
||||||
|
|
|
@ -664,6 +664,22 @@ BOOL WINAPI RegisterTouchHitTestingWindow(HWND hwnd, ULONG value)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* GetPointerType [USER32.@]
|
||||||
|
*/
|
||||||
|
BOOL WINAPI GetPointerType(UINT32 id, POINTER_INPUT_TYPE *type)
|
||||||
|
{
|
||||||
|
FIXME("(%d %p): stub\n", id, type);
|
||||||
|
|
||||||
|
if(!id || !type)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*type = PT_MOUSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static const WCHAR imeW[] = {'I','M','E',0};
|
static const WCHAR imeW[] = {'I','M','E',0};
|
||||||
const struct builtin_class_descr IME_builtin_class =
|
const struct builtin_class_descr IME_builtin_class =
|
||||||
|
|
|
@ -78,6 +78,7 @@ static struct {
|
||||||
|
|
||||||
static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
|
static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
|
||||||
static BOOL (WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *source );
|
static BOOL (WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *source );
|
||||||
|
static BOOL (WINAPI *pGetPointerType)(UINT32, POINTER_INPUT_TYPE*);
|
||||||
static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD);
|
static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD);
|
||||||
static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT);
|
static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT);
|
||||||
static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *);
|
static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *);
|
||||||
|
@ -165,6 +166,7 @@ static void init_function_pointers(void)
|
||||||
GET_PROC(SendInput);
|
GET_PROC(SendInput);
|
||||||
GET_PROC(GetCurrentInputMessageSource);
|
GET_PROC(GetCurrentInputMessageSource);
|
||||||
GET_PROC(GetMouseMovePointsEx);
|
GET_PROC(GetMouseMovePointsEx);
|
||||||
|
GET_PROC(GetPointerType);
|
||||||
GET_PROC(GetRawInputDeviceList);
|
GET_PROC(GetRawInputDeviceList);
|
||||||
GET_PROC(GetRawInputDeviceInfoW);
|
GET_PROC(GetRawInputDeviceInfoW);
|
||||||
GET_PROC(GetRawInputDeviceInfoA);
|
GET_PROC(GetRawInputDeviceInfoA);
|
||||||
|
@ -2800,6 +2802,31 @@ static void test_input_message_source(void)
|
||||||
UnregisterClassA( cls.lpszClassName, GetModuleHandleA(0) );
|
UnregisterClassA( cls.lpszClassName, GetModuleHandleA(0) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_GetPointerType(void)
|
||||||
|
{
|
||||||
|
BOOL ret;
|
||||||
|
POINTER_INPUT_TYPE type = -1;
|
||||||
|
UINT id = 0;
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
ret = pGetPointerType(id, NULL);
|
||||||
|
ok(!ret, "GetPointerType should have failed.\n");
|
||||||
|
ok(GetLastError() == ERROR_INVALID_PARAMETER,
|
||||||
|
"expected error ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
ret = pGetPointerType(id, &type);
|
||||||
|
ok(GetLastError() == ERROR_INVALID_PARAMETER,
|
||||||
|
"expected error ERROR_INVALID_PARAMETER, got %u.\n", GetLastError());
|
||||||
|
ok(!ret, "GetPointerType failed, got type %d for %u.\n", type, id );
|
||||||
|
ok(type == -1, " type %d\n", type );
|
||||||
|
|
||||||
|
id = 1;
|
||||||
|
ret = pGetPointerType(id, &type);
|
||||||
|
ok(ret, "GetPointerType failed, got type %d for %u.\n", type, id );
|
||||||
|
ok(type == PT_MOUSE, " type %d\n", type );
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(input)
|
START_TEST(input)
|
||||||
{
|
{
|
||||||
POINT pos;
|
POINT pos;
|
||||||
|
@ -2845,4 +2872,9 @@ START_TEST(input)
|
||||||
win_skip("GetCurrentInputMessageSource is not available\n");
|
win_skip("GetCurrentInputMessageSource is not available\n");
|
||||||
|
|
||||||
SetCursorPos( pos.x, pos.y );
|
SetCursorPos( pos.x, pos.y );
|
||||||
|
|
||||||
|
if(pGetPointerType)
|
||||||
|
test_GetPointerType();
|
||||||
|
else
|
||||||
|
win_skip("GetPointerType is not available\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,6 +356,7 @@
|
||||||
@ stdcall GetParent(long)
|
@ stdcall GetParent(long)
|
||||||
@ stdcall GetPhysicalCursorPos(ptr)
|
@ stdcall GetPhysicalCursorPos(ptr)
|
||||||
@ stdcall GetPointerDevices(ptr ptr)
|
@ stdcall GetPointerDevices(ptr ptr)
|
||||||
|
@ stdcall GetPointerType(long ptr)
|
||||||
@ stdcall GetPriorityClipboardFormat(ptr long)
|
@ stdcall GetPriorityClipboardFormat(ptr long)
|
||||||
@ stdcall GetProcessDefaultLayout(ptr)
|
@ stdcall GetProcessDefaultLayout(ptr)
|
||||||
@ stdcall GetProcessDpiAwarenessInternal(long ptr)
|
@ stdcall GetProcessDpiAwarenessInternal(long ptr)
|
||||||
|
|
|
@ -3833,6 +3833,7 @@ WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND,HWND,BOOL);
|
||||||
WINUSERAPI HWND WINAPI GetOpenClipboardWindow(void);
|
WINUSERAPI HWND WINAPI GetOpenClipboardWindow(void);
|
||||||
WINUSERAPI HWND WINAPI GetParent(HWND);
|
WINUSERAPI HWND WINAPI GetParent(HWND);
|
||||||
WINUSERAPI BOOL WINAPI GetPhysicalCursorPos(POINT*);
|
WINUSERAPI BOOL WINAPI GetPhysicalCursorPos(POINT*);
|
||||||
|
WINUSERAPI BOOL WINAPI GetPointerType(UINT32,POINTER_INPUT_TYPE *);
|
||||||
WINUSERAPI INT WINAPI GetPriorityClipboardFormat(UINT*,INT);
|
WINUSERAPI INT WINAPI GetPriorityClipboardFormat(UINT*,INT);
|
||||||
WINUSERAPI BOOL WINAPI GetProcessDefaultLayout(DWORD*);
|
WINUSERAPI BOOL WINAPI GetProcessDefaultLayout(DWORD*);
|
||||||
WINUSERAPI BOOL WINAPI GetProcessDpiAwarenessInternal(HANDLE,DPI_AWARENESS*);
|
WINUSERAPI BOOL WINAPI GetProcessDpiAwarenessInternal(HANDLE,DPI_AWARENESS*);
|
||||||
|
|
Loading…
Reference in New Issue