Functions

x11_atom_to_xatom (atom)

x11_atom_to_xatom_for_display (display, atom)

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_default_root_xwindow ()

x11_get_default_screen ()

x11_get_default_xdisplay ()

x11_get_parent_relative_pattern ()

x11_get_server_time (window)

x11_get_xatom_by_name (atom_name)

x11_get_xatom_by_name_for_display (display, atom_name)

x11_get_xatom_name (xatom)

x11_get_xatom_name_for_display (display, xatom)

x11_grab_server ()

x11_lookup_xdisplay (xdisplay)

x11_register_standard_event_type (display, event_base, n_events)

x11_set_sm_client_id (sm_client_id)

x11_ungrab_server ()

x11_xatom_to_atom (xatom)

x11_xatom_to_atom_for_display (display, xatom)

Details

GdkX11.x11_atom_to_xatom(atom)[source]
Parameters:

atom (Gdk.Atom) – A Gdk.Atom

Returns:

the X atom corresponding to atom.

Return type:

int

Converts from a Gdk.Atom to the X atom for the default GDK display with the same string value.

GdkX11.x11_atom_to_xatom_for_display(display, atom)[source]
Parameters:
Returns:

the X atom corresponding to atom, or %None

Return type:

int

Converts from a Gdk.Atom to the X atom for a Gdk.Display with the same string value. The special value %GDK_NONE is converted to %None.

New in version 2.2.

GdkX11.x11_device_get_id(device)[source]
Parameters:

device (GdkX11.X11DeviceCore) – a Gdk.Device

Returns:

the XInput2 device ID.

Return type:

int

Returns the device ID as seen by XInput2.

If Gdk.disable_multidevice() has been called, this function will respectively return 2/3 for the core pointer and keyboard, (matching the IDs for the Virtual Core Pointer and Keyboard in XInput 2), but calling this function on any slave devices (i.e. those managed via XInput 1.x), will return 0.

New in version 3.2.

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

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

Return type:

GdkX11.X11DeviceCore or None

Returns the Gdk.Device that wraps the given device ID.

New in version 3.2.

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().

New in version 2.24.

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().

New in version 2.24.

GdkX11.x11_get_default_root_xwindow()[source]
Returns:

an Xlib Window.

Return type:

int

Gets the root window of the default screen (see GdkX11.x11_get_default_screen()).

GdkX11.x11_get_default_screen()[source]
Returns:

returns the screen number specified by the –display command line option or the DISPLAY environment variable when Gdk.init() calls xlib.open_display().

Return type:

int

Gets the default GTK+ screen number.

GdkX11.x11_get_default_xdisplay()[source]
Returns:

the Xlib xlib.Display for the display specified in the --display command line option or the DISPLAY environment variable.

Return type:

xlib.Display

Gets the default GTK+ display.

GdkX11.x11_get_parent_relative_pattern()[source]
Return type:

cairo.Pattern

Used with Gdk.Window.set_background_pattern() to inherit background from parent window. Useful for imitating transparency when compositing is not available. Otherwise behaves like a transparent pattern.

New in version 3.24.2.

Deprecated since version 3.24: Don’t use this function

GdkX11.x11_get_server_time(window)[source]
Parameters:

window (GdkX11.X11Window) – a Gdk.Window, used for communication with the server. The window must have Gdk.EventMask.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(atom_name)[source]
Parameters:

atom_name (str) – a string

Returns:

a X atom for GDK’s default display.

Return type:

int

Returns the X atom for GDK’s default display 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_by_name_for_display(display, atom_name)[source]
Parameters:
Returns:

a X atom for a Gdk.Display

Return type:

int

Returns the X atom for a Gdk.Display 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.

New in version 2.2.

GdkX11.x11_get_xatom_name(xatom)[source]
Parameters:

xatom (int) – an X atom for GDK’s default display

Returns:

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

Return type:

str

Returns the name of an X atom for GDK’s default display. This function is meant mainly for debugging, so for convenience, unlike XAtomName() and Gdk.Atom.name(), the result doesn’t need to be freed. Also, this function will never return None, even if xatom is invalid.

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 modifed 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 Gdk.Atom.name(), the result doesn’t need to be freed.

New in version 2.2.

GdkX11.x11_grab_server()[source]

Call GdkX11.X11Display.grab() on the default display. To ungrab the server again, use GdkX11.x11_ungrab_server().

GdkX11.x11_grab_server()/GdkX11.x11_ungrab_server() calls can be nested.

GdkX11.x11_lookup_xdisplay(xdisplay)[source]
Parameters:

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

Returns:

the Gdk.Display, if found, otherwise None.

Return type:

GdkX11.X11Display

Find the Gdk.Display corresponding to xdisplay, if any exists.

New in version 2.2.

GdkX11.x11_register_standard_event_type(display, event_base, n_events)[source]
Parameters:

Registers interest in receiving extension events with type codes between event_base and event_base + n_events - 1. The registered events must have the window field in the same place as core X events (this is not the case for e.g. XKB extension events).

If an event type is registered, events of this type will go through global and window-specific filters (see gdk_window_add_filter()). Unregistered events will only go through global filters. GDK may register the events of some X extensions on its own.

This function should only be needed in unusual circumstances, e.g. when filtering XInput extension events on the root window.

New in version 2.4.

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

New in version 2.24.

GdkX11.x11_ungrab_server()[source]

Ungrab the default display after it has been grabbed with GdkX11.x11_grab_server().

GdkX11.x11_xatom_to_atom(xatom)[source]
Parameters:

xatom (int) – an X atom for the default GDK display

Returns:

the corresponding G#dkAtom.

Return type:

Gdk.Atom

Convert from an X atom for the default display to the corresponding Gdk.Atom.

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

the corresponding Gdk.Atom.

Return type:

Gdk.Atom

Convert from an X atom for a Gdk.Display to the corresponding Gdk.Atom.

New in version 2.2.