]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/accessibility/AccessibleTextListener.java
e0291256a7e0698dcb939ee5dbb0cff0e62b6c0c
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / accessibility / AccessibleTextListener.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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
17 import org.eclipse.swt.internal.*;
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>addAccessibleTextListener</code> method and removed
27  * using the <code>removeAccessibleTextListener</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><p>
36  * Note: This interface is typically used by implementors of
37  * a custom control to provide very detailed information about
38  * the control instance to accessibility clients.
39  * </p>
40  *
41  * @see AccessibleTextAdapter
42  * @see AccessibleTextEvent
43  *
44  * @since 3.0
45  */
46 public interface AccessibleTextListener extends SWTEventListener {
47
48         /**
49          * Sent when an accessibility client requests the current character offset
50          * of the text caret.
51          * <p>
52          * Return the caret offset in the <code>offset</code>
53          * field of the event object.
54          * </p>
55          *
56          * @param e an event object containing the following fields:<ul>
57          *    <li>childID [IN] - an identifier specifying a child of the control</li>
58          *    <li>offset [OUT] - the current offset of the text caret</li>
59          * </ul>
60          */
61         public void getCaretOffset (AccessibleTextEvent e);
62
63         /**
64          * Sent when an accessibility client requests the range of the current
65          * text selection.
66          * <p>
67          * Return the selection start offset and non-negative length in the
68          * <code>offset</code> and <code>length</code> fields of the event object.
69          * </p>
70          *
71          * @param e an event object containing the following fields:<ul>
72          *    <li>childID [IN] - an identifier specifying a child of the control</li>
73          *    <li>offset [OUT] - the offset of the current text selection</li>
74          *    <li>length [OUT] - the length of the current text selection</li>
75          * </ul>
76          */
77         public void getSelectionRange (AccessibleTextEvent e);
78 }