mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 20:36:38 +02:00
core: add core-theme skeleton and theme registry
Introduce a new module (core-theme.{c,h}) holding the in-memory registry
of built-in themes used by the upcoming /theme command:
- struct t_theme stores name, description, date and weechat version
captured at registration time, plus a hashtable of overrides keyed by
full option name (file.section.option) -> value string.
- theme_register (name, overrides) creates a new theme or merges the
given overrides into an existing one (later calls override duplicate
keys); this is the API plugins and scripts will use to contribute
per-theme color values.
- theme_search and theme_list provide lookup and ordered enumeration.
- theme_init / theme_end are called from weechat_init / weechat_end.
The theme_applying flag is declared here but not yet consumed (it will
gate config_change_color in the next commit to avoid N redundant
window refreshes during /theme apply).
User theme files are not handled by this module: they are read
transiently inside /theme apply (a later commit) and never cached.
This commit is contained in:
@@ -77,6 +77,7 @@ IMPORT_TEST_GROUP(CoreNetwork);
|
||||
IMPORT_TEST_GROUP(CoreSecure);
|
||||
IMPORT_TEST_GROUP(CoreSignal);
|
||||
IMPORT_TEST_GROUP(CoreString);
|
||||
IMPORT_TEST_GROUP(CoreTheme);
|
||||
IMPORT_TEST_GROUP(CoreUrl);
|
||||
IMPORT_TEST_GROUP(CoreUtf8);
|
||||
IMPORT_TEST_GROUP(CoreUtil);
|
||||
|
||||
Reference in New Issue
Block a user