ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
binary_asset_blobs.h
Go to the documentation of this file.
1// Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2// SPDX-License-Identifier: AGPL-3.0-or-later
3//
4// GENERATED by src/web_assets/wizard/gen_theme_blobs.py - DO NOT EDIT BY HAND.
5// Add or edit a theme under src/web_assets/themes/ and re-run the generator.
6
7#ifndef PROTOCORE_BINARY_ASSET_BLOBS_H
8#define PROTOCORE_BINARY_ASSET_BLOBS_H
9
10#include "protocore_config.h" // the entry point: protocore_types.h for the widths
11
13
14/**
15 * @file binary_asset_blobs.h
16 * @brief Layer 7 - toggleable embedded theme stylesheets (PROTOCORE_ENABLE_THEMES).
17 *
18 * A registry of minified CSS themes in flash (DROM), for serving/switching a theme at runtime.
19 * Behind PROTOCORE_ENABLE_THEMES so a build that does not want it links nothing.
20 *
21 * @c work is bytes the CALLER holds. This module reads none of them: it carries nothing
22 * between calls, so there is no state to keep and nothing to wipe. The parameter is there so
23 * a caller drives every namespace the same way.
24 */
25
26/** @brief One embedded theme: its name and its minified CSS (NUL-terminated flash string). */
27typedef struct
28{
29 const char *name;
30 const char *css;
32
33/** @brief The embedded theme registry (sorted by name) and its count. */
35
36extern const size_t PROTOCORE_THEME_BLOB_COUNT;
37
38/** @brief Dispatch table. Addressed by offset, so the layout is asserted below. */
39typedef struct
40{
41 const char *(*css)(uint8_t *, const char *);
44
45/**
46 * @brief Look up a theme's CSS by name (exact match).
47 * @param work Bytes the caller holds. Not read.
48 * @param name The theme name, NUL-terminated.
49 * @return The NUL-terminated minified CSS, or NULL where no theme by that name is embedded.
50 */
51const char *protocore_binary_asset_blobs_css(uint8_t *work, const char *name);
52
53/** @brief Module namespace. */
55
57
58#endif // PROTOCORE_BINARY_ASSET_BLOBS_H
const protocore_theme_blob PROTOCORE_THEME_BLOBS[]
The embedded theme registry (sorted by name) and its count.
const char * protocore_binary_asset_blobs_css(uint8_t *work, const char *name)
Look up a theme's CSS by name (exact match).
PROTOCORE_NS BinaryAssetBlobsNs BinaryAssetBlobs PROTOCORE_UNUSED
Module namespace.
const size_t PROTOCORE_THEME_BLOB_COUNT
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
Dispatch table. Addressed by offset, so the layout is asserted below.
const char *(* css)(uint8_t *, const char *)
One embedded theme: its name and its minified CSS (NUL-terminated flash string).
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
Definition types.h:96
#define PROTOCORE_END_DECLS
Definition types.h:97