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

public static class WebInspector.Builder<B extends WebInspector.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public WebInspector build()
      Finish building the WebInspector object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to WebInspector.
      Overrides:
      build in class GObject.Builder<B extends WebInspector.Builder<B>>
      Returns:
      a new instance of WebInspector with the properties that were set in the Builder object.
    • onAttach

      public B onAttach(WebInspector.AttachCallback handler)

      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

      public B onBringToFront(WebInspector.BringToFrontCallback handler)

      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

      public B onClosed(WebInspector.ClosedCallback handler)
      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

      public B onDetach(WebInspector.DetachCallback handler)

      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 before WebKitWebInspector::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 signal WebKitWebInspector::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

      public B onOpenWindow(WebInspector.OpenWindowCallback handler)

      Emitted when the inspector is requested to open in a separate window. If this signal is not handled, a GtkWindow 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 after WebKitWebInspector::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: