2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
14 #include <proto/commodities.h>
16 AROS_LH3I(VOID
, DivertCxMsg
,
20 AROS_LHA(CxMsg
*, cxm
, A0
),
21 AROS_LHA(CxObj
*, headObj
, A1
),
22 AROS_LHA(CxObj
*, returnObj
, A2
),
26 struct Library
*, CxBase
, 26, Commodities
)
30 Send the commodity message 'cxm' down the list of objects connected to
31 'headObj' and set the destination to 'returnObj'. This means that when
32 the message has travelled through the objects within the 'headObj' tree,
33 the _successor_ of returnObj will receive the message.
37 cxm -- the message to be diverted.
38 headObj -- the start object
39 returnObj -- the successor of this object will get the message after
40 travelling through 'headObj' and friends.
48 When a filter gets a message that matches with its description, it
49 sends the message down its list using:
51 DivertCxMsg(msg, filter, filter);
63 ******************************************************************************/
68 ROUTECxMsg(cxm
, (CxObj
*)GetHead(&headObj
->co_ObjList
));
70 if (cxm
->cxm_Level
>= cxm_MaxLevel
)
75 cxm
->cxm_retObj
[cxm
->cxm_Level
] = returnObj
;