]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gtk4-wayland: Add the missing wayland-client bindings
authorCorentin Noël <corentin.noel@collabora.com>
Thu, 12 Oct 2023 20:13:19 +0000 (22:13 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 15 Oct 2023 16:52:27 +0000 (18:52 +0200)
Bind the native Wayland types and unskip the methods.

vapi/gtk4-wayland.vapi
vapi/metadata/GdkWayland-4.0.metadata

index 16b7d74bd38847855128a28dacf1eb6b50a34efb..54087a6d71bf3f19f1ee4f85b82e59f55b09759a 100644 (file)
@@ -9,6 +9,9 @@ namespace Gdk {
                        [CCode (has_construct_function = false)]
                        protected Device ();
                        public unowned string? get_node_path ();
+                       public unowned Wl.Keyboard get_wl_keyboard ();
+                       public unowned Wl.Pointer get_wl_pointer ();
+                       public unowned Wl.Seat get_wl_seat ();
                        [Version (since = "4.4")]
                        public void* get_xkb_keymap ();
                }
@@ -21,6 +24,8 @@ namespace Gdk {
                        public void* get_egl_display ();
                        [Version (deprecated = true, deprecated_since = "4.10.")]
                        public unowned string? get_startup_notification_id ();
+                       public unowned Wl.Compositor get_wl_compositor ();
+                       public unowned Wl.Display get_wl_display ();
                        public bool query_registry (string global);
                        public void set_cursor_theme (string name, int size);
                        [Version (deprecated = true, deprecated_since = "4.10.")]
@@ -37,6 +42,7 @@ namespace Gdk {
                public sealed class Monitor : Gdk.Monitor {
                        [CCode (has_construct_function = false)]
                        protected Monitor ();
+                       public unowned Wl.Output get_wl_output ();
                }
                [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_popup_get_type ()")]
                [GIR (name = "WaylandPopup")]
@@ -49,13 +55,14 @@ namespace Gdk {
                public sealed class Seat : Gdk.Seat {
                        [CCode (has_construct_function = false)]
                        protected Seat ();
+                       public unowned Wl.Seat get_wl_seat ();
                }
                [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_surface_get_type ()")]
                [GIR (name = "WaylandSurface")]
                public sealed class Surface : Gdk.Surface {
                        [CCode (has_construct_function = false)]
                        protected Surface ();
-                       public Wl.Surface get_wl_surface ();
+                       public unowned Wl.Surface get_wl_surface ();
                }
                [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_toplevel_get_type ()")]
                [GIR (name = "WaylandToplevel")]
index 4405ba95aa4beb1a030101db64c4dc45eb4e49c3..34cc4b43aa29ebd07a9fa27781c4bf8f0fc5ed12 100644 (file)
@@ -1,6 +1,18 @@
 * cheader_filename = "gdk/wayland/gdkwayland.h"
 
-WaylandSurface.get_wl_surface type="Wl.Surface" skip=false
+WaylandDevice
+  .get_wl_keyboard type="unowned Wl.Keyboard" skip=false
+  .get_wl_pointer type="unowned Wl.Pointer" skip=false
+  .get_wl_seat type="unowned Wl.Seat" skip=false
+WaylandDisplay
+  .get_wl_display type="unowned Wl.Display" skip=false
+  .get_wl_compositor type="unowned Wl.Compositor" skip=false
+WaylandMonitor
+  .get_wl_output type="unowned Wl.Output" skip=false
+WaylandSeat
+  .get_wl_seat type="unowned Wl.Seat" skip=false
+WaylandSurface
+  .get_wl_surface type="unowned Wl.Surface" skip=false
 
 //wayland_* name="wayland_(.+)" parent="Gdk.Wayland"
 Wayland* name="Wayland(.+)" parent="Gdk.Wayland"