other-licenses/ia2/Accessible2.idl

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

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

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

     1 /*************************************************************************
     2  *
     3  *  File Name (Accessible2.idl)
     4  * 
     5  *  IAccessible2 IDL Specification 
     6  * 
     7  *  Copyright (c) 2007, 2013 Linux Foundation 
     8  *  Copyright (c) 2006 IBM Corporation 
     9  *  Copyright (c) 2000, 2006 Sun Microsystems, Inc. 
    10  *  All rights reserved. 
    11  *   
    12  *   
    13  *  Redistribution and use in source and binary forms, with or without 
    14  *  modification, are permitted provided that the following conditions 
    15  *  are met: 
    16  *   
    17  *   1. Redistributions of source code must retain the above copyright 
    18  *      notice, this list of conditions and the following disclaimer. 
    19  *   
    20  *   2. Redistributions in binary form must reproduce the above 
    21  *      copyright notice, this list of conditions and the following 
    22  *      disclaimer in the documentation and/or other materials 
    23  *      provided with the distribution. 
    24  *
    25  *   3. Neither the name of the Linux Foundation nor the names of its 
    26  *      contributors may be used to endorse or promote products 
    27  *      derived from this software without specific prior written 
    28  *      permission. 
    29  *   
    30  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
    31  *  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
    32  *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
    33  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
    34  *  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
    35  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    36  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    37  *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    38  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    39  *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    40  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
    41  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
    42  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    43  *   
    44  *  This BSD License conforms to the Open Source Initiative "Simplified 
    45  *  BSD License" as published at: 
    46  *  http://www.opensource.org/licenses/bsd-license.php 
    47  *   
    48  *  IAccessible2 is a trademark of the Linux Foundation. The IAccessible2 
    49  *  mark may be used in accordance with the Linux Foundation Trademark 
    50  *  Policy to indicate compliance with the IAccessible2 specification. 
    51  * 
    52  ************************************************************************/ 
    54 /** @mainpage
    56  @section _interfaces Interfaces
    57   IAccessible2\n
    58   IAccessible2_2\n
    59   IAccessibleAction\n
    60   IAccessibleApplication\n
    61   IAccessibleComponent\n
    62   IAccessibleDocument\n
    63   IAccessibleEditableText\n
    64   IAccessibleHypertext\n
    65   IAccessibleHypertext2\n
    66   IAccessibleHyperlink\n
    67   IAccessibleImage\n
    68   IAccessibleRelation\n
    69   IAccessibleTable [Deprecated]\n
    70   IAccessibleTable2\n
    71   IAccessibleTableCell\n
    72   IAccessibleText\n
    73   IAccessibleText2\n
    74   IAccessibleValue
    76  @section _structs Structs
    77   IA2Locale\n
    78   IA2TableModelChange\n
    79   IA2TextSegment
    81  @section _enums Enums
    82   ::IA2Actions values are predefined actions for use when implementing support for HTML5 media.\n
    83   ::IA2CoordinateType values define the requested coordinate type (screen or parent window).\n
    84   ::IA2EventID values identify events.\n
    85   ::IA2Role values defines roles which are in addition to the existing MSAA roles.\n
    86   ::IA2ScrollType values define where to place an object or substring on the screen.\n
    87   ::IA2States values define states which are in addition to the existing MSAA states.\n
    88   ::IA2TableModelChangeType values describe the kinds of changes made to a table (insert, delete, update).\n
    89   ::IA2TextBoundaryType values define the requested text unit (character, word, sentence, line, paragraph).\n
    90   ::IA2TextSpecialOffsets values define special offsets for use in the text interfaces.
    92  @section _constants Constants
    93   @ref grpRelations
    95  @section _misc Miscellaneous
    96   @ref _licensePage "BSD License"\n
    97   @ref _generalInfo "General Information"\n
    99  @page _licensePage BSD License
   100   %IAccessible2 IDL Specification
   102   Copyright (c) 2007, 2013 Linux Foundation\n
   103   Copyright (c) 2006 IBM Corporation\n
   104   Copyright (c) 2000, 2006 Sun Microsystems, Inc.\n
   105   All rights reserved.
   107   Redistribution and use in source and binary forms, with or without 
   108   modification, are permitted provided that the following conditions 
   109   are met: 
   111    1. Redistributions of source code must retain the above copyright 
   112       notice, this list of conditions and the following disclaimer. 
   114    2. Redistributions in binary form must reproduce the above 
   115       copyright notice, this list of conditions and the following 
   116       disclaimer in the documentation and/or other materials 
   117       provided with the distribution. 
   119    3. Neither the name of the Linux Foundation nor the names of its 
   120       contributors may be used to endorse or promote products 
   121       derived from this software without specific prior written 
   122       permission. 
   124   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
   125   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
   126   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
   127   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
   128   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
   129   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
   130   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
   131   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
   132   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
   133   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
   134   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
   135   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
   136   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
   138   This BSD License conforms to the Open Source Initiative "Simplified 
   139   BSD License" as published at: 
   140   http://www.opensource.org/licenses/bsd-license.php 
   142   %IAccessible2 is a trademark of the Linux Foundation. The %IAccessible2 
   143   mark may be used in accordance with the
   144   <a href="http://www.linuxfoundation.org/collaborate/workgroups/accessibility/trademark-policy">
   145   Linux Foundation Trademark Policy</a> to indicate compliance with the %IAccessible2 specification. 
   147  @page _generalInfo General Information 
   148   The following information is applicable to two or more interfaces.
   150  @ref _errors\n
   151  @ref _memory\n
   152  &nbsp;&nbsp;@ref _arrayConsideration\n
   153  @ref _indexes\n
   154  @ref _enums\n
   155  @ref _specialOffsets\n
   156  @ref _dicoveringInterfaces\n
   157  @ref _changingInterfaces\n
   158  @ref _applicationInfo\n
   159  @ref _childIDs\n
   160  @ref _variants\n
   161  @ref _iaaction-iahyperlink\n
   162  @ref _trademark
   164  @section _errors Error Handling
   165   HRESULT values are defined by the Microsoft&reg; Win32&reg; API.  For more information, refer to
   166   <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa378137%28v=vs.85%29.aspx">
   167   Interpreting HRESULT Values</a> in MSDN&reg;.
   169   Note that the S_FALSE return value is considered a non-error value and the 
   170   SUCCEEDED macro will return TRUE.  S_FALSE is used when there is no failure
   171   but there was nothing valid to return, e.g. in IAccessible2::attributes when
   172   there are no attributes.  When S_FALSE is returned [out] pointer types should 
   173   be NULL and [out] longs should generally be 0, but sometimes -1 is used such
   174   as IAccessible2::indexInParent, IAccessibleText::caretOffset, and
   175   IAccessibleHypertext::hyperlinkIndex.
   177   Note that for BSTR [out] variables common COM practice is that the server does 
   178   the SysAllocString and the client does the SysFreeString.  Also note that when
   179   NULL is returned there is no need for the client to call SysFreeString.  Please
   180   refer to the documentation for each method for more details regarding error handling.
   182  @section _memory Memory Management
   183   The following memory management issues should be considered:
   184   @li Although [out] BSTR variables are declared by the client, their space is 
   185    allocated by the server.  They need to be freed with SysFreeString by the 
   186    client at end of life; the same is true when BSTRs are used in structs or 
   187    arrays which are passed to the server.
   188   @li If there is no valid [out] BSTR to return, the server should return S_FALSE and 
   189    assign NULL to the output, e.g. *theOutBSTR = NULL;. 
   190   @li COM interfaces need to be referenced with AddRef when used and dereferenced
   191    with Release at end of life.
   192   @li Single [out] longs, HWNDs, booleans, and structs are declared by the caller
   193    and passed by reference. The marshaller does all the memory management.
   195   The following articles may be helpful for understanding memory management issues:
   196   @li An article by Don Box in a
   197    <a href="http://www.microsoft.com/msj/1196/activex1196.aspx">Q & A section</a>
   198    of the November 1996 edition of the Microsoft Systems Journal.
   199   @li A posting to a CodeGuru forum, 
   200    <a href="http://www.codeguru.com/forum/showthread.php?t=364511">Windows SDK 
   201    String: What are the rules for BSTR allocation and deallocation?</a>
   203  @subsection _arrayConsideration Special Consideration when using Arrays
   204   There are several methods which return arrays.  In the case of IAccessible2::relations
   205   and IAccessibleRelation::targets the client must allocate and free the arrays.
   207   For the remaining methods which return arrays, the server must allocate the array
   208   and the client must free the array when no longer needed.  These methods are
   209   IAccessible2::extendedStates, IAccessible2::localizedExtendedStates,
   210   IAccessible2_2::relationTargetsOfType, IAccessibleAction::keyBinding, 
   211   IAccessibleHypertext2::hyperlinks, IAccessibleTable::selectedChildren, 
   212   IAccessibleTable::selectedColumns, IAccessibleTable::selectedRows,
   213   IAccessibleTable2::selectedCells, IAccessibleTable2::selectedColumns,
   214   IAccessibleTable2::selectedRows, IAccessibleTableCell::columnHeaderCells,
   215   and IAccessibleTableCell::rowHeaderCells.
   216   For those methods, the server must allocate both the top level array and any storage 
   217   associated with it, e.g. for BSTRs.  The server must allocate the arrays with 
   218   CoTaskMemAlloc and any BSTRs with SysAllocString.  The client must use CoTaskMemFree
   219   to free the array and any BSTRs must be freed with SysFreeString.  
   221   Also, the IDL for IAccessible2::extendedStates, IAccessible2::localizedExtendedStates, 
   222   IAccessibleAction::keyBinding, IAccessibleTable::selectedChildren, 
   223   IAccessibleTable::selectedColumns, and IAccessibleTable::selectedRows includes an
   224   extraneous [in] parameter for the caller to specify the max size of the array.
   225   This parameter will be ignored by the COM server.
   227  @section _indexes Zero and One Based Indexes
   228   Unless otherwise specified all offsets and indexes are 0 based. 
   230  @section _enums Enums
   231   Note that enums start at 0.
   233  @section _specialOffsets Special Offsets for use in the IAccessibleText and IAccessibleEditableText Methods
   234   IAccessibleText and IAccessibleEditableText can use one or more of the following
   235   special offset values.  They are defined in the ::IA2TextSpecialOffsets enum.
   236   @li Using ::IA2_TEXT_OFFSET_LENGTH (-1) as an offset in any of the IAccessibleText or
   237    IAccessibleEditableText methods is the same as specifying the length of the string.
   238   @li Using ::IA2_TEXT_OFFSET_CARET (-2) as an offset for IAccessibleText::textBeforeOffset, 
   239    IAccessibleText::textAtOffset, and IAccessibleText::textAfterOffset indicates that the 
   240    text related to the physical location of the caret should be used.  This is needed for 
   241    applications that consider the character offset of the end of one line (as reached by 
   242    pressing the End key) the same as the offset of the first character on the next line.
   243    Since the same offset is associated with two different lines a special means is needed 
   244    to fetch text from the line where the caret is physically located.
   246  @section _dicoveringInterfaces Discovery of Interfaces
   247   In general AT (Assistive Technology) should try IAccessible2 interfaces, followed by using 
   248   the MSAA (Microsoft&reg; Active Accessibility&reg;) interfaces.  (In cases where the an application
   249   is known to have custom interfaces which provide information not supplied by IAccessible2
   250   or MSAA, then those custom interfaces can be used.)  The AT can then, by default, support
   251   unknown IAccessible2/MSAA applications, without the application developers having to request
   252   AT vendors for support on an individual application by application basis.
   254   When you have a reference to an IAccessible and require a reference to an IAccessible2 use 
   255   QueryService as follows:
   256   @code
   257   // pAcc is a reference to the accessible object's IAccessible interface. 
   258   IServiceProvider *pService = NULL; 
   259   hr = pAcc->QueryInterface(IID_IServiceProvider, (void **)&pService); 
   260   if(SUCCEEDED(hr)) { 
   261     IAccessible2 *pIA2 = NULL; 
   262     hr = pService->QueryService(IID_IAccessible, IID_IAccessible2, (void**)&pIA2); 
   263     if (SUCCEEDED(hr) && pIA2) { 
   264       // The control supports IAccessible2. 
   265       // pIA2 is the reference to the accessible object's IAccessible2 interface.
   266     } 
   267   } 
   268   @endcode
   270   @section _changingInterfaces Changing between Accessible Interfaces
   271   Note that developers must always implement MSAA's IAccessible and, if needed, some
   272   of the interfaces in the set of IAccessible2 interfaces.  Although the IAccessible2
   273   IDL is coded such that IAccessible2 is a subclass of MSAA's IAccessible, none of
   274   MSAA's IAccessible methods are redefined by IAccessible2.
   276   QueryService must be used to switch from a reference to an MSAA IAccessible interface 
   277   to another interface.  This has been 
   278   <a href="http://www.atia.org/files/public/Introducing_IAccessibleEx.doc">
   279   documented</a> and the pertinent facts have been extracted below: 
   281   @par 
   282    Why use QueryService instead of just using QueryInterface to get IAccessibleEx 
   283    directly? The reason is that since MSAA 2.0, clients don't talk to a server's 
   284    IAccessible interface directly; instead they talk to an intermediate MSAA-provided 
   285    wrapper that calls through to the original IAccessible. This wrapper provides services 
   286    such as implementing IDispatch, supplying information from MSAA 2.0's Dynamic Annotation 
   287    service, and scaling locations when running on Windows Vista with DPI scaling enabled. 
   288    QueryService is the supported way to expose additional interfaces from an existing 
   289    IAccessible and was originally used by MSHTML to expose IHTMLElement objects corresponding 
   290    to IAccessibles. QueryService is often more convenient for servers to implement than 
   291    QueryInterface because it does not have the same requirements for preserving object 
   292    identity or symmetry/transitivity as QueryInterface, so QueryService allows servers to 
   293    easily implement the interface on the same object or a separate object. The latter is 
   294    often hard to do with QueryInterface unless the original object supports aggregation. 
   296   Two related references in MSDN&reg; are: 
   297   @li <a href="http://msdn.microsoft.com/en-us/library/ms696078(VS.85).aspx">
   298   "Using QueryService to expose a native object model interface for an IAccessible object"</a>
   299   @li <a href="http://msdn.microsoft.com/en-us/library/ms528415.aspx#acc_obj"> 
   300   "Accessing the Internet Explorer Object Associated with an Accessible Object"</a>
   302   Based on this information from Microsoft, QueryService must be used to switch back and forth 
   303   between a reference to an MSAA IAccessible interface and any of the IAccessible2 interfaces. 
   305   Regarding switching between any of the IAccessible2 interfaces, applications implementing
   306   IAccessible2 should implement the IAccessible2 interfaces on a single object since ATs
   307   will be using QueryInterface to switch between the IAccessilbe2 interfaces.  Implementing
   308   the IAccessible2 interfaces on separate objects would require the use of QueryService.
   309   There is one exception, IAccessibleApplication can be implemented on a separate object so
   310   its common code doesn't have to be included in each accessible object.  ATs should use
   311   QueryService to access IAccessibleApplication.
   313  @section _applicationInfo Access to Information about the Application
   314   Servers implementing IAccessible2 should provide access to the IAccessibleApplication 
   315   interface via QueryService from any object so that ATs can easily determine specific 
   316   information about the application such as its name or version.
   318  @section _childIDs Child IDs
   319   The IAccessible2 interfaces do not support child IDs, i.e. simple child elements.
   320   Full accessible objects must be created for each object that supports IAccessible2.
   321   Therefore MSAA's get_accChild should never return a child ID (other than CHILDID_SELF)
   322   for an object that implements any of the IAccessible2 interfaces.
   324   Microsoft's UI Automation specification has the same limitation and this was resolved
   325   in the UI Automation Express specification by adding IAccessibleEx::GetObjectForChild
   326   and IAccessibleEx::GetIAccessiblePair.  These methods allow mapping back and forth 
   327   between an IAccessibleEx and an {IAccessible, Child ID} pair.  A future version of 
   328   IAccessible2 may include similar methods to map back and forth between an IAccessible2
   329   and an {IAccessible, Child ID} pair.
   331  @section _variants VARIANTs
   332   Some methods return a VARIANT.  Implementers need to make sure that the return type is 
   333   specified, i.e. VT_I4, VT_IDISPATCH, etc.  The methods that return VARIANTs are 
   334   IAccessibleHyperlink::anchor, IAccessibleHyperlink::anchorTarget, IAccessibleValue::currentValue,
   335   IAccessibleValue::maximumValue, IAccessibleValue::minimumValue.
   337  @section _iaaction-iahyperlink IAccessibleHyperlink as subclass of IAccessibleAction
   338   In this version of the IDL, IAccessibleHyperlink is a subclass of IAccessibleAction.  
   339   However, there is no practical need for that inheritance and in some cases, such as
   340   an image map of smart tags, it doesn't make sense because such an image map doesn't 
   341   have actionable objects; it's the secondary smart tags that are actionable.  As a 
   342   result, implementations should not rely on the inheritance as it may be removed in 
   343   a later version of the IDL.
   345  @section _trademark Trademark Attribution
   346   The names of actual companies and products mentioned herein may be the trademarks of
   347   their respective owners.  In particular, Active Accessibility, Microsoft, MSDN, and Win32
   348   are trademarks of the Microsoft group of companies in the U.S.A. and/or other countries.
   350 **/
   352 import "objidl.idl";
   353 import "oaidl.idl";
   354 import "oleacc.idl";
   355 import "AccessibleRelation.idl";
   356 import "AccessibleStates.idl";
   357 import "IA2CommonTypes.idl";
   359 /** A structure defining the locale of an accessible object.
   361 IAccessible2::locale returns this struct.
   362 */
   363 typedef struct IA2Locale {
   364   BSTR language; ///< ISO 639-1 Alpha-2 two character language code
   365   BSTR country;  ///< ISO 3166-1 Alpha-2 two character country code
   366   BSTR variant;  ///< Application specific variant of the locale
   367 } IA2Locale;
   369 /** @brief This interface exposes the primary set of information about an
   370  IAccessible2 enabled accessible object.
   372  This interface must always be provided for objects that support some
   373  portion of the collection of the %IAccessible2 interfaces.
   375  Please refer to @ref _changingInterfaces "Changing between Accessible Interfaces"
   376  for special considerations related to use of the MSAA IAccessible interface and 
   377  the set of %IAccessible2 interfaces.
   378  */
   379 [object, uuid(E89F726E-C4F4-4c19-BB19-B647D7FA8478)]
   380 interface IAccessible2 : IAccessible
   381 {
   383   /** @brief Returns the number of accessible relations for this object.
   384    @param [out] nRelations
   385    @retval S_OK
   386   */
   387   [propget] HRESULT nRelations
   388     (
   389      [out, retval] long *nRelations
   390     );
   392   /** @brief Returns one accessible relation for this object.
   393    @param [in] relationIndex
   394      0 based
   395    @param [out] relation
   396    @retval S_OK
   397    @retval E_INVALIDARG if bad [in] passed
   398   */
   399   [propget] HRESULT relation
   400     (
   401      [in] long relationIndex,
   402      [out, retval] IAccessibleRelation **relation
   403     );
   405   /** @brief Returns multiple accessible relations for this object.
   406    @param [in] maxRelations
   407      maximum size of the array allocated by the client
   408    @param [out] relations
   409     The array of accessible relation objects.  Note that this array is to be
   410 	allocated by the client and freed when no longer needed.  Refer to @ref 
   411 	_arrayConsideration "Special Consideration when using Arrays" for more details.
   412    @param [out] nRelations 
   413     actual number of relations in the returned array (not more than maxRelations)
   414    @retval S_OK
   415    @retval S_FALSE if there are no relations, nRelations is set to 0
   416    @note As a performant alternative, client code should consider using IAccessible2_2::relationTargetsOfType.
   417   */
   418   [propget] HRESULT relations
   419     (
   420      [in] long maxRelations, 
   421      [out, size_is(maxRelations), length_is(*nRelations)]
   422        IAccessibleRelation **relations, 
   423      [out, retval] long *nRelations 
   424     );
   426   /** @brief Returns the role of an %IAccessible2 object.
   427    @param [out] role
   428     The role of an %IAccessible2 object.
   429    @retval S_OK
   430    @note 
   431    @li For convenience MSAA roles are also passed through this method so the
   432     AT doesn't have to also fetch roles through MSAA's get_accRole.
   433    @li %IAccessible2 roles should not be passed through MSAA's get_accRole.
   434    @li For compatibility with non IAccessible2 enabled ATs, IAccessible2 
   435     applications should also add support to get_accRole to return the closest 
   436 	MSAA role or ROLE_SYSTEM_CLIENT (the MSAA defined default role) if there 
   437 	is not a good match.  
   438    @li This method is missing a [propget] prefix in the IDL.  The result is the
   439     method is named role in generated C++ code instead of get_role.
   440   */
   441   HRESULT role
   442     (
   443      [out, retval] long *role
   444     );
   446   /** @brief Makes an object visible on the screen.
   447    @param [in] scrollType
   448     Defines where the object should be placed on the screen.
   449    @retval S_OK
   450    @retval E_INVALIDARG if bad [in] passed
   451   */
   452   HRESULT scrollTo
   453     (
   454      [in] enum IA2ScrollType scrollType 
   455     );
   457   /** @brief Moves the top left of an object to a specified location.
   459    @param [in] coordinateType
   460     Specifies whether the coordinates are relative to the screen or the parent object.
   461    @param [in] x
   462     Defines the x coordinate.
   463    @param [in] y
   464     Defines the y coordinate.
   465    @retval S_OK
   466    @retval E_INVALIDARG if bad [in] passed
   467   */
   468   HRESULT scrollToPoint
   469     (
   470      [in] enum IA2CoordinateType coordinateType,
   471 	 [in] long x,
   472 	 [in] long y 
   473     );
   475   /** @brief Returns grouping information.
   477    Used for tree items, list items, tab panel labels, radio buttons, etc.
   478    Also used for collections of non-text objects.
   480    @param [out] groupLevel
   481     1 based, 0 indicates that this value is not applicable
   482    @param [out] similarItemsInGroup
   483     1 based, 0 indicates that this value is not applicable
   484    @param [out] positionInGroup
   485     1 based, 0 indicates that this value is not applicable. This is an index
   486     into the objects in the current group, not an index into all the objects
   487     at the same group level.
   488    @retval S_OK if at least one value is valid
   489    @retval S_FALSE if no values are valid, [out] values are 0s
   490    @note This method is meant to describe the nature of an object's containment
   491     structure.  It's exposed by trees, tree grids, nested lists, nested menus,
   492     but not headings, which uses the level object attribute.  It is also exposed
   493     by radio buttons (with groupLevel == 0).
   494    @note This is normally not implemented on a combo box to describe the nature
   495     of its contents.  Normally an AT will get that information from its child list 
   496     object.  However, in some cases when non-edit combo boxes are not able to be structured
   497     such that the list is a child of the combo box, this method is implemented on
   498     the combo box itself. ATs can use this interface if a child list is not found.
   499 	*/
   500   [propget] HRESULT groupPosition
   501     (
   502      [out] long *groupLevel,
   503      [out] long *similarItemsInGroup,
   504      [out, retval] long *positionInGroup 
   505     );
   507   /** @brief Returns the bit strip containing any IAccessible2 states.
   509    The IAccessible2 states are in addition to the MSAA states and are defined in
   510    the IA2States enum.
   512    @param [out] states
   513    @retval S_OK
   514   */
   515   [propget] HRESULT states
   516     (
   517 	 [out, retval] AccessibleStates *states
   518     );
   520   /** @brief Returns the extended role.
   522    An extended role is a role which is dynamically generated by the application.
   523    It is not predefined by the %IAccessible2 specification.
   525    @param [out] extendedRole
   526    @retval S_OK
   527    @retval S_FALSE if there is nothing to return, [out] value is NULL
   528   */
   529   [propget] HRESULT extendedRole
   530     (
   531 	 [out, retval] BSTR *extendedRole
   532     );
   534   /** @brief Returns the localized extended role.
   535    @param [out] localizedExtendedRole
   536    @retval S_OK
   537    @retval S_FALSE if there is nothing to return, [out] value is NULL
   538   */
   539   [propget] HRESULT localizedExtendedRole
   540     (
   541 	 [out, retval] BSTR *localizedExtendedRole
   542     );
   544   /** @brief Returns the number of extended states.
   545    @param [out] nExtendedStates
   546    @retval S_OK
   547   */
   548   [propget] HRESULT nExtendedStates
   549     (
   550      [out, retval] long *nExtendedStates
   551     );
   553   /** @brief Returns the extended states (array of strings).
   555    An extended state is a state which is dynamically generated by the application.
   556    It is not predefined by the %IAccessible2 specification.
   558    @param [in] maxExtendedStates
   559     This parameter is ignored. Refer to @ref _arrayConsideration 
   560 	"Special Consideration when using Arrays" for more details.
   561    @param [out] extendedStates
   562     This array is allocated by the server.  The client must free it with CoTaskMemFree.
   563    @param [out] nExtendedStates
   564     The number of extended states returned; the size of the returned array.
   565    @retval S_OK
   566    @retval S_FALSE if there are no states, [out] values are NULL and 0 respectively
   567   */
   568   [propget] HRESULT extendedStates
   569     (
   570      [in] long maxExtendedStates,
   571      [out, size_is(,maxExtendedStates), length_is(,*nExtendedStates)] BSTR **extendedStates,
   572      [out, retval] long *nExtendedStates
   573     );
   575   /** @brief Returns the localized extended states (array of strings).
   577    @param [in] maxLocalizedExtendedStates
   578     This parameter is ignored. Refer to @ref _arrayConsideration 
   579 	"Special Consideration when using Arrays" for more details.
   580    @param [out] localizedExtendedStates
   581     This array is allocated by the server.  The client must free it with CoTaskMemFree. 
   582    @param [out] nLocalizedExtendedStates
   583     The number of localized extended states returned; the size of the returned array.
   584    @retval S_OK
   585    @retval S_FALSE if there are no states, [out] values are NULL and 0 respectively
   586   */
   587   [propget] HRESULT localizedExtendedStates
   588     (
   589      [in] long maxLocalizedExtendedStates,
   590      [out, size_is(,maxLocalizedExtendedStates), length_is(,*nLocalizedExtendedStates)] BSTR **localizedExtendedStates,
   591      [out, retval] long *nLocalizedExtendedStates
   592     );
   594   /** @brief Returns the unique ID.
   596    The uniqueID is an identifier for this object, is unique within the
   597    current window, and remains the same for the lifetime of the accessible
   598    object. 
   600    The uniqueID is not related to:
   601    - the MSAA objectID which is used by the server to disambiguate between
   602    IAccessibles per HWND or
   603    - the MSAA childID which is used to disambiguate between children being
   604    managed by an IAccessible.
   606    This value is provided so the AT can have access to a unique runtime persistent 
   607    identifier even when not handling an event for the object.
   609    An example of when this value is useful is if the AT wants to build a cache. 
   610    The AT could cache the uniqueIDs in addition to other data being cached. 
   611    When an event is fired the AT could map the uniqueID to its internal model.
   612    Thus, if there's a REORDER/SHOW/HIDE event the AT knows which part of the 
   613    internal structure has been invalidated and can refetch just that part.
   615    This value can also be used by an AT to determine when the current control
   616    has changed. If the role is the same for two controls that are adjacent in 
   617    the tab order, this can be used to detect the new control.
   619    Another use of this value by an AT is to identify when a grouping object has 
   620    changed, e.g. when moving from a radio button in one group to a radio button in a 
   621    different group.
   623    One means of implementing this would be to create a factory with a 32 bit number 
   624    generator and a reuse pool.  The number generator would emit numbers starting 
   625    at 1.  Each time an object's life cycle ended, its number would be saved into a 
   626    reuse pool.  The number generator would be used whenever the reuse pool was empty.
   628    Another way to create a unique ID is to generate it from a pointer value, e.g. an
   629    object's address. That would be unique because no two active objects can use the
   630    same allocated memory space.
   632    @param [out] uniqueID
   633    @retval S_OK
   634   */
   635   [propget] HRESULT uniqueID
   636     (
   637      [out, retval] long *uniqueID
   638     );
   640   /** @brief Returns the window handle for the parent window which contains this object.
   642    This is the same window handle which will be passed for any events that occur on the 
   643    object, but is cached in the accessible object for use when it would be helpful to 
   644    access the window handle in cases where an event isn't fired on this object.
   646    A use case is when a screen reader is grabbing an entire web page on a page load. 
   647    Without the availability of windowHandle, the AT would have to get the window handle
   648    by using WindowFromAccessibleObject on each IAccessible, which is slow because it's 
   649    implemented by oleacc.dll as a loop which crawls up the ancestor chain and looks for 
   650    a ROLE_WINDOW object, mapping that back to a window handle.
   652    @param [out] windowHandle
   653    @retval S_OK
   654   */
   655   [propget] HRESULT windowHandle
   656     (
   657      [out, retval] HWND *windowHandle
   658     );
   660   /** @brief Returns the index of this object in its parent object.
   661    @param [out] indexInParent
   662      0 based; -1 indicates there is no parent; the upper bound is the value 
   663 	 returned by the parent's IAccessible::get_accChildCount.
   664    @retval S_OK
   665    @retval S_FALSE if no parent, [out] value is -1
   666   */
   667   [propget] HRESULT indexInParent
   668     (
   669      [out, retval] long *indexInParent
   670     );
   672   /** @brief Returns the IA2Locale of the accessible object. 
   673    @param [out] locale
   674    @retval S_OK
   675   */
   676   [propget] HRESULT locale
   677     (
   678      [out, retval] IA2Locale *locale
   679     );
   681   /** @brief Returns the attributes specific to this object, such as a cell's formula.
   682    @param [out] attributes
   683    @retval S_OK
   684    @retval S_FALSE returned if there is nothing to return, [out] value is NULL
   685   */
   686   [propget] HRESULT attributes
   687     (
   688      [out, retval] BSTR *attributes
   689     );
   691 }

mercurial