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

#### Public Methods

- NETWinInfo (Display *display, Window window, Window rootWindow, unsigned long properties, Role role = Client)
- NETWinInfo (const NETWinInfo & wininfo)
- virtual ~NETWinInfo ()
- unsigned long properties () const
- NETRect iconGeometry () const
- unsigned long state () const
- NETStrut strut () const
- WindowType windowType () const
- const char * name () const
- const char * visibleName () const
- const char * iconName () const
- const char * visibleIconName () const
- int desktop () const
- int pid () const
- Bool handledIcons () const
- Window kdeSystemTrayWinFor () const
- MappingState mappingState () const
- void setIcon (NETIcon icon, Bool replace = True)
- void setIconGeometry (NETRect geometry)
- void setStrut (NETStrut strut)
- void setState (unsigned long state, unsigned long mask)
- void setWindowType (WindowType type)
- void setName (const char *name)
- void setVisibleName (const char *visibleName)
- void setIconName (const char *name)
- void setVisibleIconName (const char *name)
- void setDesktop (int desktop)
- void setPid (int pid)
- void setHandledIcons (Bool handled)
- void setKDESystemTrayWinFor (Window window)
- void setKDEFrameStrut (NETStrut strut)
- NETIcon icon (int width = -1, int height = -1) const
- void kdeGeometry (NETRect &frame, NETRect &window)
- unsigned long event (XEvent *event)

#### Public Members

- static const int OnAllDesktops

#### Protected Methods

- virtual void changeDesktop (int)
- virtual void changeState (unsigned long , unsigned long )

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

- display - an X11 Display struct.

- window - the Window id of the application window.

- rootWindow - the Window id of the root window.

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

- role - select the application role. If this argument is omitted, the role will default to Client.

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).

- 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.