Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / vcl / osx / documentfocuslistener.hxx
blobf48cb1ad7ae788da25c551a3b2d90e59b0c3a6c5
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_VCL_OSX_DOCUMENTFOCUSLISTENER_HXX
21 #define INCLUDED_VCL_OSX_DOCUMENTFOCUSLISTENER_HXX
23 #include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
25 #include <cppuhelper/implbase.hxx>
27 #include "osx/a11yfocustracker.hxx"
29 #include <set>
32 class DocumentFocusListener :
33 public ::cppu::WeakImplHelper< css::accessibility::XAccessibleEventListener >
36 public:
38 explicit DocumentFocusListener(AquaA11yFocusTracker& rTracker);
40 void attachRecursive(
41 const css::uno::Reference< css::accessibility::XAccessible >& xAccessible
42 ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
44 void attachRecursive(
45 const css::uno::Reference< css::accessibility::XAccessible >& xAccessible,
46 const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext
47 ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
49 void attachRecursive(
50 const css::uno::Reference< css::accessibility::XAccessible >& xAccessible,
51 const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext,
52 const css::uno::Reference< css::accessibility::XAccessibleStateSet >& xStateSet
53 ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
55 void detachRecursive(
56 const css::uno::Reference< css::accessibility::XAccessible >& xAccessible
57 ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
59 void detachRecursive(
60 const css::uno::Reference< css::accessibility::XAccessible >& xAccessible,
61 const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext
62 ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
64 void detachRecursive(
65 const css::uno::Reference< css::accessibility::XAccessible >& xAccessible,
66 const css::uno::Reference< css::accessibility::XAccessibleContext >& xContext,
67 const css::uno::Reference< css::accessibility::XAccessibleStateSet >& xStateSet
68 ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
70 static css::uno::Reference< css::accessibility::XAccessible > getAccessible(const css::lang::EventObject& aEvent )
71 throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
73 // XEventListener
74 virtual void SAL_CALL disposing( const css::lang::EventObject& Source )
75 throw (css::uno::RuntimeException, std::exception) override;
77 // XAccessibleEventListener
78 virtual void SAL_CALL notifyEvent( const css::accessibility::AccessibleEventObject& aEvent )
79 throw( css::uno::RuntimeException, std::exception ) override;
81 private:
82 std::set< css::uno::Reference< css::uno::XInterface > > m_aRefList;
84 AquaA11yFocusTracker& m_aFocusTracker;
87 #endif // INCLUDED_VCL_OSX_DOCUMENTFOCUSLISTENER_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */