Class StyleSchemeManager

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class StyleSchemeManager extends GObject
Provides access to StyleSchemes.
  • Constructor Details

    • StyleSchemeManager

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

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

    • getType

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

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

      protected StyleSchemeManager 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
    • getDefault

      public static StyleSchemeManager getDefault()
      Returns the default GtkSourceStyleSchemeManager instance.
      Returns:
      a GtkSourceStyleSchemeManager. Return value is owned by GtkSourceView library and must not be unref'ed.
    • appendSearchPath

      public void appendSearchPath(String path)

      Appends path to the list of directories where the this StyleSchemeManager looks for style scheme files.

      See setSearchPath(String[]) for details.

      Parameters:
      path - a directory or a filename.
    • forceRescan

      public void forceRescan()

      Mark any currently cached information about the available style schems as invalid.

      All the available style schemes will be reloaded next time the this StyleSchemeManager is accessed.

    • getScheme

      public @Nullable StyleScheme getScheme(String schemeId)
      Looks up style scheme by id.
      Parameters:
      schemeId - style scheme id to find.
      Returns:
      a GtkSourceStyleScheme object. The returned value is owned by this StyleSchemeManager and must not be unref'ed.
    • getSchemeIds

      public @Nullable String @Nullable [] getSchemeIds()
      Returns the ids of the available style schemes.
      Returns:
      a null-terminated array of strings containing the ids of the available style schemes or null if no style scheme is available. The array is sorted alphabetically according to the scheme name. The array is owned by the this StyleSchemeManager and must not be modified.
    • getSearchPath

      public String[] getSearchPath()

      Returns the current search path for the manager.

      See setSearchPath(String[]) for details.

      Returns:
      a null-terminated array of string containing the search path. The array is owned by the this StyleSchemeManager and must not be modified.
    • prependSearchPath

      public void prependSearchPath(String path)

      Prepends path to the list of directories where the this StyleSchemeManager looks for style scheme files.

      See setSearchPath(String[]) for details.

      Parameters:
      path - a directory or a filename.
    • setSearchPath

      public void setSearchPath(@Nullable String @Nullable [] path)

      Sets the list of directories where the this StyleSchemeManager looks for style scheme files.

      If path is null, the search path is reset to default.

      Since GtkSourceView 5.16 this function will allow you to provide paths in the form of "resource:///" URIs to embedded GResources. They must contain the path of a directory within the GResource.

      Parameters:
      path - a null-terminated array of strings or null.
    • builder

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