<?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">
<refentry id="gnome-desktop3-Miscellaneous-Thumbnail-Functions">
<refmeta>
<refentrytitle role="top_of_page" id="gnome-desktop3-Miscellaneous-Thumbnail-Functions.top_of_page">Miscellaneous Thumbnail Functions</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GNOME-DESKTOP3 Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Miscellaneous Thumbnail Functions</refname>
<refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv id="gnome-desktop3-Miscellaneous-Thumbnail-Functions.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
#include &lt;libgnomeui/gnome-thumbnail.h&gt;

<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="gnome-desktop-thumbnail-has-uri">gnome_desktop_thumbnail_has_uri</link>     (<parameter><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *pixbuf</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="gnome-desktop-thumbnail-is-valid">gnome_desktop_thumbnail_is_valid</link>    (<parameter><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *pixbuf</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> mtime</parameter>);
<link linkend="char"><returnvalue>char</returnvalue></link> *              <link linkend="gnome-desktop-thumbnail-md5">gnome_desktop_thumbnail_md5</link>         (<parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>);
<link linkend="char"><returnvalue>char</returnvalue></link> *              <link linkend="gnome-desktop-thumbnail-path-for-uri">gnome_desktop_thumbnail_path_for_uri</link>
                                                        (<parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>,
                                                         <parameter><link linkend="GnomeDesktopThumbnailSize"><type>GnomeDesktopThumbnailSize</type></link> size</parameter>);
<link linkend="GdkPixbuf"><returnvalue>GdkPixbuf</returnvalue></link> *         <link linkend="gnome-desktop-thumbnail-scale-down-pixbuf">gnome_desktop_thumbnail_scale_down_pixbuf</link>
                                                        (<parameter><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *pixbuf</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> dest_width</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> dest_height</parameter>);
</synopsis>
</refsynopsisdiv>

<refsect1 id="gnome-desktop3-Miscellaneous-Thumbnail-Functions.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>
<refsect1 id="gnome-desktop3-Miscellaneous-Thumbnail-Functions.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="gnome-desktop-thumbnail-has-uri" role="function" condition="since:2.2">
<title>gnome_desktop_thumbnail_has_uri ()</title>
<indexterm zone="gnome-desktop-thumbnail-has-uri" role="2.2"><primary>gnome_desktop_thumbnail_has_uri</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            gnome_desktop_thumbnail_has_uri     (<parameter><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *pixbuf</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>);</programlisting>
<para>
Returns whether the thumbnail has the correct uri embedded in the
Thumb::URI option in the png.
</para><variablelist role="params">
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara>an loaded thumbnail pixbuf
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara>a uri
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if the thumbnail is for <parameter>uri</parameter>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gnome-desktop-thumbnail-is-valid" role="function" condition="since:2.2">
<title>gnome_desktop_thumbnail_is_valid ()</title>
<indexterm zone="gnome-desktop-thumbnail-is-valid" role="2.2"><primary>gnome_desktop_thumbnail_is_valid</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            gnome_desktop_thumbnail_is_valid    (<parameter><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *pixbuf</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> mtime</parameter>);</programlisting>
<para>
Returns whether the thumbnail has the correct uri and mtime embedded in the
png options.
</para><variablelist role="params">
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara>an loaded thumbnail <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara>a uri
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mtime</parameter>&#160;:</term>
<listitem><simpara>the mtime
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> TRUE if the thumbnail has the right <parameter>uri</parameter> and <parameter>mtime</parameter>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gnome-desktop-thumbnail-md5" role="function" condition="since:2.2">
<title>gnome_desktop_thumbnail_md5 ()</title>
<indexterm zone="gnome-desktop-thumbnail-md5" role="2.2"><primary>gnome_desktop_thumbnail_md5</primary></indexterm>
<programlisting><link linkend="char"><returnvalue>char</returnvalue></link> *              gnome_desktop_thumbnail_md5         (<parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>);</programlisting>
<para>
Calculates the MD5 checksum of the uri. This can be useful
if you want to manually handle thumbnail files.
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara>an uri
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A string with the MD5 digest of the uri string.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gnome-desktop-thumbnail-path-for-uri" role="function" condition="since:2.2">
<title>gnome_desktop_thumbnail_path_for_uri ()</title>
<indexterm zone="gnome-desktop-thumbnail-path-for-uri" role="2.2"><primary>gnome_desktop_thumbnail_path_for_uri</primary></indexterm>
<programlisting><link linkend="char"><returnvalue>char</returnvalue></link> *              gnome_desktop_thumbnail_path_for_uri
                                                        (<parameter>const <link linkend="char"><type>char</type></link> *uri</parameter>,
                                                         <parameter><link linkend="GnomeDesktopThumbnailSize"><type>GnomeDesktopThumbnailSize</type></link> size</parameter>);</programlisting>
<para>
Returns the filename that a thumbnail of size <parameter>size</parameter> for <parameter>uri</parameter> would have.
</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara>an uri
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara>a thumbnail size
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an absolute filename

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gnome-desktop-thumbnail-scale-down-pixbuf" role="function">
<title>gnome_desktop_thumbnail_scale_down_pixbuf ()</title>
<indexterm zone="gnome-desktop-thumbnail-scale-down-pixbuf"><primary>gnome_desktop_thumbnail_scale_down_pixbuf</primary></indexterm>
<programlisting><link linkend="GdkPixbuf"><returnvalue>GdkPixbuf</returnvalue></link> *         gnome_desktop_thumbnail_scale_down_pixbuf
                                                        (<parameter><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *pixbuf</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> dest_width</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> dest_height</parameter>);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>pixbuf</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_width</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>dest_height</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
