From: Corentin Noël Date: Thu, 12 Oct 2023 20:13:19 +0000 (+0200) Subject: gtk4-wayland: Add the missing wayland-client bindings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f1baf85a58c31431b00e4d52a5dbd36bf2cc920;p=thirdparty%2Fvala.git gtk4-wayland: Add the missing wayland-client bindings Bind the native Wayland types and unskip the methods. --- diff --git a/vapi/gtk4-wayland.vapi b/vapi/gtk4-wayland.vapi index 16b7d74bd..54087a6d7 100644 --- a/vapi/gtk4-wayland.vapi +++ b/vapi/gtk4-wayland.vapi @@ -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")] diff --git a/vapi/metadata/GdkWayland-4.0.metadata b/vapi/metadata/GdkWayland-4.0.metadata index 4405ba95a..34cc4b43a 100644 --- a/vapi/metadata/GdkWayland-4.0.metadata +++ b/vapi/metadata/GdkWayland-4.0.metadata @@ -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"