Top | ![]() |
![]() |
![]() |
![]() |
The functions in this section are specific to the GDK X11 backend.
To use them, you need to include the <gdk/gdkx.h>
header and use
the X11-specific pkg-config files to build your application (either
gdk-x11-3.0
or gtk+-x11-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_X11_DISPLAY()
macro).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#ifdef GDK_WINDOWING_X11 if (GDK_IS_X11_DISPLAY (display)) { // make X11-specific calls here } else #endif #ifdef GDK_WINDOWING_QUARTZ if (GDK_IS_QUARTZ_DISPLAY (display)) { // make Quartz-specific calls here } else #endif g_error ("Unsupported GDK backend"); |