[gtk/inspector-layouts: 3/5] Add gdk_wayland_device_get_xkb_keymap
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/inspector-layouts: 3/5] Add gdk_wayland_device_get_xkb_keymap
- Date: Mon, 3 May 2021 01:02:15 +0000 (UTC)
commit 2b0c47411724b2205dde29e32194176ab986635f
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 25 23:34:39 2021 -0400
Add gdk_wayland_device_get_xkb_keymap
This can be useful to get more detailed information
about keyboard configuration.
gdk/wayland/gdkdevice-wayland.c | 17 +++++++++++++++++
gdk/wayland/gdkwaylanddevice.h | 2 ++
2 files changed, 19 insertions(+)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 237c23ca03..564408dc0a 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -1037,6 +1037,23 @@ gdk_wayland_device_get_wl_keyboard (GdkDevice *device)
return seat->wl_keyboard;
}
+/**
+ * gdk_wayland_device_get_xkb_keymap:
+ * @device: (type GdkWaylandDevice): a `GdkDevice`
+ *
+ * Returns the `xkb_keymap` of a `GdkDevice`.
+ *
+ * Returns: (transfer none): a `struct xkb_keymap`
+ *
+ * Since: 4.4
+ */
+struct xkb_keymap *
+gdk_wayland_device_get_xkb_keymap (GdkDevice *device)
+{
+ GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (gdk_device_get_seat (device));
+ return _gdk_wayland_keymap_get_xkb_keymap (seat->keymap);
+}
+
GdkKeymap *
_gdk_wayland_device_get_keymap (GdkDevice *device)
{
diff --git a/gdk/wayland/gdkwaylanddevice.h b/gdk/wayland/gdkwaylanddevice.h
index fbd51b6fe1..1a3c119c64 100644
--- a/gdk/wayland/gdkwaylanddevice.h
+++ b/gdk/wayland/gdkwaylanddevice.h
@@ -52,6 +52,8 @@ GDK_AVAILABLE_IN_ALL
struct wl_pointer *gdk_wayland_device_get_wl_pointer (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
struct wl_keyboard *gdk_wayland_device_get_wl_keyboard (GdkDevice *device);
+GDK_AVAILABLE_IN_4_4
+struct xkb_keymap *gdk_wayland_device_get_xkb_keymap (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
const char *gdk_wayland_device_get_node_path (GdkDevice *device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]