labwc/include/input
John Lindgren ef766d16f0 common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction
I like the new common/edge.h. I don't like how inconsistently we use it.

Current situation:

 - enum wlr_edges and wlr_direction are designed to be used as bitset,
   and are defined compatibly

 - enum lab_edge is *also* designed to be used as bitset, but
   incompatible with the others (LEFT/RIGHT come before UP/DOWN)

 - we use an inconsistent mix of all three *AND* uint32_t (usually with
   the WLR_EDGE constants rather than the LAB_EDGE constants), and
   convert between them on an ad-hoc basis, sometimes implicitly

Let's clean this up:

 - reorder enum lab_edge to be compatible with the two wlr enums
   (check this by static_assert)

 - use TOP/BOTTOM naming rather than UP/DOWN (matches wlr_edges)

 - add constants for the remaining possible combinations of the 4 edges

 - use lab_edge for all internal edge/direction fields, consistently

 - add lab_edge_is_cardinal() as a sanity check before casting to
   enum wlr_direction, and then eliminate all of direction.c/h

Instead of "enum wlr_edges direction", we now have
"enum lab_edge direction" which is not that much better. At least we
are now clear that we're overloading one enum with two meanings.
2025-08-26 20:36:43 -04:00
..
cursor.h common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
gestures.h Move gesture handling out of cursor.c 2023-10-30 21:14:04 +00:00
ime.h ime: revert workarounds for wlroots 0.18.2 2025-06-26 03:20:11 +09:00
input.h include: move a few types from labwc.h to better locations 2025-07-30 21:04:31 +01:00
key-state.h Revert "keyboard: include pressed modifiers in bound set" 2024-12-29 16:27:34 +09:00
keyboard.h include: move a few types from labwc.h to better locations 2025-07-30 21:04:31 +01:00
tablet-pad.h input: move cursor event listeners from tablet to seat 2024-08-13 18:40:34 +02:00
tablet.h include: add config/types.h 2025-08-21 16:55:25 +09:00
touch.h Make touch depend on cursor to prevent racing 2023-10-30 21:14:04 +00:00