<?xml version="1.0"?>
<page id="GimpUi.widget_set_native_handle"
      type="topic"
      style="function"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="index" group="function" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>void</api:type>
      </api:returns>
      <api:name>gimp_widget_set_native_handle</api:name>
      <api:arg>
        <api:type>Gtk.Widget</api:type>
        <api:name>widget</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>GimpUi.widget_set_native_handle</title>
  <synopsis><code mime="text/x-gjs">
function widget_set_native_handle(widget: <link href="../Gtk-3.0/Gtk.Widget.html">Gtk.Widget</link>): Uint8Array {
    // Gjs wrapper for gimp_widget_set_native_handle()
}
  </code></synopsis>
  <p>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).</p>  <p>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.</p>  <p>This convenience function is safe to use even before <code>widget</code> is
visible as it will set the handle once it is mapped.</p>

<terms>
<item>
<title><code>widget</code></title>
  <p>a <link href="../Gtk-3.0/Gtk.Window.html">Gtk.Window</link></p>
</item>
<item>
<title><code>Returns</code></title>
  <p>pointer to store the native handle as a <link href="../GLib-2.0/GLib.Bytes.html">GLib.Bytes</link>.</p>
</item>
</terms>

</page>
