-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscr.h
More file actions
105 lines (93 loc) · 2.23 KB
/
scr.h
File metadata and controls
105 lines (93 loc) · 2.23 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef cntrl
# define cntrl(c) (c & 037)
#endif
#ifndef meta
# define meta(c) (c | 0400)
#endif
typedef struct {
short cury, curx;
short flgs;
char clear;
short **y;
short *firstch;
short *lastch;
short *lnum;
} WINDOW;
typedef struct {
short y, x;
short ny, nx;
short *mem;
} BOX;
typedef long CURSOR;
extern LINES, COLS;
extern WINDOW VScreen;
#define VMPutChar(y,x,ch) (VMove (y,x), VPutChar (ch))
#define VMPutString(y,x,str) (VMove (y,x), VPutString (str))
#define VMGetChar(yy,x) (VMove (yy,x), (VScreen.y[VScreen.cury][VScreen.curx] & 0377))
int VInit (void);
void VOpen (void);
void VReopen (void);
void VClose (void);
void VRestore (void);
void VRedraw (void);
void VSyncLine (int wy);
void VSync (void);
void VInsLine (int n);
void VDelLine (int n);
void VMove (int y, int x);
void VClearLine (void);
void VClear (void);
void VPutString (char *str);
void VPutStringLimited (char *str, int max);
void VPrint (char *fmt, ...);
void VSetPalette (int n, int nb, int nr, int nrb, int b, int bb,
int br, int brb, int d, int db, int dr, int drb);
int VStandOut (void);
void VStandEnd (void);
void VSetNormal (void);
void VSetPrev (void);
int VSetDim (void);
int VSetBold (void);
void VPutChar (int c);
void VFlush (void);
void VBeep (void);
BOX *VGetBox (int y, int x, int ny, int nx);
CURSOR VGetCursor (void);
void VSetCursor (CURSOR c);
void VUngetBox (BOX *box);
void VPrintBox (BOX *box);
void VFreeBox (BOX *box);
void VClearBox (int r, int c, int nr, int nc);
void VFillBox (int r, int c, int nr, int nc, int sym);
void VHorLine (int r, int c, int nc);
void VVertLine (int c, int r, int nr);
void VCorner (int r, int c, int n);
void VDrawBox (int r, int c, int nr, int nc);
void VExpandString (char *s, char *d);
void _prscreen (void);
struct KeyMap {
char *tcap;
char *str;
short val;
};
void KeyInit (struct KeyMap *map, void (*flushproc) (void));
int KeyGetChar (void);
int KeyGet (void);
void KeyUnget (int key);
#define CAPNUM 1
#define CAPFLG 2
#define CAPSTR 3
struct CapTab {
char tname [3];
char ttype;
char tdef;
char *tc;
int *ti;
char **ts;
};
int CapInit (char *bp);
void CapGet (struct CapTab *t);
char *CapGoto (char *CM, int destcol, int destline);
void TtySet (void);
void TtyReset (void);
void TtyFlushInput (void);