Changeset View
Changeset View
Standalone View
Standalone View
dbusinterface.h
Show All 37 Lines | |||||
38 | * | 38 | * | ||
39 | * Nowadays the D-Bus interfaces are distributed, parts of it are exported on | 39 | * Nowadays the D-Bus interfaces are distributed, parts of it are exported on | ||
40 | * /Compositor, parts on /Effects and parts on /KWin. The implementation in this | 40 | * /Compositor, parts on /Effects and parts on /KWin. The implementation in this | ||
41 | * class just delegates the method calls to the actual implementation in one of the | 41 | * class just delegates the method calls to the actual implementation in one of the | ||
42 | * three singletons. | 42 | * three singletons. | ||
43 | * | 43 | * | ||
44 | * @author Martin Gräßlin <mgraesslin@kde.org> | 44 | * @author Martin Gräßlin <mgraesslin@kde.org> | ||
45 | **/ | 45 | **/ | ||
46 | class DBusInterface: public QObject | 46 | class DBusInterface: public QObject, protected QDBusContext | ||
47 | { | 47 | { | ||
48 | Q_OBJECT | 48 | Q_OBJECT | ||
49 | Q_CLASSINFO("D-Bus Interface", "org.kde.KWin") | 49 | Q_CLASSINFO("D-Bus Interface", "org.kde.KWin") | ||
50 | public: | 50 | public: | ||
51 | explicit DBusInterface(QObject *parent); | 51 | explicit DBusInterface(QObject *parent); | ||
52 | virtual ~DBusInterface(); | 52 | virtual ~DBusInterface(); | ||
53 | 53 | | |||
54 | public: // PROPERTIES | 54 | public: // PROPERTIES | ||
55 | public Q_SLOTS: // METHODS | 55 | public Q_SLOTS: // METHODS | ||
56 | Q_NOREPLY void cascadeDesktop(); | 56 | Q_NOREPLY void cascadeDesktop(); | ||
57 | int currentDesktop(); | 57 | int currentDesktop(); | ||
58 | Q_NOREPLY void killWindow(); | 58 | Q_NOREPLY void killWindow(); | ||
59 | void nextDesktop(); | 59 | void nextDesktop(); | ||
60 | void previousDesktop(); | 60 | void previousDesktop(); | ||
61 | Q_NOREPLY void reconfigure(); | 61 | Q_NOREPLY void reconfigure(); | ||
62 | bool setCurrentDesktop(int desktop); | 62 | bool setCurrentDesktop(int desktop); | ||
63 | bool startActivity(const QString &in0); | 63 | bool startActivity(const QString &in0); | ||
64 | bool stopActivity(const QString &in0); | 64 | bool stopActivity(const QString &in0); | ||
65 | QString supportInformation(); | 65 | QString supportInformation(); | ||
66 | Q_NOREPLY void unclutterDesktop(); | 66 | Q_NOREPLY void unclutterDesktop(); | ||
67 | Q_NOREPLY void showDebugConsole(); | 67 | Q_NOREPLY void showDebugConsole(); | ||
68 | 68 | | |||
69 | QVariantMap queryWindowInfo(); | ||||
70 | | ||||
69 | private Q_SLOTS: | 71 | private Q_SLOTS: | ||
70 | void becomeKWinService(const QString &service); | 72 | void becomeKWinService(const QString &service); | ||
71 | 73 | | |||
72 | private: | 74 | private: | ||
73 | void announceService(); | 75 | void announceService(); | ||
74 | QString m_serviceName; | 76 | QString m_serviceName; | ||
77 | QDBusMessage m_replyQueryWindowInfo; | ||||
75 | }; | 78 | }; | ||
76 | 79 | | |||
77 | class CompositorDBusInterface : public QObject | 80 | class CompositorDBusInterface : public QObject | ||
78 | { | 81 | { | ||
79 | Q_OBJECT | 82 | Q_OBJECT | ||
80 | Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Compositing") | 83 | Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Compositing") | ||
81 | /** | 84 | /** | ||
82 | * @brief Whether the Compositor is active. That is a Scene is present and the Compositor is | 85 | * @brief Whether the Compositor is active. That is a Scene is present and the Compositor is | ||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |