Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A loaded web page.
Synopsis
- newtype WebPage = WebPage (ManagedPtr WebPage)
- class (GObject o, IsDescendantOf WebPage o) => IsWebPage o
- toWebPage :: (MonadIO m, IsWebPage o) => o -> m WebPage
- webPageGetEditor :: (HasCallStack, MonadIO m, IsWebPage a) => a -> m WebEditor
- webPageGetFormManager :: (HasCallStack, MonadIO m, IsWebPage a, IsScriptWorld b) => a -> Maybe b -> m WebFormManager
- 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 Text
- webPageSendMessageToView :: (HasCallStack, MonadIO m, IsWebPage a, IsUserMessage b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- webPageSendMessageToViewFinish :: (HasCallStack, MonadIO m, IsWebPage a, IsAsyncResult b) => a -> b -> m UserMessage
- getWebPageUri :: (MonadIO m, IsWebPage o) => o -> m Text
- type WebPageContextMenuCallback = ContextMenu -> WebHitTestResult -> IO Bool
- afterWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageContextMenuCallback) -> m SignalHandlerId
- onWebPageContextMenu :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageContextMenuCallback) -> m SignalHandlerId
- type WebPageDocumentLoadedCallback = IO ()
- afterWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageDocumentLoadedCallback) -> m SignalHandlerId
- onWebPageDocumentLoaded :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageDocumentLoadedCallback) -> m SignalHandlerId
- type WebPageSendRequestCallback = URIRequest -> URIResponse -> IO Bool
- afterWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageSendRequestCallback) -> m SignalHandlerId
- onWebPageSendRequest :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageSendRequestCallback) -> m SignalHandlerId
- type WebPageUserMessageReceivedCallback = UserMessage -> IO Bool
- afterWebPageUserMessageReceived :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageUserMessageReceivedCallback) -> m SignalHandlerId
- onWebPageUserMessageReceived :: (IsWebPage a, MonadIO m) => a -> ((?self :: a) => WebPageUserMessageReceivedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq WebPage Source # | |
GObject WebPage Source # | |
Defined in GI.WebKitWebProcessExtension.Objects.WebPage | |
ManagedPtrNewtype WebPage Source # | |
Defined in GI.WebKitWebProcessExtension.Objects.WebPage toManagedPtr :: WebPage -> ManagedPtr WebPage | |
TypedObject WebPage Source # | |
Defined in GI.WebKitWebProcessExtension.Objects.WebPage | |
HasParentTypes WebPage Source # | |
Defined in GI.WebKitWebProcessExtension.Objects.WebPage | |
IsGValue (Maybe WebPage) Source # | Convert |
Defined in GI.WebKitWebProcessExtension.Objects.WebPage gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe WebPage -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe WebPage) | |
type ParentTypes WebPage Source # | |
Defined in GI.WebKitWebProcessExtension.Objects.WebPage type ParentTypes WebPage = '[Object] |
class (GObject o, IsDescendantOf WebPage o) => IsWebPage o Source #
Instances
(GObject o, IsDescendantOf WebPage o) => IsWebPage o Source # | |
Defined in GI.WebKitWebProcessExtension.Objects.WebPage |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, sendMessageToView, sendMessageToViewFinish, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getEditor, getFormManager, getId, getMainFrame, getProperty, getQdata, getUri.
Setters
getEditor
getFormManager
webPageGetFormManager Source #
:: (HasCallStack, MonadIO m, IsWebPage a, IsScriptWorld b) | |
=> a |
|
-> Maybe b |
|
-> m WebFormManager | Returns: a |
Get the WebFormManager
of webPage
in world
.
Since: 2.40
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 Text | Returns: the current active URI of |
Returns the current active URI of webPage
.
You can monitor the active URI by connecting to the notifyuri
signal of webPage
.
sendMessageToView
webPageSendMessageToView Source #
:: (HasCallStack, MonadIO m, IsWebPage a, IsUserMessage b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsWebPage a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m UserMessage | Returns: a |
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 #
= 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 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 #
= 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 -> ((?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 #
= UserMessage |
|
-> IO Bool | Returns: |
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