:right-sidebar: True UserMessage =================================================================== .. currentmodule:: gi.repository.WebKitWebProcessExtension .. versionadded:: 2.28 .. class:: UserMessage(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.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 :obj:`~gi.repository.WebKitWebProcessExtension.WebPage` (and vice versa). One to one messages can be replied to directly with :func:`~gi.repository.WebKitWebProcessExtension.UserMessage.send_reply`. Constructors ------------ .. rst-class:: interim-class .. class:: UserMessage :no-index: .. classmethod:: new(name: str, parameters: ~gi.repository.GLib.Variant | None = None) -> ~gi.repository.WebKit.UserMessage Create a new :obj:`~gi.repository.WebKitWebProcessExtension.UserMessage` with ``name``\. .. versionadded:: 2.28 :param name: the message name :param parameters: the message parameters as a :obj:`~gi.repository.GLib.Variant`\, or :const:`None` .. classmethod:: new_with_fd_list(name: str, parameters: ~gi.repository.GLib.Variant | None = None, fd_list: ~gi.repository.Gio.UnixFDList | None = None) -> ~gi.repository.WebKit.UserMessage Create a new :obj:`~gi.repository.WebKitWebProcessExtension.UserMessage` including also a list of UNIX file descriptors to be sent. .. versionadded:: 2.28 :param name: the message name :param parameters: the message parameters as a :obj:`~gi.repository.GLib.Variant` :param fd_list: the message file descriptors Methods ------- .. rst-class:: interim-class .. class:: UserMessage :no-index: .. method:: get_fd_list() -> ~gi.repository.Gio.UnixFDList | None Get the ``message`` list of file descritpor. .. versionadded:: 2.28 .. method:: get_name() -> str Get the ``message`` name. .. versionadded:: 2.28 .. method:: get_parameters() -> ~gi.repository.GLib.Variant | None Get the ``message`` parameters. .. versionadded:: 2.28 .. method:: send_reply(reply: ~gi.repository.WebKit.UserMessage) -> None Send a reply to an user message. If ``reply`` is floating, it's consumed. You can only send a reply to a :obj:`~gi.repository.WebKitWebProcessExtension.UserMessage` that has been received. .. versionadded:: 2.28 :param reply: a :obj:`~gi.repository.WebKitWebProcessExtension.UserMessage` to send as reply Properties ---------- .. rst-class:: interim-class .. class:: UserMessage :no-index: .. attribute:: props.fd_list :type: ~gi.repository.Gio.UnixFDList The type of the None singleton. .. versionadded:: 2.28 .. attribute:: props.name :type: str The type of the None singleton. .. versionadded:: 2.28 .. attribute:: props.parameters :type: ~gi.repository.GLib.Variant The type of the None singleton. .. versionadded:: 2.28