Interface StructureFilterMapFunc

All Superinterfaces:
FunctionPointer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Generated("org.javagi.JavaGI") public interface StructureFilterMapFunc extends FunctionPointer

Functional interface declaration of the StructureFilterMapFunc callback.

See Also:
  • Method Details

    • run

      boolean run(Quark fieldId, Value value)
      A function that will be called in gst_structure_filter_and_map_in_place(). The function may modify value, and the value will be removed from the structure if false is returned.
      Parameters:
      fieldId - the GQuark of the field name
      value - the GValue of the field
      Returns:
      true if the field should be preserved, false if it should be removed.
    • upcall

      default int upcall(int fieldId, MemorySegment value, MemorySegment userData)
      The upcall method is called from native code. The parameters are marshaled and run(Quark, Value) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(int, MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer