Interface WebView.CreateCallback

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.CreateCallback extends FunctionPointer

Functional interface declaration of the CreateCallback callback.

See Also:
  • Method Details

    • run

      Widget run(@Nullable NavigationAction navigationAction)

      Emitted when the creation of a new WebKitWebView is requested. If this signal is handled the signal handler should return the newly created WebKitWebView.

      The WebKitNavigationAction parameter contains information about the navigation action that triggered this signal.

      The new WebKitWebView must be related to webView, see WebKitWebView:related-view for more details.

      The new WebKitWebView should not be displayed to the user until the WebKitWebView::ready-to-show signal is emitted.

      For creating views as response to automation tools requests, see the WebKitAutomationSession::create-web-view signal.

    • upcall

      default MemorySegment upcall(MemorySegment sourceWebView, MemorySegment navigationAction)
      The upcall method is called from native code. The parameters are marshaled and run(NavigationAction) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(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