Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 65 lines (57 sloc) 2.194 kB
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
1 /* draw.h */
2 /* Copyright 1995 by Steve Kirkendall */
3
4
5 typedef struct
6 {
7 long lineoffset; /* which line this row is for */
8 int insrows;
9 int shiftright;
10 int inschars;
11 } DRAWROW;
12
13 typedef struct
14 {
15 long start; /* offset from start of buffer to start of line */
16 int width; /* width of the line */
17 int startrow;/* where it appears on the screen */
18 } DRAWLINE;
19
20 typedef enum
21 {
22 DRAW_VISUAL, /* visual, no message or status msg */
23 DRAW_VMSG, /* visual, non-status message */
24 DRAW_OPENEDIT, /* open, editing a line */
25 DRAW_OPENOUTPUT /* open, after outputing a message */
26 } DRAWSTATE;
27
28 typedef enum
29 {
30 DRAW_NORMAL, /* optimizable, refreshable, cursor on screen */
31 DRAW_CHANGED, /* non-optimizable, refreshable, cursor on screen */
32 DRAW_CENTER, /* non-optimizable, refreshable, cursor in top half */
33 DRAW_SCRATCH /* non-optimizable, non-refreshable, cursor on screen */
34 } DRAWLOGIC;
35
36
37 typedef struct
38 {
39 DRAWSTATE drawstate; /* drawing state */
40 DRAWROW *newrow; /* info about new rows */
41 DRAWLINE *newline; /* info about new lines */
42 DRAWLINE *curline; /* info about current lines */
43 CHAR *newchar; /* characters of new image */
44 char *newfont; /* fonts of new image */
45 CHAR *curchar; /* characters of current image */
46 char *curfont; /* fonts of current image */
47 long *offsets; /* buffer offsets of each individual cell */
97d8998 @mbert Import Elvis 2.1_4 (written by Steve Kirkendall)
authored
48 MARK topmark; /* first line drawn */
49 MARK bottommark; /* line after last drawn */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
50 BUFFER curbuf; /* current buffer */
51 long curnbytes; /* size of buffer when current image drawn */
52 long curchgs; /* buffer's "changes" counter when image drawn */
53 int rows, columns; /* dimensions of screen */
54 int cursrow, curscol;/* position of cursor */
55 int skipped; /* number of columns skipped from first line */
56 int nlines; /* number of lines */
57 DRAWLOGIC logic; /* ignore current image? */
58 BOOLEAN newmsg; /* does msg row contain anything important? */
59 MARK openline; /* current line (open mode only) */
60 CHAR *openimage; /* image of current line, '\0'-terminated */
61 long opencursor; /* where cursor is within line */
62 long opencnt; /* width of line in openimage */
63 int opencell; /* tty simulator's cursor position */
64 } DRAWINFO;
Something went wrong with that request. Please try again.