|
HRESULT | nRelations ([out, retval] long *nRelations) |
| Returns the number of accessible relations for this object. More...
|
|
HRESULT | relation ([in] long relationIndex,[out, retval] IAccessibleRelation **relation) |
| Returns one accessible relation for this object. More...
|
|
HRESULT | relations ([in] long maxRelations,[out, size_is(maxRelations), length_is(*nRelations)] IAccessibleRelation **relations,[out, retval] long *nRelations) |
| Returns multiple accessible relations for this object. More...
|
|
HRESULT | role ([out, retval] long *role) |
| Returns the role of an IAccessible2 object. More...
|
|
HRESULT | scrollTo ([in] enum IA2ScrollType scrollType) |
| Makes an object visible on the screen. More...
|
|
HRESULT | scrollToPoint ([in] enum IA2CoordinateType coordinateType,[in] long x,[in] long y) |
| Moves the top left of an object to a specified location. More...
|
|
HRESULT | groupPosition ([out] long *groupLevel,[out] long *similarItemsInGroup,[out, retval] long *positionInGroup) |
| Returns grouping information. More...
|
|
HRESULT | states ([out, retval] AccessibleStates *states) |
| Returns the bit strip containing any IAccessible2 states. More...
|
|
HRESULT | extendedRole ([out, retval] BSTR *extendedRole) |
| Returns the extended role. More...
|
|
HRESULT | localizedExtendedRole ([out, retval] BSTR *localizedExtendedRole) |
| Returns the localized extended role. More...
|
|
HRESULT | nExtendedStates ([out, retval] long *nExtendedStates) |
| Returns the number of extended states. More...
|
|
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). More...
|
|
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). More...
|
|
HRESULT | uniqueID ([out, retval] long *uniqueID) |
| Returns the unique ID. More...
|
|
HRESULT | windowHandle ([out, retval] HWND *windowHandle) |
| Returns the window handle for the parent window which contains this object. More...
|
|
HRESULT | indexInParent ([out, retval] long *indexInParent) |
| Returns the index of this object in its parent object. More...
|
|
HRESULT | locale ([out, retval] IA2Locale *locale) |
| Returns the IA2Locale of the accessible object. More...
|
|
HRESULT | attributes ([out, retval] BSTR *attributes) |
| Returns the attributes specific to this object, such as a cell's formula. More...
|
|
This interface exposes the primary set of information about an IAccessible2 enabled accessible object.
This interface must always be provided for objects that support some portion of the collection of the IAccessible2 interfaces.
Please refer to Changing between Accessible Interfaces for special considerations related to use of the MSAA IAccessible interface and the set of IAccessible2 interfaces.
HRESULT IAccessible2::uniqueID |
( |
[out, retval] long * |
uniqueID | ) |
|
|
get |
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.
The uniqueID is not related to:
- the MSAA objectID which is used by the server to disambiguate between IAccessibles per HWND or
- the MSAA childID which is used to disambiguate between children being managed by an IAccessible.
This value is provided so the AT can have access to a unique runtime persistent identifier even when not handling an event for the object.
An example of when this value is useful is 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 the uniqueID 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 an 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.
One means of implementing this would be to create a factory with a 32 bit number generator and a reuse pool. The number generator would emit numbers starting at 1. Each time an object's life cycle ended, its number would be saved into a reuse pool. The number generator would be used whenever the reuse pool was empty.
Another way to create a unique ID is to generate it from a pointer value, e.g. an object's address. That would be unique because no two active objects can use the same allocated memory space.
- Parameters
-
- Return values
-
HRESULT IAccessible2::windowHandle |
( |
[out, retval] HWND * |
windowHandle | ) |
|
|
get |
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
-
- Return values
-