Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / embedserv / source / inc / xwin.hxx
blobb3952114101db23355c4733b0f10cdd6022c2a20
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_EMBEDSERV_SOURCE_INC_XWIN_HXX
21 #define INCLUDED_EMBEDSERV_SOURCE_INC_XWIN_HXX
24 #include "common.h"
25 #include <osl/mutex.hxx>
26 #include <comphelper/interfacecontainer2.hxx>
27 #include <cppuhelper/implbase.hxx>
28 #include <com/sun/star/awt/XWindow.hpp>
29 #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
32 class ContainerWindowWrapper:
33 public ::cppu::WeakImplHelper<
34 css::awt::XWindow,
35 css::awt::XSystemDependentWindowPeer>
37 public:
39 ContainerWindowWrapper(HWND aHwnd);
41 ~ ContainerWindowWrapper();
44 // XComponent
46 virtual void SAL_CALL
47 dispose(
49 throw (
50 css::uno::RuntimeException
53 virtual void SAL_CALL
54 addEventListener(
55 const css::uno::Reference< css::lang::XEventListener >& xListener
57 throw (
58 css::uno::RuntimeException
61 virtual void SAL_CALL
62 removeEventListener(
63 const css::uno::Reference< css::lang::XEventListener >& aListener
65 throw (
66 css::uno::RuntimeException
70 // XSystemDependentWindowPeer
72 virtual css::uno::Any SAL_CALL
73 getWindowHandle(
74 const css::uno::Sequence< sal_Int8 >& ProcessId,
75 sal_Int16 SystemType
77 throw (
78 css::uno::RuntimeException
81 // XWindow
83 virtual void SAL_CALL
84 setPosSize(
85 sal_Int32 X,
86 sal_Int32 Y,
87 sal_Int32 Width,
88 sal_Int32 Height,
89 sal_Int16 Flags
91 throw (
92 css::uno::RuntimeException);
94 virtual css::awt::Rectangle SAL_CALL
95 getPosSize(
97 throw (
98 css::uno::RuntimeException
101 virtual void SAL_CALL
102 setVisible(
103 sal_Bool Visible
105 throw (
106 css::uno::RuntimeException
109 virtual void SAL_CALL
110 setEnable(
111 sal_Bool Enable
113 throw (
114 css::uno::RuntimeException
117 virtual void SAL_CALL
118 setFocus(
120 throw (
121 css::uno::RuntimeException
124 virtual void SAL_CALL
125 addWindowListener(
126 const css::uno::Reference< css::awt::XWindowListener >& xListener
128 throw (
129 css::uno::RuntimeException
132 virtual void SAL_CALL
133 removeWindowListener(
134 const css::uno::Reference< css::awt::XWindowListener >& xListener
136 throw (
137 css::uno::RuntimeException
140 virtual void SAL_CALL
141 addFocusListener(
142 const css::uno::Reference< css::awt::XFocusListener >& xListener
144 throw (
145 css::uno::RuntimeException
148 virtual void SAL_CALL
149 removeFocusListener(
150 const css::uno::Reference< css::awt::XFocusListener >& xListener
152 throw (
153 css::uno::RuntimeException
156 virtual void SAL_CALL
157 addKeyListener(
158 const css::uno::Reference<
159 css::awt::XKeyListener >& xListener
161 throw (
162 css::uno::RuntimeException
165 virtual void SAL_CALL
166 removeKeyListener(
167 const css::uno::Reference< css::awt::XKeyListener >& xListener
169 throw (
170 css::uno::RuntimeException
173 virtual void SAL_CALL
174 addMouseListener(
175 const css::uno::Reference< css::awt::XMouseListener >& xListener
177 throw (
178 css::uno::RuntimeException
181 virtual void SAL_CALL
182 removeMouseListener(
183 const css::uno::Reference<
184 css::awt::XMouseListener >& xListener
186 throw (
187 css::uno::RuntimeException
190 virtual void SAL_CALL
191 addMouseMotionListener(
192 const css::uno::Reference<
193 css::awt::XMouseMotionListener >& xListener
195 throw (
196 css::uno::RuntimeException
199 virtual void SAL_CALL
200 removeMouseMotionListener(
201 const css::uno::Reference< css::awt::XMouseMotionListener >& xListener
203 throw (
204 css::uno::RuntimeException
207 virtual void SAL_CALL
208 addPaintListener(
209 const css::uno::Reference< css::awt::XPaintListener >& xListener
211 throw (
212 css::uno::RuntimeException
215 virtual void SAL_CALL
216 removePaintListener(
217 const css::uno::Reference< css::awt::XPaintListener >& xListener
219 throw (
220 css::uno::RuntimeException
224 private:
226 osl::Mutex m_aMutex;
227 comphelper::OInterfaceContainerHelper2 *m_pDisposeEventListeners;
229 HWND m_aHwnd;
233 #endif
235 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */