[gtk+] gtk: fix many callback annotations to include closure information
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk: fix many callback annotations to include closure information
- Date: Wed, 28 May 2014 04:24:51 +0000 (UTC)
commit e568903360be156973c5767cda2f3248e722d507
Author: Evan Nemerson <evan nemerson com>
Date: Mon May 26 09:24:00 2014 -0700
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
gtk/deprecated/gtkstock.h | 3 ++-
gtk/gtkcelllayout.c | 2 +-
gtk/gtkcelllayout.h | 2 +-
gtk/gtkclipboard.h | 9 ++++++---
gtk/gtkiconview.h | 2 +-
gtk/gtkmain.c | 2 +-
gtk/gtkmain.h | 2 +-
gtk/gtktexttagtable.h | 5 +++++
gtk/gtktreemodel.h | 2 +-
gtk/gtktreeviewcolumn.c | 2 +-
gtk/gtktreeviewcolumn.h | 2 +-
11 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/gtk/deprecated/gtkstock.h b/gtk/deprecated/gtkstock.h
index 1ef97e7..bdbed8c 100644
--- a/gtk/deprecated/gtkstock.h
+++ b/gtk/deprecated/gtkstock.h
@@ -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.
diff --git a/gtk/gtkcelllayout.c b/gtk/gtkcelllayout.c
index af9cee5..16b9e85 100644
--- a/gtk/gtkcelllayout.c
+++ b/gtk/gtkcelllayout.c
@@ -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.
diff --git a/gtk/gtkcelllayout.h b/gtk/gtkcelllayout.h
index 13cd9b2..3e3e33f 100644
--- a/gtk/gtkcelllayout.h
+++ b/gtk/gtkcelllayout.h
@@ -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.
diff --git a/gtk/gtkclipboard.h b/gtk/gtkclipboard.h
index 9fa8837..f7d27d7 100644
--- a/gtk/gtkclipboard.h
+++ b/gtk/gtkclipboard.h
@@ -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.
diff --git a/gtk/gtkiconview.h b/gtk/gtkiconview.h
index 4a2468c..d52f2a9 100644
--- a/gtk/gtkiconview.h
+++ b/gtk/gtkiconview.h
@@ -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.
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 16a0712..c1a6076 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -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.
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 11f2f74..8c3b17f 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -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.
diff --git a/gtk/gtktexttagtable.h b/gtk/gtktexttagtable.h
index e853c40..333f834 100644
--- a/gtk/gtktexttagtable.h
+++ b/gtk/gtktexttagtable.h
@@ -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 ())
diff --git a/gtk/gtktreemodel.h b/gtk/gtktreemodel.h
index 9eef7c6..3edece2 100644
--- a/gtk/gtktreemodel.h
+++ b/gtk/gtktreemodel.h
@@ -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.
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index c2439ea..64429fa 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -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
diff --git a/gtk/gtktreeviewcolumn.h b/gtk/gtktreeviewcolumn.h
index a991218..b91092e 100644
--- a/gtk/gtktreeviewcolumn.h
+++ b/gtk/gtktreeviewcolumn.h
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]