add missing -static
[AROS.git] / rom / hyperlayers / getfirstfamilymember.c
blob359dd7a54053a0dc5e0435402dd4b2e910f279e1
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <aros/libcall.h>
9 #include <graphics/clip.h>
10 #include <graphics/layers.h>
11 #include <utility/tagitem.h>
12 #include "basicfuncs.h"
15 * Get the first member of a layer family. If the layer
16 * has no children at all this function returns the
17 * pointer to the same layer as given.
18 * If the layer has children which again have children etc.
19 * this function returns the frontmost child.
22 struct Layer *GetFirstFamilyMember(struct Layer *l)
24 struct Layer * lastgood = l, *_l = l->front;
26 while ((NULL != _l) && (_l->nesting > l->nesting))
28 lastgood = _l;
29 _l = _l->front;
31 return lastgood;
32 } /* GetFirstFamilyMember */