mirror of
https://xff.cz/git/u-boot/
synced 2025-09-29 22:41:17 +02:00
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>
This commit is contained in:
@@ -122,6 +122,21 @@ enum scene_obj_t {
|
||||
SCENEOBJT_MENU,
|
||||
};
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
@@ -129,8 +144,7 @@ enum scene_obj_t {
|
||||
* @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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user