GdkWayland.WaylandToplevel¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GdkWayland.WaylandToplevel(**kwargs)¶
- Bases:
- 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:
callback (
GdkWayland.WaylandToplevelExported
) – callback to call with the handle
- Returns:
True
if the handle has been requested,False
if an error occurred.- Return type:
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:
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