WebKit2.UserMessage

g GObject.InitiallyUnowned GObject.InitiallyUnowned WebKit2.UserMessage WebKit2.UserMessage GObject.InitiallyUnowned->WebKit2.UserMessage GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (name, parameters)

class

new_with_fd_list (name, parameters, fd_list)

get_fd_list ()

get_name ()

get_parameters ()

send_reply (reply)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

fd-list

Gio.UnixFDList

r/w/co

name

str

r/w/co

parameters

GLib.Variant

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.InitiallyUnowned

r

Class Details

class WebKit2.UserMessage(**kwargs)
Bases:

GObject.InitiallyUnowned

Abstract:

No

Structure:

WebKit2.UserMessageClass

Message that can be sent between the UI process and web process extensions.

A WebKit2.UserMessage is a message that can be used for the communication between the UI process and web process extensions. A WebKit2.UserMessage always has a name, and it can also include parameters and UNIX file descriptors. Messages can be sent from a WebKit2.WebContext to all web process extensions, from a web process extension to its corresponding WebKit2.WebContext, and from a WebKit2.WebView to its corresponding #WebKitWebPage (and vice versa). One to one messages can be replied to directly with WebKit2.UserMessage.send_reply().

New in version 2.28.

classmethod new(name, parameters)
Parameters:
Returns:

the newly created WebKit2.UserMessage object.

Return type:

WebKit2.UserMessage

Create a new WebKit2.UserMessage with name.

New in version 2.28.

classmethod new_with_fd_list(name, parameters, fd_list)
Parameters:
Returns:

the newly created WebKit2.UserMessage object.

Return type:

WebKit2.UserMessage

Create a new WebKit2.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:

Gio.UnixFDList or None

Get the self list of file descritpor.

New in version 2.28.

get_name()
Returns:

the message name

Return type:

str

Get the self name.

New in version 2.28.

get_parameters()
Returns:

the message parameters

Return type:

GLib.Variant or None

Get the self parameters.

New in version 2.28.

send_reply(reply)
Parameters:

reply (WebKit2.UserMessage) – a WebKit2.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 WebKit2.UserMessage that has been received.

New in version 2.28.

Property Details

WebKit2.UserMessage.props.fd_list
Name:

fd-list

Type:

Gio.UnixFDList

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The UNIX file descriptors of the user message.

New in version 2.28.

WebKit2.UserMessage.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The name of the user message.

New in version 2.28.

WebKit2.UserMessage.props.parameters
Name:

parameters

Type:

GLib.Variant

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The parameters of the user message as a GLib.Variant, or None if the message doesn’t include parameters. Note that only complete types are allowed.

New in version 2.28.