Files
feedbackd/src/fbd-theme-expander.h
T
Guido Günther 242519498a Recursively load themes
Themes (other than the default theme) can specify a `parent-name` in the
json file. This theme will be used as a base for the theme. Events and
profiles of the children override those in the parents.

For this we move the lookup code into it's separate class and also add
tests.

Closes: #38
2022-12-11 17:34:38 +01:00

29 lines
869 B
C

/*
* Copyright (C) 2022 Guido Günther
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Author: Guido Günther <agx@sigxcpu.org>
*/
#pragma once
#include "fbd-feedback-theme.h"
#include <glib-object.h>
G_BEGIN_DECLS
#define FBD_TYPE_THEME_EXPANDER (fbd_theme_expander_get_type ())
G_DECLARE_FINAL_TYPE (FbdThemeExpander, fbd_theme_expander, FBD, THEME_EXPANDER, GObject)
FbdThemeExpander *fbd_theme_expander_new (const char * const *compatibles,
const char *theme_file);
FbdFeedbackTheme *fbd_theme_expander_load_theme_files (FbdThemeExpander *self,
GError **err);
const char *fbd_theme_expander_get_theme_file (FbdThemeExpander *self);
const char * const *fbd_theme_expander_get_compatibles (FbdThemeExpander *self);
G_END_DECLS