annotate src/thumb_standard.h @ 708:444705451f3a

Use G_DIR_SEPARATOR_S instead of hardcoded "/".
author zas_
date Tue, 20 May 2008 23:11:47 +0000
parents 48c8e49b571c
children 5042236af960
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
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 317
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * 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
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #ifndef THUMB_STANDARD_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #define THUMB_STANDARD_H
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
79
528e3432e0c0 Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
18 #define THUMB_FOLDER_GLOBAL ".thumbnails"
528e3432e0c0 Thu Oct 19 07:23:37 2006 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
19 #define THUMB_FOLDER_LOCAL ".thumblocal"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 #define THUMB_FOLDER_NORMAL "normal"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 #define THUMB_FOLDER_LARGE "large"
317
46169c246c51 Make thumbnail standard fail directory after current application
zas_
parents: 196
diff changeset
22 #define THUMB_FOLDER_FAIL "fail/" GQ_APPNAME_LC "-" VERSION
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 #define THUMB_NAME_EXTENSION ".png"
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26 typedef struct _ThumbLoaderStd ThumbLoaderStd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 typedef void (* ThumbLoaderStdFunc)(ThumbLoaderStd *tl, gpointer data);
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 struct _ThumbLoaderStd
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 gint standard_loader;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 GdkPixbuf *pixbuf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 ImageLoader *il;
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 gchar *source_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 time_t source_mtime;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39 off_t source_size;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 mode_t source_mode;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 gchar *thumb_path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43 gchar *thumb_uri;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 const gchar *local_uri;
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 thumb_path_local;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 gint requested_width;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 gint requested_height;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 gint cache_enable;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 gint cache_local;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 gint cache_hit;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 gint cache_retry;
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 gdouble progress;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 ThumbLoaderStdFunc func_done;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 ThumbLoaderStdFunc func_error;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 ThumbLoaderStdFunc func_progress;
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 gpointer data;
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 ThumbLoaderStd *thumb_loader_std_new(gint width, gint height);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 void thumb_loader_std_set_callbacks(ThumbLoaderStd *tl,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 ThumbLoaderStdFunc func_done,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 ThumbLoaderStdFunc func_error,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70 ThumbLoaderStdFunc func_progress,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 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
73 gint thumb_loader_std_start(ThumbLoaderStd *tl, const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 void thumb_loader_std_free(ThumbLoaderStd *tl);
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 GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl, gint with_fallback);
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 /* validates a non local thumbnail file,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 * calling func_valid with the information when app is idle
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81 * 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
82 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83 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
84 void (*func_valid)(const gchar *path, gint valid, gpointer data),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85 gpointer data);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
86 void thumb_loader_std_thumb_file_validate_cancel(ThumbLoaderStd *tl);
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89 void thumb_std_maint_removed(const gchar *source);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90 void thumb_std_maint_moved(const gchar *source, const gchar *dest);
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
93 #endif