Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsISupports.idl" |
michael@0 | 8 | #include "nsIAccessibleHyperLink.idl" |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * A cross-platform interface that deals with text which contains hyperlinks. |
michael@0 | 12 | * Each link is an embedded object representing exactly 1 character within |
michael@0 | 13 | * the hypertext. |
michael@0 | 14 | * |
michael@0 | 15 | * Current implementation assumes every embedded object is a link. |
michael@0 | 16 | */ |
michael@0 | 17 | |
michael@0 | 18 | [scriptable, uuid(b33684e2-090c-4e1d-a3d9-f4b46f4237b9)] |
michael@0 | 19 | interface nsIAccessibleHyperText : nsISupports |
michael@0 | 20 | { |
michael@0 | 21 | /** |
michael@0 | 22 | * Return the number of links contained within this hypertext object. |
michael@0 | 23 | */ |
michael@0 | 24 | readonly attribute long linkCount; |
michael@0 | 25 | |
michael@0 | 26 | /** |
michael@0 | 27 | * Return link accessible at the given index. |
michael@0 | 28 | * |
michael@0 | 29 | * @param index [in] 0-based index of the link that is to be retrieved |
michael@0 | 30 | * |
michael@0 | 31 | * @return link accessible or null if there is no link at that index |
michael@0 | 32 | */ |
michael@0 | 33 | nsIAccessibleHyperLink getLinkAt(in long index); |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | * Return index of the given link. |
michael@0 | 37 | * |
michael@0 | 38 | * @param link [in] link accessible the index is requested for |
michael@0 | 39 | * |
michael@0 | 40 | * @return index of the given link or null if there's no link within |
michael@0 | 41 | * hypertext accessible |
michael@0 | 42 | */ |
michael@0 | 43 | long getLinkIndex(in nsIAccessibleHyperLink link); |
michael@0 | 44 | |
michael@0 | 45 | /* |
michael@0 | 46 | * Return link index at the given offset within hypertext accessible. |
michael@0 | 47 | * |
michael@0 | 48 | * @param offset [in] the 0-based character index |
michael@0 | 49 | * |
michael@0 | 50 | * @return 0-based link's index or -1 if no link is present at that |
michael@0 | 51 | * offset |
michael@0 | 52 | */ |
michael@0 | 53 | long getLinkIndexAtOffset(in long offset); |
michael@0 | 54 | }; |