1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Properties and Atoms</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
8
<link rel="up" href="reference.html" title="API Reference">
9
<link rel="prev" href="gdk-Drag-and-Drop.html" title="Drag and Drop">
10
<link rel="next" href="gdk-Threads.html" title="Threads">
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="gdk-Drag-and-Drop.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GDK 2 Reference Manual</th>
21
<td><a accesskey="n" href="gdk-Threads.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#gdk-Properties-and-Atoms.synopsis" class="shortcut">Top</a>
26
<a href="#gdk-Properties-and-Atoms.description" class="shortcut">Description</a>
29
<div class="refentry">
30
<a name="gdk-Properties-and-Atoms"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle"><a name="gdk-Properties-and-Atoms.top_of_page"></a>Properties and Atoms</span></h2>
34
<p>Properties and Atoms — Functions to manipulate properties on windows</p>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv">
39
<a name="gdk-Properties-and-Atoms.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">
41
#include <gdk/gdk.h>
43
<a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom">GdkAtom</a>;
44
#define <a class="link" href="gdk-Properties-and-Atoms.html#GDK-ATOM-TO-POINTER:CAPS" title="GDK_ATOM_TO_POINTER()">GDK_ATOM_TO_POINTER</a> (atom)
45
#define <a class="link" href="gdk-Properties-and-Atoms.html#GDK-POINTER-TO-ATOM:CAPS" title="GDK_POINTER_TO_ATOM()">GDK_POINTER_TO_ATOM</a> (ptr)
46
#define <a class="link" href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS" title="GDK_NONE">GDK_NONE</a>
47
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list" title="gdk_text_property_to_text_list ()">gdk_text_property_to_text_list</a> (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
48
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
49
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
50
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
51
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);
52
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list-for-display" title="gdk_text_property_to_text_list_for_display ()">gdk_text_property_to_text_list_for_display</a>
53
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
54
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
55
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
56
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
57
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
58
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);
59
<span class="returnvalue">void</span> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-free-text-list" title="gdk_free_text_list ()">gdk_free_text_list</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **list</code></em>);
60
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-text-property-to-utf8-list" title="gdk_text_property_to_utf8_list ()">gdk_text_property_to_utf8_list</a> (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
61
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
62
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
63
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
64
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);
65
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-text-property-to-utf8-list-for-display" title="gdk_text_property_to_utf8_list_for_display ()">gdk_text_property_to_utf8_list_for_display</a>
66
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
67
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
68
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
69
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
70
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
71
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);
72
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text" title="gdk_string_to_compound_text ()">gdk_string_to_compound_text</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
73
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
74
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
75
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
76
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);
77
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text-for-display" title="gdk_string_to_compound_text_for_display ()">gdk_string_to_compound_text_for_display</a>
78
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
79
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
80
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
81
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
82
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
83
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);
84
<span class="returnvalue">void</span> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-free-compound-text" title="gdk_free_compound_text ()">gdk_free_compound_text</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *ctext</code></em>);
85
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gdk-Properties-and-Atoms.html#gdk-utf8-to-string-target" title="gdk_utf8_to_string_target ()">gdk_utf8_to_string_target</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);
86
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-utf8-to-compound-text" title="gdk_utf8_to_compound_text ()">gdk_utf8_to_compound_text</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
87
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
88
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
89
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
90
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);
91
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-utf8-to-compound-text-for-display" title="gdk_utf8_to_compound_text_for_display ()">gdk_utf8_to_compound_text_for_display</a>
92
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
93
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
94
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
95
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
96
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
97
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);
98
<a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="returnvalue">GdkAtom</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-atom-intern" title="gdk_atom_intern ()">gdk_atom_intern</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *atom_name</code></em>,
99
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_if_exists</code></em>);
100
<a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="returnvalue">GdkAtom</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-atom-intern-static-string" title="gdk_atom_intern_static_string ()">gdk_atom_intern_static_string</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *atom_name</code></em>);
101
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gdk-Properties-and-Atoms.html#gdk-atom-name" title="gdk_atom_name ()">gdk_atom_name</a> (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> atom</code></em>);
102
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-property-get" title="gdk_property_get ()">gdk_property_get</a> (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
103
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
104
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> type</code></em>,
105
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> offset</code></em>,
106
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> length</code></em>,
107
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> pdelete</code></em>,
108
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *actual_property_type</code></em>,
109
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *actual_format</code></em>,
110
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *actual_length</code></em>,
111
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **data</code></em>);
112
<span class="returnvalue">void</span> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-property-change" title="gdk_property_change ()">gdk_property_change</a> (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
113
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
114
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> type</code></em>,
115
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
116
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkPropMode" title="enum GdkPropMode"><span class="type">GdkPropMode</span></a> mode</code></em>,
117
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
118
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> nelements</code></em>);
119
enum <a class="link" href="gdk-Properties-and-Atoms.html#GdkPropMode" title="enum GdkPropMode">GdkPropMode</a>;
120
<span class="returnvalue">void</span> <a class="link" href="gdk-Properties-and-Atoms.html#gdk-property-delete" title="gdk_property_delete ()">gdk_property_delete</a> (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
121
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>);
124
<div class="refsect1">
125
<a name="gdk-Properties-and-Atoms.description"></a><h2>Description</h2>
127
Each window under X can have any number of associated
128
<em class="firstterm">properties</em> attached to it.
129
Properties are arbitrary chunks of data identified by
130
<em class="firstterm">atom</em>s. (An <em class="firstterm">atom</em>
131
is a numeric index into a string table on the X server. They are used
132
to transfer strings efficiently between clients without
133
having to transfer the entire string.) A property
134
has an associated type, which is also identified
138
A property has an associated <em class="firstterm">format</em>,
139
an integer describing how many bits are in each unit
140
of data inside the property. It must be 8, 16, or 32.
141
When data is transferred between the server and client,
142
if they are of different endianesses it will be byteswapped
143
as necessary according to the format of the property.
144
Note that on the client side, properties of format 32
145
will be stored with one unit per <span class="emphasis"><em>long</em></span>,
146
even if a long integer has more than 32 bits on the platform.
147
(This decision was apparently made for Xlib to maintain
148
compatibility with programs that assumed longs were 32
149
bits, at the expense of programs that knew better.)
152
The functions in this section are used to add, remove
153
and change properties on windows, to convert atoms
154
to and from strings and to manipulate some types of
155
data commonly stored in X window properties.
158
<div class="refsect1">
159
<a name="gdk-Properties-and-Atoms.details"></a><h2>Details</h2>
160
<div class="refsect2">
161
<a name="GdkAtom"></a><h3>GdkAtom</h3>
162
<pre class="programlisting">typedef struct _GdkAtom GdkAtom;</pre>
164
An opaque type representing a string as an index into a table
165
of strings on the X server.
169
<div class="refsect2">
170
<a name="GDK-ATOM-TO-POINTER:CAPS"></a><h3>GDK_ATOM_TO_POINTER()</h3>
171
<pre class="programlisting">#define GDK_ATOM_TO_POINTER(atom) (atom)
174
Converts a <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> into a pointer type.
176
<div class="variablelist"><table border="0" class="variablelist">
178
<col align="left" valign="top">
182
<td><p><span class="term"><em class="parameter"><code>atom</code></em> :</span></p></td>
183
<td>a <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>.</td>
188
<div class="refsect2">
189
<a name="GDK-POINTER-TO-ATOM:CAPS"></a><h3>GDK_POINTER_TO_ATOM()</h3>
190
<pre class="programlisting">#define GDK_POINTER_TO_ATOM(ptr) ((GdkAtom)(ptr))
193
Extracts a <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> from a pointer. The <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> must have been
194
stored in the pointer with <a class="link" href="gdk-Properties-and-Atoms.html#GDK-ATOM-TO-POINTER:CAPS" title="GDK_ATOM_TO_POINTER()"><code class="function">GDK_ATOM_TO_POINTER()</code></a>.
196
<div class="variablelist"><table border="0" class="variablelist">
198
<col align="left" valign="top">
202
<td><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td>
203
<td>a pointer containing a <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>.</td>
208
<div class="refsect2">
209
<a name="GDK-NONE:CAPS"></a><h3>GDK_NONE</h3>
210
<pre class="programlisting">#define GDK_NONE _GDK_MAKE_ATOM (0)
213
A null value for <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>, used in a similar way as <code class="literal">None</code>
218
<div class="refsect2">
219
<a name="gdk-text-property-to-text-list"></a><h3>gdk_text_property_to_text_list ()</h3>
220
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gdk_text_property_to_text_list (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
221
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
222
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
223
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
224
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);</pre>
225
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
226
<h3 class="title">Warning</h3>
227
<p><code class="literal">gdk_text_property_to_text_list</code> is deprecated and should not be used in newly-written code.</p>
230
Converts a text string from the encoding as it is stored in
231
a property into an array of strings in the encoding of
232
the current local. (The elements of the array represent
233
the nul-separated elements of the original text string.)
235
<div class="variablelist"><table border="0" class="variablelist">
237
<col align="left" valign="top">
242
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
243
<td>an atom representing the encoding. The most common
244
values for this are <code class="literal">STRING</code>,
245
or <code class="literal">COMPOUND_TEXT</code>. This is
246
value used as the type for the property.</td>
249
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
250
<td>the format of the property.</td>
253
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
254
<td>the text data.</td>
257
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
258
<td>the length of the property, in items.</td>
261
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
262
<td>location to store a terminated array of strings
263
in the encoding of the current locale. This
264
array should be freed using <a class="link" href="gdk-Properties-and-Atoms.html#gdk-free-text-list" title="gdk_free_text_list ()"><code class="function">gdk_free_text_list()</code></a>.</td>
267
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
268
<td>the number of strings stored in <em class="parameter"><code>list</code></em>, or 0,
269
if the conversion failed.</td>
275
<div class="refsect2">
276
<a name="gdk-text-property-to-text-list-for-display"></a><h3>gdk_text_property_to_text_list_for_display ()</h3>
277
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gdk_text_property_to_text_list_for_display
278
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
279
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
280
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
281
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
282
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
283
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);</pre>
284
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
285
<h3 class="title">Warning</h3>
286
<p><code class="literal">gdk_text_property_to_text_list_for_display</code> has been deprecated since version 2.24 and should not be used in newly-written code. Use <code class="function">gdk_x11_display_text_property_to_text_list()</code></p>
289
Convert a text string from the encoding as it is stored
290
in a property into an array of strings in the encoding of
291
the current locale. (The elements of the array represent the
292
nul-separated elements of the original text string.)
294
<div class="variablelist"><table border="0" class="variablelist">
296
<col align="left" valign="top">
301
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
302
<td>The <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where the encoding is defined.</td>
305
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
306
<td>an atom representing the encoding. The most
307
common values for this are STRING, or COMPOUND_TEXT.
308
This is value used as the type for the property.</td>
311
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
312
<td>the format of the property.</td>
315
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
316
<td>The text data.</td>
319
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
320
<td>The number of items to transform.</td>
323
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
324
<td>location to store a terminated array of strings in
325
the encoding of the current locale. This array should be
326
freed using <a class="link" href="gdk-Properties-and-Atoms.html#gdk-free-text-list" title="gdk_free_text_list ()"><code class="function">gdk_free_text_list()</code></a>.</td>
329
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
330
<td>the number of strings stored in list, or 0,
331
if the conversion failed.</td>
335
<p class="since">Since 2.2</p>
338
<div class="refsect2">
339
<a name="gdk-free-text-list"></a><h3>gdk_free_text_list ()</h3>
340
<pre class="programlisting"><span class="returnvalue">void</span> gdk_free_text_list (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **list</code></em>);</pre>
341
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
342
<h3 class="title">Warning</h3>
343
<p><code class="literal">gdk_free_text_list</code> is deprecated and should not be used in newly-written code.</p>
346
Frees the array of strings created by
347
<a class="link" href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list" title="gdk_text_property_to_text_list ()"><code class="function">gdk_text_property_to_text_list()</code></a>.
349
<div class="variablelist"><table border="0" class="variablelist">
351
<col align="left" valign="top">
355
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
356
<td>the value stored in the <em class="parameter"><code>list</code></em> parameter by
357
a call to <a class="link" href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list" title="gdk_text_property_to_text_list ()"><code class="function">gdk_text_property_to_text_list()</code></a>.</td>
362
<div class="refsect2">
363
<a name="gdk-text-property-to-utf8-list"></a><h3>gdk_text_property_to_utf8_list ()</h3>
364
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gdk_text_property_to_utf8_list (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
365
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
366
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
367
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
368
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);</pre>
369
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
370
<h3 class="title">Warning</h3>
371
<p><code class="literal">gdk_text_property_to_utf8_list</code> is deprecated and should not be used in newly-written code.</p>
374
Convert a text property in the giving encoding to
375
a list of UTF-8 strings.
377
<div class="variablelist"><table border="0" class="variablelist">
379
<col align="left" valign="top">
384
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
385
<td>an atom representing the encoding of the text</td>
388
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
389
<td>the format of the property</td>
392
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
393
<td>the text to convert</td>
396
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
397
<td>the length of <em class="parameter"><code>text</code></em>, in bytes</td>
400
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
401
<td>location to store the list of strings or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The
402
list should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.</td>
405
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
406
<td>the number of strings in the resulting
413
<div class="refsect2">
414
<a name="gdk-text-property-to-utf8-list-for-display"></a><h3>gdk_text_property_to_utf8_list_for_display ()</h3>
415
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gdk_text_property_to_utf8_list_for_display
416
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
417
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> encoding</code></em>,
418
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
419
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *text</code></em>,
420
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
421
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> ***list</code></em>);</pre>
423
Converts a text property in the given encoding to
424
a list of UTF-8 strings.
426
<div class="variablelist"><table border="0" class="variablelist">
428
<col align="left" valign="top">
433
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
434
<td>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
438
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
439
<td>an atom representing the encoding of the text</td>
442
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
443
<td>the format of the property</td>
446
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
447
<td>the text to convert</td>
450
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
451
<td>the length of <em class="parameter"><code>text</code></em>, in bytes</td>
454
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
455
<td>location to store the list of strings or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The
456
list should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.</td>
459
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
460
<td>the number of strings in the resulting
465
<p class="since">Since 2.2</p>
468
<div class="refsect2">
469
<a name="gdk-string-to-compound-text"></a><h3>gdk_string_to_compound_text ()</h3>
470
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gdk_string_to_compound_text (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
471
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
472
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
473
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
474
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);</pre>
475
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
476
<h3 class="title">Warning</h3>
477
<p><code class="literal">gdk_string_to_compound_text</code> is deprecated and should not be used in newly-written code.</p>
480
Converts a string from the encoding of the current locale
481
into a form suitable for storing in a window property.
483
<div class="variablelist"><table border="0" class="variablelist">
485
<col align="left" valign="top">
490
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
491
<td>a nul-terminated string.</td>
494
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
495
<td>location to store the encoding atom (to be used as the type for the property).</td>
498
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
499
<td>location to store the format for the property.</td>
502
<td><p><span class="term"><em class="parameter"><code>ctext</code></em> :</span></p></td>
503
<td>location to store newly allocated data for the property.</td>
506
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
507
<td>location to store the length of <em class="parameter"><code>ctext</code></em> in items.</td>
510
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
511
<td>0 upon sucess, non-zero upon failure.</td>
517
<div class="refsect2">
518
<a name="gdk-string-to-compound-text-for-display"></a><h3>gdk_string_to_compound_text_for_display ()</h3>
519
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gdk_string_to_compound_text_for_display
520
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
521
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
522
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
523
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
524
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
525
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);</pre>
526
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
527
<h3 class="title">Warning</h3>
528
<p><code class="literal">gdk_string_to_compound_text_for_display</code> has been deprecated since version 2.24 and should not be used in newly-written code. Use <code class="function">gdk_x11_display_string_to_compound_text()</code></p>
531
Convert a string from the encoding of the current
532
locale into a form suitable for storing in a window property.
534
<div class="variablelist"><table border="0" class="variablelist">
536
<col align="left" valign="top">
541
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
542
<td>the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where the encoding is defined.</td>
545
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
546
<td>a nul-terminated string.</td>
549
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
550
<td>location to store the encoding atom
551
(to be used as the type for the property).</td>
554
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
555
<td>location to store the format of the property</td>
558
<td><p><span class="term"><em class="parameter"><code>ctext</code></em> :</span></p></td>
559
<td>location to store newly allocated data for the property.</td>
562
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
563
<td>the length of <em class="parameter"><code>text</code></em>, in bytes</td>
566
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
567
<td>0 upon success, non-zero upon failure.</td>
571
<p class="since">Since 2.2</p>
574
<div class="refsect2">
575
<a name="gdk-free-compound-text"></a><h3>gdk_free_compound_text ()</h3>
576
<pre class="programlisting"><span class="returnvalue">void</span> gdk_free_compound_text (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *ctext</code></em>);</pre>
577
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
578
<h3 class="title">Warning</h3>
579
<p><code class="literal">gdk_free_compound_text</code> is deprecated and should not be used in newly-written code.</p>
582
Frees the data returned from <a class="link" href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text" title="gdk_string_to_compound_text ()"><code class="function">gdk_string_to_compound_text()</code></a>.
584
<div class="variablelist"><table border="0" class="variablelist">
586
<col align="left" valign="top">
590
<td><p><span class="term"><em class="parameter"><code>ctext</code></em> :</span></p></td>
591
<td>The pointer stored in <em class="parameter"><code>ctext</code></em> from a call to <a class="link" href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text" title="gdk_string_to_compound_text ()"><code class="function">gdk_string_to_compound_text()</code></a>.</td>
596
<div class="refsect2">
597
<a name="gdk-utf8-to-string-target"></a><h3>gdk_utf8_to_string_target ()</h3>
598
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gdk_utf8_to_string_target (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
600
Convert an UTF-8 string into the best possible representation
601
as a STRING. The representation of characters not in STRING
602
is not specified; it may be as pseudo-escape sequences
603
\x{ABCD}, or it may be in some other form of approximation.
605
<div class="variablelist"><table border="0" class="variablelist">
607
<col align="left" valign="top">
612
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
613
<td>a UTF-8 string</td>
616
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
617
<td>the newly allocated string, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
618
conversion failed. (It should not fail for
619
any properly formed UTF-8 string.)</td>
625
<div class="refsect2">
626
<a name="gdk-utf8-to-compound-text"></a><h3>gdk_utf8_to_compound_text ()</h3>
627
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gdk_utf8_to_compound_text (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
628
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
629
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
630
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
631
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);</pre>
632
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
633
<h3 class="title">Warning</h3>
634
<p><code class="literal">gdk_utf8_to_compound_text</code> is deprecated and should not be used in newly-written code.</p>
637
Convert from UTF-8 to compound text.
639
<div class="variablelist"><table border="0" class="variablelist">
641
<col align="left" valign="top">
646
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
647
<td>a UTF-8 string</td>
650
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
651
<td>location to store resulting encoding</td>
654
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
655
<td>location to store format of the result</td>
658
<td><p><span class="term"><em class="parameter"><code>ctext</code></em> :</span></p></td>
659
<td>location to store the data of the result</td>
662
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
663
<td>location to store the length of the data
664
stored in <em class="parameter"><code>ctext</code></em>
668
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
670
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the conversion succeeded, otherwise
677
<div class="refsect2">
678
<a name="gdk-utf8-to-compound-text-for-display"></a><h3>gdk_utf8_to_compound_text_for_display ()</h3>
679
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gdk_utf8_to_compound_text_for_display
680
(<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
681
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
682
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *encoding</code></em>,
683
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *format</code></em>,
684
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **ctext</code></em>,
685
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *length</code></em>);</pre>
686
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
687
<h3 class="title">Warning</h3>
688
<p><code class="literal">gdk_utf8_to_compound_text_for_display</code> has been deprecated since version 2.24 and should not be used in newly-written code. Use <code class="function">gdk_x11_display_utf8_to_compound_text()</code></p>
691
Converts from UTF-8 to compound text.
693
<div class="variablelist"><table border="0" class="variablelist">
695
<col align="left" valign="top">
700
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
701
<td>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
705
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
706
<td>a UTF-8 string</td>
709
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
710
<td>location to store resulting encoding</td>
713
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
714
<td>location to store format of the result</td>
717
<td><p><span class="term"><em class="parameter"><code>ctext</code></em> :</span></p></td>
718
<td>location to store the data of the result</td>
721
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
722
<td>location to store the length of the data
723
stored in <em class="parameter"><code>ctext</code></em>
727
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
729
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the conversion succeeded, otherwise
730
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
734
<p class="since">Since 2.2</p>
737
<div class="refsect2">
738
<a name="gdk-atom-intern"></a><h3>gdk_atom_intern ()</h3>
739
<pre class="programlisting"><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="returnvalue">GdkAtom</span></a> gdk_atom_intern (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *atom_name</code></em>,
740
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_if_exists</code></em>);</pre>
742
Finds or creates an atom corresponding to a given string.
744
<div class="variablelist"><table border="0" class="variablelist">
746
<col align="left" valign="top">
751
<td><p><span class="term"><em class="parameter"><code>atom_name</code></em> :</span></p></td>
755
<td><p><span class="term"><em class="parameter"><code>only_if_exists</code></em> :</span></p></td>
756
<td>if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, GDK is allowed to not create a new atom, but
757
just return <a class="link" href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS" title="GDK_NONE"><code class="literal">GDK_NONE</code></a> if the requested atom doesn't already
758
exists. Currently, the flag is ignored, since checking the
759
existance of an atom is as expensive as creating it.</td>
762
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
763
<td>the atom corresponding to <em class="parameter"><code>atom_name</code></em>.</td>
769
<div class="refsect2">
770
<a name="gdk-atom-intern-static-string"></a><h3>gdk_atom_intern_static_string ()</h3>
771
<pre class="programlisting"><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="returnvalue">GdkAtom</span></a> gdk_atom_intern_static_string (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *atom_name</code></em>);</pre>
773
Finds or creates an atom corresponding to a given string.
776
Note that this function is identical to <a class="link" href="gdk-Properties-and-Atoms.html#gdk-atom-intern" title="gdk_atom_intern ()"><code class="function">gdk_atom_intern()</code></a> except
777
that if a new <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> is created the string itself is used rather
778
than a copy. This saves memory, but can only be used if the string
779
will <span class="emphasis"><em>always</em></span> exist. It can be used with statically
780
allocated strings in the main program, but not with statically
781
allocated memory in dynamically loaded modules, if you expect to
782
ever unload the module again (e.g. do not use this function in
785
<div class="variablelist"><table border="0" class="variablelist">
787
<col align="left" valign="top">
792
<td><p><span class="term"><em class="parameter"><code>atom_name</code></em> :</span></p></td>
793
<td>a static string</td>
796
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
797
<td>the atom corresponding to <em class="parameter"><code>atom_name</code></em>
802
<p class="since">Since 2.10</p>
805
<div class="refsect2">
806
<a name="gdk-atom-name"></a><h3>gdk_atom_name ()</h3>
807
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gdk_atom_name (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> atom</code></em>);</pre>
809
Determines the string corresponding to an atom.
811
<div class="variablelist"><table border="0" class="variablelist">
813
<col align="left" valign="top">
818
<td><p><span class="term"><em class="parameter"><code>atom</code></em> :</span></p></td>
819
<td>a <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>.</td>
822
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
823
<td>a newly-allocated string containing the string
824
corresponding to <em class="parameter"><code>atom</code></em>. When you are done
825
with the return value, you should free it
826
using <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
832
<div class="refsect2">
833
<a name="gdk-property-get"></a><h3>gdk_property_get ()</h3>
834
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gdk_property_get (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
835
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
836
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> type</code></em>,
837
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> offset</code></em>,
838
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> length</code></em>,
839
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> pdelete</code></em>,
840
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> *actual_property_type</code></em>,
841
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *actual_format</code></em>,
842
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *actual_length</code></em>,
843
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **data</code></em>);</pre>
845
Retrieves a portion of the contents of a property. If the
846
property does not exist, then the function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>,
847
and <a class="link" href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS" title="GDK_NONE"><code class="literal">GDK_NONE</code></a> will be stored in <em class="parameter"><code>actual_property_type</code></em>.
849
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
850
<h3 class="title">Note</h3>
852
The <code class="function">XGetWindowProperty()</code> function that <a class="link" href="gdk-Properties-and-Atoms.html#gdk-property-get" title="gdk_property_get ()"><code class="function">gdk_property_get()</code></a>
853
uses has a very confusing and complicated set of semantics.
854
Unfortunately, <a class="link" href="gdk-Properties-and-Atoms.html#gdk-property-get" title="gdk_property_get ()"><code class="function">gdk_property_get()</code></a> makes the situation
855
worse instead of better (the semantics should be considered
856
undefined), and also prints warnings to stderr in cases where it
857
should return a useful error to the program. You are advised to use
858
<code class="function">XGetWindowProperty()</code> directly until a replacement function for
859
<a class="link" href="gdk-Properties-and-Atoms.html#gdk-property-get" title="gdk_property_get ()"><code class="function">gdk_property_get()</code></a>
863
<div class="variablelist"><table border="0" class="variablelist">
865
<col align="left" valign="top">
870
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
871
<td>a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.</td>
874
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
875
<td>the property to retrieve.</td>
878
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
879
<td>the desired property type, or <a class="link" href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS" title="GDK_NONE"><code class="literal">GDK_NONE</code></a>, if any type of data
880
is acceptable. If this does not match the actual
881
type, then <em class="parameter"><code>actual_format</code></em> and <em class="parameter"><code>actual_length</code></em> will
882
be filled in, a warning will be printed to stderr
883
and no data will be returned.</td>
886
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
887
<td>the offset into the property at which to begin
888
retrieving data, in 4 byte units.</td>
891
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
892
<td>the length of the data to retrieve in bytes. Data is
893
considered to be retrieved in 4 byte chunks, so <em class="parameter"><code>length</code></em>
894
will be rounded up to the next highest 4 byte boundary
895
(so be careful not to pass a value that might overflow
896
when rounded up).</td>
899
<td><p><span class="term"><em class="parameter"><code>pdelete</code></em> :</span></p></td>
900
<td>if <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, delete the property after retrieving the
904
<td><p><span class="term"><em class="parameter"><code>actual_property_type</code></em> :</span></p></td>
905
<td>location to store the actual type of
909
<td><p><span class="term"><em class="parameter"><code>actual_format</code></em> :</span></p></td>
910
<td>location to store the actual return format of the
911
data; either 8, 16 or 32 bits.</td>
914
<td><p><span class="term"><em class="parameter"><code>actual_length</code></em> :</span></p></td>
915
<td>location to store the length of the retrieved data, in
916
bytes. Data returned in the 32 bit format is stored
917
in a long variable, so the actual number of 32 bit
918
elements should be be calculated via
919
<em class="parameter"><code>actual_length</code></em>/sizeof(glong) to ensure portability to
923
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
924
<td>location to store a pointer to the data. The retrieved
925
data should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when you are finished
929
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
931
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if data was successfully received and stored
932
in <em class="parameter"><code>data</code></em>, otherwise <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
938
<div class="refsect2">
939
<a name="gdk-property-change"></a><h3>gdk_property_change ()</h3>
940
<pre class="programlisting"><span class="returnvalue">void</span> gdk_property_change (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
941
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>,
942
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> type</code></em>,
943
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> format</code></em>,
944
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkPropMode" title="enum GdkPropMode"><span class="type">GdkPropMode</span></a> mode</code></em>,
945
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
946
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> nelements</code></em>);</pre>
948
Changes the contents of a property on a window.
950
<div class="variablelist"><table border="0" class="variablelist">
952
<col align="left" valign="top">
957
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
958
<td>a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.</td>
961
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
962
<td>the property to change.</td>
965
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
966
<td>the new type for the property. If <em class="parameter"><code>mode</code></em> is
967
<a class="link" href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-PREPEND:CAPS"><code class="literal">GDK_PROP_MODE_PREPEND</code></a> or <a class="link" href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-APPEND:CAPS"><code class="literal">GDK_PROP_MODE_APPEND</code></a>, then this
968
must match the existing type or an error will occur.</td>
971
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
972
<td>the new format for the property. If <em class="parameter"><code>mode</code></em> is
973
<a class="link" href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-PREPEND:CAPS"><code class="literal">GDK_PROP_MODE_PREPEND</code></a> or <a class="link" href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-APPEND:CAPS"><code class="literal">GDK_PROP_MODE_APPEND</code></a>, then this
974
must match the existing format or an error will occur.</td>
977
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
978
<td>a value describing how the new data is to be combined
979
with the current data.</td>
982
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
984
(a <code class="literal">guchar *</code>
985
<code class="literal">gushort *</code>, or
986
<code class="literal">gulong *</code>, depending on <em class="parameter"><code>format</code></em>), cast to a
987
<code class="literal">guchar *</code>.</td>
990
<td><p><span class="term"><em class="parameter"><code>nelements</code></em> :</span></p></td>
991
<td>the number of elements of size determined by the format,
992
contained in <em class="parameter"><code>data</code></em>.</td>
998
<div class="refsect2">
999
<a name="GdkPropMode"></a><h3>enum GdkPropMode</h3>
1000
<pre class="programlisting">typedef enum {
1001
GDK_PROP_MODE_REPLACE,
1002
GDK_PROP_MODE_PREPEND,
1003
GDK_PROP_MODE_APPEND
1007
Describes how existing data is combined with new data when
1008
using <a class="link" href="gdk-Properties-and-Atoms.html#gdk-property-change" title="gdk_property_change ()"><code class="function">gdk_property_change()</code></a>.
1010
<div class="variablelist"><table border="0" class="variablelist">
1012
<col align="left" valign="top">
1017
<td><p><a name="GDK-PROP-MODE-REPLACE:CAPS"></a><span class="term"><code class="literal">GDK_PROP_MODE_REPLACE</code></span></p></td>
1018
<td>the new data replaces the existing data.
1022
<td><p><a name="GDK-PROP-MODE-PREPEND:CAPS"></a><span class="term"><code class="literal">GDK_PROP_MODE_PREPEND</code></span></p></td>
1023
<td>the new data is prepended to the existing data.
1027
<td><p><a name="GDK-PROP-MODE-APPEND:CAPS"></a><span class="term"><code class="literal">GDK_PROP_MODE_APPEND</code></span></p></td>
1028
<td>the new data is appended to the existing data.
1035
<div class="refsect2">
1036
<a name="gdk-property-delete"></a><h3>gdk_property_delete ()</h3>
1037
<pre class="programlisting"><span class="returnvalue">void</span> gdk_property_delete (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
1038
<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> property</code></em>);</pre>
1040
Deletes a property from a window.
1042
<div class="variablelist"><table border="0" class="variablelist">
1044
<col align="left" valign="top">
1049
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
1050
<td>a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.</td>
1053
<td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td>
1054
<td>the property to delete.</td>
1061
<div class="footer">
1063
Generated by GTK-Doc V1.18.1</div>
b'\\ No newline at end of file'