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.AccessibleTextListener;
|
|
14
|
|
15 import java.lang.all;
|
|
16
|
|
17 import org.eclipse.swt.accessibility.AccessibleTextEvent;
|
|
18
|
|
19 import org.eclipse.swt.internal.SWTEventListener;
|
|
20
|
|
21 /**
|
|
22 * Classes that implement this interface provide methods
|
|
23 * that deal with the events that are generated when an
|
|
24 * accessibility client sends a message to a control.
|
|
25 * <p>
|
|
26 * After creating an instance of a class that implements
|
|
27 * this interface it can be added to a control using the
|
|
28 * <code>addAccessibleTextListener</code> method and removed
|
|
29 * using the <code>removeAccessibleTextListener</code> method.
|
|
30 * When a client requests information the appropriate method
|
|
31 * will be invoked.
|
|
32 * </p><p>
|
|
33 * Note: Accessibility clients use child identifiers to specify
|
|
34 * whether they want information about a control or one of its children.
|
|
35 * Child identifiers are increasing integers beginning with 0.
|
|
36 * The identifier CHILDID_SELF represents the control itself.
|
|
37 * </p><p>
|
|
38 * Note: This interface is typically used by implementors of
|
|
39 * a custom control to provide very detailed information about
|
|
40 * the control instance to accessibility clients.
|
|
41 * </p>
|
|
42 *
|
|
43 * @see AccessibleTextAdapter
|
|
44 * @see AccessibleTextEvent
|
|
45 *
|
|
46 * @since 3.0
|
|
47 */
|
|
48 public interface AccessibleTextListener : SWTEventListener {
|
|
49
|
|
50 /**
|
|
51 * Sent when an accessibility client requests the current character offset
|
|
52 * of the text caret.
|
|
53 * <p>
|
|
54 * Return the caret offset in the <code>offset</code>
|
|
55 * field of the event object.
|
|
56 * </p>
|
|
57 *
|
|
58 * @param e an event object containing the following fields:<ul>
|
|
59 * <li>childID [IN] - an identifier specifying a child of the control</li>
|
|
60 * <li>offset [OUT] - the current offset of the text caret</li>
|
|
61 * </ul>
|
|
62 */
|
|
63 public void getCaretOffset (AccessibleTextEvent e);
|
|
64
|
|
65 /**
|
|
66 * Sent when an accessibility client requests the range of the current
|
|
67 * text selection.
|
|
68 * <p>
|
|
69 * Return the selection start offset and non-negative length in the
|
|
70 * <code>offset</code> and <code>length</code> fields of the event object.
|
|
71 * </p>
|
|
72 *
|
|
73 * @param e an event object containing the following fields:<ul>
|
|
74 * <li>childID [IN] - an identifier specifying a child of the control</li>
|
|
75 * <li>offset [OUT] - the offset of the current text selection</li>
|
|
76 * <li>length [OUT] - the length of the current text selection</li>
|
|
77 * </ul>
|
|
78 */
|
|
79 public void getSelectionRange (AccessibleTextEvent e);
|
|
80 }
|