- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A generic callback function for surface operations.
- Since:
- 1.12
-
Method Summary
Modifier and TypeMethodDescriptionvoid
A generic callback function for surface operations.default MemorySegment
toCallback
(Arena arena) Generates an upcall stub, a C function pointer that will callupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
.default void
upcall
(MemorySegment observer, MemorySegment target, MemorySegment data) The callback that is executed by native code.
-
Method Details
-
run
A generic callback function for surface operations.- Parameters:
target
- the observed surface- Since:
- 1.12
-
upcall
The callback that is executed by native code. This method marshals the parameters and callsrun(org.freedesktop.cairo.Surface)
.- Parameters:
observer
- theSurfaceObserver
, ignoredtarget
- the observed surfacedata
- ignored- Since:
- 1.12
-
toCallback
Generates an upcall stub, a C function pointer that will callupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
.- Parameters:
arena
- the arena in which the upcall stub will be allocated- Returns:
- the function pointer of the upcall stub
- Since:
- 1.12
-