:right-sidebar: True MarkupCollectType =================================================================== .. currentmodule:: gi.repository.GLib .. class:: MarkupCollectType :no-contents-entry: A mixed enumerated type and flags field. You must specify one type (string, strdup, boolean, tristate). Additionally, you may optionally bitwise OR the type with the flag :const:`~gi.repository.GLib.MarkupCollectType.OPTIONAL`. It is likely that this enum will be extended in the future to support other types. Fields ------ .. rst-class:: interim-class .. class:: MarkupCollectType :no-index: .. attribute:: BOOLEAN Expects a parameter of type (gboolean *) and parses the attribute value as a boolean. Sets :const:`False` if the attribute isn't present. Valid boolean values consist of (case-insensitive) "false", "f", "no", "n", "0" and "true", "t", "yes", "y", "1" .. attribute:: INVALID Used to terminate the list of attributes to collect .. attribute:: OPTIONAL Can be bitwise ORed with the other fields. If present, allows the attribute not to appear. A default value is set depending on what value type is used .. attribute:: STRDUP As with :const:`~gi.repository.GLib.MarkupCollectType.STRING`, but expects a parameter of type (char **) and :func:`~gi.repository.GLib.strdup`s the returned pointer. The pointer must be freed with :func:`~gi.repository.GLib.free` .. attribute:: STRING Collect the string pointer directly from the attribute_values[] array. Expects a parameter of type (const char **). If :const:`~gi.repository.GLib.MarkupCollectType.OPTIONAL` is specified and the attribute isn't present then the pointer will be set to :const:`None` .. attribute:: TRISTATE As with :const:`~gi.repository.GLib.MarkupCollectType.BOOLEAN`, but in the case of a missing attribute a value is set that compares equal to neither :const:`False` nor :const:`True` G_MARKUP_COLLECT_OPTIONAL is implied