diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-13 21:28:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-04 17:37:34 +0100 |
commit | 20d5f61abfd47fc76da3be8241653fdb7ae10491 (patch) | |
tree | 33ed974dc0e6a152f394b8260dd0237df83174d5 /vcl/inc/unx | |
parent | 1187e2b35bb864808d9d158f0b10d83ce75dbaa7 (diff) |
factor out 'weld::Widget as XWindow'
Change-Id: I24b52c5b8908fdf1a66fd26b2dc438b9557afa6e
Reviewed-on: https://gerrit.libreoffice.org/82641
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc/unx')
-rw-r--r-- | vcl/inc/unx/gtk/gtkinst.hxx | 99 |
1 files changed, 7 insertions, 92 deletions
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index b4a516b3a28a..1e0f86cf2cf2 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -34,6 +34,8 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <cppuhelper/compbase.hxx> +#include <vcl/weld.hxx> +#include <vcl/weldutils.hxx> #include <gtk/gtk.h> namespace vcl @@ -257,30 +259,28 @@ private: mutable std::shared_ptr<vcl::unx::GtkPrintWrapper> m_xPrintWrapper; }; -typedef cppu::WeakComponentImplHelper<css::awt::XWindow> SalGtkXWindow_Base; - -class SalGtkXWindow final : public SalGtkXWindow_Base +class SalGtkXWindow final : public weld::TransportAsXWindow { private: - osl::Mutex m_aHelperMtx; weld::Window* m_pWeldWidget; GtkWidget* m_pWidget; public: SalGtkXWindow(weld::Window* pWeldWidget, GtkWidget* pWidget) - : SalGtkXWindow_Base(m_aHelperMtx) + : TransportAsXWindow(pWeldWidget) , m_pWeldWidget(pWeldWidget) , m_pWidget(pWidget) { } - void clear() + virtual void clear() override { m_pWeldWidget = nullptr; m_pWidget = nullptr; + TransportAsXWindow::clear(); } - GtkWidget* getWidget() const + GtkWidget* getGtkWidget() const { return m_pWidget; } @@ -289,91 +289,6 @@ public: { return m_pWeldWidget; } - - // css::awt::XWindow - void SAL_CALL setPosSize(sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int16) override - { - throw css::uno::RuntimeException("not implemented"); - } - - css::awt::Rectangle SAL_CALL getPosSize() override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL setVisible(sal_Bool) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL setEnable(sal_Bool) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL setFocus() override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } - - void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener >& ) override - { - throw css::uno::RuntimeException("not implemented"); - } }; GdkPixbuf* load_icon_by_name(const OUString& rIconName); |