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