Fix for bug 376753 - Allow QueryInterface to IA2 witout crashing, patches=aaronlev, me, r=me, aaronlev
authorsurkov.alexander@gmail.com
Sat, 07 Apr 2007 20:58:08 -0700
changeset 404 89c508adc69d67626f6b63672b324b270a089667
parent 403 596ecd9aa2e84a7a84573d25edb4478a42c7ab66
child 405 0f90734acfae709b9e60c336c063c684b5a55fc7
push idunknown
push userunknown
push dateunknown
reviewersme, aaronlev
bugs376753
milestone1.9a4pre
Fix for bug 376753 - Allow QueryInterface to IA2 witout crashing, patches=aaronlev, me, r=me, aaronlev
accessible/public/ia2/Makefile.in
accessible/public/nsIAccessibleEvent.idl
accessible/src/msaa/nsAccessibleWrap.cpp
accessible/src/msaa/nsAccessibleWrap.h
accessible/src/msaa/nsEventMap.h
accessible/src/msaa/nsRoleMap.h
other-licenses/ia2/Accessible2.idl
other-licenses/ia2/AccessibleApplication.idl
other-licenses/ia2/AccessibleComponent.idl
other-licenses/ia2/AccessibleEventId.idl
other-licenses/ia2/AccessibleImage.idl
other-licenses/ia2/AccessibleRole.idl
other-licenses/ia2/AccessibleStates.idl
other-licenses/ia2/AccessibleTable.idl
other-licenses/ia2/AccessibleText.idl
--- a/accessible/public/ia2/Makefile.in
+++ b/accessible/public/ia2/Makefile.in
@@ -71,16 +71,17 @@ MIDL_INTERFACES = \
   AccessibleText.idl \
   AccessibleValue.idl \
   $(NULL)
 
 MIDL_ENUMS = \
   AccessibleEventId.idl \
   AccessibleRole.idl \
   AccessibleStates.idl \
+  IA2CommonTypes.idl \
   $(NULL)
 
 EXPORTS = \
   $(MIDL_INTERFACES:%.idl=%.h) \
   $(MIDL_INTERFACES:%.idl=%_i.c) \
   $(MIDL_ENUMS:%.idl=%.h) \
   $(NULL)
 
--- a/accessible/public/nsIAccessibleEvent.idl
+++ b/accessible/public/nsIAccessibleEvent.idl
@@ -56,17 +56,17 @@ interface nsIDOMNode;
  * using code something like this:
  *   nsCOMPtr<nsIObserverService> observerService = 
  *     do_GetService("@mozilla.org/observer-service;1", &rv);
  *   if (NS_SUCCEEDED(rv)) 
  *     rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
  *
  * @status UNDER_REVIEW
  */
