KDEUI
kwindowsystem_mac.cpp
Go to the documentation of this file.
36 // Uncomment the following line to enable the experimental (and not fully functional) window tracking code. Without this
37 // only the processes/applications are tracked, not the individual windows. This currently is quite broken as I can't
38 // seem to be able to convince the build system to generate a mov file from both the public header file, and also for this
57 QList<WId> winids; // bah, because KWindowSystem::windows() returns a const reference, we need to keep this separate...
97 static OSStatus applicationEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void * inUserData)
105 if (GetEventParameter(inEvent, kEventParamProcessID, typeProcessSerialNumber, NULL, sizeof psn, NULL, &psn) != noErr) {
120 static void windowClosedObserver(AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void* refcon)
125 static void newWindowObserver(AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void* refcon)
151 if (InstallEventHandler(m_eventTarget, m_eventHandler, 2, m_eventType, this, &m_curHandler) != noErr) {
187 CFRunLoopAddSource(CFRunLoopGetCurrent(), AXObserverGetRunLoopSource(observer), kCFRunLoopCommonModes);
191 CFRunLoopAddSource(CFRunLoopGetCurrent(), AXObserverGetRunLoopSource(newObserver), kCFRunLoopCommonModes);
193 if ((err = AXObserverAddNotification(newObserver, app, kAXWindowCreatedNotification, winfo.d)) != noErr) {
235 if ((err = AXObserverAddNotification(observer, app, kAXWindowCreatedNotification, winfo.d)) != noErr) {
292 if (AXObserverAddNotification(observer, win, kAXUIElementDestroyedNotification, win2.d) != noErr) {
330 KWindowInfo KWindowSystem::windowInfo( WId win, unsigned long properties, unsigned long properties2 )
449 PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon);
456 kDebug(240) << "QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale ) isn't yet implemented for local windows!";
464 // kDebug(240) << "QPixmap KWindowSystem::icon( WId win, int width, int height, bool scale, int flags ) isn't yet implemented!";
470 kDebug(240) << "KWindowSystem::setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon ) isn't yet implemented!";
485 kDebug(240) << "setType( WId win, NET::WindowType windowType ) isn't yet implemented for the type you requested!";
509 kDebug(240) << "KWindowSystem::setState( WId win, unsigned long state ) isn't yet implemented!";
515 kDebug(240) << "KWindowSystem::clearState( WId win, unsigned long state ) isn't yet implemented!";
521 kDebug(240) << "KWindowSystem::minimizeWindow( WId win, bool animation) isn't yet implemented!";
527 kDebug(240) << "KWindowSystem::unminimizeWindow( WId win, bool animation ) isn't yet implemented!";
557 kDebug(240) << "QRect KWindowSystem::workArea( const QList<WId>& exclude, int desktop ) isn't yet implemented!";
568 kDebug(240) << "KWindowSystem::setDesktopName( int desktop, const QString& name ) isn't yet implemented!";
605 kDebug(240) << "QString KWindowSystem::readNameProperty( WId window, unsigned long atom ) isn't yet implemented!";
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
QString i18n(const char *text)
void fill(const QColor &color)
static QString desktopName(int desktop)
Returns the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:561
Convenience access to certain properties and features of the window manager.
Definition: kwindowsystem.h:55
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition: kwindowsystem_mac.cpp:406
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
Definition: kstandardshortcut.cpp:267
#define K_GLOBAL_STATIC(TYPE, NAME)
static KWindowInfo windowInfo(WId win, unsigned long properties, unsigned long properties2=0)
Returns information about window win.
Definition: kwindowsystem_mac.cpp:330
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
static void setUserTime(WId win, long time)
Sets user timestamp time on window win.
Definition: kwindowsystem_mac.cpp:577
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
static void clearState(WId win, unsigned long state)
Clears the state of window win from state.
Definition: kwindowsystem_mac.cpp:512
static void setType(WId win, NET::WindowType windowType)
Sets the type of window win to windowType.
Definition: kwindowsystem_mac.cpp:473
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual void connectNotify(const char *signal)
Definition: kwindowsystem_mac.cpp:616
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
static void activateWindow(WId win, long time=0)
Requests that window win is activated.
Definition: kwindowsystem_mac.cpp:355
static int currentDesktop()
Returns the current virtual desktop.
Definition: kwindowsystem_mac.cpp:384
static void doNotManage(const QString &title)
Informs kwin via dbus to not manage a window with the specified title.
Definition: kwindowsystem_mac.cpp:609
static WId activeWindow()
Returns the currently active window, or 0 if no window is active.
Definition: kwindowsystem_mac.cpp:348
static void minimizeWindow(WId win, bool animation=true)
Iconifies a window.
Definition: kwindowsystem_mac.cpp:518
static bool icccmCompliantMappingState()
Definition: kwindowsystem_mac.cpp:542
static void setBlockingCompositing(WId window, bool active)
Sets whether the client wishes to block compositing (for better performance)
Definition: kwindowsystem_mac.cpp:627
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
static bool operator<(const ProcessSerialNumber &a, const ProcessSerialNumber &b)
Definition: kwindowsystem_mac.cpp:42
static void unminimizeWindow(WId win, bool animation=true)
DeIconifies a window.
Definition: kwindowsystem_mac.cpp:524
static void setCurrentDesktop(int desktop)
Convenience function to set the current desktop to desktop.
Definition: kwindowsystem_mac.cpp:394
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
static void setState(WId win, unsigned long state)
Sets the state of window win to state.
Definition: kwindowsystem_mac.cpp:506
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
static KWindowSystem * self()
Access to the singleton instance.
Definition: kwindowsystem_mac.cpp:308
static void setMainWindow(QWidget *subwindow, WId mainwindow)
Sets the parent window of subwindow to be mainwindow.
Definition: kwindowsystem_mac.cpp:412
static void allowExternalProcessWindowActivation(int pid=-1)
Allows a window from another process to raise and activate itself.
Definition: kwindowsystem_mac.cpp:622
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
static bool hasWId(WId id)
Test to see if id still managed at present.
Definition: kwindowsystem_mac.cpp:324
static bool showingDesktop()
Returns the state of showing the desktop.
Definition: kwindowsystem_mac.cpp:572
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
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
static int numberOfDesktops()
Returns the number of virtual desktops.
Definition: kwindowsystem_mac.cpp:389
static bool allowedActionsSupported()
Returns true if the WM announces which actions it allows for windows.
Definition: kwindowsystem_mac.cpp:597
static bool compositingActive()
Returns true if a compositing manager is running (i.e.
Definition: kwindowsystem_mac.cpp:379
static OSStatus applicationEventHandler(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData)
Definition: kwindowsystem_mac.cpp:97
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
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
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
static void setDesktopName(int desktop, const QString &name)
Sets the name of the specified desktop.
Definition: kwindowsystem_mac.cpp:566
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.