[gtk+] Fix missing (transfer) annotations in GDK



commit 2e3935ba9db3a7864b3eefed5da800b26aef97ef
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Wed Nov 24 20:13:09 2010 +0100

    Fix missing (transfer) annotations in GDK
    
    Mostly missing (transfer none).

 gdk/gdk.c                  |    4 ++--
 gdk/gdkdevice.c            |    6 +++---
 gdk/gdkdevicemanager.c     |    8 +++++---
 gdk/gdkdisplay.c           |   14 +++++++-------
 gdk/gdkevents.c            |    2 +-
 gdk/gdkkeys.c              |    2 +-
 gdk/gdkoffscreenwindow.c   |    4 ++--
 gdk/gdkpango.c             |    4 ++--
 gdk/gdkselection.c         |    6 +++---
 gdk/gdkwindow.c            |   12 ++++++------
 gdk/x11/gdkcursor-x11.c    |    4 ++--
 gdk/x11/gdkdisplay-x11.c   |   14 ++++++++------
 gdk/x11/gdkdnd-x11.c       |    4 ++--
 gdk/x11/gdkkeys-x11.c      |    3 ++-
 gdk/x11/gdkscreen-x11.c    |    6 +++---
 gdk/x11/gdkselection-x11.c |    6 +++---
 gdk/x11/gdkwindow-x11.c    |   14 +++++++-------
 gdk/x11/gdkxid.c           |    8 ++++----
 18 files changed, 63 insertions(+), 58 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index f0ff433..003ad34 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -316,8 +316,8 @@ gdk_get_display_arg_name (void)
  * display has previously been set, simply returns that. An internal
  * function that should not be used by applications.
  * 
