• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • windowmanagement
kwindowsystem_qws.cpp
Go to the documentation of this file.
1/*
2 This file is part of the KDE libraries
3 Copyright (C) 2007 Laurent Montel (montel@kde.org)
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include "kwindowsystem.h"
22
23#include <kiconloader.h>
24#include <klocale.h>
25#include <kxerrorhandler.h>
26#include <QtGui/QBitmap>
27#include <QDesktopWidget>
28#include <QtGui/QDialog>
29#include <QtDBus/QtDBus>
30#include <kdebug.h>
31
32class KWindowSystemStaticContainer {
33public:
34 KWindowSystemStaticContainer() : d(0) {}
35 KWindowSystem kwm;
36 KWindowSystemPrivate* d;
37};
38
39K_GLOBAL_STATIC(KWindowSystemStaticContainer, g_kwmInstanceContainer)
40
41KWindowSystem* KWindowSystem::self()
42{
43 return &(g_kwmInstanceContainer->kwm);
44}
45
46int KWindowSystem::currentDesktop()
47{
48 return 1;
49}
50
51int KWindowSystem::numberOfDesktops()
52{
53 return 1;
54}
55
56void KWindowSystem::setCurrentDesktop( int desktop )
57{
58 kDebug() << "KWindowSystem::setCurrentDesktop( int desktop ) isn't yet implemented!";
59 //TODO
60}
61
62void KWindowSystem::setOnAllDesktops( WId win, bool b )
63{
64 kDebug() << "KWindowSystem::setOnAllDesktops( WId win, bool b ) isn't yet implemented!";
65 //TODO
66}
67
68void KWindowSystem::setOnDesktop( WId win, int desktop )
69{
70 //TODO
71 kDebug() << "KWindowSystem::setOnDesktop( WId win, int desktop ) isn't yet implemented!";
72}
73
74WId KWindowSystem::activeWindow()
75{
76 //return something
77 kDebug() << "WId KWindowSystem::activeWindow() isn't yet implemented!";
78 return 0;
79}
80
81void KWindowSystem::activateWindow( WId win, long time )
82{
83 //TODO
84 kDebug() << "KWindowSystem::activateWindow( WId win, long time )isn't yet implemented!";
85}
86
87void KWindowSystem::forceActiveWindow( WId win, long time )
88{
89 //TODO
90 kDebug() << "KWindowSystem::forceActiveWindow( WId win, long time ) isn't yet implemented!";
91}
92
93void KWindowSystem::demandAttention( WId win, bool set )
94{
95 //TODO
96 kDebug() << "KWindowSystem::demandAttention( WId win, bool set ) isn't yet implemented!";
97}
98
99QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale )
100{
101 kDebug() << "QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale ) isn't yet implemented!";
102 return QPixmap();
103}
104
105
106QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale, int flags )
107{
108 kDebug() << "QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale, int flags ) isn't yet implemented!";
109 return QPixmap();
110}
111
112void KWindowSystem::setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon )
113{
114 //TODO
115 kDebug() << "KWindowSystem::setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon ) isn't yet implemented!";
116}
117
118
119void KWindowSystem::setState( WId win, unsigned long state )
120{
121 //TODO
122 kDebug() << "KWindowSystem::setState( WId win, unsigned long state ) isn't yet implemented!";
123}
124
125void KWindowSystem::clearState( WId win, unsigned long state )
126{
127 //TODO
128 kDebug() << "KWindowSystem::clearState( WId win, unsigned long state ) isn't yet implemented!";
129}
130
131void KWindowSystem::minimizeWindow( WId win, bool animation)
132{
133 //TODO
134 kDebug() << "KWindowSystem::minimizeWindow( WId win, bool animation) isn't yet implemented!";
135}
136
137void KWindowSystem::unminimizeWindow( WId win, bool animation )
138{
139 //TODO
140 kDebug() << "KWindowSystem::unminimizeWindow( WId win, bool animation ) isn't yet implemented!";
141}
142
143void KWindowSystem::raiseWindow( WId win )
144{
145 //TODO
146 kDebug() << "KWindowSystem::raiseWindow( WId win ) isn't yet implemented!";
147}
148
149void KWindowSystem::lowerWindow( WId win )
150{
151 //TODO
152 kDebug() << "KWindowSystem::lowerWindow( WId win ) isn't yet implemented!";
153}
154
155bool KWindowSystem::compositingActive()
156{
157 return false;
158}
159
160QRect KWindowSystem::workArea( int desktop )
161{
162 //TODO
163 kDebug() << "QRect KWindowSystem::workArea( int desktop ) isn't yet implemented!";
164 return QRect();
165}
166
167QRect KWindowSystem::workArea( const QList<WId>& exclude, int desktop )
168{
169 //TODO
170 kDebug() << "QRect KWindowSystem::workArea( const QList<WId>& exclude, int desktop ) isn't yet implemented!";
171 return QRect();
172}
173
174QString KWindowSystem::desktopName( int desktop )
175{
176 return i18n("Desktop %1", desktop );
177}
178
179void KWindowSystem::setDesktopName( int desktop, const QString& name )
180{
181 kDebug() << "KWindowSystem::setDesktopName( int desktop, const QString& name ) isn't yet implemented!";
182 //TODO
183}
184
185bool KWindowSystem::showingDesktop()
186{
187 return false;
188}
189
190void KWindowSystem::setUserTime( WId win, long time )
191{
192 kDebug() << "KWindowSystem::setUserTime( WId win, long time ) isn't yet implemented!";
193 //TODO
194}
195
196bool KWindowSystem::icccmCompliantMappingState()
197{
198 return false;
199}
200
201void KWindowSystem::connectNotify( const char* signal )
202{
203 kDebug() << "connectNotify( const char* signal ) isn't yet implemented!";
204//TODO
205}
206
207void KWindowSystem::setExtendedStrut( WId win, int left_width, int left_start, int left_end,
208 int right_width, int right_start, int right_end, int top_width, int top_start, int top_end,
209 int bottom_width, int bottom_start, int bottom_end )
210{
211 kDebug() << "KWindowSystem::setExtendedStrut isn't yet implemented!";
212 //TODO
213}
214void KWindowSystem::setStrut( WId win, int left, int right, int top, int bottom )
215{
216 kDebug() << "KWindowSystem::setStrut isn't yet implemented!";
217 //TODO
218}
219
220QString KWindowSystem::readNameProperty( WId window, unsigned long atom )
221{
222 //TODO
223 kDebug() << "QString KWindowSystem::readNameProperty( WId window, unsigned long atom ) isn't yet implemented!";
224 return QString();
225}
226
227void KWindowSystem::doNotManage( const QString& title )
228{
229 //TODO
230 kDebug() << "KWindowSystem::doNotManage( const QString& title ) isn't yet implemented!";
231}
232
233QList<WId> KWindowSystem::stackingOrder()
234{
235 //TODO
236 QList<WId> lst;
237 kDebug() << "QList<WId> KWindowSystem::stackingOrder() isn't yet implemented!";
238 return lst;
239}
240
241const QList<WId>& KWindowSystem::windows()
242{
243 //TODO
244 static QList<WId> lst;
245 kDebug() << "const QList<WId>& KWindowSystem::windows() isn't yet implemented!";
246 return lst;
247}
248
249void KWindowSystem::setType( WId win, NET::WindowType windowType )
250{
251 //TODO
252 kDebug() << "setType( WId win, NET::WindowType windowType ) isn't yet implemented!";
253}
254
255void KWindowSystem::setMainWindow( QWidget* subwindow, WId id )
256{
257 //TODO
258 kDebug(240) << "KWindowSystem::setMainWindow( QWidget*, WId ) isn't yet implemented!";
259}
260
261void KWindowSystem::allowExternalProcessWindowActivation( int pid )
262{
263 // TODO
264 kDebug() << "KWindowSystem::allowExternalProcessWindowActivation( int pid ) isn't yet implemented!";
265}
266
267void KWindowSystem::setBlockingCompositing( WId window, bool active )
268{
269 //TODO
270 kDebug() << "setBlockingCompositing( WId window, bool active ) isn't yet implemented!";
271}
272
273#include "kwindowsystem.moc"
274
KWindowSystem
Convenience access to certain properties and features of the window manager.
Definition: kwindowsystem.h:56
KWindowSystem::setType
static void setType(WId win, NET::WindowType windowType)
Sets the type of window win to windowType.
Definition: kwindowsystem_mac.cpp:473
KWindowSystem::setOnDesktop
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition: kwindowsystem_mac.cpp:406
KWindowSystem::setDesktopName
static void setDesktopName(int desktop, const QString &name)
Sets the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:566
KWindowSystem::setState
static void setState(WId win, unsigned long state)
Sets the state of window win to state.
Definition: kwindowsystem_mac.cpp:506
KWindowSystem::setOnAllDesktops
static void setOnAllDesktops(WId win, bool b)
Sets window win to be present on all virtual desktops if is true.
Definition: kwindowsystem_mac.cpp:400
KWindowSystem::allowExternalProcessWindowActivation
static void allowExternalProcessWindowActivation(int pid=-1)
Allows a window from another process to raise and activate itself.
Definition: kwindowsystem_mac.cpp:622
KWindowSystem::setMainWindow
static void setMainWindow(QWidget *subwindow, WId mainwindow)
Sets the parent window of subwindow to be mainwindow.
Definition: kwindowsystem_mac.cpp:412
KWindowSystem::stackingOrder
static QList< WId > stackingOrder()
Returns the list of all toplevel windows currently managed by the window manager in the current stack...
Definition: kwindowsystem_mac.cpp:340
KWindowSystem::setExtendedStrut
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)
Sets the strut of window win to to left width ranging from left_start to left_end on the left edge,...
Definition: kwindowsystem_mac.cpp:583
KWindowSystem::windows
static const QList< WId > & windows()
Returns the list of all toplevel windows currently managed by the window manager in the order of crea...
Definition: kwindowsystem_mac.cpp:318
KWindowSystem::doNotManage
static void doNotManage(const QString &title)
Informs kwin via dbus to not manage a window with the specified title.
Definition: kwindowsystem_mac.cpp:609
KWindowSystem::connectNotify
virtual void connectNotify(const char *signal)
Definition: kwindowsystem_mac.cpp:616
KWindowSystem::setBlockingCompositing
static void setBlockingCompositing(WId window, bool active)
Sets whether the client wishes to block compositing (for better performance)
Definition: kwindowsystem_mac.cpp:627
KWindowSystem::activateWindow
static void activateWindow(WId win, long time=0)
Requests that window win is activated.
Definition: kwindowsystem_mac.cpp:355
KWindowSystem::currentDesktop
static int currentDesktop()
Returns the current virtual desktop.
Definition: kwindowsystem_mac.cpp:384
KWindowSystem::setUserTime
static void setUserTime(WId win, long time)
Sets user timestamp time on window win.
Definition: kwindowsystem_mac.cpp:577
KWindowSystem::compositingActive
static bool compositingActive()
Returns true if a compositing manager is running (i.e.
Definition: kwindowsystem_mac.cpp:379
KWindowSystem::setIcons
static void setIcons(WId win, const QPixmap &icon, const QPixmap &miniIcon)
Sets an icon and a miniIcon on window win.
Definition: kwindowsystem_mac.cpp:467
KWindowSystem::readNameProperty
static QString readNameProperty(WId window, unsigned long atom)
Function that reads and returns the contents of the given text property (WM_NAME, WM_ICON_NAME,...
Definition: kwindowsystem_mac.cpp:602
KWindowSystem::clearState
static void clearState(WId win, unsigned long state)
Clears the state of window win from state.
Definition: kwindowsystem_mac.cpp:512
KWindowSystem::icccmCompliantMappingState
static bool icccmCompliantMappingState()
Definition: kwindowsystem_mac.cpp:542
KWindowSystem::desktopName
static QString desktopName(int desktop)
Returns the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:561
KWindowSystem::workArea
static QRect workArea(int desktop=- 1)
Returns the workarea for the specified desktop, or the current work area if no desktop has been speci...
Definition: kwindowsystem_mac.cpp:547
KWindowSystem::minimizeWindow
static void minimizeWindow(WId win, bool animation=true)
Iconifies a window.
Definition: kwindowsystem_mac.cpp:518
KWindowSystem::setCurrentDesktop
static void setCurrentDesktop(int desktop)
Convenience function to set the current desktop to desktop.
Definition: kwindowsystem_mac.cpp:394
KWindowSystem::icon
static QPixmap icon(WId win, int width=-1, int height=-1, bool scale=false)
Returns an icon for window win.
Definition: kwindowsystem_mac.cpp:418
KWindowSystem::activeWindow
static WId activeWindow()
Returns the currently active window, or 0 if no window is active.
Definition: kwindowsystem_mac.cpp:348
KWindowSystem::unminimizeWindow
static void unminimizeWindow(WId win, bool animation=true)
DeIconifies a window.
Definition: kwindowsystem_mac.cpp:524
KWindowSystem::showingDesktop
static bool showingDesktop()
Returns the state of showing the desktop.
Definition: kwindowsystem_mac.cpp:572
KWindowSystem::forceActiveWindow
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
KWindowSystem::numberOfDesktops
static int numberOfDesktops()
Returns the number of virtual desktops.
Definition: kwindowsystem_mac.cpp:389
KWindowSystem::demandAttention
static void demandAttention(WId win, bool set=true)
When application finishes some operation and wants to notify the user about it, it can call demandAtt...
Definition: kwindowsystem_mac.cpp:373
KWindowSystem::self
static KWindowSystem * self()
Access to the singleton instance.
Definition: kwindowsystem_mac.cpp:308
KWindowSystem::setStrut
static void setStrut(WId win, int left, int right, int top, int bottom)
Convenience function for setExtendedStrut() that automatically makes struts as wide/high as the scree...
Definition: kwindowsystem_mac.cpp:591
KWindowSystem::raiseWindow
static void raiseWindow(WId win)
Raises the given window.
Definition: kwindowsystem_mac.cpp:530
KWindowSystem::lowerWindow
static void lowerWindow(WId win)
Lowers the given window.
Definition: kwindowsystem_mac.cpp:536
NET::WindowType
WindowType
Window type.
Definition: netwm_def.h:305
QList
QWidget
K_GLOBAL_STATIC
#define K_GLOBAL_STATIC(TYPE, NAME)
kDebug
#define kDebug
kdebug.h
kiconloader.h
klocale.h
i18n
QString i18n(const char *text)
kwindowsystem.h
kxerrorhandler.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal