Functions#
- x11_device_get_id(device: X11DeviceXI2) int#
Returns the device ID as seen by XInput2.
- Parameters:
device – a
GdkDevice- Returns:
the XInput2 device ID
- x11_device_manager_lookup(device_manager: X11DeviceManagerXI2, device_id: int) X11DeviceXI2 | None#
Returns the
GdkDevicethat wraps the given device ID.- Parameters:
device_manager – a
GdkDeviceManagerdevice_id – a device ID, as understood by the XInput2 protocol
- Returns:
The
GdkDevicewrapping the device ID, orNoneif the given ID doesn’t currently represent a device.
- x11_free_compound_text(ctext: int) None#
Frees the data returned from
string_to_compound_text().- Parameters:
ctext – The pointer stored in
ctextfrom a call tostring_to_compound_text().
- x11_free_text_list(list: str) None#
Frees the array of strings created by
text_property_to_text_list().- Parameters:
list – the value stored in the
listparameter by a call totext_property_to_text_list().
- x11_get_server_time(surface: X11Surface) int#
Routine to get the current X server time stamp.
- Parameters:
surface – a
GdkSurface, used for communication with the server. The surface must haveGDK_PROPERTY_CHANGE_MASKin its events mask or a hang will result.- Returns:
the time stamp
- x11_get_xatom_by_name_for_display(display: X11Display, atom_name: str) int#
Returns the X atom for a
GdkDisplaycorresponding toatom_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.- Parameters:
display – a
GdkDisplayatom_name – a string
- Returns:
a X atom for a
GdkDisplay
- x11_get_xatom_name_for_display(display: X11Display, xatom: int) 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.
- Parameters:
display – the
GdkDisplaywherexatomis definedxatom – an X atom
- Returns:
name of the X atom; this string is owned by GDK, so it shouldn’t be modified or freed.
- x11_lookup_xdisplay(xdisplay: Display) X11Display#
Find the
GdkDisplaycorresponding toxdisplay, if any exists.- Parameters:
xdisplay – a pointer to an X Display
- Returns:
the
GdkDisplay, if found, otherwiseNone.
- x11_set_sm_client_id(sm_client_id: str | None = None) None#
Sets the
SM_CLIENT_IDproperty 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
- Parameters:
sm_client_id – the client id assigned by the session manager when the connection was opened, or
Noneto remove the property.