webkit-0.12.6.1: Binding to the Webkit library.

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.WebKit.WebInspector

Contents

- Description
- Types
- Methods
- Attribute
- Signals

Description

Access to the WebKit Inspector

Synopsis

- data WebInspector
- class GObjectClass o => WebInspectorClass o
- webInspectorGetInspectedUri :: WebInspectorClass self => self -> IO String
- webInspectorGetWebView :: WebInspectorClass self => self -> IO (Maybe WebView)
- webInspectorInspectCoordinates :: WebInspectorClass self => self -> Int -> Int -> IO ()
- webInspectorShow :: WebInspectorClass self => self -> IO ()
- webInspectorClose :: WebInspectorClass self => self -> IO ()
- webInspectorInspectedUri :: WebInspectorClass self => ReadAttr self String
- webInspectorJSProfilingEnable :: WebInspectorClass self => Attr self Bool
- webInspectorTimelineProfilingEnabled :: WebInspectorClass self => Attr self Bool
- webInspectorWebView :: WebInspectorClass self => ReadAttr self WebView
- attachWindow :: WebInspectorClass self => Signal self (IO Bool)
- detachWindow :: WebInspectorClass self => Signal self (IO Bool)
- closeWindow :: WebInspectorClass self => Signal self (IO Bool)
- showWindow :: WebInspectorClass self => Signal self (IO Bool)
- finished :: WebInspectorClass self => Signal self (IO ())
- inspectWebView :: WebInspectorClass self => Signal self (WebView -> IO WebView)

# Description

The WebKit Inspector is a graphical tool to inspect and change the content of a WebKitWebView. It also includes an interactive JavaScriptDebugger. Using this class one can get a `Widget` which can be embedded into an application to show the inspector.

The inspector is available when the WebKitWebSettings of the WebKitWebView has set the `enableDeveloperExtras` to 1 otherwise no inspector is available.

# Types

data WebInspector

Instances

Eq WebInspector |
Ord WebInspector |
GObjectClass WebInspector |
WebInspectorClass WebInspector |

class GObjectClass o => WebInspectorClass o

Instances

WebInspectorClass WebInspector |

# Methods

webInspectorGetInspectedUri :: WebInspectorClass self => self -> IO String

Obtains the URI that is currently being inspected

webInspectorGetWebView :: WebInspectorClass self => self -> IO (Maybe WebView)

Obtains the `WebView` that is used to render the `WebInspector`.

The `WebView` instance is created by the application, by handling the "inspect-web-view" signal. This means that it may return `Nothing` if the user hasn't inspected anything

webInspectorInspectCoordinates

Arguments

:: WebInspectorClass self |
=> self | `webInspector` the WebKitWebInspector that will do the inspection
-> Int | `x` the X coordinate of the node to be inspected
-> Int | `y` the Y coordinate of the node to be inspected
-> IO () |

Causes the Web Inspector to inspect the node that is located at the given coordinates of the widget. The coordinates should be relative to the WebKitWebView widget, not to the scrollable content, and may be obtained from a `Event` directly.

This means x, and y being zero doesn't guarantee you will hit the left-most top corner of the content, since the contents may have been scrolled.

- Since 1.1.17

webInspectorShow :: WebInspectorClass self => self -> IO ()

Causes the Web Inspector to be shown.

- Since 1.1.17

webInspectorClose :: WebInspectorClass self => self -> IO ()

Causes the Web Inspector to be closed.

- Since 1.1.17

# Attribute

webInspectorInspectedUri :: WebInspectorClass self => ReadAttr self String

The URI that is currently being inspected.

webInspectorJSProfilingEnable :: WebInspectorClass self => Attr self Bool

This is enabling JavaScript profiling in the Inspector. This means that Console.profiles will return the profiles.

webInspectorTimelineProfilingEnabled :: WebInspectorClass self => Attr self Bool

This is enabling Timeline profiling in the Inspector.

Default value: `False`

- Since 1.1.17

webInspectorWebView :: WebInspectorClass self => ReadAttr self WebView

The Web View that renders the Web Inspector itself.

# Signals

attachWindow :: WebInspectorClass self => Signal self (IO Bool)

Emitted when the inspector should appear in a separate window

return True if the signal is handled

detachWindow :: WebInspectorClass self => Signal self (IO Bool)

Emitted when the inspector should appear in a separate window.

return True if the signal has been handled

closeWindow :: WebInspectorClass self => Signal self (IO Bool)

Emitted when the inspector window should be closed.

return True if the signal is handled.

showWindow :: WebInspectorClass self => Signal self (IO Bool)

Emitted when the inspector window should be displayed. Notice that the window must have been created already by handling `inspectWebView`.

return True if the signal has been handled

finished :: WebInspectorClass self => Signal self (IO ())

Emitted when the inspection is done. You should release your references on the inspector at this time. The inspected `WebView` may no longer exist when this signal is emitted.

inspectWebView :: WebInspectorClass self => Signal self (WebView -> IO WebView)

Emitted when the user activates the `inspect` context menu item to inspect a web view. The application which is interested in the inspector should create a window, or otherwise add the `WebView` it creates to an existing window.

You don't need to handle the reference count of the `WebView` instance you create; the widget to which you add it will do that.