# class KWinModule | Base class for KDE Window Manager modules. More...
Definition | `#include <kwinmodule.h>`
Inherits | QObject (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KWinModule ( QObject* parent = 0 )
- ~KWinModule ()
- const QValueList<WId>& windows () const
- const QValueList<WId>& stackingOrder () const
- bool hasWId (WId) 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>&, int desktop = -1) const
- QString desktopName ( int desktop ) const
- void setDesktopName ( int desktop, const QString& name )
- void doNotManage ( const QString& title )

#### Signals

- void currentDesktopChanged ( int )
- void windowAdded (WId)
- void windowRemoved (WId)
- void activeWindowChanged (WId)
- void desktopNamesChanged ()
- void numberOfDesktopsChanged (int)
- void systemTrayWindowAdded (WId)
- void systemTrayWindowRemoved (WId)
- void workAreaChanged ()
- void strutChanged ()
- void stackingOrderChanged ()
- void windowChanged (WId, unsigned int )
- void windowChanged (WId )

## Detailed Description

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.

KWinModule ( QObject* parent = 0 ) | ### KWinModule

Creates a KWinModule object and connects to the window manager.

~KWinModule () | ### ~KWinModule

Destructor. Internal cleanup, nothing fancy.

const QValueList<WId>& windows () | ### windows

[const]

Retrurns the list of all toplevel windows currently managed by the windowmanger in the order of creation. Please do not rely on indexes of this list: Whenever you enter Qt's eventloop 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 hasWindow() 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.
           }

const QValueList<WId>& stackingOrder () | ### stackingOrder

[const]

Returns the list of all toplevel windows currently managed by the windowmanger in the current stacking order (from lower to higher). May be useful for pagers.

bool hasWId (WId) | ### hasWId

[const]

Test to see if `WId` still managed at present.

const QValueList<WId>& systemTrayWindows () | ### systemTrayWindows

[const]

Retrieves a list of the system tray windows.

int currentDesktop () | ### currentDesktop

[const]

Returns the current virtual desktop

int numberOfDesktops () | ### numberOfDesktops

[const]

Returns the number of virtual desktops

WId activeWindow () | ### activeWindow

[const]

Returns the currently active window, or 0 if no window is active.

QRect workArea ( int desktop = - 1 ) | ### workArea

[const]

Returns the workarea for the specified desktop, or the current work area if no desktop has been specified.

QRect workArea ( const QValueList<WId>&, int desktop = -1) | ### workArea

[const]

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.

QString desktopName ( int desktop ) | ### desktopName

[const]

Returns the name of the specified desktop

void setDesktopName ( int desktop, const QString& name ) | ### setDesktopName

Sets the name of the specified desktop

void doNotManage ( const QString& title ) | ### doNotManage

Informs kwin via dcop to not manage a window with the specified `title`.

Useful for swallowing legacy applications, for example java applets.

void currentDesktopChanged ( int ) | ### currentDesktopChanged

[signal]

Switched to another virtual desktop

void windowAdded (WId) | ### windowAdded

[signal]

A window has been added

void windowRemoved (WId) | ### windowRemoved

[signal]

A window has been removed

void activeWindowChanged (WId) | ### activeWindowChanged

[signal]

Hint that <Window> is active (= has focus) now.

void desktopNamesChanged () | ### desktopNamesChanged

[signal]

Desktops have been renamed

void numberOfDesktopsChanged (int) | ### numberOfDesktopsChanged

[signal]

The number of desktops changed

void systemTrayWindowAdded (WId) | ### systemTrayWindowAdded

[signal]

Add a dock window

void systemTrayWindowRemoved (WId) | ### systemTrayWindowRemoved

[signal]

Remove a dock window

void workAreaChanged () | ### workAreaChanged

[signal]

The workarea has changed

void strutChanged () | ### strutChanged

[signal]

void stackingOrderChanged () | ### stackingOrderChanged

[signal]

The stacking order of the window changed. The new order can be obtained with stackingOrder()

void windowChanged (WId, unsigned int ) | ### windowChanged

[signal]

The window changed.

The unsigned int parameter contains the NET properties that were modified (see netem_def.h).

void windowChanged (WId ) | ### windowChanged

[signal]

The window changed somehow.

- Version: $Id: kwinmodule.h,v 1.13 2001/02/03 19:04:31 antlarr Exp $
- Author: Matthias Ettrich (ettrich@kde.org)
- Generated: root@i386.ports.openbsd.org on Wed Apr 25 13:58:13 2001, using kdoc 2.0a53.