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, 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:
displayAn X11 Display struct.
supportWindowThe 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.
wmNameA string which should be the window manager's name (ie. "KWin" or "Blackbox").
propertiesAn 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).
screenFor 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.
doActivatetrue 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:
displayAn X11 Display struct.
propertiesAn 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).
screenFor 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.
doActivatetrue to activate the window

 NETRootInfo (const NETRootInfo &rootinfo)

NETRootInfo

Creates a shared copy of the specified NETRootInfo object.

Parameters:
rootinfothe NETRootInfo object to copy

 ~NETRootInfo ()

~NETRootInfo

[virtual]

Destroys the NETRootInfo object.

Displayx11Display ()

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

Returns: the size of the desktop

NETPoint  desktopViewport (int desktop)

desktopViewport

[const]

Returns the viewport of the specified desktop.

Parameters:
desktopthe 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:
desktopthe 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:
desktopthe 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:
windowsThe array of Window id's
countThe 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:
windowsThe array of Window id's
countThe 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:
windowThe array of window id's
countThe number of windows in the array.

void  setCurrentDesktop (int desktop)

setCurrentDesktop

Sets the current desktop to the specified desktop.

Parameters:
desktopthe 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:
desktopthe number of the desktop
geometrythe 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:
desktopthe number of the desktop
viewportthe new position of the desktop's viewport

void  setNumberOfDesktops (int numberOfDesktops)

setNumberOfDesktops

Sets the number of desktops the the specified number.

Parameters:
numberOfDesktopsthe number of desktops

void  setDesktopName (int desktop, const char *desktopName)

setDesktopName

Sets the name of the specified desktop.

Parameters:
desktopthe number of the desktop
desktopNamethe new name of the desktop

void  setActiveWindow (Window window)

setActiveWindow

Sets the active (focused) window the specified window.

Parameters:
windowthe if of the new active window

void  setWorkArea (int desktop, const NETRect &workArea)

setWorkArea

Sets the workarea for the specified desktop

Parameters:
desktopthe number of the desktop
workAreathe 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:
windowsThe array of Window id's
countThe number of windows in the array.

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.

Parameters:
windowthe 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:
windowThe client window that would be resized/moved.
x_rootX position of the cursor relative to the root window.
y_rootY position of the cursor relative to the root window.
directionOne 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:
eventthe 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:
windowthe 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:
windowthe 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:
windowthe 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:
theid 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:
numberOfDesktopsthe 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:
desktopthe number of the desktop
geomthe 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:
desktopthe number of the desktop
viewportthe 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:
desktopthe 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:
windowthe 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:
windowthe 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:
windowThe window that wants to move/resize
x_rootX position of the cursor relative to the root window.
y_rootY position of the cursor relative to the root window.
directionOne 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]