Commit 34408796 authored by Louis Lenders's avatar Louis Lenders Committed by Alexandre Julliard

user32: Added GetPointerType stub.

parent 081fd1e9
......@@ -17,7 +17,7 @@
@ stub GetPointerPenInfoHistory
@ stub GetPointerTouchInfo
@ stub GetPointerTouchInfoHistory
@ stub GetPointerType
@ stdcall GetPointerType(long ptr) user32.GetPointerType
@ stub GetRawPointerDeviceData
@ stub InitializeTouchInjection
@ stub InjectTouchInput
......
......@@ -664,6 +664,22 @@ BOOL WINAPI RegisterTouchHitTestingWindow(HWND hwnd, ULONG value)
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};
const struct builtin_class_descr IME_builtin_class =
......
......@@ -78,6 +78,7 @@ static struct {
static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t);
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 UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT);
static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *);
......@@ -165,6 +166,7 @@ static void init_function_pointers(void)
GET_PROC(SendInput);
GET_PROC(GetCurrentInputMessageSource);
GET_PROC(GetMouseMovePointsEx);
GET_PROC(GetPointerType);
GET_PROC(GetRawInputDeviceList);
GET_PROC(GetRawInputDeviceInfoW);
GET_PROC(GetRawInputDeviceInfoA);
......@@ -2800,6 +2802,31 @@ static void test_input_message_source(void)
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)
{
POINT pos;
......@@ -2845,4 +2872,9 @@ START_TEST(input)
win_skip("GetCurrentInputMessageSource is not available\n");
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 GetPhysicalCursorPos(ptr)
@ stdcall GetPointerDevices(ptr ptr)
@ stdcall GetPointerType(long ptr)
@ stdcall GetPriorityClipboardFormat(ptr long)
@ stdcall GetProcessDefaultLayout(ptr)
@ stdcall GetProcessDpiAwarenessInternal(long ptr)
......
......@@ -3833,6 +3833,7 @@ WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND,HWND,BOOL);
WINUSERAPI HWND WINAPI GetOpenClipboardWindow(void);
WINUSERAPI HWND WINAPI GetParent(HWND);
WINUSERAPI BOOL WINAPI GetPhysicalCursorPos(POINT*);
WINUSERAPI BOOL WINAPI GetPointerType(UINT32,POINTER_INPUT_TYPE *);
WINUSERAPI INT WINAPI GetPriorityClipboardFormat(UINT*,INT);
WINUSERAPI BOOL WINAPI GetProcessDefaultLayout(DWORD*);
WINUSERAPI BOOL WINAPI GetProcessDpiAwarenessInternal(HANDLE,DPI_AWARENESS*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment