diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:50 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:54:51 -0400 |
commit | ce72c9ec260d18cc127c275daf3ec1d18c230e2a (patch) | |
tree | fff5af8ebc7999e26e59f484a68754d6977cc6b3 /include | |
parent | ae45d6cf5a564851a9b9d58e05425e4cf1dfe8aa (diff) |
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 <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/expo.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/expo.h b/include/expo.h index 5135954ba1..b6777cebcb 100644 --- a/include/expo.h +++ b/include/expo.h @@ -138,6 +138,15 @@ struct scene_dim { }; /** + * 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 * * @scene: Scene that this object relates to @@ -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; }; |