summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-05-02 08:46:35 -0600
committerSimon Glass <[email protected]>2025-05-30 09:49:32 +0100
commite3c3f83cb6ce85ef541359fa46fd802e1b53494b (patch)
treef2f267f113099d89950b5bf17cdc8f306c076e2f /include
parentbaaf0907345558db58982445579e7d445ee60f21 (diff)
expo: Support setting the size and bounds of an object
Add a function to allow the size of an object to be set independently of its position. Also add a function to permit the object's bounding box to be set independently of its dimensions. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/expo.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/expo.h b/include/expo.h
index 6f0547a4b38..990cb3094ee 100644
--- a/include/expo.h
+++ b/include/expo.h
@@ -674,6 +674,30 @@ int scene_obj_set_pos(struct scene *scn, uint id, int x, int y);
int scene_obj_set_size(struct scene *scn, uint id, int w, int h);
/**
+ * scene_obj_set_width() - Set the width of an object
+ *
+ * @scn: Scene to update
+ * @id: ID of object to update
+ * @w: width in pixels
+ * Returns: 0 if OK, -ENOENT if @id is invalid
+ */
+int scene_obj_set_width(struct scene *scn, uint id, int w);
+
+/**
+ * scene_obj_set_bbox() - Set the bounding box of an object
+ *
+ * @scn: Scene to update
+ * @id: ID of object to update
+ * @x0: x position, in pixels from left side
+ * @y0: y position, in pixels from top
+ * @x1: ending x position (right side)
+ * @y1: ending y position (botton side)
+ * Returns: 0 if OK, -ENOENT if @id is invalid
+ */
+int scene_obj_set_bbox(struct scene *scn, uint id, int x0, int y0, int x1,
+ int y1);
+
+/**
* scene_obj_set_hide() - Set whether an object is hidden
*
* The update happens when the expo is next rendered.