From 16960951e160a02dd36a1ec38cbe9c6ac43a583f Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 22 Feb 2022 17:39:35 +0100 Subject: [PATCH] vapi: Update GIR-based bindings --- vapi/gio-2.0.vapi | 7 +++--- vapi/gnome-desktop-3.0.vapi | 3 +++ vapi/gnome-desktop-4.vapi | 3 +++ vapi/gobject-introspection-1.0.vapi | 6 +++++ vapi/gtk+-3.0.vapi | 4 ++++ vapi/gtk4-unix-print.vapi | 6 ++--- vapi/gtk4.vapi | 36 ++++++++++++++--------------- vapi/libsoup-3.0.vapi | 20 ---------------- 8 files changed, 39 insertions(+), 46 deletions(-) diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index 17fde2ebe..db0a3f956 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -1210,6 +1210,7 @@ namespace GLib { public class DebugControllerDBus : GLib.Object, GLib.DebugController, GLib.Initable { [CCode (has_construct_function = false)] public DebugControllerDBus (GLib.DBusConnection connection, GLib.Cancellable? cancellable = null) throws GLib.Error; + public void stop (); [NoAccessorMethod] public GLib.DBusConnection connection { owned get; construct; } public virtual signal bool authorize (GLib.DBusMethodInvocation invocation); @@ -3611,7 +3612,6 @@ namespace GLib { [CCode (cheader_filename = "gio/gio.h", type_cname = "GDebugControllerInterface", type_id = "g_debug_controller_get_type ()")] [Version (since = "2.72")] public interface DebugController : GLib.Initable, GLib.Object { - public static GLib.DebugController dup_default (); public bool get_debug_enabled (); public void set_debug_enabled (bool debug_enabled); [ConcreteAccessor] @@ -3820,6 +3820,8 @@ namespace GLib { public abstract async bool mount_enclosing_volume (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; public abstract async GLib.File mount_mountable (GLib.MountMountFlags flags, GLib.MountOperation? mount_operation, GLib.Cancellable? cancellable = null) throws GLib.Error; public abstract bool move (GLib.File destination, GLib.FileCopyFlags flags, GLib.Cancellable? cancellable = null, GLib.FileProgressCallback? progress_callback = null) throws GLib.Error; + [Version (since = "2.72")] + public virtual async bool move_async (GLib.File destination, GLib.FileCopyFlags flags, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null, GLib.FileProgressCallback? progress_callback) throws GLib.Error; [Version (since = "2.56")] public static GLib.File new_build_filename (string first_element, ...); public static GLib.File new_for_commandline_arg (string arg); @@ -5180,9 +5182,6 @@ namespace GLib { [Version (replacement = "Action.print_detailed_name", since = "2.38")] public static string action_print_detailed_name (string action_name, GLib.Variant? target_value); [CCode (cheader_filename = "gio/gio.h")] - [Version (replacement = "DebugController.dup_default", since = "2.72")] - public static GLib.DebugController debug_controller_dup_default (); - [CCode (cheader_filename = "gio/gio.h")] [Version (replacement = "DtlsClientConnection.new", since = "2.48")] public static GLib.DtlsClientConnection dtls_client_connection_new (GLib.DatagramBased base_socket, GLib.SocketConnectable? server_identity) throws GLib.Error; [CCode (cheader_filename = "gio/gio.h")] diff --git a/vapi/gnome-desktop-3.0.vapi b/vapi/gnome-desktop-3.0.vapi index 31014bd41..cae6f8202 100644 --- a/vapi/gnome-desktop-3.0.vapi +++ b/vapi/gnome-desktop-3.0.vapi @@ -117,14 +117,17 @@ namespace Gnome { public bool can_thumbnail (string uri, string mime_type, long mtime); [Version (since = "2.2")] public void create_failed_thumbnail (string uri, long mtime); + public async void create_failed_thumbnail_async (string uri, long original_mtime, GLib.Cancellable? cancellable) throws GLib.Error; [Version (since = "2.2")] public Gdk.Pixbuf generate_thumbnail (string uri, string mime_type); + public async Gdk.Pixbuf generate_thumbnail_async (string uri, string mime_type, GLib.Cancellable? cancellable) throws GLib.Error; [Version (since = "2.2")] public bool has_valid_failed_thumbnail (string uri, long mtime); [Version (since = "2.2")] public string lookup (string uri, long mtime); [Version (since = "2.2")] public void save_thumbnail (Gdk.Pixbuf thumbnail, string uri, long original_mtime); + public async void save_thumbnail_async (Gdk.Pixbuf thumbnail, string uri, long original_mtime, GLib.Cancellable? cancellable) throws GLib.Error; } [CCode (cheader_filename = "libgnome-desktop/gnome-idle-monitor.h", type_id = "gnome_idle_monitor_get_type ()")] public class IdleMonitor : GLib.Object, GLib.Initable { diff --git a/vapi/gnome-desktop-4.vapi b/vapi/gnome-desktop-4.vapi index 6524478fb..1475bdad4 100644 --- a/vapi/gnome-desktop-4.vapi +++ b/vapi/gnome-desktop-4.vapi @@ -51,14 +51,17 @@ namespace Gnome { public bool can_thumbnail (string uri, string mime_type, long mtime); [Version (since = "2.2")] public void create_failed_thumbnail (string uri, long mtime); + public async void create_failed_thumbnail_async (string uri, long original_mtime, GLib.Cancellable? cancellable) throws GLib.Error; [Version (since = "2.2")] public Gdk.Pixbuf generate_thumbnail (string uri, string mime_type); + public async Gdk.Pixbuf generate_thumbnail_async (string uri, string mime_type, GLib.Cancellable? cancellable) throws GLib.Error; [Version (since = "2.2")] public bool has_valid_failed_thumbnail (string uri, long mtime); [Version (since = "2.2")] public string lookup (string uri, long mtime); [Version (since = "2.2")] public void save_thumbnail (Gdk.Pixbuf thumbnail, string uri, long original_mtime); + public async void save_thumbnail_async (Gdk.Pixbuf thumbnail, string uri, long original_mtime, GLib.Cancellable? cancellable) throws GLib.Error; } [CCode (cheader_filename = "libgnome-desktop/gnome-idle-monitor.h", type_id = "gnome_idle_monitor_get_type ()")] public class IdleMonitor : GLib.Object, GLib.Initable { diff --git a/vapi/gobject-introspection-1.0.vapi b/vapi/gobject-introspection-1.0.vapi index 88a70496b..2b8b627ed 100644 --- a/vapi/gobject-introspection-1.0.vapi +++ b/vapi/gobject-introspection-1.0.vapi @@ -471,4 +471,10 @@ namespace GI { [CCode (cheader_filename = "girepository.h", cname = "gi_get_minor_version")] [Version (since = "1.60")] public static uint get_minor_version (); + [CCode (cheader_filename = "girepository.h", cname = "gi_type_tag_argument_from_hash_pointer")] + [Version (since = "1.72")] + public static void type_tag_argument_from_hash_pointer (GI.TypeTag storage_type, void* hash_pointer, GI.Argument arg); + [CCode (cheader_filename = "girepository.h", cname = "gi_type_tag_hash_pointer_from_argument")] + [Version (since = "1.72")] + public static void* type_tag_hash_pointer_from_argument (GI.TypeTag storage_type, GI.Argument arg); } diff --git a/vapi/gtk+-3.0.vapi b/vapi/gtk+-3.0.vapi index f70360f3a..732af1878 100644 --- a/vapi/gtk+-3.0.vapi +++ b/vapi/gtk+-3.0.vapi @@ -3091,6 +3091,7 @@ namespace Gtk { public signal void up_folder (); } [CCode (cheader_filename = "gtk/gtk.h,gtk/gtk-a11y.h", type_id = "gtk_file_chooser_widget_accessible_get_type ()")] + [Version (since = "3.24.30")] public class FileChooserWidgetAccessible : Gtk.ContainerAccessible, Atk.Action, Atk.Component { [CCode (has_construct_function = false)] protected FileChooserWidgetAccessible (); @@ -3795,6 +3796,7 @@ namespace Gtk { public string title { get; set; } } [CCode (cheader_filename = "gtk/gtk.h,gtk/gtk-a11y.h", type_id = "gtk_header_bar_accessible_get_type ()")] + [Version (since = "3.24.11")] public class HeaderBarAccessible : Gtk.ContainerAccessible, Atk.Component { [CCode (has_construct_function = false)] protected HeaderBarAccessible (); @@ -5667,6 +5669,7 @@ namespace Gtk { public signal void on_embedded (); } [CCode (cheader_filename = "gtk/gtk.h,gtk/gtk-a11y.h", type_id = "gtk_plug_accessible_get_type ()")] + [Version (since = "3.24.30")] public class PlugAccessible : Gtk.WindowAccessible, Atk.Component, Atk.Window { [CCode (has_construct_function = false)] protected PlugAccessible (); @@ -7115,6 +7118,7 @@ namespace Gtk { public virtual signal bool plug_removed (); } [CCode (cheader_filename = "gtk/gtk.h,gtk/gtk-a11y.h", type_id = "gtk_socket_accessible_get_type ()")] + [Version (since = "3.24.30")] public class SocketAccessible : Gtk.ContainerAccessible, Atk.Component { [CCode (has_construct_function = false)] protected SocketAccessible (); diff --git a/vapi/gtk4-unix-print.vapi b/vapi/gtk4-unix-print.vapi index 6885b50ae..758a14933 100644 --- a/vapi/gtk4-unix-print.vapi +++ b/vapi/gtk4-unix-print.vapi @@ -7,9 +7,9 @@ namespace Gtk { [CCode (has_construct_function = false, type = "GtkWidget*")] public PageSetupUnixDialog (string? title, Gtk.Window? parent); public unowned Gtk.PageSetup get_page_setup (); - public unowned Gtk.PrintSettings get_print_settings (); + public unowned Gtk.PrintSettings? get_print_settings (); public void set_page_setup (Gtk.PageSetup page_setup); - public void set_print_settings (Gtk.PrintSettings print_settings); + public void set_print_settings (Gtk.PrintSettings? print_settings); } [CCode (cheader_filename = "gtk/gtkunixprint.h")] public abstract class PrintBackend : GLib.Object { @@ -68,7 +68,7 @@ namespace Gtk { public Gtk.PrintCapabilities get_manual_capabilities (); public unowned Gtk.PageSetup get_page_setup (); public bool get_page_setup_set (); - public unowned Gtk.Printer get_selected_printer (); + public unowned Gtk.Printer? get_selected_printer (); public Gtk.PrintSettings get_settings (); public bool get_support_selection (); public void set_current_page (int current_page); diff --git a/vapi/gtk4.vapi b/vapi/gtk4.vapi index a388943bb..ac1a82b33 100644 --- a/vapi/gtk4.vapi +++ b/vapi/gtk4.vapi @@ -4961,7 +4961,7 @@ namespace Gdk { [CCode (has_construct_function = false)] protected Device (); public bool get_caps_lock_state (); - public unowned Gdk.DeviceTool get_device_tool (); + public unowned Gdk.DeviceTool? get_device_tool (); public Pango.Direction get_direction (); public unowned Gdk.Display get_display (); public bool get_has_cursor (); @@ -4972,7 +4972,6 @@ namespace Gdk { public unowned string? get_product_id (); public bool get_scroll_lock_state (); public unowned Gdk.Seat get_seat (); - [Version (deprecated = true, deprecated_since = "4.6")] public Gdk.InputSource get_source (); public unowned Gdk.Surface? get_surface_at_position (out double win_x, out double win_y); [Version (since = "4.2")] @@ -4994,7 +4993,6 @@ namespace Gdk { public bool scroll_lock_state { get; } [NoAccessorMethod] public Gdk.Seat seat { owned get; set; } - [Version (deprecated = true, deprecated_since = "4.6")] public Gdk.InputSource source { get; construct; } [NoAccessorMethod] public Gdk.DeviceTool tool { owned get; } @@ -7109,9 +7107,9 @@ namespace Gtk { [NoWrapper] public virtual void get_cell_property (Gtk.CellRenderer renderer, uint property_id, ref GLib.Value value, GLib.ParamSpec pspec); public unowned string get_current_path_string (); - public unowned Gtk.CellEditable get_edit_widget (); - public unowned Gtk.CellRenderer get_edited_cell (); - public unowned Gtk.CellRenderer get_focus_cell (); + public unowned Gtk.CellEditable? get_edit_widget (); + public unowned Gtk.CellRenderer? get_edited_cell (); + public unowned Gtk.CellRenderer? get_focus_cell (); public unowned Gtk.CellRenderer? get_focus_from_sibling (Gtk.CellRenderer renderer); public unowned GLib.List get_focus_siblings (Gtk.CellRenderer renderer); public virtual void get_preferred_height (Gtk.CellAreaContext context, Gtk.Widget widget, out int minimum_height, out int natural_height); @@ -7132,7 +7130,7 @@ namespace Gtk { public void request_renderer (Gtk.CellRenderer renderer, Gtk.Orientation orientation, Gtk.Widget widget, int for_size, out int minimum_size, out int natural_size); [NoWrapper] public virtual void set_cell_property (Gtk.CellRenderer renderer, uint property_id, GLib.Value value, GLib.ParamSpec pspec); - public void set_focus_cell (Gtk.CellRenderer renderer); + public void set_focus_cell (Gtk.CellRenderer? renderer); public virtual void snapshot (Gtk.CellAreaContext context, Gtk.Widget widget, Gtk.Snapshot snapshot, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags, bool paint_focus); public void stop_editing (bool canceled); public Gtk.CellEditable edit_widget { get; } @@ -7969,7 +7967,7 @@ namespace Gtk { public unowned Gdk.Drop? get_current_drop (); [Version (deprecated = true, deprecated_since = "4.4")] public unowned Gdk.Drop? get_drop (); - public Gdk.ContentFormats? get_formats (); + public unowned Gdk.ContentFormats? get_formats (); [CCode (array_length_pos = 0.1, array_length_type = "gsize")] public unowned GLib.Type[]? get_gtypes (); public bool get_preload (); @@ -7981,7 +7979,7 @@ namespace Gtk { public Gdk.DragAction actions { get; set; } [Version (since = "4.4")] public Gdk.Drop current_drop { get; } - public Gdk.ContentFormats formats { owned get; construct; } + public Gdk.ContentFormats formats { get; construct; } public bool preload { get; set; } public GLib.Value value { get; } public signal bool accept (Gdk.Drop drop); @@ -8227,12 +8225,12 @@ namespace Gtk { public unowned Gdk.Device? get_current_event_device (); public Gdk.ModifierType get_current_event_state (); public uint32 get_current_event_time (); - public unowned string get_name (); + public unowned string? get_name (); public Gtk.PropagationLimit get_propagation_limit (); public Gtk.PropagationPhase get_propagation_phase (); public unowned Gtk.Widget get_widget (); public void reset (); - public void set_name (string name); + public void set_name (string? name); public void set_propagation_limit (Gtk.PropagationLimit limit); public void set_propagation_phase (Gtk.PropagationPhase phase); public string name { get; set; } @@ -8257,8 +8255,8 @@ namespace Gtk { public EventControllerKey (); public bool forward (Gtk.Widget widget); public uint get_group (); - public unowned Gtk.IMContext get_im_context (); - public void set_im_context (Gtk.IMContext im_context); + public unowned Gtk.IMContext? get_im_context (); + public void set_im_context (Gtk.IMContext? im_context); public signal void im_update (); public signal bool key_pressed (uint keyval, uint keycode, Gdk.ModifierType state); public signal void key_released (uint keyval, uint keycode, Gdk.ModifierType state); @@ -8957,7 +8955,7 @@ namespace Gtk { public int get_columns (); public bool get_cursor (out Gtk.TreePath path, out unowned Gtk.CellRenderer cell); public bool get_dest_item_at_pos (int drag_x, int drag_y, out Gtk.TreePath path, out Gtk.IconViewDropPosition pos); - public void get_drag_dest_item (out Gtk.TreePath path, out Gtk.IconViewDropPosition pos); + public void get_drag_dest_item (out Gtk.TreePath? path, out Gtk.IconViewDropPosition pos); public bool get_item_at_pos (int x, int y, out Gtk.TreePath path, out unowned Gtk.CellRenderer cell); public int get_item_column (Gtk.TreePath path); public Gtk.Orientation get_item_orientation (); @@ -10133,7 +10131,7 @@ namespace Gtk { public void get_error () throws GLib.Error; public bool get_has_selection (); public int get_n_pages_to_print (); - public unowned Gtk.PrintSettings get_print_settings (); + public unowned Gtk.PrintSettings? get_print_settings (); public Gtk.PrintStatus get_status (); public unowned string get_status_string (); public bool get_support_selection (); @@ -10846,7 +10844,7 @@ namespace Gtk { public SingleSelection (owned GLib.ListModel? model); public bool get_autoselect (); public bool get_can_unselect (); - public unowned GLib.ListModel get_model (); + public unowned GLib.ListModel? get_model (); public uint get_selected (); public unowned GLib.Object? get_selected_item (); public void set_autoselect (bool autoselect); @@ -12806,8 +12804,8 @@ namespace Gtk { public Gtk.FileChooserAction get_action (); public unowned string? get_choice (string id); public bool get_create_folders (); - public GLib.File get_current_folder (); - public string get_current_name (); + public GLib.File? get_current_folder (); + public string? get_current_name (); public GLib.File? get_file (); public GLib.ListModel get_files (); public unowned Gtk.FileFilter? get_filter (); @@ -12820,7 +12818,7 @@ namespace Gtk { public void set_action (Gtk.FileChooserAction action); public void set_choice (string id, string option); public void set_create_folders (bool create_folders); - public bool set_current_folder (GLib.File file) throws GLib.Error; + public bool set_current_folder (GLib.File? file) throws GLib.Error; public void set_current_name (string name); public bool set_file (GLib.File file) throws GLib.Error; public void set_filter (Gtk.FileFilter filter); diff --git a/vapi/libsoup-3.0.vapi b/vapi/libsoup-3.0.vapi index 29127e20f..9fd12137c 100644 --- a/vapi/libsoup-3.0.vapi +++ b/vapi/libsoup-3.0.vapi @@ -140,14 +140,6 @@ namespace Soup { [NoAccessorMethod] public Soup.CacheType cache_type { get; construct; } } - [CCode (cheader_filename = "libsoup/soup.h", has_type_id = false)] - [Compact] - public class ClientMessageIO { - } - [CCode (cheader_filename = "libsoup/soup.h", has_type_id = false)] - [Compact] - public class Connection { - } [CCode (cheader_filename = "libsoup/soup.h", type_id = "soup_content_decoder_get_type ()")] public sealed class ContentDecoder : GLib.Object, Soup.SessionFeature { [CCode (has_construct_function = false)] @@ -449,14 +441,6 @@ namespace Soup { public uint64 get_response_start (); public uint64 get_tls_start (); } - [CCode (cheader_filename = "libsoup/soup.h", has_type_id = false)] - [Compact] - public class MessageQueue { - } - [CCode (cheader_filename = "libsoup/soup.h", has_type_id = false)] - [Compact] - public class MessageQueueItem { - } [CCode (cheader_filename = "libsoup/soup.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "soup_multipart_get_type ()")] [Compact] public class Multipart { @@ -614,10 +598,6 @@ namespace Soup { public virtual signal void request_queued (Soup.Message msg); public virtual signal void request_unqueued (Soup.Message msg); } - [CCode (cheader_filename = "libsoup/soup.h", has_type_id = false)] - [Compact] - public class Socket { - } [CCode (cheader_filename = "libsoup/soup.h", type_id = "soup_websocket_connection_get_type ()")] public sealed class WebsocketConnection : GLib.Object { [CCode (has_construct_function = false)] -- 2.47.2