michael@0: /************************************************************************* michael@0: * michael@0: * File Name (AccessibleHypertext.idl) michael@0: * michael@0: * IAccessible2 IDL Specification michael@0: * michael@0: * Copyright (c) 2007, 2010 Linux Foundation michael@0: * Copyright (c) 2006 IBM Corporation michael@0: * Copyright (c) 2000, 2006 Sun Microsystems, Inc. michael@0: * All rights reserved. michael@0: * michael@0: * michael@0: * Redistribution and use in source and binary forms, with or without michael@0: * modification, are permitted provided that the following conditions michael@0: * are met: michael@0: * michael@0: * 1. Redistributions of source code must retain the above copyright michael@0: * notice, this list of conditions and the following disclaimer. michael@0: * michael@0: * 2. Redistributions in binary form must reproduce the above michael@0: * copyright notice, this list of conditions and the following michael@0: * disclaimer in the documentation and/or other materials michael@0: * provided with the distribution. michael@0: * michael@0: * 3. Neither the name of the Linux Foundation nor the names of its michael@0: * contributors may be used to endorse or promote products michael@0: * derived from this software without specific prior written michael@0: * permission. michael@0: * michael@0: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND michael@0: * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, michael@0: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@0: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE michael@0: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR michael@0: * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@0: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT michael@0: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; michael@0: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) michael@0: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN michael@0: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR michael@0: * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, michael@0: * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. michael@0: * michael@0: * This BSD License conforms to the Open Source Initiative "Simplified michael@0: * BSD License" as published at: michael@0: * http://www.opensource.org/licenses/bsd-license.php michael@0: * michael@0: * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 michael@0: * mark may be used in accordance with the Linux Foundation Trademark michael@0: * Policy to indicate compliance with the IAccessible2 specification. michael@0: * michael@0: ************************************************************************/ michael@0: michael@0: import "objidl.idl"; michael@0: import "oaidl.idl"; michael@0: import "oleacc.idl"; michael@0: import "AccessibleText.idl"; michael@0: import "AccessibleHyperlink.idl"; michael@0: michael@0: /** @brief This interface exposes information about hypertext in a document. michael@0: michael@0: The %IAccessibleHypertext interface is the main interface to expose michael@0: hyperlinks in a document, typically a text document, that are used michael@0: to reference other documents. A typical implementation is to implement michael@0: this interface on the smallest text object such as a paragraph of text. michael@0: */ michael@0: [object, uuid(6B4F8BBF-F1F2-418a-B35E-A195BC4103B9)] michael@0: interface IAccessibleHypertext : IAccessibleText michael@0: { michael@0: michael@0: /** @brief Returns the number of links and link groups contained within this hypertext michael@0: paragraph. michael@0: @param [out] hyperlinkCount michael@0: The number of links and link groups within this hypertext paragraph. michael@0: Returns 0 if there is no link. michael@0: @retval S_OK michael@0: */ michael@0: [propget] HRESULT nHyperlinks michael@0: ( michael@0: [out, retval] long *hyperlinkCount michael@0: ); michael@0: michael@0: /** @brief Returns the specified link. michael@0: michael@0: The returned IAccessibleHyperlink object encapsulates the hyperlink and michael@0: provides several kinds of information describing it. michael@0: @param [in] index michael@0: This 0 based index specifies the hyperlink to return. michael@0: @param [out] hyperlink michael@0: If the given index is valid, i.e. lies in the interval from 0 to the number michael@0: of links minus one, a reference to the specified hyperlink object is returned. michael@0: If the index is invalid then a NULL pointer is returned. michael@0: @retval S_OK michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: */ michael@0: [propget] HRESULT hyperlink michael@0: ( michael@0: [in] long index, michael@0: [out, retval] IAccessibleHyperlink **hyperlink michael@0: ); michael@0: michael@0: /** @brief Returns the index of the hyperlink that is associated with this character index. michael@0: michael@0: This is the case when a link spans the given character index. michael@0: @param [in] charIndex michael@0: A 0 based index of the character for which to return the link index. If michael@0: IAccessibleText is used to represent the text containing the link, then the michael@0: character index is only valid if it is greater than or equal to zero and michael@0: lower than the number of characters in the text. michael@0: @param [out] hyperlinkIndex michael@0: Returns the 0 based index of the hyperlink that is associated with this michael@0: character index, or -1 if charIndex is not on a link. michael@0: @retval S_OK michael@0: @retval S_FALSE if there is nothing to return, [out] value is -1 michael@0: @retval E_INVALIDARG if bad [in] passed michael@0: */ michael@0: [propget] HRESULT hyperlinkIndex michael@0: ( michael@0: [in] long charIndex, michael@0: [out, retval] long *hyperlinkIndex michael@0: ); michael@0: michael@0: }