<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gdk4-Wayland-Interaction">
<refmeta>
<refentrytitle role="top_of_page" id="gdk4-Wayland-Interaction.top_of_page">Wayland Interaction</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Wayland Interaction</refname>
<refpurpose>Wayland backend-specific functions</refpurpose>
</refnamediv>

<refsect1 id="gdk4-Wayland-Interaction.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type">struct <link linkend="wl-display"><returnvalue>wl_display</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-display-get-wl-display">gdk_wayland_display_get_wl_display</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">struct <link linkend="wl-compositor"><returnvalue>wl_compositor</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-display-get-wl-compositor">gdk_wayland_display_get_wl_compositor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-wayland-display-query-registry">gdk_wayland_display_query_registry</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-wayland-display-set-cursor-theme">gdk_wayland_display_set_cursor_theme</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-display-get-startup-notification-id">gdk_wayland_display_get_startup_notification_id</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-wayland-display-set-startup-notification-id">gdk_wayland_display_set_startup_notification_id</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type">struct <link linkend="wl-seat"><returnvalue>wl_seat</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-seat-get-wl-seat">gdk_wayland_seat_get_wl_seat</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">struct <link linkend="wl-seat"><returnvalue>wl_seat</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-device-get-wl-seat">gdk_wayland_device_get_wl_seat</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">struct <link linkend="wl-pointer"><returnvalue>wl_pointer</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-device-get-wl-pointer">gdk_wayland_device_get_wl_pointer</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">struct <link linkend="wl-keyboard"><returnvalue>wl_keyboard</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-device-get-wl-keyboard">gdk_wayland_device_get_wl_keyboard</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type">struct <link linkend="wl-output"><returnvalue>wl_output</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-monitor-get-wl-output">gdk_wayland_monitor_get_wl_output</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type">struct <link linkend="wl-surface"><returnvalue>wl_surface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-wayland-surface-get-wl-surface">gdk_wayland_surface_get_wl_surface</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="GdkWaylandToplevelExported">*GdkWaylandToplevelExported</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-wayland-toplevel-export-handle">gdk_wayland_toplevel_export_handle</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-wayland-toplevel-unexport-handle">gdk_wayland_toplevel_unexport_handle</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-wayland-toplevel-set-transient-for-exported">gdk_wayland_toplevel_set_transient_for_exported</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-wayland-toplevel-set-application-id">gdk_wayland_toplevel_set_application_id</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 id="gdk4-Wayland-Interaction.includes"><title>Includes</title><synopsis>#include &lt;gdk/wayland/gdkwayland.h&gt;
</synopsis></refsect1>

<refsect1 id="gdk4-Wayland-Interaction.description" role="desc">
<title role="desc.title">Description</title>
<para>The functions in this section are specific to the GDK Wayland backend.
To use them, you need to include the <literal>&lt;gdk/wayland/gdkwayland.h&gt;</literal> header and
use the Wayland-specific pkg-config <literal>gtk4-wayland</literal> file to build your
application.</para>
<para>To make your code compile with other GDK backends, guard backend-specific
calls by an ifdef as follows. Since GDK may be built with multiple
backends, you should also check for the backend that is in use (e.g. by
using the <link linkend="GDK-IS-WAYLAND-DISPLAY:CAPS"><function>GDK_IS_WAYLAND_DISPLAY()</function></link> macro).</para>
<informalexample><programlisting role="example"><![CDATA[
#ifdef GDK_WINDOWING_WAYLAND
  if (GDK_IS_WAYLAND_DISPLAY (display))
    {
      // make Wayland-specific calls here
    }
  else
#endif
#ifdef GDK_WINDOWING_X11
  if (GDK_IS_X11_DISPLAY (display))
    {
      // make X11-specific calls here
    }
  else
#endif
  g_error ("Unsupported GDK backend");
]]></programlisting></informalexample>
<para></para>

