<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="gtk-Themeable-Stock-Images">
<refmeta>
<refentrytitle role="top_of_page" id="gtk-Themeable-Stock-Images.top_of_page">Themeable Stock Images</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Themeable Stock Images</refname>
<refpurpose>Manipulating stock icons</refpurpose>
</refnamediv>

<refsynopsisdiv id="gtk-Themeable-Stock-Images.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<anchor id="GtkIconFactory"/>
<synopsis>

#include &lt;gtk/gtk.h&gt;

                    <link linkend="GtkIconSource">GtkIconSource</link>;
                    <link linkend="GtkIconFactory-struct">GtkIconFactory</link>;
                    <link linkend="GtkIconSet">GtkIconSet</link>;
enum                <link linkend="GtkIconSize">GtkIconSize</link>;
<link linkend="GtkIconSource">GtkIconSource</link>*      <link linkend="gtk-icon-source-copy">gtk_icon_source_copy</link>                (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-free">gtk_icon_source_free</link>                (<link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="void">void</link>                <link linkend="gtk-icon-factory-add">gtk_icon_factory_add</link>                (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory,
                                                         const <link linkend="gchar">gchar</link> *stock_id,
                                                         <link linkend="GtkIconSet">GtkIconSet</link> *icon_set);
<link linkend="void">void</link>                <link linkend="gtk-icon-factory-add-default">gtk_icon_factory_add_default</link>        (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory);
<link linkend="GtkIconSet">GtkIconSet</link>*         <link linkend="gtk-icon-factory-lookup">gtk_icon_factory_lookup</link>             (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory,
                                                         const <link linkend="gchar">gchar</link> *stock_id);
