X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gdk%2Fgdkcursor.c;h=0b2b80d9aa260b50ae15722417871fc4cd32e457;hb=9d0febc9a64a5bfb0fcfc3a88de4757f6c1ff090;hp=2369478225bae0ff2becb248aff5b1492071224c;hpb=7a14b30ea37d4cb9b021df3d9d6036cb15f19df1;p=~andy%2Fgtk diff --git a/gdk/gdkcursor.c b/gdk/gdkcursor.c index 236947822..0b2b80d9a 100644 --- a/gdk/gdkcursor.c +++ b/gdk/gdkcursor.c @@ -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 . */ /* @@ -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 */ @@ -354,3 +352,44 @@ 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. + * + * Returns the display on which the #GdkCursor is defined. + * + * Returns: (transfer none): the #GdkDisplay associated to @cursor + * + * Since: 2.2 + */ + +GdkDisplay * +gdk_cursor_get_display (GdkCursor *cursor) +{ + g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL); + + 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); +}