class NETWinInfo

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

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

Public Methods

Public Members

Protected Methods


Detailed Description

Common API for application window properties/protocols.

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

See also: http://www.freedesktop.org/standards/wm-spec/

 NETWinInfo (Display *display, Window window, Window rootWindow, unsigned long properties, Role role = Client)

NETWinInfo

Create a NETWinInfo object, which will be used to set/read/change information stored on an application window.

Taken arguments:

 NETWinInfo (const NETWinInfo & wininfo)

NETWinInfo

Creates a shared copy of the specified NETWinInfo object.

 ~NETWinInfo ()

~NETWinInfo

[virtual]

Destroys the NETWinInfo object.

unsigned long  properties ()

properties

[const]

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

NETRect  iconGeometry ()

iconGeometry

[const]

Returns the icon geometry.

unsigned long  state ()

state

[const]

Returns the state of the window (see the NET base class documentation for a description of the various states).

NETStrut  strut ()

strut

[const]

Returns the strut specified by this client.

WindowType  windowType ()

windowType

[const]

Returns the window type for this client (see the NET base class documentation for a description of the various window types).

const char * name ()

name

[const]

Returns the name of the window in UTF-8 format.

const char * visibleName ()

visibleName

[const]

Returns the visible name as set by the window manager in UTF-8 format.

const char * iconName ()

iconName

[const]

Returns the icon name of the window in UTF-8 format.

const char * visibleIconName ()

visibleIconName

[const]

Returns the visible icon name as set by the window manager in UTF-8 format.

int  desktop ()

desktop

[const]

Returns the desktop where the window is residing.

int  pid ()

pid

[const]

Returns the process id for the client window.

Bool  handledIcons ()

handledIcons

[const]

Returns whether or not this client handles icons.

Window  kdeSystemTrayWinFor ()

kdeSystemTrayWinFor

[const]

Returns a Window id, telling the window manager which window we are representing.

MappingState  mappingState ()

mappingState

[const]

Returns the mapping state for the window (see the NET base class documentation for a description of mapping state).

void  setIcon (NETIcon icon, Bool replace = True)

setIcon

Set icons for the application window. If replace is True, then the specified icon is defined to be the only icon. If replace is False, then the specified icon is added to a list of icons.

void  setIconGeometry (NETRect geometry)

setIconGeometry

Set the icon geometry for the application window.

void  setStrut (NETStrut strut)

setStrut

Set the strut for the application window.

void  setState (unsigned long state, unsigned long mask)

setState

Set the state for the application window (see the NET base class documentation for a description of window state).

void  setWindowType (WindowType type)

setWindowType

Sets the window type for this client (see the NET base class documentation for a description of the various window types).

void  setName (const char *name)

setName

Sets the name for the application window.

void  setVisibleName (const char *visibleName)

setVisibleName

For Window Managers only: set the visible name ( i.e. xterm, xterm <2>, xterm <3>, ... )

void  setIconName (const char *name)

setIconName

Sets the icon name for the application window.

void  setVisibleIconName (const char *name)

setVisibleIconName

For Window Managers only: set the visible icon name ( i.e. xterm, xterm <2>, xterm <3>, ... )

void  setDesktop (int desktop)

setDesktop

Set which window the desktop is (should be) on.

void  setPid (int pid)

setPid

Set the application window's process id.

void  setHandledIcons (Bool handled)

setHandledIcons

Set whether this application window handles icons.

void  setKDESystemTrayWinFor (Window window)

setKDESystemTrayWinFor

Set which window we are representing as a system tray window.

void  setKDEFrameStrut (NETStrut strut)

setKDEFrameStrut

Set the frame decoration strut. This is a KDE 2.0 extension to aid in writing pager applications.

NETIcon  icon (int width = -1, int height = -1)

icon

[const]

Returns an icon. If width and height are passed, the icon returned will be the closest it can find (the next biggest). If width and height are omitted, then the first icon in the list is returned.

void  kdeGeometry (NETRect &frame, NETRect &window)

kdeGeometry

Places the window frame geometry in frame, and the application window geometry in window. Both geometries are relative to the root window.

unsigned long  event (XEvent *event)

event

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

static const int OnAllDesktops

OnAllDesktops

void  changeDesktop (int)

changeDesktop

[protected virtual]

A Window Manager should subclass NETWinInfo and reimplement this function when it wants to know when a Client made a request to change desktops (ie. move to another desktop).

void  changeState (unsigned long , unsigned long )

changeState

[protected virtual]

A Window Manager should subclass NETWinInfo and reimplement this function when it wants to know when a Client made a request to change state (ie. to Shade / Unshade).