Clean up build scaffolding for libsfdo and add the creation and

destruction of an sfdo data structure associated with a sway server with
a view to future use of icon themes in places such as titlebars
This commit is contained in:
myrslint 2025-04-16 20:50:42 +00:00
parent d9a6bdb85e
commit 3a21b8c6f1
4 changed files with 147 additions and 29 deletions

View file

@ -8,7 +8,11 @@
#if WLR_HAS_XWAYLAND
#include "sway/xwayland.h"
#endif
#if HAVE_LIBSFDO
#include <sfdo-desktop.h>
#include <sfdo-icon.h>
#include <sfdo-basedir.h>
#endif
struct sway_transaction;
struct sway_session_lock {
@ -24,6 +28,15 @@ struct sway_session_lock {
struct wl_listener destroy;
};
#if HAVE_LIBSFDO
struct sfdo {
struct sfdo_desktop_ctx *desktop_ctx;
struct sfdo_icon_ctx *icon_ctx;
struct sfdo_desktop_db *desktop_db;
struct sfdo_icon_theme *icon_theme;
};
#endif
struct sway_server {
struct wl_display *wl_display;
struct wl_event_loop *wl_event_loop;
@ -143,6 +156,11 @@ struct sway_server {
list_t *dirty_nodes;
struct wl_event_source *delayed_modeset;
#if HAVE_LIBSFDO
struct sfdo *sfdo;
#endif
};
extern struct sway_server server;
@ -191,4 +209,9 @@ void set_rr_scheduling(void);
void handle_new_tearing_hint(struct wl_listener *listener, void *data);
#if HAVE_LIBSFDO
struct sfdo *sfdo_create(char *theme);
void sfdo_destroy(struct sfdo *sfdo);
#endif
#endif