summaryrefslogtreecommitdiff
path: root/vcl/inc/unx/gtk/gtkdata.hxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-19 08:40:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-19 08:46:44 +0100
commit7b649f835cc00ed76927c6821a135605609bed4e (patch)
tree62a364fe0991e9b8c3e171cbc84bbac78565dcb9 /vcl/inc/unx/gtk/gtkdata.hxx
parent34ad5eaebf6548f6006d97aa46837ca1f1dd141b (diff)
loplugin:refcounting in vcl
Change-Id: Ieca3dd33a7ae40c3f7b8ba30f763d71a548cd144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc/unx/gtk/gtkdata.hxx')
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx63
1 files changed, 61 insertions, 2 deletions
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 2f88ffe8b309..976412cfb6d5 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -25,6 +25,8 @@
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
#include <unx/gendata.hxx>
#include <unx/saldisp.hxx>
#include <unx/gtk/gtksys.hxx>
@@ -58,6 +60,64 @@ public:
sal_uLong m_nTimeoutMS;
};
+class DocumentFocusListener :
+ public ::cppu::WeakImplHelper< css::accessibility::XAccessibleEventListener >
+{
+
+ o3tl::sorted_vector< css::uno::Reference< css::uno::XInterface > > m_aRefList;
+
+public:
+ /// @throws lang::IndexOutOfBoundsException
+ /// @throws uno::RuntimeException
+ void attachRecursive(
+ const css::uno::Reference< css::accessibility::XAccessible >& xAccessible
+ );
+
+ /// @throws lang::IndexOutOfBoundsException
+ /// @throws uno::RuntimeException
+ void attachRecursive(
+ const css::uno::Reference< css::accessibility::XAccessible >& xAccessible,
+ const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext
+ );
+
+ /// @throws lang::IndexOutOfBoundsException
+ /// @throws uno::RuntimeException
+ void attachRecursive(
+ const css::uno::Reference< css::accessibility::XAccessible >& xAccessible,
+ const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext,
+ const css::uno::Reference< css::accessibility::XAccessibleStateSet >& xStateSet
+ );
+
+ /// @throws lang::IndexOutOfBoundsException
+ /// @throws uno::RuntimeException
+ void detachRecursive(
+ const css::uno::Reference< css::accessibility::XAccessible >& xAccessible
+ );
+
+ /// @throws lang::IndexOutOfBoundsException
+ /// @throws uno::RuntimeException
+ void detachRecursive(
+ const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext
+ );
+
+ /// @throws lang::IndexOutOfBoundsException
+ /// @throws uno::RuntimeException
+ void detachRecursive(
+ const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext,
+ const css::uno::Reference< css::accessibility::XAccessibleStateSet >& xStateSet
+ );
+
+ /// @throws lang::IndexOutOfBoundsException
+ /// @throws uno::RuntimeException
+ static css::uno::Reference< css::accessibility::XAccessible > getAccessible(const css::lang::EventObject& aEvent );
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
+
+ // XAccessibleEventListener
+ virtual void SAL_CALL notifyEvent( const css::accessibility::AccessibleEventObject& aEvent ) override;
+};
+
class GtkSalData final : public GenericUnixSalData
{
GSource* m_pUserEvent;
@@ -65,8 +125,7 @@ class GtkSalData final : public GenericUnixSalData
osl::Condition m_aDispatchCondition;
std::exception_ptr m_aException;
- css::uno::Reference<css::accessibility::XAccessibleEventListener> m_xDocumentFocusListener;
- DocumentFocusListener * m_pDocumentFocusListener;
+ rtl::Reference<DocumentFocusListener> m_xDocumentFocusListener;
public:
GtkSalData( SalInstance *pInstance );