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 |
Message that can be sent between the UI process and web process extensions.
A WebKitUserMessage is a message that can be used for the communication between the UI process
and web process extensions. A WebKitUserMessage always has a name, and it can also include parameters and
UNIX file descriptors. Messages can be sent from a WebContext
to all web process extensions,
from a web process extension to its corresponding WebContext
, and from a WebView
to its
corresponding WebKitWebPage
(and vice versa). One to one messages can be replied to directly with
userMessageSendReply
.
Since: 2.28
Synopsis
- newtype UserMessage = UserMessage (ManagedPtr UserMessage)
- class (GObject o, IsDescendantOf UserMessage o) => IsUserMessage o
- toUserMessage :: (MonadIO m, IsUserMessage o) => o -> m UserMessage
- userMessageGetFdList :: (HasCallStack, MonadIO m, IsUserMessage a) => a -> m (Maybe UnixFDList)
- userMessageGetName :: (HasCallStack, MonadIO m, IsUserMessage a) => a -> m Text
- userMessageGetParameters :: (HasCallStack, MonadIO m, IsUserMessage a) => a -> m (Maybe GVariant)
- userMessageNew :: (HasCallStack, MonadIO m) => Text -> Maybe GVariant -> m UserMessage
- userMessageNewWithFdList :: (HasCallStack, MonadIO m, IsUnixFDList a) => Text -> Maybe GVariant -> Maybe a -> m UserMessage
- userMessageSendReply :: (HasCallStack, MonadIO m, IsUserMessage a, IsUserMessage b) => a -> b -> m ()
- constructUserMessageFdList :: (IsUserMessage o, MonadIO m, IsUnixFDList a) => a -> m (GValueConstruct o)
- getUserMessageFdList :: (MonadIO m, IsUserMessage o) => o -> m (Maybe UnixFDList)
- constructUserMessageName :: (IsUserMessage o, MonadIO m) => Text -> m (GValueConstruct o)
- getUserMessageName :: (MonadIO m, IsUserMessage o) => o -> m Text
- constructUserMessageParameters :: (IsUserMessage o, MonadIO m) => GVariant -> m (GValueConstruct o)
- getUserMessageParameters :: (MonadIO m, IsUserMessage o) => o -> m (Maybe GVariant)
Exported types
newtype UserMessage Source #
Memory-managed wrapper type.
UserMessage (ManagedPtr UserMessage) |
Instances
Eq UserMessage Source # | |
Defined in GI.WebKit2.Objects.UserMessage (==) :: UserMessage -> UserMessage -> Bool # (/=) :: UserMessage -> UserMessage -> Bool # | |
GObject UserMessage Source # | |
Defined in GI.WebKit2.Objects.UserMessage | |
ManagedPtrNewtype UserMessage Source # | |
Defined in GI.WebKit2.Objects.UserMessage toManagedPtr :: UserMessage -> ManagedPtr UserMessage | |
TypedObject UserMessage Source # | |
Defined in GI.WebKit2.Objects.UserMessage | |
HasParentTypes UserMessage Source # | |
Defined in GI.WebKit2.Objects.UserMessage | |
IsGValue (Maybe UserMessage) Source # | Convert |
Defined in GI.WebKit2.Objects.UserMessage gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe UserMessage -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe UserMessage) | |
type ParentTypes UserMessage Source # | |
Defined in GI.WebKit2.Objects.UserMessage type ParentTypes UserMessage = '[Object] |
class (GObject o, IsDescendantOf UserMessage o) => IsUserMessage o Source #
Type class for types which can be safely cast to UserMessage
, for instance with toUserMessage
.
Instances
(GObject o, IsDescendantOf UserMessage o) => IsUserMessage o Source # | |
Defined in GI.WebKit2.Objects.UserMessage |
toUserMessage :: (MonadIO m, IsUserMessage o) => o -> m UserMessage Source #
Cast to UserMessage
, 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, sendReply, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getFdList, getName, getParameters, getProperty, getQdata.
Setters
getFdList
:: (HasCallStack, MonadIO m, IsUserMessage a) | |
=> a |
|
-> m (Maybe UnixFDList) | Returns: the message list of file descriptors |
Get the message
list of file descritpor.
Since: 2.28
getName
:: (HasCallStack, MonadIO m, IsUserMessage a) | |
=> a |
|
-> m Text | Returns: the message name |
Get the message
name.
Since: 2.28
getParameters
userMessageGetParameters Source #
:: (HasCallStack, MonadIO m, IsUserMessage a) | |
=> a |
|
-> m (Maybe GVariant) | Returns: the message parameters |
Get the message
parameters.
Since: 2.28
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Maybe GVariant |
|
-> m UserMessage | Returns: the newly created |
Create a new UserMessage
with name
.
Since: 2.28
newWithFdList
userMessageNewWithFdList Source #
:: (HasCallStack, MonadIO m, IsUnixFDList a) | |
=> Text |
|
-> Maybe GVariant |
|
-> Maybe a |
|
-> m UserMessage | Returns: the newly created |
Create a new UserMessage
including also a list of UNIX file descriptors to be sent.
Since: 2.28
sendReply
:: (HasCallStack, MonadIO m, IsUserMessage a, IsUserMessage b) | |
=> a |
|
-> b |
|
-> m () |
Send a reply to an user message.
If reply
is floating, it's consumed.
You can only send a reply to a UserMessage
that has been
received.
Since: 2.28
Properties
fdList
The UNIX file descriptors of the user message.
Since: 2.28
constructUserMessageFdList :: (IsUserMessage o, MonadIO m, IsUnixFDList a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “fd-list
” property. This is rarely needed directly, but it is used by new
.
getUserMessageFdList :: (MonadIO m, IsUserMessage o) => o -> m (Maybe UnixFDList) Source #
Get the value of the “fd-list
” property.
When overloading is enabled, this is equivalent to
get
userMessage #fdList
name
The name of the user message.
Since: 2.28
constructUserMessageName :: (IsUserMessage o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “name
” property. This is rarely needed directly, but it is used by new
.
getUserMessageName :: (MonadIO m, IsUserMessage o) => o -> m Text Source #
Get the value of the “name
” property.
When overloading is enabled, this is equivalent to
get
userMessage #name
parameters
The parameters of the user message as a GVariant
, or Nothing
if the message doesn't include parameters. Note that only complete types are
allowed.
Since: 2.28
constructUserMessageParameters :: (IsUserMessage o, MonadIO m) => GVariant -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “parameters
” property. This is rarely needed directly, but it is used by new
.
getUserMessageParameters :: (MonadIO m, IsUserMessage o) => o -> m (Maybe GVariant) Source #
Get the value of the “parameters
” property.
When overloading is enabled, this is equivalent to
get
userMessage #parameters