Package org.gnome.webkit
Interface AutomationSession.CreateWebViewCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
AutomationSession
- 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 AutomationSession.CreateWebViewCallback
extends FunctionPointer
Functional interface declaration of the
CreateWebViewCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionrun()
This signal is emitted when the automation client requests a new browsing context to interact with it.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment)
method.default MemorySegment
upcall
(MemorySegment sourceAutomationSession) Theupcall
method is called from native code.
-
Method Details
-
run
WebView run()This signal is emitted when the automation client requests a new browsing context to interact with it. The callback handler should return aWebKitWebView
created withWebKitWebView
:is-controlled-by-automation construct property enabled andWebKitWebView
:automation-presentation-type construct property set if needed.If the signal is emitted with "tab" detail, the returned
WebKitWebView
should be a new web view added to a new tab of the current browsing context window. If the signal is emitted with "window" detail, the returnedWebKitWebView
should be a new web view added to a new window. When creating a new web view and there's an active browsing context, the new window or tab shouldn't be focused. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun()
is executed. -
toCallback
Creates a native function pointer to theupcall(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
-