KWinModule Class Reference
Base class for KDE Window Manager modules. More...
#include <kwinmodule.h>
Inheritance diagram for KWinModule:

Public Types | |
enum | { INFO_DESKTOP = 1, INFO_WINDOWS = 2, INFO_ALL = 32767 } |
Signals | |
void | currentDesktopChanged (int desktop) |
void | windowAdded (WId id) |
void | windowRemoved (WId id) |
void | activeWindowChanged (WId id) |
void | desktopNamesChanged () |
void | numberOfDesktopsChanged (int num) |
void | systemTrayWindowAdded (WId id) |
void | systemTrayWindowRemoved (WId id) |
void | workAreaChanged () |
void | strutChanged () |
void | stackingOrderChanged () |
void | windowChanged (WId id, const unsigned long *properties) |
void | windowChanged (WId id, unsigned int properties) |
void | windowChanged (WId id) |
Public Member Functions | |
KWinModule (QObject *parent, int what) | |
KWinModule (QObject *parent=0) | |
~KWinModule () | |
const QValueList< WId > & | windows () const |
const QValueList< WId > & | stackingOrder () const |
bool | hasWId (WId id) const |
const QValueList< WId > & | systemTrayWindows () const |
int | currentDesktop () const |
int | numberOfDesktops () const |
WId | activeWindow () const |
QRect | workArea (int desktop=-1) const |
QRect | workArea (const QValueList< WId > &excludes, int desktop=-1) const |
QString | desktopName (int desktop) const |
void | setDesktopName (int desktop, const QString &name) |
void | doNotManage (const QString &title) |
Protected Member Functions | |
virtual void | connectNotify (const char *signal) |
Friends | |
class | KWinModulePrivate |
Detailed Description
Base class for KDE Window Manager modules.The class KWinModule provides information about the state of the window manager as required by windowmanager modules. It informs a module about all currently managed windows and changes to them (via Qt signals).
KWinModule uses NETRootInfo internally. Modules written with this class will work fine under any window manager that implements the NET_WM protocol.
There are no methods to manipulate windows. Those are defined in the classes KWin, NETWinInfo and NETRootInfo.
- Author:
- Matthias Ettrich (ettrich@kde.org)
Definition at line 52 of file kwinmodule.h.
Constructor & Destructor Documentation
|
Creates a KWinModule object and connects to the window manager.
Definition at line 105 of file kwinmodule.cpp. |
|
Creates a KWinModule object and connects to the window manager.
Definition at line 99 of file kwinmodule.cpp. |
|
Destructor. Internal cleanup, nothing fancy. Definition at line 136 of file kwinmodule.cpp. |
Member Function Documentation
|
Returns the list of all toplevel windows currently managed by the window manager in the order of creation. Please do not rely on indexes of this list: Whenever you enter Qt's event loop in your application, it may happen that entries are removed or added. Your module should perhaps work on a copy of this list and verify a window with hasWId() before any operations. Iteration over this list can be done easily with QValueList<WId>::ConstIterator it; for ( it = module->windows().begin(); it != modules->windows().end(); ++it ) { ... do something here, (*it) is the current WId. }
Definition at line 145 of file kwinmodule.cpp. |
|
Returns the list of all toplevel windows currently managed by the window manager in the current stacking order (from lower to higher). May be useful for pagers.
Definition at line 150 of file kwinmodule.cpp. |
|
Test to see if
Definition at line 156 of file kwinmodule.cpp. |
|
Returns a list of the system tray windows.
Definition at line 161 of file kwinmodule.cpp. |
|
Returns the current virtual desktop.
Definition at line 299 of file kwinmodule.cpp. Referenced by desktopName(), setDesktopName(), and workArea(). |
|
Returns the number of virtual desktops.
Definition at line 304 of file kwinmodule.cpp. Referenced by desktopName(). |
|
Returns the currently active window, or 0 if no window is active.
Definition at line 309 of file kwinmodule.cpp. |
|
Returns the workarea for the specified desktop, or the current work area if no desktop has been specified.
Definition at line 314 of file kwinmodule.cpp. References currentDesktop(), QApplication::desktop(), NETSize::height, NETRect::pos, NETRect::size, NETSize::width, NETPoint::x, and NETPoint::y. |
|
Returns the workarea for the specified desktop, or the current work area if no desktop has been specified. Excludes struts of clients in the exclude List.
Definition at line 325 of file kwinmodule.cpp. References QRect::bottom(), NETStrut::bottom, NETWinInfo::desktop(), QApplication::desktop(), QValueList::findIndex(), QRect::intersect(), QRect::left(), NETStrut::left, NETWinInfo::OnAllDesktops, QRect::right(), NETStrut::right, QRect::setBottom(), QRect::setLeft(), QRect::setRight(), QRect::setTop(), NETWinInfo::strut(), QRect::top(), and NETStrut::top. |
|
Returns the name of the specified desktop.
Definition at line 384 of file kwinmodule.cpp. References QString::arg(), currentDesktop(), QString::fromUtf8(), i18n(), QObject::name(), and numberOfDesktops(). |
|
Sets the name of the specified desktop.
Definition at line 392 of file kwinmodule.cpp. References currentDesktop(), and QString::utf8(). |
|
Informs kwin via dcop to not manage a window with the specified Useful for swallowing legacy applications, for example java applets.
Definition at line 400 of file kwinmodule.cpp. |
|
Switched to another virtual desktop.
|
|
A window has been added.
|
|
A window has been removed.
|
|
Hint that <Window> is active (= has focus) now.
|
|
Desktops have been renamed.
|
|
The number of desktops changed.
|
|
Emitted when a dock window has been added.
|
|
Emitted when a dock window has been removed.
|
|
The workarea has changed.
|
|
Something changed with the struts, may or may not have changed the work area. Usually just using the workAreaChanged() signal is sufficient. Referenced by connectNotify(). |
|
Emitted when the stacking order of the window changed. The new order can be obtained with stackingOrder(). |
|
The window changed. The properties parameter contains the NET properties that were modified (see netwm_def.h). First element are NET::Property values, second element are NET::Property2 values (i.e. the format is the same like for the NETWinInfo class constructor).
|
|
The unsigned int parameter contains the NET properties that were modified (see netwm_def.h).
|
|
The window changed somehow.
|
The documentation for this class was generated from the following files: