summaryrefslogtreecommitdiff
path: root/gdk/gdkcursor.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-12-20 14:07:11 +0100
committerMatthias Clasen <mclasen@redhat.com>2010-12-21 12:07:06 -0500
commit7a3359223179468b42fa0130457ec60694ce6ec1 (patch)
tree3d49cf229354ab238a8fb78ad2db6b1afd72f7a0 /gdk/gdkcursor.c
parent60dc856dafc6468637511be8cf511479fd0fb244 (diff)
downloadgtk+-7a3359223179468b42fa0130457ec60694ce6ec1.tar.gz
gdk: Move gdk_cursor_get_image() to the base class
.. and make it call a vfunc on the cursor
Diffstat (limited to 'gdk/gdkcursor.c')
-rw-r--r--gdk/gdkcursor.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdk/gdkcursor.c b/gdk/gdkcursor.c
index f6d229c36b..fe5f38ced7 100644
--- a/gdk/gdkcursor.c
+++ b/gdk/gdkcursor.c
@@ -374,3 +374,24 @@ gdk_cursor_get_display (GdkCursor *cursor)
return cursor->display;
}
+/**
+ * gdk_cursor_get_image:
+ * @cursor: a #GdkCursor
+ *
+ * Returns a #GdkPixbuf with the image used to display the cursor.
+ *
+ * Note that depending on the capabilities of the windowing system and
+ * on the cursor, GDK may not be able to obtain the image data. In this
+ * case, %NULL is returned.
+ *
+ * Returns: (transfer full): a #GdkPixbuf representing @cursor, or %NULL
+ *
+ * Since: 2.8
+ */
+GdkPixbuf*
+gdk_cursor_get_image (GdkCursor *cursor)
+{
+ g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL);
+
+ return GDK_CURSOR_GET_CLASS (cursor)->get_image (cursor);
+}