5 Java Access Bridge API
The Java Access Bridge API enables you to develop assistive technology applications for the Microsoft Windows operating system that work with Java applications. It contains native methods that enable you to view and manipulate information about GUI elements in a Java application, which is forwarded to your assistive technology application through Java Access Bridge.
Java Access Bridge API Files
The Java Access Bridge API can be found in four files: AccessBridgeCalls.h
and AccessBridgeCalls.c
(API calls), AccessBridgePackages.h
(data structures), and AccessBridgeCallbacks.h
(callbacks).
Location of Java Access Bridge API Files
Find the following Java Access Bridge API include (header) files in %JAVA_HOME%\include\win32\bridge
:
-
AccessBridgeCallbacks.h
-
AccessBridgeCalls.h
-
AccessBridgePackages.h
Find the file AccessBridgeCalls.c
, which defines
some key interfaces, in the JDK source code repository.
Java Access Bridge API Calls
The file AccessBridgeCalls.h
contains the Java Access Bridge API calls. To use them, compile the file AccessBridgeCalls.c
. The Java Access Bridge API calls act as the interface between your application and WindowsAccessBridge.dll
.
Initialization/Shutdown Functions
These two functions start and shut down Java Access Bridge.
BOOL initializeAccessBridge();
Starts Java Access Bridge. You can't use any part of the Java Access Bridge API until you call this function.
BOOL shutdownAccessBridge();
Shuts down Java Access Bridge. It's important to call this function when your application is finished using Java Access Bridge (before your application exists) so that Java Access Bridge can properly perform memory cleanup.
Note: Calling the function shutdownAccessBridge is not a substitute for releasing any data structures that are maintained by the JVM; do this by calling the function ReleaseJavaObject.
Gateway Functions
You typically call these functions before calling any other Java Access Bridge API function:
BOOL IsJavaWindow(HWND window);
Checks to see if the given window implements the Java Accessibility API.
BOOL GetAccessibleContextFromHWND(HWND target, long *vmID, AccessibleContext *ac);
Gets the
AccessibleContext
andvmID
values for the given window. Many Java Access Bridge functions require theAccessibleContext
andvmID
values.
Event Handling Functions
These take a function pointer to the function that will handle the event type. When you no longer are interested in receiving those types of events, call the function again, passing in theNULL
value. Find prototypes for the function pointers you need to pass into these functions in the file AccessBridgeCallbacks.h
. Java Access Bridge API Callbacks describes these prototypes.
General Functions
void ReleaseJavaObject(long vmID, Java_Object object);
Release the memory used by the Java object
object
, whereobject
is an object returned to you by Java Access Bridge. Java Access Bridge automatically maintains a reference to all Java objects that it returns to you in the JVM so they are not garbage collected. To prevent memory leaks, callReleaseJavaObject
on all Java objects returned to you by Java Access Bridge once you are finished with them.BOOL GetVersionInfo(long vmID, AccessBridgeVersionInfo *info);
Gets the version information of the instance of Java Access Bridge instance your application is using. You can use this information to determine the available functionality of your version of Java Access Bridge.
Note:
To determine the version of the JVM, you need to pass in a validvmID
; otherwise all that is returned is the version of theWindowsAccessBridge.DLL
file to which your application is connected.
Accessible Context Functions
These functions provide the core of the Java Accessibility API that is exposed by Java Access Bridge.
The functions GetAccessibleContextAt
and GetAccessibleContextWithFocus
retrieve an AccessibleContext
object, which is a magic cookie (a Java Object
reference) to an Accessible
object and a JVM cookie. You use these two cookies to reference objects through Java Access Bridge. Most Java Access Bridge API functions require that you pass in these two parameters.
Note:
AccessibleContext
objects are 64-bit references under 64-bit interprocess communication (which uses the windowsaccessbridge-64.dll
file). However, prior to JDK 9, AccessibleContext
objects are 32-bit references under 32-bit interprocess communication (which uses the windowsaccessbridge.dll
file without -32
or -64
in the file name). Consequently, if you are converting your assistive technology applications to run on 64-bit Windows systems, then you need to recompile your assistive technology applications.
The function GetAccessibleContextInfo
returns detailed information about an AccessibleContext
object belonging to the JVM. In order to improve performance, the various distinct methods in the Java Accessibility API are collected together into a few routines in the Java Access Bridge API and returned in struct
values. The file AccessBridgePackages.h
defines these struct
values and Java Access Bridge API Callbacks describes them.
The functions GetAccessibleChildFromContext
and GetAccessibleParentFromContext
enable you to walk the GUI component hierarchy, retrieving the nth child, or the parent, of a particular GUI object.
BOOL GetAccessibleContextAt(long vmID, AccessibleContext acParent, jint x, jint y, AccessibleContext *ac)
Retrieves an
AccessibleContext
object of the window or object that is under the mouse pointer.BOOL GetAccessibleContextWithFocus(HWND window, long *vmID, AccessibleContext *ac);
Retrieves an
AccessibleContext
object of the window or object that has the focus.BOOL GetAccessibleContextInfo(long vmID, AccessibleContext ac, AccessibleContextInfo *info);
Retrieves an
AccessibleContextInfo
object of theAccessibleContext
objectac
.AccessibleContext GetAccessibleChildFromContext(long vmID, AccessibleContext ac, jint index);
Returns an
AccessibleContext
object that represents the nth child of the objectac
, where n is specified by the value index.AccessibleContext GetAccessibleParentFromContext(long vmID, AccessibleContext ac);
Returns an
AccessibleContext
object that represents the parent of objectac
.HWND getHWNDFromAccessibleContext(long vmID, AccessibleContext ac);
Returns the HWND from the AccessibleContextof a top-level window.
Accessible Text Functions
These functions get AccessibleText
information provided by the Java Accessibility API, broken down into seven chunks for efficiency. An AccessibleContext
has AccessibleText
information contained within it if you set the flag accessibleText
in the AccessibleContextInfo
data structure to TRUE
. The file AccessBridgePackages.h
defines the struct
values used in these functions Java Access Bridge API Callbacks describes them.
BOOL GetAccessibleTextInfo(long vmID, AccessibleText at, AccessibleTextInfo *textInfo, jint x, jint y);
BOOL GetAccessibleTextItems(long vmID, AccessibleText at, AccessibleTextItemsInfo *textItems, jint index);
BOOL GetAccessibleTextSelectionInfo(long vmID, AccessibleText at, AccessibleTextSelectionInfo *textSelection);
char *GetAccessibleTextAttributes(long vmID, AccessibleText at, jint index, AccessibleTextAttributesInfo *attributes);
BOOL GetAccessibleTextRect(long vmID, AccessibleText at, AccessibleTextRectInfo *rectInfo, jint index);
BOOL GetAccessibleTextRange(long vmID, AccessibleText at, jint start, jint end, wchar_t *text, short len);
BOOL GetAccessibleTextLineBounds(long vmID, AccessibleText at, jint index, jint *startIndex, jint *endIndex);
Additional Text Functions
BOOL selectTextRange(const long vmID, const AccessibleContext accessibleContext, const int startIndex, const int endIndex);
Selects text between two indices. Selection includes the text at the start index and the text at the end index. Returns whether successful.
BOOL getTextAttributesInRange(const long vmID, const AccessibleContext accessibleContext, const int startIndex, const int endIndex, AccessibleTextAttributesInfo *attributes, short *len);
Get text attributes between two indices. The attribute list includes the text at the start index and the text at the end index. Returns whether successful.
BOOL setCaretPosition(const long vmID, const AccessibleContext accessibleContext, const int position);
Set the caret to a text position. Returns whether successful.
BOOL getCaretLocation(long vmID, AccessibleContext ac, AccessibleTextRectInfo *rectInfo, jint index);
Gets the text caret location.
BOOL setTextContents (const long vmID, const AccessibleContext accessibleContext, const wchar_t *text);
Sets editable text contents. The AccessibleContext must implement AccessibleEditableText and be editable. The maximum text length that can be set is
MAX_STRING_SIZE - 1
. Returns whether successful.
Accessible Table Functions
BOOL getAccessibleTableInfo(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
Returns information about the table, for example, caption, summary, row and column count, and the AccessibleTable.
BOOL getAccessibleTableCellInfo(long vmID, AccessibleTable accessibleTable, jint row, jint column, AccessibleTableCellInfo *tableCellInfo);
Returns information about the specified table cell. The row and column specifiers are zero-based.
BOOL getAccessibleTableRowHeader(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
Returns the table row headers of the specified table as a table.
BOOL getAccessibleTableColumnHeader(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo);
Returns the table column headers of the specified table as a table.
AccessibleContext getAccessibleTableRowDescription(long vmID, AccessibleContext acParent, jint row);
Returns the description of the specified row in the specified table. The row specifier is zero-based.
AccessibleContext getAccessibleTableColumnDescription(long vmID, AccessibleContext acParent, jint column);
Returns the description of the specified column in the specified table. The column specifier is zero-based.
jint getAccessibleTableRowSelectionCount(long vmID, AccessibleTable table);
Returns how many rows in the table are selected.
BOOL isAccessibleTableRowSelected(long vmID, AccessibleTable table, jint row);
Returns true if the specified zero based row is selected.
BOOL getAccessibleTableRowSelections(long vmID, AccessibleTable table, jint count, jint *selections);
Returns an array of zero based indices of the selected rows.
jint getAccessibleTableColumnSelectionCount(long vmID, AccessibleTable table);
Returns how many columns in the table are selected.
BOOL isAccessibleTableColumnSelected(long vmID, AccessibleTable table, jint column);
Returns true if the specified zero based column is selected.
BOOL getAccessibleTableColumnSelections(long vmID, AccessibleTable table, jint count, jint *selections);
Returns an array of zero based indices of the selected columns.
jint getAccessibleTableRow(long vmID, AccessibleTable table, jint index);
Returns the row number of the cell at the specified cell index. The values are zero based.
jint getAccessibleTableColumn(long vmID, AccessibleTable table, jint index);
Returns the column number of the cell at the specified cell index. The values are zero based.
jint getAccessibleTableIndex(long vmID, AccessibleTable table, jint row, jint column);
Returns the index in the table of the specified row and column offset. The values are zero based.
Accessible Relation Set Function
BOOL getAccessibleRelationSet(long vmID, AccessibleContext accessibleContext, AccessibleRelationSetInfo *relationSetInfo);
Returns information about an object's related objects.
Accessible Hypertext Functions
BOOL getAccessibleHypertext(long vmID, AccessibleContext accessibleContext, AccessibleHypertextInfo *hypertextInfo);
Returns hypertext information associated with a component.
BOOL activateAccessibleHyperlink(long vmID, AccessibleContext accessibleContext, AccessibleHyperlink accessibleHyperlink);
Requests that a hyperlink be activated.
jint getAccessibleHyperlinkCount(const long vmID, const AccessibleHypertext hypertext);
Returns the number of hyperlinks in a component. Maps to AccessibleHypertext.getLinkCount. Returns -1 on error.
BOOL getAccessibleHypertextExt(const long vmID, const AccessibleContext accessibleContext, const jint nStartIndex, AccessibleHypertextInfo *hypertextInfo);
Iterates through the hyperlinks in a component. Returns hypertext information for a component starting at hyperlink index nStartIndex. No more than MAX_HYPERLINKS AccessibleHypertextInfo objects will be returned for each call to this method. Returns FALSE on error.
jint getAccessibleHypertextLinkIndex(const long vmID, const AccessibleHypertext hypertext, const jint nIndex);
Returns the index into an array of hyperlinks that is associated with a character index in document. Maps to AccessibleHypertext.getLinkIndex. Returns -1 on error.
BOOL getAccessibleHyperlink(const long vmID, const AccessibleHypertext hypertext, const jint nIndex, AccessibleHypertextInfo *hyperlinkInfo);
Returns the nth hyperlink in a document. Maps to AccessibleHypertext.getLink. Returns FALSE on error.
Accessible Key Binding Function
BOOL getAccessibleKeyBindings(long vmID, AccessibleContext accessibleContext, AccessibleKeyBindings *keyBindings);
Returns a list of key bindings associated with a component.
Accessible Icon Function
BOOL getAccessibleIcons(long vmID, AccessibleContext accessibleContext, AccessibleIcons *icons);
Returns a list of icons associate with a component.
Accessible Action Functions
BOOL getAccessibleActions(long vmID, AccessibleContext accessibleContext, AccessibleActions *actions);
Returns a list of actions that a component can perform.
BOOL doAccessibleActions(long vmID, AccessibleContext accessibleContext, AccessibleActionsToDo *actionsToDo, jint *failure);
Request that a list of AccessibleActions be performed by a component. Returns TRUE if all actions are performed. Returns FALSE when the first requested action fails in which case "failure" contains the index of the action that failed.
Utility Functions
BOOL IsSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2);
Returns whether two object references refer to the same object.
AccessibleContext getParentWithRole (const long vmID, const AccessibleContext accessibleContext, const wchar_t *role);
Returns the AccessibleContext with the specified role that is the ancestor of a given object. The role is one of the role strings defined in Java Access Bridge API Data Structures. If there is no ancestor object that has the specified role, returns (AccessibleContext)0.
AccessibleContext getParentWithRoleElseRoot (const long vmID, const AccessibleContext accessibleContext, const wchar_t *role);
Returns the AccessibleContext with the specified role that is the ancestor of a given object. The role is one of the role strings defined in Java Access Bridge API Data Structures. If an object with the specified role does not exist, returns the top level object for the Java window. Returns (AccessibleContext)0 on error.
AccessibleContext getTopLevelObject (const long vmID, const AccessibleContext accessibleContext);
Returns the AccessibleContext for the top level object in a Java window. This is same AccessibleContext that is obtained from GetAccessibleContextFromHWND for that window. Returns (AccessibleContext)0 on error.
int getObjectDepth (const long vmID, const AccessibleContext accessibleContext);
Returns how deep in the object hierarchy a given object is. The top most object in the object hierarchy has an object depth of 0. Returns -1 on error.
AccessibleContext getActiveDescendent (const long vmID, const AccessibleContext accessibleContext);
Returns the AccessibleContext of the current ActiveDescendent of an object. This method assumes the ActiveDescendent is the component that is currently selected in a container object. Returns (AccessibleContext)0 on error or if there is no selection.
BOOL requestFocus(const long vmID, const AccessibleContext accessibleContext);
Request focus for a component. Returns whether successful.
int getVisibleChildrenCount(const long vmID, const AccessibleContext accessibleContext);
Returns the number of visible children of a component. Returns -1 on error.
BOOL getVisibleChildren(const long vmID, const AccessibleContext accessibleContext, const int startIndex, VisibleChildrenInfo *visibleChildrenInfo);
Gets the visible children of an AccessibleContext. Returns whether successful.
int getEventsWaiting();
Gets the number of events waiting to fire.
Accessible Value Functions
These functions get AccessibleValue
information provided by the Java Accessibility API. An AccessibleContext
object has AccessibleValue
information contained within it if the flag accessibleValue
in the AccessibleContextInfo
data structure is set to TRUE
. The values returned are strings (char *value)
because there is no way to tell in advance if the value is an integer, a floating point value, or some other object that subclasses the Java language construct java.lang.Number
.
BOOL GetCurrentAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len);
BOOL GetMaximumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_ *value, short len);
BOOL GetMinimumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_ *value, short len);
Accessible Selection Functions
These functions get and manipulate AccessibleSelection
information provided by the Java Accessibility API. An AccessibleContext
has AccessibleSelection
information contained within it if the flag accessibleSelection
in the AccessibleContextInfo
data structure is set to TRUE
. The AccessibleSelection
support is the first place where the user interface can be manipulated, as opposed to being queries, through adding and removing items from a selection. Some of the functions use an index that is in child coordinates, while other use selection coordinates. For example, add to remove from a selection by passing child indices (for example, add the fourth child to the selection). On the other hand, enumerating the selected children is done in selection coordinates (for example, get the AccessibleContext
of the first object selected).
void AddAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);
void ClearAccessibleSelectionFromContext(long vmID, AccessibleSelection as);
jobject GetAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);
int GetAccessibleSelectionCountFromContext(long vmID, AccessibleSelection as);
BOOL IsAccessibleChildSelectedFromContext(long vmID, AccessibleSelection as, int i);
void RemoveAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i);
void SelectAllAccessibleSelectionFromContext(long vmID, AccessibleSelection as);
Java Access Bridge API Data Structures
The Java Access Bridge API data structures are contained in the file AccessBridgePackages.h
.
Important Data Structures
There are data structures in this file that you do not need (and can ignore); they are used as part of the inter-process communication mechanism of the two Java Access Bridge DLLs. The data structures of importance are as follows:
#define MAX_STRING_SIZE 1024
#define SHORT_STRING_SIZE 256
typedef struct AccessibleContextInfoTag {
wchar_ name[MAX_STRING_SIZE]; // the AccessibleName of the object
wchar_ description[MAX_STRING_SIZE]; // the AccessibleDescription of the object
wchar_ role[SHORT_STRING_SIZE]; // localized AccesibleRole string
wchar_ states[SHORT_STRING_SIZE]; // localized AccesibleStateSet string
// (comma separated)
jint indexInParent // index of object in parent
jint childrenCount // # of children, if any
jint x; // screen x-axis co-ordinate in pixels
jint y; // screen y-axis co-ordinate in pixels
jint width; // pixel width of object
jint height; // pixel height of object
BOOL accessibleComponent; // flags for various additional
BOOL accessibleAction; // Java Accessibility interfaces
BOOL accessibleSelection; // FALSE if this object doesn't
BOOL accessibleText; // implement the additional interface
BOOL accessibleInterfaces; // new bitfield containing additional
// interface flags
} AccessibleContextInfo;
typedef struct AccessibleTextInfoTag {
jint charCount; // # of characters in this text object
jint caretIndex; // index of caret
jint indexAtPoint; // index at the passsed in point
} AccessibleTextInfo;
typedef struct AccessibleTextItemsInfoTag {
wchar_t letter;
wchar_t word[SHORT_STRING_SIZE];
wchar_t sentence[MAX_STRING_SIZE];
} AccessibleTextItemsInfo;
typedef struct AccessibleTextSelectionInfoTag {
jint selectionStartIndex;
jint selectionEndIndex;
wchar_t selectedText[MAX_STRING_SIZE];
} AccessibleTextSelectionInfo;
typedef struct AccessibleTextRectInfoTag {
jint x; // bounding rectangle of char at index, x-axis co-ordinate
jint y; // y-axis co-ordinate
jint width; // bounding rectangle width
jint height; // bounding rectangle height
} AccessibleTextRectInfo;
typedef struct AccessibleTextAttributesInfoTag {
BOOL bold;
BOOL italic;
BOOL underline;
BOOL strikethrough;
BOOL superscript;
BOOL subscript;
wchar_t backgroundColor[SHORT_STRING_SIZE];
wchar_t foregroundColor[SHORT_STRING_SIZE];
wchar_t fontFamily[SHORT_STRING_SIZE];
jint fontSize;
jint alignment;
jint bidiLevel;
jfloat firstLineIndent;
jfloat leftIndent;
jfloat rightIndent;
jfloat lineSpacing;
jfloat spaceAbove;
jfloat spaceBelow;
wchar_t fullAttributesString[MAX_STRING_SIZE];
} AccessibleTextAttributesInfo;
typedef struct AccessibleTableInfoTag {
JOBJECT64 caption; // AccesibleContext
JOBJECT64 summary; // AccessibleContext
jint rowCount;
jint columnCount;
JOBJECT64 accessibleContext;
JOBJECT64 accessibleTable;
} AccessibleTableInfo;
typedef struct AccessibleTableCellInfoTag {
JOBJECT64 accessibleContext;
jint index;
jint row;
jint column;
jint rowExtent;
jint columnExtent;
jboolean isSelected;
} AccessibleTableCellInfo;
typedef struct AccessibleRelationSetInfoTag {
jint relationCount;
AccessibleRelationInfo relations[MAX_RELATIONS];
} AccessibleRelationSetInfo;
typedef struct AccessibleRelationInfoTag {
wchar_t key[SHORT_STRING_SIZE];
jint targetCount;
JOBJECT64 targets[MAX_RELATION_TARGETS]; // AccessibleContexts
} AccessibleRelationInfo;
typedef struct AccessibleHypertextInfoTag {
jint linkCount; // number of hyperlinks
AccessibleHyperlinkInfo links[MAX_HYPERLINKS]; // the hyperlinks
JOBJECT64 accessibleHypertext; // AccessibleHypertext object
} AccessibleHypertextInfo;
typedef struct AccessibleHyperlinkInfoTag {
wchar_t text[SHORT_STRING_SIZE]; // the hyperlink text
jint startIndex; // index in the hypertext document where the link begins
jint endIndex; // index in the hypertext document where the link ends
JOBJECT64 accessibleHyperlink; // AccessibleHyperlink object
} AccessibleHyperlinkInfo;
typedef struct AccessibleKeyBindingsTag {
int keyBindingsCount; // number of key bindings
AccessibleKeyBindingInfo keyBindingInfo[MAX_KEY_BINDINGS];
} AccessibleKeyBindings;
typedef struct AccessibleKeyBindingInfoTag {
jchar character; // the key character
jint modifiers; // the key modifiers
} AccessibleKeyBindingInfo;
typedef struct AccessibleIconsTag {
jint iconsCount; // number of icons
AccessibleIconInfo iconInfo[MAX_ICON_INFO]; // the icons
} AccessibleIcons;
typedef struct AccessibleIconInfoTag {
wchar_t description[SHORT_STRING_SIZE]; // icon description
jint height; // icon height
jint width; // icon width
} AccessibleIconInfo;
typedef struct AccessibleActionsTag {
jint actionsCount; // number of actions
AccessibleActionInfo actionInfo[MAX_ACTION_INFO]; // the action information
} AccessibleActions;
typedef struct AccessibleActionInfoTag {
wchar_t name[SHORT_STRING_SIZE]; // action name
} AccessibleActionInfo;
typedef struct AccessibleActionsToDoTag {
jint actionsCount; // number of actions to do
AccessibleActionInfo actions[MAX_ACTIONS_TO_DO]; // the accessible actions to do
} AccessibleActionsToDo;
typedef struct VisibleChildenInfoTag {
int returnedChildrenCount; // number of children returned
AccessibleContext children[MAX_VISIBLE_CHILDREN]; // the visible children
} VisibleChildenInfo;
Java Access Bridge API Callbacks
The Java Access Bridge API callbacks are contained in the file AccessBridgeCallbacks.h
. Your event handling functions must match these prototypes.
You must call the function ReleaseJavaObject
on every JOBJECT64
returned through these event handlers once you are finished with them to prevent memory leaks in the JVM.
If you are using legacy APIs, then define ACCESSBRIDGE_ARCH_LEGACY
.
JOBJECT64
is defined as jlong
on 64-bit systems and jobject
on legacy versions of Java Access Bridge. For definitions, see the section ACCESSBRIDGE_ARCH_LEGACY
in the AccessBridgePackages.h
header file.
typedef void (*AccessBridge_FocusGainedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_FocusLostFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_CaretUpdateFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MouseClickedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MouseEnteredFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MouseExitedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MousePressedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MouseReleasedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MenuCanceledFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MenuDeselectedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_MenuSelectedFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_PopupMenuCanceledFP) (long vmID JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_PopupMenuWillBecomeInvisibleFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_PopupMenuWillBecomeVisibleFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_PropertyNameChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldName, wchar_t *newName);
typedef void (*AccessBridge_PropertyDescriptionChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldDescription, wchar_t *newDescription);
typedef void (*AccessBridge_PropertyStateChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldState, wchar_t *newState);
typedef void (*AccessBridge_PropertyValueChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, wchar_t *oldValue, wchar_t *newValue);
typedef void (*AccessBridge_PropertySelectionChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_PropertyTextChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_PropertyCaretChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, int oldPosition, int newPosition);
typedef void (*AccessBridge_PropertyVisibleDataChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source);
typedef void (*AccessBridge_PropertyChildChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, JOBJECT64 oldChild, JOBJECT64 newChild);
typedef void (*AccessBridge_PropertyActiveDescendentChangeFP) (long vmID, JOBJECT64 event, JOBJECT64 source, JOBJECT64 oldActiveDescendent, JOBJECT64 newActiveDescendent);
Troubleshooting Java Access Bridge
This topic describes known problems and usage tips for those developing Assistive Technology applications for Java Access Bridge.
Known Problems
Re-Registering Menu Events Generates Duplicate Copies: If you register a menu event, unregister it, and then register it again, then Java Access Bridge generates duplicate copies of the menu event.
MenuDeselected
Events Generated When Menu is Closed: You are not receiving MenuCanceled (or PopupMenuCanceled) events. To determine that a menu has been closed, look for MenuDeselected events.
Usage Tips
Determining Changes in Menu Item Selection: Use State PropertyChange
events to determine changes in menu item selection (for example, when the user uses the arrow buttons or keys to go up or down within a menu).
Tracking Values of GUI Elements: Use the AccessibleValue
support and Value PropertyChange
events to track the values of GUI elements like sliders and scroll bars.
Determining Selected Items: Use the AccessibleSelection
support to determine which items are selected in containers that contain items such as lists and tables. This is more efficient than enumerating all of the children and examining their StateSet
attribute to see if the Selected value is among them.
Java Access Bridge Testing Tools: The Java Access Bridge testing tools jaccessinspector
and jaccesswalker
are located in the Java
bin
directory.