File: //usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Properties and Atoms</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Drag-and-Drop.html" title="Drag and Drop">
<link rel="next" href="gdk-Threads.html" title="Threads">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="reference.html" title="API Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Drag-and-Drop.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-Threads.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3110262" class="shortcut">Top</a>
 | 
<a href="#id3111119" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-Properties-and-Atoms"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3110262"></a><span class="refentrytitle">Properties and Atoms</span>
</h2>
<p>Properties and Atoms — Functions to manipulate properties on windows</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <gdk/gdk.h>
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a>;
#define <a href="gdk-Properties-and-Atoms.html#GDK-ATOM-TO-POINTER:CAPS">GDK_ATOM_TO_POINTER</a> (atom)
#define <a href="gdk-Properties-and-Atoms.html#GDK-POINTER-TO-ATOM:CAPS">GDK_POINTER_TO_ATOM</a> (ptr)
#define <a href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS">GDK_NONE</a>
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list">gdk_text_property_to_text_list</a> (<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list-for-display">gdk_text_property_to_text_list_for_display</a>
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);
void <a href="gdk-Properties-and-Atoms.html#gdk-free-text-list">gdk_free_text_list</a> (<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **list);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Properties-and-Atoms.html#gdk-text-property-to-utf8-list">gdk_text_property_to_utf8_list</a> (<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Properties-and-Atoms.html#gdk-text-property-to-utf8-list-for-display">gdk_text_property_to_utf8_list_for_display</a>
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text">gdk_string_to_compound_text</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text-for-display">gdk_string_to_compound_text_for_display</a>
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);
void <a href="gdk-Properties-and-Atoms.html#gdk-free-compound-text">gdk_free_compound_text</a> (<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *ctext);
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gdk-Properties-and-Atoms.html#gdk-utf8-to-string-target">gdk_utf8_to_string_target</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gdk-Properties-and-Atoms.html#gdk-utf8-to-compound-text">gdk_utf8_to_compound_text</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gdk-Properties-and-Atoms.html#gdk-utf8-to-compound-text-for-display">gdk_utf8_to_compound_text_for_display</a>
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> <a href="gdk-Properties-and-Atoms.html#gdk-atom-intern">gdk_atom_intern</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *atom_name,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> only_if_exists);
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> <a href="gdk-Properties-and-Atoms.html#gdk-atom-intern-static-string">gdk_atom_intern_static_string</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *atom_name);
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gdk-Properties-and-Atoms.html#gdk-atom-name">gdk_atom_name</a> (<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> atom);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gdk-Properties-and-Atoms.html#gdk-property-get">gdk_property_get</a> (<a href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> type,
<a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> offset,
<a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pdelete,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *actual_property_type,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *actual_format,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *actual_length,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **data);
void <a href="gdk-Properties-and-Atoms.html#gdk-property-change">gdk_property_change</a> (<a href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> type,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
<a href="gdk-Properties-and-Atoms.html#GdkPropMode">GdkPropMode</a> mode,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *data,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> nelements);
enum <a href="gdk-Properties-and-Atoms.html#GdkPropMode">GdkPropMode</a>;
void <a href="gdk-Properties-and-Atoms.html#gdk-property-delete">gdk_property_delete</a> (<a href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3111119"></a><h2>Description</h2>
<p>
Each window under X can have any number of associated
<em class="firstterm">properties</em> attached to it.
Properties are arbitrary chunks of data identified by
<em class="firstterm">atom</em>s. (An <em class="firstterm">atom</em>
is a numeric index into a string table on the X server. They are used
to transfer strings efficiently between clients without
having to transfer the entire string.) A property
has an associated type, which is also identified
using an atom.
</p>
<p>
A property has an associated <em class="firstterm">format</em>,
an integer describing how many bits are in each unit
of data inside the property. It must be 8, 16, or 32.
When data is transferred between the server and client,
if they are of different endianesses it will be byteswapped
as necessary according to the format of the property.
Note that on the client side, properties of format 32
will be stored with one unit per <span class="emphasis"><em>long</em></span>,
even if a long integer has more than 32 bits on the platform.
(This decision was apparently made for Xlib to maintain
compatibility with programs that assumed longs were 32
bits, at the expense of programs that knew better.)
</p>
<p>
The functions in this section are used to add, remove
and change properties on windows, to convert atoms
to and from strings and to manipulate some types of
data commonly stored in X window properties.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3111179"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3111189"></a><h3>
<a name="GdkAtom"></a>GdkAtom</h3>
<a class="indexterm" name="id3111201"></a><pre class="programlisting">typedef struct _GdkAtom GdkAtom;</pre>
<p>
An opaque type representing a string as an index into a table
of strings on the X server.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3111218"></a><h3>
<a name="GDK-ATOM-TO-POINTER:CAPS"></a>GDK_ATOM_TO_POINTER()</h3>
<a class="indexterm" name="id3111232"></a><pre class="programlisting">#define GDK_ATOM_TO_POINTER(atom) (atom)
</pre>
<p>
Converts a <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> into a pointer type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>atom</code></em> :</span></td>
<td>a <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3111282"></a><h3>
<a name="GDK-POINTER-TO-ATOM:CAPS"></a>GDK_POINTER_TO_ATOM()</h3>
<a class="indexterm" name="id3111295"></a><pre class="programlisting">#define GDK_POINTER_TO_ATOM(ptr) ((GdkAtom)(ptr))
</pre>
<p>
Extracts a <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> from a pointer. The <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> must have been
stored in the pointer with <a href="gdk-Properties-and-Atoms.html#GDK-ATOM-TO-POINTER:CAPS"><code class="function">GDK_ATOM_TO_POINTER()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>ptr</code></em> :</span></td>
<td>a pointer containing a <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3111365"></a><h3>
<a name="GDK-NONE:CAPS"></a>GDK_NONE</h3>
<a class="indexterm" name="id3111378"></a><pre class="programlisting">#define GDK_NONE _GDK_MAKE_ATOM (0)
</pre>
<p>
A null value for <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>, used in a similar way as <code class="literal">None</code>
in the Xlib API.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3111408"></a><h3>
<a name="gdk-text-property-to-text-list"></a>gdk_text_property_to_text_list ()</h3>
<a class="indexterm" name="id3111422"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_property_to_text_list (<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);</pre>
<p>
Converts a text string from the encoding as it is stored in
a property into an array of strings in the encoding of
the current local. (The elements of the array represent
the nul-separated elements of the original text string.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td>an atom representing the encoding. The most common
values for this are <code class="literal">STRING</code>,
or <code class="literal">COMPOUND_TEXT</code>. This is
value used as the type for the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td>the format of the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td>the text data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td>the length of the property, in items.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td>location to store a terminated array of strings
in the encoding of the current locale. This
array should be freed using <a href="gdk-Properties-and-Atoms.html#gdk-free-text-list"><code class="function">gdk_free_text_list()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the number of strings stored in <em class="parameter"><code>list</code></em>, or 0,
if the conversion failed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3111604"></a><h3>
<a name="gdk-text-property-to-text-list-for-display"></a>gdk_text_property_to_text_list_for_display ()</h3>
<a class="indexterm" name="id3111622"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_property_to_text_list_for_display
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);</pre>
<p>
Convert a text string from the encoding as it is stored
in a property into an array of strings in the encoding of
the current locale. (The elements of the array represent the
nul-separated elements of the original text string.)</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em> :</span></td>
<td> The <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where the encoding is defined.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td> an atom representing the encoding. The most
common values for this are STRING, or COMPOUND_TEXT.
This is value used as the type for the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td> the format of the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> The text data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> The number of items to transform.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> location to store a terminated array of strings in
the encoding of the current locale. This array should be
freed using <a href="gdk-Properties-and-Atoms.html#gdk-free-text-list"><code class="function">gdk_free_text_list()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the number of strings stored in list, or 0,
if the conversion failed.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3111823"></a><h3>
<a name="gdk-free-text-list"></a>gdk_free_text_list ()</h3>
<a class="indexterm" name="id3111836"></a><pre class="programlisting">void gdk_free_text_list (<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **list);</pre>
<p>
Frees the array of strings created by
<a href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list"><code class="function">gdk_text_property_to_text_list()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td>the value stored in the <em class="parameter"><code>list</code></em> parameter by
a call to <a href="gdk-Properties-and-Atoms.html#gdk-text-property-to-text-list"><code class="function">gdk_text_property_to_text_list()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3111911"></a><h3>
<a name="gdk-text-property-to-utf8-list"></a>gdk_text_property_to_utf8_list ()</h3>
<a class="indexterm" name="id3111925"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_property_to_utf8_list (<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);</pre>
<p>
Convert a text property in the giving encoding to
a list of UTF-8 strings.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td> an atom representing the encoding of the text
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td> the format of the property
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to convert
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> the length of <em class="parameter"><code>text</code></em>, in bytes
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> location to store the list of strings or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. The
list should be freed with <a
href="../glib/glib-String-Utility-Functions.html#g-strfreev"
><code class="function">g_strfreev()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the number of strings in the resulting
list.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3112104"></a><h3>
<a name="gdk-text-property-to-utf8-list-for-display"></a>gdk_text_property_to_utf8_list_for_display ()</h3>
<a class="indexterm" name="id3112121"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_text_property_to_utf8_list_for_display
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> ***list);</pre>
<p>
Converts a text property in the given encoding to
a list of UTF-8 strings.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em> :</span></td>
<td> a <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td> an atom representing the encoding of the text
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td> the format of the property
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to convert
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> the length of <em class="parameter"><code>text</code></em>, in bytes
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>list</code></em> :</span></td>
<td> location to store the list of strings or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. The
list should be freed with <a
href="../glib/glib-String-Utility-Functions.html#g-strfreev"
><code class="function">g_strfreev()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the number of strings in the resulting
list.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3112332"></a><h3>
<a name="gdk-string-to-compound-text"></a>gdk_string_to_compound_text ()</h3>
<a class="indexterm" name="id3112346"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_string_to_compound_text (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);</pre>
<p>
Converts a string from the encoding of the current locale
into a form suitable for storing in a window property.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td>a nul-terminated string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td>location to store the encoding atom (to be used as the type for the property).
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td>location to store the format for the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ctext</code></em> :</span></td>
<td>location to store newly allocated data for the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td>location to store the length of <em class="parameter"><code>ctext</code></em> in items.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>0 upon sucess, non-zero upon failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3112501"></a><h3>
<a name="gdk-string-to-compound-text-for-display"></a>gdk_string_to_compound_text_for_display ()</h3>
<a class="indexterm" name="id3112517"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gdk_string_to_compound_text_for_display
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);</pre>
<p>
Convert a string from the encoding of the current
locale into a form suitable for storing in a window property.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em> :</span></td>
<td> the <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where the encoding is defined.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> a nul-terminated string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td> location to store the encoding atom
(to be used as the type for the property).
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td> location to store the format of the property
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ctext</code></em> :</span></td>
<td> location to store newly allocated data for the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> the length of <em class="parameter"><code>text</code></em>, in bytes
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> 0 upon sucess, non-zero upon failure.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3112710"></a><h3>
<a name="gdk-free-compound-text"></a>gdk_free_compound_text ()</h3>
<a class="indexterm" name="id3112723"></a><pre class="programlisting">void gdk_free_compound_text (<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *ctext);</pre>
<p>
Frees the data returned from <a href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text"><code class="function">gdk_string_to_compound_text()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>ctext</code></em> :</span></td>
<td>The pointer stored in <em class="parameter"><code>ctext</code></em> from a call to <a href="gdk-Properties-and-Atoms.html#gdk-string-to-compound-text"><code class="function">gdk_string_to_compound_text()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3112799"></a><h3>
<a name="gdk-utf8-to-string-target"></a>gdk_utf8_to_string_target ()</h3>
<a class="indexterm" name="id3112813"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gdk_utf8_to_string_target (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Converts an UTF-8 string into the best possible representation
as a STRING. The representation of characters not in STRING
is not specified; it may be as pseudo-escape sequences
\x{ABCD}, or it may be in some other form of approximation.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> a UTF-8 string
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly-allocated string, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the
conversion failed. (It should not fail for
any properly formed UTF-8 string unless system
limits like memory or file descriptors are exceeded.)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3112890"></a><h3>
<a name="gdk-utf8-to-compound-text"></a>gdk_utf8_to_compound_text ()</h3>
<a class="indexterm" name="id3112904"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gdk_utf8_to_compound_text (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);</pre>
<p>
Convert from UTF-8 to compound text.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> a UTF-8 string
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td> location to store resulting encoding
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td> location to store format of the result
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ctext</code></em> :</span></td>
<td> location to store the data of the result
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> location to store the length of the data
stored in <em class="parameter"><code>ctext</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the conversion succeeded, otherwise
false.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3113069"></a><h3>
<a name="gdk-utf8-to-compound-text-for-display"></a>gdk_utf8_to_compound_text_for_display ()</h3>
<a class="indexterm" name="id3113086"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gdk_utf8_to_compound_text_for_display
(<a href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *encoding,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *format,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **ctext,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *length);</pre>
<p>
Converts from UTF-8 to compound text.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>display</code></em> :</span></td>
<td> a <a href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> a UTF-8 string
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>encoding</code></em> :</span></td>
<td> location to store resulting encoding
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td> location to store format of the result
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ctext</code></em> :</span></td>
<td> location to store the data of the result
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> location to store the length of the data
stored in <em class="parameter"><code>ctext</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the conversion succeeded, otherwise
<a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3113296"></a><h3>
<a name="gdk-atom-intern"></a>gdk_atom_intern ()</h3>
<a class="indexterm" name="id3113309"></a><pre class="programlisting"><a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> gdk_atom_intern (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *atom_name,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> only_if_exists);</pre>
<p>
Finds or creates an atom corresponding to a given string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>atom_name</code></em> :</span></td>
<td>a string.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>only_if_exists</code></em> :</span></td>
<td>if <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, GDK is allowed to not create a new atom, but
just return <a href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a> if the requested atom doesn't already
exists. Currently, the flag is ignored, since checking the
existance of an atom is as expensive as creating it.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the atom corresponding to <em class="parameter"><code>atom_name</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3113420"></a><h3>
<a name="gdk-atom-intern-static-string"></a>gdk_atom_intern_static_string ()</h3>
<a class="indexterm" name="id3113436"></a><pre class="programlisting"><a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> gdk_atom_intern_static_string (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *atom_name);</pre>
<p>
Finds or creates an atom corresponding to a given string.
</p>
<p>
Note that this function is identical to <a href="gdk-Properties-and-Atoms.html#gdk-atom-intern"><code class="function">gdk_atom_intern()</code></a> except
that if a new <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> is created the string itself is used rather
than a copy. This saves memory, but can only be used if the string
will <span class="emphasis"><em>always</em></span> exist. It can be used with statically
allocated strings in the main program, but not with statically
allocated memory in dynamically loaded modules, if you expect to
ever unload the module again (e.g. do not use this function in
GTK+ theme engines).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>atom_name</code></em> :</span></td>
<td> a static string
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the atom corresponding to <em class="parameter"><code>atom_name</code></em>
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3113540"></a><h3>
<a name="gdk-atom-name"></a>gdk_atom_name ()</h3>
<a class="indexterm" name="id3113553"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gdk_atom_name (<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> atom);</pre>
<p>
Determines the string corresponding to an atom.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>atom</code></em> :</span></td>
<td>a <a href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a newly-allocated string containing the string
corresponding to <em class="parameter"><code>atom</code></em>. When you are done
with the return value, you should free it
using <a
href="../glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3113637"></a><h3>
<a name="gdk-property-get"></a>gdk_property_get ()</h3>
<a class="indexterm" name="id3113650"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gdk_property_get (<a href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> type,
<a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> offset,
<a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pdelete,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *actual_property_type,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *actual_format,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *actual_length,
<a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> **data);</pre>
<p>
Retrieves a portion of the contents of a property. If the
property does not exist, then the function returns <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>,
and <a href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a> will be stored in <em class="parameter"><code>actual_property_type</code></em>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
The <code class="function">XGetWindowProperty()</code> function that <a href="gdk-Properties-and-Atoms.html#gdk-property-get"><code class="function">gdk_property_get()</code></a>
uses has a very confusing and complicated set of semantics.
Unfortunately, <a href="gdk-Properties-and-Atoms.html#gdk-property-get"><code class="function">gdk_property_get()</code></a> makes the situation
worse instead of better (the semantics should be considered
undefined), and also prints warnings to stderr in cases where it
should return a useful error to the program. You are advised to use
<code class="function">XGetWindowProperty()</code> directly until a replacement function for
<a href="gdk-Properties-and-Atoms.html#gdk-property-get"><code class="function">gdk_property_get()</code></a>
is provided.
</p>
</div>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>window</code></em> :</span></td>
<td>a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>property</code></em> :</span></td>
<td>the property to retrieve.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td>the desired property type, or <a href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a>, if any type of data
is acceptable. If this does not match the actual
type, then <em class="parameter"><code>actual_format</code></em> and <em class="parameter"><code>actual_length</code></em> will
be filled in, a warning will be printed to stderr
and no data will be returned.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>offset</code></em> :</span></td>
<td>the offset into the property at which to begin
retrieving data, in 4 byte units.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td>the length of the data to retrieve in bytes. Data is
considered to be retrieved in 4 byte chunks, so <em class="parameter"><code>length</code></em>
will be rounded up to the next highest 4 byte boundary
(so be careful not to pass a value that might overflow
when rounded up).
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pdelete</code></em> :</span></td>
<td>if <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, delete the property after retrieving the
data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>actual_property_type</code></em> :</span></td>
<td>location to store the actual type of
the property.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>actual_format</code></em> :</span></td>
<td>location to store the actual return format of the
data; either 8, 16 or 32 bits.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>actual_length</code></em> :</span></td>
<td>location to store the length of the retrieved data, in
bytes. Data returned in the 32 bit format is stored
in a long variable, so the actual number of 32 bit
elements should be be calculated via
<em class="parameter"><code>actual_length</code></em>/sizeof(glong) to ensure portability to
64 bit systems.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>location to store a pointer to the data. The retrieved
data should be freed with <a
href="../glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a> when you are finished
using it.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if data was sucessfully received and stored
in <em class="parameter"><code>data</code></em>, otherwise <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3114106"></a><h3>
<a name="gdk-property-change"></a>gdk_property_change ()</h3>
<a class="indexterm" name="id3114119"></a><pre class="programlisting">void gdk_property_change (<a href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> type,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> format,
<a href="gdk-Properties-and-Atoms.html#GdkPropMode">GdkPropMode</a> mode,
const <a
href="../glib/glib-Basic-Types.html#guchar"
>guchar</a> *data,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> nelements);</pre>
<p>
Changes the contents of a property on a window.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>window</code></em> :</span></td>
<td>a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>property</code></em> :</span></td>
<td>the property to change.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
<td>the new type for the property. If <em class="parameter"><code>mode</code></em> is
<a href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-PREPEND:CAPS"><code class="literal">GDK_PROP_MODE_PREPEND</code></a> or <a href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-APPEND:CAPS"><code class="literal">GDK_PROP_MODE_APPEND</code></a>, then this
must match the existing type or an error will occur.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>format</code></em> :</span></td>
<td>the new format for the property. If <em class="parameter"><code>mode</code></em> is
<a href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-PREPEND:CAPS"><code class="literal">GDK_PROP_MODE_PREPEND</code></a> or <a href="gdk-Properties-and-Atoms.html#GDK-PROP-MODE-APPEND:CAPS"><code class="literal">GDK_PROP_MODE_APPEND</code></a>, then this
must match the existing format or an error will occur.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mode</code></em> :</span></td>
<td>a value describing how the new data is to be combined
with the current data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>the data
(a <code class="literal">guchar *</code>
<code class="literal">gushort *</code>, or
<code class="literal">gulong *</code>, depending on <em class="parameter"><code>format</code></em>), cast to a
<code class="literal">guchar *</code>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>nelements</code></em> :</span></td>
<td>the number of elements of size determined by the format,
contained in <em class="parameter"><code>data</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3114404"></a><h3>
<a name="GdkPropMode"></a>enum GdkPropMode</h3>
<a class="indexterm" name="id3114416"></a><pre class="programlisting">typedef enum
{
GDK_PROP_MODE_REPLACE,
GDK_PROP_MODE_PREPEND,
GDK_PROP_MODE_APPEND
} GdkPropMode;
</pre>
<p>
Describes how existing data is combined with new data when
using <a href="gdk-Properties-and-Atoms.html#gdk-property-change"><code class="function">gdk_property_change()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GDK-PROP-MODE-REPLACE:CAPS"></a><code class="literal">GDK_PROP_MODE_REPLACE</code></span></td>
<td>the new data replaces the existing data.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-PROP-MODE-PREPEND:CAPS"></a><code class="literal">GDK_PROP_MODE_PREPEND</code></span></td>
<td>the new data is prepended to the existing data.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GDK-PROP-MODE-APPEND:CAPS"></a><code class="literal">GDK_PROP_MODE_APPEND</code></span></td>
<td>the new data is appended to the existing data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3114518"></a><h3>
<a name="gdk-property-delete"></a>gdk_property_delete ()</h3>
<a class="indexterm" name="id3114531"></a><pre class="programlisting">void gdk_property_delete (<a href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,
<a href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property);</pre>
<p>
Deletes a property from a window.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>window</code></em> :</span></td>
<td>a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>property</code></em> :</span></td>
<td>the property to delete.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>