WebKit.UserMessage¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class WebKit.UserMessage(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Message that can be sent between the UI process and web process extensions.
A
WebKit.UserMessage
is a message that can be used for the communication between the UI process and web process extensions. AWebKit.UserMessage
always has a name, and it can also include parameters and UNIX file descriptors. Messages can be sent from aWebKit.WebContext
to all web process extensions, from a web process extension to its correspondingWebKit.WebContext
, and from aWebKit.WebView
to its corresponding #WebKitWebPage (and vice versa). One to one messages can be replied to directly withWebKit.UserMessage.send_reply
().New in version 2.28.
- classmethod new(name, parameters)¶
- Parameters:
name (
str
) – the message nameparameters (
GLib.Variant
orNone
) – the message parameters as aGLib.Variant
, orNone
- Returns:
the newly created
WebKit.UserMessage
object.- Return type:
Create a new
WebKit.UserMessage
with name.New in version 2.28.
- classmethod new_with_fd_list(name, parameters, fd_list)¶
- Parameters:
name (
str
) – the message nameparameters (
GLib.Variant
orNone
) – the message parameters as aGLib.Variant
fd_list (
Gio.UnixFDList
orNone
) – the message file descriptors
- Returns:
the newly created
WebKit.UserMessage
object.- Return type:
Create a new
WebKit.UserMessage
including also a list of UNIX file descriptors to be sent.New in version 2.28.
- get_fd_list()¶
- Returns:
the message list of file descriptors
- Return type:
Get the self list of file descritpor.
New in version 2.28.
- get_parameters()¶
- Returns:
the message parameters
- Return type:
GLib.Variant
orNone
Get the self parameters.
New in version 2.28.
- send_reply(reply)¶
- Parameters:
reply (
WebKit.UserMessage
) – aWebKit.UserMessage
to send as reply
Send a reply to an user message.
If reply is floating, it’s consumed. You can only send a reply to a
WebKit.UserMessage
that has been received.New in version 2.28.
Property Details¶
- WebKit.UserMessage.props.fd_list¶
- Name:
fd-list
- Type:
- Default Value:
- Flags:
The UNIX file descriptors of the user message.
New in version 2.28.
- WebKit.UserMessage.props.name¶
- Name:
name
- Type:
- Default Value:
- Flags:
The name of the user message.
New in version 2.28.
- WebKit.UserMessage.props.parameters¶
- Name:
parameters
- Type:
- Default Value:
- Flags:
The parameters of the user message as a
GLib.Variant
, orNone
if the message doesn’t include parameters. Note that only complete types are allowed.New in version 2.28.