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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 79
diff changeset
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
4 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13 #ifndef THUMB_STANDARD_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #define THUMB_STANDARD_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 #define THUMB_FOLDER_NORMAL "normal"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 #define THUMB_FOLDER_LARGE "large"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 #define THUMB_FOLDER_FAIL "fail/gqview-1.0"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 #define THUMB_NAME_EXTENSION ".png"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 typedef struct _ThumbLoaderStd ThumbLoaderStd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26 typedef void (* ThumbLoaderStdFunc)(ThumbLoaderStd *tl, gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28 struct _ThumbLoaderStd
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 gint standard_loader;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 GdkPixbuf *pixbuf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 ImageLoader *il;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35 gchar *source_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37 time_t source_mtime;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 off_t source_size;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39 mode_t source_mode;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 gchar *thumb_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 gchar *thumb_uri;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43 const gchar *local_uri;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 gint thumb_path_local;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47 gint requested_width;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 gint requested_height;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 gint cache_enable;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 gint cache_local;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 gint cache_hit;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 gint cache_retry;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 gdouble progress;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 ThumbLoaderStdFunc func_done;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 ThumbLoaderStdFunc func_error;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 ThumbLoaderStdFunc func_progress;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 gpointer data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65 ThumbLoaderStd *thumb_loader_std_new(gint width, gint height);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 void thumb_loader_std_set_callbacks(ThumbLoaderStd *tl,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 ThumbLoaderStdFunc func_done,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 ThumbLoaderStdFunc func_error,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 ThumbLoaderStdFunc func_progress,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70 gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gint enable_cache, gint local, gint retry_failed);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 gint thumb_loader_std_start(ThumbLoaderStd *tl, const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73 void thumb_loader_std_free(ThumbLoaderStd *tl);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl, gint with_fallback);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
77
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78 /* validates a non local thumbnail file,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 * calling func_valid with the information when app is idle
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 * for thumbnail's without a file: uri, validates against allowed_age in days
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82 ThumbLoaderStd *thumb_loader_std_thumb_file_validate(const gchar *thumb_path, gint allowed_age,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83 void (*func_valid)(const gchar *path, gint valid, gpointer data),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
84 gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85 void thumb_loader_std_thumb_file_validate_cancel(ThumbLoaderStd *tl);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
86
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
87
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
88 void thumb_std_maint_removed(const gchar *source);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89 void thumb_std_maint_moved(const gchar *source, const gchar *dest);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
91
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
92 #endif