GdkX11.X11Display¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GdkX11.X11Display(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_glx_version(display)[source]¶
- Parameters:
display (
Gdk.Display
) – aGdk.Display
- Returns:
True
if GLX is available- major:
return location for the GLX major version
- minor:
return location for the GLX minor version
- Return type:
Retrieves the version of the GLX implementation.
New in version 3.16.
- error_trap_pop()[source]¶
- Returns:
X error code or 0 on success
- Return type:
Pops the error trap pushed by
GdkX11.X11Display.error_trap_push
(). Will XSync() if necessary and will always block until the error is known to have occurred or not occurred, so the error code can be returned.If you don’t need to use the return value,
GdkX11.X11Display.error_trap_pop_ignored
() would be more efficient.See
Gdk.error_trap_pop
() for the all-displays-at-once equivalent.New in version 3.0.
- error_trap_pop_ignored()[source]¶
Pops the error trap pushed by
GdkX11.X11Display.error_trap_push
(). Does not block to see if an error occurred; merely records the range of requests to ignore errors for, and ignores those errors if they arrive asynchronously.See
Gdk.error_trap_pop_ignored
() for the all-displays-at-once equivalent.New in version 3.0.
- error_trap_push()[source]¶
Begins a range of X requests on self for which X error events will be ignored. Unignored errors (when no trap is pushed) will abort the application. Use
GdkX11.X11Display.error_trap_pop
() orGdkX11.X11Display.error_trap_pop_ignored
()to lift a trap pushed with this function.See also
Gdk.error_trap_push
() to push a trap on all displays.New in version 3.0.
- get_startup_notification_id()[source]¶
- Returns:
the startup notification ID for self
- Return type:
Gets the startup notification ID for a display.
New in version 2.12.
- get_user_time()[source]¶
- Returns:
the timestamp of the last user interaction
- Return type:
Returns the timestamp of the last user interaction on self. The timestamp is taken from events caused by user interaction such as key presses or pointer movements. See
GdkX11.X11Window.set_user_time
().New in version 2.8.
- get_xdisplay()[source]¶
- Returns:
an X display
- Return type:
Returns the X display of a
Gdk.Display
.New in version 2.2.
- grab()[source]¶
Call XGrabServer() on self. To ungrab the display again, use
GdkX11.X11Display.ungrab
().GdkX11.X11Display.grab
()/GdkX11.X11Display.ungrab
() calls can be nested.New in version 2.2.
- set_cursor_theme(theme, size)[source]¶
- Parameters:
Sets the cursor theme from which the images for cursor should be taken.
If the windowing system supports it, existing cursors created with
Gdk.Cursor.new
(),Gdk.Cursor.new_for_display
() andGdk.Cursor.new_from_name
() are updated to reflect the theme change. Custom cursors constructed withGdk.Cursor.new_from_pixbuf
() will have to be handled by the application (GTK+ applications can learn about cursor theme changes by listening for change notification for the corresponding #GtkSetting).New in version 2.8.
- set_startup_notification_id(startup_id)[source]¶
- Parameters:
startup_id (
str
) – the startup notification ID (must be valid utf8)
Sets the startup notification ID for a display.
This is usually taken from the value of the DESKTOP_STARTUP_ID environment variable, but in some cases (such as the application not being launched using exec()) it can come from other sources.
If the ID contains the string “_TIME” then the portion following that string is taken to be the X11 timestamp of the event that triggered the application to be launched and the GDK current event time is set accordingly.
The startup ID is also what is used to signal that the startup is complete (for example, when opening a window or when calling
Gdk.notify_startup_complete
()).New in version 3.0.
- set_window_scale(scale)[source]¶
- Parameters:
scale (
int
) – The new scale value
Forces a specific window scale for all windows on this display, instead of using the default or user configured scale. This is can be used to disable scaling support by setting scale to 1, or to programmatically set the window scale.
Once the scale is set by this call it will not change in response to later user configuration changes.
New in version 3.10.
- string_to_compound_text(str)[source]¶
- Parameters:
str (
str
) – a nul-terminated string- Returns:
0 upon success, non-zero upon failure
- encoding:
location to store the encoding atom (to be used as the type for the property)
- format:
location to store the format of the property
- ctext:
location to store newly allocated data for the property
- Return type:
Convert a string from the encoding of the current locale into a form suitable for storing in a window property.
New in version 2.24.
- text_property_to_text_list(encoding, format, text, length, list)[source]¶
- Parameters:
encoding (
Gdk.Atom
) – an atom representing the encoding. The most common values for this are STRING, or COMPOUND_TEXT. This is value used as the type for the propertyformat (
int
) – the format of the propertytext (
int
) – The text datalength (
int
) – The number of items to transformlist (
str
) – location to store an array of strings in the encoding of the current locale. This array should be freed using gdk_free_text_list().
- Returns:
the number of strings stored in list, or 0, if the conversion failed
- Return type:
Convert a text string from the encoding as it is stored in a property into an array of strings in the encoding of the current locale. (The elements of the array represent the nul-separated elements of the original text string.)
New in version 2.24.
- ungrab()[source]¶
Ungrab self after it has been grabbed with
GdkX11.X11Display.grab
().New in version 2.2.
- utf8_to_compound_text(str)[source]¶
- Parameters:
str (
str
) – a UTF-8 string- Returns:
True
if the conversion succeeded, otherwiseFalse
- encoding:
location to store resulting encoding
- format:
location to store format of the result
- ctext:
location to store the data of the result
- Return type:
Converts from UTF-8 to compound text.
New in version 2.24.