Class: GdkX11::X11Screen

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#current_desktop ⇒ Integer

Returns the current workspace for screen when running under a
window manager that supports multiple workspaces, as described
in the
Extended Window Manager Hints specification.

Returns:

  • (Integer) —

    the current workspace, or 0 if workspaces are not supported

#get_monitor_output(monitor_num) ⇒ xlib::XID

Gets the XID of the specified output/monitor.
If the X server does not support version 1.2 of the RANDR
extension, 0 is returned.

Parameters:

  • monitor_num (Integer) —

    number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)

Returns:

  • (xlib::XID) —

    the XID of the monitor

#number_of_desktops ⇒ Integer

Returns the number of workspaces for screen when running under a
window manager that supports multiple workspaces, as described
in the
Extended Window Manager Hints specification.

Returns:

  • (Integer) —

    the number of workspaces, or 0 if workspaces are not supported

#screen_number ⇒ Integer

Returns the index of a GdkX11Screen.

Returns:

  • (Integer) —

    the position of screen among the screens
    of its display

#supports_net_wm_hint(property_name) ⇒ Boolean

This function is specific to the X11 backend of GDK, and indicates
whether the window manager supports a certain hint from the
Extended Window Manager Hints specification.

When using this function, keep in mind that the window manager
can change over time; so you shouldn’t use this function in
a way that impacts persistent application state. A common bug
is that your application can start up before the window manager
does when the user logs in, and before the window manager starts
gdk_x11_screen_supports_net_wm_hint() will return false for every property.
You can monitor the window_manager_changed signal on GdkX11Screen to detect
a window manager change.

Parameters:

  • property_name (String) —

    name of the WM property

Returns:

  • (Boolean) —

    true if the window manager supports property

#window_manager_name ⇒ String

Returns the name of the window manager for screen.
"unknown" if the window manager is unknown. The string is owned by GDK
and should not be freed.

Returns:

  • (String) —

    the name of the window manager screen screen, or

#xscreen ⇒ xlib::Screen

Returns the screen of a GdkX11Screen.

Returns:

  • (xlib::Screen) —

    an Xlib Screen*