### Function

# GimpUi widget_set_native_handle

unstable since: 3.0

#### Declaration [src]

    void
    gimp_widget_set_native_handle (
      GtkWidget* widget,
      GBytes** handle
    )

#### Description [src]

This function is used to store the handle representing `window` into `handle` so that it can later be reused to set other windows as transient to this one (even in other processes, such as plug-ins).

Depending on the platform, the actual content of `handle` can be various types. Moreover it may be filled asynchronously in a callback, so you should not assume that `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.

Available since: 3.0

#### Parameters

`widget`

  Type: `GtkWidget`

  A `GtkWindow`.

  The data is owned by the caller of the function.

`handle`

  Type: `GBytes`

  Pointer to store the native handle as a `GBytes`.

  The argument will be set by the function.
  The caller of the function takes ownership of the data, and is responsible for freeing it.