</refsect1>
<refsect1 id="gdk4-Wayland-Interaction.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-wayland-display-get-wl-display" role="function">
<title>gdk_wayland_display_get_wl_display&#160;()</title>
<indexterm zone="gdk-wayland-display-get-wl-display"><primary>gdk_wayland_display_get_wl_display</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-display"><returnvalue>wl_display</returnvalue></link>&#160;*
gdk_wayland_display_get_wl_display (<parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>);</programlisting>
<para>Returns the Wayland wl_display of a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-display-get-wl-display.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDisplay]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-display-get-wl-display.returns" role="returns">
<title>Returns</title>
<para>a Wayland wl_display. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-display-get-wl-compositor" role="function">
<title>gdk_wayland_display_get_wl_compositor&#160;()</title>
<indexterm zone="gdk-wayland-display-get-wl-compositor"><primary>gdk_wayland_display_get_wl_compositor</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-compositor"><returnvalue>wl_compositor</returnvalue></link>&#160;*
gdk_wayland_display_get_wl_compositor (<parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>);</programlisting>
<para>Returns the Wayland global singleton compositor of a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-display-get-wl-compositor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDisplay]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-display-get-wl-compositor.returns" role="returns">
<title>Returns</title>
<para>a Wayland wl_compositor. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-display-query-registry" role="function">
<title>gdk_wayland_display_query_registry&#160;()</title>
<indexterm zone="gdk-wayland-display-query-registry"><primary>gdk_wayland_display_query_registry</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_wayland_display_query_registry (<parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>,
                                    <parameter>const <link linkend="char"><type>char</type></link> *global</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the the interface was found in the display
<literal>wl_registry.global</literal> handler.</para>
<refsect3 id="gdk-wayland-display-query-registry.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDisplay]</emphasis></entry></row>
<row><entry role="parameter_name"><para>global</para></entry>
<entry role="parameter_description"><para>global interface to query in the registry</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-display-query-registry.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the global is offered by the compositor</para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-display-set-cursor-theme" role="function">
<title>gdk_wayland_display_set_cursor_theme&#160;()</title>
<indexterm zone="gdk-wayland-display-set-cursor-theme"><primary>gdk_wayland_display_set_cursor_theme</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_wayland_display_set_cursor_theme (<parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>,
                                      <parameter>const <link linkend="char"><type>char</type></link> *theme</parameter>,
                                      <parameter><link linkend="int"><type>int</type></link> size</parameter>);</programlisting>
<para>Sets the cursor theme for the given <parameter>display</parameter>
.</para>
<refsect3 id="gdk-wayland-display-set-cursor-theme.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDisplay]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-display-get-startup-notification-id" role="function">
<title>gdk_wayland_display_get_startup_notification_id&#160;()</title>
<indexterm zone="gdk-wayland-display-get-startup-notification-id"><primary>gdk_wayland_display_get_startup_notification_id</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gdk_wayland_display_get_startup_notification_id
                               (<parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>);</programlisting>
<para>Gets the startup notification ID for a Wayland display, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
if no ID has been defined.</para>
<refsect3 id="gdk-wayland-display-get-startup-notification-id.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDisplay]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-display-get-startup-notification-id.returns" role="returns">
<title>Returns</title>
<para> the startup notification ID for <parameter>display</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-display-set-startup-notification-id" role="function">
<title>gdk_wayland_display_set_startup_notification_id&#160;()</title>
<indexterm zone="gdk-wayland-display-set-startup-notification-id"><primary>gdk_wayland_display_set_startup_notification_id</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_wayland_display_set_startup_notification_id
                               (<parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>,
                                <parameter>const <link linkend="char"><type>char</type></link> *startup_id</parameter>);</programlisting>
<para>Sets the startup notification ID for a display.</para>
<para>This is usually taken from the value of the DESKTOP_STARTUP_ID
environment variable, but in some cases (such as the application not
being launched using <link linkend="exec"><function>exec()</function></link>) it can come from other sources.</para>
<para>The startup ID is also what is used to signal that the startup is
complete (for example, when opening a window or when calling
<link linkend="gdk-display-notify-startup-complete"><function>gdk_display_notify_startup_complete()</function></link>).</para>
<refsect3 id="gdk-wayland-display-set-startup-notification-id.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDisplay]</emphasis></entry></row>
<row><entry role="parameter_name"><para>startup_id</para></entry>
<entry role="parameter_description"><para>the startup notification ID (must be valid utf8)</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-seat-get-wl-seat" role="function">
<title>gdk_wayland_seat_get_wl_seat&#160;()</title>
<indexterm zone="gdk-wayland-seat-get-wl-seat"><primary>gdk_wayland_seat_get_wl_seat</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-seat"><returnvalue>wl_seat</returnvalue></link>&#160;*
gdk_wayland_seat_get_wl_seat (<parameter><link linkend="GdkSeat"><type>GdkSeat</type></link> *seat</parameter>);</programlisting>
<para>Returns the Wayland <literal>wl_seat</literal> of a <link linkend="GdkSeat"><type>GdkSeat</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-seat-get-wl-seat.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>seat</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSeat"><type>GdkSeat</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandSeat]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-seat-get-wl-seat.returns" role="returns">
<title>Returns</title>
<para>a Wayland <literal>wl_seat</literal>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-device-get-wl-seat" role="function">
<title>gdk_wayland_device_get_wl_seat&#160;()</title>
<indexterm zone="gdk-wayland-device-get-wl-seat"><primary>gdk_wayland_device_get_wl_seat</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-seat"><returnvalue>wl_seat</returnvalue></link>&#160;*
gdk_wayland_device_get_wl_seat (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the Wayland wl_seat of a <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-device-get-wl-seat.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDevice]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-device-get-wl-seat.returns" role="returns">
<title>Returns</title>
<para>a Wayland wl_seat. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-device-get-wl-pointer" role="function">
<title>gdk_wayland_device_get_wl_pointer&#160;()</title>
<indexterm zone="gdk-wayland-device-get-wl-pointer"><primary>gdk_wayland_device_get_wl_pointer</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-pointer"><returnvalue>wl_pointer</returnvalue></link>&#160;*
gdk_wayland_device_get_wl_pointer (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the Wayland wl_pointer of a <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-device-get-wl-pointer.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDevice]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-device-get-wl-pointer.returns" role="returns">
<title>Returns</title>
<para>a Wayland wl_pointer. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-device-get-wl-keyboard" role="function">
<title>gdk_wayland_device_get_wl_keyboard&#160;()</title>
<indexterm zone="gdk-wayland-device-get-wl-keyboard"><primary>gdk_wayland_device_get_wl_keyboard</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-keyboard"><returnvalue>wl_keyboard</returnvalue></link>&#160;*
gdk_wayland_device_get_wl_keyboard (<parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>);</programlisting>
<para>Returns the Wayland wl_keyboard of a <link linkend="GdkDevice"><type>GdkDevice</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-device-get-wl-keyboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>device</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDevice"><type>GdkDevice</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandDevice]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-device-get-wl-keyboard.returns" role="returns">
<title>Returns</title>
<para>a Wayland wl_keyboard. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-monitor-get-wl-output" role="function">
<title>gdk_wayland_monitor_get_wl_output&#160;()</title>
<indexterm zone="gdk-wayland-monitor-get-wl-output"><primary>gdk_wayland_monitor_get_wl_output</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-output"><returnvalue>wl_output</returnvalue></link>&#160;*
gdk_wayland_monitor_get_wl_output (<parameter><link linkend="GdkMonitor"><type>GdkMonitor</type></link> *monitor</parameter>);</programlisting>
<para>Returns the Wayland wl_output of a <link linkend="GdkMonitor"><type>GdkMonitor</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-monitor-get-wl-output.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>monitor</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkMonitor"><type>GdkMonitor</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandMonitor]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-monitor-get-wl-output.returns" role="returns">
<title>Returns</title>
<para>a Wayland wl_output. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-surface-get-wl-surface" role="function">
<title>gdk_wayland_surface_get_wl_surface&#160;()</title>
<indexterm zone="gdk-wayland-surface-get-wl-surface"><primary>gdk_wayland_surface_get_wl_surface</primary></indexterm>
<programlisting language="C">struct <link linkend="wl-surface"><returnvalue>wl_surface</returnvalue></link>&#160;*
gdk_wayland_surface_get_wl_surface (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>);</programlisting>
<para>Returns the Wayland surface of a <link linkend="GdkSurface"><type>GdkSurface</type></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gdk-wayland-surface-get-wl-surface.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkSurface"><type>GdkSurface</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandSurface]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-surface-get-wl-surface.returns" role="returns">
<title>Returns</title>
<para>a Wayland wl_surface. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="GdkWaylandToplevelExported" role="function">
<title>GdkWaylandToplevelExported&#160;()</title>
<indexterm zone="GdkWaylandToplevelExported"><primary>GdkWaylandToplevelExported</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GdkWaylandToplevelExported<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="GdkToplevel"><type>GdkToplevel</type></link> *toplevel</parameter>,
                               <parameter>const <link linkend="char"><type>char</type></link> *handle</parameter>,
                               <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>Callback that gets called when the handle for a surface has been
obtained from the Wayland compositor. The <parameter>handle</parameter>
 can be passed
to other processes, for the purpose of marking surfaces as transient
for out-of-process surfaces.</para>
<refsect3 id="GdkWaylandToplevelExported.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>toplevel</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkToplevel"><type>GdkToplevel</type></link> that is exported. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandToplevel]</emphasis></entry></row>
<row><entry role="parameter_name"><para>handle</para></entry>
<entry role="parameter_description"><para>the handle</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>user data that was passed to <link linkend="gdk-wayland-toplevel-export-handle"><function>gdk_wayland_toplevel_export_handle()</function></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-toplevel-export-handle" role="function">
<title>gdk_wayland_toplevel_export_handle&#160;()</title>
<indexterm zone="gdk-wayland-toplevel-export-handle"><primary>gdk_wayland_toplevel_export_handle</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_wayland_toplevel_export_handle (<parameter><link linkend="GdkToplevel"><type>GdkToplevel</type></link> *toplevel</parameter>,
                                    <parameter><link linkend="GdkWaylandToplevelExported"><type>GdkWaylandToplevelExported</type></link> callback</parameter>,
                                    <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>,
                                    <parameter><link linkend="GDestroyNotify"><type>GDestroyNotify</type></link> destroy_func</parameter>);</programlisting>
<para>Asynchronously obtains a handle for a surface that can be passed
to other processes. When the handle has been obtained, <parameter>callback</parameter>

will be called.</para>
<para>It is an error to call this function on a surface that is already
exported.</para>
<para>When the handle is no longer needed, <link linkend="gdk-wayland-toplevel-unexport-handle"><function>gdk_wayland_toplevel_unexport_handle()</function></link>
should be called to clean up resources.</para>
<para>The main purpose for obtaining a handle is to mark a surface
from another surface as transient for this one, see
<link linkend="gdk-wayland-toplevel-set-transient-for-exported"><function>gdk_wayland_toplevel_set_transient_for_exported()</function></link>.</para>
<para>Note that this API depends on an unstable Wayland protocol,
and thus may require changes in the future.</para>
<refsect3 id="gdk-wayland-toplevel-export-handle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>toplevel</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkToplevel"><type>GdkToplevel</type></link> to obtain a handle for. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandToplevel]</emphasis></entry></row>
<row><entry role="parameter_name"><para>callback</para></entry>
<entry role="parameter_description"><para>callback to call with the handle</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>user data for <parameter>callback</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>destroy_func</para></entry>
<entry role="parameter_description"><para>destroy notify for <parameter>user_data</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-toplevel-export-handle.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the handle has been requested, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if
an error occurred.</para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-toplevel-unexport-handle" role="function">
<title>gdk_wayland_toplevel_unexport_handle&#160;()</title>
<indexterm zone="gdk-wayland-toplevel-unexport-handle"><primary>gdk_wayland_toplevel_unexport_handle</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_wayland_toplevel_unexport_handle (<parameter><link linkend="GdkToplevel"><type>GdkToplevel</type></link> *toplevel</parameter>);</programlisting>
<para>Destroys the handle that was obtained with
<link linkend="gdk-wayland-toplevel-export-handle"><function>gdk_wayland_toplevel_export_handle()</function></link>.</para>
<para>It is an error to call this function on a surface that
does not have a handle.</para>
<para>Note that this API depends on an unstable Wayland protocol,
and thus may require changes in the future.</para>
<refsect3 id="gdk-wayland-toplevel-unexport-handle.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>toplevel</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkToplevel"><type>GdkToplevel</type></link> to unexport. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandToplevel]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-toplevel-set-transient-for-exported" role="function">
<title>gdk_wayland_toplevel_set_transient_for_exported&#160;()</title>
<indexterm zone="gdk-wayland-toplevel-set-transient-for-exported"><primary>gdk_wayland_toplevel_set_transient_for_exported</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_wayland_toplevel_set_transient_for_exported
                               (<parameter><link linkend="GdkToplevel"><type>GdkToplevel</type></link> *toplevel</parameter>,
                                <parameter>const <link linkend="char"><type>char</type></link> *parent_handle_str</parameter>);</programlisting>
