• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Types | Signals | Public Member Functions | Protected Member Functions | Friends | List of all members
KWinModule Class Reference

#include <twinmodule.h>

Inherits TQObject.

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)
 
void showingDesktopChanged (bool showing)
 
void desktopGeometryChanged (int desktop)
 
void currentDesktopViewportChanged (int desktop, const TQPoint &viewport)
 

Public Member Functions

 KWinModule (TQObject *parent, int what)
 
 KWinModule (TQObject *parent=0)
 
 ~KWinModule ()
 
const TQValueList< WId > & windows () const
 
const TQValueList< WId > & stackingOrder () const
 
bool hasWId (WId id) const
 
const TQValueList< WId > & systemTrayWindows () const
 
int currentDesktop () const
 
int numberOfDesktops () const
 
TQSize numberOfViewports (int desktop) const
 
TQPoint currentViewport (int desktop) const
 
WId activeWindow () const
 
TQRect workArea (int desktop=- 1) const
 
TQRect workArea (const TQValueList< WId > &excludes, int desktop=-1) const
 
TQString desktopName (int desktop) const
 
void setDesktopName (int desktop, const TQString &name)
 
bool showingDesktop () const
 
void doNotManage (const TQString &title)
 

Protected Member Functions

virtual void connectNotify (const char *signal)
 

Friends

class KWinModulePrivate
 

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.

Base class for KDE Window Manager modules.

Author
Matthias Ettrich (ettri.nosp@m.ch@k.nosp@m.de.or.nosp@m.g)

Definition at line 52 of file twinmodule.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 58 of file twinmodule.h.

Constructor & Destructor Documentation

◆ KWinModule() [1/2]

KWinModule::KWinModule ( TQObject *  parent,
int  what 
)

Creates a KWinModule object and connects to the window manager.

Parameters
parentthe parent for the TQObject
whatThe information you are interested in: INFO_DESKTOP: currentDesktop, numberOfDesktops, desktopName, currentDesktopChanged, numberOfDesktopsChanged, desktopNameChanged, activeWindow, activeWindowChanged, workArea(int desktop), workAreaChanged

INFO_WINDOWS: windows, windowAdded, windowRemoved, stackingOrder, systemTrayWindows, systemTrayWindowAdded, systemTrayWindowRemoved, windowChanged, strutChanged, workArea(const TQValueList<WId> &excludes, int desktop)

◆ KWinModule() [2/2]

KWinModule::KWinModule ( TQObject *  parent = 0)

Creates a KWinModule object and connects to the window manager.

Parameters
parentthe parent for the TQObject

◆ ~KWinModule()

KWinModule::~KWinModule ( )

Destructor.

Internal cleanup, nothing fancy.

Member Function Documentation

◆ activeWindow()

WId KWinModule::activeWindow ( ) const

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

Returns
the window id of the active window, or 0 if no window is active

◆ activeWindowChanged

void KWinModule::activeWindowChanged ( WId  id)
signal

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

Parameters
idthe id of the window that is active

◆ currentDesktop()

int KWinModule::currentDesktop ( ) const

Returns the current virtual desktop.

Returns
the current virtual desktop

◆ currentDesktopChanged

void KWinModule::currentDesktopChanged ( int  desktop)
signal

Switched to another virtual desktop.

Parameters
desktopthe number of the new desktop

◆ currentDesktopViewportChanged

void KWinModule::currentDesktopViewportChanged ( int  desktop,
const TQPoint &  viewport 
)
signal

The viewport position has changed.

Since
3.5

◆ currentViewport()

TQPoint KWinModule::currentViewport ( int  desktop) const

Returns the current viewport on the given virtual desktop.

Returns
the number of virtual desktops
Since
3.5.5

◆ desktopGeometryChanged

void KWinModule::desktopGeometryChanged ( int  desktop)
signal

The state of showing the desktop has changed.

Since
3.5.5

◆ desktopName()

TQString KWinModule::desktopName ( int  desktop) const

Returns the name of the specified desktop.

Parameters
desktopthe number of the desktop
Returns
the name of the desktop

◆ desktopNamesChanged

void KWinModule::desktopNamesChanged ( )
signal

Desktops have been renamed.

◆ doNotManage()

void KWinModule::doNotManage ( const TQString &  title)

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

Useful for swallowing legacy applications, for example java applets.

