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/.
28 #include "gdkproperty.h"
29 #include "gdkdisplay.h"
30 #include "gdkselection.h"
34 gdk_selection_owner_set (GdkWindow *owner,
39 return gdk_selection_owner_set_for_display (gdk_display_get_default (),
45 gdk_selection_owner_get (GdkAtom selection)
47 return gdk_selection_owner_get_for_display (gdk_display_get_default (),
52 gdk_selection_send_notify (GdkNativeWindow requestor,
58 gdk_selection_send_notify_for_display (gdk_display_get_default (),
60 target, property, time);
64 gdk_text_property_to_text_list (GdkAtom encoding,
70 return gdk_text_property_to_text_list_for_display (gdk_display_get_default (),
71 encoding, format, text, length, list);
75 * gdk_text_property_to_utf8_list:
76 * @encoding: an atom representing the encoding of the text
77 * @format: the format of the property
78 * @text: the text to convert
79 * @length: the length of @text, in bytes
80 * @list: (allow-none): location to store the list of strings or %NULL. The
81 * list should be freed with g_strfreev().
83 * Convert a text property in the giving encoding to
84 * a list of UTF-8 strings.
86 * Return value: the number of strings in the resulting
90 gdk_text_property_to_utf8_list (GdkAtom encoding,
96 return gdk_text_property_to_utf8_list_for_display (gdk_display_get_default (),
97 encoding, format, text, length, list);
101 gdk_string_to_compound_text (const gchar *str,
107 return gdk_string_to_compound_text_for_display (gdk_display_get_default (),
108 str, encoding, format,
113 * gdk_utf8_to_compound_text:
114 * @str: a UTF-8 string
115 * @encoding: location to store resulting encoding
116 * @format: location to store format of the result
117 * @ctext: location to store the data of the result
118 * @length: location to store the length of the data
121 * Convert from UTF-8 to compound text.
123 * Return value: %TRUE if the conversion succeeded, otherwise
127 gdk_utf8_to_compound_text (const gchar *str,
133 return gdk_utf8_to_compound_text_for_display (gdk_display_get_default (),
134 str, encoding, format,
138 #define __GDK_SELECTION_C__
139 #include "gdkaliasdef.c"