Glib::VariantType(3)

✨ NAME ✨

okay bestie, welcome to the Glib::VariantType(3) page from the User Contributed Perl Documentation πŸ’– this one is all about Glib::VariantType β€” utilities for dealing with the GVariant type system. That’s the whole vibe. Slay.

🧬 HIERARCHY 🧬

Glib::VariantType sits under Glib::Boxed like this:

Glib::Boxed
+----Glib::VariantType

πŸ’… METHODS πŸ’…

  • varianttype = Glib::VariantType->new ($type_string) β€” constructor moment; it takes a type string and gives you back a varianttype.
    • $type_string β€” type: string
  • varianttype = Glib::VariantType->new_array ($element) β€” constructor for the array situation, using $element.
    • $element β€” type: Glib::VariantType
  • varianttype = Glib::VariantType->new_dict_entry ($key, $value) β€” constructor for a dict entry, with $key and $value.
    • $key β€” type: Glib::VariantType
    • $value β€” type: Glib::VariantType
  • varianttype = Glib::VariantType->new_maybe ($element) β€” constructor with $element, maybe-core πŸ’€
    • $element β€” type: Glib::VariantType
  • varianttype = Glib::VariantType->new_tuple ($items) β€” constructor for a tuple, taking $items.
    • $items β€” type: scalar
  • varianttype = $type->element β€” returns a varianttype.
  • boolean = $type1->equal ($type2) β€” boolean check between $type1 and $type2; returns a boolean.
    • $type2 β€” type: Glib::VariantType
  • varianttype = $type->first β€” returns a varianttype.
  • integer = $type->hash β€” returns an integer.
  • boolean = $type->is_array β€” returns a boolean.
  • boolean = $type->is_basic β€” returns a boolean.
  • boolean = $type->is_container β€” returns a boolean.
  • boolean = $type->is_definite β€” returns a boolean.
  • boolean = $type->is_dict_entry β€” returns a boolean.
  • boolean = $type->is_maybe β€” returns a boolean.
  • boolean = $type->is_subtype_of ($supertype) β€” boolean subtype check against $supertype; returns a boolean.
    • $supertype β€” type: Glib::VariantType
  • boolean = $type->is_tuple β€” returns a boolean.
  • boolean = $type->is_variant β€” returns a boolean.
  • varianttype = $type->key β€” returns a varianttype.
  • unsigned = $type->n_items β€” returns an unsigned.
  • varianttype = $type->next β€” returns a varianttype.
  • scalar = $type->get_string β€” returns a scalar.
  • boolean = Glib::VariantType::string_is_valid ($type_string) β€” boolean check for the type string; returns a boolean.
    • $type_string β€” type: string
  • (type_string, rest) = Glib::VariantType::string_scan ($string) β€” this one scans the start of $string for a complete type string and extracts it. If no type string can be found, an exception is thrown. 🫠 no cap, that’s the rule.
  • varianttype = $type->value β€” returns a varianttype.

πŸ‘€ SEE ALSO πŸ‘€

  • Glib
  • Glib::Boxed
  • Glib::Variant

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Glib for a full notice.


✿ This page is perl v5.42.0, dated 2023-09-05, and it is absolutely Glib::VariantType(3). Bye bestie! πŸ’…βœ¨

πŸ“¦ where this page comes from