Class: Wnck::Window
- Inherits:
-
Object
- Object
- Wnck::Window
- Defined in:
- (unknown)
Class Method Summary collapse
-
.get(xwindow) ⇒ Wnck::Window
Gets a preexisting Wnck::Window for the X window xwindow.
Instance Method Summary collapse
-
#actions ⇒ Wnck::WindowActions
Gets the actions that can be done for window.
-
#activate(timestamp) ⇒ nil
Asks the window manager to make window the active window.
-
#activate_transient(timestamp) ⇒ nil
If window has transients, activates the most likely transient instead of the window itself.
-
#application ⇒ Wnck::Application
Gets the Wnck::Application to which window belongs.
-
#class_group ⇒ Wnck::ClassGroup
Gets the Wnck::ClassGroup to which window belongs.
-
#class_group_name ⇒ String
Gets the class group name from the WM_CLASS Property for window.
-
#class_instance_name ⇒ String
Gets the class instance name from the WM_CLASS Property for window.
-
#close(timestamp) ⇒ nil
Closes window.
-
#fullscreen=(fullscreen) ⇒ nil
Asks the window manager to set the fullscreen state of window according to fullscreen.
-
#get_client_window_geometry(xp, yp, widthp, heightp) ⇒ nil
Gets the size and position of window, as last received in a ConfigureNotify event (i.e. this call does not round-trip to the server, just gets the last size we were notified of).
-
#get_geometry(xp, yp, widthp, heightp) ⇒ nil
Gets the size and position of window, including decorations.
-
#group_leader ⇒ Wnck::gulong
Gets the group leader of the group of windows to which window belongs.
-
#has_icon_name ⇒ Boolean
Checks whether or not window has an icon name.
-
#has_name ⇒ Boolean
Checks whether or not window has a name.
-
#icon ⇒ GdkPixbuf::Pixbuf
Gets the icon to be used for window.
-
#icon_is_fallback ⇒ Boolean
Gets whether a default fallback icon is used for window (because none was set on window).
-
#icon_name ⇒ String
Gets the icon name of window, as it should be displayed for an icon (minimized state).
-
#is_above ⇒ Boolean
Gets whether window is above other windows.
-
#is_active ⇒ Boolean
Gets whether window is the active window on its Wnck::Screen.
-
#is_below ⇒ Boolean
Gets whether window is below other windows.
-
#is_fullscreen ⇒ Boolean
Gets whether window is fullscreen.
-
#is_in_viewport(workspace) ⇒ Boolean
Gets true if window appears in the current viewport of workspace.
-
#is_maximized ⇒ Boolean
Gets whether window is maximized.
-
#is_maximized_horizontally ⇒ Boolean
Gets whether window is maximized horizontally.
-
#is_maximized_vertically ⇒ Boolean
Gets whether window is maximized vertically.
-
#is_minimized ⇒ Boolean
Gets whether window is minimized.
-
#is_most_recently_activated ⇒ Boolean
Gets whether window is the most recently activated window on its Wnck::Screen.
-
#is_on_workspace(workspace) ⇒ Boolean
Gets whether window appears on workspace.
-
#is_pinned ⇒ Boolean
Gets whether window is on all workspace.
-
#is_shaded ⇒ Boolean
Gets whether window is shaded.
-
#is_skip_pager ⇒ Boolean
Gets whether window is included on pagers.
-
#is_skip_tasklist ⇒ Boolean
Gets whether window is included on tasklists.
-
#is_sticky ⇒ Boolean
Gets whether window is sticky.
-
#is_visible_on_workspace(workspace) ⇒ Boolean
Like wnck_window_is_on_workspace(), but also checks that the window is in a visible state (i.e. not minimized or shaded).
-
#keyboard_move ⇒ nil
Asks the window manager to start moving window via the keyboard.
-
#keyboard_size ⇒ nil
Asks the window manager to start resizing window via the keyboard.
-
#make_above ⇒ nil
Asks the window manager to put window on top of most windows (window will not be on top of focused fullscreen windows, of other windows with this setting and of dock windows).
-
#make_below ⇒ nil
Asks the window manager to put window below most windows.
-
#maximize ⇒ nil
Asks the window manager to maximize window.
-
#maximize_horizontally ⇒ nil
Asks the window manager to maximize horizontally window.
-
#maximize_vertically ⇒ nil
Asks the window manager to maximize vertically window.
-
#mini_icon ⇒ GdkPixbuf::Pixbuf
Gets the mini-icon to be used for window.
-
#minimize ⇒ nil
Minimizes window.
-
#move_to_workspace(space) ⇒ nil
Asks the window manager to move window to space.
-
#name ⇒ String
Gets the name of window, as it should be displayed in a pager or tasklist.
-
#needs_attention ⇒ Boolean
Gets whether window needs attention.
-
#or_transient_needs_attention ⇒ Boolean
Gets whether window or one of its transients needs attention.
-
#pid ⇒ Integer
Gets the process ID of window.
-
#pin ⇒ nil
Asks the window manager to put window on all workspaces.
-
#role ⇒ String
Gets the role for window.
-
#screen ⇒ Wnck::Screen
Gets the Wnck::Screen window is on.
-
#session_id ⇒ String
Gets the session ID for window in Latin-1 encoding.
-
#session_id_utf8 ⇒ String
Gets the session ID for window in UTF-8 encoding.
-
#set_geometry(gravity, geometry_mask, x, y, width, height) ⇒ nil
Sets the size and position of window.
-
#set_icon_geometry(x, y, width, height) ⇒ nil
Sets the icon geometry for window.
-
#shade ⇒ nil
Asks the window manager to shade window.
-
#skip_pager=(skip) ⇒ nil
Asks the window manager to make window included or not included on pagers.
-
#skip_tasklist=(skip) ⇒ nil
Asks the window manager to make window included or not included on tasklists.
-
#sort_order ⇒ Integer
Gets the sort order of window, used for ordering of window in Wnck::Selector and #WnckTasklist.
-
#sort_order=(order) ⇒ nil
Sets the sort order of window.
-
#state ⇒ Wnck::WindowState
Gets the state of window.
-
#stick ⇒ nil
Asks the window manager to keep the window's position fixed on the screen, even when the workspace or viewport scrolls.
-
#transient ⇒ Wnck::Window
Gets the Wnck::Window for which window is transient.
-
#transient_is_most_recently_activated ⇒ Boolean
Gets whether one of the transients of window is the most recently activated window.
-
#unmake_above ⇒ nil
Asks the window manager to not put window on top of most windows, and to put it again in the stack with other windows.
-
#unmake_below ⇒ nil
Asks the window manager to not put window below most windows, and to put it again in the stack with other windows.
-
#unmaximize ⇒ nil
Asks the window manager to unmaximize window.
-
#unmaximize_horizontally ⇒ nil
Asks the window manager to unmaximize horizontally window.
-
#unmaximize_vertically ⇒ nil
Asks the window manager to unmaximize vertically window.
-
#unminimize(timestamp) ⇒ nil
Unminimizes window by activating it or one of its transients.
-
#unpin ⇒ nil
Asks the window manager to put window only in the currently active workspace, if window was previously pinned.
-
#unshade ⇒ nil
Asks the window manager to unshade window.
-
#unstick ⇒ nil
Asks the window manager to not have window's position fixed on the screen when the workspace or viewport scrolls.
-
#window_type ⇒ Wnck::WindowType
Gets the semantic type of window.
-
#window_type=(wintype) ⇒ nil
Sets the semantic type of window to wintype.
-
#workspace ⇒ Wnck::Workspace
Gets the current workspace window is on.
-
#xid ⇒ Wnck::gulong
Gets the X window ID of window.
Class Method Details
.get(xwindow) ⇒ Wnck::Window
Gets a preexisting Wnck::Window for the X window xwindow. This will not
create a Wnck::Window if none exists. The function is robust against bogus
window IDs.
Wnck::Window is owned by libwnck and must not be referenced or unreferenced.
Instance Method Details
#actions ⇒ Wnck::WindowActions
Gets the actions that can be done for window.
#activate(timestamp) ⇒ nil
Asks the window manager to make window the active window. The
window manager may choose to raise window along with focusing it, and may
decide to refuse the request (to not steal the focus if there is a more
recent user activity, for example).
This function existed before 2.10, but the timestamp argument was missing
in earlier versions.
this call to occur.
#activate_transient(timestamp) ⇒ nil
If window has transients, activates the most likely transient
instead of the window itself. Otherwise activates window.
FIXME the ideal behavior of this function is probably to activate
the most recently active window among window and its transients.
This is probably best implemented on the window manager side.
This function existed before 2.10, but the timestamp argument was missing
in earlier versions.
this call to occur.
#application ⇒ Wnck::Application
Gets the Wnck::Application to which window belongs.
The returned Wnck::Application is owned by libwnck and must not be referenced
or unreferenced.
#class_group ⇒ Wnck::ClassGroup
Gets the Wnck::ClassGroup to which window belongs.
The returned Wnck::ClassGroup is owned by libwnck and must not be referenced
or unreferenced.
#class_group_name ⇒ String
Gets the class group name from the WM_CLASS Property
for window.
The class group name is also the identifier name of the Wnck::ClassGroup to
which window belongs.
to no class group.
#class_instance_name ⇒ String
Gets the class instance name from the WM_CLASS Property
for window.
The class instance name allows to differentiate windows belonging to the
same class group, so that they can use different resources.
no class instance.
#close(timestamp) ⇒ nil
Closes window.
This function existed before 2.6, but the timestamp argument was missing
in earlier versions.
this call to occur.
#fullscreen=(fullscreen) ⇒ nil
Asks the window manager to set the fullscreen state of window according to
fullscreen.
#get_client_window_geometry(xp, yp, widthp, heightp) ⇒ nil
Gets the size and position of window, as last received
in a ConfigureNotify event (i.e. this call does not round-trip
to the server, just gets the last size we were notified of).
The X and Y coordinates are relative to the root window.
The window manager usually adds a frame around windows. If
you need to know the size of window with the frame, use
wnck_window_get_geometry().
#get_geometry(xp, yp, widthp, heightp) ⇒ nil
Gets the size and position of window, including decorations. This
function uses the information last received in a ConfigureNotify
event and adjusts it according to the size of the frame that is
added by the window manager (this call does not round-trip to the
server, it just gets the last sizes that were notified). The
X and Y coordinates are relative to the root window.
If you need to know the actual size of window ignoring the frame
added by the window manager, use wnck_window_get_client_window_geometry().
#group_leader ⇒ Wnck::gulong
Gets the group leader of the group of windows to which window belongs.
belongs, or the X window ID of window if window does not belong to any
group.
#has_icon_name ⇒ Boolean
Checks whether or not window has an icon name.
wnck_window_get_icon_name() will always return some value, even if
window has no icon name set; wnck_window_has_icon_name() can
be used to tell if that icon name is real or not.
(Note that if wnck_window_has_icon_name() returns false, but
wnck_window_has_name() returns true, then the name returned by
wnck_window_get_icon_name() is window's name. Only when both
methods return false does wnck_window_get_icon_name() return a
generic fallback name.)
window's icon name, false if it returns a fallback name.
#has_name ⇒ Boolean
Checks whether or not window has a name. wnck_window_get_name()
will always return some value, even if window has no name set;
wnck_window_has_name() can be used to tell if that name is
real or not.
For icons titles, use wnck_window_has_icon_name() instead.
name, false if it returns a fallback name.
#icon ⇒ GdkPixbuf::Pixbuf
Gets the icon to be used for window. If no icon was found, a fallback
icon is used. wnck_window_get_icon_is_fallback() can be used to tell if the
icon is the fallback icon.
reference the returned GdkPixbuf if it needs to keep
the icon around.
#icon_is_fallback ⇒ Boolean
Gets whether a default fallback icon is used for window (because none
was set on window).
#icon_name ⇒ String
Gets the icon name of window, as it should be displayed for an icon
(minimized state). Always returns some value, even if window has no icon
name set; use wnck_window_has_icon_name() if you need to know whether the
returned icon name is "real" or not.
Contrast with wnck_window_get_name(), which returns window's
title, not its icon title.
name is available.
#is_above ⇒ Boolean
Gets whether window is above other windows. This state may change
anytime a Wnck::Window::state-changed signal gets emitted.
See wnck_window_make_above() for more details on this state.
#is_active ⇒ Boolean
Gets whether window is the active window on its Wnck::Screen.
false otherwise.
#is_below ⇒ Boolean
Gets whether window is below other windows. This state may change
anytime a Wnck::Window::state-changed signal gets emitted.
See wnck_window_make_below() for more details on this state.
#is_fullscreen ⇒ Boolean
Gets whether window is fullscreen. Fullscreen state may change
anytime a Wnck::Window::state-changed signal gets emitted.
#is_in_viewport(workspace) ⇒ Boolean
Gets true if window appears in the current viewport of workspace.
false otherwise.
#is_maximized ⇒ Boolean
Gets whether window is maximized. Maximization state may change
anytime a Wnck::Window::state-changed signal gets emitted.
As for GDK, "maximized" means both vertically and horizontally. If window
is maximized in only one direction, then window is not considered
maximized.
otherwise.
#is_maximized_horizontally ⇒ Boolean
Gets whether window is maximized horizontally. Horizontal maximization
state may change anytime a Wnck::Window::state-changed signal gets emitted.
#is_maximized_vertically ⇒ Boolean
Gets whether window is maximized vertically. vertiVal maximization
state may change anytime a Wnck::Window::state-changed signal gets emitted.
#is_minimized ⇒ Boolean
Gets whether window is minimized. Minimization state may change anytime
a Wnck::Window::state-changed signal gets emitted.
#is_most_recently_activated ⇒ Boolean
Gets whether window is the most recently activated window on its
Wnck::Screen.
The most recently activated window is identical to the active
window for click and sloppy focus methods (since a window is always
active in those cases) but differs slightly for mouse focus since
there often is no active window.
Wnck::Screen, false otherwise.
#is_on_workspace(workspace) ⇒ Boolean
Gets whether window appears on workspace.
#is_pinned ⇒ Boolean
Gets whether window is on all workspace. Pinned state may change
anytime a Wnck::Window::workspace-changed signal gets emitted, but not when
a Wnck::Window::state-changed gets emitted.
#is_shaded ⇒ Boolean
Gets whether window is shaded. Shade state may change anytime
a Wnck::Window::state-changed signal gets emitted.
#is_skip_pager ⇒ Boolean
Gets whether window is included on pagers. This state may change
anytime a Wnck::Window::state-changed signal gets emitted.
#is_skip_tasklist ⇒ Boolean
Gets whether window is included on tasklists. This state may change
anytime a Wnck::Window::state-changed signal gets emitted.
#is_sticky ⇒ Boolean
Gets whether window is sticky. Sticky state may change
anytime a Wnck::Window::state-changed signal gets emitted.
Sticky here means "stuck to the glass", i.e. does not scroll with the
viewport. In GDK/GTK+ (e.g. gdk_window_stick()/gtk_window_stick()), sticky
means "stuck to the glass" and also that the window is
on all workspaces. But here it only means the viewport aspect of it.
#is_visible_on_workspace(workspace) ⇒ Boolean
Like wnck_window_is_on_workspace(), but also checks that
the window is in a visible state (i.e. not minimized or shaded).
otherwise.
#keyboard_move ⇒ nil
Asks the window manager to start moving window via the keyboard.
#keyboard_size ⇒ nil
Asks the window manager to start resizing window via the keyboard.
#make_above ⇒ nil
Asks the window manager to put window on top of most windows (window will
not be on top of focused fullscreen windows, of other windows with this
setting and of dock windows).
#make_below ⇒ nil
Asks the window manager to put window below most windows.
#maximize ⇒ nil
Asks the window manager to maximize window.
#maximize_horizontally ⇒ nil
Asks the window manager to maximize horizontally window.
#maximize_vertically ⇒ nil
Asks the window manager to maximize vertically window.
#mini_icon ⇒ GdkPixbuf::Pixbuf
Gets the mini-icon to be used for window. If no mini-icon was found, a
fallback mini-icon is used. wnck_window_get_icon_is_fallback() can be used
to tell if the mini-icon is the fallback mini-icon.
reference the returned GdkPixbuf if it needs to keep
the icon around.
#minimize ⇒ nil
Minimizes window.
#move_to_workspace(space) ⇒ nil
Asks the window manager to move window to space. If window was pinned, it
will also result in window being visible only on space.
#name ⇒ String
Gets the name of window, as it should be displayed in a pager
or tasklist. Always returns some value, even if window has no name
set; use wnck_window_has_name() if you need to know whether the returned
name is "real" or not.
For icons titles, use wnck_window_get_icon_name() instead.
available.
#needs_attention ⇒ Boolean
Gets whether window needs attention. This state may change anytime
a Wnck::Window::state-changed signal gets emitted.
This state depends on flags such as the demands_attention and is_urgent
hints.
#or_transient_needs_attention ⇒ Boolean
Gets whether window or one of its transients needs attention. This state
may change anytime a Wnck::Window::state-changed signal gets emitted.
false otherwise.
#pid ⇒ Integer
Gets the process ID of window.
#pin ⇒ nil
Asks the window manager to put window on all workspaces.
#role ⇒ String
Gets the role for window.
The role uniquely identifies a window among all windows that have the same
client leader window.
#screen ⇒ Wnck::Screen
Gets the Wnck::Screen window is on.
Wnck::Screen is owned by libwnck and must not be referenced or unreferenced.
#session_id ⇒ String
Gets the session ID for window in Latin-1 encoding.
NOTE: this is invalid UTF-8. You can't display this
string in a GTK+ widget without converting to UTF-8.
See wnck_window_get_session_id_utf8().
no session ID.
#session_id_utf8 ⇒ String
Gets the session ID for window in UTF-8 encoding.
The session ID should be in Latin-1 encoding, so the conversion should work,
but a broken client could set a session ID that might not be convertable to
UTF-8.
no session ID.
#set_geometry(gravity, geometry_mask, x, y, width, height) ⇒ nil
Sets the size and position of window. The X and Y coordinates should be
relative to the root window.
Note that the new size and position apply to window with its frame added
by the window manager. Therefore, using wnck_window_set_geometry() with
the values returned by wnck_window_get_geometry() should be a no-op, while
using wnck_window_set_geometry() with the values returned by
wnck_window_get_client_window_geometry() should reduce the size of window
and move it.
#set_icon_geometry(x, y, width, height) ⇒ nil
Sets the icon geometry for window. A typical use case for this is the
destination of the minimization animation of window.
#shade ⇒ nil
Asks the window manager to shade window.
#skip_pager=(skip) ⇒ nil
Asks the window manager to make window included or not included on pagers.
#skip_tasklist=(skip) ⇒ nil
Asks the window manager to make window included or not included on
tasklists.
#sort_order ⇒ Integer
Gets the sort order of window, used for ordering of window in
Wnck::Selector and #WnckTasklist. The sort order is an internal state in
libwnck. The initial value is defined when the window is created.
#sort_order=(order) ⇒ nil
Sets the sort order of window. The sort order is used for ordering of
window in Wnck::Selector and #WnckTasklist.
#state ⇒ Wnck::WindowState
Gets the state of window.
#stick ⇒ nil
Asks the window manager to keep the window's position fixed on the
screen, even when the workspace or viewport scrolls.
#transient ⇒ Wnck::Window
Gets the Wnck::Window for which window is transient.
transient, or nil if window is not transient for any Wnck::Window.
The returned Wnck::Window is owned by libwnck and must not be referenced or
unreferenced.
#transient_is_most_recently_activated ⇒ Boolean
Gets whether one of the transients of window is the most
recently activated window. See
wnck_window_is_most_recently_activated() for a more complete
description of what is meant by most recently activated. This
function is needed because clicking on a Wnck::Tasklist once will
activate a transient instead of window itself
(wnck_window_activate_transient), and clicking again should
minimize window and its transients. (Not doing this can be
especially annoying in the case of modal dialogs that don't appear
in the Wnck::Tasklist).
activated window, false otherwise.
#unmake_above ⇒ nil
Asks the window manager to not put window on top of most windows, and to
put it again in the stack with other windows.
#unmake_below ⇒ nil
Asks the window manager to not put window below most windows, and to
put it again in the stack with other windows.
#unmaximize ⇒ nil
Asks the window manager to unmaximize window.
#unmaximize_horizontally ⇒ nil
Asks the window manager to unmaximize horizontally window.
#unmaximize_vertically ⇒ nil
Asks the window manager to unmaximize vertically window.
#unminimize(timestamp) ⇒ nil
Unminimizes window by activating it or one of its transients. See
wnck_window_activate_transient() for details on how the activation is done.
this call to occur.
#unpin ⇒ nil
Asks the window manager to put window only in the currently active
workspace, if window was previously pinned. If window was not pinned,
does not change window's workspace. If the active workspace
is not known for some reason (it should not happen much), sets
window's workspace to the first workspace.
#unshade ⇒ nil
Asks the window manager to unshade window.
#unstick ⇒ nil
Asks the window manager to not have window's position fixed on the
screen when the workspace or viewport scrolls.
#window_type ⇒ Wnck::WindowType
Gets the semantic type of window.
#window_type=(wintype) ⇒ nil
Sets the semantic type of window to wintype.
#workspace ⇒ Wnck::Workspace
Gets the current workspace window is on. If the window is pinned (on all
workspaces), or not on any workspaces, nil may be returned.
nil. The returned Wnck::Workspace is owned by libwnck and must not be
referenced or unreferenced.
#xid ⇒ Wnck::gulong
Gets the X window ID of window.