• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KDEUI

Public Types | Public Member Functions | Protected Member Functions

NETRootInfo Class Reference

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

#include <netwm.h>

Inheritance diagram for NETRootInfo:
Inheritance graph
[legend]

List of all members.

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, const unsigned long properties[], int properties_size, int screen=-1, bool doActivate=true)
 NETRootInfo (const NETRootInfo &rootinfo)
 NETRootInfo (Display *display, unsigned long properties, int screen=-1, bool doActivate=true)
virtual ~NETRootInfo ()
void activate ()
Window activeWindow () const
const Window * clientList () const
int clientListCount () const
const Window * clientListStacking () const
int clientListStackingCount () const
void closeWindowRequest (Window window)
int currentDesktop (bool ignore_viewport=false) const
NETSize desktopGeometry (int desktop) const
QSize desktopLayoutColumnsRows () const
NET::DesktopLayoutCorner desktopLayoutCorner () const
NET::Orientation desktopLayoutOrientation () const
const char * desktopName (int desktop) const
NETPoint desktopViewport (int desktop) const
void event (XEvent *event, unsigned long *properties, int properties_size)
unsigned long event (XEvent *event)
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
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)
int numberOfDesktops (bool ignore_viewport=false) const
const NETRootInfo & operator= (const NETRootInfo &rootinfo)
const unsigned long * passedProperties () const
void restackRequest (Window window, RequestSource source, Window above, int detail, Time timestamp)
Window rootWindow () const
int screenNumber () const
void sendPing (Window window, Time timestamp)
void setActiveWindow (Window window, NET::RequestSource src, Time timestamp, Window active_window)
void setActiveWindow (Window window)
void setClientList (const Window *windows, unsigned int count)
void setClientListStacking (const Window *windows, unsigned int count)
void setCurrentDesktop (int desktop, bool ignore_viewport=false)
void setDesktopGeometry (int desktop, const NETSize &geometry)
void setDesktopLayout (NET::Orientation orientation, int columns, int rows, NET::DesktopLayoutCorner corner)
void setDesktopName (int desktop, const char *desktopName)
void setDesktopViewport (int desktop, const NETPoint &viewport)
void setNumberOfDesktops (int numberOfDesktops)
void setShowingDesktop (bool showing)
void setSupported (NET::WindowType property, bool on=true)
void setSupported (NET::Action property, bool on=true)
void setSupported (NET::Property2 property, bool on=true)
void setSupported (NET::State property, bool on=true)
void setSupported (NET::Property property, bool on=true)
void setVirtualRoots (const Window *windows, unsigned int count)
void setWorkArea (int desktop, const NETRect &workArea)
bool showingDesktop () const
const unsigned long * supportedProperties () const
Window supportWindow () const
void takeActivity (Window window, Time timestamp, long flags)
const Window * virtualRoots () const
int virtualRootsCount () const
const char * wmName () const
NETRect workArea (int desktop) const
Display * x11Display () const

Protected Member Functions

virtual void addClient (Window window)
virtual void changeActiveWindow (Window window, NET::RequestSource src, Time timestamp, Window active_window)
virtual void changeCurrentDesktop (int desktop)
virtual void changeDesktopGeometry (int desktop, const NETSize &geom)
virtual void changeDesktopViewport (int desktop, const NETPoint &viewport)
virtual void changeNumberOfDesktops (int numberOfDesktops)
virtual void changeShowingDesktop (bool showing)
virtual void closeWindow (Window window)
virtual void gotPing (Window window, Time timestamp)
virtual void gotTakeActivity (Window window, Time timestamp, long flags)
virtual void moveResize (Window window, int x_root, int y_root, unsigned long direction)
virtual void moveResizeWindow (Window window, int flags, int x, int y, int width, int height)
virtual void removeClient (Window window)
virtual void restackWindow (Window window, RequestSource source, Window above, int detail, Time timestamp)
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
NETWinInfo

Definition at line 58 of file netwm.h.


Member Enumeration Documentation

anonymous enum

Indexes for the properties array.

Enumerator:
PROTOCOLS 
WINDOW_TYPES 
STATES 
PROTOCOLS2 
ACTIONS 
PROPERTIES_SIZE 

Definition at line 64 of file netwm.h.


Constructor & Destructor Documentation

NETRootInfo::NETRootInfo ( Display *  display,
Window  supportWindow,
const char *  wmName,
const unsigned long  properties[],
int  properties_size,
int  screen = -1,
bool  doActivate = true 
)

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.

Parameters:
displayAn X11 Display struct.
supportWindowThe Window id of the supportWindow. The supportWindow must be created by the window manager as a child of the rootWindow. The supportWindow must not be destroyed until the Window Manager exits.
wmNameA string which should be the window manager's name (ie. "KWin" or "Blackbox").
propertiesAn array of elements listing all properties and protocols the window manager supports. The elements contain OR'ed values of constants from the NET base class, in the following order: [0]= NET::Property, [1]= NET::WindowTypeMask (not NET::WindowType!), [2]= NET::State, [3]= NET::Property2, [4]= NET::Action. In future versions, the list may be extended. In case you pass less elements, the missing ones will be replaced with default values.
properties_sizeThe number of elements in the properties array.
screenFor Window Managers that support multiple screen (ie. "multiheaded") displays, the screen number may be explicitly defined. If this argument is omitted, the default screen will be used.
doActivatetrue to activate the window

Definition at line 624 of file netwm.cpp.

NETRootInfo::NETRootInfo ( Display *  display,
const unsigned long  properties[],
int  properties_size,
int  screen = -1,
bool  doActivate = true 
)

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.

Parameters:
displayAn X11 Display struct.
propertiesAn array of elements listing all protocols 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.
properties_sizeThe number of elements in the properties array.
screenFor Clients that support multiple screen (ie. "multiheaded") displays, the screen number may be explicitly defined. If this argument is omitted, the default screen will be used.
doActivatetrue to call activate() to do an initial data read/update of the query information.

Definition at line 676 of file netwm.cpp.

NETRootInfo::NETRootInfo ( Display *  display,
unsigned long  properties,
int  screen = -1,
bool  doActivate = true 
)

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 735 of file netwm.cpp.

NETRootInfo::NETRootInfo ( const NETRootInfo &  rootinfo)

Creates a shared copy of the specified NETRootInfo object.

Parameters:
rootinfothe NETRootInfo object to copy

Definition at line 784 of file netwm.cpp.

NETRootInfo::~NETRootInfo ( ) [virtual]

Destroys the NETRootInfo object.

Definition at line 798 of file netwm.cpp.


Member Function Documentation

void NETRootInfo::activate ( )

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 821 of file netwm.cpp.

Window NETRootInfo::activeWindow ( ) const

Returns the active (focused) window.

Returns:
the id of the active window

Definition at line 2734 of file netwm.cpp.

virtual void NETRootInfo::addClient ( Window  window) [inline, protected, virtual]

A Client should subclass NETRootInfo and reimplement this function when it wants to know when a window has been added.

Parameters:
windowthe id of the window to add

Definition at line 662 of file netwm.h.

virtual void NETRootInfo::changeActiveWindow ( Window  window,
NET::RequestSource  src,
Time  timestamp,
Window  active_window 
) [inline, protected, virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to change the active (focused) window.

Parameters:
windowthe id of the window to activate
srcthe source from which the request came
timestampthe timestamp of the user action causing this request
active_windowactive window of the requesting application, if any

Definition at line 753 of file netwm.h.

virtual void NETRootInfo::changeCurrentDesktop ( int  desktop) [inline, protected, virtual]

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.

Parameters:
desktopthe number of the desktop

Definition at line 710 of file netwm.h.

virtual void NETRootInfo::changeDesktopGeometry ( int  desktop,
const NETSize &  geom 
) [inline, protected, virtual]

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.

Parameters:
desktopthe number of the desktop
geomthe new size

Definition at line 690 of file netwm.h.

virtual void NETRootInfo::changeDesktopViewport ( int  desktop,
const NETPoint &  viewport 
) [inline, protected, virtual]

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.

Parameters:
desktopthe number of the desktop
viewportthe new position of the viewport

Definition at line 701 of file netwm.h.

virtual void NETRootInfo::changeNumberOfDesktops ( int  numberOfDesktops) [inline, protected, virtual]

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.

Parameters:
numberOfDesktopsthe new number of desktops

Definition at line 679 of file netwm.h.

virtual void NETRootInfo::changeShowingDesktop ( bool  showing) [inline, protected, virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a pager made a request to change showing the desktop.

See _NET_SHOWING_DESKTOP for details.

Parameters:
showingwhether to activate the showing desktop mode

Definition at line 799 of file netwm.h.

const Window * NETRootInfo::clientList ( ) const

Returns an array of Window id's, which contain all managed windows.

Returns:
the array of Window id's
See also:
clientListCount()

Definition at line 2641 of file netwm.cpp.

int NETRootInfo::clientListCount ( ) const

Returns the number of managed windows in clientList array.

Returns:
the number of managed windows in the clientList array
See also:
clientList()

Definition at line 2646 of file netwm.cpp.

const Window * NETRootInfo::clientListStacking ( ) const

Returns an array of Window id's, which contain all managed windows in stacking order.

Returns:
the array of Window id's in stacking order
See also:
clientListStackingCount()

Definition at line 2651 of file netwm.cpp.

int NETRootInfo::clientListStackingCount ( ) const

Returns the number of managed windows in the clientListStacking array.

Returns:
the number of Window id's in the client list
See also:
clientListStacking()

Definition at line 2656 of file netwm.cpp.

virtual void NETRootInfo::closeWindow ( Window  window) [inline, protected, virtual]

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.

Parameters:
windowthe id of the window to close

Definition at line 718 of file netwm.h.

void NETRootInfo::closeWindowRequest ( Window  window)

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.

Parameters:
windowthe id of the window to close

Definition at line 1667 of file netwm.cpp.

int NETRootInfo::currentDesktop ( bool  ignore_viewport = false) const

Returns the current desktop.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. They are however mapped to virtual desktops if needed.

Parameters:
ignore_viewportif false, viewport is mapped to virtual desktops
Returns:
the number of the current desktop

Definition at line 2727 of file netwm.cpp.

NETSize NETRootInfo::desktopGeometry ( int  desktop) const

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.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. You should use calls for virtual desktops, viewport is mapped to them if needed.

Parameters:
desktopthe number of the desktop
Returns:
the size of the desktop

Definition at line 2661 of file netwm.cpp.

QSize NETRootInfo::desktopLayoutColumnsRows ( ) const

Returns the desktop layout number of columns and rows.

Note that either may be 0 (see _NET_DESKTOP_LAYOUT).

Definition at line 2710 of file netwm.cpp.

NET::DesktopLayoutCorner NETRootInfo::desktopLayoutCorner ( ) const

Returns the desktop layout starting corner.

Definition at line 2715 of file netwm.cpp.

NET::Orientation NETRootInfo::desktopLayoutOrientation ( ) const

Returns the desktop layout orientation.

Definition at line 2705 of file netwm.cpp.

const char * NETRootInfo::desktopName ( int  desktop) const

Returns the name for the specified desktop.

Parameters:
desktopthe number of the desktop
Returns:
the name of the desktop

Definition at line 2686 of file netwm.cpp.

NETPoint NETRootInfo::desktopViewport ( int  desktop) const

Returns the viewport of the specified desktop.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. You should use calls for virtual desktops, viewport is mapped to them if needed.

Parameters:
desktopthe number of the desktop
Returns:
the position of the desktop's viewport

Definition at line 2666 of file netwm.cpp.

unsigned long NETRootInfo::event ( XEvent *  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.

Parameters:
eventthe event
Returns:
the properties

Definition at line 1832 of file netwm.cpp.

void NETRootInfo::event ( XEvent *  event,
unsigned long *  properties,
int  properties_size 
)

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

Parameters:
eventthe event
propertiesproperties that changed
properties_sizesize of the passed properties array

Definition at line 1839 of file netwm.cpp.

virtual void NETRootInfo::gotPing ( Window  window,
Time  timestamp 
) [inline, protected, virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to receive replies to the _NET_WM_PING protocol.

Parameters:
windowthe window from which the reply came
timestamptimestamp of the ping

Definition at line 742 of file netwm.h.

virtual void NETRootInfo::gotTakeActivity ( Window  window,
Time  timestamp,
long  flags 
) [inline, protected, virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to receive replies to the _NET_WM_TAKE_ACTIVITY protocol.

Parameters:
windowthe window from which the reply came
timestamptimestamp of the ping
flagsflags passed in the original message

Definition at line 790 of file netwm.h.

bool NETRootInfo::isSupported ( NET::Property  property) const

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.

Definition at line 2621 of file netwm.cpp.

bool NETRootInfo::isSupported ( NET::Property2  property) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 2625 of file netwm.cpp.

bool NETRootInfo::isSupported ( NET::WindowType  type) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 2629 of file netwm.cpp.

bool NETRootInfo::isSupported ( NET::State  state) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 2633 of file netwm.cpp.

bool NETRootInfo::isSupported ( NET::Action  action) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 2637 of file netwm.cpp.

virtual void NETRootInfo::moveResize ( Window  window,
int  x_root,
int  y_root,
unsigned long  direction 
) [inline, protected, virtual]

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.

Parameters:
windowThe window that wants to move/resize
x_rootX position of the cursor relative to the root window.
y_rootY position of the cursor relative to the root window.
directionOne of NET::Direction (see base class documentation for a description of the different directions).

Definition at line 733 of file netwm.h.

void NETRootInfo::moveResizeRequest ( Window  window,
int  x_root,
int  y_root,
Direction  direction 
)

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.

Parameters:
windowThe client window that would be resized/moved.
x_rootX position of the cursor relative to the root window.
y_rootY position of the cursor relative to the root window.
directionOne of NET::Direction (see base class documentation for a description of the different directions).

Definition at line 1691 of file netwm.cpp.

virtual void NETRootInfo::moveResizeWindow ( Window  window,
int  flags,
int  x,
int  y,
int  width,
int  height 
) [inline, protected, virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a pager made a request to move/resize a window.

See _NET_MOVERESIZE_WINDOW for details.

Parameters:
windowthe id of the window to more/resize
flagsFlags specifying the operation (see _NET_MOVERESIZE_WINDOW description)
xRequested X position for the window
yRequested Y position for the window
widthRequested width for the window
heightRequested height for the window

Definition at line 768 of file netwm.h.

void NETRootInfo::moveResizeWindowRequest ( Window  window,
int  flags,
int  x,
int  y,
int  width,
int  height 
)

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.

Parameters:
windowThe client window that would be resized/moved.
flagsFlags specifying the operation (see _NET_MOVERESIZE_WINDOW description)
xRequested X position for the window
yRequested Y position for the window
widthRequested width for the window
heightRequested height for the window

Definition at line 1717 of file netwm.cpp.

int NETRootInfo::numberOfDesktops ( bool  ignore_viewport = false) const

Returns the number of desktops.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. They are however mapped to virtual desktops if needed.

Parameters:
ignore_viewportif false, viewport is mapped to virtual desktops
Returns:
the number of desktops

Definition at line 2720 of file netwm.cpp.

const NETRootInfo & NETRootInfo::operator= ( const NETRootInfo &  rootinfo)

Assignment operator.

Ensures that the shared data reference counts are correct.

Definition at line 1814 of file netwm.cpp.

const unsigned long * NETRootInfo::passedProperties ( ) const

Returns the properties argument passed to the constructor.

The size is the maximum array size the constructor accepts.

Definition at line 2550 of file netwm.cpp.

virtual void NETRootInfo::removeClient ( Window  window) [inline, protected, virtual]

A Client should subclass NETRootInfo and reimplement this function when it wants to know when a window has been removed.

Parameters:
windowthe id of the window to remove

Definition at line 670 of file netwm.h.

void NETRootInfo::restackRequest ( Window  window,
RequestSource  source,
Window  above,
int  detail,
Time  timestamp 
)

Sends the _NET_RESTACK_WINDOW request.

Definition at line 1742 of file netwm.cpp.

virtual void NETRootInfo::restackWindow ( Window  window,
RequestSource  source,
Window  above,
int  detail,
Time  timestamp 
) [inline, protected, virtual]

A Window Manager should subclass NETRootInfo and reimplement this function when it wants to know when a Client made a request to restack a window.

See _NET_RESTACK_WINDOW for details.

Parameters:
windowthe id of the window to restack
sourcethe source of the request
aboveother window in the restack request
detailrestack detail
timestampthe timestamp of the request

Definition at line 781 of file netwm.h.

Window NETRootInfo::rootWindow ( ) const

Returns the Window id of the rootWindow.

Returns:
the id of the root window

Definition at line 2526 of file netwm.cpp.

int NETRootInfo::screenNumber ( ) const

Returns the screenNumber.

Returns:
the screen number

Definition at line 2540 of file netwm.cpp.

void NETRootInfo::sendPing ( Window  window,
Time  timestamp 
)

Sends a ping with the given timestamp to the window, using the _NET_WM_PING protocol.

Definition at line 1766 of file netwm.cpp.

void NETRootInfo::setActiveWindow ( Window  window,
NET::RequestSource  src,
Time  timestamp,
Window  active_window 
)

Requests that the specified window becomes the active (focused) one.

Parameters:
windowthe id of the new active window
srcwhether the request comes from normal application or from a pager or similar tool
timestampX server timestamp of the user action that caused the request
active_windowactive window of the requesting application, if any

Definition at line 1537 of file netwm.cpp.

void NETRootInfo::setActiveWindow ( Window  window)

Sets the active (focused) window the specified window.

This should be used only in the window manager mode.

Parameters:
windowthe if of the new active window

Definition at line 1533 of file netwm.cpp.

void NETRootInfo::setClientList ( const Window *  windows,
unsigned int  count 
)

Sets the list of managed windows on the Root/Desktop window.

Parameters:
windowsThe array of Window id's
countThe number of windows in the array

Definition at line 842 of file netwm.cpp.

void NETRootInfo::setClientListStacking ( const Window *  windows,
unsigned int  count 
)

Sets the list of managed windows in stacking order on the Root/Desktop window.

Parameters:
windowsThe array of Window id's
countThe number of windows in the array.

Definition at line 861 of file netwm.cpp.

void NETRootInfo::setCurrentDesktop ( int  desktop,
bool  ignore_viewport = false 
)

Sets the current desktop to the specified desktop.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. It is however mapped to virtual desktops if needed.

Parameters:
desktopthe number of the desktop
ignore_viewportif false, viewport is mapped to virtual desktops

Definition at line 912 of file netwm.cpp.

void NETRootInfo::setDesktopGeometry ( int  desktop,
const NETSize &  geometry 
)

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.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. You should use calls for virtual desktops, viewport is mapped to them if needed.

Parameters:
desktopthe number of the desktop
geometrythe new size of the desktop

Definition at line 985 of file netwm.cpp.

void NETRootInfo::setDesktopLayout ( NET::Orientation  orientation,
int  columns,
int  rows,
NET::DesktopLayoutCorner  corner 
)

Sets the desktop layout.

This is set by the pager. When setting, the pager must own the _NET_DESKTOP_LAYOUT_Sn manager selection. See _NET_DESKTOP_LAYOUT for details.

Definition at line 1615 of file netwm.cpp.

void NETRootInfo::setDesktopName ( int  desktop,
const char *  desktopName 
)

Sets the name of the specified desktop.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. Viewport is mapped to virtual desktops if needed, but not for this call.

Parameters:
desktopthe number of the desktop
desktopNamethe new name of the desktop

Definition at line 949 of file netwm.cpp.

void NETRootInfo::setDesktopViewport ( int  desktop,
const NETPoint &  viewport 
)

Sets the viewport for the current desktop to the specified point.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. You should use calls for virtual desktops, viewport is mapped to them if needed.

Parameters:
desktopthe number of the desktop
viewportthe new position of the desktop's viewport

Definition at line 1020 of file netwm.cpp.

void NETRootInfo::setNumberOfDesktops ( int  numberOfDesktops)

Sets the number of desktops to the specified number.

NOTE: KDE uses virtual desktops and does not directly support viewport in any way. Viewport is mapped to virtual desktops if needed, but not for this call.

Parameters:
numberOfDesktopsthe number of desktops

Definition at line 880 of file netwm.cpp.

void NETRootInfo::setShowingDesktop ( bool  showing)

Sets the _NET_SHOWING_DESKTOP status (whether desktop is being shown).

Definition at line 1638 of file netwm.cpp.

void NETRootInfo::setSupported ( NET::State  property,
bool  on = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since:
4.4

Definition at line 2595 of file netwm.cpp.

void NETRootInfo::setSupported ( NET::Action  property,
bool  on = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since:
4.4

Definition at line 2608 of file netwm.cpp.

void NETRootInfo::setSupported ( NET::WindowType  property,
bool  on = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since:
4.4

Definition at line 2582 of file netwm.cpp.

void NETRootInfo::setSupported ( NET::Property  property,
bool  on = true 
)

Sets the given property if on is true, and clears the property otherwise.

In WindowManager mode this function updates _NET_SUPPORTED. In Client mode this function does nothing.

Since:
4.4

Definition at line 2556 of file netwm.cpp.

void NETRootInfo::setSupported ( NET::Property2  property,
bool  on = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Since:
4.4

Definition at line 2569 of file netwm.cpp.

void NETRootInfo::setVirtualRoots ( const Window *  windows,
unsigned int  count 
)

Sets the list of virtual root windows on the root window.

Parameters:
windowsThe array of Window id's
countThe number of windows in the array.

Definition at line 1597 of file netwm.cpp.

void NETRootInfo::setWorkArea ( int  desktop,
const NETRect &  workArea 
)

Sets the workarea for the specified desktop.

Parameters:
desktopthe number of the desktop
workAreathe new work area of the desktop

Definition at line 1568 of file netwm.cpp.

bool NETRootInfo::showingDesktop ( ) const

Returns the status of _NET_SHOWING_DESKTOP.

Definition at line 1662 of file netwm.cpp.

const unsigned long * NETRootInfo::supportedProperties ( ) const

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.

Definition at line 2546 of file netwm.cpp.

Window NETRootInfo::supportWindow ( ) const

Returns the Window id of the supportWindow.

Returns:
the id of the support window

Definition at line 2531 of file netwm.cpp.

void NETRootInfo::takeActivity ( Window  window,
Time  timestamp,
long  flags 
)

Sends a take activity message with the given timestamp to the window, using the _NET_WM_TAKE_ACTIVITY protocol (see the WM spec for details).

Parameters:
windowthe window to which the message should be sent
timestamptimestamp of the message
flagsarbitrary flags

Definition at line 1788 of file netwm.cpp.

void NETRootInfo::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.

Unused in this class.

Definition at line 4678 of file netwm.cpp.

const Window * NETRootInfo::virtualRoots ( ) const

Returns an array of Window id's, which contain the virtual root windows.

Returns:
the array of Window id's
See also:
virtualRootsCount()

Definition at line 2695 of file netwm.cpp.

int NETRootInfo::virtualRootsCount ( ) const

Returns the number of window in the virtualRoots array.

Returns:
the number of Window id's in the virtual root array
See also:
virtualRoots()

Definition at line 2700 of file netwm.cpp.

const char * NETRootInfo::wmName ( ) const

Returns the name of the Window Manager.

Returns:
the name of the window manager

Definition at line 2536 of file netwm.cpp.

NETRect NETRootInfo::workArea ( int  desktop) const

Returns the workArea for the specified desktop.

Parameters:
desktopthe number of the desktop
Returns:
the size of the work area

Definition at line 2676 of file netwm.cpp.

Display * NETRootInfo::x11Display ( ) const

Returns the X11 Display struct used.

Returns:
the X11 Display

Definition at line 2521 of file netwm.cpp.


The documentation for this class was generated from the following files:
  • netwm.h
  • netwm.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal