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_XAccessibleAction_idl__
25#define	__com_sun_star_accessibility_XAccessibleAction_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_lang_IndexOutOfBoundsException_idl__
31#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
32#endif
33
34module com { module sun { module star { module accessibility {
35
36 published interface XAccessibleKeyBinding;
37
38/** Implement this interface to give access to actions that can be executed
39    for accessible objects.
40
41    <p>Every accessible object that can be manipulated beyond its methods
42    exported over the accessibility API should support this interface to
43    expose all actions that it can perform.  Each action can be performed or
44    be queried for a description or associated key bindings.</p>
45
46    @since OpenOffice 1.1.2
47*/
48published interface XAccessibleAction : ::com::sun::star::uno::XInterface
49{
50	/** Returns the number of accessible actions available in this object.
51
52        <p>If there are more than one, the first one is considered the
53        "default" action of the object.</p>
54
55        @return
56            The returned value of the number of actions is zero if there are
57            no actions.
58    */
59	long getAccessibleActionCount ();
60
61	/** Perform the specified Action on the object.
62
63        @param nIndex
64            This index specifies the action to perform.  If it lies outside
65            the valid range <FALSE/> is returned and no action is performed.
66        @return
67            Returns <TRUE/> if the action was successfully performed.  If
68            the action could not be performed successfully <FALSE/> is
69            returned.
70
71        @throws IndexOutOfBoundsException
72            If no action with the given index exists then an
73            <type scope="::com::sun::star::lang">IndexOutOfBoundsException</type>
74            exception is thrown.
75    */
76	boolean	doAccessibleAction ([in] long nIndex)
77        raises (::com::sun::star::lang::IndexOutOfBoundsException);
78
79	/** Returns a description of the specified action of the object.
80
81        @param nIndex
82            This index specifies the action of which to return a
83            description.  If it lies outside the valid range an empty string
84            is returned.
85
86        @return
87            The returned value is a localized string of the specified action.
88
89        @throws IndexOutOfBoundsException
90            If the given index lies not in the valid range then an
91            <type scope="::com::sun::star::lang">IndexOutOfBoundsException</type>
92            exception is thrown.
93    */
94	string getAccessibleActionDescription ([in] long nIndex)
95        raises (::com::sun::star::lang::IndexOutOfBoundsException);
96
97	/** Returns a key binding object, if there is one, associated with the
98        specified action.  Note that there can be several alternative key
99        bindings for an action.  See <type>XAccessibleKeyBinding</type> for
100        more information about how key bindings are represented.
101
102        @param nIndex
103            This index specifies the action of which to return the key
104            binding.
105
106        @return
107            The returned object describes a set of key bindings associated
108            with the specified action.
109
110        @throws IndexOutOfBoundsException
111            if the given index is not valid.
112    */
113    XAccessibleKeyBinding getAccessibleActionKeyBinding ([in] long nIndex)
114        raises (::com::sun::star::lang::IndexOutOfBoundsException);
115};
116
117}; }; }; };
118
119#endif
120