summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2023-06-01 10:22:52 -0600
committerTom Rini <[email protected]>2023-07-14 12:54:51 -0400
commit699b0acb522fd808b67b745b541bacf18c275d15 (patch)
treeadaa46800aadebb241d88974aaebde13512a5885 /include
parent50f02037594563dbc8da67f65959499bc1f5a46a (diff)
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 <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/expo.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/expo.h b/include/expo.h
index b6777cebcbe..6c45c403cf7 100644
--- a/include/expo.h
+++ b/include/expo.h
@@ -328,6 +328,16 @@ const char *expo_get_str(struct expo *exp, uint id);
int expo_set_display(struct expo *exp, struct udevice *dev);
/**
+ * expo_calc_dims() - Calculate the dimensions of the objects
+ *
+ * Updates the width and height of all objects based on their contents
+ *
+ * @exp: Expo to update
+ * Returns 0 if OK, -ENOTSUPP if there is no graphical console
+ */
+int expo_calc_dims(struct expo *exp);
+
+/**
* expo_set_scene_id() - Set the current scene ID
*
* @exp: Expo to update
@@ -469,6 +479,17 @@ int scene_txt_set_font(struct scene *scn, uint id, const char *font_name,
int scene_obj_set_pos(struct scene *scn, uint id, int x, int y);
/**
+ * scene_obj_set_size() - Set the size of an object
+ *
+ * @scn: Scene to update
+ * @id: ID of object to update
+ * @w: width in pixels
+ * @h: height in pixels
+ * Returns: 0 if OK, -ENOENT if @id is invalid
+ */
+int scene_obj_set_size(struct scene *scn, uint id, int w, int h);
+
+/**
* scene_obj_set_hide() - Set whether an object is hidden
*
* The update happens when the expo is next rendered.