-[scriptable, uuid(cc8d6414-90cf-450a-8c18-8bf8302d00b7)]
+[scriptable, uuid(18612bcb-79bd-45c1-92e9-07aded5fd0f5)]
 interface nsIAccessibleEvent : nsISupports
 {
   /**
    * An object has been created.
    */
   const unsigned long EVENT_CREATE = 0x0001;
 
   /**
@@ -346,17 +346,17 @@ interface nsIAccessibleEvent : nsISuppor
    * of an accessible object.  This includes for example most of the
    * attributes available via the IAccessibleComponent interface.
    */
   const unsigned long EVENT_VISIBLE_DATA_CHANGED = 0x0039;
 
   /**
    * 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.
    */
   const unsigned long EVENT_SECTION_CHANGED = 0x003B;
 
   /**
    * A table caption changed.
@@ -460,29 +460,24 @@ interface nsIAccessibleEvent : nsISuppor
 
   /**
    * A slide changed in a presentation document or a page boundary was
    * crossed in a word processing document.
    */
   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
    * defined in this interface.
    */
   readonly attribute unsigned long eventType;
   
   /**
--- a/accessible/src/msaa/nsAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsAccessibleWrap.cpp
@@ -112,18 +112,18 @@ STDMETHODIMP nsAccessibleWrap::QueryInte
     *ppv = NS_STATIC_CAST(IAccessible*, this);
   else if (IID_IEnumVARIANT == iid && !gIsEnumVariantSupportDisabled) {
     long numChildren;
     get_accChildCount(&numChildren);
     if (numChildren > 0)  // Don't support this interface for leaf elements
       *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);
 
   if (NULL == *ppv)
     return nsAccessNodeWrap::QueryInterface(iid, ppv);
 
   (NS_REINTERPRET_CAST(IUnknown*, *ppv))->AddRef();
   return S_OK;
@@ -1076,24 +1076,32 @@ nsAccessibleWrap::role(long *role)
                "MSAA role map skewed");
 
   *role = gWindowsRoleMap[xpRole].ia2Role;
 
   return S_OK;
 }
 
 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,
                                     long *aPositionInGroup)
 {
   PRInt32 groupLevel = 0;
   PRInt32 similarItemsInGroup = 0;
   PRInt32 positionInGroup = 0;
   nsresult rv = GroupPosition(&groupLevel, &similarItemsInGroup,
@@ -1105,22 +1113,16 @@ nsAccessibleWrap::get_groupPosition(long
    *aPositionInGroup = positionInGroup;
     return S_OK;
   }
 
   return E_FAIL;
 }
 
 STDMETHODIMP
-nsAccessibleWrap::get_localizedRoleName(BSTR *localizedRoleName)
-{
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP
 nsAccessibleWrap::get_states(AccessibleStates *aStates)
 {
   *aStates = 0;
 
   // XXX: bug 344674 should come with better approach that we have here.
 
   PRUint32 states = 0, extraStates = 0;
   nsresult rv = GetFinalState(&states, &extraStates);
@@ -1164,24 +1166,16 @@ nsAccessibleWrap::get_states(AccessibleS
     *aStates |= IA2_STATE_TRANSIENT;
   else if (extraStates & nsIAccessibleStates::EXT_STATE_VERTICAL)
     *aStates |= IA2_STATE_VERTICAL;
 
   return S_OK;
 }
 
 STDMETHODIMP
-nsAccessibleWrap::get_localizedStateNames(long maxLocalizedStateNames,
-                                          BSTR **localizedStateNames,
-                                          long *nLocalizedStateNames)
-{
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP
 nsAccessibleWrap::get_extendedRole(BSTR *extendedRole)
 {
   return E_NOTIMPL;
 }
 
 STDMETHODIMP
 nsAccessibleWrap::get_localizedExtendedRole(BSTR *localizedExtendedRole)
 {
@@ -1208,19 +1202,19 @@ nsAccessibleWrap::get_localizedExtendedS
                                               long *nLocalizedExtendedStates)
 {
   return E_NOTIMPL;
 }
 
 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;
 }
 
 STDMETHODIMP
 nsAccessibleWrap::get_windowHandle(HWND *windowHandle)
 {
--- a/accessible/src/msaa/nsAccessibleWrap.h
+++ b/accessible/src/msaa/nsAccessibleWrap.h
@@ -167,34 +167,31 @@ class nsAccessibleWrap : public nsAccess
         /* [in] */ long maxRelations,
         /* [length_is][size_is][out] */ IAccessibleRelation **relation,
         /* [retval][out] */ long *nRelations);
 
     virtual HRESULT STDMETHODCALLTYPE role(
             /* [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);
 
     virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedExtendedRole(
         /* [retval][out] */ BSTR *localizedExtendedRole);
 
     virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nExtendedStates(
         /* [retval][out] */ long *nExtendedStates);
