.TH "KWinModule" 3 "28 Jan 2004" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KWinModule \- The class KWinModule provides information about the state of the window manager as required by windowmanager modules. Base class for \fBKDE\fP Window Manager modules.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kwinmodule.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBcurrentDesktopChanged\fP (int desktop)"
.br
.RI "\fISwitched to another virtual desktop. \fP"
.ti -1c
.RI "void \fBwindowAdded\fP (WId id)"
.br
.RI "\fIA window has been added. \fP"
.ti -1c
.RI "void \fBwindowRemoved\fP (WId id)"
.br
.RI "\fIA window has been removed. \fP"
.ti -1c
.RI "void \fBactiveWindowChanged\fP (WId)"
.br
.RI "\fIHint that  is active (= has focus) now. \fP"
.ti -1c
.RI "void \fBdesktopNamesChanged\fP ()"
.br
.RI "\fIDesktops have been renamed. \fP"
.ti -1c
.RI "void \fBnumberOfDesktopsChanged\fP (int num)"
.br
.RI "\fIThe number of desktops changed. \fP"
.ti -1c
.RI "void \fBsystemTrayWindowAdded\fP (WId id)"
.br
.RI "\fIEmitted when a dock window has been added. \fP"
.ti -1c
.RI "void \fBsystemTrayWindowRemoved\fP (WId id)"
.br
.RI "\fIEmitted when a dock window has been removed. \fP"
.ti -1c
.RI "void \fBworkAreaChanged\fP ()"
.br
.RI "\fIThe workarea has changed. \fP"
.ti -1c
.RI "void \fBstrutChanged\fP ()"
.br
.RI "\fISomething changed with the struts, may or may not have changed the work area. \fP"
.ti -1c
.RI "void \fBstackingOrderChanged\fP ()"
.br
.RI "\fIEmitted when the stacking order of the window changed. \fP"
.ti -1c
.RI "void \fBwindowChanged\fP (WId id, unsigned int properties)"
.br
.RI "\fIThe window changed. \fP"
.ti -1c
.RI "void \fBwindowChanged\fP (WId id)"
.br
.RI "\fIThe window changed somehow. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKWinModule\fP (\fBQObject\fP *\fBparent\fP=0)"
.br
.RI "\fICreates a KWinModule object and connects to the window manager. \fP"
.ti -1c
.RI "\fB~KWinModule\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "const  \fBQValueList\fP< WId > & \fBwindows\fP () const "
.br
.RI "\fIReturns the list of all toplevel windows currently managed by the window manager in the order of creation. \fP"
.ti -1c
.RI "const  \fBQValueList\fP< WId > & \fBstackingOrder\fP () const "
.br
.RI "\fIReturns the list of all toplevel windows currently managed by the window manager in the current stacking order (from lower to higher). \fP"
.ti -1c
.RI "bool \fBhasWId\fP (WId id) const "
.br
.RI "\fITest to see if \fCid\fP still managed at present. \fP"
.ti -1c
.RI "const  \fBQValueList\fP< WId > & \fBsystemTrayWindows\fP () const "
.br
.RI "\fIReturns a list of the system tray windows. \fP"
.ti -1c
.RI "int \fBcurrentDesktop\fP () const "
.br
.RI "\fIReturns the current virtual desktop. \fP"
.ti -1c
.RI "int \fBnumberOfDesktops\fP () const "
.br
.RI "\fIReturns the number of virtual desktops. \fP"
.ti -1c
.RI "WId \fBactiveWindow\fP () const "
.br
.RI "\fIReturns the currently active window, or 0 if no window is active. \fP"
.ti -1c
.RI "\fBQRect\fP \fBworkArea\fP (int desktop=-1) const "
.br
.RI "\fIReturns the workarea for the specified desktop, or the current work area if no desktop has been specified. \fP"
.ti -1c
.RI "\fBQRect\fP \fBworkArea\fP (const  \fBQValueList\fP< WId > &excludes, int desktop=-1) const "
.br
.RI "\fIReturns the workarea for the specified desktop, or the current work area if no desktop has been specified. \fP"
.ti -1c
.RI "\fBQString\fP \fBdesktopName\fP (int desktop) const "
.br
.RI "\fIReturns the name of the specified desktop. \fP"
.ti -1c
.RI "void \fBsetDesktopName\fP (int desktop, const  \fBQString\fP &\fBname\fP)"
.br
.RI "\fISets the name of the specified desktop. \fP"
.ti -1c
.RI "void \fBdoNotManage\fP (const  \fBQString\fP &title)"
.br
.RI "\fIInforms kwin via dcop to not manage a window with the specified \fCtitle\fP. \fP"
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKWinModulePrivate\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The class KWinModule provides information about the state of the window manager as required by windowmanager modules. Base class for \fBKDE\fP Window Manager modules. 

