Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f
[chromium-blink-merge.git] / third_party / iaccessible2 / ia2_api_all.idl
blob729ed2627ddf83a151e6a27027feb742a99dd368
1 /*************************************************************************
3 * File Name (api_all_headers.idl)
4 *
5 * IAccessible2 IDL Specification
6 *
7 * Copyright (c) 2013 Linux Foundation
8 * All rights reserved.
9 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
23 * 3. Neither the name of the Linux Foundation nor the names of its
24 * contributors may be used to endorse or promote products
25 * derived from this software without specific prior written
26 * permission.
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
29 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
30 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
31 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
33 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
39 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
40 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 * This BSD License conforms to the Open Source Initiative "Simplified
43 * BSD License" as published at:
44 * http://www.opensource.org/licenses/bsd-license.php
46 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
47 * mark may be used in accordance with the Linux Foundation Trademark
48 * Policy to indicate compliance with the IAccessible2 specification.
50 ************************************************************************/
52 import "objidl.idl";
53 import "oaidl.idl";
54 import "oleacc.idl";
56 /*************************************************************************
58 * File Name (IA2CommonTypes.idl)
60 * IAccessible2 IDL Specification
62 * Copyright (c) 2007, 2013 Linux Foundation
63 * Copyright (c) 2006 IBM Corporation
64 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
65 * All rights reserved.
68 * Redistribution and use in source and binary forms, with or without
69 * modification, are permitted provided that the following conditions
70 * are met:
72 * 1. Redistributions of source code must retain the above copyright
73 * notice, this list of conditions and the following disclaimer.
75 * 2. Redistributions in binary form must reproduce the above
76 * copyright notice, this list of conditions and the following
77 * disclaimer in the documentation and/or other materials
78 * provided with the distribution.
80 * 3. Neither the name of the Linux Foundation nor the names of its
81 * contributors may be used to endorse or promote products
82 * derived from this software without specific prior written
83 * permission.
85 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
86 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
87 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
88 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
89 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
90 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
91 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
92 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
93 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
94 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
95 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
96 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
97 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
99 * This BSD License conforms to the Open Source Initiative "Simplified
100 * BSD License" as published at:
101 * http://www.opensource.org/licenses/bsd-license.php
103 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
104 * mark may be used in accordance with the Linux Foundation Trademark
105 * Policy to indicate compliance with the IAccessible2 specification.
107 ************************************************************************/
109 /** These constants control the scrolling of an object or substring into a window.
111 This enum is used in IAccessible2::scrollTo and IAccessibleText::scrollSubstringTo.
113 enum IA2ScrollType {
115 /** Scroll the top left corner of the object or substring such that the top left
116 corner (and as much as possible of the rest of the object or substring) is within
117 the top level window. In cases where the entire object or substring fits within
118 the top level window, the placement of the object or substring is dependent on
119 the application. For example, the object or substring may be scrolled to the
120 closest edge, the furthest edge, or midway between those two edges. In cases
121 where there is a hierarchy of nested scrollable controls, more than one control
122 may have to be scrolled.
124 IA2_SCROLL_TYPE_TOP_LEFT,
126 /** Scroll the bottom right corner of the object or substring such that the bottom right
127 corner (and as much as possible of the rest of the object or substring) is within
128 the top level window. In cases where the entire object or substring fits within
129 the top level window, the placement of the object or substring is dependent on
130 the application. For example, the object or substring may be scrolled to the
131 closest edge, the furthest edge, or midway between those two edges. In cases
132 where there is a hierarchy of nested scrollable controls, more than one control
133 may have to be scrolled.
135 IA2_SCROLL_TYPE_BOTTOM_RIGHT,
137 /** Scroll the top edge of the object or substring such that the top edge
138 (and as much as possible of the rest of the object or substring) is within the
139 top level window. In cases where the entire object or substring fits within
140 the top level window, the placement of the object or substring is dependent on
141 the application. For example, the object or substring may be scrolled to the
142 closest edge, the furthest edge, or midway between those two edges. In cases
143 where there is a hierarchy of nested scrollable controls, more than one control
144 may have to be scrolled.
146 IA2_SCROLL_TYPE_TOP_EDGE,
148 /** Scroll the bottom edge of the object or substring such that the bottom edge
149 (and as much as possible of the rest of the object or substring) is within the
150 top level window. In cases where the entire object or substring fits within
151 the top level window, the placement of the object or substring is dependent on
152 the application. For example, the object or substring may be scrolled to the
153 closest edge, the furthest edge, or midway between those two edges. In cases
154 where there is a hierarchy of nested scrollable controls, more than one control
155 may have to be scrolled.
157 IA2_SCROLL_TYPE_BOTTOM_EDGE,
159 /** Scroll the left edge of the object or substring such that the left edge
160 (and as much as possible of the rest of the object or substring) is within the
161 top level window. In cases where the entire object or substring fits within
162 the top level window, the placement of the object or substring is dependent on
163 the application. For example, the object or substring may be scrolled to the
164 closest edge, the furthest edge, or midway between those two edges. In cases
165 where there is a hierarchy of nested scrollable controls, more than one control
166 may have to be scrolled.
168 IA2_SCROLL_TYPE_LEFT_EDGE,
170 /** Scroll the right edge of the object or substring such that the right edge
171 (and as much as possible of the rest of the object or substring) is within the
172 top level window. In cases where the entire object or substring fits within
173 the top level window, the placement of the object or substring is dependent on
174 the application. For example, the object or substring may be scrolled to the
175 closest edge, the furthest edge, or midway between those two edges. In cases
176 where there is a hierarchy of nested scrollable controls, more than one control
177 may have to be scrolled.
179 IA2_SCROLL_TYPE_RIGHT_EDGE,
181 /** Scroll the object or substring such that as much as possible of the
182 object or substring is within the top level window. The placement of
183 the object is dependent on the application. For example, the object or
184 substring may be scrolled to to closest edge, the furthest edge, or midway
185 between those two edges.
187 IA2_SCROLL_TYPE_ANYWHERE
190 /** These constants define which coordinate system a point is located in.
192 This enum is used in IAccessible2::scrollToPoint, IAccessibleImage::imagePosition,
193 IAccessibleText::characterExtents, and IAccessibleText::offsetAtPoint, and
194 IAccessibleText::scrollSubstringToPoint.
196 enum IA2CoordinateType {
198 /// The coordinates are relative to the screen.
199 IA2_COORDTYPE_SCREEN_RELATIVE,
201 /** The coordinates are relative to the upper left corner of the bounding box
202 of the immediate parent.
204 IA2_COORDTYPE_PARENT_RELATIVE
208 /** Special offsets for use in IAccessibleText and IAccessibleEditableText methods
210 Refer to @ref _specialOffsets
211 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
212 for more information.
214 enum IA2TextSpecialOffsets {
215 IA2_TEXT_OFFSET_LENGTH = -1, /**< This offset is equivalent to the length of the string. It eliminates
216 the need to call IAccessibleText::nCharacters. */
217 IA2_TEXT_OFFSET_CARET = -2 /**< This offset signifies that the text related to the physical location
218 of the caret should be used. */
221 /** These constants specify the kind of change made to a table.
223 This enum is used in the IA2TableModelChange struct which in turn is used by
224 IAccessibleTable::modelChange and IAccessibleTable2::modelChange.
226 enum IA2TableModelChangeType {
227 IA2_TABLE_MODEL_CHANGE_INSERT, // = 0;
228 IA2_TABLE_MODEL_CHANGE_DELETE,
229 IA2_TABLE_MODEL_CHANGE_UPDATE
232 /** A structure defining the type of and extents of changes made to a table
234 IAccessibleTable::modelChange and IAccessibleTable2::modelChange return this struct.
235 In the case of an insertion or change the row and column offsets define the boundaries
236 of the inserted or changed subtable after the operation. In the case of a deletion
237 the row and column offsets define the boundaries of the subtable being removed before
238 the removal.
240 typedef struct IA2TableModelChange {
241 enum IA2TableModelChangeType type; // insert, delete, update
242 long firstRow; ///< 0 based, inclusive
243 long lastRow; ///< 0 based, inclusive
244 long firstColumn; ///< 0 based, inclusive
245 long lastColumn; ///< 0 based, inclusive
246 } IA2TableModelChange;
247 /*************************************************************************
249 * File Name (AccessibleRelation.idl)
251 * IAccessible2 IDL Specification
253 * Copyright (c) 2007, 2013 Linux Foundation
254 * Copyright (c) 2006 IBM Corporation
255 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
256 * All rights reserved.
259 * Redistribution and use in source and binary forms, with or without
260 * modification, are permitted provided that the following conditions
261 * are met:
263 * 1. Redistributions of source code must retain the above copyright
264 * notice, this list of conditions and the following disclaimer.
266 * 2. Redistributions in binary form must reproduce the above
267 * copyright notice, this list of conditions and the following
268 * disclaimer in the documentation and/or other materials
269 * provided with the distribution.
271 * 3. Neither the name of the Linux Foundation nor the names of its
272 * contributors may be used to endorse or promote products
273 * derived from this software without specific prior written
274 * permission.
276 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
277 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
278 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
279 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
280 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
281 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
282 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
283 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
284 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
285 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
286 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
287 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
288 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
290 * This BSD License conforms to the Open Source Initiative "Simplified
291 * BSD License" as published at:
292 * http://www.opensource.org/licenses/bsd-license.php
294 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
295 * mark may be used in accordance with the Linux Foundation Trademark
296 * Policy to indicate compliance with the IAccessible2 specification.
298 ************************************************************************/
304 /** @defgroup grpRelations Relations
305 Use the following constants to compare against the BSTRs returned by
306 IAccessibleRelation::relationType.
308 ///@{
310 /** The target object is the containing application object. */
311 const WCHAR *const IA2_RELATION_CONTAINING_APPLICATION = L"containingApplication";
313 /** The target object is the containing document object. The target object implements
314 the IAccessibleDocument interface.
316 const WCHAR *const IA2_RELATION_CONTAINING_DOCUMENT = L"containingDocument";
318 /** The target object is the containing tab pane object. */
319 const WCHAR *const IA2_RELATION_CONTAINING_TAB_PANE = L"containingTabPane";
321 /** The target object is the containing window object. */
322 const WCHAR *const IA2_RELATION_CONTAINING_WINDOW = L"containingWindow";
324 /** Some attribute of this object is affected by a target object. */
325 const WCHAR *const IA2_RELATION_CONTROLLED_BY = L"controlledBy";
327 /** This object is interactive and controls some attribute of a target object. */
328 const WCHAR *const IA2_RELATION_CONTROLLER_FOR = L"controllerFor";
330 /** This object is described by the target object. */
331 const WCHAR *const IA2_RELATION_DESCRIBED_BY = L"describedBy";
333 /** This object is describes the target object. */
334 const WCHAR *const IA2_RELATION_DESCRIPTION_FOR = L"descriptionFor";
336 /** This object is embedded by a target object. */
337 const WCHAR *const IA2_RELATION_EMBEDDED_BY = L"embeddedBy";
339 /** This object embeds a target object. This relation can be used on the
340 OBJID_CLIENT accessible for a top level window to show where the content
341 areas are.
343 const WCHAR *const IA2_RELATION_EMBEDS = L"embeds";
345 /** Content flows to this object from a target object.
346 This relation and IA2_RELATION_FLOWS_TO are useful to tie text and non-text
347 objects together in order to allow assistive technology to follow the
348 intended reading order.
350 const WCHAR *const IA2_RELATION_FLOWS_FROM = L"flowsFrom";
352 /** Content flows from this object to a target object. */
353 const WCHAR *const IA2_RELATION_FLOWS_TO = L"flowsTo";
355 /** This object is label for a target object. */
356 const WCHAR *const IA2_RELATION_LABEL_FOR = L"labelFor";
358 /** This object is labelled by a target object. Note that the double L spelling
359 which follows is preferred. Please use it instead. This single L version may
360 be removed in a later version.
362 const WCHAR *const IA2_RELATION_LABELED_BY = L"labelledBy";
364 /** This object is labelled by a target object. */
365 const WCHAR *const IA2_RELATION_LABELLED_BY = L"labelledBy";
367 /** This object is a member of a group of one or more objects. When
368 there is more than one object in the group each member may have one and the
369 same target, e.g. a grouping object. It is also possible that each member has
370 multiple additional targets, e.g. one for every other member in the group.
372 const WCHAR *const IA2_RELATION_MEMBER_OF = L"memberOf";
374 /** The target object is the next object in the tab order. */
375 const WCHAR *const IA2_RELATION_NEXT_TABBABLE = L"nextTabbable";
377 /** This object is a logical child of a target object. This relation is the reciprocal
378 of the IA2_RELATION_NODE_PARENT_OF relation. In some cases an application's accessible
379 tree is such that objects can be in a logical parent-child relationship which is
380 different from the hierarchy of the accessible tree. */
381 const WCHAR *const IA2_RELATION_NODE_CHILD_OF = L"nodeChildOf";
383 /** This object is a logical parent of a target object. This relation is the reciprocal
384 of the IA2_RELATION_NODE_CHILD_OF relation. In some cases an application's accessible
385 tree is such that objects can be in a logical parent-child relationship which is
386 different from the hierarchy of the accessible tree. */
387 const WCHAR *const IA2_RELATION_NODE_PARENT_OF = L"nodeParentOf";
389 /** This object is a parent window of the target object. */
390 const WCHAR *const IA2_RELATION_PARENT_WINDOW_OF = L"parentWindowOf";
392 /** This object is a transient component related to the target object.
393 When this object is activated the target object doesn't lose focus.
395 const WCHAR *const IA2_RELATION_POPUP_FOR = L"popupFor";
397 /** The target object is the previous object in the tab order. */
398 const WCHAR *const IA2_RELATION_PREVIOUS_TABBABLE = L"previousTabbable";
400 /** This object is a sub window of a target object. */
401 const WCHAR *const IA2_RELATION_SUBWINDOW_OF = L"subwindowOf";
403 ///@}
405 /** This interface gives access to an object's set of relations.
407 [object, uuid(7CDF86EE-C3DA-496a-BDA4-281B336E1FDC)]
408 interface IAccessibleRelation : IUnknown
410 /** @brief Returns the type of the relation.
411 @param [out] relationType
412 The strings returned are defined @ref grpRelations "in this section of the documentation".
413 @retval S_OK
415 [propget] HRESULT relationType
417 [out, retval] BSTR *relationType
420 /** @brief Returns a localized version of the relation type.
421 @param [out] localizedRelationType
422 @retval S_OK
424 [propget] HRESULT localizedRelationType
426 [out, retval] BSTR *localizedRelationType
429 /** @brief Returns the number of targets for this relation.
430 @param [out] nTargets
431 @retval S_OK
433 [propget] HRESULT nTargets
435 [out, retval] long *nTargets
438 /** @brief Returns one accessible relation target.
439 @param [in] targetIndex
440 0 based index
441 @param [out] target
442 @retval S_OK
443 @retval E_INVALIDARG if bad [in] passed
444 @note Use QueryInterface to get IAccessible2.
446 [propget] HRESULT target
448 [in] long targetIndex,
449 [out, retval] IUnknown **target
452 /** @brief Returns multiple accessible relation targets
453 @param [in] maxTargets
454 maximum size of the array allocated by the client
455 @param [out] targets
456 The array of target objects. Note that this array is to be allocated by the
457 client and freed when no longer needed. Refer to @ref _arrayConsideration
458 "Special Consideration when using Arrays" for more details. You will need to use
459 QueryInterface on the IUnknown to get the IAccessible2.
460 @param [out] nTargets
461 actual number of targets in the returned array (not more than maxTargets)
462 @retval S_OK
463 @retval E_INVALIDARG if bad [in] passed, e.g. a negative value
465 [propget] HRESULT targets
467 [in] long maxTargets,
468 [out, size_is(maxTargets), length_is(*nTargets)]
469 IUnknown **targets,
470 [out, retval] long *nTargets
474 /*************************************************************************
476 * File Name (AccessibleAction.idl)
478 * IAccessible2 IDL Specification
480 * Copyright (c) 2007, 2013 Linux Foundation
481 * Copyright (c) 2006 IBM Corporation
482 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
483 * All rights reserved.
486 * Redistribution and use in source and binary forms, with or without
487 * modification, are permitted provided that the following conditions
488 * are met:
490 * 1. Redistributions of source code must retain the above copyright
491 * notice, this list of conditions and the following disclaimer.
493 * 2. Redistributions in binary form must reproduce the above
494 * copyright notice, this list of conditions and the following
495 * disclaimer in the documentation and/or other materials
496 * provided with the distribution.
498 * 3. Neither the name of the Linux Foundation nor the names of its
499 * contributors may be used to endorse or promote products
500 * derived from this software without specific prior written
501 * permission.
503 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
504 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
505 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
506 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
507 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
508 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
509 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
510 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
511 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
512 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
513 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
514 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
515 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
517 * This BSD License conforms to the Open Source Initiative "Simplified
518 * BSD License" as published at:
519 * http://www.opensource.org/licenses/bsd-license.php
521 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
522 * mark may be used in accordance with the Linux Foundation Trademark
523 * Policy to indicate compliance with the IAccessible2 specification.
525 ************************************************************************/
531 /** This enum defines values which are predefined actions for use when implementing
532 support for media.
534 This enum is used when specifying an action for IAccessibleAction::doAction.
537 enum IA2Actions {
538 IA2_ACTION_OPEN = -1, /**< Used to inform the server that the client will
539 signal via IA2_ACTION_COMPLETE when it has consumed
540 the content provided by the object. This action
541 allows the object's server to wait for all clients
542 to signal their readiness for additional content.
543 Any form of content generation that requires
544 synchronization with an AT would require use of this
545 action. One example is the generation of text describing
546 visual content not obvious from a video's sound track.
547 In this scenario the Text to Speech or Braille output
548 may take more time than the related length of silence
549 in the video's sound track. */
550 IA2_ACTION_COMPLETE = -2, /**< Used by the client to inform the server that it has
551 consumed the most recent content provided by this object. */
552 IA2_ACTION_CLOSE = -3 /**< Used to inform the server that the client no longer
553 requires synchronization. */
556 /** @brief This interface gives access to actions that can be executed
557 for accessible objects.
559 Every accessible object that can be manipulated via the native GUI beyond the
560 methods available either in the MSAA IAccessible interface or in the set of
561 IAccessible2 interfaces (other than this IAccessibleAction interface) should
562 support the IAccessibleAction interface in order to provide Assistive Technology
563 access to all the actions that can be performed by the object. Each action can
564 be performed or queried for a name, description or associated key bindings.
565 Actions are needed more for ATs that assist the mobility impaired, such as
566 on-screen keyboards and voice command software. By providing actions directly,
567 the AT can present them to the user without the user having to perform the extra
568 steps to navigate a context menu.
570 The first action should be equivalent to the MSAA default action. If there is
571 only one action, %IAccessibleAction should also be implemented.
573 [object, uuid(B70D9F59-3B5A-4dba-AB9E-22012F607DF5)]
574 interface IAccessibleAction : IUnknown
577 /** @brief Returns the number of accessible actions available in this object.
579 If there are more than one, the first one is considered the
580 "default" action of the object.
581 @param [out] nActions
582 The returned value of the number of actions is zero if there are
583 no actions.
584 @retval S_OK
585 @note This method is missing a [propget] prefix in the IDL. The result is the
586 method is named nActions in generated C++ code instead of get_nActions.
588 HRESULT nActions
590 [out,retval] long* nActions
593 /** @brief Performs the specified Action on the object.
594 @param [in] actionIndex
595 0 based index specifying the action to perform. If it lies outside
596 the valid range no action is performed.
597 @retval S_OK
598 @retval S_FALSE if action could not be performed
599 @retval E_INVALIDARG if bad [in] passed
600 @note If implementing support for media, refer to the predefined constants in the ::IA2Actions enum.
602 HRESULT doAction
604 [in] long actionIndex
607 /** @brief Returns a description of the specified action of the object.
608 @param [in] actionIndex
609 0 based index specifying which action's description to return.
610 If it lies outside the valid range an empty string is returned.
611 @param [out] description
612 The returned value is a localized string of the specified action.
613 @retval S_OK
614 @retval S_FALSE if there is nothing to return, [out] value is NULL
615 @retval E_INVALIDARG if bad [in] passed
617 [propget] HRESULT description
619 [in] long actionIndex,
620 [out, retval] BSTR *description
623 /** @brief Returns an array of BSTRs describing one or more key bindings, if
624 there are any, associated with the specified action.
626 The returned strings are the localized human readable key sequences to be
627 used to activate each action, e.g. "Ctrl+Shift+D". Since these key
628 sequences are to be used when the object has focus, they are like
629 mnemonics (access keys), and not like shortcut (accelerator) keys.
631 There is no need to implement this method for single action controls since
632 that would be redundant with the standard MSAA programming practice of
633 getting the mnemonic from get_accKeyboardShortcut.
635 An AT such as an On Screen Keyboard might not expose these bindings but
636 provide alternative means of activation.
638 Note: the client allocates and passes in an array of pointers. The server
639 allocates the BSTRs and passes back one or more pointers to these BSTRs into
640 the array of pointers allocated by the client. The client is responsible
641 for deallocating the BSTRs.
643 @param [in] actionIndex
644 0 based index specifying which action's key bindings should be returned.
645 @param [in] nMaxBindings
646 This parameter is ignored. Refer to @ref _arrayConsideration
647 "Special Consideration when using Arrays" for more details.
648 @param [out] keyBindings
649 An array of BSTRs, allocated by the server, one for each key binding.
650 The client must free it with CoTaskMemFree.
651 @param [out] nBindings
652 The number of key bindings returned; the size of the returned array.
653 @retval S_OK
654 @retval S_FALSE if there are no key bindings, [out] values are NULL and 0 respectively
655 @retval E_INVALIDARG if bad [in] passed
657 [propget] HRESULT keyBinding
659 [in] long actionIndex,
660 [in] long nMaxBindings,
661 [out, size_is(,nMaxBindings), length_is(,*nBindings)] BSTR **keyBindings,
662 [out, retval] long *nBindings
665 /** @brief Returns the non-localized name of specified action.
666 @param [in] actionIndex
667 0 based index specifying which action's non-localized name should be returned.
668 @param [out] name
669 @retval S_OK
670 @retval S_FALSE if there is nothing to return, [out] value is NULL
671 @retval E_INVALIDARG if bad [in] passed
673 [propget] HRESULT name
675 [in] long actionIndex,
676 [out, retval] BSTR *name
679 /** @brief Returns the localized name of specified action.
680 @param [in] actionIndex
681 0 based index specifying which action's localized name should be returned.
682 @param [out] localizedName
683 @retval S_OK
684 @retval S_FALSE if there is nothing to return, [out] value is NULL
685 @retval E_INVALIDARG if bad [in] passed
687 [propget] HRESULT localizedName
689 [in] long actionIndex,
690 [out, retval] BSTR *localizedName
694 /*************************************************************************
696 * File Name (AccessibleRole.idl)
698 * IAccessible2 IDL Specification
700 * Copyright (c) 2007, 2013 Linux Foundation
701 * Copyright (c) 2006 IBM Corporation
702 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
703 * All rights reserved.
706 * Redistribution and use in source and binary forms, with or without
707 * modification, are permitted provided that the following conditions
708 * are met:
710 * 1. Redistributions of source code must retain the above copyright
711 * notice, this list of conditions and the following disclaimer.
713 * 2. Redistributions in binary form must reproduce the above
714 * copyright notice, this list of conditions and the following
715 * disclaimer in the documentation and/or other materials
716 * provided with the distribution.
718 * 3. Neither the name of the Linux Foundation nor the names of its
719 * contributors may be used to endorse or promote products
720 * derived from this software without specific prior written
721 * permission.
723 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
724 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
725 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
726 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
727 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
728 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
729 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
730 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
731 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
732 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
733 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
734 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
735 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
737 * This BSD License conforms to the Open Source Initiative "Simplified
738 * BSD License" as published at:
739 * http://www.opensource.org/licenses/bsd-license.php
741 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
742 * mark may be used in accordance with the Linux Foundation Trademark
743 * Policy to indicate compliance with the IAccessible2 specification.
745 ************************************************************************/
749 /** Collection of roles
751 This enumerator defines an extended set of accessible roles of objects implementing
752 the %IAccessible2 interface. These roles are in addition to the MSAA roles obtained
753 through the MSAA get_accRole method. Examples are 'footnote', 'heading', and
754 'label'. You obtain an object's %IAccessible2 roles by calling IAccessible2::role.
756 enum IA2Role {
758 /** Unknown role. The object contains some Accessible information, but its
759 role is not known.
761 IA2_ROLE_UNKNOWN = 0,
763 /** An object that can be drawn into and to manage events from the objects
764 drawn into it. Also refer to ::IA2_ROLE_FRAME,
765 ::IA2_ROLE_GLASS_PANE, and ::IA2_ROLE_LAYERED_PANE.
767 IA2_ROLE_CANVAS = 0x401,
769 /// A caption describing another object.
770 IA2_ROLE_CAPTION,
772 /// Used for check buttons that are menu items.
773 IA2_ROLE_CHECK_MENU_ITEM,
775 /// A specialized dialog that lets the user choose a color.
776 IA2_ROLE_COLOR_CHOOSER,
778 /// A date editor.
779 IA2_ROLE_DATE_EDITOR,
781 /** An iconified internal frame in an ::IA2_ROLE_DESKTOP_PANE.
782 Also refer to ::IA2_ROLE_INTERNAL_FRAME.
784 IA2_ROLE_DESKTOP_ICON,
786 /** A desktop pane. A pane that supports internal frames and iconified
787 versions of those internal frames. Also refer to ::IA2_ROLE_INTERNAL_FRAME.
789 IA2_ROLE_DESKTOP_PANE,
791 /** A directory pane. A pane that allows the user to navigate through
792 and select the contents of a directory. May be used by a file chooser.
793 Also refer to ::IA2_ROLE_FILE_CHOOSER.
795 IA2_ROLE_DIRECTORY_PANE,
797 /** An editable text object in a toolbar. <b>Deprecated.</b>
798 The edit bar role was meant for a text area in a tool bar. However, to detect
799 a text area in a tool bar the AT can query the parent.
801 IA2_ROLE_EDITBAR,
803 /// Embedded (OLE) object.
804 IA2_ROLE_EMBEDDED_OBJECT,
806 /// Text that is used as an endnote (footnote at the end of a chapter or section).
807 IA2_ROLE_ENDNOTE,
809 /** A file chooser. A specialized dialog that displays the files in the
810 directory and lets the user select a file, browse a different directory,
811 or specify a filename. May use the directory pane to show the contents of
812 a directory.
813 Also refer to ::IA2_ROLE_DIRECTORY_PANE.
815 IA2_ROLE_FILE_CHOOSER,
817 /** A font chooser. A font chooser is a component that lets the user pick
818 various attributes for fonts.
820 IA2_ROLE_FONT_CHOOSER,
822 /** Footer of a document page.
823 Also refer to ::IA2_ROLE_HEADER.
825 IA2_ROLE_FOOTER,
827 /// Text that is used as a footnote. Also refer to ::IA2_ROLE_ENDNOTE.
828 IA2_ROLE_FOOTNOTE,
830 /** A container of form controls. An example of the use of this role is to
831 represent an HTML FORM tag.
833 IA2_ROLE_FORM,
835 /** Frame role. A top level window with a title bar, border, menu bar, etc.
836 It is often used as the primary window for an application. Also refer to
837 ::IA2_ROLE_CANVAS and the MSAA roles of dialog and window.
839 IA2_ROLE_FRAME,
841 /** A glass pane. A pane that is guaranteed to be painted on top of all panes
842 beneath it. Also refer to ::IA2_ROLE_CANVAS, ::IA2_ROLE_INTERNAL_FRAME, and
843 ::IA2_ROLE_ROOT_PANE.
845 IA2_ROLE_GLASS_PANE,
847 /** Header of a document page.
848 Also refer to ::IA2_ROLE_FOOTER.
850 IA2_ROLE_HEADER,
852 /// Heading. Use the IAccessible2::attributes level attribute to determine the heading level.
853 IA2_ROLE_HEADING,
855 /// A small fixed size picture, typically used to decorate components.
856 IA2_ROLE_ICON,
858 /** An image map object. Usually a graphic with multiple hotspots, where
859 each hotspot can be activated resulting in the loading of another document
860 or section of a document.
862 IA2_ROLE_IMAGE_MAP,
864 /** An object which is used to allow input of characters not found on a keyboard,
865 such as the input of Chinese characters on a Western keyboard.
867 IA2_ROLE_INPUT_METHOD_WINDOW,
869 /** An internal frame. A frame-like object that is clipped by a desktop pane.
870 The desktop pane, internal frame, and desktop icon objects are often used to
871 create multiple document interfaces within an application.
872 Also refer to ::IA2_ROLE_DESKTOP_ICON, ::IA2_ROLE_DESKTOP_PANE, and ::IA2_ROLE_FRAME.
874 IA2_ROLE_INTERNAL_FRAME,
876 /// An object used to present an icon or short string in an interface.
877 IA2_ROLE_LABEL,
879 /** A layered pane. A specialized pane that allows its children to be drawn
880 in layers, providing a form of stacking order. This is usually the pane that
881 holds the menu bar as well as the pane that contains most of the visual
882 components in a window.
883 Also refer to ::IA2_ROLE_CANVAS, ::IA2_ROLE_GLASS_PANE, and ::IA2_ROLE_ROOT_PANE.
885 IA2_ROLE_LAYERED_PANE,
887 /** A section whose content is parenthetic or ancillary to the main content
888 of the resource.
890 IA2_ROLE_NOTE,
892 /** A specialized pane whose primary use is inside a dialog.
893 Also refer to MSAA's dialog role.
895 IA2_ROLE_OPTION_PANE,
897 /** An object representing a page of document content. It is used in documents
898 which are accessed by the user on a page by page basis.
900 IA2_ROLE_PAGE,
902 /// A paragraph of text.
903 IA2_ROLE_PARAGRAPH,
905 /** A radio button that is a menu item.
906 Also refer to MSAA's button and menu item roles.
908 IA2_ROLE_RADIO_MENU_ITEM,
910 /** An object which is redundant with another object in the accessible hierarchy.
911 ATs typically ignore objects with this role.
913 IA2_ROLE_REDUNDANT_OBJECT,
915 /** A root pane. A specialized pane that has a glass pane and a layered pane
916 as its children.
917 Also refer to ::IA2_ROLE_GLASS_PANE and ::IA2_ROLE_LAYERED_PANE
919 IA2_ROLE_ROOT_PANE,
921 /** A ruler such as those used in word processors.
923 IA2_ROLE_RULER,
925 /** A scroll pane. An object that allows a user to incrementally view a large
926 amount of information. Its children can include scroll bars and a viewport.
927 Also refer to ::IA2_ROLE_VIEW_PORT and MSAA's scroll bar role.
929 IA2_ROLE_SCROLL_PANE,
931 /** A container of document content. An example of the use of this role is to
932 represent an HTML DIV tag. A section may be used as a region. A region is a
933 group of elements that together form a perceivable unit. A region does not
934 necessarily follow the logical structure of the content, but follows the
935 perceivable structure of the page. A region may have an attribute in the set
936 of IAccessible2::attributes which indicates that it is "live". A live region
937 is content that is likely to change in response to a timed change, a user
938 event, or some other programmed logic or event.
940 IA2_ROLE_SECTION,
942 /// Object with graphical representation used to represent content on draw pages.
943 IA2_ROLE_SHAPE,
945 /** A split pane. A specialized panel that presents two other panels at the
946 same time. Between the two panels is a divider the user can manipulate to make
947 one panel larger and the other panel smaller.
949 IA2_ROLE_SPLIT_PANE,
951 /** An object that forms part of a menu system but which can be "undocked"
952 from or "torn off" the menu system to exist as a separate window.
954 IA2_ROLE_TEAR_OFF_MENU,
956 /// An object used as a terminal emulator.
957 IA2_ROLE_TERMINAL,
959 /// Collection of objects that constitute a logical text entity.
960 IA2_ROLE_TEXT_FRAME,
962 /** A toggle button. A specialized push button that can be checked or unchecked,
963 but does not provide a separate indicator for the current state.
964 Also refer to MSAA's roles of push button, check box, and radio button.
965 <BR><B>Note:</B> IA2_ROLE_TOGGLE_BUTTON should not be used. Instead, use MSAA's
966 ROLE_SYSTEM_PUSHBUTTON and STATE_SYSTEM_PRESSED.
968 IA2_ROLE_TOGGLE_BUTTON,
970 /** A viewport. An object usually used in a scroll pane. It represents the
971 portion of the entire data that the user can see. As the user manipulates
972 the scroll bars, the contents of the viewport can change.
973 Also refer to ::IA2_ROLE_SCROLL_PANE.
975 IA2_ROLE_VIEW_PORT,
977 /** An object containing content which is complementary to the main content of
978 a document, but remains meaningful when separated from the main content. There
979 are various types of content that would appropriately have this role. For example,
980 in the case where content is delivered via a web portal to a web browser, this may
981 include but not be limited to show times, current weather, related articles, or
982 stocks to watch. The complementary role indicates that contained content is relevant
983 to the main content. If the complementary content is completely separable main
984 content, it may be appropriate to use a more general role.
986 IA2_ROLE_COMPLEMENTARY_CONTENT
989 /*************************************************************************
991 * File Name (AccessibleStates.idl)
993 * IAccessible2 IDL Specification
995 * Copyright (c) 2007, 2010 Linux Foundation
996 * Copyright (c) 2006 IBM Corporation
997 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
998 * All rights reserved.
1001 * Redistribution and use in source and binary forms, with or without
1002 * modification, are permitted provided that the following conditions
1003 * are met:
1005 * 1. Redistributions of source code must retain the above copyright
1006 * notice, this list of conditions and the following disclaimer.
1008 * 2. Redistributions in binary form must reproduce the above
1009 * copyright notice, this list of conditions and the following
1010 * disclaimer in the documentation and/or other materials
1011 * provided with the distribution.
1013 * 3. Neither the name of the Linux Foundation nor the names of its
1014 * contributors may be used to endorse or promote products
1015 * derived from this software without specific prior written
1016 * permission.
1018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
1019 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1020 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1021 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1022 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1023 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1024 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1025 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1026 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1027 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1028 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1029 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
1030 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1032 * This BSD License conforms to the Open Source Initiative "Simplified
1033 * BSD License" as published at:
1034 * http://www.opensource.org/licenses/bsd-license.php
1036 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
1037 * mark may be used in accordance with the Linux Foundation Trademark
1038 * Policy to indicate compliance with the IAccessible2 specification.
1040 ************************************************************************/
1044 typedef long AccessibleStates;
1046 /** %IAccessible2 specific state bit constants
1048 This enum defines the state bits returned by IAccessible2::states. The
1049 %IAccessible2 state bits are in addition to those returned by MSAA.
1051 enum IA2States {
1053 /** Indicates a window is currently the active window, or is an active subelement
1054 within a container or table.
1056 This state can be used to indicate the current active item in a container, even
1057 if the container itself is not currently active. In other words this would indicate
1058 the item that will get focus if you tab to the container.
1060 This information is important for knowing what to report for trees and potentially
1061 other containers in a virtual buffer.
1063 Also, see ::IA2_STATE_MANAGES_DESCENDANTS for more information.
1065 IA2_STATE_ACTIVE = 0x1,
1067 /** Indicates that the object is armed.
1069 Used to indicate that the control is "pressed" and will be invoked when the
1070 actuator, e.g. a mouse button, is "released". An AT which either monitors the
1071 mouse or synthesizes mouse events might need to know that, and possibly a talking
1072 interface would even let the user know about it. It could also potentially be
1073 useful to on screen keyboards or test tools since the information does indicate
1074 something about the state of the interface, for example, code operating asynchronously
1075 might need to wait for the armed state to change before doing something else.
1078 IA2_STATE_ARMED = 0x2,
1080 /** Indicates the user interface object corresponding to this object no longer exists. */
1081 IA2_STATE_DEFUNCT = 0x4,
1083 /** An object with this state has a caret and implements the IAccessibleText interface.
1085 Such fields may be read-only, so STATE_SYSTEM_READONLY is valid in combination
1086 with IA2_STATE_EDITABLE.
1089 IA2_STATE_EDITABLE = 0x8,
1091 /** Indicates the orientation of this object is horizontal. */
1092 IA2_STATE_HORIZONTAL = 0x10,
1094 /** Indicates this object is minimized and is represented only by an icon. */
1095 IA2_STATE_ICONIFIED = 0x20,
1097 /** Indicates an input validation failure. */
1098 IA2_STATE_INVALID_ENTRY = 0x40,
1100 /** Indicates that this object manages its children.
1102 Note: Due to the fact that MSAA's WinEvents don't allow the active child index
1103 to be passed on the IA2_EVENT_ACTIVE_DESCENDANT_CHANGED event, the manages
1104 descendants scheme can't be used. Instead the active child object has to fire
1105 MSAA's EVENT_OBJECT_FOCUS. In a future release a new event mechanism may be
1106 added to provide for event specific data to be passed with the event. At that
1107 time the IA2_EVENT_ACTIVE_DECENDENT_CHANGED event and
1108 IA2_STATE_MANAGES_DESCENDANTS state would be useful.
1110 IA2_STATE_MANAGES_DESCENDANTS = 0x80,
1112 /** Indicates that an object is modal.
1114 Modal objects have the behavior that something must be done with the object
1115 before the user can interact with an object in a different window.
1117 IA2_STATE_MODAL = 0x100,
1119 /** Indicates this text object can contain multiple lines of text. */
1120 IA2_STATE_MULTI_LINE = 0x200,
1122 /** Indicates this object paints every pixel within its rectangular region. */
1123 IA2_STATE_OPAQUE = 0x400,
1125 /** Indicates that user interaction is required.
1127 An example of when this state is used is when a field in a form must be filled
1128 before a form can be processed.
1130 IA2_STATE_REQUIRED = 0x800,
1132 /** Indicates an object which supports text selection.
1134 Note: This is different than MSAA STATE_SYSTEM_SELECTABLE.
1136 IA2_STATE_SELECTABLE_TEXT = 0x1000,
1138 /** Indicates that this text object can contain only a single line of text. */
1139 IA2_STATE_SINGLE_LINE = 0x2000,
1141 /** Indicates that the accessible object is stale.
1143 This state is used when the accessible object no longer accurately
1144 represents the state of the object which it is representing such as when an
1145 object is transient or when an object has been or is in the process of being
1146 destroyed or when the object's index in its parent has changed.
1148 IA2_STATE_STALE = 0x4000,
1150 /** Indicates that the object implements autocompletion.
1152 This state indicates that a text control will respond to the input of
1153 one ore more characters and cause a sub-item to become selected. The
1154 selection may also result in events fired on the parent object.
1156 IA2_STATE_SUPPORTS_AUTOCOMPLETION = 0x8000,
1158 /** Indicates this object is transient.
1160 An object has this state when its parent object has the state ::IA2_STATE_MANAGES_DESCENDANTS.
1161 For example, a list item object may be managed by its parent list object and may only
1162 exist as long as the object is actually rendered. Similarly a table cell's accessible
1163 object may exist only while the cell has focus. However, from the perspective of an
1164 assistive technology a transient object behaves like a non-transient object. As a
1165 result it is likely that this state is not of use to an assistive technology, but it
1166 is provided in case an assistive technology determines that knowledge of the transient
1167 nature of the object is useful and also for harmony with the Linux accessibility API.
1169 Also, see ::IA2_STATE_MANAGES_DESCENDANTS for more information.
1171 IA2_STATE_TRANSIENT = 0x10000,
1173 /** Indicates the orientation of this object is vertical. */
1174 IA2_STATE_VERTICAL = 0x20000,
1176 /** Indicates this object is checkable.
1178 The standard checkable objects are check boxes, radio buttons, check box menu
1179 items, radio menu items, and toggle buttons. Since assistive technology will
1180 determine that these objects are checkable via the object's role the checkable
1181 state is not required. However, this state is necessary in those cases where
1182 an object has a role which is not one of the previously mentioned roles. An
1183 example is a table cell which indicates whether or not an email has an attachment,
1184 whether or not an mail is considered spam, and whether or not an email has been read.
1186 IA2_STATE_CHECKABLE = 0x40000,
1188 /** Indicates this object is pinned.
1190 This state indicates that an object is fixed at a certain location. One example
1191 is a browser tab that when pinned cannot be moved until unpinned. Another example
1192 is a movable or floating object that when pinned remains in its pinned location
1193 until being unpinned.
1195 IA2_STATE_PINNED = 0x80000
1198 /*************************************************************************
1200 * File Name (Accessible2.idl)
1202 * IAccessible2 IDL Specification
1204 * Copyright (c) 2007, 2013 Linux Foundation
1205 * Copyright (c) 2006 IBM Corporation
1206 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
1207 * All rights reserved.
1210 * Redistribution and use in source and binary forms, with or without
1211 * modification, are permitted provided that the following conditions
1212 * are met:
1214 * 1. Redistributions of source code must retain the above copyright
1215 * notice, this list of conditions and the following disclaimer.
1217 * 2. Redistributions in binary form must reproduce the above
1218 * copyright notice, this list of conditions and the following
1219 * disclaimer in the documentation and/or other materials
1220 * provided with the distribution.
1222 * 3. Neither the name of the Linux Foundation nor the names of its
1223 * contributors may be used to endorse or promote products
1224 * derived from this software without specific prior written
1225 * permission.
1227 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
1228 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1229 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1230 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1231 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1232 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1233 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1234 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1235 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1236 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1237 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1238 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
1239 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1241 * This BSD License conforms to the Open Source Initiative "Simplified
1242 * BSD License" as published at:
1243 * http://www.opensource.org/licenses/bsd-license.php
1245 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
1246 * mark may be used in accordance with the Linux Foundation Trademark
1247 * Policy to indicate compliance with the IAccessible2 specification.
1249 ************************************************************************/
1251 /** @mainpage
1253 @section _interfaces Interfaces
1254 IAccessible2\n
1255 IAccessible2_2\n
1256 IAccessibleAction\n
1257 IAccessibleApplication\n
1258 IAccessibleComponent\n
1259 IAccessibleDocument\n
1260 IAccessibleEditableText\n
1261 IAccessibleHypertext\n
1262 IAccessibleHypertext2\n
1263 IAccessibleHyperlink\n
1264 IAccessibleImage\n
1265 IAccessibleRelation\n
1266 IAccessibleTable [Deprecated]\n
1267 IAccessibleTable2\n
1268 IAccessibleTableCell\n
1269 IAccessibleText\n
1270 IAccessibleText2\n
1271 IAccessibleValue
1273 @section _structs Structs
1274 IA2Locale\n
1275 IA2TableModelChange\n
1276 IA2TextSegment
1278 @section _enums Enums
1279 ::IA2Actions values are predefined actions for use when implementing support for HTML5 media.\n
1280 ::IA2CoordinateType values define the requested coordinate type (screen or parent window).\n
1281 ::IA2EventID values identify events.\n
1282 ::IA2Role values defines roles which are in addition to the existing MSAA roles.\n
1283 ::IA2ScrollType values define where to place an object or substring on the screen.\n
1284 ::IA2States values define states which are in addition to the existing MSAA states.\n
1285 ::IA2TableModelChangeType values describe the kinds of changes made to a table (insert, delete, update).\n
1286 ::IA2TextBoundaryType values define the requested text unit (character, word, sentence, line, paragraph).\n
1287 ::IA2TextSpecialOffsets values define special offsets for use in the text interfaces.
1289 @section _constants Constants
1290 @ref grpRelations
1292 @section _misc Miscellaneous
1293 @ref _licensePage "BSD License"\n
1294 @ref _generalInfo "General Information"\n
1296 @page _licensePage BSD License
1297 %IAccessible2 IDL Specification
1299 Copyright (c) 2007, 2013 Linux Foundation\n
1300 Copyright (c) 2006 IBM Corporation\n
1301 Copyright (c) 2000, 2006 Sun Microsystems, Inc.\n
1302 All rights reserved.
1304 Redistribution and use in source and binary forms, with or without
1305 modification, are permitted provided that the following conditions
1306 are met:
1308 1. Redistributions of source code must retain the above copyright
1309 notice, this list of conditions and the following disclaimer.
1311 2. Redistributions in binary form must reproduce the above
1312 copyright notice, this list of conditions and the following
1313 disclaimer in the documentation and/or other materials
1314 provided with the distribution.
1316 3. Neither the name of the Linux Foundation nor the names of its
1317 contributors may be used to endorse or promote products
1318 derived from this software without specific prior written
1319 permission.
1321 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
1322 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1323 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1324 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1325 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1326 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1327 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1328 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1329 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1330 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1331 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1332 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
1333 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1335 This BSD License conforms to the Open Source Initiative "Simplified
1336 BSD License" as published at:
1337 http://www.opensource.org/licenses/bsd-license.php
1339 %IAccessible2 is a trademark of the Linux Foundation. The %IAccessible2
1340 mark may be used in accordance with the
1341 <a href="http://www.linuxfoundation.org/collaborate/workgroups/accessibility/trademark-policy">
1342 Linux Foundation Trademark Policy</a> to indicate compliance with the %IAccessible2 specification.
1344 @page _generalInfo General Information
1345 The following information is applicable to two or more interfaces.
1347 @ref _errors\n
1348 @ref _memory\n
1349 &nbsp;&nbsp;@ref _arrayConsideration\n
1350 @ref _indexes\n
1351 @ref _enumBase\n
1352 @ref _specialOffsets\n
1353 @ref _dicoveringInterfaces\n
1354 @ref _changingInterfaces\n
1355 @ref _applicationInfo\n
1356 @ref _childIDs\n
1357 @ref _variants\n
1358 @ref _iaaction-iahyperlink\n
1359 @ref _trademark
1361 @section _errors Error Handling
1362 HRESULT values are defined by the Microsoft&reg; Win32&reg; API. For more information, refer to
1363 <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa378137%28v=vs.85%29.aspx">
1364 Interpreting HRESULT Values</a> in MSDN&reg;.
1366 Note that the S_FALSE return value is considered a non-error value and the
1367 SUCCEEDED macro will return TRUE. S_FALSE is used when there is no failure
1368 but there was nothing valid to return, e.g. in IAccessible2::attributes when
1369 there are no attributes. When S_FALSE is returned [out] pointer types should
1370 be NULL and [out] longs should generally be 0, but sometimes -1 is used such
1371 as IAccessible2::indexInParent, IAccessibleText::caretOffset, and
1372 IAccessibleHypertext::hyperlinkIndex.
1374 Note that for BSTR [out] variables common COM practice is that the server does
1375 the SysAllocString and the client does the SysFreeString. Also note that when
1376 NULL is returned there is no need for the client to call SysFreeString. Please
1377 refer to the documentation for each method for more details regarding error handling.
1379 @section _memory Memory Management
1380 The following memory management issues should be considered:
1381 @li Although [out] BSTR variables are declared by the client, their space is
1382 allocated by the server. They need to be freed with SysFreeString by the
1383 client at end of life; the same is true when BSTRs are used in structs or
1384 arrays which are passed to the server.
1385 @li If there is no valid [out] BSTR to return, the server should return S_FALSE and
1386 assign NULL to the output, e.g. *theOutBSTR = NULL;.
1387 @li COM interfaces need to be referenced with AddRef when used and dereferenced
1388 with Release at end of life.
1389 @li Single [out] longs, HWNDs, booleans, and structs are declared by the caller
1390 and passed by reference. The marshaller does all the memory management.
1392 The following articles may be helpful for understanding memory management issues:
1393 @li An article by Don Box in a
1394 <a href="http://www.microsoft.com/msj/1196/activex1196.aspx">Q & A section</a>
1395 of the November 1996 edition of the Microsoft Systems Journal.
1396 @li A posting to a CodeGuru forum,
1397 <a href="http://www.codeguru.com/forum/showthread.php?t=364511">Windows SDK
1398 String: What are the rules for BSTR allocation and deallocation?</a>
1400 @subsection _arrayConsideration Special Consideration when using Arrays
1401 There are several methods which return arrays. In the case of IAccessible2::relations
1402 and IAccessibleRelation::targets the client must allocate and free the arrays.
1404 For the remaining methods which return arrays, the server must allocate the array
1405 and the client must free the array when no longer needed. These methods are
1406 IAccessible2::extendedStates, IAccessible2::localizedExtendedStates,
1407 IAccessible2_2::relationTargetsOfType, IAccessibleAction::keyBinding,
1408 IAccessibleHypertext2::hyperlinks, IAccessibleTable::selectedChildren,
1409 IAccessibleTable::selectedColumns, IAccessibleTable::selectedRows,
1410 IAccessibleTable2::selectedCells, IAccessibleTable2::selectedColumns,
1411 IAccessibleTable2::selectedRows, IAccessibleTableCell::columnHeaderCells,
1412 and IAccessibleTableCell::rowHeaderCells.
1413 For those methods, the server must allocate both the top level array and any storage
1414 associated with it, e.g. for BSTRs. The server must allocate the arrays with
1415 CoTaskMemAlloc and any BSTRs with SysAllocString. The client must use CoTaskMemFree
1416 to free the array and any BSTRs must be freed with SysFreeString.
1418 Also, the IDL for IAccessible2::extendedStates, IAccessible2::localizedExtendedStates,
1419 IAccessibleAction::keyBinding, IAccessibleTable::selectedChildren,
1420 IAccessibleTable::selectedColumns, and IAccessibleTable::selectedRows includes an
1421 extraneous [in] parameter for the caller to specify the max size of the array.
1422 This parameter will be ignored by the COM server.
1424 @section _indexes Zero and One Based Indexes
1425 Unless otherwise specified all offsets and indexes are 0 based.
1427 @section _enumBase Enum Base
1428 Note that enums start at 0.
1430 @section _specialOffsets Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods
1431 IAccessibleText and IAccessibleEditableText can use one or more of the following
1432 special offset values. They are defined in the ::IA2TextSpecialOffsets enum.
1433 @li Using ::IA2_TEXT_OFFSET_LENGTH (-1) as an offset in any of the IAccessibleText or
1434 IAccessibleEditableText methods is the same as specifying the length of the string.
1435 @li Using ::IA2_TEXT_OFFSET_CARET (-2) as an offset for IAccessibleText::textBeforeOffset,
1436 IAccessibleText::textAtOffset, and IAccessibleText::textAfterOffset indicates that the
1437 text related to the physical location of the caret should be used. This is needed for
1438 applications that consider the character offset of the end of one line (as reached by
1439 pressing the End key) the same as the offset of the first character on the next line.
1440 Since the same offset is associated with two different lines a special means is needed
1441 to fetch text from the line where the caret is physically located.
1443 @section _dicoveringInterfaces Discovery of Interfaces
1444 In general AT (Assistive Technology) should try IAccessible2 interfaces, followed by using
1445 the MSAA (Microsoft&reg; Active Accessibility&reg;) interfaces. (In cases where the an application
1446 is known to have custom interfaces which provide information not supplied by IAccessible2
1447 or MSAA, then those custom interfaces can be used.) The AT can then, by default, support
1448 unknown IAccessible2/MSAA applications, without the application developers having to request
1449 AT vendors for support on an individual application by application basis.
1451 When you have a reference to an IAccessible and require a reference to an IAccessible2 use
1452 QueryService as follows:
1453 @code
1454 // pAcc is a reference to the accessible object's IAccessible interface.
1455 IServiceProvider *pService = NULL;
1456 hr = pAcc->QueryInterface(IID_IServiceProvider, (void **)&pService);
1457 if(SUCCEEDED(hr)) {
1458 IAccessible2 *pIA2 = NULL;
1459 hr = pService->QueryService(IID_IAccessible, IID_IAccessible2, (void**)&pIA2);
1460 if (SUCCEEDED(hr) && pIA2) {
1461 // The control supports IAccessible2.
1462 // pIA2 is the reference to the accessible object's IAccessible2 interface.
1465 @endcode
1467 @section _changingInterfaces Changing between Accessible Interfaces
1468 Note that developers must always implement MSAA's IAccessible and, if needed, some
1469 of the interfaces in the set of IAccessible2 interfaces. Although the IAccessible2
1470 IDL is coded such that IAccessible2 is a subclass of MSAA's IAccessible, none of
1471 MSAA's IAccessible methods are redefined by IAccessible2.
1473 QueryService must be used to switch from a reference to an MSAA IAccessible interface
1474 to another interface. This has been
1475 <a href="http://www.atia.org/files/public/Introducing_IAccessibleEx.doc">
1476 documented</a> and the pertinent facts have been extracted below:
1478 @par
1479 Why use QueryService instead of just using QueryInterface to get IAccessibleEx
1480 directly? The reason is that since MSAA 2.0, clients don't talk to a server's
1481 IAccessible interface directly; instead they talk to an intermediate MSAA-provided
1482 wrapper that calls through to the original IAccessible. This wrapper provides services
1483 such as implementing IDispatch, supplying information from MSAA 2.0's Dynamic Annotation
1484 service, and scaling locations when running on Windows Vista with DPI scaling enabled.
1485 QueryService is the supported way to expose additional interfaces from an existing
1486 IAccessible and was originally used by MSHTML to expose IHTMLElement objects corresponding
1487 to IAccessibles. QueryService is often more convenient for servers to implement than
1488 QueryInterface because it does not have the same requirements for preserving object
1489 identity or symmetry/transitivity as QueryInterface, so QueryService allows servers to
1490 easily implement the interface on the same object or a separate object. The latter is
1491 often hard to do with QueryInterface unless the original object supports aggregation.
1493 Two related references in MSDN&reg; are:
1494 @li <a href="http://msdn.microsoft.com/en-us/library/ms696078(VS.85).aspx">
1495 "Using QueryService to expose a native object model interface for an IAccessible object"</a>
1496 @li <a href="http://msdn.microsoft.com/en-us/library/ms528415.aspx#acc_obj">
1497 "Accessing the Internet Explorer Object Associated with an Accessible Object"</a>
1499 Based on this information from Microsoft, QueryService must be used to switch back and forth
1500 between a reference to an MSAA IAccessible interface and any of the IAccessible2 interfaces.
1502 Regarding switching between any of the IAccessible2 interfaces, applications implementing
1503 IAccessible2 should implement the IAccessible2 interfaces on a single object since ATs
1504 will be using QueryInterface to switch between the IAccessilbe2 interfaces. Implementing
1505 the IAccessible2 interfaces on separate objects would require the use of QueryService.
1506 There is one exception, IAccessibleApplication can be implemented on a separate object so
1507 its common code doesn't have to be included in each accessible object. ATs should use
1508 QueryService to access IAccessibleApplication.
1510 @section _applicationInfo Access to Information about the Application
1511 Servers implementing IAccessible2 should provide access to the IAccessibleApplication
1512 interface via QueryService from any object so that ATs can easily determine specific
1513 information about the application such as its name or version.
1515 @section _childIDs Child IDs
1516 The IAccessible2 interfaces do not support child IDs, i.e. simple child elements.
1517 Full accessible objects must be created for each object that supports IAccessible2.
1518 Therefore MSAA's get_accChild should never return a child ID (other than CHILDID_SELF)
1519 for an object that implements any of the IAccessible2 interfaces.
1521 Microsoft's UI Automation specification has the same limitation and this was resolved
1522 in the UI Automation Express specification by adding IAccessibleEx::GetObjectForChild
1523 and IAccessibleEx::GetIAccessiblePair. These methods allow mapping back and forth
1524 between an IAccessibleEx and an {IAccessible, Child ID} pair. A future version of
1525 IAccessible2 may include similar methods to map back and forth between an IAccessible2
1526 and an {IAccessible, Child ID} pair.
1528 @section _variants VARIANTs
1529 Some methods return a VARIANT. Implementers need to make sure that the return type is
1530 specified, i.e. VT_I4, VT_IDISPATCH, etc. The methods that return VARIANTs are
1531 IAccessibleHyperlink::anchor, IAccessibleHyperlink::anchorTarget, IAccessibleValue::currentValue,
1532 IAccessibleValue::maximumValue, IAccessibleValue::minimumValue.
1534 @section _iaaction-iahyperlink IAccessibleHyperlink as subclass of IAccessibleAction
1535 In this version of the IDL, IAccessibleHyperlink is a subclass of IAccessibleAction.
1536 However, there is no practical need for that inheritance and in some cases, such as
1537 an image map of smart tags, it doesn't make sense because such an image map doesn't
1538 have actionable objects; it's the secondary smart tags that are actionable. As a
1539 result, implementations should not rely on the inheritance as it may be removed in
1540 a later version of the IDL.
1542 @section _trademark Trademark Attribution
1543 The names of actual companies and products mentioned herein may be the trademarks of
1544 their respective owners. In particular, Active Accessibility, Microsoft, MSDN, and Win32
1545 are trademarks of the Microsoft group of companies in the U.S.A. and/or other countries.
1556 /** A structure defining the locale of an accessible object.
1558 IAccessible2::locale returns this struct.
1560 typedef struct IA2Locale {
1561 BSTR language; ///< ISO 639-1 Alpha-2 two character language code
1562 BSTR country; ///< ISO 3166-1 Alpha-2 two character country code
1563 BSTR variant; ///< Application specific variant of the locale
1564 } IA2Locale;
1566 /** @brief This interface exposes the primary set of information about an
1567 IAccessible2 enabled accessible object.
1569 This interface must always be provided for objects that support some
1570 portion of the collection of the %IAccessible2 interfaces.
1572 Please refer to @ref _changingInterfaces "Changing between Accessible Interfaces"
1573 for special considerations related to use of the MSAA IAccessible interface and
1574 the set of %IAccessible2 interfaces.
1576 [object, uuid(E89F726E-C4F4-4c19-BB19-B647D7FA8478)]
1577 interface IAccessible2 : IAccessible
1580 /** @brief Returns the number of accessible relations for this object.
1581 @param [out] nRelations
1582 @retval S_OK
1584 [propget] HRESULT nRelations
1586 [out, retval] long *nRelations
1589 /** @brief Returns one accessible relation for this object.
1590 @param [in] relationIndex
1591 0 based
1592 @param [out] relation
1593 @retval S_OK
1594 @retval E_INVALIDARG if bad [in] passed
1596 [propget] HRESULT relation
1598 [in] long relationIndex,
1599 [out, retval] IAccessibleRelation **relation
1602 /** @brief Returns multiple accessible relations for this object.
1603 @param [in] maxRelations
1604 maximum size of the array allocated by the client
1605 @param [out] relations
1606 The array of accessible relation objects. Note that this array is to be
1607 allocated by the client and freed when no longer needed. Refer to @ref
1608 _arrayConsideration "Special Consideration when using Arrays" for more details.
1609 @param [out] nRelations
1610 actual number of relations in the returned array (not more than maxRelations)
1611 @retval S_OK
1612 @retval S_FALSE if there are no relations, nRelations is set to 0
1613 @note As a performant alternative, client code should consider using IAccessible2_2::relationTargetsOfType.
1615 [propget] HRESULT relations
1617 [in] long maxRelations,
1618 [out, size_is(maxRelations), length_is(*nRelations)]
1619 IAccessibleRelation **relations,
1620 [out, retval] long *nRelations
1623 /** @brief Returns the role of an %IAccessible2 object.
1624 @param [out] role
1625 The role of an %IAccessible2 object.
1626 @retval S_OK
1627 @note
1628 @li For convenience MSAA roles are also passed through this method so the
1629 AT doesn't have to also fetch roles through MSAA's get_accRole.
1630 @li %IAccessible2 roles should not be passed through MSAA's get_accRole.
1631 @li For compatibility with non IAccessible2 enabled ATs, IAccessible2
1632 applications should also add support to get_accRole to return the closest
1633 MSAA role or ROLE_SYSTEM_CLIENT (the MSAA defined default role) if there
1634 is not a good match.
1635 @li This method is missing a [propget] prefix in the IDL. The result is the
1636 method is named role in generated C++ code instead of get_role.
1638 HRESULT role
1640 [out, retval] long *role
1643 /** @brief Makes an object visible on the screen.
1644 @param [in] scrollType
1645 Defines where the object should be placed on the screen.
1646 @retval S_OK
1647 @retval E_INVALIDARG if bad [in] passed
1649 HRESULT scrollTo
1651 [in] enum IA2ScrollType scrollType
1654 /** @brief Moves the top left of an object to a specified location.
1656 @param [in] coordinateType
1657 Specifies whether the coordinates are relative to the screen or the parent object.
1658 @param [in] x
1659 Defines the x coordinate.
1660 @param [in] y
1661 Defines the y coordinate.
1662 @retval S_OK
1663 @retval E_INVALIDARG if bad [in] passed
1665 HRESULT scrollToPoint
1667 [in] enum IA2CoordinateType coordinateType,
1668 [in] long x,
1669 [in] long y
1672 /** @brief Returns grouping information.
1674 Used for tree items, list items, tab panel labels, radio buttons, etc.
1675 Also used for collections of non-text objects.
1677 @param [out] groupLevel
1678 1 based, 0 indicates that this value is not applicable
1679 @param [out] similarItemsInGroup
1680 1 based, 0 indicates that this value is not applicable
1681 @param [out] positionInGroup
1682 1 based, 0 indicates that this value is not applicable. This is an index
1683 into the objects in the current group, not an index into all the objects
1684 at the same group level.
1685 @retval S_OK if at least one value is valid
1686 @retval S_FALSE if no values are valid, [out] values are 0s
1687 @note This method is meant to describe the nature of an object's containment
1688 structure. It's exposed by trees, tree grids, nested lists, nested menus,
1689 but not headings, which uses the level object attribute. It is also exposed
1690 by radio buttons (with groupLevel == 0).
1691 @note This is normally not implemented on a combo box to describe the nature
1692 of its contents. Normally an AT will get that information from its child list
1693 object. However, in some cases when non-edit combo boxes are not able to be structured
1694 such that the list is a child of the combo box, this method is implemented on
1695 the combo box itself. ATs can use this interface if a child list is not found.
1697 [propget] HRESULT groupPosition
1699 [out] long *groupLevel,
1700 [out] long *similarItemsInGroup,
1701 [out, retval] long *positionInGroup
1704 /** @brief Returns the bit strip containing any IAccessible2 states.
1706 The IAccessible2 states are in addition to the MSAA states and are defined in
1707 the IA2States enum.
1709 @param [out] states
1710 @retval S_OK
1712 [propget] HRESULT states
1714 [out, retval] AccessibleStates *states
1717 /** @brief Returns the extended role.
1719 An extended role is a role which is dynamically generated by the application.
1720 It is not predefined by the %IAccessible2 specification.
1722 @param [out] extendedRole
1723 @retval S_OK
1724 @retval S_FALSE if there is nothing to return, [out] value is NULL
1726 [propget] HRESULT extendedRole
1728 [out, retval] BSTR *extendedRole
1731 /** @brief Returns the localized extended role.
1732 @param [out] localizedExtendedRole
1733 @retval S_OK
1734 @retval S_FALSE if there is nothing to return, [out] value is NULL
1736 [propget] HRESULT localizedExtendedRole
1738 [out, retval] BSTR *localizedExtendedRole
1741 /** @brief Returns the number of extended states.
1742 @param [out] nExtendedStates
1743 @retval S_OK
1745 [propget] HRESULT nExtendedStates
1747 [out, retval] long *nExtendedStates
1750 /** @brief Returns the extended states (array of strings).
1752 An extended state is a state which is dynamically generated by the application.
1753 It is not predefined by the %IAccessible2 specification.
1755 @param [in] maxExtendedStates
1756 This parameter is ignored. Refer to @ref _arrayConsideration
1757 "Special Consideration when using Arrays" for more details.
1758 @param [out] extendedStates
1759 This array is allocated by the server. The client must free it with CoTaskMemFree.
1760 @param [out] nExtendedStates
1761 The number of extended states returned; the size of the returned array.
1762 @retval S_OK
1763 @retval S_FALSE if there are no states, [out] values are NULL and 0 respectively
1765 [propget] HRESULT extendedStates
1767 [in] long maxExtendedStates,
1768 [out, size_is(,maxExtendedStates), length_is(,*nExtendedStates)] BSTR **extendedStates,
1769 [out, retval] long *nExtendedStates
1772 /** @brief Returns the localized extended states (array of strings).
1774 @param [in] maxLocalizedExtendedStates
1775 This parameter is ignored. Refer to @ref _arrayConsideration
1776 "Special Consideration when using Arrays" for more details.
1777 @param [out] localizedExtendedStates
1778 This array is allocated by the server. The client must free it with CoTaskMemFree.
1779 @param [out] nLocalizedExtendedStates
1780 The number of localized extended states returned; the size of the returned array.
1781 @retval S_OK
1782 @retval S_FALSE if there are no states, [out] values are NULL and 0 respectively
1784 [propget] HRESULT localizedExtendedStates
1786 [in] long maxLocalizedExtendedStates,
1787 [out, size_is(,maxLocalizedExtendedStates), length_is(,*nLocalizedExtendedStates)] BSTR **localizedExtendedStates,
1788 [out, retval] long *nLocalizedExtendedStates
1791 /** @brief Returns the unique ID.
1793 The uniqueID is an identifier for this object, is unique within the
1794 current window, and remains the same for the lifetime of the accessible
1795 object.
1797 The uniqueID is not related to:
1798 - the MSAA objectID which is used by the server to disambiguate between
1799 IAccessibles per HWND or
1800 - the MSAA childID which is used to disambiguate between children being
1801 managed by an IAccessible.
1803 This value is provided so the AT can have access to a unique runtime persistent
1804 identifier even when not handling an event for the object.
1806 An example of when this value is useful is if the AT wants to build a cache.
1807 The AT could cache the uniqueIDs in addition to other data being cached.
1808 When an event is fired the AT could map the uniqueID to its internal model.
1809 Thus, if there's a REORDER/SHOW/HIDE event the AT knows which part of the
1810 internal structure has been invalidated and can refetch just that part.
1812 This value can also be used by an AT to determine when the current control
1813 has changed. If the role is the same for two controls that are adjacent in
1814 the tab order, this can be used to detect the new control.
1816 Another use of this value by an AT is to identify when a grouping object has
1817 changed, e.g. when moving from a radio button in one group to a radio button in a
1818 different group.
1820 One means of implementing this would be to create a factory with a 32 bit number
1821 generator and a reuse pool. The number generator would emit numbers starting
1822 at 1. Each time an object's life cycle ended, its number would be saved into a
1823 reuse pool. The number generator would be used whenever the reuse pool was empty.
1825 Another way to create a unique ID is to generate it from a pointer value, e.g. an
1826 object's address. That would be unique because no two active objects can use the
1827 same allocated memory space.
1829 @param [out] uniqueID
1830 @retval S_OK
1832 [propget] HRESULT uniqueID
1834 [out, retval] long *uniqueID
1837 /** @brief Returns the window handle for the parent window which contains this object.
1839 This is the same window handle which will be passed for any events that occur on the
1840 object, but is cached in the accessible object for use when it would be helpful to
1841 access the window handle in cases where an event isn't fired on this object.
1843 A use case is when a screen reader is grabbing an entire web page on a page load.
1844 Without the availability of windowHandle, the AT would have to get the window handle
1845 by using WindowFromAccessibleObject on each IAccessible, which is slow because it's
1846 implemented by oleacc.dll as a loop which crawls up the ancestor chain and looks for
1847 a ROLE_WINDOW object, mapping that back to a window handle.
1849 @param [out] windowHandle
1850 @retval S_OK
1852 [propget] HRESULT windowHandle
1854 [out, retval] HWND *windowHandle
1857 /** @brief Returns the index of this object in its parent object.
1858 @param [out] indexInParent
1859 0 based; -1 indicates there is no parent; the upper bound is the value
1860 returned by the parent's IAccessible::get_accChildCount.
1861 @retval S_OK
1862 @retval S_FALSE if no parent, [out] value is -1
1864 [propget] HRESULT indexInParent
1866 [out, retval] long *indexInParent
1869 /** @brief Returns the IA2Locale of the accessible object.
1870 @param [out] locale
1871 @retval S_OK
1873 [propget] HRESULT locale
1875 [out, retval] IA2Locale *locale
1878 /** @brief Returns the attributes specific to this object, such as a cell's formula.
1879 @param [out] attributes
1880 @retval S_OK
1881 @retval S_FALSE returned if there is nothing to return, [out] value is NULL
1883 [propget] HRESULT attributes
1885 [out, retval] BSTR *attributes
1890 /*************************************************************************
1892 * File Name (Accessible2_2.idl)
1894 * IAccessible2 IDL Specification
1896 * Copyright (c) 2007, 2013 Linux Foundation
1897 * Copyright (c) 2006 IBM Corporation
1898 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
1899 * All rights reserved.
1902 * Redistribution and use in source and binary forms, with or without
1903 * modification, are permitted provided that the following conditions
1904 * are met:
1906 * 1. Redistributions of source code must retain the above copyright
1907 * notice, this list of conditions and the following disclaimer.
1909 * 2. Redistributions in binary form must reproduce the above
1910 * copyright notice, this list of conditions and the following
1911 * disclaimer in the documentation and/or other materials
1912 * provided with the distribution.
1914 * 3. Neither the name of the Linux Foundation nor the names of its
1915 * contributors may be used to endorse or promote products
1916 * derived from this software without specific prior written
1917 * permission.
1919 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
1920 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1921 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1922 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1923 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1924 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1925 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1926 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1927 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1928 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1929 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1930 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
1931 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1933 * This BSD License conforms to the Open Source Initiative "Simplified
1934 * BSD License" as published at:
1935 * http://www.opensource.org/licenses/bsd-license.php
1937 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
1938 * mark may be used in accordance with the Linux Foundation Trademark
1939 * Policy to indicate compliance with the IAccessible2 specification.
1941 ************************************************************************/
1948 /** @brief This interface exposes the primary set of information about an
1949 IAccessible2 enabled accessible object.
1951 This interface must always be provided for objects that support some
1952 portion of the collection of the %IAccessible2 interfaces.
1954 Please refer to @ref _changingInterfaces "Changing between Accessible Interfaces"
1955 for special considerations related to use of the MSAA IAccessible interface and
1956 the set of %IAccessible2 interfaces.
1958 [object, uuid(6C9430E9-299D-4E6F-BD01-A82A1E88D3FF)]
1959 interface IAccessible2_2 : IAccessible2
1961 /** @brief Returns the attribute value of a specified attribute specific to this object.
1962 @param [in] name
1963 @param [out] attribute
1964 @retval S_OK
1965 @retval S_FALSE returned if there is nothing to return, [out] value is NULL.
1966 @retval E_INVALIDARG if bad [in] passed.
1967 @note The output value is a VARIANT. Typically it will be a VT_BSTR, but there
1968 are some cases where it will be a VT_I4 or VT_BOOL. Refer to the <a href=
1969 "http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2/objectattributesIAccessible2">
1970 Object Attributes specification</a> for more information.
1972 [propget] HRESULT attribute
1974 [in] BSTR name,
1975 [out, retval] VARIANT *attribute
1978 /** @brief Returns the deepest hypertext accessible in the subtree of this object, and the caret offset within it.
1979 @param [out] accessible
1980 @param [out] caretOffset
1981 @retval S_OK
1982 @retval S_FALSE returned if there is no caret in any of the objects in the subtree, [out] accessible is NULL and [out] caretOffset is -1.
1984 [propget] HRESULT accessibleWithCaret
1986 [out] IUnknown **accessible,
1987 [out, retval] long *caretOffset
1990 /** @brief Returns relation targets for a specified target type.
1991 @param [in] type
1992 The requested @ref grpRelations "relation type".
1993 @param [in] maxTargets
1994 The number of targets requested. 0 indicates that all targets should be returned.
1995 @param [out] targets
1996 This array is allocated by the server. The client must free it with CoTaskMemFree.
1997 @param [out] nTargets
1998 The number of targets returned; the size of the returned array.
1999 @retval S_OK
2000 @retval S_FALSE if there are no targets, [out] values are NULL and 0 respectively.
2001 @retval E_INVALIDARG if bad [in] passed.
2003 [propget] HRESULT relationTargetsOfType
2005 [in] BSTR type,
2006 [in] long maxTargets,
2007 [out, size_is(,*nTargets)] IUnknown ***targets,
2008 [out, retval] long *nTargets
2013 /*************************************************************************
2015 * File Name (AccessibleComponent.idl)
2017 * IAccessible2 IDL Specification
2019 * Copyright (c) 2007, 2010 Linux Foundation
2020 * Copyright (c) 2006 IBM Corporation
2021 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
2022 * All rights reserved.
2025 * Redistribution and use in source and binary forms, with or without
2026 * modification, are permitted provided that the following conditions
2027 * are met:
2029 * 1. Redistributions of source code must retain the above copyright
2030 * notice, this list of conditions and the following disclaimer.
2032 * 2. Redistributions in binary form must reproduce the above
2033 * copyright notice, this list of conditions and the following
2034 * disclaimer in the documentation and/or other materials
2035 * provided with the distribution.
2037 * 3. Neither the name of the Linux Foundation nor the names of its
2038 * contributors may be used to endorse or promote products
2039 * derived from this software without specific prior written
2040 * permission.
2042 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
2043 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2044 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2045 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2046 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
2047 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2048 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2049 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2050 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2051 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2052 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2053 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
2054 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2056 * This BSD License conforms to the Open Source Initiative "Simplified
2057 * BSD License" as published at:
2058 * http://www.opensource.org/licenses/bsd-license.php
2060 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
2061 * mark may be used in accordance with the Linux Foundation Trademark
2062 * Policy to indicate compliance with the IAccessible2 specification.
2064 ************************************************************************/
2070 /** A value specifying a color in ARGB format, where each 8 bit color component
2071 specifies alpha, red, green, and blue respectively. The alpha value is optional.
2073 typedef long IA2Color;
2075 /** @brief This interface is implemented by any object that can be rendered
2076 on the screen.
2078 This interface provides the standard mechanism for an assistive technology
2079 to retrieve information concerning the graphical representation of an object.
2080 Coordinates used by the functions of this interface are specified in
2081 different coordinate systems. Their scale is the same and is equal to
2082 that of the screen coordinate system. In other words all coordinates
2083 are measured in pixels. They differ in their respective origin:
2084 <ul>
2085 <li>The screen coordinate system has its origin in the upper left
2086 corner of the current screen.</li>
2087 <li>The origin of the parent coordinate system is the upper left corner
2088 of the parent's bounding box. With no parent the screen coordinate
2089 system is used instead.</li>
2090 </ul>
2092 [object, uuid(1546D4B0-4C98-4bda-89AE-9A64748BDDE4)]
2093 interface IAccessibleComponent : IUnknown
2096 /** @brief Returns the location of the upper left corner of the object's
2097 bounding box relative to the immediate parent object.
2099 The coordinates of the bounding box are given relative to the parent's
2100 coordinate system. The coordinates of the returned position are relative
2101 to this object's parent or relative to the screen on which this object
2102 is rendered if it has no parent. If the object is not on any screen
2103 the returned position is (0,0).
2105 @param [out] x
2106 @param [out] y
2107 @retval S_OK
2109 [propget] HRESULT locationInParent
2111 [out] long *x,
2112 [out, retval] long *y
2115 /** @brief Returns the foreground color of this object.
2116 @param [out] foreground
2117 The returned color is the foreground color of this object or, if
2118 that is not supported, the default foreground color.
2119 @retval S_OK
2121 [propget] HRESULT foreground
2123 [out, retval] IA2Color *foreground
2126 /** @brief Returns the background color of this object.
2127 @param [out] background
2128 The returned color is the background color of this object or, if
2129 that is not supported, the default background color.
2130 @retval S_OK
2132 [propget] HRESULT background
2134 [out, retval] IA2Color *background
2137 /*************************************************************************
2139 * File Name (AccessibleValue.idl)
2141 * IAccessible2 IDL Specification
2143 * Copyright (c) 2007, 2010 Linux Foundation
2144 * Copyright (c) 2006 IBM Corporation
2145 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
2146 * All rights reserved.
2149 * Redistribution and use in source and binary forms, with or without
2150 * modification, are permitted provided that the following conditions
2151 * are met:
2153 * 1. Redistributions of source code must retain the above copyright
2154 * notice, this list of conditions and the following disclaimer.
2156 * 2. Redistributions in binary form must reproduce the above
2157 * copyright notice, this list of conditions and the following
2158 * disclaimer in the documentation and/or other materials
2159 * provided with the distribution.
2161 * 3. Neither the name of the Linux Foundation nor the names of its
2162 * contributors may be used to endorse or promote products
2163 * derived from this software without specific prior written
2164 * permission.
2166 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
2167 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2168 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2169 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2170 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
2171 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2172 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2173 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2174 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2175 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2176 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2177 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
2178 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2180 * This BSD License conforms to the Open Source Initiative "Simplified
2181 * BSD License" as published at:
2182 * http://www.opensource.org/licenses/bsd-license.php
2184 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
2185 * mark may be used in accordance with the Linux Foundation Trademark
2186 * Policy to indicate compliance with the IAccessible2 specification.
2188 ************************************************************************/
2194 /** @brief This interface gives access to a single numerical value.
2196 The %IAccessibleValue interface represents a single numerical value and should
2197 be implemented by any class that supports numerical value like progress bars
2198 and spin boxes. This interface lets you access the value and its upper and
2199 lower bounds.
2201 [object, uuid(35855B5B-C566-4fd0-A7B1-E65465600394)]
2202 interface IAccessibleValue : IUnknown
2205 /** @brief Returns the value of this object as a number.
2207 The exact return type is implementation dependent. Typical types are long and
2208 double.
2209 @param [out] currentValue
2210 Returns the current value represented by this object. See the section about
2211 @ref _variants "VARIANTs" for additional information.
2212 @retval S_OK
2213 @retval S_FALSE if there is nothing to return, [out] value is a VARIANT with vt = VT_EMPTY
2215 [propget] HRESULT currentValue
2217 [out, retval] VARIANT *currentValue
2220 /** @brief Sets the value of this object to the given number.
2222 The argument is clipped to the valid interval whose upper and lower
2223 bounds are returned by the methods IAccessibleValue::maximumValue and
2224 IAccessibleValue::minimumValue, i.e. if it is lower than the minimum
2225 value the new value will be the minimum and if it is greater than the
2226 maximum then the new value will be the maximum.
2228 @param [in] value
2229 The new value represented by this object. The set of admissible types for
2230 this argument is implementation dependent.
2231 @retval S_OK
2233 HRESULT setCurrentValue
2235 [in] VARIANT value
2238 /** @brief Returns the maximal value that can be represented by this object.
2240 The type of the returned value is implementation dependent. It does not have
2241 to be the same type as that returned by method IAccessibleValue::currentValue.
2243 @param [out] maximumValue
2244 Returns the maximal value in an implementation dependent type. If this object
2245 has no upper bound then an empty object is returned. See the section about
2246 @ref _variants "VARIANTs" for additional information.
2247 @retval S_OK
2248 @retval S_FALSE if there is nothing to return, [out] value is a VARIANT with vt = VT_EMPTY
2250 [propget] HRESULT maximumValue
2252 [out, retval] VARIANT *maximumValue
2255 /** @brief Returns the minimal value that can be represented by this object.
2257 The type of the returned value is implementation dependent. It does not have
2258 to be the same type as that returned by method IAccessibleValue::currentValue.
2260 @param [out] minimumValue
2261 Returns the minimal value in an implementation dependent type. If this object
2262 has no lower bound then an empty object is returned. See the section about
2263 @ref _variants "VARIANTs" for additional information.
2264 @retval S_OK
2265 @retval S_FALSE if there is nothing to return, [out] value is a VARIANT with vt = VT_EMPTY
2267 [propget] HRESULT minimumValue
2269 [out, retval] VARIANT *minimumValue
2273 /*************************************************************************
2275 * File Name (AccessibleText.idl)
2277 * IAccessible2 IDL Specification
2279 * Copyright (c) 2007, 2013 Linux Foundation
2280 * Copyright (c) 2006 IBM Corporation
2281 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
2282 * All rights reserved.
2285 * Redistribution and use in source and binary forms, with or without
2286 * modification, are permitted provided that the following conditions
2287 * are met:
2289 * 1. Redistributions of source code must retain the above copyright
2290 * notice, this list of conditions and the following disclaimer.
2292 * 2. Redistributions in binary form must reproduce the above
2293 * copyright notice, this list of conditions and the following
2294 * disclaimer in the documentation and/or other materials
2295 * provided with the distribution.
2297 * 3. Neither the name of the Linux Foundation nor the names of its
2298 * contributors may be used to endorse or promote products
2299 * derived from this software without specific prior written
2300 * permission.
2302 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
2303 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2304 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2305 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2306 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
2307 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2308 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2309 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2310 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2311 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2312 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2313 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
2314 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2316 * This BSD License conforms to the Open Source Initiative "Simplified
2317 * BSD License" as published at:
2318 * http://www.opensource.org/licenses/bsd-license.php
2320 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
2321 * mark may be used in accordance with the Linux Foundation Trademark
2322 * Policy to indicate compliance with the IAccessible2 specification.
2324 ************************************************************************/
2331 /** A structure containing a substring and the start and end offsets in the enclosing string.
2333 IAccessibleText::newText and IAccessibleText::oldText return this struct.
2335 typedef struct IA2TextSegment {
2336 BSTR text; ///< A copy of a segment of text taken from an enclosing paragraph.
2337 long start; ///< Index of the first character of the segment in the enclosing text.
2338 long end; ///< Index of the character following the last character of the segment in the enclosing text.
2339 } IA2TextSegment;
2341 /** This enum defines values which specify a text boundary type.
2343 IA2_TEXT_BOUNDARY_SENTENCE is optional. When a method doesn't implement this
2344 method it must return S_FALSE. Typically this feature would not be implemented
2345 by an application. However, if the application developer was not satisfied with
2346 how screen readers have handled the reading of sentences this boundary type
2347 could be implemented and screen readers could use the application's version of a
2348 sentence rather than the screen reader's.
2350 The rest of the boundary types must be supported.
2352 This enum is used in IAccessibleText::textBeforeOffset, IAccessibleText::textAtOffset,
2353 and IAccessibleText::textAfterOffset.
2356 enum IA2TextBoundaryType {
2357 IA2_TEXT_BOUNDARY_CHAR, /**< Typically, a single character is returned. In some cases more than
2358 one character is returned, for example, when a document contains field
2359 data such as a field containing a date, time, or footnote reference.
2360 In this case the caret can move over several characters in one movement
2361 of the caret. Note that after the caret moves, the caret offset changes
2362 by the number of characters in the field, e.g. by 8 characters in the
2363 following date: 03/26/07. */
2364 IA2_TEXT_BOUNDARY_WORD, /**< The range provided matches the range observed when the application
2365 processes the Ctrl + left arrow and Ctrl + right arrow key sequences.
2366 Typically this is from the start of one word to the start of the next, but
2367 various applications are inconsistent in the handling of the end of a line. */
2368 IA2_TEXT_BOUNDARY_SENTENCE, ///< Range is from start of one sentence to the start of another sentence.
2369 IA2_TEXT_BOUNDARY_PARAGRAPH, ///< Range is from start of one paragraph to the start of another paragraph.
2370 IA2_TEXT_BOUNDARY_LINE, /**< Range is from start of one line to the start of another line. This
2371 often means that an end-of-line character will appear at the end of the
2372 range. However in the case of some applications an end-of-line character
2373 indicates the end of a paragraph and the lines composing the paragraph,
2374 other than the last line, do not contain an end of line character. */
2375 IA2_TEXT_BOUNDARY_ALL ///< Using this value will cause all text to be returned.
2378 /** @brief This interface gives read-only access to text.
2380 The %IAccessibleText interface should be implemented by all components
2381 that present textual information on the display like buttons,
2382 text entry fields, or text portions of the document window. The interface
2383 provides access to the text's content, attributes, and spatial location.
2384 However, text can not be modified with this interface. That is the task
2385 of the IAccessibleEditableText interface.
2387 The text length, i.e. the number of characters in the text, is
2388 returned by IAccessibleText::nCharacters. All methods that operate
2389 on particular characters (e.g. IAccessibleText::textAtOffset) use character
2390 indices from 0 to length-1. All methods that operate on character positions
2391 (e.g. IAccessibleText::text) use indices from 0 to length.
2393 Please note that accessible text does not necessarily support selection.
2394 In this case it should behave as if there where no selection. An empty
2395 selection is used for example to express the current cursor position.
2397 Refer to @ref _specialOffsets
2398 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2399 for information about special offsets that can be used in %IAccessibleText methods.
2401 E_FAIL is returned in the following cases
2402 @li endOffset < startOffset
2403 @li endoffset > length
2405 [object, uuid(24FD2FFB-3AAD-4a08-8335-A3AD89C0FB4B)]
2406 interface IAccessibleText : IUnknown
2409 /** @brief Adds a text selection
2410 @param [in] startOffset
2411 Starting offset ( 0 based).
2412 @param [in] endOffset
2413 Offset of first character after new selection (0 based).
2414 @retval S_OK
2415 @retval E_INVALIDARG if bad [in] passed
2416 @note Refer to @ref _specialOffsets
2417 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2418 for information about special offsets that can be used in %IAccessibleText methods.
2420 HRESULT addSelection
2422 [in] long startOffset,
2423 [in] long endOffset
2426 /** @brief Returns text attributes.
2427 @param [in] offset
2428 Text offset (0 based). Refer to @ref _specialOffsets
2429 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2430 for information about special offsets that can be used in %IAccessibleText methods.
2431 @param [out] startOffset
2432 The starting offset of the character range over which all text attributes match
2433 those of offset. (0 based)
2434 @param [out] endOffset
2435 The offset of the first character past the character range over which all text
2436 attributes match those of offset. (0 based)
2437 @param [out] textAttributes
2438 A string of attributes describing the text. The attributes are described in the
2439 <a href="http://www.linuxfoundation.org/en/Accessibility/IAccessible2/TextAttributes">
2440 text attributes specification</a> on the %IAccessible2 web site.
2441 @retval S_OK
2442 @retval S_FALSE if there is nothing to return, [out] values are 0s and NULL respectively
2443 @retval E_INVALIDARG if bad [in] passed
2445 [propget] HRESULT attributes
2447 [in] long offset,
2448 [out] long *startOffset,
2449 [out] long *endOffset,
2450 [out, retval] BSTR *textAttributes
2453 /** @brief Returns the position of the caret.
2455 Returns the 0-based offset of the caret within the text. If the text is
2456 implemented as a tree of text objects with embed characters in higher levels
2457 representing substrings of child text objects and the caret is in one of the
2458 child text objects, then the offset in the higher level text object would be
2459 at the embed character representing child text object that contains the caret.
2461 For example, if the string "one two three" is implemented as a two text objects,
2462 with a top level text object containing an embed character "one ? three" and a
2463 child text object containing "two" and if the caret is in the descendant object
2464 just before the 'o' in "two", then:
2465 <ul>
2466 <li>the caretOffset for the "one ? three" object would be 4, matching the embed character</li>
2467 <li>the caretOffset for "two" would be 2, matching the "o"</li>
2468 </ul>
2469 The caret position/offset is that of the character logically following it, e.g.
2470 to the right of it in a left to right language, or to the left of it in a right
2471 to left language.
2472 @param [out] offset
2473 The returned offset is relative to the text represented by this object.
2474 @retval S_OK
2475 @retval S_FALSE if the caret is not currently active on this object, i.e. the
2476 caret is located on some other object. The returned offset value will be -1.
2477 @note S_FALSE (and an offset of -1) will not be returned if the caret is somewhere
2478 in the text object or one of its descendants.
2480 [propget] HRESULT caretOffset
2482 [out, retval] long *offset
2486 /** @brief Returns the bounding box of the specified position.
2488 The virtual character after the last character of the represented
2489 text, i.e. the one at position length is a special case. It represents the
2490 current input position and will therefore typically be queried by AT more
2491 often than other positions. Because it does not represent an existing character
2492 its bounding box is defined in relation to preceding characters. It should be
2493 roughly equivalent to the bounding box of some character when inserted at the
2494 end of the text. Its height typically being the maximal height of all the
2495 characters in the text or the height of the preceding character, its width being
2496 at least one pixel so that the bounding box is not degenerate.
2498 Note that the index 'length' is not always valid. Whether it is or not is
2499 implementation dependent. It typically is when text is editable or otherwise
2500 when on the screen the caret can be placed behind the text. You can be sure
2501 that the index is valid after you have received a ::IA2_EVENT_TEXT_CARET_MOVED
2502 event for this index.
2503 @param [in] offset
2504 Index of the character for which to return its bounding box. The valid range
2505 is 0..length. Refer to @ref _specialOffsets
2506 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2507 for information about special offsets that can be used in %IAccessibleText methods.
2508 @param [in] coordType
2509 Specifies if the coordinates are relative to the screen or to the parent window.
2510 @param [out] x
2511 X coordinate of the top left corner of the bounding box of the referenced character.
2512 @param [out] y
2513 Y coordinate of the top left corner of the bounding box of the referenced character.
2514 @param [out] width
2515 Width of the bounding box of the referenced character.
2516 @param [out] height
2517 Height of the bounding box of the referenced character.
2518 @retval S_OK
2519 @retval E_INVALIDARG if bad [in] passed
2521 [propget] HRESULT characterExtents
2523 [in] long offset,
2524 [in] enum IA2CoordinateType coordType,
2525 [out] long *x,
2526 [out] long *y,
2527 [out] long *width,
2528 [out, retval] long *height
2532 /** @brief Returns the number of active non-contiguous selections
2533 @param [out] nSelections
2534 @retval S_OK
2536 [propget] HRESULT nSelections
2538 [out, retval] long *nSelections
2541 /** @brief Returns the text position for the specified screen position.
2543 Given a point return the zero-based index of the character under that
2544 point. The same functionality could be achieved by using the bounding
2545 boxes for each character as returned by IAccessibleText::characterExtents.
2546 The method IAccessibleText::offsetAtPoint, however, can be implemented
2547 more efficiently.
2549 @param [in] x
2550 The position's x value for which to look up the index of the character that
2551 is rendered on to the display at that point.
2552 @param [in] y
2553 The position's y value for which to look up the index of the character that
2554 is rendered on to the display at that point.
2555 @param [in] coordType
2556 Screen coordinates or window coordinates.
2557 @param [out] offset
2558 Index of the character under the given point or -1 if the point
2559 is invalid or there is no character under the point.
2560 @retval S_OK
2561 @retval S_FALSE if nothing to return, [out] value is -1
2563 @retval E_INVALIDARG if bad [in] passed
2565 [propget] HRESULT offsetAtPoint
2567 [in] long x,
2568 [in] long y,
2569 [in] enum IA2CoordinateType coordType,
2570 [out, retval] long *offset
2573 /** @brief Returns the character offsets of Nth active text selection
2575 Returns the 0-based starting and ending offsets of the Nth selection. If the
2576 text is implemented as a tree of text objects with embed characters in higher
2577 levels representing substrings of child text objects, consider the following.
2578 If the starting selection offset is in one of the child text objects, then the
2579 starting offset in the higher level text object would be at the embed character
2580 representing the child text object that contains the starting selection offset.
2581 If the ending selection offset is in one of the child text objects, then the
2582 ending offset in the higher level text object would be just after the embed
2583 character representing the child text object that contains the ending selection
2584 offset.
2586 For example, if the string "one two three" is implemented as a two text objects,
2587 with a top level text object containing an embed character "one ? three" and a
2588 child text object containing "two" and if the selection is the string "two" then:
2589 <ul>
2590 <li>the startOffset for the "one ? three" object would be 4, matching the embed character and the endOffset would be 5.</li>
2591 <li>the startOffset for the "two" object would be 0, and the endOffset would be 3</li>
2592 </ul>
2593 Selection offsets are that of the character logically following it, e.g.
2594 to the right of it in a left to right language or to the left of it in a right to left language.
2595 @param [in] selectionIndex
2596 Index of selection (0 based).
2597 @param [out] startOffset
2598 0 based offset of first selected character
2599 @param [out] endOffset
2600 0 based offset of one past the last selected character.
2601 @retval S_OK
2602 @retval E_INVALIDARG if bad [in] passed
2604 [propget] HRESULT selection
2606 [in] long selectionIndex,
2607 [out] long *startOffset,
2608 [out, retval] long *endOffset
2611 /** @brief Returns the substring between the two given indices.
2613 The substring starts with the character at startOffset (inclusive) and up to
2614 the character at endOffset (exclusive), if startOffset is less or equal
2615 endOffset. If endOffset is lower than startOffset, the result is the same
2616 as a call with the two arguments being exchanged.
2618 The whole text can be requested by passing the indices zero and
2619 IAccessibleText::nCharacters. If both indices have the same value, an empty
2620 string is returned.
2621 @param [in] startOffset
2622 Index of the first character to include in the returned string. The valid range
2623 is 0..length.
2624 @param [in] endOffset
2625 Index of the last character to exclude in the returned string. The valid range
2626 is 0..length.
2627 @param [out] text
2628 Returns the substring starting with the character at startOffset (inclusive)
2629 and up to the character at endOffset (exclusive), if startOffset is less than
2630 or equal to endOffset.
2631 @retval S_OK
2632 @retval E_INVALIDARG if bad [in] passed
2633 @note
2634 @li The returned string may be longer than endOffset-startOffset bytes if text
2635 contains multi-byte characters.
2636 @li Refer to @ref _specialOffsets
2637 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2638 for information about special offsets that can be used in %IAccessibleText methods.
2640 [propget] HRESULT text
2642 [in] long startOffset,
2643 [in] long endOffset,
2644 [out, retval] BSTR *text
2647 /** @brief Returns a text portion before the given position.
2649 Returns the substring of the specified text type that is located before the
2650 given character and does not include it. The result of this method should be
2651 same as a result for IAccessibleText::textAtOffset with a suitably decreased
2652 index value.
2654 For example, if text type is ::IA2_TEXT_BOUNDARY_WORD, then the complete
2655 word that is closest to and located before offset is returned.
2657 If the index is valid, but no text is found, S_FALSE is returned along with out
2658 values of 0, 0, and a NULL pointer. This would happen for boundary types other
2659 than character when the text consists entirely of whitespace.
2661 @param [in] offset
2662 Index of the character for which to return the text part before it. The index
2663 character will not be part of the returned string. The valid range is 0..length.
2664 Refer to @ref _specialOffsets
2665 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2666 for information about special offsets that can be used in %IAccessibleText methods.
2667 @param [in] boundaryType
2668 The type of the text portion to return. See ::IA2TextBoundaryType for the
2669 complete list.
2670 @param [out] startOffset
2671 0 based offset of first character.
2672 @param [out] endOffset
2673 0 based offset of one past the last character.
2674 @param [out] text
2675 Returns the requested text portion. This portion may be empty or invalid when
2676 no appropriate text portion is found or text type is invalid.
2677 @retval S_OK
2678 @retval S_FALSE if the requested boundary type is not implemented, such as
2679 ::IA2_TEXT_BOUNDARY_SENTENCE, or if there is nothing to return;
2680 [out] values are 0s and NULL respectively
2681 @retval E_INVALIDARG if bad [in] passed
2683 [propget] HRESULT textBeforeOffset
2685 [in] long offset,
2686 [in] enum IA2TextBoundaryType boundaryType,
2687 [out] long *startOffset,
2688 [out] long *endOffset,
2689 [out, retval] BSTR *text
2692 /** @brief Returns a text portion after the given position.
2694 Returns the substring of the specified text type that is located after the
2695 given character and does not include it. The result of this method should be
2696 same as a result for IAccessibleText::textAtOffset with a suitably increased
2697 index value.
2699 For example, if text type is ::IA2_TEXT_BOUNDARY_WORD, then the complete
2700 word that is closest to and located after offset is returned.
2702 If the index is valid, but no text is found, S_FALSE is returned along with out
2703 values of 0, 0, and a NULL pointer. This would happen for boundary types other
2704 than character when the text consists entirely of whitespace.
2706 @param [in] offset
2707 Index of the character for which to return the text part after it. The index
2708 character will not be part of the returned string. The valid range is 0..length.
2709 Refer to @ref _specialOffsets
2710 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2711 for information about special offsets that can be used in %IAccessibleText methods.
2712 @param [in] boundaryType
2713 The type of the text portion to return. See ::IA2TextBoundaryType for the complete
2714 list.
2715 @param [out] startOffset
2716 0 based offset of first character.
2717 @param [out] endOffset
2718 0 based offset of one past the last character.
2719 @param [out] text
2720 Returns the requested text portion. This portion may be empty or invalid when
2721 no appropriate text portion is found or text type is invalid.
2722 @retval S_OK
2723 @retval S_FALSE if the requested boundary type is not implemented, such as
2724 ::IA2_TEXT_BOUNDARY_SENTENCE, or if there is nothing to return;
2725 [out] values are 0s and NULL respectively
2726 @retval E_INVALIDARG if bad [in] passed
2728 [propget] HRESULT textAfterOffset
2730 [in] long offset,
2731 [in] enum IA2TextBoundaryType boundaryType,
2732 [out] long *startOffset,
2733 [out] long *endOffset,
2734 [out, retval] BSTR *text
2737 /** @brief Returns a text portion that spans the given position.
2739 Returns the substring defined by the specified boundary type at the specified
2740 offset. Refer to IA2TextBoundaryType for more details.
2742 For the word boundary type the returned string will contain the word at the
2743 offset if the offset is inside a word and will contain the word before the
2744 offset if the offset is not inside a word. All offsets from the first to the
2745 last characters of a word are considered inside the word. Boundary types of
2746 sentence and paragraph should exhibit similar behavior.
2748 If the index is valid, but no text is found, S_FALSE is returned along with out
2749 values of 0, 0, and a NULL pointer. This would happen for boundary types other
2750 than character when the text consists entirely of whitespace.
2752 @param [in] offset
2753 Index of the character for which to return the text part it belongs to. The valid
2754 range is 0..length.
2755 Refer to @ref _specialOffsets
2756 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2757 for information about special offsets that can be used in %IAccessibleText methods.
2758 @param [in] boundaryType
2759 The type of the text portion to return. See ::IA2TextBoundaryType for the complete
2760 list.
2761 @param [out] startOffset
2762 0 based offset of first character.
2763 @param [out] endOffset
2764 0 based offset of one past the last character.
2765 @param [out] text
2766 Returns the requested text portion. This portion may be empty or invalid when
2767 no appropriate text portion is found or text type is invalid.
2768 @retval S_OK
2769 @retval S_FALSE if the requested boundary type is not implemented, such as
2770 ::IA2_TEXT_BOUNDARY_SENTENCE, or if there is nothing to return;
2771 [out] values are 0s and NULL respectively
2772 @retval E_INVALIDARG if bad [in] passed
2774 [propget] HRESULT textAtOffset
2776 [in] long offset,
2777 [in] enum IA2TextBoundaryType boundaryType,
2778 [out] long *startOffset,
2779 [out] long *endOffset,
2780 [out, retval] BSTR *text
2783 /** @brief Unselects a range of text.
2784 @param [in] selectionIndex
2785 Index of selection to remove (0 based).
2786 @retval S_OK
2787 @retval E_INVALIDARG if bad [in] passed
2789 HRESULT removeSelection
2791 [in] long selectionIndex
2794 /** @brief Sets the position of the caret.
2796 The caret position/offset is that of the character logically following it,
2797 e.g. to the right of it in a left to right language.
2799 Setting the caret position may or may not alter the current selection. A
2800 change of the selection is notified to the accessibility event listeners with
2801 an ::IA2_EVENT_TEXT_SELECTION_CHANGED event.
2803 When the new caret position differs from the old one (which, of course, is the
2804 standard case) this is notified to the accessibility event listeners with an
2805 ::IA2_EVENT_TEXT_CARET_MOVED event.
2806 @param [in] offset
2807 The new index of the caret. This caret is actually placed to the left side of
2808 the character with that index. An index of 0 places the caret so that the next
2809 insertion goes before the first character. An index of IAccessibleText::nCharacters
2810 leads to insertion after the last character. Refer to @ref _specialOffsets
2811 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2812 for information about special offsets that can be used in %IAccessibleText methods.
2813 @retval S_OK
2814 @retval E_FAIL if the caret cannot be set
2815 @retval E_INVALIDARG if bad [in] passed
2817 HRESULT setCaretOffset
2819 [in] long offset
2822 /** @brief Changes the bounds of an existing selection.
2823 @param [in] selectionIndex
2824 Index of selection to change (0 based)
2825 @param [in] startOffset
2826 New starting offset (0 based)
2827 @param [in] endOffset
2828 New ending offset (0 based) - the offset of the character just past the last character of the selection.
2829 @retval S_OK
2830 @retval E_INVALIDARG if bad [in] passed
2831 @note Refer to @ref _specialOffsets
2832 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2833 for information about special offsets that can be used in %IAccessibleText methods.
2835 HRESULT setSelection
2837 [in] long selectionIndex,
2838 [in] long startOffset,
2839 [in] long endOffset
2842 /** @brief Returns total number of characters.
2844 Note that this may be different than the total number of bytes required to store the
2845 text, if the text contains multi-byte characters.
2846 @param [out] nCharacters
2847 @retval S_OK
2849 [propget] HRESULT nCharacters
2851 [out, retval] long *nCharacters
2854 /** @brief Makes a specific part of string visible on screen.
2855 @param [in] startIndex
2856 0 based character offset.
2857 @param [in] endIndex
2858 0 based character offset - the offset of the character just past the last character of the string.
2859 @param [in] scrollType
2860 Defines where the object should be placed on the screen.
2861 @retval S_OK
2862 @retval E_INVALIDARG if bad [in] passed
2863 @note Refer to @ref _specialOffsets
2864 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2865 for information about special offsets that can be used in %IAccessibleText methods.
2867 HRESULT scrollSubstringTo
2869 [in] long startIndex,
2870 [in] long endIndex,
2871 [in] enum IA2ScrollType scrollType
2874 /** @brief Moves the top left of a substring to a specified location.
2876 @param [in] startIndex
2877 0 based character offset.
2878 @param [in] endIndex
2879 0 based character offset - the offset of the character just past the last character of the string.
2880 @param [in] coordinateType
2881 Specifies whether the coordinates are relative to the screen or the parent object.
2882 @param [in] x
2883 Defines the x coordinate.
2884 @param [in] y
2885 Defines the y coordinate.
2886 @retval S_OK
2887 @retval S_FALSE if the object is already at the specified location.
2888 @retval E_INVALIDARG if bad [in] passed
2889 @note Refer to @ref _specialOffsets
2890 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
2891 for information about special offsets that can be used in %IAccessibleText methods.
2893 HRESULT scrollSubstringToPoint
2895 [in] long startIndex,
2896 [in] long endIndex,
2897 [in] enum IA2CoordinateType coordinateType,
2898 [in] long x,
2899 [in] long y
2902 /** @brief Returns any inserted text.
2904 Provided for use by the ::IA2_EVENT_TEXT_INSERTED and ::IA2_EVENT_TEXT_UPDATED
2905 event handlers.
2907 This data is only guaranteed to be valid while the thread notifying the event
2908 continues. Once the handler has returned, the validity of the data depends on
2909 how the server manages the life cycle of its objects. Also, note that the server
2910 may have different life cycle management strategies for controls depending on
2911 whether or not a control manages its children. Lists, trees, and tables can have
2912 a large number of children and thus it's possible that the child objects for those
2913 controls would only be created as needed. Servers should document their life cycle
2914 strategy as this will be of interest to assistive technology or script engines
2915 accessing data out of process or from other threads. Servers only need to save the
2916 last inserted block of text and a scope of the entire application is adequate.
2918 @param [out] newText
2919 The text that was just inserted.
2920 @retval S_OK
2921 @retval S_FALSE If there is nothing to return, the values of IA2TextSegment
2922 struct are set as follows: text = NULL, start = 0, end = 0.
2925 [propget] HRESULT newText
2927 [out, retval] IA2TextSegment *newText
2930 /** @brief Returns any removed text.
2932 Provided for use by the IA2_EVENT_TEXT_REMOVED/UPDATED event handlers.
2934 This data is only guaranteed to be valid while the thread notifying the event
2935 continues. Once the handler has returned, the validity of the data depends on
2936 how the server manages the life cycle of its objects. Also, note that the server
2937 may have different life cycle management strategies for controls depending on
2938 whether or not a control manages its children. Lists, trees, and tables can have
2939 a large number of children and thus it's possible that the child objects for those
2940 controls would only be created as needed. Servers should document their life cycle
2941 strategy as this will be of interest to assistive technology or script engines
2942 accessing data out of process or from other threads. Servers only need to save the
2943 last removed block of text and a scope of the entire application is adequate.
2945 @param [out] oldText
2946 The text that was just removed.
2947 @retval S_OK
2948 @retval S_FALSE If there is nothing to return, the values of IA2TextSegment
2949 struct are set as follows: text = NULL, start = 0, end = 0.
2951 [propget] HRESULT oldText
2953 [out, retval] IA2TextSegment *oldText
2957 /*************************************************************************
2959 * File Name (AccessibleText2.idl)
2961 * IAccessible2 IDL Specification
2963 * Copyright (c) 2007, 2013 Linux Foundation
2964 * Copyright (c) 2006 IBM Corporation
2965 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
2966 * All rights reserved.
2969 * Redistribution and use in source and binary forms, with or without
2970 * modification, are permitted provided that the following conditions
2971 * are met:
2973 * 1. Redistributions of source code must retain the above copyright
2974 * notice, this list of conditions and the following disclaimer.
2976 * 2. Redistributions in binary form must reproduce the above
2977 * copyright notice, this list of conditions and the following
2978 * disclaimer in the documentation and/or other materials
2979 * provided with the distribution.
2981 * 3. Neither the name of the Linux Foundation nor the names of its
2982 * contributors may be used to endorse or promote products
2983 * derived from this software without specific prior written
2984 * permission.
2986 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
2987 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
2988 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2989 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2990 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
2991 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2992 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2993 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2994 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2995 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2996 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2997 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
2998 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3000 * This BSD License conforms to the Open Source Initiative "Simplified
3001 * BSD License" as published at:
3002 * http://www.opensource.org/licenses/bsd-license.php
3004 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
3005 * mark may be used in accordance with the Linux Foundation Trademark
3006 * Policy to indicate compliance with the IAccessible2 specification.
3008 ************************************************************************/
3016 /** @brief This interface gives read-only access to text.
3018 The %IAccessibleText2 interface extends the functionality of the
3019 %IAccessibleText interface.
3021 [object, uuid(9690A9CC-5C80-4DF5-852E-2D5AE4189A54)]
3022 interface IAccessibleText2 : IAccessibleText
3025 /** @brief Returns the range and of the specified set of attributes.
3027 Return the range (start and end offsets) and text attributes that correspond
3028 to the given attributes filter at the given offset.
3030 @param [in] offset
3031 The offset at which to search for the attributes specified in the filter.
3032 @param [in] filter
3033 The requested attribute names. The filter format is "attribute1, attribute2".
3034 @param [out] startOffset
3035 The starting (0-based) offset of the text containing the specified attributes.
3036 @param [out] endOffset
3037 The (0-based) offset one past the last character of the text containing the
3038 specified attributes.
3039 @param [out] attributeValues
3040 The values of the requested attributes.
3041 @retval S_OK
3042 @retval S_FALSE if nothing to return, [out] values are -1, -1, NULL respectively.
3043 @retval E_INVALIDARG if bad [in] passed.
3045 [propget] HRESULT attributeRange
3047 [in] long offset,
3048 [in] BSTR filter,
3049 [out] long *startOffset,
3050 [out] long *endOffset,
3051 [out, retval] BSTR *attributeValues
3055 /*************************************************************************
3057 * File Name (AccessibleEditableText.idl)
3059 * IAccessible2 IDL Specification
3061 * Copyright (c) 2007, 2012 Linux Foundation
3062 * Copyright (c) 2006 IBM Corporation
3063 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
3064 * All rights reserved.
3067 * Redistribution and use in source and binary forms, with or without
3068 * modification, are permitted provided that the following conditions
3069 * are met:
3071 * 1. Redistributions of source code must retain the above copyright
3072 * notice, this list of conditions and the following disclaimer.
3074 * 2. Redistributions in binary form must reproduce the above
3075 * copyright notice, this list of conditions and the following
3076 * disclaimer in the documentation and/or other materials
3077 * provided with the distribution.
3079 * 3. Neither the name of the Linux Foundation nor the names of its
3080 * contributors may be used to endorse or promote products
3081 * derived from this software without specific prior written
3082 * permission.
3084 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
3085 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3086 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3087 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3088 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
3089 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3090 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3091 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3092 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3093 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3094 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3095 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
3096 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3098 * This BSD License conforms to the Open Source Initiative "Simplified
3099 * BSD License" as published at:
3100 * http://www.opensource.org/licenses/bsd-license.php
3102 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
3103 * mark may be used in accordance with the Linux Foundation Trademark
3104 * Policy to indicate compliance with the IAccessible2 specification.
3106 ************************************************************************/
3113 /** @brief This interface provides clipboard capability to text objects.
3115 This interface is typically used in conjunction with the IAccessibleText
3116 interface and complements that interface with the additional capability of
3117 clipboard operations. Note that even a read only text object can support
3118 the copy capability so this interface is not limited to editable objects.
3120 The substrings used with this interface are specified as follows:
3121 If startOffset is less than endOffset, the substring starts with the
3122 character at startOffset and ends with the character just before endOffset.
3123 If endOffset is lower than startOffset, the result is the same as a call
3124 with the two arguments exchanged. The whole text can be defined by passing
3125 the indices zero and IAccessibleText::nCharacters. If both indices have the
3126 same value, an empty string is defined.
3128 Refer to the @ref _specialOffsets
3129 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3130 for information about a special offset constant that can be used in %IAccessibleEditableText methods.
3132 [object, uuid(A59AA09A-7011-4b65-939D-32B1FB5547E3)]
3133 interface IAccessibleEditableText : IUnknown
3136 /** @brief Copies the text range into the clipboard.
3138 The selection is set to the specified offsets and then selection is copied into
3139 the system clipboard.
3141 @param [in] startOffset
3142 Start index of the text to moved into the clipboard.
3143 The valid range is 0..length.
3144 @param [in] endOffset
3145 End index of the text to moved into the clipboard.
3146 The valid range is 0..length.
3147 @retval S_OK
3148 @retval E_INVALIDARG if bad [in] passed
3149 @note Refer to @ref _specialOffsets
3150 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3151 for information about special offsets that can be used in %IAccessibleEditableText
3152 methods.
3153 @deprecated This function is available via the application's GUI.
3155 HRESULT copyText
3157 [in] long startOffset,
3158 [in] long endOffset
3161 /** @brief Deletes a range of text.
3163 The text between and including the two given indices is deleted
3164 from the text represented by this object.
3166 @param [in] startOffset
3167 Start index of the text to be deleted.
3168 The valid range is 0..length.
3169 @param [in] endOffset
3170 End index of the text to be deleted.
3171 The valid range is 0..length.
3172 @retval S_OK
3173 @retval E_INVALIDARG if bad [in] passed
3174 @note Refer to @ref _specialOffsets
3175 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3176 for information about special offsets that can be used in %IAccessibleEditableText
3177 methods.
3179 HRESULT deleteText
3181 [in] long startOffset,
3182 [in] long endOffset
3185 /** @brief Inserts text at the specified position.
3187 The specified string is inserted at the given index into the text
3188 represented by this object.
3190 @param [in] offset
3191 Index at which to insert the text.
3192 The valid range is 0..length.
3193 Refer to @ref _specialOffsets
3194 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3195 for information about special offsets that can be used in %IAccessibleEditableText
3196 methods.
3197 @param [in] text
3198 Text that is inserted.
3199 @retval S_OK
3200 @retval E_INVALIDARG if bad [in] passed
3202 HRESULT insertText
3204 [in] long offset,
3205 [in] BSTR *text
3208 /** @brief Deletes a range of text and copies it to the clipboard.
3210 The selection is set to the specified offsets, the selection is then copied into
3211 the system clipboard, and then the selection is deleted.
3213 @param [in] startOffset
3214 Start index of the text to be deleted.
3215 The valid range is 0..length.
3216 @param [in] endOffset
3217 End index of the text to be deleted.
3218 The valid range is 0..length.
3219 @retval S_OK
3220 @retval E_INVALIDARG if bad [in] passed
3221 @note Refer to @ref _specialOffsets
3222 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3223 for information about special offsets that can be used in %IAccessibleEditableText
3224 methods.
3225 @deprecated This function is available via the application's GUI.
3227 HRESULT cutText
3229 [in] long startOffset,
3230 [in] long endOffset
3233 /** @brief Pastes content from the clipboard.
3235 Any existing selection is removed, the clipboard content is then pasted into
3236 this object's text at the given offset. This method is similar to the insertText
3237 method. If the index is not valid the system clipboard content is not inserted. The
3238 behavior is the same as when Ctrl+V is used, i.e. the pasted contents are not
3239 necessarily plain text.
3241 @param [in] offset
3242 Index at which to insert the content from the system clipboard into
3243 the text represented by this object.
3244 The valid range is 0..length.
3245 Refer to @ref _specialOffsets
3246 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3247 for information about special offsets that can be used in %IAccessibleEditableText
3248 methods.
3249 @retval S_OK
3250 @retval E_INVALIDARG if bad [in] passed
3251 @deprecated This function is available via the application's GUI.
3253 HRESULT pasteText
3255 [in] long offset
3258 /** @brief Replaces text.
3260 The text between the two given indices is replaced by the specified
3261 replacement string. This method is equivalent to calling first
3262 IAccessibleEditableText::deleteText with the two indices and then
3263 calling IAccessibleEditableText::insertText with the replacement text
3264 at the start index.
3266 @param [in] startOffset
3267 Start index of the text to be replaced.
3268 The valid range is 0..length.
3269 @param [in] endOffset
3270 End index of the text to be replaced.
3271 The valid range is 0..length.
3272 @param [in] text
3273 The Text that replaces the text between the given indices.
3274 @retval S_OK
3275 @retval E_INVALIDARG if bad [in] passed
3276 @note Refer to @ref _specialOffsets
3277 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3278 for information about special offsets that can be used in %IAccessibleEditableText
3279 methods.
3281 HRESULT replaceText
3283 [in] long startOffset,
3284 [in] long endOffset,
3285 [in] BSTR *text
3288 /** @brief Replaces the attributes of a text range by the given set of attributes.
3290 Sets the attributes for the text between the two given indices. The old
3291 attributes are replaced by the new list of attributes.
3293 @param [in] startOffset
3294 Start index of the text whose attributes are modified.
3295 The valid range is 0..length.
3296 @param [in] endOffset
3297 End index of the text whose attributes are modified.
3298 The valid range is 0..length.
3299 @param [in] attributes
3300 Set of attributes that replaces the old list of attributes of
3301 the specified text portion.
3302 @retval S_OK
3303 @retval E_INVALIDARG if bad [in] passed
3304 @note Refer to @ref _specialOffsets
3305 "Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods"
3306 for information about special offsets that can be used in %IAccessibleEditableText
3307 methods.
3309 HRESULT setAttributes
3311 [in] long startOffset,
3312 [in] long endOffset,
3313 [in] BSTR *attributes
3317 /*************************************************************************
3319 * File Name (AccessibleHyperlink.idl)
3321 * IAccessible2 IDL Specification
3323 * Copyright (c) 2007, 2010 Linux Foundation
3324 * Copyright (c) 2006 IBM Corporation
3325 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
3326 * All rights reserved.
3329 * Redistribution and use in source and binary forms, with or without
3330 * modification, are permitted provided that the following conditions
3331 * are met:
3333 * 1. Redistributions of source code must retain the above copyright
3334 * notice, this list of conditions and the following disclaimer.
3336 * 2. Redistributions in binary form must reproduce the above
3337 * copyright notice, this list of conditions and the following
3338 * disclaimer in the documentation and/or other materials
3339 * provided with the distribution.
3341 * 3. Neither the name of the Linux Foundation nor the names of its
3342 * contributors may be used to endorse or promote products
3343 * derived from this software without specific prior written
3344 * permission.
3346 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
3347 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3348 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3349 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3350 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
3351 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3352 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3353 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3354 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3355 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3356 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3357 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
3358 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3360 * This BSD License conforms to the Open Source Initiative "Simplified
3361 * BSD License" as published at:
3362 * http://www.opensource.org/licenses/bsd-license.php
3364 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
3365 * mark may be used in accordance with the Linux Foundation Trademark
3366 * Policy to indicate compliance with the IAccessible2 specification.
3368 ************************************************************************/
3375 /** @brief This interface represents hyperlinks.
3377 This interface represents a hyperlink associated with a single substring
3378 of text or single non-text object. Non-text objects can have either a
3379 single link or a collection of links such as when the non-text object is
3380 an image map.
3382 Linked objects and anchors are implementation dependent. This interface is derived
3383 from IAccessibleAction. IAccessibleAction::nActions is one greater than the
3384 maximum value for the indices used with the methods of this interface.
3386 Furthermore, the object that implements this interface has to be connected
3387 implicitly or explicitly with an object that implements IAccessibleText.
3388 IAccessibleHyperlink::startIndex and IAccessibleHyperlink::endIndex are
3389 indices with respect to the text exposed by IAccessibleText.
3391 This interface provides access to a single object which can have multiple actions.
3392 An example is an image map which is an image with multiple links each of which is
3393 associated with a separate non-overlapping area of the image. This interface could
3394 also be applied to other kinds of objects with multiple actions such as "smart tags"
3395 which are objects, typically strings, which have multiple actions such as
3396 "Activate URI", "Bookmark URI", etc.
3398 An interesting use case is an image map where each area is associated with multiple
3399 actions, e.g. an image map of smart tags. In this case you would have to implement
3400 two levels of accessible hyperlinks. The first level hyperlinks would only implement
3401 anchor and anchorTarget. The anchors would all reference the image object. The
3402 anchorTargets would reference the second level accessible hyperlink objects. None
3403 of the IAccessibleAction methods would be implemented on the first level hyperlink
3404 objects. The second level hyperlink objects would implement the IAccessibleAction
3405 methods. Their anchors would also reference the image object and their anchorTargets
3406 would reference URLs or the objects that would be activated.
3408 This use case demonstrates that in some cases there is no need for IAccessibleHyperlink
3409 to derive from IAccessibleAction. As a result it may be removed in a later version of
3410 the IDL and it is suggested that implementations should not rely on the inheritance.
3413 [object, uuid(01C20F2B-3DD2-400f-949F-AD00BDAB1D41)]
3414 interface IAccessibleHyperlink : IAccessibleAction
3417 /** @brief Returns an object that represents the link anchor, as appropriate
3418 for the link at the specified index.
3419 @param [in] index
3420 A 0 based index identifies the anchor when, as in the case of an image map,
3421 there is more than one link represented by this object. The valid maximal
3422 index is indicated by IAccessibleAction::nActions.
3423 @param [out] anchor
3424 This is an implementation dependent value. For example, for a text link this
3425 method could return the substring of the containing string where the substring
3426 is overridden with link behavior, and for an image link this method could return
3427 an IUnknown VARIANT for IAccessibleImage. See the section about
3428 @ref _variants "VARIANTs" for additional information.
3429 @retval S_OK
3430 @retval E_INVALIDARG if bad [in] passed
3432 [propget] HRESULT anchor
3434 [in] long index,
3435 [out, retval] VARIANT *anchor
3438 /** @brief Returns an object representing the target of the link, as appropriate
3439 for the link at the specified index.
3440 @param [in] index
3441 A 0 based index identifies the anchor when, as in the case of an image map,
3442 there is more than one link represented by this object. The valid maximal
3443 index is indicated by IAccessibleAction::nActions.
3444 @param [out] anchorTarget
3445 This is an implementation dependent value. For example this method could
3446 return a BSTR VARIANT of the URI. Alternatively this method could return an
3447 IUnknown VARIANT of a COM interface representing a target object to be
3448 activated when the link is activated. See the section about
3449 @ref _variants "VARIANTs" for additional information.
3450 @retval S_OK
3451 @retval E_INVALIDARG if bad [in] passed
3453 [propget] HRESULT anchorTarget
3455 [in] long index,
3456 [out, retval] VARIANT *anchorTarget
3459 /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink starts.
3461 The returned value is related to the IAccessibleText interface of the object that
3462 owns this hyperlink.
3463 @param [out] index
3464 @retval S_OK
3466 [propget] HRESULT startIndex
3468 [out, retval] long *index
3471 /** @brief Returns the 0 based character offset at which the textual representation of the hyperlink ends.
3473 The returned value is related to the IAccessibleText interface of the object that
3474 owns this hyperlink. The character at the index is not part of the hypertext.
3475 @param [out] index
3476 @retval S_OK
3478 [propget] HRESULT endIndex
3480 [out, retval] long *index
3483 /** @brief Returns whether the target object referenced by this link is still valid.
3485 This is a volatile state that may change without sending an appropriate event.
3486 Returns TRUE if the referenced target is still valid and FALSE otherwise.
3488 This has also been used to indicate whether or not the URI of the anchorTarget
3489 is malformed.
3491 @param [out] valid
3492 If false, one or more of the object's links are invalid.
3493 If true, all of the object's links are valid.
3494 @retval S_OK
3495 @retval S_FALSE if there is nothing to return, [out] value is FALSE
3496 @note This method is not being used, is deprecated, and should not be implemented or
3497 used. It is likely that this method will be removed in a later version of the IDL.
3499 [propget] HRESULT valid
3501 [out, retval] boolean *valid
3504 /*************************************************************************
3506 * File Name (AccessibleHypertext.idl)
3508 * IAccessible2 IDL Specification
3510 * Copyright (c) 2007, 2010 Linux Foundation
3511 * Copyright (c) 2006 IBM Corporation
3512 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
3513 * All rights reserved.
3516 * Redistribution and use in source and binary forms, with or without
3517 * modification, are permitted provided that the following conditions
3518 * are met:
3520 * 1. Redistributions of source code must retain the above copyright
3521 * notice, this list of conditions and the following disclaimer.
3523 * 2. Redistributions in binary form must reproduce the above
3524 * copyright notice, this list of conditions and the following
3525 * disclaimer in the documentation and/or other materials
3526 * provided with the distribution.
3528 * 3. Neither the name of the Linux Foundation nor the names of its
3529 * contributors may be used to endorse or promote products
3530 * derived from this software without specific prior written
3531 * permission.
3533 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
3534 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3535 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3536 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3537 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
3538 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3539 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3540 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3541 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3542 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3543 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3544 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
3545 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3547 * This BSD License conforms to the Open Source Initiative "Simplified
3548 * BSD License" as published at:
3549 * http://www.opensource.org/licenses/bsd-license.php
3551 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
3552 * mark may be used in accordance with the Linux Foundation Trademark
3553 * Policy to indicate compliance with the IAccessible2 specification.
3555 ************************************************************************/
3563 /** @brief This interface exposes information about hypertext in a document.
3565 The %IAccessibleHypertext interface is the main interface to expose
3566 hyperlinks in a document, typically a text document, that are used
3567 to reference other documents. A typical implementation is to implement
3568 this interface on the smallest text object such as a paragraph of text.
3570 [object, uuid(6B4F8BBF-F1F2-418a-B35E-A195BC4103B9)]
3571 interface IAccessibleHypertext : IAccessibleText
3574 /** @brief Returns the number of links and link groups contained within this hypertext
3575 paragraph.
3576 @param [out] hyperlinkCount
3577 The number of links and link groups within this hypertext paragraph.
3578 Returns 0 if there is no link.
3579 @retval S_OK
3581 [propget] HRESULT nHyperlinks
3583 [out, retval] long *hyperlinkCount
3586 /** @brief Returns the specified link.
3588 The returned IAccessibleHyperlink object encapsulates the hyperlink and
3589 provides several kinds of information describing it.
3590 @param [in] index
3591 This 0 based index specifies the hyperlink to return.
3592 @param [out] hyperlink
3593 If the given index is valid, i.e. lies in the interval from 0 to the number
3594 of links minus one, a reference to the specified hyperlink object is returned.
3595 If the index is invalid then a NULL pointer is returned.
3596 @retval S_OK
3597 @retval E_INVALIDARG if bad [in] passed
3599 [propget] HRESULT hyperlink
3601 [in] long index,
3602 [out, retval] IAccessibleHyperlink **hyperlink
3605 /** @brief Returns the index of the hyperlink that is associated with this character index.
3607 This is the case when a link spans the given character index.
3608 @param [in] charIndex
3609 A 0 based index of the character for which to return the link index. If
3610 IAccessibleText is used to represent the text containing the link, then the
3611 character index is only valid if it is greater than or equal to zero and
3612 lower than the number of characters in the text.
3613 @param [out] hyperlinkIndex
3614 Returns the 0 based index of the hyperlink that is associated with this
3615 character index, or -1 if charIndex is not on a link.
3616 @retval S_OK
3617 @retval S_FALSE if there is nothing to return, [out] value is -1
3618 @retval E_INVALIDARG if bad [in] passed
3620 [propget] HRESULT hyperlinkIndex
3622 [in] long charIndex,
3623 [out, retval] long *hyperlinkIndex
3627 /*************************************************************************
3629 * File Name (AccessibleHypertext2.idl)
3631 * IAccessible2 IDL Specification
3633 * Copyright (c) 2007, 2013 Linux Foundation
3634 * Copyright (c) 2006 IBM Corporation
3635 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
3636 * All rights reserved.
3639 * Redistribution and use in source and binary forms, with or without
3640 * modification, are permitted provided that the following conditions
3641 * are met:
3643 * 1. Redistributions of source code must retain the above copyright
3644 * notice, this list of conditions and the following disclaimer.
3646 * 2. Redistributions in binary form must reproduce the above
3647 * copyright notice, this list of conditions and the following
3648 * disclaimer in the documentation and/or other materials
3649 * provided with the distribution.
3651 * 3. Neither the name of the Linux Foundation nor the names of its
3652 * contributors may be used to endorse or promote products
3653 * derived from this software without specific prior written
3654 * permission.
3656 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
3657 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3658 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3659 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3660 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
3661 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3662 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3663 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3664 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3665 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3666 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3667 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
3668 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3670 * This BSD License conforms to the Open Source Initiative "Simplified
3671 * BSD License" as published at:
3672 * http://www.opensource.org/licenses/bsd-license.php
3674 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
3675 * mark may be used in accordance with the Linux Foundation Trademark
3676 * Policy to indicate compliance with the IAccessible2 specification.
3678 ************************************************************************/
3686 /** @brief This interface exposes information about hypertext in a document.
3688 The %IAccessibleHypertext2 interface extends the functinality of the
3689 %IAccessibleHypertext inteface.
3691 [object, uuid(CF64D89F-8287-4B44-8501-A827453A6077)]
3692 interface IAccessibleHypertext2 : IAccessibleHypertext
3695 /** @brief Returns the links for this object.
3697 The returned IAccessibleHyperlink objects encapsulate the hyperlink and
3698 provides several kinds of information describing it.
3700 @param [out] hyperlinks
3701 This array is allocated by the server. The client must free it with CoTaskMemFree.
3702 @param [out] nHyperlinks
3703 The number of links returned; the size of the returned array.
3704 @retval S_OK
3705 @retval S_FALSE if there are no links, [out] values are NULL and 0 respectively
3707 [propget] HRESULT hyperlinks
3709 [out, size_is(,*nHyperlinks)] IAccessibleHyperlink ***hyperlinks,
3710 [out, retval] long *nHyperlinks
3714 /*************************************************************************
3716 * File Name (AccessibleTable.idl)
3718 * IAccessible2 IDL Specification
3720 * Copyright (c) 2007, 2013 Linux Foundation
3721 * Copyright (c) 2006 IBM Corporation
3722 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
3723 * All rights reserved.
3726 * Redistribution and use in source and binary forms, with or without
3727 * modification, are permitted provided that the following conditions
3728 * are met:
3730 * 1. Redistributions of source code must retain the above copyright
3731 * notice, this list of conditions and the following disclaimer.
3733 * 2. Redistributions in binary form must reproduce the above
3734 * copyright notice, this list of conditions and the following
3735 * disclaimer in the documentation and/or other materials
3736 * provided with the distribution.
3738 * 3. Neither the name of the Linux Foundation nor the names of its
3739 * contributors may be used to endorse or promote products
3740 * derived from this software without specific prior written
3741 * permission.
3743 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
3744 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
3745 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3746 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3747 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
3748 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3749 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3750 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3751 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3752 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3753 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3754 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
3755 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3757 * This BSD License conforms to the Open Source Initiative "Simplified
3758 * BSD License" as published at:
3759 * http://www.opensource.org/licenses/bsd-license.php
3761 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
3762 * mark may be used in accordance with the Linux Foundation Trademark
3763 * Policy to indicate compliance with the IAccessible2 specification.
3765 ************************************************************************/
3773 /** @brief This interface gives access to a two-dimensional table.
3775 Typically all accessible objects that represent cells or cell-clusters of a table
3776 will be at the same time children of the table. In this case IAccessible2::indexInParent
3777 will return the child index which then can be used when calling IAccessibleTable::rowIndex
3778 and IAccessibleTable::columnIndex.
3780 However, in some cases that kind of implementation will not be possible. When
3781 the table cells are not direct children of a table, the object representing
3782 the cell can define a "table-cell-index" object attribute identifying the 0
3783 based table cell index. This object attribute is obtained by parsing the
3784 attribute string returned by IAccessible2::attributes. The "table-cell-index"
3785 attribute can be used just like a child index of the typical case. ATs should
3786 first test for the presence of the "table-cell-index" attribute and if it is not
3787 present then IAccessible2::indexInParent can be used as in the typical case
3788 where cells are direct children of the table.
3790 The range of valid coordinates for this interface are implementation dependent.
3791 However, that range includes at least the intervals from the from the first row
3792 or column with the index 0 up to the last (but not including) used row or column
3793 as returned by IAccessibleTable::nRows and IAccessibleTable::nColumns.
3795 Note that newer implementations are now using IAccessibleTable2 and IAccessibleTableCell
3796 rather than this interface.
3798 [object, uuid(35AD8070-C20C-4fb4-B094-F4F7275DD469)]
3799 interface IAccessibleTable : IUnknown
3802 /** @brief Returns the accessible object at the specified row and column in
3803 the table. This object could be an IAccessible or an IAccessible2.
3804 @param [in] row
3805 The 0 based row index for which to retrieve the cell.
3806 @param [in] column
3807 The 0 based column index for which to retrieve the cell.
3808 @param [out] accessible
3809 If both row and column index are valid then the corresponding accessible
3810 object is returned that represents the requested cell regardless of whether
3811 the cell is currently visible (on the screen).
3812 @retval S_OK
3813 @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
3815 [propget] HRESULT accessibleAt
3817 [in] long row,
3818 [in] long column,
3819 [out, retval] IUnknown **accessible
3822 /** @brief Returns the caption for the table. The returned object could be
3823 an IAccessible or an IAccessible2.
3824 @param [out] accessible
3825 If the table has a caption then a reference to it is returned, else a NULL
3826 pointer is returned.
3827 @retval S_OK
3828 @retval S_FALSE if there is nothing to return, [out] value is NULL
3830 [propget] HRESULT caption
3832 [out, retval] IUnknown **accessible
3835 /** @brief Translates the given row and column indexes into the corresponding cell index.
3836 @param [in] rowIndex
3837 0 based row index for the cell.
3838 @param [in] columnIndex
3839 0 based column index for the cell.
3840 @param [out] cellIndex
3841 Returns the 0 based index of the cell at the specified row and column indexes.
3842 @retval S_OK
3843 @retval E_INVALIDARG if bad [in] passed, [out] value is 0
3844 @note The returned value is not necessarily a child index of the immediate parent.
3845 In cases where the table cells are not direct children of the table the index
3846 is actually the cell index, i.e. conceptually it's an index into a one dimensional
3847 array of cells laid out in row order.
3849 [propget] HRESULT childIndex
3851 [in] long rowIndex,
3852 [in] long columnIndex,
3853 [out, retval] long *cellIndex
3856 /** @brief Returns the description text of the specified column in the table.
3857 @param [in] column
3858 The 0 based index of the column for which to retrieve the description.
3859 @param [out] description
3860 Returns the description text of the specified column in the table if such a
3861 description exists. Otherwise a NULL pointer is returned.
3862 @retval S_OK
3863 @retval S_FALSE if there is nothing to return, [out] value is NULL
3864 @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
3866 [propget] HRESULT columnDescription
3868 [in] long column,
3869 [out, retval] BSTR *description
3872 /** @brief Returns the number of columns occupied by the accessible object
3873 at the specified row and column in the table.
3875 The result is greater than 1 if the specified cell spans multiple columns.
3876 @param [in] row
3877 0 based row index of the accessible for which to return the column extent.
3878 @param [in] column
3879 0 based column index of the accessible for which to return the column extent.
3880 @param [out] nColumnsSpanned
3881 Returns the 1 based column extent of the specified cell.
3882 @retval S_OK
3883 @retval E_INVALIDARG if bad [in] passed, [out] value is 0
3885 [propget] HRESULT columnExtentAt
3887 [in] long row,
3888 [in] long column,
3889 [out, retval] long *nColumnsSpanned
3892 /** @brief Returns the column headers as an %IAccessibleTable object.
3894 Content and size of the returned table are implementation dependent.
3895 @param [out] accessibleTable
3896 The column header
3897 @param [out] startingRowIndex
3898 The 0 based row index where the header starts, usually 0.
3899 @retval S_OK
3900 @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
3902 [propget] HRESULT columnHeader
3904 [out] IAccessibleTable **accessibleTable,
3905 [out, retval] long *startingRowIndex
3908 /** @brief Translates the given cell index into the corresponding column index.
3909 @param [in] cellIndex
3910 0 based index of the cell in the parent or closest ancestor table. Typically this
3911 is the value returned from IAccessible2::indexInParent, but in the case where the
3912 table cells are not direct children of the table this is the cell index specified
3913 by the "table-cell-index" object attribute obtained from parsing the attributes
3914 string returned by calling IAccessible2::attributes on the cell object.
3915 @param [out] columnIndex
3916 Returns the 0 based column index of the cell of the specified child or the index of
3917 the first column if the child spans multiple columns.
3918 @retval S_OK
3919 @retval E_INVALIDARG if bad [in] passed, [out] value is 0
3921 [propget] HRESULT columnIndex
3923 [in] long cellIndex,
3924 [out, retval] long *columnIndex
3927 /** @brief Returns the total number of columns in table
3928 @param [out] columnCount
3929 Number of columns in table (including columns outside the current viewport)
3930 @retval S_OK
3932 [propget] HRESULT nColumns
3934 [out, retval] long *columnCount
3937 /** @brief Returns the total number of rows in table
3938 @param [out] rowCount
3939 Number of rows in table (including rows outside the current viewport)
3940 @retval S_OK
3942 [propget] HRESULT nRows
3944 [out, retval] long *rowCount
3947 /** @brief Returns the total number of selected cells
3948 @param [out] cellCount
3949 Number of cells currently selected
3950 @retval S_OK
3952 [propget] HRESULT nSelectedChildren
3954 [out, retval] long *cellCount
3957 /** @brief Returns the total number of selected columns
3958 @param [out] columnCount
3959 Number of columns currently selected
3960 @retval S_OK
3962 [propget] HRESULT nSelectedColumns
3964 [out, retval] long *columnCount
3967 /** @brief Returns the total number of selected rows
3968 @param [out] rowCount
3969 Number of rows currently selected
3970 @retval S_OK
3972 [propget] HRESULT nSelectedRows
3974 [out, retval] long *rowCount
3977 /** @brief Returns the description text of the specified row in the table.
3978 @param [in] row
3979 The 0 based index of the row for which to retrieve the description.
3980 @param [out] description
3981 Returns the description text of the specified row in the table if such a
3982 description exists. Otherwise a NULL pointer is returned.
3983 @retval S_OK
3984 @retval S_FALSE if there is nothing to return, [out] value is NULL
3985 @retval E_INVALIDARG if bad [in] passed, [out] value is NULL
3987 [propget] HRESULT rowDescription
3989 [in] long row,
3990 [out, retval] BSTR *description
3993 /** @brief Returns the number of rows occupied by the accessible object
3994 at the specified row and column in the table.
3996 The result is greater than 1 if the specified cell spans multiple rows.
3997 @param [in] row
3998 0 based row index of the accessible for which to return the row extent.
3999 @param [in] column
4000 0 based column index of the accessible for which to return the row extent.
4001 @param [out] nRowsSpanned
4002 Returns the row extent of the specified cell.
4003 @retval S_OK
4004 @retval E_INVALIDARG if bad [in] passed, [out] value is 0
4006 [propget] HRESULT rowExtentAt
4008 [in] long row,
4009 [in] long column,
4010 [out, retval] long *nRowsSpanned
4013 /** @brief Returns the row headers as an %IAccessibleTable object.
4015 Content and size of the returned table are implementation dependent.
4016 @param [out] accessibleTable
4017 The row header.
4018 @param [out] startingColumnIndex
4019 The 0 based column index where the header starts, usually 0.
4020 @retval S_OK
4021 @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
4023 [propget] HRESULT rowHeader
4025 [out] IAccessibleTable **accessibleTable,
4026 [out, retval] long *startingColumnIndex
4029 /** @brief Translates the given cell index into a row index.
4030 @param [in] cellIndex
4031 0 based index of the cell in the parent or closest ancestor table. Typically this
4032 is the value returned from IAccessible2::indexInParent, but in the case where the
4033 table cells are not direct children of the table this is the cell index specified
4034 by the "table-cell-index" object attribute obtained from parsing the attributes
4035 string returned by calling IAccessible2::attributes on the cell object.
4036 @param [out] rowIndex
4037 0 based row index
4038 @retval S_OK
4039 @retval E_INVALIDARG if bad [in] passed, [out] value is 0
4041 [propget] HRESULT rowIndex
4043 [in] long cellIndex,
4044 [out, retval] long *rowIndex
4047 /** @brief Returns a list of cell indexes currently selected (0 based).
4048 @param [in] maxChildren
4049 This parameter is ignored. Refer to @ref _arrayConsideration
4050 "Special Consideration when using Arrays" for more details.
4051 @param [out] children
4052 An array of cell indexes of selected cells (each index is 0 based),
4053 allocated by the server. The client must free it with CoTaskMemFree.
4054 @param [out] nChildren
4055 The number of cell indexes returned; the size of the returned array.
4056 @retval S_OK
4057 @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
4059 [propget] HRESULT selectedChildren
4061 [in] long maxChildren,
4062 [out, size_is(,maxChildren), length_is(,*nChildren)] long **children,
4063 [out, retval] long *nChildren
4066 /** @brief Returns a list of column indexes currently selected (0 based).
4067 @param [in] maxColumns
4068 This parameter is ignored. Refer to @ref _arrayConsideration
4069 "Special Consideration when using Arrays" for more details.
4070 @param [out] columns
4071 An array of column indexes of selected columns (each index is 0 based), allocated
4072 by the server. The client must free it with CoTaskMemFree.
4073 @param [out] nColumns
4074 The number of column indexes returned; the size of the returned array.
4075 @retval S_OK
4076 @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
4078 [propget] HRESULT selectedColumns
4080 [in] long maxColumns,
4081 [out, size_is(,maxColumns), length_is(,*nColumns)] long **columns,
4082 [out, retval] long *nColumns
4085 /** @brief Returns a list of row indexes currently selected (0 based).
4086 @param [in] maxRows
4087 This parameter is ignored. Refer to @ref _arrayConsideration
4088 "Special Consideration when using Arrays" for more details.
4089 @param [out] rows
4090 An array of row indexes of selected rows (each index is 0 based), allocated
4091 by the server. The client must free it with CoTaskMemFree.
4092 @param [out] nRows
4093 The number of row indexes returned; the size of the returned array.
4094 @retval S_OK
4095 @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
4097 [propget] HRESULT selectedRows
4099 [in] long maxRows,
4100 [out, size_is(,maxRows), length_is(,*nRows)] long **rows,
4101 [out, retval] long *nRows
4104 /** @brief Returns the summary description of the table. The returned object could be
4105 an IAccessible or an IAccessible2.
4106 @param [out] accessible
4107 Returns a reference to an implementation dependent accessible object
4108 representing the table's summary or a NULL pointer if the table
4109 does not support a summary.
4110 @retval S_OK
4111 @retval S_FALSE if there is nothing to return, [out] value is NULL
4113 [propget] HRESULT summary
4115 [out, retval] IUnknown **accessible
4118 /** @brief Returns a boolean value indicating whether the specified column is
4119 completely selected.
4120 @param [in] column
4121 0 based index of the column for which to determine whether it is selected.
4122 @param [out] isSelected
4123 Returns TRUE if the specified column is selected completely and FALSE otherwise.
4124 @retval S_OK
4125 @retval E_INVALIDARG if bad [in] passed, [out] value is FALSE
4127 [propget] HRESULT isColumnSelected
4129 [in] long column,
4130 [out, retval] boolean *isSelected
4133 /** @brief Returns a boolean value indicating whether the specified row is completely
4134 selected.
4135 @param [in] row
4136 0 based index of the row for which to determine whether it is selected.
4137 @param [out] isSelected
4138 Returns TRUE if the specified row is selected completely and FALSE otherwise.
4139 @retval S_OK
4140 @retval E_INVALIDARG if bad [in] passed, [out] value is FALSE
4142 [propget] HRESULT isRowSelected
4144 [in] long row,
4145 [out, retval] boolean *isSelected
4148 /** @brief Returns a boolean value indicating whether the specified cell is selected.
4149 @param [in] row
4150 0 based index of the row for the cell to determine whether it is selected.
4151 @param [in] column
4152 0 based index of the column for the cell to determine whether it is selected.
4153 @param [out] isSelected
4154 Returns TRUE if the specified cell is selected and FALSE otherwise.
4155 @retval S_OK
4156 @retval E_INVALIDARG if bad [in] passed, [out] value is FALSE
4158 [propget] HRESULT isSelected
4160 [in] long row,
4161 [in] long column,
4162 [out, retval] boolean *isSelected
4165 /** @brief Selects a row and unselects all previously selected rows.
4166 @param [in] row
4167 0 based index of the row to be selected.
4168 @retval S_OK
4169 @retval E_INVALIDARG if bad [in] passed
4171 HRESULT selectRow
4173 [in] long row
4176 /** @brief Selects a column and unselects all previously selected columns.
4177 @param [in] column
4178 0 based index of the column to be selected.
4179 @retval S_OK
4180 @retval E_INVALIDARG if bad [in] passed
4182 HRESULT selectColumn
4184 [in] long column
4187 /** @brief Unselects one row, leaving other selected rows selected (if any).
4188 @param [in] row
4189 0 based index of the row to be unselected.
4190 @retval S_OK
4191 @retval E_INVALIDARG if bad [in] passed
4193 HRESULT unselectRow
4195 [in] long row
4198 /** @brief Unselects one column, leaving other selected columns selected (if any).
4199 @param [in] column
4200 0 based index of the column to be unselected.
4201 @retval S_OK
4202 @retval E_INVALIDARG if bad [in] passed
4204 HRESULT unselectColumn
4206 [in] long column
4209 /** @brief Given a cell index, gets the row and column indexes and extents of a cell
4210 and whether or not it is selected.
4212 This is a convenience function. It is not mandatory to implement it.
4213 @param [in] index
4214 0 based index of this cell in the table.
4215 @param [out] row
4216 0 based row index.
4217 @param [out] column
4218 0 based column index.
4219 @param [out] rowExtents
4220 Number of cells spanned by this cell in this row.
4221 @param [out] columnExtents
4222 Number of cells spanned by this cell in this column.
4223 @param [out] isSelected
4224 Indicates if the specified cell is selected.
4225 @retval S_OK
4226 @retval E_INVALIDARG if bad [in] passed, [out] values are 0s and FALSE respectively
4228 [propget] HRESULT rowColumnExtentsAtIndex
4230 [in] long index,
4231 [out] long *row,
4232 [out] long *column,
4233 [out] long *rowExtents,
4234 [out] long *columnExtents,
4235 [out, retval] boolean *isSelected
4238 /** @brief Returns the type and extents describing how a table changed.
4240 Provided for use by the IA2_EVENT_TABLE_MODEL_CHANGED event handler.
4242 This data is only guaranteed to be valid while the thread notifying the event
4243 continues. Once the handler has returned, the validity of the data depends on
4244 how the server manages the life cycle of its objects. Also, note that the server
4245 may have different life cycle management strategies for controls depending on
4246 whether or not a control manages its children. Lists, trees, and tables can have
4247 a large number of children and thus it's possible that the child objects for those
4248 controls would only be created as needed. Servers should document their life cycle
4249 strategy as this will be of interest to assistive technology or script engines
4250 accessing data out of process or from other threads. Servers only need to save the
4251 most recent row and column values associated with the change and a scope of the
4252 entire application is adequate.
4254 @param [out] modelChange
4255 A struct of (type(insert, delete, update), firstRow, lastRow, firstColumn, lastColumn).
4256 @retval S_OK
4257 @retval S_FALSE if there is nothing to return, [out] value is NULL
4259 [propget] HRESULT modelChange
4261 [out, retval] IA2TableModelChange *modelChange
4265 /*************************************************************************
4267 * File Name (AccessibleTable2.idl)
4269 * IAccessible2 IDL Specification
4271 * Copyright (c) 2007, 2012 Linux Foundation
4272 * Copyright (c) 2006 IBM Corporation
4273 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
4274 * All rights reserved.
4277 * Redistribution and use in source and binary forms, with or without
4278 * modification, are permitted provided that the following conditions
4279 * are met:
4281 * 1. Redistributions of source code must retain the above copyright
4282 * notice, this list of conditions and the following disclaimer.
4284 * 2. Redistributions in binary form must reproduce the above
4285 * copyright notice, this list of conditions and the following
4286 * disclaimer in the documentation and/or other materials
4287 * provided with the distribution.
4289 * 3. Neither the name of the Linux Foundation nor the names of its
4290 * contributors may be used to endorse or promote products
4291 * derived from this software without specific prior written
4292 * permission.
4294 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
4295 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4296 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
4297 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4298 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
4299 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4300 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4301 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4302 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4303 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
4304 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
4305 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
4306 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4308 * This BSD License conforms to the Open Source Initiative "Simplified
4309 * BSD License" as published at:
4310 * http://www.opensource.org/licenses/bsd-license.php
4312 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
4313 * mark may be used in accordance with the Linux Foundation Trademark
4314 * Policy to indicate compliance with the IAccessible2 specification.
4316 ************************************************************************/
4324 /** @brief This interface gives access to a two-dimensional table.
4326 Please also refer to the IAccessibleTableCell interface.
4328 If you want to support older applications you should also support the
4329 IAccessibleTable inteface.
4331 [object, uuid(6167f295-06f0-4cdd-a1fa-02e25153d869)]
4332 interface IAccessibleTable2 : IUnknown
4335 /** @brief Returns the accessible object at the specified row and column in
4336 the table. This object could be an IAccessible or an IAccessible2.
4337 @param [in] row
4338 The 0 based row index for which to retrieve the cell.
4339 @param [in] column
4340 The 0 based column index for which to retrieve the cell.
4341 @param [out] cell
4342 If both row and column index are valid then the corresponding accessible
4343 object is returned that represents the requested cell regardless of whether
4344 the cell is currently visible (on the screen).
4345 @retval S_OK
4346 @retval E_INVALIDARG if bad [in] passed
4348 [propget] HRESULT cellAt
4350 [in] long row,
4351 [in] long column,
4352 [out, retval] IUnknown **cell
4355 /** @brief Returns the caption for the table. The returned object could be
4356 an IAccessible or an IAccessible2.
4357 @param [out] accessible
4358 If the table has a caption then a reference to it is returned, else a NULL
4359 pointer is returned.
4360 @retval S_OK
4361 @retval S_FALSE if there is nothing to return, [out] value is NULL
4362 @deprecated use a describedBy relation
4364 [propget] HRESULT caption
4366 [out, retval] IUnknown **accessible
4369 /** @brief Returns the description text of the specified column in the table.
4370 @param [in] column
4371 The 0 based index of the column for which to retrieve the description.
4372 @param [out] description
4373 Returns the description text of the specified column in the table if such a
4374 description exists. Otherwise a NULL pointer is returned.
4375 @retval S_OK
4376 @retval S_FALSE if there is nothing to return, [out] value is NULL
4377 @retval E_INVALIDARG if bad [in] passed
4379 [propget] HRESULT columnDescription
4381 [in] long column,
4382 [out, retval] BSTR *description
4386 /** @brief Returns the total number of columns in table
4387 @param [out] columnCount
4388 Number of columns in table (including columns outside the current viewport)
4389 @retval S_OK
4391 [propget] HRESULT nColumns
4393 [out, retval] long *columnCount
4396 /** @brief Returns the total number of rows in table
4397 @param [out] rowCount
4398 Number of rows in table (including rows outside the current viewport)
4399 @retval S_OK
4401 [propget] HRESULT nRows
4403 [out, retval] long *rowCount
4406 /** @brief Returns the total number of selected cells
4407 @param [out] cellCount
4408 Number of cells currently selected
4409 @retval S_OK
4411 [propget] HRESULT nSelectedCells
4413 [out, retval] long *cellCount
4416 /** @brief Returns the total number of selected columns
4417 @param [out] columnCount
4418 Number of columns currently selected
4419 @retval S_OK
4421 [propget] HRESULT nSelectedColumns
4423 [out, retval] long *columnCount
4426 /** @brief Returns the total number of selected rows
4427 @param [out] rowCount
4428 Number of rows currently selected
4429 @retval S_OK
4431 [propget] HRESULT nSelectedRows
4433 [out, retval] long *rowCount
4436 /** @brief Returns the description text of the specified row in the table.
4437 @param [in] row
4438 The 0 based index of the row for which to retrieve the description.
4439 @param [out] description
4440 Returns the description text of the specified row in the table if such a
4441 description exists. Otherwise a NULL pointer is returned.
4442 @retval S_OK
4443 @retval S_FALSE if there is nothing to return, [out] value is NULL
4444 @retval E_INVALIDARG if bad [in] passed
4446 [propget] HRESULT rowDescription
4448 [in] long row,
4449 [out, retval] BSTR *description
4452 /** @brief Returns a list of accessibles currently selected.
4453 @param [out] cells
4454 Pointer to an array of references to selected accessibles. The array is
4455 allocated by the server with CoTaskMemAlloc and freed by the client with
4456 CoTaskMemFree.
4457 @param [out] nSelectedCells
4458 The number of accessibles returned; the size of the returned array.
4459 @retval S_OK
4460 @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
4462 [propget] HRESULT selectedCells
4464 [out, size_is(,*nSelectedCells)] IUnknown ***cells,
4465 [out, retval] long *nSelectedCells
4468 /** @brief Returns a list of column indexes currently selected (0 based).
4469 @param [out] selectedColumns
4470 A pointer to an array of column indexes of selected columns (each index is
4471 0 based). The array is allocated by the server with CoTaskMemAlloc and
4472 freed by the client with CoTaskMemFree.
4473 @param [out] nColumns
4474 The number of column indexes returned; the size of the returned array.
4475 @retval S_OK
4476 @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
4478 [propget] HRESULT selectedColumns
4480 [out, size_is(,*nColumns)] long **selectedColumns,
4481 [out, retval] long *nColumns
4484 /** @brief Returns a list of row indexes currently selected (0 based).
4485 @param [out] selectedRows
4486 An array of row indexes of selected rows (each index is 0 based). The array
4487 is allocated by the server with CoTaskMemAlloc and freed by the client with
4488 CoTaskMemFree.
4489 @param [out] nRows
4490 The number of row indexes returned; the size of the returned array.
4491 @retval S_OK
4492 @retval S_FALSE if there are none, [out] values are NULL and 0 respectively
4494 [propget] HRESULT selectedRows
4496 [out, size_is(,*nRows)] long **selectedRows,
4497 [out, retval] long *nRows
4500 /** @brief Returns the summary description of the table. The returned object could be
4501 an IAccessible or an IAccessible2.
4502 @param [out] accessible
4503 Returns a reference to an implementation dependent accessible object
4504 representing the table's summary or a NULL pointer if the table
4505 does not support a summary.
4506 @retval S_OK
4507 @retval S_FALSE if there is nothing to return, [out] value is NULL
4508 @deprecated Use the labeledBy relation
4510 [propget] HRESULT summary
4512 [out, retval] IUnknown **accessible
4515 /** @brief Returns a boolean value indicating whether the specified column is
4516 completely selected.
4517 @param [in] column
4518 0 based index of the column for which to determine whether it is selected.
4519 @param [out] isSelected
4520 Returns TRUE if the specified column is selected completely and FALSE otherwise.
4521 @retval S_OK
4522 @retval E_INVALIDARG if bad [in] passed
4524 [propget] HRESULT isColumnSelected
4526 [in] long column,
4527 [out, retval] boolean *isSelected
4530 /** @brief Returns a boolean value indicating whether the specified row is completely
4531 selected.
4532 @param [in] row
4533 0 based index of the row for which to determine whether it is selected.
4534 @param [out] isSelected
4535 Returns TRUE if the specified row is selected completely and FALSE otherwise.
4536 @retval S_OK
4537 @retval E_INVALIDARG if bad [in] passed
4539 [propget] HRESULT isRowSelected
4541 [in] long row,
4542 [out, retval] boolean *isSelected
4545 /** @brief Selects a row and unselects all previously selected rows.
4547 The behavior should mimic that of the application, but for those applications
4548 which do not have a means in the GUI to select a full row of cells the behavior
4549 should be as follows: First any selected rows in the table are unselected. Then
4550 the entire row of cells for the specified row is selected. If any of the
4551 cells in the selected row span additional rows, the cells in those rows
4552 are also selected.
4553 @param [in] row
4554 0 based index of the row to be selected.
4555 @retval S_OK
4556 @retval E_INVALIDARG if bad [in] passed
4558 HRESULT selectRow
4560 [in] long row
4563 /** @brief Selects a column and unselects all previously selected columns.
4565 The behavior should mimic that of the application, but for those applications
4566 which do not have a means in the GUI to select a full column of cells the behavior
4567 should be as follows: First any selected columns in the table are unselected. Then
4568 the entire column of cells for the specified column is selected. If any of the
4569 cells in the selected column span additional columns, the cells in those columns
4570 are also selected.
4571 @param [in] column
4572 0 based index of the column to be selected.
4573 @retval S_OK
4574 @retval E_INVALIDARG if bad [in] passed
4576 HRESULT selectColumn
4578 [in] long column
4581 /** @brief Unselects one row, leaving other selected rows selected (if any).
4583 The behavior should mimic that of the application, but for those applications
4584 which do not have a means in the GUI to unselect a full row of cells the
4585 behavior should be as follows: The entire row of cells for the specified
4586 row is unselected. If any of the cells in the selected row span additional
4587 rows, the cells in those rows are also unselected.
4588 @param [in] row
4589 0 based index of the row to be unselected.
4590 @retval S_OK
4591 @retval E_INVALIDARG if bad [in] passed
4593 HRESULT unselectRow
4595 [in] long row
4598 /** @brief Unselects one column, leaving other selected columns selected (if any).
4600 The behavior should mimic that of the application, but for those applications
4601 which do not have a means in the GUI to unselect a full column of cells the
4602 behavior should be as follows: The entire column of cells for the specified
4603 column is unselected. If any of the cells in the selected column span additional
4604 columns, the cells in those columns are also unselected.
4605 @param [in] column
4606 0 based index of the column to be unselected.
4607 @retval S_OK
4608 @retval E_INVALIDARG if bad [in] passed
4610 HRESULT unselectColumn
4612 [in] long column
4615 /** @brief Returns the type and extents describing how a table changed.
4617 Provided for use by the IA2_EVENT_TABLE_MODEL_CHANGED event handler.
4619 This data is only guaranteed to be valid while the thread notifying the event
4620 continues. Once the handler has returned, the validity of the data depends on
4621 how the server manages the life cycle of its objects. Also, note that the server
4622 may have different life cycle management strategies for controls depending on
4623 whether or not a control manages its children. Lists, trees, and tables can have
4624 a large number of children and thus it's possible that the child objects for those
4625 controls would only be created as needed. Servers should document their life cycle
4626 strategy as this will be of interest to assistive technology or script engines
4627 accessing data out of process or from other threads. Servers only need to save the
4628 most recent row and column values associated with the change and a scope of the
4629 entire application is adequate.
4631 @param [out] modelChange
4632 A struct of (type(insert, delete, update), firstRow, lastRow, firstColumn, lastColumn).
4633 @retval S_OK
4634 @retval S_FALSE if there is nothing to return, [out] value is NULL
4636 [propget] HRESULT modelChange
4638 [out, retval] IA2TableModelChange *modelChange
4642 /*************************************************************************
4644 * File Name (AccessibleTableCell.idl)
4646 * IAccessible2 IDL Specification
4648 * Copyright (c) 2007, 2013 Linux Foundation
4649 * Copyright (c) 2006 IBM Corporation
4650 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
4651 * All rights reserved.
4654 * Redistribution and use in source and binary forms, with or without
4655 * modification, are permitted provided that the following conditions
4656 * are met:
4658 * 1. Redistributions of source code must retain the above copyright
4659 * notice, this list of conditions and the following disclaimer.
4661 * 2. Redistributions in binary form must reproduce the above
4662 * copyright notice, this list of conditions and the following
4663 * disclaimer in the documentation and/or other materials
4664 * provided with the distribution.
4666 * 3. Neither the name of the Linux Foundation nor the names of its
4667 * contributors may be used to endorse or promote products
4668 * derived from this software without specific prior written
4669 * permission.
4671 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
4672 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4673 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
4674 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4675 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
4676 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4677 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4678 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4679 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4680 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
4681 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
4682 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
4683 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4685 * This BSD License conforms to the Open Source Initiative "Simplified
4686 * BSD License" as published at:
4687 * http://www.opensource.org/licenses/bsd-license.php
4689 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
4690 * mark may be used in accordance with the Linux Foundation Trademark
4691 * Policy to indicate compliance with the IAccessible2 specification.
4693 ************************************************************************/
4700 /** @brief This interface gives access to the cells of a two-dimensional table.
4702 Please also refer to the IAccessibleTable2 interface.
4705 [object, uuid(594116B1-C99F-4847-AD06-0A7A86ECE645)]
4706 interface IAccessibleTableCell : IUnknown
4709 /** @brief Returns the number of columns occupied by this cell accessible.
4711 The result is greater than 1 if the specified cell spans multiple columns.
4712 @param [out] nColumnsSpanned
4713 Returns the 1 based column extent of the specified cell.
4714 @retval S_OK
4716 [propget] HRESULT columnExtent
4718 [out, retval] long *nColumnsSpanned
4721 /** @brief Returns the column headers as an array of cell accessibles.
4723 @param [out] cellAccessibles
4724 Pointer to an array of references to cell accessibles. The array is allocated
4725 by the server. The client must free it with CoTaskMemFree.
4726 @param [out] nColumnHeaderCells
4727 The number of accessibles returned; the size of the returned array.
4728 @retval S_OK
4729 @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
4731 [propget] HRESULT columnHeaderCells
4733 [out, size_is(,*nColumnHeaderCells)] IUnknown ***cellAccessibles,
4734 [out, retval] long *nColumnHeaderCells
4737 /** @brief Translates this cell accessible into the corresponding column index.
4739 @param [out] columnIndex
4740 Returns the 0 based column index of the cell of the specified cell or the index of
4741 the first column if the cell spans multiple columns.
4742 @retval S_OK
4744 [propget] HRESULT columnIndex
4746 [out, retval] long *columnIndex
4749 /** @brief Returns the number of rows occupied by this cell accessible.
4751 @param [out] nRowsSpanned
4752 Returns the row extent of the specified cell.
4753 @retval S_OK
4755 [propget] HRESULT rowExtent
4757 [out, retval] long *nRowsSpanned
4760 /** @brief Returns the row headers as an array of cell accessibles.
4762 @param [out] cellAccessibles
4763 Pointer to an array of references to cell accessibles. The array is allocated
4764 by the server. The client must free it with CoTaskMemFree.
4765 @param [out] nRowHeaderCells
4766 The number of accessibles returned; the size of the returned array.
4767 @retval S_OK
4768 @retval S_FALSE if there is no header, [out] values are NULL and 0 respectively
4770 [propget] HRESULT rowHeaderCells
4772 [out, size_is(,*nRowHeaderCells)] IUnknown ***cellAccessibles,
4773 [out, retval] long *nRowHeaderCells
4776 /** @brief Translates this cell accessible into the corresponding row index.
4778 @param [out] rowIndex
4779 Returns the 0 based row index of the specified cell or the index of
4780 the first row if the cell spans multiple rows.
4781 @retval S_OK
4783 [propget] HRESULT rowIndex
4785 [out, retval] long *rowIndex
4788 /** @brief Returns a boolean value indicating whether this cell is selected.
4790 @param [out] isSelected
4791 Returns TRUE if the specified cell is selected and FALSE otherwise.
4792 @retval S_OK
4794 [propget] HRESULT isSelected
4796 [out, retval] boolean *isSelected
4799 /** @brief Gets the row and column indexes and extents of this cell accessible
4800 and whether or not it is selected.
4802 This is a convenience function. It is not mandatory to implement it.
4803 @param [out] row
4804 0 based row index.
4805 @param [out] column
4806 0 based column index.
4807 @param [out] rowExtents
4808 Number of cells spanned by this cell in this row.
4809 @param [out] columnExtents
4810 Number of cells spanned by this cell in this column.
4811 @param [out] isSelected
4812 Indicates if the specified cell is selected.
4813 @retval S_OK
4815 [propget] HRESULT rowColumnExtents
4817 [out] long *row,
4818 [out] long *column,
4819 [out] long *rowExtents,
4820 [out] long *columnExtents,
4821 [out, retval] boolean *isSelected
4824 /** @brief Returns a reference to the accessbile of the containing table.
4826 @param [out] table
4827 Returns a reference to the IUnknown of the containing table.
4828 @retval S_OK
4830 [propget] HRESULT table
4832 [out, retval] IUnknown **table
4836 /*************************************************************************
4838 * File Name (AccessibleImage.idl)
4840 * IAccessible2 IDL Specification
4842 * Copyright (c) 2007, 2010 Linux Foundation
4843 * Copyright (c) 2006 IBM Corporation
4844 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
4845 * All rights reserved.
4848 * Redistribution and use in source and binary forms, with or without
4849 * modification, are permitted provided that the following conditions
4850 * are met:
4852 * 1. Redistributions of source code must retain the above copyright
4853 * notice, this list of conditions and the following disclaimer.
4855 * 2. Redistributions in binary form must reproduce the above
4856 * copyright notice, this list of conditions and the following
4857 * disclaimer in the documentation and/or other materials
4858 * provided with the distribution.
4860 * 3. Neither the name of the Linux Foundation nor the names of its
4861 * contributors may be used to endorse or promote products
4862 * derived from this software without specific prior written
4863 * permission.
4865 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
4866 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4867 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
4868 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4869 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
4870 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4871 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4872 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4873 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4874 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
4875 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
4876 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
4877 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4879 * This BSD License conforms to the Open Source Initiative "Simplified
4880 * BSD License" as published at:
4881 * http://www.opensource.org/licenses/bsd-license.php
4883 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
4884 * mark may be used in accordance with the Linux Foundation Trademark
4885 * Policy to indicate compliance with the IAccessible2 specification.
4887 ************************************************************************/
4894 /** @brief This interface represents images and icons.
4896 This interface is used for a representation of images like icons on buttons.
4897 %IAccessibleImage only needs to be implemented in certain situations. Some
4898 examples are:
4899 <ol>
4900 <li>The accessible name and description are not enough to fully
4901 describe the image, e.g. when the accessible description is used to define the
4902 behavior of an actionable image and the image itself conveys semantically
4903 significant information.
4904 <li>The user can edit the content that includes an
4905 image and therefore the user needs to be able to review the image's position.
4906 </ol>
4908 [object, uuid(FE5ABB3D-615E-4f7b-909F-5F0EDA9E8DDE)]
4909 interface IAccessibleImage : IUnknown
4911 /** @brief Returns the localized description of the image.
4912 @param [out] description
4913 @retval S_OK
4914 @retval S_FALSE if there is nothing to return, [out] value is NULL
4916 [propget] HRESULT description
4918 [out, retval] BSTR *description
4921 /** @brief Returns the coordinates of the image.
4922 @param [in] coordinateType
4923 Specifies whether the returned coordinates should be relative to the screen or the parent object.
4924 @param [out] x
4925 @param [out] y
4926 @retval S_OK
4928 [propget] HRESULT imagePosition
4930 [in] enum IA2CoordinateType coordinateType,
4931 [out] long *x,
4932 [out, retval] long *y
4935 /** @brief Returns the size of the image in units specified by parent's coordinate system.
4936 @param [out] height
4937 @param [out] width
4938 @retval S_OK
4941 [propget] HRESULT imageSize
4943 [out] long *height,
4944 [out, retval] long *width
4947 /*************************************************************************
4949 * File Name (AccessibleEventID.idl)
4951 * IAccessible2 IDL Specification
4953 * Copyright (c) 2007, 2010 Linux Foundation
4954 * Copyright (c) 2006 IBM Corporation
4955 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
4956 * All rights reserved.
4959 * Redistribution and use in source and binary forms, with or without
4960 * modification, are permitted provided that the following conditions
4961 * are met:
4963 * 1. Redistributions of source code must retain the above copyright
4964 * notice, this list of conditions and the following disclaimer.
4966 * 2. Redistributions in binary form must reproduce the above
4967 * copyright notice, this list of conditions and the following
4968 * disclaimer in the documentation and/or other materials
4969 * provided with the distribution.
4971 * 3. Neither the name of the Linux Foundation nor the names of its
4972 * contributors may be used to endorse or promote products
4973 * derived from this software without specific prior written
4974 * permission.
4976 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
4977 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
4978 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
4979 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4980 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
4981 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4982 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4983 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4984 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4985 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
4986 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
4987 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
4988 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4990 * This BSD License conforms to the Open Source Initiative "Simplified
4991 * BSD License" as published at:
4992 * http://www.opensource.org/licenses/bsd-license.php
4994 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
4995 * mark may be used in accordance with the Linux Foundation Trademark
4996 * Policy to indicate compliance with the IAccessible2 specification.
4998 ************************************************************************/
5000 /** %IAccessible2 specific event constants
5002 This enum defines the event IDs fired by %IAccessible2 objects. The event IDs
5003 are in addition to those used by MSAA.
5005 enum IA2EventID {
5007 /** The change of the number or attributes of actions of an accessible
5008 object is signaled by events of this type.
5010 IA2_EVENT_ACTION_CHANGED = 0x101,
5012 /** <b>Deprecated.</b> The active descendant of a component has changed.
5014 Note: This event constant is misspelled and thus is deprecated and will be
5015 removed in a later version. Please use the correctly spelled version which
5016 follows.
5018 IA2_EVENT_ACTIVE_DECENDENT_CHANGED,
5020 /** The active descendant of a component has changed. The active descendant
5021 is used in objects with transient children.
5023 Note: Due to the fact that MSAA's WinEvents don't allow the active child index
5024 to be passed on the IA2_EVENT_ACTIVE_DESCENDANT_CHANGED event the manages
5025 descendants scheme can't be used. Instead the active child object has to fire
5026 MSAA's EVENT_OBJECT_FOCUS. In a future release a new event mechanism may be
5027 added to provide for event specific data to be passed with the event. At that
5028 time the IA2_EVENT_ACTIVE_DECENDENT_CHANGED event and
5029 IA2_STATE_MANAGES_DESCENDANTS state would be useful.
5031 IA2_EVENT_ACTIVE_DESCENDANT_CHANGED = IA2_EVENT_ACTIVE_DECENDENT_CHANGED,
5033 /** The document wide attributes of the document object have changed.
5035 IA2_EVENT_DOCUMENT_ATTRIBUTE_CHANGED,
5037 /** The contents of the document have changed.
5039 IA2_EVENT_DOCUMENT_CONTENT_CHANGED,
5041 /** The loading of the document has completed.
5043 IA2_EVENT_DOCUMENT_LOAD_COMPLETE,
5045 /** The loading of the document was interrupted.
5047 IA2_EVENT_DOCUMENT_LOAD_STOPPED,
5049 /** The document contents are being reloaded.
5051 IA2_EVENT_DOCUMENT_RELOAD,
5053 /** The ending index of this link within the containing string has changed.
5055 IA2_EVENT_HYPERLINK_END_INDEX_CHANGED,
5057 /** The number of anchors associated with this hyperlink object has changed.
5059 IA2_EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED,
5061 /** The hyperlink selected state changed from selected to unselected or
5062 from unselected to selected.
5064 IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED,
5066 /** One of the links associated with the hypertext object has been activated.
5068 IA2_EVENT_HYPERTEXT_LINK_ACTIVATED,
5070 /** One of the links associated with the hypertext object has been selected.
5072 IA2_EVENT_HYPERTEXT_LINK_SELECTED,
5074 /** The starting index of this link within the containing string has changed.
5076 IA2_EVENT_HYPERLINK_START_INDEX_CHANGED,
5078 /** Focus has changed from one hypertext object to another, or focus moved
5079 from a non-hypertext object to a hypertext object, or focus moved from a
5080 hypertext object to a non-hypertext object.
5082 IA2_EVENT_HYPERTEXT_CHANGED,
5084 /** The number of hyperlinks associated with a hypertext object changed
5086 IA2_EVENT_HYPERTEXT_NLINKS_CHANGED,
5088 /** An object's attributes changed.
5089 Also see ::IA2_EVENT_TEXT_ATTRIBUTE_CHANGED.
5091 IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED,
5093 /** A slide changed in a presentation document or a page boundary was
5094 crossed in a word processing document.
5096 IA2_EVENT_PAGE_CHANGED,
5098 /** The caret moved from one section to the next.
5100 IA2_EVENT_SECTION_CHANGED,
5102 /** A table caption changed.
5104 IA2_EVENT_TABLE_CAPTION_CHANGED,
5106 /** A table's column description changed.
5108 IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED,
5110 /** A table's column header changed.
5112 IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED,
5114 /** A table's data changed.
5116 IA2_EVENT_TABLE_MODEL_CHANGED,
5118 /** A table's row description changed.
5120 IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED,
5122 /** A table's row header changed.
5124 IA2_EVENT_TABLE_ROW_HEADER_CHANGED,
5126 /** A table's summary changed.
5128 IA2_EVENT_TABLE_SUMMARY_CHANGED,
5130 /** A text object's attributes changed.
5131 Also see ::IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED.
5133 IA2_EVENT_TEXT_ATTRIBUTE_CHANGED,
5135 /** The caret has moved to a new position.
5137 IA2_EVENT_TEXT_CARET_MOVED,
5139 /** <b>Deprecated.</b> This event is equivalent to ::IA2_EVENT_TEXT_UPDATED.
5141 IA2_EVENT_TEXT_CHANGED,
5143 /** The caret moved from one column to the next.
5145 IA2_EVENT_TEXT_COLUMN_CHANGED,
5147 /** Text was inserted.
5149 IA2_EVENT_TEXT_INSERTED,
5151 /** Text was removed.
5153 IA2_EVENT_TEXT_REMOVED,
5155 /** This event indicates general text changes, i.e. changes to text that are
5156 exposed through the IAccessibleText interface. For compatibility with ATK/AT-SPI
5157 which does not have an equivalent event, servers can alternatively fire
5158 ::IA2_EVENT_TEXT_REMOVED and ::IA2_EVENT_TEXT_INSERTED.
5160 IA2_EVENT_TEXT_UPDATED,
5162 /** The text selection changed. Later versions of Microsoft development environments
5163 have an equivalent event identified, EVENT_OBJECT_TEXTSELECTIONCHANGED. Servers
5164 should use that if it is available and use IA2_EVENT_TEXT_SELECTION_CHANGED otherwise.
5165 Clients should be prepared to respond to either event.
5168 IA2_EVENT_TEXT_SELECTION_CHANGED,
5170 /** A visible data event indicates the change of the visual appearance
5171 of an accessible object. This includes for example most of the
5172 attributes available via the IAccessibleComponent interface.
5174 IA2_EVENT_VISIBLE_DATA_CHANGED
5177 /*************************************************************************
5179 * File Name (AccessibleApplication.idl)
5181 * IAccessible2 IDL Specification
5183 * Copyright (c) 2007, 2010 Linux Foundation
5184 * Copyright (c) 2006 IBM Corporation
5185 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
5186 * All rights reserved.
5189 * Redistribution and use in source and binary forms, with or without
5190 * modification, are permitted provided that the following conditions
5191 * are met:
5193 * 1. Redistributions of source code must retain the above copyright
5194 * notice, this list of conditions and the following disclaimer.
5196 * 2. Redistributions in binary form must reproduce the above
5197 * copyright notice, this list of conditions and the following
5198 * disclaimer in the documentation and/or other materials
5199 * provided with the distribution.
5201 * 3. Neither the name of the Linux Foundation nor the names of its
5202 * contributors may be used to endorse or promote products
5203 * derived from this software without specific prior written
5204 * permission.
5206 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
5207 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
5208 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5209 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5210 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
5211 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5212 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
5213 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5214 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5215 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
5216 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
5217 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
5218 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5220 * This BSD License conforms to the Open Source Initiative "Simplified
5221 * BSD License" as published at:
5222 * http://www.opensource.org/licenses/bsd-license.php
5224 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
5225 * mark may be used in accordance with the Linux Foundation Trademark
5226 * Policy to indicate compliance with the IAccessible2 specification.
5228 ************************************************************************/
5235 /** @brief This interface gives access to the application's name and version information.
5237 This interface provides the AT with the information it needs to differentiate
5238 this application from other applications, from other versions of this
5239 application, or from other versions of this application running on different
5240 versions of an accessibility bridge or accessibility toolkit.
5242 Servers implementing IAccessible2 should provide access to the %IAccessibleApplication
5243 interface via QueryService from any object so that ATs can easily determine specific
5244 information about the application such as its name or version.
5246 [object, uuid(D49DED83-5B25-43F4-9B95-93B44595979E)]
5247 interface IAccessibleApplication : IUnknown
5250 /** @brief Returns the application name.
5251 @param [out] name
5252 @retval S_OK
5253 @retval S_FALSE if there is nothing to return, [out] value is NULL
5255 [propget] HRESULT appName
5257 [out, retval] BSTR *name
5260 /** @brief Returns the application version.
5261 @param [out] version
5262 The version string must not contain levels when it is know beforehand that
5263 this information will never require a change in a client's behavior.
5264 For example, use "3.6.0" rather than "3.6.0.v201005131500".
5265 @retval S_OK
5266 @retval S_FALSE if there is nothing to return, [out] value is NULL
5268 [propget] HRESULT appVersion
5270 [out, retval] BSTR *version
5273 /** @brief Returns the toolkit/bridge name.
5274 @param [out] name
5275 @retval S_OK
5276 @retval S_FALSE if there is nothing to return, [out] value is NULL
5278 [propget] HRESULT toolkitName
5280 [out, retval] BSTR *name
5283 /** @brief Returns the toolkit/bridge version.
5284 @param [out] version
5285 The version string must not contain levels when it is know beforehand that
5286 this information will never require a change in a client's behavior.
5287 For example, use "3.6.0" rather than "3.6.0.v201005131500".
5288 @retval S_OK
5289 @retval S_FALSE if there is nothing to return, [out] value is NULL
5291 [propget] HRESULT toolkitVersion
5293 [out, retval] BSTR *version
5298 /*************************************************************************
5300 * File Name (AccessibleDocument.idl)
5302 * IAccessible2 IDL Specification
5304 * Copyright (c) 2013 Linux Foundation
5305 * All rights reserved.
5308 * Redistribution and use in source and binary forms, with or without
5309 * modification, are permitted provided that the following conditions
5310 * are met:
5312 * 1. Redistributions of source code must retain the above copyright
5313 * notice, this list of conditions and the following disclaimer.
5315 * 2. Redistributions in binary form must reproduce the above
5316 * copyright notice, this list of conditions and the following
5317 * disclaimer in the documentation and/or other materials
5318 * provided with the distribution.
5320 * 3. Neither the name of the Linux Foundation nor the names of its
5321 * contributors may be used to endorse or promote products
5322 * derived from this software without specific prior written
5323 * permission.
5325 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
5326 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
5327 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5328 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5329 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
5330 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5331 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
5332 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5333 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5334 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
5335 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
5336 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
5337 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5339 * This BSD License conforms to the Open Source Initiative "Simplified
5340 * BSD License" as published at:
5341 * http://www.opensource.org/licenses/bsd-license.php
5343 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
5344 * mark may be used in accordance with the Linux Foundation Trademark
5345 * Policy to indicate compliance with the IAccessible2 specification.
5347 ************************************************************************/
5353 /** @brief This interface represents documents.
5355 This interface is used for a representation of documents.
5357 [object, uuid(C48C7FCF-4AB5-4056-AFA6-902D6E1D1149)]
5358 interface IAccessibleDocument : IUnknown
5360 /** @brief Returns the most recently used anchor target within a document.
5362 A document's most recently targeted in-page anchor is returned. A typical use
5363 of this method is to fetch the anchor target within an HTML document. In this
5364 case anchor targets are those which have been defined with the &lt;a&gt; tag.
5366 @param [out] accessible
5367 @retval S_OK
5368 @retval S_FALSE if there are no existing valid anchor targets, [out] value is NULL.
5370 [propget] HRESULT anchorTarget
5372 [out, retval] IUnknown **accessible
5376 /*************************************************************************
5378 * File Name (IA2TypeLibrary.idl)
5380 * IAccessible2 IDL Specification
5382 * Copyright (c) 2007, 2012 Linux Foundation
5383 * Copyright (c) 2006 IBM Corporation
5384 * Copyright (c) 2000, 2006 Sun Microsystems, Inc.
5385 * All rights reserved.
5388 * Redistribution and use in source and binary forms, with or without
5389 * modification, are permitted provided that the following conditions
5390 * are met:
5392 * 1. Redistributions of source code must retain the above copyright
5393 * notice, this list of conditions and the following disclaimer.
5395 * 2. Redistributions in binary form must reproduce the above
5396 * copyright notice, this list of conditions and the following
5397 * disclaimer in the documentation and/or other materials
5398 * provided with the distribution.
5400 * 3. Neither the name of the Linux Foundation nor the names of its
5401 * contributors may be used to endorse or promote products
5402 * derived from this software without specific prior written
5403 * permission.
5405 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
5406 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
5407 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5408 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5409 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
5410 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5411 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
5412 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5413 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5414 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
5415 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
5416 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
5417 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5419 * This BSD License conforms to the Open Source Initiative "Simplified
5420 * BSD License" as published at:
5421 * http://www.opensource.org/licenses/bsd-license.php
5423 * IAccessible2 is a trademark of the Linux Foundation. The IAccessible2
5424 * mark may be used in accordance with the Linux Foundation Trademark
5425 * Policy to indicate compliance with the IAccessible2 specification.
5427 ************************************************************************/
5429 // This is not a standalone file. It is to be appended to the end of the
5430 // merged IDL file.
5432 cpp_quote("")
5433 cpp_quote("// Type Library Definitions")
5434 cpp_quote("")
5437 uuid(CE3F726E-D1D3-44FE-B995-FF1DB3B48B2B),
5438 helpstring("IAccessible2 Type Library"),
5439 version(1.3),
5440 hidden
5443 library IAccessible2Lib
5445 importlib ("stdole2.tlb");
5446 importlib ("oleacc.dll");
5447 interface IAccessible2;
5448 interface IAccessible2_2;
5449 interface IAccessibleAction;
5450 interface IAccessibleApplication;
5451 interface IAccessibleComponent;
5452 interface IAccessibleDocument;
5453 interface IAccessibleEditableText;
5454 interface IAccessibleHyperlink;
5455 interface IAccessibleHypertext;
5456 interface IAccessibleHypertext2;
5457 interface IAccessibleImage;
5458 interface IAccessibleRelation;
5459 interface IAccessibleTable;
5460 interface IAccessibleTable2;
5461 interface IAccessibleTableCell;
5462 interface IAccessibleText;
5463 interface IAccessibleText2;
5464 interface IAccessibleValue;
5465 enum IA2CoordinateType;
5466 enum IA2EventID;
5467 enum IA2Role;
5468 enum IA2ScrollType;
5469 enum IA2States;
5470 enum IA2TableModelChangeType;
5471 enum IA2TextBoundaryType;
5472 enum IA2TextSpecialOffsets;