other-licenses/ia2/AccessibleHypertext.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /*************************************************************************
     2  *
     3  *  File Name (AccessibleHypertext.idl)
     4  * 
     5  *  IAccessible2 IDL Specification 
     6  * 
     7  *  Copyright (c) 2007, 2010 Linux Foundation 
     8  *  Copyright (c) 2006 IBM Corporation 
     9  *  Copyright (c) 2000, 2006 Sun Microsystems, Inc. 
    10  *  All rights reserved. 
    11  *   
    12  *   
    13  *  Redistribution and use in source and binary forms, with or without 
    14  *  modification, are permitted provided that the following conditions 
    15  *  are met: 
    16  *   
    17  *   1. Redistributions of source code must retain the above copyright 
    18  *      notice, this list of conditions and the following disclaimer. 
    19  *   
    20  *   2. Redistributions in binary form must reproduce the above 
    21  *      copyright notice, this list of conditions and the following 
    22  *      disclaimer in the documentation and/or other materials 
    23  *      provided with the distribution. 
    24  *
    25  *   3. Neither the name of the Linux Foundation nor the names of its 
    26  *      contributors may be used to endorse or promote products 
    27  *      derived from this software without specific prior written 
    28  *      permission. 
    29  *   
    30  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
    31  *  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
    32  *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
    33  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
    34  *  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
    35  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    36  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    37  *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    38  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    39  *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    40  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
    41  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
    42  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    43  *   
    44  *  This BSD License conforms to the Open Source Initiative "Simplified 
    45  *  BSD License" as published at: 
    46  *  http://www.opensource.org/licenses/bsd-license.php 
    47  *   
    48  *  IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 
    49  *  mark may be used in accordance with the Linux Foundation Trademark 
    50  *  Policy to indicate compliance with the IAccessible2 specification. 
    51  * 
    52  ************************************************************************/ 
    54 import "objidl.idl";
    55 import "oaidl.idl";
    56 import "oleacc.idl";
    57 import "AccessibleText.idl";
    58 import "AccessibleHyperlink.idl";
    60 /** @brief This interface exposes information about hypertext in a document.
    62  The %IAccessibleHypertext interface is the main interface to expose
    63   hyperlinks in a document, typically a text document, that are used 
    64   to reference other documents.  A typical implementation is to implement 
    65   this interface on the smallest text object such as a paragraph of text.
    66 */
    67 [object, uuid(6B4F8BBF-F1F2-418a-B35E-A195BC4103B9)]
    68 interface IAccessibleHypertext : IAccessibleText
    69 {
    71   /** @brief Returns the number of links and link groups contained within this hypertext 
    72     paragraph.
    73    @param [out] hyperlinkCount
    74     The number of links and link groups within this hypertext paragraph.  
    75     Returns 0 if there is no link.
    76    @retval S_OK
    77   */
    78   [propget] HRESULT nHyperlinks
    79     (
    80      [out, retval] long *hyperlinkCount
    81     );
    83   /** @brief Returns the specified link.
    85    The returned IAccessibleHyperlink object encapsulates the hyperlink and 
    86     provides several kinds of information describing it.
    87    @param [in] index
    88     This 0 based index specifies the hyperlink to return.
    89    @param [out] hyperlink
    90     If the given index is valid, i.e. lies in the interval from 0 to the number 
    91     of links minus one, a reference to the specified hyperlink object is returned.  
    92     If the index is invalid then a NULL pointer is returned.
    93    @retval S_OK
    94    @retval E_INVALIDARG if bad [in] passed
    95   */
    96   [propget] HRESULT hyperlink
    97     (
    98      [in] long index,
    99      [out, retval] IAccessibleHyperlink **hyperlink
   100     );
   102   /** @brief Returns the index of the hyperlink that is associated with this character index.
   104    This is the case when a link spans the given character index.
   105    @param [in] charIndex
   106     A 0 based index of the character for which to return the link index.  If 
   107 	IAccessibleText is used to represent the text containing the link, then the 
   108 	character index is only  valid if it is greater than or equal to zero and 
   109 	lower than the number of characters in the text.
   110    @param [out] hyperlinkIndex
   111     Returns the 0 based index of the hyperlink that is associated with this 
   112 	character index, or -1 if charIndex is not on a link.
   113    @retval S_OK
   114    @retval S_FALSE if there is nothing to return, [out] value is -1
   115    @retval E_INVALIDARG if bad [in] passed
   116   */
   117   [propget] HRESULT hyperlinkIndex
   118     (
   119      [in] long charIndex,
   120      [out, retval] long *hyperlinkIndex
   121     );
   123 }

mercurial