ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
binary_asset_blobs.h File Reference

Layer 7 - toggleable embedded theme stylesheets (PROTOCORE_ENABLE_THEMES). More...

#include "protocore_config.h"

Go to the source code of this file.

Classes

struct  protocore_theme_blob
 One embedded theme: its name and its minified CSS (NUL-terminated flash string). More...
 
struct  BinaryAssetBlobsNs
 Dispatch table. Addressed by offset, so the layout is asserted below. More...
 

Functions

 PROTOCORE_NS_LAYOUT (BinaryAssetBlobsNs, css)
 
const char * protocore_binary_asset_blobs_css (uint8_t *work, const char *name)
 Look up a theme's CSS by name (exact match).
 

Variables

const protocore_theme_blob PROTOCORE_THEME_BLOBS []
 The embedded theme registry (sorted by name) and its count.
 
const size_t PROTOCORE_THEME_BLOB_COUNT
 
PROTOCORE_NS BinaryAssetBlobsNs BinaryAssetBlobs PROTOCORE_UNUSED = {.css = protocore_binary_asset_blobs_css}
 Module namespace.
 

Detailed Description

Layer 7 - toggleable embedded theme stylesheets (PROTOCORE_ENABLE_THEMES).

A registry of minified CSS themes in flash (DROM), for serving/switching a theme at runtime. Behind PROTOCORE_ENABLE_THEMES so a build that does not want it links nothing.

work is bytes the CALLER holds. This module reads none of them: it carries nothing between calls, so there is no state to keep and nothing to wipe. The parameter is there so a caller drives every namespace the same way.

Definition in file binary_asset_blobs.h.

Function Documentation

◆ PROTOCORE_NS_LAYOUT()

PROTOCORE_NS_LAYOUT ( BinaryAssetBlobsNs  ,
css   
)

◆ protocore_binary_asset_blobs_css()

const char * protocore_binary_asset_blobs_css ( uint8_t *  work,
const char *  name 
)

Look up a theme's CSS by name (exact match).

Parameters
workBytes the caller holds. Not read.
nameThe theme name, NUL-terminated.
Returns
The NUL-terminated minified CSS, or NULL where no theme by that name is embedded.

Variable Documentation

◆ PROTOCORE_THEME_BLOBS

const protocore_theme_blob PROTOCORE_THEME_BLOBS[]
extern

The embedded theme registry (sorted by name) and its count.

◆ PROTOCORE_THEME_BLOB_COUNT

const size_t PROTOCORE_THEME_BLOB_COUNT
extern

◆ PROTOCORE_UNUSED

PROTOCORE_NS BinaryAssetBlobsNs BinaryAssetBlobs PROTOCORE_UNUSED = {.css = protocore_binary_asset_blobs_css}

Module namespace.

Definition at line 54 of file binary_asset_blobs.h.