[gtk+/client-side-decorations: 71/92] add gdk_window_get_cursor()



commit a571b168d723c8c20f0496b1a7fd7febb68bc14a
Author: Cody Russell <bratsche gnome org>
Date:   Thu Jul 16 01:16:01 2009 -0500

    add gdk_window_get_cursor()

 gdk/gdkwindow.c |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index e264feb..9a9ccc7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -481,14 +481,13 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
 
 
   /* Properties */
-
   /**
    * GdkWindow:cursor:
    *
    * The mouse pointer for a #GdkWindow. See gdk_window_set_cursor() and
    * gdk_window_get_cursor() for details.
    *
-   * Since: 2.18
+   * Since: 2.20
    */
   g_object_class_install_property (object_class,
                                    PROP_CURSOR,
@@ -7945,6 +7944,30 @@ gdk_window_get_cursor (GdkWindow *window)
 }
 
 /**
+ * gdk_window_get_cursor:
+ * @window: a #GdkWindow
+ * @cursor: a cursor
+ *
+ * Retrieves a #GdkCursor pointer for the cursor currently set on the
+ * specified #GdkWindow, or %NULL.  If the return value is %NULL then
+ * there is no custom cursor set on the specified window, and it is
+ * using the cursor for its parent window.
+ *
+ * Since: 2.18
+ */
+GdkCursor *
+gdk_window_get_cursor (GdkWindow *window)
+{
+  GdkWindowObject *private;
+
+  g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
+
+  private = (GdkWindowObject *) window;
+
+  return private->cursor;
+}
+
+/**
  * gdk_window_set_cursor:
  * @window: a #GdkWindow
  * @cursor: a cursor



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]