home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.0 / Text_Autodocs / layers.doc < prev    next >
Encoding:
Text File  |  1992-09-02  |  29.6 KB  |  1,033 lines

  1. TABLE OF CONTENTS
  2.  
  3. layers.library/BeginUpdate
  4. layers.library/BehindLayer
  5. layers.library/CreateBehindHookLayer
  6. layers.library/CreateBehindLayer
  7. layers.library/CreateUpfrontHookLayer
  8. layers.library/CreateUpfrontLayer
  9. layers.library/DeleteLayer
  10. layers.library/DisposeLayerInfo
  11. layers.library/EndUpdate
  12. layers.library/FattenLayerInfo
  13. layers.library/InitLayers
  14. layers.library/InstallClipRegion
  15. layers.library/InstallLayerHook
  16. layers.library/LockLayer
  17. layers.library/LockLayerInfo
  18. layers.library/LockLayers
  19. layers.library/MoveLayer
  20. layers.library/MoveLayerInFrontOf
  21. layers.library/MoveSizeLayer
  22. layers.library/NewLayerInfo
  23. layers.library/ScrollLayer
  24. layers.library/SizeLayer
  25. layers.library/SwapBitsRastPortClipRect
  26. layers.library/ThinLayerInfo
  27. layers.library/UnlockLayer
  28. layers.library/UnlockLayerInfo
  29. layers.library/UnlockLayers
  30. layers.library/UpfrontLayer
  31. layers.library/WhichLayer
  32. layers.library/BeginUpdate                         layers.library/BeginUpdate
  33.  
  34.     NAME
  35.     BeginUpdate -- Prepare to repair damaged layer.
  36.  
  37.     SYNOPSIS
  38.     result = BeginUpdate( l )
  39.     d0                    a0
  40.  
  41.     LONG BeginUpdate( struct Layer *);
  42.  
  43.     FUNCTION
  44.     Convert damage list to ClipRect list and swap in for
  45.     programmer to redraw through. This routine simulates
  46.     the ROM library environment. The idea is to only render in the
  47.     "damaged" areas, saving time over redrawing all of the layer.
  48.     The layer is locked against changes made by the layer library.
  49.  
  50.     INPUTS
  51.     l - pointer to a layer
  52.  
  53.     RESULTS
  54.     result - TRUE if damage list converted to ClipRect list sucessfully.
  55.              FALSE if list conversion aborted. (probably out of memory)
  56.  
  57.     BUGS
  58.     If BeginUpdate returns FALSE, programmer must abort the attempt to
  59.     refresh this layer and instead call EndUpdate( l, FALSE ) to restore
  60.     original ClipRect and damage list.
  61.  
  62.     SEE ALSO
  63.     EndUpdate, graphics/layers.h, graphics/clip.h
  64.  
  65. layers.library/BehindLayer                         layers.library/BehindLayer
  66.  
  67.     NAME
  68.     BehindLayer -- Put layer behind other layers.
  69.  
  70.     SYNOPSIS
  71.     result = BehindLayer( dummy, l )
  72.     d0                    a0     a1
  73.  
  74.     LONG BehindLayer( LONG, struct Layer *);
  75.  
  76.     FUNCTION
  77.     Move this layer to the most behind position swapping bits
  78.     in and out of the display with other layers.
  79.     If other layers are REFRESH then collect their damage lists and
  80.     set the LAYERREFRESH bit in the Flags fields of those layers that
  81.     may be revealed.  If this layer is a backdrop layer then
  82.     put this layer behind all other backdrop layers.
  83.     If this layer is NOT a backdrop layer then put in front of the
  84.     top backdrop layer and behind all other layers.
  85.  
  86.     Note: this operation may generate refresh events in other layers
  87.        associated with this layer's Layer_Info structure.
  88.  
  89.     INPUTS
  90.     dummy - unused
  91.     l - pointer to a layer
  92.  
  93.     RESULTS
  94.     result - TRUE    if operation successful
  95.              FALSE   if operation unsuccessful (probably out of memory)
  96.  
  97.     BUGS
  98.  
  99.     SEE ALSO
  100.        graphics/layers.h, graphics/clip.h
  101.  
  102. layers.library/CreateBehindHookLayer     layers.library/CreateBehindHookLayer
  103.  
  104.     NAME                                                              (V36)
  105.     CreateBehindHookLayer -- Create a new layer behind all existing layers,
  106.                              using supplied callback BackFill hook.
  107.  
  108.     SYNOPSIS
  109.     result = CreateBehindHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
  110.     d0                             a0 a1 d0 d1 d2 d3 d4    a3   [ a2 ]
  111.  
  112.     struct Layer *CreateBehindHookLayer(struct Layer_Info *, struct BitMap *,
  113.         LONG, LONG, LONG, LONG, LONG, struct Hook *, ... );
  114.  
  115.     FUNCTION
  116.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  117.     Make this layer of type found in flags.
  118.     Install Layer->BackFill callback Hook.
  119.     If SuperBitMap, use bm2 as pointer to real SuperBitMap,
  120.     and copy contents of Superbitmap into display layer.
  121.     If this layer is a backdrop layer then place it behind all
  122.     other layers including other backdrop layers. If this is
  123.     not a backdrop layer then place it behind all nonbackdrop
  124.     layers.
  125.  
  126.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  127.  
  128.     INPUTS
  129.     li - pointer to LayerInfo structure
  130.     bm - pointer to common BitMap used by all Layers
  131.     x0,y0 - upper left hand corner of layer
  132.     x1,y1 - lower right hand corner of layer
  133.     flags - various types of layers supported as bit sets.
  134.             (for bit definitions, see graphics/layers.h )
  135.     hook -  Layer->BackFill callback Hook which will be called
  136.             with object == (struct RastPort *) result->RastPort
  137.             and message == [ (Layer *) layer, (struct Rectangle) bounds,
  138.                            (WORD) offsetx, (WORD) offsety ]
  139.     bm2 - pointer to optional Super BitMap
  140.  
  141.     RESULTS
  142.     result - pointer to Layer structure if successful
  143.              NULL if not successful
  144.  
  145.     BUGS
  146.  
  147.     SEE ALSO
  148.     DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  149.     utility/hooks.h
  150.  
  151. layers.library/CreateBehindLayer             layers.library/CreateBehindLayer
  152.  
  153.     NAME
  154.     CreateBehindLayer -- Create a new layer behind all existing layers.
  155.  
  156.     SYNOPSIS
  157.     result = CreateBehindLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
  158.     d0                         a0 a1 d0 d1 d2 d3   d4  [ a2 ]
  159.  
  160.     struct Layer *CreateBehindLayer(struct Layer_Info *, struct BitMap *,
  161.         LONG, LONG, LONG, LONG, LONG, ... );
  162.  
  163.     FUNCTION
  164.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  165.     Make this layer of type found in flags.
  166.     If SuperBitMap, use bm2 as pointer to real SuperBitMap,
  167.     and copy contents of Superbitmap into display layer.
  168.     If this layer is a backdrop layer then place it behind all
  169.     other layers including other backdrop layers. If this is
  170.     not a backdrop layer then place it behind all nonbackdrop
  171.     layers.
  172.  
  173.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  174.  
  175.     INPUTS
  176.     li - pointer to LayerInfo structure
  177.     bm - pointer to common BitMap used by all Layers
  178.     x0,y0 - upper left hand corner of layer
  179.     x1,y1 - lower right hand corner of layer
  180.     flags - various types of layers supported as bit sets.
  181.             (for bit definitions, see graphics/layers.h )
  182.     bm2 - pointer to optional Super BitMap
  183.  
  184.     RESULTS
  185.     result - pointer to Layer structure if successful
  186.              NULL if not successful
  187.  
  188.     BUGS
  189.  
  190.     SEE ALSO
  191.     DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  192.  
  193. layers.library/CreateUpfrontHookLayer   layers.library/CreateUpfrontHookLayer
  194.  
  195.     NAME                                                              (V36)
  196.     CreateUpfrontHookLayer -- Create a new layer on top of existing layers,
  197.                               using supplied callback BackFill hook.
  198.  
  199.     SYNOPSIS
  200.     result = CreateUpfrontHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
  201.     d0                              a0 a1 d0 d1 d2 d3   d4  a3   [ a2 ]
  202.  
  203.     struct Layer *CreateUpfrontHookLayer(struct Layer_Info *, struct BitMap *,
  204.         LONG, LONG, LONG, LONG, LONG, struct Hook *, ... );
  205.  
  206.     FUNCTION
  207.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  208.     and place it on top of all other layers.
  209.     Make this layer of type found in flags
  210.     Install Layer->BackFill callback hook.
  211.     if SuperBitMap, use bm2 as pointer to real SuperBitMap.
  212.     and copy contents of Superbitmap into display layer.
  213.  
  214.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  215.  
  216.     INPUTS
  217.     li - pointer to LayerInfo structure
  218.     bm - pointer to common BitMap used by all Layers
  219.     x0,y0 - upper left hand corner of layer
  220.     x1,y1 - lower right hand corner of layer
  221.     flags - various types of layers supported as bit sets.
  222.     hook -  Layer->BackFill callback Hook which will be called
  223.             with object == (struct RastPort *) result->RastPort
  224.             and message == [ (Layer *) layer, (struct Rectangle) bounds,
  225.                            (WORD) offsetx, (WORD) offsety ]
  226.     bm2 - pointer to optional Super BitMap
  227.  
  228.     RESULTS
  229.     result - pointer to Layer structure if successful
  230.              NULL if not successful
  231.  
  232.     BUGS
  233.  
  234.     SEE ALSO
  235.        DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  236.     utility/hooks.h
  237.  
  238. layers.library/CreateUpfrontLayer           layers.library/CreateUpfrontLayer
  239.  
  240.     NAME
  241.     CreateUpfrontLayer -- Create a new layer on top of existing layers.
  242.  
  243.     SYNOPSIS
  244.     result = CreateUpfrontLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
  245.     d0                          a0 a1 d0 d1 d2 d3   d4  [ a2 ]
  246.  
  247.     struct Layer *CreateUpfrontLayer(struct Layer_Info *, struct BitMap *,
  248.         LONG, LONG, LONG, LONG, LONG, ... );
  249.  
  250.     FUNCTION
  251.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  252.     and place it on top of all other layers.
  253.     Make this layer of type found in flags
  254.     if SuperBitMap, use bm2 as pointer to real SuperBitMap.
  255.     and copy contents of Superbitmap into display layer.
  256.  
  257.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  258.  
  259.     INPUTS
  260.     li - pointer to LayerInfo structure
  261.     bm - pointer to common BitMap used by all Layers
  262.     x0,y0 - upper left hand corner of layer
  263.     x1,y1 - lower right hand corner of layer
  264.     flags - various types of layers supported as bit sets.
  265.     bm2 - pointer to optional Super BitMap
  266.  
  267.     RESULTS
  268.     result - pointer to Layer structure if successful
  269.              NULL if not successful
  270.  
  271.     BUGS
  272.  
  273.     SEE ALSO
  274.        DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  275.  
  276. layers.library/DeleteLayer                         layers.library/DeleteLayer
  277.  
  278.     NAME
  279.     DeleteLayer -- delete layer from layer list.
  280.  
  281.     SYNOPSIS
  282.     result = DeleteLayer( dummy, l )
  283.     d0                    a0,    a1
  284.  
  285.     LONG DeleteLayer( LONG, struct Layer *);
  286.  
  287.     FUNCTION
  288.     Remove this layer from the list of layers.  Release memory
  289.     associated with it.  Restore other layers that may have been
  290.     obscured by it.  Trigger refresh in those that may need it.
  291.     If this is a superbitmap layer make sure SuperBitMap is current.
  292.     The SuperBitMap is not removed from the system but is available
  293.     for program use even though the rest of the layer information has
  294.     been deallocated.
  295.  
  296.     INPUTS
  297.     dummy - unused
  298.     l - pointer to a layer
  299.  
  300.     RESULTS
  301.     result - TRUE if this layer successfully deleted from the system
  302.              FALSE if layer not deleted. (probably out of memory )
  303.  
  304.     BUGS
  305.  
  306.     SEE ALSO
  307.     graphics/layers.h, graphics/clip.h
  308.  
  309. layers.library/DisposeLayerInfo               layers.library/DisposeLayerInfo
  310.  
  311.     NAME
  312.     DisposeLayerInfo -- Return all memory for LayerInfo to memory pool
  313.  
  314.     SYNOPSIS
  315.     DisposeLayerInfo( li )
  316.                       a0
  317.  
  318.     void DisposeLayerInfo( struct Layer_Info *);
  319.  
  320.     FUNCTION
  321.     return LayerInfo and any other memory attached to this LayerInfo
  322.     to memory allocator.
  323.  
  324.     Note: if you wish to delete the layers associated with this Layer_Info
  325.         structure, remember to call DeleteLayer() for each of the layers
  326.         before calling DisposeLayerInfo().
  327.  
  328.     INPUTS
  329.     li - pointer to LayerInfo structure
  330.  
  331.     EXAMPLE
  332.  
  333.     -- delete the layers associated this Layer_Info structure --
  334.  
  335.     DeleteLayer(li,simple_layer);
  336.     DeleteLayer(li,smart_layer);
  337.  
  338.     -- see documentation on DeleteLayer about deleting SuperBitMap layers --
  339.     my_super_bitmap_ptr = super_layer->SuperBitMap;
  340.     DeleteLayer(li,super_layer);
  341.  
  342.     -- now dispose of the Layer_Info structure itself --
  343.     DisposeLayerInfo(li);
  344.  
  345.  
  346.     BUGS
  347.  
  348.     SEE ALSO
  349.     DeleteLayer, graphics/layers.h
  350.  
  351. layers.library/EndUpdate                             layers.library/EndUpdate
  352.  
  353.     NAME
  354.     EndUpdate -- remove damage list and restore state of layer to normal.
  355.  
  356.     SYNOPSIS
  357.     EndUpdate( l, flag )
  358.                a0  d0
  359.  
  360.     void EndUpdate( struct Layer *, UWORD);
  361.  
  362.     FUNCTION
  363.     After the programmer has redrawn his picture he calls this
  364.     routine to restore the ClipRects to point to his standard
  365.     layer tiling. The layer is then unlocked for access by the
  366.     layer library.
  367.  
  368.     Note: use flag = FALSE if you are only making a partial update.
  369.         You may use the other region functions (graphics functions such as
  370.         OrRectRegion, AndRectRegion, and XorRectRegion ) to clip adjust
  371.         the DamageList to reflect a partial update.
  372.  
  373.     INPUTS
  374.     l - pointer to a layer
  375.     flag - use TRUE if update was completed. The damage list is cleared.
  376.            use FALSE if update not complete. The damage list is retained.
  377.  
  378.     EXAMPLE
  379.  
  380.     -- begin update for first part of two-part refresh --
  381.     BeginUpdate(my_layer);
  382.  
  383.     -- do some refresh, but not all --
  384.     my_partial_refresh_routine(my_layer);
  385.  
  386.     -- end update, false (not completely done refreshing yet) --
  387.     EndUpdate(my_layer, FALSE);
  388.  
  389.     -- begin update for last part of refresh --
  390.     BeginUpdate(my_layer);
  391.  
  392.     -- do rest of refresh --
  393.     my_complete_refresh_routine(my_layer);
  394.  
  395.     -- end update, true (completely done refreshing now) --
  396.     EndUpdate(my_layer, TRUE);
  397.  
  398.     BUGS
  399.  
  400.     SEE ALSO
  401.     BeginUpdate, graphics/layers.h, graphics/clip.h
  402.  
  403. layers.library/FattenLayerInfo                 layers.library/FattenLayerInfo
  404.  
  405.     NAME
  406.     FattenLayerInfo -- convert 1.0 LayerInfo to 1.1 LayerInfo
  407.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  408.  
  409.     SYNOPSIS
  410.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  411.     FattenLayerInfo( li )
  412.                      a0
  413.  
  414.     LONG FattenLayerInfo( struct Layer_Info *);
  415.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  416.  
  417.     FUNCTION
  418.     V1.1 software and any later releases need to have more info in the
  419.     Layer_Info structure. To do this in a 1.0 supportable manner requires
  420.     allocation and deallocation of the memory whenever most
  421.     layer library functions are called.  To prevent unnecessary
  422.     allocation/deallocation FattenLayerInfo will preallocate the
  423.     necessary data structures and fake out the layer library into
  424.     thinking it has a LayerInfo gotten from NewLayerInfo.
  425.     NewLayerInfo is the approved method for getting this structure.
  426.     When a program needs to give up the LayerInfo structure it
  427.     must call ThinLayerInfo before freeing the memory. ThinLayerInfo
  428.     is not necessary if New/DisposeLayerInfo are used however.
  429.  
  430.     INPUTS
  431.     li - pointer to LayerInfo structure
  432.  
  433.     BUGS
  434.  
  435.     SEE ALSO
  436.  
  437.     NewLayerInfo, ThinLayerInfo, DisposeLayerInfo, graphics/layers.h
  438.  
  439. layers.library/InitLayers                           layers.library/InitLayers
  440.  
  441.     NAME
  442.     InitLayers -- Initialize Layer_Info structure
  443.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  444.  
  445.     SYNOPSIS
  446.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  447.     InitLayers( li )
  448.                 a0
  449.  
  450.     void InitLayers( struct Layer_Info *);
  451.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  452.  
  453.     FUNCTION
  454.     Initialize Layer_Info structure in preparation to use
  455.     other layer operations on this list of layers.
  456.     Make the Layers unlocked (open), available to layer operations.
  457.  
  458.     INPUTS
  459.     li - pointer to LayerInfo structure
  460.  
  461.     BUGS
  462.  
  463.     SEE ALSO
  464.     NewLayerInfo, DisposeLayerInfo, graphics/layers.h
  465.  
  466. layers.library/InstallClipRegion             layers.library/InstallClipRegion
  467.  
  468.     NAME
  469.     InstallClipRegion -- Install clip region in layer
  470.  
  471.     SYNOPSIS
  472.     oldclipregion = InstallClipRegion( l,  region )
  473.     d0                                 a0  a1
  474.  
  475.     struct Region *InstallClipRegion( struct Layer *, struct Region *);
  476.  
  477.     FUNCTION
  478.     Installs a transparent Clip region in the layer. All
  479.     subsequent graphics calls will be clipped to this region.
  480.     You MUST remember to call InstallClipRegion(l,NULL) before
  481.     calling DeleteLayer(l) or the Intuition function CloseWindow()
  482.      if you have installed a non-NULL ClipRegion in l.
  483.  
  484.     INPUTS
  485.     l - pointer to a layer
  486.     region - pointer to a region
  487.  
  488.     RESULTS
  489.     oldclipregion - The pointer to the previous ClipRegion that
  490.         was installed. Returns NULL if no previous ClipRegion installed.
  491.  
  492.         Note: If the system runs out of memory while computing the
  493.             resulting ClipRects the LAYERS_CLIPRECTS_LOST bit will
  494.             be set in l->Flags.
  495.  
  496.     BUGS
  497.     If the system runs out of memory during normal layer operations,
  498.     the ClipRect list may get swept away and not restored.
  499.     As soon as there is enough memory and the layer library
  500.     gets called again the ClipRect list will be rebuilt.
  501.  
  502.     SEE ALSO
  503.     BeginUpdate EndUpdate,
  504.     graphics/layers.h, graphics/clip.h, graphics/regions.h
  505.  
  506. layers.library/InstallLayerHook               layers.library/InstallLayerHook
  507.  
  508.     NAME                                                              (V36)
  509.     InstallLayerHook -- safely install a new Layer->BackFill hook.
  510.  
  511.     SYNOPSIS
  512.     oldhook = InstallLayerHook( layer, hook )
  513.     d0                          a0     a1
  514.  
  515.     struct Hook *InstallLayerHook( struct Layer *, struct Hook *);
  516.  
  517.     FUNCTION
  518.     Installs a new Layer->Backfill Hook, waiting until it is safe to do
  519.     so. Locks the layer while substituting the new Hook and removing the
  520.     old one. If a new Hook is not provided, will install the default layer
  521.     BackFill Hook.
  522.  
  523.     INPUTS
  524.     layer - pointer to the layer in which to install the Backfill Hook.
  525.     hook -  pointer to layer callback Hook which will be called
  526.             with object == (struct RastPort *) result->RastPort
  527.             and message == [ (Layer *) layer, (struct Rectangle) bounds,
  528.                            (WORD) offsetx, (WORD) offsety ]
  529.  
  530.             This hook should fill the Rectangle in the RastPort
  531.             with the BackFill pattern appropriate for offset x/y.
  532.  
  533.             If this hook pointer is NULL, the function installs
  534.             the "default" Layers BackFill Hook into this Layer.
  535.  
  536.     RESULTS
  537.     oldhook - pointer to the Layer->BackFill Hook that was previously
  538.               active.
  539.  
  540.     BUGS
  541.  
  542.     SEE ALSO
  543.     graphics/clip.h utility/hooks.h
  544.  
  545. layers.library/LockLayer                             layers.library/LockLayer
  546.  
  547.     NAME
  548.     LockLayer -- Lock layer to make changes to ClipRects.
  549.  
  550.     SYNOPSIS
  551.     LockLayer( dummy, l )
  552.                a0     a1
  553.  
  554.     void LockLayer( LONG, struct Layer *);
  555.  
  556.     FUNCTION
  557.     Make this layer unavailable for other tasks to use.
  558.     If another task is already using this layer then wait for
  559.     it to complete and then reserve the layer for your own use.
  560.     (this function does the same thing as graphics.library/LockLayerRom)
  561.  
  562.     Note: if you wish to lock MORE THAN ONE layer at a time, you
  563.         must call LockLayerInfo() before locking those layers and
  564.         then call UnlockLayerInfo() when you have finished. This
  565.         is to prevent system "deadlocks".
  566.  
  567.     Further Note: while you hold the lock on a layer, Intuition will block
  568.         on operations such as windowsizing, dragging, menus, and depth
  569.         arranging windows in this layer's screen.  It is recommended that
  570.         YOU do not make Intuition function calls while the layer is locked.
  571.  
  572.     INPUTS
  573.     dummy - unused
  574.     l - pointer to a layer
  575.  
  576.     BUGS
  577.  
  578.     SEE ALSO
  579.     UnlockLayer, LockLayerInfo, UnlockLayerInfo,
  580.     graphics.library/LockLayerRom, graphics/layers.h, graphics/clip.h
  581.  
  582. layers.library/LockLayerInfo                     layers.library/LockLayerInfo
  583.  
  584.     NAME
  585.     LockLayerInfo -- Lock the LayerInfo structure.
  586.  
  587.     SYNOPSIS
  588.     LockLayerInfo( li )
  589.                    a0
  590.  
  591.     void LockLayerInfo( struct Layer_Info *);
  592.  
  593.     FUNCTION
  594.     Before doing an operation that requires the LayerInfo
  595.     structure, make sure that no other task is also using the
  596.     LayerInfo structure.  LockLayerInfo() returns when the
  597.     LayerInfo belongs to this task.  There should be
  598.     an UnlockLayerInfo for every LockLayerInfo.
  599.  
  600.     Note: All layer routines presently LockLayerInfo() when they
  601.     start up and UnlockLayerInfo() as they exit.  Programmers
  602.     will need to use these Lock/Unlock routines if they wish
  603.     to do something with the LayerStructure that is not
  604.     supported by the layer library.
  605.  
  606.     INPUTS
  607.     li - pointer to Layer_Info structure
  608.  
  609.     BUGS
  610.  
  611.     SEE ALSO
  612.     UnlockLayerInfo, graphics/layers.h
  613.  
  614. layers.library/LockLayers                           layers.library/LockLayers
  615.  
  616.     NAME
  617.     LockLayers -- lock all layers from graphics output.
  618.  
  619.     SYNOPSIS
  620.     LockLayers( li )
  621.                 a0
  622.  
  623.     void LockLayers( struct Layer_Info *);
  624.  
  625.     FUNCTION
  626.     First calls LockLayerInfo()
  627.     Make all layers in this layer list locked.
  628.  
  629.     INPUTS
  630.     li - pointer to Layer_Info structure
  631.  
  632.     BUGS
  633.  
  634.     SEE ALSO
  635.     LockLayer, LockLayerInfo, graphics/layers.h
  636.  
  637. layers.library/MoveLayer                             layers.library/MoveLayer
  638.  
  639.     NAME
  640.     MoveLayer -- Move layer to new position in BitMap.
  641.  
  642.     SYNOPSIS
  643.     result = MoveLayer( dummy, l, dx, dy )
  644.     d0                  a0     a1 d0  d1
  645.  
  646.     LONG MoveLayer( LONG, struct Layer *, LONG, LONG);
  647.  
  648.     FUNCTION
  649.     Move this layer to new position in shared BitMap.
  650.     If any refresh layers become revealed, collect damage and
  651.     set REFRESH bit in layer Flags.
  652.  
  653.     INPUTS
  654.     dummy - unused
  655.     l - pointer to a nonbackdrop layer
  656.     dx - delta to add to current x position
  657.     dy - delta to add to current y position
  658.  
  659.     RETURNS
  660.     result - TRUE if operation successful
  661.              FALSE if failed (out of memory)
  662.  
  663.     BUGS
  664.     May not handle (dx,dy) which attempts to move the layer ouside the
  665.     layer's RastPort->BitMap bounds .
  666.  
  667.     SEE ALSO
  668.     graphics/layers.h, graphics/clip.h
  669.  
  670. layers.library/MoveLayerInFrontOf           layers.library/MoveLayerInFrontOf
  671.  
  672.     NAME
  673.     MoveLayerInFrontOf -- Put layer in front of another layer.
  674.  
  675.     SYNOPSIS
  676.     result = MoveLayerInFrontOf( layertomove, targetlayer )
  677.                                     a0           a1
  678.  
  679.     LONG MoveLayerInFrontOf( struct Layer *, struct Layer *);
  680.  
  681.     FUNCTION
  682.     Move this layer in front of target layer, swapping bits
  683.     in and out of the display with other layers.
  684.     If this is a refresh layer then collect damage list and
  685.     set the LAYERREFRESH bit in layer->Flags if redraw required.
  686.  
  687.     Note: this operation may generate refresh events in other layers
  688.         associated with this layer's Layer_Info structure.
  689.  
  690.     INPUTS
  691.     layertomove - pointer to layer which should be moved
  692.     targetlayer - pointer to target layer in front of which to move layer
  693.  
  694.     RESULTS
  695.     result = TRUE    if operation successful
  696.              FALSE   if operation unsuccessful (probably out of memory)
  697.  
  698.     BUGS
  699.  
  700.     SEE ALSO
  701.     graphics/layers.h
  702.  
  703. layers.library/MoveSizeLayer                     layers.library/MoveSizeLayer
  704.  
  705.     NAME                                                              (V36)
  706.     MoveSizeLayer -- Position/Size layer
  707.  
  708.     SYNOPSIS
  709.     result = MoveSizeLayer( layer, dx, dy, dw, dh )
  710.     d0                      a0     d0  d1  d2  d3
  711.  
  712.     LONG MoveSizeLayer( struct Layer *, LONG, LONG, LONG, LONG);
  713.  
  714.     FUNCTION
  715.     Change upperleft and lower right position of Layer.
  716.  
  717.     INPUTS
  718.     dummy - unused
  719.     l - pointer to a nonbackdrop layer
  720.     dx,dy - change upper left corner by (dx,dy)
  721.     dw,dy - change size by (dw,dh)
  722.  
  723.     RETURNS
  724.     result - TRUE if operation successful
  725.              FALSE if failed (due to out of memory)
  726.              FALSE if failed (due to illegal layer->bounds)
  727.  
  728.     BUGS
  729.  
  730.     SEE ALSO
  731.     graphics/layers.h, graphics/clip.h
  732.  
  733. layers.library/NewLayerInfo                       layers.library/NewLayerInfo
  734.  
  735.     NAME
  736.     NewLayerInfo -- Allocate and Initialize full Layer_Info structure.
  737.  
  738.     SYNOPSIS
  739.     result = NewLayerInfo()
  740.     d0
  741.  
  742.     struct Layer_Info *NewLayerInfo( void );
  743.  
  744.     FUNCTION
  745.     Allocate memory required for full Layer_Info structure.
  746.     Initialize Layer_Info structure in preparation to use
  747.     other layer operations on this list of layers.
  748.     Make the Layer_Info unlocked (open).
  749.  
  750.     INPUTS
  751.     None
  752.  
  753.     RESULT
  754.     result- pointer to Layer_Info structure if successful
  755.             NULL if not enough memory
  756.  
  757.     BUGS
  758.  
  759.     SEE ALSO
  760.     graphics/layers.h
  761.  
  762. layers.library/ScrollLayer                         layers.library/ScrollLayer
  763.  
  764.     NAME
  765.     ScrollLayer -- Scroll around in a superbitmap, translate coordinates
  766.                       in non-superbitmap layer.
  767.  
  768.     SYNOPSIS
  769.     ScrollLayer( dummy, l, dx, dy )
  770.                  a0     a1 d0  d1
  771.  
  772.     void ScrollLayer( LONG, struct Layer *, LONG, LONG);
  773.  
  774.     FUNCTION
  775.     For a SuperBitMap Layer:
  776.     Update the SuperBitMap from the layer display, then copy bits
  777.     between Layer and SuperBitMap to reposition layer over different
  778.     portion of SuperBitMap.
  779.     For nonSuperBitMap layers, all (x,y) pairs are adjusted by
  780.     the scroll(x,y) value in the layer.  To cause (0,0) to actually
  781.     be drawn at (3,10) use ScrollLayer(-3,-10). This can be useful
  782.     along with InstallClipRegion to simulate Intuition GZZWindows
  783.     without the overhead of an extra layer.
  784.  
  785.     INPUTS
  786.     dummy - unused
  787.     l - pointer to a layer
  788.     dx - delta to add to current x scroll value
  789.     dy - delta to add to current y scroll value
  790.  
  791.     BUGS
  792.     May not handle (dx,dy) which attempts to move the layer ouside the
  793.     layer's SuperBitMap bounds.
  794.  
  795.     SEE ALSO
  796.     graphics/layers.h
  797.  
  798. layers.library/SizeLayer                             layers.library/SizeLayer
  799.  
  800.     NAME
  801.     SizeLayer -- Change the size of this nonbackdrop layer.
  802.  
  803.     SYNOPSIS
  804.     result = SizeLayer( dummy, l, dx, dy )
  805.     d0                  a0     a1 d0  d1
  806.  
  807.     LONG SizeLayer( LONG, struct Layer *, LONG, LONG);
  808.  
  809.     FUNCTION
  810.     Change the size of this layer by (dx,dy). The lower right hand
  811.     corner is extended to make room for the larger layer.
  812.     If there is SuperBitMap for this layer then copy pixels into
  813.     or out of the layer depending on whether the layer increases or
  814.     decreases in size.  Collect damage list for those layers that may
  815.     need to be refreshed if damage occurred.
  816.  
  817.     INPUTS
  818.     dummy - unused
  819.     l - pointer to a nonbackdrop layer
  820.     dx - delta to add to current x size
  821.     dy - delta to add to current y size
  822.  
  823.     RESULTS
  824.     result - TRUE if operation successful
  825.              FALSE if failed (out of memory)
  826.  
  827.     BUGS
  828.  
  829.     SEE ALSO
  830.     graphics/layers.h, graphics/clip.h
  831.  
  832. layers.library/SwapBitsRastPortClipRectayers.library/SwapBitsRastPortClipRect
  833.  
  834.     NAME
  835.     SwapBitsRastPortClipRect -- Swap bits between common bitmap
  836.                                 and obscured ClipRect
  837.  
  838.     SYNOPSIS
  839.     SwapBitsRastPortClipRect( rp, cr )
  840.                               a0  a1
  841.  
  842.     void SwapBitsRastPortClipRect( struct RastPort *, struct ClipRect *);
  843.  
  844.     FUNCTION
  845.     Support routine useful for those that need to do some
  846.     operations not done by the layer library.  Allows programmer
  847.     to swap the contents of a small BitMap with a subsection of
  848.     the display. This is accomplished without using extra memory.
  849.     The bits in the display RastPort are exchanged with the
  850.     bits in the ClipRect's BitMap.
  851.  
  852.     Note: the ClipRect structures which the layer library allocates are
  853.     actually a little bigger than those described in the graphics/clip.h
  854.     include file.  So be warned that it is not a good idea to have
  855.     instances of cliprects in your code.
  856.  
  857.     INPUTS
  858.     rp - pointer to rastport
  859.     cr - pointer to cliprect to swap bits with
  860.  
  861.     NOTE
  862.     Because the blit operation started by this function is done asynchronously,
  863.     it is imperative that a WaitBlit() be performed before releasing or using
  864.     the processor to modify any of the associated structures.
  865.  
  866.     BUGS
  867.  
  868.     SEE ALSO
  869.     graphics/clip.h, graphics/rastport.h, graphics/clip.h
  870.  
  871. layers.library/ThinLayerInfo                     layers.library/ThinLayerInfo
  872.  
  873.     NAME
  874.     ThinLayerInfo -- convert 1.1 LayerInfo to 1.0 LayerInfo.
  875.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  876.  
  877.     SYNOPSIS
  878.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  879.     ThinLayerInfo( li )
  880.                    a0
  881.  
  882.     void ThinLayerInfo( struct Layer_Info *);
  883.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  884.  
  885.     FUNCTION
  886.     return the extra memory needed that was allocated with
  887.     FattenLayerInfo. This is must be done prior to freeing
  888.     the Layer_Info structure itself. V1.1 software should be
  889.     using DisposeLayerInfo.
  890.  
  891.     INPUTS
  892.     li - pointer to LayerInfo structure
  893.  
  894.     BUGS
  895.  
  896.     SEE ALSO
  897.     DisposeLayerInfo, FattenLayerInfo, graphics/layers.h
  898.  
  899. layers.library/UnlockLayer                         layers.library/UnlockLayer
  900.  
  901.     NAME
  902.     UnlockLayer -- Unlock layer and allow graphics routines to use it.
  903.  
  904.     SYNOPSIS
  905.     UnlockLayer( l )
  906.                  a0
  907.  
  908.     void UnlockLayer( struct Layer *);
  909.  
  910.     FUNCTION
  911.     When finished changing the ClipRects or whatever you were
  912.     doing with this layer you must call UnlockLayer() to allow
  913.     other tasks to proceed with graphic output to the layer.
  914.  
  915.     INPUTS
  916.     l - pointer to a layer
  917.  
  918.     BUGS
  919.  
  920.     SEE ALSO
  921.     graphics/layers.h, graphics/clip.h
  922.  
  923. layers.library/UnlockLayerInfo                 layers.library/UnlockLayerInfo
  924.  
  925.     NAME
  926.     UnlockLayerInfo -- Unlock the LayerInfo structure.
  927.  
  928.     SYNOPSIS
  929.     UnlockLayerInfo( li )
  930.                      a0
  931.  
  932.     void UnlockLayerInfo( struct Layer_Info *);
  933.  
  934.     FUNCTION
  935.     After the operation is complete that required a LockLayerInfo,
  936.     unlock the LayerInfo structure so that  other tasks may
  937.     affect the layers.
  938.  
  939.     INPUTS
  940.     li - pointer to the Layer_Info structure
  941.  
  942.      BUGS
  943.  
  944.      SEE ALSO
  945.     LockLayerInfo, graphics/layers.h
  946.  
  947. layers.library/UnlockLayers                       layers.library/UnlockLayers
  948.  
  949.     NAME
  950.     UnlockLayers -- Unlock all layers from graphics output.
  951.                     Restart graphics output to layers that have been waiting
  952.  
  953.     SYNOPSIS
  954.     UnlockLayers( li )
  955.                   a0
  956.  
  957.     void UnlockLayers( struct Layer_Info *);
  958.  
  959.     FUNCTION
  960.     Make all layers in this layer list unlocked.
  961.     Then call UnlockLayerInfo
  962.  
  963.     INPUTS
  964.     li - pointer to the Layer_Info structure
  965.  
  966.     BUGS
  967.  
  968.     SEE ALSO
  969.     LockLayers, UnlockLayer, graphics/layers.h
  970.  
  971. layers.library/UpfrontLayer                       layers.library/UpfrontLayer
  972.  
  973.     NAME
  974.     UpfrontLayer -- Put layer in front of all other layers.
  975.  
  976.     SYNOPSIS
  977.     result = UpfrontLayer( dummy, l )
  978.     d0                     a0     a1
  979.  
  980.     LONG UpfrontLayer( LONG, struct Layer *);
  981.  
  982.     FUNCTION
  983.     Move this layer to the most upfront position swapping bits
  984.     in and out of the display with other layers.
  985.     If this is a refresh layer then collect damage list and
  986.     set the LAYERREFRESH bit in layer->Flags if redraw required.
  987.     By clearing the BACKDROP bit in the layers Flags you may
  988.     bring a Backdrop layer up to the front of all other layers.
  989.  
  990.     Note: this operation may generate refresh events in other layers
  991.        associated with this layer's Layer_Info structure.
  992.  
  993.     INPUTS
  994.     dummy - unused
  995.     l - pointer to a nonbackdrop layer
  996.  
  997.     RESULTS
  998.     result - TRUE   if operation successful
  999.              FALSE  if operation unsuccessful (probably out of memory)
  1000.  
  1001.     BUGS
  1002.  
  1003.     SEE ALSO
  1004.     graphics/layers.h
  1005.  
  1006. layers.library/WhichLayer                           layers.library/WhichLayer
  1007.  
  1008.     NAME
  1009.     WhichLayer -- Which Layer is this point in?
  1010.  
  1011.     SYNOPSIS
  1012.     layer = WhichLayer( li, x, y )
  1013.     d0                  a0  d0 d1
  1014.  
  1015.     struct Layer *WhichLayer(struct Layer_Info*, WORD, WORD);
  1016.  
  1017.     FUNCTION
  1018.     Starting at the topmost layer check to see if this point (x,y)
  1019.         occurs in this layer.  If it does return the pointer to this
  1020.         layer. Return NULL if there is no layer at this point.
  1021.  
  1022.     INPUTS
  1023.     li  = pointer to LayerInfo structure
  1024.     (x,y) = coordinate in the BitMap
  1025.  
  1026.     RESULTS
  1027.     layer - pointer to the topmost layer that this point is in
  1028.             NULL if this point is not in a layer
  1029.  
  1030.     SEE ALSO
  1031.     graphics/layers.h
  1032.  
  1033.