revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / reqtools / rtclosewindowsafely.c
blobf550e8b7d4dbfe7b7daa2ba7d272b215c9cbf00a
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <exec/types.h>
10 #include <proto/exec.h>
11 #include <proto/reqtools.h>
12 #include <proto/intuition.h>
13 #include <exec/libraries.h>
14 #include <exec/memory.h>
15 #include <aros/libcall.h>
16 #include "general.h"
17 #include "reqtools_intern.h"
18 #include "rtfuncs.h"
20 /*****************************************************************************
22 NAME */
24 AROS_LH1(VOID, rtCloseWindowSafely,
26 /* SYNOPSIS */
28 AROS_LHA(struct Window *, window, A0),
30 /* LOCATION */
32 struct ReqToolsBase *, ReqToolsBase, 25, ReqTools)
34 /* FUNCTION
36 Closes a window which shares its IDCMP port with another window. All the
37 pending messages (concerning this window) on the port will be removed and
38 the window will be closed.
40 Do not use this function to close windows which have an IDCMP port set up
41 by Intuition. If you do the port will be left in memory!
43 If you intend to open a lot of windows all sharing the same IDCMP port it
44 is easiest if you create a port yourself and open all windows with
45 newwin.IDCMPFlags set to 0 (this tells Intuition to NOT set up an IDCMP
46 port). After opening the window set the win->UserPort to your message
47 port and call ModifyIDCMP to set your IDCMP flags.
49 When you then receive messages from intuition check the imsg->IDCMPWindow
50 field to find out what window they came from and act upon them.
52 When closing your windows call rtCloseWindowSafely() for all of them and
53 delete your message port.
55 INPUTS
57 window -- pointer to the window to be closed
59 RESULT
61 NOTES
63 This function is for the advanced ReqTools user.
65 EXAMPLE
67 BUGS
68 none known
70 SEE ALSO
71 intuition.library/CloseWindow()
73 INTERNALS
75 HISTORY
77 ******************************************************************************/
79 AROS_LIBFUNC_INIT
81 RTFuncs_CloseWindowSafely(window);
83 AROS_LIBFUNC_EXIT
85 } /* rtCloseWindowSafely*/