[mutter] clutter/event: Add touchpad hold event definition
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/event: Add touchpad hold event definition
- Date: Thu, 2 Dec 2021 21:29:01 +0000 (UTC)
commit aa5569356e0bbdb28a932b40c436b9f62435ad7e
Author: JoseExposito <jose exposito89 gmail com>
Date: Thu Apr 15 19:38:37 2021 +0200
clutter/event: Add touchpad hold event definition
Add new Clutter event (ClutterTouchpadHoldEvent) with the required data to
represent a hold event.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1830>
clutter/clutter/clutter-event.h | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
---
diff --git a/clutter/clutter/clutter-event.h b/clutter/clutter/clutter-event.h
index 7595e83353..1378d91e0a 100644
--- a/clutter/clutter/clutter-event.h
+++ b/clutter/clutter/clutter-event.h
@@ -116,6 +116,7 @@ typedef struct _ClutterCrossingEvent ClutterCrossingEvent;
typedef struct _ClutterTouchEvent ClutterTouchEvent;
typedef struct _ClutterTouchpadPinchEvent ClutterTouchpadPinchEvent;
typedef struct _ClutterTouchpadSwipeEvent ClutterTouchpadSwipeEvent;
+typedef struct _ClutterTouchpadHoldEvent ClutterTouchpadHoldEvent;
typedef struct _ClutterProximityEvent ClutterProximityEvent;
typedef struct _ClutterPadButtonEvent ClutterPadButtonEvent;
typedef struct _ClutterPadStripEvent ClutterPadStripEvent;
@@ -490,6 +491,42 @@ struct _ClutterTouchpadSwipeEvent
gfloat dy_unaccel;
};
+/**
+ * ClutterTouchpadHoldEvent
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @stage: event source stage
+ * @source: event source actor (unused)
+ * @phase: the current phase of the gesture
+ * @n_fingers: the number of fingers triggering the swipe
+ * @x: the X coordinate of the pointer, relative to the stage
+ * @y: the Y coordinate of the pointer, relative to the stage
+ *
+ * Used for touchpad hold gesture events. The current state of the
+ * gesture will be determined by the @phase field.
+ *
+ * A hold gesture starts when the user places one or many fingers on the
+ * touchpad and ends when all fingers are lifted. It is cancelled when the
+ * finger(s) move past a certain threshold.
+ * Unlike swipe and pinch, @phase can only be
+ * CLUTTER_TOUCHPAD_GESTURE_PHASE_BEGIN, CLUTTER_TOUCHPAD_GESTURE_PHASE_END and
+ * CLUTTER_TOUCHPAD_GESTURE_PHASE_CANCEL.
+ */
+struct _ClutterTouchpadHoldEvent
+{
+ ClutterEventType type;
+ guint32 time;
+ ClutterEventFlags flags;
+ ClutterStage *stage;
+ ClutterActor *source;
+
+ ClutterTouchpadGesturePhase phase;
+ uint32_t n_fingers;
+ float x;
+ float y;
+};
+
struct _ClutterPadButtonEvent
{
ClutterEventType type;
@@ -582,6 +619,7 @@ union _ClutterEvent
ClutterTouchEvent touch;
ClutterTouchpadPinchEvent touchpad_pinch;
ClutterTouchpadSwipeEvent touchpad_swipe;
+ ClutterTouchpadHoldEvent touchpad_hold;
ClutterProximityEvent proximity;
ClutterPadButtonEvent pad_button;
ClutterPadStripEvent pad_strip;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]