IAccessible2 Interface Reference

import "Accessible2.idl";

List of all members.

Public Member Functions

HRESULT nRelations ([out, retval] long *nRelations)
 Returns the number of accessible relations for this object.
HRESULT relation ([in] long relationIndex,[out, retval] IAccessibleRelation **relation)
 Returns one accessible relation for this object.
HRESULT relations ([in] long maxRelations,[out, size_is(maxRelations), length_is(*nRelations)] IAccessibleRelation **relation,[out, retval] long *nRelations)
 Returns multiple accessible relations for this object.
HRESULT scrollTo ([in] boolean topLeft)
 Makes an object visible on screen.
HRESULT groupPosition ([out] long *groupLevel,[out] long *similarItemsInGroup,[out, retval] long *positionInGroup)
 Returns grouping information.
HRESULT localizedRoleName ([out, retval] BSTR *localizedRoleName)
 Returns the localized role name.
HRESULT states ([out, retval] AccessibleStates *states)
 Returns the bit strip containing any IAccessible2 states.
HRESULT localizedStateNames ([in] long maxLocalizedStateNames,[out, size_is(, maxLocalizedStateNames), length_is(,*nLocalizedStateNames)] BSTR **localizedStateNames,[out, retval] long *nLocalizedStateNames)
 Returns localized state names (array of strings).
HRESULT extendedRole ([out, retval] BSTR *extendedRole)
 Returns the extended role.
HRESULT localizedExtendedRole ([out, retval] BSTR *localizedExtendedRole)
 Returns the localized extended role.
HRESULT nExtendedStates ([out, retval] long *nExtendedStates)
 Returns the number of extended states.
HRESULT extendedStates ([in] long maxExtendedStates,[out, size_is(, maxExtendedStates), length_is(,*nExtendedStates)] BSTR **extendedStates,[out, retval] long *nExtendedStates)
 Returns the extended states (array of strings).
HRESULT localizedExtendedStates ([in] long maxLocalizedExtendedStates,[out, size_is(, maxLocalizedExtendedStates), length_is(,*nLocalizedExtendedStates)] BSTR **localizedExtendedStates,[out, retval] long *nLocalizedExtendedStates)
 Returns the localized extended states (array of strings).
HRESULT uniqueID ([out, retval] long *uniqueID)
 Returns the unique ID.
HRESULT windowHandle ([out, retval] HWND *windowHandle)
 Returns the window handle for the parent window which contains this object.
HRESULT indexInParent ([out, retval] long *indexInParent)
 Returns the index of this object in its parent object.
HRESULT locale ([out, retval] IA2Locale *locale)
 Returns the IA2Locale of the accessible object.
HRESULT attributes ([out, retval] BSTR *attributes)
 Returns the attributes specific to this IAccessible2 object, such as a cell's formula.


Detailed Description

This interface must always be provided for objects that support some portion of the collection of the IAccessible2 interfaces.

IAccessible2 is a subclass of MSAA's IAccessible. This is a matter of convenience, i.e. an IAccessible2 is an IAccessible so MSAA methods can be easily accessed. None of MSAA's IAccessible methods are overridden or extended.


Member Function Documentation

HRESULT IAccessible2::attributes [out, retval] BSTR *  attributes  ) 
 

Returns the attributes specific to this IAccessible2 object, such as a cell's formula.

Parameters:
[out] attributes 

HRESULT IAccessible2::extendedRole [out, retval] BSTR *  extendedRole  ) 
 

Returns the extended role.

An extended role is a role which is dynamically generated by the application. It is not predefined by the IAccessible2 specification.

Parameters:
[out] extendedRole 

HRESULT IAccessible2::extendedStates [in] long  maxExtendedStates,
[out, size_is(, maxExtendedStates), length_is(,*nExtendedStates)] BSTR **  extendedStates,
[out, retval] long *  nExtendedStates
 

Returns the extended states (array of strings).

An extended state is a state which is dynamically generated by the application. It is not predefined by the IAccessible2 specification.

Parameters:
[in] maxExtendedStates 
[out] extendedStates 
[out] nExtendedStates 

HRESULT IAccessible2::groupPosition [out] long *  groupLevel,
[out] long *  similarItemsInGroup,
[out, retval] long *  positionInGroup
 

Returns grouping information.

Used for tree items, list items, tab panel labels, radio buttons, etc. Also used for collectons of non-text objects.

Parameters:
[out] groupLevel 0-based
[out] similarItemsInGroup 1-based
[out] positionInGroup 0-based

HRESULT IAccessible2::indexInParent [out, retval] long *  indexInParent  ) 
 

Returns the index of this object in its parent object.

Parameters:
[out] indexInParent 

HRESULT IAccessible2::locale [out, retval] IA2Locale locale  ) 
 

Returns the IA2Locale of the accessible object.

Parameters:
[out] locale 

HRESULT IAccessible2::localizedExtendedRole [out, retval] BSTR *  localizedExtendedRole  ) 
 

