aboutsummaryrefslogtreecommitdiff
path: root/src/edbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/edbox.h')
-rw-r--r--src/edbox.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/edbox.h b/src/edbox.h
index 14dad03..e4069a0 100644
--- a/src/edbox.h
+++ b/src/edbox.h
@@ -3,12 +3,16 @@
/**** public API ****/
#define EDBOX_SIZE 240
+#define EDBOX_MAXPOS 239
-extern int edbox_visible;
-extern u16 edbox_len;
+typedef char edbox_t[EDBOX_SIZE];
+#define edit_box (*(edbox_t *)EDBOX_ADDR)
+
+extern char edbox_visible;
+extern char edbox_len;
/* clear the contents of the edit box (whether it's visible or not) */
-void edbox_clear(void);
+void __fastcall__ edbox_clear(void);
/* make the edit box visible */
void edbox_show(void);
@@ -19,18 +23,18 @@ void edbox_hide(void);
/* put one character into the edit box. */
void edbox_putc(char c);
-/* wait for a keystroke, insert its character into the edit box. if Return
+/* 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(void);
+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);
+void __fastcall__ edbox_set(char *contents);
/* append a space to the edit box */
-void edbox_addchr(char c);
+void __fastcall__ edbox_addchr(char c);
/* append a space to the edit box */
-void edbox_space(void);
+void __fastcall__ edbox_space(void);