[gtk: 1/3] Fix incorrect use of GIR closure annotations.



commit ea9f0df67b7c1b3153f031651a3fec2fa07aa419
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon Jan 13 14:11:15 2020 +1300

    Fix incorrect use of GIR closure annotations.
    
    They were being applied to the callback function, not the data that is passed
    to that function.

 gdk/gdkseat.c        |  4 ++--
 gtk/gtkcontainer.c   |  4 ++--
 gtk/gtkdrawingarea.c |  4 ++--
 gtk/gtkflowbox.c     |  8 ++++----
 gtk/gtklistbox.c     | 12 ++++++------
 5 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/gdk/gdkseat.c b/gdk/gdkseat.c
index 35a8446a47..70bc02332d 100644
--- a/gdk/gdkseat.c
+++ b/gdk/gdkseat.c
@@ -248,10 +248,10 @@ gdk_seat_get_capabilities (GdkSeat *seat)
  *          elsewhere.
  * @event: (nullable): the event that is triggering the grab, or %NULL if none
  *         is available.
- * @prepare_func: (nullable) (scope call) (closure prepare_func_data): function to
+ * @prepare_func: (nullable) (scope call): function to
  *                prepare the surface to be grabbed, it can be %NULL if @surface is
  *                visible before this call.
- * @prepare_func_data: user data to pass to @prepare_func
+ * @prepare_func_data: (closure): user data to pass to @prepare_func
  *
  * Grabs the seat so that all events corresponding to the given @capabilities
  * are passed to this application until the seat is ungrabbed with gdk_seat_ungrab(),
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index f3813f2b9d..71493d7ef3 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -480,8 +480,8 @@ gtk_container_get_request_mode (GtkWidget *widget)
 /**
  * gtk_container_forall: (virtual forall)
  * @container: a #GtkContainer
- * @callback: (scope call) (closure callback_data): a callback
- * @callback_data: callback user data
+ * @callback: (scope call): a callback
+ * @callback_data: (closure): callback user data
  *
  * Invokes @callback on each direct child of @container, including
  * children that are considered “internal” (implementation details
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c
index 372a7e413a..f611bf39f4 100644
--- a/gtk/gtkdrawingarea.c
+++ b/gtk/gtkdrawingarea.c
@@ -411,9 +411,9 @@ gtk_drawing_area_get_content_height (GtkDrawingArea *self)
 /**
  * gtk_drawing_area_set_draw_func:
  * @self: a #GtkDrawingArea
- * @draw_func: (closure user_data) (allow-none): callback that lets you draw
+ * @draw_func: (allow-none): callback that lets you draw
  *     the drawing area's contents
- * @user_data: user data passed to @draw_func
+ * @user_data: (closure): user data passed to @draw_func
  * @destroy: destroy notifier for @user_data
  *
  * Setting a draw function is the main thing you want to do when using a drawing
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 05a549a31d..d5141c4440 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -4583,9 +4583,9 @@ gtk_flow_box_get_selection_mode (GtkFlowBox *box)
 /**
  * gtk_flow_box_set_filter_func:
  * @box: a #GtkFlowBox
- * @filter_func: (closure user_data) (allow-none): callback that
+ * @filter_func: (allow-none): callback that
  *     lets you filter which children to show
- * @user_data: user data passed to @filter_func
+ * @user_data: (closure): user data passed to @filter_func
  * @destroy: destroy notifier for @user_data
  *
  * By setting a filter function on the @box one can decide dynamically
@@ -4663,8 +4663,8 @@ gtk_flow_box_invalidate_filter (GtkFlowBox *box)
 /**
  * gtk_flow_box_set_sort_func:
  * @box: a #GtkFlowBox
- * @sort_func: (closure user_data) (allow-none): the sort function
- * @user_data: user data passed to @sort_func
+ * @sort_func: (allow-none): the sort function
+ * @user_data: (closure): user data passed to @sort_func
  * @destroy: destroy notifier for @user_data
  *
  * By setting a sort function on the @box, one can dynamically
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index c4d9a99545..68ddfe083d 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1123,8 +1123,8 @@ gtk_list_box_get_selection_mode (GtkListBox *box)
 /**
  * gtk_list_box_set_filter_func:
  * @box: a #GtkListBox
- * @filter_func: (closure user_data) (allow-none): callback that lets you filter which rows to show
- * @user_data: user data passed to @filter_func
+ * @filter_func: (allow-none): callback that lets you filter which rows to show
+ * @user_data: (closure): user data passed to @filter_func
  * @destroy: destroy notifier for @user_data
  *
  * By setting a filter function on the @box one can decide dynamically which
@@ -1163,8 +1163,8 @@ gtk_list_box_set_filter_func (GtkListBox           *box,
 /**
  * gtk_list_box_set_header_func:
  * @box: a #GtkListBox
- * @update_header: (closure user_data) (allow-none): callback that lets you add row headers
- * @user_data: user data passed to @update_header
+ * @update_header: (allow-none): callback that lets you add row headers
+ * @user_data: (closure): user data passed to @update_header
  * @destroy: destroy notifier for @user_data
  *
  * By setting a header function on the @box one can dynamically add headers
@@ -1318,8 +1318,8 @@ gtk_list_box_invalidate_headers (GtkListBox *box)
 /**
  * gtk_list_box_set_sort_func:
  * @box: a #GtkListBox
- * @sort_func: (closure user_data) (allow-none): the sort function
- * @user_data: user data passed to @sort_func
+ * @sort_func: (allow-none): the sort function
+ * @user_data: (closure): user data passed to @sort_func
  * @destroy: destroy notifier for @user_data
  *
  * By setting a sort function on the @box one can dynamically reorder the rows


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