Class: GdkX11::X11Display
- Inherits:
-
Gdk::Display
- Object
- Gdk::Display
- GdkX11::X11Display
- Defined in:
- (unknown)
Class Method Summary collapse
-
.open(display_name) ⇒ Gdk::Display
Tries to open a new display to the X server given by display_name.
-
.set_program_class(display, program_class) ⇒ nil
Sets the program class.
Instance Method Summary collapse
-
#broadcast_startup_message(message_type, array) ⇒ nil
Sends a startup notification message of type message_type to display.
-
#default_group ⇒ Gdk::Surface
Returns the default group leader surface for all toplevel surfaces on display.
-
#egl_display ⇒ GObject
Retrieves the EGL display connection object for the given GDK display.
-
#error_trap_pop ⇒ Integer
Pops the error trap pushed by gdk_x11_display_error_trap_push().
-
#error_trap_pop_ignored ⇒ nil
Pops the error trap pushed by gdk_x11_display_error_trap_push().
-
#error_trap_push ⇒ nil
Begins a range of X requests on display for which X error events will be ignored.
-
#get_egl_version(major, minor) ⇒ Boolean
Retrieves the version of the EGL implementation.
-
#get_glx_version(major, minor) ⇒ Boolean
Retrieves the version of the GLX implementation.
-
#get_xcursor(cursor) ⇒ xlib::Cursor
Returns the X cursor belonging to a
GdkCursor, potentially creating the cursor. -
#grab ⇒ nil
Call XGrabServer() on display.
-
#primary_monitor ⇒ Gdk::Monitor
Gets the primary monitor for the display.
-
#screen ⇒ GdkX11::X11Screen
Retrieves the
GdkX11Screenof the display. -
#set_cursor_theme(theme, size) ⇒ nil
Sets the cursor theme from which the images for cursor should be taken.
-
#startup_notification_id ⇒ String
Gets the startup notification ID for a display.
-
#startup_notification_id=(startup_id) ⇒ nil
Sets the startup notification ID for a display.
-
#string_to_compound_text(str, encoding, format, ctext, length) ⇒ Integer
Convert a string from the encoding of the current locale into a form suitable for storing in a window property.
-
#surface_scale=(scale) ⇒ nil
Forces a specific window scale for all windows on this display, instead of using the default or user configured scale.
-
#text_property_to_text_list(encoding, format, text, length, list) ⇒ Integer
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.
-
#ungrab ⇒ nil
Ungrab display after it has been grabbed with gdk_x11_display_grab().
-
#user_time ⇒ Integer
Returns the timestamp of the last user interaction on display.
-
#utf8_to_compound_text(str, encoding, format, ctext, length) ⇒ Boolean
Converts from UTF-8 to compound text.
-
#xdisplay ⇒ xlib::Display
Returns the X display of a
GdkDisplay. -
#xrootwindow ⇒ xlib::Window
Returns the root X window used by
GdkDisplay. -
#xscreen ⇒ xlib::Screen
Returns the X Screen used by
GdkDisplay.
Methods inherited from Gdk::Display
#app_launch_context, #beep, #clipboard, #close, #composited=, #composited?, #create_gl_context, default, #default_seat, #device_is_grabbed, #dmabuf_formats, #dmabuf_formats=, #flush, #get_monitor_at_surface, #get_setting, #input_shapes=, #input_shapes?, #is_closed, #is_composited, #is_rgba, #list_seats, #map_keycode, #map_keyval, #monitors, #name, #notify_startup_complete, #prepare_gl, #primary_clipboard, #put_event, #rgba=, #rgba?, #shadow_width=, #shadow_width?, #supports_input_shapes, #supports_shadow_width, #sync, #translate_key
Class Method Details
.open(display_name) ⇒ Gdk::Display
Tries to open a new display to the X server given by
display_name. If opening the display fails, nil is
returned.
.set_program_class(display, program_class) ⇒ nil
Sets the program class.
The X11 backend uses the program class to set the class name part
of the WM_CLASS property on toplevel windows; see the ICCCM.
Instance Method Details
#broadcast_startup_message(message_type, array) ⇒ nil
Sends a startup notification message of type message_type to
display.
This is a convenience function for use by code that implements the
freedesktop startup notification specification. Applications should
not normally need to call it directly. See the
Startup Notification Protocol specification
for definitions of the message types and keys that can be used.
or "remove")
nil key. (A nil value for a key will cause that key to be
skipped in the output.)
#default_group ⇒ Gdk::Surface
Returns the default group leader surface for all toplevel surfaces
on display. This surface is implicitly created by GDK.
See gdk_x11_surface_set_group().
for display
#egl_display ⇒ GObject
Retrieves the EGL display connection object for the given GDK display.
This function returns NULL if GDK is using GLX.
#error_trap_pop ⇒ Integer
Pops the error trap pushed by gdk_x11_display_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,
gdk_x11_display_error_trap_pop_ignored() would be more efficient.
#error_trap_pop_ignored ⇒ nil
Pops the error trap pushed by gdk_x11_display_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.
#error_trap_push ⇒ nil
Begins a range of X requests on display for which X error events
will be ignored. Unignored errors (when no trap is pushed) will abort
the application. Use gdk_x11_display_error_trap_pop() or
gdk_x11_display_error_trap_pop_ignored()to lift a trap pushed
with this function.
#get_egl_version(major, minor) ⇒ Boolean
Retrieves the version of the EGL implementation.
#get_glx_version(major, minor) ⇒ Boolean
Retrieves the version of the GLX implementation.
#get_xcursor(cursor) ⇒ xlib::Cursor
Returns the X cursor belonging to a GdkCursor, potentially
creating the cursor.
Be aware that the returned cursor may not be unique to cursor.
It may for example be shared with its fallback cursor. On old
X servers that don't support the XCursor extension, all cursors
may even fall back to a few default cursors.
#grab ⇒ nil
Call XGrabServer() on display.
To ungrab the display again, use gdk_x11_display_ungrab().
gdk_x11_display_grab()/gdk_x11_display_ungrab() calls can be nested.
#primary_monitor ⇒ Gdk::Monitor
Gets the primary monitor for the display.
The primary monitor is considered the monitor where the “main desktop”
lives. While normal application surfaces typically allow the window
manager to place the surfaces, specialized desktop applications
such as panels should place themselves on the primary monitor.
If no monitor is the designated primary monitor, any monitor
(usually the first) may be returned.
#screen ⇒ GdkX11::X11Screen
Retrieves the GdkX11Screen of the display.
#set_cursor_theme(theme, size) ⇒ nil
Sets the cursor theme from which the images for cursor
should be taken.
If the windowing system supports it, existing cursors created
with [ctorGdk.Cursor.new_from_name] are updated to reflect the theme
change. Custom cursors constructed with [ctorGdk.Cursor.new_from_texture]
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).
#startup_notification_id ⇒ String
Gets the startup notification ID for a display.
#startup_notification_id=(startup_id) ⇒ nil
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_display_notify_startup_complete()).
#string_to_compound_text(str, encoding, format, ctext, length) ⇒ Integer
Convert a string from the encoding of the current
locale into a form suitable for storing in a window property.
#surface_scale=(scale) ⇒ nil
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.
#text_property_to_text_list(encoding, format, text, length, list) ⇒ Integer
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.)
#ungrab ⇒ nil
Ungrab display after it has been grabbed with
gdk_x11_display_grab().
#user_time ⇒ Integer
Returns the timestamp of the last user interaction on
display. The timestamp is taken from events caused
by user interaction such as key presses or pointer
movements. See gdk_x11_surface_set_user_time().
#utf8_to_compound_text(str, encoding, format, ctext, length) ⇒ Boolean
Converts from UTF-8 to compound text.
#xdisplay ⇒ xlib::Display
Returns the X display of a GdkDisplay.
#xrootwindow ⇒ xlib::Window
Returns the root X window used by GdkDisplay.
#xscreen ⇒ xlib::Screen
Returns the X Screen used by GdkDisplay.