home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / os2apipm.zip / OS2API / OS2-VIO.ADS < prev    next >
Text File  |  1996-07-16  |  19KB  |  474 lines

  1.  
  2. -- ╔═══════════════════════════════════════════════════════════════════╗
  3. -- ║       D E S I G N   E N G I N E R I N G              ║D║S║        ║
  4. -- ║            S O F T W A R E                           ╚═╩═╝        ║
  5. -- ║                                                                   ║
  6. -- ║        Package     OS2.VIO                                        ║
  7. -- ║                                                                   ║
  8. -- ║        Author :  Leonid Dulman     1995                           ║
  9. -- ║                                                                   ║
  10. -- ║             GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS            ║
  11. -- ║                                                                   ║
  12. -- ║               Vio     support    of os/2 api functions            ║
  13. -- ║                                                                   ║
  14. -- ╚═══════════════════════════════════════════════════════════════════╝
  15.  
  16. with Interfaces.C;         use Interfaces.C;
  17. with Interfaces.C.Strings; use Interfaces.C.Strings;
  18.  
  19. package Os2.Vio  is
  20. pragma Preelaborate (Vio);
  21.  
  22. subtype HVIO is USHORT    ;
  23. type   PHVIO is access all HVIO;
  24.  
  25. function VioRegister (pszModName:PSZ; pszEntryName: PSZ ;
  26.                      flFun1: ULONG ;
  27.                      flFun2: ULONG ) return apiret16;
  28. pragma Import(c,VioRegister, Link_name=>"_VioRegister");
  29.  
  30. function VioGlobalReg(pszModName:PSZ; pszEntryName: PSZ ;
  31.                      flFun1: ULONG ;flFun2: ULONG ;
  32.                      usReturn:USHORT ) return apiret16;
  33. pragma Import(c,VioGlobalReg, Link_name=>"_VioGlobalReg");
  34.  
  35. --   first parameter registration constants
  36.  
  37.  VR_VIOGETCURPOS            :constant ulong:=16#00000001#;
  38.  VR_VIOGETCURTYPE           :constant ulong:=16#00000002#;
  39.  VR_VIOGETMODE              :constant ulong:=16#00000004#;
  40.  VR_VIOGETBUF               :constant ulong:=16#00000008#;
  41.  VR_VIOGETPHYSBUF           :constant ulong:=16#00000010#;
  42.  VR_VIOSETCURPOS            :constant ulong:=16#00000020#;
  43.  VR_VIOSETCURTYPE           :constant ulong:=16#00000040#;
  44.  VR_VIOSETMODE              :constant ulong:=16#00000080#;
  45.  VR_VIOSHOWBUF              :constant ulong:=16#00000100#;
  46.  VR_VIOREADCHARSTR          :constant ulong:=16#00000200#;
  47.  VR_VIOREADCELLSTR          :constant ulong:=16#00000400#;
  48.  VR_VIOWRTNCHAR             :constant ulong:=16#00000800#;
  49.  VR_VIOWRTNATTR             :constant ulong:=16#00001000#;
  50.  VR_VIOWRTNCELL             :constant ulong:=16#00002000#;
  51.  VR_VIOWRTTTY               :constant ulong:=16#00004000#;
  52.  VR_VIOWRTCHARSTR           :constant ulong:=16#00008000#;
  53.  VR_VIOWRTCHARSTRATT        :constant ulong:=16#00010000#;
  54.  VR_VIOWRTCELLSTR           :constant ulong:=16#00020000#;
  55.  VR_VIOSCROLLUP             :constant ulong:=16#00040000#;
  56.  VR_VIOSCROLLDN             :constant ulong:=16#00080000#;
  57.  VR_VIOSCROLLLF             :constant ulong:=16#00100000#;
  58.  VR_VIOSCROLLRT             :constant ulong:=16#00200000#;
  59.  VR_VIOSETANSI              :constant ulong:=16#00400000#;
  60.  VR_VIOGETANSI              :constant ulong:=16#00800000#;
  61.  VR_VIOPRTSC                :constant ulong:=16#01000000#;
  62.  VR_VIOSCRLOCK              :constant ulong:=16#02000000#;
  63.  VR_VIOSCRUNLOCK            :constant ulong:=16#04000000#;
  64.  VR_VIOSAVREDRAWWAIT        :constant ulong:=16#08000000#;
  65.  VR_VIOSAVREDRAWUNDO        :constant ulong:=16#10000000#;
  66.  VR_VIOPOPUP                :constant ulong:=16#20000000#;
  67.  VR_VIOENDPOPUP             :constant ulong:=16#40000000#;
  68.  VR_VIOPRTSCTOGGLE          :constant ulong:=16#80000000#;
  69.  
  70. --   second parameter registration constants
  71.  VR_VIOMODEWAIT             :constant ulong:=16#00000001#;
  72.  VR_VIOMODEUNDO             :constant ulong:=16#00000002#;
  73.  VR_VIOGETFONT              :constant ulong:=16#00000004#;
  74.  VR_VIOGETCONFIG            :constant ulong:=16#00000008#;
  75.  VR_VIOSETCP                :constant ulong:=16#00000010#;
  76.  VR_VIOGETCP                :constant ulong:=16#00000020#;
  77.  VR_VIOSETFONT              :constant ulong:=16#00000040#;
  78.  VR_VIOGETSTATE             :constant ulong:=16#00000080#;
  79.  VR_VIOSETSTATE             :constant ulong:=16#00000100#;
  80.  
  81. function  VioDeRegister  return apiret16;
  82. pragma Import(c,VioDeRegister, Link_name=>"_VioDeRegister");
  83.  
  84. function VioGetBuf (pLVB:PULONG;pcbLVB:PUSHORT;hvi:HVIO)  return apiret16;
  85. pragma Import(c,VioGetBuf, Link_name=>"_VioGetBuf");
  86.  
  87. function VioGetCurPos (pusRow:PUSHORT ; pusColumn:PUSHORT ;
  88.                        hvi:HVIO )  return apiret16;
  89. pragma Import(c,VioGetCurPos, Link_name=>"_VioGetCurPos");
  90.  
  91. function  VioSetCurPos (usRow:USHORT ; usColumn:USHORT ;
  92.                         hvi:HVIO )  return apiret16;
  93. pragma Import(c,VioSetCurPos, Link_name=>"_VioSetCurPos");
  94.  
  95.        -- structure for VioSet/GetCurType() --
  96. type VIOCURSORINFO   is record -- vioci --
  97.      yStart     :USHORT   ;
  98.      cEnd       :USHORT   ;
  99.      cx         :USHORT   ;
  100.      attr       :USHORT   ;
  101. end record;
  102. type PVIOCURSORINFO is access all VIOCURSORINFO;
  103.  
  104. function VioGetCurType ( CursorInfo:PVIOCURSORINFO;
  105.                          hvi:HVIO)  return apiret16;
  106. pragma Import(c,VioGetCurType, Link_name=>"_VioGetCurType");
  107.  
  108. function VioSetCurType (CursorInfo:PVIOCURSORINFO;
  109.                         hvi:HVIO ) return apiret16;
  110. pragma Import(c,VioSetCurType, Link_name=>"_VioSetCurType");
  111.  
  112. --    VIOMODEINFO.color constants
  113.  COLORS_2        :constant ushort:=0001 ;
  114.  COLORS_4        :constant ushort:=0002 ;
  115.  COLORS_16       :constant ushort:=0004 ;
  116.        -- structure for VioSet/GetMode() --
  117.  
  118. type VIOMODEINFO is record    -- viomi --
  119.      cb                  :USHORT ;
  120.      fbType              :UCHAR  ;
  121.      color               :UCHAR  ;
  122.      col                 :USHORT ;
  123.      row                 :USHORT ;
  124.      hres                :USHORT ;
  125.      vres                :USHORT ;
  126.      fmt_ID              :UCHAR  ;
  127.      attrib              :UCHAR  ;
  128.      buf_addr            :ULONG  ;
  129.      buf_length          :ULONG  ;
  130.      full_length         :ULONG  ;
  131.      partial_length      :ULONG  ;
  132.      ext_data_addr       :PCH    ;
  133. end record;
  134. type PVIOMODEINFO is access all VIOMODEINFO;
  135.  
  136.  VGMT_OTHER                 :constant ushort:=01;
  137.  VGMT_GRAPHICS              :constant ushort:=02;
  138.  VGMT_DISABLEBURST          :constant ushort:=04;
  139.  
  140. function VioGetMode ( ModeInfo:PVIOMODEINFO;hvi:HVIO) return apiret16;
  141. pragma Import(c,VioGetMode, Link_name=>"_VioGetMode");
  142.  
  143. function VioSetMode ( ModeInfo:PVIOMODEINFO;hvi:HVIO ) return apiret16;
  144. pragma Import(c,VioSetMode, Link_name=>"_VioSetMode");
  145.  
  146.        -- structure for VioGetPhysBuf() --
  147. type VIOPHYSBUF  is record    -- viopb --
  148.           pBuf   :PBYTE    ;
  149.           cb     :ULONG    ;
  150.           asel   :SEL      ;
  151. end record;
  152. type PVIOPHYSBUF is access all VIOPHYSBUF;
  153.  
  154. function VioGetPhysBuf (PhysBuf:PVIOPHYSBUF ;
  155.                        usReserved:USHORT )  return apiret16;
  156. pragma Import(c,VioGetPhysBuf, Link_name=>"_VioGetPhysBuf");
  157.  
  158. function VioReadCellStr (pchCellStr:PCH ; cb: USHORT ;
  159.                          usRow:USHORT ;usColumn:USHORT ;
  160.                          hvi:HVIO) return apiret16;
  161. pragma Import(c,VioReadCellStr, Link_name=>"_VioReadCellStr");
  162.  
  163. function VioReadCharStr ( pchCharStr:PCH ;  cb: USHORT ;
  164.                           usRow:USHORT ;usColumn:USHORT ;
  165.                           hvi:HVIO) return apiret16;
  166. pragma Import(c,VioReadCharStr, Link_name=>"_VioReadCharStr");
  167.  
  168. function VioWrtCellStr ( pchCellStr:string ;  cb: USHORT ;
  169.                          usRow:USHORT ;usColumn:USHORT ;
  170.                          hvi:HVIO) return apiret16;
  171. pragma Import(c,VioWrtCellStr, Link_name=>"_VioWrtCellStr");
  172.  
  173. function VioWrtCharStr ( pchCharStr:string ;  cb: USHORT ;
  174.                          usRow:USHORT ;usColumn:USHORT ;
  175.                          hvi:HVIO) return apiret16;
  176. pragma Import(c,VioWrtCharStr, Link_name=>"_VioWrtCharStr");
  177.  
  178. function VioScrollDn ( usTopRow  :USHORT;
  179.                        usLeftCol :USHORT;
  180.                        usBotRow  :USHORT;
  181.                        usRightCol:USHORT;
  182.                        cbLines   :USHORT;
  183.                        pCell     :PBYTE ;
  184.                        hvi       :HVIO   ) return apiret16;
  185. pragma Import(c,VioScrollDn, Link_name=>"_VioScrollDn");
  186.  
  187. function  VioScrollUp ( usTopRow  :USHORT;
  188.                         usLeftCol :USHORT;
  189.                         usBotRow  :USHORT;
  190.                         usRightCol:USHORT;
  191.                         cbLines   :USHORT ;
  192.                         pCell     :PBYTE  ;
  193.                         hvi       :HVIO ) return apiret16;
  194. pragma Import(c,VioScrollUp, Link_name=>"_VioScrollUp");
  195.  
  196. function VioScrollLf (usTopRow  :USHORT ;
  197.                       usLeftCol :USHORT ;
  198.                       usBotRow  :USHORT ;
  199.                       usRightCol:USHORT ;
  200.                       cbCol     :USHORT ;
  201.                       pCell     :PBYTE  ;
  202.                       hvi       :  HVIO )  return apiret16;
  203. pragma Import(c,VioScrollLf, Link_name=>"_VioScrollLf");
  204.  
  205. function  VioScrollRt (usTopRow  :USHORT ;
  206.                        usLeftCol :USHORT ;
  207.                        usBotRow  :USHORT ;
  208.                        usRightCol:USHORT ;
  209.                        cbCol     :USHORT ;
  210.                        pCell     :PBYTE  ;
  211.                        hvi       :  HVIO )  return apiret16;
  212. pragma Import(c,VioScrollRt, Link_name=>"_VioScrollRt");
  213.  
  214. function VioWrtNAttr (pAttr   :PBYTE  ;
  215.                       cb      :USHORT ;
  216.                       usRow   :USHORT ;
  217.                       usColumn:USHORT ;
  218.                       hvi     :HVIO    ) return apiret16;
  219. pragma Import(c,VioWrtNAttr, Link_name=>"_VioWrtNAttr");
  220.  
  221. function  VioWrtNCell (pCell    :PBYTE ;
  222.                         cb      :USHORT;
  223.                         usRow   :USHORT;
  224.                         usColumn:USHORT;
  225.                         hvi     :HVIO  ) return apiret16;
  226. pragma Import(c,VioWrtNCell, Link_name=>"_VioWrtNCell");
  227.  
  228. function  VioWrtNChar (pChar    :PBYTE ;
  229.                         cb      :USHORT;
  230.                         usRow   :USHORT;
  231.                         usColumn:USHORT;
  232.                         hvi     :HVIO  ) return apiret16;
  233. pragma Import(c,VioWrtNChar, Link_name=>"_VioWrtNChar");
  234.  
  235. function VioWrtTTY ( pch:string  ;cb :USHORT;hvi :HVIO  ) return apiret16;
  236. pragma Import(c,VioWrtTTY, Link_name=>"_VioWrtTTY");
  237.  
  238. function  VioWrtCharStrAtt (pch     :string ;
  239.                             cb      :USHORT ;
  240.                             usRow   :USHORT ;
  241.                             usColumn:USHORT ;
  242.                             pAttr   :PBYTE  ;
  243.                             hvi     :HVIO   ) return apiret16;
  244. pragma Import(c,VioWrtCharStrAtt, Link_name=>"_VioWrtCharStrAtt");
  245.  
  246.  VCC_SBCSCHAR      :constant ushort:= 0 ;
  247.  VCC_DBCSFULLCHAR  :constant ushort:= 1 ;
  248.  VCC_DBCS1STHALF   :constant ushort:= 2 ;
  249.  VCC_DBCS2NDHALF   :constant ushort:= 3 ;
  250.  
  251. function VioCheckCharType (pType   :PUSHORT ;
  252.                            usRow   :USHORT  ;
  253.                            usColumn:USHORT  ;
  254.                            hvi     :HVIO    ) return apiret16;
  255. pragma Import(c,VioCheckCharType, Link_name=>"_VioCheckCharType");
  256.  
  257. function VioShowBuf (offLVB:USHORT ;cb:USHORT ;
  258.                      hvi   :HVIO   ) return apiret16;
  259. pragma Import(c,VioShowBuf, Link_name=>"_VioShowBuf");
  260.  
  261.  ANSI_ON  :constant ushort:=1;
  262.  ANSI_OFF :constant ushort:=0;
  263.  
  264. function VioSetAnsi (fAnsi:USHORT ; hvi:HVIO )  return apiret16;
  265. pragma Import(c,VioSetAnsi, Link_name=>"_VioSetAnsi");
  266.  
  267. function VioGetAnsi (fAnsi:USHORT ; hvi:HVIO )  return apiret16;
  268. pragma Import(c,VioGetAnsi, Link_name=>"_VioGetAnsi");
  269.  
  270. function VioPrtSc (hvi:HVIO) return apiret16;
  271. pragma Import(c,VioPrtSc, Link_name=>"_VioPrtSc");
  272.  
  273. function VioPrtScToggle (hvi:HVIO) return apiret16;
  274. pragma Import(c,VioPrtScToggle, Link_name=>"_VioPrtScToggle");
  275.  
  276.  VSRWI_SAVEANDREDRAW    :constant ushort:=0;
  277.  VSRWI_REDRAW           :constant ushort:=1;
  278.  
  279.  VSRWN_SAVE             :constant ushort:=0;
  280.  VSRWN_REDRAW           :constant ushort:=1;
  281.  
  282.  UNDOI_GETOWNER         :constant ushort:=0;
  283.  UNDOI_RELEASEOWNER     :constant ushort:=1;
  284.  
  285.  UNDOK_ERRORCODE        :constant ushort:=0;
  286.  UNDOK_TERMINATE        :constant ushort:=1;
  287.  
  288. function VioRedrawSize (pcbRedraw:PULONG ) return apiret16;
  289. pragma Import(c,VioRedrawSize, Link_name=>"_VioRedrawSize");
  290.  
  291. function VioSavRedrawWait (usRedrawInd :USHORT ;
  292.                             pNotifyType:PUSHORT;
  293.                            usReserved  :USHORT  ) return apiret16;
  294. pragma Import(c,VioSavRedrawWait, Link_name=>"_VioSavRedrawWait");
  295.  
  296. function VioSavRedrawUndo (usOwnerInd:USHORT ;
  297.                            usKillInd :USHORT ;
  298.                            usReserved:USHORT ) return apiret16;
  299. pragma Import(c,VioSavRedrawUndo, Link_name=>"_VioSavRedrawUndo");
  300.  
  301.  VMWR_POPUP      :constant ushort:=0;
  302.  VMWN_POPUP      :constant ushort:=1;
  303.  
  304. function VioModeWait (usReqType   :USHORT ;
  305.                        pNotifyType:PUSHORT;
  306.                       usReserved  :USHORT ) return apiret16;
  307. pragma Import(c,VioModeWait, Link_name=>"_VioModeWait");
  308.  
  309. function VioModeUndo (usOwnerInd:USHORT ;
  310.                       usKillInd :USHORT ;
  311.                       usReserved:USHORT ) return apiret16;
  312. pragma Import(c,VioModeUndo, Link_name=>"_VioModeUndo");
  313.  
  314.  LOCKIO_NOWAIT       :constant ushort:=0;
  315.  LOCKIO_WAIT         :constant ushort:=1;
  316.  
  317.  LOCK_SUCCESS        :constant ushort:=0;
  318.  LOCK_FAIL           :constant ushort:=1;
  319.  
  320. function  VioScrLock (fWait      :USHORT ;
  321.                       pfNotLocked:PUCHAR ;
  322.                       hvi        :HVIO   ) return apiret16;
  323. pragma Import(c,VioScrLock, Link_name=>"_VioScrLock");
  324.  
  325. function VioScrUnLock (hvi:HVIO ) return apiret16;
  326. pragma Import(c,VioScrUnLock, Link_name=>"_VioScrUnLock");
  327.  
  328.  VP_NOWAIT                 :constant ushort:=0;
  329.  VP_WAIT                   :constant ushort:=1;
  330.  VP_OPAQUE                 :constant ushort:=0;
  331.  VP_TRANSPARENT            :constant ushort:=2;
  332.  
  333. function  VioPopUp (pfWait:PUSHORT ; hvi:HVIO ) return apiret16;
  334. pragma Import(c,VioPopUp, Link_name=>"_VioPopUp");
  335.  
  336. function  VioEndPopUp (hvi:HVIO ) return apiret16;
  337. pragma Import(c,VioEndPopUp, Link_name=>"_VioEndPopUp");
  338.  
  339. --   VIOCONFIGINFO.adapter constants
  340.  DISPLAY_MONOCHROME      :constant ulong:=16#0000#;
  341.  DISPLAY_CGA             :constant ulong:=16#0001#;
  342.  DISPLAY_EGA             :constant ulong:=16#0002#;
  343.  DISPLAY_VGA             :constant ulong:=16#0003#;
  344.  DISPLAY_8514A           :constant ulong:=16#0007#;
  345.  DISPLAY_IMAGEADAPTER    :constant ulong:=16#0008#;
  346.  DISPLAY_XGA             :constant ulong:=16#0009#;
  347.  
  348. --   VIOCONFIGINFO.display constants
  349.  
  350.  MONITOR_MONOCHROME      :constant ulong:=16#0000#;
  351.  MONITOR_COLOR           :constant ulong:=16#0001#;
  352.  MONITOR_ENHANCED        :constant ulong:=16#0002#;
  353.  MONITOR_8503            :constant ulong:=16#0003#;
  354.  MONITOR_851X_COLOR      :constant ulong:=16#0004#;
  355.  MONITOR_8514            :constant ulong:=16#0009#;
  356.  MONITOR_FLATPANEL       :constant ulong:=16#000A#;
  357.  MONITOR_8507_8604       :constant ulong:=16#000B#;
  358.  MONITOR_8515            :constant ulong:=16#000C#;
  359.  MONITOR_9515            :constant ulong:=16#000F#;
  360.  MONITOR_9517            :constant ulong:=16#0011#;
  361.  MONITOR_9518            :constant ulong:=16#0012#;
  362.  
  363.        -- structure for VioGetConfig() --
  364.  
  365. type VIOCONFIGINFO is record  -- vioin --
  366.      cb                 :USHORT  ;
  367.      adapter            :USHORT  ;
  368.      display            :USHORT  ;
  369.      cbMemory           :ULONG   ;
  370.      Configuration      :USHORT  ;
  371.      VDHVersion         :USHORT  ;
  372.      Flags              :USHORT  ;
  373.      HWBufferSize       :ULONG   ;
  374.      FullSaveSize       :ULONG   ;
  375.      PartSaveSize       :ULONG   ;
  376.      EMAdaptersOFF      :USHORT  ;
  377.      EMDisplaysOFF      :USHORT  ;
  378. end record;
  379. type PVIOCONFIGINFO is access all VIOCONFIGINFO;
  380.  
  381.  VIO_CONFIG_CURRENT   :constant ushort:=  0;
  382.  VIO_CONFIG_PRIMARY   :constant ushort:=  1;
  383.  VIO_CONFIG_SECONDARY :constant ushort:=  2;
  384.  
  385. function VioGetConfig (usConfigId:USHORT        ;
  386.                         pvioin   :PVIOCONFIGINFO;
  387.                         hvi      :HVIO          )  return apiret16;
  388. pragma Import(c,VioGetConfig, Link_name=>"_VioGetConfig");
  389.  
  390.   -- structure for VioGet/SetFont() --
  391. type VIOFONTINFO is record    -- viofi --
  392.      cb          :USHORT  ;
  393.      typ         :USHORT  ;
  394.      cxCell      :USHORT  ;
  395.      cyCell      :USHORT  ;
  396.      pbData      :PVOID16 ;
  397.      cbData      :USHORT  ;
  398. end record;
  399. type PVIOFONTINFO is access all VIOFONTINFO;
  400.  
  401.  VGFI_GETCURFONT  :constant ushort:= 0;
  402.  VGFI_GETROMFONT  :constant ushort:= 1;
  403.  
  404. function  VioGetFont (pviofi:PVIOFONTINFO ;
  405.                       hvi   :HVIO         ) return apiret16;
  406. pragma Import(c,VioGetFont, Link_name=>"_VioGetFont");
  407.  
  408. function  VioSetFont (pviofi:PVIOFONTINFO ;
  409.                       hvi   :HVIO         ) return apiret16;
  410. pragma Import(c,VioSetFont, Link_name=>"_VioSetFont");
  411.  
  412. function VioGetCp (usReserved  :USHORT ;
  413.                     pIdCodePage:PUSHORT;
  414.                     hvi        :HVIO   ) return apiret16;
  415. pragma Import(c,VioGetCp, Link_name=>"_VioGetCp");
  416.  
  417. function VioSetCp (usReserved  :USHORT ;
  418.                     pIdCodePage:PUSHORT;
  419.                     hvi        :HVIO   ) return apiret16;
  420. pragma Import(c,VioSetCp, Link_name=>"_VioSetCp");
  421.  
  422. type VIOPALSTATE  is record   -- viopal --
  423.      cb           :USHORT  ;
  424.      typ          :USHORT  ;
  425.      iFirst       :USHORT  ;
  426.      acolor       :USHORT  ;
  427. end record;
  428. type PVIOPALSTATE is access all VIOPALSTATE;
  429.  
  430. type VIOOVERSCAN is record    -- vioos --
  431.      cb        :USHORT  ;
  432.      typ       :USHORT  ;
  433.      color     :USHORT  ;
  434. end record;
  435. type PVIOOVERSCAN is access all VIOOVERSCAN;
  436.  
  437. type VIOINTENSITY  is record  -- vioint --
  438.      cb       :USHORT  ;
  439.      typ      :USHORT  ;
  440.      fs       :USHORT  ;
  441. end record;
  442. type PVIOINTENSITY is access all VIOINTENSITY;
  443.  
  444. type VIOCOLORREG is record   -- viocreg --
  445.      cb                :USHORT  ;
  446.      typ               :USHORT  ;
  447.      firstcolorreg     :USHORT  ;
  448.      numcolorregs      :USHORT  ;
  449.      colorregaddr      :PCH     ;
  450. end record;
  451. type PVIOCOLORREG is access all VIOCOLORREG;
  452.  
  453. type VIOSETULINELOC  is record  -- viouline --
  454.       cb           :USHORT ;
  455.       typ          :USHORT ;
  456.       scanline     :USHORT ;
  457. end record;
  458. type PVIOSETULINELOC is access all VIOSETULINELOC;
  459.  
  460. type VIOSETTARGET is record   -- viosett --
  461.      cb                   :USHORT  ;
  462.      typ                  :USHORT  ;
  463.      defaultalgorithm     :USHORT  ;
  464. end record;
  465. type PVIOSETTARGET is access all VIOSETTARGET;
  466.  
  467. function  VioGetState (pState:PVOID ; hvi   :HVIO  )return apiret16;
  468. pragma Import(c,VioGetState, Link_name=>"_VioGetState");
  469.  
  470. function  VioSetState (pState:PVOID ; hvi   :HVIO  )return apiret16;
  471. pragma Import(c,VioSetState, Link_name=>"_VioSetState");
  472.  
  473. end Os2.Vio;
  474.