]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkcursor.c
Scan gdk/x11 sources for Gdk-3.0.gir
[~andy/gtk] / gdk / gdkcursor.c
index c28e67e193029dcf5ee82c876bfadc64f728ccce..dbed4f2e107b6933a844883545cb149b2d4482fb 100644 (file)
@@ -1,4 +1,4 @@
-/* GDK - The GTK+ Drawing Kit
+/* GDK - The GIMP Drawing Kit
  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  *
  * This library is free software; you can redistribute it and/or
 #include "gdkcursor.h"
 #include "gdkdisplay.h"
 #include "gdkinternals.h"
-#include "gdkalias.h"
 
-GType
-gdk_cursor_get_type (void)
-{
-  static GType our_type = 0;
-  
-  if (our_type == 0)
-    our_type = g_boxed_type_register_static (g_intern_static_string ("GdkCursor"),
-                                            (GBoxedCopyFunc)gdk_cursor_ref,
-                                            (GBoxedFreeFunc)gdk_cursor_unref);
-  return our_type;
-}
+
+G_DEFINE_BOXED_TYPE (GdkCursor, gdk_cursor,
+                     gdk_cursor_ref,
+                     gdk_cursor_unref)
 
 /**
  * gdk_cursor_ref:
@@ -88,8 +80,7 @@ gdk_cursor_unref (GdkCursor *cursor)
  * Creates a new cursor from the set of builtin cursors for the default display.
  * See gdk_cursor_new_for_display().
  *
- * To make the cursor invisible, use gdk_cursor_new_from_pixmap() to create
- * a cursor with no pixels in it.
+ * To make the cursor invisible, use %GDK_BLANK_CURSOR.
  * 
  * Return value: a new #GdkCursor
  **/
@@ -99,5 +90,19 @@ gdk_cursor_new (GdkCursorType cursor_type)
   return gdk_cursor_new_for_display (gdk_display_get_default(), cursor_type);
 }
 
-#define __GDK_CURSOR_C__
-#include "gdkaliasdef.c"
+/**
+ * gdk_cursor_get_cursor_type:
+ * @cursor:  a #GdkCursor
+ *
+ * Returns the cursor type for this cursor.
+ *
+ * Return value: a #GdkCursorType
+ *
+ * Since: 2.22
+ **/
+GdkCursorType
+gdk_cursor_get_cursor_type (GdkCursor *cursor)
+{
+  g_return_val_if_fail (cursor != NULL, GDK_BLANK_CURSOR);
+  return cursor->type;
+}