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

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • 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 
32 class KWindowSystemStaticContainer {
33 public:
34  KWindowSystemStaticContainer() : d(0) {}
35  KWindowSystem kwm;
36  KWindowSystemPrivate* d;
37 };
38 
39 K_GLOBAL_STATIC(KWindowSystemStaticContainer, g_kwmInstanceContainer)
40 
41 KWindowSystem* KWindowSystem::self()
42 {
43  return &(g_kwmInstanceContainer->kwm);
44 }
45 
46 int KWindowSystem::currentDesktop()
47 {
48  return 1;
49 }
50 
51 int KWindowSystem::numberOfDesktops()
52 {
53  return 1;
54 }
55 
56 void KWindowSystem::setCurrentDesktop( int desktop )
57 {
58  kDebug() << "KWindowSystem::setCurrentDesktop( int desktop ) isn't yet implemented!";
59  //TODO
60 }
61 
62 void KWindowSystem::setOnAllDesktops( WId win, bool b )
63 {
64  kDebug() << "KWindowSystem::setOnAllDesktops( WId win, bool b ) isn't yet implemented!";
65  //TODO
66 }
67 
68 void KWindowSystem::setOnDesktop( WId win, int desktop )
69 {
70  //TODO
71  kDebug() << "KWindowSystem::setOnDesktop( WId win, int desktop ) isn't yet implemented!";
72 }
73 
74 WId KWindowSystem::activeWindow()
75 {
76  //return something
77  kDebug() << "WId KWindowSystem::activeWindow() isn't yet implemented!";
78  return 0;
79 }
80 
81 void KWindowSystem::activateWindow( WId win, long time )
82 {
83  //TODO
84  kDebug() << "KWindowSystem::activateWindow( WId win, long time )isn't yet implemented!";
85 }
86 
87 void KWindowSystem::forceActiveWindow( WId win, long time )
88 {
89  //TODO
90  kDebug() << "KWindowSystem::forceActiveWindow( WId win, long time ) isn't yet implemented!";
91 }
92 
93 void KWindowSystem::demandAttention( WId win, bool set )
94 {
95  //TODO
96  kDebug() << "KWindowSystem::demandAttention( WId win, bool set ) isn't yet implemented!";
97 }
98 
99 QPixmap 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 
106 QPixmap 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 
112 void 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 
119 void 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 
125 void 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 
131 void KWindowSystem::minimizeWindow( WId win, bool animation)
132 {
133  //TODO
134  kDebug() << "KWindowSystem::minimizeWindow( WId win, bool animation) isn't yet implemented!";
135 }
136 
137 void KWindowSystem::unminimizeWindow( WId win, bool animation )
138 {
139  //TODO
140  kDebug() << "KWindowSystem::unminimizeWindow( WId win, bool animation ) isn't yet implemented!";
141 }
142 
143 void KWindowSystem::raiseWindow( WId win )
144 {
145  //TODO
146  kDebug() << "KWindowSystem::raiseWindow( WId win ) isn't yet implemented!";
147 }
148 
149 void KWindowSystem::lowerWindow( WId win )
150 {
151  //TODO
152  kDebug() << "KWindowSystem::lowerWindow( WId win ) isn't yet implemented!";
153 }
154 
155 bool KWindowSystem::compositingActive()
156 {
157  return false;
158 }
159 
160 QRect KWindowSystem::workArea( int desktop )
161 {
162  //TODO
163  kDebug() << "QRect KWindowSystem::workArea( int desktop ) isn't yet implemented!";
164  return QRect();
165 }
166 
167 QRect 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 
174 QString KWindowSystem::desktopName( int desktop )
175 {
176  return i18n("Desktop %1", desktop );
177 }
178 
179 void 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 
185 bool KWindowSystem::showingDesktop()
186 {
187  return false;
188 }
189 
190 void KWindowSystem::setUserTime( WId win, long time )
191 {
192  kDebug() << "KWindowSystem::setUserTime( WId win, long time ) isn't yet implemented!";
193  //TODO
194 }
195 
196 bool KWindowSystem::icccmCompliantMappingState()
197 {
198  return false;
199 }
200 
201 void KWindowSystem::connectNotify( const char* signal )
202 {
203  kDebug() << "connectNotify( const char* signal ) isn't yet implemented!";
204 //TODO
205 }
206 
207 void 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 }
214 void 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 
220 QString 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 
227 void KWindowSystem::doNotManage( const QString& title )
228 {
229  //TODO
230  kDebug() << "KWindowSystem::doNotManage( const QString& title ) isn't yet implemented!";
231 }
232 
233 QList<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 
241 const 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 
249 void KWindowSystem::setType( WId win, NET::WindowType windowType )
250 {
251  //TODO
252  kDebug() << "setType( WId win, NET::WindowType windowType ) isn't yet implemented!";
253 }
254 
255 void KWindowSystem::setMainWindow( QWidget* subwindow, WId id )
256 {
257  //TODO
258  kDebug(240) << "KWindowSystem::setMainWindow( QWidget*, WId ) isn't yet implemented!";
259 }
260 
261 void KWindowSystem::allowExternalProcessWindowActivation( int pid )
262 {
263  // TODO
264  kDebug() << "KWindowSystem::allowExternalProcessWindowActivation( int pid ) isn't yet implemented!";
265 }
266 
267 void 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::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
i18n
QString i18n(const char *text)
KWindowSystem::lowerWindow
static void lowerWindow(WId win)
Lowers the given window.
Definition: kwindowsystem_mac.cpp:536
kdebug.h
KWindowSystem::desktopName
static QString desktopName(int desktop)
Returns the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:561
KWindowSystem
Convenience access to certain properties and features of the window manager.
Definition: kwindowsystem.h:55
KWindowSystem::setOnDesktop
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition: kwindowsystem_mac.cpp:406
K_GLOBAL_STATIC
#define K_GLOBAL_STATIC(TYPE, NAME)
QWidget
KStandardAction::name
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
kiconloader.h
KWindowSystem::setUserTime
static void setUserTime(WId win, long time)
Sets user timestamp time on window win.
Definition: kwindowsystem_mac.cpp:577
QString
KWindowSystem::raiseWindow
static void raiseWindow(WId win)
Raises the given window.
Definition: kwindowsystem_mac.cpp:530
KWindowSystem::forceActiveWindow
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
KWindowSystem::setType
static void setType(WId win, NET::WindowType windowType)
Sets the type of window win to windowType.
Definition: kwindowsystem_mac.cpp:473
KWindowSystem::clearState
static void clearState(WId win, unsigned long state)
Clears the state of window win from state.
Definition: kwindowsystem_mac.cpp:512
kDebug
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
klocale.h
KWindowSystem::connectNotify
virtual void connectNotify(const char *signal)
Definition: kwindowsystem_mac.cpp:616
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::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::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::activeWindow
static WId activeWindow()
Returns the currently active window, or 0 if no window is active.
Definition: kwindowsystem_mac.cpp:348
KWindowSystem::minimizeWindow
static void minimizeWindow(WId win, bool animation=true)
Iconifies a window.
Definition: kwindowsystem_mac.cpp:518
NET::WindowType
WindowType
Window type.
Definition: netwm_def.h:305
KWindowSystem::icccmCompliantMappingState
static bool icccmCompliantMappingState()
Definition: kwindowsystem_mac.cpp:542
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::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::unminimizeWindow
static void unminimizeWindow(WId win, bool animation=true)
DeIconifies a window.
Definition: kwindowsystem_mac.cpp:524
kxerrorhandler.h
KWindowSystem::setCurrentDesktop
static void setCurrentDesktop(int desktop)
Convenience function to set the current desktop to desktop.
Definition: kwindowsystem_mac.cpp:394
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::setState
static void setState(WId win, unsigned long state)
Sets the state of window win to state.
Definition: kwindowsystem_mac.cpp:506
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::setMainWindow
static void setMainWindow(QWidget *subwindow, WId mainwindow)
Sets the parent window of subwindow to be mainwindow.
Definition: kwindowsystem_mac.cpp:412
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::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::showingDesktop
static bool showingDesktop()
Returns the state of showing the desktop.
Definition: kwindowsystem_mac.cpp:572
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::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::numberOfDesktops
static int numberOfDesktops()
Returns the number of virtual desktops.
Definition: kwindowsystem_mac.cpp:389
QRect
KWindowSystem::compositingActive
static bool compositingActive()
Returns true if a compositing manager is running (i.e.
Definition: kwindowsystem_mac.cpp:379
kwindowsystem.h
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::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
QList< WId >
KWindowSystem::setDesktopName
static void setDesktopName(int desktop, const QString &name)
Sets the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:566
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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