Functions

x11_device_get_id (device)

x11_device_manager_lookup (device_manager, device_id)

x11_free_compound_text (ctext)

x11_free_text_list (list)

x11_get_server_time (surface)

x11_get_xatom_by_name_for_display (display, atom_name)

x11_get_xatom_name_for_display (display, xatom)

x11_lookup_xdisplay (xdisplay)

x11_set_sm_client_id (sm_client_id)

Details

GdkX11.x11_device_get_id(device)[source]
Parameters:

device (GdkX11.X11DeviceXI2) – a GdkDevice

Returns:

the XInput2 device ID

Return type:

int

Returns the device ID as seen by XInput2.

GdkX11.x11_device_manager_lookup(device_manager, device_id)[source]
Parameters:
Returns:

The GdkDevice wrapping the device ID, or None if the given ID doesn’t currently represent a device.

Return type:

GdkX11.X11DeviceXI2 or None

Returns the GdkDevice that wraps the given device ID.

GdkX11.x11_free_compound_text(ctext)[source]
Parameters:

ctext (int) – The pointer stored in ctext from a call to GdkX11.X11Display.string_to_compound_text().

Frees the data returned from GdkX11.X11Display.string_to_compound_text().

GdkX11.x11_free_text_list(list)[source]
Parameters:

list (str) – the value stored in the list parameter by a call to GdkX11.X11Display.text_property_to_text_list().

Frees the array of strings created by GdkX11.X11Display.text_property_to_text_list().

GdkX11.x11_get_server_time(surface)[source]
Parameters:

surface (GdkX11.X11Surface) – a GdkSurface, used for communication with the server. The surface must have GDK_PROPERTY_CHANGE_MASK in its events mask or a hang will result.

Returns:

the time stamp

Return type:

int

Routine to get the current X server time stamp.

GdkX11.x11_get_xatom_by_name_for_display(display, atom_name)[source]
Parameters:
Returns:

a X atom for a GdkDisplay

Return type:

int

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.

GdkX11.x11_get_xatom_name_for_display(display, xatom)[source]
Parameters:
Returns:

name of the X atom; this string is owned by GDK, so it shouldn’t be modified or freed.

Return type:

str

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.

GdkX11.x11_lookup_xdisplay(xdisplay)[source]
Parameters:

xdisplay (xlib.Display) – a pointer to an X xlib.Display

Returns:

the GdkDisplay, if found, otherwise None.

Return type:

GdkX11.X11Display

Find the GdkDisplay corresponding to xdisplay, if any exists.

GdkX11.x11_set_sm_client_id(sm_client_id)[source]
Parameters:

sm_client_id (str or None) – the client id assigned by the session manager when the connection was opened, or None to remove the property.

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.

See the X Session Management Library documentation for more information on session management and the Inter-Client Communication Conventions Manual