[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] [RFC] clipboard support for various data types



Lenard Lindstrom <len-l@xxxxxxxxx>:

> On 31 Jul 2006 at 10:55, Bob Ippolito wrote:
>
> >
> > On Jul 31, 2006, at 10:33 AM, Marcus von Appen wrote:
> >
> > > as I already discussed with Rene and the one or other on #pygame,
> > > an easy to use image support for the pygame.scrap clipboard
> > > implementation is needed.
> > >
> > > Currently it only accepts strings, which - although it allows
> > > e.g. buffered surfaces - does not ensure interoperability with other
> > > applications like Gimp, image viewers and whatever else.
> >
> > The Mac OS X implementation accepts text (unicode or ASCII str) and
> > bitmap data (SDL surfaces). It has no problems whatsoever
> > interoperating with other applications. Even a PDF on the clipboard
> > will be coerced to a bitmap, and rich text should be converted to
> > plain text.

This is a bit more complex on X11 and Win32 systems as you exactly need
to deal with different client needs and requests (e.g. converting
unicode text to the current locale multibyte sequence, etc.pp.).

> > I don't know how hard this is on other platforms, but the Mac OS X
> > implementation is feature complete and interoperable with all other
> > applications in all of the ways that people expect them to be.
> >
> For Windows clipboard content type is identified by an integer value.
> Several  types, such as  text, unicode text, bitmap, tiff and wave
> are predefined. Other types can registered dynamically.

Same for X11. It also allows (as Win32) to set several different data types
at once, allowing an application to request for a specific data type of
the ones set (thus it is necessary to keep the request type, to answer your
question, Phil).
But this has to be implemented (which currently is not for Win32, X11 and QNX).

Regards
Marcus