Allow multiple volumes with the same name if their creation dates differ.
[AROS.git] / workbench / libs / gadtools / gt_getimsg.c
blob0ec31bc48935328a051629945ca98819ae204c2a
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include <proto/exec.h>
9 #include "gadtools_intern.h"
11 /*********************************************************************
13 NAME */
14 #include <proto/gadtools.h>
15 #include <exec/ports.h>
16 #include <intuition/intuition.h>
18 AROS_LH1(struct IntuiMessage *, GT_GetIMsg,
20 /* SYNOPSIS */
21 AROS_LHA(struct MsgPort *, intuiport, A0),
23 /* LOCATION */
24 struct Library *, GadToolsBase, 12, GadTools)
26 /* FUNCTION
27 You must use this function instead of exec.library/GetMsg() to get
28 messages from a window, if you are using gadtools gadgets. After you
29 are done with reading the message, you have to call GT_ReplyIMsg().
31 INPUTS
32 intuiport - UserPort of the window
34 RESULT
35 A pointer to a message or NULL, if there was no message or the messages
36 had only a meaning to gadtools.
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 GT_ReplyIMsg(), exec.library/GetMsg()
47 INTERNALS
49 HISTORY
51 ***************************************************************************/
53 AROS_LIBFUNC_INIT
55 struct IntuiMessage *imsg, *gtmsg;
57 while ((imsg = (struct IntuiMessage *)GetMsg(intuiport)))
59 if ((gtmsg = GT_FilterIMsg(imsg)))
61 /* msg is for app */
62 imsg = gtmsg;
63 break;
65 else
67 /* msg was for gadtools only */
68 ReplyMsg(&imsg->ExecMessage);
72 return imsg;
74 AROS_LIBFUNC_EXIT
76 } /* GT_GetIMsg */