MythTV  master
vt.h
Go to the documentation of this file.
1 #ifndef VT_H
2 #define VT_H
3 
4 #define VT_WIDTH 40
5 #define VT_HEIGHT 25
6 #define BAD_CHAR 0xb8 // substitute for chars with bad parity
7 
8 struct vt_event
9 {
10  int type;
11  void *resource; /* struct xio_win *, struct vbi *, ... */
12  int i1, i2, i3, i4;
13  void *p1;
14 };
15 
16 #define EV_CLOSE 1
17 #define EV_KEY 2 // i1:KEY_xxx i2:shift-flag
18 #define EV_MOUSE 3 // i1:button i2:shift-flag i3:x i4:y
19 #define EV_SELECTION 4 // i1:len p1:data
20 #define EV_PAGE 5 // p1:vt_page i1:query-flag
21 #define EV_HEADER 6 // i1:pgno i2:subno i3:flags p1:data
22 #define EV_XPACKET 7 // i1:mag i2:pkt i3:errors p1:data
23 #define EV_RESET 8 // ./.
24 #define EV_TIMER 9 // ./.
25 
26 #define KEY_F(i) (1000+i)
27 #define KEY_LEFT 2001
28 #define KEY_RIGHT 2002
29 #define KEY_UP 2003
30 #define KEY_DOWN 2004
31 #define KEY_PUP 2005
32 #define KEY_PDOWN 2006
33 #define KEY_DEL 2007
34 #define KEY_INS 2008
35 
36 struct vt_page
37 {
38  int pgno, subno; // the wanted page number
39  int lang; // language code
40  int flags; // misc flags (see PG_xxx below)
41  int errors; // number of single bit errors in page
42  unsigned int lines; // 1 bit for each line received
43  unsigned char data[VT_HEIGHT][VT_WIDTH]; // page contents
44  int flof; // page has FastText links
45  struct {
46  int pgno;
47  int subno;
48  } link[6]; // FastText links (FLOF)
49 };
50 
51 #define PG_SUPPHEADER 0x01 // C7 row 0 is not to be displayed
52 #define PG_UPDATE 0x02 // C8 row 1-28 has modified (editors flag)
53 #define PG_OUTOFSEQ 0x04 // C9 page out of numerical order
54 #define PG_NODISPLAY 0x08 // C10 rows 1-24 is not to be displayed
55 #define PG_MAGSERIAL 0x10 // C11 serial trans. (any pkt0 terminates page)
56 #define PG_ERASE 0x20 // C4 clear previously stored lines
57 #define PG_NEWSFLASH 0x40 // C5 box it and insert into normal video pict.
58 #define PG_SUBTITLE 0x80 // C6 box it and insert into normal video pict.
59 // my flags
60 #define PG_ACTIVE 0x100 // currently fetching this page
61 
62 #define ANY_SUB 0x3f7f // universal subpage number
63 
64 #endif
65 
struct vt_page::@72 link[6]
int pgno
Definition: vt.h:38
int errors
Definition: vt.h:41
int i4
Definition: vt.h:12
#define VT_WIDTH
Definition: vt.h:4
unsigned int lines
Definition: vt.h:42
Definition: vt.h:36
int i1
Definition: vt.h:12
int flags
Definition: vt.h:40
Definition: vt.h:8
unsigned char data[VT_HEIGHT][VT_WIDTH]
Definition: vt.h:43
int i3
Definition: vt.h:12
#define VT_HEIGHT
Definition: vt.h:5
int i2
Definition: vt.h:12
int flof
Definition: vt.h:44
int subno
Definition: vt.h:38
int type
Definition: vt.h:10
int lang
Definition: vt.h:39
void * p1
Definition: vt.h:13
void * resource
Definition: vt.h:11