Changeset View
Changeset View
Standalone View
Standalone View
src/screencast.h
Show All 25 Lines | |||||
26 | 26 | | |||
27 | 27 | | |||
28 | class ScreenCastPortal : public QDBusAbstractAdaptor | 28 | class ScreenCastPortal : public QDBusAbstractAdaptor | ||
29 | { | 29 | { | ||
30 | Q_OBJECT | 30 | Q_OBJECT | ||
31 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.ScreenCast") | 31 | Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.ScreenCast") | ||
32 | Q_PROPERTY(uint version READ version) | 32 | Q_PROPERTY(uint version READ version) | ||
33 | Q_PROPERTY(uint AvailableSourceTypes READ AvailableSourceTypes) | 33 | Q_PROPERTY(uint AvailableSourceTypes READ AvailableSourceTypes) | ||
34 | Q_PROPERTY(uint AvailableCursorModes READ AvailableCursorModes) | ||||
34 | public: | 35 | public: | ||
35 | enum SourceType { | 36 | enum SourceType { | ||
36 | Any = 0, | 37 | Any = 0, | ||
37 | Monitor, | 38 | Monitor, | ||
38 | Window | 39 | Window | ||
39 | }; | 40 | }; | ||
41 | Q_ENUM(SourceType); | ||||
42 | Q_DECLARE_FLAGS(SourceTypes, SourceType) | ||||
43 | | ||||
44 | enum CursorModes { | ||||
45 | Hidden = 1, | ||||
46 | Embedded = 2, | ||||
47 | Metadata = 4, | ||||
48 | }; | ||||
49 | Q_ENUM(CursorModes); | ||||
40 | 50 | | |||
41 | explicit ScreenCastPortal(QObject *parent); | 51 | explicit ScreenCastPortal(QObject *parent); | ||
42 | ~ScreenCastPortal(); | 52 | ~ScreenCastPortal(); | ||
43 | 53 | | |||
44 | uint version() const { return 1; } | 54 | uint version() const { return 1; } | ||
45 | uint AvailableSourceTypes() const { return Monitor; }; | 55 | uint AvailableSourceTypes() const { return Monitor; }; | ||
56 | uint AvailableCursorModes() const { return Hidden | Embedded; }; | ||||
46 | 57 | | |||
47 | public Q_SLOTS: | 58 | public Q_SLOTS: | ||
48 | uint CreateSession(const QDBusObjectPath &handle, | 59 | uint CreateSession(const QDBusObjectPath &handle, | ||
49 | const QDBusObjectPath &session_handle, | 60 | const QDBusObjectPath &session_handle, | ||
50 | const QString &app_id, | 61 | const QString &app_id, | ||
51 | const QVariantMap &options, | 62 | const QVariantMap &options, | ||
52 | QVariantMap &results); | 63 | QVariantMap &results); | ||
53 | 64 | | |||
Show All 16 Lines |