Package org.webkitgtk
Interface Download.DecideDestinationCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
Download
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface Download.DecideDestinationCallback
extends FunctionPointer
Functional interface declaration of the
DecideDestinationCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanThis signal is emitted after response is received to decide a destination for the download using webkit_download_set_destination().default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment sourceDownload, MemorySegment suggestedFilename) Theupcallmethod is called from native code.
-
Method Details
-
run
This signal is emitted after response is received to decide a destination for the download using webkit_download_set_destination(). If this signal is not handled, the file will be downloaded toUserDirectory.DIRECTORY_DOWNLOADdirectory usingsuggestedFilename.Since 2.40, you may handle this signal asynchronously by returning
truewithout calling webkit_download_set_destination(). This indicates intent to eventually call webkit_download_set_destination(). In this case, the download will not proceed until the destination is set or cancelled with webkit_download_cancel(). -
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(java.lang.String)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, 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
-