btparser/cparser/tests/exp_lex/EMFTemplate.bt

222 lines
5.4 KiB
Plaintext

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: typedef enum < DWORD > {
14: EMR_HEADER = 0x1 ,
15: EMR_POLYBEZIER = 0x2 ,
16: EMR_POLYGON = 0x3 ,
17: EMR_POLYLINE = 0x4 ,
18: EMR_POLYBEZIERTO = 0x5 ,
19: EMR_POLYLINETO = 0x6 ,
20: EMR_POLYPOLYLINE = 0x7 ,
21: EMR_POLYPOLYGON = 0x8 ,
22: EMR_SETWINDOWEXTEX = 0x9 ,
23: EMR_SETWINDOWORGEX = 0xA ,
24: EMR_SETVIEWPORTEXTEX = 0xB ,
25: EMR_SETVIEWPORTORGEX = 0xC ,
26: EMR_SETBRUSHORGEX = 0xD ,
27: EMR_EOF = 0xE ,
28: EMR_SETPIXELV = 0xF ,
29: EMR_SETMAPPERFLAGS = 0x10 ,
30: EMR_SETMAPMODE = 0x11 ,
31: EMR_SETBKMODE = 0x12 ,
32: EMR_SETPOLYFILLMODE = 0x13 ,
33: EMR_SETROP2 = 0x14 ,
34: EMR_SETSTRETCHBLTMODE = 0x15 ,
35: EMR_SETTEXTALIGN = 0x16 ,
36: EMR_SETCOLORADJUSTMENT = 0x17 ,
37: EMR_SETTEXTCOLOR = 0x18 ,
38: EMR_SETBKCOLOR = 0x19 ,
39: EMR_OFFSETCLIPRGN = 0x1A ,
40: EMR_MOVETOEX = 0x1B ,
41: EMR_SETMETARGN = 0x1C ,
42: EMR_EXCLUDECLIPRECT = 0x1D ,
43: EMR_INTERSECTCLIPRECT = 0x1E ,
44: EMR_SCALEVIEWPORTEXTEX = 0x1F ,
45: EMR_SCALEWINDOWEXTEX = 0x20 ,
46: EMR_SAVEDC = 0x21 ,
47: EMR_RESTOREDC = 0x22 ,
48: EMR_SETWORLDTRANSFORM = 0x23 ,
49: EMR_MODIFYWORLDTRANSFORM = 0x24 ,
50: EMR_SELECTOBJECT = 0x25 ,
51: EMR_CREATEPEN = 0x26 ,
52: EMR_CREATEBRUSHINDIRECT = 0x27 ,
53: EMR_DELETEOBJECT = 0x28 ,
54: EMR_ANGLEARC = 0x29 ,
55: EMR_ELLIPSE = 0x2A ,
56: EMR_RECTANGLE = 0x2B ,
57: EMR_ROUNDRECT = 0x2C ,
58: EMR_ARC = 0x2D ,
59: EMR_CHORD = 0x2E ,
60: EMR_PIE = 0x2F ,
61: EMR_SELECTPALETTE = 0x30 ,
62: EMR_CREATEPALETTE = 0x31 ,
63: EMR_SETPALETTEENTRIES = 0x32 ,
64: EMR_RESIZEPALETTE = 0x33 ,
65: EMR_REALIZEPALETTE = 0x34 ,
66: EMR_EXTFLOODFILL = 0x35 ,
67: EMR_LINETO = 0x36 ,
68: EMR_ARCTO = 0x37 ,
69: EMR_POLYDRAW = 0x38 ,
70: EMR_SETARCDIRECTION = 0x39 ,
71: EMR_SETMITERLIMIT = 0x3A ,
72: EMR_BEGINPATH = 0x3B ,
73: EMR_ENDPATH = 0x3C ,
74: EMR_CLOSEFIGURE = 0x3D ,
75: EMR_FILLPATH = 0x3E ,
76: EMR_STROKEANDFILLPATH = 0x3F ,
77: EMR_STROKEPATH = 0x40 ,
78: EMR_FLATTENPATH = 0x41 ,
79: EMR_WIDENPATH = 0x42 ,
80: EMR_SELECTCLIPPATH = 0x43 ,
81: EMR_ABORTPATH = 0x44 ,
82: EMR_RESERVED_69 = 0x45 ,
83: EMR_COMMENT = 0x46 ,
84: EMR_FILLRGN = 0x47 ,
85: EMR_FRAMERGN = 0x48 ,
86: EMR_INVERTRGN = 0x49 ,
87: EMR_PAINTRGN = 0x4A ,
88: EMR_EXTSELECTCLIPRGN = 0x4B ,
89: EMR_BITBLT = 0x4C ,
90: EMR_STRETCHBLT = 0x4D ,
91: EMR_MASKBLT = 0x4E ,
92: EMR_PLGBLT = 0x4F ,
93: EMR_SETDIBITSTODEVICE = 0x50 ,
94: EMR_STRETCHDIBITS = 0x51 ,
95: EMR_EXTCREATEFONTINDIRECTW = 0x52 ,
96: EMR_EXTTEXTOUTA = 0x53 ,
97: EMR_EXTTEXTOUTW = 0x54 ,
98: EMR_POLYBEZIER16 = 0x55 ,
99: EMR_POLYGON16 = 0x56 ,
100: EMR_POLYLINE16 = 0x57 ,
101: EMR_POLYBEZIERTO16 = 0x58 ,
102: EMR_POLYLINETO16 = 0x59 ,
103: EMR_POLYPOLYLINE16 = 0x5A ,
104: EMR_POLYPOLYGON16 = 0x5B ,
105: EMR_POLYDRAW16 = 0x5C ,
106: EMR_CREATEMONOBRUSH = 0x5D ,
107: EMR_CREATEDIBPATTERNBRUSHPT = 0x5E ,
108: EMR_EXTCREATEPEN = 0x5F ,
109: EMR_POLYTEXTOUTA = 0x60 ,
110: EMR_POLYTEXTOUTW = 0x61 ,
111: EMR_SETICMMODE = 0x62 ,
112: EMR_CREATECOLORSPACE = 0x63 ,
113: EMR_SETCOLORSPACE = 0x64 ,
114: EMR_DELETECOLORSPACE = 0x65 ,
115: EMR_GLSRECORD = 0x66 ,
116: EMR_GLSBOUNDEDRECORD = 0x67 ,
117: EMR_PIXELFORMAT = 0x68 ,
118: EMR_DRAWESCAPE = 0x69 ,
119: EMR_EXTESCAPE = 0x6A ,
120: EMR_RESERVED_107 = 0x6B ,
121: EMR_SMALLTEXTOUT = 0x6C ,
122: EMR_FORCEUFIMAPPING = 0x6D ,
123: EMR_NAMEDESCAPE = 0x6E ,
124: EMR_COLORCORRECTPALETTE = 0x6F ,
125: EMR_SETICMPROFILEA = 0x70 ,
126: EMR_SETICMPROFILEW = 0x71 ,
127: EMR_ALPHABLEND = 0x72 ,
128: EMR_SETLAYOUT = 0x73 ,
129: EMR_TRANSPARENTBLT = 0x74 ,
130: EMR_RESERVED_117 = 0x75 ,
131: EMR_GRADIENTFILL = 0x76 ,
132: EMR_SETLINKEDUFIS = 0x77 ,
133: EMR_SETTEXTJUSTIFICATION = 0x78 ,
134: EMR_COLORMATCHTOTARGETW = 0x79 ,
135: EMR_CREATECOLORSPACEW = 0x7A
136: } RecordType ;
137:
138: typedef struct {
139: LONG cx ;
140: LONG cy ;
141: } SIZEL ;
142:
143: typedef struct _RECTL {
144: LONG left ;
145: LONG top ;
146: LONG right ;
147: LONG bottom ;
148: } RECTL ;
149:
150: typedef struct {
151: RecordType iType ;
152: DWORD nSize ;
153:
154: RECTL rclBounds ;
155: RECTL rclFrame ;
156:
157: DWORD dSignature ;
158: DWORD nVersion ;
159: DWORD nBytes ;
160: DWORD nRecords ;
161: WORD nHandles ;
162:
163: WORD sReserved ;
164: DWORD nDescription ;
165:
166: DWORD offDescription ;
167:
168: DWORD nPalEntries ;
169: SIZEL szlDevice ;
170: SIZEL szlMillimeters ;
171: } Header ;
172:
173: typedef struct {
174: WORD desc [ header . nDescription ] ;
175: } Description ;
176:
177: typedef struct {
178: RecordType iType ;
179: DWORD nSize ;
180: DWORD dParm [ ( ( nSize - 8 ) / 4 ) ] ;
181: } Record ;
182:
183: typedef struct {
184: uchar Reserved ;
185: uchar Blue ;
186: uchar Green ;
187: uchar Red ;
188: } PaletteEntry ;
189:
190:
191:
192: LittleEndian ( ) ;
193:
194:
195: Header header ;
196:
197:
198: FSeek ( header . offDescription ) ;
199: Description description ;
200:
201:
202: FSeek ( header . nSize ) ;
203:
204:
205: local int recCnt = 0 ;
206: for ( recCnt = 0 ; recCnt < header . nRecords - 1 ; recCnt ++ ) {
207: Record record ;
208: }
209:
210:
211: do {
212: Record extrarecord ;
213: recCnt ++ ;
214: } while ( record [ recCnt - 1 ] . iType != EMR_EOF ) ;
215:
216:
217: local int palCnt = 0 ;
218: for ( palCnt = 0 ; palCnt < header . nPalEntries ; palCnt ++ ) {
219: PaletteEntry paletteentry ;
220: }
221:
222: tok_eof