[Concept,09/14] expo: Drop struct scene_obj_bbox in favour of vid_bbox

Message ID 20251006165452.1675349-10-sjg@u-boot.org
State New
Headers
Series expo: Continue development of expo with mouse |

Commit Message

Simon Glass Oct. 6, 2025, 4:54 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Replace the scene_obj_bbox with the common vid_bbox structure to avoid
having the same structs with different names.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 boot/scene.c   |  4 ++--
 include/expo.h | 19 ++-----------------
 2 files changed, 4 insertions(+), 19 deletions(-)
  

Patch

diff --git a/boot/scene.c b/boot/scene.c
index 96130f160fc..a451ee1d325 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -386,7 +386,7 @@  int scene_obj_flag_clrset(struct scene *scn, uint id, uint clr, uint set)
 
 static void handle_alignment(enum scene_obj_align horiz,
 			     enum scene_obj_align vert,
-			     struct scene_obj_bbox *bbox,
+			     struct vid_bbox *bbox,
 			     struct scene_obj_dims *dims,
 			     int xsize, int ysize,
 			     struct scene_obj_offset *offset)
@@ -555,7 +555,7 @@  static int scene_txt_render(struct expo *exp, struct udevice *dev,
 	struct vidconsole_colour old;
 	enum colour_idx fore, back;
 	struct scene_obj_dims dims;
-	struct scene_obj_bbox bbox;
+	struct vid_bbox bbox;
 	const char *str;
 	int ret;
 
diff --git a/include/expo.h b/include/expo.h
index 622088f395b..a6e6b2b780b 100644
--- a/include/expo.h
+++ b/include/expo.h
@@ -234,21 +234,6 @@  enum scene_obj_t {
 	SCENEOBJT_TEXTLINE,
 };
 
-/**
- * struct scene_obj_bbox - Dimensions of an object
- *
- * @x0: x position, in pixels from left side
- * @y0: y position, in pixels from top
- * @x1: x position of right size
- * @y1: y position of bottom
- */
-struct scene_obj_bbox {
-	int x0;
-	int y0;
-	int x1;
-	int y1;
-};
-
 /**
  * struct scene_obj_offset - Offsets for drawing the object
  *
@@ -367,8 +352,8 @@  struct scene_obj {
 	char *name;
 	uint id;
 	enum scene_obj_t type;
-	struct scene_obj_bbox req_bbox;
-	struct scene_obj_bbox bbox;
+	struct vid_bbox req_bbox;
+	struct vid_bbox bbox;
 	struct scene_obj_offset ofs;
 	struct scene_obj_dims dims;
 	enum scene_obj_align horiz;