Parameters
titlethe title of the window

◆ hasWId()

bool KWinModule::hasWId ( WId  id) const

Test to see if id still managed at present.

Parameters
idthe window id to test
Returns
true if the window id is still managed

◆ numberOfDesktops()

int KWinModule::numberOfDesktops ( ) const

Returns the number of virtual desktops.

Returns
the number of virtual desktops

◆ numberOfDesktopsChanged

void KWinModule::numberOfDesktopsChanged ( int  num)
signal

The number of desktops changed.

Parameters
numthe new number of desktops

◆ numberOfViewports()

TQSize KWinModule::numberOfViewports ( int  desktop) const

Returns the number of viewports in x and y direction on the virtual desktop.

Returns
the number of virtual desktops
Since
3.5.5

◆ setDesktopName()

void KWinModule::setDesktopName ( int  desktop,
const TQString &  name 
)

Sets the name of the specified desktop.

Parameters
desktopthe number of the desktop
namethe new name for the desktop

◆ showingDesktop()

bool KWinModule::showingDesktop ( ) const

Returns the state of showing the desktop.

Since
3.5

◆ showingDesktopChanged

void KWinModule::showingDesktopChanged ( bool  showing)
signal

The state of showing the desktop has changed.

Since
3.5

◆ stackingOrder()

const TQValueList< WId > & KWinModule::stackingOrder ( ) const

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.

Returns
the list of all toplevel windows in stacking order

◆ stackingOrderChanged

void KWinModule::stackingOrderChanged ( )
signal

Emitted when the stacking order of the window changed.

The new order can be obtained with stackingOrder().

◆ strutChanged

void KWinModule::strutChanged ( )
signal

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

Usually just using the workAreaChanged() signal is sufficient.

◆ systemTrayWindowAdded

void KWinModule::systemTrayWindowAdded ( WId  id)
signal

Emitted when a dock window has been added.

Parameters
idthe id of the new system tray window

◆ systemTrayWindowRemoved

void KWinModule::systemTrayWindowRemoved ( WId  id)
signal

Emitted when a dock window has been removed.

Parameters
idthe id of the former system tray window

◆ systemTrayWindows()

const TQValueList< WId > & KWinModule::systemTrayWindows ( ) const

Returns a list of the system tray windows.

Returns
a list of all system tray windows

◆ windowAdded

void KWinModule::windowAdded ( WId  id)
signal

A window has been added.

Parameters
idthe id of the the window

◆ windowChanged [1/3]

void KWinModule::windowChanged ( WId  id)
signal

The window changed somehow.

Parameters
idthe id of the window

◆ windowChanged [2/3]

void KWinModule::windowChanged ( WId  id,
const unsigned long *  properties 
)
signal

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).

Parameters
idthe id of the window
propertiesthe properties that were modified

◆ windowChanged [3/3]

void KWinModule::windowChanged ( WId  id,
unsigned int  properties 
)
signal
Deprecated:
The window changed.

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

Parameters
idthe id of the window
propertiesthe properties that were modified

◆ windowRemoved

void KWinModule::windowRemoved ( WId  id)
signal

A window has been removed.

Parameters
idthe id of the window that has been removed

◆ windows()

const TQValueList< WId > & KWinModule::windows ( ) const

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

TQValueList<WId>::ConstIterator it;
for ( it = module->windows().begin();
it != modules->windows().end(); ++it ) {
... do something here, (*it) is the current WId.
}
Returns
the list of all toplevel windows

◆ workArea() [1/2]

TQRect KWinModule::workArea ( const TQValueList< WId > &  excludes,
int  desktop = -1 
) 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.

Parameters
excludesthe list of clients whose struts will be excluded
desktopthe number of the desktop to check, -1 for the current desktop
Returns
the size and position of the desktop

◆ workArea() [2/2]

TQRect KWinModule::workArea ( int  desktop = - 1) const

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

Parameters
desktopthe number of the desktop to check, -1 for the current desktop
Returns
the size and position of the desktop

◆ workAreaChanged

void KWinModule::workAreaChanged ( )
signal

The workarea has changed.

Friends And Related Function Documentation

◆ KWinModulePrivate

friend class KWinModulePrivate
friend

Definition at line 353 of file twinmodule.h.


The documentation for this class was generated from the following file:
  • twinmodule.h

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.