Module: wine Branch: master Commit: eb18ce9d4e583d62afa2c3c69194c01fc14d15b4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=eb18ce9d4e583d62afa2c3c691...
Author: Nikolay Sivov bunglehead@gmail.com Date: Fri May 9 16:40:41 2008 +0400
gdiplus: Added GdipCreateFromHWNDICM (no icm yet) 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*,