• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

KWin::WindowInfo

KWin::WindowInfo Class Reference

Information about a window. More...

#include <kwin.h>

List of all members.


Public Member Functions

bool actionSupported (NET::Action action) const
QCString clientMachine () const
int desktop () const
NETExtendedStrut extendedStrut () const
QRect frameGeometry () const
QRect geometry () const
WId groupLeader () const
bool hasState (unsigned long s) const
QString iconName () const
bool isMinimized () const
bool isOnCurrentDesktop () const
bool isOnDesktop (int desktop) const
NET::MappingState mappingState () const
QString name () const
bool onAllDesktops () const
WindowInfo & operator= (const WindowInfo &)
unsigned long state () const
NETStrut strut () const
WId transientFor () const
bool valid (bool withdrawn_is_valid=false) const
QString visibleIconName () const
QString visibleIconNameWithState () const
QString visibleName () const
QString visibleNameWithState () const
WId win () const
QCString windowClassClass () const
QCString windowClassName () const
 WindowInfo (const WindowInfo &)
 WindowInfo ()
 WindowInfo (WId window, unsigned long properties, unsigned long properties2)
QCString windowRole () const
NET::WindowType windowType (int supported_types) const
 ~WindowInfo ()

Detailed Description

Information about a window.

Since:
3.2

Definition at line 522 of file kwin.h.


Constructor & Destructor Documentation

KWin::WindowInfo::WindowInfo ( WId  window,
unsigned long  properties,
unsigned long  properties2 
)

Reads all the info about the given window.

Definition at line 765 of file kwin.cpp.

KWin::WindowInfo::WindowInfo (  ) 

Definition at line 817 of file kwin.cpp.

KWin::WindowInfo::~WindowInfo (  ) 

Definition at line 822 of file kwin.cpp.

KWin::WindowInfo::WindowInfo ( const WindowInfo &  wininfo  ) 

Definition at line 831 of file kwin.cpp.


Member Function Documentation

bool KWin::WindowInfo::actionSupported ( NET::Action  action  )  const

Returns true if the given action is currently supported for the window by the window manager.

Requires NET::WM2AllowedActions passed to KWin::windowInfo().

Definition at line 1159 of file kwin.cpp.

QCString KWin::WindowInfo::clientMachine (  )  const

Returns the client machine for the window (i.e.

WM_CLIENT_MACHINE property). Requires NET::WMClientMachine passed to KWin::windowInfo().

Since:
3.3

Definition at line 1148 of file kwin.cpp.

int KWin::WindowInfo::desktop (  )  const

Returns the virtual desktop this window is on (NET::OnAllDesktops if the window is on all desktops).

You should prefer using isOnDesktop(). Requires NET::WMDesktop passed to KWin::windowInfo().

Definition at line 1060 of file kwin.cpp.

NETExtendedStrut KWin::WindowInfo::extendedStrut (  )  const

Returns the window extended (partial) strut.

Requires NET::WM2ExtendedStrut passed to KWin::windowInfo().

Definition at line 887 of file kwin.cpp.

QRect KWin::WindowInfo::frameGeometry (  )  const

Returns the frame geometry of the window, i.e.

including the window decoration. Requires NET::WMKDEFrameStrut passed to KWin::windowInfo().

Definition at line 1082 of file kwin.cpp.

QRect KWin::WindowInfo::geometry (  )  const

Returns the position and size of the window contents.

Requires NET::WMGeometry passed to KWin::windowInfo().

Definition at line 1071 of file kwin.cpp.

WId KWin::WindowInfo::groupLeader (  )  const

Returns the leader window for the group the window is in, if any.

Requires NET::WM2GroupLeader passed to KWin::windowInfo().

Definition at line 1104 of file kwin.cpp.

bool KWin::WindowInfo::hasState ( unsigned long  s  )  const [inline]

Returns true if the window has the given state flag set (see the NET::State enum for details).

Requires NET::WMState passed to KWin::windowInfo().

Since:
3.2.1

Definition at line 552 of file kwin.h.

QString KWin::WindowInfo::iconName (  )  const

Returns the name of the window that should be shown in taskbar and all other "iconic" representations of the window.

Note that this has nothing to do with normal icons. Requires NET::WMIconName passed to KWin::windowInfo().

Definition at line 1016 of file kwin.cpp.

bool KWin::WindowInfo::isMinimized (  )  const

Returns true if the window is minimized.

Note that it is true only if the window is truly minimized, not shaded or on another virtual desktops, which makes it different from mappingState() == NET::Iconic or QWidget::isMinimized(). Requires NET::WMState and NET::XAWMState passed to KWin::windowInfo().

Definition at line 1172 of file kwin.cpp.

bool KWin::WindowInfo::isOnCurrentDesktop (  )  const

Returns true if the window is on the currently active virtual desktop.

Requires NET::WMDesktop passed to KWin::windowInfo().

Definition at line 1029 of file kwin.cpp.

bool KWin::WindowInfo::isOnDesktop ( int  desktop  )  const

Returns true if the window is on the given virtual desktop.

Requires NET::WMDesktop passed to KWin::windowInfo().

Definition at line 1038 of file kwin.cpp.

NET::MappingState KWin::WindowInfo::mappingState (  )  const

Returns the mapping state of the window (see NET::MappingState).

Note that it's very likely that you don't want to use this function, and use isOnDesktop(), isMinimized() etc. instead. Requires NET::XAWMState passed to KWin::windowInfo().

Definition at line 876 of file kwin.cpp.

QString KWin::WindowInfo::name (  )  const

Returns the name of the window, as specified by the application, without any modifications.

You should often use visibleName() instead. Requires NET::WMName passed to KWin::windowInfo().

Definition at line 980 of file kwin.cpp.

bool KWin::WindowInfo::onAllDesktops (  )  const

Returns true if the window is on all desktops (equal to desktop()==NETOnAllDesktops).

Requires NET::WMDesktop passed to KWin::windowInfo().

Definition at line 1049 of file kwin.cpp.

KWin::WindowInfo & KWin::WindowInfo::operator= ( const WindowInfo &  wininfo  ) 

Definition at line 838 of file kwin.cpp.

unsigned long KWin::WindowInfo::state (  )  const

Returns the window's state flags (see the NET::State enum for details).

Requires NET::WMState passed to KWin::windowInfo().

Definition at line 865 of file kwin.cpp.

NETStrut KWin::WindowInfo::strut (  )  const

Deprecated:
use extendedStrut() Returns the window strut. Requires NET::WMStrut passed to KWin::windowInfo().

Definition at line 925 of file kwin.cpp.

WId KWin::WindowInfo::transientFor (  )  const

Returns the WM_TRANSIENT_FOR property for the window, i.e.

the mainwindow for this window. Requires NET::WM2TransientFor passed to KWin::windowInfo().

Definition at line 1093 of file kwin.cpp.

bool KWin::WindowInfo::valid ( bool  withdrawn_is_valid = false  )  const

Returns false if this window info is not valid (most probably the given window doesn't exist).

Parameters:
withdrawn_is_valid if true, windows in the withdrawn state (i.e. not managed) are also considered. This is usually not the case.

Definition at line 851 of file kwin.cpp.

QString KWin::WindowInfo::visibleIconName (  )  const

Returns the visible name of the window that should be shown in taskbar and all other "iconic" representations of the window.

Note that this has nothing to do with normal icons. Requires NET::WMVisibleIconName passed to KWin::windowInfo().

Definition at line 1001 of file kwin.cpp.

QString KWin::WindowInfo::visibleIconNameWithState (  )  const

Returns a visible name with state.

This is a simple convenience function that returns the visible iconic name but with parentheses around minimized windows. Note that this has nothing to do with normal icons. Requires NET::WMVisibleIconName, NET::WMState and NET::XAWMState passed to KWin::windowInfo().

Returns:
the window iconic name with state

Definition at line 991 of file kwin.cpp.

QString KWin::WindowInfo::visibleName (  )  const

Returns the visible name of the window (i.e.

including possible <2> appended when there are two or more windows with the same name). Requires NET::WMVisibleName passed to KWin::windowInfo().

Definition at line 968 of file kwin.cpp.

QString KWin::WindowInfo::visibleNameWithState (  )  const

Returns a visible name with state.

This is a simple convenience function that returns the visible name but with parentheses around minimized windows. Requires NET::WMVisibleName, NET::WMState and NET::XAWMState passed to KWin::windowInfo().

Returns:
the window name with state

Definition at line 948 of file kwin.cpp.

WId KWin::WindowInfo::win (  )  const

Returns the window identifier.

Definition at line 860 of file kwin.cpp.

QCString KWin::WindowInfo::windowClassClass (  )  const

Returns the class component of the window class for the window (i.e.

WM_CLASS property). Requires NET::WM2WindowClass passed to KWin::windowInfo().

Since:
3.3

Definition at line 1115 of file kwin.cpp.

QCString KWin::WindowInfo::windowClassName (  )  const

Returns the name component of the window class for the window (i.e.

WM_CLASS property). Requires NET::WM2WindowClass passed to KWin::windowInfo().

Since:
3.3

Definition at line 1126 of file kwin.cpp.

QCString KWin::WindowInfo::windowRole (  )  const

Returns the window role for the window (i.e.

WM_WINDOW_ROLE property). Requires NET::WM2WindowRole passed to KWin::windowInfo().

Since:
3.3

Definition at line 1137 of file kwin.cpp.

NET::WindowType KWin::WindowInfo::windowType ( int  supported_types  )  const

Returns the window type of this window (see NET::WindowType).

The argument should be all window types your application supports (see NET::WindowTypeMask). Requires NET::WMWindowType passed to KWin::windowInfo().

Definition at line 937 of file kwin.cpp.


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

KDECore

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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