ui: key press callbacks (not finished)

This commit is contained in:
2026-04-09 15:44:30 +03:00
parent 48b24fdd46
commit 173bd3000d
9 changed files with 132 additions and 63 deletions
+17
View File
@@ -3,9 +3,26 @@
#ifndef COMMON_H
#define COMMON_H
#include <stdint.h>
typedef struct {
uint32_t cur_y, cur_x;
uint32_t max_y, max_x;
} coordinates_t;
#define MAIN_UI_RESET(app) \
app->main_ui.ui = NULL; \
app->main_ui.cb_refresh = NULL; \
app->main_ui.cb_b_press = NULL; \
app->main_ui.b_keys = NULL;
struct action_key {
char *const key;
char *const title;
int const code;
int (*callback)(void *app, void *d_args);
};
#endif