[Concept,01/14] video: Add struct vid_pos for coordinates

Message ID 20251006165452.1675349-2-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>

Add a simple struct to represent x,y coordinates.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/video_defs.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
  

Patch

diff --git a/include/video_defs.h b/include/video_defs.h
index 3ff9e786abc..397764a5d3c 100644
--- a/include/video_defs.h
+++ b/include/video_defs.h
@@ -47,6 +47,18 @@  static inline bool vid_bbox_valid(const struct vid_bbox *bbox)
 {
 	return bbox->x1 > bbox->x0 && bbox->y1 > bbox->y0;
 }
+
+/**
+ * struct vid_pos - Represents a position for video operations
+ *
+ * @x: X coordinate in pixels from the left
+ * @y: Y coordinate in pixels from the top
+ */
+struct vid_pos {
+	int x;
+	int y;
+};
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __VIDEO_DEFS_H */