]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/accessibility/AccessibleHyperlinkListener.java
Merge branch 'bug-623' into release/1.43.0
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / accessibility / AccessibleHyperlinkListener.java
1 /*******************************************************************************
2  * Copyright (c) 2009, 2010 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 import org.eclipse.swt.internal.SWTEventListener;
17
18 /**
19  * Classes which implement this interface provide methods
20  * that handle AccessibleHyperlink events.
21  * <p>
22  * After creating an instance of a class that implements
23  * this interface it can be added to an accessible using the
24  * <code>addAccessibleHyperlinkListener</code> method and removed using
25  * the <code>removeAccessibleHyperlinkListener</code> method.
26  * </p>
27  *
28  * @see AccessibleHyperlinkAdapter
29  * @see AccessibleHyperlinkEvent
30  *
31  * @since 3.6
32  */
33 public interface AccessibleHyperlinkListener extends SWTEventListener {
34         /**
35          * Returns the anchor for the link at the specified index.
36          *
37          * @param e an event object containing the following fields:<ul>
38          * <li>[in] index - a 0 based index identifying the anchor if this object
39          *              has more than one link, as in the case of an image map</li>
40          * <li>[typical out] result - the returned anchor</li>
41          * <li>[optional out] accessible - the returned anchor.
42          *              Note: The returned anchor can either be a string or an accessible.
43          *              For example, for a text link this could be the substring of the containing string
44          *              where the substring is overridden with link behavior, and for an image link this could be
45          *              the accessible for the image.</li>
46          * </ul>
47          */
48         public void getAnchor(AccessibleHyperlinkEvent e);
49
50         /**
51          * Returns the target of the link at the specified index.
52          *
53          * @param e an event object containing the following fields:<ul>
54          * <li>[in] index - a 0 based index identifying the anchor if this object
55          *              has more than one link, as in the case of an image map</li>
56          * <li>[typical out] result - the returned target</li>
57          * <li>[optional out] accessible - the returned target.
58          *              Note: The returned target can either be a string or an accessible.
59          *              For example, this could be a string URI, or the accessible for the target
60          *              object to be activated when the link is activated.</li>
61          * </ul>
62          */
63         public void getAnchorTarget(AccessibleHyperlinkEvent e);
64
65         /**
66          * Returns the 0 based character offset at which the textual representation of the hyperlink starts.
67          * <p>
68          * The returned value is related to the AccessibleTextExtended interface of the object that
69          * owns this hyperlink.
70          * </p>
71          *
72          * @param e an event object containing the following fields:<ul>
73          * <li>[out] index</li>
74          * </ul>
75          */
76         public void getStartIndex(AccessibleHyperlinkEvent e);
77
78         /**
79          * Returns the 0 based character offset at which the textual representation of the hyperlink ends.
80          * <p>
81          * The returned value is related to the AccessibleTextExtended interface of the object that
82          * owns this hyperlink. The character at the index is not part of the hypertext.
83          * </p>
84          *
85          * @param e an event object containing the following fields:<ul>
86          * <li>[out] index</li>
87          * </ul>
88          */
89         public void getEndIndex(AccessibleHyperlinkEvent e);
90 }