Mercurial > geeqie.yaz
annotate src/thumb_standard.h @ 196:f6e307c7bad6
rename GQview -> Geeqie over the code
author | nadvornik |
---|---|
date | Sun, 23 Mar 2008 20:38:54 +0000 |
parents | 528e3432e0c0 |
children | 46169c246c51 |
rev | line source |
---|---|
9 | 1 /* |
196 | 2 * Geeqie |
79
528e3432e0c0
Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
3 * (C) 2006 John Ellis |
9 | 4 * |
5 * Author: John Ellis | |
6 * | |
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! | |
10 */ | |
11 | |
12 | |
13 #ifndef THUMB_STANDARD_H | |
14 #define THUMB_STANDARD_H | |
15 | |
16 | |
79
528e3432e0c0
Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
17 #define THUMB_FOLDER_GLOBAL ".thumbnails" |
528e3432e0c0
Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
18 #define THUMB_FOLDER_LOCAL ".thumblocal" |
9 | 19 #define THUMB_FOLDER_NORMAL "normal" |
20 #define THUMB_FOLDER_LARGE "large" | |
21 #define THUMB_FOLDER_FAIL "fail/gqview-1.0" | |
22 #define THUMB_NAME_EXTENSION ".png" | |
23 | |
24 | |
25 typedef struct _ThumbLoaderStd ThumbLoaderStd; | |
26 typedef void (* ThumbLoaderStdFunc)(ThumbLoaderStd *tl, gpointer data); | |
27 | |
28 struct _ThumbLoaderStd | |
29 { | |
30 gint standard_loader; | |
31 | |
32 GdkPixbuf *pixbuf; | |
33 ImageLoader *il; | |
34 | |
35 gchar *source_path; | |
36 | |
37 time_t source_mtime; | |
38 off_t source_size; | |
39 mode_t source_mode; | |
40 | |
41 gchar *thumb_path; | |
42 gchar *thumb_uri; | |
43 const gchar *local_uri; | |
44 | |
45 gint thumb_path_local; | |
46 | |
47 gint requested_width; | |
48 gint requested_height; | |
49 | |
50 gint cache_enable; | |
51 gint cache_local; | |
52 gint cache_hit; | |
53 gint cache_retry; | |
54 | |
55 gdouble progress; | |
56 | |
57 ThumbLoaderStdFunc func_done; | |
58 ThumbLoaderStdFunc func_error; | |
59 ThumbLoaderStdFunc func_progress; | |
60 | |
61 gpointer data; | |
62 }; | |
63 | |
64 | |
65 ThumbLoaderStd *thumb_loader_std_new(gint width, gint height); | |
66 void thumb_loader_std_set_callbacks(ThumbLoaderStd *tl, | |
67 ThumbLoaderStdFunc func_done, | |
68 ThumbLoaderStdFunc func_error, | |
69 ThumbLoaderStdFunc func_progress, | |
70 gpointer data); | |
71 void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gint enable_cache, gint local, gint retry_failed); | |
72 gint thumb_loader_std_start(ThumbLoaderStd *tl, const gchar *path); | |
73 void thumb_loader_std_free(ThumbLoaderStd *tl); | |
74 | |
75 GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl, gint with_fallback); | |
76 | |
77 | |
78 /* validates a non local thumbnail file, | |
79 * calling func_valid with the information when app is idle | |
80 * for thumbnail's without a file: uri, validates against allowed_age in days | |
81 */ | |
82 ThumbLoaderStd *thumb_loader_std_thumb_file_validate(const gchar *thumb_path, gint allowed_age, | |
83 void (*func_valid)(const gchar *path, gint valid, gpointer data), | |
84 gpointer data); | |
85 void thumb_loader_std_thumb_file_validate_cancel(ThumbLoaderStd *tl); | |
86 | |
87 | |
88 void thumb_std_maint_removed(const gchar *source); | |
89 void thumb_std_maint_moved(const gchar *source, const gchar *dest); | |
90 | |
91 | |
92 #endif |