Include <X11/Xlib.h> even if USE_VIDMODE is
[tangerine.git] / rom / hyperlayers / getfirstfamilymember.c
blob830fb87ad9010b189d04957723fb1fb9f835c14a
1 /*
2 Copyright © 1995-2001, 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"
14 /*****************************************************************************
16 NAME */
17 #include <proto/layers.h>
18 AROS_LH1(struct Layer *, GetFirstFamilyMember,
20 /* SYNOPSIS */
21 AROS_LHA(struct Layer *, l, A0),
23 /* LOCATION */
24 struct LayersBase *, LayersBase, 38, Layers)
26 /* FUNCTION
27 Gets the first member of a layer family. If the layer
28 has no children at all this function returns the
29 pointer to the same layer as given.
30 If the layer has children which again have children etc.
31 this function returns the frontmost child.
33 INPUTS
34 l - pointer to a layer structure.
36 RESULT
37 Pointer to a layer structure that represents the front
38 most child of the given layer or the layer itself if it
39 has no children.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 HISTORY
52 27-11-96 digulla automatically created from
53 layers_lib.fd and clib/layers_protos.h
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
58 AROS_LIBBASE_EXT_DECL(struct LayersBase *,LayersBase)
60 struct Layer * lastgood = l, *_l = l->front;
62 while ((NULL != _l) && (_l->nesting > l->nesting))
64 lastgood = _l;
65 _l = _l->front;
67 return lastgood;
69 AROS_LIBFUNC_EXIT
70 } /* GetFirstFamilyMember */