2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
6 Iterate through a list of objects.
9 #include <exec/types.h>
10 #include <exec/nodes.h>
11 #include "intuition_intern.h"
13 /*****************************************************************************
16 #include <intuition/classes.h>
17 #include <proto/intuition.h>
19 AROS_LH1(APTR
, NextObject
,
22 AROS_LHA(APTR
, objectPtrPtr
, A0
),
25 struct IntuitionBase
*, IntuitionBase
, 111, Intuition
)
28 Use this function to iterate through a list of BOOPSI objects.
29 You may do whatever you want with the object returned, even
30 remove it from the list or disposing it and then continue to
31 iterate thought the list.
34 objectPtrPtr - the pointer to a variable. This must be the same
35 variable, as long as you iterate though the same list. This
36 variable must initially be filled with the lh_Head of a list.
39 A BOOPSI object, which can be manipulated.
49 "Basic Object-Oriented Programming System for Intuition" and
50 "boopsi Class Reference" Dokument.
56 *****************************************************************************/
60 struct _Object
*nextobject
;
63 DEBUG_NEXTOBJECT(dprintf("NextObject: optr 0x%lx\n",
66 IntuitionBase
= IntuitionBase
; /* shut up the compiler */
68 SANITY_CHECKR(objectPtrPtr
,FALSE
)
70 nextobject
= (struct _Object
*)(*((struct _Object
**)objectPtrPtr
))->o_Node
.mln_Succ
;
73 oldobject
= (Object
*)BASEOBJECT(*((struct _Object
**)objectPtrPtr
));
74 *((struct _Object
**)objectPtrPtr
) = nextobject
;