Source Code (Use browser search to find items of interest.)
Class Index
kdelibs'KWinModule (./kdelibs/kdecore/kwinmodule.h:47)
class KWinModule : public QObject
{
Q_OBJECT
public:
/**
* Create a KWinModule object and connect to the window
* manager. If @param dockModule is TRUE, the module will also
* serve as docking module.
**/
KWinModule( QObject* parent = 0, bool dockModule = FALSE );
/**
* Destructor. Internal cleanup, nothing fancy.
**/
~KWinModule();
/**
* Retieve 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 @ref hasWindow() before any operations.
*
* Iteration over this list can be done easily with
* <pre>
* QValueList<WId>::ConstIterator it;
* for ( it = module->windows().begin();
* it != modules->windows().end(); ++it ) {
* ... do something here, (*it) is the current WId.
* }
* </pre>
*/
const QValueList<WId>& windows() const;
/**
* Retrieve a list of all toplevel windows currently managed by the
* windowmanger in the current stacking order (from lower to
* higher). May be useful for pagers.
**/
const QValueList<WId>& windowsSorted() const;
/**
* Test to see if @p WId still managed at present.
**/
bool hasWId(WId) const;
/**
* Retrieve a list of the dock windows. Only valid if you are
* succesfully connected as a docking module.
**/
const QValueList<WId>& dockWindows() const;
/*
* A cached shortcut for @ref KWM::currentDesktop()
**/
int currentDesktop() const;
signals:
/**
* Switch to another virtual desktop
*/
void desktopChange(int);
/**
* Add a window
*/
void windowAdd(WId);
/**
* Remove a window
*/
void windowRemove(WId);
/**
* A window has been changed (size, title, etc.)
*/
void windowChange(WId);
/**
* Hint that <Window> is active (= has focus) now.
*/
void windowActivate(WId);
/**
* The specified desktop got a new name
*/
void desktopNameChange(int, QString);
/**
* The number of desktops changed
*/
void desktopNumberChange(int);
/**
* Add a dock window
*/
void dockWindowAdd(WId);
/**
* Remove a dock window
*/
void dockWindowRemove(WId);
/**
* The workspace area has changed
*/
void workspaceAreaChanged();
/**
* The stacking order of the window changed. The new order
* can be obtained with windowsSorted()
*/
void stackingOrderChanged();
private:
KWinModulePrivate* d;
friend KWinModulePrivate;
};
kdelibs'KWinModule::KWinModule() (./kdelibs/kdecore/kwinmodule.cpp:281)
KWinModule::KWinModule( QObject* parent, bool dockModule )
: QObject( parent, "kwin_module" )
{
d = new KWinModulePrivate( this );
if (!dockModule)
KWM::setKWMModule( d->winId() );
else
KWM::setKWMDockModule( d->winId() );
}
kdelibs'KWinModule::~KWinModule() (./kdelibs/kdecore/kwinmodule.cpp:291)
KWinModule::~KWinModule()
{
delete d;
}
kdelibs'KWinModule::windows() (./kdelibs/kdecore/kwinmodule.cpp:297)
const QValueList<WId>& KWinModule::windows() const
{
return d->windows;
}
kdelibs'KWinModule::windowsSorted() (./kdelibs/kdecore/kwinmodule.cpp:302)
const QValueList<WId>& KWinModule::windowsSorted() const
{
return d->windowsSorted;
}
kdelibs'KWinModule::hasWId() (./kdelibs/kdecore/kwinmodule.cpp:308)
bool KWinModule::hasWId(WId w) const
{
return d->windows.contains( w );
}
kdelibs'KWinModule::dockWindows() (./kdelibs/kdecore/kwinmodule.cpp:313)
const QValueList<WId>& KWinModule::dockWindows() const
{
return d->dockWindows;
}
kdelibs'KWinModule::currentDesktop() (./kdelibs/kdecore/kwinmodule.cpp:491)
int KWinModule::currentDesktop() const
{
return d->desktop;
}