2010-08-08 10:06:34 +02:00
|
|
|
#ifndef CURSES_LISTBOX
|
|
|
|
#define CURSES_LISTBOX
|
|
|
|
|
|
|
|
typedef struct list_selection {
|
2011-03-07 08:02:35 +01:00
|
|
|
struct list_selection *next;
|
|
|
|
struct list_selection *prev;
|
2010-08-08 10:06:34 +02:00
|
|
|
int index;
|
2011-03-07 08:02:35 +01:00
|
|
|
char *str;
|
|
|
|
void *data;
|
2010-08-08 10:06:34 +02:00
|
|
|
} list_selection;
|
|
|
|
|
2011-03-07 08:02:35 +01:00
|
|
|
extern struct list_selection *do_selection(struct list_selection *sel,
|
|
|
|
const char *title, void (*perform) (struct list_selection *, void *),
|
|
|
|
void *data);
|
|
|
|
extern struct list_selection **push_selection(struct list_selection **p_sel,
|
|
|
|
char *str, void *payload);
|
|
|
|
extern void insert_selection(struct list_selection **p_sel,
|
|
|
|
struct list_selection *prev, const char *str, void *payload);
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
#endif /* CURSES_LISTBOX */
|