export_handle


Description:

public bool export_handle (owned ToplevelExported callback)

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.

Parameters:

this

the `GdkToplevel` to obtain a handle for

callback

callback to call with the handle

destroy_func

destroy notify for user_data

user_data

user data for callback

Returns:

true if the handle has been requested, false if an error occurred.