### Namespace

# GdkX11 – 4.0

The GTK toolkit

Version | 4.14.4
Authors | GTK Development Team
License | LGPL-2.1-or-later
Website | https://www.gtk.org
Source | https://gitlab.gnome.org/GNOME/gtk/

#### Build

C headers | `gdk/x11/gdkx.h`
pkg-config files | `gtk4-x11`

#### Dependencies

#### Additional documentation

- Classes Hierarchy

#### Classes

X11AppLaunchContext | since: 4.0
X11DeviceManagerXI2 | since: 4.0
X11DeviceXI2 | since: 4.0
X11Display | since: 4.0
X11Drag | since: 4.0
X11GLContext | since: 4.0
X11Monitor | since: 4.0
X11Screen | since: 4.0
X11Surface | since: 4.0

#### Enumerations

X11DeviceType | since: 4.0

#### Functions

x11_device_get_id | Returns the device ID as seen by XInput2. since: 4.0
x11_device_manager_lookup | Returns the `GdkDevice` that wraps the given device ID. since: 4.0
x11_free_compound_text | Frees the data returned from gdk_x11_display_string_to_compound_text(). since: 4.0
x11_free_text_list | Frees the array of strings created by gdk_x11_display_text_property_to_text_list(). since: 4.0
x11_get_server_time | Routine to get the current X server time stamp. since: 4.0
x11_get_xatom_by_name_for_display | Returns the X atom for a `GdkDisplay` corresponding to `atom_name`. This function caches the result, so if called repeatedly it is much faster than XInternAtom(), which is a round trip to the server each time. since: 4.0
x11_get_xatom_name_for_display | Returns the name of an X atom for its display. This function is meant mainly for debugging, so for convenience, unlike XAtomName() and the result doesn’t need to be freed. since: 4.0
x11_lookup_xdisplay | Find the `GdkDisplay` corresponding to `xdisplay`, if any exists. since: 4.0
x11_set_sm_client_id | Sets the `SM_CLIENT_ID` property on the application’s leader window so that the window manager can save the application’s state using the X11R6 ICCCM session management protocol. since: 4.0

#### Function Macros

DISPLAY_XDISPLAY | Returns the display of a `GdkDisplay`. since: 4.0
POINTER_TO_XID | Converts a `gpointer` back to an XID that was previously converted using GDK_XID_TO_POINTER(). since: 4.0
SURFACE_XDISPLAY | Returns the display of a `GdkSurface`. since: 4.0
SURFACE_XID | Returns the X window belonging to a `GdkSurface`. since: 4.0
X11_DEVICE_MANAGER_XI2 | since: 4.0
X11_DEVICE_MANAGER_XI2_CLASS | since: 4.0
X11_DEVICE_XI2 | since: 4.0
X11_DEVICE_XI2_CLASS | since: 4.0
XID_TO_POINTER | Converts an XID into a `gpointer`. This is useful with data structures that use pointer arguments such as `GHashTable`. Use GDK_POINTER_TO_XID() to convert the argument back to an XID. since: 4.0