[GDI32_WINETEST] Sync with Wine Staging 1.9.14.
[reactos.git] / rostests / winetests / gdi32 / mapping.c
index 4850c29..6635a72 100644 (file)
@@ -32,7 +32,7 @@ static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout);
 static DWORD (WINAPI *pGetLayout)(HDC hdc);
 static INT (WINAPI *pGetRandomRgn)(HDC hDC, HRGN hRgn, INT iCode);
 static BOOL (WINAPI *pGetTransform)(HDC, DWORD, XFORM *);
-static DWORD (WINAPI *pSetVirtualResolution)(HDC, DWORD, DWORD, DWORD, DWORD);
+static BOOL (WINAPI *pSetVirtualResolution)(HDC, DWORD, DWORD, DWORD, DWORD);
 
 #define rough_match(got, expected) (abs( MulDiv( (got) - (expected), 1000, (expected) )) <= 5)
 
@@ -309,27 +309,22 @@ static void test_dc_layout(void)
     hrgn = CreateRectRgn( 0, 0, 0, 0 );
     GetClipRgn( hdc, hrgn );
     GetRgnBox( hrgn, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
     pSetLayout( hdc, LAYOUT_LTR );
     SetRect( &rc, 80, 10, 90, 20 );
     GetClipRgn( hdc, hrgn );
     GetRgnBox( hrgn, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
     GetClipBox( hdc, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
     IntersectClipRect( hdc, 80, 10, 85, 20 );
     pSetLayout( hdc, LAYOUT_RTL );
     SetRect( &rc, 15, 10, 20, 20 );
     GetClipRgn( hdc, hrgn );
     GetRgnBox( hrgn, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
     GetClipBox( hdc, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
     SetRectRgn( hrgn, 60, 10, 80, 20 );
     pSetLayout( hdc, LAYOUT_LTR );
     ExtSelectClipRgn( hdc, hrgn, RGN_OR );
@@ -337,19 +332,16 @@ static void test_dc_layout(void)
     SetRect( &rc, 15, 10, 40, 20 );
     GetClipRgn( hdc, hrgn );
     GetRgnBox( hrgn, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
     GetClipBox( hdc, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
 
     /* OffsetClipRgn mirrors too */
     OffsetClipRgn( hdc, 5, 5 );
     OffsetRect( &rc, 5, 5 );
     GetClipRgn( hdc, hrgn );
     GetRgnBox( hrgn, &ret_rc );
-    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+    ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
 
     /* GetRandomRgn returns the raw region */
     if (pGetRandomRgn)
@@ -357,8 +349,7 @@ static void test_dc_layout(void)
         SetRect( &rc, 55, 15, 80, 25 );
         pGetRandomRgn( hdc, hrgn, 1 );
         GetRgnBox( hrgn, &ret_rc );
-        ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
-            ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
+        ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
     }
 
     SetMapMode(hdc, MM_LOMETRIC);
@@ -513,7 +504,7 @@ static void test_isotropic_mapping(void)
 static void test_setvirtualresolution(void)
 {
     HDC hdc = CreateICA("DISPLAY", NULL, NULL, NULL);
-    DWORD r;
+    BOOL r;
     INT horz_res = GetDeviceCaps(hdc, HORZRES);
     INT horz_size = GetDeviceCaps(hdc, HORZSIZE);
     INT log_pixels_x = GetDeviceCaps(hdc, LOGPIXELSX);