From: Rico Tzschichholz Date: Thu, 15 Apr 2021 14:49:14 +0000 (+0200) Subject: vapi: Update GIR-based bindings X-Git-Tag: 0.53.1~112 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb7dc13c0d4cf66c153852513c69c5caccec5a7d;p=thirdparty%2Fvala.git vapi: Update GIR-based bindings --- diff --git a/vapi/gdk-pixbuf-2.0.vapi b/vapi/gdk-pixbuf-2.0.vapi index a4f0de7e9..daabef10b 100644 --- a/vapi/gdk-pixbuf-2.0.vapi +++ b/vapi/gdk-pixbuf-2.0.vapi @@ -8,7 +8,7 @@ namespace Gdk { public Pixbuf (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height); public Gdk.Pixbuf add_alpha (bool substitute_color, uint8 r, uint8 g, uint8 b); [Version (since = "2.12")] - public Gdk.Pixbuf apply_embedded_orientation (); + public Gdk.Pixbuf? apply_embedded_orientation (); [Version (since = "2.36.8")] public static int calculate_rowstride (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height); public void composite (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type, int overall_alpha); @@ -67,13 +67,13 @@ namespace Gdk { [Version (since = "2.4")] public static unowned Gdk.PixbufFormat? get_file_info (string filename, out int width, out int height); [Version (since = "2.32")] - public static async unowned Gdk.PixbufFormat get_file_info_async (string filename, GLib.Cancellable? cancellable, out int width, out int height) throws GLib.Error; + public static async unowned Gdk.PixbufFormat? get_file_info_async (string filename, GLib.Cancellable? cancellable, out int width, out int height) throws GLib.Error; [Version (since = "2.2")] public static GLib.SList get_formats (); public bool get_has_alpha (); public int get_height (); public int get_n_channels (); - public unowned string get_option (string key); + public unowned string? get_option (string key); [Version (since = "2.32")] public GLib.HashTable get_options (); [CCode (array_length = false)] @@ -98,22 +98,22 @@ namespace Gdk { [Version (since = "2.4")] public bool save_to_buffer ([CCode (array_length_cname = "buffer_size", array_length_pos = 1.5, array_length_type = "gsize")] out uint8[] buffer, string type, ...) throws GLib.Error; [Version (since = "2.4")] - public bool save_to_bufferv ([CCode (array_length_cname = "buffer_size", array_length_pos = 1.5, array_length_type = "gsize")] out uint8[] buffer, string type, [CCode (array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated = true)] string[] option_values) throws GLib.Error; + public bool save_to_bufferv ([CCode (array_length_cname = "buffer_size", array_length_pos = 1.5, array_length_type = "gsize")] out uint8[] buffer, string type, [CCode (array_length = false, array_null_terminated = true)] string[]? option_keys, [CCode (array_length = false, array_null_terminated = true)] string[]? option_values) throws GLib.Error; [Version (since = "2.4")] public bool save_to_callback ([CCode (delegate_target_pos = 1.5)] Gdk.PixbufSaveFunc save_func, string type, ...) throws GLib.Error; [Version (since = "2.4")] - public bool save_to_callbackv ([CCode (delegate_target_pos = 1.5)] Gdk.PixbufSaveFunc save_func, string type, [CCode (array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated = true)] string[] option_values) throws GLib.Error; + public bool save_to_callbackv ([CCode (delegate_target_pos = 1.5)] Gdk.PixbufSaveFunc save_func, string type, [CCode (array_length = false, array_null_terminated = true)] string[]? option_keys, [CCode (array_length = false, array_null_terminated = true)] string[]? option_values) throws GLib.Error; [Version (since = "2.14")] public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null, ...) throws GLib.Error; [CCode (finish_instance = false, finish_name = "gdk_pixbuf_save_to_stream_finish", sentinel = "NULL")] [Version (since = "2.24")] public async void save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null, ...) throws GLib.Error; [Version (since = "2.36")] - public bool save_to_streamv (GLib.OutputStream stream, string type, [CCode (array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated = true)] string[] option_values, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool save_to_streamv (GLib.OutputStream stream, string type, [CCode (array_length = false, array_null_terminated = true)] string[]? option_keys, [CCode (array_length = false, array_null_terminated = true)] string[]? option_values, GLib.Cancellable? cancellable = null) throws GLib.Error; [CCode (finish_instance = false, finish_name = "gdk_pixbuf_save_to_stream_finish")] [Version (since = "2.36")] - public async void save_to_streamv_async (GLib.OutputStream stream, string type, [CCode (array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated = true)] string[] option_values, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool savev (string filename, string type, [CCode (array_length = false, array_null_terminated = true)] string[] option_keys, [CCode (array_length = false, array_null_terminated = true)] string[] option_values) throws GLib.Error; + public async void save_to_streamv_async (GLib.OutputStream stream, string type, [CCode (array_length = false, array_null_terminated = true)] string[]? option_keys, [CCode (array_length = false, array_null_terminated = true)] string[]? option_values, GLib.Cancellable? cancellable = null) throws GLib.Error; + public bool savev (string filename, string type, [CCode (array_length = false, array_null_terminated = true)] string[]? option_keys, [CCode (array_length = false, array_null_terminated = true)] string[]? option_values) throws GLib.Error; public void scale (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type); public Gdk.Pixbuf? scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type); [Version (since = "2.2")] @@ -172,10 +172,12 @@ namespace Gdk { public weak string description; public bool disabled; public weak string domain; - public weak string extensions; + [CCode (array_length = false, array_null_terminated = true)] + public weak string[] extensions; public uint32 flags; public weak string license; - public weak string mime_types; + [CCode (array_length = false, array_null_terminated = true)] + public weak string[] mime_types; public weak string name; public Gdk.PixbufModulePattern signature; [Version (since = "2.22")] @@ -205,10 +207,10 @@ namespace Gdk { [CCode (has_construct_function = false)] public PixbufLoader (); public bool close () throws GLib.Error; - public unowned Gdk.PixbufAnimation get_animation (); + public unowned Gdk.PixbufAnimation? get_animation (); [Version (since = "2.2")] public unowned Gdk.PixbufFormat? get_format (); - public unowned Gdk.Pixbuf get_pixbuf (); + public unowned Gdk.Pixbuf? get_pixbuf (); [Version (since = "2.2")] public void set_size (int width, int height); [CCode (has_construct_function = false)] @@ -274,6 +276,7 @@ namespace Gdk { public int relevance; } [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", has_type_id = false)] + [Version (deprecated = true, deprecated_since = "2.32")] public struct Pixdata { public uint32 magic; public int32 length; @@ -283,12 +286,9 @@ namespace Gdk { public uint32 height; [CCode (array_length = false)] public weak uint8[] pixel_data; - [Version (deprecated = true, deprecated_since = "2.32")] public bool deserialize ([CCode (array_length_cname = "stream_length", array_length_pos = 0.5, array_length_type = "guint")] uint8[] stream) throws GLib.Error; [CCode (array_length_pos = 0.1, array_length_type = "guint")] - [Version (deprecated = true, deprecated_since = "2.32")] public uint8[] serialize (); - [Version (deprecated = true, deprecated_since = "2.32")] public GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type); } [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cprefix = "GDK_COLORSPACE_", type_id = "gdk_colorspace_get_type ()")] @@ -303,7 +303,7 @@ namespace Gdk { HYPER } [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cprefix = "GDK_PIXBUF_ALPHA_", type_id = "gdk_pixbuf_alpha_mode_get_type ()")] - [Version (deprecated = true)] + [Version (deprecated = true, deprecated_since = "2.42")] public enum PixbufAlphaMode { BILEVEL, FULL @@ -325,6 +325,7 @@ namespace Gdk { } [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", cprefix = "GDK_PIXDATA_DUMP_", has_type_id = false)] [Flags] + [Version (deprecated = true, deprecated_since = "2.32")] public enum PixdataDumpType { PIXDATA_STREAM, PIXDATA_STRUCT, @@ -337,6 +338,7 @@ namespace Gdk { } [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h", cprefix = "GDK_PIXDATA_", has_type_id = false)] [Flags] + [Version (deprecated = true, deprecated_since = "2.32")] public enum PixdataType { COLOR_TYPE_RGB, COLOR_TYPE_RGBA, @@ -396,8 +398,6 @@ namespace Gdk { [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", error_pos = 1.8, instance_pos = 1.9)] [Version (since = "2.4")] public delegate bool PixbufSaveFunc ([CCode (array_length_cname = "count", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] buf) throws GLib.Error; - [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_FEATURES_H")] - public const int PIXBUF_FEATURES_H; [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_MAGIC_NUMBER")] public const int PIXBUF_MAGIC_NUMBER; [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_MAJOR")] @@ -409,5 +409,6 @@ namespace Gdk { [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXBUF_VERSION")] public const string PIXBUF_VERSION; [CCode (cheader_filename = "gdk-pixbuf/gdk-pixbuf.h", cname = "GDK_PIXDATA_HEADER_LENGTH")] + [Version (deprecated = true, deprecated_since = "2.32")] public const int PIXDATA_HEADER_LENGTH; } diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index 35d197d4b..e8993f958 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -1279,6 +1279,8 @@ namespace GLib { public void clear_status (); public void copy_into (GLib.FileInfo dest_info); public GLib.FileInfo dup (); + [Version (since = "2.70")] + public GLib.DateTime? get_access_date_time (); public string? get_attribute_as_string (string attribute); public bool get_attribute_boolean (string attribute); public unowned string? get_attribute_byte_string (string attribute); @@ -1295,6 +1297,8 @@ namespace GLib { public uint32 get_attribute_uint32 (string attribute); public uint64 get_attribute_uint64 (string attribute); public unowned string? get_content_type (); + [Version (since = "2.70")] + public GLib.DateTime? get_creation_date_time (); [Version (since = "2.36")] public GLib.DateTime? get_deletion_date (); public unowned string get_display_name (); @@ -1321,6 +1325,8 @@ namespace GLib { [CCode (array_length = false, array_null_terminated = true)] public string[]? list_attributes (string? name_space); public void remove_attribute (string attribute); + [Version (since = "2.70")] + public void set_access_date_time (GLib.DateTime atime); public void set_attribute (string attribute, GLib.FileAttributeType type, void* value_p); public void set_attribute_boolean (string attribute, bool attr_value); public void set_attribute_byte_string (string attribute, string attr_value); @@ -1335,6 +1341,8 @@ namespace GLib { public void set_attribute_uint32 (string attribute, uint32 attr_value); public void set_attribute_uint64 (string attribute, uint64 attr_value); public void set_content_type (string content_type); + [Version (since = "2.70")] + public void set_creation_date_time (GLib.DateTime creation_time); public void set_display_name (string display_name); public void set_edit_name (string edit_name); public void set_file_type (GLib.FileType type); diff --git a/vapi/gstreamer-1.0.vapi b/vapi/gstreamer-1.0.vapi index a1b09bec1..296c2db60 100644 --- a/vapi/gstreamer-1.0.vapi +++ b/vapi/gstreamer-1.0.vapi @@ -572,6 +572,9 @@ namespace Gst { public Gst.MemoryFlags flags; public size_t padding; public size_t prefix; + [CCode (has_construct_function = false)] + [Version (since = "1.20")] + public AllocationParams (); public Gst.AllocationParams? copy (); [DestroysInstance] public void free (); @@ -961,6 +964,9 @@ namespace Gst { public void remove (string feature); public void remove_id (GLib.Quark feature); public bool set_parent_refcount (int refcount); + [CCode (has_construct_function = false)] + [Version (since = "1.20")] + public CapsFeatures.single (string feature); public string to_string (); [CCode (has_construct_function = false)] public CapsFeatures.valist (string feature1, va_list varargs); @@ -3067,6 +3073,8 @@ namespace Gst { public unowned uint8[]? peek (int64 offset); public static bool register (Gst.Plugin? plugin, string name, uint rank, [CCode (delegate_target_pos = 6.1, destroy_notify_pos = 6.2)] owned Gst.TypeFindFunction func, string? extensions, Gst.Caps? possible_caps); public void suggest (uint probability, Gst.Caps caps); + [Version (since = "1.20")] + public void suggest_empty_simple (uint probability, string media_type); public void suggest_simple (uint probability, string media_type, string? fieldname, ...); } [CCode (cheader_filename = "gst/gst.h", has_type_id = false)] diff --git a/vapi/gtk4.vapi b/vapi/gtk4.vapi index 99574a9c2..e0d91f731 100644 --- a/vapi/gtk4.vapi +++ b/vapi/gtk4.vapi @@ -4964,6 +4964,8 @@ namespace Gdk { public unowned Gdk.Seat get_seat (); 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")] + public uint32 get_timestamp (); public unowned string? get_vendor_id (); public bool caps_lock_state { get; } public Pango.Direction direction { get; } @@ -6783,9 +6785,9 @@ namespace Gtk { public class BoolFilter : Gtk.Filter { [CCode (has_construct_function = false)] public BoolFilter (owned Gtk.Expression? expression); - public unowned Gtk.Expression get_expression (); + public unowned Gtk.Expression? get_expression (); public bool get_invert (); - public void set_expression (Gtk.Expression expression); + public void set_expression (Gtk.Expression? expression); public void set_invert (bool invert); public Gtk.Expression expression { get; set; } public bool invert { get; set; } @@ -8714,12 +8716,14 @@ namespace Gtk { public virtual void get_preedit_string (out string str, out Pango.AttrList attrs, out int cursor_pos); [Version (deprecated = true, deprecated_since = "4.2")] public virtual bool get_surrounding (out string text, out int cursor_index); + [Version (since = "4.2")] public virtual bool get_surrounding_with_selection (out string text, out int cursor_index, out int anchor_index); public virtual void reset (); public virtual void set_client_widget (Gtk.Widget? widget); public virtual void set_cursor_location (Gdk.Rectangle area); [Version (deprecated = true, deprecated_since = "4.2")] public virtual void set_surrounding (string text, int len, int cursor_index); + [Version (since = "4.2")] public virtual void set_surrounding_with_selection (string text, int len, int cursor_index, int anchor_index); public virtual void set_use_preedit (bool use_preedit); [NoAccessorMethod] @@ -8778,6 +8782,7 @@ namespace Gtk { [CCode (array_length = false, array_null_terminated = true)] public string[]? get_search_path (); public string get_theme_name (); + public bool has_gicon (GLib.Icon gicon); public bool has_icon (string icon_name); public Gtk.IconPaintable lookup_by_gicon (GLib.Icon icon, int size, int scale, Gtk.TextDirection direction, Gtk.IconLookupFlags flags); public Gtk.IconPaintable lookup_icon (string icon_name, [CCode (array_length = false, array_null_terminated = true)] string[]? fallbacks, int size, int scale, Gtk.TextDirection direction, Gtk.IconLookupFlags flags); @@ -10923,11 +10928,11 @@ namespace Gtk { public class StringFilter : Gtk.Filter { [CCode (has_construct_function = false)] public StringFilter (owned Gtk.Expression? expression); - public unowned Gtk.Expression get_expression (); + public unowned Gtk.Expression? get_expression (); public bool get_ignore_case (); public Gtk.StringFilterMatchMode get_match_mode (); public unowned string? get_search (); - public void set_expression (Gtk.Expression expression); + public void set_expression (Gtk.Expression? expression); public void set_ignore_case (bool ignore_case); public void set_match_mode (Gtk.StringFilterMatchMode mode); public void set_search (string? search); @@ -12145,7 +12150,7 @@ namespace Gtk { public GLib.ListModel observe_controllers (); public unowned Gtk.Widget? pick (double x, double y, Gtk.PickFlags flags); [CCode (cname = "gtk_widget_class_query_action")] - public class bool query_action (uint index_, out GLib.Type owner, out string action_name, out GLib.VariantType parameter_type, out string property_name); + public class bool query_action (uint index_, out GLib.Type owner, out string action_name, out GLib.VariantType? parameter_type, out string? property_name); public void queue_allocate (); public void queue_draw (); public void queue_resize (); @@ -13294,7 +13299,8 @@ namespace Gtk { SNAPSHOT, CONSTRAINTS, BUILDER_OBJECTS, - A11Y + A11Y, + ICONFALLBACK } [CCode (cheader_filename = "gtk/gtk.h", cprefix = "GTK_DELETE_", type_id = "gtk_delete_type_get_type ()")] public enum DeleteType { diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata index 51ba44821..a6336e3a3 100644 --- a/vapi/metadata/Gio-2.0.metadata +++ b/vapi/metadata/Gio-2.0.metadata @@ -281,7 +281,7 @@ Initable .newv skip=false type="GLib.Object" PollableInputStream .create_source type="GLib.PollableSource" - .read_nonblocking.buffer type="uint8[]" array_length_idx=1 + .read_nonblocking.buffer type="uint8[]" array_length_idx=1 out=false .read_nonblocking#virtual_method name="read_nonblocking_fn" no_wrapper PollableOutputStream .create_source type="GLib.PollableSource"