From patchwork Fri Feb 24 11:01:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 656249 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp833293wrb; Fri, 24 Feb 2023 03:03:00 -0800 (PST) X-Google-Smtp-Source: AK7set+5tIxAiuB3iZtYujmg5qq6WQ+AcOPadOpr4u6htqJoXlVrxrAUzOxDVAwl6Woa8d4GCW4+ X-Received: by 2002:ac8:5c0c:0:b0:3b6:2f3f:2713 with SMTP id i12-20020ac85c0c000000b003b62f3f2713mr27246452qti.25.1677236579904; Fri, 24 Feb 2023 03:02:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677236579; cv=none; d=google.com; s=arc-20160816; b=fQ+HYm2TK2mYPdTjWuKKYy2gWdSphncnAzSsygEd/B4JvjXzm0WIoQAy6mM3xwYu17 FTP6PQ8aGugwdJN+uELiyXK0uBB9NPtaptEZuvkjQ2rwwq/lAxtusPkCOmwIfExmpdq+ UzxMj0Wa8/V8TRqH6hxuGRi/owDMJQ/dluHba1ZIhLrUwLZeW0mP6uIcN03pB7sEh/lG sFXeNL3+lU9NK+EFwdOwSVSS/A8oWGOur4K/40iS4fDyoRTTr4/HC+GcFg8HJTVNJpt5 WUBbMk008BcDJVUQnu14dtMRhZevQrmyFqR4shZLV4W23ZLf8yc+OV/AM1qhbdAHQqcf Cl6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UL9cbfanvKJdm70LAtZ1fItowiCtEfLbfU50/G893cY=; b=Z05naDm6sE26MFrlHoiyLFC93r6UFRLFqbYYTcgjQYsws85g/xen6AJREenmHcMGoH 6BbE0SS8H3/HVkFw1ZiUpOP7DGDHlrRMcLp/OMHWgih2AbZnTfsCtGbB/EmEhkAn2qcW OVEXYsD1ZBT4oCPoi3VYMaIF53r5sOLgDRt69aDvUkJj45/Isq1x7BViEhYQ5GagBqq+ BafJoEcNtW1MB/eP5AfM+gKz00HCUvSioRMjiMkYu9TngWAi+XYdfIZFcL5flAoqEQtP tJTXwf7U5BdBhR1dvJYRoc0axjtVugCQmAHvMwhII/C3owgwMgjp0Pw7S7EDVdPgyhXS RpPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d7ib19uK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x17-20020ac87011000000b003b9b3a0df86si7159523qtm.535.2023.02.24.03.02.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Feb 2023 03:02:59 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d7ib19uK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVVqA-0006eO-NT; Fri, 24 Feb 2023 06:02:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVVq6-0006dX-3i for qemu-devel@nongnu.org; Fri, 24 Feb 2023 06:02:10 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVVq4-0000ry-FC for qemu-devel@nongnu.org; Fri, 24 Feb 2023 06:02:09 -0500 Received: by mail-wr1-x432.google.com with SMTP id bt28so6836901wrb.8 for ; Fri, 24 Feb 2023 03:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=UL9cbfanvKJdm70LAtZ1fItowiCtEfLbfU50/G893cY=; b=d7ib19uK/TVtr/noqBXWaPS34Iz4TgGUOGaXRFFVNQqi1Mqxy8O/1o2v2CZjPUZnoS 3e6O9IY94II0qBcSuoc/V085MziEozyDfnvDHj54d6M9S1pZnTxmxw5lgjJoS4u2je1U HfGN8r2PWAKjBB1QZypqVRKzcMWLEooLsz1WeYDHn6fsOAhlgziNtjWVJtPcY/jqIvlI x+nzwQyutzLUHmL5f+VpQeMfwYdDlggNU5Z3IhKHGUfdBC7Gg2LBqU4ZhleKv7JE5wo3 9DQFSsOccmecYSPMvfOBlDL0Jjn3Eue2w0uY6y7kEgCLOS7QPUvC6oW+srpO1h6dO3ud 4F6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=UL9cbfanvKJdm70LAtZ1fItowiCtEfLbfU50/G893cY=; b=NtrsnhMOw/Rff8PQKyrJGLV8h955jWiDOGEuQDa0D3aCNiAWDsfI2OP23DTfsmSYyr VIXyC38K/fNNuzBplXDA9kvsig52st++JjOzKbFQl3xb7WFsXOz9j9VM92bKQCRKq0mX UKTnVsW35hHEhU/sqyNMiR7So/HqDkDfPn8RYSMfG9MNCSL/PYqUPmGL54sikWzF1zJb Idr/5IzEI+kO9hyg+enBJ5e0RUOo7OM2k3mOTLnSpQRdOLOV7i2SRN1W1dukE/oR/d0I YT3/ZnINgrk0LCbCThENeR99AMf34Tbr9c887J8po2Xg70QsT0IldL56qg5hqwHtQg+o jz9g== X-Gm-Message-State: AO0yUKVzsm4NJFUPdB1nFo7nnfDC166AloZCWYVWSlo5LlbVVi+ghwk9 K6xcqYMsbYnzMMXioXhhX+/R1C/VaTVm0wHO X-Received: by 2002:adf:d08f:0:b0:2c6:8e3a:f6fe with SMTP id y15-20020adfd08f000000b002c68e3af6femr12813656wrh.51.1677236526306; Fri, 24 Feb 2023 03:02:06 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id r26-20020a05600c2f1a00b003eae73ee4a1sm2498311wmn.17.2023.02.24.03.02.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 24 Feb 2023 03:02:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Eric Blake , Markus Armbruster , Akihiko Odaki , Peter Maydell Subject: [PATCH 2/2] ui/kbd-state: QAPI'fy QKbdModifier Date: Fri, 24 Feb 2023 12:01:53 +0100 Message-Id: <20230224110153.8559-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230224110153.8559-1-philmd@linaro.org> References: <20230224110153.8559-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Let QAPI maintain the QKbdModifier enum values. Signed-off-by: Philippe Mathieu-Daudé --- include/ui/kbd-state.h | 16 ---------------- qapi/ui.json | 10 ++++++++++ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/include/ui/kbd-state.h b/include/ui/kbd-state.h index 14ee2c59e4..83e869bc09 100644 --- a/include/ui/kbd-state.h +++ b/include/ui/kbd-state.h @@ -9,22 +9,6 @@ #include "qapi/qapi-types-ui.h" -typedef enum QKbdModifier QKbdModifier; - -enum QKbdModifier { - Q_KBD_MODIFIER_NONE = 0, - - Q_KBD_MODIFIER_SHIFT, - Q_KBD_MODIFIER_CTRL, - Q_KBD_MODIFIER_ALT, - Q_KBD_MODIFIER_ALTGR, - - Q_KBD_MODIFIER_NUMLOCK, - Q_KBD_MODIFIER_CAPSLOCK, - - Q_KBD_MODIFIER__MAX -}; - typedef struct QKbdState QKbdState; /** diff --git a/qapi/ui.json b/qapi/ui.json index 0abba3e930..d3230a6bc7 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -920,6 +920,16 @@ 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks', 'lang1', 'lang2' ] } +## +# @QKbdModifier: +# +# An enumeration of keyboard modifier name. +# +# Since: 8.0 +## +{ 'enum': 'QKbdModifier', + 'data': [ 'none', 'shift', 'ctrl', 'alt', 'altgr', 'numlock', 'capslock' ] } + ## # @KeyValueKind: #