\section{KWin\-Module Class Reference}
\label{classKWinModule}\index{KWinModule@{KWinModule}}
The class KWin\-Module provides information about the state of the window manager as required by windowmanager modules. Base class for {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} Window Manager modules.  


{\tt \#include $<$kwinmodule.h$>$}

Inheritance diagram for KWin\-Module:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{classKWinModule__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KWin\-Module:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=57pt]{classKWinModule__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf current\-Desktop\-Changed} (int desktop)
\begin{CompactList}\small\item\em Switched to another virtual desktop. \item\end{CompactList}\item 
void {\bf window\-Added} (WId id)
\begin{CompactList}\small\item\em A window has been added. \item\end{CompactList}\item 
void {\bf window\-Removed} (WId id)
\begin{CompactList}\small\item\em A window has been removed. \item\end{CompactList}\item 
void {\bf active\-Window\-Changed} (WId)
\begin{CompactList}\small\item\em Hint that  is active (= has focus) now. \item\end{CompactList}\item 
void {\bf desktop\-Names\-Changed} ()
\begin{CompactList}\small\item\em Desktops have been renamed. \item\end{CompactList}\item 
void {\bf number\-Of\-Desktops\-Changed} (int num)
\begin{CompactList}\small\item\em The number of desktops changed. \item\end{CompactList}\item 
void {\bf system\-Tray\-Window\-Added} (WId id)
\begin{CompactList}\small\item\em Emitted when a dock window has been added. \item\end{CompactList}\item 
void {\bf system\-Tray\-Window\-Removed} (WId id)
\begin{CompactList}\small\item\em Emitted when a dock window has been removed. \item\end{CompactList}\item 
void {\bf work\-Area\-Changed} ()
\begin{CompactList}\small\item\em The workarea has changed. \item\end{CompactList}\item 
void {\bf strut\-Changed} ()
\begin{CompactList}\small\item\em Something changed with the struts, may or may not have changed the work area. \item\end{CompactList}\item 
void {\bf stacking\-Order\-Changed} ()
\begin{CompactList}\small\item\em Emitted when the stacking order of the window changed. \item\end{CompactList}\item 
void {\bf window\-Changed} (WId id, unsigned int properties)
\begin{CompactList}\small\item\em The window changed. \item\end{CompactList}\item 
void {\bf window\-Changed} (WId id)
\begin{CompactList}\small\item\em The window changed somehow. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KWin\-Module} ({\bf QObject} $\ast${\bf parent}=0)
\begin{CompactList}\small\item\em Creates a KWin\-Module object and connects to the window manager. \item\end{CompactList}\item 
{\bf $\sim$KWin\-Module} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
const  {\bf QValue\-List}$<$ WId $>$ \& {\bf windows} () const 
\begin{CompactList}\small\item\em Returns the list of all toplevel windows currently managed by the window manager in the order of creation. \item\end{CompactList}\item 
const  {\bf QValue\-List}$<$ WId $>$ \& {\bf stacking\-Order} () const 
\begin{CompactList}\small\item\em Returns the list of all toplevel windows currently managed by the window manager in the current stacking order (from lower to higher). \item\end{CompactList}\item 
bool {\bf has\-WId} (WId id) const 
\begin{CompactList}\small\item\em Test to see if {\tt id} still managed at present. \item\end{CompactList}\item 
const  {\bf QValue\-List}$<$ WId $>$ \& {\bf system\-Tray\-Windows} () const 
\begin{CompactList}\small\item\em Returns a list of the system tray windows. \item\end{CompactList}\item 
int {\bf current\-Desktop} () const 
\begin{CompactList}\small\item\em Returns the current virtual desktop. \item\end{CompactList}\item 
int {\bf number\-Of\-Desktops} () const 
\begin{CompactList}\small\item\em Returns the number of virtual desktops. \item\end{CompactList}\item 
WId {\bf active\-Window} () const 
\begin{CompactList}\small\item\em Returns the currently active window, or 0 if no window is active. \item\end{CompactList}\item 
{\bf QRect} {\bf work\-Area} (int desktop=-1) const 
\begin{CompactList}\small\item\em Returns the workarea for the specified desktop, or the current work area if no desktop has been specified. \item\end{CompactList}\item 
{\bf QRect} {\bf work\-Area} (const  {\bf QValue\-List}$<$ WId $>$ \&excludes, int desktop=-1) const 
\begin{CompactList}\small\item\em Returns the workarea for the specified desktop, or the current work area if no desktop has been specified. \item\end{CompactList}\item 
{\bf QString} {\bf desktop\-Name} (int desktop) const 
\begin{CompactList}\small\item\em Returns the name of the specified desktop. \item\end{CompactList}\item 
void {\bf set\-Desktop\-Name} (int desktop, const  {\bf QString} \&{\bf name})
\begin{CompactList}\small\item\em Sets the name of the specified desktop. \item\end{CompactList}\item 
void {\bf do\-Not\-Manage} (const  {\bf QString} \&title)
\begin{CompactList}\small\item\em Informs kwin via dcop to not manage a window with the specified {\tt title}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KWin\-Module\-Private}\label{classKWinModule_n0}

\end{CompactItemize}


\subsection{Detailed Description}
The class KWin\-Module provides information about the state of the window manager as required by windowmanager modules. Base class for {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} Window Manager modules. 

It informs a module about all currently managed windows and changes to them (via {\bf Qt} signals).

KWin\-Module uses NETRoot\-Info 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 {\bf KWin}{\rm (p.\,\pageref{classKWin})}, NETWin\-Info and NETRoot\-Info.

\begin{Desc}
\item[Author:]Matthias Ettrich ({\tt ettrich@kde.org}) \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kwinmodule.h}{\rm (p.\,\pageref{kwinmodule_8h})},v 1.16 2002/09/27 22:50:16 tjansen Exp \end{Desc}
\end{Desc}




Definition at line 50 of file kwinmodule.h.

\subsection{Constructor \& Destructor Documentation}
\index{KWinModule@{KWin\-Module}!KWinModule@{KWinModule}}
\index{KWinModule@{KWinModule}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KWin\-Module::KWin\-Module ({\bf QObject} $\ast$ {\em parent} = 0)}\label{classKWinModule_a0}


Creates a KWin\-Module object and connects to the window manager. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]the parent for the {\bf QObject} \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!~KWinModule@{$\sim$KWinModule}}
\index{~KWinModule@{$\sim$KWinModule}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KWin\-Module::$\sim${\bf KWin\-Module} ()}\label{classKWinModule_a1}


Destructor. 

Internal cleanup, nothing fancy. 

\subsection{Member Function Documentation}
\index{KWinModule@{KWin\-Module}!windows@{windows}}
\index{windows@{windows}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QValue\-List}$<$WId$>$\& KWin\-Module::windows () const}\label{classKWinModule_a2}


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 has\-Window() before any operations.

Iteration over this list can be done easily with \small\begin{alltt}
  {\bf QValueList<WId>::ConstIterator} it;
  for ( it = module-$>${\bf windows()}{\rm (p.\,\pageref{classKWinModule_a2})}.begin();
        it != modules-$>${\bf windows()}{\rm (p.\,\pageref{classKWinModule_a2})}.end(); ++it ) \{
     ... do something here,  (*it) is the current WId.
       \}
 \end{alltt}\normalsize 
 \begin{Desc}
\item[Returns:]the list of all toplevel windows \end{Desc}
\index{KWinModule@{KWin\-Module}!stackingOrder@{stackingOrder}}
\index{stackingOrder@{stackingOrder}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QValue\-List}$<$WId$>$\& KWin\-Module::stacking\-Order () const}\label{classKWinModule_a3}


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. \begin{Desc}
\item[Returns:]the list of all toplevel windows in stacking order \end{Desc}
\index{KWinModule@{KWin\-Module}!hasWId@{hasWId}}
\index{hasWId@{hasWId}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KWin\-Module::has\-WId (WId {\em id}) const}\label{classKWinModule_a4}


Test to see if {\tt id} still managed at present. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the window id to test \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the window id is still managed \end{Desc}
\index{KWinModule@{KWin\-Module}!systemTrayWindows@{systemTrayWindows}}
\index{systemTrayWindows@{systemTrayWindows}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QValue\-List}$<$WId$>$\& KWin\-Module::system\-Tray\-Windows () const}\label{classKWinModule_a5}


Returns a list of the system tray windows. 

\begin{Desc}
\item[Returns:]a list of all system tray windows \end{Desc}
\index{KWinModule@{KWin\-Module}!currentDesktop@{currentDesktop}}
\index{currentDesktop@{currentDesktop}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KWin\-Module::current\-Desktop () const}\label{classKWinModule_a6}


Returns the current virtual desktop. 

\begin{Desc}
\item[Returns:]the current virtual desktop \end{Desc}
\index{KWinModule@{KWin\-Module}!numberOfDesktops@{numberOfDesktops}}
\index{numberOfDesktops@{numberOfDesktops}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KWin\-Module::number\-Of\-Desktops () const}\label{classKWinModule_a7}


Returns the number of virtual desktops. 

\begin{Desc}
\item[Returns:]the number of virtual desktops \end{Desc}
\index{KWinModule@{KWin\-Module}!activeWindow@{activeWindow}}
\index{activeWindow@{activeWindow}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}WId KWin\-Module::active\-Window () const}\label{classKWinModule_a8}


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

\begin{Desc}
\item[Returns:]the window id of the active window, or 0 if no window is active \end{Desc}
\index{KWinModule@{KWin\-Module}!workArea@{workArea}}
\index{workArea@{workArea}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QRect} KWin\-Module::work\-Area (int {\em desktop} = -1) const}\label{classKWinModule_a9}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em desktop}]the number of the desktop to check, -1 for the current desktop \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the size and position of the desktop \end{Desc}
\index{KWinModule@{KWin\-Module}!workArea@{workArea}}
\index{workArea@{workArea}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QRect} KWin\-Module::work\-Area (const {\bf QValue\-List}$<$ WId $>$ \& {\em excludes}, int {\em desktop} = -1) const}\label{classKWinModule_a10}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em clients}]the list of clients whose struts will be excluded \item[{\em desktop}]the number of the desktop to check, -1 for the current desktop \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the size and position of the desktop \end{Desc}
\index{KWinModule@{KWin\-Module}!desktopName@{desktopName}}
\index{desktopName@{desktopName}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KWin\-Module::desktop\-Name (int {\em desktop}) const}\label{classKWinModule_a11}


Returns the name of the specified desktop. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em desktop}]the number of the desktop \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the name of the desktop \end{Desc}
\index{KWinModule@{KWin\-Module}!setDesktopName@{setDesktopName}}
\index{setDesktopName@{setDesktopName}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::set\-Desktop\-Name (int {\em desktop}, const {\bf QString} \& {\em name})}\label{classKWinModule_a12}


Sets the name of the specified desktop. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em desktop}]the number of the desktop \item[{\em name}]the new name for the desktop \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!doNotManage@{doNotManage}}
\index{doNotManage@{doNotManage}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::do\-Not\-Manage (const {\bf QString} \& {\em title})}\label{classKWinModule_a13}


Informs kwin via dcop to not manage a window with the specified {\tt title}. 

Useful for swallowing legacy applications, for example java applets.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em title}]the title of the window \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!currentDesktopChanged@{currentDesktopChanged}}
\index{currentDesktopChanged@{currentDesktopChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::current\-Desktop\-Changed (int {\em desktop})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l0}


Switched to another virtual desktop. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em desktop}]the number of the new desktop \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!windowAdded@{windowAdded}}
\index{windowAdded@{windowAdded}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::window\-Added (WId {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l1}


A window has been added. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the the window \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!windowRemoved@{windowRemoved}}
\index{windowRemoved@{windowRemoved}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::window\-Removed (WId {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l2}


A window has been removed. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the window that has been removed \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!activeWindowChanged@{activeWindowChanged}}
\index{activeWindowChanged@{activeWindowChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::active\-Window\-Changed (WId)\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l3}


Hint that  is active (= has focus) now. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the window that is active \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!desktopNamesChanged@{desktopNamesChanged}}
\index{desktopNamesChanged@{desktopNamesChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::desktop\-Names\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l4}


Desktops have been renamed. 

\index{KWinModule@{KWin\-Module}!numberOfDesktopsChanged@{numberOfDesktopsChanged}}
\index{numberOfDesktopsChanged@{numberOfDesktopsChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::number\-Of\-Desktops\-Changed (int {\em num})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l5}


The number of desktops changed. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em num}]the new number of desktops \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!systemTrayWindowAdded@{systemTrayWindowAdded}}
\index{systemTrayWindowAdded@{systemTrayWindowAdded}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::system\-Tray\-Window\-Added (WId {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l6}


Emitted when a dock window has been added. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the new system tray window \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!systemTrayWindowRemoved@{systemTrayWindowRemoved}}
\index{systemTrayWindowRemoved@{systemTrayWindowRemoved}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::system\-Tray\-Window\-Removed (WId {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l7}


Emitted when a dock window has been removed. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the former system tray window \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!workAreaChanged@{workAreaChanged}}
\index{workAreaChanged@{workAreaChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::work\-Area\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l8}


The workarea has changed. 

\index{KWinModule@{KWin\-Module}!strutChanged@{strutChanged}}
\index{strutChanged@{strutChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::strut\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l9}


Something changed with the struts, may or may not have changed the work area. 

\index{KWinModule@{KWin\-Module}!stackingOrderChanged@{stackingOrderChanged}}
\index{stackingOrderChanged@{stackingOrderChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::stacking\-Order\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l10}


Emitted when the stacking order of the window changed. 

The new order can be obtained with {\bf stacking\-Order}{\rm (p.\,\pageref{classKWinModule_a3})}(). \index{KWinModule@{KWin\-Module}!windowChanged@{windowChanged}}
\index{windowChanged@{windowChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::window\-Changed (WId {\em id}, unsigned int {\em properties})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l11}


The window changed. 

The unsigned int parameter contains the {\bf NET}{\rm (p.\,\pageref{classNET})} properties that were modified (see netem\_\-def.h). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the window \item[{\em properties}]the properties that were modified \end{description}
\end{Desc}
\index{KWinModule@{KWin\-Module}!windowChanged@{windowChanged}}
\index{windowChanged@{windowChanged}!KWinModule@{KWin\-Module}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWin\-Module::window\-Changed (WId {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKWinModule_l12}


The window changed somehow. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the id of the window \end{description}
\end{Desc}


The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
kwinmodule.h\end{CompactItemize}
