1/*************************************************************************
2 *
3 *  File Name (AccessibleText2.idl)
4 *
5 *  IAccessible2 IDL Specification
6 *
7 *  Copyright (c) 2007, 2013 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 ************************************************************************/
53
54import "objidl.idl";
55import "oaidl.idl";
56import "oleacc.idl";
57import "IA2CommonTypes.idl";
58import "AccessibleText.idl";
59
60/** @brief This interface gives read-only access to text.
61
62 The %IAccessibleText2 interface extends the functionality of the
63 %IAccessibleText interface.
64*/
65[object, uuid(9690A9CC-5C80-4DF5-852E-2D5AE4189A54)]
66interface IAccessibleText2 : IAccessibleText
67{
68
69  /** @brief Returns the range and of the specified set of attributes.
70
71   Return the range (start and end offsets) and text attributes that correspond
72    to the given attributes filter at the given offset.
73
74   @param [in] offset
75    The offset at which to search for the attributes specified in the filter.
76   @param [in] filter
77    The requested attribute names.  The filter format is "attribute1, attribute2".
78   @param [out] startOffset
79    The starting (0-based) offset of the text containing the specified attributes.
80   @param [out] endOffset
81    The (0-based) offset one past the last character of the text containing the
82    specified attributes.
83   @param [out] attributeValues
84    The values of the requested attributes.
85   @retval S_OK
86   @retval S_FALSE if nothing to return, [out] values are -1, -1, NULL respectively.
87   @retval E_INVALIDARG if bad [in] passed.
88   */
89  [propget] HRESULT attributeRange
90    (
91     [in] long offset,
92     [in] BSTR filter,
93     [out] long *startOffset,
94     [out] long *endOffset,
95     [out, retval] BSTR *attributeValues
96    );
97
98}
99