<link linkend="GtkIconSet">GtkIconSet</link>*         <link linkend="gtk-icon-factory-lookup-default">gtk_icon_factory_lookup_default</link>     (const <link linkend="gchar">gchar</link> *stock_id);
<link linkend="GtkIconFactory">GtkIconFactory</link>*     <link linkend="gtk-icon-factory-new">gtk_icon_factory_new</link>                (void);
<link linkend="void">void</link>                <link linkend="gtk-icon-factory-remove-default">gtk_icon_factory_remove_default</link>     (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory);
<link linkend="void">void</link>                <link linkend="gtk-icon-set-add-source">gtk_icon_set_add_source</link>             (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set,
                                                         const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="GtkIconSet">GtkIconSet</link>*         <link linkend="gtk-icon-set-copy">gtk_icon_set_copy</link>                   (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set);
<link linkend="GtkIconSet">GtkIconSet</link>*         <link linkend="gtk-icon-set-new">gtk_icon_set_new</link>                    (void);
<link linkend="GtkIconSet">GtkIconSet</link>*         <link linkend="gtk-icon-set-new-from-pixbuf">gtk_icon_set_new_from_pixbuf</link>        (<link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
<link linkend="GtkIconSet">GtkIconSet</link>*         <link linkend="gtk-icon-set-ref">gtk_icon_set_ref</link>                    (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set);
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="gtk-icon-set-render-icon">gtk_icon_set_render_icon</link>            (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set,
                                                         <link linkend="GtkStyle">GtkStyle</link> *style,
                                                         <link linkend="GtkTextDirection">GtkTextDirection</link> direction,
                                                         <link linkend="GtkStateType">GtkStateType</link> state,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> size,
                                                         <link linkend="GtkWidget">GtkWidget</link> *widget,
                                                         const <link linkend="char">char</link> *detail);
<link linkend="void">void</link>                <link linkend="gtk-icon-set-unref">gtk_icon_set_unref</link>                  (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-icon-size-lookup">gtk_icon_size_lookup</link>                (<link linkend="GtkIconSize">GtkIconSize</link> size,
                                                         <link linkend="gint">gint</link> *width,
                                                         <link linkend="gint">gint</link> *height);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-icon-size-lookup-for-settings">gtk_icon_size_lookup_for_settings</link>   (<link linkend="GtkSettings">GtkSettings</link> *settings,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> size,
                                                         <link linkend="gint">gint</link> *width,
                                                         <link linkend="gint">gint</link> *height);
<link linkend="GtkIconSize">GtkIconSize</link>         <link linkend="gtk-icon-size-register">gtk_icon_size_register</link>              (const <link linkend="gchar">gchar</link> *name,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);
<link linkend="void">void</link>                <link linkend="gtk-icon-size-register-alias">gtk_icon_size_register_alias</link>        (const <link linkend="gchar">gchar</link> *alias,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> target);
<link linkend="GtkIconSize">GtkIconSize</link>         <link linkend="gtk-icon-size-from-name">gtk_icon_size_from_name</link>             (const <link linkend="gchar">gchar</link> *name);
const <link linkend="gchar">gchar</link>*        <link linkend="gtk-icon-size-get-name">gtk_icon_size_get_name</link>              (<link linkend="GtkIconSize">GtkIconSize</link> size);
<link linkend="void">void</link>                <link linkend="gtk-icon-set-get-sizes">gtk_icon_set_get_sizes</link>              (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> **sizes,
                                                         <link linkend="gint">gint</link> *n_sizes);
<link linkend="GtkTextDirection">GtkTextDirection</link>    <link linkend="gtk-icon-source-get-direction">gtk_icon_source_get_direction</link>       (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-icon-source-get-direction-wildcarded">gtk_icon_source_get_direction_wildcarded</link>
                                                        (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
const <link linkend="gchar">gchar</link>*        <link linkend="gtk-icon-source-get-filename">gtk_icon_source_get_filename</link>        (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="GdkPixbuf">GdkPixbuf</link>*          <link linkend="gtk-icon-source-get-pixbuf">gtk_icon_source_get_pixbuf</link>          (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
const <link linkend="gchar">gchar</link>*        <link linkend="gtk-icon-source-get-icon-name">gtk_icon_source_get_icon_name</link>       (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="GtkIconSize">GtkIconSize</link>         <link linkend="gtk-icon-source-get-size">gtk_icon_source_get_size</link>            (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-icon-source-get-size-wildcarded">gtk_icon_source_get_size_wildcarded</link> (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="GtkStateType">GtkStateType</link>        <link linkend="gtk-icon-source-get-state">gtk_icon_source_get_state</link>           (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-icon-source-get-state-wildcarded">gtk_icon_source_get_state_wildcarded</link>
                                                        (const <link linkend="GtkIconSource">GtkIconSource</link> *source);
<link linkend="GtkIconSource">GtkIconSource</link>*      <link linkend="gtk-icon-source-new">gtk_icon_source_new</link>                 (void);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-direction">gtk_icon_source_set_direction</link>       (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GtkTextDirection">GtkTextDirection</link> direction);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-direction-wildcarded">gtk_icon_source_set_direction_wildcarded</link>
                                                        (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="gboolean">gboolean</link> setting);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-filename">gtk_icon_source_set_filename</link>        (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         const <link linkend="gchar">gchar</link> *filename);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-pixbuf">gtk_icon_source_set_pixbuf</link>          (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-icon-name">gtk_icon_source_set_icon_name</link>       (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         const <link linkend="gchar">gchar</link> *icon_name);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-size">gtk_icon_source_set_size</link>            (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> size);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-size-wildcarded">gtk_icon_source_set_size_wildcarded</link> (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="gboolean">gboolean</link> setting);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-state">gtk_icon_source_set_state</link>           (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GtkStateType">GtkStateType</link> state);
<link linkend="void">void</link>                <link linkend="gtk-icon-source-set-state-wildcarded">gtk_icon_source_set_state_wildcarded</link>
                                                        (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="gboolean">gboolean</link> setting);
</synopsis>
</refsynopsisdiv>

<refsect1 id="gtk-Themeable-Stock-Images.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GtkIconFactory
</synopsis>
</refsect1>



<refsect1 id="gtk-Themeable-Stock-Images.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkIconFactory implements
 <link linkend="GtkBuildable">GtkBuildable</link>.</para>
</refsect1>





<refsect1 id="gtk-Themeable-Stock-Images.description" role="desc">
<title role="desc.title">Description</title>
<para>
Browse the available stock icons in the list of stock IDs found <link
linkend="gtk-Stock-Items">here</link>. You can also use
the <application>gtk-demo</application> application for this purpose.
</para>
<para>
 An icon factory manages a collection of <link linkend="GtkIconSet"><type>GtkIconSet</type></link>; a <link linkend="GtkIconSet"><type>GtkIconSet</type></link> manages a
 set of variants of a particular icon (i.e. a <link linkend="GtkIconSet"><type>GtkIconSet</type></link> 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 <link linkend="GtkStyle"><type>GtkStyle</type></link> has a
 list of <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link> 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 <link linkend="gtk-icon-factory-add-default"><function>gtk_icon_factory_add_default()</function></link> and
 <link linkend="gtk-icon-factory-remove-default"><function>gtk_icon_factory_remove_default()</function></link>. Applications with icons should add a default
 icon factory with their icons, which will allow themes to override the icons
 for the application.
</para>
<para>
To display an icon, always use <link linkend="gtk-style-lookup-icon-set"><function>gtk_style_lookup_icon_set()</function></link> on the widget that
will display the icon, or the convenience function
<link linkend="gtk-widget-render-icon"><function>gtk_widget_render_icon()</function></link>. These functions take the theme into account when
looking up the icon to use for a given stock ID.
</para>
<refsect2 id="GtkIconFactory-BUILDER-UI"><title>GtkIconFactory as GtkBuildable</title>
<para>
GtkIconFactory supports a custom &lt;sources&gt; element, which
can contain multiple &lt;source&gt; elements.
The following attributes are allowed:
<variablelist>
<varlistentry>
<term>stock-id</term>
<listitem><para>The stock id of the source, a string.
This attribute is mandatory</para></listitem>
</varlistentry>
<varlistentry>
<term>filename</term>
<listitem><para>The filename of the source, a string.
This attribute is optional</para>
</listitem>
</varlistentry>
<varlistentry>
<term>icon-name</term>
<listitem><para>The icon name for the source, a string.
This attribute is optional.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>size</term>
<listitem><para>Size of the icon, a <link linkend="GtkIconSize"><type>GtkIconSize</type></link> enum value.
This attribute is optional.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>direction</term>
<listitem><para>Direction of the source, a <link linkend="GtkTextDirection"><type>GtkTextDirection</type></link> enum value.
This attribute is optional.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>state</term>
<listitem><para>State of the source, a <link linkend="GtkStateType"><type>GtkStateType</type></link> enum value.
This attribute is optional.</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<example>
<title>A <structname>GtkIconFactory</structname> UI definition fragment.</title>
<programlisting><![CDATA[
<object class="GtkIconFactory" id="iconfactory1">
  <sources>
    <source stock-id="apple-red" filename="apple-red.png"/>
  </sources>
</object>
<object class="GtkWindow" id="window1">
  <child>
    <object class="GtkButton" id="apple_button">
      <property name="label">apple-red</property>
      <property name="use-stock">True</property>
    </object>
  </child>
</object>
]]></programlisting>
</example>
</refsect2>
</refsect1>

<refsect1 id="gtk-Themeable-Stock-Images.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkIconSource" role="struct">
<title>GtkIconSource</title>
<indexterm zone="GtkIconSource"><primary sortas="IconSource">GtkIconSource</primary></indexterm><programlisting>typedef struct _GtkIconSource GtkIconSource;</programlisting>
<para>
</para></refsect2>
<refsect2 id="GtkIconFactory-struct" role="struct">
<title>GtkIconFactory</title>
<indexterm zone="GtkIconFactory-struct"><primary sortas="IconFactory">GtkIconFactory</primary></indexterm><programlisting>typedef struct _GtkIconFactory GtkIconFactory;</programlisting>
<para>
</para></refsect2>
<refsect2 id="GtkIconSet" role="struct">
<title>GtkIconSet</title>
<indexterm zone="GtkIconSet"><primary sortas="IconSet">GtkIconSet</primary></indexterm><programlisting>typedef struct _GtkIconSet GtkIconSet;</programlisting>
<para>
</para></refsect2>
<refsect2 id="GtkIconSize" role="enum">
<title>enum GtkIconSize</title>
<indexterm zone="GtkIconSize"><primary sortas="IconSize">GtkIconSize</primary></indexterm><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;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="gtk-icon-source-copy" role="function">
<title>gtk_icon_source_copy ()</title>
<indexterm zone="gtk-icon-source-copy"><primary sortas="icon_source_copy">gtk_icon_source_copy</primary></indexterm><programlisting><link linkend="GtkIconSource">GtkIconSource</link>*      gtk_icon_source_copy                (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Creates a copy of <parameter>source</parameter>; mostly useful for language bindings.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-free" role="function">
<title>gtk_icon_source_free ()</title>
<indexterm zone="gtk-icon-source-free"><primary sortas="icon_source_free">gtk_icon_source_free</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_free                (<link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Frees a dynamically-allocated icon source, along with its
filename, size, and pixbuf fields if those are not <link linkend="NULL--CAPS"><literal>NULL</literal></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-factory-add" role="function">
<title>gtk_icon_factory_add ()</title>
<indexterm zone="gtk-icon-factory-add"><primary sortas="icon_factory_add">gtk_icon_factory_add</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_factory_add                (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory,
                                                         const <link linkend="gchar">gchar</link> *stock_id,
                                                         <link linkend="GtkIconSet">GtkIconSet</link> *icon_set);</programlisting>
<para>
Adds the given <parameter>icon_set</parameter> to the icon factory, under the name
<parameter>stock_id</parameter>.  <parameter>stock_id</parameter> should be namespaced for your application,
e.g. "myapp-whatever-icon".  Normally applications create a
<link linkend="GtkIconFactory"><type>GtkIconFactory</type></link>, then add it to the list of default factories with
<link linkend="gtk-icon-factory-add-default"><function>gtk_icon_factory_add_default()</function></link>. Then they pass the <parameter>stock_id</parameter> to
widgets such as <link linkend="GtkImage"><type>GtkImage</type></link> 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 <parameter>factory</parameter> for <parameter>stock_id</parameter>, it is unreferenced and replaced
with the new <parameter>icon_set</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>factory</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>stock_id</parameter>&#160;:</term>
<listitem><simpara> icon name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>icon_set</parameter>&#160;:</term>
<listitem><simpara> icon set
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-factory-add-default" role="function">
<title>gtk_icon_factory_add_default ()</title>
<indexterm zone="gtk-icon-factory-add-default"><primary sortas="icon_factory_add_default">gtk_icon_factory_add_default</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_factory_add_default        (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory);</programlisting>
<para>
Adds an icon factory to the list of icon factories searched by
<link linkend="gtk-style-lookup-icon-set"><function>gtk_style_lookup_icon_set()</function></link>. This means that, for example,
<link linkend="gtk-image-new-from-stock"><function>gtk_image_new_from_stock()</function></link> will be able to find icons in <parameter>factory</parameter>.
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>factory</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-factory-lookup" role="function">
<title>gtk_icon_factory_lookup ()</title>
<indexterm zone="gtk-icon-factory-lookup"><primary sortas="icon_factory_lookup">gtk_icon_factory_lookup</primary></indexterm><programlisting><link linkend="GtkIconSet">GtkIconSet</link>*         gtk_icon_factory_lookup             (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory,
                                                         const <link linkend="gchar">gchar</link> *stock_id);</programlisting>
<para>
Looks up <parameter>stock_id</parameter> in the icon factory, returning an icon set
if found, otherwise <link linkend="NULL--CAPS"><literal>NULL</literal></link>. For display to the user, you should
use <link linkend="gtk-style-lookup-icon-set"><function>gtk_style_lookup_icon_set()</function></link> on the <link linkend="GtkStyle"><type>GtkStyle</type></link> for the
widget that will display the icon, instead of using this
function directly, so that themes are taken into account.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>factory</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>stock_id</parameter>&#160;:</term>
<listitem><simpara> an icon name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> icon set of <parameter>stock_id</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-factory-lookup-default" role="function">
<title>gtk_icon_factory_lookup_default ()</title>
<indexterm zone="gtk-icon-factory-lookup-default"><primary sortas="icon_factory_lookup_default">gtk_icon_factory_lookup_default</primary></indexterm><programlisting><link linkend="GtkIconSet">GtkIconSet</link>*         gtk_icon_factory_lookup_default     (const <link linkend="gchar">gchar</link> *stock_id);</programlisting>
<para>
Looks for an icon in the list of default icon factories.  For
display to the user, you should use <link linkend="gtk-style-lookup-icon-set"><function>gtk_style_lookup_icon_set()</function></link> on
the <link linkend="GtkStyle"><type>GtkStyle</type></link> for the widget that will display the icon, instead of
using this function directly, so that themes are taken into
account.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>stock_id</parameter>&#160;:</term>
<listitem><simpara> an icon name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-factory-new" role="function">
<title>gtk_icon_factory_new ()</title>
<indexterm zone="gtk-icon-factory-new"><primary sortas="icon_factory_new">gtk_icon_factory_new</primary></indexterm><programlisting><link linkend="GtkIconFactory">GtkIconFactory</link>*     gtk_icon_factory_new                (void);</programlisting>
<para>
Creates a new <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link>. An icon factory manages a collection
of <link linkend="GtkIconSet"><type>GtkIconSet</type></link><!-- -->s; a <link linkend="GtkIconSet"><type>GtkIconSet</type></link> manages a set of variants of a
particular icon (i.e. a <link linkend="GtkIconSet"><type>GtkIconSet</type></link> 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
<link linkend="GtkStyle"><type>GtkStyle</type></link> has a list of <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link><!-- -->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
<link linkend="gtk-icon-factory-add-default"><function>gtk_icon_factory_add_default()</function></link> and
<link linkend="gtk-icon-factory-remove-default"><function>gtk_icon_factory_remove_default()</function></link>. Applications with icons should
add a default icon factory with their icons, which will allow
themes to override the icons for the application.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-factory-remove-default" role="function">
<title>gtk_icon_factory_remove_default ()</title>
<indexterm zone="gtk-icon-factory-remove-default"><primary sortas="icon_factory_remove_default">gtk_icon_factory_remove_default</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_factory_remove_default     (<link linkend="GtkIconFactory">GtkIconFactory</link> *factory);</programlisting>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>factory</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link> previously added with <link linkend="gtk-icon-factory-add-default"><function>gtk_icon_factory_add_default()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-add-source" role="function">
<title>gtk_icon_set_add_source ()</title>
<indexterm zone="gtk-icon-set-add-source"><primary sortas="icon_set_add_source">gtk_icon_set_add_source</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_set_add_source             (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set,
                                                         const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Icon sets have a list of <link linkend="GtkIconSource"><type>GtkIconSource</type></link>, which they use as base
icons for rendering icons in different states and sizes. Icons are
scaled, made to look insensitive, etc. in
<link linkend="gtk-icon-set-render-icon"><function>gtk_icon_set_render_icon()</function></link>, but <link linkend="GtkIconSet"><type>GtkIconSet</type></link> needs base images to
work with. The base images and when to use them are described by
a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>.
</para>
<para>
This function copies <parameter>source</parameter>, so you can reuse the same source immediately
without affecting the icon set.
</para>
<para>
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.
</para>
<para>
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. <link linkend="GtkIconSet"><type>GtkIconSet</type></link> 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.
</para>
<para>
<link linkend="gtk-icon-set-new-from-pixbuf"><function>gtk_icon_set_new_from_pixbuf()</function></link> creates a new icon set with a
default icon source based on the given pixbuf.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon_set</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-copy" role="function">
<title>gtk_icon_set_copy ()</title>
<indexterm zone="gtk-icon-set-copy"><primary sortas="icon_set_copy">gtk_icon_set_copy</primary></indexterm><programlisting><link linkend="GtkIconSet">GtkIconSet</link>*         gtk_icon_set_copy                   (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set);</programlisting>
<para>
Copies <parameter>icon_set</parameter> by value.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon_set</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkIconSet"><type>GtkIconSet</type></link> identical to the first.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-new" role="function">
<title>gtk_icon_set_new ()</title>
<indexterm zone="gtk-icon-set-new"><primary sortas="icon_set_new">gtk_icon_set_new</primary></indexterm><programlisting><link linkend="GtkIconSet">GtkIconSet</link>*         gtk_icon_set_new                    (void);</programlisting>
<para>
Creates a new <link linkend="GtkIconSet"><type>GtkIconSet</type></link>. A <link linkend="GtkIconSet"><type>GtkIconSet</type></link> represents a single icon
in various sizes and widget states. It can provide a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
for a given size and state on request, and automatically caches
some of the rendered <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> objects.
</para>
<para>
Normally you would use <link linkend="gtk-widget-render-icon"><function>gtk_widget_render_icon()</function></link> instead of
using <link linkend="GtkIconSet"><type>GtkIconSet</type></link> directly. The one case where you'd use
<link linkend="GtkIconSet"><type>GtkIconSet</type></link> is to create application-specific icon sets to place in
a <link linkend="GtkIconFactory"><type>GtkIconFactory</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkIconSet"><type>GtkIconSet</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-new-from-pixbuf" role="function">
<title>gtk_icon_set_new_from_pixbuf ()</title>
<indexterm zone="gtk-icon-set-new-from-pixbuf"><primary sortas="icon_set_new_from_pixbuf">gtk_icon_set_new_from_pixbuf</primary></indexterm><programlisting><link linkend="GtkIconSet">GtkIconSet</link>*         gtk_icon_set_new_from_pixbuf        (<link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Creates a new <link linkend="GtkIconSet"><type>GtkIconSet</type></link> with <parameter>pixbuf</parameter> as the default/fallback
source image. If you don't add any additional <link linkend="GtkIconSource"><type>GtkIconSource</type></link> to the
icon set, all variants of the icon will be created from <parameter>pixbuf</parameter>,
using scaling, pixelation, etc. as required to adjust the icon size
or make the icon look insensitive/prelighted.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkIconSet"><type>GtkIconSet</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-ref" role="function">
<title>gtk_icon_set_ref ()</title>
<indexterm zone="gtk-icon-set-ref"><primary sortas="icon_set_ref">gtk_icon_set_ref</primary></indexterm><programlisting><link linkend="GtkIconSet">GtkIconSet</link>*         gtk_icon_set_ref                    (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set);</programlisting>
<para>
Increments the reference count on <parameter>icon_set</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon_set</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <parameter>icon_set</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-render-icon" role="function">
<title>gtk_icon_set_render_icon ()</title>
<indexterm zone="gtk-icon-set-render-icon"><primary sortas="icon_set_render_icon">gtk_icon_set_render_icon</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          gtk_icon_set_render_icon            (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set,
                                                         <link linkend="GtkStyle">GtkStyle</link> *style,
                                                         <link linkend="GtkTextDirection">GtkTextDirection</link> direction,
                                                         <link linkend="GtkStateType">GtkStateType</link> state,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> size,
                                                         <link linkend="GtkWidget">GtkWidget</link> *widget,
                                                         const <link linkend="char">char</link> *detail);</programlisting>
<para>
Renders an icon using <link linkend="gtk-style-render-icon"><function>gtk_style_render_icon()</function></link>. In most cases,
<link linkend="gtk-widget-render-icon"><function>gtk_widget_render_icon()</function></link> is better, since it automatically provides
most of the arguments from the current widget settings.  This
function never returns <link linkend="NULL--CAPS"><literal>NULL</literal></link>; if the icon can't be rendered
(perhaps because an image file fails to load), a default "missing
image" icon will be returned instead.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon_set</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>style</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkStyle"><type>GtkStyle</type></link> associated with <parameter>widget</parameter>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>direction</parameter>&#160;:</term>
<listitem><simpara> text direction
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>state</parameter>&#160;:</term>
<listitem><simpara> widget state
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara> icon size. A size of (GtkIconSize)-1
       means render at the size of the source and don't scale.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>widget</parameter>&#160;:</term>
<listitem><simpara> widget that will display the icon, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
         The only use that is typically made of this
         is to determine the appropriate <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>detail</parameter>&#160;:</term>
<listitem><simpara> detail to pass to the theme engine, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
         Note that passing a detail of anything but <link linkend="NULL--CAPS"><literal>NULL</literal></link>
         will disable caching.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> to be displayed
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-unref" role="function">
<title>gtk_icon_set_unref ()</title>
<indexterm zone="gtk-icon-set-unref"><primary sortas="icon_set_unref">gtk_icon_set_unref</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_set_unref                  (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set);</programlisting>
<para>
Decrements the reference count on <parameter>icon_set</parameter>, and frees memory
if the reference count reaches 0.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon_set</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-size-lookup" role="function">
<title>gtk_icon_size_lookup ()</title>
<indexterm zone="gtk-icon-size-lookup"><primary sortas="icon_size_lookup">gtk_icon_size_lookup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_icon_size_lookup                (<link linkend="GtkIconSize">GtkIconSize</link> size,
                                                         <link linkend="gint">gint</link> *width,
                                                         <link linkend="gint">gint</link> *height);</programlisting>
<para>
Obtains the pixel size of a semantic icon size, possibly
modified by user preferences for the default <link linkend="GtkSettings"><type>GtkSettings</type></link>.
(See <link linkend="gtk-icon-size-lookup-for-settings"><function>gtk_icon_size_lookup_for_settings()</function></link>.)
Normally <parameter>size</parameter> would be
<link linkend="GTK-ICON-SIZE-MENU--CAPS"><type>GTK_ICON_SIZE_MENU</type></link>, <link linkend="GTK-ICON-SIZE-BUTTON--CAPS"><type>GTK_ICON_SIZE_BUTTON</type></link>, etc.  This function
isn't normally needed, <link linkend="gtk-widget-render-icon"><function>gtk_widget_render_icon()</function></link> 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 <link linkend="gtk-icon-size-lookup"><function>gtk_icon_size_lookup()</function></link>, because themes
are free to render the pixbuf however they like, including changing
the usual size.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara> an icon size
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> location to store icon width
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> location to store icon height
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>size</parameter> was a valid size
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-size-lookup-for-settings" role="function" condition="since:2.2">
<title>gtk_icon_size_lookup_for_settings ()</title>
<indexterm zone="gtk-icon-size-lookup-for-settings" role="2.2"><primary sortas="icon_size_lookup_for_settings">gtk_icon_size_lookup_for_settings</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_icon_size_lookup_for_settings   (<link linkend="GtkSettings">GtkSettings</link> *settings,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> size,
                                                         <link linkend="gint">gint</link> *width,
                                                         <link linkend="gint">gint</link> *height);</programlisting>
<para>
Obtains the pixel size of a semantic icon size, possibly
modified by user preferences for a particular 
<link linkend="GtkSettings"><type>GtkSettings</type></link>. Normally <parameter>size</parameter> would be
<link linkend="GTK-ICON-SIZE-MENU--CAPS"><type>GTK_ICON_SIZE_MENU</type></link>, <link linkend="GTK-ICON-SIZE-BUTTON--CAPS"><type>GTK_ICON_SIZE_BUTTON</type></link>, etc.  This function
isn't normally needed, <link linkend="gtk-widget-render-icon"><function>gtk_widget_render_icon()</function></link> 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 <link linkend="gtk-icon-size-lookup"><function>gtk_icon_size_lookup()</function></link>, because themes
are free to render the pixbuf however they like, including changing
the usual size.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>settings</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSettings"><type>GtkSettings</type></link> object, used to determine
  which set of user preferences to used.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara> an icon size
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> location to store icon width
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> location to store icon height
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>size</parameter> was a valid size

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-icon-size-register" role="function">
<title>gtk_icon_size_register ()</title>
<indexterm zone="gtk-icon-size-register"><primary sortas="icon_size_register">gtk_icon_size_register</primary></indexterm><programlisting><link linkend="GtkIconSize">GtkIconSize</link>         gtk_icon_size_register              (const <link linkend="gchar">gchar</link> *name,
                                                         <link linkend="gint">gint</link> width,
                                                         <link linkend="gint">gint</link> height);</programlisting>
<para>
Registers a new icon size, along the same lines as <link linkend="GTK-ICON-SIZE-MENU--CAPS"><type>GTK_ICON_SIZE_MENU</type></link>,
etc. Returns the integer value for the size.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> name of the icon size
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter>&#160;:</term>
<listitem><simpara> the icon width
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter>&#160;:</term>
<listitem><simpara> the icon height
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> integer value representing the size

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-size-register-alias" role="function">
<title>gtk_icon_size_register_alias ()</title>
<indexterm zone="gtk-icon-size-register-alias"><primary sortas="icon_size_register_alias">gtk_icon_size_register_alias</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_size_register_alias        (const <link linkend="gchar">gchar</link> *alias,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> target);</programlisting>
<para>
Registers <parameter>alias</parameter> as another name for <parameter>target</parameter>.
So calling <link linkend="gtk-icon-size-from-name"><function>gtk_icon_size_from_name()</function></link> with <parameter>alias</parameter> as argument
will return <parameter>target</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>alias</parameter>&#160;:</term>
<listitem><simpara> an alias for <parameter>target</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>target</parameter>&#160;:</term>
<listitem><simpara> an existing icon size
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-size-from-name" role="function">
<title>gtk_icon_size_from_name ()</title>
<indexterm zone="gtk-icon-size-from-name"><primary sortas="icon_size_from_name">gtk_icon_size_from_name</primary></indexterm><programlisting><link linkend="GtkIconSize">GtkIconSize</link>         gtk_icon_size_from_name             (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Looks up the icon size associated with <parameter>name</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara> the name to look up.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the icon size with the given name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-size-get-name" role="function">
<title>gtk_icon_size_get_name ()</title>
<indexterm zone="gtk-icon-size-get-name"><primary sortas="icon_size_get_name">gtk_icon_size_get_name</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        gtk_icon_size_get_name              (<link linkend="GtkIconSize">GtkIconSize</link> size);</programlisting>
<para>
Gets the canonical name of the given icon size. The returned string 
is statically allocated and should not be freed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSize"><type>GtkIconSize</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the name of the given icon size.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-set-get-sizes" role="function">
<title>gtk_icon_set_get_sizes ()</title>
<indexterm zone="gtk-icon-set-get-sizes"><primary sortas="icon_set_get_sizes">gtk_icon_set_get_sizes</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_set_get_sizes              (<link linkend="GtkIconSet">GtkIconSet</link> *icon_set,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> **sizes,
                                                         <link linkend="gint">gint</link> *n_sizes);</programlisting>
<para>
Obtains a list of icon sizes this icon set can render. The returned
array must be freed with <link linkend="g-free"><function>g_free()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon_set</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sizes</parameter>&#160;:</term>
<listitem><simpara> return location for array of sizes
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_sizes</parameter>&#160;:</term>
<listitem><simpara> location to store number of elements in returned array
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-direction" role="function">
<title>gtk_icon_source_get_direction ()</title>
<indexterm zone="gtk-icon-source-get-direction"><primary sortas="icon_source_get_direction">gtk_icon_source_get_direction</primary></indexterm><programlisting><link linkend="GtkTextDirection">GtkTextDirection</link>    gtk_icon_source_get_direction       (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Obtains the text direction this icon source applies to. The return
value is only useful/meaningful if the text direction is <emphasis>not</emphasis> 
wildcarded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> text direction this source matches
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-direction-wildcarded" role="function">
<title>gtk_icon_source_get_direction_wildcarded ()</title>
<indexterm zone="gtk-icon-source-get-direction-wildcarded"><primary sortas="icon_source_get_direction_wildcarded">gtk_icon_source_get_direction_wildcarded</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_icon_source_get_direction_wildcarded
                                                        (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Gets the value set by <link linkend="gtk-icon-source-set-direction-wildcarded"><function>gtk_icon_source_set_direction_wildcarded()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if this icon source is a base for any text direction variant
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-filename" role="function">
<title>gtk_icon_source_get_filename ()</title>
<indexterm zone="gtk-icon-source-get-filename"><primary sortas="icon_source_get_filename">gtk_icon_source_get_filename</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        gtk_icon_source_get_filename        (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Retrieves the source filename, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> image filename. This string must not be modified
or freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-pixbuf" role="function">
<title>gtk_icon_source_get_pixbuf ()</title>
<indexterm zone="gtk-icon-source-get-pixbuf"><primary sortas="icon_source_get_pixbuf">gtk_icon_source_get_pixbuf</primary></indexterm><programlisting><link linkend="GdkPixbuf">GdkPixbuf</link>*          gtk_icon_source_get_pixbuf          (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Retrieves the source pixbuf, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 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::<link linkend="render-icon"><function>render_icon()</function></link>
virtual function. The reference count on the pixbuf is
not incremented.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> source pixbuf
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-icon-name" role="function">
<title>gtk_icon_source_get_icon_name ()</title>
<indexterm zone="gtk-icon-source-get-icon-name"><primary sortas="icon_source_get_icon_name">gtk_icon_source_get_icon_name</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        gtk_icon_source_get_icon_name       (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Retrieves the source icon name, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> 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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> icon name. This string must not be modified or freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-size" role="function">
<title>gtk_icon_source_get_size ()</title>
<indexterm zone="gtk-icon-source-get-size"><primary sortas="icon_source_get_size">gtk_icon_source_get_size</primary></indexterm><programlisting><link linkend="GtkIconSize">GtkIconSize</link>         gtk_icon_source_get_size            (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Obtains the icon size this source applies to. The return value
is only useful/meaningful if the icon size is <emphasis>not</emphasis> wildcarded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> icon size this source matches.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-size-wildcarded" role="function">
<title>gtk_icon_source_get_size_wildcarded ()</title>
<indexterm zone="gtk-icon-source-get-size-wildcarded"><primary sortas="icon_source_get_size_wildcarded">gtk_icon_source_get_size_wildcarded</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_icon_source_get_size_wildcarded (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Gets the value set by <link linkend="gtk-icon-source-set-size-wildcarded"><function>gtk_icon_source_set_size_wildcarded()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if this icon source is a base for any icon size variant
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-state" role="function">
<title>gtk_icon_source_get_state ()</title>
<indexterm zone="gtk-icon-source-get-state"><primary sortas="icon_source_get_state">gtk_icon_source_get_state</primary></indexterm><programlisting><link linkend="GtkStateType">GtkStateType</link>        gtk_icon_source_get_state           (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Obtains the widget state this icon source applies to. The return
value is only useful/meaningful if the widget state is <emphasis>not</emphasis>
wildcarded.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> widget state this source matches
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-get-state-wildcarded" role="function">
<title>gtk_icon_source_get_state_wildcarded ()</title>
<indexterm zone="gtk-icon-source-get-state-wildcarded"><primary sortas="icon_source_get_state_wildcarded">gtk_icon_source_get_state_wildcarded</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_icon_source_get_state_wildcarded
                                                        (const <link linkend="GtkIconSource">GtkIconSource</link> *source);</programlisting>
<para>
Gets the value set by <link linkend="gtk-icon-source-set-state-wildcarded"><function>gtk_icon_source_set_state_wildcarded()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if this icon source is a base for any widget state variant
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-new" role="function">
<title>gtk_icon_source_new ()</title>
<indexterm zone="gtk-icon-source-new"><primary sortas="icon_source_new">gtk_icon_source_new</primary></indexterm><programlisting><link linkend="GtkIconSource">GtkIconSource</link>*      gtk_icon_source_new                 (void);</programlisting>
<para>
Creates a new <link linkend="GtkIconSource"><type>GtkIconSource</type></link>. A <link linkend="GtkIconSource"><type>GtkIconSource</type></link> contains a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> (or
image filename) that serves as the base image for one or more of the
icons in a <link linkend="GtkIconSet"><type>GtkIconSet</type></link>, 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.
</para>
<para>
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. <link linkend="GtkIconSet"><type>GtkIconSet</type></link> contains a list
of <link linkend="GtkIconSource"><type>GtkIconSource</type></link> from which it can derive specific icon variants in
the set. 
</para>
<para>
In the simplest case, <link linkend="GtkIconSet"><type>GtkIconSet</type></link> contains one source pixbuf from
which it derives all variants. The convenience function
<link linkend="gtk-icon-set-new-from-pixbuf"><function>gtk_icon_set_new_from_pixbuf()</function></link> handles this case; if you only have
one source pixbuf, just use that function.
</para>
<para>
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
<link linkend="gtk-icon-set-add-source"><function>gtk_icon_set_add_source()</function></link>.
</para>
<para>
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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-direction" role="function">
<title>gtk_icon_source_set_direction ()</title>
<indexterm zone="gtk-icon-source-set-direction"><primary sortas="icon_source_set_direction">gtk_icon_source_set_direction</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_direction       (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GtkTextDirection">GtkTextDirection</link> direction);</programlisting>
<para>
Sets the text direction this icon source is intended to be used
with.
</para>
<para>
Setting the text direction on an icon source makes no difference
if the text direction is wildcarded. Therefore, you should usually
call <link linkend="gtk-icon-source-set-direction-wildcarded"><function>gtk_icon_source_set_direction_wildcarded()</function></link> to un-wildcard it
in addition to calling this function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>direction</parameter>&#160;:</term>
<listitem><simpara> text direction this source applies to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-direction-wildcarded" role="function">
<title>gtk_icon_source_set_direction_wildcarded ()</title>
<indexterm zone="gtk-icon-source-set-direction-wildcarded"><primary sortas="icon_source_set_direction_wildcarded">gtk_icon_source_set_direction_wildcarded</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_direction_wildcarded
                                                        (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
If the text direction is wildcarded, this source can be used
as the base image for an icon in any <link linkend="GtkTextDirection"><type>GtkTextDirection</type></link>.
If the text direction is not wildcarded, then the
text direction the icon source applies to should be set
with <link linkend="gtk-icon-source-set-direction"><function>gtk_icon_source_set_direction()</function></link>, and the icon source
will only be used with that text direction.
</para>
<para>
<link linkend="GtkIconSet"><type>GtkIconSet</type></link> prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>setting</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to wildcard the text direction
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-filename" role="function">
<title>gtk_icon_source_set_filename ()</title>
<indexterm zone="gtk-icon-source-set-filename"><primary sortas="icon_source_set_filename">gtk_icon_source_set_filename</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_filename        (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         const <link linkend="gchar">gchar</link> *filename);</programlisting>
<para>
Sets the name of an image file to use as a base image when creating
icon variants for <link linkend="GtkIconSet"><type>GtkIconSet</type></link>. The filename must be absolute.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filename</parameter>&#160;:</term>
<listitem><simpara> image file to use
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-pixbuf" role="function">
<title>gtk_icon_source_set_pixbuf ()</title>
<indexterm zone="gtk-icon-source-set-pixbuf"><primary sortas="icon_source_set_pixbuf">gtk_icon_source_set_pixbuf</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_pixbuf          (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Sets a pixbuf to use as a base image when creating icon variants
for <link linkend="GtkIconSet"><type>GtkIconSet</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara> pixbuf to use as a source
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-icon-name" role="function">
<title>gtk_icon_source_set_icon_name ()</title>
<indexterm zone="gtk-icon-source-set-icon-name"><primary sortas="icon_source_set_icon_name">gtk_icon_source_set_icon_name</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_icon_name       (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         const <link linkend="gchar">gchar</link> *icon_name);</programlisting>
<para>
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 <link linkend="GtkIconSet"><type>GtkIconSet</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>icon_name</parameter>&#160;:</term>
<listitem><simpara> name of icon to use
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-size" role="function">
<title>gtk_icon_source_set_size ()</title>
<indexterm zone="gtk-icon-source-set-size"><primary sortas="icon_source_set_size">gtk_icon_source_set_size</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_size            (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GtkIconSize">GtkIconSize</link> size);</programlisting>
<para>
Sets the icon size this icon source is intended to be used
with.
</para>
<para>
Setting the icon size on an icon source makes no difference
if the size is wildcarded. Therefore, you should usually
call <link linkend="gtk-icon-source-set-size-wildcarded"><function>gtk_icon_source_set_size_wildcarded()</function></link> to un-wildcard it
in addition to calling this function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara> icon size this source applies to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-size-wildcarded" role="function">
<title>gtk_icon_source_set_size_wildcarded ()</title>
<indexterm zone="gtk-icon-source-set-size-wildcarded"><primary sortas="icon_source_set_size_wildcarded">gtk_icon_source_set_size_wildcarded</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_size_wildcarded (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
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
<link linkend="gtk-icon-source-set-size"><function>gtk_icon_source_set_size()</function></link> and the icon source will only be used
with that specific size.
</para>
<para>
<link linkend="GtkIconSet"><type>GtkIconSet</type></link> prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.
</para>
<para>
<link linkend="GtkIconSet"><type>GtkIconSet</type></link> 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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>setting</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to wildcard the widget state
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-state" role="function">
<title>gtk_icon_source_set_state ()</title>
<indexterm zone="gtk-icon-source-set-state"><primary sortas="icon_source_set_state">gtk_icon_source_set_state</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_state           (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="GtkStateType">GtkStateType</link> state);</programlisting>
<para>
Sets the widget state this icon source is intended to be used
with.
</para>
<para>
Setting the widget state on an icon source makes no difference
if the state is wildcarded. Therefore, you should usually
call <link linkend="gtk-icon-source-set-state-wildcarded"><function>gtk_icon_source_set_state_wildcarded()</function></link> to un-wildcard it
in addition to calling this function.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>state</parameter>&#160;:</term>
<listitem><simpara> widget state this source applies to
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-icon-source-set-state-wildcarded" role="function">
<title>gtk_icon_source_set_state_wildcarded ()</title>
<indexterm zone="gtk-icon-source-set-state-wildcarded"><primary sortas="icon_source_set_state_wildcarded">gtk_icon_source_set_state_wildcarded</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_icon_source_set_state_wildcarded
                                                        (<link linkend="GtkIconSource">GtkIconSource</link> *source,
                                                         <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
If the widget state is wildcarded, this source can be used as the
base image for an icon in any <link linkend="GtkStateType"><type>GtkStateType</type></link>.  If the widget state
is not wildcarded, then the state the source applies to should be
set with <link linkend="gtk-icon-source-set-state"><function>gtk_icon_source_set_state()</function></link> and the icon source will
only be used with that specific state.
</para>
<para>
<link linkend="GtkIconSet"><type>GtkIconSet</type></link> prefers non-wildcarded sources (exact matches) over
wildcarded sources, and will use an exact match when possible.
</para>
<para>
<link linkend="GtkIconSet"><type>GtkIconSet</type></link> 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.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>source</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkIconSource"><type>GtkIconSource</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>setting</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to wildcard the widget state
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
