#include "wine/test.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
Go to the source code of this file.
◆ WINE_NO_INLINE_RECT
◆ START_TEST()
◆ test_EqualRect()
Definition at line 115 of file uitools.c.
116{
119
122
125
128
131
134
137
140
143
147}
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
Referenced by START_TEST().
◆ test_FillRect()
Definition at line 26 of file uitools.c.
27{
32 HBRUSH old_brush;
34
35
37
40
42 ok(hdcmem !=
NULL,
"CreateCompatibleDC rets %p\n", hdcmem);
43
47 ok(oldhbmp !=
NULL,
"SelectObject returned NULL\n");
49 ok( col == 0xffffff,
"GetPixel returned %08x, expected 0xffffff\n", col);
50
51
56
58 ok(col == 0,
"GetPixel returned %08x, expected 0\n", col);
59
64}
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
GLdouble GLdouble GLdouble r
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
HGDIOBJ WINAPI GetStockObject(_In_ int)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
Referenced by START_TEST().
◆ test_IsRectEmpty()
Definition at line 149 of file uitools.c.
150{
153 static const struct {
156 } rtest[] = {
157 {{0, 0, 0, 0},
TRUE},
158 {{127, 131, 127, 131},
TRUE},
160 {{-1, -1, -1, -1},
TRUE},
161 {{-2011, -2017, -2011, -2017},
TRUE},
163
164 {{31, 37, 31, 41},
TRUE},
165 {{881, 883, 887, 883},
TRUE},
166 {{-1721, 1723, -1721, 7213},
TRUE},
167
168 {{11, 13, 5, 7},
TRUE},
169 {{-11, -13, -19, -23},
TRUE},
170 {{11, 13, -17, 19},
TRUE},
171 {{11, 13, 17, 11},
TRUE},
172
173 {{101, 103, 107, 109},
FALSE},
174 {{1, -9, 7, 3},
FALSE},
175 {{-109, -107, -103, -101},
FALSE},
176 };
177
180 ok(
ret == rtest[
i].
ret,
"Test %d: IsRectEmpty returned %s for %s\n",
i,
182 }
183}
static const char * wine_dbgstr_rect(const RECT *prc)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
Referenced by START_TEST().
◆ test_SetRect()
Definition at line 185 of file uitools.c.
186{
189
192
196 "got wrong rectangle\n");
197
201 "got wrong rectangle\n");
202}
Referenced by START_TEST().
◆ test_SubtractRect()
Definition at line 66 of file uitools.c.
67{
72
73
74 SetRect(&rect1, 50, 50, 150, 100);
77 ok(
result,
"SubtractRect returned FALSE but subtraction should not be empty\n");
79 && rectr.
bottom == 100,
"wrong rect subtraction of SubtractRect (dest rect=%s)\n",
81
82
83 SetRect(&rect1, 2431, 626, 3427, 1608);
86 ok(
result,
"SubtractRect returned FALSE but subtraction should not be empty\n");
88 && rectr.
bottom == 1608,
"wrong rect subtraction of SubtractRect (dest rect=%s)\n",
90
91
92 SetRect(&rect1, 2431, 626, 3427, 1608);
95 ok(
result,
"SubtractRect returned FALSE but subtraction should not be empty\n");
97 && rectr.
bottom == 1608,
"wrong rect subtraction of SubtractRect (dest rect=%s)\n",
99
100
101 SetRect(&rect1, 250, 250, 400, 500);
104 ok(!
result,
"SubtractRect returned TRUE but subtraction should be empty (dest rect=%s)\n",
106
107
108 SetRect(&rect1, 250, 250, 400, 500);
111 ok(!
result,
"SubtractRect returned TRUE but subtraction should be empty (dest rect=%s)\n",
113}
BOOL WINAPI SubtractRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
Referenced by START_TEST().