New clipboard proposal

Kevin Krammer kevin.krammer at gmx.at
Tue Jan 4 16:47:41 EET 2005


On Sunday 02 January 2005 05:32, Philip Van Hoof wrote:

> Applications can use an internal memory-buffer using an internal
> formatting of their clipboard, and convert it to the requested format
> "on-request". A clipboard manager who's going to rescue such a clipboard
> can't know about that logic. Letting the clipboard-owner give it's
> original format wouldn't be useful either, since the manager doesn't
> know how to convert it to the possible formats (unless there's some
> common macro language available which can be fed with such an original
> and a parameter for the target format -- but such a language isn't used
> nor available --).

I can imagine two other solutions.
A selection owner who likes to have its selection persist could ask the user 
on exit if she wants the selection to remain and in this case start a small 
selection handler that can convert the data but does not need to provide any 
means of data manipulation.
My guess is that this is something Microsoft's Office is doing when it asks if 
you want to keep your clipboard.

Another option would be something along the way (I think) the session manager 
works.
It somehow asks applications to store their state in a way they can restore it 
and then starts them with certain information about this saved state.
For applications running on the same host as the clipboard manager, the 
selection could be stored by the application in its internal format and the 
clipboard manager would start either the application itself or a helper 
application and asks for the requested format.

Second options is of course slower, you have to wait for an application 
startup, so it might only be useful when used on older selection in a 
selection history.

While I am at it, a slight variation of the second approach would be 
dlopen'ing a converter library.

Cheers,
Kevin



More information about the xdg mailing list