Class Style

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Style extends GObject

Represents a style.

The GtkSourceStyle structure is used to describe text attributes which are set when given style is used.

  • Constructor Details

    • Style

      public Style(MemorySegment address)
      Create a Style instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Style

      public Style()
      Create a new Style.
  • Method Details

    • getType

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

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Style asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • apply

      public void apply(TextTag tag)

      This function modifies the TextTag properties that are related to the GtkSourceStyle properties. Other TextTag properties are left untouched.

      If this Style is non-null, applies this Style to tag.

      If this Style is null, the related *-set properties of TextTag are set to false.

      Parameters:
      tag - a GtkTextTag to apply styles to.
    • copy

      public Style copy()
      Creates a copy of style, that is a new GtkSourceStyle instance which has the same attributes set.
      Returns:
      copy of style, call g_object_unref() when you are done with it.
    • builder

      public static Style.Builder<? extends Style.Builder> builder()
      A Style.Builder object constructs a Style with the specified properties. Use the various set...() methods to set properties, and finish construction with Style.Builder.build().
      Returns:
      the builder object