gi-webkit2webextension-4.0.25: WebKit2-WebExtension bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2WebExtension.Objects.WebPage

Description

No description available in the introspection data.

Synopsis

Exported types

newtype WebPage Source #

Memory-managed wrapper type.

Constructors

WebPage (ManagedPtr WebPage) 

Instances

Instances details
Eq WebPage Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

Methods

(==) :: WebPage -> WebPage -> Bool

(/=) :: WebPage -> WebPage -> Bool

GObject WebPage Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

ManagedPtrNewtype WebPage Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

Methods

toManagedPtr :: WebPage -> ManagedPtr WebPage

TypedObject WebPage Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

Methods

glibType :: IO GType

IsGValue WebPage Source #

Convert WebPage to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

Methods

toGValue :: WebPage -> IO GValue

fromGValue :: GValue -> IO WebPage

HasParentTypes WebPage Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

type ParentTypes WebPage Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

type ParentTypes WebPage = '[Object]

class (GObject o, IsDescendantOf WebPage o) => IsWebPage o Source #

Type class for types which can be safely cast to WebPage, for instance with toWebPage.

Instances

Instances details
(GObject o, IsDescendantOf WebPage o) => IsWebPage o Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.WebPage

toWebPage :: (MonadIO m, IsWebPage o) => o -> m WebPage Source #

Cast to WebPage, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

getDomDocument

webPageGetDomDocument Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebPage a) 
=> a

webPage: a WebPage

-> m (Maybe DOMDocument)

Returns: the DOMDocument currently loaded, or Nothing if no document is currently loaded.

Get the DOMDocument currently loaded in webPage

getEditor

webPageGetEditor Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebPage a) 
=> a

webPage: a WebPage

-> m WebEditor

Returns: the WebEditor

Gets the WebEditor of a WebPage.

Since: 2.10

getId

webPageGetId Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebPage a) 
=> a

webPage: a WebPage

-> m Word64

Returns: the identifier of webPage

Get the identifier of the WebPage

getMainFrame

webPageGetMainFrame Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebPage a) 
=> a

webPage: a WebPage

-> m Frame

Returns: the Frame that is the main frame of webPage

Returns the main frame of a WebPage.

Since: 2.2

getUri

webPageGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebPage a) 
=> a

webPage: a WebPage

-> m (Maybe Text)

Returns: the current active URI of webView or Nothing if nothing has been loaded yet.

Returns the current active URI of webPage.

You can monitor the active URI by connecting to the notify[uri](#g:signal:uri) signal of webPage.

sendMessageToView

webPageSendMessageToView Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebPage a, IsUserMessage b, IsCancellable c) 
=> a

webPage: a WebPage

-> b

message: a UserMessage

-> Maybe c

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: (nullable): A AsyncReadyCallback to call when the request is satisfied or Nothing

-> m () 

Send message to the WebKitWebView corresponding to webPage. If message is floating, it's consumed.

If you don't expect any reply, or you simply want to ignore it, you can pass Nothing as callback. When the operation is finished, callback will be called. You can then call webPageSendMessageToViewFinish to get the message reply.

Since: 2.28

sendMessageToViewFinish

webPageSendMessageToViewFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebPage a, IsAsyncResult b) 
=> a

webPage: a WebPage

-> b

result: a AsyncResult

-> m UserMessage

Returns: a UserMessage with the reply or Nothing in case of error. (Can throw GError)

Finish an asynchronous operation started with webPageSendMessageToView.

Since: 2.28

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 #

Arguments

 = ConsoleMessage

consoleMessage: the 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 consoleMessageSent signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #consoleMessageSent callback

onWebPageConsoleMessageSent :: (IsWebPage a, MonadIO m) => a -> WebPageConsoleMessageSentCallback -> m SignalHandlerId Source #

Connect a signal handler for the consoleMessageSent signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #consoleMessageSent callback

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 #

Arguments

 = ContextMenu

contextMenu: the proposed WebKitContextMenu

-> WebHitTestResult

hitTestResult: a WebHitTestResult

-> IO Bool

Returns: True if the proposed contextMenu has been modified, or False otherwise.

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 contextMenu signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #contextMenu callback

mk_WebPageContextMenuCallback :: C_WebPageContextMenuCallback -> IO (FunPtr C_WebPageContextMenuCallback) Source #

Generate a function pointer callable from C code, from a C_WebPageContextMenuCallback.

onWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> WebPageContextMenuCallback -> m SignalHandlerId Source #

