1 /*******************************************************************************
2  * Copyright (c) 2003, 2007 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.VisibilityWindowListener;
14 
15 import org.eclipse.swt.browser.WindowEvent;
16 //import java.lang.all;
17 
18 import org.eclipse.swt.internal.SWTEventListener;
19 
20 /** 
21  * This listener interface may be implemented in order to receive
22  * a {@link WindowEvent} notification when a window hosting a
23  * {@link Browser} needs to be displayed or hidden.
24  * 
25  * @see Browser#addVisibilityWindowListener(VisibilityWindowListener)
26  * @see Browser#removeVisibilityWindowListener(VisibilityWindowListener)
27  * @see OpenWindowListener
28  * @see CloseWindowListener
29  * 
30  * @since 3.0
31  */
32 public interface VisibilityWindowListener : SWTEventListener {
33     
34 /**
35  * This method is called when the window hosting a <code>Browser</code> 
36  * is requested to be hidden. Application would typically hide the
37  * {@link org.eclipse.swt.widgets.Shell} that hosts the <code>Browser</code>.
38  * <p>
39  *
40  * <p>The following fields in the <code>WindowEvent</code> apply:
41  * <ul>
42  * <li>(in) widget the <code>Browser</code> that needs to be hidden
43  * </ul>
44  *
45  * @param event the <code>WindowEvent</code> that specifies the
46  * <code>Browser</code> that needs to be hidden
47  * 
48  * @see org.eclipse.swt.widgets.Shell#setVisible(bool)
49  * 
50  * @since 3.0
51  */ 
52 public void hide(WindowEvent event);
53 
54 /**
55  * This method is called when the window hosting a <code>Browser</code>
56  * is requested to be displayed. Application would typically set the 
57  * location and the size of the {@link org.eclipse.swt.widgets.Shell} 
58  * that hosts the <code>Browser</code>, if a particular location and size
59  * are specified. The application would then open that <code>Shell</code>.
60  * <p>
61  *
62  * <p>The following fields in the <code>WindowEvent</code> apply:
63  * <ul>
64  * <li>(in) widget the <code>Browser</code> to display
65  * <li>(in) location the requested location for the <code>Shell</code> 
66  * hosting the browser. It is <code>null</code> if no location is set. 
67  * <li>(in) size the requested size for the <code>Browser</code>.
68  * The client area of the <code>Shell</code> hosting the
69  * <code>Browser</code> should be large enough to accommodate that size.
70  * It is <code>null</code> if no size is set.
71  * <li>(in) addressBar <code>true</code> if the <code>Shell</code> 
72  * hosting the <code>Browser</code> should display an address bar or
73  * <code>false</code> otherwise
74  * <li>(in) menuBar <code>true</code> if the <code>Shell</code> 
75  * hosting the <code>Browser</code> should display a menu bar or
76  * <code>false</code> otherwise
77  * <li>(in) statusBar <code>true</code> if the <code>Shell</code> 
78  * hosting the <code>Browser</code> should display a status bar or
79  * <code>false</code> otherwise
80  * <li>(in) toolBar <code>true</code> if the <code>Shell</code> 
81  * hosting the <code>Browser</code> should display a tool bar or
82  * <code>false</code> otherwise
83  * </ul>
84  *
85  * @param event the <code>WindowEvent</code> that specifies the
86  * <code>Browser</code> that needs to be displayed
87  * 
88  * @see org.eclipse.swt.widgets.Control#setLocation(org.eclipse.swt.graphics.Point)
89  * @see org.eclipse.swt.widgets.Control#setSize(org.eclipse.swt.graphics.Point)
90  * @see org.eclipse.swt.widgets.Shell#open()
91  * 
92  * @since 3.0
93  */ 
94 public void show(WindowEvent event);
95 
96 }