1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
8 #include
"nsIAccessibleHyperLink.idl"
11 * A cross-platform interface that deals with text which contains hyperlinks.
12 * Each link is an embedded object representing exactly 1 character within
15 * Current implementation assumes every embedded object is a link.
18 [scriptable
, builtinclass
, uuid(b33684e2
-090c
-4e1d
-a3d9
-f4b46f4237b9
)]
19 interface nsIAccessibleHyperText
: nsISupports
22 * Return the number of links contained within this hypertext object.
24 readonly attribute
long linkCount
;
27 * Return link accessible at the given index.
29 * @param index [in] 0-based index of the link that is to be retrieved
31 * @return link accessible or null if there is no link at that index
33 nsIAccessibleHyperLink getLinkAt
(in long index
);
36 * Return index of the given link.
38 * @param link [in] link accessible the index is requested for
40 * @return index of the given link or null if there's no link within
41 * hypertext accessible
43 long getLinkIndex
(in nsIAccessibleHyperLink link
);
46 * Return link index at the given offset within hypertext accessible.
48 * @param offset [in] the 0-based character index
50 * @return 0-based link's index or -1 if no link is present at that
53 long getLinkIndexAtOffset
(in long offset
);