Wnck.Window¶
- Subclasses:
- None 
Methods¶
- Inherited:
- Structs:
| class | 
 | 
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | 
Virtual Methods¶
- Inherited:
| 
 | |
| 
 | |
Properties¶
None
Signals¶
- Inherited:
| Name | Short Description | 
|---|---|
| Emitted when the actions availabilities for window change. | |
| Emitted when the class name or instance name of window changes. | |
| Emitted when the geometry of window changes. | |
| Emitted when the icon of window changes. | |
| Emitted when the name of window changes. | |
| Emitted when the role of window changes. | |
| Emitted when the state of window changes. | |
| Emitted when the EWMH type hint of the window changes. | |
| Emitted when the current workspace of window changes, or if window has been pinned or unpinned. | 
Fields¶
- Inherited:
| Name | Type | Access | Description | 
|---|---|---|---|
| parent_instance | r | 
Class Details¶
- class Wnck.Window(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - The - Wnck.Windowstruct contains only private fields and should not be directly accessed.- classmethod get(xwindow)¶
- Parameters:
- xwindow ( - int) – an X window ID.
- Returns:
- the - Wnck.Windowfor xwindow. The returned- Wnck.Windowis owned by libwnck and must not be referenced or unreferenced.
- Return type:
 - Gets a preexisting - Wnck.Windowfor the X window xwindow. This will not create a- Wnck.Windowif none exists. The function is robust against bogus window IDs.
 - activate(timestamp)¶
- Parameters:
- timestamp ( - int) – the X server timestamp of the user interaction event that caused this call to occur.
 - Asks the window manager to make self the active window. The window manager may choose to raise self 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. - New in version 2.10. 
 - activate_transient(timestamp)¶
- Parameters:
- timestamp ( - int) – the X server timestamp of the user interaction event that caused this call to occur.
 - If self has transients, activates the most likely transient instead of the window itself. Otherwise activates self. - FIXME the ideal behavior of this function is probably to activate the most recently active window among self 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. - New in version 2.10. 
 - close(timestamp)¶
- Parameters:
- timestamp ( - int) – the X server timestamp of the user interaction event that caused this call to occur.
 - Closes self. - This function existed before 2.6, but the timestamp argument was missing in earlier versions. - New in version 2.6. 
 - get_actions()¶
- Returns:
- bitmask of actions that can be done for self. 
- Return type:
 - Gets the actions that can be done for self. 
 - get_application()¶
- Returns:
- the - Wnck.Applicationto which self belongs. The returned- Wnck.Applicationis owned by libwnck and must not be referenced or unreferenced.
- Return type:
 - Gets the - Wnck.Applicationto which self belongs.
 - get_class_group()¶
- Returns:
- the - Wnck.ClassGroupto which self belongs. The returned- Wnck.ClassGroupis owned by libwnck and must not be referenced or unreferenced.
- Return type:
 - Gets the - Wnck.ClassGroupto which self belongs.- New in version 2.2. 
 - get_class_group_name()¶
- 
Gets the class group name from the <ulink url=”http://tronche.com/gui/x/icccm/sec-4.html#WM_CLASS”>WM_CLASS Property</ulink> for self. The class group name is also the identifier name of the Wnck.ClassGroupto which self belongs.
 - get_class_instance_name()¶
- 
Gets the class instance name from the <ulink url=”http://tronche.com/gui/x/icccm/sec-4.html#WM_CLASS”>WM_CLASS Property</ulink> for self. The class instance name allows to differentiate windows belonging to the same class group, so that they can use different resources. 
 - get_client_window_geometry()¶
- Returns:
- xp:
- return location for X coordinate in pixels of self. 
- yp:
- return location for Y coordinate in pixels of self. 
- widthp:
- return location for width in pixels of self. 
- heightp:
- return location for height in pixels of self. 
 
- Return type:
 - Gets the size and position of self, 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 self with the frame, use - Wnck.Window.get_geometry().- New in version 2.20. 
 - get_geometry()¶
- Returns:
- xp:
- return location for X coordinate in pixels of self. 
- yp:
- return location for Y coordinate in pixels of self. 
- widthp:
- return location for width in pixels of self. 
- heightp:
- return location for height in pixels of self. 
 
- Return type:
 - Gets the size and position of self, 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 self ignoring the frame added by the window manager, use - Wnck.Window.get_client_window_geometry().
 - get_group_leader()¶
- Returns:
- the group leader of the group of windows to which self belongs, or the X window ID of self if self does not belong to any group. 
- Return type:
 - Gets the group leader of the group of windows to which self belongs. 
 - get_icon()¶
- Returns:
- the icon for self. The caller should reference the returned - GdkPixbuf.Pixbufif it needs to keep the icon around.
- Return type:
 - Gets the icon to be used for self. 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.
 - get_icon_is_fallback()¶
- 
Gets whether a default fallback icon is used for self (because none was set on self). 
 - get_icon_name()¶
- Returns:
- the icon name of self, or a fallback icon name if no icon name is available. 
- Return type:
 - Gets the icon name of self, as it should be displayed for an icon (minimized state). Always returns some value, even if self 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 self ‘s title, not its icon title.
 - get_mini_icon()¶
- Returns:
- the mini-icon for self. The caller should reference the returned - GdkPixbuf.Pixbufif it needs to keep the icon around.
- Return type:
 - Gets the mini-icon to be used for self. 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.
 - get_name()¶
- Returns:
- the name of self, or a fallback name if no name is available. 
- Return type:
 - Gets the name of self, as it should be displayed in a pager or tasklist. Always returns some value, even if self 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.
 - get_pid()¶
- Returns:
- the process ID of self, or 0 if none is available. 
- Return type:
 - Gets the process ID of self. 
 - get_role()¶
- 
Gets the role for self. The role uniquely identifies a window among all windows that have the same client leader window. 
 - get_screen()¶
- Returns:
- the - Wnck.Screenself is on. The returned- Wnck.Screenis owned by libwnck and must not be referenced or unreferenced.
- Return type:
 - Gets the - Wnck.Screenself is on.
 - get_session_id()¶
- 
Gets the session ID for self 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().
 - get_session_id_utf8()¶
- 
Gets the session ID for self 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. 
 - get_sort_order()¶
- Returns:
- the sort order of self, or - GObject.G_MAXINTif none is available.
- Return type:
 - Gets the sort order of self, used for ordering of self in - Wnck.Selectorand- Wnck.Tasklist. The sort order is an internal state in libwnck. The initial value is defined when the window is created.- New in version 2.10. 
 - get_state()¶
- Returns:
- bitmask of active states for self. 
- Return type:
 - Gets the state of self. 
 - get_transient()¶
- Returns:
- the - Wnck.Windowfor which self is transient, or- Noneif self is not transient for any- Wnck.Window. The returned- Wnck.Windowis owned by libwnck and must not be referenced or unreferenced.
- Return type:
 - Gets the - Wnck.Windowfor which self is transient.- New in version 2.12. 
 - get_window_type()¶
- Returns:
- the semantic type of self. 
- Return type:
 - Gets the semantic type of self. 
 - get_workspace()¶
- Returns:
- the single current workspace self is on, or - None. The returned- Wnck.Workspaceis owned by libwnck and must not be referenced or unreferenced.
- Return type:
 - Gets the current workspace self is on. If the window is pinned (on all workspaces), or not on any workspaces, - Nonemay be returned.
 - has_icon_name()¶
- Returns:
- Trueif- Wnck.Window.get_icon_name() returns self ‘s icon name,- Falseif it returns a fallback name.
- Return type:
 - Checks whether or not self has an icon name. - Wnck.Window.get_icon_name() will always return some value, even if self 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 self ‘s name. Only when both methods return- Falsedoes- Wnck.Window.get_icon_name() return a generic fallback name.)- New in version 2.16. 
 - has_name()¶
