Small modification to diskinfo and info tool layout
[AROS.git] / rom / hyperlayers / behindlayer.c
blob9e7130b2402e6910bd41d7ee4de10e684d736131
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <proto/exec.h>
9 #include <exec/types.h>
10 #include <exec/memory.h>
11 #include <aros/libcall.h>
12 #include <proto/graphics.h>
13 #include "basicfuncs.h"
14 #include "layers_intern.h"
16 /*****************************************************************************
18 NAME */
19 #include <proto/layers.h>
20 AROS_LH2(LONG, BehindLayer,
22 /* SYNOPSIS */
23 AROS_LHA(LONG , dummy, A0),
24 AROS_LHA(struct Layer *, l , A1),
26 /* LOCATION */
27 struct LayersBase *, LayersBase, 9, Layers)
29 /* FUNCTION
30 If the layer is a backdrop layer it will be moved to the most
31 behind position. If it is a non-backdrop layer it will be moved
32 in front of the first backdrop layer.
33 The areas of simple layers, that become visible by moving this
34 layer, are added to the damagelist and the LAYERREFRESH flag
35 is set.
37 INPUTS
38 dummy - nothing
39 L - pointer to layer
41 RESULT
42 TRUE - layer was successfully moved
43 FALSE - layer could not be moved (probably out of memory)
45 NOTES
47 EXAMPLE
49 BUGS
51 SEE ALSO
53 INTERNALS
55 HISTORY
56 27-11-96 digulla automatically created from
57 layers_lib.fd and clib/layers_protos.h
59 *****************************************************************************/
61 AROS_LIBFUNC_INIT
63 struct Layer * _l;
64 LONG ret;
66 //kprintf("\t\t%s called!\n",__FUNCTION__);
67 LockLayers(l->LayerInfo);
70 * The layer in front of the family is the layer in
71 * front of the parent of my layer
73 if (!l->parent)
75 UnlockLayers(l->LayerInfo);
76 return FALSE;
78 _l = l->parent->front;
80 while (_l->priority < l->priority)
81 _l = _l->front;
83 if (_l == l)
85 UnlockLayers(l->LayerInfo);
86 return TRUE;
88 ret = _MoveLayerBehind(l,_l,LayersBase);
90 UnlockLayers(l->LayerInfo);
92 return ret;
94 AROS_LIBFUNC_EXIT
95 } /* BehindLayer */