xref: /aoo42x/main/offapi/com/sun/star/awt/XWindow.idl (revision cdf0e10c)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_awt_XWindow_idl__
28#define __com_sun_star_awt_XWindow_idl__
29
30#ifndef __com_sun_star_lang_XComponent_idl__
31#include <com/sun/star/lang/XComponent.idl>
32#endif
33
34#ifndef __com_sun_star_awt_Rectangle_idl__
35#include <com/sun/star/awt/Rectangle.idl>
36#endif
37
38#ifndef __com_sun_star_awt_XWindowListener_idl__
39#include <com/sun/star/awt/XWindowListener.idl>
40#endif
41
42#ifndef __com_sun_star_awt_XFocusListener_idl__
43#include <com/sun/star/awt/XFocusListener.idl>
44#endif
45
46#ifndef __com_sun_star_awt_XKeyListener_idl__
47#include <com/sun/star/awt/XKeyListener.idl>
48#endif
49
50#ifndef __com_sun_star_awt_XMouseListener_idl__
51#include <com/sun/star/awt/XMouseListener.idl>
52#endif
53
54#ifndef __com_sun_star_awt_XMouseMotionListener_idl__
55#include <com/sun/star/awt/XMouseMotionListener.idl>
56#endif
57
58#ifndef __com_sun_star_awt_XPaintListener_idl__
59#include <com/sun/star/awt/XPaintListener.idl>
60#endif
61
62
63//=============================================================================
64
65 module com {  module sun {  module star {  module awt {
66
67//=============================================================================
68
69/** specifies the basic operations for a window component.
70
71	<p>A window is a rectangular region on an output device with
72	its own position, size, and internal coordinate system.
73    A window is used for displaying data. In addition, the window
74    receives events from the user.</p>
75 */
76published interface XWindow: com::sun::star::lang::XComponent
77{
78	//-------------------------------------------------------------------------
79
80	/** sets the outer bounds of the window.
81
82        @param X
83        the x-coordinate of the window.
84
85        @param Y
86        the y-coordinate of the window.
87
88        @param Width
89        the width of the window.
90
91        @param Height
92        the height of the window.
93
94        @param Flags
95        Flags are of type <type>PosSize</type> and specify, which parameters
96        are taken into account when setting the outer bounds of the window.
97    */
98	[oneway] void setPosSize( [in] long X,
99			 [in] long Y,
100			 [in] long Width,
101			 [in] long Height,
102			 [in] short Flags );
103
104	//-------------------------------------------------------------------------
105
106	/** returns the outer bounds of the window.
107	 */
108	com::sun::star::awt::Rectangle getPosSize();
109
110	//-------------------------------------------------------------------------
111
112	/** shows or hides the window depending on the parameter.
113	 */
114	[oneway] void setVisible( [in] boolean Visible );
115
116	//-------------------------------------------------------------------------
117
118	/** enables or disables the window depending on the parameter.
119	 */
120	[oneway] void setEnable( [in] boolean Enable );
121
122	//-------------------------------------------------------------------------
123
124	/** sets the focus to the window.
125	 */
126	[oneway] void setFocus();
127
128	//-------------------------------------------------------------------------
129
130	/** adds a window listener to the object.
131
132        @param xListener
133            the listener to add. If this listener also supports the <type>XWindowListener2</type> interface,
134            it will receive the additional events declared in XWindowListener2.
135	 */
136	[oneway] void addWindowListener( [in] com::sun::star::awt::XWindowListener xListener );
137
138	//-------------------------------------------------------------------------
139
140	/** removes the specified window listener from the listener list.
141	 */
142	[oneway] void removeWindowListener( [in] com::sun::star::awt::XWindowListener xListener );
143
144	//-------------------------------------------------------------------------
145
146	/** adds a focus listener to the object.
147	 */
148	[oneway] void addFocusListener( [in] com::sun::star::awt::XFocusListener xListener );
149
150	//-------------------------------------------------------------------------
151
152	/** removes the specified focus listener from the listener list.
153	 */
154	[oneway] void removeFocusListener( [in] com::sun::star::awt::XFocusListener xListener );
155
156	//-------------------------------------------------------------------------
157
158	/** adds a key listener to the object.
159	 */
160	[oneway] void addKeyListener( [in] com::sun::star::awt::XKeyListener xListener );
161
162	//-------------------------------------------------------------------------
163
164	/** removes the specified key listener from the listener list.
165	 */
166	[oneway] void removeKeyListener( [in] com::sun::star::awt::XKeyListener xListener );
167
168	//-------------------------------------------------------------------------
169
170	/** adds a mouse listener to the object.
171	 */
172	[oneway] void addMouseListener( [in] com::sun::star::awt::XMouseListener xListener );
173
174	//-------------------------------------------------------------------------
175
176	/** removes the specified mouse listener from the listener list.
177	 */
178	[oneway] void removeMouseListener( [in] com::sun::star::awt::XMouseListener xListener );
179
180	//-------------------------------------------------------------------------
181
182	/** adds a mouse motion listener to the object.
183	 */
184	[oneway] void addMouseMotionListener( [in] com::sun::star::awt::XMouseMotionListener xListener );
185
186	//-------------------------------------------------------------------------
187
188	/** removes the specified mouse motion listener from the listener list.
189	 */
190	[oneway] void removeMouseMotionListener( [in] com::sun::star::awt::XMouseMotionListener xListener );
191
192	//-------------------------------------------------------------------------
193
194	/** adds a paint listener to the object.
195	 */
196	[oneway] void addPaintListener( [in] com::sun::star::awt::XPaintListener xListener );
197
198	//-------------------------------------------------------------------------
199
200	/** removes the specified paint listener from the listener list.
201	 */
202	[oneway] void removePaintListener( [in] com::sun::star::awt::XPaintListener xListener );
203
204};
205
206//=============================================================================
207
208}; }; }; };
209
210#endif
211