diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:49 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:54:51 -0400 |
commit | ae45d6cf5a564851a9b9d58e05425e4cf1dfe8aa (patch) | |
tree | a77c33ad3ee30774bb303dc653fba5c2b899f707 /include/expo.h | |
parent | 2d6ee92c6af06eeb7f7410180d5faa8f5e840bbb (diff) |
expo: Add width and height to objects
At present objects only have a position so it is not possible to determine
the amount of space they take up on the display.
Add width and height properties, using a struct to keep all the dimensions
together.
For now this is not used. Future work will set up these new properties.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/expo.h')
-rw-r--r-- | include/expo.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/include/expo.h b/include/expo.h index b8f5327f26..5135954ba1 100644 --- a/include/expo.h +++ b/include/expo.h @@ -123,14 +123,28 @@ enum scene_obj_t { }; /** + * struct scene_dim - Dimensions of an object + * + * @x: x position, in pixels from left side + * @y: y position, in pixels from top + * @w: width, in pixels + * @h: height, in pixels + */ +struct scene_dim { + int x; + int y; + int w; + int h; +}; + +/** * struct scene_obj - information about an object in a scene * * @scene: Scene that this object relates to * @name: Name of the object (allocated) * @id: ID number of the object * @type: Type of this object - * @x: x position, in pixels from left side - * @y: y position, in pixels from top + * @dim: Dimensions for this object * @hide: true if the object should be hidden * @sibling: Node to link this object to its siblings */ @@ -139,8 +153,7 @@ struct scene_obj { char *name; uint id; enum scene_obj_t type; - int x; - int y; + struct scene_dim dim; bool hide; struct list_head sibling; }; |