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

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

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

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

<refsect1 id="gnome-desktop-Miscellaneous-Thumbnail-Functions.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>
<refsect1 id="gnome-desktop-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">gboolean</link>            gnome_desktop_thumbnail_has_uri     (<link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                                         const <link linkend="char">char</link> *uri);</programlisting>
<para>
Returns whether the thumbnail has the correct uri embedded in the
Thumb::URI option in the png.</para>
<para>
</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">gboolean</link>            gnome_desktop_thumbnail_is_valid    (<link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                                         const <link linkend="char">char</link> *uri,
                                                         <link linkend="time-t">time_t</link> mtime);</programlisting>
<para>
Returns whether the thumbnail has the correct uri and mtime embedded in the
png options.</para>
<para>
</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">char</link> *              gnome_desktop_thumbnail_md5         (const <link linkend="char">char</link> *uri);</programlisting>
<para>
Calculates the MD5 checksum of the uri. This can be useful
if you want to manually handle thumbnail files.</para>
<para>
</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">char</link> *              gnome_desktop_thumbnail_path_for_uri
                                                        (const <link linkend="char">char</link> *uri,
                                                         <link linkend="GnomeDesktopThumbnailSize">GnomeDesktopThumbnailSize</link> size);</programlisting>
<para>
Returns the filename that a thumbnail of size <parameter>size</parameter> for <parameter>uri</parameter> would have.</para>
<para>
</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">GdkPixbuf</link> *         gnome_desktop_thumbnail_scale_down_pixbuf
                                                        (<link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                                         <link linkend="int">int</link> dest_width,
                                                         <link linkend="int">int</link> dest_height);</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>
