| Message ID | 20250919201507.4024144-19-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1758312987; bh=NOQj4VFNfTTUsukAJesr8IqyogXSnR1wlRaYf5fyEPQ=; 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=U4vZhE3jYLHt0yltSKjfHXJTaFjDAC2wNIm4Rq/9+8UCk17R74zYPNdtvYMPlGFTC vTui8ZLp04KCdyjq+ELXC+T3AyQCc29uxwGOUYGXV8bHkA6yOT+0B8mHnbZOCUjag+ VGgvbGXVQIJVzqBnbo6hJrHAe9aYu96qguQ/SIVu0X77945pDnyxA4eG9L0gYmNizl scHakUnYmFXOXedon4cGqIK3P9Zw1MIrZfyNFT0K/cdRwvBMm1AIEo/DInZ/oT6eF7 mrWGOaLOLIGOUZN35KrdojkvxIJrmfay+t0Z3DpeZzYcNEl1ldmNLPrNxsAdmqwdUK yZOKpUQ1yMeJg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6E53967C5B for <u-boot-concept@u-boot.org>; Fri, 19 Sep 2025 14:16:27 -0600 (MDT) 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 Zyh779AMtOMj for <u-boot-concept@u-boot.org>; Fri, 19 Sep 2025 14:16:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312987; bh=NOQj4VFNfTTUsukAJesr8IqyogXSnR1wlRaYf5fyEPQ=; 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=U4vZhE3jYLHt0yltSKjfHXJTaFjDAC2wNIm4Rq/9+8UCk17R74zYPNdtvYMPlGFTC vTui8ZLp04KCdyjq+ELXC+T3AyQCc29uxwGOUYGXV8bHkA6yOT+0B8mHnbZOCUjag+ VGgvbGXVQIJVzqBnbo6hJrHAe9aYu96qguQ/SIVu0X77945pDnyxA4eG9L0gYmNizl scHakUnYmFXOXedon4cGqIK3P9Zw1MIrZfyNFT0K/cdRwvBMm1AIEo/DInZ/oT6eF7 mrWGOaLOLIGOUZN35KrdojkvxIJrmfay+t0Z3DpeZzYcNEl1ldmNLPrNxsAdmqwdUK yZOKpUQ1yMeJg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5E3D567C0E for <u-boot-concept@u-boot.org>; Fri, 19 Sep 2025 14:16:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312985; bh=niEPNAq30k+Dx8HkewBfxM0oeXtVx9Q6GRM8UN4CfZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aWWfnIkHbrs7iNSczw5z0p7IpBq1zzFb4xfQWiohWjGaSDITIF858WzLVBowT8GCR dPp9cWG4eKziXiqFDBWMjuN7A+RjWG3qGQHq+FqXgQRJjZhm9/WmFPG//qGs9KSP2/ UTWh0PV5xE5zZlp5hDVbDD7BIL+laIq71XW8qn6uk4TBxyZa4TeH6s9S6j2mYY6G8+ FsXl/LOnlz2GxidLTIWqlBPDCbJMmMCYmY7YqAVTl7FSij+GIvCr0XwBmO02rfyx4y Tbq+3JboTC+fKx8TAFDgClXKTxWxA2f86XbYX+udwHLicv0U2Y5xZ7XlGn9N2x6tQ0 wHSv9RzK+YwqQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8592167B55; Fri, 19 Sep 2025 14:16:25 -0600 (MDT) 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 KHshzicGBlQq; Fri, 19 Sep 2025 14:16:25 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312981; bh=IOcWa51u1ktTWzknzHb9AA9L3/IKjc8E8HGwm7us39M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EL8s2A16rXu97UU6v9yLV+n48TNEzDZr0CEZ6x6k+DoORLOPufQFENnhyw/UTyOWM 3+feZU1G2i+j0AE6rC+iuPZJZRBk6N31b2TQ8MiVMmXh7dIinqhHvWDKc1UsINlUWK S0vT9ge0/5jqJSHEt9nMUGJ2O6LfdFSAJC2G70wvs09guxCtlK1SXKayVME5aMkKjt G5cz5az/rLiUwUG2qpIbvrcP12eSc1bMTiI2MVoEH5Dp8qx3ZIaJev5HWGtsssEjJs WytkEP5AQpqqRARS7OgJcNvUSBRKJzzk1L4dIG/AoWOFpHbcx2MAIOIcSLZvGmKf2j veh8YOHrq5AOQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 293CD67A99; Fri, 19 Sep 2025 14:16:21 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Fri, 19 Sep 2025 14:14:25 -0600 Message-ID: <20250919201507.4024144-19-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250919201507.4024144-1-sjg@u-boot.org> References: <20250919201507.4024144-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: WTRPVMFZM4NSXDIXLE6JWV2WGG4I7N56 X-Message-ID-Hash: WTRPVMFZM4NSXDIXLE6JWV2WGG4I7N56 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 <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 18/42] video: Provide state for the cursor List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/WTRPVMFZM4NSXDIXLE6JWV2WGG4I7N56/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
video: Support a cursor more generally
|
|
Commit Message
Simon Glass
Sept. 19, 2025, 8:14 p.m. UTC
From: Simon Glass <sjg@chromium.org> We need to keep track of various things with the cursor, so create a separate struct within the console. Add some Signed-off-by: Simon Glass <sjg@chromium.org> --- include/video_console.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/include/video_console.h b/include/video_console.h index 842ead8d6a1..ba34bb8e19f 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -23,6 +23,28 @@ enum { VIDCONSOLE_CURSOR_WIDTH = 2, }; +/** + * struct vidconsole_cursor - cursor state for a video console + * + * The cursor is set up and maintained by the vidconsole. It is a simple + * vertical bar of width VIDCONSOLE_CURSOR_WIDTH shown in the foreground colour. + * + * @visible: cursor is currently visible + * @x: cursor left X position in pixels + * @y: cursor top Y position in pixels + * @height: height of cursor in pixels + * @index: cursor index within the CLI or field being edited + */ +struct vidconsole_cursor { + bool visible; + + /* filled in by get_cursor_info(): */ + uint x; + uint y; + uint height; + uint index; +}; + /** * struct vidconsole_priv - uclass-private data about a console device * @@ -55,6 +77,7 @@ enum { * @escape_buf: Buffer to accumulate escape sequence * @utf8_buf: Buffer to accumulate UTF-8 byte sequence * @quiet: Suppress all output from stdio + * @curs: Cursor state and management */ struct vidconsole_priv { struct stdio_dev sdev; @@ -80,6 +103,7 @@ struct vidconsole_priv { char escape_buf[32]; char utf8_buf[5]; bool quiet; + struct vidconsole_cursor curs; }; /**