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 |
No description available in the introspection data.
Synopsis
- newtype WebExtension = WebExtension (ManagedPtr WebExtension)
- class (GObject o, IsDescendantOf WebExtension o) => IsWebExtension o
- toWebExtension :: (MonadIO m, IsWebExtension o) => o -> m WebExtension
- webExtensionGetPage :: (HasCallStack, MonadIO m, IsWebExtension a) => a -> Word64 -> m (Maybe WebPage)
- webExtensionSendMessageToContext :: (HasCallStack, MonadIO m, IsWebExtension a, IsUserMessage b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- webExtensionSendMessageToContextFinish :: (HasCallStack, MonadIO m, IsWebExtension a, IsAsyncResult b) => a -> b -> m UserMessage
- type WebExtensionPageCreatedCallback = WebPage -> IO ()
- afterWebExtensionPageCreated :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionPageCreatedCallback) -> m SignalHandlerId
- onWebExtensionPageCreated :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionPageCreatedCallback) -> m SignalHandlerId
- type WebExtensionUserMessageReceivedCallback = UserMessage -> IO ()
- afterWebExtensionUserMessageReceived :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionUserMessageReceivedCallback) -> m SignalHandlerId
- onWebExtensionUserMessageReceived :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionUserMessageReceivedCallback) -> m SignalHandlerId
Exported types
newtype WebExtension Source #
Memory-managed wrapper type.
Instances
Eq WebExtension Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebExtension (==) :: WebExtension -> WebExtension -> Bool # (/=) :: WebExtension -> WebExtension -> Bool # | |
GObject WebExtension Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebExtension | |
ManagedPtrNewtype WebExtension Source # | |
TypedObject WebExtension Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebExtension | |
HasParentTypes WebExtension Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebExtension | |
IsGValue (Maybe WebExtension) Source # | Convert |
Defined in GI.WebKit2WebExtension.Objects.WebExtension gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe WebExtension -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe WebExtension) # | |
type ParentTypes WebExtension Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebExtension |
class (GObject o, IsDescendantOf WebExtension o) => IsWebExtension o Source #
Type class for types which can be safely cast to WebExtension
, for instance with toWebExtension
.
Instances
(GObject o, IsDescendantOf WebExtension o) => IsWebExtension o Source # | |
Defined in GI.WebKit2WebExtension.Objects.WebExtension |
toWebExtension :: (MonadIO m, IsWebExtension o) => o -> m WebExtension Source #
Cast to WebExtension
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, sendMessageToContext, sendMessageToContextFinish, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getPage, getProperty, getQdata.
Setters
getPage
:: (HasCallStack, MonadIO m, IsWebExtension a) | |
=> a |
|
-> Word64 |
|
-> m (Maybe WebPage) | Returns: the |
Get the web page of the given pageId
.
sendMessageToContext
webExtensionSendMessageToContext Source #
:: (HasCallStack, MonadIO m, IsWebExtension a, IsUserMessage b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Send message
to the WebKitWebContext
corresponding to extension
. 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 calback
.
When the operation is finished, callback
will be called. You can then call
webExtensionSendMessageToContextFinish
to get the message reply.
Since: 2.28
sendMessageToContextFinish
webExtensionSendMessageToContextFinish Source #
:: (HasCallStack, MonadIO m, IsWebExtension a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m UserMessage | Returns: a |
Finish an asynchronous operation started with webExtensionSendMessageToContext
.
Since: 2.28
Signals
pageCreated
type WebExtensionPageCreatedCallback Source #
This signal is emitted when a new WebPage
is created in
the Web Process.
afterWebExtensionPageCreated :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionPageCreatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pageCreated signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
webExtension #pageCreated 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.
onWebExtensionPageCreated :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionPageCreatedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pageCreated signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
webExtension #pageCreated callback
userMessageReceived
type WebExtensionUserMessageReceivedCallback Source #
= UserMessage |
|
-> IO () |
This signal is emitted when a UserMessage
is received from the
WebKitWebContext
corresponding to extension
. Messages sent by WebKitWebContext
are always broadcasted to all WebExtension
s and they can't be
replied to. Calling userMessageSendReply
will do nothing.
Since: 2.28
afterWebExtensionUserMessageReceived :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionUserMessageReceivedCallback) -> 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
webExtension #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.
onWebExtensionUserMessageReceived :: (IsWebExtension a, MonadIO m) => a -> ((?self :: a) => WebExtensionUserMessageReceivedCallback) -> 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
webExtension #userMessageReceived callback