other-licenses/ia2/AccessibleHyperlink.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /*************************************************************************
michael@0 2 *
michael@0 3 * File Name (AccessibleHyperlink.idl)
michael@0 4 *
michael@0 5 * IAccessible2 IDL Specification
michael@0 6 *
michael@0 7 * Copyright (c) 2007, 2010 Linux Foundation
michael@0 8 * Copyright (c) 2006 IBM Corporation
michael@0 9 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
michael@0 10 * All rights reserved.
michael@0 11 *
michael@0 12 *
michael@0 13 * Redistribution and use in source and binary forms, with or without
michael@0 14 * modification, are permitted provided that the following conditions
michael@0 15 * are met:
michael@0 16 *
michael@0 17 * 1. Redistributions of source code must retain the above copyright
michael@0 18 * notice, this list of conditions and the following disclaimer.
michael@0 19 *
michael@0 20 * 2. Redistributions in binary form must reproduce the above
michael@0 21 * copyright notice, this list of conditions and the following
michael@0 22 * disclaimer in the documentation and/or other materials
michael@0 23 * provided with the distribution.
michael@0 24 *
michael@0 25 * 3. Neither the name of the Linux Foundation nor the names of its
michael@0 26 * contributors may be used to endorse or promote products
michael@0 27 * derived from this software without specific prior written
michael@0 28 * permission.
michael@0 29 *
michael@0 30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
michael@0 31 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
michael@0 32 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@0 33 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
michael@0 34 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
michael@0 35 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@0 36 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
michael@0 37 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
michael@0 38 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
michael@0 39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
michael@0 40 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
michael@0 41 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
michael@0 42 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
michael@0 43 *
michael@0 44 * This BSD License conforms to the Open Source Initiative "Simplified
michael@0 45 * BSD License" as published at:
michael@0 46 * http://www.opensource.org/licenses/bsd-license.php
michael@0 47 *
michael@0 48 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
michael@0 49 * mark may be used in accordance with the Linux Foundation Trademark
michael@0 50 * Policy to indicate compliance with the IAccessible2 specification.
michael@0 51 *
michael@0 52 ************************************************************************/
michael@0 53
michael@0 54 import "objidl.idl";
michael@0 55 import "oaidl.idl";
michael@0 56 import "oleacc.idl";
michael@0 57 import "AccessibleAction.idl";
michael@0 58
michael@0 59 /** @brief This interface represents hyperlinks.
michael@0 60
michael@0 61 This interface represents a hyperlink associated with a single substring
michael@0 62 of text or single non-text object. Non-text objects can have either a
michael@0 63 single link or a collection of links such as when the non-text object is
michael@0 64 an image map.
michael@0 65
michael@0 66 Linked objects and anchors are implementation dependent. This interface is derived
michael@0 67 from IAccessibleAction. IAccessibleAction::nActions is one greater than the
michael@0 68 maximum value for the indices used with the methods of this interface.
michael@0 69
michael@0 70 Furthermore, the object that implements this interface has to be connected
michael@0 71 implicitly or explicitly with an object that implements IAccessibleText.
michael@0 72 IAccessibleHyperlink::startIndex and IAccessibleHyperlink::endIndex are
michael@0 73 indices with respect to the text exposed by IAccessibleText.
michael@0 74
michael@0 75 This interface provides access to a single object which can have multiple actions.
michael@0 76 An example is an image map which is an image with multiple links each of which is
michael@0 77 associated with a separate non-overlapping area of the image. This interface could
michael@0 78 also be applied to other kinds of objects with multiple actions such as "smart tags"
michael@0 79 which are objects, typically strings, which have multiple actions such as
michael@0 80 "Activate URI", "Bookmark URI", etc.
michael@0 81
michael@0 82 An interesting use case is an image map where each area is associated with multiple
michael@0 83 actions, e.g. an image map of smart tags. In this case you would have to implement
michael@0 84 two levels of accessible hyperlinks. The first level hyperlinks would only implement
michael@0 85 anchor and anchorTarget. The anchors would all reference the image object. The
michael@0 86 anchorTargets would reference the second level accessible hyperlink objects. None
michael@0 87 of the IAccessibleAction methods would be implemented on the first level hyperlink
michael@0 88 objects. The second level hyperlink objects would implement the IAccessibleAction
michael@0 89 methods. Their anchors would also reference the image object and their anchorTargets
michael@0 90 would reference URLs or the objects that would be activated.
michael@0 91
michael@0 92 This use case demonstrates that in some cases there is no need for IAccessibleHyperlink
michael@0 93 to derive from IAccessibleAction. As a result it may be removed in a later version of
michael@0 94 the IDL and it is suggested that implementations should not rely on the inheritance.
michael@0 95
michael@0 96 */
michael@0 97 [object, uuid(01C20F2B-3DD2-400f-949F-AD00BDAB1D41)]
michael@0 98 interface IAccessibleHyperlink : IAccessibleAction
michael@0 99 {
michael@0 100
michael@0 101 /** @brief Returns an object that represents the link anchor, as appropriate
michael@0 102 for the link at the specified index.
michael@0 103 @param [in] index
michael@0 104 A 0 based index identifies the anchor when, as in the case of an image map,
michael@0 105 there is more than one link represented by this object. The valid maximal
michael@0 106 index is indicated by IAccessibleAction::nActions.
michael@0 107 @param [out] anchor
michael@0 108 This is an implementation dependent value. For example, for a text link this
michael@0 109 method could return the substring of the containing string where the substring
michael@0 110 is overridden with link behavior, and for an image link this method could return
michael@0 111 an IUnknown VARIANT for IAccessibleImage. See the section about
michael@0 112 @ref _variants "VARIANTs" for additional information.
michael@0 113 @retval S_OK
michael@0 114 @retval E_INVALIDARG if bad [in] passed
michael@0 115 */
michael@0 116 [propget] HRESULT anchor
michael@0 117 (
michael@0 118 [in] long index,
michael@0 119 [out, retval] VARIANT *anchor
michael@0 120 );
michael@0 121
michael@0 122 /** @brief Returns an object representing the target of the link, as appropriate
michael@0 123 for the link at the specified index.
michael@0 124 @param [in] index
michael@0 125 A 0 based index identifies the anchor when, as in the case of an image map,
michael@0 126 there is more than one link represented by this object. The valid maximal
michael@0 127 index is indicated by IAccessibleAction::nActions.
michael@0 128 @param [out] anchorTarget
michael@0 129 This is an implementation dependent value. For example this method could
michael@0 130 return a BSTR VARIANT of the URI. Alternatively this method could return an
michael@0 131 IUnknown VARIANT of a COM interface representing a target object to be
michael@0 132 activated when the link is activated. See the section about
michael@0 133 @ref _variants "VARIANTs" for additional information.
michael@0 134 @retval S_OK
michael@0 135 @retval E_INVALIDARG if bad [in] passed
michael@0 136 */
michael@0 137 [propget] HRESULT anchorTarget
michael@0 138 (
michael@0 139 [in] long index,
michael@0 140 [out, retval] VARIANT *anchorTarget
michael@0 141 );
michael@0 142
michael@0 143 /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink starts.
michael@0 144
michael@0 145 The returned value is related to the IAccessibleText interface of the object that
michael@0 146 owns this hyperlink.
michael@0 147 @param [out] index
michael@0 148 @retval S_OK
michael@0 149 */
michael@0 150 [propget] HRESULT startIndex
michael@0 151 (
michael@0 152 [out, retval] long *index
michael@0 153 );
michael@0 154
michael@0 155 /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink ends.
michael@0 156
michael@0 157 The returned value is related to the IAccessibleText interface of the object that
michael@0 158 owns this hyperlink. The character at the index is not part of the hypertext.
michael@0 159 @param [out] index
michael@0 160 @retval S_OK
michael@0 161 */
michael@0 162 [propget] HRESULT endIndex
michael@0 163 (
michael@0 164 [out, retval] long *index
michael@0 165 );
michael@0 166
michael@0 167 /** @brief Returns whether the target object referenced by this link is still valid.
michael@0 168
michael@0 169 This is a volatile state that may change without sending an appropriate event.
michael@0 170 Returns TRUE if the referenced target is still valid and FALSE otherwise.
michael@0 171
michael@0 172 This has also been used to indicate whether or not the URI of the anchorTarget
michael@0 173 is malformed.
michael@0 174
michael@0 175 @param [out] valid
michael@0 176 If false, one or more of the object's links are invalid.
michael@0 177 If true, all of the object's links are valid.
michael@0 178 @retval S_OK
michael@0 179 @retval S_FALSE if there is nothing to return, [out] value is FALSE
michael@0 180 @note This method is not being used, is deprecated, and should not be implemented or
michael@0 181 used. It is likely that this method will be removed in a later version of the IDL.
michael@0 182 */
michael@0 183 [propget] HRESULT valid
michael@0 184 (
michael@0 185 [out, retval] boolean *valid
michael@0 186 );
michael@0 187 }

mercurial