* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include "config.h"
#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;
+}
+
+/**
+ * gdk_cursor_ref:
+ * @cursor: a #GdkCursor
+ *
+ * Adds a reference to @cursor.
+ *
+ * Return value: Same @cursor that was passed in
+ **/
GdkCursor*
gdk_cursor_ref (GdkCursor *cursor)
{
return cursor;
}
+/**
+ * gdk_cursor_unref:
+ * @cursor: a #GdkCursor
+ *
+ * Removes a reference from @cursor, deallocating the cursor
+ * if no references remain.
+ *
+ **/
void
gdk_cursor_unref (GdkCursor *cursor)
{
_gdk_cursor_destroy (cursor);
}
+/**
+ * gdk_cursor_new:
+ * @cursor_type: cursor to create
+ *
+ * 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_BLANK_CURSOR.
+ *
+ * Return value: a new #GdkCursor
+ **/
+GdkCursor*
+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"