Bug 850713 - Bump the required NDK version to 9. r=blassey.bugs,mh+mozilla
[gecko.git] / other-licenses / ia2 / AccessibleHyperlink.idl
blobb548e75e0551259dd28c781f7c9dff9e3fbffe50
1 /*************************************************************************
3 * File Name (AccessibleHyperlink.idl)
5 * IAccessible2 IDL Specification
7 * Copyright (c) Linux Foundation 2007, 2008
8 * Copyright (c) IBM Corp. 2006
9 * Copyright (c) Sun Microsystems, Inc. 2000, 2006
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License version 2.1, as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA
25 ************************************************************************/
27 import "objidl.idl";
28 import "oaidl.idl";
29 import "oleacc.idl";
30 import "AccessibleAction.idl";
32 /** @brief This interface represents hyperlinks.
34 This interface represents a hyperlink associated with a single substring
35 of text or single non-text object. Non-text objects can have either a
36 single link or a collection of links such as when the non-text object is
37 an image map.
39 Linked objects and anchors are implementation dependent. This interface is derived
40 from IAccessibleAction. IAccessibleAction::nActions is one greater than the
41 maximum value for the indices used with the methods of this interface.
43 Furthermore, the object that implements this interface has to be connected
44 implicitly or explicitly with an object that implements IAccessibleText.
45 IAccessibleHyperlink::startIndex and IAccessibleHyperlink::endIndex are
46 indices with respect to the text exposed by IAccessibleText.
48 This interface provides access to a single object which can have multiple actions.
49 An example is an image map which is an image with multiple links each of which is
50 associated with a separate non-overlapping area of the image. This interface could
51 also be applied to other kinds of objects with multiple actions such as "smart tags"
52 which are objects, typically strings, which have multiple actions such as
53 "Activate URI", "Bookmark URI", etc.
55 An interesting use case is an image map where each area is associated with multiple
56 actions, e.g. an image map of smart tags. In this case you would have to implement
57 two levels of accessible hyperlinks. The first level hyperlinks would only implement
58 anchor and anchorTarget. The anchors would all reference the image object. The
59 anchorTargets would reference the second level accessible hyperlink objects. None
60 of the IAccessibleAction methods would be implemented on the first level hyperlink
61 objects. The second level hyperlink objects would implement the IAccessibleAction
62 methods. Their anchors would also reference the image object and their anchorTargets
63 would reference URLs or the objects that would be activated.
65 This use case demonstrates that in some cases there is no need for IAccessibleHyperlink
66 to derive from IAccessibleAction. As a result it may be removed in a later version of
67 the IDL and it is suggested that implementations should not rely on the inheritance.
70 [object, uuid(01C20F2B-3DD2-400f-949F-AD00BDAB1D41)]
71 interface IAccessibleHyperlink : IAccessibleAction
74 /** @brief Returns an object that represents the link anchor, as appropriate
75 for the link at the specified index.
76 @param [in] index
77 A 0 based index identifies the anchor when, as in the case of an image map,
78 there is more than one link represented by this object. The valid maximal
79 index is indicated by IAccessibleAction::nActions.
80 @param [out] anchor
81 This is an implementation dependent value. For example, for a text link this
82 method could return the substring of the containing string where the substring
83 is overridden with link behavior, and for an image link this method could return
84 an IUnknown VARIANT for IAccessibleImage. See the section about
85 @ref _variants "VARIANTs" for additional information.
86 @retval S_OK
87 @retval S_FALSE if there is nothing to return, [out] value is NULL
88 @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
90 [propget] HRESULT anchor
92 [in] long index,
93 [out, retval] VARIANT *anchor
96 /** @brief Returns an object representing the target of the link, as appropriate
97 for the link at the specified index.
98 @param [in] index
99 A 0 based index identifies the anchor when, as in the case of an image map,
100 there is more than one link represented by this object. The valid maximal
101 index is indicated by IAccessibleAction::nActions.
102 @param [out] anchorTarget
103 This is an implementation dependent value. For example this method could
104 return a BSTR VARIANT of the URI. Alternatively this method could return an
105 IUnknown VARIANT of a COM interface representing a target object to be
106 activated when the link is activated. See the section about
107 @ref _variants "VARIANTs" for additional information.
108 @retval S_OK
109 @retval S_FALSE if there is nothing to return, [out] value is NULL
110 @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
112 [propget] HRESULT anchorTarget
114 [in] long index,
115 [out, retval] VARIANT *anchorTarget
118 /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink starts.
120 The returned value is related to the IAccessibleText interface of the object that
121 owns this hyperlink.
122 @param [out] index
123 @retval S_OK
125 [propget] HRESULT startIndex
127 [out, retval] long *index
130 /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink ends.
132 The returned value is related to the IAccessibleText interface of the object that
133 owns this hyperlink. The character at the index is not part of the hypertext.
134 @param [out] index
135 @retval S_OK
137 [propget] HRESULT endIndex
139 [out, retval] long *index
142 /** @brief Returns whether the target object referenced by this link is still valid.
144 This is a volatile state that may change without sending an appropriate event.
145 Returns TRUE if the referenced target is still valid and FALSE otherwise.
147 This has also been used to indicate whether or not the URI of the anchorTarget
148 is malformed.
150 Note: This method is not being used, is deprecated, and should not be implemented or
151 used. It is likely that this method will be removed in a later version of the IDL.
153 @param [out] valid
154 @retval S_OK
155 @retval S_FALSE if there is nothing to return, [out] value is FALSE
157 [propget] HRESULT valid
159 [out, retval] boolean *valid