Package org.gnome.webkit
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 TypeMethodDescriptionboolean
Emitted when an error occurs during a load operation.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment sourceWebView, int loadEvent, MemorySegment failingUri, MemorySegment error) Theupcall
method 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 pageloadEvent
will beLoadEvent.STARTED
. If it happened while loading a committed data sourceloadEvent
will beLoadEvent.COMMITTED
. Since a load error causes the load operation to finish, the signal WebKitWebView::load-changed will always be emitted withLoadEvent.FINISHED
event 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) Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.webkit.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:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-