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