GT_FilterIMsg -- filter an IntuiMessage through GadTools. (V36)
modimsg = GT_FilterIMsg(imsg) D0 A1 struct IntuiMessage *GT_FilterIMsg(struct IntuiMessage *);
NOTE WELL: Extremely few programs will actually need this function. You almost certainly should be using GT_GetIMsg() and GT_ReplyIMsg() only, and not GT_FilterIMsg() and GT_PostFilterIMsg(). GT_FilterIMsg() takes the supplied IntuiMessage and asks the Gadget Toolkit to consider and possibly act on it. Returns NULL if the message was only of significance to a GadTools gadget (i.e. not to you), else returns a pointer to a modified IDCMP message, which may contain additional information. You should examine the Class, Code, and IAddress fields of the returned message to learn what happened. Do not make interpretations based on the original imsg. You should use GT_PostFilterIMsg() to revert to the original IntuiMessage once you are done with the modified one.
imsg - an IntuiMessage you obtained from a Window's UserPort.
modimsg - a modified IntuiMessage, possibly with extra information from GadTools, or NULL. When NULL, the message passed in to the function should be sent back to Intuition via ReplyMsg()
Starting with V39, this function actually expects and returns pointers to ExtIntuiMessage structures, but the prototype was not changed for source code compatibility with older software.
If this function returns NULL, you must call ReplyMsg() on the IntuiMessage you passed in to GT_FilterIMsg(). That is, if the message was processed by the toolkit you must reply this message to Intuition since gadtools will not do this automatically.
Tristar & Red Sector Inc.