class NETWinInfo

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

## 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: NET, NETRootInfo, KWin, 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.

Parameters:

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.

Parameters:

wininfo | the NETWinInfo to copy

~NETWinInfo () | ### ~NETWinInfo

[virtual]

Destroys the NETWinInfo object.

unsigned long properties () | ### properties

[const]

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

Returns: an OR'ed list of protocols and properties

See also: Property

NETRect iconGeometry () | ### iconGeometry

[const]

Returns the icon geometry.

Returns: the geometry of the icon

unsigned long state () | ### state

[const]

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

Returns: the state of the window

NETStrut strut () | ### strut

[const]

Returns the strut specified by this client.

Returns: the strut of the window

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

Returns: the type of the window

const char * name () | ### name

[const]

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

Returns: the name of the window

const char * visibleName () | ### visibleName

[const]

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

Returns: the visible name of the window

const char * iconName () | ### iconName

[const]

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

Returns: the name of the icon

const char * visibleIconName () | ### visibleIconName

[const]

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

Returns: the visible icon name

int desktop () | ### desktop

[const]

Returns the desktop where the window is residing.

Returns: the number of the window's desktop

See also: OnAllDesktops()

int pid () | ### pid

[const]

Returns the process id for the client window.

Returns: the process id of the window

Bool handledIcons () | ### handledIcons

[const]

Returns whether or not this client handles icons.

Returns: true if this client handles icons, false otherwise

Window kdeSystemTrayWinFor () | ### kdeSystemTrayWinFor

[const]

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

Returns: the window id

MappingState mappingState () | ### mappingState

[const]

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

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

Parameters:

icon | the new icon
replace | true to replace, false to append to the list of icons

void setIconGeometry (NETRect geometry) | ### setIconGeometry

Set the icon geometry for the application window.

Parameters:

geometry | the new icon geometry

void setStrut (NETStrut strut) | ### setStrut

Set the strut for the application window.

Parameters:

strut | the new strut

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

Parameters:

state | the name state
mask | the mask for the 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).

Parameters:

type | the window type

void setName (const char *name) | ### setName

Sets the name for the application window.

Parameters:

name | the new name of the window

void setVisibleName (const char *visibleName) | ### setVisibleName

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

Parameters:

visibleName | the new visible name

void setIconName (const char *name) | ### setIconName

Sets the icon name for the application window.

Parameters:

name | the new icon name

void setVisibleIconName (const char *name) | ### setVisibleIconName

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

Parameters:

visibleName | the new visible icon name

void setDesktop (int desktop) | ### setDesktop

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

Parameters:

desktop | the number of the new desktop

See also: OnAllDesktops()

void setPid (int pid) | ### setPid

Set the application window's process id.

Parameters:

pid | the window's process id

void setHandledIcons (Bool handled) | ### setHandledIcons

Set whether this application window handles icons.

Parameters:

handled | true if the window handles icons, false otherwise

void setKDESystemTrayWinFor (Window window) | ### setKDESystemTrayWinFor

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

Parameters:

window | the window that is represented by the system tray icon

void setKDEFrameStrut (NETStrut strut) | ### setKDEFrameStrut

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

Parameters:

strut | the new strut

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.

Parameters:

width | the prefered width for the icon, -1 to ignore
height | the prefered height for the icon, -1 to ignore

Returns: the icon

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.

Parameters:

frame | the geometry for the frame
window | the geometry for the 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.

Parameters:

event | the event

Returns: the properties

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

Parameters:

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

Parameters:

state | the new state
mask | the mask for the state

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.