<para>Marks <parameter>toplevel</parameter>
 as transient for the surface to which the given
<parameter>parent_handle_str</parameter>
 refers. Typically, the handle will originate
from a <link linkend="gdk-wayland-toplevel-export-handle"><function>gdk_wayland_toplevel_export_handle()</function></link> call in another process.</para>
<para>Note that this API depends on an unstable Wayland protocol,
and thus may require changes in the future.</para>
<refsect3 id="gdk-wayland-toplevel-set-transient-for-exported.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>toplevel</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkToplevel"><type>GdkToplevel</type></link> to make as transient. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandToplevel]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent_handle_str</para></entry>
<entry role="parameter_description"><para>an exported handle for a surface</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-wayland-toplevel-set-transient-for-exported.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the surface has been marked as transient,
<link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if an error occurred.</para>
</refsect3></refsect2>
<refsect2 id="gdk-wayland-toplevel-set-application-id" role="function">
<title>gdk_wayland_toplevel_set_application_id&#160;()</title>
<indexterm zone="gdk-wayland-toplevel-set-application-id"><primary>gdk_wayland_toplevel_set_application_id</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_wayland_toplevel_set_application_id
                               (<parameter><link linkend="GdkToplevel"><type>GdkToplevel</type></link> *toplevel</parameter>,
                                <parameter>const <link linkend="char"><type>char</type></link> *application_id</parameter>);</programlisting>
<para>Sets the application id on a <link linkend="GdkToplevel"><type>GdkToplevel</type></link>.</para>
<refsect3 id="gdk-wayland-toplevel-set-application-id.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>toplevel</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkToplevel"><type>GdkToplevel</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GdkWaylandToplevel]</emphasis></entry></row>
<row><entry role="parameter_name"><para>application_id</para></entry>
<entry role="parameter_description"><para>the application id for the <parameter>toplevel</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>

</refentry>
