Package org.webkitgtk
Interface WebView.LoadFailedCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
WebView
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface declaration of the
LoadFailedCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanEmitted when an error occurs during a load operation.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment sourceWebView, int loadEvent, MemorySegment failingUri, MemorySegment error) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted when an error occurs during a load operation. If the error happened when starting to load data for a pageloadEventwill beLoadEvent.STARTED. If it happened while loading a committed data sourceloadEventwill beLoadEvent.COMMITTED. Since a load error causes the load operation to finish, the signal WebKitWebView::load-changed will always be emitted withLoadEvent.FINISHEDevent right after this one.By default, if the signal is not handled, a stock error page will be displayed. You need to handle the signal if you want to provide your own error page.
-
upcall
default int upcall(MemorySegment sourceWebView, int loadEvent, MemorySegment failingUri, MemorySegment error) Theupcallmethod is called from native code. The parameters are marshaled andrun(org.webkitgtk.LoadEvent, java.lang.String, org.gnome.glib.GError)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, 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
-