aboutsummaryrefslogtreecommitdiff
path: root/src/menu.h
diff options
context:
space:
mode:
authorLibravatar Martin Michalec <martin@michalec.dev>2026-11-07 06:12:48 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-07 06:21:22 +0000
commit39dcac2281970febcce36a0151796af2986388b3 (patch)
tree7339e54dc942a3ab0d9ba9daae56a2801c1917e9 /src/menu.h
downloadcoursework-39dcac2281970febcce36a0151796af2986388b3.tar.gz
publishHEADmaster
Diffstat (limited to 'src/menu.h')
-rw-r--r--src/menu.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/menu.h b/src/menu.h
new file mode 100644
index 0000000..898a3f4
--- /dev/null
+++ b/src/menu.h
@@ -0,0 +1,24 @@
1#ifndef INCLUDED_MENU_H
2#define INCLUDED_MENU_H
3
4#include <stdlib.h>
5#include <stdbool.h>
6
7typedef bool (*menu_item_handler)(void);
8
9struct menu_item {
10 menu_item_handler handler;
11 const char *label;
12};
13
14struct menu {
15 size_t item_count;
16 const struct menu_item *items;
17};
18
19extern bool menu(struct menu);
20
21extern bool menu_back(void);
22extern bool menu_exit(void);
23
24#endif