-/* 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:
* 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
**/
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;
+}