<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="GThemedIcon">
<refmeta>
<refentrytitle role="top_of_page">GThemedIcon</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GIO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GThemedIcon</refname>
<refpurpose>Icon theming support</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

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


                    <link linkend="GThemedIcon-struct">GThemedIcon</link>;
<link linkend="GIcon">GIcon</link>*              <link linkend="g-themed-icon-new">g_themed_icon_new</link>                   (const <link linkend="char">char</link> *iconname);
<link linkend="GIcon">GIcon</link>*              <link linkend="g-themed-icon-new-from-names">g_themed_icon_new_from_names</link>        (<link linkend="char">char</link> **iconnames,
                                                         <link linkend="int">int</link> len);
<link linkend="GIcon">GIcon</link>*              <link linkend="g-themed-icon-new-with-default-fallbacks">g_themed_icon_new_with_default_fallbacks</link>
                                                        (const <link linkend="char">char</link> *iconname);
<link linkend="void">void</link>                <link linkend="g-themed-icon-append-name">g_themed_icon_append_name</link>           (<link linkend="GThemedIcon">GThemedIcon</link> *icon,
                                                         const <link linkend="char">char</link> *iconname);


</synopsis>
</refsynopsisdiv>

<refsect1 role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----GThemedIcon
</synopsis>

</refsect1>



<refsect1 role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GThemedIcon implements
 <link linkend="GIcon">GIcon</link>.</para>

</refsect1>





<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
<link linkend="GThemedIcon"><type>GThemedIcon</type></link> is an implementation of <link linkend="GIcon"><type>GIcon</type></link> that supports icon themes.
<link linkend="GThemedIcon"><type>GThemedIcon</type></link> contains a list of all of the icons present in an icon
theme, so that icons can be looked up quickly. <link linkend="GThemedIcon"><type>GThemedIcon</type></link> does
not provide actual pixmaps for icons, just the icon names.
Ideally something like <link linkend="gtk-icon-theme-choose-icon"><function>gtk_icon_theme_choose_icon()</function></link> should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.</para>
<para>

</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="GThemedIcon-struct" role="struct"/>GThemedIcon</title>
<indexterm><primary>GThemedIcon</primary></indexterm><programlisting>typedef struct _GThemedIcon GThemedIcon;</programlisting>
<para>
An implementation of <link linkend="GIcon"><type>GIcon</type></link> for themed icons.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="g-themed-icon-new" role="function"/>g_themed_icon_new ()</title>
<indexterm><primary>g_themed_icon_new</primary></indexterm><programlisting><link linkend="GIcon">GIcon</link>*              g_themed_icon_new                   (const <link linkend="char">char</link> *iconname);</programlisting>
<para>
Creates a new themed icon for <parameter>iconname</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iconname</parameter>&nbsp;:</term>
<listitem><simpara> a string containing an icon name.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GThemedIcon"><type>GThemedIcon</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-themed-icon-new-from-names" role="function"/>g_themed_icon_new_from_names ()</title>
<indexterm><primary>g_themed_icon_new_from_names</primary></indexterm><programlisting><link linkend="GIcon">GIcon</link>*              g_themed_icon_new_from_names        (<link linkend="char">char</link> **iconnames,
                                                         <link linkend="int">int</link> len);</programlisting>
<para>
Creates a new themed icon for <parameter>iconnames</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iconnames</parameter>&nbsp;:</term>
<listitem><simpara> an array of strings containing icon names.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len</parameter>&nbsp;:</term>
<listitem><simpara> the number of elements in the <parameter>iconnames</parameter> array.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GThemedIcon"><type>GThemedIcon</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-themed-icon-new-with-default-fallbacks" role="function"/>g_themed_icon_new_with_default_fallbacks ()</title>
<indexterm><primary>g_themed_icon_new_with_default_fallbacks</primary></indexterm><programlisting><link linkend="GIcon">GIcon</link>*              g_themed_icon_new_with_default_fallbacks
                                                        (const <link linkend="char">char</link> *iconname);</programlisting>
<para>
Creates a new themed icon for <parameter>iconname</parameter>, and all the names
that can be created by shortening <parameter>iconname</parameter> at '-' characters.
</para>
<para>
In the following example, <parameter>icon1</parameter> and <parameter>icon2</parameter> are equivalent:
<informalexample><programlisting>
const char *names[] = { 
  "gnome-dev-cdrom-audio",
  "gnome-dev-cdrom",
  "gnome-dev",
  "gnome"
};

icon1 = g_themed_icon_new_from_names (names, 4);
icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
</programlisting></informalexample></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iconname</parameter>&nbsp;:</term>
<listitem><simpara> a string containing an icon name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a new <link linkend="GThemedIcon"><type>GThemedIcon</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="g-themed-icon-append-name" role="function"/>g_themed_icon_append_name ()</title>
<indexterm><primary>g_themed_icon_append_name</primary></indexterm><programlisting><link linkend="void">void</link>                g_themed_icon_append_name           (<link linkend="GThemedIcon">GThemedIcon</link> *icon,
                                                         const <link linkend="char">char</link> *iconname);</programlisting>
<para>
Append a name to the list of icons from within <parameter>icon</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>icon</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GThemedIcon"><type>GThemedIcon</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>iconname</parameter>&nbsp;:</term>
<listitem><simpara> name of icon to append to list of icons from within <parameter>icon</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<link linkend="GIcon"><type>GIcon</type></link>, <link linkend="GLoadableIcon"><type>GLoadableIcon</type></link>
</refsect1>


<refsect1><refsect2 /><refsect2 /></refsect1>
</refentry>
