labwc/include/common
John Lindgren f129571779 ssd: unify struct ssd_part with struct node_descriptor
struct ssd_part and struct node_descriptor seem to have essentially the
same purpose: tag a wlr_scene_node with some extra data indicating what
we're using it for.

Also, as with enum ssd_part_type (now lab_node_type), ssd_part is used
for several types of nodes that are not part of SSD.

So instead of the current chaining (node_descriptor -> ssd_part), let's
flatten/unify the two structs.

In detail:

- First, merge node_descriptor_type into lab_node_type.
- Add a separate view pointer in node_descriptor, since in the case of
  SSD buttons we need separate view and button data pointers.
- Rename ssd_part_button to simply ssd_button. It no longer contains
  an ssd_part as base.
- Add node_try_ssd_button_from_node() which replaces
  node_ssd_part_from_node() + button_try_from_ssd_part().
- Factor out ssd_button_free() to be called in node descriptor destroy.
- Finally, get_cursor_context() needs a little reorganization to handle
  the unified structs.

Overall, this simplifies the code a bit, and in my opinion makes it
easier to understand. No functional change intended.
2025-09-06 16:00:20 -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
node-type.h ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04: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
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