• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • KWin
  • WindowInfo
Public Member Functions | List of all members
KWin::WindowInfo Class Reference

#include <twin.h>

Public Member Functions

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

Detailed Description

Information about a window.

Since
3.2

Definition at line 522 of file twin.h.

Constructor & Destructor Documentation

◆ WindowInfo() [1/3]

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

Reads all the info about the given window.

Definition at line 763 of file twin.cpp.

◆ WindowInfo() [2/3]

KWin::WindowInfo::WindowInfo ( )

Definition at line 815 of file twin.cpp.

◆ ~WindowInfo()

KWin::WindowInfo::~WindowInfo ( )

Definition at line 820 of file twin.cpp.

◆ WindowInfo() [3/3]

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

Definition at line 829 of file twin.cpp.

Member Function Documentation

◆ actionSupported()

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 1157 of file twin.cpp.

◆ clientMachine()

TQCString 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 1146 of file twin.cpp.

◆ desktop()

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 1058 of file twin.cpp.

◆ extendedStrut()

NETExtendedStrut KWin::WindowInfo::extendedStrut ( ) const

Returns the window extended (partial) strut.

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

Definition at line 885 of file twin.cpp.

◆ frameGeometry()

TQRect 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 1080 of file twin.cpp.

◆ geometry()

TQRect KWin::WindowInfo::geometry ( ) const

Returns the position and size of the window contents.

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

Definition at line 1069 of file twin.cpp.

◆ groupLeader()

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 1102 of file twin.cpp.

◆ hasState()

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 twin.h.

◆ iconName()

TQString 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 1014 of file twin.cpp.

◆ isMinimized()

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 TQWidget::isMinimized(). Requires NET::WMState and NET::XAWMState passed to KWin::windowInfo().

Definition at line 1170 of file twin.cpp.

◆ isOnCurrentDesktop()

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 1027 of file twin.cpp.

◆ isOnDesktop()

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 1036 of file twin.cpp.

◆ mappingState()

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 874 of file twin.cpp.

◆ name()

TQString 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 978 of file twin.cpp.

◆ onAllDesktops()

bool KWin::WindowInfo::onAllDesktops ( ) const

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

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

Definition at line 1047 of file twin.cpp.

◆ operator=()

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

Definition at line 836 of file twin.cpp.

◆ state()

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 863 of file twin.cpp.

◆ strut()

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

Definition at line 923 of file twin.cpp.

◆ transientFor()

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 1091 of file twin.cpp.

◆ valid()

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_validif true, windows in the withdrawn state (i.e. not managed) are also considered. This is usually not the case.

Definition at line 849 of file twin.cpp.

◆ visibleIconName()

TQString 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 999 of file twin.cpp.

◆ visibleIconNameWithState()

TQString 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 989 of file twin.cpp.

◆ visibleName()

TQString 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 966 of file twin.cpp.

◆ visibleNameWithState()

TQString 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 946 of file twin.cpp.

◆ win()

WId KWin::WindowInfo::win ( ) const

Returns the window identifier.

Definition at line 858 of file twin.cpp.

◆ windowClassClass()

TQCString 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 1113 of file twin.cpp.

◆ windowClassName()

TQCString 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 1124 of file twin.cpp.

◆ windowRole()

TQCString 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 1135 of file twin.cpp.

◆ windowType()

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 935 of file twin.cpp.


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

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.