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