?? gdk-properties-and-atoms.html
字號:
and change properties on windows, to convert atomsto and from strings and to manipulate some types ofdata commonly stored in X window properties.</p></div><div class="refsect1" lang="en"><a name="id3272913"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id3272924"></a><h3><a name="GdkAtom"></a>GdkAtom</h3><a class="indexterm" name="id3272936"></a><pre class="programlisting">typedef struct _GdkAtom GdkAtom;</pre><p>An opaque type representing a string as an index into a tableof strings on the X server.</p></div><hr><div class="refsect2" lang="en"><a name="id3272953"></a><h3><a name="GDK-ATOM-TO-POINTER:CAPS"></a>GDK_ATOM_TO_POINTER()</h3><a class="indexterm" name="id3272966"></a><pre class="programlisting">#define GDK_ATOM_TO_POINTER(atom) (atom)</pre><p>Converts a <a class="link" 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><p><span class="term"><em class="parameter"><code>atom</code></em> :</span></p></td><td>a <a class="link" 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="id3273016"></a><h3><a name="GDK-POINTER-TO-ATOM:CAPS"></a>GDK_POINTER_TO_ATOM()</h3></pre><p>Extracts a <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> from a pointer. The <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> must have beenstored in the pointer with <a class="link" 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><p><span class="term"><em class="parameter"><code>ptr</code></em> :</span></p></td><td>a pointer containing a <a class="link" 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="id3273100"></a><h3><a name="GDK-NONE:CAPS"></a>GDK_NONE</h3><a class="indexterm" name="id3273113"></a><pre class="programlisting">#define GDK_NONE _GDK_MAKE_ATOM (0)</pre><p>A null value for <a class="link" 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="id3273143"></a><h3><a name="gdk-text-property-to-text-list"></a>gdk_text_property_to_text_list ()</h3><a class="indexterm" name="id3273156"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gdk_text_property_to_text_list (<a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> format, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar">guchar</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> length, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> ***list);</pre><p>Converts a text string from the encoding as it is stored ina property into an array of strings in the encoding ofthe current local. (The elements of the array representthe nul-separated elements of the original text string.)</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></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><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td><td>the format of the property.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td><td>the text data.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td><td>the length of the property, in items.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>location to store a terminated array of strings in the encoding of the current locale. This array should be freed using <a class="link" href="gdk-Properties-and-Atoms.html#gdk-free-text-list"><code class="function">gdk_free_text_list()</code></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></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="id3273340"></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="id3273357"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gdk_text_property_to_text_list_for_display (<a class="link" href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> format, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar">guchar</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> length, <ahref="/usr/share/gtk-doc/html/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 ofthe current locale. (The elements of the array represent thenul-separated elements of the original text string.)</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td><td> The <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where the encoding is defined.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></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><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td><td> the format of the property.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td><td> The text data.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td><td> The number of items to transform.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td> location to store a terminated array of strings in the encoding of the current locale. This array should be freed using <a class="link" href="gdk-Properties-and-Atoms.html#gdk-free-text-list"><code class="function">gdk_free_text_list()</code></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the number of strings stored in list, or 0, if the conversion failed. </td></tr></tbody></table></div><p class="since">Since 2.2</p></div><hr><div class="refsect2" lang="en"><a name="id3273562"></a><h3><a name="gdk-free-text-list"></a>gdk_free_text_list ()</h3><a class="indexterm" name="id3273575"></a><pre class="programlisting">void gdk_free_text_list (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> **list);</pre><p>Frees the array of strings created by<a class="link" 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><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the value stored in the <em class="parameter"><code>list</code></em> parameter by a call to <a class="link" 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="id3273651"></a><h3><a name="gdk-text-property-to-utf8-list"></a>gdk_text_property_to_utf8_list ()</h3><a class="indexterm" name="id3273665"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gdk_text_property_to_utf8_list (<a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> encoding, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> format, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar">guchar</a> *text, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> length, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> ***list);</pre><p>Convert a text property in the giving encoding toa list of UTF-8 strings.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td><td> an atom representing the encoding of the text</td></tr><tr><td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td><td> the format of the property</td></tr><tr><td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td><td> the text to convert</td>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -