[gtk+/wip/matthiasc/kill-event-signals: 85/123] Drop ::configure-event



commit ce42469827da95e35ac1b9c1cb161a6992f61e85
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 1 18:25:35 2018 -0500

    Drop ::configure-event
    
    This signal is unused in GTK+ and configure events are handled
    internally by GtkWindow.
    
    If you need to catch configure events, the generic ::event
    signal still works.

 gtk/gtkwidget.c |   34 +---------------------------------
 gtk/gtkwidget.h |    4 ----
 2 files changed, 1 insertions(+), 37 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 30420f7..4256514 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -496,7 +496,6 @@ enum {
   KEY_RELEASE_EVENT,
   ENTER_NOTIFY_EVENT,
   LEAVE_NOTIFY_EVENT,
-  CONFIGURE_EVENT,
   FOCUS_IN_EVENT,
   FOCUS_OUT_EVENT,
   GRAB_BROKEN_EVENT,
@@ -1008,7 +1007,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
   klass->key_release_event = gtk_widget_real_key_release_event;
   klass->enter_notify_event = NULL;
   klass->leave_notify_event = NULL;
-  klass->configure_event = NULL;
   klass->focus_in_event = gtk_widget_real_focus_in_event;
   klass->focus_out_event = gtk_widget_real_focus_out_event;
   klass->drag_begin = NULL;
@@ -2131,34 +2129,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                               _gtk_marshal_BOOLEAN__OBJECTv);
 
   /**
-   * GtkWidget::configure-event:
-   * @widget: the object which received the signal
-   * @event: (type Gdk.EventConfigure): the #GdkEventConfigure which triggered
-   *   this signal.
-   *
-   * The ::configure-event signal will be emitted when the size, position or
-   * stacking of the @widget's window has changed.
-   *
-   * To receive this signal, the #GdkWindow associated to the widget needs
-   * to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
-   * automatically for all new windows.
-   *
-   * Returns: %TRUE to stop other handlers from being invoked for the event.
-   *   %FALSE to propagate the event further.
-   */
-  widget_signals[CONFIGURE_EVENT] =
-    g_signal_new (I_("configure-event"),
-                 G_TYPE_FROM_CLASS (klass),
-                 G_SIGNAL_RUN_LAST,
-                 G_STRUCT_OFFSET (GtkWidgetClass, configure_event),
-                 _gtk_boolean_handled_accumulator, NULL,
-                 _gtk_marshal_BOOLEAN__OBJECT,
-                 G_TYPE_BOOLEAN, 1,
-                 GDK_TYPE_EVENT);
-  g_signal_set_va_marshaller (widget_signals[CONFIGURE_EVENT], G_TYPE_FROM_CLASS (klass),
-                              _gtk_marshal_BOOLEAN__OBJECTv);
-
-  /**
    * GtkWidget::focus-in-event:
    * @widget: the object which received the signal
    * @event: (type Gdk.EventFocus): the #GdkEventFocus which triggered
@@ -6336,6 +6306,7 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
        case GDK_DESTROY:
        case GDK_MAP:
        case GDK_UNMAP:
+       case GDK_CONFIGURE:
        case GDK_NOTHING:
          signal_num = -1;
          break;
@@ -6363,9 +6334,6 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
        case GDK_FOCUS_CHANGE:
          signal_num = event->focus_change.in ? FOCUS_IN_EVENT : FOCUS_OUT_EVENT;
          break;
-       case GDK_CONFIGURE:
-         signal_num = CONFIGURE_EVENT;
-         break;
        case GDK_GRAB_BROKEN:
          signal_num = GRAB_BROKEN_EVENT;
          break;
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 8726128..cb2b7b5 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -208,8 +208,6 @@ struct _GtkWidget
  *   enters the widget’s window.
  * @leave_notify_event: Will be emitted when the pointer leaves the
  *   widget’s window.
- * @configure_event: Signal will be emitted when the size, position or
- *   stacking of the widget’s window has changed.
  * @focus_in_event: Signal emitted when the keyboard focus enters the
  * widget’s window.
  * @focus_out_event: Signal emitted when the keyboard focus leaves the
@@ -334,8 +332,6 @@ struct _GtkWidgetClass
                                         GdkEventCrossing    *event);
   gboolean (* leave_notify_event)      (GtkWidget           *widget,
                                         GdkEventCrossing    *event);
-  gboolean (* configure_event)         (GtkWidget           *widget,
-                                        GdkEventConfigure   *event);
   gboolean (* focus_in_event)          (GtkWidget           *widget,
                                         GdkEventFocus       *event);
   gboolean (* focus_out_event)         (GtkWidget           *widget,


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