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.

@FunctionalInterface public static interface WebView.LoadFailedCallback extends FunctionPointer

Functional interface declaration of the LoadFailedCallback callback.

See Also:
  • Method Details

    • run

      boolean run(LoadEvent loadEvent, String failingUri, @Nullable GError error)

      Emitted when an error occurs during a load operation. If the error happened when starting to load data for a page loadEvent will be LoadEvent.STARTED. If it happened while loading a committed data source loadEvent will be LoadEvent.COMMITTED. Since a load error causes the load operation to finish, the signal WebKitWebView::load-changed will always be emitted with LoadEvent.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)
      The upcall method is called from native code. The parameters are marshaled and run(LoadEvent, String, GError) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, int, MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer