annotate src/filelist.h @ 517:d84f2210a73c

6 for() vs 201 for (): winner is for ().
author zas_
date Thu, 24 Apr 2008 15:53:08 +0000
parents 48c8e49b571c
children 9dc0513837b5
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 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 170
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 446
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * 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
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #ifndef FILELIST_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #define FILELIST_H
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 typedef struct _FilterEntry FilterEntry;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 struct _FilterEntry {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20 gchar *key;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 gchar *description;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 gchar *extensions;
212
c7021159079d differentiate among normal image, raw image and metadata
nadvornik
parents: 196
diff changeset
23 FileFormatClass file_class;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24 gint enabled;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 /* 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
28 GList *filter_get_list(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 void filter_remove_entry(FilterEntry *fe);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 void filter_add_defaults(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 void filter_reset(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40
276
4f526d436873 Implement secure rc file saving.
zas_
parents: 241
diff changeset
41 void filter_write_list(SecureSaveInfo *ssi);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 void filter_parse(const gchar *text);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
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
4f526d436873 Implement secure rc file saving.
zas_
parents: 241
diff changeset
45 void sidecar_ext_write(SecureSaveInfo *ssi);
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 276
diff changeset
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 gint ishidden(const gchar *name);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50
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 GList *path_list_filter(GList *list, gint is_dir_list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 GList *path_list_sort(GList *list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 GList *path_list_recursive(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 gchar *text_from_size(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 gchar *text_from_size_abrev(gint64 size);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 const gchar *text_from_time(time_t t);
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 /* this expects a utf-8 path */
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
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
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
64 FileData *file_data_ref(FileData *fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
65 void file_data_unref(FileData *fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66
241
cdec56e38dd1 Fix missing bit of previous patch.
zas_
parents: 212
diff changeset
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
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
69 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
70
139
754c1e4349b6 display sidecar extensions in filelist
nadvornik
parents: 138
diff changeset
71 gchar *sidecar_file_data_list_to_string(FileData *fd);
754c1e4349b6 display sidecar extensions in filelist
nadvornik
parents: 138
diff changeset
72
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
73 gint filelist_sort_compare_filedata(FileData *fa, FileData *fb);
167
05bf5d364dba fixed filelist refresh
nadvornik
parents: 147
diff changeset
74 gint filelist_sort_compare_filedata_full(FileData *fa, FileData *fb, SortType method, gint ascend);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 GList *filelist_sort(GList *list, SortType method, gint ascend);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76 GList *filelist_insert_sort(GList *list, FileData *fd, SortType method, gint ascend);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
77 GList *filelist_sort_full(GList *list, SortType method, gint ascend, GCompareFunc cb);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
78 GList *filelist_insert_sort_full(GList *list, void *data, SortType method, gint ascend, GCompareFunc cb);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 gint filelist_read(const gchar *path, GList **files, GList **dirs);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
81 gint filelist_read_lstat(const gchar *path, GList **files, GList **dirs);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82 void filelist_free(GList *list);
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
83 GList *filelist_copy(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
84 GList *filelist_from_path_list(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
85 GList *filelist_to_path_list(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
86
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
87 GList *filelist_filter(GList *list, gint is_dir_list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
88
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
89 GList *filelist_sort_path(GList *list);
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 9
diff changeset
90 GList *filelist_recursive(const gchar *path);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
91
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
92 #endif