File: //usr/share/gtk-doc/html/gtk/gtk-Themeable-Stock-Images.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>Themeable Stock Images</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="prev" href="gtk-Stock-Items.html" title="Stock Items">
<link rel="next" href="gtk-Resource-Files.html" title="Resource Files">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and
GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<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="gtk-Stock-Items.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gtkbase.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">GTK+ Reference Manual</th>
<td><a accesskey="n" href="gtk-Resource-Files.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="#id2642571" class="shortcut">Top</a>
 | 
<a href="#id2643814" class="shortcut">Description</a>
 | 
<a href="#id2643790" class="shortcut">Object Hierarchy</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gtk-Themeable-Stock-Images"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2642571"></a><span class="refentrytitle">Themeable Stock Images</span>
</h2>
<p>Themeable Stock Images —
Manipulating stock icons</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<a name="GtkIconFactory"></a><pre class="synopsis">
#include <gtk/gtk.h>
<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a>;
<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory-struct">GtkIconFactory</a>;
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>;
enum <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a>;
<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-copy">gtk_icon_source_copy</a> (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-free">gtk_icon_source_free</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add">gtk_icon_factory_add</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add-default">gtk_icon_factory_add_default</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-lookup">gtk_icon_factory_lookup</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-lookup-default">gtk_icon_factory_lookup_default</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id);
<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-new">gtk_icon_factory_new</a> (void);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-remove-default">gtk_icon_factory_remove_default</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-add-source">gtk_icon_set_add_source</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-copy">gtk_icon_set_copy</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-new">gtk_icon_set_new</a> (void);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-new-from-pixbuf">gtk_icon_set_new_from_pixbuf</a> (<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-ref">gtk_icon_set_ref</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-render-icon">gtk_icon_set_render_icon</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
<a href="GtkStyle.html" title="Styles">GtkStyle</a> *style,
<a href="GtkWidget.html#GtkTextDirection">GtkTextDirection</a> direction,
<a href="gtk-Standard-Enumerations.html#GtkStateType">GtkStateType</a> state,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size,
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
const char *detail);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-unref">gtk_icon_set_unref</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup">gtk_icon_size_lookup</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *height);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup-for-settings">gtk_icon_size_lookup_for_settings</a>
(<a href="GtkSettings.html" title="Settings">GtkSettings</a> *settings,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *height);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-register">gtk_icon_size_register</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> height);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-register-alias">gtk_icon_size_register_alias</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *alias,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> target);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-from-name">gtk_icon_size_from_name</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name);
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-get-name">gtk_icon_size_get_name</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-get-sizes">gtk_icon_set_get_sizes</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> **sizes,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *n_sizes);
<a href="GtkWidget.html#GtkTextDirection">GtkTextDirection</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-direction">gtk_icon_source_get_direction</a>
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-direction-wildcarded">gtk_icon_source_get_direction_wildcarded</a>
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-filename">gtk_icon_source_get_filename</a> (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-pixbuf">gtk_icon_source_get_pixbuf</a> (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-icon-name">gtk_icon_source_get_icon_name</a> (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-size">gtk_icon_source_get_size</a> (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-size-wildcarded">gtk_icon_source_get_size_wildcarded</a>
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a href="gtk-Standard-Enumerations.html#GtkStateType">GtkStateType</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-state">gtk_icon_source_get_state</a> (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-get-state-wildcarded">gtk_icon_source_get_state_wildcarded</a>
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);
<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a>* <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-new">gtk_icon_source_new</a> (void);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-direction">gtk_icon_source_set_direction</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a href="GtkWidget.html#GtkTextDirection">GtkTextDirection</a> direction);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-direction-wildcarded">gtk_icon_source_set_direction_wildcarded</a>
(<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-filename">gtk_icon_source_set_filename</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-pixbuf">gtk_icon_source_set_pixbuf</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-icon-name">gtk_icon_source_set_icon_name</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *icon_name);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-size">gtk_icon_source_set_size</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-size-wildcarded">gtk_icon_source_set_size_wildcarded</a>
(<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-state">gtk_icon_source_set_state</a> (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a href="gtk-Standard-Enumerations.html#GtkStateType">GtkStateType</a> state);
void <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-state-wildcarded">gtk_icon_source_set_state_wildcarded</a>
(<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2643790"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----GtkIconFactory
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2643814"></a><h2>Description</h2>
<p>
Browse the available stock icons in the list of stock IDs found <a href="gtk-Stock-Items.html" title="Stock Items">here</a>. You can also use
the <span class="application">gtk-demo</span> application for this purpose.
</p>
<p>
An icon factory manages a collection of <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>; a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> manages a
set of variants of a particular icon (i.e. a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> contains variants for
different sizes and widget states). Icons in an icon factory are named by a
stock ID, which is a simple string identifying the icon. Each <a href="GtkStyle.html" title="Styles"><span class="type">GtkStyle</span></a> has a
list of <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a> derived from the current theme; those icon factories
are consulted first when searching for an icon. If the theme doesn't set a
particular icon, GTK+ looks for the icon in a list of default icon factories,
maintained by <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add-default"><code class="function">gtk_icon_factory_add_default()</code></a> and
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-remove-default"><code class="function">gtk_icon_factory_remove_default()</code></a>. Applications with icons should add a default
icon factory with their icons, which will allow themes to override the icons
for the application.
</p>
<p>
To display an icon, always use <a href="GtkStyle.html#gtk-style-lookup-icon-set"><code class="function">gtk_style_lookup_icon_set()</code></a> on the widget that
will display the icon, or the convenience function
<a href="GtkWidget.html#gtk-widget-render-icon"><code class="function">gtk_widget_render_icon()</code></a>. These functions take the theme into account when
looking up the icon to use for a given stock ID.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2643952"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2643962"></a><h3>
<a name="GtkIconSource"></a>GtkIconSource</h3>
<a class="indexterm" name="id2643975"></a><pre class="programlisting">typedef struct _GtkIconSource GtkIconSource;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2643991"></a><h3>
<a name="GtkIconFactory-struct"></a>GtkIconFactory</h3>
<a class="indexterm" name="id2644004"></a><pre class="programlisting">typedef struct _GtkIconFactory GtkIconFactory;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644020"></a><h3>
<a name="GtkIconSet"></a>GtkIconSet</h3>
<a class="indexterm" name="id2644031"></a><pre class="programlisting">typedef struct _GtkIconSet GtkIconSet;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644046"></a><h3>
<a name="GtkIconSize"></a>enum GtkIconSize</h3>
<a class="indexterm" name="id2644059"></a><pre class="programlisting">typedef enum
{
GTK_ICON_SIZE_INVALID,
GTK_ICON_SIZE_MENU,
GTK_ICON_SIZE_SMALL_TOOLBAR,
GTK_ICON_SIZE_LARGE_TOOLBAR,
GTK_ICON_SIZE_BUTTON,
GTK_ICON_SIZE_DND,
GTK_ICON_SIZE_DIALOG
} GtkIconSize;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644077"></a><h3>
<a name="gtk-icon-source-copy"></a>gtk_icon_source_copy ()</h3>
<a class="indexterm" name="id2644090"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a>* gtk_icon_source_copy (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Creates a copy of <em class="parameter"><code>source</code></em>; mostly useful for language bindings.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644174"></a><h3>
<a name="gtk-icon-source-free"></a>gtk_icon_source_free ()</h3>
<a class="indexterm" name="id2644186"></a><pre class="programlisting">void gtk_icon_source_free (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Frees a dynamically-allocated icon source, along with its
filename, size, and pixbuf fields if those are not <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644256"></a><h3>
<a name="gtk-icon-factory-add"></a>gtk_icon_factory_add ()</h3>
<a class="indexterm" name="id2644269"></a><pre class="programlisting">void gtk_icon_factory_add (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);</pre>
<p>
Adds the given <em class="parameter"><code>icon_set</code></em> to the icon factory, under the name
<em class="parameter"><code>stock_id</code></em>. <em class="parameter"><code>stock_id</code></em> should be namespaced for your application,
e.g. "myapp-whatever-icon". Normally applications create a
<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>, then add it to the list of default factories with
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add-default"><code class="function">gtk_icon_factory_add_default()</code></a>. Then they pass the <em class="parameter"><code>stock_id</code></em> to
widgets such as <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> to display the icon. Themes can provide
an icon with the same name (such as "myapp-whatever-icon") to
override your application's default icons. If an icon already
existed in <em class="parameter"><code>factory</code></em> for <em class="parameter"><code>stock_id</code></em>, it is unreferenced and replaced
with the new <em class="parameter"><code>icon_set</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>factory</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>stock_id</code></em> :</span></td>
<td> icon name
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em> :</span></td>
<td> icon set
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644447"></a><h3>
<a name="gtk-icon-factory-add-default"></a>gtk_icon_factory_add_default ()</h3>
<a class="indexterm" name="id2644461"></a><pre class="programlisting">void gtk_icon_factory_add_default (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory);</pre>
<p>
Adds an icon factory to the list of icon factories searched by
<a href="GtkStyle.html#gtk-style-lookup-icon-set"><code class="function">gtk_style_lookup_icon_set()</code></a>. This means that, for example,
<a href="GtkImage.html#gtk-image-new-from-stock"><code class="function">gtk_image_new_from_stock()</code></a> will be able to find icons in <em class="parameter"><code>factory</code></em>.
There will normally be an icon factory added for each library or
application that comes with icons. The default icon factories
can be overridden by themes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>factory</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644553"></a><h3>
<a name="gtk-icon-factory-lookup"></a>gtk_icon_factory_lookup ()</h3>
<a class="indexterm" name="id2644566"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* gtk_icon_factory_lookup (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id);</pre>
<p>
Looks up <em class="parameter"><code>stock_id</code></em> in the icon factory, returning an icon set
if found, otherwise <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. For display to the user, you should
use <a href="GtkStyle.html#gtk-style-lookup-icon-set"><code class="function">gtk_style_lookup_icon_set()</code></a> on the <a href="GtkStyle.html" title="Styles"><span class="type">GtkStyle</span></a> for the
widget that will display the icon, instead of using this
function directly, so that themes are taken into account.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>factory</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>stock_id</code></em> :</span></td>
<td> an icon name
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> icon set of <em class="parameter"><code>stock_id</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644701"></a><h3>
<a name="gtk-icon-factory-lookup-default"></a>gtk_icon_factory_lookup_default ()</h3>
<a class="indexterm" name="id2644714"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* gtk_icon_factory_lookup_default (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id);</pre>
<p>
Looks for an icon in the list of default icon factories. For
display to the user, you should use <a href="GtkStyle.html#gtk-style-lookup-icon-set"><code class="function">gtk_style_lookup_icon_set()</code></a> on
the <a href="GtkStyle.html" title="Styles"><span class="type">GtkStyle</span></a> for the widget that will display the icon, instead of
using this function directly, so that themes are taken into
account.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>stock_id</code></em> :</span></td>
<td> an icon name
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644815"></a><h3>
<a name="gtk-icon-factory-new"></a>gtk_icon_factory_new ()</h3>
<a class="indexterm" name="id2644828"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a>* gtk_icon_factory_new (void);</pre>
<p>
Creates a new <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>. An icon factory manages a collection
of <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>s; a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> manages a set of variants of a
particular icon (i.e. a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> contains variants for different
sizes and widget states). Icons in an icon factory are named by a
stock ID, which is a simple string identifying the icon. Each
<a href="GtkStyle.html" title="Styles"><span class="type">GtkStyle</span></a> has a list of <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>s derived from the current
theme; those icon factories are consulted first when searching for
an icon. If the theme doesn't set a particular icon, GTK+ looks for
the icon in a list of default icon factories, maintained by
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add-default"><code class="function">gtk_icon_factory_add_default()</code></a> and
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-remove-default"><code class="function">gtk_icon_factory_remove_default()</code></a>. Applications with icons should
add a default icon factory with their icons, which will allow
themes to override the icons for the application.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2644961"></a><h3>
<a name="gtk-icon-factory-remove-default"></a>gtk_icon_factory_remove_default ()</h3>
<a class="indexterm" name="id2644975"></a><pre class="programlisting">void gtk_icon_factory_remove_default (<a href="gtk-Themeable-Stock-Images.html#GtkIconFactory">GtkIconFactory</a> *factory);</pre>
<p>
Removes an icon factory from the list of default icon
factories. Not normally used; you might use it for a library that
can be unloaded or shut down.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>factory</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a> previously added with <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add-default"><code class="function">gtk_icon_factory_add_default()</code></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2645047"></a><h3>
<a name="gtk-icon-set-add-source"></a>gtk_icon_set_add_source ()</h3>
<a class="indexterm" name="id2645060"></a><pre class="programlisting">void gtk_icon_set_add_source (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Icon sets have a list of <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>, which they use as base
icons for rendering icons in different states and sizes. Icons are
scaled, made to look insensitive, etc. in
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-render-icon"><code class="function">gtk_icon_set_render_icon()</code></a>, but <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> needs base images to
work with. The base images and when to use them are described by
a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>.
</p>
<p>
This function copies <em class="parameter"><code>source</code></em>, so you can reuse the same source immediately
without affecting the icon set.
</p>
<p>
An example of when you'd use this function: a web browser's "Back
to Previous Page" icon might point in a different direction in
Hebrew and in English; it might look different when insensitive;
and it might change size depending on toolbar mode (small/large
icons). So a single icon set would contain all those variants of
the icon, and you might add a separate source for each one.
</p>
<p>
You should nearly always add a "default" icon source with all
fields wildcarded, which will be used as a fallback if no more
specific source matches. <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> always prefers more specific
icon sources to more generic icon sources. The order in which you
add the sources to the icon set does not matter.
</p>
<p>
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-new-from-pixbuf"><code class="function">gtk_icon_set_new_from_pixbuf()</code></a> creates a new icon set with a
default icon source based on the given pixbuf.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2645239"></a><h3>
<a name="gtk-icon-set-copy"></a>gtk_icon_set_copy ()</h3>
<a class="indexterm" name="id2645253"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* gtk_icon_set_copy (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);</pre>
<p>
Copies <em class="parameter"><code>icon_set</code></em> by value.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> identical to the first.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2645334"></a><h3>
<a name="gtk-icon-set-new"></a>gtk_icon_set_new ()</h3>
<a class="indexterm" name="id2645347"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* gtk_icon_set_new (void);</pre>
<p>
Creates a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>. A <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> represents a single icon
in various sizes and widget states. It can provide a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>
for a given size and state on request, and automatically caches
some of the rendered <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> objects.
</p>
<p>
Normally you would use <a href="GtkWidget.html#gtk-widget-render-icon"><code class="function">gtk_widget_render_icon()</code></a> instead of
using <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> directly. The one case where you'd use
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> is to create application-specific icon sets to place in
a <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2645469"></a><h3>
<a name="gtk-icon-set-new-from-pixbuf"></a>gtk_icon_set_new_from_pixbuf ()</h3>
<a class="indexterm" name="id2645483"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* gtk_icon_set_new_from_pixbuf (<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);</pre>
<p>
Creates a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> with <em class="parameter"><code>pixbuf</code></em> as the default/fallback
source image. If you don't add any additional <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a> to the
icon set, all variants of the icon will be created from <em class="parameter"><code>pixbuf</code></em>,
using scaling, pixelation, etc. as required to adjust the icon size
or make the icon look insensitive/prelighted.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></td>
<td> a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2645590"></a><h3>
<a name="gtk-icon-set-ref"></a>gtk_icon_set_ref ()</h3>
<a class="indexterm" name="id2645603"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>* gtk_icon_set_ref (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);</pre>
<p>
Increments the reference count on <em class="parameter"><code>icon_set</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <em class="parameter"><code>icon_set</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2645682"></a><h3>
<a name="gtk-icon-set-render-icon"></a>gtk_icon_set_render_icon ()</h3>
<a class="indexterm" name="id2645696"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>* gtk_icon_set_render_icon (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
<a href="GtkStyle.html" title="Styles">GtkStyle</a> *style,
<a href="GtkWidget.html#GtkTextDirection">GtkTextDirection</a> direction,
<a href="gtk-Standard-Enumerations.html#GtkStateType">GtkStateType</a> state,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size,
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
const char *detail);</pre>
<p>
Renders an icon using <a href="GtkStyle.html#gtk-style-render-icon"><code class="function">gtk_style_render_icon()</code></a>. In most cases,
<a href="GtkWidget.html#gtk-widget-render-icon"><code class="function">gtk_widget_render_icon()</code></a> is better, since it automatically provides
most of the arguments from the current widget settings. This
function never returns <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>; if the icon can't be rendered
(perhaps because an image file fails to load), a default "missing
image" icon will be returned instead.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>style</code></em> :</span></td>
<td> a <a href="GtkStyle.html" title="Styles"><span class="type">GtkStyle</span></a> associated with <em class="parameter"><code>widget</code></em>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>direction</code></em> :</span></td>
<td> text direction
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>state</code></em> :</span></td>
<td> widget state
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
<td> icon size. A size of (GtkIconSize)-1
means render at the size of the source and don't scale.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> widget that will display the icon, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
The only use that is typically made of this
is to determine the appropriate <a
href="../gdk/GdkScreen.html"
><span class="type">GdkScreen</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>detail</code></em> :</span></td>
<td> detail to pass to the theme engine, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
Note that passing a detail of anything but <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
will disable caching.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> to be displayed
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646007"></a><h3>
<a name="gtk-icon-set-unref"></a>gtk_icon_set_unref ()</h3>
<a class="indexterm" name="id2646021"></a><pre class="programlisting">void gtk_icon_set_unref (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set);</pre>
<p>
Decrements the reference count on <em class="parameter"><code>icon_set</code></em>, and frees memory
if the reference count reaches 0.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646085"></a><h3>
<a name="gtk-icon-size-lookup"></a>gtk_icon_size_lookup ()</h3>
<a class="indexterm" name="id2646098"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_icon_size_lookup (<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *height);</pre>
<p>
Obtains the pixel size of a semantic icon size, possibly
modified by user preferences for the default <a href="GtkSettings.html" title="Settings"><span class="type">GtkSettings</span></a>.
(See <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup-for-settings"><code class="function">gtk_icon_size_lookup_for_settings()</code></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 function
isn't normally needed, <a href="GtkWidget.html#gtk-widget-render-icon"><code class="function">gtk_widget_render_icon()</code></a> is the usual
way to get an icon for rendering, then just look at the size of
the rendered pixbuf. The rendered pixbuf may not even correspond to
the width/height returned by <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup"><code class="function">gtk_icon_size_lookup()</code></a>, because themes
are free to render the pixbuf however they like, including changing
the usual size.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
<td> an icon size
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
<td> location to store icon width
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
<td> location to store icon height
</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 <em class="parameter"><code>size</code></em> was a valid size
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646292"></a><h3>
<a name="gtk-icon-size-lookup-for-settings"></a>gtk_icon_size_lookup_for_settings ()</h3>
<a class="indexterm" name="id2646309"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_icon_size_lookup_for_settings
(<a href="GtkSettings.html" title="Settings">GtkSettings</a> *settings,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *width,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *height);</pre>
<p>
Obtains the pixel size of a semantic icon size, possibly
modified by user preferences for a particular
<a 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 function
isn't normally needed, <a href="GtkWidget.html#gtk-widget-render-icon"><code class="function">gtk_widget_render_icon()</code></a> is the usual
way to get an icon for rendering, then just look at the size of
the rendered pixbuf. The rendered pixbuf may not even correspond to
the width/height returned by <a href="gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup"><code class="function">gtk_icon_size_lookup()</code></a>, because themes
are free to render the pixbuf however they like, including changing
the usual size.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>settings</code></em> :</span></td>
<td> a <a 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>
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
<td> an icon size
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
<td> location to store icon width
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
<td> location to store icon height
</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 <em class="parameter"><code>size</code></em> was a valid size
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646524"></a><h3>
<a name="gtk-icon-size-register"></a>gtk_icon_size_register ()</h3>
<a class="indexterm" name="id2646537"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> gtk_icon_size_register (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> width,
<a
href="../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>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> name of the icon size
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>width</code></em> :</span></td>
<td> the icon width
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>height</code></em> :</span></td>
<td> the icon height
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> integer value representing the size
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646652"></a><h3>
<a name="gtk-icon-size-register-alias"></a>gtk_icon_size_register_alias ()</h3>
<a class="indexterm" name="id2646665"></a><pre class="programlisting">void gtk_icon_size_register_alias (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *alias,
<a 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 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 argument
will 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>
<span class="term"><em class="parameter"><code>alias</code></em> :</span></td>
<td> an alias for <em class="parameter"><code>target</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>target</code></em> :</span></td>
<td> an existing icon size
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646778"></a><h3>
<a name="gtk-icon-size-from-name"></a>gtk_icon_size_from_name ()</h3>
<a class="indexterm" name="id2646791"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> gtk_icon_size_from_name (const <a
href="../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>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> the name to look up.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the icon size with the given name.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646858"></a><h3>
<a name="gtk-icon-size-get-name"></a>gtk_icon_size_get_name ()</h3>
<a class="indexterm" name="id2646872"></a><pre class="programlisting">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_icon_size_get_name (<a 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>
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSize"><span class="type">GtkIconSize</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the name of the given icon size.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2646943"></a><h3>
<a name="gtk-icon-set-get-sizes"></a>gtk_icon_set_get_sizes ()</h3>
<a class="indexterm" name="id2646956"></a><pre class="programlisting">void gtk_icon_set_get_sizes (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> **sizes,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *n_sizes);</pre>
<p>
Obtains a list of icon sizes this icon set can render. The returned
array must be freed with <a
href="../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>
<span class="term"><em class="parameter"><code>icon_set</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>sizes</code></em> :</span></td>
<td> return location for array of sizes
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_sizes</code></em> :</span></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="id2647069"></a><h3>
<a name="gtk-icon-source-get-direction"></a>gtk_icon_source_get_direction ()</h3>
<a class="indexterm" name="id2647082"></a><pre class="programlisting"><a href="GtkWidget.html#GtkTextDirection">GtkTextDirection</a> gtk_icon_source_get_direction
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Obtains the text direction this icon source applies to. The return
value is only useful/meaningful if the text direction is <span class="emphasis"><em>not</em></span>
wildcarded.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> text direction this source matches
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647158"></a><h3>
<a name="gtk-icon-source-get-direction-wildcarded"></a>gtk_icon_source_get_direction_wildcarded ()</h3>
<a class="indexterm" name="id2647172"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_icon_source_get_direction_wildcarded
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Gets the value set by <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-direction-wildcarded"><code class="function">gtk_icon_source_set_direction_wildcarded()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</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 this icon source is a base for any text direction variant
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647265"></a><h3>
<a name="gtk-icon-source-get-filename"></a>gtk_icon_source_get_filename ()</h3>
<a class="indexterm" name="id2647278"></a><pre class="programlisting">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_icon_source_get_filename (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Retrieves the source filename, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if none is set. The
filename is not a copy, and should not be modified or expected to
persist beyond the lifetime of the icon source.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> image filename. This string must not be modified
or freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647361"></a><h3>
<a name="gtk-icon-source-get-pixbuf"></a>gtk_icon_source_get_pixbuf ()</h3>
<a class="indexterm" name="id2647375"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>* gtk_icon_source_get_pixbuf (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Retrieves the source pixbuf, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if none is set.
In addition, if a filename source is in use, this
function in some cases will return the pixbuf from
loaded from the filename. This is, for example, true
for the GtkIconSource passed to the GtkStyle::<code class="function">render_icon()</code>
virtual function. The reference count on the pixbuf is
not incremented.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> source pixbuf
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647470"></a><h3>
<a name="gtk-icon-source-get-icon-name"></a>gtk_icon_source_get_icon_name ()</h3>
<a class="indexterm" name="id2647484"></a><pre class="programlisting">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_icon_source_get_icon_name (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Retrieves the source icon name, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if none is set. The
icon_name is not a copy, and should not be modified or expected to
persist beyond the lifetime of the icon source.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> icon name. This string must not be modified or freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647568"></a><h3>
<a name="gtk-icon-source-get-size"></a>gtk_icon_source_get_size ()</h3>
<a class="indexterm" name="id2647581"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> gtk_icon_source_get_size (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Obtains the icon size this source applies to. The return value
is only useful/meaningful if the icon size is <span class="emphasis"><em>not</em></span> wildcarded.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> icon size this source matches.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647655"></a><h3>
<a name="gtk-icon-source-get-size-wildcarded"></a>gtk_icon_source_get_size_wildcarded ()</h3>
<a class="indexterm" name="id2647670"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_icon_source_get_size_wildcarded
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Gets the value set by <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-size-wildcarded"><code class="function">gtk_icon_source_set_size_wildcarded()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</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 this icon source is a base for any icon size variant
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647762"></a><h3>
<a name="gtk-icon-source-get-state"></a>gtk_icon_source_get_state ()</h3>
<a class="indexterm" name="id2647775"></a><pre class="programlisting"><a href="gtk-Standard-Enumerations.html#GtkStateType">GtkStateType</a> gtk_icon_source_get_state (const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Obtains the widget state this icon source applies to. The return
value is only useful/meaningful if the widget state is <span class="emphasis"><em>not</em></span>
wildcarded.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> widget state this source matches
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647849"></a><h3>
<a name="gtk-icon-source-get-state-wildcarded"></a>gtk_icon_source_get_state_wildcarded ()</h3>
<a class="indexterm" name="id2647863"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_icon_source_get_state_wildcarded
(const <a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source);</pre>
<p>
Gets the value set by <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-state-wildcarded"><code class="function">gtk_icon_source_set_state_wildcarded()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</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 this icon source is a base for any widget state variant
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2647955"></a><h3>
<a name="gtk-icon-source-new"></a>gtk_icon_source_new ()</h3>
<a class="indexterm" name="id2647968"></a><pre class="programlisting"><a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a>* gtk_icon_source_new (void);</pre>
<p>
Creates a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>. A <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a> contains a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> (or
image filename) that serves as the base image for one or more of the
icons in a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>, along with a specification for which icons in the
icon set will be based on that pixbuf or image file. An icon set contains
a set of icons that represent "the same" logical concept in different states,
different global text directions, and different sizes.
</p>
<p>
So for example a web browser's "Back to Previous Page" icon might
point in a different direction in Hebrew and in English; it might
look different when insensitive; and it might change size depending
on toolbar mode (small/large icons). So a single icon set would
contain all those variants of the icon. <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> contains a list
of <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a> from which it can derive specific icon variants in
the set.
</p>
<p>
In the simplest case, <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> contains one source pixbuf from
which it derives all variants. The convenience function
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-new-from-pixbuf"><code class="function">gtk_icon_set_new_from_pixbuf()</code></a> handles this case; if you only have
one source pixbuf, just use that function.
</p>
<p>
If you want to use a different base pixbuf for different icon
variants, you create multiple icon sources, mark which variants
they'll be used to create, and add them to the icon set with
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-set-add-source"><code class="function">gtk_icon_set_add_source()</code></a>.
</p>
<p>
By default, the icon source has all parameters wildcarded. That is,
the icon source will be used as the base icon for any desired text
direction, widget state, or icon size.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648130"></a><h3>
<a name="gtk-icon-source-set-direction"></a>gtk_icon_source_set_direction ()</h3>
<a class="indexterm" name="id2648144"></a><pre class="programlisting">void gtk_icon_source_set_direction (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a href="GtkWidget.html#GtkTextDirection">GtkTextDirection</a> direction);</pre>
<p>
Sets the text direction this icon source is intended to be used
with.
</p>
<p>
Setting the text direction on an icon source makes no difference
if the text direction is wildcarded. Therefore, you should usually
call <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-direction-wildcarded"><code class="function">gtk_icon_source_set_direction_wildcarded()</code></a> to un-wildcard it
in addition to calling this function.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>direction</code></em> :</span></td>
<td> text direction this source applies to
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648244"></a><h3>
<a name="gtk-icon-source-set-direction-wildcarded"></a>gtk_icon_source_set_direction_wildcarded ()</h3>
<a class="indexterm" name="id2648258"></a><pre class="programlisting">void gtk_icon_source_set_direction_wildcarded
(<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);</pre>
<p>
If the text direction is wildcarded, this source can be used
as the base image for an icon in any <a href="GtkWidget.html#GtkTextDirection"><span class="type">GtkTextDirection</span></a>.
If the text direction is not wildcarded, then the
text direction the icon source applies to should be set
with <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-direction"><code class="function">gtk_icon_source_set_direction()</code></a>, and the icon source
will only be used with that text direction.
</p>
<p>
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>setting</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to wildcard the text direction
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648386"></a><h3>
<a name="gtk-icon-source-set-filename"></a>gtk_icon_source_set_filename ()</h3>
<a class="indexterm" name="id2648399"></a><pre class="programlisting">void gtk_icon_source_set_filename (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);</pre>
<p>
Sets the name of an image file to use as a base image when creating
icon variants for <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>. The filename must be absolute.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em> :</span></td>
<td> image file to use
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648489"></a><h3>
<a name="gtk-icon-source-set-pixbuf"></a>gtk_icon_source_set_pixbuf ()</h3>
<a class="indexterm" name="id2648503"></a><pre class="programlisting">void gtk_icon_source_set_pixbuf (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);</pre>
<p>
Sets a pixbuf to use as a base image when creating icon variants
for <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></td>
<td> pixbuf to use as a source
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648591"></a><h3>
<a name="gtk-icon-source-set-icon-name"></a>gtk_icon_source_set_icon_name ()</h3>
<a class="indexterm" name="id2648604"></a><pre class="programlisting">void gtk_icon_source_set_icon_name (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *icon_name);</pre>
<p>
Sets the name of an icon to look up in the current icon theme
to use as a base image when creating icon variants for <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_name</code></em> :</span></td>
<td> name of icon to use
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648694"></a><h3>
<a name="gtk-icon-source-set-size"></a>gtk_icon_source_set_size ()</h3>
<a class="indexterm" name="id2648707"></a><pre class="programlisting">void gtk_icon_source_set_size (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre>
<p>
Sets the icon size this icon source is intended to be used
with.
</p>
<p>
Setting the icon size on an icon source makes no difference
if the size is wildcarded. Therefore, you should usually
call <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-size-wildcarded"><code class="function">gtk_icon_source_set_size_wildcarded()</code></a> to un-wildcard it
in addition to calling this function.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
<td> icon size this source applies to
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648806"></a><h3>
<a name="gtk-icon-source-set-size-wildcarded"></a>gtk_icon_source_set_size_wildcarded ()</h3>
<a class="indexterm" name="id2648820"></a><pre class="programlisting">void gtk_icon_source_set_size_wildcarded
(<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);</pre>
<p>
If the icon size is wildcarded, this source can be used as the base
image for an icon of any size. If the size is not wildcarded, then
the size the source applies to should be set with
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-size"><code class="function">gtk_icon_source_set_size()</code></a> and the icon source will only be used
with that specific size.
</p>
<p>
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.
</p>
<p>
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> will normally scale wildcarded source images to produce
an appropriate icon at a given size, but will not change the size
of source images that match exactly.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>setting</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to wildcard the widget state
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2648952"></a><h3>
<a name="gtk-icon-source-set-state"></a>gtk_icon_source_set_state ()</h3>
<a class="indexterm" name="id2648966"></a><pre class="programlisting">void gtk_icon_source_set_state (<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a href="gtk-Standard-Enumerations.html#GtkStateType">GtkStateType</a> state);</pre>
<p>
Sets the widget state this icon source is intended to be used
with.
</p>
<p>
Setting the widget state on an icon source makes no difference
if the state is wildcarded. Therefore, you should usually
call <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-state-wildcarded"><code class="function">gtk_icon_source_set_state_wildcarded()</code></a> to un-wildcard it
in addition to calling this function.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>state</code></em> :</span></td>
<td> widget state this source applies to
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2649065"></a><h3>
<a name="gtk-icon-source-set-state-wildcarded"></a>gtk_icon_source_set_state_wildcarded ()</h3>
<a class="indexterm" name="id2649080"></a><pre class="programlisting">void gtk_icon_source_set_state_wildcarded
(<a href="gtk-Themeable-Stock-Images.html#GtkIconSource">GtkIconSource</a> *source,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);</pre>
<p>
If the widget state is wildcarded, this source can be used as the
base image for an icon in any <a href="gtk-Standard-Enumerations.html#GtkStateType"><span class="type">GtkStateType</span></a>. If the widget state
is not wildcarded, then the state the source applies to should be
set with <a href="gtk-Themeable-Stock-Images.html#gtk-icon-source-set-state"><code class="function">gtk_icon_source_set_state()</code></a> and the icon source will
only be used with that specific state.
</p>
<p>
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.
</p>
<p>
<a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a> will normally transform wildcarded source images to
produce an appropriate icon for a given state, for example
lightening an image on prelight, but will not modify source images
that match exactly.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em> :</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSource"><span class="type">GtkIconSource</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>setting</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to wildcard the widget state
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>