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 "gdkdisplay.h"
36 gdk_selection_owner_set (GdkWindow *owner,
41 return gdk_selection_owner_set_for_display (gdk_display_get_default (),
47 gdk_selection_owner_get (GdkAtom selection)
49 return gdk_selection_owner_get_for_display (gdk_display_get_default (),
54 gdk_selection_send_notify (GdkNativeWindow requestor,
60 gdk_selection_send_notify_for_display (gdk_display_get_default (),
62 target, property, time);
66 gdk_text_property_to_text_list (GdkAtom encoding,
72 return gdk_text_property_to_text_list_for_display (gdk_display_get_default (),
73 encoding, format, text, length, list);
77 * gdk_text_property_to_utf8_list:
78 * @encoding: an atom representing the encoding of the text
79 * @format: the format of the property
80 * @text: the text to convert
81 * @length: the length of @text, in bytes
82 * @list: (allow-none): location to store the list of strings or %NULL. The
83 * list should be freed with g_strfreev().
85 * Convert a text property in the giving encoding to
86 * a list of UTF-8 strings.
88 * Return value: the number of strings in the resulting
92 gdk_text_property_to_utf8_list (GdkAtom encoding,
98 return gdk_text_property_to_utf8_list_for_display (gdk_display_get_default (),
99 encoding, format, text, length, list);
103 gdk_string_to_compound_text (const gchar *str,
109 return gdk_string_to_compound_text_for_display (gdk_display_get_default (),
110 str, encoding, format,
115 * gdk_utf8_to_compound_text:
116 * @str: a UTF-8 string
117 * @encoding: location to store resulting encoding
118 * @format: location to store format of the result
119 * @ctext: location to store the data of the result
120 * @length: location to store the length of the data
123 * Convert from UTF-8 to compound text.
125 * Return value: %TRUE if the conversion succeeded, otherwise
129 gdk_utf8_to_compound_text (const gchar *str,
135 return gdk_utf8_to_compound_text_for_display (gdk_display_get_default (),
136 str, encoding, format,