
@c %start of fragment

@deftp Class <gnome-thumbnail-factory>
This @code{<gobject>} class defines no properties, other than those defined by
its superclasses.

@end deftp

@deffn Function gnome-thumbnail-factory-new  (size@tie{}@code{<gnome-thumbnail-size>}) @result{}@tie{} (ret@tie{}@code{<gnome-thumbnail-factory>})
Creates a new @code{<gnome-thumbnail-factory>}.

This function must be called on the main thread.

@table @var
@item size
The thumbnail size to use

@item ret
a new @code{<gnome-thumbnail-factory>}

@end table

Since 2.2

@end deffn

@deffn Function gnome-thumbnail-factory-lookup  (self@tie{}@code{<gnome-thumbnail-factory>}) (uri@tie{}@code{mchars}) (mtime@tie{}@code{long}) @result{}@tie{} (ret@tie{}@code{mchars})
@deffnx Method lookup
Tries to locate an existing thumbnail for the file specified.

Usage of this function is threadsafe.

@table @var
@item factory
a @code{<gnome-thumbnail-factory>}

@item uri
the uri of a file

@item mtime
the mtime of the file

@item ret
The absolute path of the thumbnail, or @samp{@code{#f}} if none exist.

@end table

Since 2.2

@end deffn

@deffn Function gnome-thumbnail-scale-down-pixbuf  (pixbuf@tie{}@code{<gdk-pixbuf>}) (dest_width@tie{}@code{int}) (dest_height@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{<gdk-pixbuf>})
Scales the pixbuf to the desired size. This function is a lot faster than
gdk-pixbuf when scaling down by large amounts.

@table @var
@item pixbuf
a @code{<gdk-pixbuf>}

@item dest-width
the desired new width

@item dest-height
the desired new height

@item ret
a scaled pixbuf

@end table

Since 2.2

@end deffn

@deffn Function gnome-thumbnail-has-uri  (pixbuf@tie{}@code{<gdk-pixbuf>}) (uri@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{bool})
Returns whether the thumbnail has the correct uri embedded in the Thumb::URI
option in the png.

@table @var
@item pixbuf
an loaded thumbnail pixbuf

@item uri
a uri

@item ret
TRUE if the thumbnail is for @var{uri}

@end table

Since 2.2

@end deffn

@deffn Function gnome-thumbnail-is-valid  (pixbuf@tie{}@code{<gdk-pixbuf>}) (uri@tie{}@code{mchars}) (mtime@tie{}@code{long}) @result{}@tie{} (ret@tie{}@code{bool})
Returns whether the thumbnail has the correct uri and mtime embedded in the png
options.

@table @var
@item pixbuf
an loaded thumbnail @code{<gdk-pixbuf>}

@item uri
a uri

@item mtime
the mtime

@item ret
TRUE if the thumbnail has the right @var{uri} and @var{mtime}

@end table

Since 2.2

@end deffn

@deffn Function gnome-thumbnail-md5  (uri@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{mchars})
Calculates the MD5 checksum of the uri. This can be useful if you want to
manually handle thumbnail files.

@table @var
@item uri
an uri

@item ret
A string with the MD5 digest of the uri string.

@end table

Since 2.2

@end deffn

@deffn Function gnome-thumbnail-path-for-uri  (uri@tie{}@code{mchars}) (size@tie{}@code{<gnome-thumbnail-size>}) @result{}@tie{} (ret@tie{}@code{mchars})
Returns the filename that a thumbnail of size @var{size} for @var{uri} would
have.

@table @var
@item uri
an uri

@item size
a thumbnail size

@item ret
an absolute filename

@end table

Since 2.2

@end deffn


@c %end of fragment
