gi-webkitwebprocessextension-6.0.2: WebKitWebProcessExtension bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKitWebProcessExtension.Objects.WebPage

Description

A loaded web page.

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.WebKitWebProcessExtension.Objects.WebPage

Methods

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

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

GObject WebPage Source # 
Instance details

Defined in GI.WebKitWebProcessExtension.Objects.WebPage

ManagedPtrNewtype WebPage Source # 
Instance details

Defined in GI.WebKitWebProcessExtension.Objects.WebPage

Methods

toManagedPtr :: WebPage -> ManagedPtr WebPage

TypedObject WebPage Source # 
Instance details

Defined in GI.WebKitWebProcessExtension.Objects.WebPage

Methods

glibType :: IO GType

HasParentTypes WebPage Source # 
Instance details

Defined in GI.WebKitWebProcessExtension.Objects.WebPage

IsGValue (Maybe WebPage) Source #

Convert WebPage to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKitWebProcessExtension.Objects.WebPage

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe WebPage -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe WebPage)

type ParentTypes WebPage Source # 
Instance details

Defined in GI.WebKitWebProcessExtension.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.WebKitWebProcessExtension.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

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

getFormManager

webPageGetFormManager Source #

Arguments

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

webPage: a WebPage

-> Maybe b

world: a ScriptWorld

-> m WebFormManager

Returns: a WebFormManager

Get the WebFormManager of webPage in world.

Since: 2.40

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 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 notifyuri 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 Text Source #

Get the value of the “uri” property. When overloading is enabled, this is equivalent to

get webPage #uri

Signals

contextMenu

type WebPageContextMenuCallback Source #

Arguments

 = ContextMenu

contextMenu: the proposed ContextMenu

-> 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 node 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 -> ((?self :: 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

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> ((?self :: 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 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

afterWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> ((?self :: 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

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> ((?self :: 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

sendRequest

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 -> ((?self :: 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

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> ((?self :: 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 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 -> ((?self :: 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

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onWebPageUserMessageReceived :: (IsWebPage a, MonadIO m) => a -> ((?self :: 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