From 5f993342962de816044f4172234ca7ecfd2bcaf6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 May 2025 08:46:21 -0600 Subject: 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 --- include/cedit.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/cedit.h b/include/cedit.h index 856509f0c7f..a9305ceebcb 100644 --- a/include/cedit.h +++ b/include/cedit.h @@ -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 * -- cgit v1.2.3