[gtk/wip/carlosg/fix-search-entry: 3/5] gtkwidget: Expose gtk_widget_run_controllers() in private header



commit 9ca392b38db0a700e76f27968ba52c5da84bc795
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Feb 20 12:41:00 2019 +0100

    gtkwidget: Expose gtk_widget_run_controllers() in private header
    
    Allows for more fine grained access than gtk_widget(_captured)_event
    which are meant to work across a hierarchy.

 gtk/gtkwidget.c        | 14 +++++++-------
 gtk/gtkwidgetprivate.h |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index a139d29579..124ecc5628 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5099,10 +5099,10 @@ _gtk_widget_set_captured_event_handler (GtkWidget               *widget,
   g_object_set_data (G_OBJECT (widget), I_("captured-event-handler"), callback);
 }
 
-static gboolean
-_gtk_widget_run_controllers (GtkWidget           *widget,
-                             const GdkEvent      *event,
-                             GtkPropagationPhase  phase)
+gboolean
+gtk_widget_run_controllers (GtkWidget           *widget,
+                           const GdkEvent      *event,
+                           GtkPropagationPhase  phase)
 {
   GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
   GtkEventController *controller;
@@ -5170,7 +5170,7 @@ _gtk_widget_captured_event (GtkWidget      *widget,
   event_copy = gdk_event_copy (event);
   translate_event_coordinates (event_copy, widget);
 
-  return_val = _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_CAPTURE);
+  return_val = gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_CAPTURE);
 
   handler = g_object_get_data (G_OBJECT (widget), I_("captured-event-handler"));
   if (!handler)
@@ -5270,10 +5270,10 @@ gtk_widget_event_internal (GtkWidget      *widget,
   translate_event_coordinates (event_copy, widget);
 
   if (widget == gtk_get_event_target (event_copy))
-    return_val |= _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_TARGET);
+    return_val |= gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_TARGET);
 
   if (return_val == FALSE)
-    return_val |= _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_BUBBLE);
+    return_val |= gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_BUBBLE);
   g_object_unref (event_copy);
 
   if (return_val == FALSE &&
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index 31356ae5a5..e22795ad2b 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -342,9 +342,9 @@ void              gtk_widget_cancel_event_sequence         (GtkWidget
                                                             GdkEventSequence      *sequence,
                                                             GtkEventSequenceState  state);
 
-
-
-
+gboolean          gtk_widget_run_controllers               (GtkWidget           *widget,
+                                                            const GdkEvent      *event,
+                                                            GtkPropagationPhase  phase);
 
 /* inline getters */
 


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