2 * Copyright 2006, 2007 Aaron Seigo <aseigo@kde.org>
3 * Copyright 2008 Chani Armitage <chanika@gmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2,
8 * or (at your option) any later version.
10 * This program 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
13 * GNU General Public License for more details
15 * You should have received a copy of the GNU Library General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #include <KUniqueApplication>
35 class BackgroundDialog
;
37 class PlasmaApp
: public KUniqueApplication
40 Q_CLASSINFO("D-Bus Interface", "org.kde.plasmaoverlay.App")
44 static PlasmaApp
* self();
45 static bool hasComposite();
47 Plasma::Corona
* corona();
49 void setActiveOpacity(qreal opacity
);
50 void setIdleOpacity(qreal opacity
);
51 qreal
activeOpacity() const;
52 qreal
idleOpacity() const;
56 //if you change stuff, remember to regenerate with:
57 //qdbuscpp2xml -S -M plasmaapp.h > org.kde.plasma-overlay.App.xml
59 //XXX can this be deleted? probably. if lockprocess really cares it can use the unmapnotify
64 //if you change stuff, remember to regenerate ^^^
66 * tell plasma to go into active mode, ready for interaction
68 void setActive(bool activate
);
75 //not really slots, but we want them in dbus:
78 * get plasma all set up and ready
79 * this makes sure things like opacity, visibility and locked-ness are set right
80 * normally this is called only by plasmaapp itself when it finishes initialization, but it's
81 * possible that it might need to be run again by lockprocess
83 * @param setupMode whether we're starting in setup mode
85 void setup(bool setupMode
);
88 * quit the application
89 * this is a duplicate so we can have everything we need in one dbus interface
95 void createView(Plasma::Containment
*containment
);
96 void adjustSize(int screen
);
97 void dialogDestroyed(QObject
*obj
);
100 void configureContainment(Plasma::Containment
*);
101 void configDialogRemoved(QObject
* dialog
);
105 bool eventFilter(QObject
*obj
, QEvent
*event
);
108 PlasmaApp(Display
* display
, Qt::HANDLE visual
, Qt::HANDLE colormap
);
110 Plasma::Corona
*m_corona
;
112 QList
<QWidget
*> m_dialogs
;
113 BackgroundDialog
*m_configDialog
;
115 qreal m_activeOpacity
;
119 #endif // multiple inclusion guard