gi-webkit2-4.0.31: WebKit2 bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2.Objects.UserMessage

Description

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

Exported types

newtype UserMessage Source #

Memory-managed wrapper type.

Constructors

UserMessage (ManagedPtr UserMessage) 

Instances

Instances details
Eq UserMessage Source # 
Instance details

Defined in GI.WebKit2.Objects.UserMessage

GObject UserMessage Source # 
Instance details

Defined in GI.WebKit2.Objects.UserMessage

ManagedPtrNewtype UserMessage Source # 
Instance details

Defined in GI.WebKit2.Objects.UserMessage

Methods

toManagedPtr :: UserMessage -> ManagedPtr UserMessage

TypedObject UserMessage Source # 
Instance details

Defined in GI.WebKit2.Objects.UserMessage

Methods

glibType :: IO GType

HasParentTypes UserMessage Source # 
Instance details

Defined in GI.WebKit2.Objects.UserMessage

IsGValue (Maybe UserMessage) Source #

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

Instance details

Defined in GI.WebKit2.Objects.UserMessage

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes UserMessage Source # 
Instance details

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

Instances details
(GObject o, IsDescendantOf UserMessage o) => IsUserMessage o Source # 
Instance details

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

getFdList

userMessageGetFdList Source #

Arguments

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

message: a UserMessage

-> m (Maybe UnixFDList)

Returns: the message list of file descriptors

Get the message list of file descritpor.

Since: 2.28

getName

userMessageGetName Source #

Arguments

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

message: a UserMessage

-> m Text

Returns: the message name

Get the message name.

Since: 2.28

getParameters

userMessageGetParameters Source #

Arguments

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

message: a UserMessage

-> m (Maybe GVariant)

Returns: the message parameters

Get the message parameters.

Since: 2.28

new

userMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: the message name

-> Maybe GVariant

parameters: the message parameters as a GVariant, or Nothing

-> m UserMessage

Returns: the newly created UserMessage object.

Create a new UserMessage with name.

Since: 2.28

newWithFdList

userMessageNewWithFdList Source #

Arguments

:: (HasCallStack, MonadIO m, IsUnixFDList a) 
=> Text

name: the message name

-> Maybe GVariant

parameters: the message parameters as a GVariant

-> Maybe a

fdList: the message file descriptors

-> m UserMessage

Returns: the newly created UserMessage object.

Create a new UserMessage including also a list of UNIX file descriptors to be sent.

Since: 2.28

sendReply

userMessageSendReply Source #

Arguments

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

message: a UserMessage

-> b

reply: a UserMessage to send as reply

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