- * Return value: the default display, if it could be opened,
- *   otherwise %NULL.
+ * Return value: (transfer none): the default display, if it could be
+ *   opened, otherwise %NULL.
  **/
 GdkDisplay *
 gdk_display_open_default_libgtk_only (void)
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index c8e3779..afe8b94 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -745,8 +745,8 @@ gdk_device_set_axis_use (GdkDevice   *device,
  *
  * Returns the #GdkDisplay to which @device pertains.
  *
- * Returns: a #GdkDisplay. This memory is owned by GTK+,
- *          and must not be freed or unreffed.
+ * Returns: (transfer none): a #GdkDisplay. This memory is owned
+ *          by GTK+, and must not be freed or unreffed.
  *
  * Since: 3.0
  **/
@@ -776,7 +776,7 @@ gdk_device_get_display (GdkDevice *device)
  * If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be
  * returned, as there is no associated device.
  *
- * Returns: The associated device, or %NULL
+ * Returns: (transfer none): The associated device, or %NULL
  *
  * Since: 3.0
  **/
diff --git a/gdk/gdkdevicemanager.c b/gdk/gdkdevicemanager.c
index 2edaa28..56499bc 100644
--- a/gdk/gdkdevicemanager.c
+++ b/gdk/gdkdevicemanager.c
@@ -260,8 +260,9 @@ gdk_device_manager_get_property (GObject      *object,
  *
  * Gets the #GdkDisplay associated to @device_manager.
  *
- * Returns: the #GdkDisplay to which @device_manager is
- *          associated to, or #NULL.
+ * Returns: (transfer none): the #GdkDisplay to which @device_manager is
+ *          associated to, or #NULL. This memory is owned by GDK and
+ *          must not be freed or unreferenced.
  *
  * Since: 3.0
  **/
@@ -312,7 +313,8 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
  * You should use this function sheldomly, only in code that isn't triggered by a #GdkEvent
  * and there aren't other means to get a meaningful #GdkDevice to operate on.
  *
- * Returns: The client pointer.
+ * Returns: (transfer none): The client pointer. This memory is
+ *          owned by GDK and must not be freed or unreferenced.
  *
  * Since: 3.0
  **/
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 69d8c6a..564d4b5 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -654,8 +654,8 @@ gdk_event_send_clientmessage_toall (GdkEvent *event)
  * 
  * Returns the core pointer device for the default display.
  * 
- * Return value: the core pointer device; this is owned by the
- *   display and should not be freed.
+ * Return value: (transfer none): the core pointer device; this is owned
+ *   by the display and should not be freed.
  *
  * Deprecated: 3.0: Use gdk_device_manager_get_client_pointer() instead, or
  *             gdk_event_get_device() if a #GdkEvent with pointer device
@@ -673,7 +673,7 @@ gdk_device_get_core_pointer (void)
  * 
  * Returns the core pointer device for the given display
  * 
- * Return value: the core pointer device; this is owned by the
+ * Return value: (transfer none): the core pointer device; this is owned by the
  *   display and should not be freed.
  *
  * Since: 2.2
@@ -810,7 +810,7 @@ gdk_display_get_device_state (GdkDisplay       *display,
  * Obtains the window underneath @device, returning the location of the device in @win_x and @win_y. Returns
  * %NULL if the window tree under @device is not known to GDK (for example, belongs to another application).
  *
- * Returns: the #GdkWindow under the device position, or %NULL.
+ * Returns: (transfer none): the #GdkWindow under the device position, or %NULL.
  *
  * Since: 3.0
  **/
@@ -846,7 +846,7 @@ gdk_display_get_window_at_device_position (GdkDisplay *display,
  * #GdkDevice on a particular #GdkDisplay. This is only useful for such low-level tools as
  * an event recorder. Applications should never have any reason to use this facility.
  *
- * Returns: The previous device hook table.
+ * Returns: (transfer none): The previous device hook table.
  *
  * Since: 3.0
  **/
@@ -1067,7 +1067,7 @@ multihead_default_window_at_pointer (GdkDisplay *display,
  * event recorder. Applications should never have any
  * reason to use this facility.
  *
- * Return value: the previous pointer hook table
+ * Return value: (transfer none): the previous pointer hook table
  *
  * Since: 2.2
  *
@@ -1853,7 +1853,7 @@ gdk_display_device_is_grabbed (GdkDisplay *display,
  *
  * Returns the #GdkDeviceManager associated to @display.
  *
- * Returns: A #GdkDeviceManager, or %NULL. This memory is
+ * Returns: (transfer none): A #GdkDeviceManager, or %NULL. This memory is
  *          owned by GDK and must not be freed or unreferenced.
  *
  * Since: 3.0
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 8b402fc..d60f3b1 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -1277,7 +1277,7 @@ gdk_event_set_screen (GdkEvent  *event,
  * to which <literal>event->motion.x_root</literal> and
  * <literal>event->motion.y_root</literal> are relative.
  * 
- * Return value: the screen for the event
+ * Return value: (transfer none): the screen for the event
  *
  * Since: 2.2
  **/
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index e72b8ea..102b6f0 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -412,7 +412,7 @@ gdk_keyval_is_lower (guint keyval)
  *
  * Returns the #GdkKeymap attached to the default display.
  *
- * Returns: the #GdkKeymap attached to the default display.
+ * Returns: (transfer none): the #GdkKeymap attached to the default display.
  */
 GdkKeymap*
 gdk_keymap_get_default (void)
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index f9be9ad..f7c071b 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -703,8 +703,8 @@ gdk_offscreen_window_set_embedder (GdkWindow     *window,
  *
  * Gets the window that @window is embedded in.
  *
- * Returns: the embedding #GdkWindow, or %NULL if @window is not an
- *     embedded offscreen window
+ * Returns: (transfer none): the embedding #GdkWindow, or %NULL
+ *     if @window is not an mbedded offscreen window
  *
  * Since: 2.18
  */
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index e21175b..907b517 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -317,7 +317,7 @@ gdk_pango_layout_get_clip_region (PangoLayout *layout,
  * is more convenient if you want to keep a context around and track
  * changes to the screen's font rendering settings.
  *
- * Return value: a new #PangoContext for the default display
+ * Return value: (transfer full): a new #PangoContext for the default display
  **/
 PangoContext *
 gdk_pango_context_get (void)
@@ -343,7 +343,7 @@ gdk_pango_context_get (void)
  * is more convenient if you want to keep a context around and track
  * changes to the screen's font rendering settings.
  * 
- * Return value: a new #PangoContext for @screen
+ * Return value: (transfer full): a new #PangoContext for @screen
  *
  * Since: 2.2
  **/
diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c
index 0a4b428..9468604 100644
--- a/gdk/gdkselection.c
+++ b/gdk/gdkselection.c
@@ -97,9 +97,9 @@ gdk_selection_owner_set (GdkWindow *owner,
  *
  * Determines the owner of the given selection.
  *
- * Returns: if there is a selection owner for this window,
- *   and it is a window known to the current process,
- *   the #GdkWindow that owns the selection, otherwise
+ * Returns: (transfer none): if there is a selection owner for
+ *   this window, and it is a window known to the current
+ *   process, the #GdkWindow that owns the selection, otherwise
  *   %NULL. Note that the return value may be owned
  *   by a different process if a foreign window
  *   was previously created for that window, but
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6264436..dca9df1 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2212,7 +2212,7 @@ gdk_window_get_window_type (GdkWindow *window)
  * 
  * Gets the #GdkVisual describing the pixel format of @window.
  * 
- * Return value: a #GdkVisual
+ * Return value: (transfer none): a #GdkVisual
  *
  * Since: 2.24
  **/
@@ -2234,7 +2234,7 @@ gdk_window_get_visual (GdkWindow *window)
  * 
  * Gets the #GdkScreen associated with a #GdkWindow.
  * 
- * Return value: the #GdkScreen associated with @window
+ * Return value: (transfer none): the #GdkScreen associated with @window
  *
  * Since: 2.24
  **/
@@ -2256,7 +2256,7 @@ gdk_window_get_screen (GdkWindow *window)
  * 
  * Gets the #GdkDisplay associated with a #GdkWindow.
  * 
- * Return value: the #GdkDisplay associated with @window
+ * Return value: (transfer none): the #GdkDisplay associated with @window
  *
  * Since: 2.24
  **/
@@ -5130,7 +5130,7 @@ gdk_window_at_pointer (gint *win_x,
  * Obtains the root window (parent all other windows are inside)
  * for the default display and screen.
  *
- * Return value: the default root window
+ * Return value: (transfer none): the default root window
  **/
 GdkWindow *
 gdk_get_default_root_window (void)
@@ -5148,8 +5148,8 @@ gdk_get_default_root_window (void)
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  *
- * Return value: the newly-created #GdkWindow wrapper for the
- *    native window or %NULL if the window has been destroyed.
+ * Return value: (transfer full): the newly-created #GdkWindow wrapper
+ *    for the native window, or %NULL if the window has been destroyed.
  **/
 GdkWindow *
 gdk_window_foreign_new (GdkNativeWindow anid)
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index b01325b..6038067 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -362,7 +362,7 @@ gdk_x11_cursor_get_xcursor (GdkCursor *cursor)
  *
  * Returns the display on which the #GdkCursor is defined.
  *
- * Returns: the #GdkDisplay associated to @cursor
+ * Returns: (transfer none): the #GdkDisplay associated to @cursor
  *
  * Since: 2.2
  */
@@ -387,7 +387,7 @@ gdk_cursor_get_display (GdkCursor *cursor)
  * on the cursor, GDK may not be able to obtain the image data. In this 
  * case, %NULL is returned.
  *
- * Returns: a #GdkPixbuf representing @cursor, or %NULL
+ * Returns: (transfer full): a #GdkPixbuf representing @cursor, or %NULL
  *
  * Since: 2.8
  */
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 148d167..0ced137 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1187,11 +1187,12 @@ _gdk_input_init (GdkDisplay *display)
 /**
  * gdk_display_open:
  * @display_name: the name of the display to open
- * @returns: a #GdkDisplay, or %NULL if the display
- *  could not be opened.
  *
  * Opens a display.
  *
+ * Return value: (transfer none): a #GdkDisplay, or %NULL if the display
+ *               could not be opened.
+ *
  * Since: 2.2
  */
 GdkDisplay *
@@ -1581,7 +1582,7 @@ gdk_display_get_n_screens (GdkDisplay *display)
  *
  * Returns a screen object for one of the screens of the display.
  *
- * Returns: the #GdkScreen object
+ * Returns: (transfer none): the #GdkScreen object
  *
  * Since: 2.2
  */
@@ -1601,7 +1602,7 @@ gdk_display_get_screen (GdkDisplay *display,
  *
  * Get the default #GdkScreen for @display.
  * 
- * Returns: the default #GdkScreen object for @display
+ * Returns: (transfer none): the default #GdkScreen object for @display
  *
  * Since: 2.2
  */
@@ -1771,7 +1772,8 @@ gdk_display_flush (GdkDisplay *display)
  * on @display. This window is implicitly created by GDK. 
  * See gdk_window_set_group().
  * 
- * Return value: The default group leader window for @display
+ * Return value: (transfer none): The default group leader window
+ * for @display
  *
  * Since: 2.4
  **/
@@ -1935,7 +1937,7 @@ gdk_display_x11_finalize (GObject *object)
  * 
  * Find the #GdkDisplay corresponding to @display, if any exists.
  * 
- * Return value: the #GdkDisplay, if found, otherwise %NULL.
+ * Return value: (transfer none): the #GdkDisplay, if found, otherwise %NULL.
  *
  * Since: 2.2
  **/
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 74e874b..e4d8cff 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -257,7 +257,7 @@ gdk_drag_context_set_device (GdkDragContext *context,
  *
  * Returns the #GdkDevice associated to the drag context.
  *
- * Returns: The #GdkDevice associated to @context.
+ * Returns: (transfer none): The #GdkDevice associated to @context.
  **/
 GdkDevice *
 gdk_drag_context_get_device (GdkDragContext *context)
@@ -3162,7 +3162,7 @@ gdk_drag_do_leave (GdkDragContext *context, guint32 time)
  *
  * This function is called by the drag source.
  * 
- * Return value: a newly created #GdkDragContext.
+ * Return value: (transfer full): a newly created #GdkDragContext.
  **/
 GdkDragContext * 
 gdk_drag_begin (GdkWindow     *window,
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index cb09d1f..20bb6ee 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -289,10 +289,11 @@ get_xkb (GdkKeymapX11 *keymap_x11)
 /** 
  * gdk_keymap_get_for_display:
  * @display: the #GdkDisplay.
- * @returns: the #GdkKeymap attached to @display.
  *
  * Returns the #GdkKeymap attached to @display.
  *
+ * Return value: (transfer none): the #GdkKeymap attached to @display.
+ *
  * Since: 2.2
  **/
 GdkKeymap*
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 8fb9ffc..90d35dc 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -117,7 +117,7 @@ _gdk_screen_x11_init (GdkScreenX11 *screen)
  *
  * Gets the display to which the @screen belongs.
  * 
- * Returns: the display to which @screen belongs
+ * Returns: (transfer none): the display to which @screen belongs
  *
  * Since: 2.2
  **/
@@ -1229,7 +1229,7 @@ gdk_screen_make_display_name (GdkScreen *screen)
 }
 
 /**
- * gdk_screen_get_active_window
+ * gdk_screen_get_active_window:
  * @screen: a #GdkScreen
  *
  * Returns the screen's currently active window.
@@ -1247,7 +1247,7 @@ gdk_screen_make_display_name (GdkScreen *screen)
  * The returned window should be unrefed using g_object_unref() when
  * no longer needed.
  *
- * Return value: the currently active window, or %NULL.
+ * Return value: (transfer full): the currently active window, or %NULL.
  *
  * Since: 2.10
  **/
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 03ec396..41be49e 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -197,9 +197,9 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
  * process if a foreign window was previously created for that
  * window, but a new foreign window will never be created by this call. 
  *
- * Returns: if there is a selection owner for this window, and it is a 
- *    window known to the current process, the #GdkWindow that owns the 
- *    selection, otherwise %NULL.
+ * Returns: (transfer none): if there is a selection owner for this window,
+ *    and it is a window known to the current process, the #GdkWindow that
+ *    owns the selection, otherwise %NULL.
  *
  * Since: 2.2
  */ 
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index b369e2c..ec90710 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -841,9 +841,9 @@ x_event_mask_to_gdk_event_mask (long mask)
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  * 
- * Return value: a #GdkWindow wrapper for the native window or 
- *   %NULL if the window has been destroyed. The wrapper will be
- *   newly created, if one doesn't exist already.
+ * Return value: (transfer full): a #GdkWindow wrapper for the native
+ *   window, or %NULL if the window has been destroyed. The wrapper
+ *   will be newly created, if one doesn't exist already.
  *
  * Since: 2.2
  **/
@@ -945,8 +945,8 @@ gdk_window_foreign_new_for_display (GdkDisplay     *display,
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  *
- * Return value: the #GdkWindow wrapper for the native window, 
- *    or %NULL if there is none.
+ * Return value: (transfer none): the #GdkWindow wrapper for the native
+ *    window, or %NULL if there is none.
  *
  * Since: 2.2
  **/
@@ -965,8 +965,8 @@ gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  *
- * Return value: the #GdkWindow wrapper for the native window, 
- *    or %NULL if there is none.
+ * Return value: (transfer none): the #GdkWindow wrapper for the native
+ *    window, or %NULL if there is none.
  **/
 GdkWindow *
 gdk_window_lookup (GdkNativeWindow anid)
diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c
index 94649b9..52b86c9 100644
--- a/gdk/x11/gdkxid.c
+++ b/gdk/x11/gdkxid.c
@@ -80,8 +80,8 @@ _gdk_xid_table_remove (GdkDisplay *display,
  *
  * Returns the GDK object associated with the given X id.
  *
- * Return value: the associated #GdkWindow or %NULL if no
- *     object is associated with the X id.
+ * Return value: (transfer none): the associated #GdkWindow, or %NULL
+ *     of no object is associated with the X id.
  *
  * Since: 2.2
  */
@@ -110,8 +110,8 @@ gdk_xid_table_lookup_for_display (GdkDisplay  *display,
  * Returns the Gdk object associated with the given X id for the default
  * display.
  *
- * Return value: the associated #GdkWindow or %NULL if no
- *     object is associated with the X id.
+ * Return value: (transfer none): the associated #GdkWindow, or %NULL
+ *     if no object is associated with the X id.
  */
 gpointer
 gdk_xid_table_lookup (XID xid)



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