Re: check GVariant

2018-10-13 Thread Damian Ivanov via gtk-list
Thank you it does work now!
On Fri, Oct 12, 2018 at 5:06 PM Jason Crain  wrote:
>
> On 2018-10-12, Damian Ivanov via gtk-list  wrote:
> > How do I check if the type of value is (ii) ?
> >   switch (g_variant_classify(value)) {
> > case G_VARIANT_CLASS_BOOLEAN:
> > return ;
> > case G_VARIANT_CLASS_BYTE:
> > return ;
> > case HOW_CHECK_ii :
>
> You may want to use the `g_variant_check_format_string`
> (https://developer.gnome.org/glib/2.56/glib-GVariant.html#g-variant-check-format-string)
> function instead of `g_variant_classify`.
>
> The `g_variant_classify` function will return G_VARIANT_CLASS_TUPLE for
> that type. Then you could get the children with
> `g_variant_get_child_value` and examine their classes.
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: check GVariant

2018-10-12 Thread Jason Crain
On 2018-10-12, Damian Ivanov via gtk-list  wrote:
> How do I check if the type of value is (ii) ?
>   switch (g_variant_classify(value)) {
> case G_VARIANT_CLASS_BOOLEAN:
> return ;
> case G_VARIANT_CLASS_BYTE:
> return ;
> case HOW_CHECK_ii :

You may want to use the `g_variant_check_format_string`
(https://developer.gnome.org/glib/2.56/glib-GVariant.html#g-variant-check-format-string)
function instead of `g_variant_classify`.

The `g_variant_classify` function will return G_VARIANT_CLASS_TUPLE for
that type. Then you could get the children with
`g_variant_get_child_value` and examine their classes.
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


check GVariant

2018-10-12 Thread Damian Ivanov via gtk-list
Hello,

How do I check if the type of value is (ii) ?
  switch (g_variant_classify(value)) {
case G_VARIANT_CLASS_BOOLEAN:
return ;
case G_VARIANT_CLASS_BYTE:
return ;
case HOW_CHECK_ii :

PS: the gtk/glib documentation online can not be reached as stable
point to an invalid location

Thanks in advance.
Damian
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list