It informs a module about all currently managed windows and changes to them (via \fBQt\fP signals).
.PP
KWinModule uses NETRootInfo internally. Modules written with this class will work fine under any window manager that implements the NET_WM protocol.
.PP
There are no methods to manipulate windows. Those are defined in the classes \fBKWin\fP, NETWinInfo and NETRootInfo.
.PP
\fBAuthor:\fP
.RS 4
Matthias Ettrich (ettrich@kde.org) 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkwinmodule.h\fP,v 1.16 2002/09/27 22:50:16 tjansen Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 50 of file kwinmodule.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KWinModule::KWinModule (\fBQObject\fP * parent = 0)"
.PP
Creates a KWinModule object and connects to the window manager. \fBParameters:\fP
.RS 4
\fIparent\fP the parent for the \fBQObject\fP 
.RE
.PP

.SS "KWinModule::~\fBKWinModule\fP ()"
.PP
Destructor. Internal cleanup, nothing fancy. 
.SH "Member Function Documentation"
.PP 
.SS "const \fBQValueList\fP<WId>& KWinModule::windows () const"
.PP
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 \fBhasWindow\fP() before any operations.
.PP
Iteration over this list can be done easily with 
.PP
.nf

  \fBQValueList<WId>::ConstIterator\fP it;
  for ( it = module->\fBwindows()\fP.begin();
        it != modules->\fBwindows()\fP.end(); ++it ) {
     ... do something here,  (*it) is the current WId.
       }
 
.PP
 
.PP
\fBReturns:\fP
.RS 4
the list of all toplevel windows 
.RE
.PP

.SS "const \fBQValueList\fP<WId>& KWinModule::stackingOrder () const"
.PP
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. 
.PP
\fBReturns:\fP
.RS 4
the list of all toplevel windows in stacking order 
.RE
.PP

.SS "bool KWinModule::hasWId (WId id) const"
.PP
Test to see if \fCid\fP still managed at present. \fBParameters:\fP
.RS 4
\fIid\fP the window id to test 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the window id is still managed 
.RE
.PP

.SS "const \fBQValueList\fP<WId>& KWinModule::systemTrayWindows () const"
.PP
Returns a list of the system tray windows. \fBReturns:\fP
.RS 4
a list of all system tray windows 
.RE
.PP

.SS "int KWinModule::currentDesktop () const"
.PP
Returns the current virtual desktop. \fBReturns:\fP
.RS 4
the current virtual desktop 
.RE
.PP

.SS "int KWinModule::numberOfDesktops () const"
.PP
Returns the number of virtual desktops. \fBReturns:\fP
.RS 4
the number of virtual desktops 
.RE
.PP

.SS "WId KWinModule::activeWindow () const"
.PP
Returns the currently active window, or 0 if no window is active. \fBReturns:\fP
.RS 4
the window id of the active window, or 0 if no window is active 
.RE
.PP

.SS "\fBQRect\fP KWinModule::workArea (int desktop = -1) const"
.PP
Returns the workarea for the specified desktop, or the current work area if no desktop has been specified. \fBParameters:\fP
.RS 4
\fIdesktop\fP the number of the desktop to check, -1 for the current desktop 
.RE
.PP
\fBReturns:\fP
.RS 4
the size and position of the desktop 
.RE
.PP

