Interface OptionsFunc
- 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 OptionsFunc
extends FunctionPointer
Functional interface declaration of the OptionsFunc callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(String option, OptionType type, @Nullable String description) Function used to iterate options.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, int, MemorySegment, MemorySegment)method.default intupcall(MemorySegment option, int type, MemorySegment description, MemorySegment userData) Theupcallmethod is called from native code.
-
Method Details
-
run
Function used to iterate options.
Not that
descriptionstring is not localized.- Parameters:
option- the option nametype- the optionJSCOptionTypedescription- the option description, ornull- Returns:
trueto stop the iteration, orfalseotherwise- Since:
- 2.24
-
upcall
default int upcall(MemorySegment option, int type, MemorySegment description, MemorySegment userData) Theupcallmethod is called from native code. The parameters are marshaled andrun(String, OptionType, String)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, int, MemorySegment, MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-