aboutsummaryrefslogtreecommitdiff
path: root/lib/gki.h
blob: 9ecc62a6b1e6150db80c77072e77c259c02651e1 (plain) (blame)
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# GKI.H -- Graphics Kernel Interface (GIO metacode instructions).

define	BOI			-1			# do not parenthesize!
define	GKI_MAXNDC		32767			# maximum GKI coordinate
define	GKI_PACKREAL		(($1)*1E2)		# pack real in an int
define	GKI_UNPACKREAL		(($1)/1E2)		# unpack real from int
define	LEN_GKIDD		29			# device table size

define	TY_INLINE		(-1)			# flag inline kernel
define	TY_FILE			0			# flag normal file
define	KERNEL_PID		(gk_type($1))		# get kernel pid
define	IS_FILE			(gk_type($1)==0)	# kernel is a file
define	IS_INLINE		(gk_type($1)<0)		# kernel is inline
define	IS_SUBKERNEL		(gk_type($1)>0)		# kernel is a subprocess

define	LEN_GKIHDR		3
define	GKI_HDR_BOI		1
define	GKI_HDR_OPCODE		2
define	GKI_HDR_LENGTH		3
define	GKI_DATAFIELDS		4

define	GKI_EOF			0
define	GKI_EOF_LEN		3
define	GKI_EOF_L		3

define	GKI_OPENWS		1
define	GKI_OPENWS_LEN		5
define	GKI_OPENWS_L		3
define	GKI_OPENWS_M		4
define	GKI_OPENWS_N		5
define	GKI_OPENWS_D		6

define	GKI_CLOSEWS		2
define	GKI_CLOSEWS_LEN		4
define	GKI_CLOSEWS_L		3
define	GKI_CLOSEWS_N		4
define	GKI_CLOSEWS_D		5

define	GKI_REACTIVATEWS	3
define	GKI_REACTIVATEWS_LEN	4
define	GKI_REACTIVATEWS_L	3
define	GKI_REACTIVATEWS_F	4

define	GKI_DEACTIVATEWS	4
define	GKI_DEACTIVATEWS_LEN	4
define	GKI_DEACTIVATEWS_L	3
define	GKI_DEACTIVATEWS_F	4

define	GKI_MFTITLE		5
define	GKI_MFTITLE_LEN		4
define	GKI_MFTITLE_L		3
define	GKI_MFTITLE_N		4
define	GKI_MFTITLE_T		5

define	GKI_CLEAR		6
define	GKI_CLEAR_LEN		3
define	GKI_CLEAR_L		3

define	GKI_CANCEL		7
define	GKI_CANCEL_LEN		3
define	GKI_CANCEL_L		3

define	GKI_FLUSH		8
define	GKI_FLUSH_LEN		3
define	GKI_FLUSH_L		3

define	GKI_POLYLINE		9
define	GKI_POLYLINE_LEN	4
define	GKI_POLYLINE_L		3
define	GKI_POLYLINE_N		4
define	GKI_POLYLINE_P		5

define	GKI_POLYMARKER		10
define	GKI_POLYMARKER_LEN	4
define	GKI_POLYMARKER_L	3
define	GKI_POLYMARKER_N	4
define	GKI_POLYMARKER_P	5

define	GKI_TEXT		11
define	GKI_TEXT_LEN		6
define	GKI_TEXT_L		3
define	GKI_TEXT_P		4
define	GKI_TEXT_N		6
define	GKI_TEXT_T		7

define	GKI_FILLAREA		12
define	GKI_FILLAREA_LEN	4
define	GKI_FILLAREA_L		3
define	GKI_FILLAREA_N		4
define	GKI_FILLAREA_P		5

define	GKI_PUTCELLARRAY	13
define	GKI_PUTCELLARRAY_LEN	9
define	GKI_PUTCELLARRAY_L	3
define	GKI_PUTCELLARRAY_LL	4
define	GKI_PUTCELLARRAY_UR	6
define	GKI_PUTCELLARRAY_NC	8
define	GKI_PUTCELLARRAY_NL	9
define	GKI_PUTCELLARRAY_P	10

define	GKI_SETCURSOR		14
define	GKI_SETCURSOR_LEN	6
define	GKI_SETCURSOR_L		3
define	GKI_SETCURSOR_CN	4
define	GKI_SETCURSOR_POS	5

define	GKI_PLSET		15
define	GKI_PLSET_LEN		6
define	GKI_PLSET_L		3
define	GKI_PLSET_LT		4
define	GKI_PLSET_LW		5
define	GKI_PLSET_CI		6

define	GKI_PMSET		16
define	GKI_PMSET_LEN		6
define	GKI_PMSET_L		3
define	GKI_PMSET_MT		4
define	GKI_PMSET_MW		5
define	GKI_PMSET_CI		6

define	GKI_TXSET		17
define	GKI_TXSET_LEN		12
define	GKI_TXSET_L		3
define	GKI_TXSET_UP		4
define	GKI_TXSET_SZ		5
define	GKI_TXSET_SP		6
define	GKI_TXSET_P		7
define	GKI_TXSET_HJ		8
define	GKI_TXSET_VJ		9
define	GKI_TXSET_F		10
define	GKI_TXSET_Q		11
define	GKI_TXSET_CI		12

define	GKI_FASET		18
define	GKI_FASET_LEN		5
define	GKI_FASET_L		3
define	GKI_FASET_FS		4
define	GKI_FASET_CI		5

define	GKI_GETCURSOR		19
define	GKI_GETCURSOR_LEN	4
define	GKI_GETCURSOR_L		3
define	GKI_GETCURSOR_CN	4

define	GKI_CURSORVALUE		19
define	GKI_CURSORVALUE_LEN	10
define	GKI_CURSORVALUE_L	3
define	GKI_CURSORVALUE_CN	4
define	GKI_CURSORVALUE_KEY	5
define	GKI_CURSORVALUE_SX	6
define	GKI_CURSORVALUE_SY	7
define	GKI_CURSORVALUE_RN	8
define	GKI_CURSORVALUE_RX	9
define	GKI_CURSORVALUE_RY	10

define	GKI_GETCELLARRAY	20
define	GKI_GETCELLARRAY_LEN	9
define	GKI_GETCELLARRAY_L	3
define	GKI_GETCELLARRAY_LL	4
define	GKI_GETCELLARRAY_UR	6
define	GKI_GETCELLARRAY_NC	8
define	GKI_GETCELLARRAY_NL	9

define	GKI_CELLARRAY		20
define	GKI_CELLARRAY_LEN	4
define	GKI_CELLARRAY_L		3
define	GKI_CELLARRAY_NP	4
define	GKI_CELLARRAY_P		5

define	GKI_UNKNOWN		24

define	GKI_ESCAPE		25
define	GKI_ESCAPE_LEN		5
define	GKI_ESCAPE_L		3
define	GKI_ESCAPE_FN		4
define	GKI_ESCAPE_N		5
define	GKI_ESCAPE_DC		6

define	GKI_SETWCS		26
define	GKI_SETWCS_LEN		4
define	GKI_SETWCS_L		3
define	GKI_SETWCS_N		4
define	GKI_SETWCS_WCS		5

define	GKI_GETWCS		27
define	GKI_GETWCS_LEN		4
define	GKI_GETWCS_L		3
define	GKI_GETWCS_N		4