diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:20:24 -0400 |
commit | fe3351a15b77d5e2baf80cbae9df7b2111f8f7f4 (patch) | |
tree | 4c8092a8acd2bf488b45521ae9879df1d1d995fb | |
parent | 54d55b35c4d3735ccc70770457a6f8a076cb809c (diff) | |
download | u-boot-fe3351a15b77d5e2baf80cbae9df7b2111f8f7f4.zip u-boot-fe3351a15b77d5e2baf80cbae9df7b2111f8f7f4.tar.gz u-boot-fe3351a15b77d5e2baf80cbae9df7b2111f8f7f4.tar.bz2 |
expo: Rename EXPOACT_POINT to EXPOACT_POINT_ITEM
At present we only support a single menu, so all that can be pointed to
is the current menu item. Rename this action so that we can also add
an action for pointing to an object. This will allow cycling through
the objects in a scene.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | boot/scene_menu.c | 4 | ||||
-rw-r--r-- | include/expo.h | 6 | ||||
-rw-r--r-- | test/boot/expo.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/boot/scene_menu.c b/boot/scene_menu.c index f2832b4..8920995 100644 --- a/boot/scene_menu.c +++ b/boot/scene_menu.c @@ -347,7 +347,7 @@ int scene_menu_send_key(struct scene *scn, struct scene_obj_menu *menu, int key, struct scene_menitem, sibling)) { item = list_entry(item->sibling.prev, struct scene_menitem, sibling); - event->type = EXPOACT_POINT; + event->type = EXPOACT_POINT_ITEM; event->select.id = item->id; log_debug("up to item %d\n", event->select.id); } @@ -356,7 +356,7 @@ int scene_menu_send_key(struct scene *scn, struct scene_obj_menu *menu, int key, if (!list_is_last(&item->sibling, &menu->item_head)) { item = list_entry(item->sibling.next, struct scene_menitem, sibling); - event->type = EXPOACT_POINT; + event->type = EXPOACT_POINT_ITEM; event->select.id = item->id; log_debug("down to item %d\n", event->select.id); } diff --git a/include/expo.h b/include/expo.h index 0c55d60..0f43888 100644 --- a/include/expo.h +++ b/include/expo.h @@ -16,13 +16,13 @@ struct udevice; * enum expoact_type - types of actions reported by the expo * * @EXPOACT_NONE: no action - * @EXPOACT_POINT: menu item was highlighted (@id indicates which) + * @EXPOACT_POINT_ITEM: menu item was highlighted (@id indicates which) * @EXPOACT_SELECT: menu item was selected (@id indicates which) * @EXPOACT_QUIT: request to exit the menu */ enum expoact_type { EXPOACT_NONE, - EXPOACT_POINT, + EXPOACT_POINT_ITEM, EXPOACT_SELECT, EXPOACT_QUIT, }; @@ -31,7 +31,7 @@ enum expoact_type { * struct expo_action - an action report by the expo * * @type: Action type (EXPOACT_NONE if there is no action) - * @select: Used for EXPOACT_POINT and EXPOACT_SELECT + * @select: Used for EXPOACT_POINT_ITEM and EXPOACT_SELECT * @id: ID number of the object affected. */ struct expo_action { diff --git a/test/boot/expo.c b/test/boot/expo.c index 453316e..c34eaee 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -530,7 +530,7 @@ static int expo_render_image(struct unit_test_state *uts) ut_assertok(expo_action_get(exp, &act)); - ut_asserteq(EXPOACT_POINT, act.type); + ut_asserteq(EXPOACT_POINT_ITEM, act.type); ut_asserteq(ITEM2, act.select.id); ut_assertok(expo_render(exp)); @@ -570,7 +570,7 @@ static int expo_render_image(struct unit_test_state *uts) ut_assertok(expo_action_get(exp, &act)); - ut_asserteq(EXPOACT_POINT, act.type); + ut_asserteq(EXPOACT_POINT_ITEM, act.type); ut_asserteq(ITEM1, act.select.id); ut_assertok(expo_render(exp)); |