--- a/accessible/src/msaa/nsEventMap.h
+++ b/accessible/src/msaa/nsEventMap.h
@@ -98,17 +98,17 @@ static const PRUint32 gWinEventMap[] = {
   IA2_EVENT_TEXT_ATTRIBUTE_CHANGED,                  // nsIAccessibleEvent::EVENT_TEXT_ATTRIBUTE_CHANGED
   IA2_EVENT_TEXT_CARET_MOVED,                        // nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED
   IA2_EVENT_TEXT_CHANGED,                            // nsIAccessibleEvent::EVENT_TEXT_CHANGED
   IA2_EVENT_TEXT_INSERTED,                           // nsIAccessibleEvent::EVENT_TEXT_INSERTED
   IA2_EVENT_TEXT_REMOVED,                            // nsIAccessibleEvent::EVENT_TEXT_REMOVED
   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
   IA2_EVENT_TABLE_SUMMARY_CHANGED,                   // nsIAccessibleEvent::EVENT_TABLE_SUMMARY_CHANGED
   IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED,           // nsIAccessibleEvent::EVENT_TABLE_ROW_DESCRIPTION_CHANGED
   IA2_EVENT_TABLE_ROW_HEADER_CHANGED,                // nsIAccessibleEvent::EVENT_TABLE_ROW_HEADER_CHANGED
   kEVENT_WIN_UNKNOWN,                                // nsIAccessibleEvent::EVENT_TABLE_ROW_INSERT
   kEVENT_WIN_UNKNOWN,                                // nsIAccessibleEvent::EVENT_TABLE_ROW_DELETE
@@ -131,13 +131,12 @@ static const PRUint32 gWinEventMap[] = {
   IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED,         // nsIAccessibleEvent::EVENT_HYPERLINK_SELECTED_LINK_CHANGED
   IA2_EVENT_HYPERTEXT_LINK_ACTIVATED,                // nsIAccessibleEvent::EVENT_HYPERTEXT_LINK_ACTIVATED
   IA2_EVENT_HYPERTEXT_LINK_SELECTED,                 // nsIAccessibleEvent::EVENT_HYPERTEXT_LINK_SELECTED
   IA2_EVENT_HYPERLINK_START_INDEX_CHANGED,           // nsIAccessibleEvent::EVENT_HYPERLINK_START_INDEX_CHANGED
   IA2_EVENT_HYPERTEXT_CHANGED,                       // nsIAccessibleEvent::EVENT_HYPERTEXT_CHANGED
   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
 };
 
--- a/accessible/src/msaa/nsRoleMap.h
+++ b/accessible/src/msaa/nsRoleMap.h
@@ -262,17 +262,17 @@ static const WindowsRoleMapItem gWindows
 
   // nsIAccessibleRole::ROLE_ACCEL_LABEL
   { ROLE_SYSTEM_STATICTEXT, ROLE_SYSTEM_STATICTEXT },
 
   // nsIAccessibleRole::ROLE_ARROW
   { 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 },
 
   // nsIAccessibleRole::ROLE_COLOR_CHOOSER
   { ROLE_SYSTEM_DIALOG, IA2_ROLE_COLOR_CHOOSER },
 
   // nsIAccessibleRole::ROLE_DATE_EDITOR
@@ -334,20 +334,20 @@ static const WindowsRoleMapItem gWindows
 
   // nsIAccessibleRole::ROLE_TABLE_COLUMN_HEADER
   { ROLE_SYSTEM_COLUMNHEADER, ROLE_SYSTEM_COLUMNHEADER },
 
   // nsIAccessibleRole::ROLE_TABLE_ROW_HEADER
   { 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 },
 
   // nsIAccessibleRole::ROLE_TOGGLE_BUTTON
   { USE_ROLE_STRING, IA2_ROLE_TOGGLE_BUTTON },
 
   // nsIAccessibleRole::ROLE_TREE_TABLE
--- a/other-licenses/ia2/Accessible2.idl
+++ b/other-licenses/ia2/Accessible2.idl
@@ -35,30 +35,29 @@
   IAccessibleImage\n
   IAccessibleRelation\n
   IAccessibleTable\n
   IAccessibleText\n
   IAccessibleEditableText\n
   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
 
  @section _license License
   @ref _licensePage "LGPL"
 
  @page _licensePage License
   IAccessible2 IDL Specification
@@ -81,20 +80,20 @@
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02110-1301  USA
 
   You may also refer to http://www.gnu.org/licenses/lgpl.html
 
 **/
 
 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 {
   BSTR language; ///< ISO 639-1 Alpha-2 two character language code
   BSTR country;  ///< ISO 3166-1 Alpha-2 two character country code
   BSTR variant;  ///< Application specific variant of the locale
 } IA2Locale;
 
@@ -140,32 +139,51 @@ interface IAccessible2 : IAccessible
     (
      [in] long maxRelations, 
      [out, size_is(maxRelations), length_is(*nRelations)]
        IAccessibleRelation **relation, 
      [out, retval] long *nRelations 
     );
 
   /** @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.  
   */
   HRESULT role
     (
      [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.
    
    Used for tree items, list items, tab panel labels, radio buttons, etc.
    Also used for collectons of non-text objects.
 
    @param [out] groupLevel
@@ -177,47 +195,24 @@ interface IAccessible2 : IAccessible
   */
   [propget] HRESULT groupPosition
     (
      [out] long *groupLevel,
      [out] long *similarItemsInGroup,
      [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
   */
   [propget] HRESULT states
     (
 	 [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.
    It is not predefined by the IAccessible2 specification.
    
    @param [out] extendedRole
   */
   [propget] HRESULT extendedRole
--- a/other-licenses/ia2/AccessibleApplication.idl
+++ b/other-licenses/ia2/AccessibleApplication.idl
@@ -1,15 +1,15 @@
 /*************************************************************************
  *
  *  File Name (AccessibleApplication.idl)
  *
  *  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
  *  modify it under the terms of the GNU Lesser General Public
  *  License version 2.1, as published by the Free Software Foundation; either
  *  version 2.1 of the License, or (at your option) any later version.
  *
  *  This library is distributed in the hope that it will be useful,
@@ -22,42 +22,16 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02110-1301  USA
  *
  ************************************************************************/
 
 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 
  this application from other applications, from other versions of this 
  application, or from other versions of this application running on different 
  versions of an accessibility bridge or accessbility toolkit.
 */
 [object, uuid(D49DED83-5B25-43F4-9B95-93B44595979E)]
--- a/other-licenses/ia2/AccessibleComponent.idl
+++ b/other-licenses/ia2/AccessibleComponent.idl
@@ -1,15 +1,15 @@
 /*************************************************************************
  *
  *  File Name (AccessibleComponent.idl)
  *
  *  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
  *  modify it under the terms of the GNU Lesser General Public
  *  License version 2.1, as published by the Free Software Foundation; either
  *  version 2.1 of the License, or (at your option) any later version.
  *
  *  This library is distributed in the hope that it will be useful,
@@ -21,26 +21,19 @@
  *  License along with this library; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02110-1301  USA
  *
  ************************************************************************/
 
 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.
 
  This interface provides the standard mechanism for an assistive technology
   to retrieve information concerning the graphical representation of an object. 
   Coordinates used by the functions of this interface are specified in
   different coordinate systems.  Their scale is the same and is equal to
   that of the screen coordiante system.  In other words all coordinates
@@ -53,29 +46,31 @@ typedef struct {
     system is used instead.</li>
   </ul>
 */
 [object, uuid(1546D4B0-4C98-4bda-89AE-9A64748BDDE4)]
 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 
 	to this object's parent or relative to the screen on which this object
     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.
    @param [out] foreground
     The returned color is the foreground color of this object or, if
     that is not supported, the default foreground color.
   */ 
   [propget] HRESULT foreground
--- a/other-licenses/ia2/AccessibleEventId.idl
+++ b/other-licenses/ia2/AccessibleEventId.idl
@@ -96,20 +96,20 @@ enum IA2EventID {
   */
   IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED,
 
   /** A slide changed in a presentation document or a page boundary was 
    crossed in a word processing document.
   */
   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.
   */
   IA2_EVENT_TABLE_CAPTION_CHANGED,
 
   /** A table's column description changed.
   */
   IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED,
 
@@ -142,16 +142,20 @@ enum IA2EventID {
   */
   IA2_EVENT_TEXT_CARET_MOVED,
 
   /** This event indicates general text changes, i.e. changes to text that is 
     exposed through the IAccessibleText and IAccessibleEditableText interfaces.
   */
   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,
 
   /** Text was removed.
   */
   IA2_EVENT_TEXT_REMOVED,
 
@@ -162,19 +166,11 @@ enum IA2EventID {
   /** The text selection changed.
   */
   IA2_EVENT_TEXT_SELECTION_CHANGED,
 
   /** A visibile data event indicates the change of the visual appearance
     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
 
 };
--- a/other-licenses/ia2/AccessibleImage.idl
+++ b/other-licenses/ia2/AccessibleImage.idl
@@ -21,23 +21,17 @@
  *  License along with this library; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02110-1301  USA
  *
  ************************************************************************/
 
 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.
 
  This interface is used for a representation of images like icons on buttons.
   IAccessibleImage only needs to be implemented in certain situations.  Some
   examples are:
   <ol>
    <li>The accessible name and description are not enough to fully
@@ -62,17 +56,17 @@ interface IAccessibleImage : IUnknown
   /** @brief Returns the coordinates of the image.
    @param [in] coordinateType
     Specifies whether the returned coordinates should be relative to the screen or the parent object.
    @param [out] x
    @param [out] y
   */
   [propget] HRESULT imagePosition
     (
-	 [in] enum IA2ImageCoordinateType coordinateType,
+	 [in] enum IA2CoordinateType coordinateType,
 	 [out] long *x,
      [out, retval] long *y
     );
 
   /** @brief Returns the size of the image in units specified by parent's coordinate system.
    @param [out] height
    @param [out] width
   */
--- a/other-licenses/ia2/AccessibleRole.idl
+++ b/other-licenses/ia2/AccessibleRole.idl
@@ -34,35 +34,41 @@ import "objidl.idl";
 */
 enum IA2Role {
 
   /** Unknown role. The object contains some Accessible information, but its 
    role is not known.
   */
   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,
 
   /// A specialized dialog that lets the user choose a color.
   IA2_ROLE_COLOR_CHOOSER,
 
   /// A date editor.
   IA2_ROLE_DATE_EDITOR,
 
   /** An iconified internal frame in an ::IA2_ROLE_DESKTOP_PANE. 
    Also refer to ::IA2_ROLE_INTERNAL_FRAME.
   */
   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,
 
   /** A directory pane. A pane that allows the user to navigate through 
    and select the contents of a directory. May be used by a file chooser.   
    Also refer to ::IA2_ROLE_FILE_CHOOSER.
   */
   IA2_ROLE_DIRECTORY_PANE,
@@ -98,24 +104,24 @@ enum IA2Role {
   IA2_ROLE_FOOTNOTE,
 
   /** A container of form controls.  An example of the use of this role is to
    represent an HTML FORM tag.
   */
   IA2_ROLE_FORM,
 
   /** 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.
+   It is often used as the primary window for an application.  Also refer to
+   ::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,
 
   /** Header of a document page.
    Also refer to ::IA2_ROLE_FOOTER.
   */
   IA2_ROLE_HEADER,
 
@@ -134,35 +140,35 @@ enum IA2Role {
   /** An object which is used to allow input of characters not found on a keyboard,
    such as the input of Chinese characters on a Western keyboard.
   */
   IA2_ROLE_INPUT_METHOD_WINDOW,
 
   /** 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,
 
   /// An object used to present an icon or short string in an interface.
   IA2_ROLE_LABEL,
 
   /** A layered pane. A specialized pane that allows its children to be drawn 
    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,
 
   /** An object representing a page of document content.  It is used in documents
    which are accessed by the user on a page by page basis.
   */
   IA2_ROLE_PAGE,
@@ -213,16 +219,24 @@ enum IA2Role {
   IA2_ROLE_SHAPE,
 
   /** A split pane. A specialized panel that presents two other panels at the 
    same time. Between the two panels is a divider the user can manipulate to make 
    one panel larger and the other panel smaller.
   */
   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,
 
   /** A toggle button. A specialized push button that can be checked or unchecked, 
    but does not provide a separate indicator for the current state.
    Also refer to MSAA's roles of push button, check box, and radio button.
    <BR><B>Note:</B> IA2_ROLE_TOGGLE_BUTTON should not be used.  Instead, use MSAA's 
    ROLE_SYSTEM_PUSHBUTTON and STATE_SYSTEM_PRESSED.
--- a/other-licenses/ia2/AccessibleStates.idl
+++ b/other-licenses/ia2/AccessibleStates.idl
@@ -1,15 +1,15 @@
 /*************************************************************************
  *
  *  File Name (AccessibleStates.idl)
  *
  *  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
  *  modify it under the terms of the GNU Lesser General Public
  *  License version 2.1, as published by the Free Software Foundation; either
  *  version 2.1 of the License, or (at your option) any later version.
  *
  *  This library is distributed in the hope that it will be useful,
@@ -45,79 +45,76 @@ const long IA2_STATE_DEFUNCT =					0x4;
 const long IA2_STATE_EDITABLE =					0x8;
 
 /** Indicates the orientation of this object is horizontal. */
 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.
 
  Used when children are transient.  In this case it is not necessary to add
   listeners to the children.
 
  The state is added to improve performance in the case of large containers such 
   as tables. When an object manages its children it is not necessary to iterate 
   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.
 
  This state is used when the accessible object no longer accurately 
   represents the state of the object which it is representing such as when an
   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.
 
  This state indicates that that a text control will respond to the input of 
  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;
 
 ///@}
--- a/other-licenses/ia2/AccessibleTable.idl
+++ b/other-licenses/ia2/AccessibleTable.idl
@@ -56,42 +56,43 @@ typedef struct {
   However, that range includes at least the intervals from the from the first row 
   or column with the index 0 up to the last (but not including) used row or column 
   as returned by IAccessibleTable::nRows and IAccessibleTable::nColumns.
 */
 [object, uuid(35AD8070-C20C-4fb4-B094-F4F7275DD469)]
 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
     The column index for which to retrieve the cell.
    @param [out] accessible
     If both row and column index are valid then the corresponding accessible 
     object is returned that represents the requested cell regardless of whether 
-    the cell is currently  visible (on the screen).
+    the cell is currently visible (on the screen).
   */
   [propget] HRESULT accessibleAt
     (
      [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.
    @param [in] rowIndex
     Index of the child of the table for which to return the row index.
    @param [in] columnIndex
     Index of the child of the table for which to return the column index.
    @param [out] childIndex
@@ -305,25 +306,26 @@ interface IAccessibleTable : IUnknown
   */
   [propget] HRESULT selectedRows
     (
      [in] long maxRows, 
      [out, size_is(,maxRows), length_is(,*nRows)] long **rows, 
      [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 
     does not support a summary.
   */
   [propget] HRESULT summary
     (
-     [out, retval] IAccessible2 **accessible 
+     [out, retval] IUnknown **accessible 
     );
 
   /** @brief Returns a boolean value indicating whether the specified column is 
     completely selected.
    @param [in] column
     Index of the column for which to determine whether it is selected.
    @param [out] isSelected
     Returns TRUE if the specified column is selected completely and FALSE otherwise.
--- a/other-licenses/ia2/AccessibleText.idl
+++ b/other-licenses/ia2/AccessibleText.idl
@@ -1,15 +1,15 @@
 /*************************************************************************
  *
  *  File Name (AccessibleText.idl)
  *
  *  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
  *  modify it under the terms of the GNU Lesser General Public
  *  License version 2.1, as published by the Free Software Foundation; either
  *  version 2.1 of the License, or (at your option) any later version.
  *
  *  This library is distributed in the hope that it will be useful,
@@ -21,32 +21,30 @@
  *  License along with this library; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02110-1301  USA
  *
  ************************************************************************/
 
 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 {
   BSTR text;	///< A copy of a segment of text taken from an enclosing paragraph.
   long start;	///< Index of the first character of the segment in the enclosing text.  
   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.
 
-/// 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.
+*/
+
 enum IA2TextBoundaryType {
   IA2_TEXT_BOUNDARY_CHAR,		///< =0, 
   IA2_TEXT_BOUNDARY_WORD,		///< Range is from start of one word to the start of another word.
   IA2_TEXT_BOUNDARY_SENTENCE,	///< Range is from start of one sentence to the start of another sentence.
   IA2_TEXT_BOUNDARY_PARAGRAPH,	///< Range is from start of one paragraph to the start of another paragraph.
   IA2_TEXT_BOUNDARY_LINE,		/**< Range is from start of one line to the start of another line. This
                                  often means that an end-of-line character will appear at the  end of 
 								 the range. However in the case of some apps an end-of-line character
@@ -150,17 +148,17 @@ interface IAccessibleText : IUnknown
    @param [out] width
     Width of the bounding box of the referenced character. 
    @param [out] height
     Height of the bounding box of the referenced character. 
   */
   [propget] HRESULT characterExtents
     (
      [in] long offset,
-     [in] enum IA2TextCoordinateType coordType,
+     [in] enum IA2CoordinateType coordType,
      [out] long *x,
      [out] long *y,
      [out] long *width,
      [out, retval] long *height
     );
 
 
   /** @brief Returns the number of active non-contiguous selections
@@ -190,17 +188,17 @@ interface IAccessibleText : IUnknown
    @param [out] offset
     Index of the character under the given point or -1 if the point
     is invalid or there is no character under the point.
     */
   [propget] HRESULT offsetAtPoint
     (
      [in] long x,
      [in] long y,
-     [in] enum IA2TextCoordinateType coordType,
+     [in] enum IA2CoordinateType coordType,
      [out, retval] long *offset
     );
 
   /** @brief Returns the character offsets of N-th active text selection
    @param [in] selectionIndex
     Index of selection (0-based).
    @param [out] startOffset
     0 based offset of first selected character
@@ -230,17 +228,17 @@ interface IAccessibleText : IUnknown
    @param [in] endOffset
     Index of the last character to exclude in the returned string. The valid range 
     is 0..length.
    @param [out] text
     Returns the substring starting with the character at startOffset (inclusive) 
     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
     (
      [in] long startOffset,
      [in] long endOffset,
      [out, retval] BSTR *text
     );
@@ -393,36 +391,61 @@ interface IAccessibleText : IUnknown
     (
      [in] long selectionIndex,
      [in] long startOffset,
      [in] long endOffset
     );
 
   /** @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
   */
   [propget] HRESULT nCharacters
     (
      [out, retval] long *nCharacters
     );
 
   /** @brief Makes a specific part of string visible on screen.
    @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] 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.
 
    Provided for use by the ::IA2_EVENT_TEXT_INSERTED and ::IA2_EVENT_TEXT_UPDATED 
     event handlers.
    @param [out] newText
     The text that was just inserted.