On Thu, Sep 26, 2002 at 01:41:09PM -0300, Lalo Martins wrote:
> On Thu, Sep 26, 2002 at 05:37:36AM -0600, Micah Dowty wrote:
> > IMHO the biggest decision to be made in implementing clipboard support is how
> > to allow applications to exchange clipboard data in different formats. This
> > will determine how the data is stored. I'm not very familiar with the
> > clipboard mechanisms in other GUIs, so please feel free to add extra ideas or
> > correct me :)
> > 
> > What about a system where pgserver manages the clipboard data, but clients can
> > register user-defined data types? Some kind of plugin system for pgserver to
> > convert between these user-defined data types?
> 
> I haven't coded for Windows in over 7 years, but Back Then, when you did a
> copy/cut you would pass out a "pile" of formats, and then when the other app
> wants to paste that, they would fetch the first one in this "pile" they
> supported. For ex., from (say) Corel Draw you copy sobe objects, they would
> be stored as [cdr, wmf, bmp]. If you try to paste this into an app that
> supports cdr, fine; if you tried in (say) Word, you would get the wmf; if
> you tried in paintbrush, you would get the bmp.
> 
> I think a new, opaque pgserver format, consisting of basically two strings
> (the raw opaque data and the mime-type or similar), could handle that.

That sounds good. The only downside would be that on cut/copy, the app would need to 
convert it's data into all these formats and send them all to pgserver. Not a big deal 
for most things, but it would be a pain if you just copied a big vector graphic that 
needs to be converted to a bitmap.

Just so that the clipboard system is fully compatible with existing pgserver data 
types, it would make sense to make the mime type of any pgserver handle gettable, plus 
adding a new type (PG_TYPE_CUSTOM or something) that is never used in pgserver but can 
have its mime type set by the client.

One variation on this that might make it more resource friendly is to send the "pile" 
lazily. Have the app announce the mime types of everything, but only send the objects 
themselves if they're requested or if the app closes. This could be optional, so only 
apps that want to use it would have to.

> 
> []s,
>                                                |alo
>                                                +----
> --
>             Those who trade freedom for security
>                lose both and deserve neither.
> --
> http://www.laranja.org/                mailto:[EMAIL PROTECTED]
>          pgp key: http://www.laranja.org/pessoal/pgp
> 
> Eu jogo RPG! (I play RPG)         http://www.eujogorpg.com.br/
> Python Foundry Guide http://www.sf.net/foundry/python-foundry/
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Pgui-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/pgui-devel

-- 
Only you can prevent creeping featurism!


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to