summaryrefslogtreecommitdiff
path: root/boot/scene_internal.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-06-01 19:22:52 +0300
committerTom Rini <trini@konsulko.com>2023-07-14 19:54:51 +0300
commit699b0acb522fd808b67b745b541bacf18c275d15 (patch)
treeadaa46800aadebb241d88974aaebde13512a5885 /boot/scene_internal.h
parent50f02037594563dbc8da67f65959499bc1f5a46a (diff)
downloadu-boot-699b0acb522fd808b67b745b541bacf18c275d15.tar.xz
expo: Set up the width and height of objects
Provide a way to set the full dimensions of objects, i.e. including the width and height. For menus, calculate the bounding box of all objects in the menu. Set all labels to be the same size, so that highlighting works correct, once implemented. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/scene_internal.h')
-rw-r--r--boot/scene_internal.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/boot/scene_internal.h b/boot/scene_internal.h
index 24a2ba6a6a..00085a2f55 100644
--- a/boot/scene_internal.h
+++ b/boot/scene_internal.h
@@ -66,6 +66,17 @@ int scene_obj_add(struct scene *scn, const char *name, uint id,
int scene_obj_flag_clrset(struct scene *scn, uint id, uint clr, uint set);
/**
+ * scene_calc_dims() - Calculate the dimensions of the scene objects
+ *
+ * Updates the width and height of all objects based on their contents
+ *
+ * @scn: Scene to update
+ * @do_menus: true to calculate only menus, false to calculate everything else
+ * Returns 0 if OK, -ENOTSUPP if there is no graphical console
+ */
+int scene_calc_dims(struct scene *scn, bool do_menus);
+
+/**
* scene_menu_arrange() - Set the position of things in the menu
*
* This updates any items associated with a menu to make sure they are
@@ -133,4 +144,14 @@ int scene_render(struct scene *scn);
*/
int scene_send_key(struct scene *scn, int key, struct expo_action *event);
+/**
+ * scene_menu_calc_dims() - Calculate the dimensions of a menu
+ *
+ * Updates the width and height of the menu based on its contents
+ *
+ * @menu: Menu to update
+ * Returns 0 if OK, -ENOTSUPP if there is no graphical console
+ */
+int scene_menu_calc_dims(struct scene_obj_menu *menu);
+
#endif /* __SCENE_INTERNAL_H */