summaryrefslogtreecommitdiffstats
path: root/src/target/ui-experiment/menu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/ui-experiment/menu.h')
-rw-r--r--src/target/ui-experiment/menu.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/target/ui-experiment/menu.h b/src/target/ui-experiment/menu.h
new file mode 100644
index 0000000..d9cc97b
--- /dev/null
+++ b/src/target/ui-experiment/menu.h
@@ -0,0 +1,18 @@
+
+/**
+ * Menus - menus and menu items
+ *
+ * We represent both menus and menu items in a single structure.
+ *
+ * They share the properties of having a title as well as having
+ * interaction callbacks such as on_select.
+ *
+ * Menus have a child item array that is indexed by menu position.
+ * The position of items in this array is used for numeric menu navigation.
+ *
+ */
+struct menu {
+ const char *title;
+ void (*on_select)(void);
+ struct menu *children[10];
+};