Package org.gnome.webkit
Class AutomationSession.Builder<B extends AutomationSession.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.webkit.AutomationSession.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
AutomationSession
public static class AutomationSession.Builder<B extends AutomationSession.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theAutomationSession
object.onCreateWebView
(@Nullable String detail, AutomationSession.CreateWebViewCallback handler) This signal is emitted when the automation client requests a new browsing context to interact with it.This signal is emitted when the given automation session is about to finish.The session unique identifier.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theAutomationSession
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toAutomationSession
.- Overrides:
build
in classGObject.Builder<B extends AutomationSession.Builder<B>>
- Returns:
- a new instance of
AutomationSession
with the properties that were set in the Builder object. - Throws:
UnsupportedPlatformException
- when run on an unsupported platform
-
setId
-
onCreateWebView
public B onCreateWebView(@Nullable @Nullable String detail, AutomationSession.CreateWebViewCallback handler) 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.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWillClose
This signal is emitted when the given automation session is about to finish. It allows clients to perform any cleanup tasks before the session is destroyed.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-