.SS "\fBQRect\fP KWinModule::workArea (const \fBQValueList\fP< WId > & excludes, int desktop = -1) const"
.PP
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.
.PP
\fBParameters:\fP
.RS 4
\fIclients\fP the list of clients whose struts will be excluded 
.br
\fIdesktop\fP the number of the desktop to check, -1 for the current desktop 
.RE
.PP
\fBReturns:\fP
.RS 4
the size and position of the desktop 
.RE
.PP

.SS "\fBQString\fP KWinModule::desktopName (int desktop) const"
.PP
Returns the name of the specified desktop. \fBParameters:\fP
.RS 4
\fIdesktop\fP the number of the desktop 
.RE
.PP
\fBReturns:\fP
.RS 4
the name of the desktop 
.RE
.PP

.SS "void KWinModule::setDesktopName (int desktop, const \fBQString\fP & name)"
.PP
Sets the name of the specified desktop. \fBParameters:\fP
.RS 4
\fIdesktop\fP the number of the desktop 
.br
\fIname\fP the new name for the desktop 
.RE
.PP

.SS "void KWinModule::doNotManage (const \fBQString\fP & title)"
.PP
Informs kwin via dcop to not manage a window with the specified \fCtitle\fP. Useful for swallowing legacy applications, for example java applets.
.PP
\fBParameters:\fP
.RS 4
\fItitle\fP the title of the window 
.RE
.PP

.SS "void KWinModule::currentDesktopChanged (int desktop)\fC [signal]\fP"
.PP
Switched to another virtual desktop. \fBParameters:\fP
.RS 4
\fIdesktop\fP the number of the new desktop 
.RE
.PP

.SS "void KWinModule::windowAdded (WId id)\fC [signal]\fP"
.PP
A window has been added. \fBParameters:\fP
.RS 4
\fIid\fP the id of the the window 
.RE
.PP

.SS "void KWinModule::windowRemoved (WId id)\fC [signal]\fP"
.PP
A window has been removed. \fBParameters:\fP
.RS 4
\fIid\fP the id of the window that has been removed 
.RE
.PP

.SS "void KWinModule::activeWindowChanged (WId)\fC [signal]\fP"
.PP
Hint that  is active (= has focus) now. \fBParameters:\fP
.RS 4
\fIid\fP the id of the window that is active 
.RE
.PP

.SS "void KWinModule::desktopNamesChanged ()\fC [signal]\fP"
.PP
Desktops have been renamed. 
.SS "void KWinModule::numberOfDesktopsChanged (int num)\fC [signal]\fP"
.PP
The number of desktops changed. \fBParameters:\fP
.RS 4
\fInum\fP the new number of desktops 
.RE
.PP

.SS "void KWinModule::systemTrayWindowAdded (WId id)\fC [signal]\fP"
.PP
Emitted when a dock window has been added. \fBParameters:\fP
.RS 4
\fIid\fP the id of the new system tray window 
.RE
.PP

.SS "void KWinModule::systemTrayWindowRemoved (WId id)\fC [signal]\fP"
.PP
Emitted when a dock window has been removed. \fBParameters:\fP
.RS 4
\fIid\fP the id of the former system tray window 
.RE
.PP

.SS "void KWinModule::workAreaChanged ()\fC [signal]\fP"
.PP
The workarea has changed. 
.SS "void KWinModule::strutChanged ()\fC [signal]\fP"
.PP
Something changed with the struts, may or may not have changed the work area. 
.SS "void KWinModule::stackingOrderChanged ()\fC [signal]\fP"
.PP
Emitted when the stacking order of the window changed. The new order can be obtained with \fBstackingOrder\fP(). 
.SS "void KWinModule::windowChanged (WId id, unsigned int properties)\fC [signal]\fP"
.PP
The window changed. The unsigned int parameter contains the \fBNET\fP properties that were modified (see netem_def.h). 
.PP
\fBParameters:\fP
.RS 4
\fIid\fP the id of the window 
.br
\fIproperties\fP the properties that were modified 
.RE
.PP

.SS "void KWinModule::windowChanged (WId id)\fC [signal]\fP"
.PP
The window changed somehow. \fBParameters:\fP
.RS 4
\fIid\fP the id of the window 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
