?? gtk-themeable-stock-images.html
字號:
<a class="link" href="GtkSettings.html" title="Settings"><span class="type">GtkSettings</span></a>. Normally <em class="parameter"><code>size</code></em> would be<span class="type">GTK_ICON_SIZE_MENU</span>, <span class="type">GTK_ICON_SIZE_BUTTON</span>, etc. This functionisn't normally needed, <a class="link" href="GtkWidget.html#gtk-widget-render-icon"><code class="function">gtk_widget_render_icon()</code></a> is the usualway to get an icon for rendering, then just look at the size ofthe rendered pixbuf. The rendered pixbuf may not even correspond tothe width/height returned by <a class="link" href="gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup"><code class="function">gtk_icon_size_lookup()</code></a>, because themesare free to render the pixbuf however they like, including changingthe usual size.</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>settings</code></em> :</span></p></td><td> a <a class="link" href="GtkSettings.html" title="Settings"><span class="type">GtkSettings</span></a> object, used to determine which set of user preferences to used.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td><td> an icon size</td></tr><tr><td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td><td> location to store icon width</td></tr><tr><td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td><td> location to store icon height</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>size</code></em> was a valid size</td></tr></tbody></table></div><p class="since">Since 2.2</p></div><hr><div class="refsect2" lang="en"><a name="id3224341"></a><h3><a name="gtk-icon-size-register"></a>gtk_icon_size_register ()</h3><a class="indexterm" name="id3224354"></a><pre class="programlisting"><a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> gtk_icon_size_register (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *name, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> width, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> height);</pre><p>Registers a new icon size, along the same lines as <span class="type">GTK_ICON_SIZE_MENU</span>,etc. Returns the integer value for the size.</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>name</code></em> :</span></p></td><td> name of the icon size</td></tr><tr><td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td><td> the icon width</td></tr><tr><td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td><td> the icon height</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> integer value representing the size</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3224469"></a><h3><a name="gtk-icon-size-register-alias"></a>gtk_icon_size_register_alias ()</h3><a class="indexterm" name="id3224482"></a><pre class="programlisting">void gtk_icon_size_register_alias (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *alias, <a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> target);</pre><p>Registers <em class="parameter"><code>alias</code></em> as another name for <em class="parameter"><code>target</code></em>.So calling <a class="link" href="gtk-Themeable-Stock-Images.html#gtk-icon-size-from-name"><code class="function">gtk_icon_size_from_name()</code></a> with <em class="parameter"><code>alias</code></em> as argumentwill return <em class="parameter"><code>target</code></em>.</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>alias</code></em> :</span></p></td><td> an alias for <em class="parameter"><code>target</code></em></td></tr><tr><td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td><td> an existing icon size</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3224596"></a><h3><a name="gtk-icon-size-from-name"></a>gtk_icon_size_from_name ()</h3><a class="indexterm" name="id3224609"></a><pre class="programlisting"><a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> gtk_icon_size_from_name (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *name);</pre><p>Looks up the icon size associated with <em class="parameter"><code>name</code></em>.</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>name</code></em> :</span></p></td><td> the name to look up.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the icon size with the given name.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3224676"></a><h3><a name="gtk-icon-size-get-name"></a>gtk_icon_size_get_name ()</h3><a class="indexterm" name="id3224690"></a><pre class="programlisting">const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>* gtk_icon_size_get_name (<a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre><p>Gets the canonical name of the given icon size. The returned string is statically allocated and should not be freed.</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>size</code></em> :</span></p></td><td> a <a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSize"><span class="type">GtkIconSize</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the name of the given icon size.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3224761"></a><h3><a name="gtk-icon-set-get-sizes"></a>gtk_icon_set_get_sizes ()</h3><a class="indexterm" name="id3224774"></a><pre class="programlisting">void gtk_icon_set_get_sizes (<a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set, <a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> **sizes, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *n_sizes);</pre><p>Obtains a list of icon sizes this icon set can render. The returnedarray must be freed with <ahref="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</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>icon_set</code></em> :</span></p></td><td> a <a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>sizes</code></em> :</span></p></td><td> return location for array of sizes</td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_sizes</code></em> :</span></p></td><td> location to store number of elements in returned array</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3224887"></a><h3><a name="gtk-icon-source-get-direction"></a>gtk_icon_source_get_direction ()</h3><a class="indexterm" name="id3224901"></a><pre class="programlisting"><a class="link" href="GtkWidget.html#GtkTextDirection">GtkTextDirection</a> gtk_icon_source_get_direction (const <a class="link" href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre><p>Obtains the text direction this icon source applies to. The returnvalue is only useful/meaningful
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -