< prev index next >
src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp
Print this page
*** 38,48 ****
*/
AccessBridgeJavaEntryPoints::AccessBridgeJavaEntryPoints(JNIEnv *jniEnvironment,
jobject bridgeObject) {
jniEnv = jniEnvironment;
accessBridgeObject = (jobject)bridgeObject;
! PrintDebugString("AccessBridgeJavaEntryPoints(%p, %p) called", jniEnv, accessBridgeObject);
}
/**
* Destructor
--- 38,48 ----
*/
AccessBridgeJavaEntryPoints::AccessBridgeJavaEntryPoints(JNIEnv *jniEnvironment,
jobject bridgeObject) {
jniEnv = jniEnvironment;
accessBridgeObject = (jobject)bridgeObject;
! PrintDebugString("[INFO]: AccessBridgeJavaEntryPoints(%p, %p) called", jniEnv, accessBridgeObject);
}
/**
* Destructor
*** 54,95 ****
// -----------------------------------
#define FIND_CLASS(classRef, className) \
localClassRef = jniEnv->FindClass(className); \
if (localClassRef == (jclass) 0) { \
! PrintDebugString(" Error! FindClass(%s) failed!", className); \
! PrintDebugString(" -> jniEnv = %p", jniEnv); \
return FALSE; \
} \
classRef = (jclass) jniEnv->NewGlobalRef(localClassRef); \
jniEnv->DeleteLocalRef(localClassRef); \
if (classRef == (jclass) 0) { \
! PrintDebugString(" Error! FindClass(%s) failed!", className); \
! PrintDebugString(" -> (ran out of RAM)"); \
return FALSE; \
}
#define FIND_METHOD(methodID, classRef, methodString, methodSignature); \
methodID = jniEnv->GetMethodID(classRef, methodString, methodSignature); \
if (methodID == (jmethodID) 0) { \
! PrintDebugString(" Error! GetMethodID(%s) failed!", methodString); \
! PrintDebugString(" -> jniEnv = %p; classRef = %p", jniEnv, classRef); \
return FALSE; \
}
#define EXCEPTION_CHECK(situationDescription, returnVal) \
if (exception = jniEnv->ExceptionOccurred()) { \
! PrintDebugString("\r\n *** Exception occured while doing: %s; returning %d", situationDescription, returnVal); \
jniEnv->ExceptionDescribe(); \
jniEnv->ExceptionClear(); \
return (returnVal); \
}
#define EXCEPTION_CHECK_VOID(situationDescription) \
if (exception = jniEnv->ExceptionOccurred()) { \
! PrintDebugString("\r\n *** Exception occured while doing: %s", situationDescription); \
jniEnv->ExceptionDescribe(); \
jniEnv->ExceptionClear(); \
return; \
}
--- 54,92 ----
// -----------------------------------
#define FIND_CLASS(classRef, className) \
localClassRef = jniEnv->FindClass(className); \
if (localClassRef == (jclass) 0) { \
! PrintDebugString("[ERROR]: FindClass(%s) failed! -> jniEnv = %p", className, jniEnv); \
return FALSE; \
} \
classRef = (jclass) jniEnv->NewGlobalRef(localClassRef); \
jniEnv->DeleteLocalRef(localClassRef); \
if (classRef == (jclass) 0) { \
! PrintDebugString("[ERROR]: FindClass(%s) failed! -> (ran out of RAM)", className); \
return FALSE; \
}
#define FIND_METHOD(methodID, classRef, methodString, methodSignature); \
methodID = jniEnv->GetMethodID(classRef, methodString, methodSignature); \
if (methodID == (jmethodID) 0) { \
! PrintDebugString("[ERROR]: GetMethodID(%s) failed! -> jniEnv = %p; classRef = %p", methodString, jniEnv, classRef); \
return FALSE; \
}
#define EXCEPTION_CHECK(situationDescription, returnVal) \
if (exception = jniEnv->ExceptionOccurred()) { \
! PrintDebugString("[ERROR]: *** Exception occured while doing: %s; returning %d", situationDescription, returnVal); \
jniEnv->ExceptionDescribe(); \
jniEnv->ExceptionClear(); \
return (returnVal); \
}
#define EXCEPTION_CHECK_VOID(situationDescription) \
if (exception = jniEnv->ExceptionOccurred()) { \
! PrintDebugString("[ERROR]: *** Exception occured while doing: %s", situationDescription); \
jniEnv->ExceptionDescribe(); \
jniEnv->ExceptionClear(); \
return; \
}
*** 99,109 ****
*/
BOOL
AccessBridgeJavaEntryPoints::BuildJavaEntryPoints() {
jclass localClassRef;
! PrintDebugString("Calling BuildJavaEntryPoints():");
FIND_CLASS(bridgeClass, "com/sun/java/accessibility/internal/AccessBridge");
// ------- general methods
--- 96,106 ----
*/
BOOL
AccessBridgeJavaEntryPoints::BuildJavaEntryPoints() {
jclass localClassRef;
! PrintDebugString("[INFO]: Calling BuildJavaEntryPoints():");
FIND_CLASS(bridgeClass, "com/sun/java/accessibility/internal/AccessBridge");
// ------- general methods
*** 878,895 ****
BOOL
AccessBridgeJavaEntryPoints::isJavaWindow(jint window) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::isJavaWindow(%X):", window);
if (isJavaWindowMethod != (jmethodID) 0) {
returnVal = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, isJavaWindowMethod, window);
EXCEPTION_CHECK("Getting isJavaWindow - call to CallBooleanMethod()", FALSE);
return returnVal;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or isJavaWindowMethod == 0");
return FALSE;
}
}
// -----------------------------------
--- 875,892 ----
BOOL
AccessBridgeJavaEntryPoints::isJavaWindow(jint window) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::isJavaWindow(%X):", window);
if (isJavaWindowMethod != (jmethodID) 0) {
returnVal = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, isJavaWindowMethod, window);
EXCEPTION_CHECK("Getting isJavaWindow - call to CallBooleanMethod()", FALSE);
return returnVal;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or isJavaWindowMethod == 0");
return FALSE;
}
}
// -----------------------------------
*** 901,916 ****
BOOL
AccessBridgeJavaEntryPoints::isSameObject(jobject obj1, jobject obj2) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::isSameObject(%p %p):", obj1, obj2);
returnVal = (BOOL) jniEnv->IsSameObject((jobject)obj1, (jobject)obj2);
EXCEPTION_CHECK("Calling IsSameObject", FALSE);
! PrintDebugString("\r\n isSameObject returning %d", returnVal);
return returnVal;
}
// -----------------------------------
--- 898,913 ----
BOOL
AccessBridgeJavaEntryPoints::isSameObject(jobject obj1, jobject obj2) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::isSameObject(%p %p):", obj1, obj2);
returnVal = (BOOL) jniEnv->IsSameObject((jobject)obj1, (jobject)obj2);
EXCEPTION_CHECK("Calling IsSameObject", FALSE);
! PrintDebugString("[INFO]: isSameObject returning %d", returnVal);
return returnVal;
}
// -----------------------------------
*** 922,943 ****
AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(jint window) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(%X):", window);
if (getAccessibleContextFromHWNDMethod != (jmethodID) 0) {
returnedAccessibleContext =
(jobject)jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleContextFromHWNDMethod,
window);
EXCEPTION_CHECK("Getting AccessibleContextFromHWND - call to CallObjectMethod()", (jobject) 0);
globalRef = (jobject)jniEnv->NewGlobalRef((jobject)returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextFromHWND - call to CallObjectMethod()", (jobject) 0);
return globalRef;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or getAccessibleContextFromHWNDMethod == 0");
return (jobject) 0;
}
}
// -----------------------------------
--- 919,940 ----
AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(jint window) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(%X):", window);
if (getAccessibleContextFromHWNDMethod != (jmethodID) 0) {
returnedAccessibleContext =
(jobject)jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleContextFromHWNDMethod,
window);
EXCEPTION_CHECK("Getting AccessibleContextFromHWND - call to CallObjectMethod()", (jobject) 0);
globalRef = (jobject)jniEnv->NewGlobalRef((jobject)returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextFromHWND - call to CallObjectMethod()", (jobject) 0);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getAccessibleContextFromHWNDMethod == 0");
return (jobject) 0;
}
}
// -----------------------------------
*** 949,969 ****
HWND
AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(jobject accessibleContext) {
jthrowable exception;
HWND rHWND;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(%X):",
accessibleContext);
if (getHWNDFromAccessibleContextMethod != (jmethodID) 0) {
rHWND = (HWND)jniEnv->CallIntMethod(accessBridgeObject, getHWNDFromAccessibleContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting HWNDFromAccessibleContext - call to CallIntMethod()", (HWND)0);
! PrintDebugString("\r\n rHWND = %X", rHWND);
return rHWND;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or getHWNDFromAccessibleContextMethod == 0");
return (HWND)0;
}
}
--- 946,966 ----
HWND
AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(jobject accessibleContext) {
jthrowable exception;
HWND rHWND;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(%X):",
accessibleContext);
if (getHWNDFromAccessibleContextMethod != (jmethodID) 0) {
rHWND = (HWND)jniEnv->CallIntMethod(accessBridgeObject, getHWNDFromAccessibleContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting HWNDFromAccessibleContext - call to CallIntMethod()", (HWND)0);
! PrintDebugString("[INFO]: rHWND = %X", rHWND);
return rHWND;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getHWNDFromAccessibleContextMethod == 0");
return (HWND)0;
}
}
*** 975,1004 ****
BOOL
AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, const wchar_t *text) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::setTextContents(%p, %ls):",
accessibleContext, text);
if (setTextContentsMethod != (jmethodID) 0) {
// create a Java String for the text
jstring textString = jniEnv->NewString(text, (jsize)wcslen(text));
if (textString == 0) {
! PrintDebugString("\r NewString failed");
return FALSE;
}
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
setTextContentsMethod,
accessibleContext, textString);
EXCEPTION_CHECK("setTextContents - call to CallBooleanMethod()", FALSE);
! PrintDebugString("\r\n result = %d", result);
return result;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or setTextContentsMethod == 0");
return result;
}
}
/**
--- 972,1001 ----
BOOL
AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, const wchar_t *text) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::setTextContents(%p, %ls):",
accessibleContext, text);
if (setTextContentsMethod != (jmethodID) 0) {
// create a Java String for the text
jstring textString = jniEnv->NewString(text, (jsize)wcslen(text));
if (textString == 0) {
! PrintDebugString("[ERROR]: NewString failed");
return FALSE;
}
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
setTextContentsMethod,
accessibleContext, textString);
EXCEPTION_CHECK("setTextContents - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[INFO]: result = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or setTextContentsMethod == 0");
return result;
}
}
/**
*** 1012,1044 ****
jobject
AccessBridgeJavaEntryPoints::getParentWithRole(const jobject accessibleContext, const wchar_t *role) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("In AccessBridgeJavaEntryPoints::getParentWithRole(%p):",
accessibleContext);
if (getParentWithRoleMethod != (jmethodID) 0) {
// create a Java String for the role
jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role));
if (roleName == 0) {
! PrintDebugString(" NewString failed");
return FALSE;
}
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getParentWithRoleMethod,
accessibleContext, roleName);
EXCEPTION_CHECK("Getting ParentWithRole - call to CallObjectMethod()", (AccessibleContext)0);
! PrintDebugString(" rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ParentWithRole - call to NewGlobalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or getParentWithRoleMethod == 0");
return 0;
}
}
/**
--- 1009,1041 ----
jobject
AccessBridgeJavaEntryPoints::getParentWithRole(const jobject accessibleContext, const wchar_t *role) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getParentWithRole(%p):",
accessibleContext);
if (getParentWithRoleMethod != (jmethodID) 0) {
// create a Java String for the role
jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role));
if (roleName == 0) {
! PrintDebugString("[ERROR]: NewString failed");
return FALSE;
}
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getParentWithRoleMethod,
accessibleContext, roleName);
EXCEPTION_CHECK("Getting ParentWithRole - call to CallObjectMethod()", (AccessibleContext)0);
! PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ParentWithRole - call to NewGlobalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getParentWithRoleMethod == 0");
return 0;
}
}
/**
*** 1050,1075 ****
jobject
AccessBridgeJavaEntryPoints::getTopLevelObject(const jobject accessibleContext) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getTopLevelObject(%p):",
accessibleContext);
if (getTopLevelObjectMethod != (jmethodID) 0) {
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getTopLevelObjectMethod,
accessibleContext);
EXCEPTION_CHECK("Getting TopLevelObject - call to CallObjectMethod()", FALSE);
! PrintDebugString("\r\n rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting TopLevelObject - call to NewGlobalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or getTopLevelObjectMethod == 0");
return 0;
}
}
/**
--- 1047,1072 ----
jobject
AccessBridgeJavaEntryPoints::getTopLevelObject(const jobject accessibleContext) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getTopLevelObject(%p):",
accessibleContext);
if (getTopLevelObjectMethod != (jmethodID) 0) {
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getTopLevelObjectMethod,
accessibleContext);
EXCEPTION_CHECK("Getting TopLevelObject - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting TopLevelObject - call to NewGlobalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getTopLevelObjectMethod == 0");
return 0;
}
}
/**
*** 1081,1114 ****
jobject
AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleContext, const wchar_t *role) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(%p):",
accessibleContext);
if (getParentWithRoleElseRootMethod != (jmethodID) 0) {
// create a Java String for the role
jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role));
if (roleName == 0) {
! PrintDebugString("\r NewString failed");
return FALSE;
}
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getParentWithRoleElseRootMethod,
accessibleContext, roleName);
EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to CallObjectMethod()", (AccessibleContext)0);
! PrintDebugString(" rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to NewGlobalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or getParentWithRoleElseRootMethod == 0");
return 0;
}
}
/**
--- 1078,1111 ----
jobject
AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleContext, const wchar_t *role) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(%p):",
accessibleContext);
if (getParentWithRoleElseRootMethod != (jmethodID) 0) {
// create a Java String for the role
jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role));
if (roleName == 0) {
! PrintDebugString("[ERROR]: NewString failed");
return FALSE;
}
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getParentWithRoleElseRootMethod,
accessibleContext, roleName);
EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to CallObjectMethod()", (AccessibleContext)0);
! PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to NewGlobalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getParentWithRoleElseRootMethod == 0");
return 0;
}
}
/**
*** 1119,1140 ****
jint
AccessBridgeJavaEntryPoints::getObjectDepth(const jobject accessibleContext) {
jthrowable exception;
jint rResult;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getObjectDepth(%p):",
accessibleContext);
if (getObjectDepthMethod != (jmethodID) 0) {
rResult = jniEnv->CallIntMethod(accessBridgeObject,
getObjectDepthMethod,
accessibleContext);
EXCEPTION_CHECK("Getting ObjectDepth - call to CallIntMethod()", -1);
! PrintDebugString("\r\n rResult = %d", rResult);
return rResult;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or getObjectDepthMethod == 0");
return -1;
}
}
--- 1116,1137 ----
jint
AccessBridgeJavaEntryPoints::getObjectDepth(const jobject accessibleContext) {
jthrowable exception;
jint rResult;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getObjectDepth(%p):",
accessibleContext);
if (getObjectDepthMethod != (jmethodID) 0) {
rResult = jniEnv->CallIntMethod(accessBridgeObject,
getObjectDepthMethod,
accessibleContext);
EXCEPTION_CHECK("Getting ObjectDepth - call to CallIntMethod()", -1);
! PrintDebugString("[INFO]: rResult = %d", rResult);
return rResult;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getObjectDepthMethod == 0");
return -1;
}
}
*** 1146,1171 ****
jobject
AccessBridgeJavaEntryPoints::getActiveDescendent(const jobject accessibleContext) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getActiveDescendent(%p):",
accessibleContext);
if (getActiveDescendentMethod != (jmethodID) 0) {
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getActiveDescendentMethod,
accessibleContext);
EXCEPTION_CHECK("Getting ActiveDescendent - call to CallObjectMethod()", (AccessibleContext)0);
! PrintDebugString("\r\n rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ActiveDescendant - call to NewGlobalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or getActiveDescendentMethod == 0");
return (AccessibleContext)0;
}
}
/**
--- 1143,1168 ----
jobject
AccessBridgeJavaEntryPoints::getActiveDescendent(const jobject accessibleContext) {
jthrowable exception;
jobject rAccessibleContext;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getActiveDescendent(%p):",
accessibleContext);
if (getActiveDescendentMethod != (jmethodID) 0) {
rAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getActiveDescendentMethod,
accessibleContext);
EXCEPTION_CHECK("Getting ActiveDescendent - call to CallObjectMethod()", (AccessibleContext)0);
! PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ActiveDescendant - call to NewGlobalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getActiveDescendentMethod == 0");
return (AccessibleContext)0;
}
}
/**
*** 1202,1212 ****
jstring js = NULL;
const wchar_t * stringBytes = NULL;
jthrowable exception = NULL;
jsize length = 0;
! PrintDebugString("\r\n getVirtualAccessibleName called.");
if (getVirtualAccessibleNameFromContextMethod != (jmethodID) 0)
{
js = (jstring) jniEnv->CallObjectMethod (
accessBridgeObject,
getVirtualAccessibleNameFromContextMethod,
--- 1199,1209 ----
jstring js = NULL;
const wchar_t * stringBytes = NULL;
jthrowable exception = NULL;
jsize length = 0;
! PrintDebugString("[INFO]: getVirtualAccessibleName called.");
if (getVirtualAccessibleNameFromContextMethod != (jmethodID) 0)
{
js = (jstring) jniEnv->CallObjectMethod (
accessBridgeObject,
getVirtualAccessibleNameFromContextMethod,
*** 1229,1244 ****
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
}
else
{
! PrintDebugString(" Accessible Name is null.");
}
}
else
{
! PrintDebugString("\r\n Error! either jniEnv == 0 or getVirtualAccessibleNameFromContextMethod == 0");
return FALSE;
}
if ( 0 != name [0] )
{
return TRUE;
--- 1226,1241 ----
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
}
else
{
! PrintDebugString("[INFO]: Accessible Name is null.");
}
}
else
{
! PrintDebugString("[INFO]: either jniEnv == 0 or getVirtualAccessibleNameFromContextMethod == 0");
return FALSE;
}
if ( 0 != name [0] )
{
return TRUE;
*** 1256,1277 ****
AccessBridgeJavaEntryPoints::requestFocus(const jobject accessibleContext) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::requestFocus(%p):",
accessibleContext);
if (requestFocusMethod != (jmethodID) 0) {
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
requestFocusMethod,
accessibleContext);
EXCEPTION_CHECK("requestFocus - call to CallBooleanMethod()", FALSE);
! PrintDebugString("\r\n result = %d", result);
return result;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or requestFocusMethod == 0");
return result;
}
}
/**
--- 1253,1274 ----
AccessBridgeJavaEntryPoints::requestFocus(const jobject accessibleContext) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::requestFocus(%p):",
accessibleContext);
if (requestFocusMethod != (jmethodID) 0) {
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
requestFocusMethod,
accessibleContext);
EXCEPTION_CHECK("requestFocus - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[INFO]: result = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or requestFocusMethod == 0");
return result;
}
}
/**
*** 1284,1306 ****
AccessBridgeJavaEntryPoints::selectTextRange(const jobject accessibleContext, int startIndex, int endIndex) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::selectTextRange(%p start = %d end = %d):",
accessibleContext, startIndex, endIndex);
if (selectTextRangeMethod != (jmethodID) 0) {
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
selectTextRangeMethod,
accessibleContext,
startIndex, endIndex);
EXCEPTION_CHECK("selectTextRange - call to CallBooleanMethod()", FALSE);
! PrintDebugString("\r\n result = %d", result);
return result;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or selectTextRangeMethod == 0");
return result;
}
}
/*
--- 1281,1303 ----
AccessBridgeJavaEntryPoints::selectTextRange(const jobject accessibleContext, int startIndex, int endIndex) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::selectTextRange(%p start = %d end = %d):",
accessibleContext, startIndex, endIndex);
if (selectTextRangeMethod != (jmethodID) 0) {
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
selectTextRangeMethod,
accessibleContext,
startIndex, endIndex);
EXCEPTION_CHECK("selectTextRange - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[INFO]: result = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or selectTextRangeMethod == 0");
return result;
}
}
/*
*** 1353,1363 ****
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
BOOL result = FALSE;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getTextAttributesInRange(%p start = %d end = %d):",
accessibleContext, startIndex, endIndex);
*len = 0;
result = getAccessibleTextAttributes((jobject)accessibleContext, startIndex, attributes);
if (result != TRUE) {
--- 1350,1360 ----
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
BOOL result = FALSE;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getTextAttributesInRange(%p start = %d end = %d):",
accessibleContext, startIndex, endIndex);
*len = 0;
result = getAccessibleTextAttributes((jobject)accessibleContext, startIndex, attributes);
if (result != TRUE) {
*** 1368,1383 ****
for (jint i = startIndex+1; i <= endIndex; i++) {
AccessibleTextAttributesInfo test_attributes = *attributes;
// Get the full test_attributes string at i
if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) {
! PrintDebugString(" Getting full test_attributes string from Context...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributesAtIndexFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE);
wcsncpy(test_attributes.fullAttributesString, stringBytes, (sizeof(test_attributes.fullAttributesString) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
--- 1365,1380 ----
for (jint i = startIndex+1; i <= endIndex; i++) {
AccessibleTextAttributesInfo test_attributes = *attributes;
// Get the full test_attributes string at i
if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting full test_attributes string from Context...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributesAtIndexFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE);
wcsncpy(test_attributes.fullAttributesString, stringBytes, (sizeof(test_attributes.fullAttributesString) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
*** 1387,1406 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Text attributes = %ls", test_attributes.fullAttributesString);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Text attributes is null.");
test_attributes.fullAttributesString[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0");
return FALSE;
}
if(wcscmp(attributes->fullAttributesString,test_attributes.fullAttributesString))
break;
--- 1384,1403 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Text attributes = %ls", test_attributes.fullAttributesString);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Text attributes is null.");
test_attributes.fullAttributesString[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0");
return FALSE;
}
if(wcscmp(attributes->fullAttributesString,test_attributes.fullAttributesString))
break;
*** 1419,1436 ****
*/
int
AccessBridgeJavaEntryPoints::getVisibleChildrenCount(const jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getVisibleChildrenCount(%p)",
accessibleContext);
// get the visible children count
int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### visible children count = %d", numChildren);
return numChildren;
}
--- 1416,1433 ----
*/
int
AccessBridgeJavaEntryPoints::getVisibleChildrenCount(const jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildrenCount(%p)",
accessibleContext);
// get the visible children count
int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### visible children count = %d", numChildren);
return numChildren;
}
*** 1446,1487 ****
const int nStartIndex,
/* OUT */ VisibleChildrenInfo *visibleChildrenInfo) {
jthrowable exception;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getVisibleChildren(%p, startIndex = %d)",
accessibleContext, nStartIndex);
// get the visible children count
int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### visible children count = %d", numChildren);
if (nStartIndex >= numChildren) {
return FALSE;
}
// get the visible children
int bufIndex = 0;
for (int i = nStartIndex; (i < numChildren) && (i < nStartIndex + MAX_VISIBLE_CHILDREN); i++) {
! PrintDebugString(" getting visible child %d ...", i);
// get the visible child at index i
jobject ac = jniEnv->CallObjectMethod(accessBridgeObject, getVisibleChildMethod,
accessibleContext, i);
EXCEPTION_CHECK("##### getVisibleChildMethod - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ac);
EXCEPTION_CHECK("##### getVisibleChildMethod - call to NewGlobalRef()", FALSE);
visibleChildrenInfo->children[bufIndex] = (JOBJECT64)globalRef;
! PrintDebugString(" ##### visible child = %p", globalRef);
bufIndex++;
}
visibleChildrenInfo->returnedChildrenCount = bufIndex;
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getVisibleChildren succeeded");
return TRUE;
}
/**
* Set the caret to a text position. Returns whether successful;
--- 1443,1484 ----
const int nStartIndex,
/* OUT */ VisibleChildrenInfo *visibleChildrenInfo) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildren(%p, startIndex = %d)",
accessibleContext, nStartIndex);
// get the visible children count
int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### visible children count = %d", numChildren);
if (nStartIndex >= numChildren) {
return FALSE;
}
// get the visible children
int bufIndex = 0;
for (int i = nStartIndex; (i < numChildren) && (i < nStartIndex + MAX_VISIBLE_CHILDREN); i++) {
! PrintDebugString("[INFO]: getting visible child %d ...", i);
// get the visible child at index i
jobject ac = jniEnv->CallObjectMethod(accessBridgeObject, getVisibleChildMethod,
accessibleContext, i);
EXCEPTION_CHECK("##### getVisibleChildMethod - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ac);
EXCEPTION_CHECK("##### getVisibleChildMethod - call to NewGlobalRef()", FALSE);
visibleChildrenInfo->children[bufIndex] = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### visible child = %p", globalRef);
bufIndex++;
}
visibleChildrenInfo->returnedChildrenCount = bufIndex;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildren succeeded");
return TRUE;
}
/**
* Set the caret to a text position. Returns whether successful;
*** 1492,1513 ****
AccessBridgeJavaEntryPoints::setCaretPosition(const jobject accessibleContext, int position) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::setCaretPostion(%p position = %d):",
accessibleContext, position);
if (setCaretPositionMethod != (jmethodID) 0) {
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
setCaretPositionMethod,
accessibleContext, position);
EXCEPTION_CHECK("setCaretPostion - call to CallBooleanMethod()", FALSE);
! PrintDebugString("\r\n result = %d", result);
return result;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or setCaretPositionMethod == 0");
return result;
}
}
--- 1489,1510 ----
AccessBridgeJavaEntryPoints::setCaretPosition(const jobject accessibleContext, int position) {
jthrowable exception;
BOOL result = FALSE;
! PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::setCaretPostion(%p position = %d):",
accessibleContext, position);
if (setCaretPositionMethod != (jmethodID) 0) {
result = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject,
setCaretPositionMethod,
accessibleContext, position);
EXCEPTION_CHECK("setCaretPostion - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[ERROR]: result = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or setCaretPositionMethod == 0");
return result;
}
}
*** 1523,1545 ****
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getVersionInfo():");
if (getJavaVersionPropertyMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getJavaVersionPropertyMethod);
EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
length = jniEnv->GetStringLength(js);
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
if (stringBytes == NULL) {
if (!jniEnv->ExceptionCheck()) {
! PrintDebugString("\r\n *** Exception when getting JavaVersionProperty - call to GetStringChars");
jniEnv->ExceptionDescribe();
jniEnv->ExceptionClear();
}
return FALSE;
}
--- 1520,1542 ----
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getVersionInfo():");
if (getJavaVersionPropertyMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getJavaVersionPropertyMethod);
EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
length = jniEnv->GetStringLength(js);
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
if (stringBytes == NULL) {
if (!jniEnv->ExceptionCheck()) {
! PrintDebugString("[ERROR]: *** Exception when getting JavaVersionProperty - call to GetStringChars");
jniEnv->ExceptionDescribe();
jniEnv->ExceptionClear();
}
return FALSE;
}
*** 1570,1585 ****
EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Java version = %ls", info->VMversion);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting JavaVersionProperty - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Java version is null.");
info->VMversion[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString(" Error! either env == 0 or getJavaVersionPropertyMethod == 0");
return FALSE;
}
return TRUE;
}
--- 1567,1582 ----
EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Java version = %ls", info->VMversion);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting JavaVersionProperty - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Java version is null.");
info->VMversion[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getJavaVersionPropertyMethod == 0");
return FALSE;
}
return TRUE;
}
*** 1592,1629 ****
BOOL AccessBridgeJavaEntryPoints::verifyAccessibleText(jobject obj) {
JavaVM *vm;
BOOL retval;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::verifyAccessibleText");
if (jniEnv->GetJavaVM(&vm) != 0) {
! PrintDebugString(" Error! No Java VM");
return FALSE;
}
if (obj == (jobject)0) {
! PrintDebugString(" Error! Null jobject");
return FALSE;
}
// Copied from getAccessibleContextInfo
if (getAccessibleTextFromContextMethod != (jmethodID) 0) {
jobject returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextFromContextMethod,
(jobject)obj);
EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE);
! PrintDebugString(" AccessibleText = %p", returnedJobject);
retval = returnedJobject != (jobject) 0;
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextFromContextMethod == 0");
return FALSE;
}
if (retval == FALSE) {
! PrintDebugString(" Error! jobject is not an AccessibleText");
}
return retval;
}
--- 1589,1626 ----
BOOL AccessBridgeJavaEntryPoints::verifyAccessibleText(jobject obj) {
JavaVM *vm;
BOOL retval;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::verifyAccessibleText");
if (jniEnv->GetJavaVM(&vm) != 0) {
! PrintDebugString("[ERROR]: No Java VM");
return FALSE;
}
if (obj == (jobject)0) {
! PrintDebugString("[ERROR]: Null jobject");
return FALSE;
}
// Copied from getAccessibleContextInfo
if (getAccessibleTextFromContextMethod != (jmethodID) 0) {
jobject returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextFromContextMethod,
(jobject)obj);
EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE);
! PrintDebugString("[ERROR]: AccessibleText = %p", returnedJobject);
retval = returnedJobject != (jobject) 0;
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextFromContextMethod == 0");
return FALSE;
}
if (retval == FALSE) {
! PrintDebugString("[ERROR]: jobject is not an AccessibleText");
}
return retval;
}
*** 1644,1668 ****
AccessBridgeJavaEntryPoints::getAccessibleContextAt(jint x, jint y, jobject accessibleContext) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleContextAt(%d, %d, %p):",
x, y, accessibleContext);
if (getAccessibleContextAtMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleContextAtMethod,
x, y, accessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextAt - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextAt - call to NewGlobalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleContextAtMethod == 0");
return (jobject) 0;
}
}
/**
--- 1641,1665 ----
AccessBridgeJavaEntryPoints::getAccessibleContextAt(jint x, jint y, jobject accessibleContext) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleContextAt(%d, %d, %p):",
x, y, accessibleContext);
if (getAccessibleContextAtMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleContextAtMethod,
x, y, accessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextAt - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextAt - call to NewGlobalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleContextAtMethod == 0");
return (jobject) 0;
}
}
/**
*** 1679,1701 ****
AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus() {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus()");
if (getAccessibleContextWithFocusMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleContextWithFocusMethod);
EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to NewGlobalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString(" Error! either jniEnv == 0 or getAccessibleContextWithFocusMethod == 0");
return (jobject) 0;
}
}
/**
--- 1676,1698 ----
AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus() {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus()");
if (getAccessibleContextWithFocusMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleContextWithFocusMethod);
EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to NewGlobalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or getAccessibleContextWithFocusMethod == 0");
return (jobject) 0;
}
}
/**
*** 1716,1731 ****
const wchar_t *stringBytes;
jobject returnedJobject;
jthrowable exception;
jsize length;
! PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleContextInfo(%p):", accessibleContext);
ZeroMemory(info, sizeof(AccessibleContextInfo));
if (accessibleContext == (jobject) 0) {
! PrintDebugString(" passed in AccessibleContext == null! (oops)");
return (FALSE);
}
// Get the Accessible Name
if (getAccessibleNameFromContextMethod != (jmethodID) 0) {
--- 1713,1728 ----
const wchar_t *stringBytes;
jobject returnedJobject;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleContextInfo(%p):", accessibleContext);
ZeroMemory(info, sizeof(AccessibleContextInfo));
if (accessibleContext == (jobject) 0) {
! PrintDebugString("[WARN]: passed in AccessibleContext == null! (oops)");
return (FALSE);
}
// Get the Accessible Name
if (getAccessibleNameFromContextMethod != (jmethodID) 0) {
*** 1744,1762 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleName - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Name = %ls", info->name);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Name is null.");
info->name[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleNameFromContextMethod == 0");
return FALSE;
}
// Get the Accessible Description
--- 1741,1759 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleName - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Name = %ls", info->name);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Name is null.");
info->name[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleNameFromContextMethod == 0");
return FALSE;
}
// Get the Accessible Description
*** 1776,1794 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleName - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Description = %ls", info->description);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Description is null.");
info->description[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleDescriptionFromContextMethod == 0");
return FALSE;
}
// Get the Accessible Role String
--- 1773,1791 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleName - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Description = %ls", info->description);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Description is null.");
info->description[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleDescriptionFromContextMethod == 0");
return FALSE;
}
// Get the Accessible Role String
*** 1808,1826 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleRole - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleRole - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Role = %ls", info->role);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRole - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Role is null.");
info->role[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleRoleStringFromContextMethod == 0");
return FALSE;
}
// Get the Accessible Role String in the en_US locale
--- 1805,1823 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleRole - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleRole - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Role = %ls", info->role);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRole - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Role is null.");
info->role[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleRoleStringFromContextMethod == 0");
return FALSE;
}
// Get the Accessible Role String in the en_US locale
*** 1840,1858 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Role en_US = %ls", info->role_en_US);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Role en_US is null.");
info->role[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleRoleStringFromContext_en_USMethod == 0");
return FALSE;
}
// Get the Accessible States String
if (getAccessibleStatesStringFromContextMethod != (jmethodID) 0) {
--- 1837,1855 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Role en_US = %ls", info->role_en_US);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Role en_US is null.");
info->role[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleRoleStringFromContext_en_USMethod == 0");
return FALSE;
}
// Get the Accessible States String
if (getAccessibleStatesStringFromContextMethod != (jmethodID) 0) {
*** 1871,1889 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleState - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleState - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible States = %ls", info->states);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleState - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible States is null.");
info->states[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleStatesStringFromContextMethod == 0");
return FALSE;
}
// Get the Accessible States String in the en_US locale
if (getAccessibleStatesStringFromContext_en_USMethod != (jmethodID) 0) {
--- 1868,1886 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleState - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleState - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible States = %ls", info->states);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleState - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible States is null.");
info->states[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleStatesStringFromContextMethod == 0");
return FALSE;
}
// Get the Accessible States String in the en_US locale
if (getAccessibleStatesStringFromContext_en_USMethod != (jmethodID) 0) {
*** 1902,2062 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible States en_US = %ls", info->states_en_US);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible States en_US is null.");
info->states[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleStatesStringFromContext_en_USMethod == 0");
return FALSE;
}
// Get the index in Parent
if (getAccessibleIndexInParentFromContextMethod != (jmethodID) 0) {
info->indexInParent = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIndexInParentFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleIndexInParent - call to CallIntMethod()", FALSE);
! PrintDebugString(" Index in Parent = %d", info->indexInParent);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleIndexInParentFromContextMethod == 0");
return FALSE;
}
! PrintDebugString("*** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %p ***",
jniEnv, accessBridgeObject, accessibleContext);
// Get the children count
if (getAccessibleChildrenCountFromContextMethod != (jmethodID) 0) {
info->childrenCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleChildrenCountFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleChildrenCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" Children count = %d", info->childrenCount);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleChildrenCountFromContextMethod == 0");
return FALSE;
}
! PrintDebugString("*** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %X ***",
jniEnv, accessBridgeObject, accessibleContext);
// Get the x coord
if (getAccessibleXcoordFromContextMethod != (jmethodID) 0) {
info->x = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleXcoordFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleXcoord - call to CallIntMethod()", FALSE);
! PrintDebugString(" X coord = %d", info->x);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleXcoordFromContextMethod == 0");
return FALSE;
}
! PrintDebugString("*** jniEnv: %X; accessBridgeObject: %X; AccessibleContext: %p ***",
jniEnv, accessBridgeObject, accessibleContext);
// Get the y coord
if (getAccessibleYcoordFromContextMethod != (jmethodID) 0) {
info->y = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleYcoordFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleYcoord - call to CallIntMethod()", FALSE);
! PrintDebugString(" Y coord = %d", info->y);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleYcoordFromContextMethod == 0");
return FALSE;
}
// Get the width
if (getAccessibleWidthFromContextMethod != (jmethodID) 0) {
info->width = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleWidthFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleWidth - call to CallIntMethod()", FALSE);
! PrintDebugString(" Width = %d", info->width);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleWidthFromContextMethod == 0");
return FALSE;
}
// Get the height
if (getAccessibleHeightFromContextMethod != (jmethodID) 0) {
info->height = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHeightFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleHeight - call to CallIntMethod()", FALSE);
! PrintDebugString(" Height = %d", info->height);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleHeightFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleComponent
if (getAccessibleComponentFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleComponentFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleComponent - call to CallObjectMethod()", FALSE);
! PrintDebugString(" AccessibleComponent = %p", returnedJobject);
info->accessibleComponent = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleComponent - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleComponentFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleAction
if (getAccessibleActionFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleActionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleAction - call to CallObjectMethod()", FALSE);
! PrintDebugString(" AccessibleAction = %p", returnedJobject);
info->accessibleAction = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleAction - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleActionFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleSelection
if (getAccessibleSelectionFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleSelectionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelection - call to CallObjectMethod()", FALSE);
! PrintDebugString(" AccessibleSelection = %p", returnedJobject);
info->accessibleSelection = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleSelection - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleSelectionFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleTable
if (getAccessibleTableFromContextMethod != (jmethodID) 0) {
! PrintDebugString("##### Calling getAccessibleTableFromContextMethod ...");
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableFromContextMethod,
accessibleContext);
! PrintDebugString("##### ... Returned from getAccessibleTableFromContextMethod");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
! PrintDebugString(" ##### AccessibleTable = %p", returnedJobject);
if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleTableInterface;
}
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to DeleteLocalRef()", FALSE);
--- 1899,2059 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible States en_US = %ls", info->states_en_US);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible States en_US is null.");
info->states[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleStatesStringFromContext_en_USMethod == 0");
return FALSE;
}
// Get the index in Parent
if (getAccessibleIndexInParentFromContextMethod != (jmethodID) 0) {
info->indexInParent = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIndexInParentFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleIndexInParent - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Index in Parent = %d", info->indexInParent);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleIndexInParentFromContextMethod == 0");
return FALSE;
}
! PrintDebugString("[INFO]: *** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %p ***",
jniEnv, accessBridgeObject, accessibleContext);
// Get the children count
if (getAccessibleChildrenCountFromContextMethod != (jmethodID) 0) {
info->childrenCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleChildrenCountFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleChildrenCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Children count = %d", info->childrenCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleChildrenCountFromContextMethod == 0");
return FALSE;
}
! PrintDebugString("[INFO]: *** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %X ***",
jniEnv, accessBridgeObject, accessibleContext);
// Get the x coord
if (getAccessibleXcoordFromContextMethod != (jmethodID) 0) {
info->x = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleXcoordFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleXcoord - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: X coord = %d", info->x);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleXcoordFromContextMethod == 0");
return FALSE;
}
! PrintDebugString("[INFO]: *** jniEnv: %X; accessBridgeObject: %X; AccessibleContext: %p ***",
jniEnv, accessBridgeObject, accessibleContext);
// Get the y coord
if (getAccessibleYcoordFromContextMethod != (jmethodID) 0) {
info->y = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleYcoordFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleYcoord - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Y coord = %d", info->y);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleYcoordFromContextMethod == 0");
return FALSE;
}
// Get the width
if (getAccessibleWidthFromContextMethod != (jmethodID) 0) {
info->width = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleWidthFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleWidth - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Width = %d", info->width);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleWidthFromContextMethod == 0");
return FALSE;
}
// Get the height
if (getAccessibleHeightFromContextMethod != (jmethodID) 0) {
info->height = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHeightFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleHeight - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Height = %d", info->height);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleHeightFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleComponent
if (getAccessibleComponentFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleComponentFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleComponent - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: AccessibleComponent = %p", returnedJobject);
info->accessibleComponent = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleComponent - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleComponentFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleAction
if (getAccessibleActionFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleActionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleAction - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: AccessibleAction = %p", returnedJobject);
info->accessibleAction = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleAction - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleActionFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleSelection
if (getAccessibleSelectionFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleSelectionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelection - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: AccessibleSelection = %p", returnedJobject);
info->accessibleSelection = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleSelection - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleTable
if (getAccessibleTableFromContextMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: ##### Calling getAccessibleTableFromContextMethod ...");
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableFromContextMethod,
accessibleContext);
! PrintDebugString("[INFO]: ##### ... Returned from getAccessibleTableFromContextMethod");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleTable = %p", returnedJobject);
if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleTableInterface;
}
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to DeleteLocalRef()", FALSE);
*** 2070,2112 ****
PrintDebugString(" ##### AccessibleTable = %X", returnedJobject);
info->accessibleTable = returnedJobject;
*/
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleText
if (getAccessibleTextFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE);
! PrintDebugString(" AccessibleText = %p", returnedJobject);
info->accessibleText = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleValue
if (getAccessibleValueFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString(" AccessibleValue = %p", returnedJobject);
if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleValueInterface;
}
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleValueFromContextMethod == 0");
return FALSE;
}
// FIX
// get the AccessibleHypertext
--- 2067,2109 ----
PrintDebugString(" ##### AccessibleTable = %X", returnedJobject);
info->accessibleTable = returnedJobject;
*/
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleText
if (getAccessibleTextFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: AccessibleText = %p", returnedJobject);
info->accessibleText = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextFromContextMethod == 0");
return FALSE;
}
// Get the AccessibleValue
if (getAccessibleValueFromContextMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: AccessibleValue = %p", returnedJobject);
if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleValueInterface;
}
jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleValueFromContextMethod == 0");
return FALSE;
}
// FIX
// get the AccessibleHypertext
*** 2118,2128 ****
getAccessibleHyperlinkEndIndexMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHypertextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleHypertext - call to CallObjectMethod()", FALSE);
! PrintDebugString(" AccessibleHypertext = %p",
returnedJobject);
if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleHypertextInterface;
}
jniEnv->DeleteLocalRef(returnedJobject);
--- 2115,2125 ----
getAccessibleHyperlinkEndIndexMethod != (jmethodID) 0) {
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHypertextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleHypertext - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: AccessibleHypertext = %p",
returnedJobject);
if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleHypertextInterface;
}
jniEnv->DeleteLocalRef(returnedJobject);
*** 2159,2169 ****
AccessBridgeJavaEntryPoints::getAccessibleChildFromContext(jobject accessibleContext, jint childIndex) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleChildContext(%p, %d):",
accessibleContext, childIndex);
if (getAccessibleChildFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleChildFromContextMethod,
--- 2156,2166 ----
AccessBridgeJavaEntryPoints::getAccessibleChildFromContext(jobject accessibleContext, jint childIndex) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleChildContext(%p, %d):",
accessibleContext, childIndex);
if (getAccessibleChildFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleChildFromContextMethod,
*** 2171,2185 ****
EXCEPTION_CHECK("Getting AccessibleChild - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleChild - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleChild - call to DeleteLocalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleChildContextMethod == 0");
return (jobject) 0;
}
}
/**
--- 2168,2182 ----
EXCEPTION_CHECK("Getting AccessibleChild - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleChild - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleChild - call to DeleteLocalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleChildContextMethod == 0");
return (jobject) 0;
}
}
/**
*** 2191,2216 ****
{
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(%p):", accessibleContext);
if (getAccessibleParentFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleParentFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleParent - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleParent - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleParent - call to DeleteLocalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleParentFromContextMethod == 0");
return (jobject) 0;
}
}
--- 2188,2213 ----
{
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(%p):", accessibleContext);
if (getAccessibleParentFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleParentFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleParent - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleParent - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleParent - call to DeleteLocalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleParentFromContextMethod == 0");
return (jobject) 0;
}
}
*** 2220,2305 ****
AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext,
AccessibleTableInfo *tableInfo) {
jthrowable exception;
! PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo(%p):",
accessibleContext);
// get the table row count
if (getAccessibleTableRowCountMethod != (jmethodID) 0) {
tableInfo->rowCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleTableRowCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table row count = %d", tableInfo->rowCount);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowCountMethod == 0");
return FALSE;
}
// get the table column count
if (getAccessibleTableColumnCountMethod != (jmethodID) 0) {
tableInfo->columnCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnCountMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table column count = %d", tableInfo->columnCount);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnCountMethod == 0");
return FALSE;
}
// get the AccessibleTable
if (getAccessibleTableFromContextMethod != (jmethodID) 0) {
! PrintDebugString("##### Calling getAccessibleTableFromContextMethod ...");
jobject accTable = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableFromContextMethod,
accessibleContext);
! PrintDebugString("##### ... Returned from getAccessibleTableFromContextMethod");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef;
! PrintDebugString(" ##### accessibleTable = %p", globalRef);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableFromContextMethod == 0");
return FALSE;
}
// cache the AccessibleContext
if (getContextFromAccessibleTableMethod != (jmethodID) 0) {
! PrintDebugString("##### Calling getContextFromAccessibleTable Method ...");
jobject ac = jniEnv->CallObjectMethod(accessBridgeObject,
getContextFromAccessibleTableMethod,
accessibleContext);
! PrintDebugString("##### ... Returned from getContextFromAccessibleTable Method");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ac);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE);
tableInfo->accessibleContext = (JOBJECT64)globalRef;
! PrintDebugString(" ##### accessibleContext = %p", globalRef);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getContextFromAccessibleTable Method == 0");
return FALSE;
}
// FIX - set unused elements
tableInfo->caption = NULL;
tableInfo->summary = NULL;
! PrintDebugString("##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo succeeded");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, jint row, jint column,
AccessibleTableCellInfo *tableCellInfo) {
jthrowable exception;
! PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(%p): row=%d, column=%d",
accessibleTable, row, column);
// FIX
ZeroMemory(tableCellInfo, sizeof(AccessibleTableCellInfo));
tableCellInfo->row = row;
--- 2217,2302 ----
AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext,
AccessibleTableInfo *tableInfo) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo(%p):",
accessibleContext);
// get the table row count
if (getAccessibleTableRowCountMethod != (jmethodID) 0) {
tableInfo->rowCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleTableRowCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowCountMethod == 0");
return FALSE;
}
// get the table column count
if (getAccessibleTableColumnCountMethod != (jmethodID) 0) {
tableInfo->columnCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnCountMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnCountMethod == 0");
return FALSE;
}
// get the AccessibleTable
if (getAccessibleTableFromContextMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: ##### Calling getAccessibleTableFromContextMethod ...");
jobject accTable = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableFromContextMethod,
accessibleContext);
! PrintDebugString("[INFO]: ##### ... Returned from getAccessibleTableFromContextMethod");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### accessibleTable = %p", globalRef);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableFromContextMethod == 0");
return FALSE;
}
// cache the AccessibleContext
if (getContextFromAccessibleTableMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: ##### Calling getContextFromAccessibleTable Method ...");
jobject ac = jniEnv->CallObjectMethod(accessBridgeObject,
getContextFromAccessibleTableMethod,
accessibleContext);
! PrintDebugString("[INFO]: ##### ... Returned from getContextFromAccessibleTable Method");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ac);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE);
tableInfo->accessibleContext = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### accessibleContext = %p", globalRef);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getContextFromAccessibleTable Method == 0");
return FALSE;
}
// FIX - set unused elements
tableInfo->caption = NULL;
tableInfo->summary = NULL;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo succeeded");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, jint row, jint column,
AccessibleTableCellInfo *tableCellInfo) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(%p): row=%d, column=%d",
accessibleTable, row, column);
// FIX
ZeroMemory(tableCellInfo, sizeof(AccessibleTableCellInfo));
tableCellInfo->row = row;
*** 2310,2358 ****
if (getAccessibleTableCellIndexMethod != (jmethodID) 0) {
tableCellInfo->index = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableCellIndexMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellIndex - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table cell index = %d", tableCellInfo->index);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellIndexMethod == 0");
return FALSE;
}
// get the table cell row extent
if (getAccessibleTableCellRowExtentMethod != (jmethodID) 0) {
tableCellInfo->rowExtent = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableCellRowExtentMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellRowExtentCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table cell row extent = %d", tableCellInfo->rowExtent);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellRowExtentMethod == 0");
return FALSE;
}
// get the table cell column extent
if (getAccessibleTableCellColumnExtentMethod != (jmethodID) 0) {
tableCellInfo->columnExtent = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableCellColumnExtentMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellColumnExtentCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table cell column extent = %d", tableCellInfo->columnExtent);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellColumnExtentMethod == 0");
return FALSE;
}
// get whether the table cell is selected
if (isAccessibleTableCellSelectedMethod != (jmethodID) 0) {
tableCellInfo->isSelected = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleTableCellSelectedMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting isAccessibleTableCellSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString(" ##### table cell isSelected = %d", tableCellInfo->isSelected);
} else {
! PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableCellSelectedMethod == 0");
return FALSE;
}
// get the table cell AccessibleContext
if (getAccessibleTableCellAccessibleContextMethod != (jmethodID) 0) {
--- 2307,2355 ----
if (getAccessibleTableCellIndexMethod != (jmethodID) 0) {
tableCellInfo->index = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableCellIndexMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellIndex - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table cell index = %d", tableCellInfo->index);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellIndexMethod == 0");
return FALSE;
}
// get the table cell row extent
if (getAccessibleTableCellRowExtentMethod != (jmethodID) 0) {
tableCellInfo->rowExtent = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableCellRowExtentMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellRowExtentCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table cell row extent = %d", tableCellInfo->rowExtent);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellRowExtentMethod == 0");
return FALSE;
}
// get the table cell column extent
if (getAccessibleTableCellColumnExtentMethod != (jmethodID) 0) {
tableCellInfo->columnExtent = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableCellColumnExtentMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellColumnExtentCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table cell column extent = %d", tableCellInfo->columnExtent);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellColumnExtentMethod == 0");
return FALSE;
}
// get whether the table cell is selected
if (isAccessibleTableCellSelectedMethod != (jmethodID) 0) {
tableCellInfo->isSelected = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleTableCellSelectedMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting isAccessibleTableCellSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table cell isSelected = %d", tableCellInfo->isSelected);
} else {
! PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableCellSelectedMethod == 0");
return FALSE;
}
// get the table cell AccessibleContext
if (getAccessibleTableCellAccessibleContextMethod != (jmethodID) 0) {
*** 2361,2409 ****
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellAccessibleContext - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(tableCellAC);
EXCEPTION_CHECK("##### Getting AccessibleTableCellAccessibleContext - call to NewGlobalRef()", FALSE);
tableCellInfo->accessibleContext = (JOBJECT64)globalRef;
! PrintDebugString(" ##### table cell AccessibleContext = %p", globalRef);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellAccessibleContextMethod == 0");
return FALSE;
}
! PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo succeeded");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, AccessibleTableInfo *tableInfo) {
jthrowable exception;
! PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(%p):",
acParent);
// get the header row count
if (getAccessibleTableRowHeaderRowCountMethod != (jmethodID) 0) {
tableInfo->rowCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowHeaderRowCountMethod,
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeaderRowCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table row count = %d", tableInfo->rowCount);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowHeaderRowCountMethod == 0");
return FALSE;
}
// get the header column count
if (getAccessibleTableRowHeaderColumnCountMethod != (jmethodID) 0) {
tableInfo->columnCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowHeaderColumnCountMethod,
acParent);
EXCEPTION_CHECK("Getting AccessibleTableRowHeaderColumnCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table column count = %d", tableInfo->columnCount);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowHeaderColumnCountMethod == 0");
return FALSE;
}
// get the header AccessibleTable
if (getAccessibleTableRowHeaderMethod != (jmethodID) 0) {
--- 2358,2406 ----
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellAccessibleContext - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(tableCellAC);
EXCEPTION_CHECK("##### Getting AccessibleTableCellAccessibleContext - call to NewGlobalRef()", FALSE);
tableCellInfo->accessibleContext = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### table cell AccessibleContext = %p", globalRef);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellAccessibleContextMethod == 0");
return FALSE;
}
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo succeeded");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, AccessibleTableInfo *tableInfo) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(%p):",
acParent);
// get the header row count
if (getAccessibleTableRowHeaderRowCountMethod != (jmethodID) 0) {
tableInfo->rowCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowHeaderRowCountMethod,
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeaderRowCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowHeaderRowCountMethod == 0");
return FALSE;
}
// get the header column count
if (getAccessibleTableRowHeaderColumnCountMethod != (jmethodID) 0) {
tableInfo->columnCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowHeaderColumnCountMethod,
acParent);
EXCEPTION_CHECK("Getting AccessibleTableRowHeaderColumnCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowHeaderColumnCountMethod == 0");
return FALSE;
}
// get the header AccessibleTable
if (getAccessibleTableRowHeaderMethod != (jmethodID) 0) {
*** 2412,2464 ****
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeader - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeader - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef;
! PrintDebugString(" ##### row header AccessibleTable = %p", globalRef);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowHeaderMethod == 0");
return FALSE;
}
// FIX - set unused elements
tableInfo->caption = NULL;
tableInfo->summary = NULL;
tableInfo->accessibleContext = NULL;
! PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader succeeded");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, AccessibleTableInfo *tableInfo) {
jthrowable exception;
! PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(%p):",
acParent);
// get the header row count
if (getAccessibleTableColumnHeaderRowCountMethod != (jmethodID) 0) {
tableInfo->rowCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnHeaderRowCountMethod,
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeaderRowCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table row count = %d", tableInfo->rowCount);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleColumnHeaderRowCountMethod == 0");
return FALSE;
}
// get the header column count
if (getAccessibleTableColumnHeaderColumnCountMethod != (jmethodID) 0) {
tableInfo->columnCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnHeaderColumnCountMethod,
acParent);
EXCEPTION_CHECK("Getting AccessibleTableColumnHeaderColumnCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table column count = %d", tableInfo->columnCount);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnHeaderColumnCountMethod == 0");
return FALSE;
}
// get the header AccessibleTable
if (getAccessibleTableColumnHeaderMethod != (jmethodID) 0) {
jobject accTable = jniEnv->CallObjectMethod(accessBridgeObject,
--- 2409,2461 ----
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeader - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeader - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### row header AccessibleTable = %p", globalRef);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowHeaderMethod == 0");
return FALSE;
}
// FIX - set unused elements
tableInfo->caption = NULL;
tableInfo->summary = NULL;
tableInfo->accessibleContext = NULL;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader succeeded");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, AccessibleTableInfo *tableInfo) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(%p):",
acParent);
// get the header row count
if (getAccessibleTableColumnHeaderRowCountMethod != (jmethodID) 0) {
tableInfo->rowCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnHeaderRowCountMethod,
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeaderRowCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleColumnHeaderRowCountMethod == 0");
return FALSE;
}
// get the header column count
if (getAccessibleTableColumnHeaderColumnCountMethod != (jmethodID) 0) {
tableInfo->columnCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnHeaderColumnCountMethod,
acParent);
EXCEPTION_CHECK("Getting AccessibleTableColumnHeaderColumnCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnHeaderColumnCountMethod == 0");
return FALSE;
}
// get the header AccessibleTable
if (getAccessibleTableColumnHeaderMethod != (jmethodID) 0) {
jobject accTable = jniEnv->CallObjectMethod(accessBridgeObject,
*** 2466,2498 ****
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeader - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeader - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef;
! PrintDebugString(" ##### column header AccessibleTable = %p", globalRef);
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnHeaderMethod == 0");
return FALSE;
}
// FIX - set unused elements
tableInfo->caption = NULL;
tableInfo->summary = NULL;
tableInfo->accessibleContext = NULL;
! PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader succeeded");
return TRUE;
}
jobject
AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(jobject acParent, jint row) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(%p):",
acParent);
if (getAccessibleTableRowDescriptionMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableRowDescriptionMethod,
--- 2463,2495 ----
acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeader - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeader - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### column header AccessibleTable = %p", globalRef);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnHeaderMethod == 0");
return FALSE;
}
// FIX - set unused elements
tableInfo->caption = NULL;
tableInfo->summary = NULL;
tableInfo->accessibleContext = NULL;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader succeeded");
return TRUE;
}
jobject
AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(jobject acParent, jint row) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(%p):",
acParent);
if (getAccessibleTableRowDescriptionMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableRowDescriptionMethod,
*** 2500,2514 ****
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to DeleteLocalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTableRowDescriptionMethod == 0");
return (jobject) 0;
}
}
jobject
--- 2497,2511 ----
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to DeleteLocalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowDescriptionMethod == 0");
return (jobject) 0;
}
}
jobject
*** 2516,2526 ****
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(%p):",
acParent);
if (getAccessibleTableColumnDescriptionMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(
accessBridgeObject,
--- 2513,2523 ----
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(%p):",
acParent);
if (getAccessibleTableColumnDescriptionMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(
accessBridgeObject,
*** 2529,2604 ****
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to DeleteLocalRef()", FALSE);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTableColumnDescriptionMethod == 0");
return (jobject) 0;
}
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(jobject accessibleTable) {
jthrowable exception;
jint count;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(%p)",
accessibleTable);
// Get the table row selection count
if (getAccessibleTableRowSelectionCountMethod != (jmethodID) 0) {
count = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowSelectionCountMethod,
accessibleTable);
EXCEPTION_CHECK("##### Getting AccessibleTableRowSelectionCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table row selection count = %d", count);
return count;
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowSelectionCountMethod == 0");
return 0;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount failed");
return 0;
}
BOOL
AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(jobject accessibleTable, jint row) {
jthrowable exception;
BOOL result;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(%p, %d)",
accessibleTable, row);
if (isAccessibleTableRowSelectedMethod != (jmethodID) 0) {
result = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleTableRowSelectedMethod,
accessibleTable, row);
EXCEPTION_CHECK("##### Getting isAccessibleTableRowSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString(" ##### table row isSelected = %d", result);
return result;
} else {
! PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableRowSelectedMethod == 0");
return FALSE;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected failed");
return FALSE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(jobject accessibleTable, jint count,
jint *selections) {
jthrowable exception;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(%p, %d %p)",
accessibleTable, count, selections);
if (getAccessibleTableRowSelectionsMethod == (jmethodID) 0) {
return FALSE;
}
--- 2526,2601 ----
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to DeleteLocalRef()", FALSE);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnDescriptionMethod == 0");
return (jobject) 0;
}
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(jobject accessibleTable) {
jthrowable exception;
jint count;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(%p)",
accessibleTable);
// Get the table row selection count
if (getAccessibleTableRowSelectionCountMethod != (jmethodID) 0) {
count = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowSelectionCountMethod,
accessibleTable);
EXCEPTION_CHECK("##### Getting AccessibleTableRowSelectionCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table row selection count = %d", count);
return count;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowSelectionCountMethod == 0");
return 0;
}
! PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount failed");
return 0;
}
BOOL
AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(jobject accessibleTable, jint row) {
jthrowable exception;
BOOL result;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(%p, %d)",
accessibleTable, row);
if (isAccessibleTableRowSelectedMethod != (jmethodID) 0) {
result = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleTableRowSelectedMethod,
accessibleTable, row);
EXCEPTION_CHECK("##### Getting isAccessibleTableRowSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table row isSelected = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableRowSelectedMethod == 0");
return FALSE;
}
! PrintDebugString("[ERROR]: AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected failed");
return FALSE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(jobject accessibleTable, jint count,
jint *selections) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(%p, %d %p)",
accessibleTable, count, selections);
if (getAccessibleTableRowSelectionsMethod == (jmethodID) 0) {
return FALSE;
}
*** 2608,2681 ****
selections[i] = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowSelectionsMethod,
accessibleTable,
i);
EXCEPTION_CHECK("##### Getting AccessibleTableRowSelections - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table row selection[%d] = %d", i, selections[i]);
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections succeeded");
return TRUE;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(jobject accessibleTable) {
jthrowable exception;
jint count;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(%p)",
accessibleTable);
// Get the table column selection count
if (getAccessibleTableColumnSelectionCountMethod != (jmethodID) 0) {
count = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnSelectionCountMethod,
accessibleTable);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelectionCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table column selection count = %d", count);
return count;
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowCountMethod == 0");
return 0;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount failed");
return 0;
}
BOOL
AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(jobject accessibleTable, jint column) {
jthrowable exception;
BOOL result;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(%p, %d)",
accessibleTable, column);
if (isAccessibleTableColumnSelectedMethod != (jmethodID) 0) {
result = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleTableColumnSelectedMethod,
accessibleTable, column);
EXCEPTION_CHECK("##### Getting isAccessibleTableColumnSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString(" ##### table column isSelected = %d", result);
return result;
} else {
! PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableColumnSelectedMethod == 0");
return FALSE;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected failed");
return FALSE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(jobject accessibleTable, jint count,
jint *selections) {
jthrowable exception;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(%p, %d, %p)",
accessibleTable, count, selections);
if (getAccessibleTableColumnSelectionsMethod == (jmethodID) 0) {
return FALSE;
}
--- 2605,2678 ----
selections[i] = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowSelectionsMethod,
accessibleTable,
i);
EXCEPTION_CHECK("##### Getting AccessibleTableRowSelections - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table row selection[%d] = %d", i, selections[i]);
}
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections succeeded");
return TRUE;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(jobject accessibleTable) {
jthrowable exception;
jint count;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(%p)",
accessibleTable);
// Get the table column selection count
if (getAccessibleTableColumnSelectionCountMethod != (jmethodID) 0) {
count = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnSelectionCountMethod,
accessibleTable);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelectionCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table column selection count = %d", count);
return count;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowCountMethod == 0");
return 0;
}
! PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount failed");
return 0;
}
BOOL
AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(jobject accessibleTable, jint column) {
jthrowable exception;
BOOL result;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(%p, %d)",
accessibleTable, column);
if (isAccessibleTableColumnSelectedMethod != (jmethodID) 0) {
result = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleTableColumnSelectedMethod,
accessibleTable, column);
EXCEPTION_CHECK("##### Getting isAccessibleTableColumnSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table column isSelected = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableColumnSelectedMethod == 0");
return FALSE;
}
! PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected failed");
return FALSE;
}
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(jobject accessibleTable, jint count,
jint *selections) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(%p, %d, %p)",
accessibleTable, count, selections);
if (getAccessibleTableColumnSelectionsMethod == (jmethodID) 0) {
return FALSE;
}
*** 2685,2771 ****
selections[i] = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnSelectionsMethod,
accessibleTable,
i);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelections - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table Column selection[%d] = %d", i, selections[i]);
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections succeeded");
return TRUE;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableRow(jobject accessibleTable, jint index) {
jthrowable exception;
jint result;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRow(%p, index=%d)",
accessibleTable, index);
if (getAccessibleTableRowMethod != (jmethodID) 0) {
result = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowMethod,
accessibleTable, index);
EXCEPTION_CHECK("##### Getting AccessibleTableRow - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table row = %d", result);
return result;
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowMethod == 0");
return -1;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow failed");
return -1;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableColumn(jobject accessibleTable, jint index) {
jthrowable exception;
jint result;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn(%p, index=%d)",
accessibleTable, index);
if (getAccessibleTableColumnMethod != (jmethodID) 0) {
result = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnMethod,
accessibleTable, index);
EXCEPTION_CHECK("##### Getting AccessibleTableColumn - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table column = %d", result);
return result;
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnMethod == 0");
return -1;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn failed");
return -1;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableIndex(jobject accessibleTable, jint row, jint column) {
jthrowable exception;
jint result;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex(%p, row=%d, col=%d)",
accessibleTable, row, column);
if (getAccessibleTableIndexMethod != (jmethodID) 0) {
result = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableIndexMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting getAccessibleTableIndex - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### table index = %d", result);
return result;
} else {
! PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableIndexMethod == 0");
return -1;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex failed");
return -1;
}
/********** end AccessibleTable routines ******************************/
--- 2682,2768 ----
selections[i] = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnSelectionsMethod,
accessibleTable,
i);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelections - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table Column selection[%d] = %d", i, selections[i]);
}
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections succeeded");
return TRUE;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableRow(jobject accessibleTable, jint index) {
jthrowable exception;
jint result;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow(%p, index=%d)",
accessibleTable, index);
if (getAccessibleTableRowMethod != (jmethodID) 0) {
result = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableRowMethod,
accessibleTable, index);
EXCEPTION_CHECK("##### Getting AccessibleTableRow - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table row = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowMethod == 0");
return -1;
}
! PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow failed");
return -1;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableColumn(jobject accessibleTable, jint index) {
jthrowable exception;
jint result;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn(%p, index=%d)",
accessibleTable, index);
if (getAccessibleTableColumnMethod != (jmethodID) 0) {
result = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableColumnMethod,
accessibleTable, index);
EXCEPTION_CHECK("##### Getting AccessibleTableColumn - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table column = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnMethod == 0");
return -1;
}
! PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn failed");
return -1;
}
jint
AccessBridgeJavaEntryPoints::getAccessibleTableIndex(jobject accessibleTable, jint row, jint column) {
jthrowable exception;
jint result;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex(%p, row=%d, col=%d)",
accessibleTable, row, column);
if (getAccessibleTableIndexMethod != (jmethodID) 0) {
result = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTableIndexMethod,
accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting getAccessibleTableIndex - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### table index = %d", result);
return result;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableIndexMethod == 0");
return -1;
}
! PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex failed");
return -1;
}
/********** end AccessibleTable routines ******************************/
*** 2778,2788 ****
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet(%p, %p)",
accessibleContext, relationSet);
if (getAccessibleRelationCountMethod == (jmethodID) 0 ||
getAccessibleRelationKeyMethod == (jmethodID) 0 ||
getAccessibleRelationTargetCountMethod == (jmethodID) 0 ||
--- 2775,2785 ----
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet(%p, %p)",
accessibleContext, relationSet);
if (getAccessibleRelationCountMethod == (jmethodID) 0 ||
getAccessibleRelationKeyMethod == (jmethodID) 0 ||
getAccessibleRelationTargetCountMethod == (jmethodID) 0 ||
*** 2793,2803 ****
// Get the relations set count
relationSet->relationCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleRelationCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleRelationCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### AccessibleRelation count = %d", relationSet->relationCount);
// Get the relation set
for (int i = 0; i < relationSet->relationCount && i < MAX_RELATIONS; i++) {
--- 2790,2800 ----
// Get the relations set count
relationSet->relationCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleRelationCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleRelationCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleRelation count = %d", relationSet->relationCount);
// Get the relation set
for (int i = 0; i < relationSet->relationCount && i < MAX_RELATIONS; i++) {
*** 2818,2832 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleRelation key - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleRelation key - call to CallVoidMethod()", FALSE);
! PrintDebugString("##### AccessibleRelation key = %ls", relationSet->relations[i].key );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRelation key - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AccessibleRelation key is null.");
relationSet->relations[i].key [0] = (wchar_t) 0;
}
relationSet->relations[i].targetCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleRelationTargetCountMethod,
--- 2815,2829 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleRelation key - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleRelation key - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleRelation key = %ls", relationSet->relations[i].key );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRelation key - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AccessibleRelation key is null.");
relationSet->relations[i].key [0] = (wchar_t) 0;
}
relationSet->relations[i].targetCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleRelationTargetCountMethod,
*** 2838,2852 ****
accessibleContext, i, j);
EXCEPTION_CHECK("Getting AccessibleRelationSet - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(target);
EXCEPTION_CHECK("Getting AccessibleRelationSet - call to NewGlobalRef()", FALSE);
relationSet->relations[i].targets[j] = (JOBJECT64)globalRef;
! PrintDebugString(" relation set item: %p", globalRef);
}
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet succeeded");
return TRUE;
}
/********** end AccessibleRelationSet routines ************************/
--- 2835,2849 ----
accessibleContext, i, j);
EXCEPTION_CHECK("Getting AccessibleRelationSet - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(target);
EXCEPTION_CHECK("Getting AccessibleRelationSet - call to NewGlobalRef()", FALSE);
relationSet->relations[i].targets[j] = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: relation set item: %p", globalRef);
}
}
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet succeeded");
return TRUE;
}
/********** end AccessibleRelationSet routines ************************/
*** 2860,2893 ****
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertext(%p, %p)",
accessibleContext, hypertext);
// get the AccessibleHypertext
jobject ht = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHypertextMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ht);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE);
hypertext->accessibleHypertext = (JOBJECT64)globalRef;
! PrintDebugString(" ##### AccessibleHypertext = %p", globalRef);
if (hypertext->accessibleHypertext == 0) {
! PrintDebugString(" ##### null AccessibleHypertext; returning FALSE");
return false;
}
// get the hyperlink count
hypertext->linkCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkCountMethod,accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink count = %d", hypertext->linkCount);
// get the hypertext links
for (int i = 0; i < hypertext->linkCount && i < MAX_HYPERLINKS; i++) {
--- 2857,2890 ----
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext(%p, %p)",
accessibleContext, hypertext);
// get the AccessibleHypertext
jobject ht = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHypertextMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ht);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE);
hypertext->accessibleHypertext = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### AccessibleHypertext = %p", globalRef);
if (hypertext->accessibleHypertext == 0) {
! PrintDebugString("[WARN]: ##### null AccessibleHypertext; returning FALSE");
return false;
}
// get the hyperlink count
hypertext->linkCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkCountMethod,accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink count = %d", hypertext->linkCount);
// get the hypertext links
for (int i = 0; i < hypertext->linkCount && i < MAX_HYPERLINKS; i++) {
*** 2898,2908 ****
i);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
hypertext->links[i].accessibleHyperlink = (JOBJECT64)globalRef;
! PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkTextMethod,
hypertext->links[i].accessibleHyperlink,
--- 2895,2905 ----
i);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
hypertext->links[i].accessibleHyperlink = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkTextMethod,
hypertext->links[i].accessibleHyperlink,
*** 2922,2957 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
! PrintDebugString("##### AccessibleHyperlink text = %ls", hypertext->links[i].text );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AccessibleHyperlink text is null.");
hypertext->links[i].text[0] = (wchar_t) 0;
}
hypertext->links[i].startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkStartIndexMethod,
hypertext->links[i].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink start index = %d", hypertext->links[i].startIndex);
hypertext->links[i].endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod,
hypertext->links[i].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink end index = %d", hypertext->links[i].endIndex);
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext succeeded");
return TRUE;
}
/*
* Activates an AccessibleHyperlink
--- 2919,2954 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", hypertext->links[i].text );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AccessibleHyperlink text is null.");
hypertext->links[i].text[0] = (wchar_t) 0;
}
hypertext->links[i].startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkStartIndexMethod,
hypertext->links[i].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink start index = %d", hypertext->links[i].startIndex);
hypertext->links[i].endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod,
hypertext->links[i].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink end index = %d", hypertext->links[i].endIndex);
}
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext succeeded");
return TRUE;
}
/*
* Activates an AccessibleHyperlink
*** 2961,2980 ****
jobject accessibleHyperlink) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(%p, %p):",
accessibleContext, accessibleHyperlink);
if (activateAccessibleHyperlinkMethod != (jmethodID) 0) {
returnVal = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, activateAccessibleHyperlinkMethod,
accessibleContext, accessibleHyperlink);
EXCEPTION_CHECK("activateAccessibleHyperlink - call to CallBooleanMethod()", FALSE);
return returnVal;
} else {
! PrintDebugString("\r\n Error! either jniEnv == 0 or activateAccessibleHyperlinkMethod == 0");
return FALSE;
}
}
--- 2958,2977 ----
jobject accessibleHyperlink) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(%p, %p):",
accessibleContext, accessibleHyperlink);
if (activateAccessibleHyperlinkMethod != (jmethodID) 0) {
returnVal = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, activateAccessibleHyperlinkMethod,
accessibleContext, accessibleHyperlink);
EXCEPTION_CHECK("activateAccessibleHyperlink - call to CallBooleanMethod()", FALSE);
return returnVal;
} else {
! PrintDebugString("[ERROR]: either jniEnv == 0 or activateAccessibleHyperlinkMethod == 0");
return FALSE;
}
}
*** 2991,3021 ****
/* OUT */ AccessibleHypertextInfo *hypertext) {
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(%p, %p, startIndex = %d)",
accessibleContext, hypertext, nStartIndex);
// get the AccessibleHypertext
jobject ht = jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleHypertextMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ht);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE);
hypertext->accessibleHypertext = (JOBJECT64)globalRef;
! PrintDebugString(" ##### AccessibleHypertext = %p", globalRef);
if (hypertext->accessibleHypertext == 0) {
! PrintDebugString(" ##### null AccessibleHypertext; returning FALSE");
return FALSE;
}
// get the hyperlink count
hypertext->linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink count = %d", hypertext->linkCount);
if (nStartIndex >= hypertext->linkCount) {
return FALSE;
}
--- 2988,3018 ----
/* OUT */ AccessibleHypertextInfo *hypertext) {
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(%p, %p, startIndex = %d)",
accessibleContext, hypertext, nStartIndex);
// get the AccessibleHypertext
jobject ht = jniEnv->CallObjectMethod(accessBridgeObject, getAccessibleHypertextMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ht);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE);
hypertext->accessibleHypertext = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### AccessibleHypertext = %p", globalRef);
if (hypertext->accessibleHypertext == 0) {
! PrintDebugString("[WARN]: ##### null AccessibleHypertext; returning FALSE");
return FALSE;
}
// get the hyperlink count
hypertext->linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink count = %d", hypertext->linkCount);
if (nStartIndex >= hypertext->linkCount) {
return FALSE;
}
*** 3023,3044 ****
// NOTE: To avoid a crash when there are more than MAX_HYPERLINKS (64) links
// in the document, test for i < MAX_HYPERLINKS in addition to
// i < hypertext->linkCount
int bufIndex = 0;
for (int i = nStartIndex; (i < hypertext->linkCount) && (i < nStartIndex + MAX_HYPERLINKS); i++) {
! PrintDebugString(" getting hyperlink %d ...", i);
// get the hyperlink
jobject hl = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkMethod,
hypertext->accessibleHypertext,
i);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
hypertext->links[bufIndex].accessibleHyperlink = (JOBJECT64)globalRef;
! PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkTextMethod,
hypertext->links[bufIndex].accessibleHyperlink,
--- 3020,3041 ----
// NOTE: To avoid a crash when there are more than MAX_HYPERLINKS (64) links
// in the document, test for i < MAX_HYPERLINKS in addition to
// i < hypertext->linkCount
int bufIndex = 0;
for (int i = nStartIndex; (i < hypertext->linkCount) && (i < nStartIndex + MAX_HYPERLINKS); i++) {
! PrintDebugString("[INFO]: getting hyperlink %d ...", i);
// get the hyperlink
jobject hl = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkMethod,
hypertext->accessibleHypertext,
i);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
hypertext->links[bufIndex].accessibleHyperlink = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkTextMethod,
hypertext->links[bufIndex].accessibleHyperlink,
*** 3059,3125 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
! PrintDebugString("##### AccessibleHyperlink text = %ls", hypertext->links[bufIndex].text );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AccessibleHyperlink text is null.");
hypertext->links[bufIndex].text[0] = (wchar_t) 0;
}
hypertext->links[bufIndex].startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkStartIndexMethod,
hypertext->links[bufIndex].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink start index = %d", hypertext->links[bufIndex].startIndex);
hypertext->links[bufIndex].endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod,
hypertext->links[bufIndex].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink end index = %d", hypertext->links[bufIndex].endIndex);
bufIndex++;
}
! PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt succeeded");
return TRUE;
}
jint AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(const jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(%X)",
accessibleContext);
if (getAccessibleHyperlinkCountMethod == (jmethodID)0) {
return -1;
}
// get the hyperlink count
jint linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", -1);
! PrintDebugString(" ##### hyperlink count = %d", linkCount);
return linkCount;
}
jint AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(const jobject hypertext,
const jint nIndex) {
jthrowable exception;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(%p, index = %d)",
hypertext, nIndex);
if (getAccessibleHypertextLinkIndexMethod == (jmethodID)0) {
return -1;
}
--- 3056,3122 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", hypertext->links[bufIndex].text );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AccessibleHyperlink text is null.");
hypertext->links[bufIndex].text[0] = (wchar_t) 0;
}
hypertext->links[bufIndex].startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkStartIndexMethod,
hypertext->links[bufIndex].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink start index = %d", hypertext->links[bufIndex].startIndex);
hypertext->links[bufIndex].endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod,
hypertext->links[bufIndex].accessibleHyperlink,
i);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink end index = %d", hypertext->links[bufIndex].endIndex);
bufIndex++;
}
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt succeeded");
return TRUE;
}
jint AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(const jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(%X)",
accessibleContext);
if (getAccessibleHyperlinkCountMethod == (jmethodID)0) {
return -1;
}
// get the hyperlink count
jint linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod,
accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", -1);
! PrintDebugString("[INFO]: ##### hyperlink count = %d", linkCount);
return linkCount;
}
jint AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(const jobject hypertext,
const jint nIndex) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(%p, index = %d)",
hypertext, nIndex);
if (getAccessibleHypertextLinkIndexMethod == (jmethodID)0) {
return -1;
}
*** 3127,3137 ****
// get the hyperlink index
jint index = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHypertextLinkIndexMethod,
hypertext, nIndex);
EXCEPTION_CHECK("##### Getting hyperlink index - call to CallIntMethod()", -1);
! PrintDebugString(" ##### hyperlink index = %d", index);
return index;
}
BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext,
--- 3124,3134 ----
// get the hyperlink index
jint index = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHypertextLinkIndexMethod,
hypertext, nIndex);
EXCEPTION_CHECK("##### Getting hyperlink index - call to CallIntMethod()", -1);
! PrintDebugString("[INFO]: ##### hyperlink index = %d", index);
return index;
}
BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext,
*** 3140,3150 ****
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHyperlink(%p, index = %d)",
hypertext, index);
// get the hyperlink
jobject hl = jniEnv->CallObjectMethod(accessBridgeObject,
--- 3137,3147 ----
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHyperlink(%p, index = %d)",
hypertext, index);
// get the hyperlink
jobject hl = jniEnv->CallObjectMethod(accessBridgeObject,
*** 3153,3163 ****
index);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
info->accessibleHyperlink = (JOBJECT64)globalRef;
! PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkTextMethod,
info->accessibleHyperlink,
--- 3150,3160 ----
index);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
info->accessibleHyperlink = (JOBJECT64)globalRef;
! PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleHyperlinkTextMethod,
info->accessibleHyperlink,
*** 3178,3209 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
! PrintDebugString("##### AccessibleHyperlink text = %ls", info->text );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AccessibleHyperlink text is null.");
info->text[0] = (wchar_t) 0;
}
info->startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkStartIndexMethod,
info->accessibleHyperlink,
index);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink start index = %d", info->startIndex);
info->endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod,
info->accessibleHyperlink,
index);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### hyperlink end index = %d", info->endIndex);
return TRUE;
}
--- 3175,3206 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", info->text );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AccessibleHyperlink text is null.");
info->text[0] = (wchar_t) 0;
}
info->startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkStartIndexMethod,
info->accessibleHyperlink,
index);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink start index = %d", info->startIndex);
info->endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod,
info->accessibleHyperlink,
index);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### hyperlink end index = %d", info->endIndex);
return TRUE;
}
*** 3213,3223 ****
BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleContext,
AccessibleKeyBindings *keyBindings) {
jthrowable exception;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(%p, %p)",
accessibleContext, keyBindings);
if (getAccessibleKeyBindingsCountMethod == (jmethodID) 0 ||
getAccessibleKeyBindingCharMethod == (jmethodID) 0 ||
getAccessibleKeyBindingModifiersMethod == (jmethodID) 0) {
--- 3210,3220 ----
BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleContext,
AccessibleKeyBindings *keyBindings) {
jthrowable exception;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(%p, %p)",
accessibleContext, keyBindings);
if (getAccessibleKeyBindingsCountMethod == (jmethodID) 0 ||
getAccessibleKeyBindingCharMethod == (jmethodID) 0 ||
getAccessibleKeyBindingModifiersMethod == (jmethodID) 0) {
*** 3228,3258 ****
keyBindings->keyBindingsCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleKeyBindingsCountMethod, accessibleContext);
EXCEPTION_CHECK("##### Getting key bindings count - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### key bindings count = %d", keyBindings->keyBindingsCount);
// get the key bindings
for (int i = 0; i < keyBindings->keyBindingsCount && i < MAX_KEY_BINDINGS; i++) {
// get the key binding character
keyBindings->keyBindingInfo[i].character = jniEnv->CallCharMethod(accessBridgeObject,
getAccessibleKeyBindingCharMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting key binding character - call to CallCharMethod()", FALSE);
! PrintDebugString(" ##### key binding character = %c", keyBindings->keyBindingInfo[i].character);
! PrintDebugString(" ##### key binding character in hex = %hx", keyBindings->keyBindingInfo[i].character);
// get the key binding modifiers
keyBindings->keyBindingInfo[i].modifiers = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleKeyBindingModifiersMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting key binding modifiers - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### key binding modifiers = %x", keyBindings->keyBindingInfo[i].modifiers);
}
return FALSE;
}
// AccessibleIcon methods
--- 3225,3256 ----
keyBindings->keyBindingsCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleKeyBindingsCountMethod, accessibleContext);
EXCEPTION_CHECK("##### Getting key bindings count - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### key bindings count = %d", keyBindings->keyBindingsCount);
// get the key bindings
for (int i = 0; i < keyBindings->keyBindingsCount && i < MAX_KEY_BINDINGS; i++) {
// get the key binding character
keyBindings->keyBindingInfo[i].character = jniEnv->CallCharMethod(accessBridgeObject,
getAccessibleKeyBindingCharMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting key binding character - call to CallCharMethod()", FALSE);
! PrintDebugString("[INFO]: ##### key binding character = %c"\
! " ##### key binding character in hex = %hx"\
! , keyBindings->keyBindingInfo[i].character, keyBindings->keyBindingInfo[i].character);
// get the key binding modifiers
keyBindings->keyBindingInfo[i].modifiers = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleKeyBindingModifiersMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting key binding modifiers - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### key binding modifiers = %x", keyBindings->keyBindingInfo[i].modifiers);
}
return FALSE;
}
// AccessibleIcon methods
*** 3261,3288 ****
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)",
accessibleContext, icons);
if (getAccessibleIconsCountMethod == (jmethodID) 0 ||
getAccessibleIconDescriptionMethod == (jmethodID) 0 ||
getAccessibleIconHeightMethod == (jmethodID) 0 ||
getAccessibleIconWidthMethod == (jmethodID) 0) {
! PrintDebugString(" ##### missing method(s) !!!");
return FALSE;
}
// get the icons count
icons->iconsCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIconsCountMethod, accessibleContext);
EXCEPTION_CHECK("##### Getting icons count - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### icons count = %d", icons->iconsCount);
// get the icons
for (int i = 0; i < icons->iconsCount && i < MAX_ICON_INFO; i++) {
--- 3259,3286 ----
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)",
accessibleContext, icons);
if (getAccessibleIconsCountMethod == (jmethodID) 0 ||
getAccessibleIconDescriptionMethod == (jmethodID) 0 ||
getAccessibleIconHeightMethod == (jmethodID) 0 ||
getAccessibleIconWidthMethod == (jmethodID) 0) {
! PrintDebugString("[WARN]: ##### missing method(s) !!!");
return FALSE;
}
// get the icons count
icons->iconsCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIconsCountMethod, accessibleContext);
EXCEPTION_CHECK("##### Getting icons count - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### icons count = %d", icons->iconsCount);
// get the icons
for (int i = 0; i < icons->iconsCount && i < MAX_ICON_INFO; i++) {
*** 3306,3339 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleIcon description - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleIcon description - call to CallVoidMethod()", FALSE);
! PrintDebugString("##### AccessibleIcon description = %ls", icons->iconInfo[i].description );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleIcon description - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AccessibleIcon description is null.");
icons->iconInfo[i].description[0] = (wchar_t) 0;
}
// get the icon height
icons->iconInfo[i].height = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIconHeightMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting icon height - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### icon height = %d", icons->iconInfo[i].height);
// get the icon width
icons->iconInfo[i].width = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIconWidthMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting icon width - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### icon width = %d", icons->iconInfo[i].width);
}
return FALSE;
}
// AccessibleActionMethods
--- 3304,3337 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleIcon description - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleIcon description - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleIcon description = %ls", icons->iconInfo[i].description );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleIcon description - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AccessibleIcon description is null.");
icons->iconInfo[i].description[0] = (wchar_t) 0;
}
// get the icon height
icons->iconInfo[i].height = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIconHeightMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting icon height - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### icon height = %d", icons->iconInfo[i].height);
// get the icon width
icons->iconInfo[i].width = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIconWidthMethod,
accessibleContext,
i);
EXCEPTION_CHECK("##### Getting icon width - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### icon width = %d", icons->iconInfo[i].width);
}
return FALSE;
}
// AccessibleActionMethods
*** 3342,3367 ****
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)",
accessibleContext, actions);
if (getAccessibleActionsCountMethod == (jmethodID) 0 ||
getAccessibleActionNameMethod == (jmethodID) 0) {
! PrintDebugString(" ##### missing method(s) !!!");
return FALSE;
}
// get the icons count
actions->actionsCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleActionsCountMethod,accessibleContext);
EXCEPTION_CHECK("##### Getting actions count - call to CallIntMethod()", FALSE);
! PrintDebugString(" ##### key actions count = %d", actions->actionsCount);
// get the actions
for (int i = 0; i < actions->actionsCount && i < MAX_ACTION_INFO; i++) {
--- 3340,3365 ----
jthrowable exception;
const wchar_t *stringBytes;
jsize length;
! PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)",
accessibleContext, actions);
if (getAccessibleActionsCountMethod == (jmethodID) 0 ||
getAccessibleActionNameMethod == (jmethodID) 0) {
! PrintDebugString("[WARN]: ##### missing method(s) !!!");
return FALSE;
}
// get the icons count
actions->actionsCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleActionsCountMethod,accessibleContext);
EXCEPTION_CHECK("##### Getting actions count - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: ##### key actions count = %d", actions->actionsCount);
// get the actions
for (int i = 0; i < actions->actionsCount && i < MAX_ACTION_INFO; i++) {
*** 3385,3399 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleAction name - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleAction name - call to CallVoidMethod()", FALSE);
! PrintDebugString("##### AccessibleAction name = %ls", actions->actionInfo[i].name );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAction name - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AccessibleAction name is null.");
actions->actionInfo[i].name [0] = (wchar_t) 0;
}
}
return FALSE;
}
--- 3383,3397 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleAction name - call to ReleaseStringChars()", FALSE);
// jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleAction name - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: ##### AccessibleAction name = %ls", actions->actionInfo[i].name );
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAction name - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AccessibleAction name is null.");
actions->actionInfo[i].name [0] = (wchar_t) 0;
}
}
return FALSE;
}
*** 3403,3442 ****
jint *failure) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::doAccessibleActions(%p, #actions %d %s):",
accessibleContext,
actionsToDo->actionsCount,
actionsToDo->actions[0].name);
if (doAccessibleActionsMethod == (jmethodID) 0) {
*failure = 0;
return FALSE;
}
! PrintDebugString("\r\n doing %d actions ...", actionsToDo->actionsCount);
for (int i = 0; i < actionsToDo->actionsCount && i < MAX_ACTIONS_TO_DO; i++) {
! PrintDebugString("\r doing action %d: %s ...", i, actionsToDo->actions[i].name);
// create a Java String for the action name
wchar_t *actionName = (wchar_t *)actionsToDo->actions[i].name;
jstring javaName = jniEnv->NewString(actionName, (jsize)wcslen(actionName));
if (javaName == 0) {
! PrintDebugString("\r NewString failed");
*failure = i;
return FALSE;
}
returnVal = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject, doAccessibleActionsMethod,
accessibleContext, javaName);
jniEnv->DeleteLocalRef(javaName);
EXCEPTION_CHECK("doAccessibleActions - call to CallBooleanMethod()", FALSE);
if (returnVal != TRUE) {
! PrintDebugString("\r Action %d failed", i);
*failure = i;
return FALSE;
}
}
*failure = -1;
--- 3401,3440 ----
jint *failure) {
jthrowable exception;
BOOL returnVal;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::doAccessibleActions(%p, #actions %d %s):",
accessibleContext,
actionsToDo->actionsCount,
actionsToDo->actions[0].name);
if (doAccessibleActionsMethod == (jmethodID) 0) {
*failure = 0;
return FALSE;
}
! PrintDebugString("[INFO]: doing %d actions ...", actionsToDo->actionsCount);
for (int i = 0; i < actionsToDo->actionsCount && i < MAX_ACTIONS_TO_DO; i++) {
! PrintDebugString("[INFO]: doing action %d: %s ...", i, actionsToDo->actions[i].name);
// create a Java String for the action name
wchar_t *actionName = (wchar_t *)actionsToDo->actions[i].name;
jstring javaName = jniEnv->NewString(actionName, (jsize)wcslen(actionName));
if (javaName == 0) {
! PrintDebugString("[ERROR]: NewString failed");
*failure = i;
return FALSE;
}
returnVal = (BOOL)jniEnv->CallBooleanMethod(accessBridgeObject, doAccessibleActionsMethod,
accessibleContext, javaName);
jniEnv->DeleteLocalRef(javaName);
EXCEPTION_CHECK("doAccessibleActions - call to CallBooleanMethod()", FALSE);
if (returnVal != TRUE) {
! PrintDebugString("[ERROR]: Action %d failed", i);
*failure = i;
return FALSE;
}
}
*failure = -1;
*** 3456,3489 ****
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
}
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextInfo(%p, %d, %d):",
accessibleContext, x, y);
// Get the character count
if (getAccessibleCharCountFromContextMethod != (jmethodID) 0) {
textInfo->charCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleCharCountFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleCharCount - call to CallIntMethod()", FALSE);
! PrintDebugString(" Char count = %d", textInfo->charCount);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleCharCountFromContextMethod == 0");
return FALSE;
}
// Get the index of the caret
if (getAccessibleCaretPositionFromContextMethod != (jmethodID) 0) {
textInfo->caretIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleCaretPositionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleCaretPosition - call to CallIntMethod()", FALSE);
! PrintDebugString(" Index at caret = %d", textInfo->caretIndex);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleCaretPositionFromContextMethod == 0");
return FALSE;
}
// Get the index at the given point
if (getAccessibleIndexAtPointFromContextMethod != (jmethodID) 0) {
--- 3454,3487 ----
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
}
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextInfo(%p, %d, %d):",
accessibleContext, x, y);
// Get the character count
if (getAccessibleCharCountFromContextMethod != (jmethodID) 0) {
textInfo->charCount = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleCharCountFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleCharCount - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Char count = %d", textInfo->charCount);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleCharCountFromContextMethod == 0");
return FALSE;
}
// Get the index of the caret
if (getAccessibleCaretPositionFromContextMethod != (jmethodID) 0) {
textInfo->caretIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleCaretPositionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleCaretPosition - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Index at caret = %d", textInfo->caretIndex);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleCaretPositionFromContextMethod == 0");
return FALSE;
}
// Get the index at the given point
if (getAccessibleIndexAtPointFromContextMethod != (jmethodID) 0) {
*** 3494,3506 ****
textInfo->indexAtPoint = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIndexAtPointFromContextMethod,
accessibleContext, x, y);
EXCEPTION_CHECK("Getting AccessibleIndexAtPoint - call to CallIntMethod()", FALSE);
}
! PrintDebugString(" Index at point = %d", textInfo->indexAtPoint);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleIndexAtPointFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 3492,3504 ----
textInfo->indexAtPoint = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleIndexAtPointFromContextMethod,
accessibleContext, x, y);
EXCEPTION_CHECK("Getting AccessibleIndexAtPoint - call to CallIntMethod()", FALSE);
}
! PrintDebugString("[INFO]: Index at point = %d", textInfo->indexAtPoint);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleIndexAtPointFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 3510,3520 ****
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextItems(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
--- 3508,3518 ----
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextItems(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
*** 3524,3563 ****
if (getAccessibleLetterAtIndexFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleLetterAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallIntMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to GetStringChars()", FALSE);
textItems->letter = stringBytes[0];
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallVoidMethod()", FALSE);
! PrintDebugString(" Accessible Text letter = %c", textItems->letter);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Text letter is null.");
textItems->letter = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleLetterAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the word at index
if (getAccessibleWordAtIndexFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleWordAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallIntMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to GetStringChars()", FALSE);
wcsncpy(textItems->word, stringBytes, (sizeof(textItems->word) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
--- 3522,3561 ----
if (getAccessibleLetterAtIndexFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleLetterAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to GetStringChars()", FALSE);
textItems->letter = stringBytes[0];
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: Accessible Text letter = %c", textItems->letter);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Text letter is null.");
textItems->letter = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleLetterAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the word at index
if (getAccessibleWordAtIndexFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleWordAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to GetStringChars()", FALSE);
wcsncpy(textItems->word, stringBytes, (sizeof(textItems->word) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
*** 3567,3595 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Text word = %ls", textItems->word);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Text word is null.");
textItems->word[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleWordAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the sentence at index
if (getAccessibleSentenceAtIndexFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleSentenceAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to GetStringChars()", FALSE);
wcsncpy(textItems->sentence, stringBytes, (sizeof(textItems->sentence) / sizeof(wchar_t))-2);
length = jniEnv->GetStringLength(js);
--- 3565,3593 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Text word = %ls", textItems->word);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Text word is null.");
textItems->word[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleWordAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the sentence at index
if (getAccessibleSentenceAtIndexFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleSentenceAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to GetStringChars()", FALSE);
wcsncpy(textItems->sentence, stringBytes, (sizeof(textItems->sentence) / sizeof(wchar_t))-2);
length = jniEnv->GetStringLength(js);
*** 3603,3621 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Text sentence = %ls", textItems->sentence);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Text sentence is null.");
textItems->sentence[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleSentenceAtIndexFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 3601,3619 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Text sentence = %ls", textItems->sentence);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Text sentence is null.");
textItems->sentence[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleSentenceAtIndexFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 3626,3636 ****
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(%p):",
accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
--- 3624,3634 ----
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(%p):",
accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
*** 3641,3675 ****
if (getAccessibleTextSelectionStartFromContextMethod != (jmethodID) 0) {
selectionInfo->selectionStartIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextSelectionStartFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectionStart - call to CallIntMethod()", FALSE);
! PrintDebugString(" Selection start = %d", selectionInfo->selectionStartIndex);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectionStartFromContextMethod == 0");
return FALSE;
}
// Get the selection end index
if (getAccessibleTextSelectionEndFromContextMethod != (jmethodID) 0) {
selectionInfo->selectionEndIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextSelectionEndFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectionEnd - call to CallIntMethod()", FALSE);
! PrintDebugString(" Selection end = %d", selectionInfo->selectionEndIndex);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectionEndFromContextMethod == 0");
return FALSE;
}
// Get the selected text
if (getAccessibleTextSelectedTextFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextSelectedTextFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to GetStringChars()", FALSE);
wcsncpy(selectionInfo->selectedText, stringBytes, (sizeof(selectionInfo->selectedText) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
--- 3639,3673 ----
if (getAccessibleTextSelectionStartFromContextMethod != (jmethodID) 0) {
selectionInfo->selectionStartIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextSelectionStartFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectionStart - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Selection start = %d", selectionInfo->selectionStartIndex);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextSelectionStartFromContextMethod == 0");
return FALSE;
}
// Get the selection end index
if (getAccessibleTextSelectionEndFromContextMethod != (jmethodID) 0) {
selectionInfo->selectionEndIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextSelectionEndFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectionEnd - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Selection end = %d", selectionInfo->selectionEndIndex);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextSelectionEndFromContextMethod == 0");
return FALSE;
}
// Get the selected text
if (getAccessibleTextSelectedTextFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextSelectedTextFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to GetStringChars()", FALSE);
wcsncpy(selectionInfo->selectedText, stringBytes, (sizeof(selectionInfo->selectedText) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
*** 3679,3697 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallVoidMethod()", FALSE);
! PrintDebugString(" Accessible's selected text = %s", selectionInfo->selectedText);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible's selected text is null.");
selectionInfo->selectedText[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectedTextFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 3677,3695 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: Accessible's selected text = %s", selectionInfo->selectedText);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible's selected text is null.");
selectionInfo->selectedText[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[WARN]: either env == 0 or getAccessibleTextSelectedTextFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 3701,3720 ****
const wchar_t *stringBytes;
jobject AttributeSet;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
}
if (accessibleContext == (jobject) 0) {
! PrintDebugString(" passed in AccessibleContext == null! (oops)");
attributes->bold = FALSE;
attributes->italic = FALSE;
attributes->underline = FALSE;
attributes->strikethrough = FALSE;
--- 3699,3718 ----
const wchar_t *stringBytes;
jobject AttributeSet;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
}
if (accessibleContext == (jobject) 0) {
! PrintDebugString("[WARN]: passed in AccessibleContext == null! (oops)");
attributes->bold = FALSE;
attributes->italic = FALSE;
attributes->underline = FALSE;
attributes->strikethrough = FALSE;
*** 3737,3759 ****
return (FALSE);
}
// Get the AttributeSet
if (getAccessibleAttributeSetAtIndexFromContextMethod != (jmethodID) 0) {
! PrintDebugString(" Getting AttributeSet at index...");
AttributeSet = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributeSetAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleAttributeSetAtIndex - call to CallObjectMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleAttributeSetAtIndexFromContextMethod == 0");
return FALSE;
}
// It is legal for the AttributeSet object to be null, in which case we return false!
if (AttributeSet == (jobject) 0) {
! PrintDebugString(" AttributeSet returned at index is null (this is legal! - see AWT in J2SE 1.3");
attributes->bold = FALSE;
attributes->italic = FALSE;
attributes->underline = FALSE;
attributes->strikethrough = FALSE;
--- 3735,3757 ----
return (FALSE);
}
// Get the AttributeSet
if (getAccessibleAttributeSetAtIndexFromContextMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting AttributeSet at index...");
AttributeSet = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributeSetAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleAttributeSetAtIndex - call to CallObjectMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributeSetAtIndexFromContextMethod == 0");
return FALSE;
}
// It is legal for the AttributeSet object to be null, in which case we return false!
if (AttributeSet == (jobject) 0) {
! PrintDebugString("[WARN]: AttributeSet returned at index is null (this is legal! - see AWT in J2SE 1.3");
attributes->bold = FALSE;
attributes->italic = FALSE;
attributes->underline = FALSE;
attributes->strikethrough = FALSE;
*** 3776,3888 ****
return (FALSE);
}
// Get the bold setting
if (getBoldFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting bold from AttributeSet...");
attributes->bold = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getBoldFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getBoldFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the italic setting
if (getItalicFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting italic from AttributeSet...");
attributes->italic = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getItalicFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getItalicdFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the underline setting
if (getUnderlineFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting underline from AttributeSet...");
attributes->underline = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getUnderlineFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getUnderlineFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the strikethrough setting
if (getStrikethroughFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting strikethrough from AttributeSet...");
attributes->strikethrough = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getStrikethroughFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getStrikethroughFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the superscript setting
if (getSuperscriptFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting superscript from AttributeSet...");
attributes->superscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getSuperscriptFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getSuperscripteFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the subscript setting
if (getSubscriptFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting subscript from AttributeSet...");
attributes->subscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getSubscriptFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getSubscriptFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the backgroundColor setting
if (getBackgroundColorFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting backgroundColor from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getBackgroundColorFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallObjectMethod()", FALSE);
if (js != (jstring) 0) {
--- 3774,3886 ----
return (FALSE);
}
// Get the bold setting
if (getBoldFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting bold from AttributeSet...");
attributes->bold = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getBoldFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getBoldFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the italic setting
if (getItalicFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting italic from AttributeSet...");
attributes->italic = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getItalicFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getItalicdFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the underline setting
if (getUnderlineFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting underline from AttributeSet...");
attributes->underline = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getUnderlineFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getUnderlineFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the strikethrough setting
if (getStrikethroughFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting strikethrough from AttributeSet...");
attributes->strikethrough = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getStrikethroughFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getStrikethroughFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the superscript setting
if (getSuperscriptFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting superscript from AttributeSet...");
attributes->superscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getSuperscriptFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getSuperscripteFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the subscript setting
if (getSubscriptFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting subscript from AttributeSet...");
attributes->subscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getSubscriptFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getSubscriptFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the backgroundColor setting
if (getBackgroundColorFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting backgroundColor from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getBackgroundColorFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallObjectMethod()", FALSE);
if (js != (jstring) 0) {
*** 3896,3925 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" AttributeSet's background color = %ls", attributes->backgroundColor);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AttributeSet's background color is null.");
attributes->backgroundColor[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getBackgroundColorFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the foregroundColor setting
if (getForegroundColorFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting foregroundColor from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getForegroundColorFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallObjectMethod()", FALSE);
if (js != (jstring) 0) {
--- 3894,3923 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: AttributeSet's background color = %ls", attributes->backgroundColor);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AttributeSet's background color is null.");
attributes->backgroundColor[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getBackgroundColorFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the foregroundColor setting
if (getForegroundColorFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting foregroundColor from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getForegroundColorFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallObjectMethod()", FALSE);
if (js != (jstring) 0) {
*** 3933,3962 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" AttributeSet's foreground color = %ls", attributes->foregroundColor);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AttributeSet's foreground color is null.");
attributes->foregroundColor[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getForegroundColorFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the fontFamily setting
if (getFontFamilyFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting fontFamily from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getFontFamilyFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallObjectMethod()", FALSE);
if (js != (jstring) 0) {
--- 3931,3960 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: AttributeSet's foreground color = %ls", attributes->foregroundColor);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AttributeSet's foreground color is null.");
attributes->foregroundColor[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getForegroundColorFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the fontFamily setting
if (getFontFamilyFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting fontFamily from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getFontFamilyFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallObjectMethod()", FALSE);
if (js != (jstring) 0) {
*** 3970,4006 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" AttributeSet's fontFamily = %ls", attributes->fontFamily);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" AttributeSet's fontFamily is null.");
attributes->backgroundColor[0] = (wchar_t) 0;
}
} else {
! PrintDebugString(" Error! either env == 0 or getFontFamilyFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the font size
if (getFontSizeFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting font size from AttributeSet...");
attributes->fontSize = jniEnv->CallIntMethod(accessBridgeObject,
getFontSizeFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallIntMethod()", FALSE);
! PrintDebugString(" AttributeSet's font size = %d", attributes->fontSize);
} else {
! PrintDebugString(" Error! either env == 0 or getAlignmentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to DeleteLocalRef()", FALSE);
--- 3968,4004 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: AttributeSet's fontFamily = %ls", attributes->fontFamily);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: AttributeSet's fontFamily is null.");
attributes->backgroundColor[0] = (wchar_t) 0;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getFontFamilyFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the font size
if (getFontSizeFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting font size from AttributeSet...");
attributes->fontSize = jniEnv->CallIntMethod(accessBridgeObject,
getFontSizeFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: AttributeSet's font size = %d", attributes->fontSize);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAlignmentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to DeleteLocalRef()", FALSE);
*** 4014,4172 ****
attributes->alignment = jniEnv->CallIntMethod(accessBridgeObject,
getAlignmentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getAlignmentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the bidiLevel setting
if (getBidiLevelFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting bidiLevel from AttributeSet...");
attributes->bidiLevel = jniEnv->CallIntMethod(accessBridgeObject,
getBidiLevelFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getBidiLevelFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the firstLineIndent setting
if (getFirstLineIndentFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting firstLineIndent from AttributeSet...");
attributes->firstLineIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getFirstLineIndentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getFirstLineIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the leftIndent setting
if (getLeftIndentFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting leftIndent from AttributeSet...");
attributes->leftIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getLeftIndentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getLeftIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the rightIndent setting
if (getRightIndentFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting rightIndent from AttributeSet...");
attributes->rightIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getRightIndentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getRightIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the lineSpacing setting
if (getLineSpacingFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting lineSpacing from AttributeSet...");
attributes->lineSpacing = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getLineSpacingFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getLineSpacingFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the spaceAbove setting
if (getSpaceAboveFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting spaceAbove from AttributeSet...");
attributes->spaceAbove = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getSpaceAboveFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getSpaceAboveFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the spaceBelow setting
if (getSpaceBelowFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString(" Getting spaceBelow from AttributeSet...");
attributes->spaceBelow = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getSpaceBelowFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or getSpaceBelowFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Release the AttributeSet object
if (decrementReferenceMethod != (jmethodID) 0) {
! PrintDebugString(" Decrementing reference to AttributeSet...");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Releasing AttributeSet object - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or accessBridgeObject == 0");
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Releasing AttributeSet object - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the full attributes string at index
if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) {
! PrintDebugString(" Getting full attributes string from Context...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributesAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE);
wcsncpy(attributes->fullAttributesString, stringBytes, (sizeof(attributes->fullAttributesString) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
--- 4012,4170 ----
attributes->alignment = jniEnv->CallIntMethod(accessBridgeObject,
getAlignmentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAlignmentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the bidiLevel setting
if (getBidiLevelFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting bidiLevel from AttributeSet...");
attributes->bidiLevel = jniEnv->CallIntMethod(accessBridgeObject,
getBidiLevelFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getBidiLevelFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the firstLineIndent setting
if (getFirstLineIndentFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[ERROR]: Getting firstLineIndent from AttributeSet...");
attributes->firstLineIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getFirstLineIndentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getFirstLineIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the leftIndent setting
if (getLeftIndentFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting leftIndent from AttributeSet...");
attributes->leftIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getLeftIndentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getLeftIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the rightIndent setting
if (getRightIndentFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting rightIndent from AttributeSet...");
attributes->rightIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getRightIndentFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getRightIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the lineSpacing setting
if (getLineSpacingFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting lineSpacing from AttributeSet...");
attributes->lineSpacing = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getLineSpacingFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getLineSpacingFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the spaceAbove setting
if (getSpaceAboveFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting spaceAbove from AttributeSet...");
attributes->spaceAbove = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getSpaceAboveFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getSpaceAboveFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the spaceBelow setting
if (getSpaceBelowFromAttributeSetMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting spaceBelow from AttributeSet...");
attributes->spaceBelow = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getSpaceBelowFromAttributeSetMethod,
AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallIntMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getSpaceBelowFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallVoidMethod()", FALSE);
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Release the AttributeSet object
if (decrementReferenceMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Decrementing reference to AttributeSet...");
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Releasing AttributeSet object - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or accessBridgeObject == 0");
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Releasing AttributeSet object - call to DeleteLocalRef()", FALSE);
return FALSE;
}
// Get the full attributes string at index
if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: Getting full attributes string from Context...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributesAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE);
wcsncpy(attributes->fullAttributesString, stringBytes, (sizeof(attributes->fullAttributesString) / sizeof(wchar_t)));
length = jniEnv->GetStringLength(js);
*** 4176,4197 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Text attributes = %ls", attributes->fullAttributesString);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" Accessible Text attributes is null.");
attributes->fullAttributesString[0] = (wchar_t) 0;
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
return FALSE;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0");
jniEnv->DeleteLocalRef(AttributeSet);
return FALSE;
}
jniEnv->DeleteLocalRef(AttributeSet);
--- 4174,4195 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Text attributes = %ls", attributes->fullAttributesString);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: Accessible Text attributes is null.");
attributes->fullAttributesString[0] = (wchar_t) 0;
jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
return FALSE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0");
jniEnv->DeleteLocalRef(AttributeSet);
return FALSE;
}
jniEnv->DeleteLocalRef(AttributeSet);
*** 4202,4212 ****
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, AccessibleTextRectInfo *rectInfo, jint index) {
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextRect(%p), index = %d",
accessibleContext, index);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
--- 4200,4210 ----
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, AccessibleTextRectInfo *rectInfo, jint index) {
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextRect(%p), index = %d",
accessibleContext, index);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
*** 4217,4265 ****
if (getAccessibleXcoordTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->x = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleXcoordTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleXcoordTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString(" X coord = %d", rectInfo->x);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleXcoordTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the y coord
if (getAccessibleYcoordTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->y = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleYcoordTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleYcoordTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString(" Y coord = %d", rectInfo->y);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleYcoordTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the width
if (getAccessibleWidthTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->width = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleWidthTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleWidthTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString(" Width = %d", rectInfo->width);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleWidthTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the height
if (getAccessibleHeightTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->height = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHeightTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleHeightTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString(" Height = %d", rectInfo->height);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleHeightTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4215,4263 ----
if (getAccessibleXcoordTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->x = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleXcoordTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleXcoordTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: X coord = %d", rectInfo->x);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleXcoordTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the y coord
if (getAccessibleYcoordTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->y = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleYcoordTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleYcoordTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Y coord = %d", rectInfo->y);
} else {
! PrintDebugString("[INFO]: either env == 0 or getAccessibleYcoordTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the width
if (getAccessibleWidthTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->width = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleWidthTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleWidthTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Width = %d", rectInfo->width);
} else {
! PrintDebugString("[INFO]: either env == 0 or getAccessibleWidthTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
// Get the height
if (getAccessibleHeightTextRectAtIndexFromContextMethod != (jmethodID) 0) {
rectInfo->height = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHeightTextRectAtIndexFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleHeightTextRect - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Height = %d", rectInfo->height);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleHeightTextRectAtIndexFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 4272,4282 ****
BOOL
AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, AccessibleTextRectInfo *rectInfo, jint index) {
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getCaretLocation(%p), index = %d",
accessibleContext, index);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
--- 4270,4280 ----
BOOL
AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, AccessibleTextRectInfo *rectInfo, jint index) {
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getCaretLocation(%p), index = %d",
accessibleContext, index);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
*** 4287,4335 ****
if (getCaretLocationXMethod != (jmethodID) 0) {
rectInfo->x = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationXMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret X coordinate - call to CallIntMethod()", FALSE);
! PrintDebugString(" X coord = %d", rectInfo->x);
} else {
! PrintDebugString(" Error! either env == 0 or getCaretLocationXMethod == 0");
return FALSE;
}
// Get the y coord
if (getCaretLocationYMethod != (jmethodID) 0) {
rectInfo->y = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationYMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret Y coordinate - call to CallIntMethod()", FALSE);
! PrintDebugString(" Y coord = %d", rectInfo->y);
} else {
! PrintDebugString(" Error! either env == 0 or getCaretLocationYMethod == 0");
return FALSE;
}
// Get the width
if (getCaretLocationWidthMethod != (jmethodID) 0) {
rectInfo->width = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationWidthMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret width - call to CallIntMethod()", FALSE);
! PrintDebugString(" Width = %d", rectInfo->width);
} else {
! PrintDebugString(" Error! either env == 0 or getCaretLocationWidthMethod == 0");
return FALSE;
}
// Get the height
if (getCaretLocationHeightMethod != (jmethodID) 0) {
rectInfo->height = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationHeightMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret height - call to CallIntMethod()", FALSE);
! PrintDebugString(" Height = %d", rectInfo->height);
} else {
! PrintDebugString(" Error! either env == 0 or getCaretLocationHeightMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4285,4333 ----
if (getCaretLocationXMethod != (jmethodID) 0) {
rectInfo->x = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationXMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret X coordinate - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: X coord = %d", rectInfo->x);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getCaretLocationXMethod == 0");
return FALSE;
}
// Get the y coord
if (getCaretLocationYMethod != (jmethodID) 0) {
rectInfo->y = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationYMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret Y coordinate - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Y coord = %d", rectInfo->y);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getCaretLocationYMethod == 0");
return FALSE;
}
// Get the width
if (getCaretLocationWidthMethod != (jmethodID) 0) {
rectInfo->width = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationWidthMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret width - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Width = %d", rectInfo->width);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getCaretLocationWidthMethod == 0");
return FALSE;
}
// Get the height
if (getCaretLocationHeightMethod != (jmethodID) 0) {
rectInfo->height = jniEnv->CallIntMethod(accessBridgeObject,
getCaretLocationHeightMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting caret height - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: Height = %d", rectInfo->height);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getCaretLocationHeightMethod == 0");
return FALSE;
}
return TRUE;
}
*** 4339,4349 ****
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleContext, jint index, jint *startIndex, jint *endIndex) {
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
--- 4337,4347 ----
BOOL
AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleContext, jint index, jint *startIndex, jint *endIndex) {
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
*** 4353,4377 ****
if (getAccessibleTextLineLeftBoundsFromContextMethod != (jmethodID) 0) {
*startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextLineLeftBoundsFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleTextLineLeftBounds - call to CallIntMethod()", FALSE);
! PrintDebugString(" startIndex = %d", *startIndex);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextLineLeftBoundsFromContextMethod == 0");
return FALSE;
}
// Get the index of the right boundary of the line containing 'index'
if (getAccessibleTextLineRightBoundsFromContextMethod != (jmethodID) 0) {
*endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextLineRightBoundsFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleTextLineRightBounds - call to CallIntMethod()", FALSE);
! PrintDebugString(" endIndex = %d", *endIndex);
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextLineRightBoundsFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4351,4375 ----
if (getAccessibleTextLineLeftBoundsFromContextMethod != (jmethodID) 0) {
*startIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextLineLeftBoundsFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleTextLineLeftBounds - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: startIndex = %d", *startIndex);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextLineLeftBoundsFromContextMethod == 0");
return FALSE;
}
// Get the index of the right boundary of the line containing 'index'
if (getAccessibleTextLineRightBoundsFromContextMethod != (jmethodID) 0) {
*endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleTextLineRightBoundsFromContextMethod,
accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleTextLineRightBounds - call to CallIntMethod()", FALSE);
! PrintDebugString("[INFO]: endIndex = %d", *endIndex);
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextLineRightBoundsFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 4382,4438 ****
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextRange(%p, %d, %d, *text, %d):", accessibleContext, start, end, len);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
}
// range is inclusive
if (end < start) {
! PrintDebugString(" Error! end < start!");
text[0] = (wchar_t) 0;
return FALSE;
}
// Get the text range within [start, end] inclusive
if (getAccessibleTextRangeFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextRangeFromContextMethod,
accessibleContext, start, end);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringChars()", FALSE);
! wPrintDebugString(L" Accessible Text stringBytes returned from Java = %ls", stringBytes);
wcsncpy(text, stringBytes, len);
length = jniEnv->GetStringLength(js);
! PrintDebugString(" Accessible Text stringBytes length = %d", length);
text[length < len ? length : len - 2] = (wchar_t) 0;
! wPrintDebugString(L" Accessible Text 'text' after null termination = %ls", text);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringLength()", FALSE);
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L" Accessible Text range = %ls", text);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" current Accessible Text range is null.");
text[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleTextRangeFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4380,4436 ----
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextRange(%p, %d, %d, *text, %d):", accessibleContext, start, end, len);
// Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText
if (verifyAccessibleText(accessibleContext) == FALSE) {
return FALSE;
}
// range is inclusive
if (end < start) {
! PrintDebugString("[ERROR]: end < start!");
text[0] = (wchar_t) 0;
return FALSE;
}
// Get the text range within [start, end] inclusive
if (getAccessibleTextRangeFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTextRangeFromContextMethod,
accessibleContext, start, end);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringChars()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Text stringBytes returned from Java = %ls", stringBytes);
wcsncpy(text, stringBytes, len);
length = jniEnv->GetStringLength(js);
! PrintDebugString("[INFO]: Accessible Text stringBytes length = %d", length);
text[length < len ? length : len - 2] = (wchar_t) 0;
! wPrintDebugString(L"[INFO]: Accessible Text 'text' after null termination = %ls", text);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringLength()", FALSE);
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallVoidMethod()", FALSE);
! wPrintDebugString(L"[INFO]: Accessible Text range = %ls", text);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: current Accessible Text range is null.");
text[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextRangeFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 4443,4461 ****
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(%p):", accessibleContext);
// Get the current Accessible Value
if (getCurrentAccessibleValueFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getCurrentAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to GetStringChars()", FALSE);
wcsncpy(value, stringBytes, len);
length = jniEnv->GetStringLength(js);
--- 4441,4459 ----
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(%p):", accessibleContext);
// Get the current Accessible Value
if (getCurrentAccessibleValueFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getCurrentAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to GetStringChars()", FALSE);
wcsncpy(value, stringBytes, len);
length = jniEnv->GetStringLength(js);
*** 4464,4483 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallVoidMethod()", FALSE);
! PrintDebugString(" current Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" current Accessible Value is null.");
value[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString(" Error! either env == 0 or getCurrentAccessibleValueFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4462,4481 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: current Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: current Accessible Value is null.");
value[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getCurrentAccessibleValueFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 4486,4504 ****
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(%p):", accessibleContext);
// Get the maximum Accessible Value
if (getMaximumAccessibleValueFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getMaximumAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to GetStringChars()", FALSE);
wcsncpy(value, stringBytes, len);
length = jniEnv->GetStringLength(js);
--- 4484,4502 ----
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(%p):", accessibleContext);
// Get the maximum Accessible Value
if (getMaximumAccessibleValueFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getMaximumAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to GetStringChars()", FALSE);
wcsncpy(value, stringBytes, len);
length = jniEnv->GetStringLength(js);
*** 4507,4526 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallVoidMethod()", FALSE);
! PrintDebugString(" maximum Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" maximum Accessible Value is null.");
value[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString(" Error! either env == 0 or getMaximumAccessibleValueFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4505,4524 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: maximum Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: maximum Accessible Value is null.");
value[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getMaximumAccessibleValueFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 4529,4547 ****
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(%p):", accessibleContext);
// Get the mimimum Accessible Value
if (getMinimumAccessibleValueFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getMinimumAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to GetStringChars()", FALSE);
wcsncpy(value, stringBytes, len);
length = jniEnv->GetStringLength(js);
--- 4527,4545 ----
jstring js;
const wchar_t *stringBytes;
jthrowable exception;
jsize length;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(%p):", accessibleContext);
// Get the mimimum Accessible Value
if (getMinimumAccessibleValueFromContextMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getMinimumAccessibleValueFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallObjectMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to GetStringChars()", FALSE);
wcsncpy(value, stringBytes, len);
length = jniEnv->GetStringLength(js);
*** 4550,4569 ****
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallVoidMethod()", FALSE);
! PrintDebugString(" mimimum Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString(" mimimum Accessible Value is null.");
value[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString(" Error! either env == 0 or getMinimumAccessibleValueFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4548,4567 ----
jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallVoidMethod()", FALSE);
! PrintDebugString("[INFO]: mimimum Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to DeleteLocalRef()", FALSE);
} else {
! PrintDebugString("[WARN]: mimimum Accessible Value is null.");
value[0] = (wchar_t) 0;
return FALSE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or getMinimumAccessibleValueFromContextMethod == 0");
return FALSE;
}
return TRUE;
}
*** 4572,4620 ****
void
AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(%p):", accessibleContext);
// Add the child to the AccessibleSelection
if (addAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
addAccessibleSelectionFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK_VOID("Doing addAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString(" returned from CallObjectMethod()");
} else {
! PrintDebugString(" Error! either env == 0 or addAccessibleSelectionFromContextMethod == 0");
}
}
void
AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(%p):", accessibleContext);
// Clearing the Selection of the AccessibleSelection
if (clearAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
clearAccessibleSelectionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK_VOID("Doing clearAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString(" returned from CallObjectMethod()");
} else {
! PrintDebugString(" Error! either env == 0 or clearAccessibleSelectionFromContextMethod == 0");
}
}
jobject
AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(%p):", accessibleContext);
if (getAccessibleSelectionContextFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(
accessBridgeObject,
getAccessibleSelectionContextFromContextMethod,
--- 4570,4618 ----
void
AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(%p):", accessibleContext);
// Add the child to the AccessibleSelection
if (addAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
addAccessibleSelectionFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK_VOID("Doing addAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else {
! PrintDebugString("[ERROR]: either env == 0 or addAccessibleSelectionFromContextMethod == 0");
}
}
void
AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(%p):", accessibleContext);
// Clearing the Selection of the AccessibleSelection
if (clearAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
clearAccessibleSelectionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK_VOID("Doing clearAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else {
! PrintDebugString("[ERROR]: either env == 0 or clearAccessibleSelectionFromContextMethod == 0");
}
}
jobject
AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jobject returnedAccessibleContext;
jobject globalRef;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(%p):", accessibleContext);
if (getAccessibleSelectionContextFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(
accessBridgeObject,
getAccessibleSelectionContextFromContextMethod,
*** 4622,4792 ****
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to CallObjectMethod()", (jobject) 0);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to NewGlobalRef()", (jobject) 0);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to DeleteLocalRef()", (jobject) 0);
! PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleSelectionContextFromContextMethod == 0");
return (jobject) 0;
}
}
int
AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(jobject accessibleContext) {
int count;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(%p):", accessibleContext);
// Get (& return) the # of items selected in the AccessibleSelection
if (getAccessibleSelectionCountFromContextMethod != (jmethodID) 0) {
count = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleSelectionCountFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionCount - call to CallIntMethod()", -1);
! PrintDebugString(" returned from CallObjectMethod()");
return count;
} else {
! PrintDebugString(" Error! either env == 0 or getAccessibleSelectionCountFromContextMethod == 0");
return -1;
}
}
BOOL
AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(jobject accessibleContext, int i) {
jboolean result;
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(%p):", accessibleContext);
// Get (& return) the # of items selected in the AccessibleSelection
if (isAccessibleChildSelectedFromContextMethod != (jmethodID) 0) {
result = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleChildSelectedFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK("Doing isAccessibleChildSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString(" returned from CallObjectMethod()");
if (result != 0) {
return TRUE;
}
} else {
! PrintDebugString(" Error! either env == 0 or isAccessibleChildSelectedFromContextMethod == 0");
}
return FALSE;
}
void
AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(%p):", accessibleContext);
// Remove the i-th child from the AccessibleSelection
if (removeAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
removeAccessibleSelectionFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK_VOID("Doing removeAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString(" returned from CallObjectMethod()");
} else {
! PrintDebugString(" Error! either env == 0 or removeAccessibleSelectionFromContextMethod == 0");
}
}
void
AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(%p):", accessibleContext);
// Select all children (if possible) of the AccessibleSelection
if (selectAllAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
selectAllAccessibleSelectionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK_VOID("Doing selectAllAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString(" returned from CallObjectMethod()");
} else {
! PrintDebugString(" Error! either env == 0 or selectAllAccessibleSelectionFromContextMethod == 0");
}
}
/********** Event Notification Registration routines ***************/
BOOL
AccessBridgeJavaEntryPoints::addJavaEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::addJavaEventNotification(%016I64X);", type);
// Let AccessBridge know we want to add an event type
if (addJavaEventNotificationMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
addJavaEventNotificationMethod, type);
EXCEPTION_CHECK("Doing addJavaEventNotification - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or addJavaEventNotificationMethod == 0");
return FALSE;
}
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::removeJavaEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::removeJavaEventNotification(%016I64X):", type);
// Let AccessBridge know we want to remove an event type
if (removeJavaEventNotificationMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
removeJavaEventNotificationMethod, type);
EXCEPTION_CHECK("Doing removeJavaEventNotification - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or removeJavaEventNotificationMethod == 0");
return FALSE;
}
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(%016I64X);", type);
// Let AccessBridge know we want to add an event type
if (addAccessibilityEventNotificationMethod != (jmethodID) 0) {
! PrintDebugString("\r\n addAccessibilityEventNotification: calling void method: accessBridgeObject = %p", accessBridgeObject);
jniEnv->CallVoidMethod(accessBridgeObject,
addAccessibilityEventNotificationMethod, type);
EXCEPTION_CHECK("Doing addAccessibilityEvent - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or addAccessibilityEventNotificationMethod == 0");
return FALSE;
}
! PrintDebugString("\r\n addAccessibilityEventNotification: just returning true");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(%016I64X):", type);
// Let AccessBridge know we want to remove an event type
if (removeAccessibilityEventNotificationMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
removeAccessibilityEventNotificationMethod, type);
EXCEPTION_CHECK("Doing removeAccessibilityEvent - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString(" Error! either env == 0 or removeAccessibilityEventNotificationMethod == 0");
return FALSE;
}
return TRUE;
}
--- 4620,4790 ----
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to CallObjectMethod()", (jobject) 0);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to NewGlobalRef()", (jobject) 0);
jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to DeleteLocalRef()", (jobject) 0);
! PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef);
return globalRef;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionContextFromContextMethod == 0");
return (jobject) 0;
}
}
int
AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(jobject accessibleContext) {
int count;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(%p):", accessibleContext);
// Get (& return) the # of items selected in the AccessibleSelection
if (getAccessibleSelectionCountFromContextMethod != (jmethodID) 0) {
count = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleSelectionCountFromContextMethod,
accessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionCount - call to CallIntMethod()", -1);
! PrintDebugString("[INFO]: returned from CallObjectMethod()");
return count;
} else {
! PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionCountFromContextMethod == 0");
return -1;
}
}
BOOL
AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(jobject accessibleContext, int i) {
jboolean result;
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(%p):", accessibleContext);
// Get (& return) the # of items selected in the AccessibleSelection
if (isAccessibleChildSelectedFromContextMethod != (jmethodID) 0) {
result = jniEnv->CallBooleanMethod(accessBridgeObject,
isAccessibleChildSelectedFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK("Doing isAccessibleChildSelected - call to CallBooleanMethod()", FALSE);
! PrintDebugString("[INFO]: returned from CallObjectMethod()");
if (result != 0) {
return TRUE;
}
} else {
! PrintDebugString("[ERROR]: either env == 0 or isAccessibleChildSelectedFromContextMethod == 0");
}
return FALSE;
}
void
AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(%p):", accessibleContext);
// Remove the i-th child from the AccessibleSelection
if (removeAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
removeAccessibleSelectionFromContextMethod,
accessibleContext, i);
EXCEPTION_CHECK_VOID("Doing removeAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else {
! PrintDebugString("[ERROR]: either env == 0 or removeAccessibleSelectionFromContextMethod == 0");
}
}
void
AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(jobject accessibleContext) {
jthrowable exception;
! PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(%p):", accessibleContext);
// Select all children (if possible) of the AccessibleSelection
if (selectAllAccessibleSelectionFromContextMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
selectAllAccessibleSelectionFromContextMethod,
accessibleContext);
EXCEPTION_CHECK_VOID("Doing selectAllAccessibleSelection - call to CallVoidMethod()");
! PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else {
! PrintDebugString("[ERROR]: either env == 0 or selectAllAccessibleSelectionFromContextMethod == 0");
}
}
/********** Event Notification Registration routines ***************/
BOOL
AccessBridgeJavaEntryPoints::addJavaEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::addJavaEventNotification(%016I64X);", type);
// Let AccessBridge know we want to add an event type
if (addJavaEventNotificationMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
addJavaEventNotificationMethod, type);
EXCEPTION_CHECK("Doing addJavaEventNotification - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or addJavaEventNotificationMethod == 0");
return FALSE;
}
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::removeJavaEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::removeJavaEventNotification(%016I64X):", type);
// Let AccessBridge know we want to remove an event type
if (removeJavaEventNotificationMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
removeJavaEventNotificationMethod, type);
EXCEPTION_CHECK("Doing removeJavaEventNotification - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or removeJavaEventNotificationMethod == 0");
return FALSE;
}
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(%016I64X);", type);
// Let AccessBridge know we want to add an event type
if (addAccessibilityEventNotificationMethod != (jmethodID) 0) {
! PrintDebugString("[INFO]: addAccessibilityEventNotification: calling void method: accessBridgeObject = %p", accessBridgeObject);
jniEnv->CallVoidMethod(accessBridgeObject,
addAccessibilityEventNotificationMethod, type);
EXCEPTION_CHECK("Doing addAccessibilityEvent - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or addAccessibilityEventNotificationMethod == 0");
return FALSE;
}
! PrintDebugString("[INFO]: addAccessibilityEventNotification: just returning true");
return TRUE;
}
BOOL
AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(jlong type) {
jthrowable exception;
! PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(%016I64X):", type);
// Let AccessBridge know we want to remove an event type
if (removeAccessibilityEventNotificationMethod != (jmethodID) 0) {
jniEnv->CallVoidMethod(accessBridgeObject,
removeAccessibilityEventNotificationMethod, type);
EXCEPTION_CHECK("Doing removeAccessibilityEvent - call to CallVoidMethod()", FALSE);
} else {
! PrintDebugString("[ERROR]: either env == 0 or removeAccessibilityEventNotificationMethod == 0");
return FALSE;
}
return TRUE;
}
< prev index next >