From e005f18b933f3f4555fd08a4d66a1f9aee8f47e1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 May 2025 08:46:46 -0600 Subject: expo: Begin implementation of a text editor It is useful to be able to edit text, e.g. to allow the user to edit the environment or the command-line arguments for the OS. Add the beginnings of an implementation. Future work is needed to finish this: keypress handling and scrolling. For now it just displays the text. Signed-off-by: Simon Glass --- boot/scene_internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'boot/scene_internal.h') diff --git a/boot/scene_internal.h b/boot/scene_internal.h index ac2a36d6e4d..760cc629b86 100644 --- a/boot/scene_internal.h +++ b/boot/scene_internal.h @@ -414,4 +414,16 @@ int scene_textline_close(struct scene *scn, struct scene_obj_textline *tline); */ int scene_calc_arrange(struct scene *scn, struct expo_arrange_info *arr); +/** + * scene_txt_generic_init() - Set up the generic part of a text object + * + * @exp: Expo containing the object + * @gen: Generic text info + * @name: Object name + * @str_id: String ID for the text + * @str: Initial text string for the object, or NULL to just use str_id + */ +int scene_txt_generic_init(struct expo *exp, struct scene_txt_generic *gen, + const char *name, uint str_id, const char *str); + #endif /* __SCENE_INTERNAL_H */ -- cgit v1.2.3