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
border.h
box.h
buf.h
dir.h
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
file-helpers.h
font.h common/font: add scaled_font_buffer_create_for_titlebar() 2025-06-18 15:48:24 -04:00
grab-file.h
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
macros.h Disable all output leasing due to a wlroots UAF 2025-07-06 19:59:43 +01:00
match.h
mem.h
node-type.h ssd: unify struct ssd_part with struct node_descriptor 2025-09-06 16:00:20 -04:00
nodename.h
parse-bool.h include: add config/types.h 2025-08-21 16:55:25 +09:00
parse-double.h
scene-helpers.h
set.h
spawn.h
string-helpers.h string-helper: add str_space_only() 2025-07-30 20:36:27 +01:00
surface-helpers.h
xml.h common/xml: let LAB_XML_FOR_EACH() skip first child text nodes 2025-08-03 15:05:53 +01:00