#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/test.h"
Go to the source code of this file.
◆ DCX_USESTYLE
#define DCX_USESTYLE 0x00010000 |
Definition at line 33 of file dce.c.
◆ START_TEST()
Definition at line 713 of file dce.c.
714{
716
737
739 0, 0, 100, 100,
742 0, 200, 100, 100,
745 200, 0, 100, 100,
748 200, 200, 100, 100,
751 400, 0, 100, 100, 0, 0, 0,
NULL );
754
762
764}
static void test_invisible_create(void)
static void test_scroll_window(void)
static void test_begin_paint(void)
static void test_destroyed_window(void)
static void test_parameters(void)
static void test_dc_attributes(void)
static HWND hwnd_parentdc
static void test_dc_layout(void)
static HWND hwnd_classdc2
static void test_dc_visrgn(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HGDIOBJ WINAPI GetStockObject(_In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
◆ test_begin_paint()
Definition at line 384 of file dce.c.
385{
390
391
392
393
403
404
405
442
443
444
453
456 ok( old_hdc ==
hdc,
"did not get the same hdc %p/%p\n", old_hdc,
hdc );
463
464
470 ok( cr != -1,
"error drawing outside of window client area\n" );
473
474 ok(
rect.left == parent_rect.
left,
"rect.left = %d, expected %d\n",
rect.left, parent_rect.
left );
475 ok(
rect.top == parent_rect.
top,
"rect.top = %d, expected %d\n",
rect.top, parent_rect.
top );
478
482}
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
static const char * wine_dbgstr_rect(const RECT *prc)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
Referenced by START_TEST().
◆ test_dc_attributes()
Definition at line 39 of file dce.c.
40{
45
46
47
50
54
60 ok(
rop == def_rop,
"wrong ROP2 %d after release\n",
rop );
65
67 for (
i = 0;
i < 20;
i++)
68 {
72 ok(
rop == def_rop,
"wrong ROP2 %d after release %p/%p\n",
rop, old_hdc,
hdc );
74 {
77 }
78 }
79 if (!found_dc)
80 {
81 trace(
"hdc %p not found in cache using %p\n", old_hdc, hdcs[0] );
82 old_hdc = hdcs[0];
84 }
86
87 for (
i = 0;
i < 20;
i++)
88 {
94 "wrong ROP2 %d after release %p/%p\n",
rop, old_hdc,
hdc );
95 else
96 ok(
rop == def_rop,
"wrong ROP2 %d after release %p/%p\n",
rop, old_hdc,
hdc );
97 }
99
100 for (
i = 0;
i < 20;
i++)
101 {
106 {
108 "wrong ROP2 %d after release %p/%p\n",
rop, old_hdc,
hdc );
110 }
111 else
112 ok(
rop == def_rop,
"wrong ROP2 %d after release %p/%p\n",
rop, old_hdc,
hdc );
113 }
115
116
122 ok( caps == 0,
"got %d\n", caps );
124 ok( caps == 0,
"got %d\n", caps );
126 ok( caps == 0,
"got %d\n", caps );
128
131 ok( caps != 0,
"got %d\n", caps );
133 ok( caps != 0,
"got %d\n", caps );
135 ok( caps != 0,
"got %d\n", caps );
138 ok( caps == 0,
"got %d\n", caps );
140 ok( caps == 0,
"got %d\n", caps );
142 ok( caps == 0,
"got %d\n", caps );
143
144
145
150
156 ok( old_hdc ==
hdc,
"didn't get same DC %p/%p\n", old_hdc,
hdc );
163
164
165
170
176 ok( old_hdc ==
hdc,
"didn't get same DC %p/%p\n", old_hdc,
hdc );
183
184
185
190 ok( old_hdc ==
hdc,
"didn't get same DC %p/%p\n", old_hdc,
hdc );
199}
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
static int rop(int rop, int src, int dst)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetROP2(_In_ HDC)
int WINAPI SetROP2(_In_ HDC, _In_ int)
HWND WINAPI WindowFromDC(_In_ HDC hDC)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
Referenced by START_TEST().
◆ test_dc_layout()
Definition at line 551 of file dce.c.
552{
555 HWND hwnd_cache_rtl, hwnd_owndc_rtl, hwnd_classdc_rtl, hwnd_classdc2_rtl;
559
562 if (!pGetLayout || !pSetLayout)
563 {
564 win_skip(
"Don't have SetLayout\n" );
565 return;
566 }
567
573 {
574 win_skip(
"SetLayout not supported\n" );
575 return;
576 }
577
588
590 pSetLayout(
hdc, 0 );
596
601
605 pSetLayout(
hdc, 0 );
611
615 pSetLayout(
hdc, 0 );
625
630}
std::map< E_MODULE, HMODULE > mod
#define GetProcAddress(x, y)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI DestroyWindow(_In_ HWND)
Referenced by START_TEST().
◆ test_dc_visrgn()
Definition at line 229 of file dce.c.
230{
234
235
236
248
249
250
268
269
270
294
314
315
316
332
341
352
355 ok( old_hdc ==
hdc,
"did not get the same hdc %p/%p\n", old_hdc,
hdc );
368
369
373
377
380}
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
Referenced by START_TEST().
◆ test_destroyed_window()
static void test_destroyed_window |
( |
void |
| ) |
|
|
static |
Definition at line 632 of file dce.c.
633{
637
644
647 ok(
rop == 0,
"wrong ROP2 %d\n",
rop );
651 ok( !
dc,
"Got a non-NULL DC (%p) for a destroyed window\n",
dc );
652
653 for (
i = 0;
i < 30;
i++)
654 {
656 if (
dc == old_dc)
break;
657 }
658 ok(
i < 30,
"DC for destroyed window not reused\n" );
660
667
669 ok( old_dc ==
dc,
"wrong DC\n" );
674
680 ok( !
dc,
"Got a non-NULL DC (%p) for a destroyed window\n",
dc );
681
683 ok(
dc != 0,
"Got NULL DC\n" );
688
694 ok( !
dc,
"Got a non-NULL DC (%p) for a destroyed window\n",
dc );
695
697 ok(
dc != 0,
"Got NULL DC\n" );
702
704 ok(
rop == 0,
"wrong ROP2 %d\n",
rop );
708 ok( !
dc,
"Got a non-NULL DC (%p) for a destroyed window\n",
dc );
709
711}
Referenced by START_TEST().
◆ test_invisible_create()
static void test_invisible_create |
( |
void |
| ) |
|
|
static |
Definition at line 534 of file dce.c.
535{
537 0, 200, 100, 100,
540
543
544 ok(dc1 == dc2,
"expected owndc dcs to match\n");
545
549}
Referenced by START_TEST().
◆ test_parameters()
◆ test_scroll_window()
Definition at line 485 of file dce.c.
486{
490
491
492
494 SetRect( &clip, 25, 25, 50, 50 );
502
505
513
521
524
532}
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI UpdateWindow(_In_ HWND)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
BOOL WINAPI ScrollWindow(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT)
Referenced by START_TEST().
◆ hwnd_cache
◆ hwnd_classdc
◆ hwnd_classdc2
◆ hwnd_owndc
◆ hwnd_parent
◆ hwnd_parentdc