DBus service for screenshots.
Emmanuele Bassi
ebassi at gmail.com
Thu Sep 24 16:03:33 PDT 2015
Hi;
you also want to use xdg-list, not dbus-list, for discussing a shared
DBus interface.
Ciao,
Emmanuele.
On 24 September 2015 at 23:54, Emmanuele Bassi <ebassi at gmail.com> wrote:
> Hi;
>
> On 24 September 2015 at 23:25, Boudhayan Gupta <bgupta at kde.org> wrote:
>> Hi,
>>
>> In December we'll be releasing a new screenshot app for KDE. We've
>> implemented a generic DBus interface for this app, and I'm posting
>> this to the dbus mailing list as others may be interested in this idea
>> and may want to implement it in their own desktop environments.
>>
>> The service we've implemented is called org.freedesktop.Screenshot
>> (we're using the freedesktop namespace because we truly want the
>> service to be DE or platform agnostic).
>
> Commendable spirit, but that's not how it works — we've been bitten by
> this in the past already. Please, use org.kde.* for your DBus
> interfaces, and *then* propose a org.freedesktop.* interface up for
> discussion. Otherwise you'll have to start versioning your own methods
> because any shared interface will likely not map to what you expose
> right now.
>
> Implementing multiple interfaces is easy; breaking them because you
> proposed them for discussion *after* release is going to be painful
> for everybody.
>
>> The XML definition of the
>> interface is available here:
>> https://raw.githubusercontent.com/KDE/spectacle/master/dbus/org.freedesktop.Screenshot.xml
>>
>> You'll notice that we define 4 different types of screenshots that can
>> be taken, and a StartAgent method. The StartAgent method should just
>> start the application GUI, the other 4 methods should take the
>> appropriate shot, save the image in a default location, and quit.
>
> StartAgent would show the UI? Why? That can be done with a simple hot
> key, or via DBus activation of a service, instead of asking a service
> to spawn another service. For instance, if I want to show a dialog to
> save the screenshot I just took, the gnome-screenshot tool is what I
> will launch. There's another consideration that applies to Wayland:
> applications like GIMP (or Krita) may ask the compositor to take a
> screenshot; this means that the UI is already running, and it most
> definitely is not something that should be spawned by the compositor
> itself in reply to a DBus method call. If you want to keep the
> StartAgent method then it's probably good to ensure in the
> documentation that the method is not mandatory.
>
> The API is also missing the ability to take a screenshot of an area.
> For reference, this is the DBus interface that GNOME Shell provides:
> https://git.gnome.org/browse/gnome-shell/tree/data/org.gnome.Shell.Screenshot.xml
>
> GNOME Shell also has an equivalent screencast API, which may be
> interesting to standardise alongside the screenshot one.
>
> Ciao,
> Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
--
https://www.bassi.io
[@] ebassi [@gmail.com]
More information about the dbus
mailing list