KWin Class Reference
Convenience access to certain properties and features of the window manager. Class for interaction with the window manager. More...
#include <kwin.h>
Public Types | |
enum | IconSource { NETWM = 1, WMHints = 2, ClassHint = 4, XApp = 8 } |
Static Public Member Functions | |
void | activateWindow (WId win, long time=0) |
void | forceActiveWindow (WId win, long time=0) |
void | setActiveWindow (WId win) KDE_DEPRECATED |
void | demandAttention (WId win, bool set=true) |
void | setUserTime (WId win, long time) |
void | invokeContextHelp () |
void | setSystemTrayWindowFor (WId trayWin, WId forWin) |
WindowInfo | windowInfo (WId win, unsigned long properties=0, unsigned long properties2=0) |
WId | transientFor (WId window) |
WId | groupLeader (WId window) |
QPixmap | icon (WId win, int width=-1, int height=-1, bool scale=false) |
QPixmap | icon (WId win, int width, int height, bool scale, int flags) |
void | setIcons (WId win, const QPixmap &icon, const QPixmap &miniIcon) |
void | setType (WId win, NET::WindowType windowType) |
void | setState (WId win, unsigned long state) |
void | clearState (WId win, unsigned long state) |
void | setOnAllDesktops (WId win, bool b) |
void | setOnDesktop (WId win, int desktop) |
void | setStrut (WId win, int left, int right, int top, int bottom) |
int | currentDesktop () |
int | numberOfDesktops () |
void | setCurrentDesktop (int desktop) |
void | iconifyWindow (WId win, bool animation=true) |
void | deIconifyWindow (WId win, bool animation=true) |
void | raiseWindow (WId win) |
void | lowerWindow (WId win) |
bool | icccmCompliantMappingState () |
bool | allowedActionsSupported () |
QString | readNameProperty (WId window, unsigned long atom) |
Info | info (WId win) KDE_DEPRECATED |
void | appStarted () KDE_DEPRECATED |
Detailed Description
Convenience access to certain properties and features of the window manager. Class for interaction with the window manager.This class is not supposed to be instantiated. It exists mostly as a namespace for the static member functions.
In KDE 2 and KDE 3, communication with the windowmanager is done with the NET-protocol, a common window manager specification designed by various authors of X11 window managers (including those of the KDE project). The full specification can be found at www.freedesktop.org/standards/wm-spec .
To access features of the NET-protocol, use the classes NETRootInfo and NETWinInfo.
The purpose of this class is to to provide easy access to the most-commonly used NET-features with a simpler, KDEish interface.
In addition, it encapsulates KDE functionality not yet provided by the NET hints. Currently that is invokeContextHelp() and setSystemTrayWindowFor() only.
- See also:
- NET
NetWinInfo
- Author:
- Matthias Ettrich (ettrich@kde.org)
Definition at line 59 of file kwin.h.
Member Enumeration Documentation
|
Masks specifying from which sources to read an icon. They are tried from the best until an icon is found.
|
Member Function Documentation
|
Requests that window There are two ways how to activate a window, by calling activateWindow() and forceActiveWindow(). Generally, applications shouldn't make attempts to explicitly activate their windows, and instead let the user to activate them. In the special cases where this may be needed, applications should use activateWindow(). Window manager may consider whether this request wouldn't result in focus stealing, which would be obtrusive, and may refuse the request. The usage of forceActiveWindow() is meant only for pagers and similar tools, which represent direct user actions related to window manipulation. Except for rare cases, this request will be always honored, and normal applications are forbidden to use it. In case of problems, consult the KWin README in the kdebase package (kdebase/kwin/README), or ask on the kwin@kde.org mailing list.
Definition at line 287 of file kwin.cpp. References info(). |
|
Sets window Note that this should be called only in special cases, applications shouldn't force themselves or other windows to be the active window. Generally, this call should used only by pagers and similar tools. See the explanation in description of activateWindow().
Definition at line 298 of file kwin.cpp. References info(). |
|
Definition at line 308 of file kwin.cpp. References info(). |
|
When application finishes some operation and wants to notify the user about it, it can call demandAttention(). Instead of activating the window, which could be obtrusive, the window will be marked specially as demanding user's attention. See also explanation in description of activateWindow(). Note that it's usually better to use KNotifyClient.
Definition at line 316 of file kwin.cpp. References info(). |
|
Sets user timestamp 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. The most common case is the special value 0 which means not to activate the window after being shown.
Definition at line 324 of file kwin.cpp. References info(). |
|
Invokes interactive context help.
|
|
Makes A system tray window serves as an icon replacement. It's displayed inside the panel's system tray.
Definition at line 196 of file kwin.cpp. References info(). |
|
Returns information about window It is recommended to check whether the returned info is valid by calling the valid() method.
|
|
Returns the WM_TRANSIENT_FOR property for the given window, i.e. the mainwindow for this window.
|
|
Returns the leader window for the group the given window is in, if any.
|
|
Returns an icon for window
If
If
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Overloaded variant that allows specifying from which sources the icon should be read. You should usually prefer the simpler variant which tries all possibilities to get an icon.
Definition at line 424 of file kwin.cpp. References ClassHint, NETIcon::data, NETSize::height, KInstance::iconLoader(), info(), KGlobal::instance(), KIconLoader::loadIcon(), NETWM, NETIcon::size, NETSize::width, WMHints, and XApp. |
|
Sets an
Definition at line 540 of file kwin.cpp. References NETIcon::data, NETSize::height, info(), NETIcon::size, and NETSize::width. Referenced by KApplication::setTopWidget(). |
|
Sets the type of window Possible values are NET::Normal, NET::Desktop, NET::Dock, NET::Tool, NET::Menu, NET::Dialog, NET::Override (== no decoration frame), NET::TopMenu, NET::Utility or NET::Splash
Definition at line 562 of file kwin.cpp. References info(). |
|
Sets the state of window Possible values are or'ed combinations of NET::Modal, NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar, NET::SkipPager, NET::Hidden, NET::FullScreen, NET::KeepAbove, NET::KeepBelow, NET::StaysOnTop
Definition at line 570 of file kwin.cpp. References info(). |
|
Clears the state of window Possible values are or'ed combinations of NET::Modal, NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar, NET::SkipPager, NET::Hidden, NET::FullScreen, NET::KeepAbove, NET::KeepBelow, NET::StaysOnTop
Definition at line 578 of file kwin.cpp. References info(). |
|
Sets window Otherwise the window lives only on one single desktop.
Definition at line 586 of file kwin.cpp. References info(). |
|
Moves window
Definition at line 599 of file kwin.cpp. References info(). |
|
Sets the strut of window
Definition at line 607 of file kwin.cpp. References NETStrut::bottom, info(), NETStrut::left, NETStrut::right, and NETStrut::top. |
|
Convenience function to access the current desktop. See NETRootInfo.
Definition at line 620 of file kwin.cpp. References info(). Referenced by KWin::WindowInfo::isOnCurrentDesktop(). |
|
Convenience function to access the number of desktops. See NETRootInfo.
Definition at line 632 of file kwin.cpp. References info(). |
|
Convenience function to set the current desktop to See NETRootInfo.
Definition at line 644 of file kwin.cpp. References info(). |
|
Iconifies a window.
Compatible to XIconifyWindow but has an additional parameter
|
|
DeIconifies a window.
Compatible to XMapWindow but has an additional parameter
|
|
Raises the given window. This call is only for pagers and similar tools that represent direct user actions. Applications should not use it, they should keep using QWidget::raise() or XRaiseWindow() if necessary.
Definition at line 678 of file kwin.cpp. References info(). |
|
Lowers the given window. This call is only for pagers and similar tools that represent direct user actions. Applications should not use it, they should keep using QWidget::lower() or XLowerWindow() if necessary.
Definition at line 689 of file kwin.cpp. References info(). |
|
Returns true if the WM announces which actions it allows for windows.
Definition at line 1104 of file kwin.cpp. References info(). Referenced by KWin::WindowInfo::actionSupported(). |
|
Function that reads and returns the contents of the given text property (WM_NAME, WM_ICON_NAME,...).
Definition at line 1118 of file kwin.cpp. Referenced by KWin::WindowInfo::WindowInfo(). |
|
|
Definition at line 700 of file kwin.cpp. References KStartupInfo::appStarted(). |
The documentation for this class was generated from the following files: