class NETRootInfo

Common API for root window properties/protocols. More...

Definition#include <netwm.h>
InheritsNET [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

Common API for root window properties/protocols.

The NETRootInfo class provides a common API for clients and window managers to set/read/change properties on the root window as defined by the NET Window Manager Specification..

See also: NET

 NETRootInfo (Display *display, Window supportWindow, const char *wmName, unsigned long properties, int screen = -1, bool doActivate = true)

NETRootInfo

Window Managers should use this constructor to create a NETRootInfo object, which will be used to set/update information stored on the rootWindow. The application role is automatically set to WindowManager when using this constructor.

Taken arguments:

 NETRootInfo (Display *display, unsigned long properties, int screen = -1, bool doActivate = true)

NETRootInfo

Clients should use this constructor to create a NETRootInfo object, which will be used to query information set on the root window. The application role is automatically set to Client when using this constructor.

Taken arguments:

 NETRootInfo (const NETRootInfo &rootinfo)

NETRootInfo

Creates a shared copy of the specified NETRootInfo object.

 ~NETRootInfo ()

~NETRootInfo

[virtual]

Destroys the NETRootInfo object.

Displayx11Display ()

x11Display

[const]

Returns the X11 Display struct used.

Window  rootWindow ()

rootWindow

[const]

Returns the Window id of the rootWindow.

Window  supportWindow ()

supportWindow

[const]

Returns the Window id of the supportWindow.

const char * wmName ()

wmName

[const]

Returns the name of the Window Manager.

int  screenNumber ()

screenNumber

[const]

Returns the screenNumber.

unsigned long  supported ()

supported

[const]

Returns an OR'ed list of supported protocols and properties.

const Window * clientList ()

clientList

[const]

Returns an array of Window id's, which contain all managed windows.

See also: clientListCount

int  clientListCount ()

clientListCount

[const]

Returns the number of managed windows in clientList array.

const Window * clientListStacking ()

clientListStacking

[const]

Returns an array of Window id's, which contain all managed windows in stacking order.

int  clientListStackingCount ()

clientListStackingCount

[const]

Returns the number of managed windows in the clientListStacking array.

const Window * kdeSystemTrayWindows ()

kdeSystemTrayWindows

[const]

Returns an array of Window id's, which contain all KDE system tray windows.

int  kdeSystemTrayWindowsCount ()

kdeSystemTrayWindowsCount

[const]

Returns the number of windows in the kdeSystemTrayWindows array.

NETSize  desktopGeometry (int desktop)

desktopGeometry

[const]

Returns the desktop geometry size.

The desktop argument is ignored. Early drafts of the NET WM Specification were unclear about the semantics of this property.

NETPoint  desktopViewport (int desktop)

desktopViewport

[const]

Returns the viewport of the specified desktop.

NETRect  workArea (int desktop)

workArea

[const]

Returns the workArea for the specified desktop.

const char * desktopName (int desktop)

desktopName

[const]

Returns the name for the specified desktop.

const Window * virtualRoots ( )

virtualRoots

[const]

Returns an array of Window id's, which contain the virtual root windows.

int  virtualRootsCount ()

virtualRootsCount

[const]

Returns the number of window in the virtualRoots array.

int  numberOfDesktops ()

numberOfDesktops

[const]

Returns the number of desktops.

int  currentDesktop ()

currentDesktop

[const]

Returns the current desktop.

Window  activeWindow ()

activeWindow

[const]

Returns the active (focused) window.

void  activate ()

activate

Window Managers must call this after creating the NETRootInfo object, and before using any other method in the class. This method sets initial data on the root window and does other post-construction duties.

Clients must also call this after creating the object to do an initial data read/update.

void  setClientList (Window *windows, unsigned int count)

setClientList

Sets the list of managed windows on the Root/Desktop window.

Taken arguments:

void  setClientListStacking (Window *windows, unsigned int count)

setClientListStacking

Sets the list of managed windows in stacking order on the Root/Desktop window.

Taken arguments:

void  setKDESystemTrayWindows (Window *windows, unsigned int count)

setKDESystemTrayWindows

Sets the list of KDE system tray windows on the root window.

Taken arguments:

void  setCurrentDesktop (int desktop)

setCurrentDesktop

Sets the current desktop to the specified desktop.

void  setDesktopGeometry (int desktop, const NETSize &geometry)

setDesktopGeometry

Sets the desktop geometry to the specified geometry.

The desktop argument is ignored. Early drafts of the NET WM Specification were unclear about the semantics of this property.

void  setDesktopViewport (int desktop, const NETPoint &viewport)

setDesktopViewport

Sets the viewport for the current desktop to the specified point.

The desktop argument is ignored. Early drafts of the NET WM Specification were unclear about the semantics of this property.

void  setNumberOfDesktops (int numberOfDesktops)

setNumberOfDesktops

Sets the number of desktops the the specified number.

void  setDesktopName (int desktop, const char *desktopName)

setDesktopName

Sets the name of the specified desktop.

void  setActiveWindow (Window window)

setActiveWindow

Sets the active (focused) window the specified window.

void  setWorkArea (int desktop, const NETRect &workArea)

setWorkArea

Sets the workarea for the specified desktop

void  setVirtualRoots (Window *windows, unsigned int count)

setVirtualRoots

Sets the list of virtual root windows on the root window.

Taken arguments:

const NETRootInfooperator= (const NETRootInfo &rootinfo)

operator=

Assignment operator. Ensures that the shared data reference counts are correct.

void  closeWindowRequest (Window window)

closeWindowRequest

Clients (such as pagers/taskbars) that wish to close a window should call this function. This will send a request to the Window Manager, which usually can usually decide how to react to such requests.

void  moveResizeRequest (Window window, int x_root, int y_root, Direction direction)

moveResizeRequest

Clients (such as pagers/taskbars) that wish to start a WMMoveResize (where the window manager controls the resize/movement) should call this function. This will send a request to the Window Manager.

Taken arguments:

unsigned long  event (XEvent *event)

event

This function takes the passed XEvent and returns an OR'ed list of NETRootInfo properties that have changed. The new information will be read immediately by the class.

void  addClient (Window)

addClient

[protected virtual]

A Client should subclass NETRootInfo and reimplement this function when it wants to know when a window has been added.

void  removeClient (Window)

removeClient

[protected virtual]

A Client should subclass NETRootInfo and reimplement this function when it wants to know when a window has been removed.

void  addSystemTrayWin (Window)

addSystemTrayWin

[protected virtual]

A Client should subclass NETRootInfo and reimplement this function when it wants to know when a system tray window has been added. This is a KDE 2.0 extension.

void  removeSystemTrayWin (Window)

removeSystemTrayWin

[protected virtual]

A Client should subclass NETRootInfo and reimplement this function when it wants to know when a system tray window has been removed. This is a KDE 2.0 extension.

void  changeNumberOfDesktops (int)

changeNumberOfDesktops

[protected virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the number of desktops.

void  changeDesktopGeometry (int, const NETSize &)

changeDesktopGeometry

[protected virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the specified desktop geometry.

void  changeDesktopViewport (int, const NETPoint &)

changeDesktopViewport

[protected virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the specified desktop viewport.

void  changeCurrentDesktop (int)

changeCurrentDesktop

[protected virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the current desktop.

void  changeActiveWindow (Window)

changeActiveWindow

[protected virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the active (focused) window.

void  closeWindow (Window)

closeWindow

[protected virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to close a window.

void  moveResize (Window, int, int, unsigned long)

moveResize

[protected virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to start a move/resize.

Taken arguments:

void  virtual_hook ( int id, void* data )

virtual_hook

[protected virtual]