зеркало из https://github.com/mozilla/pjs.git
Fix for bug 376753 - Allow QueryInterface to IA2 witout crashing, patches=aaronlev, me, r=me, aaronlev
This commit is contained in:
Родитель
ce1ead0a48
Коммит
abf4049a01
|
@ -76,6 +76,7 @@ MIDL_ENUMS = \
|
|||
AccessibleEventId.idl \
|
||||
AccessibleRole.idl \
|
||||
AccessibleStates.idl \
|
||||
IA2CommonTypes.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
|
|
|
@ -61,7 +61,7 @@ interface nsIDOMNode;
|
|||
*
|
||||
* @status UNDER_REVIEW
|
||||
*/
|
||||
[scriptable, uuid(cc8d6414-90cf-450a-8c18-8bf8302d00b7)]
|
||||
[scriptable, uuid(18612bcb-79bd-45c1-92e9-07aded5fd0f5)]
|
||||
interface nsIAccessibleEvent : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -351,7 +351,7 @@ interface nsIAccessibleEvent : nsISupports
|
|||
/**
|
||||
* The caret moved from one column to the next.
|
||||
*/
|
||||
const unsigned long EVENT_COLUMN_CHANGED = 0x003A;
|
||||
const unsigned long EVENT_TEXT_COLUMN_CHANGED = 0x003A;
|
||||
|
||||
/**
|
||||
* The caret moved from one section to the next.
|
||||
|
@ -464,20 +464,15 @@ interface nsIAccessibleEvent : nsISupports
|
|||
*/
|
||||
const unsigned long EVENT_PAGE_CHANGED = 0x005A;
|
||||
|
||||
/**
|
||||
* An object's role changed.
|
||||
*/
|
||||
const unsigned long EVENT_ROLE_CHANGED = 0x005B;
|
||||
|
||||
/**
|
||||
* Used internally in Gecko.
|
||||
*/
|
||||
const unsigned long EVENT_INTERNAL_LOAD = 0x005C;
|
||||
const unsigned long EVENT_INTERNAL_LOAD = 0x005B;
|
||||
|
||||
/**
|
||||
* Help make sure event map does not get out-of-line.
|
||||
*/
|
||||
const unsigned long EVENT_LAST_ENTRY = 0x005D;
|
||||
const unsigned long EVENT_LAST_ENTRY = 0x005C;
|
||||
|
||||
/**
|
||||
* The type of event, based on the enumerated event values
|
||||
|
|
|
@ -117,8 +117,8 @@ STDMETHODIMP nsAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
|
|||
*ppv = NS_STATIC_CAST(IEnumVARIANT*, this);
|
||||
} else if (IID_IServiceProvider == iid)
|
||||
*ppv = NS_STATIC_CAST(IServiceProvider*, this);
|
||||
//else if (IID_IAccessible2 == iid)
|
||||
//*ppv = NS_STATIC_CAST(IAccessible2*, this);
|
||||
else if (IID_IAccessible2 == iid)
|
||||
*ppv = NS_STATIC_CAST(IAccessible2*, this);
|
||||
else if (IID_IAccessibleAction == iid)
|
||||
*ppv = NS_STATIC_CAST(IAccessibleAction*, this);
|
||||
|
||||
|
@ -1081,13 +1081,21 @@ nsAccessibleWrap::role(long *role)
|
|||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::scrollTo(boolean topLeft)
|
||||
nsAccessibleWrap::scrollTo(enum IA2ScrollType scrollType)
|
||||
{
|
||||
if (NS_SUCCEEDED(ScrollTo(topLeft)))
|
||||
// XXX Handle scrollType
|
||||
if (NS_SUCCEEDED(ScrollTo(PR_TRUE)))
|
||||
return S_OK;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::scrollToPoint(enum IA2CoordinateType coordinateType,
|
||||
long x, long y)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_groupPosition(long *aGroupLevel,
|
||||
long *aSimilarItemsInGroup,
|
||||
|
@ -1109,12 +1117,6 @@ nsAccessibleWrap::get_groupPosition(long *aGroupLevel,
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_localizedRoleName(BSTR *localizedRoleName)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_states(AccessibleStates *aStates)
|
||||
{
|
||||
|
@ -1168,14 +1170,6 @@ nsAccessibleWrap::get_states(AccessibleStates *aStates)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_localizedStateNames(long maxLocalizedStateNames,
|
||||
BSTR **localizedStateNames,
|
||||
long *nLocalizedStateNames)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_extendedRole(BSTR *extendedRole)
|
||||
{
|
||||
|
@ -1213,9 +1207,9 @@ nsAccessibleWrap::get_localizedExtendedStates(long maxLocalizedExtendedStates,
|
|||
STDMETHODIMP
|
||||
nsAccessibleWrap::get_uniqueID(long *uniqueID)
|
||||
{
|
||||
void **id = nsnull;
|
||||
if (NS_SUCCEEDED(GetUniqueID(id))) {
|
||||
*uniqueID = NS_REINTERPRET_POINTER_CAST(long, *id);
|
||||
void *id;
|
||||
if (NS_SUCCEEDED(GetUniqueID(&id))) {
|
||||
*uniqueID = NS_REINTERPRET_POINTER_CAST(long, id);
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
|
|
|
@ -172,24 +172,21 @@ class nsAccessibleWrap : public nsAccessible,
|
|||
/* [retval][out] */ long *role);
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE scrollTo(
|
||||
/* [in] */ boolean topLeft);
|
||||
/* [in] */ enum IA2ScrollType scrollType);
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE scrollToPoint(
|
||||
/* [in] */ enum IA2CoordinateType coordinateType,
|
||||
/* [in] */ long x,
|
||||
/* [in] */ long y);
|
||||
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_groupPosition(
|
||||
/* [out] */ long *groupLevel,
|
||||
/* [out] */ long *similarItemsInGroup,
|
||||
/* [retval][out] */ long *positionInGroup);
|
||||
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedRoleName(
|
||||
/* [retval][out] */ BSTR *localizedRoleName);
|
||||
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_states(
|
||||
/* [retval][out] */ AccessibleStates *states);
|
||||
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedStateNames(
|
||||
/* [in] */ long maxLocalizedStateNames,
|
||||
/* [length_is][length_is][size_is][size_is][out] */ BSTR **localizedStateNames,
|
||||
/* [retval][out] */ long *nLocalizedStateNames);
|
||||
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extendedRole(
|
||||
/* [retval][out] */ BSTR *extendedRole);
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ static const PRUint32 gWinEventMap[] = {
|
|||
IA2_EVENT_TEXT_UPDATED, // nsIAccessibleEvent::EVENT_TEXT_UPDATED
|
||||
IA2_EVENT_TEXT_SELECTION_CHANGED, // nsIAccessibleEvent::EVENT_TEXT_SELECTION_CHANGED
|
||||
IA2_EVENT_VISIBLE_DATA_CHANGED, // nsIAccessibleEvent::EVENT_VISIBLE_DATA_CHANGED
|
||||
IA2_EVENT_COLUMN_CHANGED, // nsIAccessibleEvent::EVENT_COLUMN_CHANGED
|
||||
IA2_EVENT_TEXT_COLUMN_CHANGED, // nsIAccessibleEvent::EVENT_TEXT_COLUMN_CHANGED
|
||||
IA2_EVENT_SECTION_CHANGED, // nsIAccessibleEvent::EVENT_SECTION_CHANGED
|
||||
IA2_EVENT_TABLE_CAPTION_CHANGED, // nsIAccessibleEvent::EVENT_TABLE_CAPTION_CHANGED
|
||||
IA2_EVENT_TABLE_MODEL_CHANGED, // nsIAccessibleEvent::EVENT_TABLE_MODEL_CHANGED
|
||||
|
@ -136,7 +136,6 @@ static const PRUint32 gWinEventMap[] = {
|
|||
IA2_EVENT_HYPERTEXT_NLINKS_CHANGED, // nsIAccessibleEvent::EVENT_HYPERTEXT_NLINKS_CHANGED
|
||||
IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED, // nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED
|
||||
IA2_EVENT_PAGE_CHANGED, // nsIAccessibleEvent::EVENT_PAGE_CHANGED
|
||||
IA2_EVENT_ROLE_CHANGED, // nsIAccessibleEvent::EVENT_ROLE_CHANGED
|
||||
kEVENT_WIN_UNKNOWN, // nsIAccessibleEvent::EVENT_INTERNAL_LOAD
|
||||
kEVENT_LAST_ENTRY // nsIAccessibleEvent::EVENT_LAST_ENTRY
|
||||
};
|
||||
|
|
|
@ -267,7 +267,7 @@ static const WindowsRoleMapItem gWindowsRoleMap[] = {
|
|||
{ ROLE_SYSTEM_INDICATOR, ROLE_SYSTEM_INDICATOR },
|
||||
|
||||
// nsIAccessibleRole::ROLE_CANVAS
|
||||
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN },
|
||||
{ USE_ROLE_STRING, IA2_ROLE_CANVAS },
|
||||
|
||||
// nsIAccessibleRole::ROLE_CHECK_MENU_ITEM
|
||||
{ ROLE_SYSTEM_MENUITEM, IA2_ROLE_CHECK_MENU_ITEM },
|
||||
|
@ -339,10 +339,10 @@ static const WindowsRoleMapItem gWindowsRoleMap[] = {
|
|||
{ ROLE_SYSTEM_ROWHEADER, ROLE_SYSTEM_ROWHEADER },
|
||||
|
||||
// nsIAccessibleRole::ROLE_TEAR_OFF_MENU_ITEM
|
||||
{ ROLE_SYSTEM_MENUITEM, ROLE_SYSTEM_MENUITEM },
|
||||
{ ROLE_SYSTEM_MENUITEM, IA2_ROLE_TEAR_OFF_MENU },
|
||||
|
||||
// nsIAccessibleRole::ROLE_TERMINAL
|
||||
{ USE_ROLE_STRING, IA2_ROLE_UNKNOWN },
|
||||
{ USE_ROLE_STRING, IA2_ROLE_TERMINAL },
|
||||
|
||||
// nsIAccessibleRole::ROLE_TEXT_CONTAINER
|
||||
{ USE_ROLE_STRING, IA2_ROLE_TEXT_FRAME },
|
||||
|
|
|
@ -40,20 +40,19 @@
|
|||
IAccessibleValue
|
||||
|
||||
@section _structs Structs
|
||||
IA2Point\n
|
||||
IA2Locale\n
|
||||
IA2TableModelChange\n
|
||||
IA2TextSegment
|
||||
|
||||
@section _enums Enums
|
||||
::IA2CoordinateType values define the requested coordinate type (screen or parent window).\n
|
||||
::IA2EventID values identify events.\n
|
||||
::IA2Role values define roles.\n
|
||||
::IA2ScrollType values define where to place an object or substring on the screen.\n
|
||||
::IA2TableModelChangeType values describe the kinds of changes made to a table (insert, delete, update).\n
|
||||
::IA2TextBoundaryType values define the requested text unit (character, word, sentence, line, paragraph).\n
|
||||
::IA2TextCoordinateType values define the requested coordinate type (screen or parent window).
|
||||
::IA2TextBoundaryType values define the requested text unit (character, word, sentence, line, paragraph).
|
||||
|
||||
@section _constants Constants
|
||||
@ref grpIAccessibleApplication\n
|
||||
@ref grpRelations\n
|
||||
@ref grpStates\n
|
||||
|
||||
|
@ -86,10 +85,10 @@
|
|||
|
||||
import "objidl.idl";
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
import "oleacc.idl";
|
||||
import "AccessibleRelation.idl";
|
||||
import "AccessibleStates.idl";
|
||||
import "IA2CommonTypes.idl";
|
||||
|
||||
/// A structure defining the locale of an accessible object.
|
||||
typedef struct {
|
||||
|
@ -145,6 +144,9 @@ interface IAccessible2 : IAccessible
|
|||
);
|
||||
|
||||
/** @brief Returns the role of an IAccessible2 object.
|
||||
|
||||
Note: For convenience MSAA roles are also passed through this method so the
|
||||
AT doesn't have to also fetch roles through MSAA's get_accRole.
|
||||
@param [out] role
|
||||
The role of an IAccessible2 object.
|
||||
*/
|
||||
|
@ -153,14 +155,30 @@ interface IAccessible2 : IAccessible
|
|||
[out, retval] long *role
|
||||
);
|
||||
|
||||
/** @brief Makes an object visible on screen.
|
||||
@param [in] topLeft
|
||||
If false then it will scroll the shortest distance it needs to put
|
||||
the element on-screen.
|
||||
/** @brief Makes an object visible on the screen.
|
||||
@param [in] scrollType
|
||||
Defines where the object should be placed on the screen.
|
||||
*/
|
||||
HRESULT scrollTo
|
||||
(
|
||||
[in] boolean topLeft
|
||||
[in] enum IA2ScrollType scrollType
|
||||
);
|
||||
|
||||
/** @brief Moves the top left of an object to a specified location.
|
||||
|
||||
Note: S_FALSE is returned if the object is already at the specified location.
|
||||
@param [in] coordinateType
|
||||
Specifies whether the coordinates are relative to the screen or the parent object.
|
||||
@param [in] x
|
||||
Defines the x coordinate.
|
||||
@param [in] y
|
||||
Defines the y coordinate.
|
||||
*/
|
||||
HRESULT scrollToPoint
|
||||
(
|
||||
[in] enum IA2CoordinateType coordinateType,
|
||||
[in] long x,
|
||||
[in] long y
|
||||
);
|
||||
|
||||
/** @brief Returns grouping information.
|
||||
|
@ -182,17 +200,6 @@ interface IAccessible2 : IAccessible
|
|||
[out, retval] long *positionInGroup
|
||||
);
|
||||
|
||||
/** @brief Returns the localized role name.
|
||||
|
||||
Valid if the role is an IAccessible2 role; not to be used for MSAA roles.
|
||||
|
||||
@param [out] localizedRoleName
|
||||
*/
|
||||
[propget] HRESULT localizedRoleName
|
||||
(
|
||||
[out, retval] BSTR *localizedRoleName
|
||||
);
|
||||
|
||||
/** @brief Returns the bit strip containing any IAccessible2 states.
|
||||
@param [out] states
|
||||
*/
|
||||
|
@ -201,18 +208,6 @@ interface IAccessible2 : IAccessible
|
|||
[out, retval] AccessibleStates *states
|
||||
);
|
||||
|
||||
/** @brief Returns localized state names (array of strings).
|
||||
@param [in] maxLocalizedStateNames
|
||||
@param [out] localizedStateNames
|
||||
@param [out] nLocalizedStateNames
|
||||
*/
|
||||
[propget] HRESULT localizedStateNames
|
||||
(
|
||||
[in] long maxLocalizedStateNames,
|
||||
[out, size_is(,maxLocalizedStateNames), length_is(,*nLocalizedStateNames)] BSTR **localizedStateNames,
|
||||
[out, retval] long *nLocalizedStateNames
|
||||
);
|
||||
|
||||
/** @brief Returns the extended role.
|
||||
|
||||
An extended role is a role which is dynamically generated by the application.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* IAccessible2 IDL Specification
|
||||
*
|
||||
* Copyright (c) IBM Corp. 2006
|
||||
* Copyright (c) IBM Corp. 2007
|
||||
* Copyright (c) Sun Microsystems, Inc. 2000, 2006
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -27,32 +27,6 @@ import "objidl.idl";
|
|||
import "oaidl.idl";
|
||||
import "oleacc.idl";
|
||||
|
||||
|
||||
/** @defgroup grpIAccessibleApplication Constants used with IAccessibleApplication */
|
||||
///@{
|
||||
/** This constant is used when requesting the IAccessibleApplication interface
|
||||
via a call to AccessibleObjectFromWindow.
|
||||
|
||||
The following describes how an MSAA/IA2 server will provide an object
|
||||
implementing the IAccessibleApplication interface. For any and all
|
||||
windows in an application, the server will respond to the WM_GETOBJECT
|
||||
message by returning an IAccessible pointer to an object which implements the
|
||||
IAccessibleApplication interface, provided that OBJID_IAAPPLICATION is the
|
||||
DWORD value received in the dwObjId parameter of the message handler.
|
||||
|
||||
The WM_GETOBJECT message handler is expected to increment the reference count
|
||||
for the returned object by 1.
|
||||
|
||||
The client may use AccessibleObjectFromWindow to get the IAccessibleApplication
|
||||
interface at any time during the life of a window, by specifying idObject as
|
||||
OBJID_IAAPPLICATION.
|
||||
|
||||
The riid parameter on the call to AccessibleObjectFromWindow should be
|
||||
IID_IAccessibleApplication.
|
||||
*/
|
||||
const long OBJID_IAAPPLICATION = 0xffffff00;
|
||||
///@}
|
||||
|
||||
/** @brief This interface gives access to the application's name and version information.
|
||||
|
||||
This interface provides the AT with the information it needs to differentiate
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* IAccessible2 IDL Specification
|
||||
*
|
||||
* Copyright (c) IBM Corp. 2006
|
||||
* Copyright (c) IBM Corp. 2007
|
||||
* Copyright (c) Sun Microsystems, Inc. 2000, 2006
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -26,16 +26,9 @@
|
|||
import "objidl.idl";
|
||||
import "oaidl.idl";
|
||||
import "oleacc.idl";
|
||||
import "Accessible2.idl";
|
||||
|
||||
typedef long IA2Color;
|
||||
|
||||
/// A structure containing an x and y value.
|
||||
typedef struct {
|
||||
long x; ///< x coordinate
|
||||
long y; ///< y corrdinate
|
||||
} IA2Point;
|
||||
|
||||
/** @brief This interface is implemented by any object that can be rendered
|
||||
on the screen.
|
||||
|
||||
|
@ -58,7 +51,7 @@ interface IAccessibleComponent : IUnknown
|
|||
{
|
||||
|
||||
/** @brief Returns the location of the upper left corner of the object's
|
||||
bounding box relative to the parent.
|
||||
bounding box relative to the immediate parent object.
|
||||
|
||||
The coordinates of the bounding box are given relative to the parent's
|
||||
coordinate system. The coordinates of the returned position are relative
|
||||
|
@ -66,11 +59,13 @@ interface IAccessibleComponent : IUnknown
|
|||
is rendered if it has no parent. If the object is not on any screen
|
||||
the returned position is (0,0).
|
||||
|
||||
@param [out] locationInParent
|
||||
@param [out] x
|
||||
@param [out] y
|
||||
*/
|
||||
[propget] HRESULT locationInParent
|
||||
(
|
||||
[out, retval] IA2Point *locationInParent
|
||||
[out] long *x,
|
||||
[out, retval] long *y
|
||||
);
|
||||
|
||||
/** @brief Returns the foreground color of this object.
|
||||
|
|
|
@ -101,9 +101,9 @@ enum IA2EventID {
|
|||
*/
|
||||
IA2_EVENT_PAGE_CHANGED,
|
||||
|
||||
/** An object's role changed.
|
||||
/** The caret moved from one section to the next.
|
||||
*/
|
||||
IA2_EVENT_ROLE_CHANGED,
|
||||
IA2_EVENT_SECTION_CHANGED,
|
||||
|
||||
/** A table caption changed.
|
||||
*/
|
||||
|
@ -147,6 +147,10 @@ enum IA2EventID {
|
|||
*/
|
||||
IA2_EVENT_TEXT_CHANGED,
|
||||
|
||||
/** The caret moved from one column to the next.
|
||||
*/
|
||||
IA2_EVENT_TEXT_COLUMN_CHANGED,
|
||||
|
||||
/** Text was inserted.
|
||||
*/
|
||||
IA2_EVENT_TEXT_INSERTED,
|
||||
|
@ -167,14 +171,6 @@ enum IA2EventID {
|
|||
of an accessible object. This includes for example most of the
|
||||
attributes available via the IAccessibleComponent interface.
|
||||
*/
|
||||
IA2_EVENT_VISIBLE_DATA_CHANGED,
|
||||
|
||||
/** The caret moved from one column to the next.
|
||||
*/
|
||||
IA2_EVENT_COLUMN_CHANGED,
|
||||
|
||||
/** The caret moved from one section to the next.
|
||||
*/
|
||||
IA2_EVENT_SECTION_CHANGED
|
||||
IA2_EVENT_VISIBLE_DATA_CHANGED
|
||||
|
||||
};
|
||||
|
|
|
@ -26,13 +26,7 @@
|
|||
import "objidl.idl";
|
||||
import "oaidl.idl";
|
||||
import "oleacc.idl";
|
||||
|
||||
enum IA2ImageCoordinateType {
|
||||
/// The returned coordinates are relative to the screen.
|
||||
IA2_IMAGE_COORDTYPE_SCREEN_RELATIVE,
|
||||
/// The returned coordinates are relative to the upper left corner of parent's bounding box.
|
||||
IA2_IMAGE_COORDTYPE_PARENT_RELATIVE
|
||||
};
|
||||
import "IA2CommonTypes.idl";
|
||||
|
||||
/** @brief This interface represents images and icons.
|
||||
|
||||
|
@ -67,7 +61,7 @@ interface IAccessibleImage : IUnknown
|
|||
*/
|
||||
[propget] HRESULT imagePosition
|
||||
(
|
||||
[in] enum IA2ImageCoordinateType coordinateType,
|
||||
[in] enum IA2CoordinateType coordinateType,
|
||||
[out] long *x,
|
||||
[out, retval] long *y
|
||||
);
|
||||
|
|
|
@ -39,8 +39,14 @@ enum IA2Role {
|
|||
*/
|
||||
IA2_ROLE_UNKNOWN = 0,
|
||||
|
||||
/** An object that can be drawn into and to manage events from the objects
|
||||
drawn into it. Also refer to ::IA2_ROLE_FRAME,
|
||||
::IA2_ROLE_GLASS_PANE, and ::IA2_ROLE_LAYERED_PANE.
|
||||
*/
|
||||
IA2_ROLE_CANVAS = 0x401,
|
||||
|
||||
/// A caption describing another object.
|
||||
IA2_ROLE_CAPTION = 0x401,
|
||||
IA2_ROLE_CAPTION,
|
||||
|
||||
/// Used for check buttons that are menu items.
|
||||
IA2_ROLE_CHECK_MENU_ITEM,
|
||||
|
@ -57,7 +63,7 @@ enum IA2Role {
|
|||
IA2_ROLE_DESKTOP_ICON,
|
||||
|
||||
/** A desktop pane. A pane that supports internal frames and iconified
|
||||
versions of those internal frames.
|
||||
versions of those internal frames. Also refer to ::IA2_ROLE_INTERNAL_FRAME.
|
||||
*/
|
||||
IA2_ROLE_DESKTOP_PANE,
|
||||
|
||||
|
@ -104,13 +110,13 @@ enum IA2Role {
|
|||
|
||||
/** Frame role. A top level window with a title bar, border, menu bar, etc.
|
||||
It is often used as the primary window for an application. Also refer to
|
||||
the MSAA roles of dialog, canvas, and window.
|
||||
::IA2_ROLE_CANVAS and the MSAA roles of dialog and window.
|
||||
*/
|
||||
IA2_ROLE_FRAME,
|
||||
|
||||
/** A glass pane. A pane that is guaranteed to be painted on top of all
|
||||
panes beneath it.
|
||||
Also refer to ::IA2_ROLE_ROOT_PANE and MSAA's canvas role.
|
||||
/** A glass pane. A pane that is guaranteed to be painted on top of all panes
|
||||
beneath it. Also refer to ::IA2_ROLE_CANVAS, ::IA2_ROLE_INTERNAL_FRAME, and
|
||||
::IA2_ROLE_ROOT_PANE.
|
||||
*/
|
||||
IA2_ROLE_GLASS_PANE,
|
||||
|
||||
|
@ -139,7 +145,7 @@ enum IA2Role {
|
|||
/** An internal frame. A frame-like object that is clipped by a desktop pane.
|
||||
The desktop pane, internal frame, and desktop icon objects are often used to
|
||||
create multiple document interfaces within an application.
|
||||
Also refer to ::IA2_ROLE_DESKTOP_ICON, ::IA2_ROLE_DESKTOP_PANE, and ::IA2_ROLE_FRAME
|
||||
Also refer to ::IA2_ROLE_DESKTOP_ICON, ::IA2_ROLE_DESKTOP_PANE, and ::IA2_ROLE_FRAME.
|
||||
*/
|
||||
IA2_ROLE_INTERNAL_FRAME,
|
||||
|
||||
|
@ -150,14 +156,14 @@ enum IA2Role {
|
|||
in layers, providing a form of stacking order. This is usually the pane that
|
||||
holds the menu bar as well as the pane that contains most of the visual
|
||||
components in a window.
|
||||
Also refer to ::IA2_ROLE_GLASS_PANE and ::IA2_ROLE_ROOT_PANE.
|
||||
Also refer to ::IA2_ROLE_CANVAS, ::IA2_ROLE_GLASS_PANE, and ::IA2_ROLE_ROOT_PANE.
|
||||
*/
|
||||
IA2_ROLE_LAYERED_PANE,
|
||||
|
||||
/// An embedded note which is not visible until activated.
|
||||
IA2_ROLE_NOTE,
|
||||
|
||||
/** A specialized pane whose primary use is inside a DIALOG.
|
||||
/** A specialized pane whose primary use is inside a dialog.
|
||||
Also refer to MSAA's dialog role.
|
||||
*/
|
||||
IA2_ROLE_OPTION_PANE,
|
||||
|
@ -218,6 +224,14 @@ enum IA2Role {
|
|||
*/
|
||||
IA2_ROLE_SPLIT_PANE,
|
||||
|
||||
/** An object that forms part of a menu system but which can be "undocked"
|
||||
from or "torn off" the menu system to exist as a separate window.
|
||||
*/
|
||||
IA2_ROLE_TEAR_OFF_MENU,
|
||||
|
||||
/// An object used as a terminal emulator.
|
||||
IA2_ROLE_TERMINAL,
|
||||
|
||||
/// Collection of objects that constitute a logical text entity.
|
||||
IA2_ROLE_TEXT_FRAME,
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* IAccessible2 IDL Specification
|
||||
*
|
||||
* Copyright (c) IBM Corp. 2006
|
||||
* Copyright (c) IBM Corp. 2007
|
||||
* Copyright (c) Sun Microsystems, Inc. 2000, 2006
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -50,11 +50,8 @@ const long IA2_STATE_HORIZONTAL = 0x10;
|
|||
/** Indicates this object is minimized and is represented only by an icon. */
|
||||
const long IA2_STATE_ICONIFIED = 0x20;
|
||||
|
||||
/** Indicates an invalid state. */
|
||||
const long IA2_STATE_INVALID = 0x40;
|
||||
|
||||
/** Indicates an input validation failure. */
|
||||
const long IA2_STATE_INVALID_ENTRY = 0x80;
|
||||
const long IA2_STATE_INVALID_ENTRY = 0x40;
|
||||
|
||||
/** Indicates that this object manages its children.
|
||||
|
||||
|
@ -66,36 +63,36 @@ const long IA2_STATE_INVALID_ENTRY = 0x80;
|
|||
over all the children and add listeners. The parent object will provide state
|
||||
notifications regarding the state of its children.
|
||||
*/
|
||||
const long IA2_STATE_MANAGES_DESCENDANTS = 0x100;
|
||||
const long IA2_STATE_MANAGES_DESCENDANTS = 0x80;
|
||||
|
||||
/** Indicates that an object is modal.
|
||||
|
||||
Modal objects have the behavior that something must be done with the object
|
||||
before the user can interact with an object in a different window.
|
||||
*/
|
||||
const long IA2_STATE_MODAL = 0x200;
|
||||
const long IA2_STATE_MODAL = 0x100;
|
||||
|
||||
/** Indicates this text object can contain multiple lines of text. */
|
||||
const long IA2_STATE_MULTI_LINE = 0x400;
|
||||
const long IA2_STATE_MULTI_LINE = 0x200;
|
||||
|
||||
/** Indicates this object paints every pixel within its rectangular region. */
|
||||
const long IA2_STATE_OPAQUE = 0x800;
|
||||
const long IA2_STATE_OPAQUE = 0x400;
|
||||
|
||||
/** Indicates that user interaction is required.
|
||||
|
||||
An example of when this state is used is when a field in a form must be filled
|
||||
before a form can be processed.
|
||||
*/
|
||||
const long IA2_STATE_REQUIRED = 0x1000;
|
||||
const long IA2_STATE_REQUIRED = 0x800;
|
||||
|
||||
/** Indicates an object which supports text selection.
|
||||
|
||||
Note: This is different than MSAA STATE_SYSTEM_SELECTABLE.
|
||||
*/
|
||||
const long IA2_STATE_SELECTABLE_TEXT = 0x2000;
|
||||
const long IA2_STATE_SELECTABLE_TEXT = 0x1000;
|
||||
|
||||
/** Indicates that this text object can contain only a single line of text. */
|
||||
const long IA2_STATE_SINGLE_LINE = 0x4000;
|
||||
const long IA2_STATE_SINGLE_LINE = 0x2000;
|
||||
|
||||
/** Indicates that the accessible object is stale.
|
||||
|
||||
|
@ -104,7 +101,7 @@ const long IA2_STATE_SINGLE_LINE = 0x4000;
|
|||
object is transient or when an object has been or is in the process of being
|
||||
destroyed.
|
||||
*/
|
||||
const long IA2_STATE_STALE = 0x8000;
|
||||
const long IA2_STATE_STALE = 0x4000;
|
||||
|
||||
/** Indicates that the object implements autocompletion.
|
||||
|
||||
|
@ -112,12 +109,12 @@ const long IA2_STATE_STALE = 0x8000;
|
|||
one ore more characters and cause a sub-item to become selected. The
|
||||
selection may also result in events fired on the parent object.
|
||||
*/
|
||||
const long IA2_STATE_SUPPORTS_AUTOCOMPLETION = 0x10000;
|
||||
const long IA2_STATE_SUPPORTS_AUTOCOMPLETION = 0x8000;
|
||||
|
||||
/** Indicates this object is transient. */
|
||||
const long IA2_STATE_TRANSIENT = 0x20000;
|
||||
const long IA2_STATE_TRANSIENT = 0x10000;
|
||||
|
||||
/** Indicates the orientation of this object is vertical. */
|
||||
const long IA2_STATE_VERTICAL = 0x40000;
|
||||
const long IA2_STATE_VERTICAL = 0x20000;
|
||||
|
||||
///@}
|
||||
|
|
|
@ -61,8 +61,8 @@ typedef struct {
|
|||
interface IAccessibleTable : IUnknown
|
||||
{
|
||||
|
||||
/** @brief Returns the IAccessible2 object at the specified row and column in
|
||||
the table.
|
||||
/** @brief Returns the accessible object at the specified row and column in
|
||||
the table. This object could be an IAccessible or an IAccessible2.
|
||||
@param [in] row
|
||||
The row index for which to retrieve the cell.
|
||||
@param [in] column
|
||||
|
@ -76,17 +76,18 @@ interface IAccessibleTable : IUnknown
|
|||
(
|
||||
[in] long row,
|
||||
[in] long column,
|
||||
[out, retval] IAccessible2 **accessible
|
||||
[out, retval] IUnknown **accessible
|
||||
);
|
||||
|
||||
/** @brief Returns the caption for the table.
|
||||
/** @brief Returns the caption for the table. The returned object could be
|
||||
an IAccessible or an IAccessible2.
|
||||
@param [out] accessible
|
||||
If the table has a caption then a reference to it is returned, else a NULL
|
||||
pointer is returned.
|
||||
*/
|
||||
[propget] HRESULT caption
|
||||
(
|
||||
[out, retval] IAccessible2 **accessible
|
||||
[out, retval] IUnknown **accessible
|
||||
);
|
||||
|
||||
/** @brief Translates the given row and column indices into the corresponding child index.
|
||||
|
@ -310,7 +311,8 @@ interface IAccessibleTable : IUnknown
|
|||
[out, retval] long *nRows
|
||||
);
|
||||
|
||||
/** @brief Returns the summary description of the table.
|
||||
/** @brief Returns the summary description of the table. The returned object could be
|
||||
an IAccessible or an IAccessible2.
|
||||
@param [out] accessible
|
||||
Returns a reference to an implementation dependent accessible object
|
||||
representing the table's summary or a NULL pointer if the table
|
||||
|
@ -318,7 +320,7 @@ interface IAccessibleTable : IUnknown
|
|||
*/
|
||||
[propget] HRESULT summary
|
||||
(
|
||||
[out, retval] IAccessible2 **accessible
|
||||
[out, retval] IUnknown **accessible
|
||||
);
|
||||
|
||||
/** @brief Returns a boolean value indicating whether the specified column is
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* IAccessible2 IDL Specification
|
||||
*
|
||||
* Copyright (c) IBM Corp. 2006
|
||||
* Copyright (c) IBM Corp. 2007
|
||||
* Copyright (c) Sun Microsystems, Inc. 2000, 2006
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -26,6 +26,7 @@
|
|||
import "objidl.idl";
|
||||
import "oaidl.idl";
|
||||
import "oleacc.idl";
|
||||
import "IA2CommonTypes.idl";
|
||||
|
||||
/// A structure containing a substring and the start and end offsets in the enclosing string.
|
||||
typedef struct {
|
||||
|
@ -34,14 +35,11 @@ typedef struct {
|
|||
long end; ///< Index of the character following the last character of the segment in the enclosing text.
|
||||
} IA2TextSegment;
|
||||
|
||||
enum IA2TextCoordinateType {
|
||||
/// The returned coordinates are relative to the screen.
|
||||
IA2_COORDTYPE_SCREEN_RELATIVE,
|
||||
/// The returned coordinates are relative to the upper left corner of parent's bounding box.
|
||||
IA2_COORDTYPE_PARENT_RELATIVE
|
||||
};
|
||||
/** @brief Defines values to specify a text boundary type.
|
||||
|
||||
If one of these is not implemented, such as IA2_TEXT_BOUNDARY_SENTENCE, S_FALSE is returned.
|
||||
*/
|
||||
|
||||
/// Defines values to specify a text boundary type
|
||||
enum IA2TextBoundaryType {
|
||||
IA2_TEXT_BOUNDARY_CHAR, ///< =0,
|
||||
IA2_TEXT_BOUNDARY_WORD, ///< Range is from start of one word to the start of another word.
|
||||
|
@ -155,7 +153,7 @@ interface IAccessibleText : IUnknown
|
|||
[propget] HRESULT characterExtents
|
||||
(
|
||||
[in] long offset,
|
||||
[in] enum IA2TextCoordinateType coordType,
|
||||
[in] enum IA2CoordinateType coordType,
|
||||
[out] long *x,
|
||||
[out] long *y,
|
||||
[out] long *width,
|
||||
|
@ -195,7 +193,7 @@ interface IAccessibleText : IUnknown
|
|||
(
|
||||
[in] long x,
|
||||
[in] long y,
|
||||
[in] enum IA2TextCoordinateType coordType,
|
||||
[in] enum IA2CoordinateType coordType,
|
||||
[out, retval] long *offset
|
||||
);
|
||||
|
||||
|
@ -235,7 +233,7 @@ interface IAccessibleText : IUnknown
|
|||
and up to the character at endOffset (exclusive), if startOffset is less than
|
||||
or equal to endOffset.
|
||||
|
||||
NOTE: returned string may be longer than endOffset-startOffset bytes if text
|
||||
Note: returned string may be longer than endOffset-startOffset bytes if text
|
||||
contains multi-byte characters.
|
||||
*/
|
||||
[propget] HRESULT text
|
||||
|
@ -398,7 +396,7 @@ interface IAccessibleText : IUnknown
|
|||
|
||||
/** @brief Returns total number of characters.
|
||||
|
||||
NOTE: this may be different than the total number of bytes required to store the
|
||||
Note: This may be different than the total number of bytes required to store the
|
||||
text, if the text contains multi-byte characters.
|
||||
@param [out] nCharacters
|
||||
*/
|
||||
|
@ -412,12 +410,37 @@ interface IAccessibleText : IUnknown
|
|||
0-based character offset.
|
||||
@param [in] endIndex
|
||||
0-based character offset - the offset of the character just past the last character of the string.
|
||||
|
||||
@param [in] scrollType
|
||||
Defines where the object should be placed on the screen.
|
||||
*/
|
||||
HRESULT scrollToSubstring
|
||||
HRESULT scrollSubstringTo
|
||||
(
|
||||
[in] long startIndex,
|
||||
[in] long endIndex
|
||||
[in] long endIndex,
|
||||
[in] enum IA2ScrollType scrollType
|
||||
);
|
||||
|
||||
/** @brief Moves the top left of a substring to a specified location.
|
||||
|
||||
Note: S_FALSE is returned if the object is already at the specified location.
|
||||
@param [in] startIndex
|
||||
0-based character offset.
|
||||
@param [in] endIndex
|
||||
0-based character offset - the offset of the character just past the last character of the string.
|
||||
@param [in] coordinateType
|
||||
Specifies whether the coordinates are relative to the screen or the parent object.
|
||||
@param [in] x
|
||||
Defines the x coordinate.
|
||||
@param [in] y
|
||||
Defines the y coordinate.
|
||||
*/
|
||||
HRESULT scrollSubstringToPoint
|
||||
(
|
||||
[in] long startIndex,
|
||||
[in] long endIndex,
|
||||
[in] enum IA2CoordinateType coordinateType,
|
||||
[in] long x,
|
||||
[in] long y
|
||||
);
|
||||
|
||||
/** @brief Returns any inserted text.
|
||||
|
|
Загрузка…
Ссылка в новой задаче