Enum Class AttrType

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

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

The PangoAttrType distinguishes between different types of attributes.

Along with the predefined values, it is possible to allocate additional values for custom attributes using register(String). The predefined values are given below. The type of structure used to store the attribute is listed in parentheses after the description.

  • Enum Constant Details

    • INVALID

      public static final AttrType INVALID
      does not happen
    • LANGUAGE

      public static final AttrType LANGUAGE
      language (Pango.AttrLanguage)
    • FAMILY

      public static final AttrType FAMILY
      font family name list (Pango.AttrString)
    • STYLE

      public static final AttrType STYLE
      font slant style (Pango.AttrInt)
    • WEIGHT

      public static final AttrType WEIGHT
      font weight (Pango.AttrInt)
    • VARIANT

      public static final AttrType VARIANT
      font variant (normal or small caps) (Pango.AttrInt)
    • STRETCH

      public static final AttrType STRETCH
      font stretch (Pango.AttrInt)
    • SIZE

      public static final AttrType SIZE
      font size in points scaled by PANGO_SCALE (Pango.AttrInt)
    • FONT_DESC

      public static final AttrType FONT_DESC
      font description (Pango.AttrFontDesc)
    • FOREGROUND

      public static final AttrType FOREGROUND
      foreground color (Pango.AttrColor)
    • BACKGROUND

      public static final AttrType BACKGROUND
      background color (Pango.AttrColor)
    • UNDERLINE

      public static final AttrType UNDERLINE
      whether the text has an underline (Pango.AttrInt)
    • STRIKETHROUGH

      public static final AttrType STRIKETHROUGH
      whether the text is struck-through (Pango.AttrInt)
    • RISE

      public static final AttrType RISE
      baseline displacement (Pango.AttrInt)
    • SHAPE

      public static final AttrType SHAPE
      shape (Pango.AttrShape)
    • SCALE

      public static final AttrType SCALE
      font size scale factor (Pango.AttrFloat)
    • FALLBACK

      public static final AttrType FALLBACK
      whether fallback is enabled (Pango.AttrInt)
    • LETTER_SPACING

      public static final AttrType LETTER_SPACING
      letter spacing (PangoAttrInt)
    • UNDERLINE_COLOR

      public static final AttrType UNDERLINE_COLOR
      underline color (Pango.AttrColor)
    • STRIKETHROUGH_COLOR

      public static final AttrType STRIKETHROUGH_COLOR
      strikethrough color (Pango.AttrColor)
    • ABSOLUTE_SIZE

      public static final AttrType ABSOLUTE_SIZE
      font size in pixels scaled by PANGO_SCALE (Pango.AttrInt)
    • GRAVITY

      public static final AttrType GRAVITY
      base text gravity (Pango.AttrInt)
    • GRAVITY_HINT

      public static final AttrType GRAVITY_HINT
      gravity hint (Pango.AttrInt)
    • FONT_FEATURES

      public static final AttrType FONT_FEATURES
      OpenType font features (Pango.AttrFontFeatures). Since 1.38
    • FOREGROUND_ALPHA

      public static final AttrType FOREGROUND_ALPHA
      foreground alpha (Pango.AttrInt). Since 1.38
    • BACKGROUND_ALPHA

      public static final AttrType BACKGROUND_ALPHA
      background alpha (Pango.AttrInt). Since 1.38
    • ALLOW_BREAKS

      public static final AttrType ALLOW_BREAKS
      whether breaks are allowed (Pango.AttrInt). Since 1.44
    • SHOW

      public static final AttrType SHOW
      how to render invisible characters (Pango.AttrInt). Since 1.44
    • INSERT_HYPHENS

      public static final AttrType INSERT_HYPHENS
      whether to insert hyphens at intra-word line breaks (Pango.AttrInt). Since 1.44
    • OVERLINE

      public static final AttrType OVERLINE
      whether the text has an overline (Pango.AttrInt). Since 1.46
    • OVERLINE_COLOR

      public static final AttrType OVERLINE_COLOR
      overline color (Pango.AttrColor). Since 1.46
    • LINE_HEIGHT

      public static final AttrType LINE_HEIGHT
      line height factor (Pango.AttrFloat). Since: 1.50
    • ABSOLUTE_LINE_HEIGHT

      public static final AttrType ABSOLUTE_LINE_HEIGHT
      line height (Pango.AttrInt). Since: 1.50
    • TEXT_TRANSFORM

      public static final AttrType TEXT_TRANSFORM
    • WORD

      public static final AttrType WORD
      override segmentation to classify the range of the attribute as a single word (Pango.AttrInt). Since 1.50
    • SENTENCE

      public static final AttrType SENTENCE
      override segmentation to classify the range of the attribute as a single sentence (Pango.AttrInt). Since 1.50
    • BASELINE_SHIFT

      public static final AttrType BASELINE_SHIFT
      baseline displacement (Pango.AttrInt). Since 1.50
    • FONT_SCALE

      public static final AttrType FONT_SCALE
      font-relative size change (Pango.AttrInt). Since 1.50
  • Method Details

    • values

      public static AttrType[] 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 AttrType 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
    • of

      public static AttrType of(int value)
      Create a new AttrType for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

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

      public static AttrType of(MemorySegment address)
      Create a new AttrType for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the AttrType class.
      Returns:
      the GType
    • register

      public static AttrType register(String name)

      Allocate a new attribute type ID.

      The attribute type name can be accessed later by using getName().

      Parameters:
      name - an identifier for the type
      Returns:
      the new type ID.
    • getName

      public @Nullable String getName()

      Fetches the attribute type name.

      The attribute type name is the string passed in when registering the type using register(String).

      The returned value is an interned string (see g_intern_string() for what that means) that should not be modified or freed.

      Returns:
      the type ID name (which may be null), or null if this AttrType is a built-in Pango attribute type or invalid.
      Since:
      1.22