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) |
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.
- Author:
- Bradley T. Hughes <bhughes@trolltech.com>
Definition at line 872 of file netwm.h.
Member Enumeration Documentation
|
Indexes for the properties array.
|
Constructor & Destructor Documentation
|
|
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. Definition at line 2636 of file netwm.cpp. References NETWinInfoPrivate::allowed_actions, NETWinInfoPrivate::class_class, NETWinInfoPrivate::class_name, NETWinInfoPrivate::client_machine, NETWinInfoPrivate::desktop, NETWinInfoPrivate::display, NETWinInfoPrivate::handled_icons, NETWinInfoPrivate::has_net_support, NETWinInfoPrivate::icon_count, NETWinInfoPrivate::icon_name, NETWinInfoPrivate::kde_system_tray_win_for, NETWinInfoPrivate::mapping_state, NETWinInfoPrivate::mapping_state_dirty, NETWinInfoPrivate::name, NETWinInfoPrivate::pid, NETWinInfoPrivate::properties, NETWinInfoPrivate::ref, NETWinInfoPrivate::role, NETWinInfoPrivate::root, NETWinInfoPrivate::startup_id, NETWinInfoPrivate::state, NETWinInfoPrivate::transient_for, NETWinInfoPrivate::types, NETWinInfoPrivate::user_time, NETWinInfoPrivate::visible_icon_name, NETWinInfoPrivate::visible_name, NETWinInfoPrivate::window, and NETWinInfoPrivate::window_group. |
|
Creates a shared copy of the specified NETWinInfo object.
Definition at line 2693 of file netwm.cpp. References p, and NETWinInfoPrivate::ref. |
|
Destroys the NETWinInfo object.
Definition at line 2699 of file netwm.cpp. References NETWinInfoPrivate::ref. |
Member Function Documentation
|
Assignment operator. Ensures that the shared data reference counts are correct. Definition at line 2708 of file netwm.cpp. References p, NETWinInfoPrivate::ref, and role. |
|
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.
Definition at line 4202 of file netwm.cpp. References NETWinInfoPrivate::has_net_support. |
|
Returns the properties argument passed to the constructor. The size is the maximum array size the constructor accepts.
Definition at line 4239 of file netwm.cpp. References NETWinInfoPrivate::properties. |
|
Returns an OR'ed list of protocols passed to the constructor.
Definition at line 4243 of file netwm.cpp. References NETWinInfoPrivate::properties. |
|
Returns the icon geometry.
Definition at line 4104 of file netwm.cpp. References NETWinInfoPrivate::icon_geom. |
|
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. References NETWinInfoPrivate::state. Referenced by event(), and KWin::info(). |
|
Returns the extended (partial) strut specified by this client. See _NET_WM_STRUT_PARTIAL in the spec. Definition at line 4118 of file netwm.cpp. References NETWinInfoPrivate::extended_strut. |
|
Definition at line 4114 of file netwm.cpp. References NETWinInfoPrivate::strut. Referenced by KWin::info(), and KWinModule::workArea(). |
|
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 NETRArray< Z >::size(), NET::typeMatchesMask(), and NETWinInfoPrivate::types. Referenced by KWin::info(). |
|
Definition at line 4157 of file netwm.cpp. References NETWinInfoPrivate::types. |
|
Returns the name of the window in UTF-8 format.
Definition at line 4162 of file netwm.cpp. References NETWinInfoPrivate::name. Referenced by KWin::info(). |
|
Returns the visible name as set by the window manager in UTF-8 format.
Definition at line 4167 of file netwm.cpp. References NETWinInfoPrivate::visible_name. Referenced by KWin::info(). |
|
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.
Definition at line 4172 of file netwm.cpp. References NETWinInfoPrivate::icon_name. |
|
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.
Definition at line 4177 of file netwm.cpp. References NETWinInfoPrivate::visible_icon_name. |
|
Returns the desktop where the window is residing.
Definition at line 4182 of file netwm.cpp. References NETWinInfoPrivate::desktop. Referenced by KWin::info(), KWin::setOnAllDesktops(), and KWinModule::workArea(). |
|
Returns the process id for the client window.
Definition at line 4186 of file netwm.cpp. References NETWinInfoPrivate::pid. Referenced by KWin::info(). |
|
Returns whether or not this client handles icons.
Definition at line 4230 of file netwm.cpp. References NETWinInfoPrivate::handled_icons. |
|
Returns a Window id, telling the window manager which window we are representing.
Definition at line 4235 of file netwm.cpp. References NETWinInfoPrivate::kde_system_tray_win_for. |
|
Returns the mapping state for the window (see the NET base class documentation for a description of mapping state).
Definition at line 4248 of file netwm.cpp. References NETWinInfoPrivate::mapping_state. Referenced by KWin::info(). |
|
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, NETWinInfoPrivate::display, NETSize::height, NETWinInfoPrivate::icon_count, NETWinInfoPrivate::icons, NETIcon::size, NETRArray< Z >::size(), NETSize::width, and NETWinInfoPrivate::window. Referenced by KWin::setIcons(). |
|
Set the icon geometry for the application window.
Definition at line 2782 of file netwm.cpp. References NETWinInfoPrivate::display, NETSize::height, NETWinInfoPrivate::icon_geom, NETRect::pos, NETRect::size, NETSize::width, NETWinInfoPrivate::window, 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, NETWinInfoPrivate::display, NETWinInfoPrivate::extended_strut, NETExtendedStrut::left_end, NETExtendedStrut::left_start, NETExtendedStrut::left_width, NETExtendedStrut::right_end, NETExtendedStrut::right_start, NETExtendedStrut::right_width, NETExtendedStrut::top_end, NETExtendedStrut::top_start, NETExtendedStrut::top_width, and NETWinInfoPrivate::window. Referenced by KWin::setExtendedStrut(). |
|
Definition at line 2822 of file netwm.cpp. References NETStrut::bottom, NETWinInfoPrivate::display, NETStrut::left, NETStrut::right, NETWinInfoPrivate::strut, NETStrut::top, and NETWinInfoPrivate::window. Referenced by KWin::setStrut(). |
|
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.
Definition at line 2838 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::mapping_state, NETWinInfoPrivate::mapping_state_dirty, NETWinInfoPrivate::properties, NETWinInfoPrivate::root, NETWinInfoPrivate::state, and NETWinInfoPrivate::window. Referenced by KWin::clearState(), KWin::demandAttention(), and KWin::setState(). |
|
Sets the window type for this client (see the NET base class documentation for a description of the various window types).
Definition at line 3042 of file netwm.cpp. References NETWinInfoPrivate::display, and NETWinInfoPrivate::window. Referenced by KWin::setType(). |
|
Sets the name for the application window.
Definition at line 3120 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::name, and NETWinInfoPrivate::window. |
|
For Window Managers only: set the visible name ( i.e. xterm, xterm <2>, xterm <3>, ... )
Definition at line 3134 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::visible_name, and NETWinInfoPrivate::window. |
|
Sets the iconic name for the application window.
Definition at line 3148 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::icon_name, and NETWinInfoPrivate::window. |
|
For Window Managers only: set the visible iconic name ( i.e. xterm, xterm <2>, xterm <3>, ... )
Definition at line 3162 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::visible_icon_name, and NETWinInfoPrivate::window. |
|
Set which window the desktop is (should be) on.
Definition at line 3176 of file netwm.cpp. References NETWinInfoPrivate::desktop, NETWinInfoPrivate::display, NETWinInfoPrivate::mapping_state, NETWinInfoPrivate::mapping_state_dirty, OnAllDesktops, NETWinInfoPrivate::root, and NETWinInfoPrivate::window. Referenced by KWin::setOnAllDesktops(), and KWin::setOnDesktop(). |
|
Set the application window's process id.
Definition at line 3220 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::pid, and NETWinInfoPrivate::window. |
|
Set whether this application window handles icons.
Definition at line 3230 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::handled_icons, and NETWinInfoPrivate::window. |
|
Set which window we are representing as a system tray window.
Definition at line 3282 of file netwm.cpp. References NETWinInfoPrivate::display, NETWinInfoPrivate::kde_system_tray_win_for, and NETWinInfoPrivate::window. Referenced by KWin::setSystemTrayWindowFor(). |
|
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, NETWinInfoPrivate::display, NETWinInfoPrivate::frame_strut, NETStrut::left, NETStrut::right, NETStrut::top, and NETWinInfoPrivate::window. |
|
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, NETWinInfoPrivate::icon_count, NETWinInfoPrivate::icons, NETRArray< Z >::size(), NETIcon::size, and NETSize::width. Referenced by KWin::icon(). |
|
Returns the time of last user action on the window, or -1 if not set.
Definition at line 4190 of file netwm.cpp. References NETWinInfoPrivate::user_time. |
|
Returns the startup notification id of the window.
Definition at line 4194 of file netwm.cpp. References NETWinInfoPrivate::startup_id. |
|
Sets actions that the window manager allows for the window.
Definition at line 3249 of file netwm.cpp. References NETWinInfoPrivate::allowed_actions, NETWinInfoPrivate::display, and NETWinInfoPrivate::window. |
|
Returns actions that the window manager allows for the window.
Definition at line 4198 of file netwm.cpp. References NETWinInfoPrivate::allowed_actions. |
|
Returns the leader window for the group the window is in, if any.
Definition at line 4210 of file netwm.cpp. References NETWinInfoPrivate::window_group. |
|
Returns the class component of the window class for the window (i.e. WM_CLASS property).
Definition at line 4214 of file netwm.cpp. References NETWinInfoPrivate::class_class. |
|
Returns the name component of the window class for the window (i.e. WM_CLASS property).
Definition at line 4218 of file netwm.cpp. References NETWinInfoPrivate::class_name. |
|
Returns the window role for the window (i.e. WM_WINDOW_ROLE property).
Definition at line 4222 of file netwm.cpp. References NETWinInfoPrivate::role. |
|
Returns the client machine for the window (i.e. WM_CLIENT_MACHINE property).
Definition at line 4226 of file netwm.cpp. References NETWinInfoPrivate::client_machine. |
|
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 NETStrut::bottom, NETWinInfoPrivate::display, NETWinInfoPrivate::frame_strut, NETSize::height, NETStrut::left, NETRect::pos, NETStrut::right, NETWinInfoPrivate::root, NETRect::size, NETStrut::top, NETSize::width, NETWinInfoPrivate::win_geom, NETWinInfoPrivate::window, NETPoint::x, and NETPoint::y. Referenced by KWin::info(). |
|
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(), NETWinInfoPrivate::display, NETSize::height, OnAllDesktops, NETRect::pos, NETRect::size, NETWinInfoPrivate::state, state(), NETSize::width, NETWinInfoPrivate::win_geom, NETWinInfoPrivate::window, NETPoint::x, and NETPoint::y. 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 1367 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 1378 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: