aboutsummaryrefslogtreecommitdiffstats
path: root/surfaces/access.c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-18 20:54:17 +0100
committereunhhu <[email protected]>2026-10-18 20:54:17 +0100
commit4d9598e7d0d6d45bf3db9305d365bd2967481bcd (patch)
tree59a1b7c945eef69bf9098523c33dc3b8c29c1312 /surfaces/access.c
parent991403f164bef7dcf07b053900367a8f0a60ae6c (diff)
downloadvega-4d9598e7d0d6d45bf3db9305d365bd2967481bcd.tar.gz
vega-4d9598e7d0d6d45bf3db9305d365bd2967481bcd.zip
Send every input as a message (Pure 027's 4d): keys, text, timers, frames and pointing go to the inputs bound to them; a key's press then its release when a message takes it; vega_frame sends dt 1/60 to the frame input, deferring the save as frames were; a table's pointer is the input pointing at it, sent the item's position; a key's handler found by its input's number
Diffstat (limited to 'surfaces/access.c')
-rw-r--r--surfaces/access.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/surfaces/access.c b/surfaces/access.c
index 9b5452b..24e3d00 100644
--- a/surfaces/access.c
+++ b/surfaces/access.c
@@ -76,7 +76,7 @@ static Object parse_path(const VegaAccess *a, const char *path) {
if (o.kind == ROW && s->parts[o.part].kind == VEGA_FIELD) o.kind = NONE;
if (o.kind == TITLE && s->title < 0) o.kind = NONE;
if (o.kind == ENTRY && s->prompt < 0) o.kind = NONE;
- if (o.kind == KEY && (o.key >= a->app->module->inputs || a->app->module->input[o.key].kind != PURE_KIND_KEY)) o.kind = NONE;
+ if (o.kind == KEY && (o.key >= a->app->module->inputs || a->app->module->input[o.key].binding != PURE_BIND_PRESS)) o.kind = NONE;
return o;
}
@@ -98,9 +98,9 @@ static void path_of(const Object *o, char *out, size_t size) {
/* The keys the screen answers: key inputs a handler takes. */
static bool bound_key(const PureModule *m, uint32_t input) {
- if (m->input[input].kind != PURE_KIND_KEY) return false;
+ if (m->input[input].binding != PURE_BIND_PRESS) return false;
for (uint32_t h = 0; h < m->handlers; ++h)
- if (m->handler[h].event == 1 + 2 * input) return true;
+ if (m->handler[h].event == input) return true;
return false;
}