[mutter/wip/tablet-protocol-v2: 2/13] clutter: Add pad event structs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 2/13] clutter: Add pad event structs
- Date: Tue, 10 May 2016 15:56:20 +0000 (UTC)
commit 8117892b406ea121b4d31fb0e0b3c487c9258a3a
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue May 10 16:54:41 2016 +0200
clutter: Add pad event structs
Those map closely what we get from libinput. Button events have
been made its own separate struct, its semantics fall somewhere
in between of ClutterButtonEvent and ClutterKeyEvent, so is better
emitted as its own set.
clutter/clutter/clutter-enums.h | 5 ++++
clutter/clutter/clutter-event.h | 46 +++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h
index adcd08c..3a261f7 100644
--- a/clutter/clutter/clutter-enums.h
+++ b/clutter/clutter/clutter-enums.h
@@ -1522,6 +1522,11 @@ typedef enum {
CLUTTER_INPUT_DEVICE_TOOL_LENS
} ClutterInputDeviceToolType;
+typedef enum {
+ CLUTTER_INPUT_DEVICE_PAD_SOURCE_UNKNOWN,
+ CLUTTER_INPUT_DEVICE_PAD_SOURCE_FINGER,
+} ClutterInputDevicePadSource;
+
G_END_DECLS
#endif /* __CLUTTER_ENUMS_H__ */
diff --git a/clutter/clutter/clutter-event.h b/clutter/clutter/clutter-event.h
index 0202104..5610e5f 100644
--- a/clutter/clutter/clutter-event.h
+++ b/clutter/clutter/clutter-event.h
@@ -118,6 +118,9 @@ typedef struct _ClutterTouchEvent ClutterTouchEvent;
typedef struct _ClutterTouchpadPinchEvent ClutterTouchpadPinchEvent;
typedef struct _ClutterTouchpadSwipeEvent ClutterTouchpadSwipeEvent;
typedef struct _ClutterProximityEvent ClutterProximityEvent;
+typedef struct _ClutterPadButtonEvent ClutterPadButtonEvent;
+typedef struct _ClutterPadStripEvent ClutterPadStripEvent;
+typedef struct _ClutterPadRingEvent ClutterPadRingEvent;
/**
* ClutterAnyEvent:
@@ -493,6 +496,46 @@ struct _ClutterTouchpadSwipeEvent
gfloat dy;
};
+struct _ClutterPadButtonEvent
+{
+ ClutterEventType type;
+ guint32 time;
+ ClutterEventFlags flags;
+ ClutterStage *stage;
+ ClutterActor *source;
+
+ guint32 button;
+ ClutterInputDevice *device;
+};
+
+struct _ClutterPadStripEvent
+{
+ ClutterEventType type;
+ guint32 time;
+ ClutterEventFlags flags;
+ ClutterStage *stage;
+ ClutterActor *source;
+
+ ClutterInputDevice *device;
+ ClutterInputDevicePadSource strip_source;
+ guint32 strip_number;
+ gdouble value;
+};
+
+struct _ClutterPadRingEvent
+{
+ ClutterEventType type;
+ guint32 time;
+ ClutterEventFlags flags;
+ ClutterStage *stage;
+ ClutterActor *source;
+
+ ClutterInputDevice *device;
+ ClutterInputDevicePadSource ring_source;
+ guint32 ring_number;
+ gdouble angle;
+};
+
/**
* ClutterEvent:
*
@@ -516,6 +559,9 @@ union _ClutterEvent
ClutterTouchpadPinchEvent touchpad_pinch;
ClutterTouchpadSwipeEvent touchpad_swipe;
ClutterProximityEvent proximity;
+ ClutterPadButtonEvent pad_button;
+ ClutterPadStripEvent pad_strip;
+ ClutterPadRingEvent pad_ring;
};
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]