#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "commctrl.h"
#include "wine/test.h"
#include "v6util.h"
Go to the source code of this file.
◆ BOOL()
static BOOL |
( |
WINAPI * |
pInitCommonControlsEx | ) |
const |
|
static |
◆ cleanup()
Definition at line 125 of file progress.c.
126{
128
133 }
134
136}
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
static const char progressTestClass[]
static HWND hProgressParentWnd
TW_UINT32 TW_UINT16 TW_UINT16 MSG
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by START_TEST().
◆ create_progress()
Definition at line 36 of file progress.c.
37{
40}
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)
Referenced by test_PBM_STEPIT(), and test_setcolors().
◆ flush_events()
Definition at line 43 of file progress.c.
44{
46 int diff = 100;
48
49 while (diff > 0)
50 {
54 }
55}
DWORD WINAPI GetTickCount(VOID)
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
Referenced by test_redraw().
◆ init()
Definition at line 97 of file progress.c.
98{
102
114
118
122
123}
static LRESULT CALLBACK progress_test_wnd_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
#define WS_OVERLAPPEDWINDOW
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
Referenced by START_TEST().
◆ init_functions()
Definition at line 311 of file progress.c.
312{
314
315#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
317#undef X
318}
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Referenced by START_TEST().
◆ progress_subclass_proc()
Definition at line 76 of file progress.c.
77{
79 {
81 }
83 {
85 }
87}
static WNDPROC progress_wndproc
static RECT last_paint_rect
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by test_redraw().
◆ progress_test_wnd_proc()
Definition at line 57 of file progress.c.
58{
60
63 break;
64
65 default:
67 }
68
70}
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
Referenced by init().
◆ START_TEST()
Definition at line 320 of file progress.c.
321{
325
327
328 iccex.
dwSize =
sizeof(iccex);
330 pInitCommonControlsEx(&iccex);
331
333
337
339 return;
340
343
345
347}
static void test_PBM_STEPIT(void)
static void cleanup(void)
static void test_setcolors(void)
static void test_redraw(void)
static void init_functions(void)
#define ICC_PROGRESS_CLASS
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
◆ test_PBM_STEPIT()
Definition at line 245 of file progress.c.
246{
247 struct stepit_test
248 {
251 int step;
252 } stepit_tests[] =
253 {
254 { 3, 15, 5 },
255 { 3, 15, -5 },
256 { 3, 15, 50 },
257 { -15, 15, 5 },
258 { -3, -2, -5 },
259 { 0, 0, 1 },
260 { 5, 5, 1 },
261 { 0, 0, -1 },
262 { 5, 5, -1 },
263 { 10, 5, 2 },
264 };
267
269 {
270 struct stepit_test *
test = &stepit_tests[
i];
273
275
277 ok(
ret != 0,
"Unexpected return value.\n");
278
281
284
285 for (
j = 0;
j <
test->max;
j++)
286 {
289
292 {
297 }
298 else
300
302
305 }
306
308 }
309}
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
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 GLint GLint j
struct task_struct * current
static HWND create_progress(DWORD style)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI DestroyWindow(_In_ HWND)
Referenced by START_TEST().
◆ test_redraw()
Definition at line 143 of file progress.c.
144{
148
152 ok(hProgressWnd !=
NULL,
"Failed to create progress bar.\n");
154
159
164
165
168
169
172
173
176
177
182 win_skip(
"PBM_GETPOS needs comctl32 > 4.70\n");
183 else
184 ok(
ret == 100,
"PBM_GETPOS returned a wrong position : %d\n", (
UINT)
ret);
185
186
187
188
189
190
193
194
202 ok(!
erased,
"Progress bar shouldn't have erased the background\n");
203
204
212 ok(
erased,
"Progress bar should have erased the background\n");
213
215}
static const char * wine_dbgstr_rect(const RECT *prc)
static void update_window(void)
static LRESULT CALLBACK progress_subclass_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void flush_events(void)
#define SetWindowLongPtrA
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
Referenced by START_TEST().
◆ test_setcolors()
Definition at line 217 of file progress.c.
218{
221
223
226
228 ok(clr == 0,
"got %x\n", clr);
229
231 ok(clr ==
RGB(0, 255, 0),
"got %x\n", clr);
232
235
237 ok(clr == 0,
"got %x\n", clr);
238
240 ok(clr ==
RGB(255, 0, 0),
"got %x\n", clr);
241
243}
Referenced by START_TEST().
◆ update_window()
Definition at line 90 of file progress.c.
91{
94}
BOOL WINAPI UpdateWindow(_In_ HWND)
◆ erased
◆ hProgressParentWnd
◆ last_paint_rect
◆ progress_wndproc
◆ progressTestClass
const char progressTestClass[] = "ProgressBarTestClass" |
|
static |