<?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="GEmblem">
<refmeta>
<refentrytitle role="top_of_page" id="GEmblem.top_of_page">GEmblem</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GIO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GEmblem</refname>
<refpurpose>An object for emblems</refpurpose>
</refnamediv>

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

<synopsis>

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

                    <link linkend="GEmblem-struct">GEmblem</link>;
enum                <link linkend="GEmblemOrigin">GEmblemOrigin</link>;
<link linkend="GEmblem">GEmblem</link> *           <link linkend="g-emblem-new">g_emblem_new</link>                        (<link linkend="GIcon">GIcon</link> *icon);
<link linkend="GEmblem">GEmblem</link> *           <link linkend="g-emblem-new-with-origin">g_emblem_new_with_origin</link>            (<link linkend="GIcon">GIcon</link> *icon,
                                                         <link linkend="GEmblemOrigin">GEmblemOrigin</link> origin);
<link linkend="GIcon">GIcon</link> *             <link linkend="g-emblem-get-icon">g_emblem_get_icon</link>                   (<link linkend="GEmblem">GEmblem</link> *emblem);
<link linkend="GEmblemOrigin">GEmblemOrigin</link>       <link linkend="g-emblem-get-origin">g_emblem_get_origin</link>                 (<link linkend="GEmblem">GEmblem</link> *emblem);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GEmblem.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GEmblem
</synopsis>
</refsect1>



<refsect1 id="GEmblem.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GEmblem implements
 <link linkend="GIcon">GIcon</link>.</para>
</refsect1>


<refsect1 id="GEmblem.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GEmblem--icon">icon</link>&quot;                     <link linkend="GObject">GObject</link>*              : Read / Write / Construct Only
  &quot;<link linkend="GEmblem--origin">origin</link>&quot;                   <link linkend="GEmblemOrigin">GEmblemOrigin</link>         : Read / Write / Construct Only
</synopsis>
</refsect1>



<refsect1 id="GEmblem.description" role="desc">
<title role="desc.title">Description</title>
<para>
<link linkend="GEmblem"><type>GEmblem</type></link> is an implementation of <link linkend="GIcon"><type>GIcon</type></link> that supports
having an emblem, which is an icon with additional properties.
It can than be added to a <link linkend="GEmblemedIcon"><type>GEmblemedIcon</type></link>.
</para>
<para>
Currently, only metainformation about the emblem's origin is
supported. More may be added in the future.</para>
<para>
</para>
</refsect1>

<refsect1 id="GEmblem.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GEmblem-struct" role="struct">
<title>GEmblem</title>
<indexterm zone="GEmblem-struct"><primary sortas="Emblem">GEmblem</primary></indexterm><programlisting>typedef struct _GEmblem GEmblem;</programlisting>
<para>
An object for Emblems</para>
<para>
</para></refsect2>
<refsect2 id="GEmblemOrigin" role="enum" condition="since:2.18">
<title>enum GEmblemOrigin</title>
<indexterm zone="GEmblemOrigin" role="2.18"><primary sortas="EmblemOrigin">GEmblemOrigin</primary></indexterm><programlisting>typedef enum  {
  G_EMBLEM_ORIGIN_UNKNOWN,
  G_EMBLEM_ORIGIN_DEVICE,
  G_EMBLEM_ORIGIN_LIVEMETADATA,
  G_EMBLEM_ORIGIN_TAG
} GEmblemOrigin;
</programlisting>
<para>
GEmblemOrigin is used to add information about the origin of the emblem
to <link linkend="GEmblem"><type>GEmblem</type></link>.</para>
<para>
</para><variablelist role="enum">
<varlistentry id="G-EMBLEM-ORIGIN-UNKNOWN--CAPS" role="constant">
<term><literal>G_EMBLEM_ORIGIN_UNKNOWN</literal></term>
<listitem><simpara> Emblem of unknown origin
</simpara></listitem>
</varlistentry>
<varlistentry id="G-EMBLEM-ORIGIN-DEVICE--CAPS" role="constant">
<term><literal>G_EMBLEM_ORIGIN_DEVICE</literal></term>
<listitem><simpara> Emblem adds device-specific information
</simpara></listitem>
</varlistentry>
<varlistentry id="G-EMBLEM-ORIGIN-LIVEMETADATA--CAPS" role="constant">
<term><literal>G_EMBLEM_ORIGIN_LIVEMETADATA</literal></term>
<listitem><simpara> Emblem depicts live metadata, such as "readonly"
</simpara></listitem>
</varlistentry>
<varlistentry id="G-EMBLEM-ORIGIN-TAG--CAPS" role="constant">
<term><literal>G_EMBLEM_ORIGIN_TAG</literal></term>
<listitem><simpara> Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
</simpara></listitem>
</varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="g-emblem-new" role="function" condition="since:2.18">
<title>g_emblem_new ()</title>
<indexterm zone="g-emblem-new" role="2.18"><primary sortas="emblem_new">g_emblem_new</primary></indexterm><programlisting><link linkend="GEmblem">GEmblem</link> *           g_emblem_new                        (<link linkend="GIcon">GIcon</link> *icon);</programlisting>
<para>
Creates a new emblem for <parameter>icon</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon</parameter>&#160;:</term>
<listitem><simpara> a GIcon containing the icon.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GEmblem"><type>GEmblem</type></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="g-emblem-new-with-origin" role="function" condition="since:2.18">
<title>g_emblem_new_with_origin ()</title>
<indexterm zone="g-emblem-new-with-origin" role="2.18"><primary sortas="emblem_new_with_origin">g_emblem_new_with_origin</primary></indexterm><programlisting><link linkend="GEmblem">GEmblem</link> *           g_emblem_new_with_origin            (<link linkend="GIcon">GIcon</link> *icon,
                                                         <link linkend="GEmblemOrigin">GEmblemOrigin</link> origin);</programlisting>
