xref: /aoo42x/main/embedserv/source/inc/xwin.hxx (revision a20fd023)
1*a20fd023SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*a20fd023SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*a20fd023SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*a20fd023SAndrew Rist  * distributed with this work for additional information
6*a20fd023SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*a20fd023SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*a20fd023SAndrew Rist  * "License"); you may not use this file except in compliance
9*a20fd023SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*a20fd023SAndrew Rist  *
11*a20fd023SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*a20fd023SAndrew Rist  *
13*a20fd023SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*a20fd023SAndrew Rist  * software distributed under the License is distributed on an
15*a20fd023SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*a20fd023SAndrew Rist  * KIND, either express or implied.  See the License for the
17*a20fd023SAndrew Rist  * specific language governing permissions and limitations
18*a20fd023SAndrew Rist  * under the License.
19*a20fd023SAndrew Rist  *
20*a20fd023SAndrew Rist  *************************************************************/
21*a20fd023SAndrew Rist 
22*a20fd023SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _XWIN_HXX_
25cdf0e10cSrcweir #define _XWIN_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include "common.h"
29cdf0e10cSrcweir #include <osl/mutex.hxx>
30cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.h>
31cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
32cdf0e10cSrcweir #include <com/sun/star/awt/XWindow.hpp>
33cdf0e10cSrcweir #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class ContainerWindowWrapper:
37cdf0e10cSrcweir     public ::cppu::WeakImplHelper2<
38cdf0e10cSrcweir                  ::com::sun::star::awt::XWindow,
39cdf0e10cSrcweir                  ::com::sun::star::awt::XSystemDependentWindowPeer>
40cdf0e10cSrcweir {
41cdf0e10cSrcweir public:
42cdf0e10cSrcweir 
43cdf0e10cSrcweir     ContainerWindowWrapper(HWND aHwnd);
44cdf0e10cSrcweir 
45cdf0e10cSrcweir     ~ ContainerWindowWrapper();
46cdf0e10cSrcweir 
47cdf0e10cSrcweir 
48cdf0e10cSrcweir     // XComponent
49cdf0e10cSrcweir 
50cdf0e10cSrcweir     virtual void SAL_CALL
51cdf0e10cSrcweir     dispose(
52cdf0e10cSrcweir     )
53cdf0e10cSrcweir         throw (
54cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
55cdf0e10cSrcweir         );
56cdf0e10cSrcweir 
57cdf0e10cSrcweir     virtual void SAL_CALL
58cdf0e10cSrcweir     addEventListener(
59cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
60cdf0e10cSrcweir         ::com::sun::star::lang::XEventListener >& xListener
61cdf0e10cSrcweir     )
62cdf0e10cSrcweir         throw (
63cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
64cdf0e10cSrcweir         );
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     virtual void SAL_CALL
67cdf0e10cSrcweir     removeEventListener(
68cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
69cdf0e10cSrcweir         ::com::sun::star::lang::XEventListener >& aListener
70cdf0e10cSrcweir     )
71cdf0e10cSrcweir         throw (
72cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
73cdf0e10cSrcweir         );
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 
76cdf0e10cSrcweir     // XSystemDependentWindowPeer
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL
79cdf0e10cSrcweir     getWindowHandle(
80cdf0e10cSrcweir         const ::com::sun::star::uno::Sequence< sal_Int8 >& ProcessId,
81cdf0e10cSrcweir         sal_Int16 SystemType
82cdf0e10cSrcweir     )
83cdf0e10cSrcweir         throw (
84cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
85cdf0e10cSrcweir         );
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     // XWindow
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     virtual void SAL_CALL
90cdf0e10cSrcweir     setPosSize(
91cdf0e10cSrcweir         sal_Int32 X,
92cdf0e10cSrcweir         sal_Int32 Y,
93cdf0e10cSrcweir         sal_Int32 Width,
94cdf0e10cSrcweir         sal_Int32 Height,
95cdf0e10cSrcweir         sal_Int16 Flags
96cdf0e10cSrcweir     )
97cdf0e10cSrcweir         throw (
98cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException);
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     virtual ::com::sun::star::awt::Rectangle SAL_CALL
101cdf0e10cSrcweir     getPosSize(
102cdf0e10cSrcweir     )
103cdf0e10cSrcweir         throw (
104cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
105cdf0e10cSrcweir         );
106cdf0e10cSrcweir 
107cdf0e10cSrcweir     virtual void SAL_CALL
108cdf0e10cSrcweir     setVisible(
109cdf0e10cSrcweir         sal_Bool Visible
110cdf0e10cSrcweir     )
111cdf0e10cSrcweir         throw (
112cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
113cdf0e10cSrcweir         );
114cdf0e10cSrcweir 
115cdf0e10cSrcweir     virtual void SAL_CALL
116cdf0e10cSrcweir     setEnable(
117cdf0e10cSrcweir         sal_Bool Enable
118cdf0e10cSrcweir     )
119cdf0e10cSrcweir         throw (
120cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
121cdf0e10cSrcweir         );
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     virtual void SAL_CALL
124cdf0e10cSrcweir     setFocus(
125cdf0e10cSrcweir     )
126cdf0e10cSrcweir         throw (
127cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
128cdf0e10cSrcweir         );
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     virtual void SAL_CALL
131cdf0e10cSrcweir     addWindowListener(
132cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
133cdf0e10cSrcweir         ::com::sun::star::awt::XWindowListener >& xListener
134cdf0e10cSrcweir     )
135cdf0e10cSrcweir         throw (
136cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
137cdf0e10cSrcweir         );
138cdf0e10cSrcweir 
139cdf0e10cSrcweir     virtual void SAL_CALL
140cdf0e10cSrcweir     removeWindowListener(
141cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
142cdf0e10cSrcweir         ::com::sun::star::awt::XWindowListener >& xListener
143cdf0e10cSrcweir     )
144cdf0e10cSrcweir         throw (
145cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
146cdf0e10cSrcweir         );
147cdf0e10cSrcweir 
148cdf0e10cSrcweir     virtual void SAL_CALL
149cdf0e10cSrcweir     addFocusListener(
150cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
151cdf0e10cSrcweir         ::com::sun::star::awt::XFocusListener >& xListener
152cdf0e10cSrcweir     )
153cdf0e10cSrcweir         throw (
154cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
155cdf0e10cSrcweir         );
156cdf0e10cSrcweir 
157cdf0e10cSrcweir     virtual void SAL_CALL
158cdf0e10cSrcweir     removeFocusListener(
159cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
160cdf0e10cSrcweir         ::com::sun::star::awt::XFocusListener >& xListener
161cdf0e10cSrcweir     )
162cdf0e10cSrcweir         throw (
163cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
164cdf0e10cSrcweir         );
165cdf0e10cSrcweir 
166cdf0e10cSrcweir     virtual void SAL_CALL
167cdf0e10cSrcweir     addKeyListener(
168cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
169cdf0e10cSrcweir         ::com::sun::star::awt::XKeyListener >& xListener
170cdf0e10cSrcweir     )
171cdf0e10cSrcweir         throw (
172cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
173cdf0e10cSrcweir         );
174cdf0e10cSrcweir 
175cdf0e10cSrcweir     virtual void SAL_CALL
176cdf0e10cSrcweir     removeKeyListener(
177cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
178cdf0e10cSrcweir         ::com::sun::star::awt::XKeyListener >& xListener
179cdf0e10cSrcweir     )
180cdf0e10cSrcweir         throw (
181cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
182cdf0e10cSrcweir         );
183cdf0e10cSrcweir 
184cdf0e10cSrcweir     virtual void SAL_CALL
185cdf0e10cSrcweir     addMouseListener(
186cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
187cdf0e10cSrcweir         ::com::sun::star::awt::XMouseListener >& xListener
188cdf0e10cSrcweir     )
189cdf0e10cSrcweir         throw (
190cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
191cdf0e10cSrcweir         );
192cdf0e10cSrcweir 
193cdf0e10cSrcweir     virtual void SAL_CALL
194cdf0e10cSrcweir     removeMouseListener(
195cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
196cdf0e10cSrcweir         ::com::sun::star::awt::XMouseListener >& xListener
197cdf0e10cSrcweir     )
198cdf0e10cSrcweir         throw (
199cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
200cdf0e10cSrcweir         );
201cdf0e10cSrcweir 
202cdf0e10cSrcweir     virtual void SAL_CALL
203cdf0e10cSrcweir     addMouseMotionListener(
204cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
205cdf0e10cSrcweir         ::com::sun::star::awt::XMouseMotionListener >& xListener
206cdf0e10cSrcweir     )
207cdf0e10cSrcweir         throw (
208cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
209cdf0e10cSrcweir         );
210cdf0e10cSrcweir 
211cdf0e10cSrcweir     virtual void SAL_CALL
212cdf0e10cSrcweir     removeMouseMotionListener(
213cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
214cdf0e10cSrcweir         ::com::sun::star::awt::XMouseMotionListener >& xListener
215cdf0e10cSrcweir     )
216cdf0e10cSrcweir         throw (
217cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
218cdf0e10cSrcweir         );
219cdf0e10cSrcweir 
220cdf0e10cSrcweir     virtual void SAL_CALL
221cdf0e10cSrcweir     addPaintListener(
222cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
223cdf0e10cSrcweir         ::com::sun::star::awt::XPaintListener >& xListener
224cdf0e10cSrcweir     )
225cdf0e10cSrcweir         throw (
226cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
227cdf0e10cSrcweir         );
228cdf0e10cSrcweir 
229cdf0e10cSrcweir     virtual void SAL_CALL
230cdf0e10cSrcweir     removePaintListener(
231cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
232cdf0e10cSrcweir         ::com::sun::star::awt::XPaintListener >& xListener
233cdf0e10cSrcweir     )
234cdf0e10cSrcweir         throw (
235cdf0e10cSrcweir             ::com::sun::star::uno::RuntimeException
236cdf0e10cSrcweir         );
237cdf0e10cSrcweir 
238cdf0e10cSrcweir 
239cdf0e10cSrcweir private:
240cdf0e10cSrcweir 
241cdf0e10cSrcweir     osl::Mutex m_aMutex;
242cdf0e10cSrcweir     cppu::OInterfaceContainerHelper *m_pDisposeEventListeners;
243cdf0e10cSrcweir 
244cdf0e10cSrcweir     HWND m_aHwnd;
245cdf0e10cSrcweir };
246cdf0e10cSrcweir 
247cdf0e10cSrcweir 
248cdf0e10cSrcweir #endif
249