LibreOffice Module comphelper (master) 1
accessibleeventnotifier.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_COMPHELPER_ACCESSIBLEEVENTNOTIFIER_HXX
21#define INCLUDED_COMPHELPER_ACCESSIBLEEVENTNOTIFIER_HXX
22
24
25namespace com::sun::star::uno { class XInterface; }
26namespace com::sun::star::uno { template <class interface_type> class Reference; }
27namespace com::sun::star::accessibility { class XAccessibleEventListener; }
28namespace com::sun::star::accessibility { struct AccessibleEventObject; }
29
30namespace comphelper {
31
33{
34public:
35 typedef sal_uInt32 TClientId;
36
37public:
42
49 static TClientId registerClient();
50
62 static void revokeClient( const TClientId _nClient );
63
75 static void revokeClientNotifyDisposing(
76 const TClientId _nClient,
77 const css::uno::Reference< css::uno::XInterface >& _rxEventSource );
78
86 static sal_Int32 addEventListener(
87 const TClientId _nClient,
88 const css::uno::Reference< css::accessibility::XAccessibleEventListener >& _rxListener );
89
97 static sal_Int32 removeEventListener(
98 const TClientId _nClient,
99 const css::uno::Reference< css::accessibility::XAccessibleEventListener >& _rxListener );
100
106 static void addEvent(
107 const TClientId _nClient,
108 const css::accessibility::AccessibleEventObject& _rEvent );
109
110 // to be called at application shutdown to clear the static map, so we don't get crashes on shutdown
111 static void shutdown();
112
113};
114
115} // namespace comphelper
116
117#endif // INCLUDED_COMPHELPER_ACCESSIBLEEVENTNOTIFIER_HXX
118
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AccessibleEventNotifier(const AccessibleEventNotifier &)=delete
AccessibleEventNotifier & operator=(const AccessibleEventNotifier &)=delete
#define COMPHELPER_DLLPUBLIC
Reference