Commit e5689033 authored by Evan Nemerson's avatar Evan Nemerson

gtk: fix many callback annotations to include closure information

Without this information introspection-based consumers don't realize
they can include context information, but instead think that they
receive an extra gpointer argument (which they don't know how to
handle).

https://bugzilla.gnome.org/show_bug.cgi?id=730745
parent 2388c69f
......@@ -38,7 +38,8 @@ G_BEGIN_DECLS
* GtkTranslateFunc:
* @path: The id of the message. In #GtkActionGroup this will be a label
* or tooltip from a #GtkActionEntry.
* @func_data: user data passed in when registering the function
* @func_data: (closure): user data passed in when registering the
* function
*
* The function used to translate messages in e.g. #GtkIconFactory
* and #GtkActionGroup.
......
......@@ -500,7 +500,7 @@ gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout,
* @cell_layout: a #GtkCellLayout
* @cell: a #GtkCellRenderer
* @func: (allow-none): the #GtkCellLayoutDataFunc to use, or %NULL
* @func_data: user data for @func
* @func_data: (closure): user data for @func
* @destroy: destroy notify for @func_data
*
* Sets the #GtkCellLayoutDataFunc to use for @cell_layout.
......
......@@ -44,7 +44,7 @@ typedef struct _GtkCellLayoutIface GtkCellLayoutIface;
* @cell: the cell renderer whose value is to be set
* @tree_model: the model
* @iter: a #GtkTreeIter indicating the row to set the value for
* @data: user data passed to gtk_cell_layout_set_cell_data_func()
* @data: (closure): user data passed to gtk_cell_layout_set_cell_data_func()
*
* A function which should set the value of @cell_layout’s cell renderer(s)
* as appropriate.
......
......@@ -38,7 +38,8 @@ G_BEGIN_DECLS
* @selection_data: a #GtkSelectionData containing the data was received.
* If retrieving the data failed, then then length field
* of @selection_data will be negative.
* @data: the @user_data supplied to gtk_clipboard_request_contents().
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_contents().
*
* A function to be called when the results of gtk_clipboard_request_contents()
* are received, or when the request fails.
......@@ -71,7 +72,8 @@ typedef void (* GtkClipboardRichTextReceivedFunc) (GtkClipboard *clipboard,
* GtkClipboardImageReceivedFunc:
* @clipboard: the #GtkClipboard
* @pixbuf: the received image
* @data: the @user_data supplied to gtk_clipboard_request_image().
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_image().
*
* A function to be called when the results of gtk_clipboard_request_image()
* are received, or when the request fails.
......@@ -92,7 +94,8 @@ typedef void (* GtkClipboardURIReceivedFunc) (GtkClipboard *clipboard,
* @atoms: the supported targets, as array of #GdkAtom, or %NULL
* if retrieving the data failed.
* @n_atoms: the length of the @atoms array.
* @data: the @user_data supplied to gtk_clipboard_request_targets().
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_targets().
*
* A function to be called when the results of gtk_clipboard_request_targets()
* are received, or when the request fails.
......
......@@ -46,7 +46,7 @@ typedef struct _GtkIconViewPrivate GtkIconViewPrivate;
* GtkIconViewForeachFunc:
* @icon_view: a #GtkIconView
* @path: The #GtkTreePath of a selected row
* @data: user data
* @data: (closure): user data
*
* A function used by gtk_icon_view_selected_foreach() to map all
* selected rows. It will be called on every selected row in the view.
......
......@@ -2197,7 +2197,7 @@ gtk_device_grab_remove (GtkWidget *widget,
/**
* gtk_key_snooper_install: (skip)
* @snooper: a #GtkKeySnoopFunc
* @func_data: data to pass to @snooper
* @func_data: (closure): data to pass to @snooper
*
* Installs a key snooper function, which will get called on all
* key events before delivering them normally.
......
......@@ -54,7 +54,7 @@ G_BEGIN_DECLS
* GtkKeySnoopFunc:
* @grab_widget: the widget to which the event will be delivered
* @event: the key event
* @func_data: data supplied to gtk_key_snooper_install()
* @func_data: (closure): data supplied to gtk_key_snooper_install()
*
* Key snooper functions are called before normal event delivery.
* They can be used to implement custom key event handling.
......
......@@ -33,6 +33,11 @@
G_BEGIN_DECLS
/**
* GtkTextTagTableForeach:
* @tag: the #GtkTextTag
* @data: (closure): data passed to gtk_text_tag_table_foreach()
*/
typedef void (* GtkTextTagTableForeach) (GtkTextTag *tag, gpointer data);
#define GTK_TYPE_TEXT_TAG_TABLE (gtk_text_tag_table_get_type ())
......
......@@ -47,7 +47,7 @@ typedef struct _GtkTreeModelIface GtkTreeModelIface;
* @model: the #GtkTreeModel being iterated
* @path: the current #GtkTreePath
* @iter: the current #GtkTreeIter
* @data: The user data passed to gtk_tree_model_foreach()
* @data: (closure): The user data passed to gtk_tree_model_foreach()
*
* Type of the callback passed to gtk_tree_model_foreach() to
* iterate over the rows in a tree model.
......
......@@ -1823,7 +1823,7 @@ gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column,
* @tree_column: A #GtkTreeViewColumn
* @cell_renderer: A #GtkCellRenderer
* @func: (allow-none): The #GtkTreeCellDataFunc to use.
* @func_data: The user data for @func.
* @func_data: (closure): The user data for @func.
* @destroy: The destroy notification for @func_data
*
* Sets the #GtkTreeCellDataFunc to use for the column. This
......
......@@ -65,7 +65,7 @@ typedef enum
* @cell: The #GtkCellRenderer that is being rendered by @tree_column
* @tree_model: The #GtkTreeModel being rendered
* @iter: A #GtkTreeIter of the current row rendered
* @data: user data
* @data: (closure): user data
*
* A function to set the properties of a cell instead of just using the
* straight mapping between the cell and the model. This is useful for
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment