gtype: Add g_type_interface_instantiatable_prerequisite()

This function returns the most specific instantiatable type
that is a prerequisite for a given interface.

This type is necessary in particular when dealing with GValues
because a GValue contains an instance of a type.

This commit includes tests for the new API.
This commit is contained in:
Benjamin Otte
2019-11-25 19:40:39 +01:00
committed by Philip Withnall
parent e1b5afb7c0
commit 98f0a5a7da
4 changed files with 115 additions and 0 deletions

View File

@@ -1300,6 +1300,9 @@ void g_type_interface_add_prerequisite (GType interface_type,
GLIB_AVAILABLE_IN_ALL
GType*g_type_interface_prerequisites (GType interface_type,
guint *n_prerequisites);
GLIB_AVAILABLE_IN_2_68
GType g_type_interface_instantiatable_prerequisite
(GType interface_type);
GLIB_DEPRECATED_IN_2_58
void g_type_class_add_private (gpointer g_class,
gsize private_size);