Evan Stade : gdiplus: Allow non-default GdiplusStartupInput.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 6 08:03:36 CDT 2007


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

Author: Evan Stade <estade at gmail.com>
Date:   Fri Aug  3 17:30:17 2007 -0700

gdiplus: Allow non-default GdiplusStartupInput.

---

 dlls/gdiplus/gdiplus.c |   39 ++++++++++++++++++++++++++++++---------
 1 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c
index 9267b90..3787836 100644
--- a/dlls/gdiplus/gdiplus.c
+++ b/dlls/gdiplus/gdiplus.c
@@ -32,6 +32,20 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
 
+static Status WINAPI NotificationHook(ULONG_PTR *token)
+{
+    TRACE("%p\n", token);
+    if(!token)
+        return InvalidParameter;
+
+    return Ok;
+}
+
+static void WINAPI NotificationUnhook(ULONG_PTR token)
+{
+    TRACE("%ld\n", token);
+}
+
 /*****************************************************
  *      DllMain
  */
@@ -57,20 +71,27 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
 Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input,
                              struct GdiplusStartupOutput *output)
 {
-    if(!token)
+    if(!token || !input)
         return InvalidParameter;
 
-    if(input->GdiplusVersion != 1) {
+    TRACE("%p %p %p\n", token, input, output);
+    TRACE("GdiplusStartupInput %d %p %d %d\n", input->GdiplusVersion,
+          input->DebugEventCallback, input->SuppressBackgroundThread,
+          input->SuppressExternalCodecs);
+
+    if(input->GdiplusVersion != 1)
         return UnsupportedGdiplusVersion;
-    } else if ((input->DebugEventCallback) ||
-        (input->SuppressBackgroundThread) || (input->SuppressExternalCodecs)){
-        FIXME("Unimplemented for non-default GdiplusStartupInput\n");
-        return NotImplemented;
-    } else if(output) {
-        FIXME("Unimplemented for non-null GdiplusStartupOutput\n");
-        return NotImplemented;
+
+    if(input->SuppressBackgroundThread){
+        if(!output)
+            return InvalidParameter;
+
+        output->NotificationHook = NotificationHook;
+        output->NotificationUnhook = NotificationUnhook;
     }
 
+    /* FIXME: DebugEventCallback ignored */
+
     return Ok;
 }
 




More information about the wine-cvs mailing list