home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Text_Autodocs / layers.doc < prev    next >
Encoding:
Text File  |  1992-09-12  |  23.2 KB  |  914 lines

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