summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-10-14 16:31:58 -0600
committerSimon Glass <[email protected]>2024-10-18 14:10:22 -0600
commit012e1e86523e3591ed5a986f894e207e1bcb32f1 (patch)
tree997dd98215123ff46ced04bd89858fbfb0a0dfb0 /include
parentd8ff97ce91529263c9d82a4bc00e133822673ab0 (diff)
expo: Allow menu items to have values
At present menu items are stored according to their sequence number in the menu. In some cases we may want to have holes in that sequence, or not use a sequence at all. Add a new 'value' property for menu items. This will be used for reading and writing, if present. If there is no 'value' property, then the normal sequence number will be used instead. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/expo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/expo.h b/include/expo.h
index d6e2ccee41b..acff98ea65b 100644
--- a/include/expo.h
+++ b/include/expo.h
@@ -330,6 +330,7 @@ enum scene_menuitem_flags_t {
* @desc_id: ID of text object to use as the description text
* @preview_id: ID of the preview object, or 0 if none
* @flags: Flags for this item
+ * @value: Value for this item, or INT_MAX to use sequence
* @sibling: Node to link this item to its siblings
*/
struct scene_menitem {
@@ -340,6 +341,7 @@ struct scene_menitem {
uint desc_id;
uint preview_id;
uint flags;
+ int value;
struct list_head sibling;
};