From patchwork Sun Dec 7 20:16:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 822 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138655; bh=NfE+L9czRRgdTWswEDeHfgdq/fxi69PpqMFTfp8nO5g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XHXBPhZI/bk85YY0UbeU2Z1Fc4juBnw970AydsxlCvepOevzHsWe4ow/fdktpkTvg +5+8edCYqpioZrure6hgdkv4VR8XrTPULkOuSKSNrYGg0qfmeAsPfccS9QyGw+hchD YdT6++nHi8EOmeqRTz7RjoywP505bU/M0SrPBblbkYGI0S8SVrHgiC7mI/+FD654+T pqrtrh0P20897QpuZN78bggfLQoHVCCLf3kPHVdV5pBWh33hLd0WK5VGJ+amfkGG44 zxlq684BNkjj5YFB8VeR/FdMKGN1zUYhU9h0yeaPGw/+NAxWUxKU3bUY8tNVZOoVDd Eo95/oR1f6Evw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 16248689A7 for ; Sun, 7 Dec 2025 13:17:35 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id QkL1GNxVFCIf for ; Sun, 7 Dec 2025 13:17:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138654; bh=NfE+L9czRRgdTWswEDeHfgdq/fxi69PpqMFTfp8nO5g=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UH2SEgAbiK75h/uEKaVy2DepcDcdVmmQqlCg6mAY/Zjkml/2bPH/PbNVJ7egxih2q A7iZOHqAgmO7kx84IuaNXJ1JCxQelK+KrRxv0mgvJQMP4R+cgh7/cIRJpGxE2PEoSa yuMJA1Cybw0wmLVTBRZimtgjaWWNbBMvNP5dXMCGZXgzQRmRvKbzTkvn0cDwHYurFp muqaGGQhM6zFTUJ4iKnrYO/kCQqC5FfgtFeFZWAX+5405JiLHpZmrEACVsCcit/k/H f8KNZeaNVhthCofpBM3QJtak4voaNFJr91crMB+bnsWLjUblRCukxm03sTl8L+4Oak 5+jlS0Afj5ECw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9CBC068950 for ; Sun, 7 Dec 2025 13:17:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138652; bh=DfXBfv1zNmCujzoAyy53XKJq7T5qRsdhX1UqdkJMlD4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P6Pmqna8T1P/ANIwivOwJdU1m4lcXv+Ih5T172joypSdt7nnUNK6eDByTLAggv4Wp T2LZkrd5DkNb/4aSz9IDZCinA8mzbDvb9+G5ZqihIOvrVyafwTHBEjPzt5HYkuqNqu 2TIPbXmLn5/NGmbw7bTPo18POQ0oHVPF2YZbj+AfdugAuTUe8SDH3hiofUh8hGLzcd SJPREYBZjM3IuA6yRUSBi41PSDn0K661tCMaQIwNgwfFlIJo4sYjrEc4vwKrJPgnC/ BVtoSJKCrbjIgl2bZPE/JkGhqViaqjyIUWklC2ZKN2eBNebAVSkt/pcDX56ic7lrlY trH2kUtIEWI1g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BE9FD689AC; Sun, 7 Dec 2025 13:17:32 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id rNNFRiqUn45V; Sun, 7 Dec 2025 13:17:32 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138650; bh=Pz0Bibsx7a81w0ivqyOhqb5XDoISrdPDhxtYMwjKYAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pQOgepjqDwS73/mfEM80jpe09FYsOb3zRylR48OqufEAInwENuf6FA9jjUp1swYSu elEelynqNUGDdO6xnfCWZ18AHozsOavjjEtW4jDzoyhsbEHr1wElZouatso6ltz55x UGS3dk6/xN26ZTSFSXRf/aZRJpSDUCxeAMOktrGOvO/EyId4sDGAmn7MUJ+Keg/H1J afQUseXenATUSBlLqGCAWRklrwXUsh3rdktpBJNMU94+uh2+9NenPRzou613uXjDtR upaK7xbPQHFajlzojV+gBhMjpoqx34ETMp8P4R9RjLc/nUNgq3jERHy+tMsFOHhR9X RH+i8cx7H7FqA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 263816883E; Sun, 7 Dec 2025 13:17:30 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 7 Dec 2025 13:16:07 -0700 Message-ID: <20251207201628.2882382-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251207201628.2882382-1-sjg@u-boot.org> References: <20251207201628.2882382-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: XJVDDDK7T7EJGNYNZT3YKSBYSMR5YORL X-Message-ID-Hash: XJVDDDK7T7EJGNYNZT3YKSBYSMR5YORL X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 10/22] expo: Add prompt_id to struct scene List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add a prompt_id field to struct scene to track the prompt text object. Update cedit_arange() to use title_id and prompt_id directly instead of looking up objects by name, which is more robust. Co-developed-by: Claude Signed-off-by: Simon Glass --- boot/cedit.c | 11 ++++------- include/expo.h | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/boot/cedit.c b/boot/cedit.c index c82519a0eb3..d58ae0ba51c 100644 --- a/boot/cedit.c +++ b/boot/cedit.c @@ -54,7 +54,6 @@ int cedit_arange(struct expo *exp, struct video_priv *vpriv, uint scene_id) { struct expo_theme *theme = &exp->theme; struct expo_arrange_info arr; - struct scene_obj_txt *txt; struct scene_obj *obj; struct scene *scn; int y, ret; @@ -63,13 +62,11 @@ int cedit_arange(struct expo *exp, struct video_priv *vpriv, uint scene_id) if (!scn) return log_msg_ret("scn", -ENOENT); - txt = scene_obj_find_by_name(scn, "prompt"); - if (txt) - scene_obj_set_pos(scn, txt->obj.id, 0, vpriv->ysize - 50); + if (scn->prompt_id) + scene_obj_set_pos(scn, scn->prompt_id, 0, vpriv->ysize - 50); - txt = scene_obj_find_by_name(scn, "title"); - if (txt) - scene_obj_set_pos(scn, txt->obj.id, 200, 10); + if (scn->title_id) + scene_obj_set_pos(scn, scn->title_id, 200, 10); memset(&arr, '\0', sizeof(arr)); ret = scene_calc_arrange(scn, &arr); diff --git a/include/expo.h b/include/expo.h index e6093769421..f9f85b38b9c 100644 --- a/include/expo.h +++ b/include/expo.h @@ -204,6 +204,7 @@ struct expo_string { * @name: Name of the scene (allocated) * @id: ID number of the scene * @title_id: String ID of title of the scene (allocated) + * @prompt_id: String ID of prompt of the scene (allocated) * @highlight_id: ID of highlighted object, if any * @cls: cread state to use for input * @buf: Buffer for input @@ -216,6 +217,7 @@ struct scene { char *name; uint id; uint title_id; + uint prompt_id; uint highlight_id; struct cli_line_state cls; struct abuf buf;