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

@ -2,9 +2,9 @@
#ifndef LABWC_MOUSEBIND_H
#define LABWC_MOUSEBIND_H
#include <stdbool.h>
#include <wayland-util.h>
#include "ssd.h"
#include "config/keybind.h"
#include "common/node-type.h"
enum mouse_event {
MOUSE_ACTION_NONE = 0,
@ -25,7 +25,7 @@ enum direction {
};
struct mousebind {
enum ssd_part_type context;
enum lab_node_type context;
/* ex: BTN_LEFT, BTN_RIGHT from linux/input_event_codes.h */
uint32_t button;

View file

@ -10,8 +10,8 @@
#include "common/border.h"
#include "common/buf.h"
#include "common/font.h"
#include "common/node-type.h"
#include "config/types.h"
#include "ssd.h"
#define BUTTON_MAP_MAX 16
@ -48,7 +48,7 @@ struct button_map_entry {
};
struct title_button {
enum ssd_part_type type;
enum lab_node_type type;
struct wl_list link;
};