mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-25 02:18:55 +02:00
Add fundamental type and pspec for GVariant
Make G_TYPE_VARIANT a fundamental type instead of boxed, and add g_variant_{set,get,dup}_variant. Add GParamSpecVariant. Bug #610863.
This commit is contained in:
@@ -163,6 +163,17 @@ G_BEGIN_DECLS
|
||||
* Returns: %TRUE on success.
|
||||
*/
|
||||
#define G_VALUE_HOLDS_GTYPE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE))
|
||||
/**
|
||||
* G_VALUE_HOLDS_VARIANT:
|
||||
* @value: a valid #GValue structure
|
||||
*
|
||||
* Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT.
|
||||
*
|
||||
* Returns: %TRUE on success.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_VALUE_HOLDS_VARIANT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_VARIANT))
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
@@ -212,6 +223,10 @@ GType g_gtype_get_type (void);
|
||||
void g_value_set_gtype (GValue *value,
|
||||
GType v_gtype);
|
||||
GType g_value_get_gtype (const GValue *value);
|
||||
void g_value_set_variant (GValue *value,
|
||||
GVariant *variant);
|
||||
GVariant* g_value_get_variant (const GValue *value);
|
||||
GVariant* g_value_dup_variant (const GValue *value);
|
||||
|
||||
|
||||
/* Convenience for registering new pointer types */
|
||||
|
Reference in New Issue
Block a user