2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/utility.h>
8 #include "intuition_intern.h"
10 /*****i***********************************************************************
13 #include <proto/intuition.h>
15 AROS_LH1(void, FreeIntuiMessage
,
18 AROS_LHA(struct IntuiMessage
*, imsg
, A0
),
21 struct IntuitionBase
*, IntuitionBase
, 149, Intuition
)
24 Private to AROS: free an IntuiMessage previously allocated
25 with AllocIntuiMessage.
28 imsg - The IntuiMessage. May be NULL.
45 *****************************************************************************/
49 DEBUG_FREEINTUIMESSAGE(dprintf("FreeIntuiMessage: Msg 0x%lx\n", imsg
));
51 ASSERT_VALID_PTR_OR_NULL(imsg
);
53 #define EIM(x) ((struct ExtIntuiMessage *)(x))
57 if ((imsg
->Class
== IDCMP_IDCMPUPDATE
) && (imsg
->IAddress
))
59 FreeTagItems((struct TagItem
*)imsg
->IAddress
);
62 if (EIM(imsg
)->eim_TabletData
)
64 if (EIM(imsg
)->eim_TabletData
->td_TagList
) FreeTagItems(EIM(imsg
)->eim_TabletData
->td_TagList
);
65 FreePooled(GetPrivIBase(IntuitionBase
)->IDCMPPool
,EIM(imsg
)->eim_TabletData
,sizeof (struct TabletData
));
67 FreePooled(GetPrivIBase(IntuitionBase
)->IDCMPPool
,imsg
, sizeof(struct IntIntuiMessage
));
70 DEBUG_FREEINTUIMESSAGE(dprintf("FreeIntuiMessage: done\n"));