1 {Set tabsize to 4.}
2 {****************************************************************************
3 
4 
5                            VIOCALLS interface unit
6                      Free Pascal Runtime Library for OS/2
7                    Copyright (c) 1999-2000 by Florian Klaempfl
8                     Copyright (c) 1999-2000 by Daniel Mantione
9                       Copyright (c) 1999-2000 by Tomas Hajny
10 
11  The Free Pascal runtime library is distributed under the Library GNU Public
12  License v2. So is this unit. The Library GNU Public License requires you to
13  distribute the source code of this unit with any product that uses it.
14  Because the EMX library isn't under the LGPL, we grant you an exception to
15  this, and that is, when you compile a program with the Free Pascal Compiler,
16  you do not need to ship source code with that program, AS LONG AS YOU ARE
17  USING UNMODIFIED CODE! If you modify this code, you MUST change the next
18  line:
19 
20  <This is an official, unmodified Free Pascal source code file.>
21 
22  Send us your modified files, we can work together if you want!
23 
24  Free Pascal is distributed in the hope that it will be useful,
25  but WITHOUT ANY WARRANTY; without even the implied warranty of
26  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  Library GNU General Public License for more details.
28 
29  You should have received a copy of the Library GNU General Public License
30  along with Free Pascal; see the file COPYING.LIB.  If not, write to
31  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
32  Boston, MA 02110-1301, USA.
33 
34 ****************************************************************************}
35 
36 unit VioCalls;
37 
38 { Interface library to VIOCALLS.DLL (through EMXWRAP.DLL)
39 
40 Variant records and aliases for some record types created to maintain highest
41 possible level of compatibility with other existing OS/2 compilers.
42 
43 Changelog:
44 
45     People:
46 
47         TH - Tomas Hajny (xhajt03@mbox.vol.cz on Internet)
48 
49     Date:           Description of change:              Changed by:
50 
51      -              First released version 0.50         TH
52     00/09/24        TVioCursorInfo definition extended,
53                     new names for VioScroll* added      TH
54 
55 Coding style:
56 
57     I have tried to use the same coding style as Daniel Mantione in unit
58     DOSCALLS, although I can't say I would write it the same way otherwise
59     (I would write much more spaces myself, at least). Try to use it as well,
60     please. Original note by Daniel Mantione follows:
61 
62 
63     It may be well possible that coding style feels a bit strange to you.
64     Nevertheless I friendly ask you to try to make your changes not look all
65     to different. To make life easier, set your IDE to use tab characters,
66     turn optimal fill, autoindent and backspace unindents on and set a
67     tabsize of 4.}
68 
69 
70 {***************************************************************************}
71 interface
72 {***************************************************************************}
73 
74 {$IFDEF FPC}
75     {$PACKRECORDS 1}
76 {$ENDIF FPC}
77 
78 
79 const
80 {return codes / error constants}
81     NO_ERROR                        =  0;
82     Error_Invalid_Parameter         = 87;
83     ERROR_VIO_INVALID_MASK          =349;
84     ERROR_VIO_PTR                   =350;
85     ERROR_VIO_APTR                  =351;
86     ERROR_VIO_RPTR                  =352;
87     ERROR_VIO_CPTR                  =353;
88     ERROR_VIO_LPTR                  =354;
89     ERROR_VIO_MODE                  =355;
90     ERROR_VIO_WIDTH                 =356;
91     ERROR_VIO_ATTR                  =357;
92     ERROR_VIO_ROW                   =358;
93     ERROR_VIO_COL                   =359;
94     ERROR_VIO_TOPROW                =360;
95     ERROR_VIO_BOTROW                =361;
96     ERROR_VIO_RIGHTCOL              =362;
97     ERROR_VIO_LEFTCOL               =363;
98     ERROR_VIO_WAIT_FLAG             =366;
99     ERROR_VIO_UNLOCK                =367;
100     ERROR_VIO_SMG_ONLY              =402;
101     ERROR_VIO_INVALID_ASCIIZ        =403;
102     ERROR_VIO_DEREGISTER            =404;
103     ERROR_VIO_NO_POPUP              =405;
104     ERROR_VIO_EXISTING_POPUP        =406;
105     ERROR_VIO_INVALID_PARMS         =421;
106     ERROR_VIO_FUNCTION_OWNED        =422;
107     ERROR_VIO_RETURN                =423;
108     ERROR_VIO_REGISTER              =426;
109     ERROR_VIO_NO_MODE_THREAD        =427;
110     ERROR_VIO_NO_SAVE_RESTORE_THD   =428;
111     ERROR_VIO_IN_BG                 =429;
112     ERROR_VIO_ILLEGAL_DURING_POPUP  =430;
113     ERROR_VIO_LOCK                  =434;
114     ERROR_VIO_INVALID_HANDLE        =436;
115     ERROR_VIO_ILLEGAL_DURING_LOCK   =437;
116     ERROR_VIO_INVALID_LENGTH        =438;
117     ERROR_VIO_DETACHED              =465;
118     ERROR_VIO_FONT                  =467;
119     ERROR_VIO_USER_FONT             =468;
120     ERROR_VIO_BAD_CP                =469;
121     ERROR_VIO_NO_CP                 =470;
122     ERROR_VIO_NA_CP                 =471;
123     ERROR_VIO_INTERNAL_RESOURCE     =479;
124     ERROR_VIO_SHELL_INIT            =480;
125     ERROR_VIO_TRANSPARENT_POPUP     =483;
126     ERROR_VIO_BAD_RESERVE           =486;
127     ERROR_VIO_EXTENDED_SG           =494;
128     ERROR_VIO_NOT_PRES_MGR_SG       =495;
129     ERROR_VIO_SHIELD_OWNED          =496;
130     ERROR_VIO_NO_MORE_HANDLES       =497;
131     ERROR_VIO_SEE_ERROR_LOG         =498;
132     ERROR_VIO_ASSOCIATED_DC         =499;
133 
134 {severity codes}
135     SEVERITY_NOERROR        =$0000;
136     SEVERITY_WARNING        =$0004;
137     SEVERITY_ERROR          =$0008;
138     SEVERITY_SEVERE         =$000C;
139     SEVERITY_UNRECOVERABLE  =$0010;
140 
141 {base component error values}
142     WINERR_BASE =$1000;    {Window Manager}
143     GPIERR_BASE =$2000;    {Graphics Presentation Interface}
144     DEVERR_BASE =$3000;    {Device Manager}
145     SPLERR_BASE =$4000;    {Spooler}
146 
147 
148 {first parameter registration constants}
149     VR_VIOGETCURPOS     =$00000001;
150     VR_VIOGETCURTYPE    =$00000002;
151     VR_VIOGETMODE       =$00000004;
152     VR_VIOGETBUF        =$00000008;
153     VR_VIOGETPHYSBUF    =$00000010;
154     VR_VIOSETCURPOS     =$00000020;
155     VR_VIOSETCURTYPE    =$00000040;
156     VR_VIOSETMODE       =$00000080;
157     VR_VIOSHOWBUF       =$00000100;
158     VR_VIOREADCHARSTR   =$00000200;
159     VR_VIOREADCELLSTR   =$00000400;
160     VR_VIOWRTNCHAR      =$00000800;
161     VR_VIOWRTNATTR      =$00001000;
162     VR_VIOWRTNCELL      =$00002000;
163     VR_VIOWRTTTY        =$00004000;
164     VR_VIOWRTCHARSTR    =$00008000;
165     VR_VIOWRTCHARSTRATT =$00010000;
166     VR_VIOWRTCELLSTR    =$00020000;
167     VR_VIOSCROLLUP      =$00040000;
168     VR_VIOSCROLLDN      =$00080000;
169     VR_VIOSCROLLLF      =$00100000;
170     VR_VIOSCROLLRT      =$00200000;
171     VR_VIOSETANSI       =$00400000;
172     VR_VIOGETANSI       =$00800000;
173     VR_VIOPRTSC         =$01000000;
174     VR_VIOSCRLOCK       =$02000000;
175     VR_VIOSCRUNLOCK     =$04000000;
176     VR_VIOSAVREDRAWWAIT =$08000000;
177     VR_VIOSAVREDRAWUNDO =$10000000;
178     VR_VIOPOPUP         =$20000000;
179     VR_VIOENDPOPUP      =$40000000;
180     VR_VIOPRTSCTOGGLE   =$80000000;
181 
182 {second parameter registration constants}
183     VR_VIOMODEWAIT      =$00000001;
184     VR_VIOMODEUNDO      =$00000002;
185     VR_VIOGETFONT       =$00000004;
186     VR_VIOGETCONFIG     =$00000008;
187     VR_VIOSETCP         =$00000010;
188     VR_VIOGETCP         =$00000020;
189     VR_VIOSETFONT       =$00000040;
190     VR_VIOGETSTATE      =$00000080;
191     VR_VIOSETSTATE      =$00000100;
192 
193 {constants for TVioModeInfo.Color}
194     COLORS_2    =$0001;
195     COLORS_4    =$0002;
196     COLORS_16   =$0004;
197 
198 {constants for TVioModeInfo.fbType}
199     VGMT_OTHER          =$01;
200     VGMT_GRAPHICS       =$02;
201     VGMT_DISABLEBURST   =$04;
202 
203 {constants for CharType in VioCheckCharType}
204     VCC_SBCSCHAR        =0;
205     VCC_DBCSFULLCHAR    =1;
206     VCC_DBCS1STHALF     =2;
207     VCC_DBCS2NDHALF     =3;
208 
209 {constants for Mode in VioGetAnsi/VioSetAnsi}
210     ANSI_ON     =1;
211     ANSI_OFF    =0;
212 
213 {constants for RequestType in VioSavRedrawWait}
214     VSRWI_SAVEANDREDRAW =0;
215     VSRWI_REDRAW        =1;
216 
217 {constants for NotifyType in VioSavRedrawWait}
218     VSRWN_SAVE          =0;
219     VSRWN_REDRAW        =1;
220 
221 {constants for Ownership in VioSavRedrawUndo}
222     UNDOI_GETOWNER      =0;
223     UNDOI_RELEASEOWNER  =1;
224 
225 {constants for KillThread in VioSavRedrawUndo}
226     UNDOK_ERRORCODE     =0;
227     UNDOK_TERMINATE     =1;
228 
229     VMWR_POPUP  =0;
230     VMWN_POPUP  =0;
231 
232 {constants for WaitFlag in VioScrLock}
233     LOCKIO_NOWAIT   =0;
234     LOCKIO_WAIT     =1;
235 
236 {constants for Status in VioScrLock}
237     LOCK_SUCCESS    =0;
238     LOCK_FAIL       =1;
239 
240 {constants for OptionFlags in VioPopup}
241     VP_NOWAIT       =$0000;
242     VP_WAIT         =$0001;
243     VP_OPAQUE       =$0000;
244     VP_TRANSPARENT  =$0002;
245 
246 {constants for TVioConfigInfo.Adapter}
247     DISPLAY_MONOCHROME     =$0000;
248     DISPLAY_CGA            =$0001;
249     DISPLAY_EGA            =$0002;
250     DISPLAY_VGA            =$0003;
251     DISPLAY_8514A          =$0007;
252     DISPLAY_IMAGEADAPTER   =$0008;
253     DISPLAY_XGA            =$0009;
254 
255 {constants for TVioConfigInfo.Display}
256     MONITOR_MONOCHROME     =$0000;
257     MONITOR_COLOR          =$0001;
258     MONITOR_ENHANCED       =$0002;
259     MONITOR_8503           =$0003;
260     MONITOR_851X_COLOR     =$0004;
261     MONITOR_8514           =$0009;
262     MONITOR_FLATPANEL      =$000A;
263     MONITOR_8507_8604      =$000B;
264     MONITOR_8515           =$000C;
265     MONITOR_9515           =$000F;
266     MONITOR_9517           =$0011;
267     MONITOR_9518           =$0012;
268 
269 {constants for TVioConfigInfo.Configuration, TVioSetTarget.DefaultAlgorithm
270 and usConfigID in VioGetConfig}
271     VIO_CONFIG_CURRENT     =0;
272     VIO_CONFIG_PRIMARY     =1;
273     VIO_CONFIG_SECONDARY   =2;
274 
275 {constants for TVioFontInfo.rType}
276     VGFI_GETCURFONT        =0;
277     VGFI_GETROMFONT        =1;
278 
279 {constants for TFAttrs.fsSelection}
280     FATTR_SEL_ITALIC        =$0001;
281     FATTR_SEL_UNDERSCORE    =$0002;
282     FATTR_SEL_OUTLINE       =$0008;
283     FATTR_SEL_STRIKEOUT     =$0010;
284     FATTR_SEL_BOLD          =$0020;
285 
286 {constants for TFAttrs.fsType}
287     FATTR_TYPE_KERNING      =$0004;
288     FATTR_TYPE_MBCS         =$0008;
289     FATTR_TYPE_DBCS         =$0010;
290     FATTR_TYPE_ANTIALIASED  =$0020;
291 
292 {constants for TFAttrs.fsFontUse}
293     FATTR_FONTUSE_NOMIX         =$0002;
294     FATTR_FONTUSE_OUTLINE       =$0004;
295     FATTR_FONTUSE_TRANSFORMABLE =$0008;
296 
297 {size for fields in the font records}
298     FACESIZE    =32;
299 
300 {constants for TFontMetrics.fsType}
301     FM_TYPE_FIXED       =$0001;
302     FM_TYPE_LICENSED    =$0002;
303     FM_TYPE_KERNING     =$0004;
304     FM_TYPE_DBCS        =$0010;
305     FM_TYPE_MBCS        =$0018;
306     FM_TYPE_64K         =$8000;
307     FM_TYPE_ATOMS       =$4000;
308     FM_TYPE_FAMTRUNC    =$2000;
309     FM_TYPE_FACETRUNC   =$1000;
310 
311 {constants for TFontMetrics.fsDefn}
312     FM_DEFN_OUTLINE =$0001;
313     FM_DEFN_IFI     =$0002;
314     FM_DEFN_WIN     =$0004;
315     FM_DEFN_GENERIC =$8000;
316 
317 {constants for TFontMetrics.fsSelection}
318     FM_SEL_ITALIC           =$0001;
319     FM_SEL_UNDERSCORE       =$0002;
320     FM_SEL_NEGATIVE         =$0004;
321     FM_SEL_OUTLINE          =$0008;    { Hollow Outline Font }
322     FM_SEL_STRIKEOUT        =$0010;
323     FM_SEL_BOLD             =$0020;
324     FM_SEL_ISO9241_TESTED   =$0040;
325 {ISO 9241 is an international standard covering health and safety
326 in the work place for users of visual display terminals. Part 3 of
327 this standard covers clarity and legibility of text displayed on
328 computer screens, it places requirements on minimum sizes and
329 luminance contrast. The presence of FM_SEL_ISO9241_TESTED flag in the
330 font metrics indicates that the font has been tested for compliance
331 to the standard. The FM_ISO_XXX flags indicate the results of the
332 test on the IBM 9515, 9517 and 9518 color displays at the supported
333 dimensions of 640x480 and 1024x768. To ensure compliance the
334 sXDeviceRes and sYDeviceRes must also match the target display
335 resolution.}
336 
337 {constants for TPanose.fbPassedISO and TPanose.fbFailedISO}
338     FM_ISO_9518_640     =$01;
339     FM_ISO_9515_640     =$02;
340     FM_ISO_9515_1024    =$04;
341     FM_ISO_9517_640     =$08;
342     FM_ISO_9517_1024    =$10;
343 
344 {constant for TFontMetrics.fsCapabilities}
345     FM_CAP_NOMIX    =$0001;
346 
347 
348 type
349 {unnecessary, just FYI}
350     THVio=word;
351     PHVio=^THVio;
352     THVPS=word;
353     PHVPS=^THVPS;
354 
355     TQWord=record
356         Lo:cardinal;
357         Hi:cardinal;
358     end;
359     PQWord=^TQWord;
360 
361 {Record type for VioSetCurType/VioGetCurType; the second variant makes the use
362  of percentage-based (negative) and hidden cursor type (-1) specification
363  a bit easier}
364     TVioCursorInfo=record
365         case boolean of
366         false:(
367         yStart:word;    {Cursor start (top) scan line (0-based)}
368         cEnd:word;      {Cursor end (bottom) scan line}
369         cx:word;        {Cursor width (0=default width)}
370         Attr:word);     {Cursor colour attribute (-1=hidden)}
371         true:(
372         yStartInt: integer;
373         cEndInt:integer;
374         cxInt:integer;
375         AttrInt:integer);
376     end;
377     PVioCursorInfo=^TVioCursorInfo;
378     VioCursorInfo=TVioCursorInfo;
379 
380 {Record type for VioSetMode/GetMode}
381     TVioModeInfo=record
382         cb:word;                    {Size of the record}
383         case boolean of
384         false:(
385         fbType,                     {8-bit mask identifying the mode}
386                                     {- see VGMT_* constants         }
387         Color:byte;                 {Number of colour bits available}
388                                     {(1=>2 colours, 2=>4,...) - see }
389                                     {COLORS_* constants             }
390         Col,                        {Number of text character columns}
391         Row,                        {Number of text character rows}
392         HRes,                       {Display width in pixels}
393         VRes:word;                  {Display height in pixels}
394         fmt_ID,                     {Format of the attributes}
395         Attrib:byte;                {Number of attributes in fmt_ID field}
396         Buf_Addr,                   {Address of the physical display buffer}
397         Buf_Length,                 {Length of the physical display buffer}
398         Full_Length,                {Size of the buffer needed to save}
399                                     {the whole physical buffer        }
400         Partial_Length:cardinal;    {Size of the buffer needed to save}
401                                     {the part of the physical buffer  }
402                                     {overwritten with VioPopup        }
403         Ext_Data_Addr:pointer);     {Address of an extended-mode data}
404         true:(
405         fbType2,                (* should be fbType, Color, etc., but this *)
406         Color2:char;            (* construct is unsupported currently      *)
407         Col2,
408         Row2,
409         HRes2,
410         VRes2:word;
411         fmt_ID2,
412         Attrib2:char);
413     end;
414     PVioModeInfo=^TVioModeInfo;
415     VioModeInfo=TVioModeInfo;
416 
417 {record type for VioGetPhysBuf}
418     TVioPhysBuf=record
419         pBuf:pointer;       {Absolute screen address}
420         cb:cardinal;        {Length of the buffer in bytes}
421         case boolean of
422         false:(Sel:word);   {Selector for video access}
423         true:(aSel:array[0..0] of word);
424     end;
425     PVioPhysBuf=^TVioPhysBuf;
426     VioPhysBuf=TVioPhysBuf;
427 
428 {record type for VioGetConfig}
429 (*   #pragma pack(2) ??? *)
430     type
431         TVioConfigInfo=record
432             cb:word;                {Size of the record}
433             Adapter:word;           {Adapter type (see DISPLAY_* constants)}
434             Display:word;           {Display type (see MONITOR_* constants)}
435             cbMemory:cardinal;      {Amount of RAM in bytes on the adapter}
436             Configuration:word;     {Configuration ID (see  }
437                                     {VIO_CONFIG_* constants)}
438             VDHVersion:word;        {Reserved, set to zero}
439             Flags:word;             {Flags; 1 sets the default}
440                                     {power-on configuration   }
441             HWBufferSize:cardinal;  {Size of the buffer needed to save}
442                                     {the full adapter state (not      }
443                                     {including the physical buffer)   }
444             FullSaveSize:cardinal;  {Size of the buffer needed to}
445                                     {save the full adapter state }
446             PartSaveSize:cardinal;  {Size of the buffer needed to save}
447                                     {the part of the physical buffer  }
448                                     {overwritten with VioPopup        }
449             EmAdaptersOff:word;     {Offset of the information   }
450                                     {about emulated adapter types}
451             EmDisplaysOff:word;     {Offset of the information   }
452                                     {about emulated display types}
453        end;
454        PVioConfigInfo=^TVioConfigInfo;
455        VioConfigInfo=TVioConfigInfo;
456 
457 {record type for VioGetFont/VioSetFont}
458     TVioFontInfo=record
459         cb:word;            {Size of the data record}
460         case byte of
461         1:(
462         rType,              {Request type}
463         cxCell,             {Columns per cell (cell width)}
464         cyCell:word;        {Rows per cell (cell height)}
465         pbData:pointer;     {Address of caller's buffer}
466         cbData:word);       {Size of caller's buffer in bytes}
467         2:(
468         aType,
469         cxCell2,
470         cyCell2:word;
471         pbData2:longint);   (* should be pbData, but this construct *)
472         3:(_type:word);     (* is not supported currently           *)
473     end;
474     PVioFontInfo=^TVioFontInfo;
475     VioFontInfo=TVioFontInfo;  (* *)
476 
477 {record types for VioGetState/VioSetState}
478     TVioPalState=record
479         cb:word;                        {Size of the record}
480         rtype:word;                     {0=palette}
481         iFirst:word;                    {The first register}
482         AColor:array[0..15] of word;    {Up to 16 register values}
483     end;
484     PVioPalState=^TVioPalState;
485     VioPalState=TVioPalState;
486 
487     TVioOverscan=record
488         cb:word;    {Size of the record}
489         rType:word; {1=border colour}
490         Color:word; {The colour of the border area}
491     end;
492     PVioOverscan=^TVioOverscan;
493     VioOverScan=TVioOverScan;
494 
495     TVioIntensity=record
496         cb:word;    {Size of the record}
497         rType:word; {2=blink/bold settings}
498         fs:word;    {The flink/bold background switch}
499     end;
500     PVioIntensity=^TVioIntensity;
501     VioIntensity=TVioIntensity;
502 
503     TVioColorReg=record
504         cb:word;                {Size of the record}
505         rType:word;             {3=colour registers}
506         FirstColorReg:word;     {The first colour register}
507         NumColorRegs:word;      {Number of colour registers}
508         ColorRegAddr:pointer;   {pointer to an array with colour values}
509     end;
510     PVioColorReg=^TVioColorReg;
511     VioColorReg=TVioColorReg;
512 
513     TVioSetULineLoc=record
514         cb:word;        {Size of the record}
515         rType:word;     {5=underline}
516         ScanLine:word;  {Location of the underline (32=no underline)}
517     end;
518     PVioSetULineLoc=^TVioSetULineLoc;
519     VioSetULineLoc=TVioSetULineLoc;
520 
521     TVioSetTarget=record
522         cb:word;                {Size of the record}
523         rType:word;             {6=target for VioSetMode}
524         DefaultAlgorithm:word;  {Default/primary/secondary   }
525                                 {(see VIO_CONFIG_* constants)}
526     end;
527     PVioSetTarget=^TVioSetTarget;
528     VioSetTarget=TVioSetTarget;
529 
530     TStr8=array[0..7] of char;
531     PStr8=^TStr8;
532 
533 {font record type for Vio/GpiCreateLogFont}
534     TFAttrs=record
535         usRecordLength:word;
536         fsSelection:word;
537         lMatch:longint;
538         szFacename:array[0..FACESIZE-1] of char;
539         idRegistry:word;
540         usCodePage:word;
541         lMaxBaselineExt:longint;
542         lAveCharWidth:longint;
543         fsType:word;
544         fsFontUse:word;
545     end;
546     PFAttrs=^TFAttrs;
547     FAttrs=TFAttrs;
548 
549 {font metrics returned by GpiQueryFonts and others}
550     TPanose=record
551         bFamilyType:byte;
552         bSerifStyle:byte;
553         bWeight:byte;
554         bProportion:byte;
555         bContrast:byte;
556         bStrokeVariation:byte;
557         bArmStyle:byte;
558         bLetterform:byte;
559         bMidline:byte;
560         bXHeight:byte;
561         fbPassedISO:byte;
562         fbFailedISO:byte;
563     end;
564     PPanose=^TPanose;
565 
566     TFontMetrics=record
567         szFamilyname:array[0..FACESIZE-1] of char;
568         szFacename:array[0..FACESIZE-1] of char;
569         idRegistry:word;
570         usCodePage:word;
571         lEmHeight:longint;
572         lXHeight:longint;
573         lMaxAscender:longint;
574         lMaxDescender:longint;
575         lLowerCaseAscent:longint;
576         lLowerCaseDescent:longint;
577         lInternalLeading:longint;
578         lExternalLeading:longint;
579         lAveCharWidth:longint;
580         lMaxCharInc:longint;
581         lEmInc:longint;
582         lMaxBaselineExt:longint;
583         sCharSlope:longint;
584         sInlineDir:integer;
585         sCharRot:integer;
586         usWeightClass:word;
587         usWidthClass:word;
588         sXDeviceRes:integer;
589         sYDeviceRes:integer;
590         sFirstChar:integer;
591         sLastChar:integer;
592         sDefaultChar:integer;
593         sBreakChar:integer;
594         sNominalPointSize:integer;
595         sMinimumPointSize:integer;
596         sMaximumPointSize:integer;
597         fsType:word;
598         fsDefn:word;
599         fsSelection:word;
600         fsCapabilities:word;
601         lSubscriptXSize:longint;
602         lSubscriptYSize:longint;
603         lSubscriptXOffset:longint;
604         lSubscriptYOffset:longint;
605         lSuperscriptXSize:longint;
606         lSuperscriptYSize:longint;
607         lSuperscriptXOffset:longint;
608         lSuperscriptYOffset:longint;
609         lUnderscoreSize:longint;
610         lUnderscorePosition:longint;
611         lStrikeoutSize:longint;
612         lStrikeoutPosition:longint;
613         sKerningPairs:integer;
614         sFamilyClass:integer;
615         lMatch:longint;
616         FamilyNameAtom:longint;
617         FaceNameAtom:longint;
618         Panose:TPanose;
619     end;
620     PFontMetrics=^TFontMetrics;
621     FontMetrics=TFontMetrics;
622 
623 
VioRegisternull624 function VioRegister(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal):word;
625                                                                          cdecl;
626 
VioRegisternull627 function VioRegister(ModuleName,ProcName:string;FnMask1,FnMask2:cardinal):word;
628 
VioGlobalRegnull629 function VioGlobalReg(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal;
630                                                       Return:word):word; cdecl;
631 
VioGlobalRegnull632 function VioGlobalReg(ModuleName,ProcName:string;FnMask1,FnMask2:cardinal;
633                                                              Return:word):word;
634 
VioDeRegisternull635 function VioDeRegister:word; cdecl;
636 
VioGetBufnull637 function VioGetBuf(var LVBAddr:pointer;var LVBLength:word;VioHandle:word):word;
638                                                                          cdecl;
639 
VioGetCurPosnull640 function VioGetCurPos(var Row,Column:word;VioHandle:word):word; cdecl;
641 
VioSetCurPosnull642 function VioSetCurPos(Row,Column,VioHandle:word):word; cdecl;
643 
VioGetCurTypenull644 function VioGetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
645 
VioSetCurTypenull646 function VioSetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
647 
VioGetModenull648 function VioGetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
649 
VioSetModenull650 function VioSetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
651 
VioGetPhysBufnull652 function VioGetPhysBuf(var PBData:TVioPhysBuf;Reserved:word):word; cdecl;
653 
VioReadCellStrnull654 function VioReadCellStr(var Buf;var BufLen:word;
655                                         Row,Column,VioHandle:word):word; cdecl;
656 
VioReadCharStrnull657 function VioReadCharStr(var Buf;var BufLen:word;
658                                         Row,Column,VioHandle:word):word; cdecl;
659 
VioWrtCellStrnull660 function VioWrtCellStr(CellStr:pointer;Len,Row,Column,VioHandle:word):word;
661                                                                          cdecl;
662 
VioWrtCharStrnull663 function VioWrtCharStr(CharStr:pointer;Len,Row,Column,VioHandle:word):word;
664                                                                          cdecl;
665 
VioScrollDnnull666 function VioScrollDn(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
667                                                    VioHandle:word):word; cdecl;
668 
VioScrollDownnull669 function VioScrollDown(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
670                                                    VioHandle:word):word; cdecl;
671 
VioScrollUpnull672 function VioScrollUp(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
673                                                    VioHandle:word):word; cdecl;
674 
VioScrollLfnull675 function VioScrollLf(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
676                                                    VioHandle:word):word; cdecl;
677 
VioScrollLeftnull678 function VioScrollLeft(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
679                                                    VioHandle:word):word; cdecl;
680 
VioScrollRtnull681 function VioScrollRt(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
682                                                    VioHandle:word):word; cdecl;
683 
VioScrollRightnull684 function VioScrollRight(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
685                                                    VioHandle:word):word; cdecl;
686 
VioWrtNAttrnull687 function VioWrtNAttr(var Attr:byte;Times,Row,Column,VioHandle:word):word;
688                                                                          cdecl;
689 
VioWrtNCellnull690 function VioWrtNCell(var Cell:word;Times,Row,Column,VioHandle:word):word;
691                                                                          cdecl;
692 
VioWrtNCharnull693 function VioWrtNChar(var Ch:byte;Times,Row,Column,VioHandle:word):word; cdecl;
694 
VioWrtNCharnull695 function VioWrtNChar(var Ch:char;Times,Row,Column,VioHandle:word):word; cdecl;
696 
VioWrtTTYnull697 function VioWrtTTY(CharStr:pointer;Len,VioHandle:word):word; cdecl;
698 
VioWrtCharStrAttnull699 function VioWrtCharStrAtt(CharStr:pointer;Len,Row,Column:word;var Attr:byte;
700                                                    VioHandle:word):word; cdecl;
701 
VioCheckCharTypenull702 function VioCheckCharType(var CharType:word;Row,Column,VioHandle:word):word;
703                                                                          cdecl;
704 
VioShowBufnull705 function VioShowBuf(BufOfs,Len,VioHandle:word):word; cdecl;
706 
VioSetAnsinull707 function VioSetAnsi(Mode,VioHandle:word):word; cdecl;
708 
VioGetAnsinull709 function VioGetAnsi(var Mode:word;VioHandle:word):word; cdecl;
710 
VioPrtScnull711 function VioPrtSc(VioHandle:word):word; cdecl;
712 
VioPrtScTogglenull713 function VioPrtScToggle(VioHandle:word):word; cdecl;
714 
715 (*
716 function VioRedrawSize(var RedrawSize:cardinal):word;
717 *)
718 
VioSavRedrawWaitnull719 function VioSavRedrawWait(RequestType:word;var NotifyType:word;
720                                                     Reserved:word):word; cdecl;
721 
VioSavRedrawUndonull722 function VioSavRedrawUndo(Ownership,KillThread,Reserved:word):word; cdecl;
723 
VioModeWaitnull724 function VioModeWait(RequestType:word;var NotifyType:word;Reserved:word):word;
725                                                                          cdecl;
726 
VioModeUndonull727 function VioModeUndo(Ownership,KillThread,Reserved:word):word; cdecl;
728 
VioScrLocknull729 function VioScrLock(WaitFlag:word;var Status:word;VioHandle:word):word; cdecl;
730 
VioScrUnLocknull731 function VioScrUnLock(VioHandle:word):word; cdecl;
732 
VioPopUpnull733 function VioPopUp(var OptionFlags:word;VioHandle:word):word; cdecl;
734 
VioEndPopUpnull735 function VioEndPopUp(VioHandle:word):word; cdecl;
736 
VioGetConfignull737 function VioGetConfig(ConfigId:word;var VideoConfig:TVioConfigInfo;
738                                                    VioHandle:word):word; cdecl;
739 
VioGetFontnull740 function VioGetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
741 
VioSetFontnull742 function VioSetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
743 
VioGetCpnull744 function VioGetCp(Reserved:word;var CodePage:word;VioHandle:word):word; cdecl;
745 
VioSetCpnull746 function VioSetCp(Reserved:word;CodePage:word;VioHandle:word):word; cdecl;
747 
VioGetStatenull748 function VioGetState(var State;VioHandle:word):word; cdecl;
749 
VioSetStatenull750 function VioSetState(var State;VioHandle:word):word; cdecl;
751 
VioAssociatenull752 function VioAssociate(DC:cardinal;VPS:word):word; cdecl;
753 
VioCreateLogFontnull754 function VioCreateLogFont(var FAtAttrs:TFAttrs;LLCId:longint;var Name:TStr8;
755                                                          VPS:word):word; cdecl;
756 
VioCreatePSnull757 function VioCreatePS(var VPS:word;Depth,Width,Format,Attrs:integer;
758                                                     Reserved:word):word; cdecl;
759 
VioDeleteSetIdnull760 function VioDeleteSetId(LLCId:longint;VPS:word):word; cdecl;
761 
VioDestroyPSnull762 function VioDestroyPS(VPS:word):word; cdecl;
763 
VioGetDeviceCellSizenull764 function VioGetDeviceCellSize(var Height,Width:integer;VPS:word):word; cdecl;
765 
VioGetOrgnull766 function VioGetOrg(var Row,Column:integer;VPS:word):word; cdecl;
767 
VioQueryFontsnull768 function VioQueryFonts(var Remfonts:longint;var fmMetrics:TFontMetrics;
769                 MetricsLength:longint;var Fonts:longint;FaceName:PChar;
770                                       flOptions:cardinal;VPS:word):word; cdecl;
771 
VioQueryFontsnull772 function VioQueryFonts(var Remfonts:longint;var fmMetrics:TFontMetrics;
773                 MetricsLength:longint;var Fonts:longint;FaceName:string;
774                                              flOptions:cardinal;VPS:word):word;
775 
VioQuerySetIdsnull776 function VioQuerySetIds(var allCIds:longint;var Names:TStr8;
777                        var alTypes:longint;Count:longint;VPS:word):word; cdecl;
778 
VioSetDeviceCellSizenull779 function VioSetDeviceCellSize(Height,Width:integer;VPS:word):word; cdecl;
780 
VioSetOrgnull781 function VioSetOrg(Row,Column:integer;VPS:word):word; cdecl;
782 
VioShowPSnull783 function VioShowPS(Depth,Width,offCell:integer;VPS:word):word; cdecl;
784 
785 {Default message processing for AVio PS's - imported from PMVIOP.DLL}
WinDefAVioWindowProcnull786 function WinDefAVioWindowProc(WND:cardinal;Msg:word;mp1,mp2:cardinal):pointer;
787                                                                          cdecl;
788 
789 
790 (* Following routines are not supported
791    (just have a look in some C header
792    file - you probably won't find it there either).
793 VioFree (index 4)
794 Avs_Prtsc (index 14)
795 VioSrfUnblock (index 16)
796 VioSrfBlock (index 17)
797 VioSave (index 20)
798 VioHetInit (index 34)
799 VioSswSwitch (index 36)
800 Avs_PrtscToggle (index 38)
801 VioInit (index 39)
802 VioRestore (index 41)
803 VioShellInit (index 54)
804 VioGetPSAddress (index 67)
805 VioQueryConsole (index 68)
806 XVioSetCAState (index 71)
807 XVioCheckCharType (index 72)
808 XVioDestroyCA (index 73)
809 XVioCreateCA (index 74)
810 XVioGetCAState (index 76)
811 *)
812 
813 
814 {***************************************************************************}
815 implementation
816 {***************************************************************************}
817 
818 
VioRegisternull819 function VioRegister(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal):word;
820                                                                          cdecl;
821 external 'EMXWRAP' index 145;
822 {external 'VIOCALLS' index 45;}
823 
VioRegisternull824 function VioRegister(ModuleName,ProcName:string;FnMask1,FnMask2:cardinal):word;
825 begin
826     if byte(ModuleName[0])>8 then byte(ModuleName[0]):=8;
827     ModuleName[Succ(byte(ModuleName[0]))]:=#0;
828     if byte(ProcName[0])>32 then byte(ProcName[0]):=32;
829     ProcName[Succ(byte(ProcName[0]))]:=#0;
830     VioRegister:=VioRegister(@ModuleName[1],@ProcName[1],FnMask1,FnMask2);
831 end;
832 
VioGlobalRegnull833 function VioGlobalReg(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal;
834                                                       Return:word):word; cdecl;
835 external 'EMXWRAP' index 170;
836 {external 'VIOCALLS' index 70;}
837 
VioGlobalRegnull838 function VioGlobalReg(ModuleName,ProcName:string;FnMask1,FnMask2:cardinal;
839                                                              Return:word):word;
840 begin
841     if byte(ModuleName[0])>8 then byte(ModuleName[0]):=8;
842     ModuleName[Succ(byte(ModuleName[0]))]:=#0;
843     if byte(ProcName[0])>32 then byte(ProcName[0]):=32;
844     ProcName[Succ(byte(ProcName[0]))]:=#0;
845     VioGlobalReg:=VioGlobalReg(@ModuleName[1],@ProcName[1],FnMask1,FnMask2,
846                                                                        Return);
847 end;
848 
VioDeRegisternull849 function VioDeRegister:word; cdecl;
850 external 'EMXWRAP' index 106;
851 {external 'VIOCALLS' index 6;}
852 
VioGetBufnull853 function VioGetBuf(var LVBAddr:pointer;var LVBLength:word;VioHandle:word):word;
854                                                                          cdecl;
855 external 'EMXWRAP' index 131;
856 {external 'VIOCALLS' index 31;}
857 
VioGetCurPosnull858 function VioGetCurPos(var Row,Column:word;VioHandle:word):word; cdecl;
859 external 'EMXWRAP' index 109;
860 {external 'VIOCALLS' index 9;}
861 
VioSetCurPosnull862 function VioSetCurPos(Row,Column,VioHandle:word):word; cdecl;
863 external 'EMXWRAP' index 115;
864 {external 'VIOCALLS' index 15;}
865 
VioGetCurTypenull866 function VioGetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
867 external 'EMXWRAP' index 127;
868 {external 'VIOCALLS' index 27;}
869 
VioSetCurTypenull870 function VioSetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
871 external 'EMXWRAP' index 132;
872 {external 'VIOCALLS' index 32;}
873 
VioGetModenull874 function VioGetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
875 external 'EMXWRAP' index 121;
876 {external 'VIOCALLS' index 21;}
877 
VioSetModenull878 function VioSetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
879 external 'EMXWRAP' index 122;
880 {external 'VIOCALLS' index 22;}
881 
VioGetPhysBufnull882 function VioGetPhysBuf(var PBData:TVioPhysBuf;Reserved:word):word; cdecl;
883 external 'EMXWRAP' index 102;
884 {external 'VIOCALLS' index 2;}
885 
VioReadCellStrnull886 function VioReadCellStr(var Buf;var BufLen:word;
887                                         Row,Column,VioHandle:word):word; cdecl;
888 external 'EMXWRAP' index 124;
889 {external 'VIOCALLS' index 24;}
890 
VioReadCharStrnull891 function VioReadCharStr(var Buf;var BufLen:word;
892                                         Row,Column,VioHandle:word):word; cdecl;
893 external 'EMXWRAP' index 130;
894 {external 'VIOCALLS' index 30;}
895 
VioWrtCellStrnull896 function VioWrtCellStr(CellStr:pointer;Len,Row,Column,VioHandle:word):word;
897                                                                          cdecl;
898 external 'EMXWRAP' index 110;
899 {external 'VIOCALLS' index 10;}
900 
VioWrtCharStrnull901 function VioWrtCharStr(CharStr:pointer;Len,Row,Column,VioHandle:word):word;
902                                                                          cdecl;
903 external 'EMXWRAP' index 113;
904 {external 'VIOCALLS' index 13;}
905 
VioScrollDnnull906 function VioScrollDn(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
907                                                    VioHandle:word):word; cdecl;
908 external 'EMXWRAP' index 147;
909 {external 'VIOCALLS' index 47;}
910 
VioScrollDownnull911 function VioScrollDown(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
912                                                    VioHandle:word):word; cdecl;
913 external 'EMXWRAP' index 147;
914 {external 'VIOCALLS' index 47;}
915 
VioScrollUpnull916 function VioScrollUp(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
917                                                    VioHandle:word):word; cdecl;
918 external 'EMXWRAP' index 107;
919 {external 'VIOCALLS' index 7;}
920 
VioScrollLfnull921 function VioScrollLf(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
922                                                    VioHandle:word):word; cdecl;
923 external 'EMXWRAP' index 144;
924 {external 'VIOCALLS' index 44;}
925 
VioScrollLeftnull926 function VioScrollLeft(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
927                                                    VioHandle:word):word; cdecl;
928 external 'EMXWRAP' index 144;
929 {external 'VIOCALLS' index 44;}
930 
VioScrollRtnull931 function VioScrollRt(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
932                                                    VioHandle:word):word; cdecl;
933 external 'EMXWRAP' index 112;
934 {external 'VIOCALLS' index 12;}
935 
VioScrollRightnull936 function VioScrollRight(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
937                                                    VioHandle:word):word; cdecl;
938 external 'EMXWRAP' index 112;
939 {external 'VIOCALLS' index 12;}
940 
VioWrtNAttrnull941 function VioWrtNAttr(var Attr:byte;Times,Row,Column,VioHandle:word):word;
942                                                                          cdecl;
943 external 'EMXWRAP' index 126;
944 {external 'VIOCALLS' index 26;}
945 
VioWrtNCellnull946 function VioWrtNCell(var Cell:word;Times,Row,Column,VioHandle:word):word;
947                                                                          cdecl;
948 external 'EMXWRAP' index 152;
949 {external 'VIOCALLS' index 52;}
950 
VioWrtNCharnull951 function VioWrtNChar(var Ch:byte;Times,Row,Column,VioHandle:word):word; cdecl;
952 external 'EMXWRAP' index 153;
953 {external 'VIOCALLS' index 53;}
954 
VioWrtNCharnull955 function VioWrtNChar(var Ch:char;Times,Row,Column,VioHandle:word):word; cdecl;
956 external 'EMXWRAP' index 153;
957 {external 'VIOCALLS' index 53;}
958 
VioWrtTTYnull959 function VioWrtTTY(CharStr:pointer;Len,VioHandle:word):word; cdecl;
960 external 'EMXWRAP' index 119;
961 {external 'VIOCALLS' index 19;}
962 
VioWrtCharStrAttnull963 function VioWrtCharStrAtt(CharStr:pointer;Len,Row,Column:word;var Attr:byte;
964                                                    VioHandle:word):word; cdecl;
965 external 'EMXWRAP' index 148;
966 {external 'VIOCALLS' index 48;}
967 
VioCheckCharTypenull968 function VioCheckCharType(var CharType:word;Row,Column,VioHandle:word):word;
969                                                                          cdecl;
970 external 'EMXWRAP' index 175;
971 {external 'VIOCALLS' index 75;}
972 
VioShowBufnull973 function VioShowBuf(BufOfs,Len,VioHandle:word):word; cdecl;
974 external 'EMXWRAP' index 143;
975 {external 'VIOCALLS' index 43;}
976 
VioSetAnsinull977 function VioSetAnsi(Mode,VioHandle:word):word; cdecl;
978 external 'EMXWRAP' index 105;
979 {external 'VIOCALLS' index 5;}
980 
VioGetAnsinull981 function VioGetAnsi(var Mode:word;VioHandle:word):word; cdecl;
982 external 'EMXWRAP' index 103;
983 {external 'VIOCALLS' index 3;}
984 
VioPrtScnull985 function VioPrtSc(VioHandle:word):word; cdecl;
986 external 'EMXWRAP' index 108;
987 {external 'VIOCALLS' index 8;}
988 
VioPrtScTogglenull989 function VioPrtScToggle(VioHandle:word):word; cdecl;
990 external 'EMXWRAP' index 150;
991 {external 'VIOCALLS' index 50;}
992 
993 (*
994 function VioRedrawSize(var RedrawSize:cardinal):word;
995 !!!not defined in EMXWRAP.DLL!!!
996 {external 'VIOCALLS' index 69;}
997 *)
998 
VioSavRedrawWaitnull999 function VioSavRedrawWait(RequestType:word;var NotifyType:word;
1000                                                     Reserved:word):word; cdecl;
1001 external 'EMXWRAP' index 125;
1002 {external 'VIOCALLS' index 25;}
1003 
VioSavRedrawUndonull1004 function VioSavRedrawUndo(Ownership,KillThread,Reserved:word):word; cdecl;
1005 external 'EMXWRAP' index 128;
1006 {external 'VIOCALLS' index 28;}
1007 
VioModeWaitnull1008 function VioModeWait(RequestType:word;var NotifyType:word;Reserved:word):word;
1009                                                                          cdecl;
1010 external 'EMXWRAP' index 137;
1011 {external 'VIOCALLS' index 37;}
1012 
VioModeUndonull1013 function VioModeUndo(Ownership,KillThread,Reserved:word):word; cdecl;
1014 external 'EMXWRAP' index 135;
1015 {external 'VIOCALLS' index 35;}
1016 
VioScrLocknull1017 function VioScrLock(WaitFlag:word;var Status:word;VioHandle:word):word; cdecl;
1018 external 'EMXWRAP' index 123;
1019 {external 'VIOCALLS' index 23;}
1020 
VioScrUnLocknull1021 function VioScrUnLock(VioHandle:word):word; cdecl;
1022 external 'EMXWRAP' index 118;
1023 {external 'VIOCALLS' index 18;}
1024 
VioPopUpnull1025 function VioPopUp(var OptionFlags:word;VioHandle:word):word; cdecl;
1026 external 'EMXWRAP' index 111;
1027 {external 'VIOCALLS' index 11;}
1028 
VioEndPopUpnull1029 function VioEndPopUp(VioHandle:word):word; cdecl;
1030 external 'EMXWRAP' index 101;
1031 {external 'VIOCALLS' index 1;}
1032 
VioGetConfignull1033 function VioGetConfig(ConfigId:word;var VideoConfig:TVioConfigInfo;
1034                                                    VioHandle:word):word; cdecl;
1035 external 'EMXWRAP' index 146;
1036 {external 'VIOCALLS' index 46;}
1037 
VioGetFontnull1038 function VioGetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
1039 external 'EMXWRAP' index 129;
1040 {external 'VIOCALLS' index 29;}
1041 
VioSetFontnull1042 function VioSetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
1043 external 'EMXWRAP' index 133;
1044 {external 'VIOCALLS' index 33;}
1045 
VioGetCpnull1046 function VioGetCp(Reserved:word;var CodePage:word;VioHandle:word):word; cdecl;
1047 external 'EMXWRAP' index 140;
1048 {external 'VIOCALLS' index 40;}
1049 
VioSetCpnull1050 function VioSetCp(Reserved:word;CodePage:word;VioHandle:word):word; cdecl;
1051 external 'EMXWRAP' index 142;
1052 {external 'VIOCALLS' index 42;}
1053 
VioGetStatenull1054 function VioGetState(var State;VioHandle:word):word; cdecl;
1055 external 'EMXWRAP' index 149;
1056 {external 'VIOCALLS' index 49;}
1057 
VioSetStatenull1058 function VioSetState(var State;VioHandle:word):word; cdecl;
1059 external 'EMXWRAP' index 151;
1060 {external 'VIOCALLS' index 51;}
1061 
1062 
1063 {Extended functions for windowed VIO follow.}
VioAssociatenull1064 function VioAssociate(DC:cardinal;VPS:word):word; cdecl;
1065 external 'EMXWRAP' index 155;
1066 {external 'VIOCALLS' index 55;}
1067 
VioCreateLogFontnull1068 function VioCreateLogFont(var FAtAttrs:TFAttrs;LLCId:longint;var Name:TStr8;
1069                                                          VPS:word):word; cdecl;
1070 external 'EMXWRAP' index 160;
1071 {external 'VIOCALLS' index 60;}
1072 
VioCreatePSnull1073 function VioCreatePS(var VPS:word;Depth,Width,Format,Attrs:integer;
1074                                                     Reserved:word):word; cdecl;
1075 external 'EMXWRAP' index 156;
1076 {external 'VIOCALLS' index 56;}
1077 
VioDeleteSetIdnull1078 function VioDeleteSetId(LLCId:longint;VPS:word):word; cdecl;
1079 external 'EMXWRAP' index 157;
1080 {external 'VIOCALLS' index 57;}
1081 
VioDestroyPSnull1082 function VioDestroyPS(VPS:word):word; cdecl;
1083 external 'EMXWRAP' index 161;
1084 {external 'VIOCALLS' index 61;}
1085 
VioGetDeviceCellSizenull1086 function VioGetDeviceCellSize(var Height,Width:integer;VPS:word):word; cdecl;
1087 external 'EMXWRAP' index 158;
1088 {external 'VIOCALLS' index 58;}
1089 
VioGetOrgnull1090 function VioGetOrg(var Row,Column:integer;VPS:word):word; cdecl;
1091 external 'EMXWRAP' index 159;
1092 {external 'VIOCALLS' index 59;}
1093 
VioQueryFontsnull1094 function VioQueryFonts(var Remfonts:longint;var fmMetrics:TFontMetrics;
1095                 MetricsLength:longint;var Fonts:longint;FaceName:PChar;
1096                                       flOptions:cardinal;VPS:word):word; cdecl;
1097 external 'EMXWRAP' index 164;
1098 {external 'VIOCALLS' index 64;}
1099 
VioQueryFontsnull1100 function VioQueryFonts(var Remfonts:longint;var fmMetrics:TFontMetrics;
1101                 MetricsLength:longint;var Fonts:longint;FaceName:string;
1102                                              flOptions:cardinal;VPS:word):word;
1103 
1104 var B:byte;
1105 
1106 begin
1107     B:=byte(FaceName[0]);
1108     if B=0 then VioQueryFonts:=VioQueryFonts(RemFonts,fmMetrics,MetricsLength,
1109                                                   Fonts,nil,flOptions,VPS) else
1110     begin
1111         if B<>255 then
1112         begin
1113             FaceName[Succ(B)]:=#0;
1114             VioQueryFonts:=VioQueryFonts(RemFonts,fmMetrics,MetricsLength,
1115                                              Fonts,@FaceName[1],flOptions,VPS);
1116         end else
1117         begin
1118             Move(FaceName[1],FaceName[0],B);
1119             FaceName[B]:=#0;
1120             VioQueryFonts:=VioQueryFonts(RemFonts,fmMetrics,MetricsLength,
1121                                                 Fonts,@FaceName,flOptions,VPS);
1122         end;
1123     end;
1124 end;
1125 
VioQuerySetIdsnull1126 function VioQuerySetIds(var allCIds:longint;var Names:TStr8;
1127                        var alTypes:longint;Count:longint;VPS:word):word; cdecl;
1128 external 'EMXWRAP' index 162;
1129 {external 'VIOCALLS' index 62;}
1130 
VioSetDeviceCellSizenull1131 function VioSetDeviceCellSize(Height,Width:integer;VPS:word):word; cdecl;
1132 external 'EMXWRAP' index 165;
1133 {external 'VIOCALLS' index 65;}
1134 
VioSetOrgnull1135 function VioSetOrg(Row,Column:integer;VPS:word):word; cdecl;
1136 external 'EMXWRAP' index 163;
1137 {external 'VIOCALLS' index 63;}
1138 
VioShowPSnull1139 function VioShowPS(Depth,Width,offCell:integer;VPS:word):word; cdecl;
1140 external 'EMXWRAP' index 166;
1141 {external 'VIOCALLS' index 66;}
1142 
WinDefAVioWindowProcnull1143 function WinDefAVioWindowProc(WND:cardinal;Msg:word;mp1,mp2:cardinal):pointer;
1144                                                                          cdecl;
1145 external 'EMXWRAP' index 30;
1146 {external 'PMVIOP' index 30;}
1147 
1148 end.
1149