[vala/staging] gtk4: Split out gtk4-wayland and gtk4-x11 into separate bindings



commit b934cefe75ee2b99b105039374ee1cf1185f6e33
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Apr 15 16:04:14 2022 +0200

    gtk4: Split out gtk4-wayland and gtk4-x11 into separate bindings
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/1308

 vapi/Makefile.am       |  16 +++-
 vapi/gtk4-wayland.deps |   1 +
 vapi/gtk4-wayland.vapi |  70 +++++++++++++++++
 vapi/gtk4-x11.deps     |   2 +
 vapi/gtk4-x11.vapi     | 149 +++++++++++++++++++++++++++++++++++
 vapi/gtk4.deps         |   1 -
 vapi/gtk4.vapi         | 209 -------------------------------------------------
 7 files changed, 235 insertions(+), 213 deletions(-)
---
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index bdc5c6729..151301aa1 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -163,6 +163,10 @@ dist_vapi_DATA = \
        gtk4.vapi \
        gtk4-unix-print.deps \
        gtk4-unix-print.vapi \
+       gtk4-wayland.deps \
+       gtk4-wayland.vapi \
+       gtk4-x11.deps \
+       gtk4-x11.vapi \
        gtkmozembed.deps \
        gtkmozembed.vapi \
        gtksourceview-2.0.deps \
@@ -403,6 +407,8 @@ GIR_BINDINGS = \
        gtk+-3.0 \
        gtk4 \
        gtk4-unix-print \
+       gtk4-wayland \
+       gtk4-x11 \
        gudev-1.0 \
        harfbuzz-gobject \
        javascriptcoregtk-4.0 \
@@ -631,14 +637,18 @@ gtk+-3.0:
        $(GENVAPI) --library $(srcdir)/gtk+-3.0 --pkg atk --pkg gdk-3.0 --pkg gdk-pixbuf-2.0 --pkg gio-2.0 
--pkg pango --pkg cairo --metadatadir $(METADATADIR) $(METADATADIR)/Gtk-3.0-custom.vala $(GIRDIR)/Gtk-3.0.gir
 
 gtk4:
-       $(GENVAPI) --library $(srcdir)/gtk4 --pkg cairo --pkg gdk-pixbuf-2.0 --pkg gio-2.0 --pkg 
graphene-gobject-1.0 --pkg pango --pkg pangocairo --pkg x11 \
+       $(GENVAPI) --library $(srcdir)/gtk4 --pkg cairo --pkg gdk-pixbuf-2.0 --pkg gio-2.0 --pkg 
graphene-gobject-1.0 --pkg pango --pkg pangocairo \
                --metadatadir $(METADATADIR) \
-               $(METADATADIR)/GdkWayland-4.0-custom.vala $(GIRDIR)/GdkWayland-4.0.gir \
-               $(METADATADIR)/GdkX11-4.0-custom.vala $(GIRDIR)/GdkX11-4.0.gir \
                $(METADATADIR)/Gdk-4.0-custom.vala $(GIRDIR)/Gdk-4.0.gir \
                $(METADATADIR)/Gsk-4.0-custom.vala $(GIRDIR)/Gsk-4.0.gir \
                $(METADATADIR)/Gtk-4.0-custom.vala $(GIRDIR)/Gtk-4.0.gir
 
+gtk4-wayland:
+       $(GENVAPI) --library $(srcdir)/gtk4-wayland --pkg cairo --pkg gdk-pixbuf-2.0 --pkg gio-2.0 --pkg 
graphene-gobject-1.0 --pkg pango --pkg pangocairo --pkg gtk4 --metadatadir $(METADATADIR) 
$(METADATADIR)/GdkWayland-4.0-custom.vala $(GIRDIR)/GdkWayland-4.0.gir
+
+gtk4-x11:
+       $(GENVAPI) --library $(srcdir)/gtk4-x11 --pkg cairo --pkg gdk-pixbuf-2.0 --pkg gio-2.0 --pkg 
graphene-gobject-1.0 --pkg pango --pkg pangocairo --pkg gtk4 --pkg x11 --metadatadir $(METADATADIR) 
$(METADATADIR)/GdkX11-4.0-custom.vala $(GIRDIR)/GdkX11-4.0.gir
+
 gtk+-unix-print-2.0:
        $(GENVAPI) --library $(srcdir)/gtk+-unix-print-2.0 
$(PACKAGESDIR)/gtk+-unix-print-2.0/gtk+-unix-print-2.0-custom.vala 
$(PACKAGESDIR)/gtk+-unix-print-2.0/gtk+-unix-print-2.0.gi
 
diff --git a/vapi/gtk4-wayland.deps b/vapi/gtk4-wayland.deps
new file mode 100644
index 000000000..74c5b0312
--- /dev/null
+++ b/vapi/gtk4-wayland.deps
@@ -0,0 +1 @@
+gtk4
diff --git a/vapi/gtk4-wayland.vapi b/vapi/gtk4-wayland.vapi
new file mode 100644
index 000000000..255124724
--- /dev/null
+++ b/vapi/gtk4-wayland.vapi
@@ -0,0 +1,70 @@
+/* gtk4-wayland.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Gdk", gir_namespace = "GdkWayland", gir_version = "4.0", lower_case_cprefix = "gdk_")]
+namespace Gdk {
+       namespace Wayland {
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_device_get_type 
()")]
+               [GIR (name = "WaylandDevice")]
+               public class Device : Gdk.Device {
+                       [CCode (has_construct_function = false)]
+                       protected Device ();
+                       public unowned string? get_node_path ();
+                       [Version (since = "4.4")]
+                       public void* get_xkb_keymap ();
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_display_get_type ()")]
+               [GIR (name = "WaylandDisplay")]
+               public class Display : Gdk.Display {
+                       [CCode (has_construct_function = false)]
+                       protected Display ();
+                       [Version (since = "4.4")]
+                       public void* get_egl_display ();
+                       public unowned string? get_startup_notification_id ();
+                       public bool query_registry (string global);
+                       public void set_cursor_theme (string name, int size);
+                       public void set_startup_notification_id (string startup_id);
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_gl_context_get_type ()")]
+               [GIR (name = "WaylandGLContext")]
+               public class GLContext : Gdk.GLContext {
+                       [CCode (has_construct_function = false)]
+                       protected GLContext ();
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_monitor_get_type ()")]
+               [GIR (name = "WaylandMonitor")]
+               public class Monitor : Gdk.Monitor {
+                       [CCode (has_construct_function = false)]
+                       protected Monitor ();
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_popup_get_type 
()")]
+               [GIR (name = "WaylandPopup")]
+               public class Popup : Gdk.Wayland.Surface, Gdk.Popup {
+                       [CCode (has_construct_function = false)]
+                       protected Popup ();
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_seat_get_type 
()")]
+               [GIR (name = "WaylandSeat")]
+               public class Seat : Gdk.Seat {
+                       [CCode (has_construct_function = false)]
+                       protected Seat ();
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_surface_get_type ()")]
+               [GIR (name = "WaylandSurface")]
+               public class Surface : Gdk.Surface {
+                       [CCode (has_construct_function = false)]
+                       protected Surface ();
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_toplevel_get_type ()")]
+               [GIR (name = "WaylandToplevel")]
+               public class Toplevel : Gdk.Wayland.Surface, Gdk.Toplevel {
+                       [CCode (has_construct_function = false)]
+                       protected Toplevel ();
+                       public bool export_handle (owned Gdk.Wayland.ToplevelExported callback);
+                       public void set_application_id (string application_id);
+                       public bool set_transient_for_exported (string parent_handle_str);
+                       public void unexport_handle ();
+               }
+               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", instance_pos = 2.9)]
+               public delegate void ToplevelExported (Gdk.Wayland.Toplevel toplevel, string handle);
+       }
+}
diff --git a/vapi/gtk4-x11.deps b/vapi/gtk4-x11.deps
new file mode 100644
index 000000000..cdcddf0b6
--- /dev/null
+++ b/vapi/gtk4-x11.deps
@@ -0,0 +1,2 @@
+gtk4
+x11
diff --git a/vapi/gtk4-x11.vapi b/vapi/gtk4-x11.vapi
new file mode 100644
index 000000000..e66018adb
--- /dev/null
+++ b/vapi/gtk4-x11.vapi
@@ -0,0 +1,149 @@
+/* gtk4-x11.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Gdk", gir_namespace = "GdkX11", gir_version = "4.0", lower_case_cprefix = "gdk_")]
+namespace Gdk {
+       namespace X11 {
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_app_launch_context_get_type 
()")]
+               [GIR (name = "X11AppLaunchContext")]
+               public class AppLaunchContext : Gdk.AppLaunchContext {
+                       [CCode (has_construct_function = false)]
+                       protected AppLaunchContext ();
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_device_manager_xi2_get_type 
()")]
+               [GIR (name = "X11DeviceManagerXI2")]
+               public class DeviceManagerXI2 : GLib.Object {
+                       [CCode (has_construct_function = false)]
+                       protected DeviceManagerXI2 ();
+                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_device_manager_lookup")]
+                       public unowned Gdk.X11.DeviceXI2? lookup_for_device_manager (int device_id);
+                       [NoAccessorMethod]
+                       public Gdk.Display display { owned get; construct; }
+                       [NoAccessorMethod]
+                       public int major { get; construct; }
+                       [NoAccessorMethod]
+                       public int minor { get; construct; }
+                       [NoAccessorMethod]
+                       public int opcode { get; construct; }
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_device_xi2_get_type ()")]
+               [GIR (name = "X11DeviceXI2")]
+               public class DeviceXI2 : Gdk.Device {
+                       [CCode (has_construct_function = false)]
+                       protected DeviceXI2 ();
+                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_device_get_id")]
+                       public int get_id ();
+                       [NoAccessorMethod]
+                       public int device_id { get; construct; }
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_display_get_type ()")]
+               [GIR (name = "X11Display")]
+               public class Display : Gdk.Display {
+                       [CCode (has_construct_function = false)]
+                       protected Display ();
+                       public void broadcast_startup_message (string message_type, ...);
+                       public int error_trap_pop ();
+                       public void error_trap_pop_ignored ();
+                       public void error_trap_push ();
+                       public unowned Gdk.Surface get_default_group ();
+                       [Version (since = "4.4")]
+                       public void* get_egl_display ();
+                       [Version (since = "4.4")]
+                       public bool get_egl_version (out int major, out int minor);
+                       public bool get_glx_version (out int major, out int minor);
+                       public unowned Gdk.Monitor get_primary_monitor ();
+                       public unowned Gdk.X11.Screen get_screen ();
+                       public unowned string get_startup_notification_id ();
+                       public uint32 get_user_time ();
+                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = 
"gdk_x11_get_xatom_by_name_for_display")]
+                       public X.Atom get_xatom_by_name (string atom_name);
+                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = 
"gdk_x11_get_xatom_name_for_display")]
+                       public unowned string get_xatom_name (X.Atom xatom);
+                       public X.Cursor get_xcursor (Gdk.Cursor cursor);
+                       public unowned X.Display get_xdisplay ();
+                       public X.Window get_xrootwindow ();
+                       public unowned X.Screen get_xscreen ();
+                       public void grab ();
+                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_lookup_xdisplay")]
+                       public static unowned Gdk.X11.Display lookup_for_xdisplay (X.Display xdisplay);
+                       public static Gdk.Display? open (string? display_name);
+                       public void set_cursor_theme (string? theme, int size);
+                       public static void set_program_class (Gdk.Display display, string program_class);
+                       public void set_startup_notification_id (string startup_id);
+                       public void set_surface_scale (int scale);
+                       public int string_to_compound_text (string str, out unowned string encoding, out int 
format, [CCode (array_length_cname = "length", array_length_pos = 4.1)] out uint8[] ctext);
+                       public int text_property_to_text_list (string encoding, int format, [CCode (type = 
"const guchar*")] string text, int length, [CCode (array_length = false, type = "char***")] out string[] 
list);
+                       public void ungrab ();
+                       public bool utf8_to_compound_text (string str, out unowned string encoding, out int 
format, [CCode (array_length_cname = "length", array_length_pos = 4.1)] out uint8[] ctext);
+                       public signal bool xevent ([CCode (type = "gpointer")] X.Event xevent);
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_drag_get_type ()")]
+               [GIR (name = "X11Drag")]
+               public class Drag : Gdk.Drag {
+                       [CCode (has_construct_function = false)]
+                       protected Drag ();
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_gl_context_get_type ()")]
+               [GIR (name = "X11GLContext")]
+               public abstract class GLContext : Gdk.GLContext {
+                       [CCode (has_construct_function = false)]
+                       protected GLContext ();
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_monitor_get_type ()")]
+               [GIR (name = "X11Monitor")]
+               public class Monitor : Gdk.Monitor {
+                       [CCode (has_construct_function = false)]
+                       protected Monitor ();
+                       public X.ID get_output ();
+                       public Gdk.Rectangle get_workarea ();
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_screen_get_type ()")]
+               [GIR (name = "X11Screen")]
+               public class Screen : GLib.Object {
+                       [CCode (has_construct_function = false)]
+                       protected Screen ();
+                       public uint32 get_current_desktop ();
+                       public X.ID get_monitor_output (int monitor_num);
+                       public uint32 get_number_of_desktops ();
+                       public int get_screen_number ();
+                       public unowned string get_window_manager_name ();
+                       public unowned X.Screen get_xscreen ();
+                       public bool supports_net_wm_hint (string property_name);
+                       public signal void window_manager_changed ();
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_surface_get_type ()")]
+               [GIR (name = "X11Surface")]
+               public class Surface : Gdk.Surface {
+                       [CCode (has_construct_function = false)]
+                       protected Surface ();
+                       public uint32 get_desktop ();
+                       public unowned Gdk.Surface? get_group ();
+                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_get_server_time")]
+                       public uint32 get_server_time ();
+                       public X.Window get_xid ();
+                       public static unowned Gdk.X11.Surface lookup_for_display (Gdk.X11.Display display, 
X.Window window);
+                       public void move_to_current_desktop ();
+                       public void move_to_desktop (uint32 desktop);
+                       public void set_frame_sync_enabled (bool frame_sync_enabled);
+                       public void set_group (Gdk.Surface leader);
+                       public void set_skip_pager_hint (bool skips_pager);
+                       public void set_skip_taskbar_hint (bool skips_taskbar);
+                       public void set_theme_variant (string variant);
+                       public void set_urgency_hint (bool urgent);
+                       public void set_user_time (uint32 timestamp);
+                       public void set_utf8_property (string name, string? value);
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h", cprefix = "GDK_X11_DEVICE_TYPE_", has_type_id = 
false)]
+               [GIR (name = "X11DeviceType")]
+               public enum DeviceType {
+                       LOGICAL,
+                       PHYSICAL,
+                       FLOATING
+               }
+               [CCode (cheader_filename = "gdk/x11/gdkx.h")]
+               public static void free_compound_text ([CCode (array_length = false, type = "guchar*")] owned 
uint8[] ctext);
+               [CCode (cheader_filename = "gdk/x11/gdkx.h")]
+               public static void free_text_list ([CCode (array_length = false, type = "char**")] owned 
string[] list);
+               [CCode (cheader_filename = "gdk/x11/gdkx.h")]
+               public static void set_sm_client_id (string? sm_client_id);
+       }
+}
diff --git a/vapi/gtk4.deps b/vapi/gtk4.deps
index 89efa97bb..399d222a5 100644
--- a/vapi/gtk4.deps
+++ b/vapi/gtk4.deps
@@ -3,4 +3,3 @@ cairo-gobject
 gdk-pixbuf-2.0
 graphene-gobject-1.0
 pango
-x11
diff --git a/vapi/gtk4.vapi b/vapi/gtk4.vapi
index 9a905e54f..b68a9bc0c 100644
--- a/vapi/gtk4.vapi
+++ b/vapi/gtk4.vapi
@@ -4560,215 +4560,6 @@ namespace Gdk {
                [CCode (cheader_filename = "gdk/gdk.h", cname = "GDK_KEY_zstroke")]
                public const uint zstroke;
        }
-       namespace Wayland {
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_device_get_type 
()")]
-               [GIR (name = "WaylandDevice")]
-               public class Device : Gdk.Device {
-                       [CCode (has_construct_function = false)]
-                       protected Device ();
-                       public unowned string? get_node_path ();
-                       [Version (since = "4.4")]
-                       public void* get_xkb_keymap ();
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_display_get_type ()")]
-               [GIR (name = "WaylandDisplay")]
-               public class Display : Gdk.Display {
-                       [CCode (has_construct_function = false)]
-                       protected Display ();
-                       [Version (since = "4.4")]
-                       public void* get_egl_display ();
-                       public unowned string? get_startup_notification_id ();
-                       public bool query_registry (string global);
-                       public void set_cursor_theme (string name, int size);
-                       public void set_startup_notification_id (string startup_id);
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_gl_context_get_type ()")]
-               [GIR (name = "WaylandGLContext")]
-               public class GLContext : Gdk.GLContext {
-                       [CCode (has_construct_function = false)]
-                       protected GLContext ();
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_monitor_get_type ()")]
-               [GIR (name = "WaylandMonitor")]
-               public class Monitor : Gdk.Monitor {
-                       [CCode (has_construct_function = false)]
-                       protected Monitor ();
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_popup_get_type 
()")]
-               [GIR (name = "WaylandPopup")]
-               public class Popup : Gdk.Wayland.Surface, Gdk.Popup {
-                       [CCode (has_construct_function = false)]
-                       protected Popup ();
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = "gdk_wayland_seat_get_type 
()")]
-               [GIR (name = "WaylandSeat")]
-               public class Seat : Gdk.Seat {
-                       [CCode (has_construct_function = false)]
-                       protected Seat ();
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_surface_get_type ()")]
-               [GIR (name = "WaylandSurface")]
-               public class Surface : Gdk.Surface {
-                       [CCode (has_construct_function = false)]
-                       protected Surface ();
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", type_id = 
"gdk_wayland_toplevel_get_type ()")]
-               [GIR (name = "WaylandToplevel")]
-               public class Toplevel : Gdk.Wayland.Surface, Gdk.Toplevel {
-                       [CCode (has_construct_function = false)]
-                       protected Toplevel ();
-                       public bool export_handle (owned Gdk.Wayland.ToplevelExported callback);
-                       public void set_application_id (string application_id);
-                       public bool set_transient_for_exported (string parent_handle_str);
-                       public void unexport_handle ();
-               }
-               [CCode (cheader_filename = "gdk/wayland/gdkwayland.h", instance_pos = 2.9)]
-               public delegate void ToplevelExported (Gdk.Wayland.Toplevel toplevel, string handle);
-       }
-       namespace X11 {
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_app_launch_context_get_type 
()")]
-               [GIR (name = "X11AppLaunchContext")]
-               public class AppLaunchContext : Gdk.AppLaunchContext {
-                       [CCode (has_construct_function = false)]
-                       protected AppLaunchContext ();
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_device_manager_xi2_get_type 
()")]
-               [GIR (name = "X11DeviceManagerXI2")]
-               public class DeviceManagerXI2 : GLib.Object {
-                       [CCode (has_construct_function = false)]
-                       protected DeviceManagerXI2 ();
-                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_device_manager_lookup")]
-                       public unowned Gdk.X11.DeviceXI2? lookup_for_device_manager (int device_id);
-                       [NoAccessorMethod]
-                       public Gdk.Display display { owned get; construct; }
-                       [NoAccessorMethod]
-                       public int major { get; construct; }
-                       [NoAccessorMethod]
-                       public int minor { get; construct; }
-                       [NoAccessorMethod]
-                       public int opcode { get; construct; }
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_device_xi2_get_type ()")]
-               [GIR (name = "X11DeviceXI2")]
-               public class DeviceXI2 : Gdk.Device {
-                       [CCode (has_construct_function = false)]
-                       protected DeviceXI2 ();
-                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_device_get_id")]
-                       public int get_id ();
-                       [NoAccessorMethod]
-                       public int device_id { get; construct; }
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_display_get_type ()")]
-               [GIR (name = "X11Display")]
-               public class Display : Gdk.Display {
-                       [CCode (has_construct_function = false)]
-                       protected Display ();
-                       public void broadcast_startup_message (string message_type, ...);
-                       public int error_trap_pop ();
-                       public void error_trap_pop_ignored ();
-                       public void error_trap_push ();
-                       public unowned Gdk.Surface get_default_group ();
-                       [Version (since = "4.4")]
-                       public void* get_egl_display ();
-                       [Version (since = "4.4")]
-                       public bool get_egl_version (out int major, out int minor);
-                       public bool get_glx_version (out int major, out int minor);
-                       public unowned Gdk.Monitor get_primary_monitor ();
-                       public unowned Gdk.X11.Screen get_screen ();
-                       public unowned string get_startup_notification_id ();
-                       public uint32 get_user_time ();
-                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = 
"gdk_x11_get_xatom_by_name_for_display")]
-                       public X.Atom get_xatom_by_name (string atom_name);
-                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = 
"gdk_x11_get_xatom_name_for_display")]
-                       public unowned string get_xatom_name (X.Atom xatom);
-                       public X.Cursor get_xcursor (Gdk.Cursor cursor);
-                       public unowned X.Display get_xdisplay ();
-                       public X.Window get_xrootwindow ();
-                       public unowned X.Screen get_xscreen ();
-                       public void grab ();
-                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_lookup_xdisplay")]
-                       public static unowned Gdk.X11.Display lookup_for_xdisplay (X.Display xdisplay);
-                       public static Gdk.Display? open (string? display_name);
-                       public void set_cursor_theme (string? theme, int size);
-                       public static void set_program_class (Gdk.Display display, string program_class);
-                       public void set_startup_notification_id (string startup_id);
-                       public void set_surface_scale (int scale);
-                       public int string_to_compound_text (string str, out unowned string encoding, out int 
format, [CCode (array_length_cname = "length", array_length_pos = 4.1)] out uint8[] ctext);
-                       public int text_property_to_text_list (string encoding, int format, [CCode (type = 
"const guchar*")] string text, int length, [CCode (array_length = false, type = "char***")] out string[] 
list);
-                       public void ungrab ();
-                       public bool utf8_to_compound_text (string str, out unowned string encoding, out int 
format, [CCode (array_length_cname = "length", array_length_pos = 4.1)] out uint8[] ctext);
-                       public signal bool xevent ([CCode (type = "gpointer")] X.Event xevent);
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_drag_get_type ()")]
-               [GIR (name = "X11Drag")]
-               public class Drag : Gdk.Drag {
-                       [CCode (has_construct_function = false)]
-                       protected Drag ();
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_gl_context_get_type ()")]
-               [GIR (name = "X11GLContext")]
-               public abstract class GLContext : Gdk.GLContext {
-                       [CCode (has_construct_function = false)]
-                       protected GLContext ();
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_monitor_get_type ()")]
-               [GIR (name = "X11Monitor")]
-               public class Monitor : Gdk.Monitor {
-                       [CCode (has_construct_function = false)]
-                       protected Monitor ();
-                       public X.ID get_output ();
-                       public Gdk.Rectangle get_workarea ();
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_screen_get_type ()")]
-               [GIR (name = "X11Screen")]
-               public class Screen : GLib.Object {
-                       [CCode (has_construct_function = false)]
-                       protected Screen ();
-                       public uint32 get_current_desktop ();
-                       public X.ID get_monitor_output (int monitor_num);
-                       public uint32 get_number_of_desktops ();
-                       public int get_screen_number ();
-                       public unowned string get_window_manager_name ();
-                       public unowned X.Screen get_xscreen ();
-                       public bool supports_net_wm_hint (string property_name);
-                       public signal void window_manager_changed ();
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", type_id = "gdk_x11_surface_get_type ()")]
-               [GIR (name = "X11Surface")]
-               public class Surface : Gdk.Surface {
-                       [CCode (has_construct_function = false)]
-                       protected Surface ();
-                       public uint32 get_desktop ();
-                       public unowned Gdk.Surface? get_group ();
-                       [CCode (cheader_filename = "gdk/x11/gdkx.h", cname = "gdk_x11_get_server_time")]
-                       public uint32 get_server_time ();
-                       public X.Window get_xid ();
-                       public static unowned Gdk.X11.Surface lookup_for_display (Gdk.X11.Display display, 
X.Window window);
-                       public void move_to_current_desktop ();
-                       public void move_to_desktop (uint32 desktop);
-                       public void set_frame_sync_enabled (bool frame_sync_enabled);
-                       public void set_group (Gdk.Surface leader);
-                       public void set_skip_pager_hint (bool skips_pager);
-                       public void set_skip_taskbar_hint (bool skips_taskbar);
-                       public void set_theme_variant (string variant);
-                       public void set_urgency_hint (bool urgent);
-                       public void set_user_time (uint32 timestamp);
-                       public void set_utf8_property (string name, string? value);
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h", cprefix = "GDK_X11_DEVICE_TYPE_", has_type_id = 
false)]
-               [GIR (name = "X11DeviceType")]
-               public enum DeviceType {
-                       LOGICAL,
-                       PHYSICAL,
-                       FLOATING
-               }
-               [CCode (cheader_filename = "gdk/x11/gdkx.h")]
-               public static void free_compound_text ([CCode (array_length = false, type = "guchar*")] owned 
uint8[] ctext);
-               [CCode (cheader_filename = "gdk/x11/gdkx.h")]
-               public static void free_text_list ([CCode (array_length = false, type = "char**")] owned 
string[] list);
-               [CCode (cheader_filename = "gdk/x11/gdkx.h")]
-               public static void set_sm_client_id (string? sm_client_id);
-       }
        [CCode (cheader_filename = "gdk/gdk.h", type_id = "gdk_app_launch_context_get_type ()")]
        public class AppLaunchContext : GLib.AppLaunchContext {
                [CCode (has_construct_function = false)]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]