Re: Clipboard improvements
- From: Hans Breuer <Hans Breuer org>
- To: Matthias Clasen <mclasen redhat com>, gtk-devel-list gnome org
- Subject: Re: Clipboard improvements
- Date: Sat, 08 May 2004 14:31:13 +0200
At 17:37 06.05.04, Matthias Clasen wrote:
I have looked at wrapping the clipboard owner change notification
provided by the XFIXES extension for gdk. Here is the api I'd like to
propose for this:
* @display: a #GdkDisplay
* Returns whether #GdkEventOwnerChange events will be
* sent when the owner of a selection changes.
* Return value: whether #GdkEventOwnerChange events will
* be sent.
* Since: 2.6
gdk_display_supports_selection_notification (GdkDisplay *display)
If I understand correctly this function would query the ability to
kind of register 'listeners' for the change of available clipboard
content (given that 'selection' is a very X centric concept and
from all I read about not that well understood, i.e. PRIMAY,
It should be possible for gdk/win32 to generate events on
clipboard change with the windows API SetClipboardViewer()
and than map WM_DRAWCLIPBOARD to the event below.
* @clipboard: the clipboard which received the signal
* @event: the #GtkEventOwnerChange event
* The ::owner-change signal is emitted if the owner of
* the clipboard changes. Applications can use this information
* to e.g. obtain the supported targets from the new owner and
* update the sensitivity of "Paste" menuitems based on that
* Note that not all displays support owner change notification
* for selections, see gdk_display_supports_selection_notification().
* Returns: %TRUE if the event was handled
* Since: 2.6
I'd like to hear from our win32 hackers whether this kind of API can be
supported on Windows. It would be unfortunate to have
gdk_display_supports_selection_notification() simply return FALSE on
Windows, since that information is definitively available in some form.
There are already some coments in gdkselection-win32.c about maybe
implementation problems, e.g. returning NULL for the owner of the
global clipboard, so the new functionality might finally not get a clear
and/or working implementation.
OTOH maybe it's just necessary to clarify the issues/expectations some
more like required in
not to mention ;(
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
] [Thread Prev