UserMessage#
Added in version 2.28.
Superclasses: InitiallyUnowned
, Object
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 WebKitWebContext
to all web process extensions,
from a web process extension to its corresponding WebKitWebContext
, and from a WebKitWebView
to its
corresponding WebPage
(and vice versa). One to one messages can be replied to directly with
send_reply()
.
Constructors#
- class UserMessage
- classmethod new(name: str, parameters: Variant | None = None) UserMessage #
Create a new
UserMessage
withname
.Added in version 2.28.
- Parameters:
name – the message name
parameters – the message parameters as a
Variant
, orNone
- classmethod new_with_fd_list(name: str, parameters: Variant | None = None, fd_list: UnixFDList | None = None) UserMessage #
Create a new
UserMessage
including also a list of UNIX file descriptors to be sent.Added in version 2.28.
- Parameters:
name – the message name
parameters – the message parameters as a
Variant
fd_list – the message file descriptors
Methods#
- class UserMessage
- get_fd_list() UnixFDList | None #
Get the
message
list of file descritpor.Added in version 2.28.
- send_reply(reply: UserMessage) None #
Send a reply to an user message.
If
reply
is floating, it’s consumed. You can only send a reply to aUserMessage
that has been received.Added in version 2.28.
- Parameters:
reply – a
UserMessage
to send as reply