common: add node-type.c/h (renaming ssd_part_type to lab_node_type)

ssd_part_type contains several node types that are not actually part of
server-side decorations (ROOT, MENU, OSD, etc.)

Rename it accordingly and move it to a common location, along with some
related conversion/comparison functions.
This commit is contained in:
John Lindgren 2025-09-03 05:08:52 -04:00
parent 502473f343
commit 1188534876
28 changed files with 345 additions and 315 deletions

View file

@ -10,7 +10,7 @@
#include <cairo.h>
#include <wlr/render/wlr_renderer.h>
#include "ssd.h"
#include "common/node-type.h"
struct lab_img;
@ -90,7 +90,7 @@ struct theme {
struct theme_background title_bg;
/* TODO: add toggled/hover/pressed/disabled colors for buttons */
float button_colors[LAB_SSD_BUTTON_LAST + 1][4];
float button_colors[LAB_NODE_BUTTON_LAST + 1][4];
float border_color[4];
float toggled_keybinds_color[4];
@ -109,7 +109,7 @@ struct theme {
* Elements in buttons[0] are all NULL since LAB_SSD_BUTTON_FIRST is 1.
*/
struct lab_img *button_imgs
[LAB_SSD_BUTTON_LAST + 1][LAB_BS_ALL + 1];
[LAB_NODE_BUTTON_LAST + 1][LAB_BS_ALL + 1];
/*
* The titlebar background is specified as a cairo_pattern