Mercurial > geeqie
annotate src/filelist.h @ 143:0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
author | nadvornik |
---|---|
date | Mon, 08 Oct 2007 19:41:49 +0000 |
parents | 754c1e4349b6 |
children | 8be2cc687304 |
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); | |
34 | |
35 gint filter_name_exists(const gchar *name); | |
36 | |
37 void filter_write_list(FILE *f); | |
38 void filter_parse(const gchar *text); | |
39 | |
40 gint ishidden(const gchar *name); | |
41 | |
42 | |
43 GList *path_list_filter(GList *list, gint is_dir_list); | |
44 | |
45 GList *path_list_sort(GList *list); | |
46 GList *path_list_recursive(const gchar *path); | |
47 | |
48 gchar *text_from_size(gint64 size); | |
49 gchar *text_from_size_abrev(gint64 size); | |
50 const gchar *text_from_time(time_t t); | |
51 | |
52 /* this expects a locale encoded path */ | |
138 | 53 FileData *file_data_new_local(const gchar *path, struct stat *st); |
54 /* this expects a utf-8 path */ | |
55 FileData *file_data_new(const gchar *path_utf8, struct stat *st); | |
9 | 56 /* this expects a utf-8 path */ |
138 | 57 FileData *file_data_new_simple(const gchar *path_utf8); |
9 | 58 void file_data_free(FileData *fd); |
138 | 59 FileData *file_data_ref(FileData *fd); |
60 void file_data_unref(FileData *fd); | |
9 | 61 |
138 | 62 FileData *file_data_do_change(FileData *fd); |
143
0d1bf3ac6cd8
improved FileDataChangeInfo structure, check for another file operation in progress
nadvornik
parents:
139
diff
changeset
|
63 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest); |
138 | 64 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd); |
65 | |
139 | 66 gchar *sidecar_file_data_list_to_string(FileData *fd); |
67 | |
138 | 68 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb); |
9 | 69 GList *filelist_sort(GList *list, SortType method, gint ascend); |
70 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend); | |
138 | 71 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb); |
72 GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb); | |
9 | 73 |
74 gint filelist_read(const gchar *path, GList **files, GList **dirs); | |
138 | 75 gint filelist_read_lstat(const gchar *path, GList **files, GList **dirs); |
9 | 76 void filelist_free(GList *list); |
138 | 77 GList *filelist_copy(GList *list); |
78 GList *filelist_from_path_list(GList *list); | |
79 GList *filelist_to_path_list(GList *list); | |
80 | |
81 GList *filelist_filter(GList *list, gint is_dir_list); | |
82 | |
83 GList *filelist_sort_path(GList *list); | |
84 GList *filelist_recursive(const gchar *path); | |
9 | 85 |
86 #endif | |
87 | |
88 |