25
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2003 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 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module org.eclipse.swt.accessibility.AccessibleListener;
|
|
14
|
|
15
|
|
16 import org.eclipse.swt.internal.SWTEventListener;
|
|
17 import org.eclipse.swt.accessibility.AccessibleEvent;
|
|
18
|
|
19 /**
|
|
20 * Classes that implement this interface provide methods
|
|
21 * that deal with the events that are generated when an
|
|
22 * accessibility client sends a message to a control.
|
|
23 * <p>
|
|
24 * After creating an instance of a class that implements
|
|
25 * this interface it can be added to a control using the
|
|
26 * <code>addAccessibleListener</code> method and removed
|
|
27 * using the <code>removeAccessibleListener</code> method.
|
|
28 * When a client requests information, the appropriate method
|
|
29 * will be invoked.
|
|
30 * </p><p>
|
|
31 * Note: Accessibility clients use child identifiers to specify
|
|
32 * whether they want information about a control or one of its children.
|
|
33 * Child identifiers are increasing integers beginning with 0.
|
|
34 * The identifier CHILDID_SELF represents the control itself.
|
|
35 * </p>
|
|
36 *
|
|
37 * @see AccessibleAdapter
|
|
38 * @see AccessibleEvent
|
|
39 *
|
|
40 * @since 2.0
|
|
41 */
|
|
42 public interface AccessibleListener : SWTEventListener {
|
|
43
|
|
44 /**
|
|
45 * Sent when an accessibility client requests the name
|
|
46 * of the control, or the name of a child of the control.
|
|
47 * <p>
|
|
48 * Return the name of the control or specified child in the
|
|
49 * <code>result</code> field of the event object. Returning
|
|
50 * an empty string tells the client that the control or child
|
|
51 * does not have a name, and returning null tells the client
|
|
52 * to use the platform name.
|
|
53 * </p>
|
|
54 *
|
|
55 * @param e an event object containing the following fields:<ul>
|
|
56 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
57 * <li>result [OUT] - the requested name string, or null</li>
|
|
58 * </ul>
|
|
59 */
|
|
60 public void getName(AccessibleEvent e);
|
|
61
|
|
62 /**
|
|
63 * Sent when an accessibility client requests the help string
|
|
64 * of the control, or the help string of a child of the control.
|
|
65 * <p>
|
|
66 * The information in this property should be similar to the help
|
|
67 * provided by toolTipText. It describes what the control or child
|
|
68 * does or how to use it, as opposed to getDescription, which
|
|
69 * describes appearance.
|
|
70 * </p><p>
|
|
71 * Return the help string of the control or specified child in
|
|
72 * the <code>result</code> field of the event object. Returning
|
|
73 * an empty string tells the client that the control or child
|
|
74 * does not have a help string, and returning null tells the
|
|
75 * client to use the platform help string.
|
|
76 * </p>
|
|
77 *
|
|
78 * @param e an event object containing the following fields:<ul>
|
|
79 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
80 * <li>result [OUT] - the requested help string, or null</li>
|
|
81 * </ul>
|
|
82 */
|
|
83 public void getHelp(AccessibleEvent e);
|
|
84
|
|
85 /**
|
|
86 * Sent when an accessibility client requests the keyboard shortcut
|
|
87 * of the control, or the keyboard shortcut of a child of the control.
|
|
88 * <p>
|
|
89 * A keyboard shortcut can either be a mnemonic, or an accelerator.
|
|
90 * As a general rule, if the control or child can receive keyboard focus,
|
|
91 * then you should expose its mnemonic, and if it cannot receive keyboard
|
|
92 * focus, then you should expose its accelerator.
|
|
93 * </p><p>
|
|
94 * Return the keyboard shortcut string of the control or specified child
|
|
95 * in the <code>result</code> field of the event object. Returning an
|
|
96 * empty string tells the client that the control or child does not
|
|
97 * have a keyboard shortcut string, and returning null tells the client
|
|
98 * to use the platform keyboard shortcut string.
|
|
99 * </p>
|
|
100 *
|
|
101 * @param e an event object containing the following fields:<ul>
|
|
102 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
103 * <li>result [OUT] - the requested keyboard shortcut string (example: "ALT+N"), or null</li>
|
|
104 * </ul>
|
|
105 */
|
|
106 public void getKeyboardShortcut(AccessibleEvent e);
|
|
107
|
|
108 /**
|
|
109 * Sent when an accessibility client requests a description
|
|
110 * of the control, or a description of a child of the control.
|
|
111 * <p>
|
|
112 * This is a textual description of the control or child's visual
|
|
113 * appearance, which is typically only necessary if it cannot be
|
|
114 * determined from other properties such as role.
|
|
115 * </p><p>
|
|
116 * Return the description of the control or specified child in
|
|
117 * the <code>result</code> field of the event object. Returning
|
|
118 * an empty string tells the client that the control or child
|
|
119 * does not have a description, and returning null tells the
|
|
120 * client to use the platform description.
|
|
121 * </p>
|
|
122 *
|
|
123 * @param e an event object containing the following fields:<ul>
|
|
124 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
125 * <li>result [OUT] - the requested description string, or null</li>
|
|
126 * </ul>
|
|
127 */
|
|
128 public void getDescription(AccessibleEvent e);
|
|
129 }
|