[sugar] Question about clipboard service

Eben Eliason eben.eliason
Mon Aug 4 14:59:56 EDT 2008


There is a fairly comprehensive specification [1] for the clipboard on
the wiki.  Most importantly it discusses the use of titles, icons,
colors, and previews, which are the 4 elements of clippings that we
need to support in various combination to make the clipboard
successful.

This spec isn't word for word perfect anymore, as some minor details
have changed, but it gives the high level picture of the API I want to
support.  Please ask any questions you may have about what's there so
far, and I'll try to clean up some details at some point soon.

- Eben

[1] http://wiki.laptop.org/go/Specifications/Clipboard


On Sat, Jul 19, 2008 at 11:14 AM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> Well, we can add some sugar API around the gtk clipboard stuff, but
> I'm not sure there's a lot of value in there, as the gtk+ API is
> already quite high level.
>
> The problem here is how do we extend the existing X specs to deliver
> the experience we aim for. Last we talked about it, Marco was opposed
> to use the X selection targets to pass titles and icons around.
>
> Eben, now is a good moment to start talking about it, can you
> summarize what is missing from the clipboard and try to list all that
> we want to do but the current spec doesn't allow to?
>
> Thanks,
>
> Tomeu
>
> On Sat, Jul 19, 2008 at 5:01 PM, Eben Eliason <eben.eliason at gmail.com> wrote:
>> I can't tell from your wording if you are implying that we will or will not
>> be creating some custom wrappers for the clipboard service.  I think we
>> absolutely need them to accomplish several critical clipboard issues (among
>> them, specifying icons, colors, titles, and previews for clippings).  In
>> fact, getting this API working effectively is high on my list of priorities
>> for 9.1
>> - Eben
>>
>> On Sat, Jul 19, 2008 at 4:19 AM, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
>>>
>>> On Fri, Jul 18, 2008 at 10:29 PM, Faisal Anwar <fanwar at mediamods.com>
>>> wrote:
>>> > Hi,
>>> >
>>> > I'm playing around with the clipboard package on sugar and had a quick
>>> > question. So, the clipboardservice.py file shows some basic api for
>>> > getting
>>> > and setting objects on the clipboard through the dbus. However, the
>>> > add_object and get_object methods (and their variants) rely on knowing
>>> > an
>>> > object_id in order to retrieve something from the clipboard. Typically,
>>> > a
>>> > clipboard has some stack like structure where you can automatically
>>> > retrieve
>>> > the last thing copied to the clipboard without necessarily knowing its
>>> > internal id. This would seem especially important fo passing things to
>>> > other
>>> > activities, which can't reasonably figure out the object_id created when
>>> > something is saved to the clipboard by another activity. Does anyone
>>> > know
>>> > how to just retrieve the last item saved to the clipboard and also get a
>>> > list of the last N items saved to the clipboard?
>>> >
>>> > Also, the gtk.Clipboard framework allows access to several different
>>> > clipboards that have slightly different purposes. Is there similar
>>> > functionality available through sugar/dbus or would one go directly to
>>> > the
>>> > gtk implementation?
>>>
>>> Hi Faisal,
>>>
>>> we haven't reached any agreement yet about exposing a different
>>> clipboard API than the one in gtk+ (that wraps around the different
>>> clipboard-related specs used in X).
>>>
>>> In other words, nobody other than the shell should directly use the
>>> clipboard service and this will probably disappear in the future.
>>> Activity authors should the use the clipboard functionality as exposed
>>> by their toolkits (gtk+) or implement themselves those specs (as etoys
>>> has done). Can you add this note somewhere in the almanac?
>>>
>>> Thanks,
>>>
>>> Tomeu
>>> _______________________________________________
>>> Sugar mailing list
>>> Sugar at lists.laptop.org
>>> http://lists.laptop.org/listinfo/sugar
>>
>>
>



More information about the Sugar-devel mailing list