expo: Test some cedit actions

Refactor the action-processing code into a new cedit_do_action()
function so we can call it from a test. Check moving to a new field and
opening the menu, to ensure that rendering is correct.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-02 08:46:21 -06:00
parent ccbd363252
commit 9eff720152
3 changed files with 100 additions and 36 deletions

View File

@@ -13,6 +13,7 @@
struct abuf;
struct expo;
struct expo_action;
struct scene;
struct udevice;
struct video_priv;
@@ -62,6 +63,18 @@ int cedit_run(struct expo *exp);
int cedit_prepare(struct expo *exp, struct video_priv **vid_privp,
struct scene **scnp);
/**
* cedit_do_action() - Process an action on a cedit
*
* @exp: Expo to use
* @scn: Current scene
* @vid_priv: Private data for the video device
* @act: Action to process
* Return: 0 on success, -EAGAIN if there was no action taken
*/
int cedit_do_action(struct expo *exp, struct scene *scn,
struct video_priv *vid_priv, struct expo_action *act);
/**
* cedit_write_settings() - Write settings in FDT format
*