[Concept,02/16] expo: Add tin parameter to scene_txtin_close()

Message ID 20260122041155.174721-3-sjg@u-boot.org
State New
Headers
Series expo: Add multiline editing support for textedit |

Commit Message

Simon Glass Jan. 22, 2026, 4:11 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Add a text-input info parameter to scene_txtin_close() to prepare for
passing the vidconsole context when closing. For now the caller passes
NULL but this will be updated in a later commit.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/scene_internal.h | 3 ++-
 boot/scene_txtin.c    | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
  

Patch

diff --git a/boot/scene_internal.h b/boot/scene_internal.h
index d9ca1fef90e..71cbc85c358 100644
--- a/boot/scene_internal.h
+++ b/boot/scene_internal.h
@@ -588,8 +588,9 @@  int scene_txtin_open(struct scene *scn, struct scene_obj *obj,
  * Close out the text editor after use
  *
  * @scn: Scene containing the object
+ * @tin: Text-input info
  */
-void scene_txtin_close(struct scene *scn);
+void scene_txtin_close(struct scene *scn, struct scene_txtin *tin);
 
 /**
  * scene_obj_calc_bbox() - Calculate bounding boxes for an object
diff --git a/boot/scene_txtin.c b/boot/scene_txtin.c
index 9b8edcc6439..1dfa3a02a6a 100644
--- a/boot/scene_txtin.c
+++ b/boot/scene_txtin.c
@@ -106,7 +106,7 @@  static void scene_txtin_putch(struct cli_line_state *cls, int ch)
 	vidconsole_put_char(scn->expo->cons, NULL, ch);
 }
 
-void scene_txtin_close(struct scene *scn)
+void scene_txtin_close(struct scene *scn, struct scene_txtin *tin)
 {
 	/* cursor is not needed now */
 	vidconsole_readline_end(scn->expo->cons, NULL);
@@ -180,7 +180,7 @@  int scene_txtin_send_key(struct scene_obj *obj, struct scene_txtin *tin,
 			memcpy(abuf_data(&tin->buf), abuf_data(&scn->buf),
 			       abuf_size(&scn->buf));
 
-			scene_txtin_close(scn);
+			scene_txtin_close(scn, NULL);
 		} else {
 			event->type = EXPOACT_QUIT;
 			log_debug("menu quit\n");