Fix missing (transfer) annotations in GDK

Mostly missing (transfer none).
This commit is contained in:
Milan Bouchet-Valat 2010-11-24 20:13:09 +01:00
parent c00b85bf3f
commit 2e3935ba9d
18 changed files with 63 additions and 58 deletions

View File

@ -316,8 +316,8 @@ gdk_get_display_arg_name (void)
* display has previously been set, simply returns that. An internal * display has previously been set, simply returns that. An internal
* function that should not be used by applications. * function that should not be used by applications.
* *
* Return value: the default display, if it could be opened, * Return value: (transfer none): the default display, if it could be
* otherwise %NULL. * opened, otherwise %NULL.
**/ **/
GdkDisplay * GdkDisplay *
gdk_display_open_default_libgtk_only (void) gdk_display_open_default_libgtk_only (void)

View File

@ -745,8 +745,8 @@ gdk_device_set_axis_use (GdkDevice *device,
* *
* Returns the #GdkDisplay to which @device pertains. * Returns the #GdkDisplay to which @device pertains.
* *
* Returns: a #GdkDisplay. This memory is owned by GTK+, * Returns: (transfer none): a #GdkDisplay. This memory is owned
* and must not be freed or unreffed. * by GTK+, and must not be freed or unreffed.
* *
* Since: 3.0 * 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 * If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be
* returned, as there is no associated device. * returned, as there is no associated device.
* *
* Returns: The associated device, or %NULL * Returns: (transfer none): The associated device, or %NULL
* *
* Since: 3.0 * Since: 3.0
**/ **/

View File

@ -260,8 +260,9 @@ gdk_device_manager_get_property (GObject *object,
* *
* Gets the #GdkDisplay associated to @device_manager. * Gets the #GdkDisplay associated to @device_manager.
* *
* Returns: the #GdkDisplay to which @device_manager is * Returns: (transfer none): the #GdkDisplay to which @device_manager is
* associated to, or #NULL. * associated to, or #NULL. This memory is owned by GDK and
* must not be freed or unreferenced.
* *
* Since: 3.0 * 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 * 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. * 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 * Since: 3.0
**/ **/

View File

@ -654,8 +654,8 @@ gdk_event_send_clientmessage_toall (GdkEvent *event)
* *
* Returns the core pointer device for the default display. * Returns the core pointer device for the default display.
* *
* Return value: the core pointer device; this is owned by the * Return value: (transfer none): the core pointer device; this is owned
* display and should not be freed. * by the display and should not be freed.
* *
* Deprecated: 3.0: Use gdk_device_manager_get_client_pointer() instead, or * Deprecated: 3.0: Use gdk_device_manager_get_client_pointer() instead, or
* gdk_event_get_device() if a #GdkEvent with pointer device * 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 * 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. * display and should not be freed.
* *
* Since: 2.2 * 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 * 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). * %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 * 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 * #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. * 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 * Since: 3.0
**/ **/
@ -1067,7 +1067,7 @@ multihead_default_window_at_pointer (GdkDisplay *display,
* event recorder. Applications should never have any * event recorder. Applications should never have any
* reason to use this facility. * reason to use this facility.
* *
* Return value: the previous pointer hook table * Return value: (transfer none): the previous pointer hook table
* *
* Since: 2.2 * Since: 2.2
* *
@ -1853,7 +1853,7 @@ gdk_display_device_is_grabbed (GdkDisplay *display,
* *
* Returns the #GdkDeviceManager associated to @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. * owned by GDK and must not be freed or unreferenced.
* *
* Since: 3.0 * Since: 3.0

View File

@ -1277,7 +1277,7 @@ gdk_event_set_screen (GdkEvent *event,
* to which <literal>event->motion.x_root</literal> and * to which <literal>event->motion.x_root</literal> and
* <literal>event->motion.y_root</literal> are relative. * <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 * Since: 2.2
**/ **/

View File

@ -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: the #GdkKeymap attached to the default display. * Returns: (transfer none): the #GdkKeymap attached to the default display.
*/ */
GdkKeymap* GdkKeymap*
gdk_keymap_get_default (void) gdk_keymap_get_default (void)

View File

@ -703,8 +703,8 @@ gdk_offscreen_window_set_embedder (GdkWindow *window,
* *
* Gets the window that @window is embedded in. * Gets the window that @window is embedded in.
* *
* Returns: the embedding #GdkWindow, or %NULL if @window is not an * Returns: (transfer none): the embedding #GdkWindow, or %NULL
* embedded offscreen window * if @window is not an mbedded offscreen window
* *
* Since: 2.18 * Since: 2.18
*/ */

View File

@ -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 * is more convenient if you want to keep a context around and track
* changes to the screen's font rendering settings. * 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 * PangoContext *
gdk_pango_context_get (void) 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 * is more convenient if you want to keep a context around and track
* changes to the screen's font rendering settings. * 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 * Since: 2.2
**/ **/

View File

@ -97,9 +97,9 @@ gdk_selection_owner_set (GdkWindow *owner,
* *
* Determines the owner of the given selection. * Determines the owner of the given selection.
* *
* Returns: if there is a selection owner for this window, * Returns: (transfer none): if there is a selection owner for
* and it is a window known to the current process, * this window, and it is a window known to the current
* the #GdkWindow that owns the selection, otherwise * process, the #GdkWindow that owns the selection, otherwise
* %NULL. Note that the return value may be owned * %NULL. Note that the return value may be owned
* by a different process if a foreign window * by a different process if a foreign window
* was previously created for that window, but * was previously created for that window, but

View File

@ -2212,7 +2212,7 @@ gdk_window_get_window_type (GdkWindow *window)
* *
* Gets the #GdkVisual describing the pixel format of @window. * Gets the #GdkVisual describing the pixel format of @window.
* *
* Return value: a #GdkVisual * Return value: (transfer none): a #GdkVisual
* *
* Since: 2.24 * Since: 2.24
**/ **/
@ -2234,7 +2234,7 @@ gdk_window_get_visual (GdkWindow *window)
* *
* Gets the #GdkScreen associated with a #GdkWindow. * 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 * Since: 2.24
**/ **/
@ -2256,7 +2256,7 @@ gdk_window_get_screen (GdkWindow *window)
* *
* Gets the #GdkDisplay associated with a #GdkWindow. * 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 * Since: 2.24
**/ **/
@ -5130,7 +5130,7 @@ gdk_window_at_pointer (gint *win_x,
* Obtains the root window (parent all other windows are inside) * Obtains the root window (parent all other windows are inside)
* for the default display and screen. * for the default display and screen.
* *
* Return value: the default root window * Return value: (transfer none): the default root window
**/ **/
GdkWindow * GdkWindow *
gdk_get_default_root_window (void) 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 * For example in the X backend, a native window handle is an Xlib
* <type>XID</type>. * <type>XID</type>.
* *
* Return value: the newly-created #GdkWindow wrapper for the * Return value: (transfer full): the newly-created #GdkWindow wrapper
* native window or %NULL if the window has been destroyed. * for the native window, or %NULL if the window has been destroyed.
**/ **/
GdkWindow * GdkWindow *
gdk_window_foreign_new (GdkNativeWindow anid) gdk_window_foreign_new (GdkNativeWindow anid)

View File

@ -362,7 +362,7 @@ gdk_x11_cursor_get_xcursor (GdkCursor *cursor)
* *
* Returns the display on which the #GdkCursor is defined. * 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 * 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 * on the cursor, GDK may not be able to obtain the image data. In this
* case, %NULL is returned. * case, %NULL is returned.
* *
* Returns: a #GdkPixbuf representing @cursor, or %NULL * Returns: (transfer full): a #GdkPixbuf representing @cursor, or %NULL
* *
* Since: 2.8 * Since: 2.8
*/ */

View File

@ -1187,11 +1187,12 @@ _gdk_input_init (GdkDisplay *display)
/** /**
* gdk_display_open: * gdk_display_open:
* @display_name: the name of the display to 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. * Opens a display.
* *
* Return value: (transfer none): a #GdkDisplay, or %NULL if the display
* could not be opened.
*
* Since: 2.2 * Since: 2.2
*/ */
GdkDisplay * 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 a screen object for one of the screens of the display.
* *
* Returns: the #GdkScreen object * Returns: (transfer none): the #GdkScreen object
* *
* Since: 2.2 * Since: 2.2
*/ */
@ -1601,7 +1602,7 @@ gdk_display_get_screen (GdkDisplay *display,
* *
* Get the default #GdkScreen for @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 * Since: 2.2
*/ */
@ -1771,7 +1772,8 @@ gdk_display_flush (GdkDisplay *display)
* on @display. This window is implicitly created by GDK. * on @display. This window is implicitly created by GDK.
* See gdk_window_set_group(). * 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 * Since: 2.4
**/ **/
@ -1935,7 +1937,7 @@ gdk_display_x11_finalize (GObject *object)
* *
* Find the #GdkDisplay corresponding to @display, if any exists. * 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 * Since: 2.2
**/ **/

View File

@ -257,7 +257,7 @@ gdk_drag_context_set_device (GdkDragContext *context,
* *
* Returns the #GdkDevice associated to the drag context. * Returns the #GdkDevice associated to the drag context.
* *
* Returns: The #GdkDevice associated to @context. * Returns: (transfer none): The #GdkDevice associated to @context.
**/ **/
GdkDevice * GdkDevice *
gdk_drag_context_get_device (GdkDragContext *context) 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. * This function is called by the drag source.
* *
* Return value: a newly created #GdkDragContext. * Return value: (transfer full): a newly created #GdkDragContext.
**/ **/
GdkDragContext * GdkDragContext *
gdk_drag_begin (GdkWindow *window, gdk_drag_begin (GdkWindow *window,

View File

@ -289,10 +289,11 @@ get_xkb (GdkKeymapX11 *keymap_x11)
/** /**
* gdk_keymap_get_for_display: * gdk_keymap_get_for_display:
* @display: the #GdkDisplay. * @display: the #GdkDisplay.
* @returns: the #GdkKeymap attached to @display.
* *
* Returns the #GdkKeymap attached to @display. * Returns the #GdkKeymap attached to @display.
* *
* Return value: (transfer none): the #GdkKeymap attached to @display.
*
* Since: 2.2 * Since: 2.2
**/ **/
GdkKeymap* GdkKeymap*

View File

@ -117,7 +117,7 @@ _gdk_screen_x11_init (GdkScreenX11 *screen)
* *
* Gets the display to which the @screen belongs. * 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 * 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 * @screen: a #GdkScreen
* *
* Returns the screen's currently active window. * 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 * The returned window should be unrefed using g_object_unref() when
* no longer needed. * no longer needed.
* *
* Return value: the currently active window, or %NULL. * Return value: (transfer full): the currently active window, or %NULL.
* *
* Since: 2.10 * Since: 2.10
**/ **/

View File

@ -197,9 +197,9 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
* process if a foreign window was previously created for that * process if a foreign window was previously created for that
* window, but a new foreign window will never be created by this call. * 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 * Returns: (transfer none): if there is a selection owner for this window,
* window known to the current process, the #GdkWindow that owns the * and it is a window known to the current process, the #GdkWindow that
* selection, otherwise %NULL. * owns the selection, otherwise %NULL.
* *
* Since: 2.2 * Since: 2.2
*/ */

View File

@ -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 * For example in the X backend, a native window handle is an Xlib
* <type>XID</type>. * <type>XID</type>.
* *
* Return value: a #GdkWindow wrapper for the native window or * Return value: (transfer full): a #GdkWindow wrapper for the native
* %NULL if the window has been destroyed. The wrapper will be * window, or %NULL if the window has been destroyed. The wrapper
* newly created, if one doesn't exist already. * will be newly created, if one doesn't exist already.
* *
* Since: 2.2 * 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 * For example in the X backend, a native window handle is an Xlib
* <type>XID</type>. * <type>XID</type>.
* *
* Return value: the #GdkWindow wrapper for the native window, * Return value: (transfer none): the #GdkWindow wrapper for the native
* or %NULL if there is none. * window, or %NULL if there is none.
* *
* Since: 2.2 * 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 * For example in the X backend, a native window handle is an Xlib
* <type>XID</type>. * <type>XID</type>.
* *
* Return value: the #GdkWindow wrapper for the native window, * Return value: (transfer none): the #GdkWindow wrapper for the native
* or %NULL if there is none. * window, or %NULL if there is none.
**/ **/
GdkWindow * GdkWindow *
gdk_window_lookup (GdkNativeWindow anid) gdk_window_lookup (GdkNativeWindow anid)

View File

@ -80,8 +80,8 @@ _gdk_xid_table_remove (GdkDisplay *display,
* *
* Returns the GDK object associated with the given X id. * Returns the GDK object associated with the given X id.
* *
* Return value: the associated #GdkWindow or %NULL if no * Return value: (transfer none): the associated #GdkWindow, or %NULL
* object is associated with the X id. * of no object is associated with the X id.
* *
* Since: 2.2 * 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 * Returns the Gdk object associated with the given X id for the default
* display. * display.
* *
* Return value: the associated #GdkWindow or %NULL if no * Return value: (transfer none): the associated #GdkWindow, or %NULL
* object is associated with the X id. * if no object is associated with the X id.
*/ */
gpointer gpointer
gdk_xid_table_lookup (XID xid) gdk_xid_table_lookup (XID xid)