File: vt.h

package info (click to toggle)
alevt 1:1.6.2-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 956 kB
  • ctags: 662
  • sloc: ansic: 6,284; makefile: 119; perl: 104; sh: 15
file content (68 lines) | stat: -rw-r--r-- 1,958 bytes parent folder | download | duplicates (9)
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
#ifndef VT_H
#define VT_H

#include "misc.h"

#define W		40
#define H		25
#define BAD_CHAR	0xb8	// substitute for chars with bad parity

extern int debug;

struct vt_event
{
    int type;
    void *resource;	/* struct xio_win *, struct vbi *, ... */
    int i1, i2, i3, i4;
    void *p1;
};

#define EV_CLOSE	1
#define EV_KEY		2	// i1:KEY_xxx  i2:shift-flag
#define EV_MOUSE	3	// i1:button  i2:shift-flag i3:x  i4:y
#define EV_SELECTION	4	// i1:len  p1:data
#define EV_PAGE		5	// p1:vt_page	i1:query-flag
#define EV_HEADER	6	// i1:pgno  i2:subno  i3:flags  p1:data
#define EV_XPACKET	7	// i1:mag  i2:pkt  i3:errors  p1:data
#define EV_RESET	8	// ./.
#define EV_TIMER	9	// ./.

#define KEY_F(i)	(1000+i)
#define KEY_LEFT	2001
#define KEY_RIGHT	2002
#define KEY_UP		2003
#define KEY_DOWN	2004
#define KEY_PUP		2005
#define KEY_PDOWN	2006
#define KEY_DEL		2007
#define KEY_INS		2008

struct vt_page
{
    int pgno, subno;	// the wanted page number
    int lang;		// language code
    int flags;		// misc flags (see PG_xxx below)
    int errors;		// number of single bit errors in page
    u32 lines;		// 1 bit for each line received
    u8 data[25][40];	// page contents
    int flof;		// page has FastText links
    struct {
	int pgno;
	int subno;
    } link[6];		// FastText links (FLOF)
};

#define PG_SUPPHEADER	0x01	// C7  row 0 is not to be displayed
#define PG_UPDATE	0x02	// C8  row 1-28 has modified (editors flag)
#define PG_OUTOFSEQ	0x04	// C9  page out of numerical order
#define PG_NODISPLAY	0x08	// C10 rows 1-24 is not to be displayed
#define PG_MAGSERIAL	0x10	// C11 serial trans. (any pkt0 terminates page)
#define PG_ERASE	0x20	// C4  clear previously stored lines
#define PG_NEWSFLASH	0x40	// C5  box it and insert into normal video pict.
#define PG_SUBTITLE	0x80	// C6  box it and insert into normal video pict.
// my flags
#define PG_ACTIVE	0x100	// currently fetching this page

#define ANY_SUB		0x3f7f	// universal subpage number

#endif