.TH "KWin" 3 "28 Jan 2004" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KWin \- Convenience access to certain properties and features of the window manager. Class for interaction with the window manager.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kwin.h>\fP
.PP
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "void \fBsetActiveWindow\fP (WId win)"
.br
.RI "\fISets window \fCwin\fP to be the active window. \fP"
.ti -1c
.RI "void \fBinvokeContextHelp\fP ()"
.br
.RI "\fIInvokes interactive context help. \fP"
.ti -1c
.RI "void \fBsetSystemTrayWindowFor\fP (WId trayWin, WId forWin)"
.br
.RI "\fIMakes \fCtrayWin\fP a system tray window for \fCforWin\fP. \fP"
.ti -1c
.RI "\fBInfo\fP \fBinfo\fP (WId win)"
.br
.RI "\fIReturns information about window \fCwin\fP. \fP"
.ti -1c
.RI "\fBQPixmap\fP \fBicon\fP (WId win, int width=-1, int height=-1, bool scale=false)"
.br
.RI "\fIReturns an icon for window \fCwin\fP. \fP"
.ti -1c
.RI "void \fBsetIcons\fP (WId win, const  \fBQPixmap\fP &icon, const  \fBQPixmap\fP &miniIcon)"
.br
.RI "\fISets an \fCicon\fP and a \fCminiIcon\fP on window \fCwin\fP. \fP"
.ti -1c
.RI "void \fBsetType\fP (WId win, \fBNET::WindowType\fP windowType)"
.br
.RI "\fISets the type of window \fCwin\fP to \fCwindowType\fP. \fP"
.ti -1c
.RI "void \fBsetState\fP (WId win, unsigned long state)"
.br
.RI "\fISets the state of window \fCwin\fP to \fCstate\fP. \fP"
.ti -1c
.RI "void \fBclearState\fP (WId win, unsigned long state)"
.br
.RI "\fIClears the state of window \fCwin\fP from \fCstate\fP. \fP"
.ti -1c
.RI "void \fBsetOnAllDesktops\fP (WId win, bool b)"
.br
.RI "\fISets window \fCwin\fP to be present on all virtual desktops if \fCis\fP true. \fP"
.ti -1c
.RI "void \fBsetOnDesktop\fP (WId win, int desktop)"
.br
.RI "\fIMoves window \fCwin\fP to desktop \fCdesktop\fP. \fP"
.ti -1c
.RI "void \fBsetStrut\fP (WId win, int left, int right, int top, int bottom)"
.br
.RI "\fISets the strut of window \fCwin\fP to \fCleft\fP, \fCright\fP, \fCtop\fP, \fCbottom\fP. \fP"
.ti -1c
.RI "int \fBcurrentDesktop\fP ()"
.br
.RI "\fIConvenience function to access the current desktop. \fP"
.ti -1c
.RI "int \fBnumberOfDesktops\fP ()"
.br
.RI "\fIConvenience function to access the number of desktops. \fP"
.ti -1c
.RI "void \fBsetCurrentDesktop\fP (int desktop)"
.br
.RI "\fIConvenience function to set the current desktop to \fCdesktop\fP. \fP"
.ti -1c
.RI "void \fBiconifyWindow\fP (WId win, bool animation=true)"
.br
.RI "\fIIconifies a window. \fP"
.ti -1c
.RI "void \fBdeIconifyWindow\fP (WId win, bool animation=true)"
.br
.RI "\fIDeIconifies a window. \fP"
.ti -1c
.RI "void \fBappStarted\fP ()"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP Use \fBKStartupInfo::appStarted\fP \fP"
.in -1c
.SH "Detailed Description"
.PP 
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.
.PP
In \fBKDE\fP 2 and \fBKDE\fP 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 \fBKDE\fP project). The full specification can be found in kdebase/kwin/wm-spec/
.PP
To access features of the NET-protocol, use the classes \fBNETRootInfo\fP and \fBNETWinInfo\fP.
.PP
The purpose of this class is to to provide easy access to the most-commonly used NET-features with a simpler, KDEish interface.
.PP
In addition, it encapsulates \fBKDE\fP functionality not yet provided by the \fBNET\fP hints. Currently that is \fBinvokeContextHelp()\fP and \fBsetSystemTrayWindowFor()\fP only.
.PP
\fBSee also:\fP
.RS 4
\fBNET\fP 
.PP
NetWinInfo 
.RE
.PP
\fBAuthor:\fP
.RS 4
Matthias Ettrich (ettrich@kde.org) 
.RE
.PP

.PP
Definition at line 57 of file kwin.h.
.SH "Member Function Documentation"
.PP 
.SS "void KWin::setActiveWindow (WId win)\fC [static]\fP"
.PP
Sets window \fCwin\fP to be the active window. This is a request to the window manager. It may or may not be obeyed. 
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the if of the window to make active 
.RE
.PP
Definition at line 188 of file kwin.cpp.
.PP
References info().
.PP
Referenced by KUniqueApplication::newInstance().
.SS "void KWin::invokeContextHelp ()\fC [static]\fP"
.PP
Invokes interactive context help. Definition at line 176 of file kwin.cpp.
.SS "void KWin::setSystemTrayWindowFor (WId trayWin, WId forWin)\fC [static]\fP"
.PP
Makes \fCtrayWin\fP a system tray window for \fCforWin\fP. A system tray window serves as an icon replacement. It's displayed inside the panel's system tray. 
.PP
\fBParameters:\fP
.RS 4
\fItrayWin\fP the id of the system tray window 
.br
\fItrayWin\fP the id of the window represented by the system tray window 
.RE
.PP
Definition at line 181 of file kwin.cpp.
.PP
References info().
.SS "\fBKWin::Info\fP KWin::info (WId win)\fC [static]\fP"
.PP
Returns information about window \fCwin\fP. \fBParameters:\fP
.RS 4
\fIwin\fP the id of the windoe 
.RE
.PP
\fBReturns:\fP
.RS 4
the window information 
.RE
.PP
Definition at line 194 of file kwin.cpp.
.PP
References KWin::Info::desktop, KWin::Info::frameGeometry, QString::fromLocal8Bit(), QString::fromUtf8(), KWin::Info::geometry, NETSize::height, KWin::Info::mappingState, KWin::Info::name, KWin::Info::onAllDesktops, KWin::Info::pid, NETRect::pos, QRect::setRect(), NETRect::size, KWin::Info::state, KWin::Info::strut, KWin::Info::visibleName, NETSize::width, KWin::Info::win, KWin::Info::windowType, NETPoint::x, and NETPoint::y.
.PP
Referenced by clearState(), currentDesktop(), icon(), numberOfDesktops(), setActiveWindow(), setCurrentDesktop(), setIcons(), setOnAllDesktops(), setOnDesktop(), setState(), setStrut(), setSystemTrayWindowFor(), and setType().
.SS "\fBQPixmap\fP KWin::icon (WId win, int width = -1, int height = -1, bool scale = false)\fC [static]\fP"
.PP
Returns an icon for window \fCwin\fP. If \fCwidth\fP and \fCheight\fP are specified, the best icon for the requested size is returned.
.PP
If \fCscale\fP is true, the icon is smooth-scaled to have exactly the requested size.
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIthe\fP desired width, or -1 
.br
\fIthe\fP desired height, or -1 
.br
\fIif\fP true the icon will be scaled to the desired size. Otherwise the icon will not be modified. 
.RE
.PP
\fBReturns:\fP
.RS 4
the icon of the window 
.RE
.PP
Definition at line 238 of file kwin.cpp.
.PP
References QPixmap::convertFromImage(), QPixmap::convertToImage(), NETIcon::data, KIcon::DefaultState, QPixmap::detach(), NETSize::height, KInstance::iconLoader(), info(), KGlobal::instance(), QPixmap::isNull(), QImage::isNull(), KIconLoader::loadIcon(), QString::lower(), QImage::setAlphaBuffer(), QPixmap::setMask(), QImage::size(), NETIcon::size, QImage::smoothScale(), and NETSize::width.
.SS "void KWin::setIcons (WId win, const \fBQPixmap\fP & icon, const \fBQPixmap\fP & miniIcon)\fC [static]\fP"
.PP
Sets an \fCicon\fP and a \fCminiIcon\fP on window \fCwin\fP. \fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIicon\fP the new icon 
.br
\fIminiIcon\fP the new mini icon 
.RE
.PP
Definition at line 341 of file kwin.cpp.
.PP
References QImage::bits(), QPixmap::convertToImage(), NETIcon::data, NETSize::height, info(), QPixmap::isNull(), QImage::size(), NETIcon::size, and NETSize::width.
.PP
Referenced by KApplication::setTopWidget().
.SS "void KWin::setType (WId win, \fBNET::WindowType\fP windowType)\fC [static]\fP"
.PP
Sets the type of window \fCwin\fP to \fCwindowType\fP. Possible values are NET::Normal, NET::Desktop, NET::Dock, NET::Tool, NET::Menu, NET::Dialog, NET::Override (== no decoration frame) or NET::TopMenu
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIwindowType\fP the type of the window 
.RE
.PP
Definition at line 361 of file kwin.cpp.
.PP
References info().
.SS "void KWin::setState (WId win, unsigned long state)\fC [static]\fP"
.PP
Sets the state of window \fCwin\fP to \fCstate\fP. Possible values are or'ed combinations of NET::Modal, NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar, NET::StaysOnTop, NET::SkipPager
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIstate\fP the new flags that will be set 
.RE
.PP
Definition at line 367 of file kwin.cpp.
.PP
References info().
.SS "void KWin::clearState (WId win, unsigned long state)\fC [static]\fP"
.PP
Clears the state of window \fCwin\fP from \fCstate\fP. Possible values are or'ed combinations of NET::Modal, NET::Sticky, NET::MaxVert, NET::MaxHoriz, NET::Shaded, NET::SkipTaskbar, NET::StaysOnTop, NET::SkipPager
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIstate\fP the flags that will be cleared 
.RE
.PP
Definition at line 373 of file kwin.cpp.
.PP
References info().
.SS "void KWin::setOnAllDesktops (WId win, bool b)\fC [static]\fP"
.PP
Sets window \fCwin\fP to be present on all virtual desktops if \fCis\fP true. Otherwise the window lives only on one single desktop.
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIb\fP true to show the window on all desktops, false otherwise 
.RE
.PP
Definition at line 379 of file kwin.cpp.
.PP
References info().
.SS "void KWin::setOnDesktop (WId win, int desktop)\fC [static]\fP"
.PP
Moves window \fCwin\fP to desktop \fCdesktop\fP. \fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIdesktop\fP the number of the new desktop 
.RE
.PP
Definition at line 390 of file kwin.cpp.
.PP
References info().
.SS "void KWin::setStrut (WId win, int left, int right, int top, int bottom)\fC [static]\fP"
.PP
Sets the strut of window \fCwin\fP to \fCleft\fP, \fCright\fP, \fCtop\fP, \fCbottom\fP. \fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIleft\fP the left strut 
.br
\fIright\fP the right strut 
.br
\fItop\fP the top strut 
.br
\fIbottom\fP the bottom strut 
.RE
.PP
Definition at line 408 of file kwin.cpp.
.PP
References NETStrut::bottom, info(), NETStrut::left, NETStrut::right, and NETStrut::top.
.SS "int KWin::currentDesktop ()\fC [static]\fP"
.PP
Convenience function to access the current desktop. See \fBNETRootInfo\fP. 
.PP
\fBReturns:\fP
.RS 4
the number of the current desktop 
.RE
.PP
Definition at line 419 of file kwin.cpp.
.PP
References info().
.SS "int KWin::numberOfDesktops ()\fC [static]\fP"
.PP
Convenience function to access the number of desktops. See \fBNETRootInfo\fP. 
.PP
\fBReturns:\fP
.RS 4
the number of desktops 
.RE
.PP
Definition at line 427 of file kwin.cpp.
.PP
References info().
.SS "void KWin::setCurrentDesktop (int desktop)\fC [static]\fP"
.PP
Convenience function to set the current desktop to \fCdesktop\fP. See \fBNETRootInfo\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIthe\fP number of the new desktop 
.RE
.PP
Definition at line 435 of file kwin.cpp.
.PP
References info().
.SS "void KWin::iconifyWindow (WId win, bool animation = true)\fC [static]\fP"
.PP
Iconifies a window. Compatible to XIconifyWindow but has an additional parameter \fCanimation\fP.
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIanimation\fP true to show an animation 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdeIconifyWindow()\fP 
.RE
.PP
Definition at line 442 of file kwin.cpp.
.SS "void KWin::deIconifyWindow (WId win, bool animation = true)\fC [static]\fP"
.PP
DeIconifies a window. Compatible to XMapWindow but has an additional parameter \fCanimation\fP.
.PP
\fBParameters:\fP
.RS 4
\fIwin\fP the id of the window 
.br
\fIanimation\fP true to show an animation 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBiconifyWindow()\fP 
.RE
.PP
Definition at line 450 of file kwin.cpp.
.SS "void KWin::appStarted ()\fC [static]\fP"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP Use \fBKStartupInfo::appStarted\fP Definition at line 457 of file kwin.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
