Interface ClearHandleFunc

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 ClearHandleFunc extends FunctionPointer

Functional interface declaration of the ClearHandleFunc callback.

See Also:
  • Method Details

    • run

      void run(int handleId)
      Specifies the type of function passed to GLib.clearHandleId(MemorySegment, ClearHandleFunc) The implementation is expected to free the resource identified by handleId; for instance, if handleId is a GLib.Source ID, Source.remove(int) can be used.
      Parameters:
      handleId - the handle ID to clear
      Since:
      2.56
    • upcall

      default void upcall(int handleId)
      The upcall method is called from native code. The parameters are marshaled and run(int) is executed.
    • toCallback

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