This function is to be used in custom widget construction to store the window handle representing widget into
window_handle so that it can later be reused to set other windows as transient to this one (even across processes, such as
in-between plug-ins), e.
g. using [func@GimpUi.window_set_transient_for].
Depending on the platform, the actual content of window_handle can be various types and should therefore be considered an
opaque data. Moreover it may be filled asynchronously in a callback, so you should not assume that window_handle is set after
running this function.
This convenience function is safe to use even before widget is visible as it will set the handle once it is mapped.
Free window_handle on `dispose()` or `finalize()` with [func@GimpUi.widget_free_native_handle].
| widget |
a widget to get a handle for. |
| window_handle |
pointer to store the native handle as a [struct@GLib.Bytes]. |