Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27650C77B7A for ; Thu, 1 Jun 2023 16:32:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35F43865D9; Thu, 1 Jun 2023 18:26:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="alfaJWb5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F297D863A5; Thu, 1 Jun 2023 18:25:26 +0200 (CEST) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5C297863A7 for ; Thu, 1 Jun 2023 18:25:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7747df5b674so1950639f.3 for ; Thu, 01 Jun 2023 09:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685636694; x=1688228694; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wDEDhkzim+UFe1OYM6/NZ5gXLeCAnS+Whr4hj2k0PH4=; b=alfaJWb5fgwaCdHpXRkTHKwnuS/84/CHl4BVj3JzJv52EI0ZnTs6g0UZSImVnMP47O NZfsexn5uttvwMrq4LdbRTk9D59G2eTN4kjOHQcRZXmcUrwxnu5zJTi7VPq77a15FbHl 55DypsbTO9R3UR/szZDxoUQe2TInbW9KKnIJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685636694; x=1688228694; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wDEDhkzim+UFe1OYM6/NZ5gXLeCAnS+Whr4hj2k0PH4=; b=ifj7fNSrfevHXjymlyzZgO7mFi9/zvhJGACP5GU2h5fOjc5w8+BMhM4LDo8hSjeEMH 9VlcQWtM5KaoBWfsfYlb/qsY9XbDP57QX1IpZm3Ad7ps93tVgUqfn9BxM3g3duQXtjSr /vUEItke2MKVG5M0CJVGJcJuj30YAFiC2Cu8b6wLR3Qf/881XiGmsbGMRoNFkElU8Xvv MMPeAYajNovdchZpgDBBVOhOSkRECAFGpf8tGNndKOpoXmKId6lvmcJQ+4oZ1HgOZ+0i 7Ax5VSUVfUpXmV96ki2OMAUvYM9BG4nH6kTt/9Gb9VqHtXp3kvpFYb+/Ey2uVKk6/LXn A3vg== X-Gm-Message-State: AC+VfDwWaxKhU8JIq963MgmtUDOCER5rJxs19mcpOy+NsaX92qXctFDV 9ETBBk+UVCiB5Cy3JQiPct/W8BtM6jpxCneC9No= X-Google-Smtp-Source: ACHHUZ6lFQ35wTgYsts7cAy2/jvOUySZXVxAF7Vi4ufoz6NimDgRNhROLNeNqvQU03Q0UnhsMCZUHQ== X-Received: by 2002:a92:d1c3:0:b0:332:dd0a:c6df with SMTP id u3-20020a92d1c3000000b00332dd0ac6dfmr6673538ilg.22.1685636694749; Thu, 01 Jun 2023 09:24:54 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id l1-20020a922901000000b0033a6e7ee4e3sm3862098ilg.1.2023.06.01.09.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 09:24:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass Subject: [PATCH 32/40] expo: Rename EXPOACT_POINT to EXPOACT_POINT_ITEM Date: Thu, 1 Jun 2023 10:22:56 -0600 Message-ID: <20230601162404.220488-31-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog In-Reply-To: <20230601162404.220488-1-sjg@chromium.org> References: <20230601162404.220488-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean At present we only support a single menu, so all that can be pointed to is the current menu item. Rename this action so that we can also add an action for pointing to an object. This will allow cycling through the objects in a scene. Signed-off-by: Simon Glass --- boot/scene_menu.c | 4 ++-- include/expo.h | 6 +++--- test/boot/expo.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/boot/scene_menu.c b/boot/scene_menu.c index f2832b4ddfd7..892099557a99 100644 --- a/boot/scene_menu.c +++ b/boot/scene_menu.c @@ -347,7 +347,7 @@ int scene_menu_send_key(struct scene *scn, struct scene_obj_menu *menu, int key, struct scene_menitem, sibling)) { item = list_entry(item->sibling.prev, struct scene_menitem, sibling); - event->type = EXPOACT_POINT; + event->type = EXPOACT_POINT_ITEM; event->select.id = item->id; log_debug("up to item %d\n", event->select.id); } @@ -356,7 +356,7 @@ int scene_menu_send_key(struct scene *scn, struct scene_obj_menu *menu, int key, if (!list_is_last(&item->sibling, &menu->item_head)) { item = list_entry(item->sibling.next, struct scene_menitem, sibling); - event->type = EXPOACT_POINT; + event->type = EXPOACT_POINT_ITEM; event->select.id = item->id; log_debug("down to item %d\n", event->select.id); } diff --git a/include/expo.h b/include/expo.h index 0c55d60f71a7..0f4388897883 100644 --- a/include/expo.h +++ b/include/expo.h @@ -16,13 +16,13 @@ struct udevice; * enum expoact_type - types of actions reported by the expo * * @EXPOACT_NONE: no action - * @EXPOACT_POINT: menu item was highlighted (@id indicates which) + * @EXPOACT_POINT_ITEM: menu item was highlighted (@id indicates which) * @EXPOACT_SELECT: menu item was selected (@id indicates which) * @EXPOACT_QUIT: request to exit the menu */ enum expoact_type { EXPOACT_NONE, - EXPOACT_POINT, + EXPOACT_POINT_ITEM, EXPOACT_SELECT, EXPOACT_QUIT, }; @@ -31,7 +31,7 @@ enum expoact_type { * struct expo_action - an action report by the expo * * @type: Action type (EXPOACT_NONE if there is no action) - * @select: Used for EXPOACT_POINT and EXPOACT_SELECT + * @select: Used for EXPOACT_POINT_ITEM and EXPOACT_SELECT * @id: ID number of the object affected. */ struct expo_action { diff --git a/test/boot/expo.c b/test/boot/expo.c index 453316ece7c3..c34eaeedd66f 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -530,7 +530,7 @@ static int expo_render_image(struct unit_test_state *uts) ut_assertok(expo_action_get(exp, &act)); - ut_asserteq(EXPOACT_POINT, act.type); + ut_asserteq(EXPOACT_POINT_ITEM, act.type); ut_asserteq(ITEM2, act.select.id); ut_assertok(expo_render(exp)); @@ -570,7 +570,7 @@ static int expo_render_image(struct unit_test_state *uts) ut_assertok(expo_action_get(exp, &act)); - ut_asserteq(EXPOACT_POINT, act.type); + ut_asserteq(EXPOACT_POINT_ITEM, act.type); ut_asserteq(ITEM1, act.select.id); ut_assertok(expo_render(exp)); -- 2.41.0.rc0.172.g3f132b7071-goog