Documentation for <wlr/types/wlr_tablet_tool.h>

Back to index

Table of contents

struct wlr_tablet

struct wlr_tablet {
	struct wlr_input_device base;
	const struct wlr_tablet_impl *impl;
	double width_mm, height_mm;
	struct {
		struct wl_signal axis;
		struct wl_signal proximity;
		struct wl_signal tip;
		struct wl_signal button;
	} events;
	struct wl_array paths;
	void *data;
};

struct wlr_tablet_tool

struct wlr_tablet_tool {
	enum wlr_tablet_tool_type type;
	uint64_t hardware_serial;
	uint64_t hardware_wacom;
	bool tilt;
	bool pressure;
	bool distance;
	bool rotation;
	bool slider;
	bool wheel;
	struct {
		struct wl_signal destroy;
	} events;
	void *data;
};

enum wlr_tablet_tool_axes

enum wlr_tablet_tool_axes {
	WLR_TABLET_TOOL_AXIS_X,
	WLR_TABLET_TOOL_AXIS_Y,
	WLR_TABLET_TOOL_AXIS_DISTANCE,
	WLR_TABLET_TOOL_AXIS_PRESSURE,
	WLR_TABLET_TOOL_AXIS_TILT_X,
	WLR_TABLET_TOOL_AXIS_TILT_Y,
	WLR_TABLET_TOOL_AXIS_ROTATION,
	WLR_TABLET_TOOL_AXIS_SLIDER,
	WLR_TABLET_TOOL_AXIS_WHEEL,
};

struct wlr_tablet_tool_axis_event

struct wlr_tablet_tool_axis_event {
	struct wlr_tablet *tablet;
	struct wlr_tablet_tool *tool;
	uint32_t time_msec;
	uint32_t updated_axes;
	double x, y;
	double dx, dy;
	double pressure;
	double distance;
	double tilt_x, tilt_y;
	double rotation;
	double slider;
	double wheel_delta;
};

struct wlr_tablet_tool_button_event

struct wlr_tablet_tool_button_event {
	struct wlr_tablet *tablet;
	struct wlr_tablet_tool *tool;
	uint32_t time_msec;
	uint32_t button;
	enum wlr_button_state state;
};

struct wlr_tablet_tool_proximity_event

struct wlr_tablet_tool_proximity_event {
	struct wlr_tablet *tablet;
	struct wlr_tablet_tool *tool;
	uint32_t time_msec;
	double x, y;
	enum wlr_tablet_tool_proximity_state state;
};

enum wlr_tablet_tool_proximity_state

enum wlr_tablet_tool_proximity_state {
	WLR_TABLET_TOOL_PROXIMITY_OUT,
	WLR_TABLET_TOOL_PROXIMITY_IN,
};

struct wlr_tablet_tool_tip_event

struct wlr_tablet_tool_tip_event {
	struct wlr_tablet *tablet;
	struct wlr_tablet_tool *tool;
	uint32_t time_msec;
	double x, y;
	enum wlr_tablet_tool_tip_state state;
};

enum wlr_tablet_tool_tip_state

enum wlr_tablet_tool_tip_state {
	WLR_TABLET_TOOL_TIP_UP,
	WLR_TABLET_TOOL_TIP_DOWN,
};

enum wlr_tablet_tool_type

enum wlr_tablet_tool_type {
	WLR_TABLET_TOOL_TYPE_PEN,
	WLR_TABLET_TOOL_TYPE_ERASER,
	WLR_TABLET_TOOL_TYPE_BRUSH,
	WLR_TABLET_TOOL_TYPE_PENCIL,
	WLR_TABLET_TOOL_TYPE_AIRBRUSH,
	WLR_TABLET_TOOL_TYPE_MOUSE,
	WLR_TABLET_TOOL_TYPE_LENS,
	WLR_TABLET_TOOL_TYPE_TOTEM,
};

Copy+Paste from libinput, but this should neither use libinput, nor tablet-unstable-v2 headers, so we can't include them