From: Rémi Bernon rbernon@codeweavers.com
--- dlls/user32/tests/input.c | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 2bc2ba2825d..436056e2e96 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -93,6 +93,10 @@ static BOOL (WINAPI *pGetPointerInfo)(UINT32, POINTER_INFO*); static BOOL (WINAPI *pGetPointerInfoHistory)(UINT32, UINT32*, POINTER_INFO*); static BOOL (WINAPI *pGetPointerFrameInfo)(UINT32, UINT32*, POINTER_INFO*); static BOOL (WINAPI *pGetPointerFrameInfoHistory)(UINT32, UINT32*, UINT32*, POINTER_INFO*); +static BOOL (WINAPI *pGetPointerTouchInfo)(UINT32, POINTER_TOUCH_INFO*); +static BOOL (WINAPI *pGetPointerTouchInfoHistory)(UINT32, UINT32*, POINTER_TOUCH_INFO*); +static BOOL (WINAPI *pGetPointerFrameTouchInfo)(UINT32, UINT32*, POINTER_TOUCH_INFO*); +static BOOL (WINAPI *pGetPointerFrameTouchInfoHistory)(UINT32, UINT32*, UINT32*, POINTER_TOUCH_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 *); @@ -170,6 +174,10 @@ static void init_function_pointers(void) GET_PROC(GetPointerPenInfoHistory); GET_PROC(GetPointerFramePenInfo); GET_PROC(GetPointerFramePenInfoHistory); + GET_PROC(GetPointerTouchInfo); + GET_PROC(GetPointerTouchInfoHistory); + GET_PROC(GetPointerFrameTouchInfo); + GET_PROC(GetPointerFrameTouchInfoHistory); GET_PROC(GetPointerType); GET_PROC(GetRawInputDeviceList); GET_PROC(GetRawInputDeviceInfoW); @@ -4600,6 +4608,7 @@ static void test_GetPointerInfo( BOOL mouse_in_pointer_enabled ) POINTER_INFO pointer_info[4], expect_pointer; void *invalid_ptr = (void *)0xdeadbeef; UINT32 entry_count, pointer_count; + POINTER_TOUCH_INFO touch_info[4]; POINTER_PEN_INFO pen_info[4]; POINTER_INPUT_TYPE type; WNDCLASSW cls = @@ -4801,6 +4810,44 @@ static void test_GetPointerInfo( BOOL mouse_in_pointer_enabled ) todo_wine_if(!pGetPointerFramePenInfoHistory) ok( !memcmp( &expect_pointer, &pen_info[0].pointerInfo, sizeof(expect_pointer) ), "got unexpected pen info\n" );
+ memset( touch_info, 0xa5, sizeof(touch_info) ); + ret = pGetPointerTouchInfo( 1, touch_info ); + todo_wine + ok( ret, "GetPointerTouchInfo failed, error %lu\n", GetLastError() ); + todo_wine + ok( !memcmp( &expect_pointer, &touch_info[0].pointerInfo, sizeof(expect_pointer) ), "got unexpected touch info\n" ); + memset( touch_info, 0xa5, sizeof(touch_info) ); + entry_count = pointer_count = 2; + if (!pGetPointerFrameTouchInfo) ret = FALSE; + else ret = pGetPointerFrameTouchInfo( 1, &pointer_count, touch_info ); + todo_wine_if(!pGetPointerFrameTouchInfo) + ok( ret, "GetPointerFrameTouchInfo failed, error %lu\n", GetLastError() ); + todo_wine_if(!pGetPointerFrameTouchInfo) + ok( pointer_count == 1, "got pointer_count %u\n", pointer_count ); + todo_wine_if(!pGetPointerFrameTouchInfo) + ok( !memcmp( &expect_pointer, &touch_info[0].pointerInfo, sizeof(expect_pointer) ), "got unexpected touch info\n" ); + memset( touch_info, 0xa5, sizeof(touch_info) ); + entry_count = pointer_count = 2; + ret = pGetPointerTouchInfoHistory( 1, &entry_count, touch_info ); + todo_wine + ok( ret, "GetPointerTouchInfoHistory failed, error %lu\n", GetLastError() ); + todo_wine + ok( entry_count == 1, "got entry_count %u\n", entry_count ); + todo_wine + ok( !memcmp( &expect_pointer, &touch_info[0].pointerInfo, sizeof(expect_pointer) ), "got unexpected touch info\n" ); + memset( touch_info, 0xa5, sizeof(touch_info) ); + entry_count = pointer_count = 2; + if (!pGetPointerFrameTouchInfoHistory) ret = FALSE; + else ret = pGetPointerFrameTouchInfoHistory( 1, &entry_count, &pointer_count, touch_info ); + todo_wine_if(!pGetPointerFrameTouchInfoHistory) + ok( ret, "GetPointerFrameTouchInfoHistory failed, error %lu\n", GetLastError() ); + todo_wine_if(!pGetPointerFrameTouchInfoHistory) + ok( entry_count == 1, "got pointer_count %u\n", pointer_count ); + todo_wine_if(!pGetPointerFrameTouchInfoHistory) + ok( pointer_count == 1, "got pointer_count %u\n", pointer_count ); + todo_wine_if(!pGetPointerFrameTouchInfoHistory) + ok( !memcmp( &expect_pointer, &touch_info[0].pointerInfo, sizeof(expect_pointer) ), "got unexpected touch info\n" ); + DestroyWindow( hwnd );
ret = UnregisterClassW( L"test", GetModuleHandleW( NULL ) );