Themes

Themes
Source snapshot: 9b4f8a3 (2026-09-23); retained QMail clone, including M7.
Working = implemented in this snapshot, not a new runtime/test certification.
Partial = an identified implementation/exposure gap; obsolete = retained compatibility only.
Entry points and static functions are selected navigation anchors; full lexical index: function-index.txt.
Used by / Tests list selected source references (including callback registration), not a proven dynamic call graph.
Tests were inspected, not executed; use tools/test.ps1 with isolated scratch data.
Old paths come from docs/path-map.txt; absent mappings denote additions after the move.

Palette and image theme schema

Purpose
Define palettes, metrics, font roles and texture slots; select built-in themes.
Files
src/gui/layout/theme.c include/qgui/theme.h
Old paths
vendor/gui-3/src/layout/theme.c -> src/gui/layout/theme.c vendor/gui-3/include/qgui/theme.h -> include/qgui/theme.h
Public header
include/qgui/theme.h
Entry points
src/gui/layout/theme.c:184 :: qgui_theme_by_id() src/gui/layout/theme.c:21 :: qgui_theme_nocturne()
Important static functions
src/gui/layout/theme.c:11 :: rgb() src/gui/layout/theme.c:129 :: hex()
Owns
qgui_theme_t schema and QGUI_THEME_DEFAULT_ID (dark).
Used by
src/app/main.c src/gui/host/loop.c src/gui/layout/panes.c src/gui/logic/reduce.c src/gui/logic/viewmodel.c
Side effects
Fills/scales theme structures; no download or external theme parsing here.
Tests
tests/gui/avatar_render_test.cpp tests/gui/server_gui_test.c tests/gui/test_headers.c tests/gui/theme_switch_test.c tests/gui/layout/test_columns.c tests/gui/layout/test_contrast.c tests/gui/layout/test_editor.c tests/gui/layout/test_hits.c
Platforms
Windows; POSIX branches/dependencies where present. Linux/macOS runtime unverified in M13.
Status
partial; Palette selection works. Image-theme assets are still embedded by src/app/CMakeLists.txt; external theme.txt schema/loader from M9 is not implemented in this clone.

Embedded assets

Purpose
Build/read the asset pack and compile sound/window-icon resources.
Files
src/app/asset_provider.c tools/build/embed_assets_fixed.ps1 src/platform/win/embedded_sounds.rc.in src/platform/win/app_icon.rc.in
Old paths
src/assets/asset_provider.c -> src/app/asset_provider.c tools/embed_assets_fixed.ps1 -> tools/build/embed_assets_fixed.ps1 src/assets/embedded_sounds.rc.in -> src/platform/win/embedded_sounds.rc.in src/assets/app_icon.rc.in -> src/platform/win/app_icon.rc.in
Public header
include/qmail/asset_provider.h
Entry points
src/app/asset_provider.c:8 :: qmail_asset_open()
Important static functions
None identified by lexical inspection; C++ methods and script helpers are outside the C static index.
Owns
Embedded asset inventory and lookup; generated C is outside this catalog.
Used by
src/gui/render/render.cpp
Side effects
Palette functions fill structures; asset tooling emits generated pack data, and the provider reads it.
Tests
tests/unit/asset_provider_test.c
Platforms
Windows; POSIX branches/dependencies where present. Linux/macOS runtime unverified in M13.
Status
working; No embedded fonts. Image assets still travel in the executable at this snapshot.