1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/other-licenses/ia2/AccessibleHyperlink.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,187 @@ 1.4 +/************************************************************************* 1.5 + * 1.6 + * File Name (AccessibleHyperlink.idl) 1.7 + * 1.8 + * IAccessible2 IDL Specification 1.9 + * 1.10 + * Copyright (c) 2007, 2010 Linux Foundation 1.11 + * Copyright (c) 2006 IBM Corporation 1.12 + * Copyright (c) 2000, 2006 Sun Microsystems, Inc. 1.13 + * All rights reserved. 1.14 + * 1.15 + * 1.16 + * Redistribution and use in source and binary forms, with or without 1.17 + * modification, are permitted provided that the following conditions 1.18 + * are met: 1.19 + * 1.20 + * 1. Redistributions of source code must retain the above copyright 1.21 + * notice, this list of conditions and the following disclaimer. 1.22 + * 1.23 + * 2. Redistributions in binary form must reproduce the above 1.24 + * copyright notice, this list of conditions and the following 1.25 + * disclaimer in the documentation and/or other materials 1.26 + * provided with the distribution. 1.27 + * 1.28 + * 3. Neither the name of the Linux Foundation nor the names of its 1.29 + * contributors may be used to endorse or promote products 1.30 + * derived from this software without specific prior written 1.31 + * permission. 1.32 + * 1.33 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 1.34 + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 1.35 + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.36 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 1.37 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1.38 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.39 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 1.40 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 1.41 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1.42 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1.43 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 1.44 + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 1.45 + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.46 + * 1.47 + * This BSD License conforms to the Open Source Initiative "Simplified 1.48 + * BSD License" as published at: 1.49 + * http://www.opensource.org/licenses/bsd-license.php 1.50 + * 1.51 + * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 1.52 + * mark may be used in accordance with the Linux Foundation Trademark 1.53 + * Policy to indicate compliance with the IAccessible2 specification. 1.54 + * 1.55 + ************************************************************************/ 1.56 + 1.57 +import "objidl.idl"; 1.58 +import "oaidl.idl"; 1.59 +import "oleacc.idl"; 1.60 +import "AccessibleAction.idl"; 1.61 + 1.62 +/** @brief This interface represents hyperlinks. 1.63 + 1.64 + This interface represents a hyperlink associated with a single substring 1.65 + of text or single non-text object. Non-text objects can have either a 1.66 + single link or a collection of links such as when the non-text object is 1.67 + an image map. 1.68 + 1.69 + Linked objects and anchors are implementation dependent. This interface is derived 1.70 + from IAccessibleAction. IAccessibleAction::nActions is one greater than the 1.71 + maximum value for the indices used with the methods of this interface. 1.72 + 1.73 + Furthermore, the object that implements this interface has to be connected 1.74 + implicitly or explicitly with an object that implements IAccessibleText. 1.75 + IAccessibleHyperlink::startIndex and IAccessibleHyperlink::endIndex are 1.76 + indices with respect to the text exposed by IAccessibleText. 1.77 + 1.78 + This interface provides access to a single object which can have multiple actions. 1.79 + An example is an image map which is an image with multiple links each of which is 1.80 + associated with a separate non-overlapping area of the image. This interface could 1.81 + also be applied to other kinds of objects with multiple actions such as "smart tags" 1.82 + which are objects, typically strings, which have multiple actions such as 1.83 + "Activate URI", "Bookmark URI", etc. 1.84 + 1.85 + An interesting use case is an image map where each area is associated with multiple 1.86 + actions, e.g. an image map of smart tags. In this case you would have to implement 1.87 + two levels of accessible hyperlinks. The first level hyperlinks would only implement 1.88 + anchor and anchorTarget. The anchors would all reference the image object. The 1.89 + anchorTargets would reference the second level accessible hyperlink objects. None 1.90 + of the IAccessibleAction methods would be implemented on the first level hyperlink 1.91 + objects. The second level hyperlink objects would implement the IAccessibleAction 1.92 + methods. Their anchors would also reference the image object and their anchorTargets 1.93 + would reference URLs or the objects that would be activated. 1.94 + 1.95 + This use case demonstrates that in some cases there is no need for IAccessibleHyperlink 1.96 + to derive from IAccessibleAction. As a result it may be removed in a later version of 1.97 + the IDL and it is suggested that implementations should not rely on the inheritance. 1.98 + 1.99 +*/ 1.100 +[object, uuid(01C20F2B-3DD2-400f-949F-AD00BDAB1D41)] 1.101 +interface IAccessibleHyperlink : IAccessibleAction 1.102 +{ 1.103 + 1.104 + /** @brief Returns an object that represents the link anchor, as appropriate 1.105 + for the link at the specified index. 1.106 + @param [in] index 1.107 + A 0 based index identifies the anchor when, as in the case of an image map, 1.108 + there is more than one link represented by this object. The valid maximal 1.109 + index is indicated by IAccessibleAction::nActions. 1.110 + @param [out] anchor 1.111 + This is an implementation dependent value. For example, for a text link this 1.112 + method could return the substring of the containing string where the substring 1.113 + is overridden with link behavior, and for an image link this method could return 1.114 + an IUnknown VARIANT for IAccessibleImage. See the section about 1.115 + @ref _variants "VARIANTs" for additional information. 1.116 + @retval S_OK 1.117 + @retval E_INVALIDARG if bad [in] passed 1.118 + */ 1.119 + [propget] HRESULT anchor 1.120 + ( 1.121 + [in] long index, 1.122 + [out, retval] VARIANT *anchor 1.123 + ); 1.124 + 1.125 + /** @brief Returns an object representing the target of the link, as appropriate 1.126 + for the link at the specified index. 1.127 + @param [in] index 1.128 + A 0 based index identifies the anchor when, as in the case of an image map, 1.129 + there is more than one link represented by this object. The valid maximal 1.130 + index is indicated by IAccessibleAction::nActions. 1.131 + @param [out] anchorTarget 1.132 + This is an implementation dependent value. For example this method could 1.133 + return a BSTR VARIANT of the URI. Alternatively this method could return an 1.134 + IUnknown VARIANT of a COM interface representing a target object to be 1.135 + activated when the link is activated. See the section about 1.136 + @ref _variants "VARIANTs" for additional information. 1.137 + @retval S_OK 1.138 + @retval E_INVALIDARG if bad [in] passed 1.139 + */ 1.140 + [propget] HRESULT anchorTarget 1.141 + ( 1.142 + [in] long index, 1.143 + [out, retval] VARIANT *anchorTarget 1.144 + ); 1.145 + 1.146 + /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink starts. 1.147 + 1.148 + The returned value is related to the IAccessibleText interface of the object that 1.149 + owns this hyperlink. 1.150 + @param [out] index 1.151 + @retval S_OK 1.152 + */ 1.153 + [propget] HRESULT startIndex 1.154 + ( 1.155 + [out, retval] long *index 1.156 + ); 1.157 + 1.158 + /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink ends. 1.159 + 1.160 + The returned value is related to the IAccessibleText interface of the object that 1.161 + owns this hyperlink. The character at the index is not part of the hypertext. 1.162 + @param [out] index 1.163 + @retval S_OK 1.164 + */ 1.165 + [propget] HRESULT endIndex 1.166 + ( 1.167 + [out, retval] long *index 1.168 + ); 1.169 + 1.170 + /** @brief Returns whether the target object referenced by this link is still valid. 1.171 + 1.172 + This is a volatile state that may change without sending an appropriate event. 1.173 + Returns TRUE if the referenced target is still valid and FALSE otherwise. 1.174 + 1.175 + This has also been used to indicate whether or not the URI of the anchorTarget 1.176 + is malformed. 1.177 + 1.178 + @param [out] valid 1.179 + If false, one or more of the object's links are invalid. 1.180 + If true, all of the object's links are valid. 1.181 + @retval S_OK 1.182 + @retval S_FALSE if there is nothing to return, [out] value is FALSE 1.183 + @note This method is not being used, is deprecated, and should not be implemented or 1.184 + used. It is likely that this method will be removed in a later version of the IDL. 1.185 + */ 1.186 + [propget] HRESULT valid 1.187 + ( 1.188 + [out, retval] boolean *valid 1.189 + ); 1.190 +}