]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkcursor.c
broadway: pointer targets differ in signedness
[~andy/gtk] / gdk / gdkcursor.c
index f6d229c36b1856500020e234d7ae26f2cde61575..0b2b80d9aa260b50ae15722417871fc4cd32e457 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -150,7 +148,7 @@ gdk_cursor_init (GdkCursor *cursor)
  *
  * Adds a reference to @cursor.
  *
- * Return value: Same @cursor that was passed in
+ * Return value: (transfer full): Same @cursor that was passed in
  *
  * Deprecated: 3.0: Use g_object_ref() instead
  */
@@ -355,7 +353,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
   return GDK_DISPLAY_GET_CLASS (display)->get_cursor_for_pixbuf (display, pixbuf, x, y);
 }
 
-/** 
+/**
  * gdk_cursor_get_display:
  * @cursor: a #GdkCursor.
  *
@@ -374,3 +372,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);
+}