summaryrefslogtreecommitdiff
path: root/src/main/lsp/choice-buffer.h
blob: c2a7c3387d59aeed473feaa44c7700c6f7988f65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _CHOICE_BUFFER_H
#define _CHOICE_BUFFER_H

#include "dged/s8.h"

typedef void (*abort_callback)(void *);
typedef void (*select_callback)(void *, void *);
typedef void (*update_callback)(void *);

struct choice_buffer;
struct buffers;

struct choice_buffer *
choice_buffer_create(struct s8 title, struct buffers *buffers,
                     select_callback selected, abort_callback aborted,
                     update_callback update, void *userdata);
void choice_buffer_add_choice(struct choice_buffer *buffer, struct s8 text,
                              void *data);
void choice_buffer_add_choice_with_callback(struct choice_buffer *buffer,
                                            struct s8 text, void *data,
                                            select_callback callback);

#endif