Update to lasso handling. Adjust scroll amount based on difference between mouse...
[AROS.git] / rom / graphics / attemptlocklayerrom.c
blobb6c74d72dcf8592b4f3b82c8a0a1bd561dd163ad
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function AttemptLockLayerRom()
6 Lang: english
7 */
8 #include <proto/layers.h>
9 #include <graphics/clip.h>
10 #include <proto/exec.h>
11 #include <exec/types.h>
13 /*****************************************************************************
15 NAME */
16 #include <proto/graphics.h>
18 AROS_LH1(BOOL, AttemptLockLayerRom,
20 /* SYNOPSIS */
21 AROS_LHA(struct Layer *, l, A5),
23 /* LOCATION */
24 struct GfxBase *, GfxBase, 109, Graphics)
26 /* FUNCTION
27 Try to lock the current layer. If it is already locked this
28 function will return FALSE, TRUE otherwise.
29 If the layer could be locked successfully nesting will take place
30 which means that for every successful locking of a layer
31 UnlockLayerRom() has to be called for that layer to let other
32 tasks access that layer.
34 INPUTS
35 l - pointer to layer
37 RESULT
38 TRUE - layer is successfully locked for the task
39 FALSE - layer could not be locked, it's locked by another task.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 LockLayerRom(), UnlockLayerRom()
50 INTERNALS
52 HISTORY
54 *****************************************************************************/
56 AROS_LIBFUNC_INIT
58 return AttemptSemaphore(&l->Lock);
60 AROS_LIBFUNC_EXIT
61 } /* AttemptLockLayerRom */