/src/libreoffice/vcl/source/weld/TransportAsXWindow.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | */ |
9 | | |
10 | | #include <vcl/weld/TransportAsXWindow.hxx> |
11 | | |
12 | | namespace weld |
13 | | { |
14 | | TransportAsXWindow::TransportAsXWindow(weld::Widget* pWeldWidget, weld::Builder* pWeldWidgetBuilder) |
15 | 0 | : m_pWeldWidget(pWeldWidget) |
16 | 0 | , m_pWeldWidgetBuilder(pWeldWidgetBuilder) |
17 | 0 | { |
18 | 0 | } Unexecuted instantiation: weld::TransportAsXWindow::TransportAsXWindow(weld::Widget*, weld::Builder*) Unexecuted instantiation: weld::TransportAsXWindow::TransportAsXWindow(weld::Widget*, weld::Builder*) |
19 | | |
20 | | void TransportAsXWindow::clear() |
21 | 0 | { |
22 | 0 | m_pWeldWidget = nullptr; |
23 | 0 | m_pWeldWidgetBuilder = nullptr; |
24 | 0 | } |
25 | | |
26 | | void SAL_CALL TransportAsXWindow::setPosSize(sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int16) |
27 | 0 | { |
28 | 0 | throw css::uno::RuntimeException(u"not implemented"_ustr); |
29 | 0 | } |
30 | | |
31 | | css::awt::Rectangle SAL_CALL TransportAsXWindow::getPosSize() |
32 | 0 | { |
33 | 0 | throw css::uno::RuntimeException(u"not implemented"_ustr); |
34 | 0 | } |
35 | | |
36 | | void SAL_CALL TransportAsXWindow::setVisible(sal_Bool bVisible) |
37 | 0 | { |
38 | 0 | m_pWeldWidget->set_visible(bVisible); |
39 | 0 | } |
40 | | |
41 | | void SAL_CALL TransportAsXWindow::setEnable(sal_Bool bSensitive) |
42 | 0 | { |
43 | 0 | m_pWeldWidget->set_sensitive(bSensitive); |
44 | 0 | } |
45 | | |
46 | 0 | void SAL_CALL TransportAsXWindow::setFocus() { m_pWeldWidget->grab_focus(); } |
47 | | |
48 | | void SAL_CALL TransportAsXWindow::addWindowListener( |
49 | | const css::uno::Reference<css::awt::XWindowListener>& rListener) |
50 | 0 | { |
51 | 0 | std::unique_lock g(m_aMutex); |
52 | 0 | m_aWindowListeners.addInterface(g, rListener); |
53 | 0 | } |
54 | | |
55 | | void SAL_CALL TransportAsXWindow::removeWindowListener( |
56 | | const css::uno::Reference<css::awt::XWindowListener>& rListener) |
57 | 0 | { |
58 | 0 | std::unique_lock g(m_aMutex); |
59 | 0 | m_aWindowListeners.removeInterface(g, rListener); |
60 | 0 | } |
61 | | |
62 | | void SAL_CALL |
63 | | TransportAsXWindow::addFocusListener(const css::uno::Reference<css::awt::XFocusListener>& rListener) |
64 | 0 | { |
65 | 0 | std::unique_lock g(m_aMutex); |
66 | 0 | m_aFocusListeners.addInterface(g, rListener); |
67 | 0 | } |
68 | | |
69 | | void SAL_CALL TransportAsXWindow::removeFocusListener( |
70 | | const css::uno::Reference<css::awt::XFocusListener>& rListener) |
71 | 0 | { |
72 | 0 | std::unique_lock g(m_aMutex); |
73 | 0 | m_aFocusListeners.removeInterface(g, rListener); |
74 | 0 | } |
75 | | |
76 | | void SAL_CALL |
77 | | TransportAsXWindow::addKeyListener(const css::uno::Reference<css::awt::XKeyListener>& rListener) |
78 | 0 | { |
79 | 0 | std::unique_lock g(m_aMutex); |
80 | 0 | m_aKeyListeners.addInterface(g, rListener); |
81 | 0 | } |
82 | | |
83 | | void SAL_CALL |
84 | | TransportAsXWindow::removeKeyListener(const css::uno::Reference<css::awt::XKeyListener>& rListener) |
85 | 0 | { |
86 | 0 | std::unique_lock g(m_aMutex); |
87 | 0 | m_aKeyListeners.removeInterface(g, rListener); |
88 | 0 | } |
89 | | |
90 | | void SAL_CALL |
91 | | TransportAsXWindow::addMouseListener(const css::uno::Reference<css::awt::XMouseListener>& rListener) |
92 | 0 | { |
93 | 0 | std::unique_lock g(m_aMutex); |
94 | 0 | m_aMouseListeners.addInterface(g, rListener); |
95 | 0 | } |
96 | | |
97 | | void SAL_CALL TransportAsXWindow::removeMouseListener( |
98 | | const css::uno::Reference<css::awt::XMouseListener>& rListener) |
99 | 0 | { |
100 | 0 | std::unique_lock g(m_aMutex); |
101 | 0 | m_aMouseListeners.removeInterface(g, rListener); |
102 | 0 | } |
103 | | |
104 | | void SAL_CALL TransportAsXWindow::addMouseMotionListener( |
105 | | const css::uno::Reference<css::awt::XMouseMotionListener>& rListener) |
106 | 0 | { |
107 | 0 | std::unique_lock g(m_aMutex); |
108 | 0 | m_aMotionListeners.addInterface(g, rListener); |
109 | 0 | } |
110 | | |
111 | | void SAL_CALL TransportAsXWindow::removeMouseMotionListener( |
112 | | const css::uno::Reference<css::awt::XMouseMotionListener>& rListener) |
113 | 0 | { |
114 | 0 | std::unique_lock g(m_aMutex); |
115 | 0 | m_aMotionListeners.removeInterface(g, rListener); |
116 | 0 | } |
117 | | |
118 | | void SAL_CALL |
119 | | TransportAsXWindow::addPaintListener(const css::uno::Reference<css::awt::XPaintListener>& rListener) |
120 | 0 | { |
121 | 0 | std::unique_lock g(m_aMutex); |
122 | 0 | m_aPaintListeners.addInterface(g, rListener); |
123 | 0 | } |
124 | | |
125 | | void SAL_CALL TransportAsXWindow::removePaintListener( |
126 | | const css::uno::Reference<css::awt::XPaintListener>& rListener) |
127 | 0 | { |
128 | 0 | std::unique_lock g(m_aMutex); |
129 | 0 | m_aPaintListeners.removeInterface(g, rListener); |
130 | 0 | } |
131 | | } |
132 | | |
133 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |