KWindowInfo Class Reference
from PyKDE4.kdeui import *
Detailed Description
Information about a window.
Methods | |
__init__ (self, long window, long properties, long properties2=0) | |
__init__ (self) | |
__init__ (self, KWindowInfo a0) | |
bool | actionSupported (self, NET.Action action) |
QByteArray | clientMachine (self) |
int | desktop (self) |
NETExtendedStrut | extendedStrut (self) |
QRect | frameGeometry (self) |
QRect | geometry (self) |
long | groupLeader (self) |
bool | hasState (self, long s) |
QString | iconName (self) |
bool | isMinimized (self) |
bool | isOnCurrentDesktop (self) |
bool | isOnDesktop (self, int desktop) |
NET.MappingState | mappingState (self) |
QString | name (self) |
bool | onAllDesktops (self) |
long | state (self) |
long | transientFor (self) |
bool | valid (self, bool withdrawn_is_valid=0) |
QString | visibleIconName (self) |
QString | visibleIconNameWithState (self) |
QString | visibleName (self) |
QString | visibleNameWithState (self) |
long | win (self) |
QByteArray | windowClassClass (self) |
QByteArray | windowClassName (self) |
QByteArray | windowRole (self) |
NET.WindowType | windowType (self, int supported_types) |
Method Documentation
__init__ | ( | self, | ||
long | window, | |||
long | properties, | |||
long | properties2=0 | |||
) |
Reads all the info about the given window.
__init__ | ( | self ) |
__init__ | ( | self, | ||
KWindowInfo | a0 | |||
) |
bool actionSupported | ( | self, | ||
NET.Action | action | |||
) |
Returns true if the given action is currently supported for the window by the window manager. Requires NET.WM2AllowedActions passed to KWin.windowInfo().
QByteArray clientMachine | ( | self ) |
Returns the client machine for the window (i.e. WM_CLIENT_MACHINE property). Requires NET.WMClientMachine passed to KWin.windowInfo().
int desktop | ( | self ) |
Returns the virtual desktop this window is on (NET.OnAllDesktops if the window is on all desktops). You should prefer using isOnDesktop(). Requires NET.WMDesktop passed to KWin.windowInfo().
NETExtendedStrut extendedStrut | ( | self ) |
Returns the window extended (partial) strut. Requires NET.WM2ExtendedStrut passed to KWin.windowInfo().
QRect frameGeometry | ( | self ) |
Returns the frame geometry of the window, i.e. including the window decoration. Requires NET.WMFrameExtents passed to KWin.windowInfo().
QRect geometry | ( | self ) |
Returns the position and size of the window contents. Requires NET.WMGeometry passed to KWin.windowInfo().
long groupLeader | ( | self ) |
Returns the leader window for the group the window is in, if any. Requires NET.WM2GroupLeader passed to KWin.windowInfo().
bool hasState | ( | self, | ||
long | s | |||
) |
Returns true if the window has the given state flag set (see the NET.State enum for details). Requires NET.WMState passed to KWin.windowInfo().
QString iconName | ( | self ) |
Returns the name of the window that should be shown in taskbar and all other "iconic" representations of the window. Note that this has nothing to do with normal icons. Requires NET.WMIconName passed to KWin.windowInfo().
bool isMinimized | ( | self ) |
Returns true if the window is minimized. Note that it is true only if the window is truly minimized, not shaded or on another virtual desktops, which makes it different from mappingState() == NET.Iconic or QWidget.isMinimized(). Requires NET.WMState and NET.XAWMState passed to KWin.windowInfo().
bool isOnCurrentDesktop | ( | self ) |
Returns true if the window is on the currently active virtual desktop. Requires NET.WMDesktop passed to KWin.windowInfo().
bool isOnDesktop | ( | self, | ||
int | desktop | |||
) |
Returns true if the window is on the given virtual desktop. Requires NET.WMDesktop passed to KWin.windowInfo().
NET.MappingState mappingState | ( | self ) |
Returns the mapping state of the window (see NET.MappingState). Note that it's very likely that you don't want to use this function, and use isOnDesktop(), isMinimized() etc. instead. Requires NET.XAWMState passed to KWin.windowInfo().
QString name | ( | self ) |
Returns the name of the window, as specified by the application, without any modifications. You should often use visibleName() instead. Requires NET.WMName passed to KWin.windowInfo().
bool onAllDesktops | ( | self ) |
Returns true if the window is on all desktops (equal to desktop()==NET.OnAllDesktops). Requires NET.WMDesktop passed to KWin.windowInfo().
long state | ( | self ) |
Returns the window's state flags (see the NET.State enum for details). Requires NET.WMState passed to KWin.windowInfo().
long transientFor | ( | self ) |
Returns the WM_TRANSIENT_FOR property for the window, i.e. the mainwindow for this window. Requires NET.WM2TransientFor passed to KWin.windowInfo().
bool valid | ( | self, | ||
bool | withdrawn_is_valid=0 | |||
) |
Returns false if this window info is not valid (most probably the given window doesn't exist).
- Parameters:
-
withdrawn_is_valid if true, windows in the withdrawn state (i.e. not managed) are also considered. This is usually not the case.
QString visibleIconName | ( | self ) |
Returns the visible name of the window that should be shown in taskbar and all other "iconic" representations of the window. Note that this has nothing to do with normal icons. Requires NET.WMVisibleIconName passed to KWin.windowInfo().
QString visibleIconNameWithState | ( | self ) |
Returns a visible name with state.
This is a simple convenience function that returns the visible iconic name but with parentheses around minimized windows. Note that this has nothing to do with normal icons. Requires NET.WMVisibleIconName, NET.WMState and NET.XAWMState passed to KWin.windowInfo().
- Returns:
- the window iconic name with state
QString visibleName | ( | self ) |
Returns the visible name of the window (i.e. including possible <2> appended when there are two or more windows with the same name). Requires NET.WMVisibleName passed to KWin.windowInfo().
QString visibleNameWithState | ( | self ) |
Returns a visible name with state.
This is a simple convenience function that returns the visible name but with parentheses around minimized windows. Requires NET.WMVisibleName, NET.WMState and NET.XAWMState passed to KWin.windowInfo().
- Returns:
- the window name with state
long win | ( | self ) |
Returns the window identifier.
QByteArray windowClassClass | ( | self ) |
Returns the class component of the window class for the window (i.e. WM_CLASS property). Requires NET.WM2WindowClass passed to KWin.windowInfo().
QByteArray windowClassName | ( | self ) |
Returns the name component of the window class for the window (i.e. WM_CLASS property). Requires NET.WM2WindowClass passed to KWin.windowInfo().
QByteArray windowRole | ( | self ) |
Returns the window role for the window (i.e. WM_WINDOW_ROLE property). Requires NET.WM2WindowRole passed to KWin.windowInfo().
NET.WindowType windowType | ( | self, | ||
int | supported_types | |||
) |
Returns the window type of this window (see NET.WindowType). The argument should be all window types your application supports (see NET.WindowTypeMask). Requires NET.WMWindowType passed to KWin.windowInfo().