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

Public Types | |
enum | { PROTOCOLS, WINDOW_TYPES, STATES, PROTOCOLS2, ACTIONS, PROPERTIES_SIZE } |
Public Member Functions | |
NETRootInfo (Display *display, Window supportWindow, const char *wmName, const unsigned long properties[], int properties_size, int screen=-1, bool doActivate=true) | |
NETRootInfo (Display *display, Window supportWindow, const char *wmName, unsigned long properties, int screen=-1, bool doActivate=true) KDE_DEPRECATED | |
NETRootInfo (Display *display, const unsigned long properties[], int properties_size, int screen=-1, bool doActivate=true) | |
NETRootInfo (Display *display, unsigned long properties, int screen=-1, bool doActivate=true) | |
NETRootInfo (const NETRootInfo &rootinfo) | |
virtual | ~NETRootInfo () |
Display * | x11Display () const |
Window | rootWindow () const |
Window | supportWindow () const |
const char * | wmName () const |
int | screenNumber () const |
bool | isSupported (NET::Property property) const |
bool | isSupported (NET::Property2 property) const |
bool | isSupported (NET::WindowType type) const |
bool | isSupported (NET::State state) const |
bool | isSupported (NET::Action action) const |
const unsigned long * | supportedProperties () const |
const unsigned long * | passedProperties () const |
unsigned long | supported () const KDE_DEPRECATED |
const Window * | clientList () const |
int | clientListCount () const |
const Window * | clientListStacking () const |
int | clientListStackingCount () const |
const Window * | kdeSystemTrayWindows () const |
int | kdeSystemTrayWindowsCount () const |
NETSize | desktopGeometry (int desktop) const |
NETPoint | desktopViewport (int desktop) const |
NETRect | workArea (int desktop) const |
const char * | desktopName (int desktop) const |
const Window * | virtualRoots () const |
int | virtualRootsCount () const |
int | numberOfDesktops () const |
int | currentDesktop () const |
Window | activeWindow () const |
void | activate () |
void | setClientList (Window *windows, unsigned int count) |
void | setClientListStacking (Window *windows, unsigned int count) |
void | setKDESystemTrayWindows (Window *windows, unsigned int count) |
void | setCurrentDesktop (int desktop) |
void | setDesktopGeometry (int desktop, const NETSize &geometry) |
void | setDesktopViewport (int desktop, const NETPoint &viewport) |
void | setNumberOfDesktops (int numberOfDesktops) |
void | setDesktopName (int desktop, const char *desktopName) |
void | setActiveWindow (Window window, NET::RequestSource src, Time timestamp, Window active_window) |
void | setActiveWindow (Window window) |
void | setWorkArea (int desktop, const NETRect &workArea) |
void | setVirtualRoots (Window *windows, unsigned int count) |
const NETRootInfo & | operator= (const NETRootInfo &rootinfo) |
void | closeWindowRequest (Window window) |
void | moveResizeRequest (Window window, int x_root, int y_root, Direction direction) |
void | moveResizeWindowRequest (Window window, int flags, int x, int y, int width, int height) |
void | restackRequest (Window window, RequestSource source, Window above, int detail, Time timestamp) |
void | restackRequest (Window window, Window above, int detail) |
void | event (XEvent *event, unsigned long *properties, int properties_size) |
unsigned long | event (XEvent *event) |
Protected Member Functions | |
virtual void | addClient (Window) |
virtual void | removeClient (Window) |
virtual void | addSystemTrayWin (Window) |
virtual void | removeSystemTrayWin (Window) |
virtual void | changeNumberOfDesktops (int) |
virtual void | changeDesktopGeometry (int, const NETSize &) |
virtual void | changeDesktopViewport (int, const NETPoint &) |
virtual void | changeCurrentDesktop (int) |
virtual KDE_DEPRECATED void | changeActiveWindow (Window) |
virtual void | closeWindow (Window) |
virtual void | moveResize (Window, int, int, unsigned long) |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
Common API for root window properties/protocols.The NETRootInfo class provides a common API for clients and window managers to set/read/change properties on the root window as defined by the NET Window Manager Specification..
- Author:
- Bradley T. Hughes <bhughes@trolltech.com>
- See also:
- NET
Definition at line 57 of file netwm.h.
Member Enumeration Documentation
|
Indexes for the properties array.
|
Constructor & Destructor Documentation
|
Window Managers should use this constructor to create a NETRootInfo object, which will be used to set/update information stored on the rootWindow. The application role is automatically set to WindowManager when using this constructor.
References activate(), NETWinInfoPrivate::display, NETWinInfoPrivate::name, NETWinInfoPrivate::properties, NETWinInfoPrivate::ref, and NETWinInfoPrivate::root. |
|
References activate(), NETWinInfoPrivate::display, NETWinInfoPrivate::name, NETWinInfoPrivate::properties, NETWinInfoPrivate::ref, and NETWinInfoPrivate::root. |
|
Clients should use this constructor to create a NETRootInfo object, which will be used to query information set on the root window. The application role is automatically set to Client when using this constructor.
References activate(), NETWinInfoPrivate::display, NETWinInfoPrivate::name, NETWinInfoPrivate::properties, NETWinInfoPrivate::ref, and NETWinInfoPrivate::root. |
|
This constructor differs from the above one only in the way it accepts the list of supported properties. The properties argument is equivalent to the first element of the properties array in the above constructor, and therefore you cannot read all root window properties using it. Definition at line 704 of file netwm.cpp. References activate(), NETWinInfoPrivate::display, NETWinInfoPrivate::name, NETWinInfoPrivate::properties, NETWinInfoPrivate::ref, and NETWinInfoPrivate::root. |
|
Creates a shared copy of the specified NETRootInfo object.
References p, NETWinInfoPrivate::ref, and role. |
|
Destroys the NETRootInfo object. Definition at line 782 of file netwm.cpp. References NETWinInfoPrivate::ref. |
Member Function Documentation
|
Returns the X11 Display struct used.
References NETWinInfoPrivate::display. |
|
Returns the Window id of the rootWindow.
References NETWinInfoPrivate::root. |
|
Returns the Window id of the supportWindow.
|
|
Returns the name of the Window Manager.
References NETWinInfoPrivate::name. |
|
Returns the screenNumber.
|
|
Returns true if the given property is supported by the window manager. Note that for Client mode, NET::Supported needs to be passed in the properties argument for this to work.
References NETWinInfoPrivate::properties. Referenced by KWin::allowedActionsSupported(), KWin::lowerWindow(), KWin::raiseWindow(), KStartupInfo::setNewStartupId(), and KWin::setSystemTrayWindowFor(). |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References NETWinInfoPrivate::properties. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References NETWinInfoPrivate::properties. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References NETWinInfoPrivate::properties. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References NETWinInfoPrivate::properties. |
|
In the Window Manager mode, this is equivalent to the properties argument passed to the constructor. In the Client mode, if NET::Supported was passed in the properties argument, the returned value is array of all protocols and properties supported by the Window Manager. The elements of the array are the same as they would be passed to the Window Manager mode constructor, the size is the maximum array size the constructor accepts.
References NETWinInfoPrivate::properties. |
|
Returns the properties argument passed to the constructor. The size is the maximum array size the constructor accepts.
References NETWinInfoPrivate::properties. |
|
Returns an OR'ed list of protocols passed to the constructor. For the constructor used by Window Managers, this is equivalent to the first element of the properties argument, for the constructor for Clients, it's the properties argument. Clients willing to find out all properties and protocols supported by the WindowManager should use supportedProperties().
References NETWinInfoPrivate::properties. |
|
Returns an array of Window id's, which contain all managed windows.
|
|
Returns the number of managed windows in clientList array.
|
|
Returns an array of Window id's, which contain all managed windows in stacking order.
|
|
Returns the number of managed windows in the clientListStacking array.
|
|
Returns an array of Window id's, which contain all KDE system tray windows.
|
|
Returns the number of windows in the kdeSystemTrayWindows array.
|
|
Returns the desktop geometry size. The desktop argument is ignored. Early drafts of the NET WM Specification were unclear about the semantics of this property.
|
|
Returns the viewport of the specified desktop.
|
|
Returns the workArea for the specified desktop.
|
|
Returns the name for the specified desktop.
|
|
Returns an array of Window id's, which contain the virtual root windows.
|
|
Returns the number of window in the virtualRoots array.
|
|
Returns the number of desktops.
Referenced by KWin::numberOfDesktops(). |
|
Returns the current desktop.
Referenced by KWin::currentDesktop(), and KWin::setOnAllDesktops(). |
|
Returns the active (focused) window.
|
|
Window Managers must call this after creating the NETRootInfo object, and before using any other method in the class. This method sets initial data on the root window and does other post-construction duties. Clients must also call this after creating the object to do an initial data read/update. Definition at line 805 of file netwm.cpp. Referenced by NETRootInfo(). |
|
Sets the list of managed windows on the Root/Desktop window.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Sets the list of managed windows in stacking order on the Root/Desktop window.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Sets the list of KDE system tray windows on the root window.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Sets the current desktop to the specified desktop.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. Referenced by KWin::setCurrentDesktop(). |
|
Sets the desktop geometry to the specified geometry. The desktop argument is ignored. Early drafts of the NET WM Specification were unclear about the semantics of this property.
References NETWinInfoPrivate::display, NETSize::height, NETWinInfoPrivate::root, and NETSize::width. |
|
Sets the viewport for the current desktop to the specified point.
References NETWinInfoPrivate::display, NETWinInfoPrivate::root, NETPoint::x, and NETPoint::y. |
|
Sets the number of desktops the the specified number.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Sets the name of the specified desktop.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Requests that the specified window becomes the active (focused) one.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. Referenced by KWin::activateWindow(), KWin::forceActiveWindow(), setActiveWindow(), and KWin::setActiveWindow(). |
|
Sets the active (focused) window the specified window. This should be used only in the window manager mode.
References setActiveWindow(). |
|
Sets the workarea for the specified desktop.
References NETWinInfoPrivate::display, NETSize::height, NETRect::pos, NETWinInfoPrivate::root, NETRect::size, NETSize::width, NETPoint::x, and NETPoint::y. |
|
Sets the list of virtual root windows on the root window.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Assignment operator. Ensures that the shared data reference counts are correct. Definition at line 1712 of file netwm.cpp. References p, NETWinInfoPrivate::ref, and role. |
|
Clients (such as pagers/taskbars) that wish to close a window should call this function. This will send a request to the Window Manager, which usually can usually decide how to react to such requests.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Clients (such as pagers/taskbars) that wish to start a WMMoveResize (where the window manager controls the resize/movement, i.e. _NET_WM_MOVERESIZE) should call this function. This will send a request to the Window Manager.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Clients (such as pagers/taskbars) that wish to move/resize a window using WM2MoveResizeWindow (_NET_MOVERESIZE_WINDOW) should call this function. This will send a request to the Window Manager. See _NET_MOVERESIZE_WINDOW description for details.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. |
|
Sends the _NET_RESTACK_WINDOW request.
References NETWinInfoPrivate::display, and NETWinInfoPrivate::root. Referenced by KWin::lowerWindow(), KWin::raiseWindow(), and restackRequest(). |
|
References restackRequest(). |
|
This function takes the passed XEvent and returns an OR'ed list of NETRootInfo 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).
References NETRootInfo2::changeActiveWindow(), changeActiveWindow(), changeCurrentDesktop(), changeDesktopGeometry(), changeDesktopViewport(), changeNumberOfDesktops(), closeWindow(), NETWinInfoPrivate::display, NETRootInfo2::gotPing(), NETRootInfo3::gotTakeActivity(), NETSize::height, moveResize(), NETRootInfo2::moveResizeWindow(), NETRootInfo2::restackWindow(), NETRootInfo3::restackWindow(), NETWinInfoPrivate::root, NETSize::width, NETPoint::x, and NETPoint::y. Referenced by event(). |
|
This function takes the passed XEvent and returns an OR'ed list of NETRootInfo 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.
References event(). |
|
A Client should subclass NETRootInfo and reimplement this function when it wants to know when a window has been added.
|
|
A Client should subclass NETRootInfo and reimplement this function when it wants to know when a window has been removed.
|
|
A Client should subclass NETRootInfo and reimplement this function when it wants to know when a system tray window has been added. This is a KDE 2.0 extension.
|
|
A Client should subclass NETRootInfo and reimplement this function when it wants to know when a system tray window has been removed. This is a KDE 2.0 extension.
|
|
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the number of desktops.
Referenced by event(). |
|
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the specified desktop geometry.
Referenced by event(). |
|
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the specified desktop viewport.
Referenced by event(). |
|
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the current desktop.
Referenced by event(). |
|
Referenced by event(). |
|
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to close a window.
Referenced by event(). |
|
A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to start a move/resize.
Referenced by event(). |
The documentation for this class was generated from the following files: