KWin Class Reference
#include <kwin.h>
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 61 of file kwin.h.
Public Types | |
enum | IconSource { NETWM = 1, WMHints = 2, ClassHint = 4, XApp = 8 } |
Static Public Member Functions | |
static void | activateWindow (WId win, long time=0) |
static void | forceActiveWindow (WId win, long time=0) |
static void | setActiveWindow (WId win) KDE_DEPRECATED |
static void | demandAttention (WId win, bool set=true) |
static void | setUserTime (WId win, long time) |
static void | invokeContextHelp () |
static void | setMainWindow (QWidget *subwindow, WId mainwindow) |
static void | setSystemTrayWindowFor (WId trayWin, WId forWin) |
static WindowInfo | windowInfo (WId win, unsigned long properties=0, unsigned long properties2=0) |
static WId | transientFor (WId window) |
static WId | groupLeader (WId window) |
static QPixmap | icon (WId win, int width=-1, int height=-1, bool scale=false) |
static QPixmap | icon (WId win, int width, int height, bool scale, int flags) |
static void | setIcons (WId win, const QPixmap &icon, const QPixmap &miniIcon) |
static void | setType (WId win, NET::WindowType windowType) |
static void | setState (WId win, unsigned long state) |
static void | clearState (WId win, unsigned long state) |
static void | setOpacity (WId win, uint percent) |
static void | setShadowSize (WId win, uint percent) |
static void | setOnAllDesktops (WId win, bool b) |
static void | setOnDesktop (WId win, int desktop) |
static void | setExtendedStrut (WId win, int left_width, int left_start, int left_end, int right_width, int right_start, int right_end, int top_width, int top_start, int top_end, int bottom_width, int bottom_start, int bottom_end) |
static void | setStrut (WId win, int left, int right, int top, int bottom) |
static int | currentDesktop () |
static int | numberOfDesktops () |
static void | setCurrentDesktop (int desktop) |
static void | setCurrentDesktopViewport (int desktop, QPoint viewport) |
static void | iconifyWindow (WId win, bool animation=true) |
static void | deIconifyWindow (WId win, bool animation=true) |
static void | raiseWindow (WId win) |
static void | lowerWindow (WId win) |
static bool | icccmCompliantMappingState () |
static bool | allowedActionsSupported () |
static QString | readNameProperty (WId window, unsigned long atom) |
static bool | compositingActive () |
static Info | info (WId win) KDE_DEPRECATED |
static void | appStarted () KDE_DEPRECATED |
Classes | |
struct | Info |
class | WindowInfo |
Information about a window. More... |
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.
|
|
Returns true if the WM announces which actions it allows for windows.
|
|
|
|
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
|
|
Returns true if a compositing manager is running (i.e. ARGB windows are supported, effects will be provided, etc.). |
|
Convenience function to access the current desktop. See NETRootInfo.
|
|
DeIconifies a window.
Compatible to XMapWindow but has an additional parameter
|
|
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.
|
|
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().
|
|
Returns the leader window for the group the given window is in, if any.
|
|
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.
|
|
Returns an icon for window
If
If
|
|
Iconifies a window.
Compatible to XIconifyWindow but has an additional parameter
|
|
|
|
Invokes interactive context help.
|
|
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.
|
|
Convenience function to access the number of desktops. See NETRootInfo.
|
|
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.
|
|
Function that reads and returns the contents of the given text property (WM_NAME, WM_ICON_NAME,. ..).
|
|
|
|
Convenience function to set the current desktop to See NETRootInfo.
|
|
Convenience function to set the current viewport to See NETRootInfo.
|
|
Sets the strut of window For not reserving a strut, pass 0 as the width. E.g. to reserve 10x10 square in the topleft corner, use e.g. setExtendedStrut( w, 10, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0 ).
|
|
Sets an
|
|
Sets the parent window of This overrides the parent set the usual way as the QWidget parent, but only for the window manager - e.g. stacking order and window grouping will be affected, but features like automatic deletion of children when the parent is deleted are unaffected and normally use the QWidget parent. This function should be used before a dialog is shown for a window that belongs to another application.
|
|
Sets window Otherwise the window lives only on one single desktop.
|
|
Moves window
|
|
Sets the opacity of window Convenience function that just sets an X property needs a running composite manager for any visible effect
|
|
Sets the shadowsize of window Convenience function that just sets an X property needs the running KDE kompmgr manager for any visible effect
|
|
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
|
|
|
|
Makes A system tray window serves as an icon replacement. It's displayed inside the panel's system tray.
|
|
Sets the type of window
|
|
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.
|
|
Returns the WM_TRANSIENT_FOR property for the given window, i.e. the mainwindow for this window.
|
|
Returns information about window It is recommended to check whether the returned info is valid by calling the valid() method.
|
The documentation for this class was generated from the following files: