comparison dwt/accessibility/AccessibleListener.d @ 0:380af2bdd8e5

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