Class CustomFilter

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class CustomFilter extends Filter
Determines whether to include items with a callback.
  • Constructor Details

    • CustomFilter

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

      public CustomFilter(@Nullable CustomFilterFunc matchFunc)

      Creates a new filter using the given function to filter items.

      If matchFunc is NULL, the filter matches all items.

      If the filter func changes its filtering behavior, Filter.changed(FilterChange) needs to be called.

      Parameters:
      matchFunc - function to filter items
    • CustomFilter

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

    • getType

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

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

      protected CustomFilter 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 Filter
      Returns:
      the instance as if it were its parent type
    • setFilterFunc

      public void setFilterFunc(@Nullable CustomFilterFunc matchFunc)

      Sets the function used for filtering items.

      If matchFunc is NULL, the filter matches all items.

      If the filter func changes its filtering behavior, Filter.changed(FilterChange) needs to be called.

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

      Parameters:
      matchFunc - function to filter items
    • builder

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