annotate src/thumb_standard.h @ 1807:3a2aff957816

Allow scrollview to grow when generic dialog is resized (ie. Metadata write ? dialog). Do not force scrollbar if not needed.
author zas_
date Sat, 27 Feb 2010 23:31:07 +0000
parents 956aab097ea7
children
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
1802
956aab097ea7 added 2010 to copyright text
nadvornik
parents: 1446
diff changeset
4 * Copyright (C) 2008 - 2010 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 {
1446
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
31 gboolean standard_loader;
9
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
1446
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
44 gboolean thumb_path_local;
9
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
1446
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
49 gboolean cache_enable;
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
50 gboolean cache_local;
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
51 gboolean cache_hit;
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
52 gboolean cache_retry;
9
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);
1446
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
70 void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gboolean enable_cache, gboolean local, gboolean retry_failed);
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
71 gboolean 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,
1446
a6f9ba6fd751 gint -> gboolean.
zas_
parents: 1284
diff changeset
82 void (*func_valid)(const gchar *path, gboolean valid, gpointer data),
9
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
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 864
diff changeset
92 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */