<chapter id="gtk-windows">
  <title>Using GTK on Windows</title>
  <para>
    The Windows port of GTK is an implementation of GDK (and therefore
    GTK) on top of the Win32 API. When compiling GTK on Windows, this
    backend is the default.
  </para>
  <para>
    More information about GTK on Windows, including detailed build
    instructions, binary downloads, etc, can be found
    <ulink url="https://wiki.gnome.org/Projects/GTK/Win32">online</ulink>.
  </para>
  <sect1 id="win32-envar">
    <title>Windows-specific environment variables</title>
    <para>
      The Win32 GDK backend can be influenced with some additional
      environment variables.
    </para>
    <sect2>
      <title>GDK_IGNORE_WINTAB</title>
      <para>
        If this variable is set, GTK doesn’t use the Wintab API for
        tablet support.
      </para>
    </sect2>
    <sect2>
      <title>GDK_USE_WINTAB</title>
      <para>
        If this variable is set, GTK uses the Wintab API for tablet
        support. This is the default.
      </para>
    </sect2>
  </sect1>
  <sect1 id="win32-cursors">
    <title>Windows-specific handling of cursors</title>
    <para>
      By default the <quote>system</quote> cursor theme is used. This
      makes GTK prefer cursors that Windows currently uses, falling back
      to Adwaita cursors and (as the last resort) built-in X cursors.
    </para>
    <para>
      When any other cursor theme is used, GTK will prefer cursors from
      that theme, falling back to Windows cursors and built-in X
      cursors.
    </para>
    <para>
      Theme can be changed by setting
      <literal>gtk-cursor-theme-name</literal> GTK setting. Users can
      override GTK settings in the <literal>settings.ini</literal> file
      or at runtime in the GTK Inspector.
    </para>
    <para>
      Themes are loaded from normal Windows variants of the XDG
      locations: <literal><link linkend="HOME:CAPS"><literal>HOME</literal></link>%/icons/THEME/cursors</literal>,
      <literal><link linkend="APPDATA:CAPS"><literal>APPDATA</literal></link>%/icons/THEME/cursors</literal>,
      <literal>RUNTIME_PREFIX/share/icons/THEME/cursors</literal>
    </para>
    <para>
      The <literal>gtk-cursor-theme-size</literal> setting is ignored,
      GTK will use the cursor size that Windows tells it to use.
    </para>
  </sect1>
</chapter>
