#include <netwm.h>

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 char * | activities () const |
| unsigned long | allowedActions () const |
| const char * | clientMachine () const |
| int | desktop (bool ignore_viewport=false) const |
| void | event (XEvent *event, unsigned long *properties, int properties_size) |
| unsigned long | event (XEvent *event) |
| NETExtendedStrut | extendedStrut () const |
| NETStrut | frameExtents () const |
| NETStrut | frameOverlap () const |
| Window | groupLeader () const |
| Bool | handledIcons () const |
| bool | hasNETSupport () const |
| bool | hasWindowType () const |
| NETIcon | icon (int width=-1, int height=-1) const |
| NETRect | iconGeometry () const |
| const char * | iconName () const |
| const int * | iconSizes () const |
| bool | isBlockingCompositing () const |
| void | kdeGeometry (NETRect &frame, NETRect &window) |
| MappingState | mappingState () const |
| const char * | name () const |
| unsigned long | opacity () const |
| const NETWinInfo & | operator= (const NETWinInfo &wintinfo) |
| const unsigned long * | passedProperties () const |
| int | pid () const |
| void | setAllowedActions (unsigned long actions) |
| void | setBlockingCompositing (bool active) |
| void | setDesktop (int desktop, bool ignore_viewport=false) |
| void | setExtendedStrut (const NETExtendedStrut &extended_strut) |
| void | setFrameExtents (NETStrut strut) |
| void | setFrameOverlap (NETStrut strut) |
| void | setHandledIcons (Bool handled) |
| void | setIcon (NETIcon icon, Bool replace=True) |
| void | setIconGeometry (NETRect geometry) |
| void | setIconName (const char *name) |
| void | setName (const char *name) |
| void | setOpacity (unsigned long opacity) |
| void | setPid (int pid) |
| void | setStartupId (const char *startup_id) |
| void | setState (unsigned long state, unsigned long mask) |
| void | setStrut (NETStrut strut) |
| void | setUserTime (Time time) |
| void | setVisibleIconName (const char *name) |
| void | setVisibleName (const char *visibleName) |
| void | setWindowType (WindowType type) |
| const char * | startupId () const |
| unsigned long | state () const |
| NETStrut | strut () const |
| Window | transientFor () const |
| Time | userTime () const |
| const char * | visibleIconName () const |
| const char * | visibleName () const |
| const char * | windowClassClass () const |
| const char * | windowClassName () const |
| const char * | windowRole () const |
| WindowType | windowType (unsigned long supported_types) const |
Static Public Attributes | |
| static 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.
Member Enumeration Documentation
| anonymous enum |
Constructor & Destructor Documentation
| NETWinInfo::NETWinInfo | ( | Display * | display, |
| Window | window, | ||
| Window | rootWindow, | ||
| const unsigned long | properties[], | ||
| int | properties_size, | ||
| Role | role = Client |
||
| ) |
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 array of elements listing all properties the client is interested in.The elements contain OR'ed values of constants from the NET base class, in the following order: [0]= NET::Property, [1]= NET::Property2. In future versions, the list may be extended. In case you pass less elements, the missing ones will be replaced with default values. properties_size The number of elements in the properties array. role Select the application role. If this argument is omitted, the role will default to Client.
| NETWinInfo::NETWinInfo | ( | const NETWinInfo & | wininfo | ) |
Creates a shared copy of the specified NETWinInfo object.
- Parameters:
-
wininfo the NETWinInfo to copy
| NETWinInfo::~NETWinInfo | ( | ) | [virtual] |
Destroys the NETWinInfo object.
Member Function Documentation
| const char * NETWinInfo::activities | ( | ) | const |
| unsigned long NETWinInfo::allowedActions | ( | ) | const |
| virtual void NETWinInfo::changeDesktop | ( | int | desktop | ) | [inline, 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
| virtual void NETWinInfo::changeState | ( | unsigned long | state, |
| unsigned long | mask | ||
| ) | [inline, 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
| const char * NETWinInfo::clientMachine | ( | ) | const |
| int NETWinInfo::desktop | ( | bool | ignore_viewport = false | ) | const |
Returns the desktop where the window is residing.
NOTE: KDE uses virtual desktops and does not directly support viewport in any way. It is however mapped to virtual desktops if needed.
- Parameters:
-
ignore_viewport if false, viewport is mapped to virtual desktops
- Returns:
- the number of the window's desktop
- See also:
- OnAllDesktops()
| void NETWinInfo::event | ( | XEvent * | event, |
| unsigned long * | properties, | ||
| int | properties_size | ||
| ) |
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).
- Parameters:
-
event the event properties properties that changed properties_size size of the passed properties array
| unsigned long NETWinInfo::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. This overloaded version returns only a single mask, and therefore cannot check state of all properties like the other variant.
- Parameters:
-
event the event
- Returns:
- the properties
| NETExtendedStrut NETWinInfo::extendedStrut | ( | ) | const |
| NETStrut NETWinInfo::frameExtents | ( | ) | const |
| NETStrut NETWinInfo::frameOverlap | ( | ) | const |
| Window NETWinInfo::groupLeader | ( | ) | const |
| Bool NETWinInfo::handledIcons | ( | ) | const |
| bool NETWinInfo::hasNETSupport | ( | ) | const |
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:
- true if the window has support for the NETWM spec
| bool NETWinInfo::hasWindowType | ( | ) | const |
This function returns false if the window has not window type specified at all.
Used by KWindowInfo::windowType() to return either NET::Normal or NET::Dialog as appropriate as a fallback.
| NETIcon NETWinInfo::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 largest icon in the list is returned.
- Parameters:
-
width the preferred width for the icon, -1 to ignore height the preferred height for the icon, -1 to ignore
- Returns:
- the icon
| NETRect NETWinInfo::iconGeometry | ( | ) | const |
| const char * NETWinInfo::iconName | ( | ) | const |
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 iconic name
| const int * NETWinInfo::iconSizes | ( | ) | const |
| bool NETWinInfo::isBlockingCompositing | ( | ) | const |
| NET::MappingState NETWinInfo::mappingState | ( | ) | const |
| const char * NETWinInfo::name | ( | ) | const |
| unsigned long NETWinInfo::opacity | ( | ) | const |
| const NETWinInfo & NETWinInfo::operator= | ( | const NETWinInfo & | wintinfo | ) |
| const unsigned long * NETWinInfo::passedProperties | ( | ) | const |
| int NETWinInfo::pid | ( | ) | const |
| void NETWinInfo::setAllowedActions | ( | unsigned long | actions | ) |
| void NETWinInfo::setBlockingCompositing | ( | bool | active | ) |
| void NETWinInfo::setDesktop | ( | int | desktop, |
| bool | ignore_viewport = false |
||
| ) |
Set which window the desktop is (should be) on.
NOTE: KDE uses virtual desktops and does not directly support viewport in any way. It is however mapped to virtual desktops if needed.
- Parameters:
-
desktop the number of the new desktop ignore_viewport if false, viewport is mapped to virtual desktops
- See also:
- OnAllDesktops()
| void NETWinInfo::setExtendedStrut | ( | const NETExtendedStrut & | extended_strut | ) |
| void NETWinInfo::setFrameExtents | ( | NETStrut | strut | ) |
| void NETWinInfo::setFrameOverlap | ( | NETStrut | strut | ) |
| void NETWinInfo::setHandledIcons | ( | Bool | handled | ) |
| void NETWinInfo::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.
- Parameters:
-
icon the new icon replace true to replace, false to append to the list of icons
| void NETWinInfo::setIconGeometry | ( | NETRect | geometry | ) |
| void NETWinInfo::setIconName | ( | const char * | name | ) |
| void NETWinInfo::setName | ( | const char * | name | ) |
| void NETWinInfo::setOpacity | ( | unsigned long | opacity | ) |
| void NETWinInfo::setPid | ( | int | pid | ) |
| void NETWinInfo::setStartupId | ( | const char * | startup_id | ) |
| void NETWinInfo::setState | ( | unsigned long | state, |
| unsigned long | mask | ||
| ) |
| void NETWinInfo::setStrut | ( | NETStrut | strut | ) |
- Deprecated:
- use setExtendedStrut() Set the strut for the application window.
- Parameters:
-
strut the new strut
| void NETWinInfo::setUserTime | ( | Time | time | ) |
Sets user timestamp time on the window (property _NET_WM_USER_TIME).
The timestamp is expressed as XServer time. If a window is shown with user timestamp older than the time of the last user action, it won't be activated after being shown, with the special value 0 meaning not to activate the window after being shown.
| void NETWinInfo::setVisibleIconName | ( | const char * | name | ) |
| void NETWinInfo::setVisibleName | ( | const char * | visibleName | ) |
| void NETWinInfo::setWindowType | ( | WindowType | type | ) |
| const char * NETWinInfo::startupId | ( | ) | const |
| unsigned long NETWinInfo::state | ( | ) | const |
| NETStrut NETWinInfo::strut | ( | ) | const |
- Deprecated:
- use strutPartial() Returns the strut specified by this client.
- Returns:
- the strut of the window
| Window NETWinInfo::transientFor | ( | ) | const |
| Time NETWinInfo::userTime | ( | ) | const |
| void NETWinInfo::virtual_hook | ( | int | id, |
| void * | data | ||
| ) | [protected, virtual] |
| const char * NETWinInfo::visibleIconName | ( | ) | const |
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 visible iconic name
| const char * NETWinInfo::visibleName | ( | ) | const |
| const char * NETWinInfo::windowClassClass | ( | ) | const |
| const char * NETWinInfo::windowClassName | ( | ) | const |
| const char * NETWinInfo::windowRole | ( | ) | const |
| NET::WindowType NETWinInfo::windowType | ( | unsigned long | supported_types | ) | const |
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.
- Returns:
- the type of the window
Member Data Documentation
const int NETWinInfo::OnAllDesktops = NET::OnAllDesktops [static] |
The documentation for this class was generated from the following files:
KDE 4.7 API Reference