[vala/staging: 1/2] gobject-2.0: Pick up some fixes and additions from GIR
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 1/2] gobject-2.0: Pick up some fixes and additions from GIR
- Date: Wed, 21 Mar 2018 11:57:40 +0000 (UTC)
commit e636e938ce187420173cc84af00910054a9fc6c4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Mar 21 09:50:06 2018 +0100
gobject-2.0: Pick up some fixes and additions from GIR
vapi/gobject-2.0.vapi | 67 +++++++++++++++++++++++++++++++++----------------
1 files changed, 45 insertions(+), 22 deletions(-)
---
diff --git a/vapi/gobject-2.0.vapi b/vapi/gobject-2.0.vapi
index f687555..2394741 100644
--- a/vapi/gobject-2.0.vapi
+++ b/vapi/gobject-2.0.vapi
@@ -27,8 +27,10 @@
[CCode (cheader_filename = "glib.h", cprefix = "G", gir_namespace = "GObject", gir_version = "2.0",
lower_case_cprefix = "g_")]
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 ulong add_emission_hook (uint signal_id, GLib.Quark detail, owned
GLib.SignalEmissionHook hook_func);
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 {
@@ -143,6 +151,7 @@ namespace GLib {
[Version (since = "2.26")]
public unowned GLib.Binding bind_property (string source_property, GLib.Object target, string
target_property, GLib.BindingFlags flags = GLib.BindingFlags.DEFAULT, [CCode (type = "GClosure*")] owned
GLib.BindingTransformFunc? transform_to = null, [CCode (type = "GClosure*")] owned GLib.BindingTransformFunc?
transform_from = null);
public unowned GLib.Object connect (string signal_spec, ...);
+ [NoWrapper]
public virtual void constructed ();
[CCode (cname = "g_signal_handler_disconnect")]
public void disconnect (ulong handler_id);
@@ -154,6 +163,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")]
@@ -167,6 +177,11 @@ namespace GLib {
public GLib.Type get_type ();
[Version (since = "2.54")]
public void getv ([CCode (array_length_cname = "n_properties", array_length_pos = 0.5,
array_length_type = "guint")] string[] names, [CCode (array_length_cname = "n_properties", array_length_pos =
0.5, array_length_type = "guint")] GLib.Value[] values);
+ 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")]
+ public static (unowned GLib.ParamSpec)[] interface_list_properties (GLib.TypeInterface
g_iface);
+ 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);
[Version (deprecated = true, deprecated_since = "2.54")]
@@ -177,7 +192,7 @@ namespace GLib {
[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);
@@ -194,6 +209,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);
[Version (since = "2.54")]
public void setv ([CCode (array_length_cname = "n_properties", array_length_pos = 0.5,
array_length_type = "guint")] string[] names, [CCode (array_length_cname = "n_properties", array_length_pos =
0.5, array_length_type = "guint")] GLib.Value[] values);
[CCode (simple_generics = true)]
@@ -205,7 +221,8 @@ namespace GLib {
public void watch_closure (GLib.Closure closure);
public void weak_ref (GLib.WeakNotify notify);
public void weak_unref (GLib.WeakNotify notify);
- public signal void notify (GLib.ParamSpec pspec);
+ [HasEmitter]
+ public virtual signal void notify (GLib.ParamSpec pspec);
}
[CCode (lower_case_csuffix = "object_class")]
public class ObjectClass : GLib.TypeClass {
@@ -230,6 +247,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 ();
@@ -252,12 +271,12 @@ namespace GLib {
public void unref ();
[CCode (cname = "g_param_value_convert")]
public bool value_convert (GLib.Value src_value, GLib.Value dest_value, bool
strict_validation);
- [CCode (cname = "g_param_value_defaults")]
- public bool value_defaults (GLib.Value value);
- [CCode (cname = "g_param_value_validate")]
- public bool value_validate (GLib.Value value);
- [CCode (cname = "g_param_values_cmp")]
- public int values_cmp (GLib.Value value1, GLib.Value value2);
+ [CCode (cname = "g_param_value_defaults", vfunc_name = "value_defaults")]
+ public virtual bool value_defaults (GLib.Value value);
+ [CCode (cname = "g_param_value_validate", vfunc_name = "value_validate")]
+ public virtual bool value_validate (GLib.Value value);
+ [CCode (cname = "g_param_values_cmp", vfunc_name = "values_cmp")]
+ public virtual int values_cmp (GLib.Value value1, GLib.Value value2);
}
[CCode (type_id = "G_TYPE_PARAM_BOOLEAN")]
public class ParamSpecBoolean : GLib.ParamSpec {
@@ -523,7 +542,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")]
@@ -640,10 +659,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 ();
@@ -659,7 +679,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 ();
@@ -669,7 +689,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);
@@ -677,7 +697,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);
@@ -693,22 +713,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]