Package org.gnome.gsk
Interface PathForeachFunc
- 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("io.github.jwharm.JavaGI")
public interface PathForeachFunc
extends FunctionPointer
Functional interface declaration of the
PathForeachFunc callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(PathOperation op, @Nullable Point @Nullable [] pts, float weight) Type of the callback to iterate through the operations of a path.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(int, java.lang.foreign.MemorySegment, long, float, java.lang.foreign.MemorySegment)method.default intupcall(int op, MemorySegment pts, long nPts, float weight, MemorySegment userData) Theupcallmethod is called from native code.
-
Method Details
-
run
Type of the callback to iterate through the operations of a path.For each operation, the callback is given the
opitself, the points that the operation is applied to inpts,and aweightfor conic curves. ThenPtsargument is somewhat redundant, since the number of points can be inferred from the operation.Each contour of the path starts with a
GSKPATHMOVEoperation. Closed contours end with aGSKPATHCLOSEoperation. -
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(org.gnome.gsk.PathOperation, org.gnome.graphene.Point[], float)is executed. -
toCallback
Creates a native function pointer to theupcall(int, java.lang.foreign.MemorySegment, long, float, java.lang.foreign.MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-