1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_accessibility_XAccessibleKeyBinding_idl__
25#define __com_sun_star_accessibility_XAccessibleKeyBinding_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30#ifndef __com_sun_star_awt_KeyStroke_idl__
31#include <com/sun/star/awt/KeyStroke.idl>
32#endif
33#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
34#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
35#endif
36
37module com { module sun { module star { module accessibility {
38
39/** This interface can be used to represent any number of key bindings which
40    then can be associated to a certain action.
41
42    <p>There can be zero, one, or more key bindings.  Each key binding consists
43    of a sequence of <type scope="::com::sun::star::awt">KeyStroke</type>
44    objects.  The association of an action with a key binding is established
45    by the <type>XAccessibleAction</type> interface returning an
46    <type>XAccessibleKeyBinding</type> object.</p>
47
48    <p>A key binding describes alternative ways how to invoke an action with
49    pressing one or more keys after each other.  Each individual sequence of
50    key strokes </p>
51
52    @since OpenOffice 1.1.2
53*/
54published interface XAccessibleKeyBinding : ::com::sun::star::uno::XInterface
55{
56    /** Return the number of available key bindings.
57        @return
58            The returned value may be 0 to indicate that there are no key
59            bindings or the positive number of the available key bindings.
60    */
61    long getAccessibleKeyBindingCount ();
62
63    /** The returned sequence of key strokes describes one method to invoke
64        the associated action (the one from which you obtained the object at
65        which you called this method) by pressing keys.  The keys specified
66        by each of the returned key strokes have to be pressed at the same
67        time (the Control-key and the A-key for example).  The keys of
68        one key stroke have to be released before pressing those of the
69        next.  The order of the key strokes in the sequence define the order
70        in which to press them.
71        @param nIndex
72            The index selects one of alternative key bindings.  It has to
73            non-negative and smaller then the number of key bindings as
74            returned by the <member>geetAccessibleKeyBindingCount()</member>
75            method.
76        @return
77           The returned sequence of key strokes specifies one way to invoke
78           the associated action.  The sequence may be empty (but should
79           not be; better not to return such a key binding at all).
80        @throws ::com::sun::star::lang::IndexOutOfBoundsException
81            if the index is not valid.
82    */
83    sequence<::com::sun::star::awt::KeyStroke> getAccessibleKeyBinding ([in] long nIndex)
84        raises (::com::sun::star::lang::IndexOutOfBoundsException);
85};
86
87}; }; }; };
88
89#endif
90