home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Assembler / TFF-AOC.DMS / in.adf / Release3.1 / AutoDocs3.1.lha / doc / layers.doc < prev    next >
Encoding:
Text File  |  1993-08-12  |  36.8 KB  |  1,251 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/DoHookClipRects
  12. layers.library/EndUpdate
  13. layers.library/FattenLayerInfo
  14. layers.library/InitLayers
  15. layers.library/InstallClipRegion
  16. layers.library/InstallLayerHook
  17. layers.library/InstallLayerInfoHook
  18. layers.library/LockLayer
  19. layers.library/LockLayerInfo
  20. layers.library/LockLayers
  21. layers.library/MoveLayer
  22. layers.library/MoveLayerInFrontOf
  23. layers.library/MoveSizeLayer
  24. layers.library/NewLayerInfo
  25. layers.library/ScrollLayer
  26. layers.library/SizeLayer
  27. layers.library/SwapBitsRastPortClipRect
  28. layers.library/ThinLayerInfo
  29. layers.library/UnlockLayer
  30. layers.library/UnlockLayerInfo
  31. layers.library/UnlockLayers
  32. layers.library/UpfrontLayer
  33. layers.library/WhichLayer
  34. layers.library/BeginUpdate                         layers.library/BeginUpdate
  35.  
  36.     NAME
  37.     BeginUpdate -- Prepare to repair damaged layer.
  38.  
  39.     SYNOPSIS
  40.     result = BeginUpdate( l )
  41.     d0                    a0
  42.  
  43.     LONG BeginUpdate( struct Layer *);
  44.  
  45.     FUNCTION
  46.     Convert damage list to ClipRect list and swap in for
  47.     programmer to redraw through. This routine simulates
  48.     the ROM library environment. The idea is to only render in the
  49.     "damaged" areas, saving time over redrawing all of the layer.
  50.     The layer is locked against changes made by the layer library.
  51.  
  52.     INPUTS
  53.     l - pointer to a layer
  54.  
  55.     RESULTS
  56.     result - TRUE if damage list converted to ClipRect list successfully.
  57.              FALSE if list conversion aborted. (probably out of memory)
  58.  
  59.     BUGS
  60.     If BeginUpdate returns FALSE, programmer must abort the attempt to
  61.     refresh this layer and instead call EndUpdate( l, FALSE ) to restore
  62.     original ClipRect and damage list.
  63.  
  64.     SEE ALSO
  65.     EndUpdate, graphics/layers.h, graphics/clip.h
  66.  
  67. layers.library/BehindLayer                         layers.library/BehindLayer
  68.  
  69.     NAME
  70.     BehindLayer -- Put layer behind other layers.
  71.  
  72.     SYNOPSIS
  73.     result = BehindLayer( dummy, l )
  74.     d0                    a0     a1
  75.  
  76.     LONG BehindLayer( LONG, struct Layer *);
  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. layers.library/CreateBehindHookLayer     layers.library/CreateBehindHookLayer
  105.  
  106.     NAME                                                              (V36)
  107.     CreateBehindHookLayer -- Create a new layer behind all existing layers,
  108.                              using supplied callback BackFill hook.
  109.  
  110.     SYNOPSIS
  111.     result = CreateBehindHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
  112.     d0                             a0 a1 d0 d1 d2 d3 d4    a3   [ a2 ]
  113.  
  114.     struct Layer *CreateBehindHookLayer(struct Layer_Info *, struct BitMap *,
  115.         LONG, LONG, LONG, LONG, LONG, struct Hook *, ... );
  116.  
  117.     FUNCTION
  118.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  119.     Make this layer of type found in flags.
  120.     Install Layer->BackFill callback Hook.
  121.     If SuperBitMap, use bm2 as pointer to real SuperBitMap,
  122.     and copy contents of Superbitmap into display layer.
  123.     If this layer is a backdrop layer then place it behind all
  124.     other layers including other backdrop layers. If this is
  125.     not a backdrop layer then place it behind all nonbackdrop
  126.     layers.
  127.  
  128.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  129.  
  130.     INPUTS
  131.     li - pointer to LayerInfo structure
  132.     bm - pointer to common BitMap used by all Layers
  133.     x0,y0 - upper left hand corner of layer
  134.     x1,y1 - lower right hand corner of layer
  135.     flags - various types of layers supported as bit sets.
  136.             (for bit definitions, see graphics/layers.h )
  137.     hook -  Layer->BackFill callback Hook (see InstallLayerHook())
  138.  
  139.             If hook is LAYERS_BACKFILL, the default backfill is
  140.             used for the layer.  (Same as pre-2.0)
  141.  
  142.             As of V39:
  143.         If hook is LAYERS_NOBACKFILL, the layer will not be
  144.             backfilled (NO-OP).
  145.  
  146.     bm2 - pointer to optional Super BitMap
  147.  
  148.     RESULTS
  149.     result - pointer to Layer structure if successful
  150.              NULL if not successful
  151.  
  152.     BUGS
  153.  
  154.     SEE ALSO
  155.     InstallLayerHook, DeleteLayer, graphics/layers.h, graphics/clip.h,
  156.     graphics/gfx.h, utility/hooks.h
  157.  
  158. layers.library/CreateBehindLayer             layers.library/CreateBehindLayer
  159.  
  160.     NAME
  161.     CreateBehindLayer -- Create a new layer behind all existing layers.
  162.  
  163.     SYNOPSIS
  164.     result = CreateBehindLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
  165.     d0                         a0 a1 d0 d1 d2 d3   d4  [ a2 ]
  166.  
  167.     struct Layer *CreateBehindLayer(struct Layer_Info *, struct BitMap *,
  168.         LONG, LONG, LONG, LONG, LONG, ... );
  169.  
  170.     FUNCTION
  171.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  172.     Make this layer of type found in flags.
  173.     If SuperBitMap, use bm2 as pointer to real SuperBitMap,
  174.     and copy contents of Superbitmap into display layer.
  175.     If this layer is a backdrop layer then place it behind all
  176.     other layers including other backdrop layers. If this is
  177.     not a backdrop layer then place it behind all nonbackdrop
  178.     layers.
  179.  
  180.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  181.  
  182.     INPUTS
  183.     li - pointer to LayerInfo structure
  184.     bm - pointer to common BitMap used by all Layers
  185.     x0,y0 - upper left hand corner of layer
  186.     x1,y1 - lower right hand corner of layer
  187.     flags - various types of layers supported as bit sets.
  188.             (for bit definitions, see graphics/layers.h )
  189.     bm2 - pointer to optional Super BitMap
  190.  
  191.     RESULTS
  192.     result - pointer to Layer structure if successful
  193.              NULL if not successful
  194.  
  195.     BUGS
  196.  
  197.     SEE ALSO
  198.     DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  199.  
  200. layers.library/CreateUpfrontHookLayer   layers.library/CreateUpfrontHookLayer
  201.  
  202.     NAME                                                              (V36)
  203.     CreateUpfrontHookLayer -- Create a new layer on top of existing layers,
  204.                               using supplied callback BackFill hook.
  205.  
  206.     SYNOPSIS
  207.     result = CreateUpfrontHookLayer(li,bm,x0,y0,x1,y1,flags,hook,[,bm2])
  208.     d0                              a0 a1 d0 d1 d2 d3   d4  a3   [ a2 ]
  209.  
  210.     struct Layer *CreateUpfrontHookLayer(struct Layer_Info *, struct BitMap *,
  211.         LONG, LONG, LONG, LONG, LONG, struct Hook *, ... );
  212.  
  213.     FUNCTION
  214.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  215.     and place it on top of all other layers.
  216.     Make this layer of type found in flags
  217.     Install Layer->BackFill callback hook.
  218.     if SuperBitMap, use bm2 as pointer to real SuperBitMap.
  219.     and copy contents of Superbitmap into display layer.
  220.  
  221.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  222.  
  223.     INPUTS
  224.     li - pointer to LayerInfo structure
  225.     bm - pointer to common BitMap used by all Layers
  226.     x0,y0 - upper left hand corner of layer
  227.     x1,y1 - lower right hand corner of layer
  228.     flags - various types of layers supported as bit sets.
  229.     hook -  Layer->BackFill callback Hook (see InstallLayerHook())
  230.  
  231.             If hook is LAYERS_BACKFILL, the default backfill is
  232.             used for the layer.  (Same as pre-2.0)
  233.  
  234.             As of V39:
  235.         If hook is LAYERS_NOBACKFILL, the layer will not be
  236.             backfilled (NO-OP).
  237.  
  238.     bm2 - pointer to optional Super BitMap
  239.  
  240.     RESULTS
  241.     result - pointer to Layer structure if successful
  242.              NULL if not successful
  243.  
  244.     BUGS
  245.  
  246.     SEE ALSO
  247.     InstallLayerHook, DeleteLayer, graphics/layers.h, graphics/clip.h,
  248.     graphics/gfx.h, utility/hooks.h
  249.  
  250. layers.library/CreateUpfrontLayer           layers.library/CreateUpfrontLayer
  251.  
  252.     NAME
  253.     CreateUpfrontLayer -- Create a new layer on top of existing layers.
  254.  
  255.     SYNOPSIS
  256.     result = CreateUpfrontLayer(li,bm,x0,y0,x1,y1,flags [,bm2])
  257.     d0                          a0 a1 d0 d1 d2 d3   d4  [ a2 ]
  258.  
  259.     struct Layer *CreateUpfrontLayer(struct Layer_Info *, struct BitMap *,
  260.         LONG, LONG, LONG, LONG, LONG, ... );
  261.  
  262.     FUNCTION
  263.     Create a new Layer of position and size (x0,y0)->(x1,y1)
  264.     and place it on top of all other layers.
  265.     Make this layer of type found in flags
  266.     if SuperBitMap, use bm2 as pointer to real SuperBitMap.
  267.     and copy contents of Superbitmap into display layer.
  268.  
  269.     Note: when using SUPERBITMAP, you should also set LAYERSMART flag.
  270.  
  271.     INPUTS
  272.     li - pointer to LayerInfo structure
  273.     bm - pointer to common BitMap used by all Layers
  274.     x0,y0 - upper left hand corner of layer
  275.     x1,y1 - lower right hand corner of layer
  276.     flags - various types of layers supported as bit sets.
  277.     bm2 - pointer to optional Super BitMap
  278.  
  279.     RESULTS
  280.     result - pointer to Layer structure if successful
  281.              NULL if not successful
  282.  
  283.     BUGS
  284.  
  285.     SEE ALSO
  286.        DeleteLayer, graphics/layers.h, graphics/clip.h, graphics/gfx.h
  287.  
  288. layers.library/DeleteLayer                         layers.library/DeleteLayer
  289.  
  290.     NAME
  291.     DeleteLayer -- delete layer from layer list.
  292.  
  293.     SYNOPSIS
  294.     result = DeleteLayer( dummy, l )
  295.     d0                    a0,    a1
  296.  
  297.     LONG DeleteLayer( LONG, struct Layer *);
  298.  
  299.     FUNCTION
  300.     Remove this layer from the list of layers.  Release memory
  301.     associated with it.  Restore other layers that may have been
  302.     obscured by it.  Trigger refresh in those that may need it.
  303.     If this is a superbitmap layer make sure SuperBitMap is current.
  304.     The SuperBitMap is not removed from the system but is available
  305.     for program use even though the rest of the layer information has
  306.     been deallocated.
  307.  
  308.     INPUTS
  309.     dummy - unused
  310.     l - pointer to a layer
  311.  
  312.     RESULTS
  313.     result - TRUE if this layer successfully deleted from the system
  314.              FALSE if layer not deleted. (probably out of memory )
  315.  
  316.     BUGS
  317.  
  318.     SEE ALSO
  319.     graphics/layers.h, graphics/clip.h
  320.  
  321. layers.library/DisposeLayerInfo               layers.library/DisposeLayerInfo
  322.  
  323.     NAME
  324.     DisposeLayerInfo -- Return all memory for LayerInfo to memory pool
  325.  
  326.     SYNOPSIS
  327.     DisposeLayerInfo( li )
  328.                       a0
  329.  
  330.     void DisposeLayerInfo( struct Layer_Info *);
  331.  
  332.     FUNCTION
  333.     return LayerInfo and any other memory attached to this LayerInfo
  334.     to memory allocator.
  335.  
  336.     Note: if you wish to delete the layers associated with this Layer_Info
  337.         structure, remember to call DeleteLayer() for each of the layers
  338.         before calling DisposeLayerInfo().
  339.  
  340.     INPUTS
  341.     li - pointer to LayerInfo structure
  342.  
  343.     EXAMPLE
  344.  
  345.     -- delete the layers associated this Layer_Info structure --
  346.  
  347.     DeleteLayer(li,simple_layer);
  348.     DeleteLayer(li,smart_layer);
  349.  
  350.     -- see documentation on DeleteLayer about deleting SuperBitMap layers --
  351.     my_super_bitmap_ptr = super_layer->SuperBitMap;
  352.     DeleteLayer(li,super_layer);
  353.  
  354.     -- now dispose of the Layer_Info structure itself --
  355.     DisposeLayerInfo(li);
  356.  
  357.  
  358.     BUGS
  359.  
  360.     SEE ALSO
  361.     DeleteLayer, graphics/layers.h
  362.  
  363. layers.library/DoHookClipRects                 layers.library/DoHookClipRects
  364.  
  365.     NAME
  366.     DoHookClipRects - Do the given hook for each of the ClipRects    (V39)
  367.  
  368.     SYNOPSIS
  369.     DoHookClipRects(hook,rport,rect)
  370.                     a0   a1    a2
  371.  
  372.     void DoHookClipRects(struct Hook *,struct RastPort *,struct Rectangle *);
  373.  
  374.     FUNCTION
  375.     This function will call the given hook for each cliprect in the
  376.     layer that can be rendered into.  This is how the backfill hook
  377.     in Layers is implemented.  This means that hidden simple-refresh
  378.     cliprects will be ignored.  It will call the SuperBitMap cliprects,
  379.     smart refresh off-screen cliprects, and all on screen cliprects.
  380.     If the rect parameter is not NULL, the cliprects are bounded to
  381.     the rectangle given.
  382.  
  383.     INPUTS
  384.     hook - pointer to layer callback Hook which will be called
  385.            with object == (struct RastPort *) result->RastPort
  386.            and message == [ (Layer *) layer, (struct Rectangle) bounds,
  387.                             (LONG) offsetx, (LONG) offsety ]
  388.  
  389.            This hook should fill the Rectangle in the RastPort
  390.            with the BackFill pattern appropriate for offset x/y.
  391.  
  392.            If hook is LAYERS_BACKFILL, the default backfill is
  393.            used for the layer.
  394.  
  395.            If hook is LAYERS_NOBACKFILL, the layer will not be
  396.            backfilled (NO-OP).
  397.  
  398.     rport- A pointer to the RastPort that is to be operated on.
  399.            This function will lock the layer if the RastPort is
  400.            layered...
  401.            If the rport is non-layered your hook will be called with
  402.            the rectangle as passed, the RastPort, and a NULL layer...
  403.  
  404.     rect - The bounding rectangle that should be used on the layer.
  405.            This rectangle "clips" the cliprects to the bound given.
  406.            If this is NULL, no bounding will take place.
  407.            *MUST* not be NULL if the RastPort is non-layered!
  408.  
  409.     NOTES
  410.     The RastPort you are passed back is the same one passed to the
  411.     function.  You should *not* use "layered" rendering functions
  412.     on this RastPort.  Generally, you will wish to do BitMap operations
  413.     such as BltBitMap().  The callback is a raw, low-level rendering
  414.     call-back.  If you need to call a rendering operation with a
  415.     RastPort, make sure you use a copy of the RastPort and NULL the
  416.     Layer pointer.
  417.  
  418.     SEE ALSO
  419.     graphics/clip.h utility/hooks.h
  420.  
  421. layers.library/EndUpdate                             layers.library/EndUpdate
  422.  
  423.     NAME
  424.     EndUpdate -- remove damage list and restore state of layer to normal.
  425.  
  426.     SYNOPSIS
  427.     EndUpdate( l, flag )
  428.                a0  d0
  429.  
  430.     void EndUpdate( struct Layer *, UWORD);
  431.  
  432.     FUNCTION
  433.     After the programmer has redrawn his picture he calls this
  434.     routine to restore the ClipRects to point to his standard
  435.     layer tiling. The layer is then unlocked for access by the
  436.     layer library.
  437.  
  438.     Note: use flag = FALSE if you are only making a partial update.
  439.         You may use the other region functions (graphics functions such as
  440.         OrRectRegion, AndRectRegion, and XorRectRegion ) to clip adjust
  441.         the DamageList to reflect a partial update.
  442.  
  443.     INPUTS
  444.     l - pointer to a layer
  445.     flag - use TRUE if update was completed. The damage list is cleared.
  446.            use FALSE if update not complete. The damage list is retained.
  447.  
  448.     EXAMPLE
  449.  
  450.     -- begin update for first part of two-part refresh --
  451.     BeginUpdate(my_layer);
  452.  
  453.     -- do some refresh, but not all --
  454.     my_partial_refresh_routine(my_layer);
  455.  
  456.     -- end update, false (not completely done refreshing yet) --
  457.     EndUpdate(my_layer, FALSE);
  458.  
  459.     -- begin update for last part of refresh --
  460.     BeginUpdate(my_layer);
  461.  
  462.     -- do rest of refresh --
  463.     my_complete_refresh_routine(my_layer);
  464.  
  465.     -- end update, true (completely done refreshing now) --
  466.     EndUpdate(my_layer, TRUE);
  467.  
  468.     BUGS
  469.  
  470.     SEE ALSO
  471.     BeginUpdate, graphics/layers.h, graphics/clip.h
  472.  
  473. layers.library/FattenLayerInfo                 layers.library/FattenLayerInfo
  474.  
  475.     NAME
  476.     FattenLayerInfo -- convert 1.0 LayerInfo to 1.1 LayerInfo
  477.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  478.  
  479.     SYNOPSIS
  480.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  481.     FattenLayerInfo( li )
  482.                      a0
  483.  
  484.     LONG FattenLayerInfo( struct Layer_Info *);
  485.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  486.  
  487.     FUNCTION
  488.     V1.1 software and any later releases need to have more info in the
  489.     Layer_Info structure. To do this in a 1.0 supportable manner requires
  490.     allocation and deallocation of the memory whenever most
  491.     layer library functions are called.  To prevent unnecessary
  492.     allocation/deallocation FattenLayerInfo will preallocate the
  493.     necessary data structures and fake out the layer library into
  494.     thinking it has a LayerInfo gotten from NewLayerInfo.
  495.     NewLayerInfo is the approved method for getting this structure.
  496.     When a program needs to give up the LayerInfo structure it
  497.     must call ThinLayerInfo before freeing the memory. ThinLayerInfo
  498.     is not necessary if New/DisposeLayerInfo are used however.
  499.  
  500.     INPUTS
  501.     li - pointer to LayerInfo structure
  502.  
  503.     BUGS
  504.  
  505.     SEE ALSO
  506.  
  507.     NewLayerInfo, ThinLayerInfo, DisposeLayerInfo, graphics/layers.h
  508.  
  509. layers.library/InitLayers                           layers.library/InitLayers
  510.  
  511.     NAME
  512.     InitLayers -- Initialize Layer_Info structure
  513.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  514.  
  515.     SYNOPSIS
  516.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  517.     InitLayers( li )
  518.                 a0
  519.  
  520.     void InitLayers( struct Layer_Info *);
  521.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  522.  
  523.     FUNCTION
  524.     Initialize Layer_Info structure in preparation to use
  525.     other layer operations on this list of layers.
  526.     Make the Layers unlocked (open), available to layer operations.
  527.  
  528.     INPUTS
  529.     li - pointer to LayerInfo structure
  530.  
  531.     BUGS
  532.  
  533.     SEE ALSO
  534.     NewLayerInfo, DisposeLayerInfo, graphics/layers.h
  535.  
  536. layers.library/InstallClipRegion             layers.library/InstallClipRegion
  537.  
  538.     NAME
  539.     InstallClipRegion -- Install clip region in layer
  540.  
  541.     SYNOPSIS
  542.     oldclipregion = InstallClipRegion( l,  region )
  543.     d0                                 a0  a1
  544.  
  545.     struct Region *InstallClipRegion( struct Layer *, struct Region *);
  546.  
  547.     FUNCTION
  548.     Installs a transparent Clip region in the layer. All
  549.     subsequent graphics calls will be clipped to this region.
  550.     You MUST remember to call InstallClipRegion(l,NULL) before
  551.     calling DeleteLayer(l) or the Intuition function CloseWindow()
  552.      if you have installed a non-NULL ClipRegion in l.
  553.  
  554.     INPUTS
  555.     l - pointer to a layer
  556.     region - pointer to a region
  557.  
  558.     RESULTS
  559.     oldclipregion - The pointer to the previous ClipRegion that
  560.         was installed. Returns NULL if no previous ClipRegion installed.
  561.  
  562.         Note: If the system runs out of memory while computing the
  563.             resulting ClipRects the LAYERS_CLIPRECTS_LOST bit will
  564.             be set in l->Flags.
  565.  
  566.     BUGS
  567.     If the system runs out of memory during normal layer operations,
  568.     the ClipRect list may get swept away and not restored.
  569.     As soon as there is enough memory and the layer library
  570.     gets called again the ClipRect list will be rebuilt.
  571.  
  572.     SEE ALSO
  573.     BeginUpdate EndUpdate,
  574.     graphics/layers.h, graphics/clip.h, graphics/regions.h
  575.  
  576. layers.library/InstallLayerHook               layers.library/InstallLayerHook
  577.  
  578.     NAME
  579.     InstallLayerHook -- safely install a new Layer->BackFill hook.    (V36)
  580.  
  581.     SYNOPSIS
  582.     oldhook = InstallLayerHook( layer, hook )
  583.     d0                          a0     a1
  584.  
  585.     struct Hook *InstallLayerHook( struct Layer *, struct Hook *);
  586.  
  587.     FUNCTION
  588.     Installs a new Layer->Backfill Hook, waiting until it is safe to do
  589.     so. Locks the layer while substituting the new Hook and removing the
  590.     old one. If a new Hook is not provided, will install the default layer
  591.     BackFill Hook.
  592.  
  593.     INPUTS
  594.     layer - pointer to the layer in which to install the Backfill Hook.
  595.     hook -  pointer to layer callback Hook which will be called
  596.             with object == (struct RastPort *) result->RastPort
  597.             and message == [ (Layer *) layer, (struct Rectangle) bounds,
  598.                              (LONG) offsetx, (LONG) offsety ]
  599.  
  600.             This hook should fill the Rectangle in the RastPort
  601.             with the BackFill pattern appropriate for offset x/y.
  602.  
  603.             If hook is LAYERS_BACKFILL, the default backfill is
  604.             used for the layer.  (Same as pre-2.0)
  605.  
  606.             As of V39:
  607.         If hook is LAYERS_NOBACKFILL, the layer will not be
  608.             backfilled (NO-OP).
  609.  
  610.     RESULTS
  611.     oldhook - pointer to the Layer->BackFill Hook that was previously
  612.               active.  Returns NULL if it was the default hook.
  613.           In V39, it could return 1 if there was no hook.
  614.  
  615.     EXAMPLE
  616.     The following hook is a very simple example that does rather little
  617.     but gives the basis idea of what is going on.
  618.  
  619.     *
  620.     * This is the code called by the layer hook...
  621.     * Note that some other setup is required for this to work, including
  622.     * the definition of the PrivateData structure (pd_...) and the
  623.     * definition of the BitMapPattern structure (bmp_...)
  624.     *
  625.     CoolHook:    xdef    CoolHook
  626.             movem.l    d2-d7/a3-a6,-(sp)    ; Save these...
  627.             move.l    h_SubEntry(a0),a4    ; (my private data #1 here)
  628.             move.l    h_Data(a0),a5        ; Put data into address reg
  629.     *
  630.     * Now, we do the rendering...
  631.     * Note that the layer may not be important...  But it is here...
  632.     *
  633.             move.l    (a1)+,a0        ; Get the layer...
  634.     *
  635.     * a1 now points at the rectangle...
  636.     *
  637.             move.l    pd_GfxBase(a4),a6    ; Point at GfxBase
  638.             move.l    bmp_Pattern(a5),d0    ; Get PatternBitMap
  639.             beq    SimpleCase        ; None?  Simple (0) case
  640.     *
  641.     * Now do the complex case of a pattern...
  642.     *
  643.             move.l    a1,a3            ; Pointer to rectangle
  644.             addq.l    #8,a1            ; Get past rectangle
  645.             move.l    (a1)+,d2        ; X Offset (For pattern)
  646.             move.l    (a1)+,d3        ; Y Offset
  647.         ;
  648.         ; Whatever complex blitting you would do in the complex case
  649.         ; goes here
  650.         ;
  651.     *
  652.     * No bitmap, so just do the simple (0) minterm case...
  653.     *
  654.     SimpleCase:    moveq.l    #0,d2            ; Clear d2
  655.             move.w    ra_MinX(a1),d2        ; Get X pos
  656.     *
  657.             moveq.l    #0,d3
  658.             move.w    ra_MinY(a1),d3        ; Get Y pos
  659.     *
  660.             moveq.l    #0,d4
  661.             move.w    ra_MaxX(a1),d4
  662.             sub.l    d2,d4
  663.             addq.l    #1,d4            ; Get X size
  664.     *
  665.             moveq.l    #0,d5
  666.             move.w    ra_MaxY(a1),d5
  667.             sub.l    d3,d5
  668.             addq.l    #1,d5            ; Get Y size
  669.     *
  670.             move.l    d2,d0            ; X Source
  671.             move.l    d3,d1            ; Y Source
  672.             moveq.l    #0,d6            ; NULL minterm
  673.             moveq.l    #-1,d7            ; FF mask
  674.     *
  675.             move.l    rp_BitMap(a2),a1    ; Get bitmap
  676.             move.l    a1,a0
  677.             CALLSYS    BltBitMap        ; Do the backfill-0
  678.     *
  679.     HookDone:    movem.l    (sp)+,d2-d7/a3-a6    ; Restore
  680.             rts
  681.  
  682.     NOTES
  683.     The RastPort you are passed back is the same one passed to the
  684.     function.  You should *not* use "layered" rendering functions
  685.     on this RastPort.  Generally, you will wish to do BitMap operations
  686.     such as BltBitMap().  The callback is a raw, low-level rendering
  687.     call-back.  If you need to call a rendering operation with a
  688.     RastPort, make sure you use a copy of the RastPort and NULL the
  689.     Layer pointer.
  690.  
  691.     BUGS
  692.  
  693.     SEE ALSO
  694.     graphics/clip.h utility/hooks.h
  695.  
  696. layers.library/InstallLayerInfoHook       layers.library/InstallLayerInfoHook
  697.  
  698.     NAME
  699.     InstallLayerInfoHook - Install a backfill hook for non-layer      (V39)
  700.  
  701.     SYNOPSIS
  702.     oldhook=InstallLayerInfoHook(li,hook)
  703.     d0                           a0 a1
  704.  
  705.     struct Hook *InstallLayerInfoHook(struct Layer_Info *,struct Hook *);
  706.  
  707.     FUNCTION
  708.     This function will install a backfill hook for the Layer_Info
  709.     structure passed.  This backfill hook will be used to clear the
  710.     background area where no layer exists.  The hook function is
  711.     passed the RastPort and the bounds just like the layer backfill
  712.     hook.  Note that this hook could be called for any layer.
  713.  
  714.     INPUTS
  715.     li - pointer to LayerInfo structure
  716.  
  717.     hook -  pointer to layer callback Hook which will be called
  718.             with object == (struct RastPort *) result->RastPort
  719.             and message == [ (ULONG) undefined, (struct Rectangle) bounds ]
  720.  
  721.             This hook should fill the Rectangle in the RastPort
  722.             with the BackFill pattern appropriate for rectangle given.
  723.  
  724.             If hook is LAYERS_BACKFILL, the default backfill is
  725.             used.  (Same as pre-2.0)
  726.  
  727.         If hook is LAYERS_NOBACKFILL, there will be no
  728.             backfill.  (NO-OP).
  729.  
  730.     RESULTS
  731.     oldhook - Returns the backfill hook that was in the Layer_Info.
  732.               Returns LAYERS_BACKFILL if the default was installed.
  733.               Returns LAYERS_NOBACKFILL if there was a NO-OP hook.
  734.               Returns -1 if there was some failure.
  735.  
  736.     EXAMPLE
  737.     See the example in InstallLayerHook.  Note that both the Layer
  738.     pointer and the OffsetX/Y values are not available in the
  739.     LayerInfo backfill hook.
  740.  
  741.     NOTES
  742.     When the hook is first installed, it is *NOT* called.  It is up
  743.     to the application to know if it is safe to fill in the area.
  744.     Since the hook will be called when a layer is deleted, the easiest
  745.     way to have layers call this hook is to create and delete a backdrop
  746.     layer that is the size of the area.
  747.  
  748.     Also, note that currently the first long word of the hook message
  749.     contains an undefined value.  This value may look like a layer pointer.
  750.     It is *not* a layer pointer.
  751.  
  752.     The RastPort you are passed back is the same one passed to the
  753.     function.  You should *not* use "layered" rendering functions
  754.     on this RastPort.  Generally, you will wish to do BitMap operations
  755.     such as BltBitMap().  The callback is a raw, low-level rendering
  756.     call-back.  If you need to call a rendering operation with a
  757.     RastPort, make sure you use a copy of the RastPort and NULL the
  758.     Layer pointer.
  759.  
  760.     SEE ALSO
  761.     InstallLayerHook
  762.  
  763. layers.library/LockLayer                             layers.library/LockLayer
  764.  
  765.     NAME
  766.     LockLayer -- Lock layer to make changes to ClipRects.
  767.  
  768.     SYNOPSIS
  769.     LockLayer( dummy, l )
  770.                a0     a1
  771.  
  772.     void LockLayer( LONG, struct Layer *);
  773.  
  774.     FUNCTION
  775.     Make this layer unavailable for other tasks to use.
  776.     If another task is already using this layer then wait for
  777.     it to complete and then reserve the layer for your own use.
  778.     (this function does the same thing as graphics.library/LockLayerRom)
  779.  
  780.     Note: if you wish to lock MORE THAN ONE layer at a time, you
  781.         must call LockLayerInfo() before locking those layers and
  782.         then call UnlockLayerInfo() when you have finished. This
  783.         is to prevent system "deadlocks".
  784.  
  785.     Further Note: while you hold the lock on a layer, Intuition will block
  786.         on operations such as windowsizing, dragging, menus, and depth
  787.         arranging windows in this layer's screen.  It is recommended that
  788.         YOU do not make Intuition function calls while the layer is locked.
  789.  
  790.     INPUTS
  791.     dummy - unused
  792.     l - pointer to a layer
  793.  
  794.     BUGS
  795.  
  796.     SEE ALSO
  797.     UnlockLayer, LockLayerInfo, UnlockLayerInfo,
  798.     graphics.library/LockLayerRom, graphics/layers.h, graphics/clip.h
  799.  
  800. layers.library/LockLayerInfo                     layers.library/LockLayerInfo
  801.  
  802.     NAME
  803.     LockLayerInfo -- Lock the LayerInfo structure.
  804.  
  805.     SYNOPSIS
  806.     LockLayerInfo( li )
  807.                    a0
  808.  
  809.     void LockLayerInfo( struct Layer_Info *);
  810.  
  811.     FUNCTION
  812.     Before doing an operation that requires the LayerInfo
  813.     structure, make sure that no other task is also using the
  814.     LayerInfo structure.  LockLayerInfo() returns when the
  815.     LayerInfo belongs to this task.  There should be
  816.     an UnlockLayerInfo for every LockLayerInfo.
  817.  
  818.     Note: All layer routines presently LockLayerInfo() when they
  819.     start up and UnlockLayerInfo() as they exit.  Programmers
  820.     will need to use these Lock/Unlock routines if they wish
  821.     to do something with the LayerStructure that is not
  822.     supported by the layer library.
  823.  
  824.     INPUTS
  825.     li - pointer to Layer_Info structure
  826.  
  827.     BUGS
  828.  
  829.     SEE ALSO
  830.     UnlockLayerInfo, graphics/layers.h
  831.  
  832. layers.library/LockLayers                           layers.library/LockLayers
  833.  
  834.     NAME
  835.     LockLayers -- lock all layers from graphics output.
  836.  
  837.     SYNOPSIS
  838.     LockLayers( li )
  839.                 a0
  840.  
  841.     void LockLayers( struct Layer_Info *);
  842.  
  843.     FUNCTION
  844.     First calls LockLayerInfo()
  845.     Make all layers in this layer list locked.
  846.  
  847.     INPUTS
  848.     li - pointer to Layer_Info structure
  849.  
  850.     BUGS
  851.  
  852.     SEE ALSO
  853.     LockLayer, LockLayerInfo, graphics/layers.h
  854.  
  855. layers.library/MoveLayer                             layers.library/MoveLayer
  856.  
  857.     NAME
  858.     MoveLayer -- Move layer to new position in BitMap.
  859.  
  860.     SYNOPSIS
  861.     result = MoveLayer( dummy, l, dx, dy )
  862.     d0                  a0     a1 d0  d1
  863.  
  864.     LONG MoveLayer( LONG, struct Layer *, LONG, LONG);
  865.  
  866.     FUNCTION
  867.     Move this layer to new position in shared BitMap.
  868.     If any refresh layers become revealed, collect damage and
  869.     set REFRESH bit in layer Flags.
  870.  
  871.     INPUTS
  872.     dummy - unused
  873.     l - pointer to a nonbackdrop layer
  874.     dx - delta to add to current x position
  875.     dy - delta to add to current y position
  876.  
  877.     RETURNS
  878.     result - TRUE if operation successful
  879.              FALSE if failed (out of memory)
  880.  
  881.     BUGS
  882.     May not handle (dx,dy) which attempts to move the layer outside the
  883.     layer's RastPort->BitMap bounds .
  884.  
  885.     SEE ALSO
  886.     graphics/layers.h, graphics/clip.h
  887.  
  888. layers.library/MoveLayerInFrontOf           layers.library/MoveLayerInFrontOf
  889.  
  890.     NAME
  891.     MoveLayerInFrontOf -- Put layer in front of another layer.
  892.  
  893.     SYNOPSIS
  894.     result = MoveLayerInFrontOf( layertomove, targetlayer )
  895.                                     a0           a1
  896.  
  897.     LONG MoveLayerInFrontOf( struct Layer *, struct Layer *);
  898.  
  899.     FUNCTION
  900.     Move this layer in front of target layer, swapping bits
  901.     in and out of the display with other layers.
  902.     If this is a refresh layer then collect damage list and
  903.     set the LAYERREFRESH bit in layer->Flags if redraw required.
  904.  
  905.     Note: this operation may generate refresh events in other layers
  906.         associated with this layer's Layer_Info structure.
  907.  
  908.     INPUTS
  909.     layertomove - pointer to layer which should be moved
  910.     targetlayer - pointer to target layer in front of which to move layer
  911.  
  912.     RESULTS
  913.     result = TRUE    if operation successful
  914.              FALSE   if operation unsuccessful (probably out of memory)
  915.  
  916.     BUGS
  917.  
  918.     SEE ALSO
  919.     graphics/layers.h
  920.  
  921. layers.library/MoveSizeLayer                     layers.library/MoveSizeLayer
  922.  
  923.     NAME                                                              (V36)
  924.     MoveSizeLayer -- Position/Size layer
  925.  
  926.     SYNOPSIS
  927.     result = MoveSizeLayer( layer, dx, dy, dw, dh )
  928.     d0                      a0     d0  d1  d2  d3
  929.  
  930.     LONG MoveSizeLayer( struct Layer *, LONG, LONG, LONG, LONG);
  931.  
  932.     FUNCTION
  933.     Change upperleft and lower right position of Layer.
  934.  
  935.     INPUTS
  936.     dummy - unused
  937.     l - pointer to a nonbackdrop layer
  938.     dx,dy - change upper left corner by (dx,dy)
  939.     dw,dy - change size by (dw,dh)
  940.  
  941.     RETURNS
  942.     result - TRUE if operation successful
  943.              FALSE if failed (due to out of memory)
  944.              FALSE if failed (due to illegal layer->bounds)
  945.  
  946.     BUGS
  947.  
  948.     SEE ALSO
  949.     graphics/layers.h, graphics/clip.h
  950.  
  951. layers.library/NewLayerInfo                       layers.library/NewLayerInfo
  952.  
  953.     NAME
  954.     NewLayerInfo -- Allocate and Initialize full Layer_Info structure.
  955.  
  956.     SYNOPSIS
  957.     result = NewLayerInfo()
  958.     d0
  959.  
  960.     struct Layer_Info *NewLayerInfo( void );
  961.  
  962.     FUNCTION
  963.     Allocate memory required for full Layer_Info structure.
  964.     Initialize Layer_Info structure in preparation to use
  965.     other layer operations on this list of layers.
  966.     Make the Layer_Info unlocked (open).
  967.  
  968.     INPUTS
  969.     None
  970.  
  971.     RESULT
  972.     result- pointer to Layer_Info structure if successful
  973.             NULL if not enough memory
  974.  
  975.     BUGS
  976.  
  977.     SEE ALSO
  978.     graphics/layers.h
  979.  
  980. layers.library/ScrollLayer                         layers.library/ScrollLayer
  981.  
  982.     NAME
  983.     ScrollLayer -- Scroll around in a superbitmap, translate coordinates
  984.                       in non-superbitmap layer.
  985.  
  986.     SYNOPSIS
  987.     ScrollLayer( dummy, l, dx, dy )
  988.                  a0     a1 d0  d1
  989.  
  990.     void ScrollLayer( LONG, struct Layer *, LONG, LONG);
  991.  
  992.     FUNCTION
  993.     For a SuperBitMap Layer:
  994.     Update the SuperBitMap from the layer display, then copy bits
  995.     between Layer and SuperBitMap to reposition layer over different
  996.     portion of SuperBitMap.
  997.     For nonSuperBitMap layers, all (x,y) pairs are adjusted by
  998.     the scroll(x,y) value in the layer.  To cause (0,0) to actually
  999.     be drawn at (3,10) use ScrollLayer(-3,-10). This can be useful
  1000.     along with InstallClipRegion to simulate Intuition GZZWindows
  1001.     without the overhead of an extra layer.
  1002.  
  1003.     INPUTS
  1004.     dummy - unused
  1005.     l - pointer to a layer
  1006.     dx - delta to add to current x scroll value
  1007.     dy - delta to add to current y scroll value
  1008.  
  1009.     BUGS
  1010.     May not handle (dx,dy) which attempts to move the layer outside the
  1011.     layer's SuperBitMap bounds.
  1012.  
  1013.     SEE ALSO
  1014.     graphics/layers.h
  1015.  
  1016. layers.library/SizeLayer                             layers.library/SizeLayer
  1017.  
  1018.     NAME
  1019.     SizeLayer -- Change the size of this nonbackdrop layer.
  1020.  
  1021.     SYNOPSIS
  1022.     result = SizeLayer( dummy, l, dx, dy )
  1023.     d0                  a0     a1 d0  d1
  1024.  
  1025.     LONG SizeLayer( LONG, struct Layer *, LONG, LONG);
  1026.  
  1027.     FUNCTION
  1028.     Change the size of this layer by (dx,dy). The lower right hand
  1029.     corner is extended to make room for the larger layer.
  1030.     If there is SuperBitMap for this layer then copy pixels into
  1031.     or out of the layer depending on whether the layer increases or
  1032.     decreases in size.  Collect damage list for those layers that may
  1033.     need to be refreshed if damage occurred.
  1034.  
  1035.     INPUTS
  1036.     dummy - unused
  1037.     l - pointer to a nonbackdrop layer
  1038.     dx - delta to add to current x size
  1039.     dy - delta to add to current y size
  1040.  
  1041.     RESULTS
  1042.     result - TRUE if operation successful
  1043.              FALSE if failed (out of memory)
  1044.  
  1045.     BUGS
  1046.  
  1047.     SEE ALSO
  1048.     graphics/layers.h, graphics/clip.h
  1049.  
  1050. layers.library/SwapBitsRastPortClipRectayers.library/SwapBitsRastPortClipRect
  1051.  
  1052.     NAME
  1053.     SwapBitsRastPortClipRect -- Swap bits between common bitmap
  1054.                                 and obscured ClipRect
  1055.  
  1056.     SYNOPSIS
  1057.     SwapBitsRastPortClipRect( rp, cr )
  1058.                               a0  a1
  1059.  
  1060.     void SwapBitsRastPortClipRect( struct RastPort *, struct ClipRect *);
  1061.  
  1062.     FUNCTION
  1063.     Support routine useful for those that need to do some
  1064.     operations not done by the layer library.  Allows programmer
  1065.     to swap the contents of a small BitMap with a subsection of
  1066.     the display. This is accomplished without using extra memory.
  1067.     The bits in the display RastPort are exchanged with the
  1068.     bits in the ClipRect's BitMap.
  1069.  
  1070.     Note: the ClipRect structures which the layer library allocates are
  1071.     actually a little bigger than those described in the graphics/clip.h
  1072.     include file.  So be warned that it is not a good idea to have
  1073.     instances of cliprects in your code.
  1074.  
  1075.     INPUTS
  1076.     rp - pointer to rastport
  1077.     cr - pointer to cliprect to swap bits with
  1078.  
  1079.     NOTE
  1080.     Because the blit operation started by this function is done asynchronously,
  1081.     it is imperative that a WaitBlit() be performed before releasing or using
  1082.     the processor to modify any of the associated structures.
  1083.  
  1084.     BUGS
  1085.  
  1086.     SEE ALSO
  1087.     graphics/clip.h, graphics/rastport.h, graphics/clip.h
  1088.  
  1089. layers.library/ThinLayerInfo                     layers.library/ThinLayerInfo
  1090.  
  1091.     NAME
  1092.     ThinLayerInfo -- convert 1.1 LayerInfo to 1.0 LayerInfo.
  1093.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  1094.  
  1095.     SYNOPSIS
  1096.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  1097.     ThinLayerInfo( li )
  1098.                    a0
  1099.  
  1100.     void ThinLayerInfo( struct Layer_Info *);
  1101.     OBSOLETE OBSOLETE OBSOLETE OBSOLETE OBSOLETE
  1102.  
  1103.     FUNCTION
  1104.     return the extra memory needed that was allocated with
  1105.     FattenLayerInfo. This is must be done prior to freeing
  1106.     the Layer_Info structure itself. V1.1 software should be
  1107.     using DisposeLayerInfo.
  1108.  
  1109.     INPUTS
  1110.     li - pointer to LayerInfo structure
  1111.  
  1112.     BUGS
  1113.  
  1114.     SEE ALSO
  1115.     DisposeLayerInfo, FattenLayerInfo, graphics/layers.h
  1116.  
  1117. layers.library/UnlockLayer                         layers.library/UnlockLayer
  1118.  
  1119.     NAME
  1120.     UnlockLayer -- Unlock layer and allow graphics routines to use it.
  1121.  
  1122.     SYNOPSIS
  1123.     UnlockLayer( l )
  1124.                  a0
  1125.  
  1126.     void UnlockLayer( struct Layer *);
  1127.  
  1128.     FUNCTION
  1129.     When finished changing the ClipRects or whatever you were
  1130.     doing with this layer you must call UnlockLayer() to allow
  1131.     other tasks to proceed with graphic output to the layer.
  1132.  
  1133.     INPUTS
  1134.     l - pointer to a layer
  1135.  
  1136.     BUGS
  1137.  
  1138.     SEE ALSO
  1139.     graphics/layers.h, graphics/clip.h
  1140.  
  1141. layers.library/UnlockLayerInfo                 layers.library/UnlockLayerInfo
  1142.  
  1143.     NAME
  1144.     UnlockLayerInfo -- Unlock the LayerInfo structure.
  1145.  
  1146.     SYNOPSIS
  1147.     UnlockLayerInfo( li )
  1148.                      a0
  1149.  
  1150.     void UnlockLayerInfo( struct Layer_Info *);
  1151.  
  1152.     FUNCTION
  1153.     After the operation is complete that required a LockLayerInfo,
  1154.     unlock the LayerInfo structure so that  other tasks may
  1155.     affect the layers.
  1156.  
  1157.     INPUTS
  1158.     li - pointer to the Layer_Info structure
  1159.  
  1160.      BUGS
  1161.  
  1162.      SEE ALSO
  1163.     LockLayerInfo, graphics/layers.h
  1164.  
  1165. layers.library/UnlockLayers                       layers.library/UnlockLayers
  1166.  
  1167.     NAME
  1168.     UnlockLayers -- Unlock all layers from graphics output.
  1169.                     Restart graphics output to layers that have been waiting
  1170.  
  1171.     SYNOPSIS
  1172.     UnlockLayers( li )
  1173.                   a0
  1174.  
  1175.     void UnlockLayers( struct Layer_Info *);
  1176.  
  1177.     FUNCTION
  1178.     Make all layers in this layer list unlocked.
  1179.     Then call UnlockLayerInfo
  1180.  
  1181.     INPUTS
  1182.     li - pointer to the Layer_Info structure
  1183.  
  1184.     BUGS
  1185.  
  1186.     SEE ALSO
  1187.     LockLayers, UnlockLayer, graphics/layers.h
  1188.  
  1189. layers.library/UpfrontLayer                       layers.library/UpfrontLayer
  1190.  
  1191.     NAME
  1192.     UpfrontLayer -- Put layer in front of all other layers.
  1193.  
  1194.     SYNOPSIS
  1195.     result = UpfrontLayer( dummy, l )
  1196.     d0                     a0     a1
  1197.  
  1198.     LONG UpfrontLayer( LONG, struct Layer *);
  1199.  
  1200.     FUNCTION
  1201.     Move this layer to the most upfront position swapping bits
  1202.     in and out of the display with other layers.
  1203.     If this is a refresh layer then collect damage list and
  1204.     set the LAYERREFRESH bit in layer->Flags if redraw required.
  1205.     By clearing the BACKDROP bit in the layers Flags you may
  1206.     bring a Backdrop layer up to the front of all other layers.
  1207.  
  1208.     Note: this operation may generate refresh events in other layers
  1209.        associated with this layer's Layer_Info structure.
  1210.  
  1211.     INPUTS
  1212.     dummy - unused
  1213.     l - pointer to a nonbackdrop layer
  1214.  
  1215.     RESULTS
  1216.     result - TRUE   if operation successful
  1217.              FALSE  if operation unsuccessful (probably out of memory)
  1218.  
  1219.     BUGS
  1220.  
  1221.     SEE ALSO
  1222.     graphics/layers.h
  1223.  
  1224. layers.library/WhichLayer                           layers.library/WhichLayer
  1225.  
  1226.     NAME
  1227.     WhichLayer -- Which Layer is this point in?
  1228.  
  1229.     SYNOPSIS
  1230.     layer = WhichLayer( li, x, y )
  1231.     d0                  a0  d0 d1
  1232.  
  1233.     struct Layer *WhichLayer(struct Layer_Info*, WORD, WORD);
  1234.  
  1235.     FUNCTION
  1236.     Starting at the topmost layer check to see if this point (x,y)
  1237.         occurs in this layer.  If it does return the pointer to this
  1238.         layer. Return NULL if there is no layer at this point.
  1239.  
  1240.     INPUTS
  1241.     li  = pointer to LayerInfo structure
  1242.     (x,y) = coordinate in the BitMap
  1243.  
  1244.     RESULTS
  1245.     layer - pointer to the topmost layer that this point is in
  1246.             NULL if this point is not in a layer
  1247.  
  1248.     SEE ALSO
  1249.     graphics/layers.h
  1250.  
  1251.