<link rel="up" href="glib-data-types.html" title="GLib Data Types">
<link rel="prev" href="glib-GVariantType.html" title="GVariantType">
<link rel="next" href="gvariant-format-strings.html" title="GVariant Format Strings">
-<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
</td>
</tr>
<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name">
+<a class="link" href="glib-GVariant.html#G-VARIANT-BUILDER-INIT:CAPS" title="G_VARIANT_BUILDER_INIT()">G_VARIANT_BUILDER_INIT</a><span class="c_punctuation">()</span>
+</td>
+</tr>
+<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
</td>
</tr>
<tr>
-<td class="define_keyword">#define</td>
-<td class="function_name"><a class="link" href="glib-GVariant.html#G-VARIANT-PARSE-ERROR:CAPS" title="G_VARIANT_PARSE_ERROR">G_VARIANT_PARSE_ERROR</a></td>
-</tr>
-<tr>
<td class="function_type">
<a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="returnvalue">GVariant</span></a> *
</td>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="glib-GVariant.html#GVariantParseError" title="enum GVariantParseError">GVariantParseError</a></td>
</tr>
+<tr>
+<td class="define_keyword">#define</td>
+<td class="function_name"><a class="link" href="glib-GVariant.html#G-VARIANT-PARSE-ERROR:CAPS" title="G_VARIANT_PARSE_ERROR">G_VARIANT_PARSE_ERROR</a></td>
+</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="glib-GVariant.description"></a><h2>Description</h2>
-<p><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> is a variant datatype; it stores a value along with
-information about the type of that value. The range of possible
-values is determined by the type. The type system used by <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>
-is <a class="link" href="glib-GVariantType.html#GVariantType" title="GVariantType"><span class="type">GVariantType</span></a>.</p>
+<p><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> is a variant datatype; it can contain one or more values
+along with information about the type of the values.</p>
+<p>A <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> may contain simple types, like an integer, or a boolean value;
+or complex types, like an array of two strings, or a dictionary of key
+value pairs. A <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> is also immutable: once it's been created neither
+its type nor its content can be modified further.</p>
+<p>GVariant is useful whenever data needs to be serialized, for example when
+sending method parameters in DBus, or when saving settings using GSettings.</p>
+<p>When creating a new <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>, you pass the data you want to store in it
+along with a string representing the type of data you wish to pass to it.</p>
+<p>For instance, if you want to create a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> holding an integer value you
+can use:</p>
+<div class="informalexample">
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td class="listing_lines" align="right"><pre>1</pre></td>
+ <td class="listing_code"><pre class="programlisting">GVariant <span class="gtkdoc opt">*</span>v <span class="gtkdoc opt">=</span> <span class="function"><a href="glib-GVariant.html#g-variant-new">g_variant_new</a></span> <span class="gtkdoc opt">(</span><span class="string">'u'</span><span class="gtkdoc opt">,</span> <span class="number">40</span><span class="gtkdoc opt">);</span></pre></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+<p></p>
+<p>The string 'u' in the first argument tells <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> that the data passed to
+the constructor (40) is going to be an unsigned integer.</p>
+<p>More advanced examples of <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> in use can be found in documentation for
+GVariant format strings.</p>
+<p>The range of possible values is determined by the type.</p>
+<p>The type system used by <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> is <a class="link" href="glib-GVariantType.html#GVariantType" title="GVariantType"><span class="type">GVariantType</span></a>. </p>
<p><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instances always have a type and a value (which are given
at construction time). The type and value of a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance
can never change other than by the <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> itself being
<p><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> is largely compatible with D-Bus. Almost all types of
<a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instances can be sent over D-Bus. See <a class="link" href="glib-GVariantType.html#GVariantType" title="GVariantType"><span class="type">GVariantType</span></a> for
exceptions. (However, <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>'s serialisation format is not the same
-as the serialisation format of a D-Bus message body: use <a href="https://developer.gnome.org/gio/unstable/GDBusMessage.html"><span class="type">GDBusMessage</span></a>,
+as the serialisation format of a D-Bus message body: use <a href="https://developer.gnome.org/gio/unstable/GDBusMessage.html#GDBusMessage-struct"><span class="type">GDBusMessage</span></a>,
in the gio library, for those.)</p>
<p>For space-efficiency, the <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> serialisation format does not
automatically include the variant's length, type or endianness,
values. <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> includes a printer for this language and a parser
with type inferencing.</p>
<div class="refsect3">
-<a name="id-1.6.19.6.12"></a><h4>Memory Use</h4>
+<a name="id-1.6.19.6.22"></a><h4>Memory Use</h4>
<p><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> tries to be quite efficient with respect to memory use.
This section gives a rough idea of how much memory is used by the
current implementation. The information here is subject to change
<a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> structure itself.</p>
</div>
<div class="refsect3">
-<a name="id-1.6.19.6.13"></a><h4>Serialised Data Memory</h4>
+<a name="id-1.6.19.6.23"></a><h4>Serialised Data Memory</h4>
<p>This is the memory that is used for storing GVariant data in
serialised form. This is what would be sent over the network or
what would end up on disk, not counting any indicator of the
dictionary.</p>
</div>
<div class="refsect3">
-<a name="id-1.6.19.6.14"></a><h4>Type Information Cache</h4>
+<a name="id-1.6.19.6.24"></a><h4>Type Information Cache</h4>
<p>For each GVariant type that currently exists in the program a type
information structure is kept in the type information cache. The
type information structure is required for rapid deserialisation.</p>
structure is required for many different values of the same type.</p>
</div>
<div class="refsect3">
-<a name="id-1.6.19.6.15"></a><h4>Buffer Management Memory</h4>
+<a name="id-1.6.19.6.25"></a><h4>Buffer Management Memory</h4>
<p><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> uses an internal buffer management structure to deal
with the various different possible sources of serialised data
that it uses. The buffer is responsible for ensuring that the
is 4 * (void *). On 32-bit systems, that's 16 bytes.</p>
</div>
<div class="refsect3">
-<a name="id-1.6.19.6.16"></a><h4>GVariant structure</h4>
+<a name="id-1.6.19.6.26"></a><h4>GVariant structure</h4>
<p>The size of a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> structure is 6 * (void *). On 32-bit
systems, that's 24 bytes.</p>
<p><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> structures only exist if they are explicitly created
child.</p>
</div>
<div class="refsect3">
-<a name="id-1.6.19.6.17"></a><h4>Summary</h4>
+<a name="id-1.6.19.6.27"></a><h4>Summary</h4>
<p>To put the entire example together, for our dictionary mapping
strings to variants (with two entries, as given above), we are
using 91 bytes of memory for type information, 29 byes of memory
. When its reference count
drops to 0, the memory used by the variant is freed.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.2.5"></a><h4>Parameters</h4>
+<a name="g-variant-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>Increases the reference count of <em class="parameter"><code>value</code></em>
.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.3.5"></a><h4>Parameters</h4>
+<a name="g-variant-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.3.6"></a><h4>Returns</h4>
+<a name="g-variant-ref.returns"></a><h4>Returns</h4>
<p> the same <em class="parameter"><code>value</code></em>
</p>
</div>
maintaining normal refcounting semantics in situations where values
are not floating.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.4.8"></a><h4>Parameters</h4>
+<a name="g-variant-ref-sink.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.4.9"></a><h4>Returns</h4>
+<a name="g-variant-ref-sink.returns"></a><h4>Returns</h4>
<p> the same <em class="parameter"><code>value</code></em>
</p>
</div>
<p>See <a class="link" href="glib-GVariant.html#g-variant-ref-sink" title="g_variant_ref_sink ()"><code class="function">g_variant_ref_sink()</code></a> for more information about floating reference
counts.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.5.7"></a><h4>Parameters</h4>
+<a name="g-variant-is-floating.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.5.8"></a><h4>Returns</h4>
+<a name="g-variant-is-floating.returns"></a><h4>Returns</h4>
<p> whether <em class="parameter"><code>value</code></em>
is floating</p>
</div>
an additional reference on top of that one is added. It is best to
avoid this situation.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.6.10"></a><h4>Parameters</h4>
+<a name="g-variant-take-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.6.11"></a><h4>Returns</h4>
+<a name="g-variant-take-ref.returns"></a><h4>Returns</h4>
<p> the same <em class="parameter"><code>value</code></em>
</p>
</div>
and must not
be freed.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.7.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.7.7"></a><h4>Returns</h4>
+<a name="g-variant-get-type.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-GVariantType.html#GVariantType" title="GVariantType"><span class="type">GVariantType</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
<a class="link" href="glib-GVariantType.html#g-variant-type-peek-string" title="g_variant_type_peek_string ()"><code class="function">g_variant_type_peek_string()</code></a>, this string is nul-terminated. This
string belongs to <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> and must not be freed.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.8.5"></a><h4>Parameters</h4>
+<a name="g-variant-get-type-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.8.6"></a><h4>Returns</h4>
+<a name="g-variant-get-type-string.returns"></a><h4>Returns</h4>
<p> the type string for the type of <em class="parameter"><code>value</code></em>
</p>
</div>
<em class="parameter"><code>const <a class="link" href="glib-GVariantType.html#GVariantType" title="GVariantType"><span class="type">GVariantType</span></a> *type</code></em>);</pre>
<p>Checks if a value has a type matching the provided type.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.9.5"></a><h4>Parameters</h4>
+<a name="g-variant-is-of-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.9.6"></a><h4>Returns</h4>
+<a name="g-variant-is-of-type.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the type of <em class="parameter"><code>value</code></em>
matches <em class="parameter"><code>type</code></em>
</p>
<p>Checks if <em class="parameter"><code>value</code></em>
is a container.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.10.5"></a><h4>Parameters</h4>
+<a name="g-variant-is-container.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.10.6"></a><h4>Returns</h4>
+<a name="g-variant-is-container.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em>
is a container</p>
</div>
<p>If you only require an equality comparison, <a class="link" href="glib-GVariant.html#g-variant-equal" title="g_variant_equal ()"><code class="function">g_variant_equal()</code></a> is more
general.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.11.9"></a><h4>Parameters</h4>
+<a name="g-variant-compare.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.11.10"></a><h4>Returns</h4>
+<a name="g-variant-compare.returns"></a><h4>Returns</h4>
<p> negative value if a < b;
zero if a = b;
positive value if a > b.</p>
<p>Classifies <em class="parameter"><code>value</code></em>
according to its top-level type.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.12.5"></a><h4>Parameters</h4>
+<a name="g-variant-classify.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.12.6"></a><h4>Returns</h4>
+<a name="g-variant-classify.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="glib-GVariant.html#GVariantClass" title="enum GVariantClass"><span class="type">GVariantClass</span></a> of <em class="parameter"><code>value</code></em>
</p>
</div>
varargs accessors to <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> values of uncertain values (eg:
<a class="link" href="glib-GVariant.html#g-variant-lookup" title="g_variant_lookup ()"><code class="function">g_variant_lookup()</code></a> or <a href="https://developer.gnome.org/gio/unstable/GMenuModel.html#g-menu-model-get-item-attribute"><code class="function">g_menu_model_get_item_attribute()</code></a>).</p>
<div class="refsect3">
-<a name="id-1.6.19.7.13.7"></a><h4>Parameters</h4>
+<a name="g-variant-check-format-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.13.8"></a><h4>Returns</h4>
+<a name="g-variant-check-format-string.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>format_string</code></em>
is safe to use</p>
</div>
permissible types of <em class="parameter"><code>value</code></em>
. It is an error to give a value with
an incompatible type. See the section on
-<a href="gvariant-format-strings.html">GVariant format strings</a>.
+GVariant format strings.
Please note that the syntax of the format string is very likely to be
extended in the future.</p>
<p><em class="parameter"><code>format_string</code></em>
determines the C types that are used for unpacking
the values and also determines if the values are copied or borrowed,
see the section on
-<a href="gvariant-format-strings.html#gvariant-format-strings-pointers">GVariant format strings</a>.</p>
+GVariant format strings.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.14.9"></a><h4>Parameters</h4>
+<a name="g-variant-get.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
determines the C types that are used for unpacking
the values and also determines if the values are copied or borrowed,
see the section on
-<a href="gvariant-format-strings.html#gvariant-format-strings-pointers">GVariant format strings</a>.</p>
+GVariant format strings.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.15.11"></a><h4>Parameters</h4>
+<a name="g-variant-get-va.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>The type of the created instance and the arguments that are expected
by this function are determined by <em class="parameter"><code>format_string</code></em>
. See the section on
-<a href="gvariant-format-strings.html">GVariant format strings</a>. Please note that
+GVariant format strings. Please note that
the syntax of the format string is very likely to be extended in the
future.</p>
<p>The first character of the format string must not be '*' '?' '@' or
<p>Note that the arguments must be of the correct width for their types
specified in <em class="parameter"><code>format_string</code></em>
. This can be achieved by casting them. See
-the <a href="gvariant-format-strings.html#gvariant-varargs">GVariant varargs documentation</a>.</p>
+the GVariant varargs documentation.</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<p></p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.16.12"></a><h4>Parameters</h4>
+<a name="g-variant-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.16.13"></a><h4>Returns</h4>
+<a name="g-variant-new.returns"></a><h4>Returns</h4>
<p> a new floating <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
or by passing it to another <a class="link" href="glib-GVariant.html#g-variant-new" title="g_variant_new ()"><code class="function">g_variant_new()</code></a> call.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.17.13"></a><h4>Parameters</h4>
+<a name="g-variant-new-va.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.17.14"></a><h4>Returns</h4>
+<a name="g-variant-new-va.returns"></a><h4>Returns</h4>
<p> a new, usually floating, <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
g_variant_new_boolean (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> value</code></em>);</pre>
<p>Creates a new boolean <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance -- either <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.18.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-boolean.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.18.6"></a><h4>Returns</h4>
+<a name="g-variant-new-boolean.returns"></a><h4>Returns</h4>
<p> a floating reference to a new boolean <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_byte (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guchar" title="guchar"><span class="type">guchar</span></a> value</code></em>);</pre>
<p>Creates a new byte <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.19.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-byte.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.19.6"></a><h4>Returns</h4>
+<a name="g-variant-new-byte.returns"></a><h4>Returns</h4>
<p> a floating reference to a new byte <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_int16 (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint16" title="gint16"><span class="type">gint16</span></a> value</code></em>);</pre>
<p>Creates a new int16 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.20.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-int16.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.20.6"></a><h4>Returns</h4>
+<a name="g-variant-new-int16.returns"></a><h4>Returns</h4>
<p> a floating reference to a new int16 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_uint16 (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guint16" title="guint16"><span class="type">guint16</span></a> value</code></em>);</pre>
<p>Creates a new uint16 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.21.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-uint16.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.21.6"></a><h4>Returns</h4>
+<a name="g-variant-new-uint16.returns"></a><h4>Returns</h4>
<p> a floating reference to a new uint16 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_int32 (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a> value</code></em>);</pre>
<p>Creates a new int32 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.22.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-int32.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.22.6"></a><h4>Returns</h4>
+<a name="g-variant-new-int32.returns"></a><h4>Returns</h4>
<p> a floating reference to a new int32 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_uint32 (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a> value</code></em>);</pre>
<p>Creates a new uint32 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.23.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-uint32.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.23.6"></a><h4>Returns</h4>
+<a name="g-variant-new-uint32.returns"></a><h4>Returns</h4>
<p> a floating reference to a new uint32 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_int64 (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a> value</code></em>);</pre>
<p>Creates a new int64 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.24.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-int64.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.24.6"></a><h4>Returns</h4>
+<a name="g-variant-new-int64.returns"></a><h4>Returns</h4>
<p> a floating reference to a new int64 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_uint64 (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a> value</code></em>);</pre>
<p>Creates a new uint64 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.25.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-uint64.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.25.6"></a><h4>Returns</h4>
+<a name="g-variant-new-uint64.returns"></a><h4>Returns</h4>
<p> a floating reference to a new uint64 <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
that are sent alongside a D-Bus message. If you're not interacting
with D-Bus, you probably don't need them.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.26.6"></a><h4>Parameters</h4>
+<a name="g-variant-new-handle.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.26.7"></a><h4>Returns</h4>
+<a name="g-variant-new-handle.returns"></a><h4>Returns</h4>
<p> a floating reference to a new handle <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
g_variant_new_double (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> value</code></em>);</pre>
<p>Creates a new double <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.27.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-double.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.27.6"></a><h4>Returns</h4>
+<a name="g-variant-new-double.returns"></a><h4>Returns</h4>
<p> a floating reference to a new double <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p><em class="parameter"><code>string</code></em>
must be valid UTF-8, and must not be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. To encode
potentially-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> strings, use <a class="link" href="glib-GVariant.html#g-variant-new" title="g_variant_new ()"><code class="function">g_variant_new()</code></a> with <code class="literal">ms</code> as the
-<a href="gvariant-format-strings.html#gvariant-format-strings-maybe-types">format string</a>.</p>
+format string.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.28.6"></a><h4>Parameters</h4>
+<a name="g-variant-new-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.28.7"></a><h4>Returns</h4>
+<a name="g-variant-new-string.returns"></a><h4>Returns</h4>
<p> a floating reference to a new string <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
freed.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.29.9"></a><h4>Parameters</h4>
+<a name="g-variant-new-take-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.29.10"></a><h4>Returns</h4>
+<a name="g-variant-new-take-string.returns"></a><h4>Returns</h4>
<p> a floating reference to a new string
<a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
unnecessary copy.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.30.7"></a><h4>Parameters</h4>
+<a name="g-variant-new-printf.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.30.8"></a><h4>Returns</h4>
+<a name="g-variant-new-printf.returns"></a><h4>Returns</h4>
<p> a floating reference to a new string
<a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
must be a valid D-Bus object path. Use
<a class="link" href="glib-GVariant.html#g-variant-is-object-path" title="g_variant_is_object_path ()"><code class="function">g_variant_is_object_path()</code></a> if you're not sure.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.31.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-object-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.31.6"></a><h4>Returns</h4>
+<a name="g-variant-new-object-path.returns"></a><h4>Returns</h4>
<p> a floating reference to a new object path <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
must contain only the characters "A-Z[0-9]_". No sequence
(including the one following the final '/' character) may be empty.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.32.6"></a><h4>Parameters</h4>
+<a name="g-variant-is-object-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.32.7"></a><h4>Returns</h4>
+<a name="g-variant-is-object-path.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>string</code></em>
is a D-Bus object path</p>
</div>
must be a valid D-Bus type signature. Use
<a class="link" href="glib-GVariant.html#g-variant-is-signature" title="g_variant_is_signature ()"><code class="function">g_variant_is_signature()</code></a> if you're not sure.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.33.5"></a><h4>Parameters</h4>
+<a name="g-variant-new-signature.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.33.6"></a><h4>Returns</h4>
+<a name="g-variant-new-signature.returns"></a><h4>Returns</h4>
<p> a floating reference to a new signature <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p>D-Bus type signatures consist of zero or more definite <a class="link" href="glib-GVariantType.html#GVariantType" title="GVariantType"><span class="type">GVariantType</span></a>
strings in sequence.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.34.6"></a><h4>Parameters</h4>
+<a name="g-variant-is-signature.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.34.7"></a><h4>Returns</h4>
+<a name="g-variant-is-signature.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>string</code></em>
is a D-Bus type signature</p>
</div>
.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.35.7"></a><h4>Parameters</h4>
+<a name="g-variant-new-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.35.8"></a><h4>Returns</h4>
+<a name="g-variant-new-variant.returns"></a><h4>Returns</h4>
<p> a floating reference to a new variant <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
is -1 then <em class="parameter"><code>strv</code></em>
is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.36.6"></a><h4>Parameters</h4>
+<a name="g-variant-new-strv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.36.7"></a><h4>Returns</h4>
+<a name="g-variant-new-strv.returns"></a><h4>Returns</h4>
<p> a new floating <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
is -1 then <em class="parameter"><code>strv</code></em>
is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.37.7"></a><h4>Parameters</h4>
+<a name="g-variant-new-objv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.37.8"></a><h4>Returns</h4>
+<a name="g-variant-new-objv.returns"></a><h4>Returns</h4>
<p> a new floating <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p>The nul terminator character at the end of the string is stored in
the array.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.38.6"></a><h4>Parameters</h4>
+<a name="g-variant-new-bytestring.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.38.7"></a><h4>Returns</h4>
+<a name="g-variant-new-bytestring.returns"></a><h4>Returns</h4>
<p> a floating reference to a new bytestring <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
is -1 then <em class="parameter"><code>strv</code></em>
is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.39.6"></a><h4>Parameters</h4>
+<a name="g-variant-new-bytestring-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.39.7"></a><h4>Returns</h4>
+<a name="g-variant-new-bytestring-array.returns"></a><h4>Returns</h4>
<p> a new floating <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-BOOLEAN:CAPS" title="G_VARIANT_TYPE_BOOLEAN"><code class="literal">G_VARIANT_TYPE_BOOLEAN</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.40.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-boolean.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.40.7"></a><h4>Returns</h4>
+<a name="g-variant-get-boolean.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-BYTE:CAPS" title="G_VARIANT_TYPE_BYTE"><code class="literal">G_VARIANT_TYPE_BYTE</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.41.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-byte.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.41.7"></a><h4>Returns</h4>
+<a name="g-variant-get-byte.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#guchar" title="guchar"><span class="type">guchar</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-INT16:CAPS" title="G_VARIANT_TYPE_INT16"><code class="literal">G_VARIANT_TYPE_INT16</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.42.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-int16.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.42.7"></a><h4>Returns</h4>
+<a name="g-variant-get-int16.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#gint16" title="gint16"><span class="type">gint16</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-UINT16:CAPS" title="G_VARIANT_TYPE_UINT16"><code class="literal">G_VARIANT_TYPE_UINT16</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.43.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-uint16.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.43.7"></a><h4>Returns</h4>
+<a name="g-variant-get-uint16.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#guint16" title="guint16"><span class="type">guint16</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-INT32:CAPS" title="G_VARIANT_TYPE_INT32"><code class="literal">G_VARIANT_TYPE_INT32</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.44.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-int32.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.44.7"></a><h4>Returns</h4>
+<a name="g-variant-get-int32.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-UINT32:CAPS" title="G_VARIANT_TYPE_UINT32"><code class="literal">G_VARIANT_TYPE_UINT32</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.45.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-uint32.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.45.7"></a><h4>Returns</h4>
+<a name="g-variant-get-uint32.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-INT64:CAPS" title="G_VARIANT_TYPE_INT64"><code class="literal">G_VARIANT_TYPE_INT64</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.46.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-int64.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.46.7"></a><h4>Returns</h4>
+<a name="g-variant-get-int64.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#gint64" title="gint64"><span class="type">gint64</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-UINT64:CAPS" title="G_VARIANT_TYPE_UINT64"><code class="literal">G_VARIANT_TYPE_UINT64</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.47.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-uint64.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.47.7"></a><h4>Returns</h4>
+<a name="g-variant-get-uint64.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#guint64" title="guint64"><span class="type">guint64</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
that are sent alongside a D-Bus message. If you're not interacting
with D-Bus, you probably don't need them.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.48.7"></a><h4>Parameters</h4>
+<a name="g-variant-get-handle.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.48.8"></a><h4>Returns</h4>
+<a name="g-variant-get-handle.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#gint32" title="gint32"><span class="type">gint32</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
of any type
other than <a class="link" href="glib-GVariantType.html#G-VARIANT-TYPE-DOUBLE:CAPS" title="G_VARIANT_TYPE_DOUBLE"><code class="literal">G_VARIANT_TYPE_DOUBLE</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.49.6"></a><h4>Parameters</h4>
+<a name="g-variant-get-double.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.49.7"></a><h4>Returns</h4>
+<a name="g-variant-get-double.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
<p>The return value remains valid as long as <em class="parameter"><code>value</code></em>
exists.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.50.9"></a><h4>Parameters</h4>
+<a name="g-variant-get-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.50.10"></a><h4>Returns</h4>
+<a name="g-variant-get-string.returns"></a><h4>Returns</h4>
<p> the constant string, UTF-8 encoded. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p>The string will always be UTF-8 encoded.</p>
<p>The return value must be freed using <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.51.7"></a><h4>Parameters</h4>
+<a name="g-variant-dup-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.51.8"></a><h4>Returns</h4>
+<a name="g-variant-dup-string.returns"></a><h4>Returns</h4>
<p> a newly allocated string, UTF-8 encoded. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
contained in <em class="parameter"><code>value</code></em>
.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.52.5"></a><h4>Parameters</h4>
+<a name="g-variant-get-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.52.6"></a><h4>Returns</h4>
+<a name="g-variant-get-variant.returns"></a><h4>Returns</h4>
<p> the item contained in the variant. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
will be set to 0 and a pointer to a
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> pointer will be returned.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.53.7"></a><h4>Parameters</h4>
+<a name="g-variant-get-strv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.53.8"></a><h4>Returns</h4>
+<a name="g-variant-get-strv.returns"></a><h4>Returns</h4>
<p> an array of constant strings. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length zero-terminated=1][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
will be set to 0 and a pointer to a
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> pointer will be returned.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.54.7"></a><h4>Parameters</h4>
+<a name="g-variant-dup-strv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.54.8"></a><h4>Returns</h4>
+<a name="g-variant-dup-strv.returns"></a><h4>Returns</h4>
<p> an array of strings. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length zero-terminated=1][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
will be set to 0 and a pointer to a
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> pointer will be returned.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.55.7"></a><h4>Parameters</h4>
+<a name="g-variant-get-objv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.55.8"></a><h4>Returns</h4>
+<a name="g-variant-get-objv.returns"></a><h4>Returns</h4>
<p> an array of constant strings. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length zero-terminated=1][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
will be set to 0 and a pointer to a
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> pointer will be returned.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.56.7"></a><h4>Parameters</h4>
+<a name="g-variant-dup-objv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.56.8"></a><h4>Returns</h4>
+<a name="g-variant-dup-objv.returns"></a><h4>Returns</h4>
<p> an array of strings. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length zero-terminated=1][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p>If the array contains a nul terminator character somewhere other than
the last byte then the returned string is the string, up to the first
such nul character.</p>
+<p>g_variant_get_fixed_array() should be used instead if the array contains
+arbitrary data that could not be nul-terminated or could contain nul bytes.</p>
<p>It is an error to call this function with a <em class="parameter"><code>value</code></em>
that is not an
array of bytes.</p>
<p>The return value remains valid as long as <em class="parameter"><code>value</code></em>
exists.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.57.9"></a><h4>Parameters</h4>
+<a name="g-variant-get-bytestring.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.57.10"></a><h4>Returns</h4>
+<a name="g-variant-get-bytestring.returns"></a><h4>Returns</h4>
<p> the constant string. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></p>
</div>
returning a constant string, the string is duplicated.</p>
<p>The return value must be freed using <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.58.6"></a><h4>Parameters</h4>
+<a name="g-variant-dup-bytestring.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.58.7"></a><h4>Returns</h4>
+<a name="g-variant-dup-bytestring.returns"></a><h4>Returns</h4>
<p> a newly allocated string. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1 length=length][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></p>
</div>
will be set to 0 and a pointer to a
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> pointer will be returned.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.59.7"></a><h4>Parameters</h4>
+<a name="g-variant-get-bytestring-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.59.8"></a><h4>Returns</h4>
+<a name="g-variant-get-bytestring-array.returns"></a><h4>Returns</h4>
<p> an array of constant strings. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
will be set to 0 and a pointer to a
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> pointer will be returned.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.60.7"></a><h4>Parameters</h4>
+<a name="g-variant-dup-bytestring-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.60.8"></a><h4>Returns</h4>
+<a name="g-variant-dup-bytestring-array.returns"></a><h4>Returns</h4>
<p> an array of strings. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
instance takes ownership of <em class="parameter"><code>child</code></em>
.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.61.7"></a><h4>Parameters</h4>
+<a name="g-variant-new-maybe.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.61.8"></a><h4>Returns</h4>
+<a name="g-variant-new-maybe.returns"></a><h4>Returns</h4>
<p> a floating reference to a new <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> maybe instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
are floating references (see <a class="link" href="glib-GVariant.html#g-variant-ref-sink" title="g_variant_ref_sink ()"><code class="function">g_variant_ref_sink()</code></a>), the
new instance takes ownership of them as if via <a class="link" href="glib-GVariant.html#g-variant-ref-sink" title="g_variant_ref_sink ()"><code class="function">g_variant_ref_sink()</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.62.9"></a><h4>Parameters</h4>
+<a name="g-variant-new-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.62.10"></a><h4>Returns</h4>
+<a name="g-variant-new-array.returns"></a><h4>Returns</h4>
<p> a floating reference to a new <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> array. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
are floating references (see <a class="link" href="glib-GVariant.html#g-variant-ref-sink" title="g_variant_ref_sink ()"><code class="function">g_variant_ref_sink()</code></a>), the
new instance takes ownership of them as if via <a class="link" href="glib-GVariant.html#g-variant-ref-sink" title="g_variant_ref_sink ()"><code class="function">g_variant_ref_sink()</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.63.7"></a><h4>Parameters</h4>
+<a name="g-variant-new-tuple.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.63.8"></a><h4>Returns</h4>
+<a name="g-variant-new-tuple.returns"></a><h4>Returns</h4>
<p> a floating reference to a new <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> tuple. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
the new instance takes ownership of them as if via <a class="link" href="glib-GVariant.html#g-variant-ref-sink" title="g_variant_ref_sink ()"><code class="function">g_variant_ref_sink()</code></a>.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.64.7"></a><h4>Parameters</h4>
+<a name="g-variant-new-dict-entry.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.64.8"></a><h4>Returns</h4>
+<a name="g-variant-new-dict-entry.returns"></a><h4>Returns</h4>
<p> a floating reference to a new dictionary entry <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
, which must be non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is set equal to the number of
items in the array.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.65.8"></a><h4>Parameters</h4>
+<a name="g-variant-new-fixed-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.65.9"></a><h4>Returns</h4>
+<a name="g-variant-new-fixed-array.returns"></a><h4>Returns</h4>
<p> a floating reference to a new array <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p>Given a maybe-typed <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance, extract its value. If the
value is Nothing, then this function returns <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.66.5"></a><h4>Parameters</h4>
+<a name="g-variant-get-maybe.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.66.6"></a><h4>Returns</h4>
+<a name="g-variant-get-maybe.returns"></a><h4>Returns</h4>
<p> the contents of <em class="parameter"><code>value</code></em>
, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
only on the type). For dictionary entries, it is always 2</p>
<p>This function is O(1).</p>
<div class="refsect3">
-<a name="id-1.6.19.7.67.7"></a><h4>Parameters</h4>
+<a name="g-variant-n-children.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.67.8"></a><h4>Returns</h4>
+<a name="g-variant-n-children.returns"></a><h4>Returns</h4>
<p> the number of children in the container</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
<a class="link" href="glib-GVariant.html#g-variant-unref" title="g_variant_unref ()"><code class="function">g_variant_unref()</code></a> when you're done with it.</p>
<p>This function is O(1).</p>
<div class="refsect3">
-<a name="id-1.6.19.7.68.8"></a><h4>Parameters</h4>
+<a name="g-variant-get-child-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.68.9"></a><h4>Returns</h4>
+<a name="g-variant-get-child-value.returns"></a><h4>Returns</h4>
<p> the child at the specified index. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
determines the C types that are used for unpacking
the values and also determines if the values are copied or borrowed,
see the section on
-<a href="gvariant-format-strings.html#gvariant-format-strings-pointers">GVariant format strings</a>.</p>
+GVariant format strings.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.69.7"></a><h4>Parameters</h4>
+<a name="g-variant-get-child.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>This function is currently implemented with a linear scan. If you
plan to do many lookups then <a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a> may be more efficient.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.70.10"></a><h4>Parameters</h4>
+<a name="g-variant-lookup-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.70.11"></a><h4>Returns</h4>
+<a name="g-variant-lookup-value.returns"></a><h4>Returns</h4>
<p> the value of the dictionary key, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
determines the C types that are used for unpacking
the values and also determines if the values are copied or borrowed,
see the section on
-<a href="gvariant-format-strings.html#gvariant-format-strings-pointers">GVariant format strings</a>.</p>
+GVariant format strings.</p>
<p>This function is currently implemented with a linear scan. If you
plan to do many lookups then <a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a> may be more efficient.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.71.9"></a><h4>Parameters</h4>
+<a name="g-variant-lookup.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.71.10"></a><h4>Returns</h4>
+<a name="g-variant-lookup.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a value was unpacked</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p>
, which must be non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is set equal to the number of
items in the array.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.72.11"></a><h4>Parameters</h4>
+<a name="g-variant-get-fixed-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.72.12"></a><h4>Returns</h4>
+<a name="g-variant-get-fixed-array.returns"></a><h4>Returns</h4>
<p> a pointer to
the fixed array. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_elements][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
operation which is approximately O(n) in the number of values
involved.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.73.7"></a><h4>Parameters</h4>
+<a name="g-variant-get-size.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.73.8"></a><h4>Returns</h4>
+<a name="g-variant-get-size.returns"></a><h4>Returns</h4>
<p> the serialised size of <em class="parameter"><code>value</code></em>
</p>
</div>
explicitly (by storing the type and/or endianness in addition to the
serialised data).</p>
<div class="refsect3">
-<a name="id-1.6.19.7.74.8"></a><h4>Parameters</h4>
+<a name="g-variant-get-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.74.9"></a><h4>Returns</h4>
+<a name="g-variant-get-data.returns"></a><h4>Returns</h4>
<p> the serialised form of <em class="parameter"><code>value</code></em>
, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
<a class="link" href="glib-GVariant.html#g-variant-get-data" title="g_variant_get_data ()"><code class="function">g_variant_get_data()</code></a>, except that the returned <a class="link" href="glib-Byte-Arrays.html#GBytes" title="GBytes"><span class="type">GBytes</span></a> holds
a reference to the variant data.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.75.5"></a><h4>Parameters</h4>
+<a name="g-variant-get-data-as-bytes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.75.6"></a><h4>Returns</h4>
+<a name="g-variant-get-data-as-bytes.returns"></a><h4>Returns</h4>
<p> A new <a class="link" href="glib-Byte-Arrays.html#GBytes" title="GBytes"><span class="type">GBytes</span></a> representing the variant data. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p>This function is approximately O(n) in the size of <em class="parameter"><code>data</code></em>
.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.76.8"></a><h4>Parameters</h4>
+<a name="g-variant-store.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> the location to store the serialised data at. </p></td>
-<td class="parameter_annotations"><span class="annotation">[not nullable]</span></td>
+<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL must not be passed as the value in, out, in-out; or as a return value."><span class="acronym">not nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
needed. The exact time of this call is unspecified and might even be
before this function returns.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.77.10"></a><h4>Parameters</h4>
+<a name="g-variant-new-from-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.77.11"></a><h4>Returns</h4>
+<a name="g-variant-new-from-data.returns"></a><h4>Returns</h4>
<p> a new floating <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> of type <em class="parameter"><code>type</code></em>
. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
<p>A reference is taken on <em class="parameter"><code>bytes</code></em>
.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.78.6"></a><h4>Parameters</h4>
+<a name="g-variant-new-from-bytes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.78.7"></a><h4>Returns</h4>
+<a name="g-variant-new-from-bytes.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> with a floating reference. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
bytes and containers containing only these things (recursively).</p>
<p>The returned value is always in normal form and is marked as trusted.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.79.7"></a><h4>Parameters</h4>
+<a name="g-variant-byteswap.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.79.8"></a><h4>Returns</h4>
+<a name="g-variant-byteswap.returns"></a><h4>Returns</h4>
<p> the byteswapped form of <em class="parameter"><code>value</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
data from untrusted sources and you want to ensure your serialised
output is definitely in normal form.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.80.9"></a><h4>Parameters</h4>
+<a name="g-variant-get-normal-form.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.80.10"></a><h4>Returns</h4>
+<a name="g-variant-get-normal-form.returns"></a><h4>Returns</h4>
<p> a trusted <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
being trusted. If the value was already marked as being trusted then
this function will immediately return <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.81.7"></a><h4>Parameters</h4>
+<a name="g-variant-is-normal-form.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.81.8"></a><h4>Returns</h4>
+<a name="g-variant-is-normal-form.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em>
is in normal form</p>
</div>
function with <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>. <em class="parameter"><code>value</code></em>
must be a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.82.7"></a><h4>Parameters</h4>
+<a name="g-variant-hash.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.82.8"></a><h4>Returns</h4>
+<a name="g-variant-hash.returns"></a><h4>Returns</h4>
<p> a hash value corresponding to <em class="parameter"><code>value</code></em>
</p>
</div>
are <a class="link" href="glib-Basic-Types.html#gconstpointer" title="gconstpointer"><span class="type">gconstpointer</span></a> only to allow use of
this function with <a class="link" href="glib-Hash-Tables.html#GHashTable" title="GHashTable"><span class="type">GHashTable</span></a>. They must each be a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.83.6"></a><h4>Parameters</h4>
+<a name="g-variant-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.83.7"></a><h4>Returns</h4>
+<a name="g-variant-equal.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>one</code></em>
and <em class="parameter"><code>two</code></em>
are equal</p>
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> type_annotate</code></em>);</pre>
<p>Pretty-prints <em class="parameter"><code>value</code></em>
in the format understood by <a class="link" href="glib-GVariant.html#g-variant-parse" title="g_variant_parse ()"><code class="function">g_variant_parse()</code></a>.</p>
-<p>The format is described <a href="gvariant-text.html">here</a>.</p>
+<p>The format is described here.</p>
<p>If <em class="parameter"><code>type_annotate</code></em>
is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a>, then type information is included in
the output.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.84.7"></a><h4>Parameters</h4>
+<a name="g-variant-print.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.84.8"></a><h4>Returns</h4>
+<a name="g-variant-print.returns"></a><h4>Returns</h4>
<p> a newly-allocated string holding the result. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
a new empty <a class="link" href="glib-Strings.html#GString" title="struct GString"><span class="type">GString</span></a> is allocated and it is returned.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.85.7"></a><h4>Parameters</h4>
+<a name="g-variant-print-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.85.8"></a><h4>Returns</h4>
+<a name="g-variant-print-string.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-Strings.html#GString" title="struct GString"><span class="type">GString</span></a> containing the string</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
is iterating over
and will be releated only when <a class="link" href="glib-GVariant.html#g-variant-iter-free" title="g_variant_iter_free ()"><code class="function">g_variant_iter_free()</code></a> is called.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.86.7"></a><h4>Parameters</h4>
+<a name="g-variant-iter-copy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.86.8"></a><h4>Returns</h4>
+<a name="g-variant-iter-copy.returns"></a><h4>Returns</h4>
<p> a new heap-allocated <a class="link" href="glib-GVariant.html#GVariantIter" title="struct GVariantIter"><span class="type">GVariantIter</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
iterators that were returned by <a class="link" href="glib-GVariant.html#g-variant-iter-new" title="g_variant_iter_new ()"><code class="function">g_variant_iter_new()</code></a> or
<a class="link" href="glib-GVariant.html#g-variant-iter-copy" title="g_variant_iter_copy ()"><code class="function">g_variant_iter_copy()</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.87.5"></a><h4>Parameters</h4>
+<a name="g-variant-iter-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
be freed in any way.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.88.7"></a><h4>Parameters</h4>
+<a name="g-variant-iter-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.88.8"></a><h4>Returns</h4>
+<a name="g-variant-iter-init.returns"></a><h4>Returns</h4>
<p> the number of items in <em class="parameter"><code>value</code></em>
</p>
</div>
of items remaining.</p>
<p>This function might be useful for preallocation of arrays.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.89.6"></a><h4>Parameters</h4>
+<a name="g-variant-iter-n-children.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.89.7"></a><h4>Returns</h4>
+<a name="g-variant-iter-n-children.returns"></a><h4>Returns</h4>
<p> the number of children in the container</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
and will be released only when
<a class="link" href="glib-GVariant.html#g-variant-iter-free" title="g_variant_iter_free ()"><code class="function">g_variant_iter_free()</code></a> is called.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.90.7"></a><h4>Parameters</h4>
+<a name="g-variant-iter-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.90.8"></a><h4>Returns</h4>
+<a name="g-variant-iter-new.returns"></a><h4>Returns</h4>
<p> a new heap-allocated <a class="link" href="glib-GVariant.html#GVariantIter" title="struct GVariantIter"><span class="type">GVariantIter</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<span class="function"><a href="glib-GVariant.html#g-variant-iter-init">g_variant_iter_init</a></span> <span class="gtkdoc opt">(&</span>iter<span class="gtkdoc opt">,</span> container<span class="gtkdoc opt">);</span>
<span class="keyword">while</span> <span class="gtkdoc opt">((</span>child <span class="gtkdoc opt">=</span> <span class="function"><a href="glib-GVariant.html#g-variant-iter-next-value">g_variant_iter_next_value</a></span> <span class="gtkdoc opt">(&</span>iter<span class="gtkdoc opt">)))</span>
<span class="gtkdoc opt">{</span>
- <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span> <span class="gtkdoc opt">(</span><span class="string">"type '%s'</span><span class="gtkdoc esc">\n</span><span class="string">"</span><span class="gtkdoc opt">,</span> <span class="function"><a href="glib-GVariant.html#g-variant-get-type-string">g_variant_get_type_string</a></span> <span class="gtkdoc opt">(</span>child<span class="gtkdoc opt">));</span>
+ <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span> <span class="gtkdoc opt">(</span><span class="string">"type '%s'</span><span class="gtkdoc esc">\n</span><span class="string">"</span><span class="gtkdoc opt">,</span> <span class="function"><a href="glib-GVariant.html#g-variant-get-type-string">g_variant_get_type_string</a></span> <span class="gtkdoc opt">(</span>child<span class="gtkdoc opt">));</span>
<span class="keyword">if</span> <span class="gtkdoc opt">(</span><span class="function"><a href="glib-GVariant.html#g-variant-is-container">g_variant_is_container</a></span> <span class="gtkdoc opt">(</span>child<span class="gtkdoc opt">))</span>
<span class="function">iterate_container_recursive</span> <span class="gtkdoc opt">(</span>child<span class="gtkdoc opt">);</span>
<p></p>
<div class="refsect3">
-<a name="id-1.6.19.7.91.9"></a><h4>Parameters</h4>
+<a name="g-variant-iter-next-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.91.10"></a><h4>Returns</h4>
+<a name="g-variant-iter-next-value.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
17
18
19</pre></td>
- <td class="listing_code"><pre class="programlisting"><span class="gtkdoc slc">// Iterates a dictionary of type 'a{sv}'</span>
+ <td class="listing_code"><pre class="programlisting"><span class="gtkdoc slc">// Iterates a dictionary of type 'a{sv}'</span>
<span class="gtkdoc kwb">void</span>
<span class="function">iterate_dictionary</span> <span class="gtkdoc opt">(</span>GVariant <span class="gtkdoc opt">*</span>dictionary<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
<span class="function"><a href="glib-GVariant.html#g-variant-iter-init">g_variant_iter_init</a></span> <span class="gtkdoc opt">(&</span>iter<span class="gtkdoc opt">,</span> dictionary<span class="gtkdoc opt">);</span>
<span class="keyword">while</span> <span class="gtkdoc opt">(</span><span class="function"><a href="glib-GVariant.html#g-variant-iter-next">g_variant_iter_next</a></span> <span class="gtkdoc opt">(&</span>iter<span class="gtkdoc opt">,</span> <span class="string">"{sv}"</span><span class="gtkdoc opt">, &</span>key<span class="gtkdoc opt">, &</span>value<span class="gtkdoc opt">))</span>
<span class="gtkdoc opt">{</span>
- <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span> <span class="gtkdoc opt">(</span><span class="string">"Item '%s' has type '%s'</span><span class="gtkdoc esc">\n</span><span class="string">"</span><span class="gtkdoc opt">,</span> key<span class="gtkdoc opt">,</span>
+ <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span> <span class="gtkdoc opt">(</span><span class="string">"Item '%s' has type '%s'</span><span class="gtkdoc esc">\n</span><span class="string">"</span><span class="gtkdoc opt">,</span> key<span class="gtkdoc opt">,</span>
<span class="function"><a href="glib-GVariant.html#g-variant-get-type-string">g_variant_get_type_string</a></span> <span class="gtkdoc opt">(</span>value<span class="gtkdoc opt">));</span>
<span class="gtkdoc slc">// must free data for ourselves</span>
determines the C types that are used for unpacking
the values and also determines if the values are copied or borrowed.</p>
<p>See the section on
-<a href="gvariant-format-strings.html#gvariant-format-strings-pointers">GVariant format strings</a>.</p>
+GVariant format strings.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.92.14"></a><h4>Parameters</h4>
+<a name="g-variant-iter-next.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.92.15"></a><h4>Returns</h4>
+<a name="g-variant-iter-next.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a value was unpacked, or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if there as no value</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-24.html#api-index-2.24">2.24</a></p>
16
17
18</pre></td>
- <td class="listing_code"><pre class="programlisting"><span class="gtkdoc slc">// Iterates a dictionary of type 'a{sv}'</span>
+ <td class="listing_code"><pre class="programlisting"><span class="gtkdoc slc">// Iterates a dictionary of type 'a{sv}'</span>
<span class="gtkdoc kwb">void</span>
<span class="function">iterate_dictionary</span> <span class="gtkdoc opt">(</span>GVariant <span class="gtkdoc opt">*</span>dictionary<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
<span class="function"><a href="glib-GVariant.html#g-variant-iter-init">g_variant_iter_init</a></span> <span class="gtkdoc opt">(&</span>iter<span class="gtkdoc opt">,</span> dictionary<span class="gtkdoc opt">);</span>
<span class="keyword">while</span> <span class="gtkdoc opt">(</span><span class="function"><a href="glib-GVariant.html#g-variant-iter-loop">g_variant_iter_loop</a></span> <span class="gtkdoc opt">(&</span>iter<span class="gtkdoc opt">,</span> <span class="string">"{sv}"</span><span class="gtkdoc opt">, &</span>key<span class="gtkdoc opt">, &</span>value<span class="gtkdoc opt">))</span>
<span class="gtkdoc opt">{</span>
- <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span> <span class="gtkdoc opt">(</span><span class="string">"Item '%s' has type '%s'</span><span class="gtkdoc esc">\n</span><span class="string">"</span><span class="gtkdoc opt">,</span> key<span class="gtkdoc opt">,</span>
+ <span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span> <span class="gtkdoc opt">(</span><span class="string">"Item '%s' has type '%s'</span><span class="gtkdoc esc">\n</span><span class="string">"</span><span class="gtkdoc opt">,</span> key<span class="gtkdoc opt">,</span>
<span class="function"><a href="glib-GVariant.html#g-variant-get-type-string">g_variant_get_type_string</a></span> <span class="gtkdoc opt">(</span>value<span class="gtkdoc opt">));</span>
- <span class="gtkdoc slc">// no need to free 'key' and 'value' here</span>
+ <span class="gtkdoc slc">// no need to free 'key' and 'value' here</span>
<span class="gtkdoc slc">// unless breaking out of this loop</span>
<span class="gtkdoc opt">}</span>
<span class="gtkdoc opt">}</span></pre></td>
determines the C types that are used for unpacking
the values and also determines if the values are copied or borrowed.</p>
<p>See the section on
-<a href="gvariant-format-strings.html#gvariant-format-strings-pointers">GVariant format strings</a>.</p>
+GVariant format strings.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.93.18"></a><h4>Parameters</h4>
+<a name="g-variant-iter-loop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.93.19"></a><h4>Returns</h4>
+<a name="g-variant-iter-loop.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a value was unpacked, or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if there was no
value</p>
</div>
</div>
<hr>
<div class="refsect2">
+<a name="G-VARIANT-BUILDER-INIT:CAPS"></a><h3>G_VARIANT_BUILDER_INIT()</h3>
+<pre class="programlisting">#define G_VARIANT_BUILDER_INIT(variant_type) { { { 2942751021u, variant_type, { 0, } } } }
+</pre>
+<p>A stack-allocated <a class="link" href="glib-GVariant.html#GVariantBuilder" title="struct GVariantBuilder"><span class="type">GVariantBuilder</span></a> must be initialized if it is
+used together with <a class="link" href="glib-Miscellaneous-Macros.html#g-auto" title="g_auto()"><code class="function">g_auto()</code></a> to avoid warnings or crashes if
+function returns before <a class="link" href="glib-GVariant.html#g-variant-builder-init" title="g_variant_builder_init ()"><code class="function">g_variant_builder_init()</code></a> is called on the
+builder. This macro can be used as initializer instead of an
+explicit zeroing a variable when declaring it and a following
+<a class="link" href="glib-GVariant.html#g-variant-builder-init" title="g_variant_builder_init ()"><code class="function">g_variant_builder_init()</code></a>, but it cannot be assigned to a variable.</p>
+<p>The passed <em class="parameter"><code>variant_type</code></em>
+ should be a static GVariantType to avoid
+lifetime issues, as copying the <em class="parameter"><code>variant_type</code></em>
+ does not happen in
+the <a class="link" href="glib-GVariant.html#G-VARIANT-BUILDER-INIT:CAPS" title="G_VARIANT_BUILDER_INIT()"><code class="function">G_VARIANT_BUILDER_INIT()</code></a> call, but rather in functions that
+make sure that <a class="link" href="glib-GVariant.html#GVariantBuilder" title="struct GVariantBuilder"><span class="type">GVariantBuilder</span></a> is valid.</p>
+<div class="informalexample">
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td class="listing_lines" align="right"><pre>1</pre></td>
+ <td class="listing_code"><pre class="programlisting"><span class="function"><a href="glib-Miscellaneous-Macros.html#g-auto">g_auto</a></span><span class="gtkdoc opt">(</span>GVariantBuilder<span class="gtkdoc opt">)</span> builder <span class="gtkdoc opt">=</span> <span class="function"><a href="glib-GVariant.html#G-VARIANT-BUILDER-INIT:CAPS">G_VARIANT_BUILDER_INIT</a></span> <span class="gtkdoc opt">(</span>G_VARIANT_TYPE_BYTESTRING<span class="gtkdoc opt">);</span></pre></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+<p></p>
+<div class="refsect3">
+<a name="G-VARIANT-BUILDER-INIT.parameters"></a><h4>Parameters</h4>
+<div class="informaltable"><table class="informaltable" width="100%" border="0">
+<colgroup>
+<col width="150px" class="parameters_name">
+<col class="parameters_description">
+<col width="200px" class="parameters_annotations">
+</colgroup>
+<tbody><tr>
+<td class="parameter_name"><p>variant_type</p></td>
+<td class="parameter_description"><p>a const GVariantType*</p></td>
+<td class="parameter_annotations"> </td>
+</tr></tbody>
+</table></div>
+</div>
+<p class="since">Since: <a class="link" href="api-index-2-50.html#api-index-2.50">2.50</a></p>
+</div>
+<hr>
+<div class="refsect2">
<a name="g-variant-builder-unref"></a><h3>g_variant_builder_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_variant_builder_unref (<em class="parameter"><code><a class="link" href="glib-GVariant.html#GVariantBuilder" title="struct GVariantBuilder"><span class="type">GVariantBuilder</span></a> *builder</code></em>);</pre>
<p>Don't call this on stack-allocated <a class="link" href="glib-GVariant.html#GVariantBuilder" title="struct GVariantBuilder"><span class="type">GVariantBuilder</span></a> instances or bad
things will happen.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.94.7"></a><h4>Parameters</h4>
+<a name="g-variant-builder-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>Don't call this on stack-allocated <a class="link" href="glib-GVariant.html#GVariantBuilder" title="struct GVariantBuilder"><span class="type">GVariantBuilder</span></a> instances or bad
things will happen.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.95.6"></a><h4>Parameters</h4>
+<a name="g-variant-builder-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.95.7"></a><h4>Returns</h4>
+<a name="g-variant-builder-ref.returns"></a><h4>Returns</h4>
<p> a new reference to <em class="parameter"><code>builder</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
the stack of the calling function and initialise it with
<a class="link" href="glib-GVariant.html#g-variant-builder-init" title="g_variant_builder_init ()"><code class="function">g_variant_builder_init()</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.96.7"></a><h4>Parameters</h4>
+<a name="g-variant-builder-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.96.8"></a><h4>Returns</h4>
+<a name="g-variant-builder-new.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-GVariant.html#GVariantBuilder" title="struct GVariantBuilder"><span class="type">GVariantBuilder</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
this function.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.97.11"></a><h4>Parameters</h4>
+<a name="g-variant-builder-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
to call this function on uninitialised memory.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.98.8"></a><h4>Parameters</h4>
+<a name="g-variant-builder-clear.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
instance takes ownership of <em class="parameter"><code>value</code></em>
.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.99.7"></a><h4>Parameters</h4>
+<a name="g-variant-builder-add-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>Note that the arguments must be of the correct width for their types
specified in <em class="parameter"><code>format_string</code></em>
. This can be achieved by casting them. See
-the <a href="gvariant-format-strings.html#gvariant-varargs">GVariant varargs documentation</a>.</p>
+the GVariant varargs documentation.</p>
<p>This function might be used as follows:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<p></p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.100.11"></a><h4>Parameters</h4>
+<a name="g-variant-builder-add.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>Note that the arguments must be of the correct width for their types
specified in <em class="parameter"><code>format_string</code></em>
. This can be achieved by casting them. See
-the <a href="gvariant-format-strings.html#gvariant-varargs">GVariant varargs documentation</a>.</p>
+the GVariant varargs documentation.</p>
<p>This function might be used as follows:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<span class="gtkdoc kwb">int</span> i<span class="gtkdoc opt">;</span>
<span class="function"><a href="glib-GVariant.html#g-variant-builder-init">g_variant_builder_init</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">,</span> G_VARIANT_TYPE_ARRAY<span class="gtkdoc opt">);</span>
- <span class="function"><a href="glib-GVariant.html#g-variant-builder-add-parsed">g_variant_builder_add_parsed</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">,</span> <span class="string">"{'width', <%i>}"</span><span class="gtkdoc opt">,</span> <span class="number">600</span><span class="gtkdoc opt">);</span>
- <span class="function"><a href="glib-GVariant.html#g-variant-builder-add-parsed">g_variant_builder_add_parsed</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">,</span> <span class="string">"{'title', <%s>}"</span><span class="gtkdoc opt">,</span> <span class="string">"foo"</span><span class="gtkdoc opt">);</span>
- <span class="function"><a href="glib-GVariant.html#g-variant-builder-add-parsed">g_variant_builder_add_parsed</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">,</span> <span class="string">"{'transparency', <0.5>}"</span><span class="gtkdoc opt">);</span>
+ <span class="function"><a href="glib-GVariant.html#g-variant-builder-add-parsed">g_variant_builder_add_parsed</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">,</span> <span class="string">"{'width', <%i>}"</span><span class="gtkdoc opt">,</span> <span class="number">600</span><span class="gtkdoc opt">);</span>
+ <span class="function"><a href="glib-GVariant.html#g-variant-builder-add-parsed">g_variant_builder_add_parsed</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">,</span> <span class="string">"{'title', <%s>}"</span><span class="gtkdoc opt">,</span> <span class="string">"foo"</span><span class="gtkdoc opt">);</span>
+ <span class="function"><a href="glib-GVariant.html#g-variant-builder-add-parsed">g_variant_builder_add_parsed</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">,</span> <span class="string">"{'transparency', <0.5>}"</span><span class="gtkdoc opt">);</span>
<span class="keyword">return</span> <span class="function"><a href="glib-GVariant.html#g-variant-builder-end">g_variant_builder_end</a></span> <span class="gtkdoc opt">(&</span>builder<span class="gtkdoc opt">);</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
<p></p>
<div class="refsect3">
-<a name="id-1.6.19.7.101.10"></a><h4>Parameters</h4>
+<a name="g-variant-builder-add-parsed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
in any way after this call
except for reference counting operations (in the case of a
heap-allocated <a class="link" href="glib-GVariant.html#GVariantBuilder" title="struct GVariantBuilder"><span class="type">GVariantBuilder</span></a>) or by reinitialising it with
-<a class="link" href="glib-GVariant.html#g-variant-builder-init" title="g_variant_builder_init ()"><code class="function">g_variant_builder_init()</code></a> (in the case of stack-allocated).</p>
+<a class="link" href="glib-GVariant.html#g-variant-builder-init" title="g_variant_builder_init ()"><code class="function">g_variant_builder_init()</code></a> (in the case of stack-allocated). This
+means that for the stack-allocated builders there is no need to
+call <a class="link" href="glib-GVariant.html#g-variant-builder-clear" title="g_variant_builder_clear ()"><code class="function">g_variant_builder_clear()</code></a> after the call to
+<a class="link" href="glib-GVariant.html#g-variant-builder-end" title="g_variant_builder_end ()"><code class="function">g_variant_builder_end()</code></a>.</p>
<p>It is an error to call this function in any way that would create an
inconsistent value to be constructed (ie: insufficient number of
items added to a container with a specific number of children
have been added; in this case it is impossible to infer the type of
the empty array.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.102.7"></a><h4>Parameters</h4>
+<a name="g-variant-builder-end.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.102.8"></a><h4>Returns</h4>
+<a name="g-variant-builder-end.returns"></a><h4>Returns</h4>
<p> a new, floating, <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
inconsistent value to be constructed (ie: adding too many values or
a value of an incorrect type).</p>
<div class="refsect3">
-<a name="id-1.6.19.7.103.6"></a><h4>Parameters</h4>
+<a name="g-variant-builder-open.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
inconsistent value to be constructed (ie: too few values added to the
subcontainer).</p>
<div class="refsect3">
-<a name="id-1.6.19.7.104.6"></a><h4>Parameters</h4>
+<a name="g-variant-builder-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>Don't call this on stack-allocated <a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a> instances or bad
things will happen.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.105.7"></a><h4>Parameters</h4>
+<a name="g-variant-dict-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p>Don't call this on stack-allocated <a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a> instances or bad
things will happen.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.106.6"></a><h4>Parameters</h4>
+<a name="g-variant-dict-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.106.7"></a><h4>Returns</h4>
+<a name="g-variant-dict-ref.returns"></a><h4>Returns</h4>
<p> a new reference to <em class="parameter"><code>dict</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
<a class="link" href="glib-GVariant.html#g-variant-dict-init" title="g_variant_dict_init ()"><code class="function">g_variant_dict_init()</code></a>. This is particularly useful when you are
using <a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a> to construct a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.107.7"></a><h4>Parameters</h4>
+<a name="g-variant-dict-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.107.8"></a><h4>Returns</h4>
+<a name="g-variant-dict-new.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<a class="link" href="glib-GVariant.html#g-variant-dict-new" title="g_variant_dict_new ()"><code class="function">g_variant_dict_new()</code></a> instead of this function.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
-<a name="id-1.6.19.7.108.9"></a><h4>Parameters</h4>
+<a name="g-variant-dict-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
to <a class="link" href="glib-GVariant.html#g-variant-dict-clear" title="g_variant_dict_clear ()"><code class="function">g_variant_dict_clear()</code></a> but it is not valid to call this function
on uninitialised memory.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.109.7"></a><h4>Parameters</h4>
+<a name="g-variant-dict-clear.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
exists in <em class="parameter"><code>dict</code></em>
.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.110.5"></a><h4>Parameters</h4>
+<a name="g-variant-dict-contains.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.110.6"></a><h4>Returns</h4>
+<a name="g-variant-dict-contains.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>key</code></em>
is in <em class="parameter"><code>dict</code></em>
</p>
<p><em class="parameter"><code>format_string</code></em>
determines the C types that are used for unpacking the
values and also determines if the values are copied or borrowed, see the
-section on <a href="gvariant-format-strings.html#gvariant-format-strings-pointers">GVariant format strings</a>.</p>
+section on GVariant format strings.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.111.7"></a><h4>Parameters</h4>
+<a name="g-variant-dict-lookup.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.111.8"></a><h4>Returns</h4>
+<a name="g-variant-dict-lookup.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a value was unpacked</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-40.html#api-index-2.40">2.40</a></p>
was specified then any non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> return
value will have this type.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.112.8"></a><h4>Parameters</h4>
+<a name="g-variant-dict-lookup-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.112.9"></a><h4>Returns</h4>
+<a name="g-variant-dict-lookup-value.returns"></a><h4>Returns</h4>
<p> the value of the dictionary key, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p>This call is a convenience wrapper that is exactly equivalent to
calling <a class="link" href="glib-GVariant.html#g-variant-new" title="g_variant_new ()"><code class="function">g_variant_new()</code></a> followed by <a class="link" href="glib-GVariant.html#g-variant-dict-insert-value" title="g_variant_dict_insert_value ()"><code class="function">g_variant_dict_insert_value()</code></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.113.6"></a><h4>Parameters</h4>
+<a name="g-variant-dict-insert.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<p><em class="parameter"><code>value</code></em>
is consumed if it is floating.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.114.6"></a><h4>Parameters</h4>
+<a name="g-variant-dict-insert-value.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
<p>Removes a key and its associated value from a <a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a>.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.115.5"></a><h4>Parameters</h4>
+<a name="g-variant-dict-remove.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.115.6"></a><h4>Returns</h4>
+<a name="g-variant-dict-remove.returns"></a><h4>Returns</h4>
<p> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the key was found and removed</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-40.html#api-index-2.40">2.40</a></p>
<a class="link" href="glib-GVariant.html#GVariantDict" title="struct GVariantDict"><span class="type">GVariantDict</span></a>) or by reinitialising it with <a class="link" href="glib-GVariant.html#g-variant-dict-init" title="g_variant_dict_init ()"><code class="function">g_variant_dict_init()</code></a> (in
the case of stack-allocated).</p>
<div class="refsect3">
-<a name="id-1.6.19.7.116.6"></a><h4>Parameters</h4>
+<a name="g-variant-dict-end.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.116.7"></a><h4>Returns</h4>
+<a name="g-variant-dict-end.returns"></a><h4>Returns</h4>
<p> a new, floating, <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
-<a name="G-VARIANT-PARSE-ERROR:CAPS"></a><h3>G_VARIANT_PARSE_ERROR</h3>
-<pre class="programlisting">#define G_VARIANT_PARSE_ERROR (g_variant_parse_error_quark ())
-</pre>
-<p>Error domain for GVariant text format parsing. Specific error codes
-are not currently defined for this domain. See <a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for
-information on error domains.</p>
-</div>
-<hr>
-<div class="refsect2">
<a name="g-variant-parse"></a><h3>g_variant_parse ()</h3>
<pre class="programlisting"><a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="returnvalue">GVariant</span></a> *
g_variant_parse (<em class="parameter"><code>const <a class="link" href="glib-GVariantType.html#GVariantType" title="GVariantType"><span class="type">GVariantType</span></a> *type</code></em>,
<p>Parses a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> from a text representation.</p>
<p>A single <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> is parsed from the content of <em class="parameter"><code>text</code></em>
.</p>
-<p>The format is described <a href="gvariant-text.html">here</a>.</p>
+<p>The format is described here.</p>
<p>The memory at <em class="parameter"><code>limit</code></em>
will never be accessed and the parser behaves as
if the character at <em class="parameter"><code>limit</code></em>
<p>Officially, the language understood by the parser is "any string
produced by <a class="link" href="glib-GVariant.html#g-variant-print" title="g_variant_print ()"><code class="function">g_variant_print()</code></a>".</p>
<div class="refsect3">
-<a name="id-1.6.19.7.118.13"></a><h4>Parameters</h4>
+<a name="g-variant-parse.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.118.14"></a><h4>Returns</h4>
+<a name="g-variant-parse.returns"></a><h4>Returns</h4>
<p> a non-floating reference to a <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a></p>
</div>
</div>
must be of the correct width for their types
specified in <em class="parameter"><code>format</code></em>
when collected into the <span class="type">va_list</span>. See
-the <a href="gvariant-format-strings.html#gvariant-varargs">GVariant varargs documentation</a>.</p>
+the GVariant varargs documentation.</p>
<p>In order to behave correctly in all cases it is necessary for the
calling function to <a class="link" href="glib-GVariant.html#g-variant-ref-sink" title="g_variant_ref_sink ()"><code class="function">g_variant_ref_sink()</code></a> the return result before
returning control to the user that originally provided the pointer.
result. This can also be done by adding the result to a container,
or by passing it to another <a class="link" href="glib-GVariant.html#g-variant-new" title="g_variant_new ()"><code class="function">g_variant_new()</code></a> call.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.119.9"></a><h4>Parameters</h4>
+<a name="g-variant-new-parsed-va.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.119.10"></a><h4>Returns</h4>
+<a name="g-variant-new-parsed-va.returns"></a><h4>Returns</h4>
<p> a new, usually floating, <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a></p>
</div>
</div>
<p>Note that the arguments must be of the correct width for their types
specified in <em class="parameter"><code>format</code></em>
. This can be achieved by casting them. See
-the <a href="gvariant-format-strings.html#gvariant-varargs">GVariant varargs documentation</a>.</p>
+the GVariant varargs documentation.</p>
<p>Consider this simple example:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
- <td class="listing_code"><pre class="programlisting"><span class="function"><a href="glib-GVariant.html#g-variant-new-parsed">g_variant_new_parsed</a></span> <span class="gtkdoc opt">(</span><span class="string">"[('one', 1), ('two', %i), (%s, 3)]"</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="string">"three"</span><span class="gtkdoc opt">);</span></pre></td>
+ <td class="listing_code"><pre class="programlisting"><span class="function"><a href="glib-GVariant.html#g-variant-new-parsed">g_variant_new_parsed</a></span> <span class="gtkdoc opt">(</span><span class="string">"[('one', 1), ('two', %i), (%s, 3)]"</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="string">"three"</span><span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
- <td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt">[(</span><span class="string">'one'</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">), (</span><span class="string">'two'</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">), (</span><span class="string">'three'</span><span class="gtkdoc opt">,</span> <span class="number">3</span><span class="gtkdoc opt">)]</span></pre></td>
+ <td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt">[(</span><span class="string">'one'</span><span class="gtkdoc opt">,</span> <span class="number">1</span><span class="gtkdoc opt">), (</span><span class="string">'two'</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">), (</span><span class="string">'three'</span><span class="gtkdoc opt">,</span> <span class="number">3</span><span class="gtkdoc opt">)]</span></pre></td>
</tr>
</tbody>
</table>
be anything along the lines of "%*", "%?", "%r", or anything starting
with "%@".</p>
<div class="refsect3">
-<a name="id-1.6.19.7.120.15"></a><h4>Parameters</h4>
+<a name="g-variant-new-parsed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.120.16"></a><h4>Returns</h4>
+<a name="g-variant-new-parsed.returns"></a><h4>Returns</h4>
<p> a new floating <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instance</p>
</div>
</div>
2
3</pre></td>
<td class="listing_code"><pre class="programlisting">unterminated string constant<span class="gtkdoc opt">:</span>
- <span class="gtkdoc opt">(</span><span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="number">3</span><span class="gtkdoc opt">,</span> <span class="string">'abc</span>
+ <span class="gtkdoc opt">(</span><span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="number">3</span><span class="gtkdoc opt">,</span> <span class="string">'abc</span>
<span class="string"> ^^^^</span></pre></td>
</tr>
</tbody>
2
3</pre></td>
<td class="listing_code"><pre class="programlisting">unable to find a common type<span class="gtkdoc opt">:</span>
- <span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="number">3</span><span class="gtkdoc opt">,</span> <span class="string">'str'</span><span class="gtkdoc opt">]</span>
+ <span class="gtkdoc opt">[</span><span class="number">1</span><span class="gtkdoc opt">,</span> <span class="number">2</span><span class="gtkdoc opt">,</span> <span class="number">3</span><span class="gtkdoc opt">,</span> <span class="string">'str'</span><span class="gtkdoc opt">]</span>
<span class="gtkdoc opt">^ ^^^^^</span></pre></td>
</tr>
</tbody>
<a class="link" href="glib-GVariant.html#g-variant-parse" title="g_variant_parse ()"><code class="function">g_variant_parse()</code></a> then you must add nul termination before using this
function.</p>
<div class="refsect3">
-<a name="id-1.6.19.7.121.14"></a><h4>Parameters</h4>
+<a name="g-variant-parse-error-print-context.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
</table></div>
</div>
<div class="refsect3">
-<a name="id-1.6.19.7.121.15"></a><h4>Returns</h4>
+<a name="g-variant-parse-error-print-context.returns"></a><h4>Returns</h4>
<p> the printed message. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<a name="GVariantClass"></a><h3>enum GVariantClass</h3>
<p>The range of possible top-level types of <a class="link" href="glib-GVariant.html#GVariant" title="GVariant"><span class="type">GVariant</span></a> instances.</p>
<div class="refsect3">
-<a name="id-1.6.19.8.3.4"></a><h4>Members</h4>
+<a name="GVariantClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<a name="GVariantParseError"></a><h3>enum GVariantParseError</h3>
<p>Error codes returned by parsing text-format GVariants.</p>
<div class="refsect3">
-<a name="id-1.6.19.8.7.4"></a><h4>Members</h4>
+<a name="GVariantParseError.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
</table></div>
</div>
</div>
+<hr>
+<div class="refsect2">
+<a name="G-VARIANT-PARSE-ERROR:CAPS"></a><h3>G_VARIANT_PARSE_ERROR</h3>
+<pre class="programlisting">#define G_VARIANT_PARSE_ERROR (g_variant_parse_error_quark ())
+</pre>
+<p>Error domain for GVariant text format parsing. Specific error codes
+are not currently defined for this domain. See <a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> for
+information on error domains.</p>
+</div>
</div>
<div class="refsect1">
<a name="glib-GVariant.see-also"></a><h2>See Also</h2>
</div>
</div>
<div class="footer">
-<hr>Generated by GTK-Doc V1.24</div>
+<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>
\ No newline at end of file