]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/accessibility/AccessibleActionListener.java
5e2e52a00fa565a6e75ad9a68e168fbb40606a75
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / accessibility / AccessibleActionListener.java
1 /*******************************************************************************
2  * Copyright (c) 2009, 2010 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.accessibility;
15
16 import org.eclipse.swt.internal.SWTEventListener;
17
18 /**
19  * Classes which implement this interface provide methods
20  * that handle AccessibleAction events.
21  * <p>
22  * After creating an instance of a class that implements
23  * this interface it can be added to an accessible using the
24  * <code>addAccessibleActionListener</code> method and removed using
25  * the <code>removeAccessibleActionListener</code> method.
26  * </p>
27  *
28  * @see AccessibleActionAdapter
29  * @see AccessibleActionEvent
30  *
31  * @since 3.6
32  */
33 public interface AccessibleActionListener extends SWTEventListener {
34         /**
35          * Returns the number of accessible actions available in this object.
36          * <p>
37          * If there are more than one, the first one (index 0) is considered the
38          * "default" action of the object.
39          * </p>
40          *
41          * @param e an event object containing the following fields:<ul>
42          * <li>[out] count - the number of actions, or zero if there are no actions</li>
43          * </ul>
44          */
45         public void getActionCount(AccessibleActionEvent e);
46
47         /**
48          * Performs the specified action on the object.
49          *
50          * @param e an event object containing the following fields:<ul>
51          * <li>[in] index - a 0 based index specifying the action to perform.
52          *              If the index lies outside the valid range no action is performed.</li>
53          * <li>[out] result - set to {@link ACC#OK} if the action was performed.</li>
54          * </ul>
55          */
56         public void doAction(AccessibleActionEvent e);
57
58         /**
59          * Returns a description of the specified action.
60          *
61          * @param e an event object containing the following fields:<ul>
62          * <li>[in] index - a 0 based index specifying which action's description to return</li>
63          * <li>[out] result - a localized string describing the specified action,
64          *              or null if the index lies outside the valid range</li>
65          * </ul>
66          */
67         public void getDescription(AccessibleActionEvent e);
68
69         /**
70          * Returns a string representing one or more key bindings, if there
71          * are any, associated with the specified action.
72          * <p>
73          * The returned string is of the following form: mnemonic;accelerator
74          * for example: "C;CTRL+C" for the Copy item in a typical Edit menu.
75          * </p>
76          *
77          * @param e an event object containing the following fields:<ul>
78          * <li>[in] index - a 0 based index specifying which action's key bindings to return</li>
79          * <li>[out] result - a semicolon-delimited string of localized key bindings
80          *              (example: "C;CTRL+C"), or null if the index lies outside the valid range</li>
81          * </ul>
82          */
83         public void getKeyBinding(AccessibleActionEvent e);
84
85         /**
86          * Returns the name of the specified action.
87          * <p>
88          * There is no need to implement this method for single action controls
89          * since that would be redundant with AccessibleControlListener.getDefaultAction.
90          * </p>
91          *
92          * @param e an event object containing the following fields:<ul>
93          * <li>[in] index - a 0 based index specifying which action's name to return</li>
94          * <li>[in] localized - a boolean indicating whether or not to return a localized name</li>
95          * <li>[out] result - the name of the specified action,
96          *              or null if the index lies outside the valid range</li>
97          * </ul>
98          */
99         public void getName(AccessibleActionEvent e);
100 }