<para>
Creates a new emblem for <parameter>icon</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>icon</parameter>&#160;:</term>
<listitem><simpara> a GIcon containing the icon.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>origin</parameter>&#160;:</term>
<listitem><simpara> a GEmblemOrigin enum defining the emblem's origin
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GEmblem"><type>GEmblem</type></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="g-emblem-get-icon" role="function" condition="since:2.18">
<title>g_emblem_get_icon ()</title>
<indexterm zone="g-emblem-get-icon" role="2.18"><primary sortas="emblem_get_icon">g_emblem_get_icon</primary></indexterm><programlisting><link linkend="GIcon">GIcon</link> *             g_emblem_get_icon                   (<link linkend="GEmblem">GEmblem</link> *emblem);</programlisting>
<para>
Gives back the icon from <parameter>emblem</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>emblem</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GEmblem"><type>GEmblem</type></link> from which the icon should be extracted.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GIcon"><type>GIcon</type></link>. The returned object belongs to the emblem
   and should not be modified or freed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="g-emblem-get-origin" role="function" condition="since:2.18">
<title>g_emblem_get_origin ()</title>
<indexterm zone="g-emblem-get-origin" role="2.18"><primary sortas="emblem_get_origin">g_emblem_get_origin</primary></indexterm><programlisting><link linkend="GEmblemOrigin">GEmblemOrigin</link>       g_emblem_get_origin                 (<link linkend="GEmblem">GEmblem</link> *emblem);</programlisting>
<para>
Gets the origin of the emblem.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>emblem</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GEmblem"><type>GEmblem</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the origin of the emblem

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>

</refsect1>
<refsect1 id="GEmblem.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GEmblem--icon" role="property"><title>The <literal>&quot;icon&quot;</literal> property</title>
<indexterm zone="GEmblem--icon"><primary sortas="Emblem:icon">GEmblem:icon</primary></indexterm><programlisting>  &quot;icon&quot;                     <link linkend="GObject">GObject</link>*              : Read / Write / Construct Only</programlisting>
<para>The actual icon of the emblem.</para></refsect2>
<refsect2 id="GEmblem--origin" role="property"><title>The <literal>&quot;origin&quot;</literal> property</title>
<indexterm zone="GEmblem--origin"><primary sortas="Emblem:origin">GEmblem:origin</primary></indexterm><programlisting>  &quot;origin&quot;                   <link linkend="GEmblemOrigin">GEmblemOrigin</link>         : Read / Write / Construct Only</programlisting>
<para>Tells which origin the emblem is derived from.</para><para>Default value: G_EMBLEM_ORIGIN_UNKNOWN</para>
</refsect2>
</refsect1>



<refsect1 id="GEmblem.see-also">
<title>See Also</title>
#GIcon, <link linkend="GEmblemedIcon"><type>GEmblemedIcon</type></link>, <link linkend="GLoadableIcon"><type>GLoadableIcon</type></link>, <link linkend="GThemedIcon"><type>GThemedIcon</type></link>
</refsect1>

</refentry>
