aboutsummaryrefslogtreecommitdiff
path: root/src/edbox.h
blob: 35ce406e84219bf901156726528790bdcf9d22d9 (plain)
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
#include "addrs.h"

/**** public API ****/

#define EDBOX_SIZE 240

extern int edbox_visible;
extern u16 edbox_len;

/* clear the contents of the edit box (whether it's visible or not) */
void edbox_clear(void);

/* make the edit box visible */
void edbox_show(void);

/* make the edit box go away (current screen's status lines display instead) */
void edbox_hide(void);

/* put one character into the edit box. */
void edbox_putc(char c);

/* pass a keystroke, insert its character into the edit box. if Return
   is pressed, edbox_callback gets called (if it's set!) */
void edbox_keystroke(char c);

/* called when the user presses Return */
extern void (*edbox_callback)(void);

/* set edit box contents (clears out whatever was there) */
void edbox_set(char *contents);

/* append a space to the edit box */
void edbox_addchr(char c);

/* append a space to the edit box */
void edbox_space(void);