Class CustomSorter

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class CustomSorter extends Sorter
Sorts items via a callback function.
  • Constructor Details

    • CustomSorter

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

      public CustomSorter(@Nullable CompareDataFunc sortFunc)

      Creates a new GtkSorter that works by calling sortFunc to compare items.

      If sortFunc is null, all items are considered equal.

      Parameters:
      sortFunc - the GCompareDataFunc to use for sorting
    • CustomSorter

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

    • getType

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

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

      protected CustomSorter 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 Sorter
      Returns:
      the instance as if it were its parent type
    • setSortFunc

      public void setSortFunc(@Nullable CompareDataFunc sortFunc)

      Sets (or unsets) the function used for sorting items.

      If sortFunc is null, all items are considered equal.

      If the sort func changes its sorting behavior, gtk_sorter_changed() needs to be called.

      If a previous function was set, its userDestroy will be called now.

      Parameters:
      sortFunc - function to sort items
    • builder

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