diff options
author | Simon Glass <sjg@chromium.org> | 2023-10-01 19:13:27 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-11 15:43:55 -0400 |
commit | d88edd2bda2150b253fac702dd26ec4c01ccf988 (patch) | |
tree | 09e53e68c98f74c8b2960b383719570e6f5adefa /include/expo.h | |
parent | 408011c2a4b7a7f68cf55876252446a570b3827a (diff) |
expo: Allow highlighting other scene-object types
So far only menus can be highlighted. With the coming addition of
text lines we need to be able to highlight other objects. Add a function
to determine whether an object can be highlighted.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/expo.h')
-rw-r--r-- | include/expo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/expo.h b/include/expo.h index 5b21110cde..c16b3dd61b 100644 --- a/include/expo.h +++ b/include/expo.h @@ -146,6 +146,8 @@ enum scene_obj_t { SCENEOBJT_NONE = 0, SCENEOBJT_IMAGE, SCENEOBJT_TEXT, + + /* types from here on can be highlighted */ SCENEOBJT_MENU, }; @@ -203,6 +205,12 @@ struct scene_obj { struct list_head sibling; }; +/* object can be highlighted when moving around expo */ +static inline bool scene_obj_can_highlight(const struct scene_obj *obj) +{ + return obj->type >= SCENEOBJT_MENU; +} + /** * struct scene_obj_img - information about an image object in a scene * |