HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Static Public Member Functions | Data Fields
v1::static_resource_item Struct Reference

Static Public Member Functions

static const_void_span find (std::string_view filename) noexcept
 Search for a static resource item.
 
static hi_no_inline static_resource_item constadd (static_resource_item *new_item) noexcept
 Add a resource item to the list.
 

Data Fields

static_resource_item constnext
 
char constfilename
 
const_void_span bytes
 

Member Function Documentation

◆ add()

static hi_no_inline static_resource_item const * v1::static_resource_item::add ( static_resource_item * new_item)
inlinestaticnoexcept

Add a resource item to the list.

This function should be used to initialize a static global variable which will modify the static_resource_list.

Example:

static static_resource_item tmp1 = {nullptr, "foo", foo_bytes};
constexpr Out narrow_cast(In rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:170
Definition static_resource_list.hpp:23
static hi_no_inline static_resource_item const * add(static_resource_item *new_item) noexcept
Add a resource item to the list.
Definition static_resource_list.hpp:54
Parameters
new_itemA pointer to the new item to be added to the list.
Returns
A pointer to the previous item, should be stored into a static global variable.

◆ find()

static const_void_span v1::static_resource_item::find ( std::string_view filename)
inlinestaticnoexcept

Search for a static resource item.

Parameters
filenameThe filename of the resource to search for.
Returns
A byte-span, or an empty byte-span when not found.

The documentation for this struct was generated from the following file: