Mercurial > geeqie
annotate src/filelist.h @ 190:c2923efebfdc
whitelist of files that can have an xmp sidecar, sample external command
for creating sidecar
author | nadvornik |
---|---|
date | Sun, 16 Mar 2008 14:11:22 +0000 |
parents | 9a56e3d13e67 |
children | f6e307c7bad6 |
rev | line source |
---|---|
9 | 1 /* |
2 * GQview | |
3 * (C) 2004 John Ellis | |
4 * | |
5 * Author: John Ellis | |
6 * | |
7 * This software is released under the GNU General Public License (GNU GPL). | |
8 * Please read the included file COPYING for more information. | |
9 * This software comes with no warranty of any kind, use at your own risk! | |
10 */ | |
11 | |
12 | |
13 #ifndef FILELIST_H | |
14 #define FILELIST_H | |
15 | |
16 | |
17 typedef struct _FilterEntry FilterEntry; | |
18 struct _FilterEntry { | |
19 gchar *key; | |
20 gchar *description; | |
21 gchar *extensions; | |
22 gint enabled; | |
23 }; | |
24 | |
25 /* you can change, but not add or remove entries from the returned list */ | |
26 GList *filter_get_list(void); | |
27 void filter_remove_entry(FilterEntry *fe); | |
28 | |
29 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, gint enabled); | |
30 void filter_add_unique(const gchar *description, const gchar *extensions, gint enabled); | |
31 void filter_add_defaults(void); | |
32 void filter_reset(void); | |
33 void filter_rebuild(void); | |
147
b2266996fa83
added possibility to specify prefered file type for external commands
nadvornik
parents:
145
diff
changeset
|
34 GList *filter_to_list(const gchar *extensions); |
9 | 35 |
36 gint filter_name_exists(const gchar *name); | |
37 | |
38 void filter_write_list(FILE *f); | |
39 void filter_parse(const gchar *text); | |
40 | |
170
9a56e3d13e67
basic sidecar files configuration via preferences dialog
nadvornik
parents:
167
diff
changeset
|
41 void sidecar_ext_parse(const gchar *text, gint quoted); |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
42 void sidecar_ext_write(FILE *f); |
170
9a56e3d13e67
basic sidecar files configuration via preferences dialog
nadvornik
parents:
167
diff
changeset
|
43 char *sidecar_ext_to_string(); |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
44 void sidecar_ext_add_defaults(); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
45 |
9 | 46 gint ishidden(const gchar *name); |
47 | |
48 | |
49 GList *path_list_filter(GList *list, gint is_dir_list); | |
50 | |
51 GList *path_list_sort(GList *list); | |
52 GList *path_list_recursive(const gchar *path); | |
53 | |
54 gchar *text_from_size(gint64 size); | |
55 gchar *text_from_size_abrev(gint64 size); | |
56 const gchar *text_from_time(time_t t); | |
57 | |
58 /* this expects a utf-8 path */ | |
138 | 59 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
|
60 |
138 | 61 FileData *file_data_ref(FileData *fd); |
62 void file_data_unref(FileData *fd); | |
9 | 63 |
138 | 64 FileData *file_data_do_change(FileData *fd); |
143
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
139
diff
changeset
|
65 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest); |
138 | 66 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd); |
67 | |
139 | 68 gchar *sidecar_file_data_list_to_string(FileData *fd); |
69 | |
138 | 70 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb); |
167 | 71 gint filelist_sort_compare_filedata_full(FileData *fa, FileData *fb, SortType method, gint ascend); |
9 | 72 GList *filelist_sort(GList *list, SortType method, gint ascend); |
73 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend); | |
138 | 74 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb); |
75 GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb); | |
9 | 76 |
77 gint filelist_read(const gchar *path, GList **files, GList **dirs); | |
138 | 78 gint filelist_read_lstat(const gchar *path, GList **files, GList **dirs); |
9 | 79 void filelist_free(GList *list); |
138 | 80 GList *filelist_copy(GList *list); |
81 GList *filelist_from_path_list(GList *list); | |
82 GList *filelist_to_path_list(GList *list); | |
83 | |
84 GList *filelist_filter(GList *list, gint is_dir_list); | |
85 | |
86 GList *filelist_sort_path(GList *list); | |
87 GList *filelist_recursive(const gchar *path); | |
9 | 88 |
89 #endif | |
90 | |
91 |