class NETRootInfo

# 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)
- virtual void virtual_hook ( int id, void* data )

## 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, NETWinInfo, KWin

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.

Parameters:

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.
doActivate | true to activate the window

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.

Parameters:

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.
doActivate | true to activate the window

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

Creates a shared copy of the specified NETRootInfo object.

Parameters:

rootinfo | the NETRootInfo object to copy

~NETRootInfo () | ### ~NETRootInfo

[virtual]

Destroys the NETRootInfo object.

Display * x11Display () | ### x11Display

[const]

Returns the X11 Display struct used.

Returns: the X11 Display

Window rootWindow () | ### rootWindow

[const]

Returns the Window id of the rootWindow.

Returns: the id of the root window

Window supportWindow () | ### supportWindow

[const]

Returns the Window id of the supportWindow.

Returns: the id of the support window

const char * wmName () | ### wmName

[const]

Returns the name of the Window Manager.

Returns: the name of the window manager

int screenNumber () | ### screenNumber

[const]

Returns the screenNumber.

Returns: the screen number

unsigned long supported () | ### supported

[const]

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

Returns: an OR'ed list of protocols and properties

See also: Property

const Window * clientList () | ### clientList

[const]

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

Returns: the array of Window id's

See also: clientListCount()

int clientListCount () | ### clientListCount

[const]

Returns the number of managed windows in clientList array.

Returns: the number of managed windows in the clientList array

See also: clientList()

const Window * clientListStacking () | ### clientListStacking

[const]

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

Returns: the array of Window id's in stacking order

See also: clientListStackingCount()

int clientListStackingCount () | ### clientListStackingCount

[const]

Returns the number of managed windows in the clientListStacking array.

Returns: the number of Window id's in the client list

See also: clientListStacking()

const Window * kdeSystemTrayWindows () | ### kdeSystemTrayWindows

[const]

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

Returns: the array of Window id's of system tray windows

See also: kdeSystemTrayWindowsCount()

int kdeSystemTrayWindowsCount () | ### kdeSystemTrayWindowsCount

[const]

Returns the number of windows in the kdeSystemTrayWindows array.

Returns: the number of Window id's in the system tray list

See also: kdeSystemTrayWindows()

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.

Parameters:

desktop | the number of the desktop

Returns: the size of the desktop

NETPoint desktopViewport (int desktop) | ### desktopViewport

[const]

Returns the viewport of the specified desktop.

Parameters:

desktop | the number of the desktop

Returns: the position of the desktop's viewport

NETRect workArea (int desktop) | ### workArea

[const]

Returns the workArea for the specified desktop.

Parameters:

desktop | the number of the desktop

Returns: the size of the work area

const char * desktopName (int desktop) | ### desktopName

[const]

Returns the name for the specified desktop.

Parameters:

desktop | the number of the desktop

Returns: the name of the desktop

const Window * virtualRoots ( ) | ### virtualRoots

[const]

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

Returns: the array of Window id's

See also: virtualRootsCount()

int virtualRootsCount () | ### virtualRootsCount

[const]

Returns the number of window in the virtualRoots array.

Returns: the number of Window id's in the virtual root array

See also: virtualRoots()

int numberOfDesktops () | ### numberOfDesktops

[const]

Returns the number of desktops.

Returns: the number of desktops

int currentDesktop () | ### currentDesktop

[const]

Returns the current desktop.

Returns: the number of the current desktop

Window activeWindow () | ### activeWindow

[const]

Returns the active (focused) window.

Returns: the id of the active 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.

Parameters:

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.

Parameters:

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.

Parameters:

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.

Parameters:

desktop | the number of the 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.

Parameters:

desktop | the number of the desktop
geometry | the new size of the desktop

void setDesktopViewport (int desktop, const NETPoint &viewport) | ### setDesktopViewport

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

Parameters:

desktop | the number of the desktop
viewport | the new position of the desktop's viewport

void setNumberOfDesktops (int numberOfDesktops) | ### setNumberOfDesktops

Sets the number of desktops the the specified number.

Parameters:

numberOfDesktops | the number of desktops

void setDesktopName (int desktop, const char *desktopName) | ### setDesktopName

Sets the name of the specified desktop.

Parameters:

desktop | the number of the desktop
desktopName | the new name of the desktop

void setActiveWindow (Window window) | ### setActiveWindow

Sets the active (focused) window the specified window.

Parameters:

window | the if of the new active window

void setWorkArea (int desktop, const NETRect &workArea) | ### setWorkArea

Sets the workarea for the specified desktop

Parameters:

desktop | the number of the desktop
workArea | the new work area of the desktop

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

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

Parameters:

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.

Parameters:

window | the id of the window to close

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.

Parameters:

window | The client window that would 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.

Parameters:

event | the event

Returns: the properties

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.

Parameters:

window | the id of the window to add

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.

Parameters:

window | the id of the window to remove

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.

Parameters:

window | the id of the window to add

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.

Parameters:

the | id of the window to remove

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.

Parameters:

numberOfDesktops | the new 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.

Parameters:

desktop | the number of the desktop
geom | the new size

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.

Parameters:

desktop | the number of the desktop
viewport | the new position of the 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.

Parameters:

desktop | the number of the 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.

Parameters:

window | the id of the window to activate

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.

Parameters:

window | the id of the window to close

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.

Parameters:

window | The window that wants to move/resize
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).

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

- Author: Bradley T. Hughes
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:15 2003, using kdoc 2.0a54.