Returns the localized extended role.

Parameters:
[out] localizedExtendedRole 

HRESULT IAccessible2::localizedExtendedStates [in] long  maxLocalizedExtendedStates,
[out, size_is(, maxLocalizedExtendedStates), length_is(,*nLocalizedExtendedStates)] BSTR **  localizedExtendedStates,
[out, retval] long *  nLocalizedExtendedStates
 

Returns the localized extended states (array of strings).

Parameters:
[in] maxLocalizedExtendedStates 
[out] localizedExtendedStates 
[out] nLocalizedExtendedStates 

HRESULT IAccessible2::localizedRoleName [out, retval] BSTR *  localizedRoleName  ) 
 

Returns the localized role name.

Valid if the role is an IAccessible2 role; not to be used for MSAA roles.

Parameters:
[out] localizedRoleName 

HRESULT IAccessible2::localizedStateNames [in] long  maxLocalizedStateNames,
[out, size_is(, maxLocalizedStateNames), length_is(,*nLocalizedStateNames)] BSTR **  localizedStateNames,
[out, retval] long *  nLocalizedStateNames
 

Returns localized state names (array of strings).

Parameters:
[in] maxLocalizedStateNames 
[out] localizedStateNames 
[out] nLocalizedStateNames 

HRESULT IAccessible2::nExtendedStates [out, retval] long *  nExtendedStates  ) 
 

Returns the number of extended states.

Parameters:
[out] nExtendedStates 

HRESULT IAccessible2::nRelations [out, retval] long *  nRelations  ) 
 

Returns the number of accessible relations for this object.

Parameters:
[out] nRelations 

HRESULT IAccessible2::relation [in] long  relationIndex,
[out, retval] IAccessibleRelation **  relation
 

Returns one accessible relation for this object.

Parameters:
[in] relationIndex 0-based
[out] relation 

HRESULT IAccessible2::relations [in] long  maxRelations,
[out, size_is(maxRelations), length_is(*nRelations)] IAccessibleRelation **  relation,
[out, retval] long *  nRelations
 

Returns multiple accessible relations for this object.

Parameters:
[in] maxRelations maximum number of relations to get
[out] relation array of accessible relation objects
[out] nRelations length of array (not more than maxRelations)

HRESULT IAccessible2::scrollTo [in] boolean  topLeft  ) 
 

Makes an object visible on screen.

Parameters:
[in] topLeft If false then it will scroll the shortest distance it needs to put the element on-screen.

HRESULT IAccessible2::states [out, retval] AccessibleStates states  ) 
 

Returns the bit strip containing any IAccessible2 states.

Parameters:
[out] states 

HRESULT IAccessible2::uniqueID [out, retval] long *  uniqueID  ) 
 

Returns the unique ID.

The uniqueID is an identifier for this object, is unique within the current window, and remains the same for the lifetime of the accessible object. This is the same value that is passed in the idChild parameter of the WinEventProc callback function for any events that occur on the object, and is typically a negative number. Using negative numbers prevents the ID from conflicting with the use of positive numbers that might possibly be used to indicate a direct child N of the window's root accessible object, and thus the implementation of get_accChild() can differentiate between requests for direct child N vs. a descendant lower in the hierarchy with a given uniqueID. This is important because get_accChild() is used by AccessibleObjectFromEvent() to retrieve the accessible object which fired the event by starting from the window's root accessible object.

This value is provided so the AT can have access to it even when not handling an event for the object.

An example of when this value is useful if the AT wants to build a cache. The AT could cache the uniqueIDs in addition to other data being cached. When an event is fired the AT could map that to its internal model. Thus, if there's a REORDER/SHOW/HIDE event the AT knows which part of the internal structure has been invalidated and can refetch just that part.

This value can also be used by and AT to determine when the current control has changed. If the role is the same for two controls that are adjacent in the tab order, this can be used to detect the new control.

Another use of this value by an AT is to identify when a grouping object has changed, e.g. when moving from a radio button in one group to a radio button in a different group.

Parameters:
[out] uniqueID 

HRESULT IAccessible2::windowHandle [out, retval] HWND *  windowHandle  ) 
 

Returns the window handle for the parent window which contains this object.

This is the same window handle which will be passed for any events that occur on the object, but is cached in the accessible object for use when it would be helpful to access the window handle in cases where an event isn't fired on this object.

A use case is when a screen reader is grabbing an entire web page on a page load. Without the availability of windowHandle, the AT would have to get the window handle by using WindowFromAccessibleObject on each IAccessible, which is slow because it's implemented by oleacc.dll as a loop which crawls up the ancestor chain and looks for a ROLE_WINDOW object, mapping that back to a window handle.

Parameters:
[out] windowHandle 


The documentation for this interface was generated from the following file:
Generated on Sat Dec 2 00:45:21 2006 for IAccessible2 API by  doxygen 1.4.6-NO