Connect a signal handler for the contextMenu signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #contextMenu callback

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 documentLoaded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #documentLoaded callback

onWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> WebPageDocumentLoadedCallback -> m SignalHandlerId Source #

Connect a signal handler for the documentLoaded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #documentLoaded callback

formControlsAssociated

type C_WebPageFormControlsAssociatedCallback = Ptr () -> Ptr (GPtrArray (Ptr DOMElement)) -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebPageFormControlsAssociatedCallback Source #

Arguments

 = [DOMElement]

elements: a PtrArray of DOMElement with the list of forms in the page

-> IO () 

Deprecated: (Since version 2.26), use formControlsAssociatedForFrame instead.

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 formControlsAssociated signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #formControlsAssociated callback

onWebPageFormControlsAssociated :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedCallback -> m SignalHandlerId Source #

Connect a signal handler for the formControlsAssociated signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #formControlsAssociated callback

formControlsAssociatedForFrame

type C_WebPageFormControlsAssociatedForFrameCallback = Ptr () -> Ptr (GPtrArray (Ptr DOMElement)) -> Ptr Frame -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WebPageFormControlsAssociatedForFrameCallback Source #

Arguments

 = [DOMElement]

elements: a PtrArray of DOMElement with the list of forms in the page

-> Frame

frame: the Frame

-> 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.26

afterWebPageFormControlsAssociatedForFrame :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedForFrameCallback -> m SignalHandlerId Source #

Connect a signal handler for the formControlsAssociatedForFrame signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #formControlsAssociatedForFrame callback

onWebPageFormControlsAssociatedForFrame :: (IsWebPage a, MonadIO m) => a -> WebPageFormControlsAssociatedForFrameCallback -> m SignalHandlerId Source #

Connect a signal handler for the formControlsAssociatedForFrame signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #formControlsAssociatedForFrame callback

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 #

Arguments

 = URIRequest

request: a URIRequest

-> URIResponse

redirectedResponse: a URIResponse, or Nothing

-> IO Bool

Returns: True to stop other handlers from being invoked for the event. False to continue emission of the event.

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 sendRequest signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #sendRequest callback

mk_WebPageSendRequestCallback :: C_WebPageSendRequestCallback -> IO (FunPtr C_WebPageSendRequestCallback) Source #

Generate a function pointer callable from C code, from a C_WebPageSendRequestCallback.

onWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> WebPageSendRequestCallback -> m SignalHandlerId Source #

Connect a signal handler for the sendRequest signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #sendRequest callback

userMessageReceived

type C_WebPageUserMessageReceivedCallback = Ptr () -> Ptr UserMessage -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type WebPageUserMessageReceivedCallback Source #

Arguments

 = UserMessage

message: the UserMessage received

-> IO Bool

Returns: True if the message was handled, or False otherwise.

This signal is emitted when a UserMessage is received from the WebKitWebView corresponding to webPage. You can reply to the message using userMessageSendReply.

You can handle the user message asynchronously by calling objectRef on message and returning True. If the last reference of message is removed and the message has been replied, the operation in the WebKitWebView will finish with error UserMessageErrorUserMessageUnhandledMessage.

Since: 2.28

afterWebPageUserMessageReceived :: (IsWebPage a, MonadIO m) => a -> WebPageUserMessageReceivedCallback -> m SignalHandlerId Source #

Connect a signal handler for the userMessageReceived signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #userMessageReceived callback

onWebPageUserMessageReceived :: (IsWebPage a, MonadIO m) => a -> WebPageUserMessageReceivedCallback -> m SignalHandlerId Source #

Connect a signal handler for the userMessageReceived signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #userMessageReceived callback

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 #

Arguments

 = DOMElement

form: the DOMElement to be submitted, which will always correspond to an HTMLFormElement

-> FormSubmissionStep

step: a WebKitFormSubmissionEventType indicating the current stage of form submission

-> Frame

sourceFrame: the Frame containing the form to be submitted

-> Frame

targetFrame: the Frame containing the form's target, which may be the same as sourceFrame if no target was specified

-> [Text]

textFieldNames: names of the form's text fields

-> [Text]

textFieldValues: values of the form's text fields

-> 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 willSubmitForm signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after webPage #willSubmitForm callback

onWebPageWillSubmitForm :: (IsWebPage a, MonadIO m) => a -> WebPageWillSubmitFormCallback -> m SignalHandlerId Source #

Connect a signal handler for the willSubmitForm signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on webPage #willSubmitForm callback