ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_widget_status_bar.h
Go to the documentation of this file.
1
25
26#pragma once
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#include <stdint.h>
33
34#include "ra8_err.h"
35#include "ra8_widget.h"
36
65typedef struct ra8_widget_status_bar {
67 const char* left;
68 const char* right;
69 uint32_t bg;
70 uint32_t fg;
71 uint32_t fg_right;
72 uint32_t rule;
73 int16_t pad;
74 int16_t rule_h;
76
99
126
127#ifdef __cplusplus
128}
129#endif
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Zero-heap composable widget layer (dwm-style) over ra8_box + ra8_ui.
ra8_err_t ra8_widget_status_bar_init(ra8_widget_t *w, ra8_widget_status_bar_t *bar)
Bind a widget instance to a status bar.
const ra8_widget_vtable_t * ra8_widget_status_bar_vtable(void)
Return the shared vtable backing every status-bar widget.
Drawing backend the concrete leaf widgets paint through (a DI seam).
A status band: a fill, a left + right label, and a bottom hairline.
const char * left
Left-aligned text (NULL -> none).
uint32_t fg_right
Right text colour, 0xRRGGBB.
const ra8_widget_paint_t * paint
Draw backend (NULL -> draws nothing).
uint32_t bg
Background fill colour, 0xRRGGBB.
int16_t rule_h
Hairline thickness in px (<= 0 -> none).
uint32_t fg
Left text colour, 0xRRGGBB.
int16_t pad
Inner text inset, pixels.
const char * right
Right-aligned text (NULL -> none).
uint32_t rule
Bottom hairline colour, 0xRRGGBB.
One widget instance (caller-owned, no allocation).
Behaviour table shared by all widgets of one kind.
Definition ra8_widget.h:121