Method
GLibVariantBuilderadd_parsed
since: 2.26
Declaration [src]
void
g_variant_builder_add_parsed (
GVariantBuilder* builder,
const gchar* format,
...
)
Description [src]
Adds to a GVariantBuilder
.
This call is a convenience wrapper that is exactly equivalent to
calling g_variant_new_parsed()
followed by g_variant_builder_add_value().
Note that the arguments must be of the correct width for their types
specified in format_string
. This can be achieved by casting them. See
the GVariant varargs documentation.
This function might be used as follows:
GVariant *
make_pointless_dictionary (void)
{
GVariantBuilder builder;
int i;
g_variant_builder_init_static (&builder, G_VARIANT_TYPE_ARRAY);
g_variant_builder_add_parsed (&builder, "{'width', <%i>}", 600);
g_variant_builder_add_parsed (&builder, "{'title', <%s>}", "foo");
g_variant_builder_add_parsed (&builder, "{'transparency', <0.5>}");
return g_variant_builder_end (&builder);
}
Available since: 2.26
This method is not directly available to language bindings.