gobject: Add g_object_new_with_properties

g_object_new_with_properties is an alternative to g_object_newv.
The last one, takes an array of GParameter. However, GParameter
is a rarely used type and this type is not introspectible, so
it will not work properly in bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=709865
This commit is contained in:
Fabian Orccon
2017-01-26 19:29:44 -05:00
committed by Philip Withnall
parent 19e81dedc9
commit 26b211ef89
2 changed files with 80 additions and 0 deletions

View File

@@ -420,6 +420,11 @@ GLIB_AVAILABLE_IN_ALL
gpointer g_object_new (GType object_type,
const gchar *first_property_name,
...);
GLIB_AVAILABLE_IN_2_52
GObject* g_object_new_with_properties (GType object_type,
guint n_properties,
const char *names[],
const GValue values[]);
GLIB_AVAILABLE_IN_ALL
gpointer g_object_newv (GType object_type,
guint n_parameters,