mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 07:04:29 +00:00
Drop ::touch-event
This signal is not used in GTK+, and has a suitable replacement with GtkGesture and its subclasses. If you need to catch the raw touch events, the generic ::event signal still works, too.
This commit is contained in:
parent
47712a826b
commit
fa885f437c
@ -516,7 +516,6 @@ enum {
|
||||
QUERY_TOOLTIP,
|
||||
DRAG_FAILED,
|
||||
STYLE_UPDATED,
|
||||
TOUCH_EVENT,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
@ -627,8 +626,6 @@ static gboolean gtk_widget_real_focus_in_event (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
static gboolean gtk_widget_real_focus_out_event (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
static gboolean gtk_widget_real_touch_event (GtkWidget *widget,
|
||||
GdkEventTouch *event);
|
||||
static gboolean gtk_widget_real_grab_broken_event (GtkWidget *widget,
|
||||
GdkEventGrabBroken *event);
|
||||
static gboolean gtk_widget_real_focus (GtkWidget *widget,
|
||||
@ -1008,7 +1005,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
klass->button_press_event = gtk_widget_real_button_event;
|
||||
klass->button_release_event = gtk_widget_real_button_event;
|
||||
klass->motion_notify_event = gtk_widget_real_motion_event;
|
||||
klass->touch_event = gtk_widget_real_touch_event;
|
||||
klass->key_press_event = gtk_widget_real_key_press_event;
|
||||
klass->key_release_event = gtk_widget_real_key_release_event;
|
||||
klass->enter_notify_event = NULL;
|
||||
@ -1993,18 +1989,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
g_signal_set_va_marshaller (widget_signals[BUTTON_RELEASE_EVENT], G_TYPE_FROM_CLASS (klass),
|
||||
_gtk_marshal_BOOLEAN__OBJECTv);
|
||||
|
||||
widget_signals[TOUCH_EVENT] =
|
||||
g_signal_new (I_("touch-event"),
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_DEPRECATED,
|
||||
G_STRUCT_OFFSET (GtkWidgetClass, touch_event),
|
||||
_gtk_boolean_handled_accumulator, NULL,
|
||||
_gtk_marshal_BOOLEAN__OBJECT,
|
||||
G_TYPE_BOOLEAN, 1,
|
||||
GDK_TYPE_EVENT);
|
||||
g_signal_set_va_marshaller (widget_signals[TOUCH_EVENT], G_TYPE_FROM_CLASS (klass),
|
||||
_gtk_marshal_BOOLEAN__OBJECTv);
|
||||
|
||||
/**
|
||||
* GtkWidget::motion-notify-event:
|
||||
* @widget: the object which received the signal.
|
||||
@ -6035,13 +6019,6 @@ gtk_widget_real_focus_out_event (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_widget_real_touch_event (GtkWidget *widget,
|
||||
GdkEventTouch *event)
|
||||
{
|
||||
return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_widget_real_grab_broken_event (GtkWidget *widget,
|
||||
GdkEventGrabBroken *event)
|
||||
@ -6352,6 +6329,10 @@ gtk_widget_emit_event_signals (GtkWidget *widget,
|
||||
case GDK_PROXIMITY_IN:
|
||||
case GDK_PROXIMITY_OUT:
|
||||
case GDK_SCROLL:
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_TOUCH_UPDATE:
|
||||
case GDK_TOUCH_END:
|
||||
case GDK_TOUCH_CANCEL:
|
||||
case GDK_EXPOSE:
|
||||
case GDK_DELETE:
|
||||
case GDK_DESTROY:
|
||||
@ -6363,12 +6344,6 @@ gtk_widget_emit_event_signals (GtkWidget *widget,
|
||||
case GDK_BUTTON_PRESS:
|
||||
signal_num = BUTTON_PRESS_EVENT;
|
||||
break;
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_TOUCH_UPDATE:
|
||||
case GDK_TOUCH_END:
|
||||
case GDK_TOUCH_CANCEL:
|
||||
signal_num = TOUCH_EVENT;
|
||||
break;
|
||||
case GDK_BUTTON_RELEASE:
|
||||
signal_num = BUTTON_RELEASE_EVENT;
|
||||
break;
|
||||
|
@ -402,9 +402,6 @@ struct _GtkWidgetClass
|
||||
|
||||
void (* style_updated) (GtkWidget *widget);
|
||||
|
||||
gboolean (* touch_event) (GtkWidget *widget,
|
||||
GdkEventTouch *event);
|
||||
|
||||
void (* snapshot) (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user