[GI] Backport transfer annotations

This commit is contained in:
Martin Pitt 2011-01-26 14:09:25 +01:00
parent 5cded4d5e2
commit a33dceee4b
8 changed files with 27 additions and 15 deletions

View File

@ -649,7 +649,7 @@ gtk_clipboard_set_with_owner (GtkClipboard *clipboard,
* gtk_clipboard_clear() has not subsequently called, returns the owner set
* by gtk_clipboard_set_with_owner().
*
* Return value: the owner of the clipboard, if any; otherwise %NULL.
* Return value: (transfer none): the owner of the clipboard, if any; otherwise %NULL.
**/
GObject *
gtk_clipboard_get_owner (GtkClipboard *clipboard)
@ -1407,7 +1407,8 @@ clipboard_rich_text_received_func (GtkClipboard *clipboard,
* waits for the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
*
* Return value: a newly-allocated binary block of data which must
* Return value: (array length=length) (transfer full): a
* newly-allocated binary block of data which must
* be freed with g_free(), or %NULL if retrieving
* the selection data failed. (This could happen
* for various reasons, in particular if the
@ -1473,7 +1474,7 @@ clipboard_image_received_func (GtkClipboard *clipboard,
* the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
*
* Return value: a newly-allocated #GdkPixbuf object which must
* Return value: (transfer full): a newly-allocated #GdkPixbuf object which must
* be disposed with g_object_unref(), or %NULL if
* retrieving the selection data failed. (This
* could happen for various reasons, in particular
@ -1569,7 +1570,7 @@ gtk_clipboard_wait_for_uris (GtkClipboard *clipboard)
*
* Gets the #GdkDisplay associated with @clipboard
*
* Return value: the #GdkDisplay associated with @clipboard
* Return value: (transfer none): the #GdkDisplay associated with @clipboard
*
* Since: 2.2
**/
@ -1725,7 +1726,8 @@ gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard)
/**
* gtk_clipboard_wait_for_targets
* @clipboard: a #GtkClipboard
* @targets: location to store an array of targets. The result
* @targets: (out) (array length=n_targets) (transfer container):
* location to store an array of targets. The result
* stored here must be freed with g_free().
* @n_targets: location to store number of items in @targets.
*

View File

@ -1000,9 +1000,10 @@ gtk_container_class_find_child_property (GObjectClass *cclass,
/**
* gtk_container_class_list_child_properties:
* @cclass: a #GtkContainerClass
* @cclass: (type GtkContainerClass): a #GtkContainerClass
* @n_properties: location to return the number of child properties found
* @returns: a newly allocated %NULL-terminated array of #GParamSpec*.
* @returns: (array length=n_properties) (transfer container): a newly
* allocated %NULL-terminated array of #GParamSpec*.
* The array must be freed with g_free().
*
* Returns all child properties of a container class.

View File

@ -696,7 +696,7 @@ gtk_dialog_add_action_widget (GtkDialog *dialog,
* appended to the end of the dialog's action area. The button widget is
* returned, but usually you don't need it.
*
* Return value: (transfer full): the button widget that was added
* Return value: (transfer none): the button widget that was added
**/
GtkWidget*
gtk_dialog_add_button (GtkDialog *dialog,

View File

@ -388,6 +388,13 @@ gtk_progress_bar_get_property (GObject *object,
}
}
/**
* gtk_progress_bar_new:
*
* Creates a new #GtkProgressBar.
*
* Returns: a #GtkProgressBar.
*/
GtkWidget*
gtk_progress_bar_new (void)
{

View File

@ -577,7 +577,7 @@ gtk_target_list_find (GtkTargetList *list,
* allocated and should be freed using gtk_target_table_free() when no
* longer needed.
*
* Return value: the new table.
* Return value: (array length=n_targets) (transfer full): the new table.
*
* Since: 2.10
**/
@ -611,7 +611,7 @@ gtk_target_table_new_from_list (GtkTargetList *list,
/**
* gtk_target_table_free:
* @targets: a #GtkTargetEntry array
* @targets: (array length=n_targets): a #GtkTargetEntry array
* @n_targets: the number of entries in the array
*
* This function frees a target table as returned by
@ -1798,7 +1798,8 @@ gtk_selection_data_get_uris (GtkSelectionData *selection_data)
/**
* gtk_selection_data_get_targets:
* @selection_data: a #GtkSelectionData object
* @targets: location to store an array of targets. The result
* @targets: (out) (array length=n_atoms) (transfer container):
* location to store an array of targets. The result
* stored here must be freed with g_free().
* @n_atoms: location to store number of items in @targets.
*

View File

@ -12769,7 +12769,7 @@ gtk_tree_view_get_bin_window (GtkTreeView *tree_view)
* @x: The x position to be identified (relative to bin_window).
* @y: The y position to be identified (relative to bin_window).
* @path: (out) (allow-none): A pointer to a #GtkTreePath pointer to be filled in, or %NULL
* @column: (out) (allow-none): A pointer to a #GtkTreeViewColumn pointer to be filled in, or %NULL
* @column: (out) (transfer none) (allow-none): A pointer to a #GtkTreeViewColumn pointer to be filled in, or %NULL
* @cell_x: (out) (allow-none): A pointer where the X coordinate relative to the cell can be placed, or %NULL
* @cell_y: (out) (allow-none): A pointer where the Y coordinate relative to the cell can be placed, or %NULL
*

View File

@ -9845,8 +9845,9 @@ gtk_widget_class_find_style_property (GtkWidgetClass *klass,
* gtk_widget_class_list_style_properties:
* @klass: a #GtkWidgetClass
* @n_properties: location to return the number of style properties found
* @returns: an newly allocated array of #GParamSpec*. The array must
* be freed with g_free().
* @returns: (array length=n_properties) (transfer container): an newly
* allocated array of #GParamSpec*. The array must be freed with
* g_free().
*
* Returns all style properties of a widget class.
*

View File

@ -3862,7 +3862,7 @@ gtk_window_set_default_icon_from_file (const gchar *filename,
* but the pixbufs in the list have not had their reference count
* incremented.
*
* Return value: copy of default icon list
* Return value: (element-type GdkPixbuf) (transfer container): copy of default icon list
**/
GList*
gtk_window_get_default_icon_list (void)