Nikolay Sivov : gdiplus: Partially implemented GdipTestControl.

Alexandre Julliard julliard at winehq.org
Mon Sep 8 07:42:11 CDT 2008


Module: wine
Branch: master
Commit: d923d78e9549d6460925f4055d710063b4fc3152
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d923d78e9549d6460925f4055d710063b4fc3152

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sun Sep  7 01:40:26 2008 +0400

gdiplus: Partially implemented GdipTestControl.

---

 dlls/gdiplus/gdiplus.spec  |    2 +-
 dlls/gdiplus/image.c       |   21 +++++++++++++++++++++
 dlls/gdiplus/tests/image.c |   12 ++++++++++++
 include/gdiplusenums.h     |    8 ++++++++
 include/gdiplusflat.h      |    2 ++
 5 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index f7b1d5d..9eafbde 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -602,7 +602,7 @@
 @ stdcall GdipStartPathFigure(ptr)
 @ stdcall GdipStringFormatGetGenericDefault(ptr)
 @ stdcall GdipStringFormatGetGenericTypographic(ptr)
-@ stub GdipTestControl
+@ stdcall GdipTestControl(long ptr)
 @ stdcall GdipTransformMatrixPoints(ptr ptr long)
 @ stdcall GdipTransformMatrixPointsI(ptr ptr long)
 @ stdcall GdipTransformPath(ptr ptr)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index bcdc64f..61dade9 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -1280,3 +1280,24 @@ GpStatus WINGDIPAPI GdipGetImageFlags(GpImage *image, UINT *flags)
 
     return Ok;
 }
+
+GpStatus WINGDIPAPI GdipTestControl(GpTestControlEnum control, void *param)
+{
+    TRACE("(%d, %p)\n", control, param);
+
+    switch(control){
+        case TestControlForceBilinear:
+            if(param)
+                FIXME("TestControlForceBilinear not handled\n");
+            break;
+        case TestControlNoICM:
+            if(param)
+                FIXME("TestControlNoICM not handled\n");
+            break;
+        case TestControlGetBuildNumber:
+            *((DWORD*)param) = 3102;
+            break;
+    }
+
+    return Ok;
+}
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 46e63f2..5d8c535 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -518,6 +518,17 @@ static void test_GdipCloneImage(void)
     expect(Ok, stat);
 }
 
+static void test_testcontrol(void)
+{
+    GpStatus stat;
+    DWORD param;
+
+    param = 0;
+    stat = GdipTestControl(TestControlGetBuildNumber, &param);
+    expect(Ok, stat);
+    ok(param != 0, "Build number expected, got %u\n", param);
+}
+
 START_TEST(image)
 {
     struct GdiplusStartupInput gdiplusStartupInput;
@@ -540,6 +551,7 @@ START_TEST(image)
     test_GdipCreateBitmapFromHBITMAP();
     test_GdipGetImageFlags();
     test_GdipCloneImage();
+    test_testcontrol();
 
     GdiplusShutdown(gdiplusToken);
 }
diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h
index bc52bd5..f3cdad8 100644
--- a/include/gdiplusenums.h
+++ b/include/gdiplusenums.h
@@ -329,6 +329,13 @@ enum CoordinateSpace
     CoordinateSpaceDevice
 };
 
+enum GpTestControlEnum
+{
+    TestControlForceBilinear  = 0,
+    TestControlNoICM          = 1,
+    TestControlGetBuildNumber = 2
+};
+
 #ifndef __cplusplus
 
 typedef enum Unit Unit;
@@ -364,6 +371,7 @@ typedef enum ImageCodecFlags ImageCodecFlags;
 typedef enum CombineMode CombineMode;
 typedef enum FlushIntention FlushIntention;
 typedef enum CoordinateSpace CoordinateSpace;
+typedef enum GpTestControlEnum GpTestControlEnum;
 
 #endif /* end of c typedefs */
 
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index cbb59e5..03980ea 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -537,6 +537,8 @@ GpStatus WINGDIPAPI GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap*,REAL);
 GpStatus WINGDIPAPI GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap*,REAL);
 GpStatus WINGDIPAPI GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap*,REAL);
 
+GpStatus WINGDIPAPI GdipTestControl(GpTestControlEnum,void*);
+
 #ifdef __cplusplus
 }
 #endif




More information about the wine-cvs mailing list