1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
29 #include "gdkselection.h"
31 #include "gdkproperty.h"
32 #include "gdkprivate.h"
33 #include "gdkprivate-broadway.h"
34 #include "gdkdisplay-broadway.h"
39 typedef struct _OwnerInfo OwnerInfo;
48 static GSList *owner_list;
50 /* When a window is destroyed we check if it is the owner
51 * of any selections. This is somewhat inefficient, but
52 * owner_list is typically short, and it is a low memory,
56 _gdk_broadway_selection_window_destroyed (GdkWindow *window)
58 GSList *tmp_list = owner_list;
61 OwnerInfo *info = tmp_list->data;
62 tmp_list = tmp_list->next;
64 if (info->owner == window)
66 owner_list = g_slist_remove (owner_list, info);
73 _gdk_broadway_display_set_selection_owner (GdkDisplay *display,
83 _gdk_broadway_display_get_selection_owner (GdkDisplay *display,
90 _gdk_broadway_display_convert_selection (GdkDisplay *display,
99 _gdk_broadway_display_get_selection_property (GdkDisplay *display,
100 GdkWindow *requestor,
106 *ret_type = GDK_NONE;
116 _gdk_broadway_display_send_selection_notify (GdkDisplay *display,
117 GdkWindow *requestor,
123 g_return_if_fail (GDK_IS_DISPLAY (display));
127 _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay *display,
134 g_return_val_if_fail (text != NULL, 0);
135 g_return_val_if_fail (length >= 0, 0);
136 g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
142 _gdk_broadway_display_utf8_to_string_target (GdkDisplay *display,
145 return g_strdup (str);