home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / pcq_incl3v1.lha / Graphics / Clip.i < prev    next >
Encoding:
Text File  |  1994-04-15  |  2.9 KB  |  92 lines

  1. {
  2.     Clip.i of PCQ Pascal
  3.  
  4.     These are the types used for layer and clipping stuff.
  5. }
  6.  
  7. {$I   "Include:Graphics/GFX.i"}
  8. {$I   "Include:Exec/Semaphores.i"}
  9.  
  10. type
  11.  
  12. { structures used by and constructed by windowlib.a }
  13. { understood by rom software }
  14.  
  15.     ClipRect = Record
  16.         Next    : ^ClipRect;    { roms used to find next ClipRect }
  17.         prev    : ^ClipRect;    { ignored by roms, used by windowlib }
  18.         lobs    : Address;      { ignored by roms, used by windowlib (LayerPtr)}
  19.         BitMap  : Address;
  20.         bounds  : Rectangle;    { set up by windowlib, used by roms }
  21.         _p1,
  22.         _p2     : ^ClipRect;    { system reserved }
  23.         reserved : Integer;     { system use }
  24.         Flags   : Integer;      { only exists in layer allocation }
  25.     end;
  26.     ClipRectPtr = ^ClipRect;
  27.  
  28.     Layer = record
  29.         front,
  30.         back            : ^Layer;       { ignored by roms }
  31.         ClipRect        : ClipRectPtr;  { read by roms to find first cliprect }
  32.         rp              : Address;      { (RastPortPtr) ignored by roms, I hope }
  33.         bounds          : Rectangle;    { ignored by roms }
  34.         reserved        : Array [0..3] of Byte;
  35.         priority        : Short;        { system use only }
  36.         Flags           : Short;        { obscured ?, Virtual BitMap? }
  37.         SuperBitMap     : Address;
  38.         SuperClipRect   : ClipRectPtr;  { super bitmap cliprects if 
  39.                                                 VBitMap != 0}
  40.                                         { else damage cliprect list for refresh }
  41.         Window          : Address;      { reserved for user interface use }
  42.         Scroll_X,
  43.         Scroll_Y        : Short;
  44.         cr,
  45.         cr2,
  46.         crnew           : ClipRectPtr;  { used by dedice }
  47.         SuperSaveClipRects : ClipRectPtr; { preallocated cr's }
  48.         _cliprects      : ClipRectPtr;  { system use during refresh }
  49.         LayerInfo       : Address;      { points to head of the list }
  50.         Lock            : SignalSemaphore;
  51.         reserved3       : Array [0..7] of Byte;
  52.         ClipRegion      : Address;
  53.         saveClipRects   : Address;      { used to back out when in trouble}
  54.         reserved2       : Array [0..21] of Byte;
  55.         { this must stay here }
  56.         DamageList      : Address;      { list of rectangles to refresh 
  57.                                                 through }
  58.     end;
  59.     LayerPtr = ^Layer;
  60.  
  61. const
  62.  
  63. { internal cliprect flags }
  64.  
  65.     CR_NEEDS_NO_CONCEALED_RASTERS       = 1;
  66.     CR_NEEDS_NO_LAYERBLIT_DAMAGE        = 2;
  67.  
  68.  
  69. { defines for code values for getcode }
  70.  
  71.     ISLESSX     = 1;
  72.     ISLESSY     = 2;
  73.     ISGRTRX     = 4;
  74.     ISGRTRY     = 8;
  75.  
  76.  
  77. Function AttemptLockLayerRom(layer : LayerPtr) : Boolean;
  78.     External;
  79.  
  80. Procedure CopySBit(layer : LayerPtr);
  81.     External;
  82.  
  83. Procedure LockLayerRom(layer : LayerPtr);
  84.     External;
  85.  
  86. Procedure SyncSBitMap(layer : LayerPtr);
  87.     External;
  88.  
  89. Procedure UnlockLayerRom(layer : LayerPtr);
  90.     External;
  91.  
  92.