Module: wine Branch: master Commit: a781bbf096d9a3264fe52fa90891b5a19fca9e4d URL: http://source.winehq.org/git/wine.git/?a=commit;h=a781bbf096d9a3264fe52fa908...
Author: Evan Stade estade@gmail.com Date: Fri Jun 8 13:46:27 2007 -0700
gdiplus: Added beginnings of memory and startup functions.
---
dlls/gdiplus/gdiplus.c | 38 +++++++++++++++++++++++++++++++++++++- dlls/gdiplus/gdiplus.spec | 8 ++++---- 2 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index 367fab5..2cb04a6 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Evan Stade + * Copyright (C) 2007 Google (Evan Stade) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +22,7 @@ #include "winbase.h" #include "winerror.h" #include "wine/debug.h" +#include "gdiplus.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
@@ -43,3 +44,38 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) } return TRUE; } + +Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, + struct GdiplusStartupOutput *output) +{ + if(!token) + return InvalidParameter; + + if(input->GdiplusVersion != 1) { + return UnsupportedGdiplusVersion; + } else if ((input->DebugEventCallback) || + (input->SuppressBackgroundThread) || (input->SuppressExternalCodecs)){ + FIXME("Unimplemented for non-default GdiplusStartupInput"); + return NotImplemented; + } else if(output) { + FIXME("Unimplemented for non-null GdiplusStartupOutput"); + return NotImplemented; + } + + return Ok; +} + +void WINAPI GdiplusShutdown(ULONG_PTR token) +{ + /* FIXME: no object tracking */ +} + +void* WINGDIPAPI GdipAlloc(SIZE_T size) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); +} + +void WINGDIPAPI GdipFree(void* ptr) +{ + HeapFree(GetProcessHeap(), 0, ptr); +} diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 863be69..99b56b8 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -31,7 +31,7 @@ @ stub GdipAddPathRectanglesI @ stub GdipAddPathString @ stub GdipAddPathStringI -@ stub GdipAlloc +@ stdcall GdipAlloc(long) @ stub GdipBeginContainer2 @ stub GdipBeginContainer @ stub GdipBeginContainerI @@ -222,7 +222,7 @@ @ stub GdipFillRegion @ stub GdipFlattenPath @ stub GdipFlush -@ stub GdipFree +@ stdcall GdipFree(ptr) @ stub GdipGetAdjustableArrowCapFillState @ stub GdipGetAdjustableArrowCapHeight @ stub GdipGetAdjustableArrowCapMiddleInset @@ -605,5 +605,5 @@ @ stub GdipWindingModeOutline @ stub GdiplusNotificationHook @ stub GdiplusNotificationUnhook -@ stub GdiplusShutdown -@ stub GdiplusStartup +@ stdcall GdiplusShutdown(ptr) +@ stdcall GdiplusStartup(ptr ptr ptr)