class NETWinInfo

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

Definition#include <netwm.h>
InheritsNET
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.

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

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

Taken arguments:

 NETWinInfo (const NETWinInfo & wininfo)

Creates a shared copy of the specified NETWinInfo object.

NETWinInfo ()

[virtual]

Destroys the NETWinInfo object.

unsigned long  properties ()

[const]

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

NETRect  iconGeometry ()

[const]

Returns the icon geometry.

unsigned long  state ()

[const]

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

NETStrut  strut ()

[const]

Returns the strut specified by this client.

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

[const]

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

const char * visibleName ()

[const]

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

int  desktop ()

[const]

Returns the desktop where the window is residing.

int  pid ()

[const]

Returns the process id for the client window.

Bool  handledIcons ()

[const]

Returns whether or not this client handles icons.

Window  kdeSystemTrayWinFor ()

[const]

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

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)

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)

Set the icon geometry for the application window.

void  setStrut (NETStrut strut)

Set the strut for the application window.

void  setState (unsigned long state, unsigned long mask)

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

void  setWindowType (WindowType type)

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)

Sets the name for the application window.

void  setVisibleName (const char *visibleName)

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

void  setDesktop (int desktop)

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

void  setPid (int pid)

Set the application window's process id.

void  setHandledIcons (Bool handled)

Set whether this application window handles icons.

void  setKDESystemTrayWinFor (Window window)

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

void  setKDEFrameStrut (NETStrut strut)

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)

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

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)

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

Sentinel value to indicate that the client wishes to be visible on all desktops.

void  changeDesktop (int)

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

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