annotate src/thumb_standard.h @ 9:d907d608745f

Sync to GQview 1.5.9 release. ######## DO NOT BASE ENHANCEMENTS OR TRANSLATION UPDATES ON CODE IN THIS CVS! This CVS is never up to date with current development and is provided solely for reference purposes, please use the latest official release package when making any changes or translation updates. ########
author gqview
date Sat, 26 Feb 2005 00:13:35 +0000
parents
children 528e3432e0c0
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 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
2 * GQview
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2005 John Ellis
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17 #define THUMB_FOLDER ".thumbnails"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 #define THUMB_FOLDER_NORMAL "normal"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 #define THUMB_FOLDER_LARGE "large"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 #define THUMB_FOLDER_FAIL "fail/gqview-1.0"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 #define THUMB_NAME_EXTENSION ".png"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22
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 typedef struct _ThumbLoaderStd ThumbLoaderStd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 typedef void (* ThumbLoaderStdFunc)(ThumbLoaderStd *tl, gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 struct _ThumbLoaderStd
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 gint standard_loader;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31 GdkPixbuf *pixbuf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 ImageLoader *il;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 gchar *source_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36 time_t source_mtime;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37 off_t source_size;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 mode_t source_mode;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 gchar *thumb_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 gchar *thumb_uri;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 const gchar *local_uri;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 gint thumb_path_local;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 gint requested_width;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47 gint requested_height;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 gint cache_enable;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 gint cache_local;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 gint cache_hit;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 gint cache_retry;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 gdouble progress;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 ThumbLoaderStdFunc func_done;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 ThumbLoaderStdFunc func_error;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 ThumbLoaderStdFunc func_progress;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 gpointer data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 };
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 ThumbLoaderStd *thumb_loader_std_new(gint width, gint height);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65 void thumb_loader_std_set_callbacks(ThumbLoaderStd *tl,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 ThumbLoaderStdFunc func_done,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 ThumbLoaderStdFunc func_error,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 ThumbLoaderStdFunc func_progress,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70 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
71 gint thumb_loader_std_start(ThumbLoaderStd *tl, const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 void thumb_loader_std_free(ThumbLoaderStd *tl);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl, gint with_fallback);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75
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 /* validates a non local thumbnail file,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78 * calling func_valid with the information when app is idle
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 * 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
80 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81 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
82 void (*func_valid)(const gchar *path, gint valid, gpointer data),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83 gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
84 void thumb_loader_std_thumb_file_validate_cancel(ThumbLoaderStd *tl);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85
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 void thumb_std_maint_removed(const gchar *source);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
88 void thumb_std_maint_moved(const gchar *source, const gchar *dest);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89
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 #endif