NETWinInfo Class Reference
Common API for application window properties/protocols. More...
#include <netwm.h>
Inheritance diagram for NETWinInfo:


Public Types | |
enum | { PROTOCOLS, PROTOCOLS2, PROPERTIES_SIZE } |
Public Member Functions | |
NETWinInfo (Display *display, Window window, Window rootWindow, const unsigned long properties[], int properties_size, Role role=Client) | |
NETWinInfo (Display *display, Window window, Window rootWindow, unsigned long properties, Role role=Client) | |
NETWinInfo (const NETWinInfo &wininfo) | |
virtual | ~NETWinInfo () |
const NETWinInfo & | operator= (const NETWinInfo &wintinfo) |
bool | hasNETSupport () const |
const unsigned long * | passedProperties () const |
unsigned long | properties () const KDE_DEPRECATED |
NETRect | iconGeometry () const |
unsigned long | state () const |
NETExtendedStrut | extendedStrut () const |
NETStrut | strut () const |
WindowType | windowType (unsigned long supported_types) const |
WindowType | windowType () const KDE_DEPRECATED |
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 | setExtendedStrut (const NETExtendedStrut &extended_strut) |
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 | setUserTime (Time time) |
Time | userTime () const |
void | setStartupId (const char *startup_id) |
const char * | startupId () const |
void | setAllowedActions (unsigned long actions) |
unsigned long | allowedActions () const |
Window | transientFor () const |
Window | groupLeader () const |
const char * | windowClassClass () const |
const char * | windowClassName () const |
const char * | windowRole () const |
const char * | clientMachine () const |
void | kdeGeometry (NETRect &frame, NETRect &window) |
void | event (XEvent *event, unsigned long *properties, int properties_size) |
unsigned long | event (XEvent *event) |
Static Public Attributes | |
const int | OnAllDesktops = NET::OnAllDesktops |
Protected Member Functions | |
virtual void | changeDesktop (int desktop) |
virtual void | changeState (unsigned long state, unsigned long mask) |
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.
- Author:
- Bradley T. Hughes <bhughes@trolltech.com>
- See also:
- NET
KWin
Definition at line 865 of file netwm.h.
Member Enumeration Documentation
|
Indexes for the properties array.
|
Constructor & Destructor Documentation
|
Create a NETWinInfo object, which will be used to set/read/change information stored on an application window.
|
|
This constructor differs from the above one only in the way it accepts the list of properties the client is interested in. The properties argument is equivalent to the first element of the properties array in the above constructor. |
|
Creates a shared copy of the specified NETWinInfo object.
Definition at line 2693 of file netwm.cpp. References p. |
|
Destroys the NETWinInfo object.
|
Member Function Documentation
|
Assignment operator. Ensures that the shared data reference counts are correct. |
|
Returns true if the window has any window type set, even if the type itself is not known to this implementation. Presence of a window type as specified by the NETWM spec is considered as the window supporting this specification.
|
|
Returns the properties argument passed to the constructor. The size is the maximum array size the constructor accepts.
|
|
Returns an OR'ed list of protocols passed to the constructor.
|
|
Returns the icon geometry.
|
|
Returns the state of the window (see the NET base class documentation for a description of the various states).
Definition at line 4109 of file netwm.cpp. Referenced by event(). |
|
Returns the extended (partial) strut specified by this client. See _NET_WM_STRUT_PARTIAL in the spec. |
|
|
|
Returns the window type for this client (see the NET base class documentation for a description of the various window types). Since clients may specify several windows types for a window in order to support backwards compatibility and extensions not available in the NETWM spec, you should specify all window types you application supports (see the NET::WindowTypeMask mask values for various window types). This method will return the first window type that is listed in the supported types, or NET::Unknown if none of the window types is supported.
Definition at line 4146 of file netwm.cpp. References NET::typeMatchesMask(). |
|
|
|
Returns the name of the window in UTF-8 format.
|
|
Returns the visible name as set by the window manager in UTF-8 format.
|
|
Returns the iconic name of the window in UTF-8 format. Note that this has nothing to do with icons, but it's for "iconic" representations of the window (taskbars etc.), that should be shown when the window is in iconic state. See description of _NET_WM_ICON_NAME for details.
|
|
Returns the visible iconic name as set by the window manager in UTF-8 format. Note that this has nothing to do with icons, but it's for "iconic" representations of the window (taskbars etc.), that should be shown when the window is in iconic state. See description of _NET_WM_VISIBLE_ICON_NAME for details.
|
|
Returns the desktop where the window is residing.
|
|
Returns the process id for the client window.
|
|
Returns whether or not this client handles icons.
|
|
Returns a Window id, telling the window manager which window we are representing.
|
|
Returns the mapping state for the window (see the NET base class documentation for a description of mapping state).
|
|
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.
Definition at line 2728 of file netwm.cpp. References NETIcon::data, NETSize::height, NETIcon::size, and NETSize::width. |
|
Set the icon geometry for the application window.
Definition at line 2782 of file netwm.cpp. References NETSize::height, NETRect::pos, NETRect::size, NETSize::width, NETPoint::x, and NETPoint::y. |
|
Set the extended (partial) strut for the application window.
Definition at line 2798 of file netwm.cpp. References NETExtendedStrut::bottom_end, NETExtendedStrut::bottom_start, NETExtendedStrut::bottom_width, NETExtendedStrut::left_end, NETExtendedStrut::left_start, NETExtendedStrut::left_width, NETExtendedStrut::right_end, NETExtendedStrut::right_start, NETExtendedStrut::right_width, NETExtendedStrut::top_end, NETExtendedStrut::top_start, and NETExtendedStrut::top_width. |
|
Definition at line 2822 of file netwm.cpp. References NETStrut::bottom, NETStrut::left, NETStrut::right, and NETStrut::top. |
|
Set the state for the application window (see the NET base class documentation for a description of window state). Note that the constructor needs to be passed NET::WMState in properties even if it's only used for setting the state without reading it.
|
|
Sets the window type for this client (see the NET base class documentation for a description of the various window types).
|
|
Sets the name for the application window.
|
|
For Window Managers only: set the visible name ( i.e. xterm, xterm <2>, xterm <3>, ... )
|
|
Sets the iconic name for the application window.
|
|
For Window Managers only: set the visible iconic name ( i.e. xterm, xterm <2>, xterm <3>, ... )
|
|
Set which window the desktop is (should be) on.
Definition at line 3176 of file netwm.cpp. References OnAllDesktops. |
|
Set the application window's process id.
|
|
Set whether this application window handles icons.
|
|
Set which window we are representing as a system tray window.
|
|
Set the frame decoration strut. This is a KDE 2.0 extension to aid in writing pager applications.
Definition at line 3292 of file netwm.cpp. References NETStrut::bottom, NETStrut::left, NETStrut::right, and NETStrut::top. |
|
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.
Definition at line 3333 of file netwm.cpp. References NETIcon::data, NETSize::height, NETIcon::size, and NETSize::width. |
|
Returns the time of last user action on the window, or -1 if not set.
|
|
Returns the startup notification id of the window.
|
|
Sets actions that the window manager allows for the window.
|
|
Returns actions that the window manager allows for the window.
|
|
Returns the leader window for the group the window is in, if any.
|
|
Returns the class component of the window class for the window (i.e. WM_CLASS property).
|
|
Returns the name component of the window class for the window (i.e. WM_CLASS property).
|
|
Returns the window role for the window (i.e. WM_WINDOW_ROLE property).
|
|
Returns the client machine for the window (i.e. WM_CLIENT_MACHINE property).
|
|
Places the window frame geometry in frame, and the application window geometry in window. Both geometries are relative to the root window.
Definition at line 3308 of file netwm.cpp. References NETSize::height, NETRect::pos, NETRect::size, NETSize::width, NETPoint::x, and NETPoint::y. |
|
This function takes the passed XEvent and returns an OR'ed list of NETWinInfo properties that have changed in the properties argument. The new information will be read immediately by the class. The elements of the properties argument are as they would be passed to the constructor, if the array is not large enough, changed properties that don't fit in it won't be listed there (they'll be updated in the class though).
Definition at line 3378 of file netwm.cpp. References changeDesktop(), changeState(), NETSize::height, OnAllDesktops, NETIcon::size, state(), and NETSize::width. Referenced by 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. This overloaded version returns only a single mask, and therefore cannot check state of all properties like the other variant.
Definition at line 3371 of file netwm.cpp. References event(). |
|
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).
Definition at line 1359 of file netwm.h. Referenced by event(). |
|
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).
Definition at line 1370 of file netwm.h. Referenced by event(). |
Member Data Documentation
|
Sentinel value to indicate that the client wishes to be visible on all desktops.
Reimplemented from NET. Definition at line 2571 of file netwm.cpp. Referenced by event(), and setDesktop(). |
The documentation for this class was generated from the following files: