screenshot: Add and implement new D-Bus method

The new InteractiveScreenshot() D-Bus method is implemented using
the signals introduced by the previous commit, and is fundamentally
very simple: take the screenshot, and return the GFile URI.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2999>
This commit is contained in:
Georges Basile Stavracas Neto 2023-10-28 19:21:05 -03:00 committed by Marge Bot
parent c80f3af79b
commit ee150f2949
2 changed files with 44 additions and 0 deletions

View file

@ -11,6 +11,22 @@
-->
<interface name="org.gnome.Shell.Screenshot">
<!--
InteractiveScreenshot:
@success: whether the screenshot was captured
@uri: the file where the screenshot was saved
Shows Shell's interactive screenshot dialog, and lets the
user take an interactive screenshot, which is then returned
in @filename as png image. It returns a boolean indicating
whether the operation was successful or not. The URI of the
screenshot will be returned in @uri.
-->
<method name="InteractiveScreenshot">
<arg type="b" direction="out" name="success"/>
<arg type="s" direction="out" name="uri"/>
</method>
<!--
Screenshot:
@filename: The filename for the screenshot