Functions ========= .. currentmodule:: gi.repository.GdkX11 .. function:: x11_device_get_id(device: ~gi.repository.GdkX11.X11DeviceXI2) -> int Returns the device ID as seen by XInput2. :param device: a ``GdkDevice`` :return: the XInput2 device ID .. function:: x11_device_manager_lookup(device_manager: ~gi.repository.GdkX11.X11DeviceManagerXI2, device_id: int) -> ~gi.repository.GdkX11.X11DeviceXI2 | None Returns the ``GdkDevice`` that wraps the given device ID. :param device_manager: a ``GdkDeviceManager`` :param device_id: a device ID, as understood by the XInput2 protocol :return: The ``GdkDevice`` wrapping the device ID, or :const:`None` if the given ID doesn’t currently represent a device. .. function:: x11_free_compound_text(ctext: int) -> None Frees the data returned from :func:`~gi.repository.GdkX11.X11Display.string_to_compound_text`. :param ctext: The pointer stored in ``ctext`` from a call to :func:`~gi.repository.GdkX11.X11Display.string_to_compound_text`. .. function:: x11_free_text_list(list: str) -> None Frees the array of strings created by :func:`~gi.repository.GdkX11.X11Display.text_property_to_text_list`. :param list: the value stored in the ``list`` parameter by a call to :func:`~gi.repository.GdkX11.X11Display.text_property_to_text_list`. .. function:: x11_get_server_time(surface: ~gi.repository.GdkX11.X11Surface) -> int Routine to get the current X server time stamp. :param surface: 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. :return: the time stamp .. function:: x11_get_xatom_by_name_for_display(display: ~gi.repository.GdkX11.X11Display, atom_name: str) -> 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. :param display: a ``GdkDisplay`` :param atom_name: a string :return: a X atom for a ``GdkDisplay`` .. function:: x11_get_xatom_name_for_display(display: ~gi.repository.GdkX11.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. :param display: the ``GdkDisplay`` where ``xatom`` is defined :param xatom: an X atom :return: name of the X atom; this string is owned by GDK, so it shouldn’t be modified or freed. .. function:: x11_lookup_xdisplay(xdisplay: ~gi.repository.xlib.Display) -> ~gi.repository.GdkX11.X11Display Find the ``GdkDisplay`` corresponding to ``xdisplay``, if any exists. :param xdisplay: a pointer to an X Display :return: the ``GdkDisplay``, if found, otherwise :const:`None`. .. function:: x11_set_sm_client_id(sm_client_id: str | None = None) -> None 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 :param sm_client_id: the client id assigned by the session manager when the connection was opened, or :const:`None` to remove the property.