Class WebInspector.Builder<B extends WebInspector.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
WebInspector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theWebInspector
object.onAttach
(WebInspector.AttachCallback handler) Emitted when the inspector is requested to be attached to the window where the inspected web view is.Emitted when the inspector should be shown.onClosed
(WebInspector.ClosedCallback handler) Emitted when the inspector page is closed.onDetach
(WebInspector.DetachCallback handler) Emitted when the inspector is requested to be detached from the window it is currently attached to.Emitted when the inspector is requested to open in a separate window.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 theWebInspector
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 toWebInspector
.- Overrides:
build
in classGObject.Builder<B extends WebInspector.Builder<B>>
- Returns:
- a new instance of
WebInspector
with the properties that were set in the Builder object. - Throws:
UnsupportedPlatformException
- when run on an unsupported platform
-
onAttach
Emitted when the inspector is requested to be attached to the window where the inspected web view is. If this signal is not handled the inspector view will be automatically attached to the inspected view, so you only need to handle this signal if you want to attach the inspector view yourself (for example, to add the inspector view to a browser tab).To prevent the inspector view from being attached you can connect to this signal and simply return
true
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onBringToFront
Emitted when the inspector should be shown.If the inspector is not attached the inspector window should be shown on top of any other windows. If the inspector is attached the inspector view should be made visible. For example, if the inspector view is attached using a tab in a browser window, the browser window should be raised and the tab containing the inspector view should be the active one. In both cases, if this signal is not handled, the default implementation calls gtk_window_present() on the current toplevel
GtkWindow
of the inspector view.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onClosed
Emitted when the inspector page is closed. If you are using your own inspector window, you should connect to this signal and destroy your window.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onDetach
Emitted when the inspector is requested to be detached from the window it is currently attached to. The inspector is detached when the inspector page is about to be closed, and this signal is emitted right beforeWebKitWebInspector
::closed, or when the user clicks on the detach button in the inspector view to show the inspector in a separate window. In this case the signalWebKitWebInspector
::open-window is emitted after this one.To prevent the inspector view from being detached you can connect to this signal and simply return
true
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onOpenWindow
Emitted when the inspector is requested to open in a separate window. If this signal is not handled, aGtkWindow
with the inspector will be created and shown, so you only need to handle this signal if you want to use your own window. This signal is emitted afterWebKitWebInspector
::detach to show the inspector in a separate window after being detached.To prevent the inspector from being shown you can connect to this signal and simply return
true
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-