ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_widget_keyboard_t Struct Reference

An on-screen keyboard: key styling + engine seam + commit callback. More...

#include <ra8_widget_keyboard.h>

Detailed Description

An on-screen keyboard: key styling + engine seam + commit callback.

Caller-owned plain data bound to a ra8_widget_t with ra8_widget_keyboard_init. render fills the widget rect with bg, then draws each key as a border-framed key_face face carrying its centred glyph / label in key_fg. on_input maps a touch to a key via the seam, applies it, self-invalidates for a redraw, and – on the commit edge – fires on_commit.

Invariant
border_w >= 0.
Example:
ra8_widget_keyboard_ops_t ops = {.user = &kb, .count = kb_count,
.key_info = kb_info, .hit = kb_hit,
.apply = kb_apply};
ra8_widget_keyboard_t kbd = {.paint = &paint, .ops = &ops,
.on_commit = run_search, .bg = 0x00202020U,
.key_face = 0x00404040U, .key_border = 0x00101010U,
.key_fg = 0x00FFFFFFU, .border_w = 1};
ra8_widget_t w = {};
(void)ra8_widget_keyboard_init(&w, &kbd);
struct ra8_widget ra8_widget_t
ra8_err_t ra8_widget_keyboard_init(ra8_widget_t *w, ra8_widget_keyboard_t *kbd)
Bind a widget instance to an on-screen keyboard.
Injected seam driving an ra8_keyboard from the keyboard widget.
An on-screen keyboard: key styling + engine seam + commit callback.
See also
ra8_widget_keyboard_init
ra8_widget_keyboard_ops_t
Since
0.1.0

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