effects/screenshot: Add API version property to org.kde.ScreenShot2 interface
This commit is contained in:
parent
24ad81e91b
commit
5379b010b4
3 changed files with 15 additions and 0 deletions
|
@ -14,6 +14,13 @@
|
|||
a screen, or a window.
|
||||
-->
|
||||
<interface name="org.kde.KWin.ScreenShot2">
|
||||
<!--
|
||||
Version:
|
||||
|
||||
API version.
|
||||
-->
|
||||
<property name="Version" type="u" access="read"/>
|
||||
|
||||
<!--
|
||||
CaptureWindow:
|
||||
@handle: The unique handle that identified the window
|
||||
|
|
|
@ -273,6 +273,11 @@ ScreenShotDBusInterface2::~ScreenShotDBusInterface2()
|
|||
QDBusConnection::sessionBus().unregisterObject(s_dbusObjectPath);
|
||||
}
|
||||
|
||||
int ScreenShotDBusInterface2::version() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool ScreenShotDBusInterface2::checkPermissions() const
|
||||
{
|
||||
if (!calledFromDBus()) {
|
||||
|
|
|
@ -31,11 +31,14 @@ class ScreenShotSource2;
|
|||
class ScreenShotDBusInterface2 : public QObject, public QDBusContext
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int Version READ version CONSTANT)
|
||||
|
||||
public:
|
||||
explicit ScreenShotDBusInterface2(ScreenShotEffect *effect);
|
||||
~ScreenShotDBusInterface2() override;
|
||||
|
||||
int version() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
QVariantMap CaptureWindow(const QString &handle, const QVariantMap &options,
|
||||
QDBusUnixFileDescriptor pipe);
|
||||
|
|
Loading…
Reference in a new issue