Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype WebPage = WebPage (ManagedPtr WebPage)
- class (GObject o, IsDescendantOf WebPage o) => IsWebPage o
- toWebPage :: (MonadIO m, IsWebPage o) => o -> m WebPage
- noWebPage :: Maybe WebPage
- webPageGetDomDocument :: (HasCallStack, MonadIO m, IsWebPage a) => a -> m (Maybe DOMDocument)
- webPageGetEditor :: (HasCallStack, MonadIO m, IsWebPage a) => a -> m WebEditor
- webPageGetId :: (HasCallStack, MonadIO m, IsWebPage a) => a -> m Word64
- webPageGetMainFrame :: (HasCallStack, MonadIO m, IsWebPage a) => a -> m Frame
- webPageGetUri :: (HasCallStack, MonadIO m, IsWebPage a) => a -> m (Maybe Text)
- getWebPageUri :: (MonadIO m, IsWebPage o) => o -> m (Maybe Text)
- type C_WebPageConsoleMessageSentCallback = Ptr () -> Ptr ConsoleMessage -> Ptr () -> IO ()
- type WebPageConsoleMessageSentCallback = ConsoleMessage -> IO ()
- afterWebPageConsoleMessageSent :: (IsWebPage a, MonadIO m) => a -> WebPageConsoleMessageSentCallback -> m SignalHandlerId
- genClosure_WebPageConsoleMessageSent :: MonadIO m => WebPageConsoleMessageSentCallback -> m (GClosure C_WebPageConsoleMessageSentCallback)
- mk_WebPageConsoleMessageSentCallback :: C_WebPageConsoleMessageSentCallback -> IO (FunPtr C_WebPageConsoleMessageSentCallback)
- noWebPageConsoleMessageSentCallback :: Maybe WebPageConsoleMessageSentCallback
- onWebPageConsoleMessageSent :: (IsWebPage a, MonadIO m) => a -> WebPageConsoleMessageSentCallback -> m SignalHandlerId
- wrap_WebPageConsoleMessageSentCallback :: WebPageConsoleMessageSentCallback -> C_WebPageConsoleMessageSentCallback
- type C_WebPageContextMenuCallback = Ptr () -> Ptr ContextMenu -> Ptr WebHitTestResult -> Ptr () -> IO CInt
- type WebPageContextMenuCallback = ContextMenu -> WebHitTestResult -> IO Bool
- afterWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> WebPageContextMenuCallback -> m SignalHandlerId
- genClosure_WebPageContextMenu :: MonadIO m => WebPageContextMenuCallback -> m (GClosure C_WebPageContextMenuCallback)
- mk_WebPageContextMenuCallback :: C_WebPageContextMenuCallback -> IO (FunPtr C_WebPageContextMenuCallback)
- noWebPageContextMenuCallback :: Maybe WebPageContextMenuCallback
- onWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> WebPageContextMenuCallback -> m SignalHandlerId
- wrap_WebPageContextMenuCallback :: WebPageContextMenuCallback -> C_WebPageContextMenuCallback
- type C_WebPageDocumentLoadedCallback = Ptr () -> Ptr () -> IO ()
- type WebPageDocumentLoadedCallback = IO ()
- afterWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> WebPageDocumentLoadedCallback -> m SignalHandlerId
- genClosure_WebPageDocumentLoaded :: MonadIO m => WebPageDocumentLoadedCallback -> m (GClosure C_WebPageDocumentLoadedCallback)
- mk_WebPageDocumentLoadedCallback :: C_WebPageDocumentLoadedCallback -> IO (FunPtr C_WebPageDocumentLoadedCallback)
- noWebPageDocumentLoadedCallback :: Maybe WebPageDocumentLoadedCallback
- onWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> WebPageDocumentLoadedCallback -> m SignalHandlerId
- wrap_WebPageDocumentLoadedCallback :: WebPageDocumentLoadedCallback -> C_WebPageDocumentLoadedCallback
- type C_WebPageFormControlsAssociatedCallback = Ptr () -> Ptr (GPtrArray (Ptr DOMElement)) -> Ptr () -> IO ()
- type WebPageFormControlsAssociatedCallback = [DOMElement] -> IO ()
- afterWebPageFormControlsAssociated :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedCallback -> m SignalHandlerId
- genClosure_WebPageFormControlsAssociated :: MonadIO m => WebPageFormControlsAssociatedCallback -> m (GClosure C_WebPageFormControlsAssociatedCallback)
- mk_WebPageFormControlsAssociatedCallback :: C_WebPageFormControlsAssociatedCallback -> IO (FunPtr C_WebPageFormControlsAssociatedCallback)
- noWebPageFormControlsAssociatedCallback :: Maybe WebPageFormControlsAssociatedCallback
- onWebPageFormControlsAssociated :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedCallback -> m SignalHandlerId
- wrap_WebPageFormControlsAssociatedCallback :: WebPageFormControlsAssociatedCallback -> C_WebPageFormControlsAssociatedCallback
- type C_WebPageSendRequestCallback = Ptr () -> Ptr URIRequest -> Ptr URIResponse -> Ptr () -> IO CInt
- type WebPageSendRequestCallback = URIRequest -> URIResponse -> IO Bool
- afterWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> WebPageSendRequestCallback -> m SignalHandlerId
- genClosure_WebPageSendRequest :: MonadIO m => WebPageSendRequestCallback -> m (GClosure C_WebPageSendRequestCallback)
- mk_WebPageSendRequestCallback :: C_WebPageSendRequestCallback -> IO (FunPtr C_WebPageSendRequestCallback)
- noWebPageSendRequestCallback :: Maybe WebPageSendRequestCallback
- onWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> WebPageSendRequestCallback -> m SignalHandlerId
- wrap_WebPageSendRequestCallback :: WebPageSendRequestCallback -> C_WebPageSendRequestCallback
- type C_WebPageWillSubmitFormCallback = Ptr () -> Ptr DOMElement -> CUInt -> Ptr Frame -> Ptr Frame -> Ptr (GPtrArray CString) -> Ptr (GPtrArray CString) -> Ptr () -> IO ()
- type WebPageWillSubmitFormCallback = DOMElement -> FormSubmissionStep -> Frame -> Frame -> [Text] -> [Text] -> IO ()
- afterWebPageWillSubmitForm :: (IsWebPage a, MonadIO m) => a -> WebPageWillSubmitFormCallback -> m SignalHandlerId
- genClosure_WebPageWillSubmitForm :: MonadIO m => WebPageWillSubmitFormCallback -> m (GClosure C_WebPageWillSubmitFormCallback)
- mk_WebPageWillSubmitFormCallback :: C_WebPageWillSubmitFormCallback -> IO (FunPtr C_WebPageWillSubmitFormCallback)
- noWebPageWillSubmitFormCallback :: Maybe WebPageWillSubmitFormCallback
- onWebPageWillSubmitForm :: (IsWebPage a, MonadIO m) => a -> WebPageWillSubmitFormCallback -> m SignalHandlerId
- wrap_WebPageWillSubmitFormCallback :: WebPageWillSubmitFormCallback -> C_WebPageWillSubmitFormCallback
Exported types
Memory-managed wrapper type.
Instances
GObject WebPage Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebPage gobjectType :: IO GType # | |
HasParentTypes WebPage Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebPage | |
type ParentTypes WebPage Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebPage |
class (GObject o, IsDescendantOf WebPage o) => IsWebPage o Source #
Instances
(GObject o, IsDescendantOf WebPage o) => IsWebPage o Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebPage |
Methods
getDomDocument
webPageGetDomDocument Source #
:: (HasCallStack, MonadIO m, IsWebPage a) | |
=> a |
|
-> m (Maybe DOMDocument) | Returns: the |
Get the DOMDocument
currently loaded in webPage
getEditor
getId
:: (HasCallStack, MonadIO m, IsWebPage a) | |
=> a |
|
-> m Word64 | Returns: the identifier of |
Get the identifier of the WebPage
getMainFrame
:: (HasCallStack, MonadIO m, IsWebPage a) | |
=> a |
|
-> m Frame | Returns: the |
Returns the main frame of a WebPage
.
Since: 2.2
getUri
:: (HasCallStack, MonadIO m, IsWebPage a) | |
=> a |
|
-> m (Maybe Text) | Returns: the current active URI of |
Returns the current active URI of webPage
.
You can monitor the active URI by connecting to the notify::uri
signal of webPage
.
Properties
uri
The current active URI of the WebPage
.
getWebPageUri :: (MonadIO m, IsWebPage o) => o -> m (Maybe Text) Source #
Get the value of the “uri
” property.
When overloading is enabled, this is equivalent to
get
webPage #uri
Signals
consoleMessageSent
type C_WebPageConsoleMessageSentCallback = Ptr () -> Ptr ConsoleMessage -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type WebPageConsoleMessageSentCallback Source #
= ConsoleMessage |
|
-> IO () |
Emitted when a message is sent to the console. This can be a message
produced by the use of JavaScript console API, a JavaScript exception,
a security error or other errors, warnings, debug or log messages.
The consoleMessage
contains information of the message.
Since: 2.12
afterWebPageConsoleMessageSent :: (IsWebPage a, MonadIO m) => a -> WebPageConsoleMessageSentCallback -> m SignalHandlerId Source #
Connect a signal handler for the “console-message-sent
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
webPage #consoleMessageSent callback
genClosure_WebPageConsoleMessageSent :: MonadIO m => WebPageConsoleMessageSentCallback -> m (GClosure C_WebPageConsoleMessageSentCallback) Source #
Wrap the callback into a GClosure
.
mk_WebPageConsoleMessageSentCallback :: C_WebPageConsoleMessageSentCallback -> IO (FunPtr C_WebPageConsoleMessageSentCallback) Source #
Generate a function pointer callable from C code, from a C_WebPageConsoleMessageSentCallback
.
noWebPageConsoleMessageSentCallback :: Maybe WebPageConsoleMessageSentCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WebPageConsoleMessageSentCallback
onWebPageConsoleMessageSent :: (IsWebPage a, MonadIO m) => a -> WebPageConsoleMessageSentCallback -> m SignalHandlerId Source #
Connect a signal handler for the “console-message-sent
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
webPage #consoleMessageSent callback
wrap_WebPageConsoleMessageSentCallback :: WebPageConsoleMessageSentCallback -> C_WebPageConsoleMessageSentCallback Source #
contextMenu
type C_WebPageContextMenuCallback = Ptr () -> Ptr ContextMenu -> Ptr WebHitTestResult -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type WebPageContextMenuCallback Source #
= ContextMenu |
|
-> WebHitTestResult |
|
-> IO Bool | Returns: |
Emitted before a context menu is displayed in the UI Process to
give the application a chance to customize the proposed menu,
build its own context menu or pass user data to the UI Process.
This signal is useful when the information available in the UI Process
is not enough to build or customize the context menu, for example, to
add menu entries depending on the DOMNode
at the coordinates of the
hitTestResult
. Otherwise, it's recommended to use WebKitWebView::context-menu
signal instead.
Since: 2.8
afterWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> WebPageContextMenuCallback -> m SignalHandlerId Source #
Connect a signal handler for the “context-menu
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
webPage #contextMenu callback
genClosure_WebPageContextMenu :: MonadIO m => WebPageContextMenuCallback -> m (GClosure C_WebPageContextMenuCallback) Source #
Wrap the callback into a GClosure
.
mk_WebPageContextMenuCallback :: C_WebPageContextMenuCallback -> IO (FunPtr C_WebPageContextMenuCallback) Source #
Generate a function pointer callable from C code, from a C_WebPageContextMenuCallback
.
noWebPageContextMenuCallback :: Maybe WebPageContextMenuCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WebPageContextMenuCallback
onWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> WebPageContextMenuCallback -> m SignalHandlerId Source #
Connect a signal handler for the “context-menu
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
webPage #contextMenu callback
wrap_WebPageContextMenuCallback :: WebPageContextMenuCallback -> C_WebPageContextMenuCallback Source #
Wrap a WebPageContextMenuCallback
into a C_WebPageContextMenuCallback
.
documentLoaded
type C_WebPageDocumentLoadedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type WebPageDocumentLoadedCallback = IO () Source #
This signal is emitted when the DOM document of a WebPage
has been
loaded.
You can wait for this signal to get the DOM document with
webPageGetDomDocument
.
afterWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> WebPageDocumentLoadedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “document-loaded
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
webPage #documentLoaded callback
genClosure_WebPageDocumentLoaded :: MonadIO m => WebPageDocumentLoadedCallback -> m (GClosure C_WebPageDocumentLoadedCallback) Source #
Wrap the callback into a GClosure
.
mk_WebPageDocumentLoadedCallback :: C_WebPageDocumentLoadedCallback -> IO (FunPtr C_WebPageDocumentLoadedCallback) Source #
Generate a function pointer callable from C code, from a C_WebPageDocumentLoadedCallback
.
noWebPageDocumentLoadedCallback :: Maybe WebPageDocumentLoadedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WebPageDocumentLoadedCallback
onWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> WebPageDocumentLoadedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “document-loaded
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
webPage #documentLoaded callback
wrap_WebPageDocumentLoadedCallback :: WebPageDocumentLoadedCallback -> C_WebPageDocumentLoadedCallback Source #
Wrap a WebPageDocumentLoadedCallback
into a C_WebPageDocumentLoadedCallback
.
formControlsAssociated
type C_WebPageFormControlsAssociatedCallback = Ptr () -> Ptr (GPtrArray (Ptr DOMElement)) -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type WebPageFormControlsAssociatedCallback Source #
= [DOMElement] |
|
-> IO () |
Emitted after form elements (or form associated elements) are associated to a particular web page. This is useful to implement form auto filling for web pages where form fields are added dynamically. This signal might be emitted multiple times for the same web page.
Note that this signal could be also emitted when form controls are moved between forms. In
that case, the elements
array carries the list of those elements which have moved.
Clients should take a reference to the members of the elements
array if it is desired to
keep them alive after the signal handler returns.
Since: 2.16
afterWebPageFormControlsAssociated :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “form-controls-associated
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
webPage #formControlsAssociated callback
genClosure_WebPageFormControlsAssociated :: MonadIO m => WebPageFormControlsAssociatedCallback -> m (GClosure C_WebPageFormControlsAssociatedCallback) Source #
Wrap the callback into a GClosure
.
mk_WebPageFormControlsAssociatedCallback :: C_WebPageFormControlsAssociatedCallback -> IO (FunPtr C_WebPageFormControlsAssociatedCallback) Source #
Generate a function pointer callable from C code, from a C_WebPageFormControlsAssociatedCallback
.
noWebPageFormControlsAssociatedCallback :: Maybe WebPageFormControlsAssociatedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WebPageFormControlsAssociatedCallback
onWebPageFormControlsAssociated :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “form-controls-associated
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
webPage #formControlsAssociated callback
wrap_WebPageFormControlsAssociatedCallback :: WebPageFormControlsAssociatedCallback -> C_WebPageFormControlsAssociatedCallback Source #
sendRequest
type C_WebPageSendRequestCallback = Ptr () -> Ptr URIRequest -> Ptr URIResponse -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type WebPageSendRequestCallback Source #
= URIRequest |
|
-> URIResponse |
|
-> IO Bool | Returns: |
This signal is emitted when request
is about to be sent to
the server. This signal can be used to modify the URIRequest
that will be sent to the server. You can also cancel the resource load
operation by connecting to this signal and returning True
.
In case of a server redirection this signal is
emitted again with the request
argument containing the new
request to be sent to the server due to the redirection and the
redirectedResponse
parameter containing the response
received by the server for the initial request.
Modifications to the URIRequest
and its associated
MessageHeaders
will be taken into account when the request
is sent over the network.
afterWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> WebPageSendRequestCallback -> m SignalHandlerId Source #
Connect a signal handler for the “send-request
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
webPage #sendRequest callback
genClosure_WebPageSendRequest :: MonadIO m => WebPageSendRequestCallback -> m (GClosure C_WebPageSendRequestCallback) Source #
Wrap the callback into a GClosure
.
mk_WebPageSendRequestCallback :: C_WebPageSendRequestCallback -> IO (FunPtr C_WebPageSendRequestCallback) Source #
Generate a function pointer callable from C code, from a C_WebPageSendRequestCallback
.
noWebPageSendRequestCallback :: Maybe WebPageSendRequestCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WebPageSendRequestCallback
onWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> WebPageSendRequestCallback -> m SignalHandlerId Source #
Connect a signal handler for the “send-request
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
webPage #sendRequest callback
wrap_WebPageSendRequestCallback :: WebPageSendRequestCallback -> C_WebPageSendRequestCallback Source #
Wrap a WebPageSendRequestCallback
into a C_WebPageSendRequestCallback
.
willSubmitForm
type C_WebPageWillSubmitFormCallback = Ptr () -> Ptr DOMElement -> CUInt -> Ptr Frame -> Ptr Frame -> Ptr (GPtrArray CString) -> Ptr (GPtrArray CString) -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type WebPageWillSubmitFormCallback Source #
= DOMElement |
|
-> FormSubmissionStep |
|
-> Frame |
|
-> Frame |
|
-> [Text] |
|
-> [Text] |
|
-> IO () |
This signal is emitted to indicate various points during form
submission. step
indicates the current stage of form submission.
If this signal is emitted with FormSubmissionStepSendDomEvent
,
then the DOM submit event is about to be emitted. JavaScript code
may rely on the submit event to detect that the user has clicked
on a submit button, and to possibly cancel the form submission
before FormSubmissionStepComplete
. However, beware
that, for historical reasons, the submit event is not emitted at
all if the form submission is triggered by JavaScript. For these
reasons, FormSubmissionStepSendDomEvent
may not
be used to reliably detect whether a form will be submitted.
Instead, use it to detect if a user has clicked on a form's
submit button even if JavaScript later cancels the form
submission, or to read the values of the form's fields even if
JavaScript later clears certain fields before submitting. This
may be needed, for example, to implement a robust browser
password manager, as some misguided websites may use such
techniques to attempt to thwart password managers.
If this signal is emitted with FormSubmissionStepComplete
,
the form will imminently be submitted. It can no longer be
cancelled. This event always occurs immediately before a form is
submitted to its target, so use this event to reliably detect
when a form is submitted. This event occurs after
FormSubmissionStepSendDomEvent
if that event is
emitted.
Since: 2.20
afterWebPageWillSubmitForm :: (IsWebPage a, MonadIO m) => a -> WebPageWillSubmitFormCallback -> m SignalHandlerId Source #
Connect a signal handler for the “will-submit-form
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
webPage #willSubmitForm callback
genClosure_WebPageWillSubmitForm :: MonadIO m => WebPageWillSubmitFormCallback -> m (GClosure C_WebPageWillSubmitFormCallback) Source #
Wrap the callback into a GClosure
.
mk_WebPageWillSubmitFormCallback :: C_WebPageWillSubmitFormCallback -> IO (FunPtr C_WebPageWillSubmitFormCallback) Source #
Generate a function pointer callable from C code, from a C_WebPageWillSubmitFormCallback
.
noWebPageWillSubmitFormCallback :: Maybe WebPageWillSubmitFormCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WebPageWillSubmitFormCallback
onWebPageWillSubmitForm :: (IsWebPage a, MonadIO m) => a -> WebPageWillSubmitFormCallback -> m SignalHandlerId Source #
Connect a signal handler for the “will-submit-form
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
webPage #willSubmitForm callback