annotate src/thumb_standard.h @ 968:065a129fd42b

Simplify things related to ViewFileInfoList * and ViewFileInfoIcon * type casting: - drop VFICON_INFO() and VFLIST_INFO() macros - rename VFLIST_INFO_POINTER() and VFICON_INFO_POINTER() to shorter VFLIST() and VFICON(). - replace all related occurrences by shorter expressions. For example: VFICON_INFO(vf, columns) becomes VFICON(vf)->columns VFLIST_INFO(vf, click_fd) becomes VFLIST(vf)->click_fd
author zas_
date Sun, 17 Aug 2008 09:30:45 +0000
parents f40509d56fe3
children 1646720364cf
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"
728
5042236af960 Replace hardcoded "/" by G_DIR_SEPARATOR_S where applicable.
zas_
parents: 475
diff changeset
22 #define THUMB_FOLDER_FAIL "fail" G_DIR_SEPARATOR_S 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 ImageLoader *il;
838
9bd49e725ad3 use FileData in thumb_loader
nadvornik
parents: 728
diff changeset
34 FileData *fd;
9
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);
838
9bd49e725ad3 use FileData in thumb_loader
nadvornik
parents: 728
diff changeset
71 gint thumb_loader_std_start(ThumbLoaderStd *tl, FileData *fd);
9
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
864
f40509d56fe3 added pixbuf_fallback function
nadvornik
parents: 838
diff changeset
74 GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl);
9
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