1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 __com_sun_star_accessibility_XAccessibleKeyBinding_idl__
21 #define __com_sun_star_accessibility_XAccessibleKeyBinding_idl__
23 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/awt
/KeyStroke.idl
>
25 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
27 module com
{ module sun
{ module star
{ module accessibility
{
29 /** This interface can be used to represent any number of key bindings which
30 then can be associated to a certain action.
32 <p>There can be zero, one, or more key bindings. Each key binding consists
33 of a sequence of ::com::sun::star::awt::KeyStroke
34 objects. The association of an action with a key binding is established
35 by the XAccessibleAction interface returning an
36 XAccessibleKeyBinding object.</p>
38 <p>A key binding describes alternative ways how to invoke an action with
39 pressing one or more keys after each other. Each individual sequence of
44 interface XAccessibleKeyBinding
: ::com
::sun
::star
::uno
::XInterface
46 /** Return the number of available key bindings.
48 The returned value may be 0 to indicate that there are no key
49 bindings or the positive number of the available key bindings.
51 long getAccessibleKeyBindingCount
();
53 /** The returned sequence of key strokes describes one method to invoke
54 the associated action (the one from which you obtained the object at
55 which you called this method) by pressing keys. The keys specified
56 by each of the returned key strokes have to be pressed at the same
57 time (the Control-key and the A-key for example). The keys of
58 one key stroke have to be released before pressing those of the
59 next. The order of the key strokes in the sequence define the order
60 in which to press them.
62 The index selects one of alternative key bindings. It has to
63 non-negative and smaller then the number of key bindings as
64 returned by the getAccessibleKeyBindingCount()
67 The returned sequence of key strokes specifies one way to invoke
68 the associated action. The sequence may be empty (but should
69 not be; better not to return such a key binding at all).
70 @throws ::com::sun::star::lang::IndexOutOfBoundsException
71 if the index is not valid.
73 sequence
<::com
::sun
::star
::awt
::KeyStroke
> getAccessibleKeyBinding
([in] long nIndex
)
74 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */