Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleDBusAdapter.h
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include <QDBusAbstractAdaptor> | 24 | #include <QDBusAbstractAdaptor> | ||
25 | #include "SpectacleCore.h" | 25 | #include "SpectacleCore.h" | ||
26 | 26 | | |||
27 | class SpectacleDBusAdapter: public QDBusAbstractAdaptor | 27 | class SpectacleDBusAdapter: public QDBusAbstractAdaptor | ||
28 | { | 28 | { | ||
29 | Q_OBJECT | 29 | Q_OBJECT | ||
30 | Q_CLASSINFO("D-Bus Interface", "org.kde.Spectacle") | 30 | Q_CLASSINFO("D-Bus Interface", "org.kde.Spectacle") | ||
31 | Q_CLASSINFO("D-Bus Introspection", "" | | |||
32 | " <interface name=\"org.kde.Spectacle\">\n" | | |||
33 | " <method name=\"StartAgent\">\n" | | |||
34 | " </method>\n" | | |||
35 | " <method name=\"FullScreen\">\n" | | |||
36 | " <arg direction=\"in\" type=\"b\" name=\"includeMousePointer\"/>\n" | | |||
37 | " </method>\n" | | |||
38 | " <method name=\"CurrentScreen\">\n" | | |||
39 | " <arg direction=\"in\" type=\"b\" name=\"includeMousePointer\"/>\n" | | |||
40 | " </method>\n" | | |||
41 | " <method name=\"ActiveWindow\">\n" | | |||
42 | " <arg direction=\"in\" type=\"b\" name=\"includeWindowDecorations\"/>\n" | | |||
43 | " <arg direction=\"in\" type=\"b\" name=\"includeMousePointer\"/>\n" | | |||
44 | " </method>\n" | | |||
45 | " <method name=\"WindowUnderCursor\">\n" | | |||
46 | " <arg direction=\"in\" type=\"b\" name=\"includeWindowDecorations\"/>\n" | | |||
47 | " <arg direction=\"in\" type=\"b\" name=\"includeMousePointer\"/>\n" | | |||
48 | " </method>\n" | | |||
49 | " <method name=\"RectangularRegion\">\n" | | |||
50 | " <arg direction=\"in\" type=\"b\" name=\"includeMousePointer\"/>\n" | | |||
51 | " </method>\n" | | |||
52 | " <signal name=\"ScreenshotTaken\">\n" | | |||
53 | " <arg direction=\"out\" type=\"s\" name=\"fileName\"/>\n" | | |||
54 | " </signal>\n" | | |||
55 | " <signal name=\"ScreenshotFailed\">\n" | | |||
56 | " </signal>\n" | | |||
57 | " </interface>\n" | | |||
58 | "" | | |||
59 | ) | | |||
60 | | ||||
61 | public: | 31 | public: | ||
62 | 32 | | |||
63 | SpectacleDBusAdapter(SpectacleCore *parent); | 33 | SpectacleDBusAdapter(SpectacleCore *parent); | ||
64 | virtual ~SpectacleDBusAdapter() = default; | 34 | virtual ~SpectacleDBusAdapter() = default; | ||
65 | 35 | | |||
66 | inline SpectacleCore *parent() const; | 36 | inline SpectacleCore *parent() const; | ||
67 | 37 | | |||
68 | public Q_SLOTS: | 38 | public Q_SLOTS: | ||
69 | 39 | | |||
70 | Q_NOREPLY void StartAgent(); | | |||
71 | Q_NOREPLY void FullScreen(bool includeMousePointer); | 40 | Q_NOREPLY void FullScreen(bool includeMousePointer); | ||
72 | Q_NOREPLY void CurrentScreen(bool includeMousePointer); | 41 | Q_NOREPLY void CurrentScreen(bool includeMousePointer); | ||
73 | Q_NOREPLY void ActiveWindow(bool includeWindowDecorations, bool includeMousePointer); | 42 | Q_NOREPLY void ActiveWindow(bool includeWindowDecorations, bool includeMousePointer); | ||
74 | Q_NOREPLY void WindowUnderCursor(bool includeWindowDecorations, bool includeMousePointer); | 43 | Q_NOREPLY void WindowUnderCursor(bool includeWindowDecorations, bool includeMousePointer); | ||
75 | Q_NOREPLY void RectangularRegion(bool includeMousePointer); | 44 | Q_NOREPLY void RectangularRegion(bool includeMousePointer); | ||
76 | 45 | | |||
77 | Q_SIGNALS: | 46 | Q_SIGNALS: | ||
78 | 47 | | |||
79 | void ScreenshotTaken(const QString &fileName); | 48 | void ScreenshotTaken(const QString &fileName); | ||
broulik: Are these DBus-exported? | |||||
meven: They are | |||||
80 | void ScreenshotFailed(); | 49 | void ScreenshotFailed(); | ||
81 | }; | 50 | }; |
Are these DBus-exported?