From ce72c9ec260d18cc127c275daf3ec1d18c230e2a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Jun 2023 10:22:50 -0600 Subject: expo: Use flags for objects We currently have just a 'hide' property for each object. In preparation for adding more properties, convert the struct to use a flags value, instead of individual booleans. This is more extensible. Signed-off-by: Simon Glass --- include/expo.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/expo.h b/include/expo.h index 5135954ba13..b6777cebcbe 100644 --- a/include/expo.h +++ b/include/expo.h @@ -137,6 +137,15 @@ struct scene_dim { int h; }; +/** + * enum scene_obj_flags_t - flags for objects + * + * @SCENEOF_HIDE: object should be hidden + */ +enum scene_obj_flags_t { + SCENEOF_HIDE = 1 << 0, +}; + /** * struct scene_obj - information about an object in a scene * @@ -145,7 +154,7 @@ struct scene_dim { * @id: ID number of the object * @type: Type of this object * @dim: Dimensions for this object - * @hide: true if the object should be hidden + * @flags: Flags for this object * @sibling: Node to link this object to its siblings */ struct scene_obj { @@ -154,7 +163,7 @@ struct scene_obj { uint id; enum scene_obj_t type; struct scene_dim dim; - bool hide; + int flags; struct list_head sibling; }; -- cgit v1.3.1