flac: Saner EOF handling
[cmus.git] / help.h
blob6713c2c0eddf2ab8d0e5737fef60f4aec56eea04
1 /*
2 * help.h, heavily based on filters.h
3 * (c) 2006, <ft@bewatermyfriend.org>
4 */
6 #ifndef HELP_H
7 #define HELP_H
9 #include "list.h"
10 #include "window.h"
11 #include "search.h"
12 #include "uchar.h"
13 #include "keys.h"
15 struct help_entry {
16 struct list_head node;
17 enum {
18 HE_TEXT, /* text entries */
19 HE_BOUND, /* bound keys */
20 HE_UNBOUND, /* unbound commands */
21 HE_OPTION,
22 } type;
23 union {
24 const char *text; /* HE_TEXT */
25 const struct binding *binding; /* HE_BOUND */
26 const struct command *command; /* HE_UNBOUND */
27 const struct cmus_opt *option;
31 static inline struct help_entry *iter_to_help_entry(struct iter *iter)
33 return iter->data1;
36 extern struct window *help_win;
37 extern struct searchable *help_searchable;
39 void help_select(void);
40 void help_toggle(void);
41 void help_remove(void);
43 void help_add_bound(const struct binding *bind);
44 void help_remove_bound(const struct binding *bind);
45 void help_remove_unbound(struct command *cmd);
46 void help_add_unbound(struct command *cmd);
47 void help_add_all_unbound(void);
49 void help_init(void);
50 void help_exit(void);
52 #endif /* HELP_H */