Commit Graph

32 Commits

Author SHA1 Message Date
Simon Ser 873e8e4558 tablet-tool: document event data 2024-03-18 13:02:32 +00:00
Simon Ser e21b975f5d tablet-tool: add usb_vendor_id and usb_product_id to wlr_tablet 2024-03-07 11:08:18 +00:00
Simon Ser e93ecc669c tablet-tool: revert bitfield in enum wlr_tablet_tool_tip_state
This was changed to a bitfield by mistake.

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3484#note_1697926
2023-01-03 20:15:55 +00:00
Isaac Freund 91943a68a6 wlr_input_device: remove anon union field
This union is unnecessary since the recent input device refactor and can
now be replaced by wlr_*_from_input_device() functions.
2022-06-21 18:42:07 +00:00
Simon Zeni e732c5c895 types/wlr_tablet_tool: uniformize events name 2022-03-17 18:16:14 +00:00
Simon Zeni 96ccc50c57 types/wlr_input_device: move width_mm and height_mm fields to wlr_tablet and wlr_touch 2022-03-17 13:44:19 -04:00
David96 7a2c96dcbd types/wlr_tablet_tool: remove name ambiguity
It wasn't clear in the backend whether to use name or base.name, change
it so base.name has to be used.

Fixes https://github.com/swaywm/sway/issues/6884
2022-03-11 11:49:41 +01:00
Simon Zeni 7dfee50350 types/wlr_tablet_tool: add base wlr_input_device
wlr_tablet_tool owns its wlr_input_device. It will be initialized when the
tablet tool is initialized, and finished when the tablet tool is destroyed.
2022-02-21 17:11:32 +00:00
Simon Ser 5888c96da8 tablet: stop using wlr_list 2021-07-01 10:35:39 -04:00
Manuel Stoeckl a290d7a78d Make implementation function lists static const
This requires a change to the type of `struct wlr_tablet` and
`wlr_tablet_init` signature, both of which are part of the unstable API.
2021-02-05 10:04:20 +01:00
Tudor Brindus 16af1972d6 wlr/types: use bitshifts for tablet axes enum 2020-05-04 21:52:33 +02:00
Markus Ongyerth ebeef0fbe8 Clean up wayland backend tablet support
Mostly address feedback from emersion on PR #1694
Remove const qualifier from char *name, to allow free() call
2019-09-26 19:41:19 +03:00
Drew DeVault 94f65e354d Add libinput-1.14 support
This libinput version adds a new tablet tool type.
2019-08-11 19:39:47 +09:00
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
Drew DeVault 211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
Markus Ongyerth d9e978e1b3 rename wlr_tablet_tool to wlr_tablet
The previous naming was based on the input-device capability names from
libinput.
With code that uses the libinput_tablet_tool and mapping into tablet-v2,
this is confusing, so the name is changed to follow the names used in
the protocol.
2018-07-14 09:49:58 +02:00
Markus Ongyerth 48e2cba9b6 Handle relative motion for mouse tools 2018-07-14 09:48:57 +02:00
Markus Ongyerth 0c9a26828a Use wlr_list for paths, and improve inert resource handling 2018-07-14 09:43:17 +02:00
Markus Ongyerth e235f7d336 Basic tablet_v2 object lifetime 2018-07-14 09:40:39 +02:00
Markus Ongyerth 77bac448cc storage commit #2 2018-07-14 09:40:39 +02:00
Markus Ongyerth 000b305ecc backend/libinput: Manage tablet tool livetimes
This adds the management code to manage tablet tools lifetimes from
libinput.
It follows the suggestion made in the tablet-unstable-v2.xml to destroy
tablet_tools once all tablets that it got into contact with were removed
from the system. This is implemented via a refcount.

If a tool is *not* unique, it will be destroyed on proximity out. This
is libinput specific and mentioned in libinput docs that tools will not
be found again, so we shouldn't keep a reference to them.
Also they can't be on other tablets as well, because they cannot be
tracked.

The naming in this commit is a bit off (to not break things).
The wlr names stay the same, tablet_tool is the libinput_device with
capaiblity LIBINPUT_DEVICE_CAP_TABLET_TOOL which is more akin to
"tablet" in the tablet-unstable-v2 protocol.
The struct that corresponds to the tablet_tool in tablet-unstable-v2 is
called tablet_tool_tool, a rename should be done at some point in the
future.
2018-07-14 09:40:39 +02:00
Drew DeVault ac219cbda6 Remove width_mm from tablet events 2018-03-28 12:05:37 -04:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
Tony Crisci 875a5b446f remove time usec 2017-10-30 15:43:06 -04:00
Tony Crisci a224e74fad refactor input time_sec to time_msec 2017-10-30 06:40:06 -04:00
emersion 427bdb5b55
Use more consistent include guard names 2017-09-23 10:26:01 +02:00
Drew DeVault 30611894f2 Implement tablet_tool support in pointer example 2017-08-28 22:12:35 -04:00
Tony Crisci df0ee7f25f implement tablet tool devices 2017-08-28 10:23:14 -04:00
Dominique Martinet bd67849c03 Refactor out wlr_tablet_tool_state 2017-08-14 16:22:31 +02:00
Calvin Lee a8c1e8ce69 Add user data to wlr_* structs
Resolves #68
2017-08-11 20:44:17 +02:00
Drew DeVault 3d71969b2a Make event names consistent 2017-06-21 14:07:09 -04:00
Drew DeVault 53a8b4f127 Split out types.h and wlr/types.h
TODO: Update the code accordingly and move other types into the same
paradigm
2017-06-21 10:10:04 -04:00