Top |
GValue provides an abstract container structure which can be copied, transformed and compared while holding a value of any (derived) type, which is registered as a GType with a GTypeValueTable in its GTypeInfo structure. Parameter specifications for most value types can be created as GParamSpec derived instances, to implement e.g. GObject properties which operate on GValue containers.
Parameter names need to start with a letter (a-z or A-Z). Subsequent characters can be letters, numbers or a '-'. All other characters are replaced by a '-' during construction.
See also GValue for more information.
#define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_BOOLEAN
.
#define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
Cast a GParamSpec instance into a GParamSpecBoolean.
#define G_VALUE_HOLDS_BOOLEAN(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN))
Checks whether the given GValue can hold values of type G_TYPE_BOOLEAN
.
GParamSpec * g_param_spec_boolean (const gchar *name
,const gchar *nick
,const gchar *blurb
,gboolean default_value
,GParamFlags flags
);
Creates a new GParamSpecBoolean instance specifying a G_TYPE_BOOLEAN
property. In many cases, it may be more appropriate to use an enum with
g_param_spec_enum()
, both to improve code clarity by using explicitly named
values, and to allow for more values to be added in future without breaking
API.
See g_param_spec_internal()
for details on property names.
void g_value_set_boolean (GValue *value
,gboolean v_boolean
);
Set the contents of a G_TYPE_BOOLEAN
GValue to v_boolean
.
gboolean
g_value_get_boolean (const GValue *value
);
Get the contents of a G_TYPE_BOOLEAN
GValue.
#define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_CHAR
.
#define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
Cast a GParamSpec instance into a GParamSpecChar.
#define G_VALUE_HOLDS_CHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR))
Checks whether the given GValue can hold values of type G_TYPE_CHAR
.
GParamSpec * g_param_spec_char (const gchar *name
,const gchar *nick
,const gchar *blurb
,gint8 minimum
,gint8 maximum
,gint8 default_value
,GParamFlags flags
);
Creates a new GParamSpecChar instance specifying a G_TYPE_CHAR
property.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_char (GValue *value
,gchar v_char
);
g_value_set_char
has been deprecated since version 2.32 and should not be used in newly-written code.
This function's input type is broken, see g_value_set_schar()
Set the contents of a G_TYPE_CHAR
GValue to v_char
.
gchar
g_value_get_char (const GValue *value
);
g_value_get_char
has been deprecated since version 2.32 and should not be used in newly-written code.
This function's return type is broken, see g_value_get_schar()
Do not use this function; it is broken on platforms where the char
type is unsigned, such as ARM and PowerPC. See g_value_get_schar()
.
Get the contents of a G_TYPE_CHAR
GValue.
gint8
g_value_get_schar (const GValue *value
);
Get the contents of a G_TYPE_CHAR
GValue.
Since: 2.32
void g_value_set_schar (GValue *value
,gint8 v_char
);
Set the contents of a G_TYPE_CHAR
GValue to v_char
.
Since: 2.32
#define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_UCHAR
.
#define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
Cast a GParamSpec instance into a GParamSpecUChar.
#define G_VALUE_HOLDS_UCHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR))
Checks whether the given GValue can hold values of type G_TYPE_UCHAR
.
GParamSpec * g_param_spec_uchar (const gchar *name
,const gchar *nick
,const gchar *blurb
,guint8 minimum
,guint8 maximum
,guint8 default_value
,GParamFlags flags
);
Creates a new GParamSpecUChar instance specifying a G_TYPE_UCHAR
property.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_uchar (GValue *value
,guchar v_uchar
);
Set the contents of a G_TYPE_UCHAR
GValue to v_uchar
.
guchar
g_value_get_uchar (const GValue *value
);
Get the contents of a G_TYPE_UCHAR
GValue.
#define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_INT
.
#define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
Cast a GParamSpec instance into a GParamSpecInt.
#define G_VALUE_HOLDS_INT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT))
Checks whether the given GValue can hold values of type G_TYPE_INT
.
GParamSpec * g_param_spec_int (const gchar *name
,const gchar *nick
,const gchar *blurb
,gint minimum
,gint maximum
,gint default_value
,GParamFlags flags
);
Creates a new GParamSpecInt instance specifying a G_TYPE_INT
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_int (GValue *value
,gint v_int
);
Set the contents of a G_TYPE_INT
GValue to v_int
.
gint
g_value_get_int (const GValue *value
);
Get the contents of a G_TYPE_INT
GValue.
#define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_UINT
.
#define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
Cast a GParamSpec instance into a GParamSpecUInt.
#define G_VALUE_HOLDS_UINT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT))
Checks whether the given GValue can hold values of type G_TYPE_UINT
.
GParamSpec * g_param_spec_uint (const gchar *name
,const gchar *nick
,const gchar *blurb
,guint minimum
,guint maximum
,guint default_value
,GParamFlags flags
);
Creates a new GParamSpecUInt instance specifying a G_TYPE_UINT
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_uint (GValue *value
,guint v_uint
);
Set the contents of a G_TYPE_UINT
GValue to v_uint
.
guint
g_value_get_uint (const GValue *value
);
Get the contents of a G_TYPE_UINT
GValue.
#define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_LONG
.
#define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
Cast a GParamSpec instance into a GParamSpecLong.
#define G_VALUE_HOLDS_LONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG))
Checks whether the given GValue can hold values of type G_TYPE_LONG
.
GParamSpec * g_param_spec_long (const gchar *name
,const gchar *nick
,const gchar *blurb
,glong minimum
,glong maximum
,glong default_value
,GParamFlags flags
);
Creates a new GParamSpecLong instance specifying a G_TYPE_LONG
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_long (GValue *value
,glong v_long
);
Set the contents of a G_TYPE_LONG
GValue to v_long
.
glong
g_value_get_long (const GValue *value
);
Get the contents of a G_TYPE_LONG
GValue.
#define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_ULONG
.
#define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
Cast a GParamSpec instance into a GParamSpecULong.
#define G_VALUE_HOLDS_ULONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG))
Checks whether the given GValue can hold values of type G_TYPE_ULONG
.
GParamSpec * g_param_spec_ulong (const gchar *name
,const gchar *nick
,const gchar *blurb
,gulong minimum
,gulong maximum
,gulong default_value
,GParamFlags flags
);
Creates a new GParamSpecULong instance specifying a G_TYPE_ULONG
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_ulong (GValue *value
,gulong v_ulong
);
Set the contents of a G_TYPE_ULONG
GValue to v_ulong
.
gulong
g_value_get_ulong (const GValue *value
);
Get the contents of a G_TYPE_ULONG
GValue.
#define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_INT64
.
#define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
Cast a GParamSpec instance into a GParamSpecInt64.
#define G_VALUE_HOLDS_INT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64))
Checks whether the given GValue can hold values of type G_TYPE_INT64
.
GParamSpec * g_param_spec_int64 (const gchar *name
,const gchar *nick
,const gchar *blurb
,gint64 minimum
,gint64 maximum
,gint64 default_value
,GParamFlags flags
);
Creates a new GParamSpecInt64 instance specifying a G_TYPE_INT64
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_int64 (GValue *value
,gint64 v_int64
);
Set the contents of a G_TYPE_INT64
GValue to v_int64
.
gint64
g_value_get_int64 (const GValue *value
);
Get the contents of a G_TYPE_INT64
GValue.
#define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_UINT64
.
#define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
Cast a GParamSpec instance into a GParamSpecUInt64.
#define G_VALUE_HOLDS_UINT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64))
Checks whether the given GValue can hold values of type G_TYPE_UINT64
.
GParamSpec * g_param_spec_uint64 (const gchar *name
,const gchar *nick
,const gchar *blurb
,guint64 minimum
,guint64 maximum
,guint64 default_value
,GParamFlags flags
);
Creates a new GParamSpecUInt64 instance specifying a G_TYPE_UINT64
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_uint64 (GValue *value
,guint64 v_uint64
);
Set the contents of a G_TYPE_UINT64
GValue to v_uint64
.
value |
a valid GValue of type |
|
v_uint64 |
unsigned 64bit integer value to be set |
guint64
g_value_get_uint64 (const GValue *value
);
Get the contents of a G_TYPE_UINT64
GValue.
#define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_FLOAT
.
#define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
Cast a GParamSpec instance into a GParamSpecFloat.
#define G_VALUE_HOLDS_FLOAT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT))
Checks whether the given GValue can hold values of type G_TYPE_FLOAT
.
GParamSpec * g_param_spec_float (const gchar *name
,const gchar *nick
,const gchar *blurb
,gfloat minimum
,gfloat maximum
,gfloat default_value
,GParamFlags flags
);
Creates a new GParamSpecFloat instance specifying a G_TYPE_FLOAT
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_float (GValue *value
,gfloat v_float
);
Set the contents of a G_TYPE_FLOAT
GValue to v_float
.
gfloat
g_value_get_float (const GValue *value
);
Get the contents of a G_TYPE_FLOAT
GValue.
#define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_DOUBLE
.
#define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
Cast a GParamSpec instance into a GParamSpecDouble.
#define G_VALUE_HOLDS_DOUBLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE))
Checks whether the given GValue can hold values of type G_TYPE_DOUBLE
.
GParamSpec * g_param_spec_double (const gchar *name
,const gchar *nick
,const gchar *blurb
,gdouble minimum
,gdouble maximum
,gdouble default_value
,GParamFlags flags
);
Creates a new GParamSpecDouble instance specifying a G_TYPE_DOUBLE
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
minimum |
minimum value for the property specified |
|
maximum |
maximum value for the property specified |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_double (GValue *value
,gdouble v_double
);
Set the contents of a G_TYPE_DOUBLE
GValue to v_double
.
gdouble
g_value_get_double (const GValue *value
);
Get the contents of a G_TYPE_DOUBLE
GValue.
#define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_ENUM
.
#define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
Cast a GParamSpec instance into a GParamSpecEnum.
#define G_VALUE_HOLDS_ENUM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM))
Checks whether the given GValue can hold values derived from type G_TYPE_ENUM
.
GParamSpec * g_param_spec_enum (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType enum_type
,gint default_value
,GParamFlags flags
);
Creates a new GParamSpecEnum instance specifying a G_TYPE_ENUM
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
enum_type |
a GType derived from |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_enum (GValue *value
,gint v_enum
);
Set the contents of a G_TYPE_ENUM
GValue to v_enum
.
gint
g_value_get_enum (const GValue *value
);
Get the contents of a G_TYPE_ENUM
GValue.
#define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_FLAGS
.
#define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
Cast a GParamSpec instance into a GParamSpecFlags.
#define G_VALUE_HOLDS_FLAGS(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS))
Checks whether the given GValue can hold values derived from type G_TYPE_FLAGS
.
GParamSpec * g_param_spec_flags (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType flags_type
,guint default_value
,GParamFlags flags
);
Creates a new GParamSpecFlags instance specifying a G_TYPE_FLAGS
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
flags_type |
a GType derived from |
|
default_value |
default value for the property specified |
|
flags |
flags for the property specified |
void g_value_set_flags (GValue *value
,guint v_flags
);
Set the contents of a G_TYPE_FLAGS
GValue to v_flags
.
value |
a valid GValue whose type is derived from |
|
v_flags |
flags value to be set |
guint
g_value_get_flags (const GValue *value
);
Get the contents of a G_TYPE_FLAGS
GValue.
#define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_STRING
.
#define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
Casts a GParamSpec instance into a GParamSpecString.
#define G_VALUE_HOLDS_STRING(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING))
Checks whether the given GValue can hold values of type G_TYPE_STRING
.
#define G_VALUE_IS_INTERNED_STRING(value) (G_VALUE_HOLDS_STRING (value) && ((value)->data[1].v_uint & G_VALUE_INTERNED_STRING)) GLIB_AVAILABLE_MACRO_IN_2_66
Checks whether value
contains a string which is canonical.
TRUE
if the value contains a string in its canonical
representation, as returned by g_intern_string()
. See also
g_value_set_interned_string()
.
Since: 2.66
GParamSpec * g_param_spec_string (const gchar *name
,const gchar *nick
,const gchar *blurb
,const gchar *default_value
,GParamFlags flags
);
Creates a new GParamSpecString instance.
See g_param_spec_internal()
for details on property names.
void g_value_set_string (GValue *value
,const gchar *v_string
);
Set the contents of a G_TYPE_STRING
GValue to a copy of v_string
.
value |
a valid GValue of type |
|
v_string |
caller-owned string to be duplicated for the GValue. |
[nullable] |
void g_value_set_static_string (GValue *value
,const gchar *v_string
);
Set the contents of a G_TYPE_STRING
GValue to v_string
.
The string is assumed to be static, and is thus not duplicated
when setting the GValue.
If the the string is a canonical string, using g_value_set_interned_string()
is more appropriate.
void g_value_take_string (GValue *value
,gchar *v_string
);
Sets the contents of a G_TYPE_STRING
GValue to v_string
.
value |
a valid GValue of type |
|
v_string |
string to take ownership of. |
[nullable] |
Since: 2.4
void g_value_set_string_take_ownership (GValue *value
,gchar *v_string
);
g_value_set_string_take_ownership
has been deprecated since version 2.4 and should not be used in newly-written code.
Use g_value_take_string()
instead.
This is an internal function introduced mainly for C marshallers.
value |
a valid GValue of type |
|
v_string |
duplicated unowned string to be set. |
[nullable] |
const gchar *
g_value_get_string (const GValue *value
);
Get the contents of a G_TYPE_STRING
GValue.
gchar *
g_value_dup_string (const GValue *value
);
Get a copy the contents of a G_TYPE_STRING
GValue.
void g_value_set_interned_string (GValue *value
,const gchar *v_string
);
Set the contents of a G_TYPE_STRING
GValue to v_string
. The string is
assumed to be static and interned (canonical, for example from
g_intern_string()
), and is thus not duplicated when setting the GValue.
Since: 2.66
#define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_PARAM
.
#define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
Casts a GParamSpec instance into a GParamSpecParam.
#define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))
Checks whether the given GValue can hold values derived from type G_TYPE_PARAM
.
GParamSpec * g_param_spec_param (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType param_type
,GParamFlags flags
);
Creates a new GParamSpecParam instance specifying a G_TYPE_PARAM
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
param_type |
a GType derived from |
|
flags |
flags for the property specified |
void g_value_set_param (GValue *value
,GParamSpec *param
);
Set the contents of a G_TYPE_PARAM
GValue to param
.
void g_value_take_param (GValue *value
,GParamSpec *param
);
Sets the contents of a G_TYPE_PARAM
GValue to param
and takes
over the ownership of the caller’s reference to param
; the caller
doesn’t have to unref it any more.
[skip]
Since: 2.4
void g_value_set_param_take_ownership (GValue *value
,GParamSpec *param
);
g_value_set_param_take_ownership
has been deprecated since version 2.4 and should not be used in newly-written code.
Use g_value_take_param()
instead.
This is an internal function introduced mainly for C marshallers.
[skip]
GParamSpec *
g_value_get_param (const GValue *value
);
Get the contents of a G_TYPE_PARAM
GValue.
GParamSpec *
g_value_dup_param (const GValue *value
);
Get the contents of a G_TYPE_PARAM
GValue, increasing its
reference count.
[skip]
#define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_BOXED
.
#define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
Cast a GParamSpec instance into a GParamSpecBoxed.
#define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
Checks whether the given GValue can hold values derived
from type G_TYPE_BOXED
.
GParamSpec * g_param_spec_boxed (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType boxed_type
,GParamFlags flags
);
Creates a new GParamSpecBoxed instance specifying a G_TYPE_BOXED
derived property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
boxed_type |
|
|
flags |
flags for the property specified |
void g_value_set_boxed (GValue *value
,gconstpointer v_boxed
);
Set the contents of a G_TYPE_BOXED
derived GValue to v_boxed
.
value |
a valid GValue of |
|
v_boxed |
boxed value to be set. |
[nullable] |
void g_value_set_static_boxed (GValue *value
,gconstpointer v_boxed
);
Set the contents of a G_TYPE_BOXED
derived GValue to v_boxed
.
The boxed value is assumed to be static, and is thus not duplicated when setting the GValue.
value |
a valid GValue of |
|
v_boxed |
static boxed value to be set. |
[nullable] |
void g_value_take_boxed (GValue *value
,gconstpointer v_boxed
);
Sets the contents of a G_TYPE_BOXED
derived GValue to v_boxed
and takes over the ownership of the caller’s reference to v_boxed
;
the caller doesn’t have to unref it any more.
value |
a valid GValue of |
|
v_boxed |
duplicated unowned boxed value to be set. |
[nullable] |
Since: 2.4
void g_value_set_boxed_take_ownership (GValue *value
,gconstpointer v_boxed
);
g_value_set_boxed_take_ownership
has been deprecated since version 2.4 and should not be used in newly-written code.
Use g_value_take_boxed()
instead.
This is an internal function introduced mainly for C marshallers.
value |
a valid GValue of |
|
v_boxed |
duplicated unowned boxed value to be set. |
[nullable] |
gpointer
g_value_get_boxed (const GValue *value
);
Get the contents of a G_TYPE_BOXED
derived GValue.
gpointer
g_value_dup_boxed (const GValue *value
);
Get the contents of a G_TYPE_BOXED
derived GValue. Upon getting,
the boxed value is duplicated and needs to be later freed with
g_boxed_free()
, e.g. like: g_boxed_free (G_VALUE_TYPE (value
),
return_value);
[skip]
#define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_POINTER
.
#define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
Casts a GParamSpec instance into a GParamSpecPointer.
#define G_VALUE_HOLDS_POINTER(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER))
Checks whether the given GValue can hold values of type G_TYPE_POINTER
.
GParamSpec * g_param_spec_pointer (const gchar *name
,const gchar *nick
,const gchar *blurb
,GParamFlags flags
);
Creates a new GParamSpecPointer instance specifying a pointer property.
Where possible, it is better to use g_param_spec_object()
or
g_param_spec_boxed()
to expose memory management information.
See g_param_spec_internal()
for details on property names.
void g_value_set_pointer (GValue *value
,gpointer v_pointer
);
Set the contents of a pointer GValue to v_pointer
.
gpointer
g_value_get_pointer (const GValue *value
);
Get the contents of a pointer GValue.
#define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_OBJECT
.
#define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
Casts a GParamSpec instance into a GParamSpecObject.
#define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT))
Checks whether the given GValue can hold values derived from type G_TYPE_OBJECT
.
GParamSpec * g_param_spec_object (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType object_type
,GParamFlags flags
);
Creates a new GParamSpecBoxed instance specifying a G_TYPE_OBJECT
derived property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
object_type |
|
|
flags |
flags for the property specified |
void g_value_set_object (GValue *value
,gpointer v_object
);
Set the contents of a G_TYPE_OBJECT
derived GValue to v_object
.
g_value_set_object() increases the reference count of v_object
(the GValue holds a reference to v_object
). If you do not wish
to increase the reference count of the object (i.e. you wish to
pass your current reference to the GValue because you no longer
need it), use g_value_take_object()
instead.
It is important that your GValue holds a reference to v_object
(either its
own, or one it has taken) to ensure that the object won't be destroyed while
the GValue still exists).
value |
a valid GValue of |
|
v_object |
object value to be set. |
[type GObject.Object][nullable] |
void g_value_take_object (GValue *value
,gpointer v_object
);
Sets the contents of a G_TYPE_OBJECT
derived GValue to v_object
and takes over the ownership of the caller’s reference to v_object
;
the caller doesn’t have to unref it any more (i.e. the reference
count of the object is not increased).
If you want the GValue to hold its own reference to v_object
, use
g_value_set_object()
instead.
[skip]
value |
a valid GValue of |
|
v_object |
object value to be set. |
[nullable] |
Since: 2.4
void g_value_set_object_take_ownership (GValue *value
,gpointer v_object
);
g_value_set_object_take_ownership
has been deprecated since version 2.4 and should not be used in newly-written code.
Use g_value_take_object()
instead.
This is an internal function introduced mainly for C marshallers.
[skip]
value |
a valid GValue of |
|
v_object |
object value to be set. |
[nullable] |
gpointer
g_value_get_object (const GValue *value
);
Get the contents of a G_TYPE_OBJECT
derived GValue.
gpointer
g_value_dup_object (const GValue *value
);
Get the contents of a G_TYPE_OBJECT
derived GValue, increasing
its reference count. If the contents of the GValue are NULL
, then
NULL
will be returned.
#define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_UNICHAR
.
#define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
Cast a GParamSpec instance into a GParamSpecUnichar.
GParamSpec * g_param_spec_unichar (const gchar *name
,const gchar *nick
,const gchar *blurb
,gunichar default_value
,GParamFlags flags
);
Creates a new GParamSpecUnichar instance specifying a G_TYPE_UINT
property. GValue structures for this property can be accessed with
g_value_set_uint()
and g_value_get_uint()
.
See g_param_spec_internal()
for details on property names.
#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY)) GLIB_DEPRECATED_MACRO_IN_2_32
G_IS_PARAM_SPEC_VALUE_ARRAY
has been deprecated since version 2.32 and should not be used in newly-written code.
Use GArray instead of GValueArray
Checks whether the given GParamSpec is of type G_TYPE_PARAM_VALUE_ARRAY
.
#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray)) GLIB_DEPRECATED_MACRO_IN_2_32
G_PARAM_SPEC_VALUE_ARRAY
has been deprecated since version 2.32 and should not be used in newly-written code.
Use GArray instead of GValueArray
Cast a GParamSpec instance into a GParamSpecValueArray.
GParamSpec * g_param_spec_value_array (const gchar *name
,const gchar *nick
,const gchar *blurb
,GParamSpec *element_spec
,GParamFlags flags
);
Creates a new GParamSpecValueArray instance specifying a
G_TYPE_VALUE_ARRAY
property. G_TYPE_VALUE_ARRAY
is a
G_TYPE_BOXED
type, as such, GValue structures for this property
can be accessed with g_value_set_boxed()
and g_value_get_boxed()
.
See g_param_spec_internal()
for details on property names.
[skip]
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
element_spec |
a GParamSpec describing the elements contained in
arrays of this property, may be |
|
flags |
flags for the property specified |
#define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_OVERRIDE
.
Since: 2.4
#define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
Casts a GParamSpec into a GParamSpecOverride.
Since: 2.4
GParamSpec * g_param_spec_override (const gchar *name
,GParamSpec *overridden
);
Creates a new property of type GParamSpecOverride. This is used to direct operations to another paramspec, and will not be directly useful unless you are implementing a new base type similar to GObject.
[skip]
Since: 2.4
#define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_GTYPE
.
Since: 2.10
#define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
Casts a GParamSpec into a GParamSpecGType.
Since: 2.10
#define G_VALUE_HOLDS_GTYPE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE))
Checks whether the given GValue can hold values of type G_TYPE_GTYPE
.
Since: 2.12
GParamSpec * g_param_spec_gtype (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType is_a_type
,GParamFlags flags
);
Creates a new GParamSpecGType instance specifying a
G_TYPE_GTYPE
property.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
is_a_type |
a GType whose subtypes are allowed as values
of the property (use |
|
flags |
flags for the property specified |
Since: 2.10
GType
g_value_get_gtype (const GValue *value
);
Get the contents of a G_TYPE_GTYPE
GValue.
Since: 2.12
void g_value_set_gtype (GValue *value
,GType v_gtype
);
Set the contents of a G_TYPE_GTYPE
GValue to v_gtype
.
Since: 2.12
#define G_IS_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT))
Checks whether the given GParamSpec is of type G_TYPE_PARAM_VARIANT
.
Since: 2.26
#define G_PARAM_SPEC_VARIANT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant))
Casts a GParamSpec into a GParamSpecVariant.
Since: 2.26
#define G_VALUE_HOLDS_VARIANT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_VARIANT))
Checks whether the given GValue can hold values of type G_TYPE_VARIANT
.
Since: 2.26
GParamSpec * g_param_spec_variant (const gchar *name
,const gchar *nick
,const gchar *blurb
,const GVariantType *type
,GVariant *default_value
,GParamFlags flags
);
Creates a new GParamSpecVariant instance specifying a GVariant property.
If default_value
is floating, it is consumed.
See g_param_spec_internal()
for details on property names.
name |
canonical name of the property specified |
|
nick |
nick name for the property specified. |
[nullable] |
blurb |
description of the property specified. |
[nullable] |
type |
a GVariantType |
|
default_value |
a GVariant of type |
[nullable][transfer full] |
flags |
flags for the property specified |
Since: 2.26
GVariant *
g_value_get_variant (const GValue *value
);
Get the contents of a variant GValue.
Since: 2.26
GVariant *
g_value_dup_variant (const GValue *value
);
Get the contents of a variant GValue, increasing its refcount. The returned GVariant is never floating.
variant contents of value
(may be NULL
);
should be unreffed using g_variant_unref()
when no longer needed.
[transfer full][nullable]
Since: 2.26
void g_value_set_variant (GValue *value
,GVariant *variant
);
Set the contents of a variant GValue to variant
.
If the variant is floating, it is consumed.
Since: 2.26
void g_value_take_variant (GValue *value
,GVariant *variant
);
Set the contents of a variant GValue to variant
, and takes over
the ownership of the caller's reference to variant
;
the caller doesn't have to unref it any more (i.e. the reference
count of the variant is not increased).
If variant
was floating then its floating reference is converted to
a hard reference.
If you want the GValue to hold its own reference to variant
, use
g_value_set_variant()
instead.
This is an internal function introduced mainly for C marshallers.
value |
a valid GValue of type |
|
variant |
a GVariant, or |
[nullable][transfer full] |
Since: 2.26
#define G_TYPE_PARAM_BOOLEAN (g_param_spec_types[2])
The GType of GParamSpecBoolean.
struct GParamSpecBoolean { GParamSpec parent_instance; gboolean default_value; };
A GParamSpec derived structure that contains the meta data for boolean properties.
struct GParamSpecChar { GParamSpec parent_instance; gint8 minimum; gint8 maximum; gint8 default_value; };
A GParamSpec derived structure that contains the meta data for character properties.
struct GParamSpecUChar { GParamSpec parent_instance; guint8 minimum; guint8 maximum; guint8 default_value; };
A GParamSpec derived structure that contains the meta data for unsigned character properties.
struct GParamSpecInt { GParamSpec parent_instance; gint minimum; gint maximum; gint default_value; };
A GParamSpec derived structure that contains the meta data for integer properties.
struct GParamSpecUInt { GParamSpec parent_instance; guint minimum; guint maximum; guint default_value; };
A GParamSpec derived structure that contains the meta data for unsigned integer properties.
struct GParamSpecLong { GParamSpec parent_instance; glong minimum; glong maximum; glong default_value; };
A GParamSpec derived structure that contains the meta data for long integer properties.
struct GParamSpecULong { GParamSpec parent_instance; gulong minimum; gulong maximum; gulong default_value; };
A GParamSpec derived structure that contains the meta data for unsigned long integer properties.
struct GParamSpecInt64 { GParamSpec parent_instance; gint64 minimum; gint64 maximum; gint64 default_value; };
A GParamSpec derived structure that contains the meta data for 64bit integer properties.
#define G_TYPE_PARAM_UINT64 (g_param_spec_types[8])
The GType of GParamSpecUInt64.
struct GParamSpecUInt64 { GParamSpec parent_instance; guint64 minimum; guint64 maximum; guint64 default_value; };
A GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.
#define G_TYPE_PARAM_FLOAT (g_param_spec_types[12])
The GType of GParamSpecFloat.
struct GParamSpecFloat { GParamSpec parent_instance; gfloat minimum; gfloat maximum; gfloat default_value; gfloat epsilon; };
A GParamSpec derived structure that contains the meta data for float properties.
minimum value for the property specified |
||
maximum value for the property specified |
||
default value for the property specified |
||
values closer than |
#define G_TYPE_PARAM_DOUBLE (g_param_spec_types[13])
The GType of GParamSpecDouble.
struct GParamSpecDouble { GParamSpec parent_instance; gdouble minimum; gdouble maximum; gdouble default_value; gdouble epsilon; };
A GParamSpec derived structure that contains the meta data for double properties.
minimum value for the property specified |
||
maximum value for the property specified |
||
default value for the property specified |
||
values closer than |
struct GParamSpecEnum { GParamSpec parent_instance; GEnumClass *enum_class; gint default_value; };
A GParamSpec derived structure that contains the meta data for enum properties.
GEnumClass * |
the GEnumClass for the enum |
|
default value for the property specified |
#define G_TYPE_PARAM_FLAGS (g_param_spec_types[11])
The GType of GParamSpecFlags.
struct GParamSpecFlags { GParamSpec parent_instance; GFlagsClass *flags_class; guint default_value; };
A GParamSpec derived structure that contains the meta data for flags properties.
GFlagsClass * |
the GFlagsClass for the flags |
|
default value for the property specified |
#define G_TYPE_PARAM_STRING (g_param_spec_types[14])
The GType of GParamSpecString.
#define G_VALUE_INTERNED_STRING (1 << 28) GLIB_AVAILABLE_MACRO_IN_2_66
For string values, indicates that the string contained is canonical and will
exist for the duration of the process. See g_value_set_interned_string()
.
Since: 2.66
struct GParamSpecString { GParamSpec parent_instance; gchar *default_value; gchar *cset_first; gchar *cset_nth; gchar substitutor; guint null_fold_if_empty : 1; guint ensure_non_null : 1; };
A GParamSpec derived structure that contains the meta data for string properties.
default value for the property specified |
||
a string containing the allowed values for the first byte |
||
a string containing the allowed values for the subsequent bytes |
||
the replacement byte for bytes which don't match |
||
replace empty string by |
||
replace |
#define G_TYPE_PARAM_PARAM (g_param_spec_types[15])
The GType of GParamSpecParam.
struct GParamSpecParam { GParamSpec parent_instance; };
A GParamSpec derived structure that contains the meta data for G_TYPE_PARAM
properties.
#define G_TYPE_PARAM_BOXED (g_param_spec_types[16])
The GType of GParamSpecBoxed.
struct GParamSpecBoxed { GParamSpec parent_instance; };
A GParamSpec derived structure that contains the meta data for boxed properties.
#define G_TYPE_PARAM_POINTER (g_param_spec_types[17])
The GType of GParamSpecPointer.
struct GParamSpecPointer { GParamSpec parent_instance; };
A GParamSpec derived structure that contains the meta data for pointer properties.
#define G_TYPE_PARAM_OBJECT (g_param_spec_types[19])
The GType of GParamSpecObject.
struct GParamSpecObject { GParamSpec parent_instance; };
A GParamSpec derived structure that contains the meta data for object properties.
#define G_TYPE_PARAM_UNICHAR (g_param_spec_types[9])
The GType of GParamSpecUnichar.
struct GParamSpecUnichar { GParamSpec parent_instance; gunichar default_value; };
A GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.
#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18]) GLIB_DEPRECATED_MACRO_IN_2_32
G_TYPE_PARAM_VALUE_ARRAY
has been deprecated since version 2.32 and should not be used in newly-written code.
Use GArray instead of GValueArray
The GType of GParamSpecValueArray.
struct GParamSpecValueArray { GParamSpec parent_instance; GParamSpec *element_spec; guint fixed_n_elements; };
A GParamSpec derived structure that contains the meta data for GValueArray properties.
GParamSpec * |
a GParamSpec describing the elements contained in arrays of this property, may be |
|
if greater than 0, arrays of this property will always have this many elements |
#define G_TYPE_PARAM_OVERRIDE (g_param_spec_types[20])
The GType of GParamSpecOverride.
Since: 2.4
struct GParamSpecOverride { };
A GParamSpec derived structure that redirects operations to other types of GParamSpec.
All operations other than getting or setting the value are redirected, including accessing the nick and blurb, validating a value, and so forth.
See g_param_spec_get_redirect_target()
for retrieving the overridden
property. GParamSpecOverride is used in implementing
g_object_class_override_property()
, and will not be directly useful
unless you are implementing a new base type similar to GObject.
Since: 2.4
#define G_TYPE_PARAM_GTYPE (g_param_spec_types[21])
The GType of GParamSpecGType.
Since: 2.10
struct GParamSpecGType { GParamSpec parent_instance; GType is_a_type; };
A GParamSpec derived structure that contains the meta data for GType properties.
Since: 2.10
#define G_TYPE_PARAM_VARIANT (g_param_spec_types[22])
The GType of GParamSpecVariant.
Since: 2.26
struct GParamSpecVariant { GParamSpec parent_instance; GVariantType *type; GVariant *default_value; };
A GParamSpec derived structure that contains the meta data for GVariant properties.
When comparing values with g_param_values_cmp()
, scalar values with the same
type will be compared with g_variant_compare()
. Other non-NULL
variants will
be checked for equality with g_variant_equal()
, and their sort order is
otherwise undefined. NULL
is ordered before non-NULL
variants. Two NULL
values compare equal.
Since: 2.26