7 * This software is released under the GNU General Public License (GNU GPL).
8 * Please read the included file COPYING for more information.
9 * This software comes with no warranty of any kind, use at your own risk!
13 #ifndef THUMB_STANDARD_H
14 #define THUMB_STANDARD_H
17 #define THUMB_FOLDER ".thumbnails"
18 #define THUMB_FOLDER_NORMAL "normal"
19 #define THUMB_FOLDER_LARGE "large"
20 #define THUMB_FOLDER_FAIL "fail/gqview-1.0"
21 #define THUMB_NAME_EXTENSION ".png"
24 typedef struct _ThumbLoaderStd ThumbLoaderStd;
25 typedef void (* ThumbLoaderStdFunc)(ThumbLoaderStd *tl, gpointer data);
27 struct _ThumbLoaderStd
42 const gchar *local_uri;
44 gint thumb_path_local;
47 gint requested_height;
56 ThumbLoaderStdFunc func_done;
57 ThumbLoaderStdFunc func_error;
58 ThumbLoaderStdFunc func_progress;
64 ThumbLoaderStd *thumb_loader_std_new(gint width, gint height);
65 void thumb_loader_std_set_callbacks(ThumbLoaderStd *tl,
66 ThumbLoaderStdFunc func_done,
67 ThumbLoaderStdFunc func_error,
68 ThumbLoaderStdFunc func_progress,
70 void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gint enable_cache, gint local, gint retry_failed);
71 gint thumb_loader_std_start(ThumbLoaderStd *tl, const gchar *path);
72 void thumb_loader_std_free(ThumbLoaderStd *tl);
74 GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl, gint with_fallback);
77 /* validates a non local thumbnail file,
78 * calling func_valid with the information when app is idle
79 * for thumbnail's without a file: uri, validates against allowed_age in days
81 ThumbLoaderStd *thumb_loader_std_thumb_file_validate(const gchar *thumb_path, gint allowed_age,
82 void (*func_valid)(const gchar *path, gint valid, gpointer data),
84 void thumb_loader_std_thumb_file_validate_cancel(ThumbLoaderStd *tl);
87 void thumb_std_maint_removed(const gchar *source);
88 void thumb_std_maint_moved(const gchar *source, const gchar *dest);