Commit 1744277b authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

gdiplus: Implement stub for GdipGraphicsSetAbort.

parent 417b2a4f
......@@ -622,7 +622,7 @@
622 stdcall GdipBitmapGetHistogramSize(long ptr)
623 stdcall GdipBitmapConvertFormat(ptr long long long ptr float)
624 stdcall GdipImageSetAbort(ptr ptr)
625 stub GdipGraphicsSetAbort
625 stdcall GdipGraphicsSetAbort(ptr ptr)
626 stub GdipDrawImageFX
627 stdcall GdipConvertToEmfPlus(ptr ptr ptr long ptr ptr)
628 stdcall GdipConvertToEmfPlusToFile(ptr ptr ptr ptr long ptr ptr)
......
......@@ -7147,3 +7147,16 @@ GpStatus WINGDIPAPI GdipResetPageTransform(GpGraphics *graphics)
return NotImplemented;
}
GpStatus WINGDIPAPI GdipGraphicsSetAbort(GpGraphics *graphics, GdiplusAbort *pabort)
{
TRACE("(%p, %p)\n", graphics, pabort);
if (!graphics)
return InvalidParameter;
if (pabort)
FIXME("Abort callback is not supported.\n");
return Ok;
}
......@@ -29,6 +29,8 @@
#define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got))
#define expectf(expected, got) expectf_((expected), (got), 0.001)
static GpStatus (WINAPI *pGdipGraphicsSetAbort)(GpGraphics*,GdiplusAbort*);
static const REAL mm_per_inch = 25.4;
static const REAL point_per_inch = 72.0;
static HWND hwnd;
......@@ -6149,11 +6151,40 @@ static void test_container_rects(void)
ReleaseDC(hwnd, hdc);
}
static void test_GdipGraphicsSetAbort(void)
{
HDC hdc;
GpStatus status;
GpGraphics *graphics;
if (!pGdipGraphicsSetAbort)
{
win_skip("GdipGraphicsSetAbort() is not supported.\n");
return;
}
hdc = GetDC(hwnd);
status = GdipCreateFromHDC(hdc, &graphics);
expect(Ok, status);
status = pGdipGraphicsSetAbort(NULL, NULL);
expect(InvalidParameter, status);
status = pGdipGraphicsSetAbort(graphics, NULL);
expect(Ok, status);
GdipDeleteGraphics(graphics);
ReleaseDC(hwnd, hdc);
}
START_TEST(graphics)
{
struct GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
WNDCLASSA class;
HMODULE gdiplus_mod = GetModuleHandleA("gdiplus.dll");
HMODULE hmsvcrt;
int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
......@@ -6162,6 +6193,8 @@ START_TEST(graphics)
_controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
pGdipGraphicsSetAbort = (void*)GetProcAddress(gdiplus_mod, "GdipGraphicsSetAbort");
memset( &class, 0, sizeof(class) );
class.lpszClassName = "gdiplus_test";
class.style = CS_HREDRAW | CS_VREDRAW;
......@@ -6230,6 +6263,7 @@ START_TEST(graphics)
test_GdipFillRectangles();
test_GdipGetVisibleClipBounds_memoryDC();
test_container_rects();
test_GdipGraphicsSetAbort();
GdiplusShutdown(gdiplusToken);
DestroyWindow( hwnd );
......
......@@ -263,6 +263,7 @@ GpStatus WINGDIPAPI GdipGetTextContrast(GpGraphics*,UINT*);
GpStatus WINGDIPAPI GdipGetTextRenderingHint(GpGraphics*,TextRenderingHint*);
GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics*,GpMatrix*);
GpStatus WINGDIPAPI GdipGraphicsClear(GpGraphics*,ARGB);
GpStatus WINGDIPAPI GdipGraphicsSetAbort(GpGraphics*,GdiplusAbort*);
GpStatus WINGDIPAPI GdipGetVisibleClipBounds(GpGraphics*,GpRectF*);
GpStatus WINGDIPAPI GdipGetVisibleClipBoundsI(GpGraphics*,GpRect*);
GpStatus WINGDIPAPI GdipIsClipEmpty(GpGraphics*, BOOL*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment