annotate src/filelist.h @ 65:322bb41c9b9e

Mon Aug 15 18:27:38 2005 John Ellis <johne@verizon.net> * cache.c: Make cache loader tolerant of unknown line values, so that a cache written by newer/older versions of GQview does not result in recreating data that is actually there.
author gqview
date Mon, 15 Aug 2005 22:32:57 +0000
parents d907d608745f
children 71e1ebee420e
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 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
2 * GQview
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;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 gint enabled;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 };
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 /* 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
26 GList *filter_get_list(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 void filter_remove_entry(FilterEntry *fe);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, gint enabled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 void filter_add_unique(const gchar *description, const gchar *extensions, gint enabled);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31 void filter_add_defaults(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 void filter_reset(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 void filter_rebuild(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35 gint filter_name_exists(const gchar *name);
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 void filter_write_list(FILE *f);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 void filter_parse(const gchar *text);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 gint ishidden(const gchar *name);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43 GList *path_list_filter(GList *list, gint is_dir_list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 GList *path_list_sort(GList *list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 GList *path_list_recursive(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 gchar *text_from_size(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 gchar *text_from_size_abrev(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 const gchar *text_from_time(time_t t);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 /* this expects a locale encoded path */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 FileData *file_data_new(const gchar *path, struct stat *st);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 /* this expects a utf-8 path */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 FileData *file_data_new_simple(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 void file_data_free(FileData *fd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 GList *filelist_sort(GList *list, SortType method, gint ascend);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 gint filelist_read(const gchar *path, GList **files, GList **dirs);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62 void filelist_free(GList *list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64 #endif
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66