bump product version to 4.1.6.2
[LibreOffice.git] / include / comphelper / accessiblekeybindinghelper.hxx
blob4849b124cf87d8ce5d0b0332b76accf7a3fb90b9
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 COMPHELPER_ACCESSIBLE_KEYBINDING_HELPER_HXX
21 #define COMPHELPER_ACCESSIBLE_KEYBINDING_HELPER_HXX
23 #include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
24 #include <cppuhelper/implbase1.hxx>
25 #include <osl/mutex.hxx>
27 #include <vector>
29 #include "comphelper/comphelperdllapi.h"
31 //..............................................................................
32 namespace comphelper
34 //..............................................................................
36 //==============================================================================
37 // OAccessibleKeyBindingHelper
38 //==============================================================================
40 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessibleKeyBinding
41 > OAccessibleKeyBindingHelper_Base;
43 /** a helper class for implementing an accessible keybinding
45 class COMPHELPER_DLLPUBLIC OAccessibleKeyBindingHelper : public OAccessibleKeyBindingHelper_Base
47 private:
48 typedef ::std::vector< ::com::sun::star::uno::Sequence< ::com::sun::star::awt::KeyStroke > > KeyBindings;
50 KeyBindings m_aKeyBindings;
52 protected:
53 ::osl::Mutex m_aMutex;
55 virtual ~OAccessibleKeyBindingHelper();
57 public:
58 OAccessibleKeyBindingHelper();
59 OAccessibleKeyBindingHelper( const OAccessibleKeyBindingHelper& rHelper );
61 void AddKeyBinding( const ::com::sun::star::uno::Sequence< ::com::sun::star::awt::KeyStroke >& rKeyBinding ) throw (::com::sun::star::uno::RuntimeException);
62 void AddKeyBinding( const ::com::sun::star::awt::KeyStroke& rKeyStroke ) throw (::com::sun::star::uno::RuntimeException);
64 // XAccessibleKeyBinding
65 virtual sal_Int32 SAL_CALL getAccessibleKeyBindingCount() throw (::com::sun::star::uno::RuntimeException);
66 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::awt::KeyStroke > SAL_CALL getAccessibleKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
69 //..............................................................................
70 } // namespace comphelper
71 //..............................................................................
73 #endif // COMPHELPER_ACCESSIBLE_KEYBINDING_HELPER_HXX
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */