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.
This commit is contained in:
parent
6b08990dcc
commit
8cd4b0e11f
2 changed files with 54 additions and 0 deletions
|
@ -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__ */
|
||||
|
|
|
@ -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,49 @@ struct _ClutterTouchpadSwipeEvent
|
|||
gfloat dy;
|
||||
};
|
||||
|
||||
struct _ClutterPadButtonEvent
|
||||
{
|
||||
ClutterEventType type;
|
||||
guint32 time;
|
||||
ClutterEventFlags flags;
|
||||
ClutterStage *stage;
|
||||
ClutterActor *source;
|
||||
|
||||
guint32 button;
|
||||
guint32 group;
|
||||
ClutterInputDevice *device;
|
||||
};
|
||||
|
||||
struct _ClutterPadStripEvent
|
||||
{
|
||||
ClutterEventType type;
|
||||
guint32 time;
|
||||
ClutterEventFlags flags;
|
||||
ClutterStage *stage;
|
||||
ClutterActor *source;
|
||||
|
||||
ClutterInputDevice *device;
|
||||
ClutterInputDevicePadSource strip_source;
|
||||
guint32 strip_number;
|
||||
guint32 group;
|
||||
gdouble value;
|
||||
};
|
||||
|
||||
struct _ClutterPadRingEvent
|
||||
{
|
||||
ClutterEventType type;
|
||||
guint32 time;
|
||||
ClutterEventFlags flags;
|
||||
ClutterStage *stage;
|
||||
ClutterActor *source;
|
||||
|
||||
ClutterInputDevice *device;
|
||||
ClutterInputDevicePadSource ring_source;
|
||||
guint32 ring_number;
|
||||
guint32 group;
|
||||
gdouble angle;
|
||||
};
|
||||
|
||||
/**
|
||||
* ClutterEvent:
|
||||
*
|
||||
|
@ -516,6 +562,9 @@ union _ClutterEvent
|
|||
ClutterTouchpadPinchEvent touchpad_pinch;
|
||||
ClutterTouchpadSwipeEvent touchpad_swipe;
|
||||
ClutterProximityEvent proximity;
|
||||
ClutterPadButtonEvent pad_button;
|
||||
ClutterPadStripEvent pad_strip;
|
||||
ClutterPadRingEvent pad_ring;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue