KDEUI
#include <kwindowinfo.h>
Public Member Functions | |
KWindowInfo (WId window, unsigned long properties, unsigned long properties2=0) | |
KWindowInfo () | |
KWindowInfo (const KWindowInfo &) | |
~KWindowInfo () | |
bool | actionSupported (NET::Action action) const |
QByteArray | clientMachine () const |
int | desktop () const |
NETExtendedStrut | extendedStrut () const |
QRect | frameGeometry () const |
QRect | geometry () const |
WId | groupLeader () const |
bool | hasState (unsigned long s) const |
QString | iconName () const |
bool | isMinimized () const |
bool | isOnCurrentDesktop () const |
bool | isOnDesktop (int desktop) const |
NET::MappingState | mappingState () const |
QString | name () const |
bool | onAllDesktops () const |
KWindowInfo & | operator= (const KWindowInfo &) |
unsigned long | state () const |
WId | transientFor () const |
bool | valid (bool withdrawn_is_valid=false) const |
QString | visibleIconName () const |
QString | visibleIconNameWithState () const |
QString | visibleName () const |
QString | visibleNameWithState () const |
WId | win () const |
QByteArray | windowClassClass () const |
QByteArray | windowClassName () const |
QByteArray | windowRole () const |
NET::WindowType | windowType (int supported_types) const |
Detailed Description
Information about a window.
Definition at line 35 of file kwindowinfo.h.
Constructor & Destructor Documentation
KWindowInfo::KWindowInfo | ( | WId | window, |
unsigned long | properties, | ||
unsigned long | properties2 = 0 |
||
) |
Reads all the info about the given window.
Definition at line 116 of file kwindowinfo_mac.cpp.
KWindowInfo::KWindowInfo | ( | ) |
Definition at line 129 of file kwindowinfo_mac.cpp.
KWindowInfo::~KWindowInfo | ( | ) |
Definition at line 134 of file kwindowinfo_mac.cpp.
KWindowInfo::KWindowInfo | ( | const KWindowInfo & | wininfo | ) |
Definition at line 143 of file kwindowinfo_mac.cpp.
Member Function Documentation
bool KWindowInfo::actionSupported | ( | NET::Action | action | ) | const |
Returns true if the given action is currently supported for the window by the window manager.
Requires NET::WM2AllowedActions passed to KWin::windowInfo().
Definition at line 286 of file kwindowinfo_mac.cpp.
QByteArray KWindowInfo::clientMachine | ( | ) | const |
Returns the client machine for the window (i.e.
WM_CLIENT_MACHINE property). Requires NET::WMClientMachine passed to KWin::windowInfo().
Definition at line 399 of file kwindowinfo_x11.cpp.
int KWindowInfo::desktop | ( | ) | const |
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().
Definition at line 271 of file kwindowinfo_mac.cpp.
NETExtendedStrut KWindowInfo::extendedStrut | ( | ) | const |
Returns the window extended (partial) strut.
Requires NET::WM2ExtendedStrut passed to KWin::windowInfo().
Definition at line 202 of file kwindowinfo_mac.cpp.
QRect KWindowInfo::frameGeometry | ( | ) | const |
Returns the frame geometry of the window, i.e.
including the window decoration. Requires NET::WMFrameExtents passed to KWin::windowInfo().
Definition at line 281 of file kwindowinfo_mac.cpp.
QRect KWindowInfo::geometry | ( | ) | const |
Returns the position and size of the window contents.
Requires NET::WMGeometry passed to KWin::windowInfo().
Definition at line 276 of file kwindowinfo_mac.cpp.
WId KWindowInfo::groupLeader | ( | ) | const |
Returns the leader window for the group the window is in, if any.
Requires NET::WM2GroupLeader passed to KWin::windowInfo().
Definition at line 363 of file kwindowinfo_x11.cpp.
bool KWindowInfo::hasState | ( | unsigned long | s | ) | const |
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().
Definition at line 178 of file kwindowinfo_mac.cpp.
QString KWindowInfo::iconName | ( | ) | const |
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().
Definition at line 251 of file kwindowinfo_mac.cpp.
bool KWindowInfo::isMinimized | ( | ) | const |
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().
Definition at line 183 of file kwindowinfo_mac.cpp.
bool KWindowInfo::isOnCurrentDesktop | ( | ) | const |
Returns true if the window is on the currently active virtual desktop.
Requires NET::WMDesktop passed to KWin::windowInfo().
Definition at line 256 of file kwindowinfo_mac.cpp.
bool KWindowInfo::isOnDesktop | ( | int | desktop | ) | const |
Returns true if the window is on the given virtual desktop.
Requires NET::WMDesktop passed to KWin::windowInfo().
Definition at line 261 of file kwindowinfo_mac.cpp.
NET::MappingState KWindowInfo::mappingState | ( | ) | const |
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().
Definition at line 197 of file kwindowinfo_mac.cpp.
QString KWindowInfo::name | ( | ) | const |
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().
Definition at line 228 of file kwindowinfo_mac.cpp.
bool KWindowInfo::onAllDesktops | ( | ) | const |
Returns true if the window is on all desktops (equal to desktop()==NET::OnAllDesktops).
Requires NET::WMDesktop passed to KWin::windowInfo().
Definition at line 266 of file kwindowinfo_mac.cpp.
KWindowInfo & KWindowInfo::operator= | ( | const KWindowInfo & | wininfo | ) |
Definition at line 150 of file kwindowinfo_mac.cpp.
unsigned long KWindowInfo::state | ( | ) | const |
Returns the window's state flags (see the NET::State enum for details).
Requires NET::WMState passed to KWin::windowInfo().
Definition at line 173 of file kwindowinfo_mac.cpp.
WId KWindowInfo::transientFor | ( | ) | const |
Returns the WM_TRANSIENT_FOR property for the window, i.e.
the mainwindow for this window. Requires NET::WM2TransientFor passed to KWin::windowInfo().
Definition at line 354 of file kwindowinfo_x11.cpp.
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.
Definition at line 163 of file kwindowinfo_mac.cpp.
QString KWindowInfo::visibleIconName | ( | ) | const |
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().
Definition at line 246 of file kwindowinfo_mac.cpp.
QString KWindowInfo::visibleIconNameWithState | ( | ) | const |
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
Definition at line 236 of file kwindowinfo_mac.cpp.
QString KWindowInfo::visibleName | ( | ) | const |
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().
Definition at line 223 of file kwindowinfo_mac.cpp.
QString KWindowInfo::visibleNameWithState | ( | ) | const |
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
Definition at line 213 of file kwindowinfo_mac.cpp.
WId KWindowInfo::win | ( | ) | const |
Returns the window identifier.
Definition at line 168 of file kwindowinfo_mac.cpp.
QByteArray KWindowInfo::windowClassClass | ( | ) | const |
Returns the class component of the window class for the window (i.e.
WM_CLASS property). Requires NET::WM2WindowClass passed to KWin::windowInfo().
Definition at line 277 of file kwindowinfo_win.cpp.
QByteArray KWindowInfo::windowClassName | ( | ) | const |
Returns the name component of the window class for the window (i.e.
WM_CLASS property). Requires NET::WM2WindowClass passed to KWin::windowInfo().
Definition at line 293 of file kwindowinfo_win.cpp.
QByteArray KWindowInfo::windowRole | ( | ) | const |
Returns the window role for the window (i.e.
WM_WINDOW_ROLE property). Requires NET::WM2WindowRole passed to KWin::windowInfo().
Definition at line 390 of file kwindowinfo_x11.cpp.
NET::WindowType KWindowInfo::windowType | ( | int | supported_types | ) | const |
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().
Definition at line 208 of file kwindowinfo_mac.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.