Mercurial > hg > forks > geeqie
annotate src/filefilter.h @ 2916:ae6cdcd69d9f default tip
Merge with upstream/master.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 14 May 2019 11:46:50 +0300 |
parents | e65df743a5a1 |
children |
rev | line source |
---|---|
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
1 /* |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
2 * Copyright (C) 2004 John Ellis |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
3 * Copyright (C) 2008 - 2016 The Geeqie Team |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
4 * |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
5 * Author: John Ellis |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
6 * |
2350
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
10 * (at your option) any later version. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
11 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
15 * GNU General Public License for more details. |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
16 * |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
17 * You should have received a copy of the GNU General Public License along |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
18 * with this program; if not, write to the Free Software Foundation, Inc., |
95507e596256
Update copyright in all files
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2021
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
20 */ |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
21 |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
22 #ifndef FILEFILTER_H |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
23 #define FILEFILTER_H |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
24 |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
25 |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
26 typedef struct _FilterEntry FilterEntry; |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
27 struct _FilterEntry { |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
28 gchar *key; |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
29 gchar *description; |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
30 gchar *extensions; |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
31 FileFormatClass file_class; |
736
31d858f3272d
Fix signed vs unsigned warnings.
Laurent Monin <geeqie@norz.org>
parents:
609
diff
changeset
|
32 gboolean enabled; |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
33 gboolean writable; |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
34 gboolean allow_sidecar; |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
35 }; |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
36 |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
37 /* you can change, but not add or remove entries from the returned list */ |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
38 GList *filter_get_list(void); |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
39 void filter_remove_entry(FilterEntry *fe); |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
40 |
1424
ba2c23c32e45
Use gboolean where applicable.
Laurent Monin <geeqie@norz.org>
parents:
1423
diff
changeset
|
41 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled); |
ba2c23c32e45
Use gboolean where applicable.
Laurent Monin <geeqie@norz.org>
parents:
1423
diff
changeset
|
42 void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled); |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
43 void filter_add_defaults(void); |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
44 void filter_reset(void); |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
45 void filter_rebuild(void); |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
46 GList *filter_to_list(const gchar *extensions); |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
47 |
1935
5fab16d12a54
recognize all registered extensions, even if they contain dots
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1802
diff
changeset
|
48 const gchar *registered_extension_from_path(const gchar *name); |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
49 gboolean filter_name_exists(const gchar *name); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
50 gboolean filter_file_class(const gchar *name, FileFormatClass file_class); |
2597
e65df743a5a1
Ref #510: Rudimentary video support
Colin Clark <colin.clark@cclark.uk>
parents:
2350
diff
changeset
|
51 FileFormatClass filter_file_get_class(const gchar *name); |
1239
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
52 gboolean filter_name_is_writable(const gchar *name); |
bc5046eb10d7
metadata write mode (direct or sidecar) made configurable for each file
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1229
diff
changeset
|
53 gboolean filter_name_allow_sidecar(const gchar *name); |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
54 |
1309
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1284
diff
changeset
|
55 void filter_write_list(GString *outstr, gint indent); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1284
diff
changeset
|
56 void filter_load_file_type(const gchar **attribute_names, const gchar **attribute_values); |
d89f8c4d593b
config file format changed to XML
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1284
diff
changeset
|
57 |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
58 |
1327
aadde9f46ce9
quoted_value is no longer needed
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1309
diff
changeset
|
59 void sidecar_ext_parse(const gchar *text); |
609
a69fc0381769
Use function(void) instead of function() for declaring functions which
Laurent Monin <geeqie@norz.org>
parents:
586
diff
changeset
|
60 gchar *sidecar_ext_to_string(void); |
586
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
61 GList *sidecar_ext_get_list(void); |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
62 |
122fc2223b42
split filelist.c to filefilter.c and filedata.c
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
diff
changeset
|
63 #endif |
1055
4bbdfab3c89a
Adding a vim modeline to all files - patch by Klaus Ethgen
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
736
diff
changeset
|
64 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |