annotate src/filelist.h @ 403:2649a28d31b6

Introduce printf_term() macro and use it.
author zas_
date Fri, 18 Apr 2008 09:15:09 +0000
parents 4f526d436873
children 4b2d7f9af171
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: 170
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 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 FILELIST_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #define FILELIST_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 typedef struct _FilterEntry FilterEntry;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 struct _FilterEntry {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 gchar *key;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 gchar *description;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 gchar *extensions;
212
c7021159079d differentiate among normal image, raw image and metadata
nadvornik
parents: 196
diff changeset
22 FileFormatClass file_class;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 gint enabled;
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 /* you can change, but not add or remove entries from the returned list */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 GList *filter_get_list(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28 void filter_remove_entry(FilterEntry *fe);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29
212
c7021159079d differentiate among normal image, raw image and metadata
nadvornik
parents: 196
diff changeset
30 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gint enabled);
c7021159079d differentiate among normal image, raw image and metadata
nadvornik
parents: 196
diff changeset
31 void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gint enabled);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 void filter_add_defaults(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 void filter_reset(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 void filter_rebuild(void);
147
b2266996fa83 added possibility to specify prefered file type for external commands
nadvornik
parents: 145
diff changeset
35 GList *filter_to_list(const gchar *extensions);
9
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 gint filter_name_exists(const gchar *name);
212
c7021159079d differentiate among normal image, raw image and metadata
nadvornik
parents: 196
diff changeset
38 gint filter_file_class(const gchar *name, FileFormatClass file_class);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39
276
4f526d436873 Implement secure rc file saving.
zas_
parents: 241
diff changeset
40 void filter_write_list(SecureSaveInfo *ssi);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 void filter_parse(const gchar *text);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42
170
9a56e3d13e67 basic sidecar files configuration via preferences dialog
nadvornik
parents: 167
diff changeset
43 void sidecar_ext_parse(const gchar *text, gint quoted);
276
4f526d436873 Implement secure rc file saving.
zas_
parents: 241
diff changeset
44 void sidecar_ext_write(SecureSaveInfo *ssi);
170
9a56e3d13e67 basic sidecar files configuration via preferences dialog
nadvornik
parents: 167
diff changeset
45 char *sidecar_ext_to_string();
145
8be2cc687304 fixed grouping sidecar files and made it configurable via config file
nadvornik
parents: 143
diff changeset
46 void sidecar_ext_add_defaults();
8be2cc687304 fixed grouping sidecar files and made it configurable via config file
nadvornik
parents: 143
diff changeset
47
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 gint ishidden(const gchar *name);
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 GList *path_list_filter(GList *list, gint is_dir_list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 GList *path_list_sort(GList *list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 GList *path_list_recursive(const gchar *path);
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 gchar *text_from_size(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 gchar *text_from_size_abrev(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 const gchar *text_from_time(time_t t);
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 /* this expects a utf-8 path */
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
61 FileData *file_data_new_simple(const gchar *path_utf8);
145
8be2cc687304 fixed grouping sidecar files and made it configurable via config file
nadvornik
parents: 143
diff changeset
62
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
63 FileData *file_data_ref(FileData *fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
64 void file_data_unref(FileData *fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65
241
cdec56e38dd1 Fix missing bit of previous patch.
zas_
parents: 212
diff changeset
66 void file_data_do_change(FileData *fd);
143
0d1bf3ac6cd8 improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents: 139
diff changeset
67 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
68 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
69
139
754c1e4349b6 display sidecar extensions in filelist
nadvornik
parents: 138
diff changeset
70 gchar *sidecar_file_data_list_to_string(FileData *fd);
754c1e4349b6 display sidecar extensions in filelist
nadvornik
parents: 138
diff changeset
71
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
72 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb);
167
05bf5d364dba fixed filelist refresh
nadvornik
parents: 147
diff changeset
73 gint filelist_sort_compare_filedata_full(FileData *fa, FileData *fb, SortType method, gint ascend);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 GList *filelist_sort(GList *list, SortType method, gint ascend);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
76 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
77 GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb);
9
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 gint filelist_read(const gchar *path, GList **files, GList **dirs);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
80 gint filelist_read_lstat(const gchar *path, GList **files, GList **dirs);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81 void filelist_free(GList *list);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
82 GList *filelist_copy(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
83 GList *filelist_from_path_list(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
84 GList *filelist_to_path_list(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
85
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
86 GList *filelist_filter(GList *list, gint is_dir_list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
87
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
88 GList *filelist_sort_path(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
89 GList *filelist_recursive(const gchar *path);
9
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
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