From 059f76c85f4324f86bd937a24273ee854fe59495 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 8 Apr 2023 15:50:53 +0200 Subject: [PATCH] gio-2.0: Add type-parameter to ListModel and ListStore --- vapi/gio-2.0.vapi | 24 ++++++++++++------------ vapi/metadata/Gio-2.0.metadata | 14 +++++++------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/vapi/gio-2.0.vapi b/vapi/gio-2.0.vapi index 7b95a6027..974a75a26 100644 --- a/vapi/gio-2.0.vapi +++ b/vapi/gio-2.0.vapi @@ -1791,30 +1791,30 @@ namespace GLib { public virtual async ssize_t skip_async (size_t count, int io_priority = GLib.Priority.DEFAULT, GLib.Cancellable? cancellable = null) throws GLib.IOError; } [CCode (cheader_filename = "gio/gio.h", type_id = "g_list_store_get_type ()")] - public sealed class ListStore : GLib.Object, GLib.ListModel { + public sealed class ListStore : GLib.Object, GLib.ListModel { [CCode (has_construct_function = false)] [Version (since = "2.44")] public ListStore (GLib.Type item_type); [Version (since = "2.44")] - public void append (GLib.Object item); + public void append ([CCode (type = "gpointer")] G item); [Version (since = "2.64")] - public bool find (GLib.Object item, out uint position); + public bool find ([CCode (type = "gpointer")] G item, out uint position); [Version (since = "2.64")] - public bool find_with_equal_func (GLib.Object? item, GLib.EqualFunc equal_func, out uint position); + public bool find_with_equal_func ([CCode (type = "gpointer")] G item, GLib.EqualFunc equal_func, out uint position); [Version (since = "2.74")] - public bool find_with_equal_func_full (GLib.Object? item, [CCode (delegate_target_pos = 2.5)] GLib.EqualFuncFull equal_func, out uint position); + public bool find_with_equal_func_full ([CCode (type = "gpointer")] G item, [CCode (delegate_target_pos = 2.5)] GLib.EqualFuncFull equal_func, out uint position); [Version (since = "2.44")] - public void insert (uint position, GLib.Object item); + public void insert (uint position, [CCode (type = "gpointer")] G item); [Version (since = "2.44")] - public uint insert_sorted (GLib.Object item, GLib.CompareDataFunc compare_func); + public uint insert_sorted ([CCode (type = "gpointer")] G item, GLib.CompareDataFunc compare_func); [Version (since = "2.44")] public void remove (uint position); [Version (since = "2.44")] public void remove_all (); [Version (since = "2.46")] - public void sort (GLib.CompareDataFunc compare_func); + public void sort (GLib.CompareDataFunc compare_func); [Version (since = "2.44")] - public void splice (uint position, uint n_removals, [CCode (array_length_cname = "n_additions", array_length_pos = 3.1, array_length_type = "guint")] GLib.Object[] additions); + public void splice (uint position, uint n_removals, [CCode (array_length_cname = "n_additions", array_length_pos = 3.1, array_length_type = "guint")] G[] additions); [NoAccessorMethod] [Version (since = "2.44")] public GLib.Type item_type { get; construct; } @@ -3990,15 +3990,15 @@ namespace GLib { public static GLib.Object newv (GLib.Type object_type, [CCode (array_length_cname = "n_parameters", array_length_pos = 1.5, array_length_type = "guint")] GLib.Parameter[] parameters, GLib.Cancellable? cancellable = null) throws GLib.Error; } [CCode (cheader_filename = "gio/gio.h", type_cname = "GListModelInterface", type_id = "g_list_model_get_type ()")] - public interface ListModel : GLib.Object { + public interface ListModel : GLib.Object { [Version (since = "2.44")] - public abstract GLib.Object? get_item (uint position); + public abstract G? get_item (uint position); [Version (since = "2.44")] public abstract GLib.Type get_item_type (); [Version (since = "2.44")] public abstract uint get_n_items (); [Version (since = "2.44")] - public GLib.Object? get_object (uint position); + public G? get_object (uint position); [HasEmitter] [Version (since = "2.44")] public signal void items_changed (uint position, uint removed, uint added); diff --git a/vapi/metadata/Gio-2.0.metadata b/vapi/metadata/Gio-2.0.metadata index 270ad6f05..5c255d204 100644 --- a/vapi/metadata/Gio-2.0.metadata +++ b/vapi/metadata/Gio-2.0.metadata @@ -161,14 +161,14 @@ InputStream .read_finish throws="GLib.IOError" .skip throws="GLib.IOError" .skip_finish throws="GLib.IOError" -ListModel +ListModel type_parameters="G" .get_item#virtual_method skip - .get_item#method skip=false abstract type="GLib.Object?" -ListStore - .find_with_equal_func.equal_func type_arguments="GLib.Object" - .find_with_equal_func_full.equal_func type_arguments="GLib.Object" - .insert_sorted.compare_func type_arguments="GLib.Object" - .sort.compare_func type_arguments="GLib.Object" + .get_item#method skip=false abstract type="G?" + .get_object type="G?" +ListStore type_parameters="G" implements="GLib.ListModel" + .*.item type="G" + .*.*_func type_arguments="G" + .splice.additions type="G[]" MemoryInputStream .add_data.destroy default=GLib.g_free MemoryInputStream -- 2.47.2