]> Pileus Git - ~andy/gtk/blobdiff - gdk/win32/gdkcursor-win32.c
Large changes to the Win32 backend, partially made necessary by the
[~andy/gtk] / gdk / win32 / gdkcursor-win32.c
index 6245c89b48ff821678c59113cf2546b53779b385..423b83f5313e5dd31a2e6783733a2fdd25c6ea97 100644 (file)
@@ -20,7 +20,8 @@
 #include "config.h"
 
 #include "gdkcursor.h"
-#include "gdkwin32.h"
+#include "gdkinternals.h"
+#include "gdkprivate-win32.h"
 
 static const struct { const char *name; int type; } cursors[] = {
   { "x_cursor", 0 },
@@ -117,7 +118,7 @@ gdk_cursor_new (GdkCursorType cursor_type)
     {
       xcursor = LoadCursor (gdk_DLLInstance, cursors[i].name);
       if (xcursor == NULL)
-       g_warning ("gdk_cursor_new: LoadCursor failed");
+       WIN32_API_FAILED ("LoadCursor");
       GDK_NOTE (MISC, g_print ("gdk_cursor_new: %#x %d\n",
                               xcursor, cursor_type));
     }
@@ -132,7 +133,7 @@ gdk_cursor_new (GdkCursorType cursor_type)
   private->xcursor = xcursor;
   cursor = (GdkCursor*) private;
   cursor->type = cursor_type;
-  cursor->refcount = 1;
+  cursor->ref_count = 1;
 
   return cursor;
 }
@@ -251,7 +252,8 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
   private->xcursor = xcursor;
   cursor = (GdkCursor*) private;
   cursor->type = GDK_CURSOR_IS_PIXMAP;
-
+  cursor->ref_count = 1;
+  
   return cursor;
 }
 
@@ -268,7 +270,7 @@ _gdk_cursor_destroy (GdkCursor *cursor)
 
   if (cursor->type == GDK_CURSOR_IS_PIXMAP)
     if (!DestroyIcon (private->xcursor))
-      g_warning ("_gdk_cursor_destroy: DestroyIcon failed");
+      WIN32_API_FAILED ("DestroyIcon");
 
   g_free (private);
 }