Interface SourceFuncsCheckFunc

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

Functional interface declaration of the SourceFuncsCheckFunc callback.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    run(Source source)
    Checks if the source is ready to be dispatched.
    Creates a native function pointer to the upcall(MemorySegment) method.
    default int
    The upcall method is called from native code.
  • Method Details

    • run

      boolean run(Source source)

      Checks if the source is ready to be dispatched.

      Called after all the file descriptors are polled. The source should return true if it is ready to be dispatched. Note that some time may have passed since the previous prepare function was called, so the source should be checked again here.

      Since 2.36 this may be NULL, in which case the effect is as if the function always returns FALSE.

      Parameters:
      source - The GSource
      Returns:
      true if ready to be dispatched, false otherwise
      Since:
      2.82
    • upcall

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

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