Author: tkreuzer
Date: Wed Aug 25 08:50:10 2010
New Revision: 48620
URL:
http://svn.reactos.org/svn/reactos?rev=48620&view=rev
Log:
Add missing files
Added:
trunk/rostests/apitests/dciman32/ (with props)
trunk/rostests/apitests/dciman32/DCICreatePrimary.c (with props)
trunk/rostests/apitests/dciman32/dciman32_apitest.rbuild (with props)
trunk/rostests/apitests/dciman32/testlist.c (with props)
trunk/rostests/apitests/user32/ (with props)
trunk/rostests/apitests/user32/GetSystemMetrics.c (with props)
trunk/rostests/apitests/user32/InitializeLpkHooks.c (with props)
trunk/rostests/apitests/user32/RealGetWindowClass.c (with props)
trunk/rostests/apitests/user32/ScrollDC.c (with props)
trunk/rostests/apitests/user32/ScrollWindowEx.c (with props)
trunk/rostests/apitests/user32/testlist.c (with props)
trunk/rostests/apitests/user32/user32_apitest.rbuild (with props)
Propchange: trunk/rostests/apitests/dciman32/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Aug 25 08:50:10 2010
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/rostests/apitests/dciman32/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/rostests/apitests/dciman32/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/apitests/dciman32/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: trunk/rostests/apitests/dciman32/DCICreatePrimary.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/dciman32/DCICrea…
==============================================================================
--- trunk/rostests/apitests/dciman32/DCICreatePrimary.c (added)
+++ trunk/rostests/apitests/dciman32/DCICreatePrimary.c [iso-8859-1] Wed Aug 25 08:50:10
2010
@@ -1,0 +1,21 @@
+/*
+ * PROJECT: ReactOS api tests
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Test for DCICreatePrimary
+ * PROGRAMMERS: Timo Kreuzer
+ */
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+
+void Test_DCICreatePrimary()
+{
+
+}
+
+START_TEST(DCICreatePrimary)
+{
+ Test_DCICreatePrimary();
+}
+
Propchange: trunk/rostests/apitests/dciman32/DCICreatePrimary.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/dciman32/dciman32_apitest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/dciman32/dciman3…
==============================================================================
--- trunk/rostests/apitests/dciman32/dciman32_apitest.rbuild (added)
+++ trunk/rostests/apitests/dciman32/dciman32_apitest.rbuild [iso-8859-1] Wed Aug 25
08:50:10 2010
@@ -1,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<group>
+<module name="dciman32_apitest" type="win32cui"
installbase="bin" installname="dciman32_apitest.exe">
+ <include base="dciman32_apitest">.</include>
+ <library>wine</library>
+ <library>gdi32</library>
+ <library>user32</library>
+ <library>pseh</library>
+ <file>testlist.c</file>
+
+ <file>DCICreatePrimary.c</file>
+
+</module>
+</group>
Propchange: trunk/rostests/apitests/dciman32/dciman32_apitest.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/dciman32/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/dciman32/testlis…
==============================================================================
--- trunk/rostests/apitests/dciman32/testlist.c (added)
+++ trunk/rostests/apitests/dciman32/testlist.c [iso-8859-1] Wed Aug 25 08:50:10 2010
@@ -1,0 +1,16 @@
+#define WIN32_LEAN_AND_MEAN
+#define __ROS_LONG64__
+#include <windows.h>
+
+#define STANDALONE
+#include "wine/test.h"
+
+extern void func_DCICreatePrimary(void);
+
+const struct test winetest_testlist[] =
+{
+ { "DCICreatePrimary", func_DCICreatePrimary },
+
+ { 0, 0 }
+};
+
Propchange: trunk/rostests/apitests/dciman32/testlist.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/rostests/apitests/user32/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Aug 25 08:50:10 2010
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/rostests/apitests/user32/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/rostests/apitests/user32/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/apitests/user32/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: trunk/rostests/apitests/user32/GetSystemMetrics.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/GetSystem…
==============================================================================
--- trunk/rostests/apitests/user32/GetSystemMetrics.c (added)
+++ trunk/rostests/apitests/user32/GetSystemMetrics.c [iso-8859-1] Wed Aug 25 08:50:10
2010
@@ -1,0 +1,410 @@
+/*
+ * PROJECT: ReactOS api tests
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Test for GetSystemMetrics
+ * PROGRAMMERS: Timo Kreuzer
+ */
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+
+void Test_GetSystemMetrics()
+{
+ INT ret;
+ HDC hDC;
+ BOOL BoolVal;
+ UINT UintVal;
+ RECT rect;
+
+ SetLastError(0);
+ hDC = GetDC(0);
+
+ ret = GetSystemMetrics(0);
+ ok(ret > 0, "ret = %d", ret);
+
+ ret = GetSystemMetrics(64);
+ ok(ret == 0, "ret = %d", ret);
+ ret = GetSystemMetrics(65);
+ ok(ret == 0, "ret = %d", ret);
+ ret = GetSystemMetrics(66);
+ ok(ret == 0, "ret = %d", ret);
+
+
+ ret = GetSystemMetrics(SM_CXSCREEN);
+ ok(ret == GetDeviceCaps(hDC, HORZRES), "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYSCREEN);
+ ok(ret == GetDeviceCaps(hDC, VERTRES), "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXVSCROLL);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYHSCROLL);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYCAPTION);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXBORDER);
+ SystemParametersInfoW(SPI_GETFOCUSBORDERWIDTH, 0, &UintVal, 0);
+ ok(ret == UintVal, "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYBORDER);
+ SystemParametersInfoW(SPI_GETFOCUSBORDERHEIGHT, 0, &UintVal, 0);
+ ok(ret == UintVal, "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXDLGFRAME);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYDLGFRAME);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYVTHUMB);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXHTHUMB);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXICON);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYICON);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXCURSOR);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYCURSOR);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMENU);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ SystemParametersInfoW(SPI_GETWORKAREA, 0, &rect, 0);
+ ret = GetSystemMetrics(SM_CXFULLSCREEN);
+ ok(ret == rect.right, "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYFULLSCREEN);
+ ok(ret == rect.bottom - rect.top - GetSystemMetrics(SM_CYCAPTION), "ret =
%d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYKANJIWINDOW);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_MOUSEPRESENT);
+ ok(ret == 1, "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYVSCROLL);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXHSCROLL);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_DEBUG);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_SWAPBUTTON);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_RESERVED1);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_RESERVED2);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_RESERVED3);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_RESERVED4);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMIN);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMIN);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXSIZE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYSIZE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXFRAME);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYFRAME);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMINTRACK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMINTRACK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXDOUBLECLK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYDOUBLECLK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXICONSPACING);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYICONSPACING);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_MENUDROPALIGNMENT);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_PENWINDOWS);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_DBCSENABLED);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CMOUSEBUTTONS);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+#if(WINVER >= 0x0400)
+ ret = GetSystemMetrics(SM_SECURE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXEDGE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYEDGE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMINSPACING);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMINSPACING);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXSMICON);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYSMICON);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYSMCAPTION);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXSMSIZE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYSMSIZE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMENUSIZE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMENUSIZE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_ARRANGE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMINIMIZED);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMINIMIZED);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMAXTRACK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMAXTRACK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMAXIMIZED);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMAXIMIZED);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_NETWORK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CLEANBOOT);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXDRAG);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYDRAG);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_SHOWSOUNDS);
+ SystemParametersInfoW(SPI_GETSHOWSOUNDS, 0, &BoolVal, 0);
+ ok(ret == BoolVal, "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXMENUCHECK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYMENUCHECK);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_SLOWMACHINE);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_MIDEASTENABLED);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+#endif
+
+#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
+ ret = GetSystemMetrics(SM_MOUSEWHEELPRESENT);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+#endif
+
+#if(WINVER >= 0x0500)
+ ret = GetSystemMetrics(SM_XVIRTUALSCREEN);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_YVIRTUALSCREEN);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYVIRTUALSCREEN);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CMONITORS);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_SAMEDISPLAYFORMAT);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+#endif
+
+#if(_WIN32_WINNT >= 0x0500)
+ ret = GetSystemMetrics(SM_IMMENABLED);
+ ok(ret == 0 || ret == 1, "ret = %d\n", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+#endif
+
+#if(_WIN32_WINNT >= 0x0501)
+ ret = GetSystemMetrics(SM_CXFOCUSBORDER);
+ SystemParametersInfoW(SPI_GETFOCUSBORDERWIDTH, 0, &UintVal, 0);
+ ok(ret == UintVal, "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CYFOCUSBORDER);
+ SystemParametersInfoW(SPI_GETFOCUSBORDERHEIGHT, 0, &UintVal, 0);
+ ok(ret == UintVal, "ret = %d", ret);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_TABLETPC);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_MEDIACENTER);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_STARTER);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_SERVERR2);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+#endif
+
+#if(_WIN32_WINNT >= 0x0600)
+ ret = GetSystemMetrics(SM_MOUSEHORIZONTALWHEELPRESENT);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+
+ ret = GetSystemMetrics(SM_CXPADDEDBORDER);
+// TEST(ret == 0);
+ ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError());
+#endif
+
+}
+
+START_TEST(GetSystemMetrics)
+{
+ Test_GetSystemMetrics();
+}
+
Propchange: trunk/rostests/apitests/user32/GetSystemMetrics.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32/InitializeLpkHooks.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/Initializ…
==============================================================================
--- trunk/rostests/apitests/user32/InitializeLpkHooks.c (added)
+++ trunk/rostests/apitests/user32/InitializeLpkHooks.c [iso-8859-1] Wed Aug 25 08:50:10
2010
@@ -1,0 +1,110 @@
+/*
+ * PROJECT: ReactOS api tests
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Test for InitializeLpkHooks
+ * PROGRAMMERS: Magnus Olsen
+ */
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+
+
+typedef struct _LPK_LPEDITCONTROL_LIST
+{
+ PVOID EditCreate;
+ PVOID EditIchToXY;
+ PVOID EditMouseToIch;
+ PVOID EditCchInWidth;
+ PVOID EditGetLineWidth;
+ PVOID EditDrawText;
+ PVOID EditHScroll;
+ PVOID EditMoveSelection;
+ PVOID EditVerifyText;
+ PVOID EditNextWord;
+ PVOID EditSetMenu;
+ PVOID EditProcessMenu;
+ PVOID EditCreateCaret;
+ PVOID EditAdjustCaret;
+} LPK_LPEDITCONTROL_LIST, *PLPK_LPEDITCONTROL_LIST;
+
+
+DWORD (APIENTRY *fpLpkTabbedTextOut)
(LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID);
+DWORD (APIENTRY *fpLpkPSMTextOut) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID);
+DWORD (APIENTRY *fpLpkDrawTextEx)
(LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID);
+PLPK_LPEDITCONTROL_LIST (APIENTRY *fpLpkEditControl) ();
+
+int Count_myLpkTabbedTextOut = 0;
+int Count_myLpkPSMTextOut = 0;
+int Count_myLpkDrawTextEx = 0;
+
+DWORD WINAPI myLpkTabbedTextOut (LPVOID x1,LPVOID x2,LPVOID x3, LPVOID x4, LPVOID x5,
LPVOID x6, LPVOID x7, LPVOID x8,
+ LPVOID x9, LPVOID x10, LPVOID x11, LPVOID x12)
+{
+ Count_myLpkTabbedTextOut++;
+ return fpLpkTabbedTextOut(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12);
+}
+
+DWORD myLpkPSMTextOut (LPVOID x1,LPVOID x2,LPVOID x3,LPVOID x4,LPVOID x5,LPVOID x6)
+{
+ Count_myLpkPSMTextOut++;
+ return fpLpkPSMTextOut ( x1, x2, x3, x4, x5, x6);
+}
+
+DWORD myLpkDrawTextEx(LPVOID x1,LPVOID x2,LPVOID x3,LPVOID x4,LPVOID x5, LPVOID x6,
LPVOID x7, LPVOID x8, LPVOID x9,LPVOID x10)
+{
+ Count_myLpkDrawTextEx++;
+ return fpLpkDrawTextEx(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10);
+}
+
+
+typedef struct _USER32_INTERN_INITALIZEHOOKS
+{
+ PVOID fpLpkTabbedTextOut;
+ PVOID fpLpkPSMTextOut;
+ PVOID fpLpkDrawTextEx;
+ PLPK_LPEDITCONTROL_LIST fpListLpkEditControl;
+} USER32_INTERN_INITALIZEHOOKS, *PUSER32_INTERN_INITALIZEHOOKS;
+
+VOID WINAPI InitializeLpkHooks (PUSER32_INTERN_INITALIZEHOOKS);
+
+void Test_InitializeLpkHooks()
+{
+ USER32_INTERN_INITALIZEHOOKS setup;
+ HMODULE lib = LoadLibrary("LPK.DLL");
+
+ ok(lib != NULL, "lib = 0\n");
+ if (lib != NULL)
+ {
+ fpLpkTabbedTextOut = (DWORD (APIENTRY *) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,
LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib,
"LpkTabbedTextOut");
+ fpLpkPSMTextOut = (DWORD (APIENTRY *)
(LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib,
"fpLpkPSMTextOut");
+ fpLpkDrawTextEx = (DWORD (APIENTRY *)
(LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID))
GetProcAddress(lib, "LpkDrawTextEx");
+ fpLpkEditControl = (PLPK_LPEDITCONTROL_LIST (APIENTRY *) (VOID))
GetProcAddress(lib, "LpkEditControl");
+
+ setup.fpLpkTabbedTextOut = myLpkTabbedTextOut;
+ setup.fpLpkPSMTextOut = myLpkPSMTextOut;
+ setup.fpLpkDrawTextEx = myLpkDrawTextEx;
+
+ /* we have not add any test to this api */
+ setup.fpListLpkEditControl = (PLPK_LPEDITCONTROL_LIST)fpLpkEditControl;
+
+ /* use our own api that we just made */
+ InitializeLpkHooks(&setup);
+
+ /* FIXME add test now */
+
+ /* restore */
+ setup.fpLpkTabbedTextOut = fpLpkTabbedTextOut;
+ setup.fpLpkPSMTextOut = fpLpkPSMTextOut;
+ setup.fpLpkDrawTextEx = fpLpkDrawTextEx;
+ setup.fpListLpkEditControl = (PLPK_LPEDITCONTROL_LIST)fpLpkEditControl;
+ InitializeLpkHooks(&setup);
+ }
+
+}
+
+START_TEST(InitializeLpkHooks)
+{
+ Test_InitializeLpkHooks();
+}
+
Propchange: trunk/rostests/apitests/user32/InitializeLpkHooks.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32/RealGetWindowClass.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/RealGetWi…
==============================================================================
--- trunk/rostests/apitests/user32/RealGetWindowClass.c (added)
+++ trunk/rostests/apitests/user32/RealGetWindowClass.c [iso-8859-1] Wed Aug 25 08:50:10
2010
@@ -1,0 +1,134 @@
+/*
+ * PROJECT: ReactOS api tests
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Test for RealGetWindowClass
+ * PROGRAMMERS: Gregor Gullwi
+ */
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+
+typedef struct _TestData
+{
+ BOOL OverrideWndProc; /* TRUE if lpfnWndProc should be overridden */
+ LPCSTR ClassName; /* Name of the new class to register */
+ DWORD WndExtra; /* Remove these WNDCLASS::cbWndExtra flags */
+ BOOL ExpectsHwnd; /* TRUE if a HWND should be created to run tests
on */
+ LPCSTR ExpectedClassNameBefore; /* Expected class name before any dialog function
is called */
+ LPCSTR ExpectedClassNameAfter; /* Expected class name after any dialog function
is called */
+} TestData;
+
+static TestData RealClassTestData[] =
+{
+ {
+ TRUE,
+ "OverrideWndProc_with_DLGWINDOWEXTRA_TRUE",
+ 0,
+ TRUE,
+ "OverrideWndProc_with_DLGWINDOWEXTRA_TRUE",
+ "#32770",
+ },
+ {
+ TRUE,
+ "OverrideWndProc_without_DLGWINDOWEXTRA_TRUE",
+ DLGWINDOWEXTRA,
+ TRUE,
+ "OverrideWndProc_without_DLGWINDOWEXTRA_TRUE",
+ "OverrideWndProc_without_DLGWINDOWEXTRA_TRUE",
+ },
+ {
+ FALSE,
+ "DefaultWndProc_with_DLGWINDOWEXTRA_FALSE",
+ 0,
+ TRUE,
+ "#32770",
+ "#32770",
+ },
+ {
+ FALSE,
+ "DefaultWndProc_without_DLGWINDOWEXTRA_FALSE",
+ DLGWINDOWEXTRA,
+ FALSE,
+ "N/A",
+ "N/A",
+ },
+};
+
+void Test_RealGetWindowClass()
+{
+ int testNo;
+ UINT Result;
+ CHAR Buffer[1024];
+
+ Result = RealGetWindowClass( NULL, Buffer, ARRAY_SIZE(Buffer) );
+ ok(Result == 0, "Result = %d\n", Result);
+ ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetLastError() = %ld\n",
GetLastError());
+
+ for (testNo = 0; testNo < ARRAY_SIZE(RealClassTestData); testNo++)
+ {
+ ATOM atom;
+ WNDCLASSA cls;
+ HWND hWnd;
+
+ /* Register classes, "derived" from built-in dialog, with and without
the DLGWINDOWEXTRA flag set */
+ GetClassInfoA(0, "#32770", &cls);
+ if (RealClassTestData[testNo].OverrideWndProc)
+ cls.lpfnWndProc = DefWindowProcA;
+ cls.lpszClassName = RealClassTestData[testNo].ClassName;
+ cls.cbWndExtra &= ~RealClassTestData[testNo].WndExtra;
+ atom = RegisterClassA (&cls);
+ if (atom == 0) return;
+
+ /* Create a window */
+ hWnd = CreateWindowEx( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR |
+ WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE |
WS_EX_CONTROLPARENT | WS_EX_APPWINDOW,
+ RealClassTestData[testNo].ClassName,
+ RealClassTestData[testNo].ClassName,
+ WS_POPUPWINDOW | WS_CLIPSIBLINGS | WS_DLGFRAME |
WS_OVERLAPPED |
+ WS_MINIMIZEBOX | WS_MAXIMIZEBOX | DS_3DLOOK | DS_SETFONT |
DS_MODALFRAME,
+ CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
+ NULL, NULL, 0, 0);
+
+ /* Do we expect a HWND at all? */
+ if (RealClassTestData[testNo].ExpectsHwnd)
+ {
+ ok(hWnd != NULL, "\n");
+
+ if (hWnd != NULL)
+ {
+ /* Get the "real" class name */
+ Result = RealGetWindowClass( hWnd, Buffer, ARRAY_SIZE(Buffer) );
+ printf("Buffer: %s\nExpectedClassNameBefore(%d): %s\n", Buffer,
testNo, RealClassTestData[testNo].ExpectedClassNameBefore);
+ ok( Result != 0, "\n" );
+ ok( strcmp( Buffer, RealClassTestData[testNo].ExpectedClassNameBefore )
== 0, "\n" );
+
+ /* Call a function that requires a dialog window */
+ DefDlgProcA( hWnd, DM_SETDEFID, IDCANCEL, 0 );
+
+ /* Get the "real" class name again */
+ Result = RealGetWindowClass( hWnd, Buffer, ARRAY_SIZE(Buffer) );
+ printf("Buffer: %s\nExpectedClassNameAfter(%d): %s\n", Buffer,
testNo, RealClassTestData[testNo].ExpectedClassNameAfter);
+ ok( Result != 0, "\n" );
+ ok( strcmp( Buffer, RealClassTestData[testNo].ExpectedClassNameAfter ) ==
0, "\n" );
+ }
+ }
+ else
+ {
+ ok(hWnd == NULL, "\n");
+ }
+
+ /* Cleanup */
+ DestroyWindow(hWnd);
+ UnregisterClass(RealClassTestData[testNo].ClassName, 0);
+ }
+
+}
+
+START_TEST(RealGetWindowClass)
+{
+ Test_RealGetWindowClass();
+}
+
Propchange: trunk/rostests/apitests/user32/RealGetWindowClass.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32/ScrollDC.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/ScrollDC.…
==============================================================================
--- trunk/rostests/apitests/user32/ScrollDC.c (added)
+++ trunk/rostests/apitests/user32/ScrollDC.c [iso-8859-1] Wed Aug 25 08:50:10 2010
@@ -1,0 +1,72 @@
+/*
+ * PROJECT: ReactOS api tests
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Test for ScrollDC
+ * PROGRAMMERS: Timo Kreuzer
+ */
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+
+void Test_ScrollDC()
+{
+ HWND hWnd, hWnd2;
+ HDC hDC;
+ HRGN hrgn;
+ RECT rcClip;
+ int iResult;
+
+ /* Create a window */
+ hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW |
WS_VISIBLE,
+ 100, 100, 100, 100,
+ NULL, NULL, 0, 0);
+ UpdateWindow(hWnd);
+ hDC = GetDC(hWnd);
+
+ /* Test that no update region is there */
+ hrgn = CreateRectRgn(0,0,0,0);
+ iResult = GetUpdateRgn(hWnd, hrgn, FALSE);
+ ok (iResult == NULLREGION, "\n");
+
+ /* Test normal scrolling */
+ ok(ScrollDC(hDC, 0, 0, NULL, NULL, hrgn, NULL) == TRUE, "\n");
+
+ /* Scroll with invalid update region */
+ DeleteObject(hrgn);
+ ok(ScrollDC(hDC, 50, 0, NULL, NULL, hrgn, NULL) == FALSE, "\n");
+ hrgn = CreateRectRgn(0,0,0,0);
+ ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n");
+
+ /* Scroll with invalid update rect pointer */
+ ok(ScrollDC(hDC, 50, 0, NULL, NULL, NULL, (PRECT)1) == 0, "\n");
+ ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n");
+
+ /* Scroll with a clip rect */
+ rcClip.left = 50; rcClip.top = 0; rcClip.right = 100; rcClip.bottom = 100;
+ ok(ScrollDC(hDC, 50, 0, NULL, &rcClip, hrgn, NULL) == TRUE, "\n");
+ ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n");
+
+ /* Scroll with a clip rect */
+ rcClip.left = 50; rcClip.top = 0; rcClip.right = 100; rcClip.bottom = 100;
+ ok(ScrollDC(hDC, 50, 50, NULL, &rcClip, hrgn, NULL) == TRUE, "\n");
+ ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n");
+
+ /* Overlap with another window */
+ hWnd2 = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW
| WS_VISIBLE,
+ 30, 160, 100, 100,
+ NULL, NULL, 0, 0);
+ UpdateWindow(hWnd2);
+
+ /* Cleanup */
+ ReleaseDC(hWnd, hDC);
+ DestroyWindow(hWnd);
+ DestroyWindow(hWnd2);
+
+}
+
+START_TEST(ScrollDC)
+{
+ Test_ScrollDC();
+}
+
Propchange: trunk/rostests/apitests/user32/ScrollDC.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32/ScrollWindowEx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/ScrollWin…
==============================================================================
--- trunk/rostests/apitests/user32/ScrollWindowEx.c (added)
+++ trunk/rostests/apitests/user32/ScrollWindowEx.c [iso-8859-1] Wed Aug 25 08:50:10 2010
@@ -1,0 +1,63 @@
+/*
+ * PROJECT: ReactOS api tests
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Test for ScrollWindowEx
+ * PROGRAMMERS: Timo Kreuzer
+ */
+
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+
+void Test_ScrollWindowEx()
+{
+ HWND hWnd;
+ HRGN hrgn;
+ int Result;
+
+ /* Create a window */
+ hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW |
WS_VISIBLE,
+ CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,
+ NULL, NULL, 0, 0);
+ UpdateWindow(hWnd);
+
+ /* Assert that no update region is there */
+ hrgn = CreateRectRgn(0,0,0,0);
+ Result = GetUpdateRgn(hWnd, hrgn, FALSE);
+ ok(Result == NULLREGION, "Result = %d\n", Result);
+
+ Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, 0);
+ ok(Result == SIMPLEREGION, "Result = %d\n", Result);
+ Result = GetUpdateRgn(hWnd, hrgn, FALSE);
+ ok(Result == NULLREGION, "Result = %d\n", Result);
+
+ Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, SW_INVALIDATE);
+ ok(Result == SIMPLEREGION, "Result = %d\n", Result);
+ Result = GetUpdateRgn(hWnd, hrgn, FALSE);
+ ok(Result == SIMPLEREGION, "Result = %d\n", Result);
+ UpdateWindow(hWnd);
+
+ // test invalid update region
+ DeleteObject(hrgn);
+ Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, hrgn, NULL, SW_INVALIDATE);
+ ok(Result == ERROR, "Result = %d\n", Result);
+ hrgn = CreateRectRgn(0,0,0,0);
+ UpdateWindow(hWnd);
+
+ // Test invalid updaterect pointer
+ Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, (LPRECT)1, SW_INVALIDATE);
+ ok(Result == ERROR, "Result = %d\n", Result);
+ Result = GetUpdateRgn(hWnd, hrgn, FALSE);
+ ok(Result == SIMPLEREGION, "Result = %d\n", Result);
+
+// test for alignment of rects
+
+ DeleteObject(hrgn);
+ DestroyWindow(hWnd);
+}
+
+START_TEST(ScrollWindowEx)
+{
+ Test_ScrollWindowEx();
+}
+
Propchange: trunk/rostests/apitests/user32/ScrollWindowEx.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/testlist.…
==============================================================================
--- trunk/rostests/apitests/user32/testlist.c (added)
+++ trunk/rostests/apitests/user32/testlist.c [iso-8859-1] Wed Aug 25 08:50:10 2010
@@ -1,0 +1,24 @@
+#define WIN32_LEAN_AND_MEAN
+#define __ROS_LONG64__
+#include <windows.h>
+
+#define STANDALONE
+#include "wine/test.h"
+
+extern void func_InitializeLpkHooks(void);
+extern void func_RealGetWindowClass(void);
+extern void func_ScrollDC(void);
+extern void func_ScrollWindowEx(void);
+extern void func_GetSystemMetrics(void);
+
+const struct test winetest_testlist[] =
+{
+ { "InitializeLpkHooks", func_InitializeLpkHooks },
+ { "RealGetWindowClass", func_RealGetWindowClass },
+ { "ScrollDC", func_ScrollDC },
+ { "ScrollWindowEx", func_ScrollWindowEx },
+ { "GetSystemMetrics", func_GetSystemMetrics },
+
+ { 0, 0 }
+};
+
Propchange: trunk/rostests/apitests/user32/testlist.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32/user32_apitest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/user32_ap…
==============================================================================
--- trunk/rostests/apitests/user32/user32_apitest.rbuild (added)
+++ trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] Wed Aug 25 08:50:10
2010
@@ -1,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<group>
+<module name="user32_apitest" type="win32cui"
installbase="bin" installname="user32_apitest.exe">
+ <include base="user32_apitest">.</include>
+ <library>wine</library>
+ <library>gdi32</library>
+ <library>user32</library>
+ <library>pseh</library>
+ <file>testlist.c</file>
+
+ <file>InitializeLpkHooks.c</file>
+ <file>RealGetWindowClass.c</file>
+ <file>ScrollDC.c</file>
+ <file>ScrollWindowEx.c</file>
+ <file>GetSystemMetrics.c</file>
+
+</module>
+</group>
Propchange: trunk/rostests/apitests/user32/user32_apitest.rbuild
------------------------------------------------------------------------------
svn:eol-style = native