diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:57 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:54:51 -0400 |
commit | 756c9559e60a0ef8434128205adced937240925d (patch) | |
tree | a9d384616c67c9f9999317a3d253ea37a5b57f5d /include/expo.h | |
parent | 3f33b9c722a41e1577df110470521a014713ce2e (diff) |
expo: Draw popup menus in both opened and closed states
When a popup menu is closed it shows only the selected item. When it is
open it shows a background and all items, with a highlight that can be
moved between the items.
Add the drawing logic for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/expo.h')
-rw-r--r-- | include/expo.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/expo.h b/include/expo.h index 0f43888978..0699cdb4c1 100644 --- a/include/expo.h +++ b/include/expo.h @@ -413,6 +413,36 @@ int scene_new(struct expo *exp, const char *name, uint id, struct scene **scnp); struct scene *expo_lookup_scene_id(struct expo *exp, uint scene_id); /** + * scene_highlight_first() - Highlight the first item in a scene + * + * This highlights the first item, so that the user can see that it is pointed + * to + * + * @scn: Scene to update + */ +void scene_highlight_first(struct scene *scn); + +/** + * scene_set_highlight_id() - Set the object which is highlighted + * + * Sets a new object to highlight in the scene + * + * @scn: Scene to update + * @id: ID of object to highlight + */ +void scene_set_highlight_id(struct scene *scn, uint id); + +/** + * scene_set_open() - Set whether an item is open or not + * + * @scn: Scene to update + * @id: ID of object to update + * @open: true to open the object, false to close it + * Returns: 0 if OK, -ENOENT if @id is invalid + */ +int scene_set_open(struct scene *scn, uint id, bool open); + +/** * scene_title_set() - set the scene title * * @scn: Scene to update |