Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / accessible / public / nsIAccessibleHyperLink.idl
blob306047dd3dc2bb55cc8eb61b4854b82ceb5f10fa
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is the Mozilla browser.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Bill Haneman (bill.haneman@sun.com)
25 * John Gaunt (jgaunt@netscape.com)
27 * Alternatively, the contents of this file may be used under the terms of
28 * either of the GNU General Public License Version 2 or later (the "GPL"),
29 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #include "nsISupports.idl"
43 interface nsIURI;
44 interface nsIAccessible;
46 /**
47 * A cross-platform interface that supports hyperlink-specific properties and
48 * methods. Anchors, image maps, xul:labels with class="text-link" implement this interface.
50 [scriptable, uuid(38c60bfa-6040-4bfe-93f2-acd6a909bb60)]
51 interface nsIAccessibleHyperLink : nsISupports
53 /**
54 * Returns the offset of the link within the parent accessible.
56 readonly attribute long startIndex;
58 /**
59 * Returns the end index of the link within the parent accessible.
61 * @note The link itself is represented by one embedded character within the
62 * parent text, so the endIndex should be startIndex + 1.
64 readonly attribute long endIndex;
66 /**
67 * Determines whether the link is valid (e. g. points to a valid URL).
69 * @note XXX Currently only used with ARIA links, and the author has to
70 * specify that the link is invalid via the aria-invalid="true" attribute.
71 * In all other cases, TRUE is returned.
73 readonly attribute boolean valid;
75 /**
76 * Determines whether the element currently has the focus, e. g. after
77 * returning from the destination page.
79 * @note ARIA links can only be focused if they have the tabindex
80 * attribute set. Also, state_focused should then be set on the accessible
81 * for this link.
83 readonly attribute boolean selected;
85 /**
86 * The numbber of anchors within this Hyperlink. Is normally 1 for anchors.
87 * This anchor is, for example, the visible output of the html:a tag.
88 * With an Image Map, reflects the actual areas within the map.
90 readonly attribute long anchorCount;
92 /**
93 * Returns the URI at the given index.
95 * @note ARIA hyperlinks do not have an URI to point to, since clicks are
96 * processed via JavaScript. Therefore this property does not work on ARIA
97 * links.
99 * @param index The 0-based index of the URI to be returned.
101 * @return the nsIURI object containing the specifications for the URI.
103 nsIURI getURI (in long index);
106 * Returns a reference to the object at the given index.
108 * @param index The 0-based index whose object is to be returned.
110 * @return the nsIAccessible object at the desired index.
112 nsIAccessible getAnchor (in long index);
116 Assumptions:
118 The object associated with object or anchor index
119 is an nsIAccessible.
120 A URI can be represented by the nsIURI interface
121 (or nsIURL interface).
123 Note that an object which supports nsIAccessibleHyperlink
124 does *not* generally implement nsIAccessible, unlike the
125 case of the other nsiAccessible* interfaces in this directory.
127 Aaron: would the nsISupports return from
128 getObject be queryable for nsIURI and nsIURL directly?