+struct libinput_device *
+libinput_event_get_device(struct libinput_event *event);
+
+/**
+ * @ingroup event
+ *
+ * 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 *
+libinput_event_get_pointer_event(struct libinput_event *event);
+
+/**
+ * @ingroup event
+ *
+ * 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 *
+libinput_event_get_keyboard_event(struct libinput_event *event);
+
+/**
+ * @ingroup event
+ *
+ * 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 *
+libinput_event_get_touch_event(struct libinput_event *event);
+
+/**
+ * @ingroup event
+ *
+ * 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
+ * being pressed or released.
+ */
+
+/**
+ * @ingroup event_keyboard
+ *
+ * @return The event time for this event
+ */
+uint32_t
+libinput_event_keyboard_get_time(struct libinput_event_keyboard *event);
+
+/**
+ * @ingroup event_keyboard
+ *
+ * @return The keycode that triggered this key event
+ */
+uint32_t
+libinput_event_keyboard_get_key(struct libinput_event_keyboard *event);
+
+/**
+ * @ingroup event_keyboard
+ *
+ * @return The state change of the key
+ */
+enum libinput_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);
+
+/**
+ * @ingroup event_keyboard
+ *
+ * For the key of a LIBINPUT_EVENT_KEYBOARD_KEY event, return the total number
+ * of keys pressed on all devices on the associated seat after the event was
+ * triggered.
+ *
+ " @note It is an application bug to call this function for events other than
+ * LIBINPUT_EVENT_KEYBOARD_KEY. For other events, this function returns 0.
+ *
+ * @return the seat wide pressed key count for the key of this event
+ */
+uint32_t
+libinput_event_keyboard_get_seat_key_count(
+ struct libinput_event_keyboard *event);
+
+/**
+ * @defgroup event_pointer Pointer events
+ *
+ * Pointer events reflect motion, button and scroll events, as well as
+ * events from other axes.
+ */
+
+/**
+ * @ingroup event_pointer
+ *
+ * @return The event time for this event
+ */
+uint32_t
+libinput_event_pointer_get_time(struct libinput_event_pointer *event);
+
+/**
+ * @ingroup event_pointer
+ *
+ * Return the delta between the last event and the current event. For pointer
+ * events that are not of type LIBINPUT_EVENT_POINTER_MOTION, this function
+ * returns 0.
+ *
+ * @note It is an application bug to call this function for events other than
+ * LIBINPUT_EVENT_POINTER_MOTION.
+ *
+ * @return the relative x movement since the last event
+ */
+double
+libinput_event_pointer_get_dx(struct libinput_event_pointer *event);
+
+/**
+ * @ingroup event_pointer
+ *
+ * Return the delta between the last event and the current event. For pointer
+ * events that are not of type LIBINPUT_EVENT_POINTER_MOTION, this function
+ * returns 0.
+ *
+ * @note It is an application bug to call this function for events other than
+ * LIBINPUT_EVENT_POINTER_MOTION.
+ *
+ * @return the relative y movement since the last event
+ */
+double
+libinput_event_pointer_get_dy(struct libinput_event_pointer *event);
+
+/**
+ * @ingroup event_pointer
+ *
+ * Return the current absolute x coordinate of the pointer event, in mm from
+ * the top left corner of the device. To get the corresponding output screen
+ * coordinate, use libinput_event_pointer_get_absolute_x_transformed().
+ *
+ * For pointer events that are not of type
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE, this function returns 0.
+ *
+ * @note It is an application bug to call this function for events other than
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE.
+ *
+ * @return the current absolute x coordinate
+ */
+double
+libinput_event_pointer_get_absolute_x(struct libinput_event_pointer *event);
+
+/**
+ * @ingroup event_pointer
+ *
+ * Return the current absolute y coordinate of the pointer event, in mm from
+ * the top left corner of the device. To get the corresponding output screen
+ * coordinate, use libinput_event_pointer_get_absolute_y_transformed().
+ *
+ * For pointer events that are not of type
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE, this function returns 0.
+ *
+ * @note It is an application bug to call this function for events other than
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE.
+ *
+ * @return the current absolute y coordinate
+ */
+double
+libinput_event_pointer_get_absolute_y(struct libinput_event_pointer *event);
+
+/**
+ * @ingroup event_pointer
+ *
+ * Return the current absolute x coordinate of the pointer event, transformed to
+ * screen coordinates.
+ *
+ * For pointer events that are not of type
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE, the return value of this function is
+ * undefined.
+ *
+ * @note It is an application bug to call this function for events other than
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE.
+ *
+ * @param event The libinput pointer event
+ * @param width The current output screen width
+ * @return the current absolute x coordinate transformed to a screen coordinate
+ */
+double
+libinput_event_pointer_get_absolute_x_transformed(
+ struct libinput_event_pointer *event,
+ uint32_t width);
+
+/**
+ * @ingroup event_pointer
+ *
+ * Return the current absolute y coordinate of the pointer event, transformed to
+ * screen coordinates.
+ *
+ * For pointer events that are not of type
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE, the return value of this function is
+ * undefined.
+ *
+ * @note It is an application bug to call this function for events other than
+ * LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE.
+ *
+ * @param event The libinput pointer event
+ * @param height The current output screen height
+ * @return the current absolute y coordinate transformed to a screen coordinate
+ */
+double
+libinput_event_pointer_get_absolute_y_transformed(
+ struct libinput_event_pointer *event,
+ uint32_t height);