[gtk+/gestures: 36/202] multipress: Remove unused signal argument
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 36/202] multipress: Remove unused signal argument
- Date: Fri, 23 May 2014 17:59:24 +0000 (UTC)
commit 4c34d4566c8c7cfc5adfdf4655cb076134b490c7
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 24 12:21:38 2014 +0100
multipress: Remove unused signal argument
gtk/gtkgesturemultipress.c | 39 ++++++++++++++++++++++++++++-----------
gtk/gtkgesturemultipress.h | 1 -
2 files changed, 28 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkgesturemultipress.c b/gtk/gtkgesturemultipress.c
index a3a5540..6698ace 100644
--- a/gtk/gtkgesturemultipress.c
+++ b/gtk/gtkgesturemultipress.c
@@ -207,7 +207,7 @@ gtk_gesture_multi_press_update (GtkGesture *gesture,
* reset on the pressed handler */
n_presses = priv->n_presses + 1;
- g_signal_emit (gesture, signals[PRESSED], 0, n_presses, TRUE, x, y);
+ g_signal_emit (gesture, signals[PRESSED], 0, n_presses, x, y);
if (priv->n_presses == 0)
{
@@ -217,39 +217,56 @@ gtk_gesture_multi_press_update (GtkGesture *gesture,
priv->n_presses++;
break;
+ case GDK_MOTION_NOTIFY:
+ case GDK_TOUCH_UPDATE:
+ gtk_gesture_get_point (gesture, sequence, &x, &y);
+
+ if (!_gtk_gesture_multi_press_check_within_threshold (multi_press, x, y))
+ _gtk_gesture_multi_press_stop (multi_press);
+ break;
default:
break;
}
}
static void
+gtk_gesture_multi_press_cancel (GtkGesture *gesture,
+ GdkEventSequence *sequence)
+{
+ if (sequence == gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)))
+ _gtk_gesture_multi_press_stop (GTK_GESTURE_MULTI_PRESS (gesture));
+}
+
+static void
+gtk_gesture_multi_press_reset (GtkEventController *controller)
+{
+ _gtk_gesture_multi_press_stop (GTK_GESTURE_MULTI_PRESS (controller));
+ GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_multi_press_parent_class)->reset (controller);
+}
+
+static void
gtk_gesture_multi_press_class_init (GtkGestureMultiPressClass *klass)
{
+ GtkEventControllerClass *controller_class = GTK_EVENT_CONTROLLER_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkGestureClass *gesture_class = GTK_GESTURE_CLASS (klass);
object_class->finalize = gtk_gesture_multi_press_finalize;
- object_class->set_property = gtk_gesture_multi_press_set_property;
- object_class->get_property = gtk_gesture_multi_press_get_property;
gesture_class->check = gtk_gesture_multi_press_check;
gesture_class->begin = gtk_gesture_multi_press_update;
gesture_class->update = gtk_gesture_multi_press_update;
+ gesture_class->cancel = gtk_gesture_multi_press_cancel;
+
+ controller_class->reset = gtk_gesture_multi_press_reset;
- g_object_class_install_property (object_class,
- PROP_BUTTON,
- g_param_spec_uint ("button",
- P_("Button number"),
- P_("Button number to listen to"),
- 0, G_MAXUINT, 0,
- GTK_PARAM_READWRITE));
signals[PRESSED] =
g_signal_new ("pressed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkGestureMultiPressClass, pressed),
NULL, NULL, NULL,
- G_TYPE_NONE, 4, G_TYPE_INT, G_TYPE_BOOLEAN,
+ G_TYPE_NONE, 3, G_TYPE_INT,
G_TYPE_DOUBLE, G_TYPE_DOUBLE);
signals[STOPPED] =
g_signal_new ("stopped",
diff --git a/gtk/gtkgesturemultipress.h b/gtk/gtkgesturemultipress.h
index 31c8b75..3a5319b 100644
--- a/gtk/gtkgesturemultipress.h
+++ b/gtk/gtkgesturemultipress.h
@@ -49,7 +49,6 @@ struct _GtkGestureMultiPressClass
gboolean (* pressed) (GtkGestureMultiPress *gesture,
gint n_press,
- gboolean in_area,
gdouble x,
gdouble y);
void (* stopped) (GtkGestureMultiPress *gesture);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]