GdkWayland.WaylandToplevel

g GObject.GInterface GObject.GInterface Gdk.Toplevel Gdk.Toplevel GObject.GInterface->Gdk.Toplevel GObject.Object GObject.Object Gdk.Surface Gdk.Surface GObject.Object->Gdk.Surface GdkWayland.WaylandSurface GdkWayland.WaylandSurface Gdk.Surface->GdkWayland.WaylandSurface GdkWayland.WaylandToplevel GdkWayland.WaylandToplevel Gdk.Toplevel->GdkWayland.WaylandToplevel GdkWayland.WaylandSurface->GdkWayland.WaylandToplevel

Subclasses:

None

Methods

Inherited:

Gdk.Surface (27), GObject.Object (37), Gdk.Toplevel (19)

Structs:

GObject.ObjectClass (5)

drop_exported_handle (handle)

export_handle (callback, *user_data)

set_application_id (application_id)

set_transient_for_exported (parent_handle_str)

unexport_handle ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gdk.Surface (8), Gdk.Toplevel (10)

Signals

Inherited:

Gdk.Surface (5), GObject.Object (1), Gdk.Toplevel (1)

Fields

Inherited:

Gdk.Surface (5), GObject.Object (1), Gdk.Toplevel (1)

Class Details

class GdkWayland.WaylandToplevel(**kwargs)
Bases:

GdkWayland.WaylandSurface, Gdk.Toplevel

Abstract:

No

The Wayland implementation of GdkToplevel.

Beyond the [iface`Gdk`.Toplevel] API, the Wayland implementation has API to set up cross-process parent-child relationships between surfaces with [method`GdkWayland`.WaylandToplevel.export_handle] and [method`GdkWayland`.WaylandToplevel.set_transient_for_exported].

drop_exported_handle(handle)
Parameters:

handle (str) – the handle to drop

Destroy a handle that was obtained with GdkWayland.WaylandToplevel.export_handle().

Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.

New in version 4.12.

export_handle(callback, *user_data)
Parameters:
Returns:

True if the handle has been requested, False if an error occurred.

Return type:

bool

Asynchronously obtains a handle for a surface that can be passed to other processes.

When the handle has been obtained, callback will be called.

It is an error to call this function on a surface that is already exported.

When the handle is no longer needed, [method`GdkWayland`.WaylandToplevel.unexport_handle] should be called to clean up resources.

The main purpose for obtaining a handle is to mark a surface from another surface as transient for this one, see [method`GdkWayland`.WaylandToplevel.set_transient_for_exported].

Before 4.12, this API could not safely be used multiple times, since there was no reference counting for handles. Starting with 4.12, every call to this function obtains a new handle, and every call to [method`GdkWayland`.WaylandToplevel.drop_exported_handle] drops just the handle that it is given.

Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.

set_application_id(application_id)
Parameters:

application_id (str) – the application id for the self

Sets the application id on a GdkToplevel.

set_transient_for_exported(parent_handle_str)
Parameters:

parent_handle_str (str) – an exported handle for a surface

Returns:

True if the surface has been marked as transient, False if an error occurred.

Return type:

bool

Marks self as transient for the surface to which the given parent_handle_str refers.

Typically, the handle will originate from a [method`GdkWayland`.WaylandToplevel.export_handle] call in another process.

Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.

unexport_handle()

Destroys the handle that was obtained with GdkWayland.WaylandToplevel.export_handle().

It is an error to call this function on a surface that does not have a handle.

Since 4.12, this function does nothing. Use [method`GdkWayland`.WaylandToplevel.drop_exported_handle] instead to drop a handle that was obtained with [method`GdkWayland`.WaylandToplevel.export_handle].

Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.

Deprecated since version 4.12: Use [method`GdkWayland`.WaylandToplevel.drop_exported_handle] instead, this function does nothing