Re: Clipboard improvements, II
- From: James Henstridge <james daa com au>
- To: Hans Breuer <Hans Breuer org>
- Cc: gtk-devel-list gnome org, Matthias Clasen <mclasen redhat com>
- Subject: Re: Clipboard improvements, II
- Date: Mon, 24 May 2004 11:44:42 +0800
On 23/05/2004 11:13 PM, Hans Breuer wrote:
Apps are free to advertise whatever targets they want on the clipboard.
What we may be missing is convenience api on par with
gtk_clipboard_set_text(), gtk_clipboard_request_text() for nontextual
targets.
Certainly. I've searched quite some time to find _any_ gtk application
which is able to copy&paste more than just text - across process
boundaries. If anybody knows one please speak up ;-)
Try Gnumeric. If you copy a range of cells, you can paste it into Emacs
as formated text, an HTML editor as a table, or another instance of
Gnumeric as a range of cells (with all formulas intact). It is quite a
good example of content negotiation.
When you pick copy in gnumeric, it acquires the CLIPBOARD selection and
advertises the list of formats it supports (which are just strings,
represented by atoms). It doesn't have to convert the data to all the
formats it advertises.
When an app wants to paste, it requests that the CLIPBOARD selection be
converted to the format it can accept. When this happens, the selection
owner sends the data to the requesting app in the requested format.
From a brief look at the OLE clipboard docs on MSDN, it doesn't look
like there is that big a difference in how the two act. Mozilla has a
cross platform API with implementations for win32 and X clipboard, so it
must be possible ...
James.
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]