Mercurial > geeqie
annotate src/filelist.h @ 154:6bcd037bf176
fixed image focus
author | nadvornik |
---|---|
date | Sun, 09 Dec 2007 21:20:27 +0000 |
parents | b2266996fa83 |
children | 05bf5d364dba |
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 | |
145
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
41 void sidecar_ext_parse(const gchar *text); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
42 void sidecar_ext_write(FILE *f); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
43 void sidecar_ext_add_defaults(); |
8be2cc687304
fixed grouping sidecar files and made it configurable via config file
nadvornik
parents:
143
diff
changeset
|
44 |
9 | 45 gint ishidden(const gchar *name); |
46 | |
47 | |
48 GList *path_list_filter(GList *list, gint is_dir_list); | |
49 | |
50 GList *path_list_sort(GList *list); | |
51 GList *path_list_recursive(const gchar *path); | |
52 | |
53 gchar *text_from_size(gint64 size); | |
54 gchar *text_from_size_abrev(gint64 size); | |
55 const gchar *text_from_time(time_t t); | |
56 | |
57 /* this expects a utf-8 path */ | |
138 | 58 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
|
59 |
138 | 60 FileData *file_data_ref(FileData *fd); |
61 void file_data_unref(FileData *fd); | |
9 | 62 |
138 | 63 FileData *file_data_do_change(FileData *fd); |
143
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
139
diff
changeset
|
64 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest); |
138 | 65 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd); |
66 | |
139 | 67 gchar *sidecar_file_data_list_to_string(FileData *fd); |
68 | |
138 | 69 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb); |
9 | 70 GList *filelist_sort(GList *list, SortType method, gint ascend); |
71 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend); | |
138 | 72 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb); |
73 GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb); | |
9 | 74 |
75 gint filelist_read(const gchar *path, GList **files, GList **dirs); | |
138 | 76 gint filelist_read_lstat(const gchar *path, GList **files, GList **dirs); |
9 | 77 void filelist_free(GList *list); |
138 | 78 GList *filelist_copy(GList *list); |
79 GList *filelist_from_path_list(GList *list); | |
80 GList *filelist_to_path_list(GList *list); | |
81 | |
82 GList *filelist_filter(GList *list, gint is_dir_list); | |
83 | |
84 GList *filelist_sort_path(GList *list); | |
85 GList *filelist_recursive(const gchar *path); | |
9 | 86 |
87 #endif | |
88 | |
89 |