30static const char*
s_tag =
"ra8_widget_keyboard";
36typedef enum : uint8_t {
64 if (p->draw_text ==
nullptr) {
68 const char* text = info->label;
74 if (text ==
nullptr) {
80 p->draw_text(p->user, tx, ty, text, kbd->key_fg, kbd->key_face);
102 if (kbd ==
nullptr) {
105 if (kbd->paint ==
nullptr) {
109 if ((kbd->ops ==
nullptr) || (kbd->ops->count ==
nullptr) || (kbd->ops->key_info ==
nullptr)) {
112 const uint8_t n = kbd->ops->count(kbd->ops->user);
113 for (uint8_t i = 0U; i < n; ++i) {
115 kbd->ops->key_info(kbd->ops->user, i, &info);
143 if (kbd ==
nullptr) {
149 if ((kbd->ops ==
nullptr) || (kbd->ops->hit ==
nullptr) || (kbd->ops->apply ==
nullptr)) {
152 const uint8_t key = kbd->ops->hit(kbd->ops->user, ev->
x, ev->
y);
156 const bool committed = kbd->ops->apply(kbd->ops->user, key);
158 if (committed && (kbd->on_commit !=
nullptr)) {
static const char * s_tag
Logging / check tag.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.