From: Paul Gofman pgofman@codeweavers.com
--- dlls/user32/misc.c | 8 ++++++++ dlls/user32/tests/input.c | 13 +++++++++++-- dlls/user32/user32.spec | 1 + 3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index 879e8b32a0f..497d40e9dc6 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -501,6 +501,14 @@ BOOL WINAPI GetPointerType(UINT32 id, POINTER_INPUT_TYPE *type) return TRUE; }
+BOOL WINAPI GetPointerInfo(UINT32 id, POINTER_INFO *info) +{ + FIXME("(%d %p): stub\n", id, info); + + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; +} + LRESULT WINAPI ImeWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { if (!imm_ime_wnd_proc) return DefWindowProcA(hwnd, msg, wParam, lParam); diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 09e1ca1f961..86c88520eeb 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -83,6 +83,7 @@ static struct {
static BOOL (WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *source ); static BOOL (WINAPI *pGetPointerType)(UINT32, POINTER_INPUT_TYPE*); +static BOOL (WINAPI *pGetPointerInfo)(UINT32, POINTER_INFO*); static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD); static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT); static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *); @@ -150,6 +151,7 @@ static void init_function_pointers(void)
GET_PROC(GetCurrentInputMessageSource); GET_PROC(GetMouseMovePointsEx); + GET_PROC(GetPointerInfo); GET_PROC(GetPointerType); GET_PROC(GetRawInputDeviceList); GET_PROC(GetRawInputDeviceInfoW); @@ -4440,10 +4442,11 @@ static void test_input_message_source(void) UnregisterClassA( cls.lpszClassName, GetModuleHandleA(0) ); }
-static void test_GetPointerType(void) +static void test_pointer_info(void) { BOOL ret; POINTER_INPUT_TYPE type = -1; + POINTER_INFO info; UINT id = 0;
SetLastError(0xdeadbeef); @@ -4463,6 +4466,12 @@ static void test_GetPointerType(void) ret = pGetPointerType(id, &type); ok(ret, "GetPointerType failed, got type %ld for %u.\n", type, id ); ok(type == PT_MOUSE, " type %ld\n", type ); + + /* GetPointerInfo always fails unless the app receives WM_POINTER messages. */ + SetLastError(0xdeadbeef); + ret = pGetPointerInfo(id, &info); + ok(!ret, "succeeded.\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu.\n", GetLastError()); }
static void test_UnregisterDeviceNotification(void) @@ -4643,7 +4652,7 @@ START_TEST(input) SetCursorPos( pos.x, pos.y );
if(pGetPointerType) - test_GetPointerType(); + test_pointer_info(); else win_skip("GetPointerType is not available\n");
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 1130ab457cd..6f827144935 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -359,6 +359,7 @@ @ stdcall GetParent(long) @ stdcall GetPhysicalCursorPos(ptr) @ stdcall GetPointerDevices(ptr ptr) +@ stdcall GetPointerInfo(long ptr) @ stdcall GetPointerType(long ptr) @ stdcall GetPointerTouchInfo(long ptr) @ stdcall GetPointerTouchInfoHistory(long ptr ptr)