ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_widget_toolbar.h
Go to the documentation of this file.
1
26
27#pragma once
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <stdint.h>
34
35#include "ra8_err.h"
36#include "ra8_widget.h"
37
69typedef struct ra8_widget_toolbar {
71 const char* hint;
72 const char* count;
73 void (*on_search)(struct ra8_widget* w);
74 uint32_t bg;
75 uint32_t field;
76 uint32_t border;
77 uint32_t hint_fg;
78 uint32_t count_fg;
79 uint32_t searches;
80 int16_t pad;
81 int16_t border_w;
82 int16_t count_w;
84
107
134
135#ifdef __cplusplus
136}
137#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.
const ra8_widget_vtable_t * ra8_widget_toolbar_vtable(void)
Return the shared vtable backing every toolbar widget.
ra8_err_t ra8_widget_toolbar_init(ra8_widget_t *w, ra8_widget_toolbar_t *bar)
Bind a widget instance to a toolbar.
Drawing backend the concrete leaf widgets paint through (a DI seam).
One widget instance (caller-owned, no allocation).
A search-field + count-chip toolbar band with a tappable field.
int16_t count_w
Fixed count-chip width, px (>= 0).
int16_t pad
Inner padding inset, pixels.
int16_t border_w
Search-field border thickness, px (>= 0).
void(* on_search)(struct ra8_widget *w)
Tap-in-field callback (optional/NULL).
uint32_t border
Search-field border colour, 0xRRGGBB.
const ra8_widget_paint_t * paint
Draw backend (NULL -> draws nothing).
uint32_t searches
Count of search-field taps (observable).
uint32_t count_fg
Count chip text colour, 0xRRGGBB.
const char * hint
Search-field placeholder (NULL -> none).
uint32_t bg
Band background colour, 0xRRGGBB.
const char * count
Right count chip text (NULL -> none).
uint32_t field
Search-field fill colour, 0xRRGGBB.
uint32_t hint_fg
Placeholder text colour, 0xRRGGBB.
Behaviour table shared by all widgets of one kind.
Definition ra8_widget.h:121