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

KDEUI

kwindowsystem_mac.cpp
Go to the documentation of this file.
00001 /*
00002     This file is part of the KDE libraries
00003     Copyright (C) 2007 Laurent Montel (montel@kde.org)
00004     Copyright (C) 2008 Marijn Kruisselbrink (m.kruisselbrink@student.tue.nl)
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #include "kwindowsystem.h"
00023 #include "kwindowinfo_mac_p.h"
00024 
00025 #include <kiconloader.h>
00026 #include <klocale.h>
00027 #include <kxerrorhandler.h>
00028 #include <QtGui/QBitmap>
00029 #include <QDesktopWidget>
00030 #include <QtGui/QDialog>
00031 #include <QtDBus/QtDBus>
00032 #include <kdebug.h>
00033 
00034 #include <Carbon/Carbon.h>
00035 
00036 // Uncomment the following line to enable the experimental (and not fully functional) window tracking code. Without this
00037 // only the processes/applications are tracked, not the individual windows. This currently is quite broken as I can't
00038 // seem to be able to convince the build system to generate a mov file from both the public header file, and also for this
00039 // private class
00040 // #define EXPERIMENTAL_WINDOW_TRACKING
00041 
00042 static bool operator<(const ProcessSerialNumber& a, const ProcessSerialNumber& b)
00043 {
00044     if (a.lowLongOfPSN != b.lowLongOfPSN) return a.lowLongOfPSN < b.lowLongOfPSN;
00045     return a.highLongOfPSN < b.highLongOfPSN;
00046 }
00047 
00048 class KWindowSystemPrivate : QObject
00049 {
00050 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00051     Q_OBJECT
00052 #endif
00053 public:
00054     KWindowSystemPrivate();
00055 
00056     QMap<WId, KWindowInfo> windows;
00057     QList<WId> winids; // bah, because KWindowSystem::windows() returns a const reference, we need to keep this separate...
00058     QMap<pid_t, AXObserverRef> newWindowObservers;
00059     QMap<pid_t, AXObserverRef> windowClosedObservers;
00060     QMap<ProcessSerialNumber, WId> processes;
00061 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00062     QList<KWindowInfo> nonProcessedWindows;
00063 #endif
00064 
00065     EventTargetRef m_eventTarget;
00066     EventHandlerUPP m_eventHandler;
00067     EventTypeSpec m_eventType[2];
00068     EventHandlerRef m_curHandler;
00069 
00070     void applicationLaunched(const ProcessSerialNumber& psn);
00071     void applicationTerminated(const ProcessSerialNumber& psn);
00072 
00073     bool m_noEmit;
00074     bool waitingForTimer;
00075 
00076 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00077     void newWindow(AXUIElementRef element, void* windowInfoPrivate);
00078     void windowClosed(AXUIElementRef element, void* windowInfoPrivate);
00079 #endif
00080 
00081     static KWindowSystemPrivate* self() { return KWindowSystem::s_d_func(); }
00082 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00083 public slots:
00084     void tryRegisterProcess();
00085 #endif
00086 };
00087 
00088 class KWindowSystemStaticContainer {
00089 public:
00090     KWindowSystemStaticContainer() : d (new KWindowSystemPrivate) { }
00091     KWindowSystem kwm;
00092     KWindowSystemPrivate* d;
00093 };
00094 
00095 K_GLOBAL_STATIC(KWindowSystemStaticContainer, g_kwmInstanceContainer)
00096 
00097 static OSStatus applicationEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void * inUserData)
00098 {
00099     KWindowSystemPrivate* d = (KWindowSystemPrivate*) inUserData;
00100 
00101     UInt32 kind;
00102 
00103     kind = GetEventKind(inEvent);
00104     ProcessSerialNumber psn;
00105     if (GetEventParameter(inEvent, kEventParamProcessID, typeProcessSerialNumber, NULL, sizeof psn, NULL, &psn) != noErr) {
00106         kWarning() << "Error getting event parameter in application event";
00107         return eventNotHandledErr;
00108     }
00109 
00110     if (kind == kEventAppLaunched) {
00111         d->applicationLaunched(psn);
00112     } else if (kind == kEventAppTerminated) {
00113         d->applicationTerminated(psn);
00114     }
00115 
00116     return noErr;
00117 }
00118 
00119 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00120 static void windowClosedObserver(AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void* refcon)
00121 {
00122     KWindowSystemPrivate::self()->windowClosed(element, refcon);
00123 }
00124 
00125 static void newWindowObserver(AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void* refcon)
00126 {
00127     KWindowSystemPrivate::self()->newWindow(element, refcon);
00128 }
00129 #endif
00130 
00131 KWindowSystemPrivate::KWindowSystemPrivate()
00132     : QObject(0), m_noEmit(true), waitingForTimer(false)
00133 {
00134     // find all existing windows
00135     ProcessSerialNumber psn = {0, kNoProcess};
00136     while (GetNextProcess(&psn) == noErr) {
00137         kDebug(240) << "calling appLaunched for " << psn.lowLongOfPSN << ":" << psn.highLongOfPSN;
00138         applicationLaunched(psn);
00139     }
00140 
00141     m_noEmit = false;
00142 
00143 #ifdef Q_OS_MAC32
00144     // register callbacks for application launches/quits
00145     m_eventTarget = GetApplicationEventTarget();
00146     m_eventHandler = NewEventHandlerUPP(applicationEventHandler);
00147     m_eventType[0].eventClass = kEventClassApplication;
00148     m_eventType[0].eventKind = kEventAppLaunched;
00149     m_eventType[1].eventClass = kEventClassApplication;
00150     m_eventType[1].eventKind = kEventAppTerminated;
00151     if (InstallEventHandler(m_eventTarget, m_eventHandler, 2, m_eventType, this, &m_curHandler) != noErr) {
00152         kDebug(240) << "Installing event handler failed!\n";
00153     }
00154 #else
00155 #warning port me to Mac64
00156 #endif
00157 }
00158 
00159 void KWindowSystemPrivate::applicationLaunched(const ProcessSerialNumber& psn) {
00160 #ifdef Q_OS_MAC32
00161     kDebug(240) << "new app: " << psn.lowLongOfPSN << ":" << psn.highLongOfPSN;
00162     ProcessInfoRec pinfo;
00163     FSSpec appSpec;
00164     pinfo.processInfoLength = sizeof pinfo;
00165     pinfo.processName = 0;
00166     pinfo.processAppSpec = &appSpec;
00167     GetProcessInformation(&psn, &pinfo);
00168     if ((pinfo.processMode & modeOnlyBackground) != 0) return;
00169     // found a process, create a pseudo-window for it
00170 
00171     KWindowInfo winfo(0, 0);
00172     windows[winfo.win()] = winfo;
00173     winids.append(winfo.win());
00174     winfo.d->setProcessSerialNumber(psn);
00175     pid_t pid = winfo.d->pid();
00176     processes[psn] = winfo.win();
00177     kDebug(240) << "  pid:" << pid;
00178     AXUIElementRef app = AXUIElementCreateApplication(pid);
00179     winfo.d->setAxElement(app);
00180     if (!m_noEmit) emit KWindowSystem::self()->windowAdded(winfo.win());
00181 
00182 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00183     // create an observer and listen for new window events
00184     AXObserverRef observer, newObserver;
00185     OSStatus err;
00186     if (AXObserverCreate(pid, windowClosedObserver, &observer) == noErr) {
00187         CFRunLoopAddSource(CFRunLoopGetCurrent(), AXObserverGetRunLoopSource(observer), kCFRunLoopCommonModes);
00188         windowClosedObservers[pid] = observer;
00189     }
00190     if ((err = AXObserverCreate(pid, newWindowObserver, &newObserver)) == noErr) {
00191         CFRunLoopAddSource(CFRunLoopGetCurrent(), AXObserverGetRunLoopSource(newObserver), kCFRunLoopCommonModes);
00192         newWindowObservers[pid] = newObserver;
00193         if ((err = AXObserverAddNotification(newObserver, app, kAXWindowCreatedNotification, winfo.d)) != noErr) {
00194             kDebug(240) << "Error " << err << " adding notification to observer";
00195             // adding notifier failed, apparently app isn't responding to accesability messages yet
00196             // try it one more time later, and for now just return
00197             QTimer::singleShot(500, this, SLOT(tryRegisterProcess()));
00198             nonProcessedWindows.append(winfo);
00199             return;
00200         } else
00201             kDebug(240) << "Added notification and observer";
00202     } else {
00203         kDebug(240) << "Error creating observer";
00204     }
00205 
00206 
00207     CFIndex windowsInApp;
00208     AXUIElementGetAttributeValueCount(app, kAXWindowsAttribute, &windowsInApp);
00209     CFArrayRef array;
00210     AXUIElementCopyAttributeValue(app, kAXWindowsAttribute, (CFTypeRef*)&array);
00211     for (CFIndex j = 0; j < windowsInApp; j++) {
00212         AXUIElementRef win = (AXUIElementRef) CFArrayGetValueAtIndex(array, j);
00213         newWindow(win, winfo.d);
00214     }
00215 #endif
00216 #else
00217 #warning Port me to Mac64
00218 #endif
00219 }
00220 
00221 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00222 void KWindowSystemPrivate::tryRegisterProcess()
00223 {
00224     kDebug(240) << "Single-shot timer, trying to register processes";
00225     while (!nonProcessedWindows.empty()) {
00226         KWindowInfo winfo = nonProcessedWindows.takeLast();
00227         pid_t pid = winfo.d->pid();
00228         AXUIElementRef app = winfo.d->axElement();
00229         ProcessSerialNumber psn = winfo.d->psn();
00230 
00231         // create an observer and listen for new window events
00232         AXObserverRef observer;
00233         OSStatus err;
00234         observer = newWindowObservers[pid];
00235         if ((err = AXObserverAddNotification(observer, app, kAXWindowCreatedNotification, winfo.d)) != noErr) {
00236             kDebug(240) << "Error " << err << " adding notification to observer";
00237         } else
00238             kDebug(240) << "Added notification and observer";
00239 
00240         observer = windowClosedObservers[pid];
00241 
00242         CFIndex windowsInApp;
00243         AXUIElementGetAttributeValueCount(app, kAXWindowsAttribute, &windowsInApp);
00244         CFArrayRef array;
00245         AXUIElementCopyAttributeValue(app, kAXWindowsAttribute, (CFTypeRef*)&array);
00246         for (CFIndex j = 0; j < windowsInApp; j++) {
00247             AXUIElementRef win = (AXUIElementRef) CFArrayGetValueAtIndex(array, j);
00248             newWindow(win, winfo.d);
00249         }
00250     }
00251 }
00252 #endif
00253 
00254 void KWindowSystemPrivate::applicationTerminated(const ProcessSerialNumber& psn)
00255 {
00256     kDebug(240) << "Terminated PSN: " << psn.lowLongOfPSN << ":" << psn.highLongOfPSN;
00257     WId id = processes[psn];
00258     if (windows.contains(id)) {
00259         KWindowInfo winfo = windows[id];
00260         foreach (KWindowInfo::Private* wi, winfo.d->children) {
00261             winids.removeAll(wi->win);
00262             emit KWindowSystem::self()->windowRemoved(wi->win);
00263         }
00264         winids.removeAll(id);
00265         emit KWindowSystem::self()->windowRemoved(winfo.win());
00266     }
00267 }
00268 
00269 #ifdef EXPERIMENTAL_WINDOW_TRACKING
00270 void KWindowSystemPrivate::windowClosed(AXUIElementRef element, void* refcon)
00271 {
00272     kDebug(240) << "Received window closed notification";
00273 
00274     KWindowInfo::Private* wind = (KWindowInfo::Private*) refcon; // window being closed
00275     KWindowInfo::Private* parent = wind->parent;
00276     parent->children.removeAll(wind);
00277     winids.removeAll(wind->win);
00278     if (!m_noEmit) emit KWindowSystem::self()->windowRemoved(wind->win);
00279 }
00280 
00281 void KWindowSystemPrivate::newWindow(AXUIElementRef win, void* refcon)
00282 {
00283     kDebug(240) << "Received new window notification";
00284 
00285     KWindowInfo::Private* winfod = (KWindowInfo::Private*) refcon;
00286     pid_t pid = winfod->pid();
00287     ProcessSerialNumber psn = winfod->psn();
00288     AXObserverRef observer = windowClosedObservers[pid];
00289 
00290     KWindowInfo win2(0, 0);
00291     // listen for closed events for this window
00292     if (AXObserverAddNotification(observer, win, kAXUIElementDestroyedNotification, win2.d) != noErr) {
00293         // when we can't receive close events, the window should not be added
00294         kDebug(240) "error adding closed observer to window.";
00295         return;
00296     }
00297 
00298     windows[win2.win()] = win2;
00299     winids.append(win2.win());
00300     win2.d->setProcessSerialNumber(psn);
00301     win2.d->setAxElement(win);
00302     winfod->children.append(win2.d);
00303     win2.d->parent = winfod;
00304     if (!m_noEmit) emit KWindowSystem::self()->windowAdded(win2.win());
00305 }
00306 #endif
00307 
00308 KWindowSystem* KWindowSystem::self()
00309 {
00310     return &(g_kwmInstanceContainer->kwm);
00311 }
00312 
00313 KWindowSystemPrivate* KWindowSystem::s_d_func()
00314 {
00315     return g_kwmInstanceContainer->d;
00316 }
00317 
00318 const QList<WId>& KWindowSystem::windows()
00319 {
00320     KWindowSystemPrivate *d = KWindowSystem::s_d_func();
00321     return d->winids;
00322 }
00323 
00324 bool KWindowSystem::hasWId(WId id)
00325 {
00326     KWindowSystemPrivate *d = KWindowSystem::s_d_func();
00327     return d->windows.contains(id);
00328 }
00329 
00330 KWindowInfo KWindowSystem::windowInfo( WId win, unsigned long properties, unsigned long properties2 )
00331 {
00332     KWindowSystemPrivate *d = KWindowSystem::s_d_func();
00333     if (d->windows.contains(win)) {
00334         return d->windows[win];
00335     } else {
00336         return KWindowInfo( win, properties, properties2 );
00337     }
00338 }
00339 
00340 QList<WId> KWindowSystem::stackingOrder()
00341 {
00342     //TODO
00343     QList<WId> lst;
00344     kDebug(240) << "QList<WId> KWindowSystem::stackingOrder() isn't yet implemented!";
00345     return lst;
00346 }
00347 
00348 WId KWindowSystem::activeWindow()
00349 {
00350     //return something
00351     kDebug(240) << "WId KWindowSystem::activeWindow()   isn't yet implemented!";
00352     return 0;
00353 }
00354 
00355 void KWindowSystem::activateWindow( WId win, long time )
00356 {
00357     //TODO
00358     kDebug(240) << "KWindowSystem::activateWindow( WId win, long time )isn't yet implemented!";
00359     KWindowSystemPrivate *d = KWindowSystem::s_d_func();
00360     if (d->windows.contains(win)) {
00361         ProcessSerialNumber psn = d->windows[win].d->psn();
00362         SetFrontProcess(&psn);
00363     }
00364 }
00365 
00366 void KWindowSystem::forceActiveWindow( WId win, long time )
00367 {
00368     //TODO
00369     kDebug(240) << "KWindowSystem::forceActiveWindow( WId win, long time ) isn't yet implemented!";
00370     activateWindow(win, time);
00371 }
00372 
00373 void KWindowSystem::demandAttention( WId win, bool set )
00374 {
00375     //TODO
00376     kDebug(240) << "KWindowSystem::demandAttention( WId win, bool set ) isn't yet implemented!";
00377 }
00378 
00379 bool KWindowSystem::compositingActive()
00380 {
00381     return true;
00382 }
00383 
00384 int KWindowSystem::currentDesktop()
00385 {
00386     return 1;
00387 }
00388 
00389 int KWindowSystem::numberOfDesktops()
00390 {
00391     return 1;
00392 }
00393 
00394 void KWindowSystem::setCurrentDesktop( int desktop )
00395 {
00396     kDebug(240) << "KWindowSystem::setCurrentDesktop( int desktop ) isn't yet implemented!";
00397     //TODO
00398 }
00399 
00400 void KWindowSystem::setOnAllDesktops( WId win, bool b )
00401 {
00402     kDebug(240) << "KWindowSystem::setOnAllDesktops( WId win, bool b ) isn't yet implemented!";
00403     //TODO
00404 }
00405 
00406 void KWindowSystem::setOnDesktop( WId win, int desktop )
00407 {
00408     //TODO
00409     kDebug(240) << "KWindowSystem::setOnDesktop( WId win, int desktop ) isn't yet implemented!";
00410 }
00411 
00412 void KWindowSystem::setMainWindow( QWidget* subwindow, WId id )
00413 {
00414     kDebug(240) << "KWindowSystem::setMainWindow( QWidget*, WId ) isn't yet implemented!";
00415     //TODO
00416 }
00417 
00418 QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale )
00419 {
00420     if (hasWId(win)) {
00421         KWindowInfo info = windowInfo(win, 0);
00422         if (!info.d->loadedData) {
00423             info.d->updateData();
00424         }
00425         IconRef icon;
00426         SInt16 label;
00427 #ifdef Q_OS_MAC32
00428         OSErr err = GetIconRefFromFile(&info.d->iconSpec, &icon, &label);
00429 #else
00430         OSStatus err = GetIconRefFromFileInfo(&info.d->iconSpec, 0, 0,
00431                 kIconServicesCatalogInfoMask, 0, kIconServicesNormalUsageFlag, &icon, &label);
00432 #endif
00433         if (err != noErr) {
00434             kDebug(240) << "Error getting icon from application";
00435             return QPixmap();
00436         } else {
00437             QPixmap ret(width, height);
00438             ret.fill(QColor(0, 0, 0, 0));
00439 
00440             CGRect rect = CGRectMake(0, 0, width, height);
00441 
00442             CGContextRef ctx = qt_mac_cg_context(&ret);
00443             CGAffineTransform old_xform = CGContextGetCTM(ctx);
00444             CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform));
00445             CGContextConcatCTM(ctx, CGAffineTransformIdentity);
00446 
00447             ::RGBColor b;
00448             b.blue = b.green = b.red = 255*255;
00449             PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon);
00450             CGContextRelease(ctx);
00451 
00452             ReleaseIconRef(icon);
00453             return ret;
00454         }
00455     } else {
00456         kDebug(240) << "QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale ) isn't yet implemented for local windows!";
00457         return QPixmap();
00458     }
00459 }
00460 
00461 QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale, int flags )
00462 {
00463     return icon(win, width, height, scale);
00464 //    kDebug(240) << "QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale, int flags ) isn't yet implemented!";
00465 }
00466 
00467 void KWindowSystem::setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon )
00468 {
00469     //TODO
00470     kDebug(240) << "KWindowSystem::setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon ) isn't yet implemented!";
00471 }
00472 
00473 void KWindowSystem::setType( WId winid, NET::WindowType windowType )
00474 {
00475 #ifdef Q_OS_MAC32
00476     // not supported for 'global' windows; only for windows in the current process
00477     if (hasWId(winid)) return;
00478 
00479     static WindowGroupRef desktopGroup = 0;
00480     static WindowGroupRef dockGroup = 0;
00481 
00482     WindowRef win = HIViewGetWindow( (HIViewRef) winid );
00483     //TODO: implement other types than Desktop and Dock
00484     if (windowType != NET::Desktop && windowType != NET::Dock) {
00485         kDebug(240) << "setType( WId win, NET::WindowType windowType ) isn't yet implemented for the type you requested!";
00486     }
00487     if (windowType == NET::Desktop) {
00488         if (!desktopGroup) {
00489             CreateWindowGroup(0, &desktopGroup);
00490             SetWindowGroupLevel(desktopGroup, kCGDesktopIconWindowLevel);
00491         }
00492         SetWindowGroup(win, desktopGroup);
00493     } else if (windowType == NET::Dock) {
00494         if (!dockGroup) {
00495             CreateWindowGroup(0, &dockGroup);
00496             SetWindowGroupLevel(dockGroup, kCGDockWindowLevel);
00497         }
00498         SetWindowGroup(win, dockGroup);
00499         ChangeWindowAttributes(win, kWindowNoTitleBarAttribute, kWindowNoAttributes);
00500     }
00501 #else
00502 #warning port me to Mac64
00503 #endif
00504 }
00505 
00506 void KWindowSystem::setState( WId win, unsigned long state )
00507 {
00508    //TODO
00509    kDebug(240) << "KWindowSystem::setState( WId win, unsigned long state ) isn't yet implemented!";
00510 }
00511 
00512 void KWindowSystem::clearState( WId win, unsigned long state )
00513 {
00514     //TODO
00515     kDebug(240) << "KWindowSystem::clearState( WId win, unsigned long state ) isn't yet implemented!";
00516 }
00517 
00518 void KWindowSystem::minimizeWindow( WId win, bool animation)
00519 {
00520      //TODO
00521      kDebug(240) << "KWindowSystem::minimizeWindow( WId win, bool animation) isn't yet implemented!";
00522 }
00523 
00524 void KWindowSystem::unminimizeWindow( WId win, bool animation )
00525 {
00526      //TODO
00527      kDebug(240) << "KWindowSystem::unminimizeWindow( WId win, bool animation ) isn't yet implemented!";
00528 }
00529 
00530 void KWindowSystem::raiseWindow( WId win )
00531 {
00532      //TODO
00533      kDebug(240) << "KWindowSystem::raiseWindow( WId win ) isn't yet implemented!";
00534 }
00535 
00536 void KWindowSystem::lowerWindow( WId win )
00537 {
00538      //TODO
00539      kDebug(240) << "KWindowSystem::lowerWindow( WId win ) isn't yet implemented!";
00540 }
00541 
00542 bool KWindowSystem::icccmCompliantMappingState()
00543 {
00544     return false;
00545 }
00546 
00547 QRect KWindowSystem::workArea( int desktop )
00548 {
00549     //TODO
00550     kDebug(240) << "QRect KWindowSystem::workArea( int desktop ) isn't yet implemented!";
00551     return QRect();
00552 }
00553 
00554 QRect KWindowSystem::workArea( const QList<WId>& exclude, int desktop )
00555 {
00556     //TODO
00557     kDebug(240) << "QRect KWindowSystem::workArea( const QList<WId>& exclude, int desktop ) isn't yet implemented!";
00558     return QRect();
00559 }
00560 
00561 QString KWindowSystem::desktopName( int desktop )
00562 {
00563     return i18n("Desktop %1",  desktop );
00564 }
00565 
00566 void KWindowSystem::setDesktopName( int desktop, const QString& name )
00567 {
00568      kDebug(240) << "KWindowSystem::setDesktopName( int desktop, const QString& name ) isn't yet implemented!";
00569     //TODO
00570 }
00571 
00572 bool KWindowSystem::showingDesktop()
00573 {
00574     return false;
00575 }
00576 
00577 void KWindowSystem::setUserTime( WId win, long time )
00578 {
00579     kDebug(240) << "KWindowSystem::setUserTime( WId win, long time ) isn't yet implemented!";
00580     //TODO
00581 }
00582 
00583 void KWindowSystem::setExtendedStrut( WId win, int left_width, int left_start, int left_end,
00584                                       int right_width, int right_start, int right_end, int top_width, int top_start, int top_end,
00585                                       int bottom_width, int bottom_start, int bottom_end )
00586 {
00587     kDebug(240) << "KWindowSystem::setExtendedStrut isn't yet implemented!";
00588     //TODO
00589 }
00590 
00591 void KWindowSystem::setStrut( WId win, int left, int right, int top, int bottom )
00592 {
00593     kDebug(240) << "KWindowSystem::setStrut isn't yet implemented!";
00594     //TODO
00595 }
00596 
00597 bool KWindowSystem::allowedActionsSupported()
00598 {
00599     return false;
00600 }
00601 
00602 QString KWindowSystem::readNameProperty( WId window, unsigned long atom )
00603 {
00604     //TODO
00605     kDebug(240) << "QString KWindowSystem::readNameProperty( WId window, unsigned long atom ) isn't yet implemented!";
00606     return QString();
00607 }
00608 
00609 void KWindowSystem::doNotManage( const QString& title )
00610 {
00611     //TODO
00612     kDebug(240) << "KWindowSystem::doNotManage( const QString& title ) isn't yet implemented!";
00613 }
00614 
00615 
00616 void KWindowSystem::connectNotify( const char* signal )
00617 {
00618     kDebug(240) << "connectNotify( const char* signal )  isn't yet implemented!";
00619     //TODO
00620 }
00621 
00622 void KWindowSystem::allowExternalProcessWindowActivation( int pid )
00623 {
00624     // Needed on mac ?
00625 }
00626 
00627 void KWindowSystem::setBlockingCompositing( WId window, bool active )
00628 {
00629     //TODO
00630     kDebug() << "setBlockingCompositing( WId window, bool active ) isn't yet implemented!";
00631 }
00632 
00633 #include "moc_kwindowsystem.cpp"

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

Skip menu "kdelibs"
  • 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
Generated for kdelibs by doxygen 1.7.5
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