home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bpos2tv.zip / BSESUB.PAS < prev    next >
Pascal/Delphi Source File  |  1994-02-04  |  54KB  |  1,373 lines

  1. {| Unit: BseSub
  2.  | Version: 1.00
  3.  | translated from file BseSub.H
  4.  | Original translation: Peter Sawatzki (ps)
  5.  | Contributing:
  6.  |   (fill in)
  7.  |
  8.  | change history:
  9.  | Date:    Ver: Author:
  10.  | 11/23/93 1.00 ps     original translation by ps
  11. }
  12. Unit BseSub; { OS/2 Base Include File }
  13. Interface
  14. Uses
  15.   Os2Def;
  16. Type
  17.   HKBD  = SHANDLE;
  18.   pHKBD = ^HKBD;
  19.  
  20. {**   KbdRegister - register keyboard subsystem within a session }
  21.  
  22.   Function KbdRegister (pszModName,                         { dynamic link module name }
  23.                         pszEntryPt: PSZ;                    { entry point name }
  24.                         FunMask: ULONG): USHORT;    { function mask of functions being registered }
  25.  
  26.  
  27. Const
  28.   KR_KBDCHARIN                     =  $00000001 ;
  29.   KR_KBDPEEK                       =  $00000002 ;
  30.   KR_KBDFLUSHBUFFER                =  $00000004 ;
  31.   KR_KBDGETSTATUS                  =  $00000008 ;
  32.   KR_KBDSETSTATUS                  =  $00000010 ;
  33.   KR_KBDSTRINGIN                   =  $00000020 ;
  34.   KR_KBDOPEN                       =  $00000040 ;
  35.   KR_KBDCLOSE                      =  $00000080 ;
  36.   KR_KBDGETFOCUS                   =  $00000100 ;
  37.   KR_KBDFREEFOCUS                  =  $00000200 ;
  38.   KR_KBDGETCP                      =  $00000400 ;
  39.   KR_KBDSETCP                      =  $00000800 ;
  40.   KR_KBDXLATE                      =  $00001000 ;
  41.   KR_KBDSETCUSTXT                  =  $00002000 ;
  42.  
  43.   IO_WAIT                          = 0;
  44.   IO_NOWAIT                        = 1;
  45.  
  46.  
  47. {**   KbdDeRegister - Deregister keyboard subsytem
  48.  *
  49.  *     Deregisters a keyboard subsystem previously registered within a session.
  50.  *     Only the process that issued the KbdRegister may issue KbdDeRegister.
  51.  *
  52.  }
  53.  
  54.   Function KbdDeRegister: USHORT;
  55.  
  56. { KBDKEYINFO structure, for KbdCharIn and KbdPeek                      }
  57.  
  58.  
  59. Type
  60.   KBDKEYINFO = Record
  61.     chChar,                             { ASCII character code }
  62.     chScan,                             { Scan Code }
  63.     fbStatus,                           { State of the character }
  64.     bNlsShift: UCHAR;                   { Reserved (must equal 0) }
  65.     fsState: USHORT;                    { state of the shift keys }
  66.     time: ULONG                         { time stamp of key stroke (ms since ipl) }
  67.   End;
  68.   pKBDKEYINFO = ^KBDKEYINFO;
  69.  
  70.  
  71. {**   KbdCharIn - Read character, Scan code                            }
  72.  
  73.   Function KbdCharIn (pkbci: PKBDKEYINFO;                   { structure indicated just above }
  74.                       fWait: USHORT;                        { 0=wait for character, 1=no wait 2}
  75.                       hkbd: HKBD): USHORT;      { keyboard handle                      }
  76.  
  77.  
  78. {**   KbdPeek - Peek at character, scan code
  79.  *
  80.  *     Returns the character data record, if available, from the keyboard
  81.  *     without removing it from the buffer.
  82.  *
  83.  }
  84.  
  85.   Function KbdPeek (pkbci: PKBDKEYINFO;                     { structure indicated just above }
  86.                     hkbd: HKBD): USHORT;    { keyboard handle                      }
  87.  
  88. { structure for KbdStringIn }
  89.  
  90.  
  91. Type
  92.   STRINGINBUF = Record
  93.     cb,                                 { input buffer length }
  94.     cchIn: USHORT                       { received input length }
  95.   End;
  96.   pSTRINGINBUF = ^STRINGINBUF;
  97.  
  98.  
  99. {**   KbdStringIn - Read character string
  100.  *
  101.  *     Reads a character string
  102.  *
  103.  }
  104.  
  105.   Function KbdStringIn (pch: PCH;                           { buffer for the character string }
  106.                         pchIn: PSTRINGINBUF;                { structure indicated just above }
  107.                         fsWait: USHORT;                     { indicated if wait for character }
  108.                         hkbd: HKBD): USHORT;  { keyboard handle                      }
  109.  
  110.  
  111. {**   KbdFlushBuffer - Flush key stroke buffer
  112.  *
  113.  *     clears the key stroke buffer
  114.  *
  115.  }
  116.  
  117.   Function KbdFlushBuffer (hkbd: HKBD): USHORT;             { keyboard handle                      }
  118.  
  119. { KBDINFO structure, for KbdSet/GetStatus }
  120.  
  121. Type
  122.   KBDINFO = Record
  123.     cb,                                 { length in bytes of this structure }
  124.     fsMask,                             { bit mask of functions to be altered }
  125.     chTurnAround,                       { define TurnAround character }
  126.     fsInterim,                          { interim character flags }
  127.     fsState: USHORT                     { shift states }
  128.   End;
  129.   pKBDINFO = ^KBDINFO;
  130.  
  131.  
  132. {**   KbdSetStatus - Set keyboard status
  133.  *
  134.  *     Sets the characteristics of the keyboard
  135.  *
  136.  }
  137.  
  138.   Function KbdSetStatus (pkbdinfo: PKBDINFO;                { data structure indicated above }
  139.                          hkbd: HKBD): USHORT;     { keyboard handle                      }
  140.  
  141.  
  142. {**   KbdGetStatus - Get keyboard status
  143.  *
  144.  *      Gets the current state of the keyboard.
  145.  *
  146.  }
  147.  
  148.   Function KbdGetStatus (pkbdinfo: PKBDINFO;                { data structure indicated above }
  149.                          hdbd: HKBD): USHORT;    { keyboard handle                      }
  150.  
  151.  
  152. {**   KbdSetCp - Set the code page
  153.  *
  154.  *     Allows the process to set the code page used to translate key strokes
  155.  *     received from the keyboard.
  156.  *
  157.  }
  158.  
  159.   Function KbdSetCp (usReserved,                            { reserved (set to 0) }
  160.                      pidCP: USHORT;                         { code page ID }
  161.                      hdbd: HKBD): USHORT;         { keyboard handle                      }
  162.  
  163.  
  164. {**   KbdGetCp - Get loaded code page ID's
  165.  *
  166.  *     Allows a process to query the code page currently in use to translate
  167.  *     scan codes to ASCII characters.
  168.  *
  169.  }
  170.  
  171.   Function KbdGetCp (ulReserved: ULONG;                     { reserved (set to 0) }
  172.                      pidCP: PUSHORT;                        { code page ID }
  173.                      hkbd: HKBD): USHORT;        { keyboard handle                      }
  174.  
  175.  
  176. {**   KbdOpen - Open a logical Keyboard
  177.  *
  178.  *     Creates a new logical keyboard.
  179.  *
  180.  }
  181.  
  182.   Function KbdOpen (phkbd: PHKBD): USHORT;           { keyboard handle                      }
  183.  
  184.  
  185. {**   Kbdclose - Close a logical keyboard
  186.  *
  187.  *     Ends the existing logical keyboard identified by the keyboard handle.
  188.  *
  189.  }
  190.  
  191.   Function KbdClose (hkbd: HKBD): USHORT;              { keyboard handle                     }
  192.  
  193.  
  194. {**   KbdGetFocus - Get keyboard focus
  195.  *
  196.  *     Binds the logical keyboard to the physical keyboard.
  197.  *
  198.  }
  199.  
  200.   Function KbdGetFocus (fWait: USHORT;                      { indicate if wait }
  201.                         hkbd: HKBD): USHORT;          { keyboard handle                      }
  202.  
  203.  
  204. {**   KbdFreeFocus - Free keyboard focus
  205.  *
  206.  *     Frees the logical to physical keyboard bond created by KbdGetFocus.
  207.  *
  208.  }
  209.  
  210.   Function KbdFreeFocus (hkbd: HKBD): USHORT;             { Keyboard handle                      }
  211.  
  212.  
  213. {**   KbdSynch - Synchronize keyboard access
  214.  *
  215.  *     Synchronizes access for a keyboard subsystem to the keyboard device
  216.  *     driver.
  217.  *
  218.  }
  219.  
  220.   Function KbdSynch (fsWait: USHORT): USHORT;   { indicate if wait for access to the device driver}
  221.  
  222. {** KbdSetFgnd - Set foreground keyboard priority
  223.  *
  224.  *   Raises the priority of the foreground keyboard's thread.
  225.  *
  226.  }
  227.  
  228.   Function KbdSetFgnd: USHORT;
  229.  
  230.  
  231. { structure for KbdGetHWID}
  232.  
  233. Type
  234.   KBDHWID = Record                      { kbhw }
  235.     cb,                                 { length in byte of the structure }
  236.     idKbd,                              { attached keyboard's hardware id }
  237.     usReserved1,                        { reserved (set to 0) }
  238.     usReserved2: USHORT                 { reserved (set to 0) }
  239.   End;
  240.   pKBDHWID = ^KBDHWID;
  241.  
  242. {** KbdGetHWID - Get Keyboard Hardware ID
  243.  *
  244.  *   Returns the attached keyboards hardware generated inentification value
  245.  *
  246.  }
  247.   Function KbdGetHWID (pkbdhwid: PKBDHWID;                  { Keyboard ID structure (returned) }
  248.                        hkbd: HKBD): USHORT;                     { keyboard handle                  }
  249.  
  250. { structure for KbdXlate }
  251.  
  252. Type
  253.   KBDTRANS = Record
  254.     chChar,                             { ASCII character code }
  255.     chScan,                             { scan code }
  256.     fbStatus,                           { State of the character }
  257.     bNlsShift: UCHAR;                   { shift status (reserved set to 0) }
  258.     fsState: USHORT;                    { shift state }
  259.     time: ULONG;
  260.     fsDD,
  261.     fsXlate,
  262.     fsShift,
  263.     sZero: USHORT
  264.   End;
  265.   pKBDTRANS = ^KBDTRANS;
  266.  
  267.  
  268. {**   KbdXlate - Translate scan code
  269.  *
  270.  *     Translates scan code and shift states into ASCII code.
  271.  *
  272.  }
  273.  
  274.   Function KbdXlate (pkbdtrans: PKBDTRANS;                  { Translation record (format as above) }
  275.                      hkbd: HKBD): USHORT;      { keyboard handle                      }
  276.  
  277.  
  278. {**   KbdSetCustXt - Set custom code page
  279.  *
  280.  *     Installs on the specified handle the code page pointed to in this call.
  281.  *     This code page will affect only this handle.
  282.  *
  283.  }
  284.  
  285.   Function KbdSetCustXt (usCodePage: PUSHORT;               { Translation table }
  286.                          hkbd: HKBD): USHORT;        { keyboard handle                      }
  287.  
  288. Type
  289.   HVIO = SHANDLE;
  290.   pHVIO = ^HVIO;
  291.  
  292. { first parameter registration constants }
  293.  
  294. Const
  295.   VR_VIOGETCURPOS         =  $00000001 ;
  296.   VR_VIOGETCURTYPE                 =  $00000002 ;
  297.   VR_VIOGETMODE                    =  $00000004 ;
  298.   VR_VIOGETBUF                     =  $00000008 ;
  299.   VR_VIOGETPHYSBUF                 =  $00000010 ;
  300.   VR_VIOSETCURPOS                  =  $00000020 ;
  301.   VR_VIOSETCURTYPE                 =  $00000040 ;
  302.   VR_VIOSETMODE                    =  $00000080 ;
  303.   VR_VIOSHOWBUF                    =  $00000100 ;
  304.   VR_VIOREADCHARSTR                =  $00000200 ;
  305.   VR_VIOREADCELLSTR                =  $00000400 ;
  306.   VR_VIOWRTNCHAR                   =  $00000800 ;
  307.   VR_VIOWRTNATTR                   =  $00001000 ;
  308.   VR_VIOWRTNCELL                   =  $00002000 ;
  309.   VR_VIOWRTTTY                     =  $00004000 ;
  310.   VR_VIOWRTCHARSTR                 =  $00008000 ;
  311.  
  312.   VR_VIOWRTCHARSTRATT              =  $00010000 ;
  313.   VR_VIOWRTCELLSTR                 =  $00020000 ;
  314.   VR_VIOSCROLLUP                   =  $00040000 ;
  315.   VR_VIOSCROLLDN                   =  $00080000 ;
  316.   VR_VIOSCROLLLF                   =  $00100000 ;
  317.   VR_VIOSCROLLRT                   =  $00200000 ;
  318.   VR_VIOSETANSI                    =  $00400000 ;
  319.   VR_VIOGETANSI                    =  $00800000 ;
  320.   VR_VIOPRTSC                      =  $01000000 ;
  321.   VR_VIOSCRLOCK                    =  $02000000 ;
  322.   VR_VIOSCRUNLOCK                  =  $04000000 ;
  323.   VR_VIOSAVREDRAWWAIT              =  $08000000 ;
  324.   VR_VIOSAVREDRAWUNDO              =  $10000000 ;
  325.   VR_VIOPOPUP                      =  $20000000 ;
  326.   VR_VIOENDPOPUP                   =  $40000000 ;
  327.   VR_VIOPRTSCTOGGLE                =  $80000000 ;
  328.  
  329. { second parameter registration constants }
  330.   VR_VIOMODEWAIT                   =  $00000001 ;
  331.   VR_VIOMODEUNDO                   =  $00000002 ;
  332.   VR_VIOGETFONT                    =  $00000004 ;
  333.   VR_VIOGETCONFIG                  =  $00000008 ;
  334.   VR_VIOSETCP                      =  $00000010 ;
  335.   VR_VIOGETCP                      =  $00000020 ;
  336.   VR_VIOSETFONT                    =  $00000040 ;
  337.   VR_VIOGETSTATE                   =  $00000080 ;
  338.   VR_VIOSETSTATE                   =  $00000100 ;
  339.  
  340.  
  341. {**   VioRegister - Register video subsystem
  342.  *
  343.  *     Registers an alternate video subsystem within a session.
  344.  *
  345.  }
  346.  
  347.   Function VioRegister (pszModName,                         { dynamic link module name }
  348.                         pszEntryName: PSZ;                  { entry point name }
  349.                         flFun1,                             { bit mask (each bit id's a video function }
  350.                         flFun2: ULONG): USHORT;         { bit mask (each bit id's a video function }
  351.  
  352. {**   VioDeRegister - DeRegister video subsystem
  353.  *
  354.  *     Deregisters a video subsystem previously registered within a session.
  355.  *     VioDeRegister must be issued by the same process that issued the
  356.  *     previous VioRegister. After VioDeRegister is issued, subsequent video
  357.  *     calls are processed by the base video subsystem.
  358.  *
  359.  }
  360.  
  361.   Function VioDeRegister: USHORT;
  362.  
  363.  
  364. {**   VioGlobalReg - Register video subsystem for all fullscreen sessions
  365.  *
  366.  *     Registers an alternate video subsystem for all fullscreen sessions.
  367.  *
  368.  }
  369.  
  370.   Function VioGlobalReg (pszModName,                        { dynamic link module name }
  371.                          pszEntryName: PSZ;                 { entry point name }
  372.                          flFun1,                            { bit mask (each bit id's a video function }
  373.                          flFun2: ULONG;                     { bit mask (each bit id's a video function }
  374.                          viorsvd: LongInt): USHORT;          { reserved, must be 0                      }
  375.  
  376. {**   VioGetBuf - Get Logical video buffer address
  377.  *
  378.  *     VioGetBuf returns the address of the logical video buffer
  379.  *
  380.  }
  381.  
  382.   Function VioGetBuf (pLVB: PULONG;                         { pointer to logical video buffer }
  383.                       pcbLVB: PUSHORT;                      { length of buffer }
  384.                       hvio: HVIO): USHORT;       { vio handle                           }
  385.  
  386.  
  387. {**   VioGetCurPos - Get cursor position
  388.  *
  389.  *     Returns the cursor position.
  390.  *
  391.  }
  392.  
  393.   Function VioGetCurPos (pusRow,                            { Current row position of cursor }
  394.                          pusColumn: PUSHORT;                { current column position of cursor }
  395.                          hvio: HVIO): USHORT;      { vio handle                           }
  396.  
  397.  
  398. {**   VioSetCurPos - Set cursor position
  399.  *
  400.  *     Sets the cursor position.
  401.  *
  402.  }
  403.  
  404.   Function VioSetCurPos (usRow,                             { new cursor row position }
  405.                          usColumn: USHORT;                  { new cursor column position }
  406.                          hvio: HVIO): USHORT;          { video handle                         }
  407.  
  408. { structure for VioSet/GetCurType }
  409.  
  410. Type
  411.   VIOCURSORINFO = Record
  412.     yStart,                             { cursor start line }
  413.     cEnd,                               { cursor end line }
  414.     cx,                                 { cursor width }
  415.     attr: USHORT                        { -1=hidden cursor, any other=normal cursor }
  416.   End;
  417.   pVIOCURSORINFO = ^VIOCURSORINFO;
  418.  
  419.  
  420. {**   VioGetCurType - Get cursor type
  421.  *
  422.  *     Returns the cursor type.
  423.  *
  424.  }
  425.  
  426.   Function VioGetCurType (pvioCursorInfo: PVIOCURSORINFO;   { structure indicated above (returned) }
  427.                           hvio: HVIO): USHORT;         { Vio handle                           }
  428.  
  429.  
  430. {**   VioSetCurType - Set the cursor type
  431.  *
  432.  *     Sets the cursor type
  433.  *
  434.  }
  435.  
  436.   Function VioSetCurType (pvioCursorInfo: PVIOCURSORINFO;   { structure indicated just above }
  437.                           hvio: HVIO): USHORT;         { video handle                   }
  438.  
  439. { structure for VioSet/GetMode }
  440.  
  441. Type
  442.   VIOMODEINFO = Record
  443.     cb: USHORT;                         { length of the entire data structure }
  444.     fbType,                             { bit mask of mode being set }
  445.     color: UCHAR;                       { number of colors (power of 2) }
  446.     col,                                { number of text columns }
  447.     row,                                { number of text rows }
  448.     hres,                               { horizontal resolution }
  449.     vres: USHORT;                       { vertical resolution }
  450.     fmt_ID,                             { attribute format }
  451.     attrib: UCHAR;                      { number of attributes }
  452.     buf_addr,
  453.     buf_length,
  454.     full_length,
  455.     partial_length: ULONG;
  456.     ext_data_addr: PCH
  457.   End;
  458.   pVIOMODEINFO = ^VIOMODEINFO;
  459.  
  460.  
  461. Const
  462.   VGMT_OTHER              =  $01;
  463.   VGMT_GRAPHICS                    =  $02;
  464.   VGMT_DISABLEBURST                =  $04;
  465.  
  466.  
  467. {**   VioGetMode - Get display mode                                    }
  468.  
  469.   Function VioGetMode (pvioModeInfo: PVIOMODEINFO;          { structure defined above (returned) }
  470.                        hvio: HVIO): USHORT;         { vio handle                           }
  471.  
  472.  
  473. {**   VioSetMode - Set display mode                                    }
  474.  
  475.   Function VioSetMode (pvioModeInfo: PVIOMODEINFO;          { structure defined just above }
  476.                        hvio: HVIO): USHORT;         { video handle                    }
  477.  
  478. { structure for VioGetPhysBuf }
  479.  
  480.  
  481. Type
  482.   VIOPHYSBUF = Record
  483.     pBuf: PBYTE;                        { Buffer start address }
  484.     cb: ULONG;                          { buffer length }
  485.     asel: Array[0..0] Of SEL            { selector list }
  486.   End;
  487.   pVIOPHYSBUF = ^VIOPHYSBUF;
  488.  
  489.  
  490. {**   VioGetPhysBuf - Get physical display buffer
  491.  *
  492.  *     Gets addressability to the physical display buffer.
  493.  *
  494.  }
  495.  
  496.   Function VioGetPhysBuf (pvioPhysBuf: PVIOPHYSBUF;         { Data structure defined above }
  497.                           usReserved: USHORT): USHORT;  { reserved (must be 0)               }
  498.  
  499.  
  500. {**   VioReadCelStr - Read char/attr string
  501.  *
  502.  *     Reads a string of character-attribute pairs
  503.  *     starting at the specified location.
  504.  *
  505.  }
  506.  
  507.   Function VioReadCellStr (pchCellStr: PCH;                 { Cell string buffer }
  508.                            pcb: PUSHORT;                    { length of cell string buffer }
  509.                            usRow,                           { starting row location }
  510.                            usColumn: USHORT;                { starting column location }
  511.                            hvio: HVIO): USHORT;       { video handle                         }
  512.  
  513.  
  514. {**   VioReadCharStr - Read character string
  515.  *
  516.  *     Reads a character string from the display starting at the specified
  517.  *     location.
  518.  *
  519.  }
  520.  
  521.   Function VioReadCharStr (pchCellStr: PCH;                 { character buffer }
  522.                            pcb: PUSHORT;                    { length of buffer }
  523.                            usRow,                           { starting row location }
  524.                            usColumn: USHORT;                { starting column location }
  525.                            hvio: HVIO): USHORT;       { video handle                         }
  526.  
  527.  
  528. {**   VioWrtCellStr - Write char/attr string
  529.  *
  530.  *     Writes a string of character-attribute pairs
  531.  *
  532.  }
  533.  
  534.   Function VioWrtCellStr (pchCellStr: PCH;                  { string to be written }
  535.                           cb,                               { length of string }
  536.                           usRow,                            { starting row position for output }
  537.                           usColumn: USHORT;                 { starting column position for output }
  538.                           hvio: HVIO): USHORT;        { video handle                         }
  539.  
  540.  
  541. {**   VioWrtCharStr - Write character string to display                }
  542.  
  543.   Function VioWrtCharStr (pchStr: PCH;                      { string to be written }
  544.                           cb,                               { length of string }
  545.                           usRow,                            { starting row position for output }
  546.                           usColumn: USHORT;                 { starting column position for output }
  547.                           hvio: HVIO): USHORT;        { video handle                         }
  548.  
  549.  
  550. {**   VioScrollDn - Scroll screen down
  551.  *
  552.  *     Scrolls the entire display buffer
  553.  *     buffer) down.
  554.  *
  555.  }
  556.  
  557.   Function VioScrollDn (usTopRow,                           { Top row of the area to scroll }
  558.                         usLeftCol,                          { left column of the area to scroll }
  559.                         usBotRow,                           { bottom row of the area to scroll }
  560.                         usRightCol,                         { right column of the area to scroll }
  561.                         cbLines: USHORT;                    { number of lines to be inserted at top of screen }
  562.                         pCell: PBYTE;                       { fill character on inserted lines }
  563.                         hvio: HVIO): USHORT;     { video handle                                   }
  564.  
  565.  
  566.  
  567. {**   VioScrollUp - Scroll screen up                                   }
  568.  
  569.   Function VioScrollUp (usTopRow,                           { Top row of the area to scroll }
  570.                         usLeftCol,                          { left column of the area to scroll }
  571.                         usBotRow,                           { bottom row of the area to scroll }
  572.                         usRightCol,                         { right column of the area to scroll }
  573.                         cbLines: USHORT;                    { number of lines to be inserted at bottom of screen }
  574.                         pCell: PBYTE;                       { fill character on inserted lines }
  575.                         hvio: HVIO): USHORT;         { video handle                               }
  576.  
  577.  
  578. {**   VioScrollLf - Scroll screen left                                       }
  579.  
  580.   Function VioScrollLf (usTopRow,                           { Top row of the area to scroll }
  581.                         usLeftCol,                          { left column of the area to scroll }
  582.                         usBotRow,                           { bottom row of the area to scroll }
  583.                         usRightCol,                         { right column of the area to scroll }
  584.                         cbCol: USHORT;                      { number of columns to be inserted at right of screen }
  585.                         pCell: PBYTE;                       { fill character on inserted lines }
  586.                         hvio: HVIO): USHORT;         { video handle                               }
  587.  
  588.  
  589. {**   VioScrollRt - Scroll screen right                                      }
  590.  
  591.   Function VioScrollRt (usTopRow,                           { Top row of the area to scroll }
  592.                         usLeftCol,                          { left column of the area to scroll }
  593.                         usBotRow,                           { bottom row of the area to scroll }
  594.                         usRightCol,                         { right column of the area to scroll }
  595.                         cbCol: USHORT;                      { number of columns to be inserted at left of screen }
  596.                         pCell: PBYTE;                       { fill character on inserted lines }
  597.                         hvio: HVIO): USHORT;           { video handle                             }
  598.  
  599.  
  600. {**   VioWrtNAttr - Write n attributes
  601.  *
  602.  *     Writes an attribute to the display a specified number of times.
  603.  *
  604.  }
  605.  
  606.   Function VioWrtNAttr (pAttr: PBYTE;                       { Attribute to be written }
  607.                         cb,                                 { repeat count }
  608.                         usRow,                              { starting row position for output }
  609.                         usColumn: USHORT;                   { starting column postion for output }
  610.                         hvio: HVIO): USHORT;       { video handle                         }
  611.  
  612.  
  613. {**   VioWrtNCell - Write n char/attr
  614.  *
  615.  *     Writes a cell
  616.  *     number of times.
  617.  *
  618.  }
  619.  
  620.   Function VioWrtNCell (pCell: PBYTE;                       { cell to be written }
  621.                         cb,                                 { repeat count }
  622.                         usRow,                              { starting row position for output }
  623.                         usColumn: USHORT;                   { starting column postion for output }
  624.                         hvio: HVIO): USHORT;         { video handle                         }
  625.  
  626.  
  627. {**   VioWrtNChar - Write a character to the display a specified number of
  628.  *                   times
  629.  }
  630.  
  631.   Function VioWrtNChar (pchChar: PCH;                       { character to be written }
  632.                         cb,                                 { repeat count }
  633.                         usRow,                              { starting row position for output }
  634.                         usColumn: USHORT;                   { starting column postion for output }
  635.                         hvio: HVIO): USHORT;         { video handle                         }
  636.  
  637.  
  638. {**   VioWrtTTY - Write TTY string
  639.  *
  640.  *     Writes a character string to the display starting at the current cursor
  641.  *     position. At the completion of the write, the cursor is positioned at the
  642.  *     first position beyond the end of the string
  643.  *
  644.  }
  645.  
  646.   Function VioWrtTTY (pch: PCH;                             { String to be written }
  647.                       cb: USHORT;                           { length of string }
  648.                       hvio: HVIO): USHORT;         { video handle                         }
  649.  
  650.  
  651. {**   VioWrtCharStrAtt - Write character string with repeated attribute to the
  652.  *                        display.
  653.  }
  654.  
  655.   Function VioWrtCharStrAtt (pch: PCH;                      { string to be written }
  656.                              cb,                            { length of string }
  657.                              usRow,                         { starting row position for output }
  658.                              usColumn: USHORT;              { starting column position for output }
  659.                              pAttr: PBYTE;                  { attribute to be replicated }
  660.                              hvio: HVIO): USHORT;      { video handle                         }
  661.  
  662.  
  663. {**   VioShowBuf - updates the physical display buffer with the logical video
  664.  *                  buffer.
  665.  }
  666.  
  667.   Function VioShowBuf (offLVB,                              { offset into the logical video buffer }
  668.                        cb: USHORT;                          { length of the area to be updated to the screen }
  669.                        hvio: HVIO): USHORT;   { video handle                                   }
  670.  
  671.  
  672.  
  673. Const
  674.   ANSI_ON                 = 1;
  675.   ANSI_OFF                         = 0;
  676.  
  677.  
  678. {**   VioSetAnsi - Activates or deactivates ansi support               }
  679.  
  680.   Function VioSetAnsi (fAnsi: USHORT;                       { 0=deactivate ansi, 1=activate ansi }
  681.                        hvio: HVIO): USHORT;        { video handle                         }
  682.  
  683.  
  684. {**   VioGetAnsi - Get the ansi On/Off status                          }
  685.  
  686.   Function VioGetAnsi (pfAnsi: PUSHORT;                     { 0=ansi inactive, 1=ansi active }
  687.                        hvio: HVIO): USHORT;        { vio handle                           }
  688.  
  689.  
  690. {**   VioPrtSc - Copies the screen to the printer                      }
  691.  
  692.   Function VioPrtSc (hvio: HVIO): USHORT;             { vio handle                           }
  693.  
  694.  
  695. {**   VioPrtScToggle - Toggle print screen
  696.  *
  697.  *     Called by the session manager when the operator presses Ctrl_PrtSc.
  698.  *
  699.  }
  700.  
  701.   Function VioPrtScToggle (hvio: HVIO): USHORT;             { vio handle                           }
  702.  
  703.  
  704. Const
  705.   VSRWI_SAVEANDREDRAW     = 0;
  706.   VSRWI_REDRAW                     = 1;
  707.  
  708.   VSRWN_SAVE                       = 0;
  709.   VSRWN_REDRAW                     = 1;
  710.  
  711.   UNDOI_GETOWNER                   = 0;
  712.   UNDOI_RELEASEOWNER               = 1;
  713.  
  714.   UNDOK_ERRORCODE                  = 0;
  715.   UNDOK_TERMINATE                  = 1;
  716.  
  717.  
  718. {**   VioSavRedrawWait - Screen save redraw wait
  719.  *
  720.  *     Notifies a graphics mode application when it must save or redraw its
  721.  *     screen image. The return from this function call provides the
  722.  *     notification. The thread that issues the call performs the save or redraw
  723.  *     and then re-issues VioSavRedrawWait to wait until its screen image must
  724.  *     be saved or redrawn again.
  725.  *
  726.  }
  727.  
  728.   Function VioSavRedrawWait (usRedrawInd: USHORT;           { 0=Save and redraw, 1=redraw only }
  729.                              pNotifyType: PUSHORT;          { 0=save screen image, 1=restore screen image }
  730.                              usReserved: USHORT): USHORT;  { video handle (must be zero )                }
  731.  
  732.  
  733. {**   VioSavRedrawUndo - Screen save redraw undo
  734.  *
  735.  *     Allows one thread within a process to cancel a VioSavRedrawWait issued by
  736.  *     another thread within the same process.
  737.  *
  738.  }
  739.  
  740.   Function VioSavRedrawUndo (usOwnerInd,                    { 0=reserve ownership, 1=give up ownership }
  741.                              usKillInd,                     { 0=return error code, 1=terminate thread }
  742.                              usReserved: USHORT): USHORT;  { video handle (must be zero)              }
  743.  
  744.  
  745. Const
  746.   VMWR_POPUP              = 0;
  747.   VMWN_POPUP                       = 0;
  748.  
  749.  
  750. {**   VioModeWait - Restore mode wait
  751.  *
  752.  *     Allows a graphics mode application to be notified when it must restore
  753.  *     its video mode, state, and modified display adapter registers. The return
  754.  *     from this function call provides the notification.
  755.  *
  756.  }
  757.  
  758.   Function VioModeWait (usReqType: USHORT;                  { request type }
  759.                         pNotifyType: PUSHORT;               { notify type (returned) }
  760.                         usReserved: USHORT): USHORT;  { reserved (must be 0)                 }
  761.  
  762.  
  763. {**   VioModeUndo - Restore mode undo
  764.  *
  765.  *     Allows one thread within a process to cancel a VioModeWait issued by
  766.  *     another thread within the same process.
  767.  *
  768.  }
  769.  
  770.   Function VioModeUndo (usOwnerInd,                         { 0=reserve ownership, 1=give up ownership }
  771.                         usKillInd,                          { 0=return error code, 1=terminate thread }
  772.                         usReserved: USHORT): USHORT;  { video handle                             }
  773.  
  774.  
  775. Const
  776.   LOCKIO_NOWAIT           = 0;
  777.   LOCKIO_WAIT                      = 1;
  778.  
  779.   LOCK_SUCCESS                     = 0;
  780.   LOCK_FAIL                        = 1;
  781.  
  782.  
  783. {**   VioScrLock - Lock screen - requests ownership of
  784.  *                  display buffer
  785.  }
  786.  
  787.   Function VioScrLock (fWait: USHORT;                       { 0=return if screen unavailable, 1=wait }
  788.                        pfNotLocked: PUCHAR;                 { lock status (returned) }
  789.                        hvio: HVIO): USHORT;      { video handle                           }
  790.  
  791.  
  792. {**   VioScrUnLock - Unlock screen - releases ownership
  793.  *                    physical display buffer.
  794.  }
  795.  
  796.   Function VioScrUnLock (hvio: HVIO): USHORT;        { video handle                         }
  797.  
  798.  
  799. Const
  800.   VP_NOWAIT               =  $0000;
  801.   VP_WAIT                          =  $0001;
  802.   VP_OPAQUE                        =  $0000;
  803.   VP_TRANSPARENT                   =  $0002;
  804.  
  805. {** VioPopUp - Allocate a pop-up display screen
  806.  *
  807.  * This call is issued by an application process when it requires a temporary
  808.  * screen to display a momentary message to the user.
  809.  *
  810.  }
  811.  
  812.   Function VioPopUp (pfWait: PUSHORT;                       { Option flags }
  813.                      hvio: HVIO): USHORT;        { Vio handle                           }
  814.  
  815.  
  816. {**   VioEndPopUp - Deallocate pop-up display screen
  817.  *
  818.  *     Issued by the application when it no longer requires the temporary screen
  819.  *     obtained through a previous VioPopUp call.
  820.  *
  821.  }
  822.  
  823.   Function VioEndPopUp (hvio: HVIO): USHORT;            { vio device handle                    }
  824.  
  825. { structure for VioGetConfig }
  826. Type
  827.   VIOCONFIGINFO = Record
  828.     cb,                                 { length of this data structure }
  829.     adapter,                            { display adapter type }
  830.     display: USHORT;                    { display/monitor type }
  831.     cbMemory: ULONG;                    { amount of memory on the adapter in bytes }
  832.     Configuration,
  833.     VDHVersion,
  834.     Flags: USHORT;
  835.     HWBufferSize,
  836.     FullSaveSize,
  837.     PartSaveSize: ULONG;
  838.     EMAdaptersOFF,
  839.     EMDisplaysOFF: USHORT
  840.   End;
  841.   pVIOCONFIGINFO = ^VIOCONFIGINFO;
  842.  
  843.  
  844. {**   VioGetConfig - get video display configuration                   }
  845.  
  846.   Function VioGetConfig (usConfigId: USHORT;                { Reserved (must be 0) }
  847.                          pvioin: PVIOCONFIGINFO;            { structure defined above }
  848.                          hvio: HVIO): USHORT;      { vio handle                       }
  849.  
  850. { structure for VioGet/SetFont }
  851. Type
  852.   VIOFONTINFO = Record                  { viofi }
  853.     cb,                                 { length of this structure }
  854.     _type,                               { request type }
  855.     cxCell,                             { pel columns in character cell }
  856.     cyCell: USHORT;                     { pel rows in character cell }
  857.     pbData: PVOID;                      { requested font table (returned) }
  858.     cbData: USHORT                      { length of caller supplied data area (in bytes) }
  859.   End;
  860.   pVIOFONTINFO = ^VIOFONTINFO;
  861.  
  862.  
  863. Const
  864.   VGFI_GETCURFONT         = 0;
  865.   VGFI_GETROMFONT                  = 1;
  866.  
  867.  
  868. {**   VioGetFont - Returns either the font table of the size specified, or the
  869.  *                  font currently in use.
  870.  }
  871.  
  872.   Function VioGetFont (pviofi: PVIOFONTINFO;                { data structure defined above }
  873.                        hvio: HVIO): USHORT;   { vio handle                           }
  874.  
  875.  
  876. {**   VioSetFont - Set font
  877.  *
  878.  *     Downloads a display font. The font being set must be compatible with the
  879.  *     current mode.
  880.  *
  881.  }
  882.  
  883.   Function VioSetFont (pviofi: PVIOFONTINFO;                { data structure defined just above }
  884.                        hvio: HVIO): USHORT;  { video handle                         }
  885.  
  886.  
  887. {**   VioGetCp - Get code page
  888.  *
  889.  *     Allows a process to query the code page currently used to display text
  890.  *     data.
  891.  *
  892.  }
  893.  
  894.   Function VioGetCp (usReserved: USHORT;                    { reserved (zero's) }
  895.                      pIdCodePage: PUSHORT;                  { code page ID }
  896.                      hvio: HVIO): USHORT;       { video handle                         }
  897.  
  898.  
  899. {**   VioSetCp - Set code page
  900.  *
  901.  *     Allows a process to set the code page used to display text data on the
  902.  *     screen.
  903.  *
  904.  }
  905.  
  906.   Function VioSetCp (usReserved,                            { reserved (zero's) }
  907.                      idCodePage: USHORT;                    { code page id }
  908.                      hvio: HVIO): USHORT;        { video handle                         }
  909.  
  910.  
  911. Type
  912.   VIOPALSTATE = Record
  913.     cb,                                 { length of this structure in bytes }
  914.     _type,                               { request type=0 get palette registers }
  915.     iFirst,                             { first palette register to return }
  916.     acolor: Array[0..0] Of USHORT                   { color value pallete register }
  917.   End;
  918.   pVIOPALSTATE = ^VIOPALSTATE;
  919.  
  920.   VIOOVERSCAN = Record
  921.     cb,                                 { length of this structure }
  922.     _type,                               { request type=1 get overscan (border) color }
  923.     color: USHORT                       { color value }
  924.   End;
  925.   pVIOOVERSCAN = ^VIOOVERSCAN;
  926.  
  927.   VIOINTENSITY = Record
  928.     cb,                                 { length of this structure }
  929.     _type,                               { request type=2 get blink/background intensity switch }
  930.     fs: USHORT                          { value of blink/background switch }
  931.   End;
  932.   pVIOINTENSITY = ^VIOINTENSITY;
  933.  
  934.  
  935.   VIOCOLORREG = Record                  { viocreg }
  936.     cb,
  937.     _type,
  938.     firstcolorreg,
  939.     numcolorregs: USHORT;
  940.     colorregaddr: PCH
  941.   End;
  942.   pVIOCOLORREG = ^VIOCOLORREG;
  943.  
  944.   VIOSETULINELOC = Record               { viouline }
  945.     cb,
  946.     _type,
  947.     scanline: USHORT
  948.   End;
  949.   pVIOSETULINELOC = ^VIOSETULINELOC;
  950.  
  951.   VIOSETTARGET = Record                 { viosett }
  952.     cb,
  953.     _type,
  954.     defaultalgorithm: USHORT
  955.   End;
  956.   pVIOSETTARGET = ^VIOSETTARGET;
  957.  
  958.  
  959. {**   VioGetState - Get video state
  960.  *
  961.  *     Returns the current settings of the palette registers, overscan
  962.  *     color or blink/background intensity switch.
  963.  *
  964.  }
  965.  
  966.  
  967.   Function VioGetState (pState: PVOID;                      { one of the 3 structures defined above }
  968.                         hvio: HVIO): USHORT;        { vio handle                            }
  969.  
  970.  
  971. {**   VioSetState - Set video state
  972.  *
  973.  *     Performs one of the following functions, sets paletted registers, sets
  974.  *     the overscan
  975.  *
  976.  }
  977.  
  978.  
  979.   Function VioSetState (pState: PVOID;                      { one of the 3 structures defined above }
  980.                         hvio: HVIO): USHORT;        { video handle                         }
  981.  
  982. Type
  983.   HMOU = SHANDLE;
  984.   pHMOU = ^HMOU;
  985.  
  986. Const
  987.   MR_MOUGETNUMBUTTONS     =  $00000001 ;
  988.   MR_MOUGETNUMMICKEYS              =  $00000002 ;
  989.   MR_MOUGETDEVSTATUS               =  $00000004 ;
  990.   MR_MOUGETNUMQUEEL                =  $00000008 ;
  991.   MR_MOUREADEVENTQUE               =  $00000010 ;
  992.   MR_MOUGETSCALEFACT               =  $00000020 ;
  993.   MR_MOUGETEVENTMASK               =  $00000040 ;
  994.   MR_MOUSETSCALEFACT               =  $00000080 ;
  995.   MR_MOUSETEVENTMASK               =  $00000100 ;
  996.   MR_MOUOPEN                       =  $00000800 ;
  997.   MR_MOUCLOSE                      =  $00001000 ;
  998.   MR_MOUGETPTRSHAPE                =  $00002000 ;
  999.   MR_MOUSETPTRSHAPE                =  $00004000 ;
  1000.   MR_MOUDRAWPTR                    =  $00008000 ;
  1001.   MR_MOUREMOVEPTR                  =  $00010000 ;
  1002.   MR_MOUGETPTRPOS                  =  $00020000 ;
  1003.   MR_MOUSETPTRPOS                  =  $00040000 ;
  1004.   MR_MOUINITREAL                   =  $00080000 ;
  1005.   MR_MOUSETDEVSTATUS               =  $00100000 ;
  1006.  
  1007. {**   MouRegister - Register a mouse subsystem within a session.       }
  1008.  
  1009.   Function MouRegister (pszModName,                         { Dynamic link module name }
  1010.                         pszEntryName: PSZ;                  { dynamic link entry point }
  1011.                         flFuns: ULONG): USHORT; { bit mask (each bit represents a mouse function) }
  1012.  
  1013. {**   MouDeRegister - Deregister a mouse subsystem                     }
  1014.  
  1015.   Function MouDeRegister: USHORT;
  1016.  
  1017.  
  1018. {**   MouFlushQue - flush the mouse event queue for this session
  1019.  *
  1020.  *     Directs the mouse driver to flush
  1021.  *     session
  1022.  *
  1023.  }
  1024.  
  1025.   Function MouFlushQue (hmou: HMOU): USHORT;            { Mouse device handle }
  1026.  
  1027.  
  1028.  
  1029. Const
  1030.   MHK_BUTTON1             =  $0001;
  1031.   MHK_BUTTON2                      =  $0002;
  1032.   MHK_BUTTON3                      =  $0004;
  1033.  
  1034. { structure for MouGet/SetPtrPos }
  1035. Type
  1036.   PTRLOC = Record
  1037.     row,                                { pointer row coordinate screen position }
  1038.     col: USHORT                         { pointer column coordinate screen position }
  1039.   End;
  1040.   pPTRLOC = ^PTRLOC;
  1041.  
  1042.  
  1043. {**   MouGetPtrPos - Query mouse pointer position
  1044.  *
  1045.  *     Queries the mouse driver to determine the current row and column
  1046.  *     coordinate position of the mouse pointer shape.
  1047.  *
  1048.  }
  1049.  
  1050.   Function MouGetPtrPos (pmouLoc: PPTRLOC;                  { pointer to structure indicated above }
  1051.                          hmou: HMOU): USHORT;        { mouse device handle                  }
  1052.  
  1053.  
  1054. {**   MouSetPtrPos - Set mouse pointer position
  1055.  *
  1056.  *     Directs the mouse driver to set a new current row and column coordinate
  1057.  *     position for the mouse pointer shape.
  1058.  *
  1059.  }
  1060.  
  1061.   Function MouSetPtrPos (pmouLoc: PPTRLOC;                  { pointer to structure indicated above }
  1062.                          hmou: HMOU): USHORT;        { mouse device handle                  }
  1063.  
  1064. { structure for MouGet/SetPtrShape }
  1065.  
  1066. Type
  1067.   PTRSHAPE = Record
  1068.     cb,                                 { total length necessary to build image }
  1069.     col,                                { # of columns in mouse shape }
  1070.     row,                                { number of rows in mouse shape }
  1071.     colHot,                             { column coordinate of pointer image hotspot }
  1072.     rowHot: USHORT                      { row coordinate of pointer image hotspot }
  1073.   End;
  1074.   pPTRSHAPE = ^PTRSHAPE;
  1075.  
  1076.  
  1077. {**   MouSetPtrShape - Set mouse pointer shape
  1078.  *
  1079.  *     Allows a process to set the pointer shape and size to be used as the
  1080.  *     mouse device driver pointer image for all applications in a session.
  1081.  *
  1082.  }
  1083.  
  1084.   Function MouSetPtrShape (pBuf: PBYTE;                     { bit image of the pointer shape }
  1085.                            pmoupsInfo: PPTRSHAPE;           { pointer to structure defined above }
  1086.                            hmou: HMOU): USHORT;       { mouse device handle                  }
  1087.  
  1088.  
  1089. {**   MouGetPtrShape - Get pointer shape
  1090.  *
  1091.  *     Allows a process to get
  1092.  *
  1093.  }
  1094.  
  1095.   Function MouGetPtrShape (pBuf: PBYTE;                     { pointer bit image (returned) }
  1096.                            pmoupsInfo: PPTRSHAPE;           { pointer to structure defined above }
  1097.                            hmou: HMOU): USHORT;       { mouse device handle                  }
  1098.  
  1099.  
  1100. {**   MouGetDevStatus - Get mouse device status
  1101.  *
  1102.  *     Returns status flags for the mouse device driver currently installed.
  1103.  *
  1104.  }
  1105.  
  1106.   Function MouGetDevStatus (pfsDevStatus: PUSHORT;          { current status flags }
  1107.                             hmou: HMOU): USHORT;        { mouse device handle                  }
  1108.  
  1109.  
  1110. {**   MouGetNumButtons - Get number of mouse buttons
  1111.  *
  1112.  *     Returns the number of buttons supported on the mouse driver currently
  1113.  *     installed.
  1114.  *
  1115.  }
  1116.  
  1117.   Function MouGetNumButtons (pcButtons: PUSHORT;            { number of mouse buttons }
  1118.                              hmou: HMOU): USHORT;        { mouse device handle                  }
  1119.  
  1120.  
  1121. {**   MouGetNumMickeys - Get number of mouse mickeys
  1122.  *
  1123.  *     Returns the number of mickeys per centimeter for the mouse driver
  1124.  *     currently installed.
  1125.  *
  1126.  }
  1127.  
  1128.   Function MouGetNumMickeys (pcMickeys: PUSHORT;            { number of mickeys per centimeter }
  1129.                              hmou: HMOU): USHORT;        { mouse device handle                  }
  1130.  
  1131. { structure for MouReadEventQue }
  1132. Type
  1133.   MOUEVENTINFO = Record
  1134.     fs: USHORT;                         { State of mouse at the time the event was reported }
  1135.     time: ULONG;                        { time since boot in milliseconds }
  1136.     row,                                { absolute/relative row position }
  1137.     col: USHORT                         { absolute/relative column position }
  1138.   End;
  1139.   pMOUEVENTINFO = ^MOUEVENTINFO;
  1140.  
  1141.  
  1142. {**   MouReadEventQue - read mouse event queue
  1143.  *
  1144.  *     Reads an event from the mouse device FIFO event queue, and places it in
  1145.  *     a structure provided by the application.
  1146.  *
  1147.  }
  1148.  
  1149.   Function MouReadEventQue (pmouevEvent: PMOUEVENTINFO;     { pointer to structure defined above }
  1150.                             pfWait: PUSHORT;                { 0=no wait for data, 1= wait for data }
  1151.                             hmou: HMOU): USHORT;       { mouse device handle                  }
  1152.  
  1153. { structure for MouGetNumQueEl }
  1154.  
  1155. Type
  1156.   MOUQUEINFO = Record
  1157.     cEvents,                            { current number of event queue elements }
  1158.     cmaxEvents: USHORT                  { MaxNumQueElements value }
  1159.   End;
  1160.   pMOUQUEINFO = ^MOUQUEINFO;
  1161.  
  1162.  
  1163. {**   MouGetNumQueEl - Get Event queue status
  1164.  *
  1165.  *     Returns the current status for the mouse device driver event queue.
  1166.  *
  1167.  }
  1168.  
  1169.   Function MouGetNumQueEl (qmouqi: PMOUQUEINFO;             { pointer to structure defined above }
  1170.                            hmou: HMOU): USHORT;    { mouse device handle                  }
  1171.  
  1172.  
  1173. {**   MouGetEventMask - Get the current value of the mouse event queue mask}
  1174.  
  1175.   Function MouGetEventMask (pfsEvents: PUSHORT;             { current mouse event mask (returned) }
  1176.                             hmou: HMOU): USHORT;        { mouse device handle                  }
  1177.  
  1178.  
  1179. {**   MouSetEventMask - Assign a new event mask to the current mouse device
  1180.  *                       driver.
  1181.  }
  1182.  
  1183.   Function MouSetEventMask (pfsEvents: PUSHORT;             { mouse event mask }
  1184.                             hmou: HMOU): USHORT;        { mouse device handle                  }
  1185.  
  1186. { structure for MouGet/SetScaleFact }
  1187.  
  1188. Type
  1189.   SCALEFACT = Record
  1190.     rowScale,                           { row scaling factor }
  1191.     colScale: USHORT                    { column coordinate scaling factor }
  1192.   End;
  1193.   pSCALEFACT = ^SCALEFACT;
  1194.  
  1195.  
  1196. {**   MouGetScaleFact - Get mouse scaling factors.                     }
  1197.  
  1198.   Function MouGetScaleFact (pmouscFactors: PSCALEFACT;      { pointer to structure indicated above }
  1199.                             hmou: HMOU): USHORT;        { mouse device handle                  }
  1200.  
  1201.  
  1202. {**   MouSetScaleFact - Set mouse scaling factor.                      }
  1203.  
  1204.   Function MouSetScaleFact (pmouscFactors: PSCALEFACT;      { pointer to structure indicated above }
  1205.                             hmou: HMOU): USHORT;        { mouse device handle                  }
  1206.  
  1207.  
  1208. {**   MouOpen - Open the mouse device for the current session.         }
  1209.  
  1210.   Function MouOpen (pszDvrname: PSZ;                        { pointer to name of mouse draw device driver }
  1211.                     phmou: PHMOU): USHORT;      { mouse device handle                         }
  1212.  
  1213.  
  1214. {**   MouClose - Close the mouse device for the current session.}
  1215.  
  1216.   Function MouClose (hmou: HMOU): USHORT;            { mouse device handle                  }
  1217.  
  1218.  
  1219. { structure for MouRemovePtr }
  1220. Type
  1221.   NOPTRRECT = Record
  1222.     row,                                { upper left row coodinates }
  1223.     col,                                { upper left column coodinates }
  1224.     cRow,                               { Lower right row coordinates }
  1225.     cCol: USHORT                        { Lower right column coordinates }
  1226.   End;
  1227.   pNOPTRRECT = ^NOPTRRECT;
  1228.  
  1229.  
  1230. {**   MouRemovePtr - Remove mouse pointer
  1231.  *
  1232.  *     Allows a process to notify the mouse device driver that the area defined
  1233.  *     by the passed parameters is for the exclusive use of the application.
  1234.  *     This area is defined as the 'collision' area and is not available to the
  1235.  *     mouse device driver when drawing pointer images.
  1236.  *
  1237.  }
  1238.  
  1239.   Function MouRemovePtr (pmourtRect: PNOPTRRECT;            { Address of pointer data block }
  1240.                          hmou: HMOU): USHORT;      { mouse device handle                  }
  1241.  
  1242.  
  1243. {**   MouDrawPtr - Mouse draw pointer
  1244.  *
  1245.  *     Allows a process to notify the mouse device driver that an area
  1246.  *     previously restricted to the pointer image is now available to the mouse
  1247.  *     device driver.
  1248.  *
  1249.  }
  1250.  
  1251.   Function MouDrawPtr (hmou: HMOU): USHORT;            { mouse device handle                  }
  1252.  
  1253.  
  1254. Const
  1255.   MOU_NODRAW              =  $0001;
  1256.   MOU_DRAW                         =  $0000;
  1257.   MOU_MICKEYS                      =  $0002;
  1258.   MOU_PELS                         =  $0000;
  1259.  
  1260.  
  1261. {**   MouSetDevStatus - Set mouse device status
  1262.  *
  1263.  *     Sets the mouse device driver status flags for the mouse device driver
  1264.  *     currently installed. The status flags are a 2 byte set of bit flags.
  1265.  *
  1266.  }
  1267.  
  1268.   Function MouSetDevStatus (pfsDevStatus: PUSHORT;          { mouse device status flags }
  1269.                             hmou: HMOU): USHORT;        { mouse device handle                  }
  1270.  
  1271.  
  1272. {**   MouInitReal - Initialize the DOS mode mouse device driver        }
  1273.  
  1274.   Function MouInitReal (Par1: PSZ): USHORT;                  { pointer to name of mouse draw driver }
  1275.  
  1276. {** MouSynch - Get synchronous access
  1277.  *
  1278.  *   Provides synchronous access for a mouse subsystem to the mouse device
  1279.  *   driver.
  1280.  *
  1281.  }
  1282.  
  1283.   Function MouSynch (pszDvrName: USHORT): USHORT;    { Indicate wait/no wait              }
  1284.  
  1285. Implementation
  1286.   Function KbdCharIn;                     External 'KBDCALLS' Index    4;
  1287.   Function KbdClose;                      External 'KBDCALLS' Index   17;
  1288.   Function KbdDeRegister;                 External 'KBDCALLS' Index   20;
  1289.   Function KbdFlushBuffer;                External 'KBDCALLS' Index   13;
  1290.   Function KbdFreeFocus;                  External 'KBDCALLS' Index   18;
  1291.   Function KbdGetCp;                      External 'KBDCALLS' Index    3;
  1292.   Function KbdGetFocus;                   External 'KBDCALLS' Index   12;
  1293.   Function KbdGetHWID;                    External 'KBDCALLS' Index   24;
  1294.   Function KbdGetStatus;                  External 'KBDCALLS' Index   10;
  1295.   Function KbdOpen;                       External 'KBDCALLS' Index   23;
  1296.   Function KbdPeek;                       External 'KBDCALLS' Index   22;
  1297.   Function KbdRegister;                   External 'KBDCALLS' Index    8;
  1298.   Function KbdSetCp;                      External 'KBDCALLS' Index    5;
  1299.   Function KbdSetCustXt;                  External 'KBDCALLS' Index    1;
  1300.   Function KbdSetFgnd;                    External 'KBDCALLS' Index   21;
  1301.   Function KbdSetStatus;                  External 'KBDCALLS' Index   11;
  1302.   Function KbdStringIn;                   External 'KBDCALLS' Index    9;
  1303.   Function KbdSynch;                      External 'KBDCALLS' Index    7;
  1304.   Function KbdXlate;                      External 'KBDCALLS' Index   14;
  1305.   Function MouClose;                      External 'MOUCALLS' Index    9;
  1306.   Function MouDeRegister;                 External 'MOUCALLS' Index   14;
  1307.   Function MouDrawPtr;                    External 'MOUCALLS' Index   26;
  1308.   Function MouFlushQue;                   External 'MOUCALLS' Index    7;
  1309.   Function MouGetDevStatus;               External 'MOUCALLS' Index   22;
  1310.   Function MouGetEventMask;               External 'MOUCALLS' Index   15;
  1311.   Function MouGetNumButtons;              External 'MOUCALLS' Index    8;
  1312.   Function MouGetNumMickeys;              External 'MOUCALLS' Index    3;
  1313.   Function MouGetNumQueEl;                External 'MOUCALLS' Index   13;
  1314.   Function MouGetPtrPos;                  External 'MOUCALLS' Index   19;
  1315.   Function MouGetPtrShape;                External 'MOUCALLS' Index    1;
  1316.   Function MouGetScaleFact;               External 'MOUCALLS' Index    6;
  1317.   Function MouInitReal;                   External 'MOUCALLS' Index   27;
  1318.   Function MouOpen;                       External 'MOUCALLS' Index   17;
  1319.   Function MouReadEventQue;               External 'MOUCALLS' Index   20;
  1320.   Function MouRegister;                   External 'MOUCALLS' Index   24;
  1321.   Function MouRemovePtr;                  External 'MOUCALLS' Index   18;
  1322.   Function MouSetDevStatus;               External 'MOUCALLS' Index   25;
  1323.   Function MouSetEventMask;               External 'MOUCALLS' Index   16;
  1324.   Function MouSetPtrPos;                  External 'MOUCALLS' Index   21;
  1325.   Function MouSetPtrShape;                External 'MOUCALLS' Index    2;
  1326.   Function MouSetScaleFact;               External 'MOUCALLS' Index   11;
  1327.   Function MouSynch;                      External 'MOUCALLS' Index   23;
  1328.   Function VioDeRegister;                 External 'VIOCALLS' Index    6;
  1329.   Function VioEndPopUp;                   External 'VIOCALLS' Index    1;
  1330.   Function VioGetAnsi;                    External 'VIOCALLS' Index    3;
  1331.   Function VioGetBuf;                     External 'VIOCALLS' Index   31;
  1332.   Function VioGetConfig;                  External 'VIOCALLS' Index   46;
  1333.   Function VioGetCp;                      External 'VIOCALLS' Index   40;
  1334.   Function VioGetCurPos;                  External 'VIOCALLS' Index    9;
  1335.   Function VioGetCurType;                 External 'VIOCALLS' Index   27;
  1336.   Function VioGetFont;                    External 'VIOCALLS' Index   29;
  1337.   Function VioGetMode;                    External 'VIOCALLS' Index   21;
  1338.   Function VioGetPhysBuf;                 External 'VIOCALLS' Index    2;
  1339.   Function VioGetState;                   External 'VIOCALLS' Index   49;
  1340.   Function VioGlobalReg; Begin UnKnown('VioGlobalReg','BseSub') End;
  1341.   Function VioModeUndo;                   External 'VIOCALLS' Index   35;
  1342.   Function VioModeWait;                   External 'VIOCALLS' Index   37;
  1343.   Function VioPopUp;                      External 'VIOCALLS' Index   11;
  1344.   Function VioPrtSc;                      External 'VIOCALLS' Index    8;
  1345.   Function VioPrtScToggle;                External 'VIOCALLS' Index   50;
  1346.   Function VioReadCellStr;                External 'VIOCALLS' Index   24;
  1347.   Function VioReadCharStr;                External 'VIOCALLS' Index   30;
  1348.   Function VioRegister;                   External 'VIOCALLS' Index   45;
  1349.   Function VioSavRedrawUndo;              External 'VIOCALLS' Index   28;
  1350.   Function VioSavRedrawWait;              External 'VIOCALLS' Index   25;
  1351.   Function VioScrLock;                    External 'VIOCALLS' Index   23;
  1352.   Function VioScrUnLock;                  External 'VIOCALLS' Index   18;
  1353.   Function VioScrollDn;                   External 'VIOCALLS' Index   47;
  1354.   Function VioScrollLf;                   External 'VIOCALLS' Index   44;
  1355.   Function VioScrollRt;                   External 'VIOCALLS' Index   12;
  1356.   Function VioScrollUp;                   External 'VIOCALLS' Index    7;
  1357.   Function VioSetAnsi;                    External 'VIOCALLS' Index    5;
  1358.   Function VioSetCp;                      External 'VIOCALLS' Index   42;
  1359.   Function VioSetCurPos;                  External 'VIOCALLS' Index   15;
  1360.   Function VioSetCurType;                 External 'VIOCALLS' Index   32;
  1361.   Function VioSetFont;                    External 'VIOCALLS' Index   33;
  1362.   Function VioSetMode;                    External 'VIOCALLS' Index   22;
  1363.   Function VioSetState;                   External 'VIOCALLS' Index   51;
  1364.   Function VioShowBuf;                    External 'VIOCALLS' Index   43;
  1365.   Function VioWrtCellStr;                 External 'VIOCALLS' Index   10;
  1366.   Function VioWrtCharStr;                 External 'VIOCALLS' Index   13;
  1367.   Function VioWrtCharStrAtt;              External 'VIOCALLS' Index   48;
  1368.   Function VioWrtNAttr;                   External 'VIOCALLS' Index   26;
  1369.   Function VioWrtNCell;                   External 'VIOCALLS' Index   52;
  1370.   Function VioWrtNChar;                   External 'VIOCALLS' Index   53;
  1371.   Function VioWrtTTY;                     External 'VIOCALLS' Index   19;
  1372. End.
  1373.