Class: Wnck::Screen
- Inherits:
-
Object
- Object
- Wnck::Screen
- Defined in:
- (unknown)
Class Method Summary collapse
-
.default ⇒ Wnck::Screen
Gets the default Wnck::Screen on the default display.
-
.free_workspace_layout(layout) ⇒ nil
Frees the content of layout.
-
.get(index) ⇒ Wnck::Screen
Gets the Wnck::Screen for a given screen on the default display.
-
.get_for_root(root_window_id) ⇒ Wnck::Screen
Gets the Wnck::Screen for the root window at root_window_id, or nil if no Wnck::Screen exists for this root window.
Instance Method Summary collapse
-
#active_window ⇒ Wnck::Window
Gets the active Wnck::Window on screen.
-
#active_workspace ⇒ Wnck::Workspace
Gets the active Wnck::Workspace on screen.
-
#background_pixmap ⇒ Wnck::gulong
Gets the X window ID of the background pixmap of screen.
-
#calc_workspace_layout(num_workspaces, space_index, layout) ⇒ nil
Calculates the layout of Wnck::Workspace, with additional information like the row and column of the Wnck::Workspace with index space_index.
-
#change_workspace_count(count) ⇒ nil
Asks the window manager to change the number of Wnck::Workspace on screen.
-
#force_update ⇒ nil
Synchronously and immediately updates the list of Wnck::Window on screen.
-
#get_workspace(workspace) ⇒ Wnck::Workspace
Gets the Wnck::Workspace numbered workspace on screen.
-
#handle ⇒ Wnck::Handle
Gets the handle.
-
#height ⇒ Integer
Gets the height of screen.
-
#move_viewport(x, y) ⇒ nil
Asks the window manager to move the viewport of the current Wnck::Workspace on screen.
-
#net_wm_supports(atom) ⇒ Boolean
Gets whether the window manager for screen supports a certain hint from the Extended Window Manager Hints specification (EWMH).
-
#number ⇒ Integer
Gets the index of screen on the display to which it belongs.
-
#previously_active_window ⇒ Wnck::Window
Gets the previously active Wnck::Window on screen.
-
#release_workspace_layout(current_token) ⇒ nil
Releases the ownership of the layout of Wnck::Workspace on screen.
-
#showing_desktop ⇒ Boolean
Gets whether screen is in the "showing the desktop" mode.
-
#toggle_showing_desktop(show) ⇒ nil
Asks the window manager to set the "showing the desktop" mode on screen according to show.
-
#try_set_workspace_layout(current_token, rows, columns) ⇒ Integer
Tries to modify the layout of Wnck::Workspace on screen.
-
#width ⇒ Integer
Gets the width of screen.
-
#window_manager_name ⇒ String
Gets the name of the window manager.
-
#windows ⇒ GLib::List<Wnck::Window>
Gets the list of Wnck::Window on screen.
-
#windows_stacked ⇒ GLib::List<Wnck::Window>
Gets the list of Wnck::Window on screen in bottom-to-top order.
-
#workspace_count ⇒ Integer
Gets the number of Wnck::Workspace on screen.
-
#workspaces ⇒ GLib::List<Wnck::Workspace>
Gets the list of Wnck::Workspace on screen.
Class Method Details
.default ⇒ Wnck::Screen
Gets the default Wnck::Screen on the default display. Wnck::Screen is owned by libwnck and must not be referenced or unreferenced. This can return nil if not on X11.
.free_workspace_layout(layout) ⇒ nil
Frees the content of layout. This does not free layout itself, so you might want to free layout yourself after calling this.
.get(index) ⇒ Wnck::Screen
Gets the Wnck::Screen for a given screen on the default display. if no such screen exists. The returned Wnck::Screen is owned by libwnck and must not be referenced or unreferenced.
.get_for_root(root_window_id) ⇒ Wnck::Screen
Gets the Wnck::Screen for the root window at root_window_id, or nil if no Wnck::Screen exists for this root window.
This function does not work if wnck_screen_get() was not called for the sought Wnck::Screen before, and returns nil. root_window_id, or nil. The returned Wnck::Screen is owned by libwnck and must not be referenced or unreferenced.
Instance Method Details
#active_window ⇒ Wnck::Window
Gets the active Wnck::Window on screen. May return nil sometimes, since not all window managers guarantee that a window is always active. The returned Wnck::Window is owned by libwnck and must not be referenced or unreferenced.
#active_workspace ⇒ Wnck::Workspace
Gets the active Wnck::Workspace on screen. May return nil sometimes, if libwnck is in a weird state due to the asynchronous nature of the interaction with the window manager. nil. The returned Wnck::Workspace is owned by libwnck and must not be referenced or unreferenced.
#background_pixmap ⇒ Wnck::gulong
Gets the X window ID of the background pixmap of screen.
#calc_workspace_layout(num_workspaces, space_index, layout) ⇒ nil
Calculates the layout of Wnck::Workspace, with additional information like the row and column of the Wnck::Workspace with index space_index. wnck_screen_calc_workspace_layout() find this number. information.
#change_workspace_count(count) ⇒ nil
Asks the window manager to change the number of Wnck::Workspace on screen.
#force_update ⇒ nil
Synchronously and immediately updates the list of Wnck::Window on screen. This bypasses the standard update mechanism, where the list of Wnck::Window is updated in the idle loop.
This is usually a bad idea for both performance and correctness reasons (to get things right, you need to write model-view code that tracks changes, not get a static list of open windows). However, this function can be useful for small applications that just do something and then exit.
#get_workspace(workspace) ⇒ Wnck::Workspace
Gets the Wnck::Workspace numbered workspace on screen. screen, or nil if no such workspace exists. The returned Wnck::Workspace is owned by libwnck and must not be referenced or unreferenced.
#handle ⇒ Wnck::Handle
Gets the handle.
#height ⇒ Integer
Gets the height of screen.
#move_viewport(x, y) ⇒ nil
Asks the window manager to move the viewport of the current Wnck::Workspace on screen.
#net_wm_supports(atom) ⇒ Boolean
Gets whether the window manager for screen supports a certain hint from the Extended Window Manager Hints specification (EWMH).
When using this function, keep in mind that the window manager can change over time; so you should not 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 wnck_screen_net_wm_supports() will return false for every property.
See also gdk_x11_screen_supports_net_wm_hint() in GDK. hint, false otherwise.
#number ⇒ Integer
Gets the index of screen on the display to which it belongs. The first Wnck::Screen has an index of 0.
#previously_active_window ⇒ Wnck::Window
Gets the previously active Wnck::Window on screen. May return nil sometimes, since not all window managers guarantee that a window is always active. or nil. The returned Wnck::Window is owned by libwnck and must not be referenced or unreferenced.
#release_workspace_layout(current_token) ⇒ nil
Releases the ownership of the layout of Wnck::Workspace on screen. current_token is used to verify that the caller is the owner of the layout. If the verification fails, nothing happens. wnck_screen_try_set_workspace_layout().
#showing_desktop ⇒ Boolean
Gets whether screen is in the "showing the desktop" mode. This mode is changed when a Wnck::Screen::showing-desktop-changed signal gets emitted.
#toggle_showing_desktop(show) ⇒ nil
Asks the window manager to set the "showing the desktop" mode on screen according to show.
#try_set_workspace_layout(current_token, rows, columns) ⇒ Integer
Tries to modify the layout of Wnck::Workspace on screen. To do this, tries to acquire ownership of the layout. If the current process is the owner of the layout, current_token is used to determine if the caller is the owner (there might be more than one part of the same process trying to set the layout). Since no more than one application should set this property of screen at a time, setting the layout is not guaranteed to work.
If rows is 0, the actual number of rows will be determined based on columns and the number of Wnck::Workspace. If columns is 0, the actual number of columns will be determined based on rows and the number of Wnck::Workspace. rows and columns must not be 0 at the same time.
You have to release the ownership of the layout with wnck_screen_release_workspace_layout() when you do not need it anymore. wnck_screen_try_set_workspace_layout() before, or if you did not keep the old token. wnck_screen_try_set_workspace_layout() and to wnck_screen_release_workspace_layout(), or 0 if the layout could not be set.
#width ⇒ Integer
Gets the width of screen.
#window_manager_name ⇒ String
Gets the name of the window manager. does not comply with the EWMH specification.
#windows ⇒ GLib::List<Wnck::Window>
Gets the list of Wnck::Window on screen. The list is not in a defined order, but should be "stable" (windows should not be reordered in it). However, the stability of the list is established by the window manager, so don't blame libwnck if it breaks down. Wnck::Window on screen, or nil if there is no window on screen. The list should not be modified nor freed, as it is owned by screen.
#windows_stacked ⇒ GLib::List<Wnck::Window>
Gets the list of Wnck::Window on screen in bottom-to-top order. Wnck::Window in stacking order on screen, or nil if there is no window on screen. The list should not be modified nor freed, as it is owned by screen.
#workspace_count ⇒ Integer
Gets the number of Wnck::Workspace on screen.
#workspaces ⇒ GLib::List<Wnck::Workspace>
Gets the list of Wnck::Workspace on screen. The list is ordered: the first element in the list is the first Wnck::Workspace, etc.. Wnck::Workspace on screen. The list should not be modified nor freed, as it is owned by screen.