Clipboard improvements
- From: Matthias Clasen <mclasen redhat com>
- To: gtk-devel-list gnome org
- Subject: Clipboard improvements
- Date: Thu, 06 May 2004 11:37:38 -0400
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:
/**
 * gdk_display_supports_selection_notification:
 * @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
 **/
gboolean 
gdk_display_supports_selection_notification (GdkDisplay *display)
typedef enum
{
  GDK_OWNER_CHANGE_NEW_OWNER,
  GDK_OWNER_CHANGE_DESTROY,
  GDK_OWNER_CHANGE_CLOSE
} GdkOwnerChange;
struct _GdkEventOwnerChange
{
  GdkEventType type;
  GdkWindow *window;
  gint8 send_event;
  GdkNativeWindow owner;
  GdkOwnerChange reason;
  GdkAtom selection;
  guint32 time;
  guint32 selection_time;
};
  /**
   * GtkClipboard::owner-change:
   * @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 
   * information.
   *
   * 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.
Regards,
Matthias
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]