# class NETRootInfo | Common API for root window properties/protocols. More...
Definition | `#include <netwm.h>`
Inherits | NET [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- NETRootInfo (Display *display, Window supportWindow, const char *wmName, unsigned long properties, int screen = -1, bool doActivate = true)
- NETRootInfo (Display *display, unsigned long properties, int screen = -1, bool doActivate = true)
- NETRootInfo (const NETRootInfo &rootinfo)
- virtual ~NETRootInfo ()
- Display * x11Display () const
- Window rootWindow () const
- Window supportWindow () const
- const char * wmName () const
- int screenNumber () const
- unsigned long supported () const
- const Window * clientList () const
- int clientListCount () const
- const Window * clientListStacking () const
- int clientListStackingCount () const
- const Window * kdeSystemTrayWindows () const
- int kdeSystemTrayWindowsCount () const
- NETSize desktopGeometry (int desktop) const
- NETPoint desktopViewport (int desktop) const
- NETRect workArea (int desktop) const
- const char * desktopName (int desktop) const
- const Window * virtualRoots ( ) const
- int virtualRootsCount () const
- int numberOfDesktops () const
- int currentDesktop () const
- Window activeWindow () const
- void activate ()
- void setClientList (Window *windows, unsigned int count)
- void setClientListStacking (Window *windows, unsigned int count)
- void setKDESystemTrayWindows (Window *windows, unsigned int count)
- void setCurrentDesktop (int desktop)
- void setDesktopGeometry (int desktop, const NETSize &geometry)
- void setDesktopViewport (int desktop, const NETPoint &viewport)
- void setNumberOfDesktops (int numberOfDesktops)
- void setDesktopName (int desktop, const char *desktopName)
- void setActiveWindow (Window window)
- void setWorkArea (int desktop, const NETRect &workArea)
- void setVirtualRoots (Window *windows, unsigned int count)
- const NETRootInfo & operator= (const NETRootInfo &rootinfo)
- void closeWindowRequest (Window window)
- void moveResizeRequest (Window window, int x_root, int y_root, Direction direction)
- unsigned long event (XEvent *event)

#### Protected Methods

- virtual void addClient (Window)
- virtual void removeClient (Window)
- virtual void addSystemTrayWin (Window)
- virtual void removeSystemTrayWin (Window)
- virtual void changeNumberOfDesktops (int)
- virtual void changeDesktopGeometry (int, const NETSize &)
- virtual void changeDesktopViewport (int, const NETPoint &)
- virtual void changeCurrentDesktop (int)
- virtual void changeActiveWindow (Window)
- virtual void closeWindow (Window)
- virtual void moveResize (Window, int, int, unsigned long)

## Detailed Description

Common API for root window properties/protocols.

The NETRootInfo class provides a commom 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:

- display - an X11 Display struct.

- supportWindow - the Window id of the supportWindow. The supportWindow must be created by the window manager as a child of the rootWindow. The supportWindow must not be destroyed until the Window Manager exits.

- wmName - a string which should be the window manager's name (ie. "KWin" or "Blackbox").

- properties - an OR'ed list of all properties and protocols the window manager supports (see the NET base class documentation for a description of all properties and protocols).

- screen - for Window Managers that support multiple screen (ie. "multiheaded") displays, the screen number may be explicitly defined. If this argument is omitted, the default screen will be used.

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:

- display - an X11 Display struct.

- properties - an OR'ed list of all properties and protocols the client supports (see the NET base class documentation for a description of all properties and protocols).

- screen - for Clients that support multiple screen (ie. "multiheaded") displays, the screen number may be explicitly defined. If this argument is omitted, the default screen will be used.

NETRootInfo (const NETRootInfo &rootinfo) | ### NETRootInfo

Creates a shared copy of the specified NETRootInfo object.

~NETRootInfo () | ### ~NETRootInfo

[virtual]

Destroys the NETRootInfo object.

Display * x11Display () | ### 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:

- windows - the array of Window id's

- count - the number of windows in the array

void setClientListStacking (Window *windows, unsigned int count) | ### setClientListStacking

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

Taken arguments:

- windows - the array of Window id's

- count - the number of windows in the array.

void setKDESystemTrayWindows (Window *windows, unsigned int count) | ### setKDESystemTrayWindows

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

Taken arguments:

- window - the array of window id's

- count - the number of windows in the array.

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:

- windows - the array of Window id's

- count - the number of windows in the array.

const NETRootInfo & operator= (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:

- window - the client window that whould be resized/moved.

- x_root - X position of the cursor relative to the root window.

- y_root - Y position of the cursor relative to the root window.

- direction - one of NET::Direction (see base class documentation for a description of the different directions).

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 reimeplement 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:

- window - the window that wants to move/resize

- x_root / y_root - position of the cursor relative to the root window.

- direction - one of NET::Direction (see base class documentation for a description of the different directions).

- Author: Bradley T. Hughes <bhughes@trolltech.com>
- Generated: root@i386.ports.openbsd.org on Wed Apr 25 13:58:13 2001, using kdoc 2.0a53.