1 /*******************************************************************************
2  * Copyright (c) 2003, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  * Port to the D programming language:
11  *      John Reimer <terminal.node@gmail.com>
12  *******************************************************************************/
13 module org.eclipse.swt.browser.CloseWindowListener;
14 
15 import java.lang.all;
16 
17 import org.eclipse.swt.internal.SWTEventListener;
18 import org.eclipse.swt.browser.WindowEvent;
19 
20 /**
21  * This listener interface may be implemented in order to receive
22  * a {@link WindowEvent} notification when a {@link Browser} is 
23  * about to be closed and when its host window should be closed
24  * by the application.
25  * 
26  * @see Browser#addCloseWindowListener(CloseWindowListener)
27  * @see Browser#removeCloseWindowListener(CloseWindowListener)
28  * @see OpenWindowListener
29  * @see VisibilityWindowListener
30  * 
31  * @since 3.0
32  */
33 public interface CloseWindowListener : SWTEventListener {
34 
35 /**
36  * This method is called when the window hosting a {@link Browser} should be closed.
37  * Application would typically close the {@link org.eclipse.swt.widgets.Shell} that
38  * hosts the <code>Browser</code>. The <code>Browser</code> is disposed after this
39  * notification.
40  *
41  * <p>The following fields in the <code>WindowEvent</code> apply:
42  * <ul>
43  * <li>(in) widget the <code>Browser</code> that is going to be disposed
44  * </ul></p>
45  *
46  * @param event the <code>WindowEvent</code> that specifies the <code>Browser</code>
47  * that is going to be disposed
48  * 
49  * @see org.eclipse.swt.widgets.Shell#close()
50  * 
51  * @since 3.0
52  */ 
53 public void close(WindowEvent event);
54 }