-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathkeyboard.h
65 lines (61 loc) · 2.24 KB
/
keyboard.h
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
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
** This file is part of the Matrix Brandy Basic VI Interpreter.
** Copyright (C) 2000-2014 David Daniels
** Copyright (C) 2018-2024 Michael McConnell and contributors
**
** Brandy is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2, or (at your option)
** any later version.
**
** Brandy is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Brandy; see the file COPYING. If not, write to
** the Free Software Foundation, 59 Temple Place - Suite 330,
** Boston, MA 02111-1307, USA.
**
**
** This file defines the keyboard handling routines
*/
#ifndef __keyboard_h
#define __keyboard_h
#include "common.h"
typedef enum {READ_OK, READ_ESC, READ_EOF} readstate;
// This is original source of BGET at EOF giving &FE:
// -0 -1 -2
// 000000:00 FFFFFF:FF FFFFFF:FE
extern int32 read_key(void);
extern void set_escint(int i);
extern void set_escmul(int i);
extern void kbd_setvikeys(int x);
extern readstate emulate_readline(char [], int32, int32);
extern void purge_keys(void);
#ifdef TARGET_RISCOS
extern char *get_fn_string(int key, int *len);
extern int set_fn_string(int key, char *string, int length);
#endif /* TARGET_RISCOS */
extern boolean kbd_init();
extern void kbd_quit(void);
extern int32 kbd_get(void);
extern int32 kbd_get0(void);
extern int32 kbd_inkey(int32);
#ifdef TARGET_RISCOS
extern int32 kbd_inkey256(void);
#endif /* TARGET_RISCOS */
extern int32 kbd_modkeys(int32);
extern int kbd_fnkeyset(int key, char *string, int length);
extern char *kbd_fnkeyget(int key, int *length);
extern int32 kbd_readline(char *buffer, int32 length, int32 chars);
extern int32 kbd_buffered(void);
extern int32 kbd_pending(void);
extern void kbd_escchar(char, char);
extern int kbd_escpoll(void);
extern int kbd_esctest(void);
extern int kbd_escack(void);
extern void push_key(int32 ch);
extern void osbyte21(int32 xreg);
#endif /* __keyboard_h */