Enum Class MarkupCollectType

java.lang.Object
java.lang.Enum<MarkupCollectType>
org.gnome.glib.MarkupCollectType
All Implemented Interfaces:
Serializable, Comparable<MarkupCollectType>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum MarkupCollectType extends Enum<MarkupCollectType> implements Enumeration

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 OPTIONAL.

It is likely that this enum will be extended in the future to support other types.

  • Enum Constant Details

    • INVALID

      public static final MarkupCollectType INVALID
      used to terminate the list of attributes to collect
    • STRING

      public static final MarkupCollectType STRING
      collect the string pointer directly from the attribute_values[] array. Expects a parameter of type (const char **). If OPTIONAL is specified and the attribute isn't present then the pointer will be set to null
    • STRDUP

      public static final MarkupCollectType STRDUP
      as with STRING, but expects a parameter of type (char **) and g_strdup()s the returned pointer. The pointer must be freed with g_free()
    • BOOLEAN

      public static final MarkupCollectType BOOLEAN
      expects a parameter of type (gboolean *) and parses the attribute value as a boolean. Sets 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"
    • TRISTATE

      public static final MarkupCollectType TRISTATE
      as with BOOLEAN, but in the case of a missing attribute a value is set that compares equal to neither false nor true OPTIONAL is implied
    • OPTIONAL

      public static final MarkupCollectType 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
  • Method Details

    • values

      public static MarkupCollectType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MarkupCollectType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<MarkupCollectType> of(int flags)
      Create a new EnumSet<MarkupCollectType> for the provided bitfield
      Parameters:
      flags - the MarkupCollectType bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<MarkupCollectType> of(MemorySegment address)
      Create a new EnumSet<MarkupCollectType> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address