qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Akihiko Odaki" <akihiko.odaki@gmail.com>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: [PATCH 2/2] ui/kbd-state: QAPI'fy QKbdModifier
Date: Fri, 24 Feb 2023 12:01:53 +0100	[thread overview]
Message-ID: <20230224110153.8559-3-philmd@linaro.org> (raw)
In-Reply-To: <20230224110153.8559-1-philmd@linaro.org>

Let QAPI maintain the QKbdModifier enum values.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 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:
 #
-- 
2.38.1



  parent reply	other threads:[~2023-02-24 11:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 11:01 [PATCH 0/2] ui/kbd-state: QAPI'fy QKbdModifier Philippe Mathieu-Daudé
2023-02-24 11:01 ` [PATCH 1/2] ui/kbd-state: Rename QKbdModifier enum definitions Philippe Mathieu-Daudé
2023-02-24 11:01 ` Philippe Mathieu-Daudé [this message]
2023-02-25  3:19 ` [PATCH 0/2] ui/kbd-state: QAPI'fy QKbdModifier Akihiko Odaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230224110153.8559-3-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=akihiko.odaki@gmail.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).