osd: split to osd.c and osd-classic.c

This commit is contained in:
tokyo4j 2025-08-08 12:29:08 +09:00 committed by Johan Malm
parent 57a1ea6cb5
commit 92ee5083f0
4 changed files with 240 additions and 194 deletions

View file

@ -5,6 +5,8 @@
#include <stdbool.h>
#include <wayland-server-core.h>
struct output;
enum lab_cycle_dir {
LAB_CYCLE_DIR_NONE,
LAB_CYCLE_DIR_FORWARD,
@ -66,4 +68,20 @@ void osd_field_arg_from_xml_node(struct window_switcher_field *field,
bool osd_field_is_valid(struct window_switcher_field *field);
void osd_field_free(struct window_switcher_field *field);
/* Internal API */
struct osd_impl {
/*
* Create a scene-tree of OSD for an output.
* This sets output->osd_scene.{items,tree}.
*/
void (*create)(struct output *output, struct wl_array *views);
/*
* Update output->osd_scene.tree to highlight
* server->osd_state.cycle_view.
*/
void (*update)(struct output *output);
};
extern struct osd_impl osd_classic_impl;
#endif // LABWC_OSD_H