- Returns:
- Trueif- Wnck.Window.get_name() returns self ‘s name,- Falseif it returns a fallback name.
- Return type:
 - Checks whether or not self has a name. - Wnck.Window.get_name() will always return some value, even if self 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.- New in version 2.16. 
 - is_above()¶
- 
Gets whether self is above other windows. This state may change anytime a Wnck.Window::state-changedsignal gets emitted.See Wnck.Window.make_above() for more details on this state.New in version 2.14. 
 - is_active()¶
- Returns:
- Trueif self is the active window on its- Wnck.Screen,- Falseotherwise.
- Return type:
 - Gets whether self is the active window on its - Wnck.Screen.
 - is_below()¶
- 
Gets whether self is below other windows. This state may change anytime a Wnck.Window::state-changedsignal gets emitted.See Wnck.Window.make_below() for more details on this state.New in version 2.20. 
 - is_fullscreen()¶
- 
Gets whether self is fullscreen. Fullscreen state may change anytime a Wnck.Window::state-changedsignal gets emitted.New in version 2.8. 
 - is_in_viewport(workspace)¶
- Parameters:
- workspace ( - Wnck.Workspace) – a- Wnck.Workspace.
- Returns:
- Trueif self appears in current viewport of workspace,- Falseotherwise.
- Return type:
 - Gets - Trueif self appears in the current viewport of workspace.- New in version 2.4. 
 - is_maximized()¶
- 
Gets whether self is maximized. Maximization state may change anytime a Wnck.Window::state-changedsignal gets emitted.As for GDK, “maximized” means both vertically and horizontally. If self is maximized in only one direction, then self is not considered maximized. 
 - is_maximized_horizontally()¶
- 
Gets whether self is maximized horizontally. Horizontal maximization state may change anytime a Wnck.Window::state-changedsignal gets emitted.
 - is_maximized_vertically()¶
- 
Gets whether self is maximized vertically. vertiVal maximization state may change anytime a Wnck.Window::state-changedsignal gets emitted.
 - is_minimized()¶
- 
Gets whether self is minimized. Minimization state may change anytime a Wnck.Window::state-changedsignal gets emitted.
 - is_most_recently_activated()¶
- Returns:
- Trueif self was the most recently activated window on its- Wnck.Screen,- Falseotherwise.
- Return type:
 - Gets whether self 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. - New in version 2.8. 
 - is_on_workspace(workspace)¶
- Parameters:
- workspace ( - Wnck.Workspace) – a- Wnck.Workspace.
- Returns:
- Return type:
 - Gets whether self appears on workspace. 
 - is_pinned()¶
- 
Gets whether self is on all workspace. Pinned state may change anytime a Wnck.Window::workspace-changedsignal gets emitted, but not when aWnck.Window::state-changedgets emitted.
 - is_shaded()¶
- 
Gets whether self is shaded. Shade state may change anytime a Wnck.Window::state-changedsignal gets emitted.
 - is_skip_pager()¶
- 
Gets whether self is included on pagers. This state may change anytime a Wnck.Window::state-changedsignal gets emitted.
 - is_skip_tasklist()¶
- 
Gets whether self is included on tasklists. This state may change anytime a Wnck.Window::state-changedsignal gets emitted.
 - is_sticky()¶
- 
Gets whether self is sticky. Sticky state may change anytime a Wnck.Window::state-changedsignal 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)¶
- Parameters:
- workspace ( - Wnck.Workspace) – a- Wnck.Workspace.
- Returns:
- Trueif self appears on workspace in normal state,- Falseotherwise.
- Return type:
 - 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()¶
- Asks the window manager to start moving self via the keyboard. 
 - keyboard_size()¶
- Asks the window manager to start resizing self via the keyboard. 
 - make_above()¶
- Asks the window manager to put self on top of most windows (self will not be on top of focused fullscreen windows, of other windows with this setting and of dock windows). - New in version 2.14. 
 - make_below()¶
- Asks the window manager to put self below most windows. - New in version 2.20. 
 - maximize()¶
- Asks the window manager to maximize self. 
 - maximize_horizontally()¶
- Asks the window manager to maximize horizontally self. 
 - maximize_vertically()¶
- Asks the window manager to maximize vertically self. 
 - minimize()¶
- Minimizes self. 
 - move_to_workspace(space)¶
- Parameters:
- space ( - Wnck.Workspace) – a- Wnck.Workspace.
 - Asks the window manager to move self to space. If self was pinned, it will also result in self being visible only on space. 
 - needs_attention()¶
- 
Gets whether self needs attention. This state may change anytime a Wnck.Window::state-changedsignal gets emitted.This state depends on flags such as the demands_attention and is_urgent hints. New in version 2.12. 
 - or_transient_needs_attention()¶
- 
Gets whether self or one of its transients needs attention. This state may change anytime a Wnck.Window::state-changedsignal gets emitted.New in version 2.12. 
 - pin()¶
- Asks the window manager to put self on all workspaces. 
 - set_fullscreen(fullscreen)¶
- Parameters:
- fullscreen ( - bool) – whether to make self fullscreen.
 - Asks the window manager to set the fullscreen state of self according to fullscreen. - New in version 2.8. 
 - set_geometry(gravity, geometry_mask, x, y, width, height)¶
- Parameters:
- gravity ( - Wnck.WindowGravity) – the gravity point to use as a reference for the new position.
- geometry_mask ( - Wnck.WindowMoveResizeMask) – a bitmask containing flags for what should be set.
- x ( - int) – new X coordinate in pixels of self.
- y ( - int) – new Y coordinate in pixels of self.
- width ( - int) – new width in pixels of self.
- height ( - int) – new height in pixels of self.
 
 - Sets the size and position of self. The X and Y coordinates should be relative to the root window. - Note that the new size and position apply to self 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 self and move it.- New in version 2.16. 
 - set_icon_geometry(x, y, width, height)¶
- Parameters:
 - Sets the icon geometry for self. A typical use case for this is the destination of the minimization animation of self. 
 - set_skip_pager(skip)¶
- Parameters:
- skip ( - bool) – whether self should be included on pagers.
 - Asks the window manager to make self included or not included on pagers. 
 - set_skip_tasklist(skip)¶
- Parameters:
- skip ( - bool) – whether self should be included on tasklists.
 - Asks the window manager to make self included or not included on tasklists. 
 - set_sort_order(order)¶
- Parameters:
- order ( - int) – new sort order for self.
 - Sets the sort order of self. The sort order is used for ordering of self in - Wnck.Selectorand- Wnck.Tasklist.- New in version 2.20. 
 - set_window_type(wintype)¶
- Parameters:
- wintype ( - Wnck.WindowType) – a semantic type.
 - Sets the semantic type of self to wintype. - New in version 2.12. 
 - shade()¶
- Asks the window manager to shade self. 
 - stick()¶
- Asks the window manager to keep the self ‘s position fixed on the screen, even when the workspace or viewport scrolls. 
 - transient_is_most_recently_activated()¶
- Returns:
- Trueif one of the transients of self is the most recently activated window,- Falseotherwise.
- Return type:
 - Gets whether one of the transients of self 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.Tasklistonce will activate a transient instead of self itself (- Wnck.Window.activate_transient), and clicking again should minimize self and its transients. (Not doing this can be especially annoying in the case of modal dialogs that don’t appear in the- Wnck.Tasklist).- New in version 2.12. 
 - unmake_above()¶
- Asks the window manager to not put self on top of most windows, and to put it again in the stack with other windows. - New in version 2.14. 
 - unmake_below()¶
- Asks the window manager to not put self below most windows, and to put it again in the stack with other windows. - New in version 2.20. 
 - unmaximize()¶
- Asks the window manager to unmaximize self. 
 - unmaximize_horizontally()¶
- Asks the window manager to unmaximize horizontally self. 
 - unmaximize_vertically()¶
- Asks the window manager to unmaximize vertically self. 
 - unminimize(timestamp)¶
- Parameters:
- timestamp ( - int) – the X server timestamp of the user interaction event that caused this call to occur.
 - Unminimizes self by activating it or one of its transients. See - Wnck.Window.activate_transient() for details on how the activation is done.
 - unpin()¶
- Asks the window manager to put self only in the currently active workspace, if self was previously pinned. If self was not pinned, does not change self ‘s workspace. If the active workspace is not known for some reason (it should not happen much), sets self ‘s workspace to the first workspace. 
 - unshade()¶
- Asks the window manager to unshade self. 
 - unstick()¶
- Asks the window manager to not have self ‘s position fixed on the screen when the workspace or viewport scrolls. 
 - do_actions_changed(changed_mask, new_actions) virtual¶
- Parameters:
- changed_mask ( - Wnck.WindowActions) –
- new_actions ( - Wnck.WindowActions) –
 
 
 - do_class_changed() virtual¶
 - do_geometry_changed() virtual¶
 - do_icon_changed() virtual¶
 - do_name_changed() virtual¶
 - do_role_changed() virtual¶
 - do_state_changed(changed_mask, new_state) virtual¶
- Parameters:
- changed_mask ( - Wnck.WindowState) –
- new_state ( - Wnck.WindowState) –
 
 
 - do_type_changed() virtual¶
 - do_workspace_changed() virtual¶
 
Signal Details¶
- Wnck.Window.signals.actions_changed(window, changed_mask, new_state)¶
- Signal Name:
- actions-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
- changed_mask ( - Wnck.WindowActions) – the bitmask containing bits set for all actions availabilities for window that have changed.
- new_state ( - Wnck.WindowActions) – the new actions availabilities for window.
 
 - Emitted when the actions availabilities for window change. 
- Wnck.Window.signals.class_changed(window)¶
- Signal Name:
- class-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
 - Emitted when the class name or instance name of window changes. 
- Wnck.Window.signals.geometry_changed(window)¶
- Signal Name:
- geometry-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
 - Emitted when the geometry of window changes. 
- Wnck.Window.signals.icon_changed(window)¶
- Signal Name:
- icon-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
 - Emitted when the icon of window changes. 
- Wnck.Window.signals.name_changed(window)¶
- Signal Name:
- name-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
 - Emitted when the name of window changes. 
- Wnck.Window.signals.role_changed(window)¶
- Signal Name:
- role-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
 - Emitted when the role of window changes. 
- Wnck.Window.signals.state_changed(window, changed_mask, new_state)¶
- Signal Name:
- state-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
- changed_mask ( - Wnck.WindowState) – the bitmask containing bits set for all states of window that have changed.
- new_state ( - Wnck.WindowState) – the new state of window.
 
 - Emitted when the state of window changes. This can happen when window is (un)minimized, (un)maximized, (un)sticked, (un)shaded, (un)made above, (un)made below, (un)set fullscreen, when it needs attention, etc. See - Wnck.WindowStatefor the complete list of states that might have changed.
- Wnck.Window.signals.type_changed(window)¶
- Signal Name:
- type-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
 - Emitted when the EWMH type hint of the window changes. - New in version 3.20. 
- Wnck.Window.signals.workspace_changed(window)¶
- Signal Name:
- workspace-changed
- Flags:
- Parameters:
- window ( - Wnck.Window) – The object which received the signal
 - Emitted when the current workspace of window changes, or if window has been pinned or unpinned.