[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

A common operation performed by applications is to render text or graphics
into an existing layer such as an Intuition window.  To prevent Intuition
from changing the layer (for instance when the user resizes or moves the
window) during a series of graphic operations, the layers library provides
locking functions for obtaining exclusive access to a layer.

These locking functions are also useful for applications that create their
own layers if the application has more than one task operating on the
layers asynchronously.  These calls coordinate multiple access to layers.


  Table 30-1: Functions for Intertask Control of Layers (Layers Library)
   ____________________________________________________________________
  |                                                                    |
  |        LockLayer()  Lock out rendering in a single layer.          |
  |      UnlockLayer()  Release LockLayer() lock.                      |
  |       LockLayers()  Lock out rendering in all layers of a display. |
  |     UnlockLayers()  Release LockLayers() lock.                     |
  |    LockLayerInfo()  Gain exclusive access to the display's layers. |
  |  UnlockLayerInfo()  Release LockLayerInfo() lock.                  |
  |____________________________________________________________________|


The following routines from the graphics library also allow multitasking
access to layer structures:


 Table 30-2: Functions for Intertask Control of Layers (Graphics Library)
   ____________________________________________________________________
  |                                                                    |
  |         LockLayerRom()  Same as LockLayer(), from layers library.  |
  |       UnlockLayerRom()  Release LockLayerRom() lock.               |
  |  AttemptLockLayerRom()  Lock layer only if it is immediately       |
  |                         available.                                 |
  |____________________________________________________________________|


These functions are similar to the layers LockLayer() and UnlockLayer()
functions, but do not require the layers library to be open.  See the
Amiga ROM Kernel Reference Manual: Includes and Autodocs for details.

 Intertask Operations    Determining Layer Position 


[Back to Amiga Developer Docs]