Add struct stat into struct directory, special case for symbolic links
[cmus.git] / filters.h
blob52eda882feb846f0c53450e981f3d66330b2527d
1 /*
2 * Copyright 2005 Timo Hirvonen
3 */
5 #ifndef FILTERS_H
6 #define FILTERS_H
8 #include <list.h>
9 #include <window.h>
10 #include <search.h>
11 #include <uchar.h>
13 struct filter_entry {
14 struct list_head node;
16 char *name;
17 char *filter;
18 unsigned selected : 1;
19 unsigned active : 1;
20 unsigned visited : 1;
23 static inline struct filter_entry *iter_to_filter_entry(struct iter *iter)
25 return iter->data1;
28 extern struct window *filters_win;
29 extern struct searchable *filters_searchable;
30 extern struct list_head filters_head;
32 void filters_init(void);
33 void filters_exit(void);
35 /* parse filter and expand sub filters */
36 struct expr *parse_filter(const char *val);
38 /* add filter to filter list (replaces old filter with same name)
40 * @keyval "name=value" where value is filter
42 void filters_set_filter(const char *keyval);
44 /* set throwaway filter (not saved to the filter list)
46 * @val filter or NULL to disable filtering
48 void filters_set_anonymous(const char *val);
50 void filters_activate_names(const char *str);
52 void filters_activate(void);
53 void filters_toggle_filter(void);
54 void filters_delete_filter(void);
56 #endif