1 /*************************************************************************
3 * File Name (AccessibleRelation.idl)
5 * IAccessible2 IDL Specification
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.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
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.
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
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.
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
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.
52 ************************************************************************/
58 /** @defgroup grpRelations Relations
59 Use the following constants to compare against the BSTRs returned by
60 IAccessibleRelation::relationType.
64 /** The target object is the containing application object. */
65 const WCHAR
*const IA2_RELATION_CONTAINING_APPLICATION
= L
"containingApplication";
67 /** The target object is the containing document object. The target object implements
68 the IAccessibleDocument interface.
70 const WCHAR
*const IA2_RELATION_CONTAINING_DOCUMENT
= L
"containingDocument";
72 /** The target object is the containing tab pane object. */
73 const WCHAR
*const IA2_RELATION_CONTAINING_TAB_PANE
= L
"containingTabPane";
75 /** The target object is the containing window object. */
76 const WCHAR
*const IA2_RELATION_CONTAINING_WINDOW
= L
"containingWindow";
78 /** Some attribute of this object is affected by a target object. */
79 const WCHAR
*const IA2_RELATION_CONTROLLED_BY
= L
"controlledBy";
81 /** This object is interactive and controls some attribute of a target object. */
82 const WCHAR
*const IA2_RELATION_CONTROLLER_FOR
= L
"controllerFor";
84 /** This object is described by the target object. */
85 const WCHAR
*const IA2_RELATION_DESCRIBED_BY
= L
"describedBy";
87 /** This object is describes the target object. */
88 const WCHAR
*const IA2_RELATION_DESCRIPTION_FOR
= L
"descriptionFor";
90 /** This object is embedded by a target object. */
91 const WCHAR
*const IA2_RELATION_EMBEDDED_BY
= L
"embeddedBy";
93 /** This object embeds a target object. This relation can be used on the
94 OBJID_CLIENT accessible for a top level window to show where the content
97 const WCHAR
*const IA2_RELATION_EMBEDS
= L
"embeds";
99 /** Content flows to this object from a target object.
100 This relation and IA2_RELATION_FLOWS_TO are useful to tie text and non-text
101 objects together in order to allow assistive technology to follow the
102 intended reading order.
104 const WCHAR
*const IA2_RELATION_FLOWS_FROM
= L
"flowsFrom";
106 /** Content flows from this object to a target object. */
107 const WCHAR
*const IA2_RELATION_FLOWS_TO
= L
"flowsTo";
109 /** This object is label for a target object. */
110 const WCHAR
*const IA2_RELATION_LABEL_FOR
= L
"labelFor";
112 /** This object is labelled by a target object. Note that the double L spelling
113 which follows is preferred. Please use it instead. This single L version may
114 be removed in a later version.
116 const WCHAR
*const IA2_RELATION_LABELED_BY
= L
"labelledBy";
118 /** This object is labelled by a target object. */
119 const WCHAR
*const IA2_RELATION_LABELLED_BY
= L
"labelledBy";
121 /** This object is a member of a group of one or more objects. When
122 there is more than one object in the group each member may have one and the
123 same target, e.g. a grouping object. It is also possible that each member has
124 multiple additional targets, e.g. one for every other member in the group.
126 const WCHAR
*const IA2_RELATION_MEMBER_OF
= L
"memberOf";
128 /** The target object is the next object in the tab order. */
129 const WCHAR
*const IA2_RELATION_NEXT_TABBABLE
= L
"nextTabbable";
131 /** This object is a logical child of a target object. This relation is the reciprocal
132 of the IA2_RELATION_NODE_PARENT_OF relation. In some cases an application's accessible
133 tree is such that objects can be in a logical parent-child relationship which is
134 different from the hierarchy of the accessible tree. */
135 const WCHAR
*const IA2_RELATION_NODE_CHILD_OF
= L
"nodeChildOf";
137 /** This object is a logical parent of a target object. This relation is the reciprocal
138 of the IA2_RELATION_NODE_CHILD_OF relation. In some cases an application's accessible
139 tree is such that objects can be in a logical parent-child relationship which is
140 different from the hierarchy of the accessible tree. */
141 const WCHAR
*const IA2_RELATION_NODE_PARENT_OF
= L
"nodeParentOf";
143 /** This object is a parent window of the target object. */
144 const WCHAR
*const IA2_RELATION_PARENT_WINDOW_OF
= L
"parentWindowOf";
146 /** This object is a transient component related to the target object.
147 When this object is activated the target object doesn't lose focus.
149 const WCHAR
*const IA2_RELATION_POPUP_FOR
= L
"popupFor";
151 /** The target object is the previous object in the tab order. */
152 const WCHAR
*const IA2_RELATION_PREVIOUS_TABBABLE
= L
"previousTabbable";
154 /** This object is a sub window of a target object. */
155 const WCHAR
*const IA2_RELATION_SUBWINDOW_OF
= L
"subwindowOf";
157 /** The target object provides the detailed, extended description for this
158 object. It provides more detailed information than would normally be provided
159 using the IA2_RELATION_DESCRIBED_BY relation. A common use for this relation is
160 in digital publishing where an extended description needs to be conveyed in
161 a book that requires structural markup or the embedding of other technology to
162 provide illustrative content. */
163 const WCHAR
*const IA2_RELATION_DETAILS
= L
"details";
165 /** This object provides the detailed, extended description for the target
166 object. See IA2_RELATION_DETAILS. */
167 const WCHAR
*const IA2_RELATION_DETAILS_FOR
= L
"detailsFor";
169 /** The target object is the error message for this object. */
170 const WCHAR
*const IA2_RELATION_ERROR
= L
"error";
172 /** This object is the error message for the target object. */
173 const WCHAR
*const IA2_RELATION_ERROR_FOR
= L
"errorFor";
175 /** The target object is the anchor referenced by this link. */
176 const WCHAR
*const IA2_RELATION_LINKS_TO
= L
"linksTo";
180 /** This interface gives access to an object's set of relations.
182 [object, uuid(7CDF86EE
-C3DA
-496a
-BDA4
-281B336E1FDC
)]
183 interface IAccessibleRelation
: IUnknown
185 /** @brief Returns the type of the relation.
186 @param [out] relationType
187 The strings returned are defined @ref grpRelations "in this section of the documentation".
190 [propget] HRESULT relationType
192 [out, retval] BSTR *relationType
195 /** @brief Returns a localized version of the relation type.
196 @param [out] localizedRelationType
199 [propget] HRESULT localizedRelationType
201 [out, retval] BSTR *localizedRelationType
204 /** @brief Returns the number of targets for this relation.
205 @param [out] nTargets
208 [propget] HRESULT nTargets
210 [out, retval] long *nTargets
213 /** @brief Returns one accessible relation target.
214 @param [in] targetIndex
218 @retval E_INVALIDARG if bad [in] passed
219 @note Use QueryInterface to get IAccessible2.
221 [propget] HRESULT target
223 [in] long targetIndex
,
224 [out, retval] IUnknown
**target
227 /** @brief Returns multiple accessible relation targets
228 @param [in] maxTargets
229 maximum size of the array allocated by the client
231 The array of target objects. Note that this array is to be allocated by the
232 client and freed when no longer needed. Refer to @ref _arrayConsideration
233 "Special Consideration when using Arrays" for more details. You will need to use
234 QueryInterface on the IUnknown to get the IAccessible2.
235 @param [out] nTargets
236 actual number of targets in the returned array (not more than maxTargets)
238 @retval E_INVALIDARG if bad [in] passed, e.g. a negative value
240 [propget] HRESULT targets
242 [in] long maxTargets
,
243 [out, size_is(maxTargets
), length_is(*nTargets
)]
245 [out, retval] long *nTargets