return evdev_device_has_capability((struct evdev_device *) device,
capability);
}
+
+LIBINPUT_EXPORT struct libinput_event *
+libinput_event_device_notify_get_base_event(struct libinput_event_device_notify *event)
+{
+ return &event->base;
+}
+
+LIBINPUT_EXPORT struct libinput_event *
+libinput_event_keyboard_get_base_event(struct libinput_event_keyboard *event)
+{
+ return &event->base;
+}
+
+LIBINPUT_EXPORT struct libinput_event *
+libinput_event_pointer_get_base_event(struct libinput_event_pointer *event)
+{
+ return &event->base;
+}
+
+LIBINPUT_EXPORT struct libinput_event *
+libinput_event_touch_get_base_event(struct libinput_event_touch *event)
+{
+ return &event->base;
+}
* Return the pointer event that is this input event. If the event type does
* not match the pointer event types, this function returns NULL.
*
+ * The inverse of this function is libinput_event_pointer_get_base_event().
+ *
* @return A pointer event, or NULL for other events
*/
struct libinput_event_pointer *
* Return the keyboard event that is this input event. If the event type does
* not match the keyboard event types, this function returns NULL.
*
+ * The inverse of this function is libinput_event_keyboard_get_base_event().
+ *
* @return A keyboard event, or NULL for other events
*/
struct libinput_event_keyboard *
* Return the touch event that is this input event. If the event type does
* not match the touch event types, this function returns NULL.
*
+ * The inverse of this function is libinput_event_touch_get_base_event().
+ *
* @return A touch event, or NULL for other events
*/
struct libinput_event_touch *
* Return the device event that is this input event. If the event type does
* not match the device event types, this function returns NULL.
*
+ * The inverse of this function is
+ * libinput_event_device_notify_get_base_event().
+ *
* @return A device event, or NULL for other events
*/
struct libinput_event_device_notify *
libinput_event_get_device_notify_event(struct libinput_event *event);
/**
+ * @ingroup event
+ *
+ * @return The generic libinput_event of this event
+ */
+struct libinput_event *
+libinput_event_device_notify_get_base_event(struct libinput_event_device_notify *event);
+
+/**
* @defgroup event_keyboard Keyboard events
*
* Key events are generated when a key changes its logical state, usually by
enum libinput_keyboard_key_state
libinput_event_keyboard_get_key_state(struct libinput_event_keyboard *event);
+
+/**
+ * @ingroup event_keyboard
+ *
+ * @return The generic libinput_event of this event
+ */
+struct libinput_event *
+libinput_event_keyboard_get_base_event(struct libinput_event_keyboard *event);
+
/**
* @defgroup event_pointer Pointer events
*
libinput_event_pointer_get_axis_value(struct libinput_event_pointer *event);
/**
+ * @ingroup event_pointer
+ *
+ * @return The generic libinput_event of this event
+ */
+struct libinput_event *
+libinput_event_pointer_get_base_event(struct libinput_event_pointer *event);
+
+
+/**
* @defgroup event_touch Touch events
*
* Events from absolute touch devices.
uint32_t height);
/**
+ * @ingroup event_touch
+ *
+ * @return The generic libinput_event of this event
+ */
+struct libinput_event *
+libinput_event_touch_get_base_event(struct libinput_event_touch *event);
+
+/**
* @defgroup base Initialization and manipulation of libinput contexts
*/