Class CustomSorter

All Implemented Interfaces:
PointerInterface

public class CustomSorter extends Sorter
`GtkCustomSorter` is a `GtkSorter` implementation that sorts via a callback
function.

https://docs.gtk.org/gtk4/class.CustomSorter.html

  • Constructor Details

    • CustomSorter

      public CustomSorter(PointerContainer pointer)
    • CustomSorter

      public CustomSorter(CustomSorter.OnCompareDataFunc sort_func, @Nullable Pointer user_data, CustomSorter.OnDestroyNotify user_destroy)
      Creates a new `GtkSorter` that works by calling
      @sort_func to compare items.

      If @sort_func is %NULL, all items are considered equal.
      Parameters:
      sort_func - the `GCompareDataFunc` to use for sorting
      user_data - user data to pass to @sort_func
      user_destroy - destroy notify for @user_data
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setSortFunc

      public void setSortFunc(CustomSorter.OnCompareDataFunc sort_func, @Nullable Pointer user_data, CustomSorter.OnDestroyNotify user_destroy)
      Sets (or unsets) the function used for sorting items.

      If @sort_func 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 @user_destroy will be
      called now.
      Parameters:
      sort_func - function to sort items
      user_data - user data to pass to @match_func
      user_destroy - destroy notify for @user_data
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()