labwc/include/common
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
..
array.h common/array.h: add array_add() helper 2024-08-03 18:25:23 +02:00
border.h Move border-struct to common/border.h for sharing 2023-06-26 06:04:07 +01:00
box.h common/box: drop box_contains() 2025-05-21 13:55:59 +02:00
buf.h buf: add buf_add_fmt() 2024-08-21 16:09:44 +02:00
dir.h config: support merging multiple config files 2024-01-18 20:20:36 +00:00
edge.h common: flesh out enum lab_edge and prefer over wlr_edges/wlr_direction 2025-08-26 20:36:43 -04:00
fd-util.h Replace _ with - in source file names 2024-05-22 07:10:51 +01:00
file-helpers.h common/file-helpers.c: share file_exists() to reduce duplication 2023-09-17 19:26:41 +01:00
font.h common/font: add scaled_font_buffer_create_for_titlebar() 2025-06-18 15:48:24 -04:00
grab-file.h common: remove buf_init(), add BUF_INIT and buf_move() 2024-04-18 07:00:23 +01:00
graphic-helpers.h include: add missing header dependencies 2025-07-29 21:51:56 +01:00
lab-scene-rect.h Replace multi_rect with lab_scene_rect 2025-06-10 06:03:03 +09:00
list.h common/list: add WL_LIST_INIT() macro 2024-11-21 20:31:41 +00:00
macros.h Disable all output leasing due to a wlroots UAF 2025-07-06 19:59:43 +01:00
match.h docs: simplify description of shell wildcard patterns 2024-12-01 20:17:04 +01:00
mem.h common/mem.h: introduce xstrdup_replace() 2024-11-16 22:13:17 +00:00
nodename.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
parse-bool.h include: add config/types.h 2025-08-21 16:55:25 +09:00
parse-double.h common: validate and properly parse floats 2024-04-02 10:37:50 -04:00
scaled-font-buffer.h common/font: add scaled_font_buffer_create_for_titlebar() 2025-06-18 15:48:24 -04:00
scaled-icon-buffer.h scaled-icon-buffer: reduce the need for updates 2025-06-27 14:05:42 +02:00
scaled-img-buffer.h ssd: dynamically look up window icons in titlebar for output scales 2025-01-26 11:46:32 +01:00
scaled-scene-buffer.h scaled-scene-buffer: block sharing of buffers created before reconfigure 2025-01-13 18:24:10 +09:00
scene-helpers.h magnifier: fix flickering on simultaneous gamma changes 2024-06-29 23:36:41 +02:00
set.h key-state.c: generalize set operations 2024-10-13 20:45:16 +01:00
spawn.h Fix typos 2025-01-09 06:59:57 +00:00
string-helpers.h string-helper: add str_space_only() 2025-07-30 20:36:27 +01:00
surface-helpers.h cursor: process layer subsurfaces in cursor_button_press() 2024-03-09 00:44:19 +01:00
xml.h common/xml: let LAB_XML_FOR_EACH() skip first child text nodes 2025-08-03 15:05:53 +01:00