mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Update Screenshot dbus interface
Also mark shouldReturnNativeSize to true since we want to get correctly scaled screenshot.
This commit is contained in:
parent
6168813d13
commit
c9ca9dac10
2 changed files with 119 additions and 113 deletions
|
|
@ -1,114 +1,120 @@
|
|||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.kde.kwin.Screenshot">
|
||||
<signal name="screenshotCreated">
|
||||
<arg name="handle" type="t" direction="out"/>
|
||||
</signal>
|
||||
<method name="screenshotForWindow">
|
||||
<arg name="winid" type="t" direction="in"/>
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotForWindow">
|
||||
<arg name="winid" type="t" direction="in"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg type="s" direction="out"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotWindowUnderCursor">
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotWindowUnderCursor">
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg type="s" direction="out"/>
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="screen" type="i" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="screen" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotArea">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="x" type="i" direction="in"/>
|
||||
<arg name="y" type="i" direction="in"/>
|
||||
<arg name="width" type="i" direction="in"/>
|
||||
<arg name="height" type="i" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotArea">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="x" type="i" direction="in"/>
|
||||
<arg name="y" type="i" direction="in"/>
|
||||
<arg name="width" type="i" direction="in"/>
|
||||
<arg name="height" type="i" direction="in"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="org.freedesktop.DBus.Properties">
|
||||
<method name="Get">
|
||||
<arg name="interface_name" type="s" direction="in"/>
|
||||
<arg name="property_name" type="s" direction="in"/>
|
||||
<arg name="value" type="v" direction="out"/>
|
||||
</method>
|
||||
<method name="Set">
|
||||
<arg name="interface_name" type="s" direction="in"/>
|
||||
<arg name="property_name" type="s" direction="in"/>
|
||||
<arg name="value" type="v" direction="in"/>
|
||||
</method>
|
||||
<method name="GetAll">
|
||||
<arg name="interface_name" type="s" direction="in"/>
|
||||
<arg name="values" type="a{sv}" direction="out"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
||||
</method>
|
||||
<signal name="PropertiesChanged">
|
||||
<arg name="interface_name" type="s" direction="out"/>
|
||||
<arg name="changed_properties" type="a{sv}" direction="out"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
|
||||
<arg name="invalidated_properties" type="as" direction="out"/>
|
||||
</signal>
|
||||
</interface>
|
||||
<interface name="org.freedesktop.DBus.Introspectable">
|
||||
<method name="Introspect">
|
||||
<arg name="xml_data" type="s" direction="out"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="org.freedesktop.DBus.Peer">
|
||||
<method name="Ping"/>
|
||||
<method name="GetMachineId">
|
||||
<arg name="machine_uuid" type="s" direction="out"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
<interface name="org.kde.kwin.Screenshot">
|
||||
<signal name="screenshotCreated">
|
||||
<arg name="handle" type="t" direction="out"/>
|
||||
</signal>
|
||||
<method name="screenshotForWindow">
|
||||
<arg name="winid" type="t" direction="in"/>
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotForWindow">
|
||||
<arg name="winid" type="t" direction="in"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg type="s" direction="out"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="interactive">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotWindowUnderCursor">
|
||||
<arg name="mask" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotWindowUnderCursor">
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg type="s" direction="out"/>
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
<arg name="shouldReturnNativeSize" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotFullscreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="screen" type="i" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="screen" type="i" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotScreen">
|
||||
<arg name="fd" type="h" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotArea">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="x" type="i" direction="in"/>
|
||||
<arg name="y" type="i" direction="in"/>
|
||||
<arg name="width" type="i" direction="in"/>
|
||||
<arg name="height" type="i" direction="in"/>
|
||||
<arg name="captureCursor" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="screenshotArea">
|
||||
<arg type="s" direction="out"/>
|
||||
<arg name="x" type="i" direction="in"/>
|
||||
<arg name="y" type="i" direction="in"/>
|
||||
<arg name="width" type="i" direction="in"/>
|
||||
<arg name="height" type="i" direction="in"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="org.freedesktop.DBus.Properties">
|
||||
<method name="Get">
|
||||
<arg name="interface_name" type="s" direction="in"/>
|
||||
<arg name="property_name" type="s" direction="in"/>
|
||||
<arg name="value" type="v" direction="out"/>
|
||||
</method>
|
||||
<method name="Set">
|
||||
<arg name="interface_name" type="s" direction="in"/>
|
||||
<arg name="property_name" type="s" direction="in"/>
|
||||
<arg name="value" type="v" direction="in"/>
|
||||
</method>
|
||||
<method name="GetAll">
|
||||
<arg name="interface_name" type="s" direction="in"/>
|
||||
<arg name="values" type="a{sv}" direction="out"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
||||
</method>
|
||||
<signal name="PropertiesChanged">
|
||||
<arg name="interface_name" type="s" direction="out"/>
|
||||
<arg name="changed_properties" type="a{sv}" direction="out"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
|
||||
<arg name="invalidated_properties" type="as" direction="out"/>
|
||||
</signal>
|
||||
</interface>
|
||||
<interface name="org.freedesktop.DBus.Introspectable">
|
||||
<method name="Introspect">
|
||||
<arg name="xml_data" type="s" direction="out"/>
|
||||
</method>
|
||||
</interface>
|
||||
<interface name="org.freedesktop.DBus.Peer">
|
||||
<method name="Ping"/>
|
||||
<method name="GetMachineId">
|
||||
<arg name="machine_uuid" type="s" direction="out"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ PhonePanel::~PhonePanel() = default;
|
|||
void PhonePanel::executeCommand(const QString &command)
|
||||
{
|
||||
qWarning() << "Executing" << command;
|
||||
QProcess::startDetached(command);
|
||||
QProcess::startDetached(command, QStringList());
|
||||
}
|
||||
|
||||
void PhonePanel::toggleTorch()
|
||||
|
|
@ -169,7 +169,7 @@ void PhonePanel::takeScreenshot()
|
|||
return;
|
||||
}
|
||||
// Take fullscreen screenshot, and no pointer
|
||||
QDBusPendingCall pcall = m_screenshotInterface->screenshotFullscreen(QDBusUnixFileDescriptor(lPipeFds[1]), false);
|
||||
QDBusPendingCall pcall = m_screenshotInterface->screenshotFullscreen(QDBusUnixFileDescriptor(lPipeFds[1]), false, true);
|
||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
|
||||
QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [](QDBusPendingCallWatcher* watcher) {
|
||||
if (watcher->isError()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue