diff --git a/src/libinput.h b/src/libinput.h index dcfa09f7..212bf4ac 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -37,6 +37,132 @@ extern "C" { __attribute__ ((format (printf, _format, _args))) #define LIBINPUT_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) +/** + * @ingroup base + * @struct libinput + * + * A handle for accessing libinput. This struct is refcounted, use + * libinput_ref() and libinput_unref(). + */ +struct libinput; + +/** + * @ingroup device + * @struct libinput_device + * + * A base handle for accessing libinput devices. This struct is + * refcounted, use libinput_device_ref() and libinput_device_unref(). + */ +struct libinput_device; + +/** + * @ingroup device + * @struct libinput_device_group + * + * A base handle for accessing libinput device groups. This struct is + * refcounted, use libinput_device_group_ref() and + * libinput_device_group_unref(). + */ +struct libinput_device_group; + +/** + * @ingroup seat + * @struct libinput_seat + * + * The base handle for accessing libinput seats. This struct is + * refcounted, use libinput_seat_ref() and libinput_seat_unref(). + */ +struct libinput_seat; + +/** + * @ingroup device + * @struct libinput_tablet_tool + * + * An object representing a tool being used by a device with the @ref + * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability. + * + * Tablet events generated by such a device are bound to a specific tool + * rather than coming from the device directly. Depending on the hardware it + * is possible to track the same physical tool across multiple + * struct libinput_device devices, see @ref tablet-serial-numbers. + * + * This struct is refcounted, use libinput_tablet_tool_ref() and + * libinput_tablet_tool_unref(). + */ +struct libinput_tablet_tool; + +/** + * @ingroup event + * @struct libinput_event + * + * The base event type. Use libinput_event_get_pointer_event() or similar to + * get the actual event type. + * + * @warning Unlike other structs events are considered transient and + * not refcounted. + */ +struct libinput_event; + +/** + * @ingroup event + * @struct libinput_event_device_notify + * + * An event notifying the caller of a device being added or removed. + */ +struct libinput_event_device_notify; + +/** + * @ingroup event_keyboard + * @struct libinput_event_keyboard + * + * A keyboard event representing a key press/release. + */ +struct libinput_event_keyboard; + +/** + * @ingroup event_pointer + * @struct libinput_event_pointer + * + * A pointer event representing relative or absolute pointer movement, + * a button press/release or scroll axis events. + */ +struct libinput_event_pointer; + +/** + * @ingroup event_touch + * @struct libinput_event_touch + * + * Touch event representing a touch down, move or up, as well as a touch + * cancel and touch frame events. Valid event types for this event are @ref + * LIBINPUT_EVENT_TOUCH_DOWN, @ref LIBINPUT_EVENT_TOUCH_MOTION, @ref + * LIBINPUT_EVENT_TOUCH_UP, @ref LIBINPUT_EVENT_TOUCH_CANCEL and @ref + * LIBINPUT_EVENT_TOUCH_FRAME. + */ +struct libinput_event_touch; + +/** + * @ingroup event_tablet + * @struct libinput_event_tablet_tool + * + * Tablet tool event representing an axis update, button press, or tool + * update. Valid event types for this event are @ref + * LIBINPUT_EVENT_TABLET_TOOL_AXIS, @ref + * LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY and @ref + * LIBINPUT_EVENT_TABLET_TOOL_BUTTON. + */ +struct libinput_event_tablet_tool; + +/** + * @ingroup event_tablet_pad + * @struct libinput_event_tablet_pad + * + * Tablet pad event representing a button press, or ring/strip update on + * the tablet pad itself. Valid event types for this event are @ref + * LIBINPUT_EVENT_TABLET_PAD_BUTTON, @ref LIBINPUT_EVENT_TABLET_PAD_RING and + * @ref LIBINPUT_EVENT_TABLET_PAD_STRIP. + */ +struct libinput_event_tablet_pad; + /** * @ingroup base * @@ -165,23 +291,6 @@ enum libinput_tablet_pad_strip_axis_source { LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER, }; -/** - * @ingroup device - * @struct libinput_tablet_tool - * - * An object representing a tool being used by a device with the @ref - * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability. - * - * Tablet events generated by such a device are bound to a specific tool - * rather than coming from the device directly. Depending on the hardware it - * is possible to track the same physical tool across multiple - * struct libinput_device devices, see @ref tablet-serial-numbers. - * - * This struct is refcounted, use libinput_tablet_tool_ref() and - * libinput_tablet_tool_unref(). - */ -struct libinput_tablet_tool; - /** * @ingroup device * @@ -403,115 +512,6 @@ enum libinput_event_type { LIBINPUT_EVENT_GESTURE_PINCH_END, }; -/** - * @ingroup base - * @struct libinput - * - * A handle for accessing libinput. This struct is refcounted, use - * libinput_ref() and libinput_unref(). - */ -struct libinput; - -/** - * @ingroup device - * @struct libinput_device - * - * A base handle for accessing libinput devices. This struct is - * refcounted, use libinput_device_ref() and libinput_device_unref(). - */ -struct libinput_device; - -/** - * @ingroup device - * @struct libinput_device_group - * - * A base handle for accessing libinput device groups. This struct is - * refcounted, use libinput_device_group_ref() and - * libinput_device_group_unref(). - */ -struct libinput_device_group; - -/** - * @ingroup seat - * @struct libinput_seat - * - * The base handle for accessing libinput seats. This struct is - * refcounted, use libinput_seat_ref() and libinput_seat_unref(). - */ -struct libinput_seat; - -/** - * @ingroup event - * @struct libinput_event - * - * The base event type. Use libinput_event_get_pointer_event() or similar to - * get the actual event type. - * - * @warning Unlike other structs events are considered transient and - * not refcounted. - */ -struct libinput_event; - -/** - * @ingroup event - * @struct libinput_event_device_notify - * - * An event notifying the caller of a device being added or removed. - */ -struct libinput_event_device_notify; - -/** - * @ingroup event_keyboard - * @struct libinput_event_keyboard - * - * A keyboard event representing a key press/release. - */ -struct libinput_event_keyboard; - -/** - * @ingroup event_pointer - * @struct libinput_event_pointer - * - * A pointer event representing relative or absolute pointer movement, - * a button press/release or scroll axis events. - */ -struct libinput_event_pointer; - -/** - * @ingroup event_touch - * @struct libinput_event_touch - * - * Touch event representing a touch down, move or up, as well as a touch - * cancel and touch frame events. Valid event types for this event are @ref - * LIBINPUT_EVENT_TOUCH_DOWN, @ref LIBINPUT_EVENT_TOUCH_MOTION, @ref - * LIBINPUT_EVENT_TOUCH_UP, @ref LIBINPUT_EVENT_TOUCH_CANCEL and @ref - * LIBINPUT_EVENT_TOUCH_FRAME. - */ -struct libinput_event_touch; - -/** - * @ingroup event_tablet - * @struct libinput_event_tablet_tool - * - * Tablet tool event representing an axis update, button press, or tool - * update. Valid event types for this event are @ref - * LIBINPUT_EVENT_TABLET_TOOL_AXIS, @ref - * LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY and @ref - * LIBINPUT_EVENT_TABLET_TOOL_BUTTON. - */ -struct libinput_event_tablet_tool; - -/** - * @ingroup event_tablet_pad - * @struct libinput_event_tablet_pad - * - * Tablet pad event representing a button press, or ring/strip update on - * the tablet pad itself. Valid event types for this event are @ref - * LIBINPUT_EVENT_TABLET_PAD_BUTTON, @ref LIBINPUT_EVENT_TABLET_PAD_RING and - * @ref LIBINPUT_EVENT_TABLET_PAD_STRIP. - */ -struct libinput_event_tablet_pad; - /** * @defgroup event Accessing and destruction of events */