[4/4] GdipCreateFromHWNDICM (no icm yet) with test (bug 12185)
Nikolay Sivov
bunglehead at gmail.com
Fri May 9 06:39:45 CDT 2008
Changelog:
- GdipCreateFromHWNDICM (no icm) with test
---
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/graphics.c | 6 ++++++
dlls/gdiplus/tests/graphics.c | 5 +++++
include/gdiplusflat.h | 1 +
4 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index e9de1cd..297fefe 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -92,7 +92,7 @@
@ stdcall GdipCreateFromHDC2(long long ptr)
@ stdcall GdipCreateFromHDC(long ptr)
@ stdcall GdipCreateFromHWND(long ptr)
-@ stub GdipCreateFromHWNDICM
+@ stdcall GdipCreateFromHWNDICM(long ptr)
@ stdcall GdipCreateHBITMAPFromBitmap(ptr ptr long)
@ stub GdipCreateHICONFromBitmap
@ stub GdipCreateHalftonePalette
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index a86a015..db12324 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -797,6 +797,12 @@ GpStatus WINGDIPAPI GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics)
return Ok;
}
+/* FIXME: no icm handling */
+GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND hwnd, GpGraphics **graphics)
+{
+ return GdipCreateFromHWND(hwnd, graphics);
+}
+
GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE hemf, BOOL delete,
GpMetafile **metafile)
{
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 77f1597..168eae3 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -47,6 +47,11 @@ static void test_constructor_destructor(void)
stat = GdipDeleteGraphics(graphics);
expect(Ok, stat);
+ stat = GdipCreateFromHWNDICM(NULL, &graphics);
+ expect(Ok, stat);
+ stat = GdipDeleteGraphics(graphics);
+ expect(Ok, stat);
+
stat = GdipDeleteGraphics(NULL);
expect(InvalidParameter, stat);
ReleaseDC(0, hdc);
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 8c46888..55ebe91 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -53,6 +53,7 @@ GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL);
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**);
GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC,HANDLE,GpGraphics**);
GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**);
+GpStatus WINGDIPAPI GdipCreateFromHWNDICM(HWND,GpGraphics**);
GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF*,GDIPCONST GpPointF*,
ARGB,ARGB,GpWrapMode,GpLineGradient**);
GpStatus WINGDIPAPI GdipCreateLineBrushI(GDIPCONST GpPoint*,GDIPCONST GpPoint*,
--
1.4.4.4
More information about the wine-patches
mailing list