1 /*******************************************************************************
2  * Copyright (c) 2003, 2005 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.OpenWindowListener;
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 new {@link Browser}
23  * needs to be provided by the application.
24  * 
25  * @see Browser#addOpenWindowListener(OpenWindowListener)
26  * @see Browser#removeOpenWindowListener(OpenWindowListener)
27  * @see CloseWindowListener
28  * @see VisibilityWindowListener
29  * 
30  * @since 3.0
31  */
32 public interface OpenWindowListener : SWTEventListener {
33 
34 /**
35  * This method is called when a new window needs to be created.
36  * <p>
37  * A particular <code>Browser</code> can be passed to the event.browser
38  * field to host the content of a new window.
39  * <p>
40  * A standalone system browser is used to host the new window
41  * if the event.required field value is false and if the event.browser 
42  * field is left <code>null</code>. The event.required field
43  * is true on platforms that don't support a standalone system browser for
44  * new window requests. 
45  * <p>
46  * The navigation is cancelled if the event.required field is set to
47  * true and the event.browser field is left <code>null</code>.
48  * <p>
49  * <p>The following fields in the <code>WindowEvent</code> apply:
50  * <ul>
51  * <li>(in/out) required true if the platform requires the user to provide a
52  * <code>Browser</code> to handle the new window or false otherwise.
53  * <li>(out) browser the new <code>Browser</code> that will host the 
54  * content of the new window.
55  * <li>(in) widget the <code>Browser</code> that is requesting to open a 
56  * new window
57  * </ul>
58  * 
59  * @param event the <code>WindowEvent</code> that needs to be passed a new
60  * <code>Browser</code> to handle the new window request
61  * 
62  * @since 3.0
63  */ 
64 public void open(WindowEvent event);
65 }