backout 29799f914cab, Bug 917642 - [Helix] Please update the helix blobs
[gecko.git] / other-licenses / ia2 / AccessibleRelation.idl
blob0869166bd56217544eeb7f97d13201655348220b
1 /*************************************************************************
3 * File Name (AccessibleRelation.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.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
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
28 * permission.
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 ************************************************************************/
54 import "objidl.idl";
55 import "oaidl.idl";
56 import "oleacc.idl";
58 /** @defgroup grpRelations Relations
59 Use the following constants to compare against the BSTRs returned by
60 IAccessibleRelation::relationType.
61 */
62 ///@{
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
95 areas are.
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 ///@}
159 /** This interface gives access to an object's set of relations.
161 [object, uuid(7CDF86EE-C3DA-496a-BDA4-281B336E1FDC)]
162 interface IAccessibleRelation : IUnknown
164 /** @brief Returns the type of the relation.
165 @param [out] relationType
166 The strings returned are defined @ref grpRelations "in this section of the documentation".
167 @retval S_OK
169 [propget] HRESULT relationType
171 [out, retval] BSTR *relationType
174 /** @brief Returns a localized version of the relation type.
175 @param [out] localizedRelationType
176 @retval S_OK
178 [propget] HRESULT localizedRelationType
180 [out, retval] BSTR *localizedRelationType
183 /** @brief Returns the number of targets for this relation.
184 @param [out] nTargets
185 @retval S_OK
187 [propget] HRESULT nTargets
189 [out, retval] long *nTargets
192 /** @brief Returns one accessible relation target.
193 @param [in] targetIndex
194 0 based index
195 @param [out] target
196 @retval S_OK
197 @retval E_INVALIDARG if bad [in] passed
198 @note Use QueryInterface to get IAccessible2.
200 [propget] HRESULT target
202 [in] long targetIndex,
203 [out, retval] IUnknown **target
206 /** @brief Returns multiple accessible relation targets
207 @param [in] maxTargets
208 maximum size of the array allocated by the client
209 @param [out] targets
210 The array of target objects. Note that this array is to be allocated by the
211 client and freed when no longer needed. Refer to @ref _arrayConsideration
212 "Special Consideration when using Arrays" for more details. You will need to use
213 QueryInterface on the IUnknown to get the IAccessible2.
214 @param [out] nTargets
215 actual number of targets in the returned array (not more than maxTargets)
216 @retval S_OK
217 @retval E_INVALIDARG if bad [in] passed, e.g. a negative value
219 [propget] HRESULT targets
221 [in] long maxTargets,
222 [out, size_is(maxTargets), length_is(*nTargets)]
223 IUnknown **targets,
224 [out, retval] long *nTargets