1
1
mirror of https://github.com/swaywm/sway synced 2024-09-28 15:21:32 +02:00
sway/include
Brian Ashworth 6f6a9af60e Add helpers for improved mouse button parsing
The following helper functions have been added to aid with parsing mouse
buttons from a string:

1. `get_mouse_bindsym`: attempts to parse the string as an x11 button
(button[1-9]) or as an event name (ex BTN_LEFT or BTN_SIDE)
2. `get_mouse_bindcode`: attempts to parse the string as an event code
and validates that the event code is a button (starts with `BTN_`).
3. `get_mouse_button`: this is a conveniency function for callers that
do not care whether a bindsym or bindcode are used and attempts to parse
the string as a bindsym and then bindcode.

None of these functions are used in this commit. The sole purpose of
this commit is to make the larger set more granular and easier to
review/manipulate. There will be a series of commits following this one
that will modify any command which uses a mouse button to use these
helpers.
2019-01-09 11:29:04 -05:00
..
sway Add helpers for improved mouse button parsing 2019-01-09 11:29:04 -05:00
swaybar
swaylock
swaynag
background-image.h
cairo.h
ipc-client.h
ipc.h
list.h
log.h
loop.h
meson.build
pango.h
pool-buffer.h
stringop.h
unicode.h
util.h