From cded6efd75a9bf4191d3aedfd50406e84d383c05 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sun, 17 Dec 2017 13:14:57 +0100 Subject: [PATCH] [GDIPLUS_WINETEST] Add a PCH. --- .../rostests/winetests/gdiplus/CMakeLists.txt | 7 ++++- modules/rostests/winetests/gdiplus/brush.c | 11 +------- .../winetests/gdiplus/customlinecap.c | 10 +------ modules/rostests/winetests/gdiplus/font.c | 13 +-------- modules/rostests/winetests/gdiplus/graphics.c | 12 +-------- .../rostests/winetests/gdiplus/graphicspath.c | 11 +------- modules/rostests/winetests/gdiplus/guid.c | 27 +++++++++++++++++++ modules/rostests/winetests/gdiplus/image.c | 15 +---------- modules/rostests/winetests/gdiplus/matrix.c | 13 +-------- modules/rostests/winetests/gdiplus/metafile.c | 11 +------- .../rostests/winetests/gdiplus/pathiterator.c | 10 +------ modules/rostests/winetests/gdiplus/pen.c | 12 +-------- modules/rostests/winetests/gdiplus/precomp.h | 17 ++++++++++++ modules/rostests/winetests/gdiplus/region.c | 11 +------- .../rostests/winetests/gdiplus/stringformat.c | 10 +------ 15 files changed, 62 insertions(+), 128 deletions(-) create mode 100644 modules/rostests/winetests/gdiplus/guid.c create mode 100644 modules/rostests/winetests/gdiplus/precomp.h diff --git a/modules/rostests/winetests/gdiplus/CMakeLists.txt b/modules/rostests/winetests/gdiplus/CMakeLists.txt index 06ad713502c..6bac596c78a 100644 --- a/modules/rostests/winetests/gdiplus/CMakeLists.txt +++ b/modules/rostests/winetests/gdiplus/CMakeLists.txt @@ -14,9 +14,14 @@ list(APPEND SOURCE pen.c region.c stringformat.c + precomp.h) + +add_executable(gdiplus_winetest + ${SOURCE} + guid.c testlist.c) -add_executable(gdiplus_winetest ${SOURCE}) set_module_type(gdiplus_winetest win32cui) add_importlibs(gdiplus_winetest gdiplus user32 gdi32 ole32 msvcrt kernel32) +add_pch(gdiplus_winetest precomp.h SOURCE) add_rostests_file(TARGET gdiplus_winetest) diff --git a/modules/rostests/winetests/gdiplus/brush.c b/modules/rostests/winetests/gdiplus/brush.c index 759090bdbfc..ec9a74ba152 100644 --- a/modules/rostests/winetests/gdiplus/brush.c +++ b/modules/rostests/winetests/gdiplus/brush.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/customlinecap.c b/modules/rostests/winetests/gdiplus/customlinecap.c index b406eccda9d..8bfa06c0b4a 100644 --- a/modules/rostests/winetests/gdiplus/customlinecap.c +++ b/modules/rostests/winetests/gdiplus/customlinecap.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/font.c b/modules/rostests/winetests/gdiplus/font.c index f31a5ee4b82..b68c2ba5399 100644 --- a/modules/rostests/winetests/gdiplus/font.c +++ b/modules/rostests/winetests/gdiplus/font.c @@ -19,18 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) #define expect_(expected, got, precision) ok(abs((expected) - (got)) <= (precision), "Expected %d, got %d\n", (expected), (got)) diff --git a/modules/rostests/winetests/gdiplus/graphics.c b/modules/rostests/winetests/gdiplus/graphics.c index 33fee40d16d..2ea529b4960 100644 --- a/modules/rostests/winetests/gdiplus/graphics.c +++ b/modules/rostests/winetests/gdiplus/graphics.c @@ -19,17 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok((got) == (expected), "Expected %d, got %d\n", (INT)(expected), (INT)(got)) #define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got)) diff --git a/modules/rostests/winetests/gdiplus/graphicspath.c b/modules/rostests/winetests/gdiplus/graphicspath.c index 6206096db83..b601aad0f9d 100644 --- a/modules/rostests/winetests/gdiplus/graphicspath.c +++ b/modules/rostests/winetests/gdiplus/graphicspath.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/guid.c b/modules/rostests/winetests/gdiplus/guid.c new file mode 100644 index 00000000000..d7bbe34d19e --- /dev/null +++ b/modules/rostests/winetests/gdiplus/guid.c @@ -0,0 +1,27 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include +#include +#include +#include +#include +#include + +/* FIXME: They belong to gdipluseffects.h */ +DEFINE_GUID(BlurEffectGuid, 0x633c80a4, 0x1843, 0x482b, 0x9e, 0xf2, 0xbe, 0x28, 0x34, 0xc5, 0xfd, 0xd4); +DEFINE_GUID(SharpenEffectGuid, 0x63cbf3ee, 0xc526, 0x402c, 0x8f, 0x71, 0x62, 0xc5, 0x40, 0xbf, 0x51, 0x42); +DEFINE_GUID(ColorMatrixEffectGuid, 0x718f2615, 0x7933, 0x40e3, 0xa5, 0x11, 0x5f, 0x68, 0xfe, 0x14, 0xdd, 0x74); +DEFINE_GUID(ColorLUTEffectGuid, 0xa7ce72a9, 0x0f7f, 0x40d7, 0xb3, 0xcc, 0xd0, 0xc0, 0x2d, 0x5c, 0x32, 0x12); +DEFINE_GUID(BrightnessContrastEffectGuid, 0xd3a1dbe1, 0x8ec4, 0x4c17, 0x9f, 0x4c, 0xea, 0x97, 0xad, 0x1c, 0x34, 0x3d); +DEFINE_GUID(HueSaturationLightnessEffectGuid, 0x8b2dd6c3, 0xeb07, 0x4d87, 0xa5, 0xf0, 0x71, 0x08, 0xe2, 0x6a, 0x9c, 0x5f); +DEFINE_GUID(LevelsEffectGuid, 0x99c354ec, 0x2a31, 0x4f3a, 0x8c, 0x34, 0x17, 0xa8, 0x03, 0xb3, 0x3a, 0x25); +DEFINE_GUID(TintEffectGuid, 0x1077af00, 0x2848, 0x4441, 0x94, 0x89, 0x44, 0xad, 0x4c, 0x2d, 0x7a, 0x2c); +DEFINE_GUID(ColorBalanceEffectGuid, 0x537e597d, 0x251e, 0x48da, 0x96, 0x64, 0x29, 0xca, 0x49, 0x6b, 0x70, 0xf8); +DEFINE_GUID(RedEyeCorrectionEffectGuid, 0x74d29d05, 0x69a4, 0x4266, 0x95, 0x49, 0x3c, 0xc5, 0x28, 0x36, 0xb6, 0x32); +DEFINE_GUID(ColorCurveEffectGuid, 0xdd6a0022, 0x58e4, 0x4a67, 0x9d, 0x9b, 0xd4, 0x8e, 0xb8, 0x81, 0xa5, 0x3d); + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/modules/rostests/winetests/gdiplus/image.c b/modules/rostests/winetests/gdiplus/image.c index a332ddf71f8..d87df831277 100644 --- a/modules/rostests/winetests/gdiplus/image.c +++ b/modules/rostests/winetests/gdiplus/image.c @@ -19,23 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define COBJMACROS +#include "precomp.h" -#include #include -#include - -#include -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include #include -#include /* FIXME: They belong to gdipluseffects.h */ DEFINE_GUID(BlurEffectGuid, 0x633c80a4, 0x1843, 0x482b, 0x9e, 0xf2, 0xbe, 0x28, 0x34, 0xc5, 0xfd, 0xd4); diff --git a/modules/rostests/winetests/gdiplus/matrix.c b/modules/rostests/winetests/gdiplus/matrix.c index e1e61aa2a1f..b6c04f62ea8 100644 --- a/modules/rostests/winetests/gdiplus/matrix.c +++ b/modules/rostests/winetests/gdiplus/matrix.c @@ -18,18 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/metafile.c b/modules/rostests/winetests/gdiplus/metafile.c index 123576729a5..b4bf38a6fd0 100644 --- a/modules/rostests/winetests/gdiplus/metafile.c +++ b/modules/rostests/winetests/gdiplus/metafile.c @@ -18,16 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include - -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got)) diff --git a/modules/rostests/winetests/gdiplus/pathiterator.c b/modules/rostests/winetests/gdiplus/pathiterator.c index cf6d10028b8..753ea64cba2 100644 --- a/modules/rostests/winetests/gdiplus/pathiterator.c +++ b/modules/rostests/winetests/gdiplus/pathiterator.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/pen.c b/modules/rostests/winetests/gdiplus/pen.c index 39833caec00..c7847d79910 100644 --- a/modules/rostests/winetests/gdiplus/pen.c +++ b/modules/rostests/winetests/gdiplus/pen.c @@ -18,17 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(fabs(got - expected) < 0.1, "Expected %.2f, got %.2f\n", expected, got) diff --git a/modules/rostests/winetests/gdiplus/precomp.h b/modules/rostests/winetests/gdiplus/precomp.h new file mode 100644 index 00000000000..77fa1fca09f --- /dev/null +++ b/modules/rostests/winetests/gdiplus/precomp.h @@ -0,0 +1,17 @@ +#ifndef _GDIPLUS_WINETEST_PRECOMP_H_ +#define _GDIPLUS_WINETEST_PRECOMP_H_ + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H +#define COBJMACROS + +#include +#include +#include +#include +#include + +#endif /* !_GDIPLUS_WINETEST_PRECOMP_H_ */ diff --git a/modules/rostests/winetests/gdiplus/region.c b/modules/rostests/winetests/gdiplus/region.c index 878c00089b1..fc2675bf476 100644 --- a/modules/rostests/winetests/gdiplus/region.c +++ b/modules/rostests/winetests/gdiplus/region.c @@ -19,16 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include -#include +#include "precomp.h" #define RGNDATA_RECT 0x10000000 #define RGNDATA_PATH 0x10000001 diff --git a/modules/rostests/winetests/gdiplus/stringformat.c b/modules/rostests/winetests/gdiplus/stringformat.c index b06726f3683..332799b9a9c 100644 --- a/modules/rostests/winetests/gdiplus/stringformat.c +++ b/modules/rostests/winetests/gdiplus/stringformat.c @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -//#include "windows.h" -#include -#include -#include -#include +#include "precomp.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got)