[vala/0.34] gobject-2.0: Cherry-pick some changes from 0.38



commit 17d95a4cd218f274b4544c1e81c3053944f619f7
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Mar 21 09:50:06 2018 +0100

    gobject-2.0: Cherry-pick some changes from 0.38

 vapi/gobject-2.0.vapi |   53 ++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 39 insertions(+), 14 deletions(-)
---
diff --git a/vapi/gobject-2.0.vapi b/vapi/gobject-2.0.vapi
index fc19dfe..2667170 100644
--- a/vapi/gobject-2.0.vapi
+++ b/vapi/gobject-2.0.vapi
@@ -29,6 +29,8 @@ namespace GLib {
        namespace Signal {
                public static ulong add_emission_hook (uint signal_id, GLib.Quark detail, 
GLib.SignalEmissionHook hook_func, GLib.DestroyNotify? data_destroy);
                public static void chain_from_overridden ([CCode (array_length = false)] GLib.Value[] 
instance_and_params, out GLib.Value return_value);
+               [Version (since = "2.18")]
+               public static void chain_from_overridden_handler (void* instance, ...);
                public static ulong connect (void* instance, string detailed_signal, GLib.Callback handler, 
void* data);
                public static ulong connect_after (void* instance, string detailed_signal, GLib.Callback 
handler, void* data);
                public static ulong connect_closure (void* instance, string detailed_signal, GLib.Closure 
closure, bool after);
@@ -44,6 +46,8 @@ namespace GLib {
                public static uint lookup (string name, GLib.Type itype);
                public static unowned string name (uint signal_id);
                public static void override_class_closure (uint signal_id, GLib.Type instance_type, 
GLib.Closure class_closure);
+               [Version (since = "2.18")]
+               public static void override_class_handler (string signal_name, GLib.Type instance_type, 
GLib.Callback class_handler);
                public static bool parse_name (string detailed_signal, GLib.Type itype, out uint signal_id, 
out GLib.Quark detail, bool force_detail_quark);
                public static void query (uint signal_id, out GLib.SignalQuery query);
                public static void remove_emission_hook (uint signal_id, ulong hook_id);
@@ -97,7 +101,10 @@ namespace GLib {
                public void add_invalidate_notifier (void* notify_data, GLib.ClosureNotify notify_func);
                public void add_marshal_guards (void* pre_marshal_data, GLib.ClosureNotify 
pre_marshal_notify, void* post_marshal_data, GLib.ClosureNotify post_marshal_notify);
                public void invalidate ();
-               public void invoke (out GLib.Value return_value, [CCode (array_length_pos = 1.9, 
array_length_type = "guint")] GLib.Value[] param_values, void* invocation_hint);
+               public void invoke (out GLib.Value return_value, [CCode (array_length_cname = 
"n_param_values", array_length_pos = 1.5, array_length_type = "guint")] GLib.Value[] param_values, void* 
invocation_hint);
+               [CCode (has_construct_function = false)]
+               public Closure.object (uint sizeof_closure, GLib.Object object);
+               public unowned GLib.Closure @ref ();
                public void remove_finalize_notifier (void* notify_data, GLib.ClosureNotify notify_func);
                public void remove_invalidate_notifier (void* notify_data, GLib.ClosureNotify notify_func);
                public void set_marshal (GLib.ClosureMarshal marshal);
@@ -105,6 +112,7 @@ namespace GLib {
                [CCode (has_construct_function = false)]
                public Closure.simple (uint sizeof_closure, void* data);
                public void sink ();
+               public void unref ();
        }
        [CCode (lower_case_csuffix = "enum")]
        public class EnumClass : GLib.TypeClass {
@@ -154,6 +162,7 @@ namespace GLib {
                [CCode (simple_generics = true)]
                [Version (since = "2.34")]
                public T dup_qdata<T> (GLib.Quark quark, GLib.DuplicateFunc<T> dup_func);
+               public void force_floating ();
                public void freeze_notify ();
                public void @get (string first_property_name, ...);
                [CCode (cname = "G_OBJECT_GET_CLASS")]
@@ -165,13 +174,22 @@ namespace GLib {
                public unowned T get_qdata<T> (GLib.Quark quark);
                [CCode (cname = "G_TYPE_FROM_INSTANCE")]
                public GLib.Type get_type ();
+               public static unowned GLib.ParamSpec? interface_find_property (GLib.TypeInterface g_iface, 
string property_name);
+               public static void interface_install_property (GLib.TypeInterface g_iface, GLib.ParamSpec 
pspec);
+               [CCode (array_length_pos = 1.1, array_length_type = "guint")]
+#if VALA_0_26
+               public static (unowned GLib.ParamSpec)[] interface_list_properties (GLib.TypeInterface 
g_iface);
+#else
+               public static unowned GLib.ParamSpec[] interface_list_properties (GLib.TypeInterface g_iface);
+#endif
+               public bool is_floating ();
                public static GLib.Object @new (GLib.Type type, ...);
                public static GLib.Object new_valist (GLib.Type type, string? firstprop, va_list var_args);
                public static GLib.Object newv (GLib.Type type, [CCode (array_length_pos = 1.9, 
array_length_type = "guint")] GLib.Parameter[] parameters);
                [CCode (cname = "g_object_notify")]
                public void notify_property (string property_name);
                public unowned GLib.Object @ref ();
-               public GLib.Object ref_sink ();
+               public unowned GLib.Object ref_sink ();
                [CCode (simple_generics = true)]
                [Version (since = "2.34")]
                public bool replace_data<G,T> (string key, G oldval, owned T newval, out GLib.DestroyNotify? 
old_destroy);
@@ -188,6 +206,7 @@ namespace GLib {
                [CCode (cname = "g_object_set_qdata_full", simple_generics = true)]
                public void set_qdata<T> (GLib.Quark quark, owned T data);
                public void set_qdata_full (GLib.Quark quark, void* data, GLib.DestroyNotify? destroy);
+               public void set_valist (string first_property_name, va_list var_args);
                [CCode (simple_generics = true)]
                public T steal_data<T> (string key);
                [CCode (simple_generics = true)]
@@ -222,6 +241,8 @@ namespace GLib {
                public string name;
                public GLib.Type owner_type;
                public GLib.Type value_type;
+               [NoWrapper]
+               public virtual void finalize ();
                public unowned string get_blurb ();
                [Version (since = "2.38")]
                public unowned GLib.Value? get_default_value ();
@@ -514,7 +535,7 @@ namespace GLib {
                public GLib.SignalFlags signal_flags;
                public GLib.Type return_type;
                public uint n_params;
-               [CCode (array_length = false)]
+               [CCode (array_length_cname = "n_params", array_length_type = "guint")]
                public weak GLib.Type[] param_types;
        }
        [CCode (get_value_function = "g_value_get_gtype", marshaller_type_name = "GTYPE", set_value_function 
= "g_value_set_gtype", type_id = "G_TYPE_GTYPE")]
@@ -625,10 +646,11 @@ namespace GLib {
                public Value (GLib.Type g_type);
                public void copy (ref GLib.Value dest_value);
                public void* dup_boxed ();
+               public GLib.ParamSpec dup_param ();
                public GLib.Object dup_object ();
                public string dup_string ();
                [Version (since = "2.26")]
-               public GLib.Variant dup_variant ();
+               public GLib.Variant? dup_variant ();
                public bool fits_pointer ();
                public bool get_boolean ();
                public void* get_boxed ();
@@ -644,7 +666,7 @@ namespace GLib {
                public int64 get_int64 ();
                public long get_long ();
                public unowned GLib.Object get_object ();
-               public GLib.ParamSpec get_param ();
+               public unowned GLib.ParamSpec get_param ();
                public void* get_pointer ();
                [Version (since = "2.32")]
                public int8 get_schar ();
@@ -654,7 +676,7 @@ namespace GLib {
                public uint64 get_uint64 ();
                public ulong get_ulong ();
                [Version (since = "2.26")]
-               public GLib.Variant get_variant ();
+               public GLib.Variant? get_variant ();
                [CCode (cname = "G_VALUE_HOLDS")]
                public bool holds (GLib.Type type);
                public unowned GLib.Value? init (GLib.Type g_type);
@@ -662,7 +684,7 @@ namespace GLib {
                public void init_from_instance (void* instance);
                public void param_take_ownership (out GLib.ParamSpec param);
                public void* peek_pointer ();
-               public static void register_transform_func (GLib.Type src_type, GLib.Type dest_type, 
GLib.ValueTransform transform);
+               public static void register_transform_func (GLib.Type src_type, GLib.Type dest_type, 
GLib.ValueTransform transform_func);
                public unowned GLib.Value? reset ();
                public void set_boolean (bool v_boolean);
                public void set_boxed (void* v_boxed);
@@ -678,22 +700,25 @@ namespace GLib {
                public void set_int (int v_int);
                public void set_int64 (int64 v_int64);
                public void set_long (long v_long);
-               public void set_object (GLib.Object v_object);
-               public void set_param (GLib.ParamSpec param);
+               public void set_object (GLib.Object? v_object);
+               public void set_param (GLib.ParamSpec? param);
                public void set_pointer (void* v_pointer);
                [Version (since = "2.32")]
                public void set_schar (int8 v_char);
-               public void set_static_string (string v_string);
-               public void set_string (string v_string);
+               public void set_static_string (string? v_string);
+               public void set_string (string? v_string);
                public void set_uchar (uchar v_uchar);
                public void set_uint (uint v_uint);
                public void set_uint64 (uint64 v_uint64);
                public void set_ulong (ulong v_ulong);
+               [Version (since = "2.26")]
+               public void set_variant (GLib.Variant? variant);
                [CCode (cname = "g_strdup_value_contents")]
                public string strdup_contents ();
-               public void take_object (owned GLib.Object v_object);
-               public void take_param (owned GLib.ParamSpec param);
-               public void take_string (owned string v_string);
+               public void take_boxed (owned void* v_boxed);
+               public void take_object (owned GLib.Object? v_object);
+               public void take_param (owned GLib.ParamSpec? param);
+               public void take_string (owned string? v_string);
                [Version (since = "2.26")]
                public void take_variant (owned GLib.Variant? variant);
                public bool transform (ref GLib.Value dest_value);


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