home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / visionix / vvioi.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-12-13  |  34.1 KB  |  1,177 lines

  1. {
  2. ════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix OS/2 16-Bit VIO DLL API Import Unit
  5.  Copyright 1993 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8. ────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  --------  --------  -------------------------------------------------------
  14.  
  15.  jrt       12/11/93  First logged revision.
  16.  
  17. ────────────────────────────────────────────────────────────────────────────
  18. }
  19.  
  20.  
  21.  
  22.  
  23. Unit VVioI;
  24.  
  25. Interface
  26.  
  27. Uses
  28.  
  29.   VTypesu,
  30.   VTypes2u;
  31.  
  32. Const
  33.  
  34.   { VioRegister 1st parameter constants }
  35.  
  36.   VR_VIOGETCURPOS         = $00000001;
  37.   VR_VIOGETCURTYPE        = $00000002;
  38.   VR_VIOGETMODE           = $00000004;
  39.   VR_VIOGETBUF            = $00000008;
  40.   VR_VIOGETPHYSBUF        = $00000010;
  41.   VR_VIOSETCURPOS         = $00000020;
  42.   VR_VIOSETCURTYPE        = $00000040;
  43.   VR_VIOSETMODE           = $00000080;
  44.   VR_VIOSHOWBUF           = $00000100;
  45.   VR_VIOREADCHARSTR       = $00000200;
  46.   VR_VIOREADCELLSTR       = $00000400;
  47.   VR_VIOWRTNCHAR          = $00000800;
  48.   VR_VIOWRTNATTR          = $00001000;
  49.   VR_VIOWRTNCELL          = $00002000;
  50.   VR_VIOWRTTTY            = $00004000;
  51.   VR_VIOWRTCHARSTR        = $00008000;
  52.  
  53.   VR_VIOWRTCHARSTRATT     = $00010000;
  54.   VR_VIOWRTCELLSTR        = $00020000;
  55.   VR_VIOSCROLLUP          = $00040000;
  56.   VR_VIOSCROLLDN          = $00080000;
  57.   VR_VIOSCROLLLF          = $00100000;
  58.   VR_VIOSCROLLRT          = $00200000;
  59.   VR_VIOSETANSI           = $00400000;
  60.   VR_VIOGETANSI           = $00800000;
  61.   VR_VIOPRTSC             = $01000000;
  62.   VR_VIOSCRLOCK           = $02000000;
  63.   VR_VIOSCRUNLOCK         = $04000000;
  64.   VR_VIOSAVREDRAWWAIT     = $08000000;
  65.   VR_VIOSAVREDRAWUNDO     = $10000000;
  66.   VR_VIOPOPUP             = $20000000;
  67.   VR_VIOENDPOPUP          = $40000000;
  68.   VR_VIOPRTSCTOGGLE       = $80000000;
  69.  
  70.  
  71.   { VioRegister 2nd paramater constants }
  72.  
  73.   VR_VIOMODEWAIT    = $00000001;
  74.   VR_VIOMODEUNDO    = $00000002;
  75.   VR_VIOGETFONT     = $00000004;
  76.   VR_VIOGETCONFIG   = $00000008;
  77.   VR_VIOSETCP       = $00000010;
  78.   VR_VIOGETCP       = $00000020;
  79.   VR_VIOSETFONT     = $00000040;
  80.   VR_VIOGETSTATE    = $00000080;
  81.   VR_VIOSETSTATE    = $00000100;
  82.  
  83.   { VioModeInfo color constants }
  84.  
  85.   COLORS_2          = $01;
  86.   COLORS_4          = $02;
  87.   COLORS_16         = $04;
  88.  
  89.   { VioModeInfo screen mode constants }
  90.  
  91.   VGMT_OTHER        = $01;
  92.   VMGT_GRAPHICS     = $02;
  93.   VGMT_DISABLEBURST = $04;
  94.  
  95.   { Constants for VioCheckCharType }
  96.  
  97.   VCC_SBCSCHAR      = 0;
  98.   VCC_DBCSFULLCHAR  = 1;
  99.   VCC_DBCS1STHALF   = 2;
  100.   VCC_DBCS2NDHALF   = 3;
  101.  
  102.   { constants for VioSetAnsi }
  103.  
  104.   ANSI_ON           = 1;
  105.   ANSI_OFF          = 0;
  106.  
  107.   { constants for redraw functions }
  108.  
  109.   VSRWI_SAVEANDREDRAW   = 0;
  110.   VSRWI_REDRAW          = 1;
  111.  
  112.   VSRWN_SAVE            = 0;
  113.   VSRWN_REDRAW          = 1;
  114.  
  115.   UNDOI_GETOWNER        = 0;
  116.   UNDOI_RELEASEOWNER    = 1;
  117.  
  118.   UNDOK_ERRORCODE       = 0;
  119.   UNDOK_TERMINATE       = 1;
  120.  
  121.  
  122.   { constants for VioModexxx }
  123.  
  124.   VMWR_POPUP            = 0;
  125.   VMWN_POPUP            = 0;
  126.  
  127.  
  128.   { Screen lock constants }
  129.  
  130.   LOCKIO_NOWAIT         = 0;
  131.   LOCKIO_WAIT           = 1;
  132.  
  133.   LOCK_SUCCESS          = 0;
  134.   LOCK_FAIL             = 1;
  135.  
  136.   { TVioConfigInfo.adapter constants }
  137.  
  138.   DISPLAY_MONOCHROME    = $0000;
  139.   DISPLAY_CGA           = $0001;
  140.   DISPLAY_EGA           = $0002;
  141.   DISPLAY_VGA           = $0003;
  142.   DISPLAY_8514A         = $0007;
  143.  
  144.   { TVioConfigInfo.Display constants }
  145.  
  146.   MONITOR_MONOCHROME    = $0000;
  147.   MONITOR_COLOR         = $0001;
  148.   MONITOR_ENHANCED      = $0002;
  149.   MONITOR_8503          = $0003;
  150.   MONITOR_851X_COLOR    = $0004;
  151.   MONITOR_8514          = $0009;
  152.  
  153.   { VioConfigInfo ??? constants }
  154.  
  155.   VIO_CONFIG_CURRENT    = 0;
  156.   VIO_CONFIG_PRIMARY    = 1;
  157.   VIO_CONFIG_SECONDARY  = 2;
  158.  
  159.   { VioGetFont constants }
  160.  
  161.   VGFI_GETCURFONT       = 0;
  162.   VGFI_GETROMFONT       = 1;
  163.  
  164.  
  165. {-------------------------------------------------}
  166. { Font type attr structure (for VioCreateLogFont) }
  167. {-------------------------------------------------}
  168.  
  169. Type
  170.  
  171.   TFontAttr = RECORD
  172.  
  173.     RecordLength      : WORD;
  174.     Selection         : WORD;
  175.     Match             : LONGINT;
  176.     Facename          : Array[0..7] of CHAR; {!^!???}
  177.     IDRegistry        : WORD;
  178.     CodePage          : WORD;
  179.     MaxBaseLineExt    : LONGINT;
  180.     AveCharWidth      : LONGINT;
  181.     WidthClass        : WORD;
  182.     WeightClass       : WORD;
  183.     TheType           : WORD;
  184.     Quality           : INTEGER;
  185.     FontUse           : WORD;
  186.  
  187.   END;
  188.  
  189.   PFontAttr = ^TFontAttr;
  190.  
  191. {--------------------------------------------------}
  192. { VIO Config info structure (For VioGetConfigInfo) }
  193. {--------------------------------------------------}
  194.  
  195. Type
  196.  
  197.   TVioConfigInfo = RECORD
  198.  
  199.     CB                : WORD;
  200.     Adapter           : WORD;
  201.     Display           : WORD;
  202.     Memory            : WORD;
  203.  
  204.     {
  205.     Memory            : LONGINT;
  206.     Configuration     : WORD;
  207.     VDHVersion        : WORD;
  208.     Flags             : WORD;
  209.     HWBufferSize      : LONGINT;
  210.     FullSaveSize      : LONGINT;
  211.     PartSaveSize      : LONGINT;
  212.     EMAdaptersOFF     : WORD;
  213.     EMDisplaysOFF     : WORD;
  214.     }
  215.  
  216.   END;
  217.  
  218.   PVioConfigInfo = ^TVioConfigInfo;
  219.  
  220. {-----------------------------------------------}
  221. { VIO cursor info structure (for VioGetCurInfo) }
  222. {-----------------------------------------------}
  223.  
  224. Type
  225.  
  226.   TVioCursorInfo = RECORD
  227.  
  228.     ScanStart         : WORD;
  229.     ScanEnd           : WORD;
  230.     Width             : WORD;
  231.     Attr              : WORD;
  232.  
  233.   END;
  234.  
  235.   PVioCursorInfo = ^TVioCursorInfo;
  236.  
  237.  
  238. {----------------------------------------------}
  239. { VIO Font info structure (for VioGet/SetFont) }
  240. {----------------------------------------------}
  241.  
  242. Type
  243.  
  244.   TVioFontInfo = RECORD
  245.  
  246.     CB                : WORD;
  247.     TheType           : WORD;
  248.     CellCols          : WORD;
  249.     CellRows          : WORD;
  250.     FontData          : POINTER;
  251.     CBData            : WORD;
  252.  
  253.   END;
  254.  
  255.   PVioFontInfo = ^TVioFontInfo;
  256.  
  257.  
  258. {----------------------------------------------}
  259. { VIO Mode info structure (for VioGet/SetMode) }
  260. {----------------------------------------------}
  261.  
  262. Type
  263.  
  264.   TVioModeInfo = RECORD
  265.  
  266.     CB                : WORD;
  267.     ModeType          : BYTE;
  268.     Color             : BYTE;
  269.     Cols              : WORD;
  270.     Rows              : WORD;
  271.     HorizRes          : WORD;
  272.     VertRes           : WORD;
  273.     (*
  274.     FormatID          : BYTE;
  275.     Attrib            : BYTE;
  276.     BufAdr            : POINTER;
  277.     BufLength         : LONGINT;
  278.     FullLength        : LONGINT;
  279.     PartialLength     : LONGINT;
  280.     ExtDataAddr       : POINTER;
  281.     *)
  282.  
  283.   END;
  284.  
  285.   PVioModeInfo = ^TVioModeInfo;
  286.  
  287.  
  288.   Const
  289.  
  290.     cVGMT_Other        = 0;
  291.     cVGMT_Graphics     = 1;
  292.     cVGMT_DisableBurst = 2;
  293.  
  294.     cColors2           = 1;
  295.     cColors4           = 2;
  296.     cColors16          = 3;
  297.  
  298.  
  299. {------------------------}
  300. { Video buffer cell type }
  301. {------------------------}
  302.  
  303. Type
  304.  
  305.   TCell = RECORD
  306.  
  307.     CH   : CHAR;
  308.     Attr : BYTE;
  309.  
  310.   END;
  311.  
  312.   PCell = ^TCell;
  313.  
  314.  
  315. {-------------------------------------------}
  316. { VioPhysBuff structure (for VioGetPhysBuf) }
  317. {-------------------------------------------}
  318.  
  319. Type
  320.  
  321.   TVioPhysBuf = RECORD
  322.  
  323.     Buff     : POINTER;
  324.     CB       : LONGINT;
  325.     TheSel   : Array[1..1] of TSel;
  326.  
  327.   END;
  328.  
  329.   PVioPhysBuf = ^TVioPhysBuf;
  330.  
  331. {---------------------------------}
  332. { VioGet/SetState structure types }
  333. {---------------------------------}
  334.  
  335.   { !^! need info on color,uline, target stuff }
  336.  
  337. { values for "TheType" fields }
  338.  
  339. Const
  340.  
  341.   VS_VIOPALSTATE        = 0;
  342.   VS_VIOOVERSCAN        = 1;
  343.   VS_VIOINTENSITY       = 2;
  344.   VS_VIOCOLOREG         = 3;
  345.   VS_VIOSETULINELOC     = 4;
  346.   VS_VIOSETTARGET       = 5;
  347.  
  348.  
  349. Type
  350.  
  351.   TVioPalState = RECORD
  352.  
  353.     CB         : WORD;
  354.     TheType    : WORD;  {0}
  355.     First      : WORD;
  356.     Color      : Array[1..1] of WORD;
  357.  
  358.   END;
  359.  
  360.   PVioPalState = ^TVioPalState;
  361.  
  362.   TVioOverScan = RECORD
  363.  
  364.     CB         : WORD;
  365.     TheType    : WORD;  {1}
  366.     Color      : WORD;
  367.  
  368.   END;
  369.  
  370.   PVioOverScan = ^TVioOverScan;
  371.  
  372.   TVioIntensity = RECORD
  373.  
  374.     CB         : WORD;
  375.     TheType    : WORD;  {2}
  376.  
  377.     FS         : WORD;
  378.  
  379.   END;
  380.  
  381.   PVioIntensity = ^TVioIntensity;
  382.  
  383.   TVioColorReg = RECORD
  384.  
  385.     CB         : WORD;
  386.     TheType    : WORD;  {3??}
  387.     FirstReg   : WORD;
  388.     NumRegs    : WORD;
  389.     RegAddr    : POINTER;
  390.  
  391.   END;
  392.  
  393.   PVioColorReg = ^TVioColorReg;
  394.  
  395.   TVioSetUlineLoc = RECORD
  396.  
  397.     CB         : WORD;
  398.     TheType    : WORD;  {4??}
  399.     ScanLine   : WORD;
  400.  
  401.   END;
  402.  
  403.   PVioSetUlineLoc = ^TVioSetULineLoc;
  404.  
  405.   TVioSetTarget = RECORD
  406.  
  407.     CB         : WORD;
  408.     TheType    : WORD;  {5??}
  409.     DefAlgo    : WORD;
  410.  
  411.   END;
  412.  
  413.   PVioSetTarget = ^TVioSetTarget;
  414.  
  415.  
  416. {--------------------------------------------------------------------------}
  417.  
  418. Function VioAssociate(            HDC            : THDC;
  419.                                   PrSpaceHandle  : THVPS   ) : WORD;
  420.  
  421. Function VioCheckCharType(        TheType        : PWORD;
  422.                                   Row            : WORD;
  423.                                   COL            : WORD;
  424.                                   VioHandle      : THVIO   ) : WORD;
  425.  
  426.  
  427. Function VioCreateLogFont(        FontAttr       : PFontAttr;
  428.                                   FontLocalID    : LONGINT;
  429.                                   FontName       : PStr8;
  430.                                   PrSpaceHandle  : THVPS   ) : WORD;
  431.  
  432. Function  VioCreatePS(            NewHVPS        : PHVPS;
  433.                                   Rows           : WORD;
  434.                                   Cols           : WORD;
  435.                                   Format         : WORD;
  436.                                   AttrBytes      : WORD;
  437.                                   PrSpaceHandle  : THVPS   ) : WORD;
  438.  
  439. Function  VioDeleteSetID(         LocalID        : LONGINT;
  440.                                   PrSpaceHandle  : THVPS   ) : WORD;
  441.  
  442. Function  VioDeRegister                                      : WORD;
  443.  
  444. Function  VioDestoryPS(           PrSpaceHandle  : THVPS   ) : WORD;
  445.  
  446. Function  VioEndPopUp(            VioHandle      : THVIO   ) : WORD;
  447.  
  448. Function  VioGetAnsi(         Var AnsiFlag       : WORD;
  449.                                   VioHandle      : THVIO   ) : WORD;
  450.  
  451. Function  VioGetBuf(          Var BuffAddr       : POINTER;
  452.                               Var BuffSize       : WORD;
  453.                                   VioHandle      : THVIO   ) : WORD;
  454.  
  455. Function  VioGetConfig(           Reserved       : WORD;
  456.                               Var VIOConfigInfo  : TVIOConfigInfo;
  457.                                   VioHandle      : THVIO   ) : WORD;
  458.  
  459. Function  VioGetCP(               Reserved       : WORD;
  460.                               Var CodePage       : WORD;
  461.                                   VioHandle      : THVIO   ) : WORD;
  462.  
  463. Function  VioGetCurPos(       Var Row            : WORD;
  464.                               Var Col            : WORD;
  465.                                   VioHandle      : THVIO   ) : WORD;
  466.  
  467. Function  VioGetCurType(      Var VioCursorInfo  : TVIOCursorInfo;
  468.                                   VioHandle      : THVIO   ) : WORD;
  469.  
  470.  
  471. Function  VioGetDeviceCellSize(Var Rows          : WORD;
  472.                               Var Cols           : WORD;
  473.                                   PrSpaceHandle  : THVPS   ) : WORD;
  474.  
  475. Function  VioGetFont(             VIOFontInfo    : PVIOFontInfo;
  476.                                   VioHandle      : THVIO   ) : WORD;
  477.  
  478.  
  479. Function  VioGetMode(         Var VIOModeInfo    : TVioModeInfo;
  480.                                   VioHandle      : THVIO   ) : WORD;
  481.  
  482.  
  483. Function  VioGetOrg(          Var Row            : WORD;
  484.                               Var Col            : WORD;
  485.                                   PrSpaceHandle  : THVPS   ) : WORD;
  486.  
  487.  
  488. Function  VioGetPhysBuf(          VioPhysBuf     : PVioPhysBuf;
  489.                                   Reserved       : WORD    ) : WORD;
  490.  
  491. Function  VioGetState(        Var StateInfo;
  492.                                   VioHandle      : THVIO   ) : WORD;
  493.  
  494.  
  495. Function  VioModeUndo(            RelFlags       : WORD;
  496.                                   TermFlags      : WORD;
  497.                                   VioHandle      : THVIO   ) : WORD;
  498.  
  499. Function  VioModeWait(            EventFlags     : WORD;
  500.                                   NotifyVar      : PUShort;
  501.                                   VioHandle      : THVIO   ) : WORD;
  502.  
  503. Function  VioPopUp(               WaitFlagVar    : PUShort;
  504.                                   VioHandle      : THVIO   ) : WORD;
  505.  
  506. Function  VioPrtSc(               VioHandle      : THVIO   ) : WORD;
  507.  
  508. Function  VioPrtScToggle(         Viohandle      : THVIO   ) : WORD;
  509.  
  510.  
  511. (*
  512. Function  VioQueryFonts(      Var CbMetrics      : LONGINT;
  513.                                   FontMetrics    : PFontMetrics;
  514.                                   MetricsCB      : LONGINT;
  515.                               Var NumFonts       : LONGINT;
  516.                                   Facename       : PChar;
  517.                                   Options        : LONGINT;
  518.                                   PrSpaceHandle  : THVPS   ) : WORD;
  519.  
  520.  
  521. Function  VioQuerySetIds(
  522. *)
  523.  
  524. Function  VioReadCellStr(         Buff           : POINTER;
  525.                               Var BuffLen        : WORD;
  526.                                   Row            : WORD;
  527.                                   Col            : WORD;
  528.                                   VioHandle      : THVIO   ) : WORD;
  529.  
  530. Function  VioReadCharStr(         Buff           : POINTER;
  531.                               Var BuffLen        : WORD;
  532.                                   Row            : WORD;
  533.                                   Col            : WORD;
  534.                                   VioHandle      : THVIO   ) : WORD;
  535.  
  536. {
  537. Function  VioRedrawSize(          CBRedraw       : PCBRedraw ) : WORD;
  538. }
  539.  
  540. Function  VioRegister(            ModuleName     : PCHAR;
  541.                                   EntryName      : PCHAR;
  542.                                   Function1      : LONGINT;
  543.                                   Function2      : LONGINT ) : WORD;
  544.  
  545. Function  VioSavRedrawUndo(       RelFlags       : WORD;
  546.                                   TermFlags      : WORD;
  547.                                   VioHandle      : THVIO   ) : WORD;
  548.  
  549. Function  VioSavRedrawWait(       EventFlags     : WORD;
  550.                                   NotifyVar      : PUShort;
  551.                                   Reserved       : WORD;
  552.                                   VioHandle      : THVIO   ) : WORD;
  553.  
  554.  
  555. Function  VioScrLock(             WaitFlags      : WORD;
  556.                                   NotLockedVar   : PBYTE;
  557.                                   VioHandle      : THVIO   ) : WORD;
  558.  
  559.  
  560. Function  VioScrollDn(            TopRow         : WORD;
  561.                                   LeftCol        : WORD;
  562.                                   BottomRow      : WORD;
  563.                                   RightCol       : WORD;
  564.                                   ScrollCount    : WORD;
  565.                                   CellToWrite    : PCell;
  566.                                   VioHandle      : THVIO   ) : WORD;
  567.  
  568.  
  569. Function  VioScrollLf(            TopRow         : WORD;
  570.                                   LeftCol        : WORD;
  571.                                   BottomRow      : WORD;
  572.                                   RightCol       : WORD;
  573.                                   ScrollCount    : WORD;
  574.                                   CellToWrite    : PCell;
  575.                                   VioHandle      : THVIO   ) : WORD;
  576.  
  577. Function  VioScrollRt(            TopRow         : WORD;
  578.                                   LeftCol        : WORD;
  579.                                   BottomRow      : WORD;
  580.                                   RightCol       : WORD;
  581.                                   ScrollCount    : WORD;
  582.                                   CellToWrite    : PCell;
  583.                                   VioHandle      : THVIO   ) : WORD;
  584.  
  585. Function  VioScrollUp(            TopRow         : WORD;
  586.                                   LeftCol        : WORD;
  587.                                   BottomRow      : WORD;
  588.                                   RightCol       : WORD;
  589.                                   ScrollCount    : WORD;
  590.                                   CellToWrite    : PCell;
  591.                                   VioHandle      : THVIO   ) : WORD;
  592.  
  593.  
  594. Function  VioScrUnLock(           VioHandle      : THVIO   ) : WORD;
  595.  
  596. Function  VioSetAnsi(             AnsiFlag       : WORD;
  597.                                   VioHandle      : THVIO   ) : WORD;
  598.  
  599. Function  VioSetCP(               Reserved       : WORD;
  600.                                   CodePage       : WORD;
  601.                                   VioHandle      : THVIO   ) : WORD;
  602.  
  603. Function  VioSetCurPos(           Row            : WORD;
  604.                                   Col            : WORD;
  605.                                   VioHandle      : THVIO   ) : WORD;
  606.  
  607. Function  VioSetCurType(          VioCursorInfo  : PVioCursorInfo;
  608.                                   VioHandle      : THVIO   ) : WORD;
  609.  
  610. Function  VioSetDeviceCellSize(   Rows           : WORD;
  611.                                   Cols           : WORD;
  612.                                   PrSpaceHandle  : THVPS   ) : WORD;
  613.  
  614. Function  VioSetFont(             VioFontInfo    : PVioFontInfo;
  615.                                   VioHandle      : THVIO   ) : WORD;
  616.  
  617.  
  618. Function  VioSetMode(             VioModeInfo    : PVioModeInfo;
  619.                                   VioHandle      : THVIO   ) : WORD;
  620.  
  621.  
  622. Function  VioSetOrg(              Row            : WORD;
  623.                                   Col            : WORD;
  624.                                   PrSpaceHandle  : THVPS   ) : WORD;
  625.  
  626. Function  VioSetState(            State          : POINTER;
  627.                                   VioHandle      : THVIO   ) : WORD;
  628.  
  629. Function  VioShowBuf(             VidBuffOfs     : WORD;
  630.                                   VidBuffLen     : WORD;
  631.                                   Viohandle      : THVIO   ) : WORD;
  632.  
  633. Function  VioShowPS(              Rows           : WORD;
  634.                                   Cols           : WORD;
  635.                                   Offset         : WORD;
  636.                                   PrSpaceHandle  : THVPS   ) : WORD;
  637.  
  638. Function  VioWrtCellStr(          Buff           : POINTER;
  639.                                   BuffLen        : WORD;
  640.                                   Row            : WORD;
  641.                                   Col            : WORD;
  642.                                   VioHandle      : THVIO   ) : WORD;
  643.  
  644. Function  VioWrtCharStr(          Buff           : POINTER;
  645.                                   BuffLen        : WORD;
  646.                                   Row            : WORD;
  647.                                   Col            : WORD;
  648.                                   VioHandle      : THVIO   ) : WORD;
  649.  
  650.  
  651.  
  652.  
  653. Function  VioWrtCharStrAttr(      Buff           : POINTER;
  654.                                   BuffLen        : WORD;
  655.                                   Row            : WORD;
  656.                                   Col            : WORD;
  657.                                   Attr           : PBYTE;
  658.                                   VioHandle      : THVIO   ) : WORD;
  659.  
  660.  
  661. Function  VioWrtNAttr(            Attr           : PBYTE;
  662.                                   Count          : WORD;
  663.                                   Row            : WORD;
  664.                                   Col            : WORD;
  665.                                   VioHandle      : THVIO   ) : WORD;
  666.  
  667. Function  VioWrtNCell(            Cell           : PCell;
  668.                                   Count          : WORD;
  669.                                   Row            : WORD;
  670.                                   Col            : WORD;
  671.                                   VioHandle      : THVIO   ) : WORD;
  672.  
  673.  
  674. Function  VioWrtNChar(            Char           : PChar;
  675.                                   Count          : WORD;
  676.                                   Row            : WORD;
  677.                                   Col            : WORD;
  678.                                   VioHandle      : THVIO   ) : WORD;
  679.  
  680.  
  681. Function  VioWrtTTY(              Str            : PChar;
  682.                                   StrLen         : WORD;
  683.                                   VioHandle      : THVIO   ) : WORD;
  684.  
  685.  
  686.  
  687. {--------------------------------------------------------------------------}
  688.  
  689. Implementation
  690.  
  691. Function VioAssociate(            HDC            : THDC;
  692.                                   PrSpaceHandle  : THVPS   ) : WORD;
  693.  
  694.   External 'VIOCALLS' Index 55;
  695.  
  696.  
  697. Function VioCheckCharType(        TheType        : PWORD;
  698.                                   Row            : WORD;
  699.                                   COL            : WORD;
  700.                                   VioHandle      : THVIO   ) : WORD;
  701.  
  702.   External 'VIOCALLS' Index 75;
  703.  
  704. Function VioCreateLogFont(        FontAttr       : PFontAttr;
  705.                                   FontLocalID    : LONGINT;
  706.                                   FontName       : PStr8;
  707.                                   PrSpaceHandle  : THVPS   ) : WORD;
  708.  
  709.   External 'VIOCALLS' Index 60;
  710.  
  711.  
  712.  
  713. Function  VioCreatePS(            NewHVPS        : PHVPS;
  714.                                   Rows           : WORD;
  715.                                   Cols           : WORD;
  716.                                   Format         : WORD;
  717.                                   AttrBytes      : WORD;
  718.                                   PrSpaceHandle  : THVPS   ) : WORD;
  719.  
  720.   External 'VIOCALLS' Index 56;
  721.  
  722.  
  723.  
  724. Function  VioDeleteSetID(         LocalID        : LONGINT;
  725.                                   PrSpaceHandle  : THVPS   ) : WORD;
  726.  
  727.  
  728.   External 'VIOCALLS' Index 57;
  729.  
  730.  
  731. Function  VioDeRegister                                      : WORD;
  732.  
  733.  
  734.   External 'VIOCALLS' Index 6;
  735.  
  736.  
  737. Function  VioDestoryPS(           PrSpaceHandle  : THVPS   ) : WORD;
  738.  
  739.  
  740.   External 'VIOCALLS' Index 61;
  741.  
  742.  
  743. Function  VioEndPopUp(            VioHandle      : THVIO   ) : WORD;
  744.  
  745.  
  746.   External 'VIOCALLS' Index 1;
  747.  
  748.  
  749. Function  VioGetAnsi(         Var AnsiFlag       : WORD;
  750.                                   VioHandle      : THVIO   ) : WORD;
  751.  
  752.  
  753.   External 'VIOCALLS' Index 3;
  754.  
  755.  
  756. Function  VioGetBuf(          Var BuffAddr       : POINTER;
  757.                               Var BuffSize       : WORD;
  758.                                   VioHandle      : THVIO   ) : WORD;
  759.  
  760.  
  761.   External 'VIOCALLS' Index 31;
  762.  
  763.  
  764. Function  VioGetConfig(           Reserved       : WORD;
  765.                               Var VIOConfigInfo  : TVIOConfigInfo;
  766.                                   VioHandle      : THVIO   ) : WORD;
  767.  
  768.  
  769.   External 'VIOCALLS' Index 46;
  770.  
  771.  
  772. Function  VioGetCP(               Reserved       : WORD;
  773.                               Var CodePage       : WORD;
  774.                                   VioHandle      : THVIO   ) : WORD;
  775.  
  776.  
  777.   External 'VIOCALLS' Index 40;
  778.  
  779.  
  780. Function  VioGetCurPos(       Var Row            : WORD;
  781.                               Var Col            : WORD;
  782.                                   VioHandle      : THVIO   ) : WORD;
  783.  
  784.  
  785.   External 'VIOCALLS' Index 9;
  786.  
  787.  
  788. Function  VioGetCurType(      Var VioCursorInfo  : TVIOCursorInfo;
  789.                                   VioHandle      : THVIO   ) : WORD;
  790.  
  791.   External 'VIOCALLS' Index 27;
  792.  
  793.  
  794.  
  795.  
  796. Function  VioGetDeviceCellSize(Var Rows          : WORD;
  797.                               Var Cols           : WORD;
  798.                                   PrSpaceHandle  : THVPS   ) : WORD;
  799.  
  800.   External 'VIOCALLS' Index 58;
  801.  
  802.  
  803.  
  804. Function  VioGetFont(             VIOFontInfo    : PVIOFontInfo;
  805.                                   VioHandle      : THVIO   ) : WORD;
  806.  
  807.   External 'VIOCALLS' Index 29;
  808.  
  809.  
  810.  
  811.  
  812. Function  VioGetMode(         Var VIOModeInfo    : TVioModeInfo;
  813.                                   VioHandle      : THVIO   ) : WORD;
  814.  
  815.   External 'VIOCALLS' Index 21;
  816.  
  817.  
  818.  
  819.  
  820. Function  VioGetOrg(          Var Row            : WORD;
  821.                               Var Col            : WORD;
  822.                                   PrSpaceHandle  : THVPS   ) : WORD;
  823.  
  824.   External 'VIOCALLS' Index 59;
  825.  
  826.  
  827.  
  828.  
  829. Function  VioGetPhysBuf(          VioPhysBuf     : PVioPhysBuf;
  830.                                   Reserved       : WORD    ) : WORD;
  831.  
  832.   External 'VIOCALLS' Index 2;
  833.  
  834.  
  835.  
  836. Function  VioGetState(        Var StateInfo;
  837.                                   VioHandle      : THVIO   ) : WORD;
  838.  
  839.   External 'VIOCALLS' Index 49;
  840.  
  841.  
  842.  
  843.  
  844. Function  VioModeUndo(            RelFlags       : WORD;
  845.                                   TermFlags      : WORD;
  846.                                   VioHandle      : THVIO   ) : WORD;
  847.  
  848.   External 'VIOCALLS' Index 35;
  849.  
  850.  
  851.  
  852. Function  VioModeWait(            EventFlags     : WORD;
  853.                                   NotifyVar      : PUShort;
  854.                                   VioHandle      : THVIO   ) : WORD;
  855.  
  856.   External 'VIOCALLS' Index 37;
  857.  
  858.  
  859.  
  860. Function  VioPopUp(               WaitFlagVar    : PUShort;
  861.                                   VioHandle      : THVIO   ) : WORD;
  862.  
  863.   External 'VIOCALLS' Index 11;
  864.  
  865.  
  866.  
  867. Function  VioPrtSc(               VioHandle      : THVIO   ) : WORD;
  868.  
  869.   External 'VIOCALLS' Index 8;
  870.  
  871.  
  872.  
  873. Function  VioPrtScToggle(         Viohandle      : THVIO   ) : WORD;
  874.  
  875.   External 'VIOCALLS' Index 50;
  876.  
  877.  
  878.  
  879.  
  880. (*
  881. Function  VioQueryFonts(      Var CbMetrics      : LONGINT;
  882.                                   FontMetrics    : PFontMetrics;
  883.                                   MetricsCB      : LONGINT;
  884.                               Var NumFonts       : LONGINT;
  885.                                   Facename       : PChar;
  886.                                   Options        : LONGINT;
  887.                                   PrSpaceHandle  : THVPS   ) : WORD;
  888.  
  889.  
  890. Function  VioQuerySetIds(
  891. *)
  892.  
  893. Function  VioReadCellStr(         Buff           : POINTER;
  894.                               Var BuffLen        : WORD;
  895.                                   Row            : WORD;
  896.                                   Col            : WORD;
  897.                                   VioHandle      : THVIO   ) : WORD;
  898.  
  899.   External 'VIOCALLS' Index 24;
  900.  
  901.  
  902.  
  903. Function  VioReadCharStr(         Buff           : POINTER;
  904.                               Var BuffLen        : WORD;
  905.                                   Row            : WORD;
  906.                                   Col            : WORD;
  907.                                   VioHandle      : THVIO   ) : WORD;
  908.  
  909.   External 'VIOCALLS' Index 30;
  910.  
  911.  
  912.  
  913. Function  VioRegister(            ModuleName     : PCHAR;
  914.                                   EntryName      : PCHAR;
  915.                                   Function1      : LONGINT;
  916.                                   Function2      : LONGINT ) : WORD;
  917.  
  918.   External 'VIOCALLS' Index 45;
  919.  
  920.  
  921.  
  922. Function  VioSavRedrawUndo(       RelFlags       : WORD;
  923.                                   TermFlags      : WORD;
  924.                                   VioHandle      : THVIO   ) : WORD;
  925.  
  926.   External 'VIOCALLS' Index 28;
  927.  
  928.  
  929.  
  930. Function  VioSavRedrawWait(       EventFlags     : WORD;
  931.                                   NotifyVar      : PUShort;
  932.                                   Reserved       : WORD;
  933.                                   VioHandle      : THVIO   ) : WORD;
  934.  
  935.   External 'VIOCALLS' Index 25;
  936.  
  937.  
  938.  
  939.  
  940. Function  VioScrLock(             WaitFlags      : WORD;
  941.                                   NotLockedVar   : PBYTE;
  942.                                   VioHandle      : THVIO   ) : WORD;
  943.  
  944.   External 'VIOCALLS' Index 23;
  945.  
  946.  
  947.  
  948.  
  949. Function  VioScrollDn(            TopRow         : WORD;
  950.                                   LeftCol        : WORD;
  951.                                   BottomRow      : WORD;
  952.                                   RightCol       : WORD;
  953.                                   ScrollCount    : WORD;
  954.                                   CellToWrite    : PCell;
  955.                                   VioHandle      : THVIO   ) : WORD;
  956.  
  957.   External 'VIOCALLS' Index 47;
  958.  
  959.  
  960.  
  961. Function  VioScrollLf(            TopRow         : WORD;
  962.                                   LeftCol        : WORD;
  963.                                   BottomRow      : WORD;
  964.                                   RightCol       : WORD;
  965.                                   ScrollCount    : WORD;
  966.                                   CellToWrite    : PCell;
  967.                                   VioHandle      : THVIO   ) : WORD;
  968.  
  969.   External 'VIOCALLS' Index 44;
  970.  
  971.  
  972.  
  973. Function  VioScrollRt(            TopRow         : WORD;
  974.                                   LeftCol        : WORD;
  975.                                   BottomRow      : WORD;
  976.                                   RightCol       : WORD;
  977.                                   ScrollCount    : WORD;
  978.                                   CellToWrite    : PCell;
  979.                                   VioHandle      : THVIO   ) : WORD;
  980.  
  981.   External 'VIOCALLS' Index 12;
  982.  
  983.  
  984.  
  985. Function  VioScrollUp(            TopRow         : WORD;
  986.                                   LeftCol        : WORD;
  987.                                   BottomRow      : WORD;
  988.                                   RightCol       : WORD;
  989.                                   ScrollCount    : WORD;
  990.                                   CellToWrite    : PCell;
  991.                                   VioHandle      : THVIO   ) : WORD;
  992.  
  993.   External 'VIOCALLS' Index 7;
  994.  
  995.  
  996.  
  997.  
  998. Function  VioScrUnLock(           VioHandle      : THVIO   ) : WORD;
  999.  
  1000.   External 'VIOCALLS' Index 18;
  1001.  
  1002.  
  1003.  
  1004. Function  VioSetAnsi(             AnsiFlag       : WORD;
  1005.                                   VioHandle      : THVIO   ) : WORD;
  1006.  
  1007.   External 'VIOCALLS' Index 5;
  1008.  
  1009.  
  1010.  
  1011. Function  VioSetCP(               Reserved       : WORD;
  1012.                                   CodePage       : WORD;
  1013.                                   VioHandle      : THVIO   ) : WORD;
  1014.  
  1015.   External 'VIOCALLS' Index 42;
  1016.  
  1017.  
  1018.  
  1019. Function  VioSetCurPos(           Row            : WORD;
  1020.                                   Col            : WORD;
  1021.                                   VioHandle      : THVIO   ) : WORD;
  1022.  
  1023.   External 'VIOCALLS' Index 15;
  1024.  
  1025.  
  1026.  
  1027. Function  VioSetCurType(          VioCursorInfo  : PVioCursorInfo;
  1028.                                   VioHandle      : THVIO   ) : WORD;
  1029.  
  1030.  
  1031.   External 'VIOCALLS' Index 32;
  1032.  
  1033.  
  1034. Function  VioSetDeviceCellSize(   Rows           : WORD;
  1035.                                   Cols           : WORD;
  1036.                                   PrSpaceHandle  : THVPS   ) : WORD;
  1037.  
  1038.   External 'VIOCALLS' Index 65;
  1039.  
  1040.  
  1041.  
  1042. Function  VioSetFont(             VioFontInfo    : PVioFontInfo;
  1043.                                   VioHandle      : THVIO   ) : WORD;
  1044.  
  1045.   External 'VIOCALLS' Index 33;
  1046.  
  1047.  
  1048.  
  1049.  
  1050. Function  VioSetMode(             VioModeInfo    : PVioModeInfo;
  1051.                                   VioHandle      : THVIO   ) : WORD;
  1052.  
  1053.   External 'VIOCALLS' Index 22;
  1054.  
  1055.  
  1056.  
  1057.  
  1058. Function  VioSetOrg(              Row            : WORD;
  1059.                                   Col            : WORD;
  1060.                                   PrSpaceHandle  : THVPS   ) : WORD;
  1061.  
  1062.  
  1063.   External 'VIOCALLS' Index 63;
  1064.  
  1065.  
  1066. Function  VioSetState(            State          : POINTER;
  1067.                                   VioHandle      : THVIO   ) : WORD;
  1068.  
  1069.   External 'VIOCALLS' Index 51;
  1070.  
  1071.  
  1072.  
  1073. Function  VioShowBuf(             VidBuffOfs     : WORD;
  1074.                                   VidBuffLen     : WORD;
  1075.                                   Viohandle      : THVIO   ) : WORD;
  1076.  
  1077.   External 'VIOCALLS' Index 43;
  1078.  
  1079.  
  1080.  
  1081. Function  VioShowPS(              Rows           : WORD;
  1082.                                   Cols           : WORD;
  1083.                                   Offset         : WORD;
  1084.                                   PrSpaceHandle  : THVPS   ) : WORD;
  1085.  
  1086.   External 'VIOCALLS' Index 66;
  1087.  
  1088.  
  1089.  
  1090. Function  VioWrtCellStr(          Buff           : POINTER;
  1091.                                   BuffLen        : WORD;
  1092.                                   Row            : WORD;
  1093.                                   Col            : WORD;
  1094.                                   VioHandle      : THVIO   ) : WORD;
  1095.  
  1096.   External 'VIOCALLS' Index 10;
  1097.  
  1098.  
  1099.  
  1100. Function  VioWrtCharStr(          Buff           : POINTER;
  1101.                                   BuffLen        : WORD;
  1102.                                   Row            : WORD;
  1103.                                   Col            : WORD;
  1104.                                   VioHandle      : THVIO   ) : WORD;
  1105.  
  1106.   External 'VIOCALLS' Index 13;
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113. Function  VioWrtCharStrAttr(      Buff           : POINTER;
  1114.                                   BuffLen        : WORD;
  1115.                                   Row            : WORD;
  1116.                                   Col            : WORD;
  1117.                                   Attr           : PBYTE;
  1118.                                   VioHandle      : THVIO   ) : WORD;
  1119.  
  1120.   External 'VIOCALLS' Index 48;
  1121.  
  1122.  
  1123.  
  1124.  
  1125. Function  VioWrtNAttr(            Attr           : PBYTE;
  1126.                                   Count          : WORD;
  1127.                                   Row            : WORD;
  1128.                                   Col            : WORD;
  1129.                                   VioHandle      : THVIO   ) : WORD;
  1130.  
  1131.   External 'VIOCALLS' Index 26;
  1132.  
  1133.  
  1134.  
  1135. Function  VioWrtNCell(             Cell           : PCell;
  1136.                                   Count          : WORD;
  1137.                                   Row            : WORD;
  1138.                                   Col            : WORD;
  1139.                                   VioHandle      : THVIO   ) : WORD;
  1140.  
  1141.  
  1142.   External 'VIOCALLS' Index 52;
  1143.  
  1144.  
  1145.  
  1146. Function  VioWrtNChar(            Char           : PChar;
  1147.                                   Count          : WORD;
  1148.                                   Row            : WORD;
  1149.                                   Col            : WORD;
  1150.                                   VioHandle      : THVIO   ) : WORD;
  1151.  
  1152.   External 'VIOCALLS' Index 53;
  1153.  
  1154.  
  1155.  
  1156.  
  1157. Function  VioWrtTTY(              Str            : PChar;
  1158.                                   StrLen         : WORD;
  1159.                                   VioHandle      : THVIO   ) : WORD;
  1160.  
  1161.  
  1162.  
  1163.   External 'VIOCALLS' Index 19;
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170. {--------------------------------------------------------------------------}
  1171. {--------------------------------------------------------------------------}
  1172. {--------------------------------------------------------------------------}
  1173.  
  1174. BEGIN
  1175.  
  1176. END.
  1177.