manpagez: man pages & more
html files: gdk3
Home | html | info | man

Wayland Interaction

Wayland Interaction — Wayland backend-specific functions

Includes

#include <gdk/gdkwayland.h>

Description

The functions in this section are specific to the GDK Wayland backend. To use them, you need to include the <gdk/gdkwayland.h> header and use the Wayland-specific pkg-config files to build your application (either gdk-wayland-3.0 or gtk+-wayland-3.0).

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 GDK_IS_WAYLAND_DISPLAY() macro).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#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");

Functions

Types and Values

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.