home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / RADOOR30.ZIP / DESQVIEW.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-04-10  |  3.8 KB  |  95 lines

  1. {╔═════════════════════════════════════════════════════════════════════════╗
  2.  ║                                                                         ║
  3.  ║                   (c) CopyRight LiveSystems 1990, 1994                  ║
  4.  ║                                                                         ║
  5.  ║ Author    : Gerhard Hoogterp                                            ║
  6.  ║ FidoNet   : 2:282/100.5   2:283/7.33                                    ║
  7.  ║ BitNet    : GERHARD@LOIPON.WLINK.NL                                     ║
  8.  ║                                                                         ║
  9.  ║ SnailMail : Kremersmaten 108                                            ║
  10.  ║             7511 LC Enschede                                            ║
  11.  ║             The Netherlands                                             ║
  12.  ║                                                                         ║
  13.  ║        This module is part of the RADoor BBS doorwriters toolbox.       ║
  14.  ║                                                                         ║
  15.  ╚═════════════════════════════════════════════════════════════════════════╝}
  16.  
  17. {
  18.  Description:
  19.  
  20.  This Unit provides an interface to Pascal for the DesqView.Obj file. All
  21.  the basic procedures to make a program DesqView (tm) awear are here.
  22.  
  23. - 12 Feb 92: Release
  24.  
  25. }
  26.  
  27.  
  28. Unit Desqview;
  29. Interface
  30. Uses DOS,
  31.      CRT;
  32.  
  33. {---------------------------------------------------------------------------|
  34.   DVUsed   is set to True if DesqView is detected.
  35.   DVMajor  contains the major release number if DV is detected.
  36.   DVMinor  contains the minor release number is DV is detected.
  37. |--------------------------------------------------------------------------}
  38.  
  39. VAR DvUsed   : Boolean;    { True if desqview is used     }
  40.     DvMajor  : Byte   ;    { Contains the Major releas nr }
  41.     DvMinor  : Byte   ;    { Contains the minor releas nr }
  42.  
  43. {---------------------------------------------------------------------------|
  44.   GetVirtualVideoSegment returns the Buffer for direct screenwrites under
  45.   Desqview. If DV isn't found, it simply returns the FoundSegment.
  46. |--------------------------------------------------------------------------}
  47.  
  48. Function GetVirtualVideoSegment(FoundSegment : Word):Word;
  49.  
  50. {---------------------------------------------------------------------------|
  51.  DV_Pause gives back TimeSlices to DesqView so the other programs run more
  52.           smoothly. Use it while waiting for input or output.
  53. |--------------------------------------------------------------------------}
  54.  
  55. Procedure Dv_Pause;
  56.  
  57. {---------------------------------------------------------------------------|
  58.  DV_Start_Critical
  59.  DV_Stop_Critical   Use those two with care! They start/stop desqviews
  60.                     multitasking!
  61. |--------------------------------------------------------------------------}
  62.  
  63. Procedure Dv_Start_Critical;
  64. Procedure Dv_Stop_Critical;
  65.  
  66.  
  67. Implementation
  68.  
  69. {-----------------------------------------------------------------------------|
  70.  DesqView support
  71. |-----------------------------------------------------------------------------}
  72.  
  73. Var VBufSeg  : Word   ;    { Two temporarily var's        }
  74.     VBufOfs  : Word   ;    {                              }
  75.  
  76. {$L DesqView}  { Needs the DesqView.Obj file! }
  77.  
  78. Procedure CheckDv;           External; { Check for the presence of DV }
  79. Procedure Get_Video_Buffer;  External; { Get the virtual videobuffer  }
  80. Procedure Dv_Pause;          External; { Give slices back to DV       }
  81. Procedure Dv_Start_Critical; External; { Stop multitasking            }
  82. Procedure Dv_Stop_Critical;  External; { Restart multitasking         }
  83.  
  84. Function GetVirtualVideoSegment(FoundSegment : Word):Word;
  85. Begin
  86. VBufSeg:=FoundSegment;
  87. VBufOfs:=0;
  88. Get_Video_Buffer;
  89. GetVirtualVideoSegment:=VBufSeg;
  90. End;
  91.  
  92. Begin
  93. CheckDV;
  94. End.
  95.