[gtk+/wip/matthiasc/kill-event-signals: 77/126] Drop ::scroll-event



commit 2a4920418a5792ed4fbabf16090db642cd09cb98
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 1 17:24:16 2018 -0500

    Drop ::scroll-event
    
    This signal is not used in GTK+, and has a suitable
    replacement with GtkEventControllerScroll.
    
    If you need to catch these events, the generic ::event
    signal still works, too.

 gtk/gtkwidget.c |   35 +----------------------------------
 gtk/gtkwidget.h |    4 ----
 2 files changed, 1 insertions(+), 38 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index af977e5..27366e7 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -492,7 +492,6 @@ enum {
   EVENT_AFTER,
   BUTTON_PRESS_EVENT,
   BUTTON_RELEASE_EVENT,
-  SCROLL_EVENT,
   MOTION_NOTIFY_EVENT,
   KEY_PRESS_EVENT,
   KEY_RELEASE_EVENT,
@@ -2007,36 +2006,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                               _gtk_marshal_BOOLEAN__OBJECTv);
 
   /**
-   * GtkWidget::scroll-event:
-   * @widget: the object which received the signal.
-   * @event: (type Gdk.EventScroll): the #GdkEventScroll which triggered
-   *   this signal.
-   *
-   * The ::scroll-event signal is emitted when a button in the 4 to 7
-   * range is pressed. Wheel mice are usually configured to generate
-   * button press events for buttons 4 and 5 when the wheel is turned.
-   *
-   * To receive this signal, the #GdkWindow associated to the widget needs
-   * to enable the #GDK_SCROLL_MASK mask.
-   *
-   * This signal will be sent to the grab widget if there is one.
-   *
-   * Returns: %TRUE to stop other handlers from being invoked for the event.
-   *   %FALSE to propagate the event further.
-   */
-  widget_signals[SCROLL_EVENT] =
-    g_signal_new (I_("scroll-event"),
-                 G_TYPE_FROM_CLASS (klass),
-                 G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
-                 G_STRUCT_OFFSET (GtkWidgetClass, scroll_event),
-                 _gtk_boolean_handled_accumulator, NULL,
-                 _gtk_marshal_BOOLEAN__OBJECT,
-                 G_TYPE_BOOLEAN, 1,
-                 GDK_TYPE_EVENT);
-  g_signal_set_va_marshaller (widget_signals[SCROLL_EVENT], G_TYPE_FROM_CLASS (klass),
-                              _gtk_marshal_BOOLEAN__OBJECTv);
-
-  /**
    * GtkWidget::motion-notify-event:
    * @widget: the object which received the signal.
    * @event: (type Gdk.EventMotion): the #GdkEventMotion which triggered
@@ -6382,6 +6351,7 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
         case GDK_PAD_GROUP_MODE:
        case GDK_PROXIMITY_IN:
        case GDK_PROXIMITY_OUT:
+       case GDK_SCROLL:
        case GDK_EXPOSE:
        case GDK_DELETE:
        case GDK_DESTROY:
@@ -6399,9 +6369,6 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
         case GDK_TOUCH_CANCEL:
          signal_num = TOUCH_EVENT;
          break;
-       case GDK_SCROLL:
-         signal_num = SCROLL_EVENT;
-         break;
        case GDK_BUTTON_RELEASE:
          signal_num = BUTTON_RELEASE_EVENT;
          break;
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index ac2a3eb..1f200c6 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -200,8 +200,6 @@ struct _GtkWidget
  *   (typically from a mouse) is pressed.
  * @button_release_event: Signal will be emitted when a button
  *   (typically from a mouse) is released.
- * @scroll_event: Signal emitted when a button in the 4 to 7 range is
- *   pressed.
  * @motion_notify_event: Signal emitted when the pointer moves over
  *   the widget’s #GdkWindow.
  * @key_press_event: Signal emitted when a key is pressed.
@@ -326,8 +324,6 @@ struct _GtkWidgetClass
                                         GdkEventButton      *event);
   gboolean (* button_release_event)    (GtkWidget           *widget,
                                         GdkEventButton      *event);
-  gboolean (* scroll_event)            (GtkWidget           *widget,
-                                        GdkEventScroll      *event);
   gboolean (* motion_notify_event)     (GtkWidget           *widget,
                                         GdkEventMotion      *event);
   gboolean (* key_press_event)         (GtkWidget           *widget,


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