Update ooo320-m1
[ooovba.git] / embedserv / source / inc / xwin.hxx
blobfd1e00f9b304ecf68ffd3179bc19274e4651eb5d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xwin.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XWIN_HXX_
32 #define _XWIN_HXX_
35 #include "common.h"
36 #include <osl/mutex.hxx>
37 #include <cppuhelper/interfacecontainer.h>
38 #include <cppuhelper/implbase2.hxx>
39 #include <com/sun/star/awt/XWindow.hpp>
40 #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
43 class ContainerWindowWrapper:
44 public ::cppu::WeakImplHelper2<
45 ::com::sun::star::awt::XWindow,
46 ::com::sun::star::awt::XSystemDependentWindowPeer>
48 public:
50 ContainerWindowWrapper(HWND aHwnd);
52 ~ ContainerWindowWrapper();
55 // XComponent
57 virtual void SAL_CALL
58 dispose(
60 throw (
61 ::com::sun::star::uno::RuntimeException
64 virtual void SAL_CALL
65 addEventListener(
66 const ::com::sun::star::uno::Reference<
67 ::com::sun::star::lang::XEventListener >& xListener
69 throw (
70 ::com::sun::star::uno::RuntimeException
73 virtual void SAL_CALL
74 removeEventListener(
75 const ::com::sun::star::uno::Reference<
76 ::com::sun::star::lang::XEventListener >& aListener
78 throw (
79 ::com::sun::star::uno::RuntimeException
83 // XSystemDependentWindowPeer
85 virtual ::com::sun::star::uno::Any SAL_CALL
86 getWindowHandle(
87 const ::com::sun::star::uno::Sequence< sal_Int8 >& ProcessId,
88 sal_Int16 SystemType
90 throw (
91 ::com::sun::star::uno::RuntimeException
94 // XWindow
96 virtual void SAL_CALL
97 setPosSize(
98 sal_Int32 X,
99 sal_Int32 Y,
100 sal_Int32 Width,
101 sal_Int32 Height,
102 sal_Int16 Flags
104 throw (
105 ::com::sun::star::uno::RuntimeException);
107 virtual ::com::sun::star::awt::Rectangle SAL_CALL
108 getPosSize(
110 throw (
111 ::com::sun::star::uno::RuntimeException
114 virtual void SAL_CALL
115 setVisible(
116 sal_Bool Visible
118 throw (
119 ::com::sun::star::uno::RuntimeException
122 virtual void SAL_CALL
123 setEnable(
124 sal_Bool Enable
126 throw (
127 ::com::sun::star::uno::RuntimeException
130 virtual void SAL_CALL
131 setFocus(
133 throw (
134 ::com::sun::star::uno::RuntimeException
137 virtual void SAL_CALL
138 addWindowListener(
139 const ::com::sun::star::uno::Reference<
140 ::com::sun::star::awt::XWindowListener >& xListener
142 throw (
143 ::com::sun::star::uno::RuntimeException
146 virtual void SAL_CALL
147 removeWindowListener(
148 const ::com::sun::star::uno::Reference<
149 ::com::sun::star::awt::XWindowListener >& xListener
151 throw (
152 ::com::sun::star::uno::RuntimeException
155 virtual void SAL_CALL
156 addFocusListener(
157 const ::com::sun::star::uno::Reference<
158 ::com::sun::star::awt::XFocusListener >& xListener
160 throw (
161 ::com::sun::star::uno::RuntimeException
164 virtual void SAL_CALL
165 removeFocusListener(
166 const ::com::sun::star::uno::Reference<
167 ::com::sun::star::awt::XFocusListener >& xListener
169 throw (
170 ::com::sun::star::uno::RuntimeException
173 virtual void SAL_CALL
174 addKeyListener(
175 const ::com::sun::star::uno::Reference<
176 ::com::sun::star::awt::XKeyListener >& xListener
178 throw (
179 ::com::sun::star::uno::RuntimeException
182 virtual void SAL_CALL
183 removeKeyListener(
184 const ::com::sun::star::uno::Reference<
185 ::com::sun::star::awt::XKeyListener >& xListener
187 throw (
188 ::com::sun::star::uno::RuntimeException
191 virtual void SAL_CALL
192 addMouseListener(
193 const ::com::sun::star::uno::Reference<
194 ::com::sun::star::awt::XMouseListener >& xListener
196 throw (
197 ::com::sun::star::uno::RuntimeException
200 virtual void SAL_CALL
201 removeMouseListener(
202 const ::com::sun::star::uno::Reference<
203 ::com::sun::star::awt::XMouseListener >& xListener
205 throw (
206 ::com::sun::star::uno::RuntimeException
209 virtual void SAL_CALL
210 addMouseMotionListener(
211 const ::com::sun::star::uno::Reference<
212 ::com::sun::star::awt::XMouseMotionListener >& xListener
214 throw (
215 ::com::sun::star::uno::RuntimeException
218 virtual void SAL_CALL
219 removeMouseMotionListener(
220 const ::com::sun::star::uno::Reference<
221 ::com::sun::star::awt::XMouseMotionListener >& xListener
223 throw (
224 ::com::sun::star::uno::RuntimeException
227 virtual void SAL_CALL
228 addPaintListener(
229 const ::com::sun::star::uno::Reference<
230 ::com::sun::star::awt::XPaintListener >& xListener
232 throw (
233 ::com::sun::star::uno::RuntimeException
236 virtual void SAL_CALL
237 removePaintListener(
238 const ::com::sun::star::uno::Reference<
239 ::com::sun::star::awt::XPaintListener >& xListener
241 throw (
242 ::com::sun::star::uno::RuntimeException
246 private:
248 osl::Mutex m_aMutex;
249 cppu::OInterfaceContainerHelper *m_pDisposeEventListeners;
251 HWND m_aHwnd;
255 #endif