[gtk+] Drop ::map-event and ::unmap-event
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Drop ::map-event and ::unmap-event
- Date: Tue, 16 Jan 2018 19:17:15 +0000 (UTC)
commit fd2a3b602f3d82b147657b261b1f6ca112fe7977
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 1 17:07:32 2018 -0500
Drop ::map-event and ::unmap-event
These are unused in GTK+, and are not very common.
If you need to catch these events, the generic ::event
signal still works.
gtk/gtkwidget.c | 66 +-----------------------------------------------------
gtk/gtkwidget.h | 7 -----
2 files changed, 2 insertions(+), 71 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 5bf6794..b089170 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -501,8 +501,6 @@ enum {
CONFIGURE_EVENT,
FOCUS_IN_EVENT,
FOCUS_OUT_EVENT,
- MAP_EVENT,
- UNMAP_EVENT,
PROXIMITY_IN_EVENT,
PROXIMITY_OUT_EVENT,
GRAB_BROKEN_EVENT,
@@ -1021,8 +1019,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
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->map_event = NULL;
- klass->unmap_event = NULL;
klass->proximity_in_event = NULL;
klass->proximity_out_event = NULL;
klass->drag_begin = NULL;
@@ -2269,60 +2265,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
_gtk_marshal_BOOLEAN__OBJECTv);
/**
- * GtkWidget::map-event:
- * @widget: the object which received the signal
- * @event: (type Gdk.EventAny): the #GdkEventAny which triggered this signal.
- *
- * The ::map-event signal will be emitted when the @widget's window is
- * mapped. A window is mapped when it becomes visible on the screen.
- *
- * 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[MAP_EVENT] =
- g_signal_new (I_("map-event"),
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GtkWidgetClass, map_event),
- _gtk_boolean_handled_accumulator, NULL,
- _gtk_marshal_BOOLEAN__OBJECT,
- G_TYPE_BOOLEAN, 1,
- GDK_TYPE_EVENT);
- g_signal_set_va_marshaller (widget_signals[MAP_EVENT], G_TYPE_FROM_CLASS (klass),
- _gtk_marshal_BOOLEAN__OBJECTv);
-
- /**
- * GtkWidget::unmap-event:
- * @widget: the object which received the signal
- * @event: (type Gdk.EventAny): the #GdkEventAny which triggered this signal
- *
- * The ::unmap-event signal will be emitted when the @widget's window is
- * unmapped. A window is unmapped when it becomes invisible on the screen.
- *
- * 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[UNMAP_EVENT] =
- g_signal_new (I_("unmap-event"),
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GtkWidgetClass, unmap_event),
- _gtk_boolean_handled_accumulator, NULL,
- _gtk_marshal_BOOLEAN__OBJECT,
- G_TYPE_BOOLEAN, 1,
- GDK_TYPE_EVENT);
- g_signal_set_va_marshaller (widget_signals[UNMAP_EVENT], G_TYPE_FROM_CLASS (klass),
- _gtk_marshal_BOOLEAN__OBJECTv);
-
- /**
* GtkWidget::proximity-in-event:
* @widget: the object which received the signal
* @event: (type Gdk.EventProximity): the #GdkEventProximity which triggered
@@ -6497,6 +6439,8 @@ gtk_widget_emit_event_signals (GtkWidget *widget,
case GDK_EXPOSE:
case GDK_DELETE:
case GDK_DESTROY:
+ case GDK_MAP:
+ case GDK_UNMAP:
case GDK_NOTHING:
signal_num = -1;
break;
@@ -6536,12 +6480,6 @@ gtk_widget_emit_event_signals (GtkWidget *widget,
case GDK_CONFIGURE:
signal_num = CONFIGURE_EVENT;
break;
- case GDK_MAP:
- signal_num = MAP_EVENT;
- break;
- case GDK_UNMAP:
- signal_num = UNMAP_EVENT;
- break;
case GDK_PROXIMITY_IN:
signal_num = PROXIMITY_IN_EVENT;
break;
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 44b2ff2..af86822 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -216,9 +216,6 @@ struct _GtkWidget
* widget’s window.
* @focus_out_event: Signal emitted when the keyboard focus leaves the
* widget’s window.
- * @map_event: Signal emitted when the widget’s window is mapped.
- * @unmap_event: Signal will be emitted when the widget’s window is
- * unmapped.
* @proximity_in_event:
* @proximity_out_event:
* @grab_broken_event: Signal emitted when a pointer or keyboard grab
@@ -349,10 +346,6 @@ struct _GtkWidgetClass
GdkEventFocus *event);
gboolean (* focus_out_event) (GtkWidget *widget,
GdkEventFocus *event);
- gboolean (* map_event) (GtkWidget *widget,
- GdkEventAny *event);
- gboolean (* unmap_event) (GtkWidget *widget,
- GdkEventAny *event);
gboolean (* proximity_in_event) (GtkWidget *widget,
GdkEventProximity *event);
gboolean (* proximity_out_event) (GtkWidget *widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]