提交 96f517f4 编写于 作者: A andrew

Merge

/* /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -48,8 +48,9 @@ public abstract class CGLSurfaceData extends OGLSurfaceData { ...@@ -48,8 +48,9 @@ public abstract class CGLSurfaceData extends OGLSurfaceData {
native void validate(int xoff, int yoff, int width, int height, boolean isOpaque); native void validate(int xoff, int yoff, int width, int height, boolean isOpaque);
private native void initOps(long pConfigInfo, long pPeerData, long layerPtr, private native void initOps(OGLGraphicsConfig gc, long pConfigInfo,
int xoff, int yoff, boolean isOpaque); long pPeerData, long layerPtr, int xoff,
int yoff, boolean isOpaque);
protected native boolean initPbuffer(long pData, long pConfigInfo, protected native boolean initPbuffer(long pData, long pConfigInfo,
boolean isOpaque, int width, int height); boolean isOpaque, int width, int height);
...@@ -77,7 +78,7 @@ public abstract class CGLSurfaceData extends OGLSurfaceData { ...@@ -77,7 +78,7 @@ public abstract class CGLSurfaceData extends OGLSurfaceData {
pPeerData = pView.getAWTView(); pPeerData = pView.getAWTView();
isOpaque = pView.isOpaque(); isOpaque = pView.isOpaque();
} }
initOps(pConfigInfo, pPeerData, 0, 0, 0, isOpaque); initOps(gc, pConfigInfo, pPeerData, 0, 0, 0, isOpaque);
} }
protected CGLSurfaceData(CGLLayer layer, CGLGraphicsConfig gc, protected CGLSurfaceData(CGLLayer layer, CGLGraphicsConfig gc,
...@@ -93,7 +94,7 @@ public abstract class CGLSurfaceData extends OGLSurfaceData { ...@@ -93,7 +94,7 @@ public abstract class CGLSurfaceData extends OGLSurfaceData {
layerPtr = layer.getPointer(); layerPtr = layer.getPointer();
isOpaque = layer.isOpaque(); isOpaque = layer.isOpaque();
} }
initOps(pConfigInfo, 0, layerPtr, 0, 0, isOpaque); initOps(gc, pConfigInfo, 0, layerPtr, 0, 0, isOpaque);
} }
@Override //SurfaceData @Override //SurfaceData
......
...@@ -144,31 +144,6 @@ JNF_COCOA_ENTER(env); ...@@ -144,31 +144,6 @@ JNF_COCOA_ENTER(env);
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
} }
/**
* Returns a pointer (as a jlong) to the native CGLGraphicsConfigInfo
* associated with the given OGLSDOps. This method can be called from
* shared code to retrieve the native GraphicsConfig data in a platform-
* independent manner.
*/
jlong
OGLSD_GetNativeConfigInfo(OGLSDOps *oglsdo)
{
J2dTraceLn(J2D_TRACE_INFO, "OGLSD_GetNativeConfigInfo");
if (oglsdo == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR, "OGLSD_GetNativeConfigInfo: ops are null");
return 0L;
}
CGLSDOps *cglsdo = (CGLSDOps *)oglsdo->privOps;
if (cglsdo == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR, "OGLSD_GetNativeConfigInfo: cgl ops are null");
return 0L;
}
return ptr_to_jlong(cglsdo->configInfo);
}
/** /**
* Makes the given GraphicsConfig's context current to its associated * Makes the given GraphicsConfig's context current to its associated
* "scratch" surface. If there is a problem making the context current, * "scratch" surface. If there is a problem making the context current,
...@@ -411,7 +386,7 @@ extern DisposeFunc OGLSD_Dispose; ...@@ -411,7 +386,7 @@ extern DisposeFunc OGLSD_Dispose;
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_sun_java2d_opengl_CGLSurfaceData_initOps Java_sun_java2d_opengl_CGLSurfaceData_initOps
(JNIEnv *env, jobject cglsd, (JNIEnv *env, jobject cglsd, jobject gc,
jlong pConfigInfo, jlong pPeerData, jlong layerPtr, jlong pConfigInfo, jlong pPeerData, jlong layerPtr,
jint xoff, jint yoff, jboolean isOpaque) jint xoff, jint yoff, jboolean isOpaque)
{ {
...@@ -419,8 +394,22 @@ Java_sun_java2d_opengl_CGLSurfaceData_initOps ...@@ -419,8 +394,22 @@ Java_sun_java2d_opengl_CGLSurfaceData_initOps
J2dTraceLn1(J2D_TRACE_INFO, " pPeerData=%p", jlong_to_ptr(pPeerData)); J2dTraceLn1(J2D_TRACE_INFO, " pPeerData=%p", jlong_to_ptr(pPeerData));
J2dTraceLn2(J2D_TRACE_INFO, " xoff=%d, yoff=%d", (int)xoff, (int)yoff); J2dTraceLn2(J2D_TRACE_INFO, " xoff=%d, yoff=%d", (int)xoff, (int)yoff);
gc = (*env)->NewGlobalRef(env, gc);
if (gc == NULL) {
JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return;
}
OGLSDOps *oglsdo = (OGLSDOps *) OGLSDOps *oglsdo = (OGLSDOps *)
SurfaceData_InitOps(env, cglsd, sizeof(OGLSDOps)); SurfaceData_InitOps(env, cglsd, sizeof(OGLSDOps));
if (oglsdo == NULL) {
(*env)->DeleteGlobalRef(env, gc);
JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return;
}
// later the graphicsConfig will be used for deallocation of oglsdo
oglsdo->graphicsConfig = gc;
CGLSDOps *cglsdo = (CGLSDOps *)malloc(sizeof(CGLSDOps)); CGLSDOps *cglsdo = (CGLSDOps *)malloc(sizeof(CGLSDOps));
if (cglsdo == NULL) { if (cglsdo == NULL) {
JNU_ThrowOutOfMemoryError(env, "creating native cgl ops"); JNU_ThrowOutOfMemoryError(env, "creating native cgl ops");
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015 Red Hat, Inc. * Copyright (c) 2015 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
...@@ -62,14 +62,16 @@ final class GHASH { ...@@ -62,14 +62,16 @@ final class GHASH {
private static final int AES_BLOCK_SIZE = 16; private static final int AES_BLOCK_SIZE = 16;
// Multiplies state0, state1 by V0, V1. // Multiplies state[0], state[1] by subkeyH[0], subkeyH[1].
private void blockMult(long V0, long V1) { private static void blockMult(long[] st, long[] subH) {
long Z0 = 0; long Z0 = 0;
long Z1 = 0; long Z1 = 0;
long V0 = subH[0];
long V1 = subH[1];
long X; long X;
// Separate loops for processing state0 and state1. // Separate loops for processing state[0] and state[1].
X = state0; X = st[0];
for (int i = 0; i < 64; i++) { for (int i = 0; i < 64; i++) {
// Zi+1 = Zi if bit i of x is 0 // Zi+1 = Zi if bit i of x is 0
long mask = X >> 63; long mask = X >> 63;
...@@ -89,7 +91,7 @@ final class GHASH { ...@@ -89,7 +91,7 @@ final class GHASH {
X <<= 1; X <<= 1;
} }
X = state1; X = st[1];
for (int i = 64; i < 127; i++) { for (int i = 64; i < 127; i++) {
// Zi+1 = Zi if bit i of x is 0 // Zi+1 = Zi if bit i of x is 0
long mask = X >> 63; long mask = X >> 63;
...@@ -115,15 +117,18 @@ final class GHASH { ...@@ -115,15 +117,18 @@ final class GHASH {
Z1 ^= V1 & mask; Z1 ^= V1 & mask;
// Save result. // Save result.
state0 = Z0; st[0] = Z0;
state1 = Z1; st[1] = Z1;
} }
/* subkeyH and state are stored in long[] for GHASH intrinsic use */
// hash subkey H; should not change after the object has been constructed // hash subkey H; should not change after the object has been constructed
private final long subkeyH0, subkeyH1; private final long[] subkeyH;
// buffer for storing hash // buffer for storing hash
private long state0, state1; private final long[] state;
// variables for save/restore calls // variables for save/restore calls
private long stateSave0, stateSave1; private long stateSave0, stateSave1;
...@@ -141,8 +146,10 @@ final class GHASH { ...@@ -141,8 +146,10 @@ final class GHASH {
if ((subkeyH == null) || subkeyH.length != AES_BLOCK_SIZE) { if ((subkeyH == null) || subkeyH.length != AES_BLOCK_SIZE) {
throw new ProviderException("Internal error"); throw new ProviderException("Internal error");
} }
this.subkeyH0 = getLong(subkeyH, 0); state = new long[2];
this.subkeyH1 = getLong(subkeyH, 8); this.subkeyH = new long[2];
this.subkeyH[0] = getLong(subkeyH, 0);
this.subkeyH[1] = getLong(subkeyH, 8);
} }
/** /**
...@@ -151,33 +158,30 @@ final class GHASH { ...@@ -151,33 +158,30 @@ final class GHASH {
* this object for different data w/ the same H. * this object for different data w/ the same H.
*/ */
void reset() { void reset() {
state0 = 0; state[0] = 0;
state1 = 0; state[1] = 0;
} }
/** /**
* Save the current snapshot of this GHASH object. * Save the current snapshot of this GHASH object.
*/ */
void save() { void save() {
stateSave0 = state0; stateSave0 = state[0];
stateSave1 = state1; stateSave1 = state[1];
} }
/** /**
* Restores this object using the saved snapshot. * Restores this object using the saved snapshot.
*/ */
void restore() { void restore() {
state0 = stateSave0; state[0] = stateSave0;
state1 = stateSave1; state[1] = stateSave1;
} }
private void processBlock(byte[] data, int ofs) { private static void processBlock(byte[] data, int ofs, long[] st, long[] subH) {
if (data.length - ofs < AES_BLOCK_SIZE) { st[0] ^= getLong(data, ofs);
throw new RuntimeException("need complete block"); st[1] ^= getLong(data, ofs + 8);
} blockMult(st, subH);
state0 ^= getLong(data, ofs);
state1 ^= getLong(data, ofs + 8);
blockMult(subkeyH0, subkeyH1);
} }
void update(byte[] in) { void update(byte[] in) {
...@@ -185,22 +189,57 @@ final class GHASH { ...@@ -185,22 +189,57 @@ final class GHASH {
} }
void update(byte[] in, int inOfs, int inLen) { void update(byte[] in, int inOfs, int inLen) {
if (inLen - inOfs > in.length) { if (inLen == 0) {
throw new RuntimeException("input length out of bound"); return;
}
ghashRangeCheck(in, inOfs, inLen, state, subkeyH);
processBlocks(in, inOfs, inLen/AES_BLOCK_SIZE, state, subkeyH);
}
private static void ghashRangeCheck(byte[] in, int inOfs, int inLen, long[] st, long[] subH) {
if (inLen < 0) {
throw new RuntimeException("invalid input length: " + inLen);
}
if (inOfs < 0) {
throw new RuntimeException("invalid offset: " + inOfs);
}
if (inLen > in.length - inOfs) {
throw new RuntimeException("input length out of bound: " +
inLen + " > " + (in.length - inOfs));
} }
if (inLen % AES_BLOCK_SIZE != 0) { if (inLen % AES_BLOCK_SIZE != 0) {
throw new RuntimeException("input length unsupported"); throw new RuntimeException("input length/block size mismatch: " +
inLen);
} }
for (int i = inOfs; i < (inOfs + inLen); i += AES_BLOCK_SIZE) { // These two checks are for C2 checking
processBlock(in, i); if (st.length != 2) {
throw new RuntimeException("internal state has invalid length: " +
st.length);
}
if (subH.length != 2) {
throw new RuntimeException("internal subkeyH has invalid length: " +
subH.length);
}
}
/*
* This is an intrinsified method. The method's argument list must match
* the hotspot signature. This method and methods called by it, cannot
* throw exceptions or allocate arrays as it will breaking intrinsics
*/
private static void processBlocks(byte[] data, int inOfs, int blocks, long[] st, long[] subH) {
int offset = inOfs;
while (blocks > 0) {
processBlock(data, offset, st, subH);
blocks--;
offset += AES_BLOCK_SIZE;
} }
} }
byte[] digest() { byte[] digest() {
byte[] result = new byte[AES_BLOCK_SIZE]; byte[] result = new byte[AES_BLOCK_SIZE];
putLong(result, 0, state0); putLong(result, 0, state[0]);
putLong(result, 8, state1); putLong(result, 8, state[1]);
reset(); reset();
return result; return result;
} }
......
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,6 +28,8 @@ package javax.swing; ...@@ -28,6 +28,8 @@ package javax.swing;
import java.awt.event.*; import java.awt.event.*;
import java.awt.*; import java.awt.*;
import javax.swing.event.MenuKeyEvent;
import javax.swing.event.MenuKeyListener;
/** /**
* Manages all the <code>ToolTips</code> in the system. * Manages all the <code>ToolTips</code> in the system.
...@@ -409,9 +411,15 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener ...@@ -409,9 +411,15 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
component.addMouseListener(this); component.addMouseListener(this);
component.removeMouseMotionListener(moveBeforeEnterListener); component.removeMouseMotionListener(moveBeforeEnterListener);
component.addMouseMotionListener(moveBeforeEnterListener); component.addMouseMotionListener(moveBeforeEnterListener);
// use MenuKeyListener for menu items/elements
if (component instanceof JMenuItem) {
((JMenuItem) component).removeMenuKeyListener((MenuKeyListener) accessibilityKeyListener);
((JMenuItem) component).addMenuKeyListener((MenuKeyListener) accessibilityKeyListener);
} else {
component.removeKeyListener(accessibilityKeyListener); component.removeKeyListener(accessibilityKeyListener);
component.addKeyListener(accessibilityKeyListener); component.addKeyListener(accessibilityKeyListener);
} }
}
/** /**
* Removes a component from tooltip control. * Removes a component from tooltip control.
...@@ -421,8 +429,12 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener ...@@ -421,8 +429,12 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
public void unregisterComponent(JComponent component) { public void unregisterComponent(JComponent component) {
component.removeMouseListener(this); component.removeMouseListener(this);
component.removeMouseMotionListener(moveBeforeEnterListener); component.removeMouseMotionListener(moveBeforeEnterListener);
if (component instanceof JMenuItem) {
((JMenuItem) component).removeMenuKeyListener((MenuKeyListener) accessibilityKeyListener);
} else {
component.removeKeyListener(accessibilityKeyListener); component.removeKeyListener(accessibilityKeyListener);
} }
}
// implements java.awt.event.MouseListener // implements java.awt.event.MouseListener
/** /**
...@@ -841,7 +853,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener ...@@ -841,7 +853,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* Post Tip: Ctrl+F1 * Post Tip: Ctrl+F1
* Unpost Tip: Esc and Ctrl+F1 * Unpost Tip: Esc and Ctrl+F1
*/ */
private class AccessibilityKeyListener extends KeyAdapter { private class AccessibilityKeyListener extends KeyAdapter implements MenuKeyListener {
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
if (!e.isConsumed()) { if (!e.isConsumed()) {
JComponent source = (JComponent) e.getComponent(); JComponent source = (JComponent) e.getComponent();
...@@ -858,5 +870,32 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener ...@@ -858,5 +870,32 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
} }
} }
} }
@Override
public void menuKeyTyped(MenuKeyEvent e) {}
@Override
public void menuKeyPressed(MenuKeyEvent e) {
if (postTip.equals(KeyStroke.getKeyStrokeForEvent(e))) {
// get element for the event
MenuElement path[] = e.getPath();
MenuElement element = path[path.length - 1];
// retrieve currently highlighted element
MenuSelectionManager msm = e.getMenuSelectionManager();
MenuElement selectedPath[] = msm.getSelectedPath();
MenuElement selectedElement = selectedPath[selectedPath.length - 1];
if (element.equals(selectedElement)) {
// show/hide tooltip message
JComponent source = (JComponent) element.getComponent();
ToolTipManager.this.show(source);
e.consume();
}
}
}
@Override
public void menuKeyReleased(MenuKeyEvent e) {}
} }
} }
...@@ -27,6 +27,7 @@ package sun.java2d.opengl; ...@@ -27,6 +27,7 @@ package sun.java2d.opengl;
import java.awt.AlphaComposite; import java.awt.AlphaComposite;
import java.awt.Composite; import java.awt.Composite;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment; import java.awt.GraphicsEnvironment;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.Transparency; import java.awt.Transparency;
...@@ -598,16 +599,16 @@ public abstract class OGLSurfaceData extends SurfaceData ...@@ -598,16 +599,16 @@ public abstract class OGLSurfaceData extends SurfaceData
* (referenced by the pData parameter). This method is invoked from * (referenced by the pData parameter). This method is invoked from
* the native Dispose() method from the Disposer thread when the * the native Dispose() method from the Disposer thread when the
* Java-level OGLSurfaceData object is about to go away. Note that we * Java-level OGLSurfaceData object is about to go away. Note that we
* also pass a reference to the native GLX/WGLGraphicsConfigInfo * also pass a reference to the OGLGraphicsConfig
* (pConfigInfo) for the purposes of making a context current. * for the purposes of making a context current.
*/ */
static void dispose(long pData, long pConfigInfo) { static void dispose(long pData, OGLGraphicsConfig gc) {
OGLRenderQueue rq = OGLRenderQueue.getInstance(); OGLRenderQueue rq = OGLRenderQueue.getInstance();
rq.lock(); rq.lock();
try { try {
// make sure we have a current context before // make sure we have a current context before
// disposing the native resources (e.g. texture object) // disposing the native resources (e.g. texture object)
OGLContext.setScratchSurface(pConfigInfo); OGLContext.setScratchSurface(gc);
RenderBuffer buf = rq.getBuffer(); RenderBuffer buf = rq.getBuffer();
rq.ensureCapacityAndAlignment(12, 4); rq.ensureCapacityAndAlignment(12, 4);
......
...@@ -562,6 +562,14 @@ Java_sun_font_FreetypeFontScaler_getFontMetricsNative( ...@@ -562,6 +562,14 @@ Java_sun_font_FreetypeFontScaler_getFontMetricsNative(
/* See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657854 */ /* See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657854 */
#define FT_MulFixFloatShift6(a, b) (((float) (a)) * ((float) (b)) / 65536.0 / 64.0) #define FT_MulFixFloatShift6(a, b) (((float) (a)) * ((float) (b)) / 65536.0 / 64.0)
#define contextAwareMetricsX(x, y) \
(FTFixedToFloat(context->transform.xx) * (x) - \
FTFixedToFloat(context->transform.xy) * (y))
#define contextAwareMetricsY(x, y) \
(-FTFixedToFloat(context->transform.yx) * (x) + \
FTFixedToFloat(context->transform.yy) * (y))
/* /*
* See FreeType source code: src/base/ftobjs.c ft_recompute_scaled_metrics() * See FreeType source code: src/base/ftobjs.c ft_recompute_scaled_metrics()
* http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1659 * http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1659
...@@ -596,7 +604,11 @@ Java_sun_font_FreetypeFontScaler_getFontMetricsNative( ...@@ -596,7 +604,11 @@ Java_sun_font_FreetypeFontScaler_getFontMetricsNative(
metrics = (*env)->NewObject(env, metrics = (*env)->NewObject(env,
sunFontIDs.strikeMetricsClass, sunFontIDs.strikeMetricsClass,
sunFontIDs.strikeMetricsCtr, sunFontIDs.strikeMetricsCtr,
ax, ay, dx, dy, bx, by, lx, ly, mx, my); contextAwareMetricsX(ax, ay), contextAwareMetricsY(ax, ay),
contextAwareMetricsX(dx, dy), contextAwareMetricsY(dx, dy),
bx, by,
contextAwareMetricsX(lx, ly), contextAwareMetricsY(lx, ly),
contextAwareMetricsX(mx, my), contextAwareMetricsY(mx, my));
return metrics; return metrics;
} }
......
/* /*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
* The following methods are implemented in the windowing system (i.e. GLX * The following methods are implemented in the windowing system (i.e. GLX
* and WGL) source files. * and WGL) source files.
*/ */
extern jlong OGLSD_GetNativeConfigInfo(OGLSDOps *oglsdo);
extern jboolean OGLSD_InitOGLWindow(JNIEnv *env, OGLSDOps *oglsdo); extern jboolean OGLSD_InitOGLWindow(JNIEnv *env, OGLSDOps *oglsdo);
extern void OGLSD_DestroyOGLSurface(JNIEnv *env, OGLSDOps *oglsdo); extern void OGLSD_DestroyOGLSurface(JNIEnv *env, OGLSDOps *oglsdo);
...@@ -593,11 +592,14 @@ void ...@@ -593,11 +592,14 @@ void
OGLSD_Dispose(JNIEnv *env, SurfaceDataOps *ops) OGLSD_Dispose(JNIEnv *env, SurfaceDataOps *ops)
{ {
OGLSDOps *oglsdo = (OGLSDOps *)ops; OGLSDOps *oglsdo = (OGLSDOps *)ops;
jlong pConfigInfo = OGLSD_GetNativeConfigInfo(oglsdo); jobject graphicsConfig = oglsdo->graphicsConfig;
JNU_CallStaticMethodByName(env, NULL, "sun/java2d/opengl/OGLSurfaceData", JNU_CallStaticMethodByName(env, NULL, "sun/java2d/opengl/OGLSurfaceData",
"dispose", "(JJ)V", "dispose",
ptr_to_jlong(ops), pConfigInfo); "(JLsun/java2d/opengl/OGLGraphicsConfig;)V",
ptr_to_jlong(ops), graphicsConfig);
(*env)->DeleteGlobalRef(env, graphicsConfig);
oglsdo->graphicsConfig = NULL;
} }
/** /**
......
/* /*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -85,6 +85,9 @@ typedef struct { ...@@ -85,6 +85,9 @@ typedef struct {
* Pointer to native-specific (GLX, WGL, etc.) SurfaceData info, such as the * Pointer to native-specific (GLX, WGL, etc.) SurfaceData info, such as the
* native Drawable handle and GraphicsConfig data. * native Drawable handle and GraphicsConfig data.
* *
* jobject graphicsConfig;;
* Strong reference to the OGLGraphicsConfig used by this OGLSurfaceData.
*
* jint drawableType; * jint drawableType;
* The surface type; can be any one of the surface type constants defined * The surface type; can be any one of the surface type constants defined
* below (OGLSD_WINDOW, OGLSD_TEXTURE, etc). * below (OGLSD_WINDOW, OGLSD_TEXTURE, etc).
...@@ -162,6 +165,7 @@ typedef struct { ...@@ -162,6 +165,7 @@ typedef struct {
struct _OGLSDOps { struct _OGLSDOps {
SurfaceDataOps sdOps; SurfaceDataOps sdOps;
void *privOps; void *privOps;
jobject graphicsConfig;
jint drawableType; jint drawableType;
GLenum activeBuffer; GLenum activeBuffer;
jboolean isOpaque; jboolean isOpaque;
......
...@@ -41,7 +41,8 @@ public abstract class GLXSurfaceData extends OGLSurfaceData { ...@@ -41,7 +41,8 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
protected X11ComponentPeer peer; protected X11ComponentPeer peer;
private GLXGraphicsConfig graphicsConfig; private GLXGraphicsConfig graphicsConfig;
private native void initOps(X11ComponentPeer peer, long aData); private native void initOps(OGLGraphicsConfig gc, X11ComponentPeer peer,
long aData);
protected native boolean initPbuffer(long pData, long pConfigInfo, protected native boolean initPbuffer(long pData, long pConfigInfo,
boolean isOpaque, boolean isOpaque,
int width, int height); int width, int height);
...@@ -52,7 +53,7 @@ public abstract class GLXSurfaceData extends OGLSurfaceData { ...@@ -52,7 +53,7 @@ public abstract class GLXSurfaceData extends OGLSurfaceData {
super(gc, cm, type); super(gc, cm, type);
this.peer = peer; this.peer = peer;
this.graphicsConfig = gc; this.graphicsConfig = gc;
initOps(peer, graphicsConfig.getAData()); initOps(gc, peer, graphicsConfig.getAData());
} }
public GraphicsConfiguration getDeviceConfiguration() { public GraphicsConfiguration getDeviceConfiguration() {
......
/* /*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -54,23 +54,32 @@ jboolean surfaceCreationFailed = JNI_FALSE; ...@@ -54,23 +54,32 @@ jboolean surfaceCreationFailed = JNI_FALSE;
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_sun_java2d_opengl_GLXSurfaceData_initOps(JNIEnv *env, jobject glxsd, Java_sun_java2d_opengl_GLXSurfaceData_initOps(JNIEnv *env, jobject glxsd,
jobject gc,
jobject peer, jlong aData) jobject peer, jlong aData)
{ {
#ifndef HEADLESS #ifndef HEADLESS
GLXSDOps *glxsdo = (GLXSDOps *)malloc(sizeof(GLXSDOps)); gc = (*env)->NewGlobalRef(env, gc);
if (gc == NULL) {
if (glxsdo == NULL) { JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
JNU_ThrowOutOfMemoryError(env, "creating native GLX ops");
return; return;
} }
OGLSDOps *oglsdo = (OGLSDOps *)SurfaceData_InitOps(env, glxsd, OGLSDOps *oglsdo = (OGLSDOps *)SurfaceData_InitOps(env, glxsd,
sizeof(OGLSDOps)); sizeof(OGLSDOps));
if (oglsdo == NULL) { if (oglsdo == NULL) {
free(glxsdo); (*env)->DeleteGlobalRef(env, gc);
JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed."); JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return; return;
} }
// later the graphicsConfig will be used for deallocation of oglsdo
oglsdo->graphicsConfig = gc;
GLXSDOps *glxsdo = (GLXSDOps *)malloc(sizeof(GLXSDOps));
if (glxsdo == NULL) {
JNU_ThrowOutOfMemoryError(env, "creating native GLX ops");
return;
}
J2dTraceLn(J2D_TRACE_INFO, "GLXSurfaceData_initOps"); J2dTraceLn(J2D_TRACE_INFO, "GLXSurfaceData_initOps");
...@@ -164,39 +173,6 @@ GLXSD_MakeCurrentToScratch(JNIEnv *env, OGLContext *oglc) ...@@ -164,39 +173,6 @@ GLXSD_MakeCurrentToScratch(JNIEnv *env, OGLContext *oglc)
return JNI_TRUE; return JNI_TRUE;
} }
/**
* Returns a pointer (as a jlong) to the native GLXGraphicsConfigInfo
* associated with the given OGLSDOps. This method can be called from
* shared code to retrieve the native GraphicsConfig data in a platform-
* independent manner.
*/
jlong
OGLSD_GetNativeConfigInfo(OGLSDOps *oglsdo)
{
GLXSDOps *glxsdo;
if (oglsdo == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"OGLSD_GetNativeConfigInfo: ops are null");
return 0L;
}
glxsdo = (GLXSDOps *)oglsdo->privOps;
if (glxsdo == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"OGLSD_GetNativeConfigInfo: glx ops are null");
return 0L;
}
if (glxsdo->configData == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"OGLSD_GetNativeConfigInfo: config data is null");
return 0L;
}
return ptr_to_jlong(glxsdo->configData->glxInfo);
}
/** /**
* Makes the given GraphicsConfig's context current to its associated * Makes the given GraphicsConfig's context current to its associated
* "scratch" surface. If there is a problem making the context current, * "scratch" surface. If there is a problem making the context current,
......
...@@ -102,7 +102,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -102,7 +102,7 @@ final public class AccessBridge extends AccessBridgeLoader {
// determine which version of the JDK is running // determine which version of the JDK is running
String version = getJavaVersionProperty(); String version = getJavaVersionProperty();
debugString("JDK version = "+version); debugString("[INFO]:JDK version = "+version);
runningOnJDK1_4 = (version.compareTo("1.4") >= 0); runningOnJDK1_4 = (version.compareTo("1.4") >= 0);
runningOnJDK1_5 = (version.compareTo("1.5") >= 0); runningOnJDK1_5 = (version.compareTo("1.5") >= 0);
...@@ -129,7 +129,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -129,7 +129,7 @@ final public class AccessBridge extends AccessBridgeLoader {
Thread abthread = new Thread(new dllRunner()); Thread abthread = new Thread(new dllRunner());
abthread.setDaemon(true); abthread.setDaemon(true);
abthread.start(); abthread.start();
debugString("AccessBridge started"); debugString("[INFO]:AccessBridge started");
} }
} }
...@@ -148,7 +148,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -148,7 +148,7 @@ final public class AccessBridge extends AccessBridgeLoader {
private class shutdownHook implements Runnable { private class shutdownHook implements Runnable {
public void run() { public void run() {
debugString("***** shutdownHook: shutting down..."); debugString("[INFO]:***** shutdownHook: shutting down...");
javaShutdown(); javaShutdown();
} }
} }
...@@ -280,7 +280,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -280,7 +280,7 @@ final public class AccessBridge extends AccessBridgeLoader {
try { try {
componentParemter[0] = Class.forName("java.awt.Component"); componentParemter[0] = Class.forName("java.awt.Component");
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} }
Object[] args = new Object[1]; Object[] args = new Object[1];
Component c; Component c;
...@@ -303,15 +303,15 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -303,15 +303,15 @@ final public class AccessBridge extends AccessBridgeLoader {
c = (Component) javaGetComponentFromNativeWindowHandleMethod.invoke(toolkit, args); c = (Component) javaGetComponentFromNativeWindowHandleMethod.invoke(toolkit, args);
returnVal = true; returnVal = true;
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} }
} }
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} catch (SecurityException e) { } catch (SecurityException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} }
// verify getComponentFromNativeWindowHandle() method // verify getComponentFromNativeWindowHandle() method
...@@ -326,17 +326,17 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -326,17 +326,17 @@ final public class AccessBridge extends AccessBridgeLoader {
Integer i = (Integer) javaGetNativeWindowHandleFromComponentMethod.invoke(toolkit, args); Integer i = (Integer) javaGetNativeWindowHandleFromComponentMethod.invoke(toolkit, args);
returnVal = true; returnVal = true;
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} catch (Exception e) { } catch (Exception e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} }
} }
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} catch (SecurityException e) { } catch (SecurityException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} }
} }
return returnVal; return returnVal;
...@@ -425,12 +425,12 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -425,12 +425,12 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private void saveContextToWindowHandleMapping(AccessibleContext ac, private void saveContextToWindowHandleMapping(AccessibleContext ac,
int nativeHandle) { int nativeHandle) {
debugString("saveContextToWindowHandleMapping..."); debugString("[INFO]:saveContextToWindowHandleMapping...");
if (ac == null) { if (ac == null) {
return; return;
} }
if (! contextToWindowHandleMap.containsKey(ac)) { if (! contextToWindowHandleMap.containsKey(ac)) {
debugString("saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle); debugString("[INFO]: saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle);
contextToWindowHandleMap.put(ac, nativeHandle); contextToWindowHandleMap.put(ac, nativeHandle);
} }
} }
...@@ -473,7 +473,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -473,7 +473,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns 0 on error * returns 0 on error
*/ */
private int getNativeWindowHandleFromContext(AccessibleContext ac) { private int getNativeWindowHandleFromContext(AccessibleContext ac) {
debugString("getNativeWindowHandleFromContext: ac = "+ac); debugString("[INFO]: getNativeWindowHandleFromContext: ac = "+ac);
try { try {
return contextToWindowHandleMap.get(ac); return contextToWindowHandleMap.get(ac);
} catch (Exception ex) { } catch (Exception ex) {
...@@ -506,10 +506,10 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -506,10 +506,10 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private Component getComponentFromNativeWindowHandle(int nativeHandle) { private Component getComponentFromNativeWindowHandle(int nativeHandle) {
if (useJAWT_DLL) { if (useJAWT_DLL) {
debugString("*** calling jawtGetComponentFromNativeWindowHandle"); debugString("[INFO]:*** calling jawtGetComponentFromNativeWindowHandle");
return jawtGetComponentFromNativeWindowHandle(nativeHandle); return jawtGetComponentFromNativeWindowHandle(nativeHandle);
} else { } else {
debugString("*** calling javaGetComponentFromNativeWindowHandle"); debugString("[INFO]:*** calling javaGetComponentFromNativeWindowHandle");
Object[] args = new Object[1]; Object[] args = new Object[1];
if (javaGetComponentFromNativeWindowHandleMethod != null) { if (javaGetComponentFromNativeWindowHandleMethod != null) {
try { try {
...@@ -527,7 +527,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -527,7 +527,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
return (Component)o; return (Component)o;
} catch (InvocationTargetException | IllegalAccessException e) { } catch (InvocationTargetException | IllegalAccessException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} }
} }
} }
...@@ -540,11 +540,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -540,11 +540,11 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private int getNativeWindowHandleFromComponent(final Component target) { private int getNativeWindowHandleFromComponent(final Component target) {
if (useJAWT_DLL) { if (useJAWT_DLL) {
debugString("*** calling jawtGetNativeWindowHandleFromComponent"); debugString("[INFO]:*** calling jawtGetNativeWindowHandleFromComponent");
return jawtGetNativeWindowHandleFromComponent(target); return jawtGetNativeWindowHandleFromComponent(target);
} else { } else {
Object[] args = new Object[1]; Object[] args = new Object[1];
debugString("*** calling javaGetNativeWindowHandleFromComponent"); debugString("[INFO]:*** calling javaGetNativeWindowHandleFromComponent");
if (javaGetNativeWindowHandleFromComponentMethod != null) { if (javaGetNativeWindowHandleFromComponentMethod != null) {
try { try {
args[0] = target; args[0] = target;
...@@ -559,9 +559,9 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -559,9 +559,9 @@ final public class AccessBridge extends AccessBridgeLoader {
contextToWindowHandleMap.put(ac, i); contextToWindowHandleMap.put(ac, i);
return i.intValue(); return i.intValue();
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
debugString("Exception: " + e.toString()); debugString("[ERROR]:Exception: " + e.toString());
} }
} }
} }
...@@ -620,8 +620,8 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -620,8 +620,8 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private AccessibleContext getAccessibleContextAt_1(final int x, final int y, private AccessibleContext getAccessibleContextAt_1(final int x, final int y,
final AccessibleContext parent) { final AccessibleContext parent) {
debugString(" : getAccessibleContextAt_1 called"); debugString("[INFO]: getAccessibleContextAt_1 called");
debugString(" -> x = " + x + " y = " + y + " parent = " + parent); debugString("[INFO]: -> x = " + x + " y = " + y + " parent = " + parent);
if (parent == null) return null; if (parent == null) return null;
final AccessibleComponent acmp = InvocationUtils.invokeAndWait(new Callable<AccessibleComponent>() { final AccessibleComponent acmp = InvocationUtils.invokeAndWait(new Callable<AccessibleComponent>() {
...@@ -668,8 +668,8 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -668,8 +668,8 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private AccessibleContext getAccessibleContextAt_2(final int x, final int y, private AccessibleContext getAccessibleContextAt_2(final int x, final int y,
AccessibleContext parent) { AccessibleContext parent) {
debugString("getAccessibleContextAt_2 called"); debugString("[INFO]: getAccessibleContextAt_2 called");
debugString(" -> x = " + x + " y = " + y + " parent = " + parent); debugString("[INFO]: -> x = " + x + " y = " + y + " parent = " + parent);
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() { return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override @Override
...@@ -678,7 +678,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -678,7 +678,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (a != null) { if (a != null) {
AccessibleContext childAC = a.getAccessibleContext(); AccessibleContext childAC = a.getAccessibleContext();
if (childAC != null) { if (childAC != null) {
debugString(" returning childAC = " + childAC); debugString("[INFO]: returning childAC = " + childAC);
return childAC; return childAC;
} }
} }
...@@ -713,7 +713,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -713,7 +713,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the AccessibleName from an AccessibleContext * returns the AccessibleName from an AccessibleContext
*/ */
private String getAccessibleNameFromContext(final AccessibleContext ac) { private String getAccessibleNameFromContext(final AccessibleContext ac) {
debugString("***** ac = "+ac.getClass()); debugString("[INFO]: ***** ac = "+ac.getClass());
if (ac != null) { if (ac != null) {
String s = InvocationUtils.invokeAndWait(new Callable<String>() { String s = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override @Override
...@@ -723,13 +723,13 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -723,13 +723,13 @@ final public class AccessBridge extends AccessBridgeLoader {
}, ac); }, ac);
if (s != null) { if (s != null) {
references.increment(s); references.increment(s);
debugString("Returning AccessibleName from Context: " + s); debugString("[INFO]: Returning AccessibleName from Context: " + s);
return s; return s;
} else { } else {
return null; return null;
} }
} else { } else {
debugString("getAccessibleNameFromContext; ac = null!"); debugString("[INFO]: getAccessibleNameFromContext; ac = null!");
return null; return null;
} }
} }
...@@ -754,7 +754,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -754,7 +754,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( ( null != nameString ) && ( 0 != nameString.length () ) ) { if ( ( null != nameString ) && ( 0 != nameString.length () ) ) {
debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName.");
references.increment (nameString); references.increment (nameString);
return nameString; return nameString;
} }
...@@ -765,12 +765,12 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -765,12 +765,12 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( ( null != descriptionString ) && ( 0 != descriptionString.length () ) ) { if ( ( null != descriptionString ) && ( 0 != descriptionString.length () ) ) {
debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription.");
references.increment (descriptionString); references.increment (descriptionString);
return descriptionString; return descriptionString;
} }
debugString ("The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName"); debugString ("[WARN]: The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName");
/* /*
Step 2: Step 2:
======= =======
...@@ -807,7 +807,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -807,7 +807,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
if (false == bExtendedSearch) { if (false == bExtendedSearch) {
debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") ); debugString ("[INFO]: bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") );
/* /*
Step 3: Step 3:
======= =======
...@@ -840,7 +840,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -840,7 +840,7 @@ final public class AccessBridge extends AccessBridgeLoader {
}, ac); }, ac);
String text = getAccessibleTextRangeFromContext (ac, 0, charCount); String text = getAccessibleTextRangeFromContext (ac, 0, charCount);
if (null != text) { if (null != text) {
debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object.");
references.increment (text); references.increment (text);
return text; return text;
} }
...@@ -848,7 +848,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -848,7 +848,7 @@ final public class AccessBridge extends AccessBridgeLoader {
/* /*
Does the label support the Accessible Icon Interface? Does the label support the Accessible Icon Interface?
*/ */
debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information."); debugString ("[INFO]: bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() { final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override @Override
public AccessibleIcon[] call() throws Exception { public AccessibleIcon[] call() throws Exception {
...@@ -863,7 +863,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -863,7 +863,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if (iconDescription != null){ if (iconDescription != null){
debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object.");
references.increment (iconDescription); references.increment (iconDescription);
return iconDescription; return iconDescription;
} }
...@@ -885,7 +885,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -885,7 +885,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
final AccessibleContext acTableCell = getAccessibleChildFromContext (parentContext, indexInParent); final AccessibleContext acTableCell = getAccessibleChildFromContext (parentContext, indexInParent);
debugString ("bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell."); debugString ("[INFO]: bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell.");
if (acTableCell != null) { if (acTableCell != null) {
final AccessibleIcon [] aiRet =InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() { final AccessibleIcon [] aiRet =InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override @Override
...@@ -900,7 +900,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -900,7 +900,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if (iconDescription != null){ if (iconDescription != null){
debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object.");
references.increment (iconDescription); references.increment (iconDescription);
return iconDescription; return iconDescription;
} }
...@@ -914,7 +914,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -914,7 +914,7 @@ final public class AccessBridge extends AccessBridgeLoader {
/* /*
Does the button support the Accessible Icon Interface? Does the button support the Accessible Icon Interface?
*/ */
debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information."); debugString ("[INFO]: bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon []>() { final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon []>() {
public AccessibleIcon [] call() { public AccessibleIcon [] call() {
return ac.getAccessibleIcon (); return ac.getAccessibleIcon ();
...@@ -927,7 +927,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -927,7 +927,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if (iconDescription != null){ if (iconDescription != null){
debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object.");
references.increment (iconDescription); references.increment (iconDescription);
return iconDescription; return iconDescription;
} }
...@@ -1007,7 +1007,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1007,7 +1007,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if ( (AccessibleRole.SLIDER == role) && if ( (AccessibleRole.SLIDER == role) &&
(AccessibleRole.PANEL == parentRole) && (AccessibleRole.PANEL == parentRole) &&
(null != parentName) ) { (null != parentName) ) {
debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object.");
references.increment (parentName); references.increment (parentName);
return parentName; return parentName;
} }
...@@ -1024,11 +1024,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1024,11 +1024,11 @@ final public class AccessBridge extends AccessBridgeLoader {
(AccessibleRole.COMBO_BOX == parentRole) ) { (AccessibleRole.COMBO_BOX == parentRole) ) {
bIsEditCombo = true; bIsEditCombo = true;
if (null != parentName) { if (null != parentName) {
debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object."); debugString ("[INFO]: bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object.");
references.increment (parentName); references.increment (parentName);
return parentName; return parentName;
} else if (null != parentDescription) { } else if (null != parentDescription) {
debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object."); debugString ("[INFO]: bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object.");
references.increment (parentDescription); references.increment (parentDescription);
return parentDescription; return parentDescription;
} }
...@@ -1072,11 +1072,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1072,11 +1072,11 @@ final public class AccessBridge extends AccessBridgeLoader {
String labelName = labelContext.getAccessibleName (); String labelName = labelContext.getAccessibleName ();
String labelDescription = labelContext.getAccessibleDescription (); String labelDescription = labelContext.getAccessibleDescription ();
if (null != labelName) { if (null != labelName) {
debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case.");
references.increment (labelName); references.increment (labelName);
return labelName; return labelName;
} else if (null != labelDescription) { } else if (null != labelDescription) {
debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case.");
references.increment (labelDescription); references.increment (labelDescription);
return labelDescription; return labelDescription;
} }
...@@ -1085,7 +1085,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1085,7 +1085,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
} }
} else { } else {
debugString ("bk -- This version of Java does not support AccessibleContext::getAccessibleRelationSet."); debugString ("[ERROR]:bk -- This version of Java does not support AccessibleContext::getAccessibleRelationSet.");
} }
//Note: add AccessibleContext to use InvocationUtils.invokeAndWait //Note: add AccessibleContext to use InvocationUtils.invokeAndWait
...@@ -1172,7 +1172,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1172,7 +1172,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childName ) { if ( null != childName ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
references.increment (childName); references.increment (childName);
return childName; return childName;
} }
...@@ -1182,7 +1182,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1182,7 +1182,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childDescription ) { if ( null != childDescription ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
references.increment (childDescription); references.increment (childDescription);
return childDescription; return childDescription;
} }
...@@ -1194,7 +1194,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1194,7 +1194,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childName ) { if ( null != childName ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
references.increment (childName); references.increment (childName);
return childName; return childName;
} }
...@@ -1204,7 +1204,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1204,7 +1204,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childDescription ) { if ( null != childDescription ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
references.increment (childDescription); references.increment (childDescription);
return childDescription; return childDescription;
} }
...@@ -1251,7 +1251,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1251,7 +1251,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childName ) { if ( null != childName ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
references.increment (childName); references.increment (childName);
return childName; return childName;
} }
...@@ -1261,7 +1261,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1261,7 +1261,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childDescription ) { if ( null != childDescription ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
references.increment (childDescription); references.increment (childDescription);
return childDescription; return childDescription;
} }
...@@ -1273,7 +1273,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1273,7 +1273,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childName ) { if ( null != childName ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
references.increment (childName); references.increment (childName);
return childName; return childName;
} }
...@@ -1283,7 +1283,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1283,7 +1283,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childDescription ) { if ( null != childDescription ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
references.increment (childDescription); references.increment (childDescription);
return childDescription; return childDescription;
} }
...@@ -1344,7 +1344,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1344,7 +1344,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childName ) { if ( null != childName ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childName); references.increment (childName);
return childName; return childName;
} }
...@@ -1354,7 +1354,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1354,7 +1354,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childDescription ) { if ( null != childDescription ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childDescription); references.increment (childDescription);
return childDescription; return childDescription;
} }
...@@ -1402,7 +1402,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1402,7 +1402,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childName ) { if ( null != childName ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childName); references.increment (childName);
return childName; return childName;
} }
...@@ -1412,7 +1412,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1412,7 +1412,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, ac); }, ac);
if ( null != childDescription ) { if ( null != childDescription ) {
debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object."); debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childDescription); references.increment (childDescription);
return childDescription; return childDescription;
} }
...@@ -1425,7 +1425,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1425,7 +1425,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
return null; return null;
} else { } else {
debugString ("AccessBridge::getVirtualAccessibleNameFromContext error - ac == null."); debugString ("[ERROR]: AccessBridge::getVirtualAccessibleNameFromContext error - ac == null.");
return null; return null;
} }
} }
...@@ -1443,11 +1443,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1443,11 +1443,11 @@ final public class AccessBridge extends AccessBridgeLoader {
}, ac); }, ac);
if (s != null) { if (s != null) {
references.increment(s); references.increment(s);
debugString("Returning AccessibleDescription from Context: " + s); debugString("[INFO]: Returning AccessibleDescription from Context: " + s);
return s; return s;
} }
} else { } else {
debugString("getAccessibleDescriptionFromContext; ac = null"); debugString("[ERROR]: getAccessibleDescriptionFromContext; ac = null");
} }
return null; return null;
} }
...@@ -1467,12 +1467,12 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1467,12 +1467,12 @@ final public class AccessBridge extends AccessBridgeLoader {
String s = role.toDisplayString(Locale.US); String s = role.toDisplayString(Locale.US);
if (s != null) { if (s != null) {
references.increment(s); references.increment(s);
debugString("Returning AccessibleRole from Context: " + s); debugString("[INFO]: Returning AccessibleRole from Context: " + s);
return s; return s;
} }
} }
} else { } else {
debugString("getAccessibleRoleStringFromContext; ac = null"); debugString("[ERROR]: getAccessibleRoleStringFromContext; ac = null");
} }
return null; return null;
} }
...@@ -1511,12 +1511,12 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1511,12 +1511,12 @@ final public class AccessBridge extends AccessBridgeLoader {
s += AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US); s += AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US);
} }
references.increment(s); references.increment(s);
debugString("Returning AccessibleStateSet from Context: " + s); debugString("[INFO]: Returning AccessibleStateSet from Context: " + s);
return s; return s;
} }
} }
} else { } else {
debugString("getAccessibleStatesStringFromContext; ac = null"); debugString("[ERROR]: getAccessibleStatesStringFromContext; ac = null");
} }
return null; return null;
} }
...@@ -1542,11 +1542,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1542,11 +1542,11 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
} }
references.increment(s); references.increment(s);
debugString("Returning AccessibleStateSet en_US from Context: " + s); debugString("[INFO]: Returning AccessibleStateSet en_US from Context: " + s);
return s; return s;
} }
} }
debugString("getAccessibleStatesStringFromContext; ac = null"); debugString("[ERROR]: getAccessibleStatesStringFromContext; ac = null");
return null; return null;
} }
...@@ -1700,11 +1700,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1700,11 +1700,11 @@ final public class AccessBridge extends AccessBridgeLoader {
if (ac != null) { if (ac != null) {
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac); Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) { if (r != null) {
debugString(" - Returning Accessible x coord from Context: " + r.x); debugString("[INFO]: Returning Accessible x coord from Context: " + r.x);
return r.x; return r.x;
} }
} else { } else {
debugString("getAccessibleXcoordFromContext ac = null"); debugString("[ERROR]: getAccessibleXcoordFromContext ac = null");
} }
return -1; return -1;
} }
...@@ -1713,14 +1713,14 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1713,14 +1713,14 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the AccessibleComponent y-coord from an AccessibleContext * returns the AccessibleComponent y-coord from an AccessibleContext
*/ */
private int getAccessibleYcoordFromContext(AccessibleContext ac) { private int getAccessibleYcoordFromContext(AccessibleContext ac) {
debugString("getAccessibleYcoordFromContext() called"); debugString("[INFO]: getAccessibleYcoordFromContext() called");
if (ac != null) { if (ac != null) {
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac); Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) { if (r != null) {
return r.y; return r.y;
} }
} else { } else {
debugString("getAccessibleYcoordFromContext; ac = null"); debugString("[ERROR]: getAccessibleYcoordFromContext; ac = null");
} }
return -1; return -1;
} }
...@@ -1735,7 +1735,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1735,7 +1735,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return r.height; return r.height;
} }
} else { } else {
debugString("getAccessibleHeightFromContext; ac = null"); debugString("[ERROR]: getAccessibleHeightFromContext; ac = null");
} }
return -1; return -1;
} }
...@@ -1750,7 +1750,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1750,7 +1750,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return r.width; return r.width;
} }
} else { } else {
debugString("getAccessibleWidthFromContext; ac = null"); debugString("[ERROR]: getAccessibleWidthFromContext; ac = null");
} }
return -1; return -1;
} }
...@@ -1765,11 +1765,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1765,11 +1765,11 @@ final public class AccessBridge extends AccessBridgeLoader {
return ac.getAccessibleComponent(); return ac.getAccessibleComponent();
}, ac); }, ac);
if (acmp != null) { if (acmp != null) {
debugString("Returning AccessibleComponent Context"); debugString("[INFO]: Returning AccessibleComponent Context");
return acmp; return acmp;
} }
} else { } else {
debugString("getAccessibleComponentFromContext; ac = null"); debugString("[ERROR]: getAccessibleComponentFromContext; ac = null");
} }
return null; return null;
} }
...@@ -1778,7 +1778,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1778,7 +1778,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the AccessibleAction from an AccessibleContext * returns the AccessibleAction from an AccessibleContext
*/ */
private AccessibleAction getAccessibleActionFromContext(final AccessibleContext ac) { private AccessibleAction getAccessibleActionFromContext(final AccessibleContext ac) {
debugString("Returning AccessibleAction Context"); debugString("[INFO]: Returning AccessibleAction Context");
return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleAction>() { return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleAction>() {
@Override @Override
public AccessibleAction call() throws Exception { public AccessibleAction call() throws Exception {
...@@ -1830,7 +1830,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1830,7 +1830,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* XXX * XXX
*/ */
private Rectangle getCaretLocation(final AccessibleContext ac) { private Rectangle getCaretLocation(final AccessibleContext ac) {
debugString("getCaretLocation"); debugString("[INFO]: getCaretLocation");
if (ac==null) if (ac==null)
return null; return null;
return InvocationUtils.invokeAndWait(new Callable<Rectangle>() { return InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
...@@ -1951,7 +1951,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -1951,7 +1951,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private int getAccessibleIndexAtPointFromContext(final AccessibleContext ac, private int getAccessibleIndexAtPointFromContext(final AccessibleContext ac,
final int x, final int y) { final int x, final int y) {
debugString("getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y); debugString("[INFO]: getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y);
if (ac==null) if (ac==null)
return -1; return -1;
return InvocationUtils.invokeAndWait(new Callable<Integer>() { return InvocationUtils.invokeAndWait(new Callable<Integer>() {
...@@ -2005,7 +2005,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2005,7 +2005,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return s; return s;
} }
} else { } else {
debugString("getAccessibleLetterAtIndexFromContext; ac = null"); debugString("[ERROR]: getAccessibleLetterAtIndexFromContext; ac = null");
} }
return null; return null;
} }
...@@ -2028,7 +2028,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2028,7 +2028,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return s; return s;
} }
} else { } else {
debugString("getAccessibleWordAtIndexFromContext; ac = null"); debugString("[ERROR]: getAccessibleWordAtIndexFromContext; ac = null");
} }
return null; return null;
} }
...@@ -2051,7 +2051,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2051,7 +2051,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return s; return s;
} }
} else { } else {
debugString("getAccessibleSentenceAtIndexFromContext; ac = null"); debugString("[ERROR]: getAccessibleSentenceAtIndexFromContext; ac = null");
} }
return null; return null;
} }
...@@ -2109,7 +2109,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2109,7 +2109,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return s; return s;
} }
} else { } else {
debugString("getAccessibleTextSelectedTextFromContext; ac = null"); debugString("[ERROR]: getAccessibleTextSelectedTextFromContext; ac = null");
} }
return null; return null;
} }
...@@ -2370,7 +2370,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2370,7 +2370,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return r.x; return r.x;
} }
} else { } else {
debugString("getAccessibleXcoordTextRectAtIndexFromContext; ac = null"); debugString("[ERROR]: getAccessibleXcoordTextRectAtIndexFromContext; ac = null");
} }
return -1; return -1;
} }
...@@ -2385,7 +2385,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2385,7 +2385,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return r.y; return r.y;
} }
} else { } else {
debugString("getAccessibleYcoordTextRectAtIndexFromContext; ac = null"); debugString("[ERROR]: getAccessibleYcoordTextRectAtIndexFromContext; ac = null");
} }
return -1; return -1;
} }
...@@ -2400,7 +2400,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2400,7 +2400,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return r.height; return r.height;
} }
} else { } else {
debugString("getAccessibleHeightTextRectAtIndexFromContext; ac = null"); debugString("[ERROR]: getAccessibleHeightTextRectAtIndexFromContext; ac = null");
} }
return -1; return -1;
} }
...@@ -2415,7 +2415,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2415,7 +2415,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return r.width; return r.width;
} }
} else { } else {
debugString("getAccessibleWidthTextRectAtIndexFromContext; ac = null"); debugString("[ERROR]: getAccessibleWidthTextRectAtIndexFromContext; ac = null");
} }
return -1; return -1;
} }
...@@ -2429,7 +2429,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2429,7 +2429,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.isBold(as); return StyleConstants.isBold(as);
} else { } else {
debugString("getBoldFromAttributeSet; as = null"); debugString("[ERROR]: getBoldFromAttributeSet; as = null");
} }
return false; return false;
} }
...@@ -2441,7 +2441,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2441,7 +2441,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.isItalic(as); return StyleConstants.isItalic(as);
} else { } else {
debugString("getItalicFromAttributeSet; as = null"); debugString("[ERROR]: getItalicFromAttributeSet; as = null");
} }
return false; return false;
} }
...@@ -2453,7 +2453,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2453,7 +2453,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.isUnderline(as); return StyleConstants.isUnderline(as);
} else { } else {
debugString("getUnderlineFromAttributeSet; as = null"); debugString("[ERROR]: getUnderlineFromAttributeSet; as = null");
} }
return false; return false;
} }
...@@ -2465,7 +2465,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2465,7 +2465,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.isStrikeThrough(as); return StyleConstants.isStrikeThrough(as);
} else { } else {
debugString("getStrikethroughFromAttributeSet; as = null"); debugString("[ERROR]: getStrikethroughFromAttributeSet; as = null");
} }
return false; return false;
} }
...@@ -2477,7 +2477,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2477,7 +2477,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.isSuperscript(as); return StyleConstants.isSuperscript(as);
} else { } else {
debugString("getSuperscriptFromAttributeSet; as = null"); debugString("[ERROR]: getSuperscriptFromAttributeSet; as = null");
} }
return false; return false;
} }
...@@ -2489,7 +2489,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2489,7 +2489,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.isSubscript(as); return StyleConstants.isSubscript(as);
} else { } else {
debugString("getSubscriptFromAttributeSet; as = null"); debugString("[ERROR]: getSubscriptFromAttributeSet; as = null");
} }
return false; return false;
} }
...@@ -2505,7 +2505,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2505,7 +2505,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return s; return s;
} }
} else { } else {
debugString("getBackgroundColorFromAttributeSet; as = null"); debugString("[ERROR]: getBackgroundColorFromAttributeSet; as = null");
} }
return null; return null;
} }
...@@ -2521,7 +2521,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2521,7 +2521,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return s; return s;
} }
} else { } else {
debugString("getForegroundColorFromAttributeSet; as = null"); debugString("[ERROR]: getForegroundColorFromAttributeSet; as = null");
} }
return null; return null;
} }
...@@ -2537,7 +2537,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2537,7 +2537,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return s; return s;
} }
} else { } else {
debugString("getFontFamilyFromAttributeSet; as = null"); debugString("[ERROR]: getFontFamilyFromAttributeSet; as = null");
} }
return null; return null;
} }
...@@ -2549,7 +2549,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2549,7 +2549,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getFontSize(as); return StyleConstants.getFontSize(as);
} else { } else {
debugString("getFontSizeFromAttributeSet; as = null"); debugString("[ERROR]: getFontSizeFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2561,7 +2561,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2561,7 +2561,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getAlignment(as); return StyleConstants.getAlignment(as);
} else { } else {
debugString("getAlignmentFromAttributeSet; as = null"); debugString("[ERROR]: getAlignmentFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2573,7 +2573,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2573,7 +2573,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getBidiLevel(as); return StyleConstants.getBidiLevel(as);
} else { } else {
debugString("getBidiLevelFromAttributeSet; as = null"); debugString("[ERROR]: getBidiLevelFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2586,7 +2586,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2586,7 +2586,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getFirstLineIndent(as); return StyleConstants.getFirstLineIndent(as);
} else { } else {
debugString("getFirstLineIndentFromAttributeSet; as = null"); debugString("[ERROR]: getFirstLineIndentFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2598,7 +2598,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2598,7 +2598,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getLeftIndent(as); return StyleConstants.getLeftIndent(as);
} else { } else {
debugString("getLeftIndentFromAttributeSet; as = null"); debugString("[ERROR]: getLeftIndentFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2610,7 +2610,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2610,7 +2610,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getRightIndent(as); return StyleConstants.getRightIndent(as);
} else { } else {
debugString("getRightIndentFromAttributeSet; as = null"); debugString("[ERROR]: getRightIndentFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2622,7 +2622,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2622,7 +2622,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getLineSpacing(as); return StyleConstants.getLineSpacing(as);
} else { } else {
debugString("getLineSpacingFromAttributeSet; as = null"); debugString("[ERROR]: getLineSpacingFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2634,7 +2634,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2634,7 +2634,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getSpaceAbove(as); return StyleConstants.getSpaceAbove(as);
} else { } else {
debugString("getSpaceAboveFromAttributeSet; as = null"); debugString("[ERROR]: getSpaceAboveFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2646,7 +2646,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2646,7 +2646,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (as != null) { if (as != null) {
return StyleConstants.getSpaceBelow(as); return StyleConstants.getSpaceBelow(as);
} else { } else {
debugString("getSpaceBelowFromAttributeSet; as = null"); debugString("[ERROR]: getSpaceBelowFromAttributeSet; as = null");
} }
return -1; return -1;
} }
...@@ -2795,7 +2795,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2795,7 +2795,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
} }
} else { } else {
debugString("getCurrentAccessibleValueFromContext; ac = null"); debugString("[ERROR]: getCurrentAccessibleValueFromContext; ac = null");
} }
return null; return null;
} }
...@@ -2823,7 +2823,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2823,7 +2823,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
} }
} else { } else {
debugString("getMaximumAccessibleValueFromContext; ac = null"); debugString("[ERROR]: getMaximumAccessibleValueFromContext; ac = null");
} }
return null; return null;
} }
...@@ -2851,7 +2851,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -2851,7 +2851,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
} }
} else { } else {
debugString("getMinimumAccessibleValueFromContext; ac = null"); debugString("[ERROR]: getMinimumAccessibleValueFromContext; ac = null");
} }
return null; return null;
} }
...@@ -3038,7 +3038,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3038,7 +3038,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the row count for an AccessibleTable * returns the row count for an AccessibleTable
*/ */
private int getAccessibleTableRowCount(final AccessibleContext ac) { private int getAccessibleTableRowCount(final AccessibleContext ac) {
debugString("##### getAccessibleTableRowCount"); debugString("[INFO]: ##### getAccessibleTableRowCount");
return InvocationUtils.invokeAndWait(new Callable<Integer>() { return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override @Override
public Integer call() throws Exception { public Integer call() throws Exception {
...@@ -3057,7 +3057,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3057,7 +3057,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the column count for an AccessibleTable * returns the column count for an AccessibleTable
*/ */
private int getAccessibleTableColumnCount(final AccessibleContext ac) { private int getAccessibleTableColumnCount(final AccessibleContext ac) {
debugString("##### getAccessibleTableColumnCount"); debugString("[INFO]: ##### getAccessibleTableColumnCount");
return InvocationUtils.invokeAndWait(new Callable<Integer>() { return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override @Override
public Integer call() throws Exception { public Integer call() throws Exception {
...@@ -3077,7 +3077,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3077,7 +3077,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private AccessibleContext getAccessibleTableCellAccessibleContext(final AccessibleTable at, private AccessibleContext getAccessibleTableCellAccessibleContext(final AccessibleTable at,
final int row, final int column) { final int row, final int column) {
debugString("getAccessibleTableCellAccessibleContext: at = "+at.getClass()); debugString("[INFO]: getAccessibleTableCellAccessibleContext: at = "+at.getClass());
if (at == null) return null; if (at == null) return null;
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() { return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override @Override
...@@ -3122,7 +3122,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3122,7 +3122,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the index of a cell at a given row and column in an AccessibleTable * returns the index of a cell at a given row and column in an AccessibleTable
*/ */
private int getAccessibleTableCellIndex(final AccessibleTable at, int row, int column) { private int getAccessibleTableCellIndex(final AccessibleTable at, int row, int column) {
debugString("##### getAccessibleTableCellIndex: at="+at); debugString("[INFO]: ##### getAccessibleTableCellIndex: at="+at);
if (at != null) { if (at != null) {
int cellIndex = row * int cellIndex = row *
InvocationUtils.invokeAndWait(new Callable<Integer>() { InvocationUtils.invokeAndWait(new Callable<Integer>() {
...@@ -3132,10 +3132,10 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3132,10 +3132,10 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, getContextFromAccessibleTable(at)) + }, getContextFromAccessibleTable(at)) +
column; column;
debugString(" ##### getAccessibleTableCellIndex="+cellIndex); debugString("[INFO]: ##### getAccessibleTableCellIndex="+cellIndex);
return cellIndex; return cellIndex;
} }
debugString(" ##### getAccessibleTableCellIndex FAILED"); debugString("[ERROR]: ##### getAccessibleTableCellIndex FAILED");
return -1; return -1;
} }
...@@ -3143,7 +3143,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3143,7 +3143,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the row extent of a cell at a given row and column in an AccessibleTable * returns the row extent of a cell at a given row and column in an AccessibleTable
*/ */
private int getAccessibleTableCellRowExtent(final AccessibleTable at, final int row, final int column) { private int getAccessibleTableCellRowExtent(final AccessibleTable at, final int row, final int column) {
debugString("##### getAccessibleTableCellRowExtent"); debugString("[INFO]: ##### getAccessibleTableCellRowExtent");
if (at != null) { if (at != null) {
int rowExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() { int rowExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override @Override
...@@ -3152,10 +3152,10 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3152,10 +3152,10 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, },
getContextFromAccessibleTable(at)); getContextFromAccessibleTable(at));
debugString(" ##### getAccessibleTableCellRowExtent="+rowExtent); debugString("[INFO]: ##### getAccessibleTableCellRowExtent="+rowExtent);
return rowExtent; return rowExtent;
} }
debugString(" ##### getAccessibleTableCellRowExtent FAILED"); debugString("[ERROR]: ##### getAccessibleTableCellRowExtent FAILED");
return -1; return -1;
} }
...@@ -3163,7 +3163,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3163,7 +3163,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* returns the column extent of a cell at a given row and column in an AccessibleTable * returns the column extent of a cell at a given row and column in an AccessibleTable
*/ */
private int getAccessibleTableCellColumnExtent(final AccessibleTable at, final int row, final int column) { private int getAccessibleTableCellColumnExtent(final AccessibleTable at, final int row, final int column) {
debugString("##### getAccessibleTableCellColumnExtent"); debugString("[INFO]: ##### getAccessibleTableCellColumnExtent");
if (at != null) { if (at != null) {
int columnExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() { int columnExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override @Override
...@@ -3172,10 +3172,10 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3172,10 +3172,10 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
}, },
getContextFromAccessibleTable(at)); getContextFromAccessibleTable(at));
debugString(" ##### getAccessibleTableCellColumnExtent="+columnExtent); debugString("[INFO]: ##### getAccessibleTableCellColumnExtent="+columnExtent);
return columnExtent; return columnExtent;
} }
debugString(" ##### getAccessibleTableCellColumnExtent FAILED"); debugString("[ERROR]: ##### getAccessibleTableCellColumnExtent FAILED");
return -1; return -1;
} }
...@@ -3184,7 +3184,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3184,7 +3184,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private boolean isAccessibleTableCellSelected(final AccessibleTable at, final int row, private boolean isAccessibleTableCellSelected(final AccessibleTable at, final int row,
final int column) { final int column) {
debugString("##### isAccessibleTableCellSelected: ["+row+"]["+column+"]"); debugString("[INFO]: ##### isAccessibleTableCellSelected: ["+row+"]["+column+"]");
if (at == null) if (at == null)
return false; return false;
return InvocationUtils.invokeAndWait(new Callable<Boolean>() { return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
...@@ -3211,7 +3211,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3211,7 +3211,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* AccessibleTable * AccessibleTable
*/ */
private AccessibleTable getAccessibleTableRowHeader(final AccessibleContext ac) { private AccessibleTable getAccessibleTableRowHeader(final AccessibleContext ac) {
debugString(" ##### getAccessibleTableRowHeader called"); debugString("[INFO]: ##### getAccessibleTableRowHeader called");
AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() { AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
@Override @Override
public AccessibleTable call() throws Exception { public AccessibleTable call() throws Exception {
...@@ -3235,7 +3235,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3235,7 +3235,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* AccessibleTable * AccessibleTable
*/ */
private AccessibleTable getAccessibleTableColumnHeader(final AccessibleContext ac) { private AccessibleTable getAccessibleTableColumnHeader(final AccessibleContext ac) {
debugString("##### getAccessibleTableColumnHeader"); debugString("[INFO]: ##### getAccessibleTableColumnHeader");
if (ac == null) if (ac == null)
return null; return null;
AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() { AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
...@@ -3274,7 +3274,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3274,7 +3274,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private int getAccessibleTableRowHeaderRowCount(AccessibleContext ac) { private int getAccessibleTableRowHeaderRowCount(AccessibleContext ac) {
debugString(" ##### getAccessibleTableRowHeaderRowCount called"); debugString("[INFO]: ##### getAccessibleTableRowHeaderRowCount called");
if (ac != null) { if (ac != null) {
final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac); final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
if (atRowHeader != null) { if (atRowHeader != null) {
...@@ -3297,7 +3297,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3297,7 +3297,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* the row header in an AccessibleTable * the row header in an AccessibleTable
*/ */
private int getAccessibleTableRowHeaderColumnCount(AccessibleContext ac) { private int getAccessibleTableRowHeaderColumnCount(AccessibleContext ac) {
debugString(" ##### getAccessibleTableRowHeaderColumnCount called"); debugString("[INFO]: ##### getAccessibleTableRowHeaderColumnCount called");
if (ac != null) { if (ac != null) {
final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac); final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
if (atRowHeader != null) { if (atRowHeader != null) {
...@@ -3312,7 +3312,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3312,7 +3312,7 @@ final public class AccessBridge extends AccessBridgeLoader {
}, ac); }, ac);
} }
} }
debugString(" ##### getAccessibleTableRowHeaderColumnCount FAILED"); debugString("[ERROR]: ##### getAccessibleTableRowHeaderColumnCount FAILED");
return -1; return -1;
} }
...@@ -3322,7 +3322,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3322,7 +3322,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private int getAccessibleTableColumnHeaderRowCount(AccessibleContext ac) { private int getAccessibleTableColumnHeaderRowCount(AccessibleContext ac) {
debugString("##### getAccessibleTableColumnHeaderRowCount"); debugString("[INFO]: ##### getAccessibleTableColumnHeaderRowCount");
if (ac != null) { if (ac != null) {
final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac); final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
if (atColumnHeader != null) { if (atColumnHeader != null) {
...@@ -3337,7 +3337,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3337,7 +3337,7 @@ final public class AccessBridge extends AccessBridgeLoader {
}, ac); }, ac);
} }
} }
debugString(" ##### getAccessibleTableColumnHeaderRowCount FAILED"); debugString("[ERROR]: ##### getAccessibleTableColumnHeaderRowCount FAILED");
return -1; return -1;
} }
...@@ -3347,7 +3347,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3347,7 +3347,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private int getAccessibleTableColumnHeaderColumnCount(AccessibleContext ac) { private int getAccessibleTableColumnHeaderColumnCount(AccessibleContext ac) {
debugString("##### getAccessibleTableColumnHeaderColumnCount"); debugString("[ERROR]: ##### getAccessibleTableColumnHeaderColumnCount");
if (ac != null) { if (ac != null) {
final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac); final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
if (atColumnHeader != null) { if (atColumnHeader != null) {
...@@ -3362,7 +3362,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3362,7 +3362,7 @@ final public class AccessBridge extends AccessBridgeLoader {
}, ac); }, ac);
} }
} }
debugString(" ##### getAccessibleTableColumnHeaderColumnCount FAILED"); debugString("[ERROR]: ##### getAccessibleTableColumnHeaderColumnCount FAILED");
return -1; return -1;
} }
...@@ -3630,7 +3630,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3630,7 +3630,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private AccessibleContext getAccessibleRelationTarget(final AccessibleContext ac, private AccessibleContext getAccessibleRelationTarget(final AccessibleContext ac,
final int i, final int j) { final int i, final int j) {
debugString("***** getAccessibleRelationTarget"); debugString("[INFO]: ***** getAccessibleRelationTarget");
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() { return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override @Override
public AccessibleContext call() throws Exception { public AccessibleContext call() throws Exception {
...@@ -3663,7 +3663,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3663,7 +3663,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns the AccessibleHypertext * Returns the AccessibleHypertext
*/ */
private AccessibleHypertext getAccessibleHypertext(final AccessibleContext ac) { private AccessibleHypertext getAccessibleHypertext(final AccessibleContext ac) {
debugString("getAccessibleHyperlink"); debugString("[INFO]: getAccessibleHyperlink");
if (ac==null) if (ac==null)
return null; return null;
AccessibleHypertext hypertext = InvocationUtils.invokeAndWait(new Callable<AccessibleHypertext>() { AccessibleHypertext hypertext = InvocationUtils.invokeAndWait(new Callable<AccessibleHypertext>() {
...@@ -3684,7 +3684,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3684,7 +3684,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns the number of AccessibleHyperlinks * Returns the number of AccessibleHyperlinks
*/ */
private int getAccessibleHyperlinkCount(AccessibleContext ac) { private int getAccessibleHyperlinkCount(AccessibleContext ac) {
debugString("getAccessibleHyperlinkCount"); debugString("[INFO]: getAccessibleHyperlinkCount");
if (ac == null) { if (ac == null) {
return 0; return 0;
} }
...@@ -3705,7 +3705,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3705,7 +3705,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns the hyperlink at the specified index * Returns the hyperlink at the specified index
*/ */
private AccessibleHyperlink getAccessibleHyperlink(final AccessibleHypertext hypertext, final int i) { private AccessibleHyperlink getAccessibleHyperlink(final AccessibleHypertext hypertext, final int i) {
debugString("getAccessibleHyperlink"); debugString("[INFO]: getAccessibleHyperlink");
if (hypertext == null) { if (hypertext == null) {
return null; return null;
} }
...@@ -3737,7 +3737,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3737,7 +3737,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns the hyperlink object description * Returns the hyperlink object description
*/ */
private String getAccessibleHyperlinkText(final AccessibleHyperlink link) { private String getAccessibleHyperlinkText(final AccessibleHyperlink link) {
debugString("getAccessibleHyperlinkText"); debugString("[INFO]: getAccessibleHyperlinkText");
if (link == null) { if (link == null) {
return null; return null;
} }
...@@ -3757,7 +3757,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3757,7 +3757,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns the hyperlink URL * Returns the hyperlink URL
*/ */
private String getAccessibleHyperlinkURL(final AccessibleHyperlink link) { private String getAccessibleHyperlinkURL(final AccessibleHyperlink link) {
debugString("getAccessibleHyperlinkURL"); debugString("[INFO]: getAccessibleHyperlinkURL");
if (link == null) { if (link == null) {
return null; return null;
} }
...@@ -3778,7 +3778,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3778,7 +3778,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns the start index of the hyperlink text * Returns the start index of the hyperlink text
*/ */
private int getAccessibleHyperlinkStartIndex(final AccessibleHyperlink link) { private int getAccessibleHyperlinkStartIndex(final AccessibleHyperlink link) {
debugString("getAccessibleHyperlinkStartIndex"); debugString("[INFO]: getAccessibleHyperlinkStartIndex");
if (link == null) { if (link == null) {
return -1; return -1;
} }
...@@ -3794,7 +3794,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3794,7 +3794,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns the end index of the hyperlink text * Returns the end index of the hyperlink text
*/ */
private int getAccessibleHyperlinkEndIndex(final AccessibleHyperlink link) { private int getAccessibleHyperlinkEndIndex(final AccessibleHyperlink link) {
debugString("getAccessibleHyperlinkEndIndex"); debugString("[INFO]: getAccessibleHyperlinkEndIndex");
if (link == null) { if (link == null) {
return -1; return -1;
} }
...@@ -3812,7 +3812,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3812,7 +3812,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* is no hyperlink associated with this index. * is no hyperlink associated with this index.
*/ */
private int getAccessibleHypertextLinkIndex(final AccessibleHypertext hypertext, final int charIndex) { private int getAccessibleHypertextLinkIndex(final AccessibleHypertext hypertext, final int charIndex) {
debugString("getAccessibleHypertextLinkIndex: charIndex = "+charIndex); debugString("[INFO]: getAccessibleHypertextLinkIndex: charIndex = "+charIndex);
if (hypertext == null) { if (hypertext == null) {
return -1; return -1;
} }
...@@ -3822,7 +3822,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3822,7 +3822,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return hypertext.getLinkIndex(charIndex); return hypertext.getLinkIndex(charIndex);
} }
}, hyperTextContextMap.get(hypertext)); }, hyperTextContextMap.get(hypertext));
debugString("getAccessibleHypertextLinkIndex returning "+linkIndex); debugString("[INFO]: getAccessibleHypertextLinkIndex returning "+linkIndex);
return linkIndex; return linkIndex;
} }
...@@ -3841,7 +3841,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3841,7 +3841,7 @@ final public class AccessBridge extends AccessBridgeLoader {
return link.doAccessibleAction(0); return link.doAccessibleAction(0);
} }
}, ac); }, ac);
debugString("activateAccessibleHyperlink: returning = "+retval); debugString("[INFO]: activateAccessibleHyperlink: returning = "+retval);
return retval; return retval;
} }
...@@ -3969,17 +3969,17 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3969,17 +3969,17 @@ final public class AccessBridge extends AccessBridgeLoader {
int fKey = fKeyNumber(keyStroke); int fKey = fKeyNumber(keyStroke);
if (fKey != 0) { if (fKey != 0) {
// return 0x00000001 through 0x00000018 // return 0x00000001 through 0x00000018
debugString(" Shortcut is: F" + fKey); debugString("[INFO]: Shortcut is: F" + fKey);
return (char)fKey; return (char)fKey;
} }
// If the accelerator is a control character, return it // If the accelerator is a control character, return it
int keyCode = controlCode(keyStroke); int keyCode = controlCode(keyStroke);
if (keyCode != 0) { if (keyCode != 0) {
debugString(" Shortcut is control character: " + Integer.toHexString(keyCode)); debugString("[INFO]: Shortcut is control character: " + Integer.toHexString(keyCode));
return (char)keyCode; return (char)keyCode;
} }
String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode()); String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode());
debugString(" Shortcut is: " + keyText); debugString("[INFO]: Shortcut is: " + keyText);
if (keyText != null || keyText.length() > 0) { if (keyText != null || keyText.length() > 0) {
CharSequence seq = keyText.subSequence(0, 1); CharSequence seq = keyText.subSequence(0, 1);
if (seq != null || seq.length() > 0) { if (seq != null || seq.length() > 0) {
...@@ -3995,7 +3995,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -3995,7 +3995,7 @@ final public class AccessBridge extends AccessBridgeLoader {
private int getModifiers(KeyStroke keyStroke) { private int getModifiers(KeyStroke keyStroke) {
if (keyStroke == null) if (keyStroke == null)
return 0; return 0;
debugString("In AccessBridge.getModifiers"); debugString("[INFO]: In AccessBridge.getModifiers");
// modifiers is a bit strip where bits 0-7 indicate a traditional modifier // modifiers is a bit strip where bits 0-7 indicate a traditional modifier
// such as Ctrl/Alt/Shift, bit 8 indicates an F key shortcut, and bit 9 indicates // such as Ctrl/Alt/Shift, bit 8 indicates an F key shortcut, and bit 9 indicates
// a control code shortcut such as the delete key. // a control code shortcut such as the delete key.
...@@ -4022,23 +4022,23 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4022,23 +4022,23 @@ final public class AccessBridge extends AccessBridgeLoader {
// 0-3 are shift, ctrl, meta, alt // 0-3 are shift, ctrl, meta, alt
// 4-7 are for Solaris workstations (though not being used) // 4-7 are for Solaris workstations (though not being used)
if (text.startsWith("met")) { if (text.startsWith("met")) {
debugString(" found meta"); debugString("[INFO]: found meta");
modifiers |= ActionEvent.META_MASK; modifiers |= ActionEvent.META_MASK;
} }
if (text.startsWith("ctr")) { if (text.startsWith("ctr")) {
debugString(" found ctrl"); debugString("[INFO]: found ctrl");
modifiers |= ActionEvent.CTRL_MASK; modifiers |= ActionEvent.CTRL_MASK;
} }
if (text.startsWith("alt")) { if (text.startsWith("alt")) {
debugString(" found alt"); debugString("[INFO]: found alt");
modifiers |= ActionEvent.ALT_MASK; modifiers |= ActionEvent.ALT_MASK;
} }
if (text.startsWith("shi")) { if (text.startsWith("shi")) {
debugString(" found shift"); debugString("[INFO]: found shift");
modifiers |= ActionEvent.SHIFT_MASK; modifiers |= ActionEvent.SHIFT_MASK;
} }
} }
debugString(" returning modifiers: 0x" + Integer.toHexString(modifiers)); debugString("[INFO]: returning modifiers: 0x" + Integer.toHexString(modifiers));
return modifiers; return modifiers;
} }
...@@ -4117,7 +4117,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4117,7 +4117,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* return the number of icons associated with this context * return the number of icons associated with this context
*/ */
private int getAccessibleIconsCount(final AccessibleContext ac) { private int getAccessibleIconsCount(final AccessibleContext ac) {
debugString("getAccessibleIconsCount"); debugString("[INFO]: getAccessibleIconsCount");
if (ac == null) { if (ac == null) {
return 0; return 0;
} }
...@@ -4137,7 +4137,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4137,7 +4137,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* return icon description at the specified index * return icon description at the specified index
*/ */
private String getAccessibleIconDescription(final AccessibleContext ac, final int index) { private String getAccessibleIconDescription(final AccessibleContext ac, final int index) {
debugString("getAccessibleIconDescription: index = "+index); debugString("[INFO]: getAccessibleIconDescription: index = "+index);
if (ac == null) { if (ac == null) {
return null; return null;
} }
...@@ -4157,7 +4157,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4157,7 +4157,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* return icon height at the specified index * return icon height at the specified index
*/ */
private int getAccessibleIconHeight(final AccessibleContext ac, final int index) { private int getAccessibleIconHeight(final AccessibleContext ac, final int index) {
debugString("getAccessibleIconHeight: index = "+index); debugString("[INFO]: getAccessibleIconHeight: index = "+index);
if (ac == null) { if (ac == null) {
return 0; return 0;
} }
...@@ -4177,7 +4177,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4177,7 +4177,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* return icon width at the specified index * return icon width at the specified index
*/ */
private int getAccessibleIconWidth(final AccessibleContext ac, final int index) { private int getAccessibleIconWidth(final AccessibleContext ac, final int index) {
debugString("getAccessibleIconWidth: index = "+index); debugString("[INFO]: getAccessibleIconWidth: index = "+index);
if (ac == null) { if (ac == null) {
return 0; return 0;
} }
...@@ -4199,7 +4199,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4199,7 +4199,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* return the number of icons associated with this context * return the number of icons associated with this context
*/ */
private int getAccessibleActionsCount(final AccessibleContext ac) { private int getAccessibleActionsCount(final AccessibleContext ac) {
debugString("getAccessibleActionsCount"); debugString("[INFO]: getAccessibleActionsCount");
if (ac == null) { if (ac == null) {
return 0; return 0;
} }
...@@ -4218,7 +4218,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4218,7 +4218,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* return icon description at the specified index * return icon description at the specified index
*/ */
private String getAccessibleActionName(final AccessibleContext ac, final int index) { private String getAccessibleActionName(final AccessibleContext ac, final int index) {
debugString("getAccessibleActionName: index = "+index); debugString("[INFO]: getAccessibleActionName: index = "+index);
if (ac == null) { if (ac == null) {
return null; return null;
} }
...@@ -4237,7 +4237,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4237,7 +4237,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* return icon description at the specified index * return icon description at the specified index
*/ */
private boolean doAccessibleActions(final AccessibleContext ac, final String name) { private boolean doAccessibleActions(final AccessibleContext ac, final String name) {
debugString("doAccessibleActions: action name = "+name); debugString("[INFO]: doAccessibleActions: action name = "+name);
if (ac == null || name == null) { if (ac == null || name == null) {
return false; return false;
} }
...@@ -4275,14 +4275,14 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4275,14 +4275,14 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns whether successful. * Returns whether successful.
*/ */
private boolean setTextContents(final AccessibleContext ac, final String text) { private boolean setTextContents(final AccessibleContext ac, final String text) {
debugString("setTextContents: ac = "+ac+"; text = "+text); debugString("[INFO]: setTextContents: ac = "+ac+"; text = "+text);
if (! (ac instanceof AccessibleEditableText)) { if (! (ac instanceof AccessibleEditableText)) {
debugString(" ac not instanceof AccessibleEditableText: "+ac); debugString("[WARN]: ac not instanceof AccessibleEditableText: "+ac);
return false; return false;
} }
if (text == null) { if (text == null) {
debugString(" text is null"); debugString("[WARN]: text is null");
return false; return false;
} }
...@@ -4319,7 +4319,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4319,7 +4319,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* (AccessibleContext)0 on error. * (AccessibleContext)0 on error.
*/ */
private AccessibleContext getTopLevelObject (final AccessibleContext ac) { private AccessibleContext getTopLevelObject (final AccessibleContext ac) {
debugString("getTopLevelObject; ac = "+ac); debugString("[INFO]: getTopLevelObject; ac = "+ac);
if (ac == null) { if (ac == null) {
return null; return null;
} }
...@@ -4356,8 +4356,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4356,8 +4356,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
private AccessibleContext getParentWithRole (final AccessibleContext ac, private AccessibleContext getParentWithRole (final AccessibleContext ac,
final String roleName) { final String roleName) {
debugString("getParentWithRole; ac = "+ac); debugString("[INFO]: getParentWithRole; ac = "+ac + "\n role = "+roleName);
debugString("role = "+roleName);
if (ac == null || roleName == null) { if (ac == null || roleName == null) {
return null; return null;
} }
...@@ -4413,7 +4412,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4413,7 +4412,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns -1 on error. * Returns -1 on error.
*/ */
private int getObjectDepth(final AccessibleContext ac) { private int getObjectDepth(final AccessibleContext ac) {
debugString("getObjectDepth: ac = "+ac); debugString("[INFO]: getObjectDepth: ac = "+ac);
if (ac == null) { if (ac == null) {
return -1; return -1;
...@@ -4442,7 +4441,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4442,7 +4441,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Returns (AccessibleContext)0 on error. * Returns (AccessibleContext)0 on error.
*/ */
private AccessibleContext getActiveDescendent (final AccessibleContext ac) { private AccessibleContext getActiveDescendent (final AccessibleContext ac) {
debugString("getActiveDescendent: ac = "+ac); debugString("[INFO]: getActiveDescendent: ac = "+ac);
if (ac == null) { if (ac == null) {
return null; return null;
} }
...@@ -4510,7 +4509,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4510,7 +4509,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Bug ID 4916682 - Implement JAWS AccessibleName policy * Bug ID 4916682 - Implement JAWS AccessibleName policy
*/ */
private String getJAWSAccessibleName(final AccessibleContext ac) { private String getJAWSAccessibleName(final AccessibleContext ac) {
debugString("getJAWSAccessibleName"); debugString("[INFO]: getJAWSAccessibleName");
if (ac == null) { if (ac == null) {
return null; return null;
} }
...@@ -4529,7 +4528,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4529,7 +4528,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Bug ID 4944757 - requestFocus method needed * Bug ID 4944757 - requestFocus method needed
*/ */
private boolean requestFocus(final AccessibleContext ac) { private boolean requestFocus(final AccessibleContext ac) {
debugString("requestFocus"); debugString("[INFO]: requestFocus");
if (ac == null) { if (ac == null) {
return false; return false;
} }
...@@ -4554,7 +4553,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4554,7 +4553,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Bug ID 4944758 - selectTextRange method needed * Bug ID 4944758 - selectTextRange method needed
*/ */
private boolean selectTextRange(final AccessibleContext ac, final int startIndex, final int endIndex) { private boolean selectTextRange(final AccessibleContext ac, final int startIndex, final int endIndex) {
debugString("selectTextRange: start = "+startIndex+"; end = "+endIndex); debugString("[INFO]: selectTextRange: start = "+startIndex+"; end = "+endIndex);
if (ac == null) { if (ac == null) {
return false; return false;
} }
...@@ -4580,7 +4579,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4580,7 +4579,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Bug ID 4944770 - setCaretPosition method needed * Bug ID 4944770 - setCaretPosition method needed
*/ */
private boolean setCaretPosition(final AccessibleContext ac, final int position) { private boolean setCaretPosition(final AccessibleContext ac, final int position) {
debugString("setCaretPosition: position = "+position); debugString("[INFO]: setCaretPosition: position = "+position);
if (ac == null) { if (ac == null) {
return false; return false;
} }
...@@ -4608,13 +4607,13 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4608,13 +4607,13 @@ final public class AccessBridge extends AccessBridgeLoader {
private boolean _foundVisibleChild; private boolean _foundVisibleChild;
private int getVisibleChildrenCount(AccessibleContext ac) { private int getVisibleChildrenCount(AccessibleContext ac) {
debugString("getVisibleChildrenCount"); debugString("[INFO]: getVisibleChildrenCount");
if (ac == null) { if (ac == null) {
return -1; return -1;
} }
_visibleChildrenCount = 0; _visibleChildrenCount = 0;
_getVisibleChildrenCount(ac); _getVisibleChildrenCount(ac);
debugString(" _visibleChildrenCount = "+_visibleChildrenCount); debugString("[INFO]: _visibleChildrenCount = "+_visibleChildrenCount);
return _visibleChildrenCount; return _visibleChildrenCount;
} }
...@@ -4754,7 +4753,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4754,7 +4753,7 @@ final public class AccessBridge extends AccessBridgeLoader {
* Bug ID 4944762- getVisibleChildren for list-like components needed * Bug ID 4944762- getVisibleChildren for list-like components needed
*/ */
private AccessibleContext getVisibleChild(AccessibleContext ac, int index) { private AccessibleContext getVisibleChild(AccessibleContext ac, int index) {
debugString("getVisibleChild: index = "+index); debugString("[INFO]: getVisibleChild: index = "+index);
if (ac == null) { if (ac == null) {
return null; return null;
} }
...@@ -4764,7 +4763,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4764,7 +4763,7 @@ final public class AccessBridge extends AccessBridgeLoader {
_getVisibleChild(ac, index); _getVisibleChild(ac, index);
if (_visibleChild != null) { if (_visibleChild != null) {
debugString( " getVisibleChild: found child = " + debugString( "[INFO]: getVisibleChild: found child = " +
InvocationUtils.invokeAndWait(new Callable<String>() { InvocationUtils.invokeAndWait(new Callable<String>() {
@Override @Override
public String call() throws Exception { public String call() throws Exception {
...@@ -4953,7 +4952,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4953,7 +4952,7 @@ final public class AccessBridge extends AccessBridgeLoader {
*/ */
void increment(Object o) { void increment(Object o) {
if (o == null){ if (o == null){
debugString("ObjectReferences::increment - Passed in object is null"); debugString("[WARN]: ObjectReferences::increment - Passed in object is null");
return; return;
} }
...@@ -4974,10 +4973,10 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -4974,10 +4973,10 @@ final public class AccessBridge extends AccessBridgeLoader {
if (aRef.value == 0) { if (aRef.value == 0) {
refs.remove(o); refs.remove(o);
} else if (aRef.value < 0) { } else if (aRef.value < 0) {
debugString("ERROR: decrementing reference count below 0"); debugString("[ERROR]: decrementing reference count below 0");
} }
} else { } else {
debugString("ERROR: object to decrement not in ObjectReferences table"); debugString("[ERROR]: object to decrement not in ObjectReferences table");
} }
} }
...@@ -5312,7 +5311,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5312,7 +5311,7 @@ final public class AccessBridge extends AccessBridgeLoader {
// This is invoked on the EDT , as // This is invoked on the EDT , as
public void propertyChange(PropertyChangeEvent e) { public void propertyChange(PropertyChangeEvent e) {
accessBridge.debugString("propertyChange(" + e.toString() + ") called"); accessBridge.debugString("[INFO]: propertyChange(" + e.toString() + ") called");
if (e != null && (accessibilityEventMask & PROPERTY_EVENTS) != 0) { if (e != null && (accessibilityEventMask & PROPERTY_EVENTS) != 0) {
Object o = e.getSource(); Object o = e.getSource();
...@@ -5330,7 +5329,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5330,7 +5329,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (ac != null) { if (ac != null) {
InvocationUtils.registerAccessibleContext(ac, AppContext.getAppContext()); InvocationUtils.registerAccessibleContext(ac, AppContext.getAppContext());
accessBridge.debugString("AccessibleContext: " + ac); accessBridge.debugString("[INFO]: AccessibleContext: " + ac);
String propertyName = e.getPropertyName(); String propertyName = e.getPropertyName();
if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CARET_PROPERTY) == 0) { if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CARET_PROPERTY) == 0) {
...@@ -5343,8 +5342,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5343,8 +5342,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (e.getNewValue() instanceof Integer) { if (e.getNewValue() instanceof Integer) {
newValue = ((Integer) e.getNewValue()).intValue(); newValue = ((Integer) e.getNewValue()).intValue();
} }
accessBridge.debugString(" - about to call propertyCaretChange()"); accessBridge.debugString("[INFO]: - about to call propertyCaretChange() old value: " + oldValue + "new value: " + newValue);
accessBridge.debugString(" old value: " + oldValue + "new value: " + newValue);
accessBridge.propertyCaretChange(e, ac, oldValue, newValue); accessBridge.propertyCaretChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY) == 0) { } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY) == 0) {
...@@ -5357,8 +5355,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5357,8 +5355,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (e.getNewValue() != null) { if (e.getNewValue() != null) {
newValue = e.getNewValue().toString(); newValue = e.getNewValue().toString();
} }
accessBridge.debugString(" - about to call propertyDescriptionChange()"); accessBridge.debugString("[INFO]: - about to call propertyDescriptionChange() old value: " + oldValue + "new value: " + newValue);
accessBridge.debugString(" old value: " + oldValue + "new value: " + newValue);
accessBridge.propertyDescriptionChange(e, ac, oldValue, newValue); accessBridge.propertyDescriptionChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_NAME_PROPERTY) == 0) { } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_NAME_PROPERTY) == 0) {
...@@ -5371,12 +5368,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5371,12 +5368,11 @@ final public class AccessBridge extends AccessBridgeLoader {
if (e.getNewValue() != null) { if (e.getNewValue() != null) {
newValue = e.getNewValue().toString(); newValue = e.getNewValue().toString();
} }
accessBridge.debugString(" - about to call propertyNameChange()"); accessBridge.debugString("[INFO]: - about to call propertyNameChange() old value: " + oldValue + " new value: " + newValue);
accessBridge.debugString(" old value: " + oldValue + " new value: " + newValue);
accessBridge.propertyNameChange(e, ac, oldValue, newValue); accessBridge.propertyNameChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY) == 0) { } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY) == 0) {
accessBridge.debugString(" - about to call propertySelectionChange() " + ac + " " + Thread.currentThread() + " " + e.getSource()); accessBridge.debugString("[INFO]: - about to call propertySelectionChange() " + ac + " " + Thread.currentThread() + " " + e.getSource());
accessBridge.propertySelectionChange(e, ac); accessBridge.propertySelectionChange(e, ac);
...@@ -5394,11 +5390,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5394,11 +5390,11 @@ final public class AccessBridge extends AccessBridgeLoader {
newValue = newState.toDisplayString(Locale.US); newValue = newState.toDisplayString(Locale.US);
} }
accessBridge.debugString(" - about to call propertyStateChange()"); accessBridge.debugString("[INFO]: - about to call propertyStateChange()");
accessBridge.propertyStateChange(e, ac, oldValue, newValue); accessBridge.propertyStateChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY) == 0) { } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY) == 0) {
accessBridge.debugString(" - about to call propertyTextChange()"); accessBridge.debugString("[INFO]: - about to call propertyTextChange()");
accessBridge.propertyTextChange(e, ac); accessBridge.propertyTextChange(e, ac);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY) == 0) { // strings 'cause of floating point, etc. } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY) == 0) { // strings 'cause of floating point, etc.
...@@ -5411,7 +5407,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5411,7 +5407,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (e.getNewValue() != null) { if (e.getNewValue() != null) {
newValue = e.getNewValue().toString(); newValue = e.getNewValue().toString();
} }
accessBridge.debugString(" - about to call propertyDescriptionChange()"); accessBridge.debugString("[INFO]: - about to call propertyDescriptionChange()");
accessBridge.propertyValueChange(e, ac, oldValue, newValue); accessBridge.propertyValueChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY) == 0) { } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY) == 0) {
...@@ -5430,8 +5426,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5430,8 +5426,7 @@ final public class AccessBridge extends AccessBridgeLoader {
newAC = (AccessibleContext) e.getNewValue(); newAC = (AccessibleContext) e.getNewValue();
InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext()); InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
} }
accessBridge.debugString(" - about to call propertyChildChange()"); accessBridge.debugString("[INFO]: - about to call propertyChildChange() old AC: " + oldAC + "new AC: " + newAC);
accessBridge.debugString(" old AC: " + oldAC + "new AC: " + newAC);
accessBridge.propertyChildChange(e, ac, oldAC, newAC); accessBridge.propertyChildChange(e, ac, oldAC, newAC);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY) == 0) { } else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY) == 0) {
...@@ -5494,10 +5489,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5494,10 +5489,7 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
prevAC = newAC; prevAC = newAC;
accessBridge.debugString(" - about to call propertyActiveDescendentChange()"); accessBridge.debugString("[INFO]: - about to call propertyActiveDescendentChange() AC: " + ac + " old AC: " + oldAC + "new AC: " + newAC);
accessBridge.debugString(" AC: " + ac);
accessBridge.debugString(" old AC: " + oldAC + "new AC: " + newAC);
InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext()); InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext());
InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext()); InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
accessBridge.propertyActiveDescendentChange(e, ac, oldAC, newAC); accessBridge.propertyActiveDescendentChange(e, ac, oldAC, newAC);
...@@ -5553,10 +5545,9 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5553,10 +5545,9 @@ final public class AccessBridge extends AccessBridgeLoader {
// This is a popup with an item selected // This is a popup with an item selected
FocusEvent e = FocusEvent e =
new FocusEvent(last, FocusEvent.FOCUS_GAINED); new FocusEvent(last, FocusEvent.FOCUS_GAINED);
accessBridge.debugString(" - about to call focusGained()");
AccessibleContext focusedAC = last.getAccessibleContext(); AccessibleContext focusedAC = last.getAccessibleContext();
InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(last)); InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(last));
accessBridge.debugString(" AC: " + focusedAC); accessBridge.debugString("[INFO]: - about to call focusGained() AC: " + focusedAC);
accessBridge.focusGained(e, focusedAC); accessBridge.focusGained(e, focusedAC);
} }
} }
...@@ -5565,10 +5556,9 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5565,10 +5556,9 @@ final public class AccessBridge extends AccessBridgeLoader {
if (focusOwner instanceof Accessible) { if (focusOwner instanceof Accessible) {
FocusEvent e = new FocusEvent(focusOwner, FocusEvent e = new FocusEvent(focusOwner,
FocusEvent.FOCUS_GAINED); FocusEvent.FOCUS_GAINED);
accessBridge.debugString(" - about to call focusGained()");
AccessibleContext focusedAC = focusOwner.getAccessibleContext(); AccessibleContext focusedAC = focusOwner.getAccessibleContext();
InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(focusOwner)); InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(focusOwner));
accessBridge.debugString(" AC: " + focusedAC); accessBridge.debugString("[INFO]: - about to call focusGained() AC: " + focusedAC);
accessBridge.focusGained(e, focusedAC); accessBridge.focusGained(e, focusedAC);
} }
} }
...@@ -5578,8 +5568,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -5578,8 +5568,7 @@ final public class AccessBridge extends AccessBridgeLoader {
if (e != null && (javaEventMask & FOCUS_LOST_EVENTS) != 0) { if (e != null && (javaEventMask & FOCUS_LOST_EVENTS) != 0) {
Accessible a = Translator.getAccessible(e.getSource()); Accessible a = Translator.getAccessible(e.getSource());
if (a != null) { if (a != null) {
accessBridge.debugString(" - about to call focusLost()"); accessBridge.debugString("[INFO]: - about to call focusLost() AC: " + a.getAccessibleContext());
accessBridge.debugString(" AC: " + a.getAccessibleContext());
AccessibleContext context = a.getAccessibleContext(); AccessibleContext context = a.getAccessibleContext();
InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext()); InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
accessBridge.focusLost(e, context); accessBridge.focusLost(e, context);
...@@ -6282,7 +6271,7 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -6282,7 +6271,7 @@ final public class AccessBridge extends AccessBridgeLoader {
isLeaf = treeModel.isLeaf(obj); isLeaf = treeModel.isLeaf(obj);
} }
} }
debugString("AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap); debugString("[INFO]: AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap);
} }
private TreePath getChildTreePath(int i) { private TreePath getChildTreePath(int i) {
...@@ -6322,14 +6311,14 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -6322,14 +6311,14 @@ final public class AccessBridge extends AccessBridgeLoader {
} }
private Component getCurrentComponent() { private Component getCurrentComponent() {
debugString("AccessibleJTreeNode: getCurrentComponent"); debugString("[INFO]: AccessibleJTreeNode: getCurrentComponent");
// is the object visible? // is the object visible?
// if so, get row, selected, focus & leaf state, // if so, get row, selected, focus & leaf state,
// and then get the renderer component and return it // and then get the renderer component and return it
if (tree != null && tree.isVisible(path)) { if (tree != null && tree.isVisible(path)) {
TreeCellRenderer r = tree.getCellRenderer(); TreeCellRenderer r = tree.getCellRenderer();
if (r == null) { if (r == null) {
debugString(" returning null 1"); debugString("[WARN]: returning null 1");
return null; return null;
} }
TreeUI ui = tree.getUI(); TreeUI ui = tree.getUI();
...@@ -6341,11 +6330,11 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -6341,11 +6330,11 @@ final public class AccessBridge extends AccessBridgeLoader {
Component retval = r.getTreeCellRendererComponent(tree, obj, Component retval = r.getTreeCellRendererComponent(tree, obj,
selected, expanded, selected, expanded,
isLeaf, row, hasFocus); isLeaf, row, hasFocus);
debugString(" returning = "+retval.getClass()); debugString("[INFO]: returning = "+retval.getClass());
return retval; return retval;
} }
} }
debugString(" returning null 2"); debugString("[WARN]: returning null 2");
return null; return null;
} }
...@@ -6358,13 +6347,13 @@ final public class AccessBridge extends AccessBridgeLoader { ...@@ -6358,13 +6347,13 @@ final public class AccessBridge extends AccessBridgeLoader {
* object does not have a name * object does not have a name
*/ */
public String getAccessibleName() { public String getAccessibleName() {
debugString("AccessibleJTreeNode: getAccessibleName"); debugString("[INFO]: AccessibleJTreeNode: getAccessibleName");
AccessibleContext ac = getCurrentAccessibleContext(); AccessibleContext ac = getCurrentAccessibleContext();
if (ac != null) { if (ac != null) {
String name = ac.getAccessibleName(); String name = ac.getAccessibleName();
if ((name != null) && (!name.isEmpty())) { if ((name != null) && (!name.isEmpty())) {
String retval = ac.getAccessibleName(); String retval = ac.getAccessibleName();
debugString(" returning "+retval); debugString("[INFO]: returning "+retval);
return retval; return retval;
} else { } else {
return null; return null;
......
...@@ -41,8 +41,8 @@ public abstract class WGLSurfaceData extends OGLSurfaceData { ...@@ -41,8 +41,8 @@ public abstract class WGLSurfaceData extends OGLSurfaceData {
protected WComponentPeer peer; protected WComponentPeer peer;
private WGLGraphicsConfig graphicsConfig; private WGLGraphicsConfig graphicsConfig;
private native void initOps(long pConfigInfo, WComponentPeer peer, private native void initOps(OGLGraphicsConfig gc, long pConfigInfo,
long hwnd); WComponentPeer peer, long hwnd);
protected native boolean initPbuffer(long pData, long pConfigInfo, protected native boolean initPbuffer(long pData, long pConfigInfo,
boolean isOpaque, boolean isOpaque,
int width, int height); int width, int height);
...@@ -57,7 +57,7 @@ public abstract class WGLSurfaceData extends OGLSurfaceData { ...@@ -57,7 +57,7 @@ public abstract class WGLSurfaceData extends OGLSurfaceData {
long pConfigInfo = gc.getNativeConfigInfo(); long pConfigInfo = gc.getNativeConfigInfo();
long hwnd = peer != null ? peer.getHWnd() : 0L; long hwnd = peer != null ? peer.getHWnd() : 0L;
initOps(pConfigInfo, peer, hwnd); initOps(gc, pConfigInfo, peer, hwnd);
} }
public GraphicsConfiguration getDeviceConfiguration() { public GraphicsConfiguration getDeviceConfiguration() {
......
...@@ -53,17 +53,17 @@ AccessBridgeATInstance::AccessBridgeATInstance(HWND ourABWindow, HWND winABWindo ...@@ -53,17 +53,17 @@ AccessBridgeATInstance::AccessBridgeATInstance(HWND ourABWindow, HWND winABWindo
* AccessBridgeATInstance descructor * AccessBridgeATInstance descructor
*/ */
AccessBridgeATInstance::~AccessBridgeATInstance() { AccessBridgeATInstance::~AccessBridgeATInstance() {
PrintDebugString("\r\nin AccessBridgeATInstance::~AccessBridgeATInstance"); PrintDebugString("[INFO]: in AccessBridgeATInstance::~AccessBridgeATInstance");
// if IPC memory mapped file view is valid, unmap it // if IPC memory mapped file view is valid, unmap it
if (memoryMappedView != (char *) 0) { if (memoryMappedView != (char *) 0) {
PrintDebugString(" unmapping memoryMappedView; view = %p", memoryMappedView); PrintDebugString("[INFO]: unmapping memoryMappedView; view = %p", memoryMappedView);
UnmapViewOfFile(memoryMappedView); UnmapViewOfFile(memoryMappedView);
memoryMappedView = (char *) 0; memoryMappedView = (char *) 0;
} }
// if IPC memory mapped file handle map is open, close it // if IPC memory mapped file handle map is open, close it
if (memoryMappedFileMapHandle != (HANDLE) 0) { if (memoryMappedFileMapHandle != (HANDLE) 0) {
PrintDebugString(" closing memoryMappedFileMapHandle; handle = %p", memoryMappedFileMapHandle); PrintDebugString("[INFO]: closing memoryMappedFileMapHandle; handle = %p", memoryMappedFileMapHandle);
CloseHandle(memoryMappedFileMapHandle); CloseHandle(memoryMappedFileMapHandle);
memoryMappedFileMapHandle = (HANDLE) 0; memoryMappedFileMapHandle = (HANDLE) 0;
} }
...@@ -87,7 +87,7 @@ LRESULT ...@@ -87,7 +87,7 @@ LRESULT
AccessBridgeATInstance::initiateIPC() { AccessBridgeATInstance::initiateIPC() {
DWORD errorCode; DWORD errorCode;
PrintDebugString("\r\nIn AccessBridgeATInstance::initiateIPC()"); PrintDebugString("[INFO]: In AccessBridgeATInstance::initiateIPC()");
// open Windows-initiated IPC filemap & map it to a ptr // open Windows-initiated IPC filemap & map it to a ptr
...@@ -95,10 +95,10 @@ AccessBridgeATInstance::initiateIPC() { ...@@ -95,10 +95,10 @@ AccessBridgeATInstance::initiateIPC() {
FALSE, memoryMappedFileName); FALSE, memoryMappedFileName);
if (memoryMappedFileMapHandle == NULL) { if (memoryMappedFileMapHandle == NULL) {
errorCode = GetLastError(); errorCode = GetLastError();
PrintDebugString(" Failed to CreateFileMapping for %s, error: %X", memoryMappedFileName, errorCode); PrintDebugString("[ERROR]: Failed to CreateFileMapping for %s, error: %X", memoryMappedFileName, errorCode);
return errorCode; return errorCode;
} else { } else {
PrintDebugString(" CreateFileMapping worked - filename: %s", memoryMappedFileName); PrintDebugString("[INFO]: CreateFileMapping worked - filename: %s", memoryMappedFileName);
} }
memoryMappedView = (char *) MapViewOfFile(memoryMappedFileMapHandle, memoryMappedView = (char *) MapViewOfFile(memoryMappedFileMapHandle,
...@@ -106,20 +106,20 @@ AccessBridgeATInstance::initiateIPC() { ...@@ -106,20 +106,20 @@ AccessBridgeATInstance::initiateIPC() {
0, 0, 0); 0, 0, 0);
if (memoryMappedView == NULL) { if (memoryMappedView == NULL) {
errorCode = GetLastError(); errorCode = GetLastError();
PrintDebugString(" Failed to MapViewOfFile for %s, error: %X", memoryMappedFileName, errorCode); PrintDebugString("[ERROR]: Failed to MapViewOfFile for %s, error: %X", memoryMappedFileName, errorCode);
return errorCode; return errorCode;
} else { } else {
PrintDebugString(" MapViewOfFile worked - view: %p", memoryMappedView); PrintDebugString("[INFO]: MapViewOfFile worked - view: %p", memoryMappedView);
} }
// look for the JavaDLL's answer to see if it could read the file // look for the JavaDLL's answer to see if it could read the file
if (strcmp(memoryMappedView, AB_MEMORY_MAPPED_FILE_OK_QUERY) != 0) { if (strcmp(memoryMappedView, AB_MEMORY_MAPPED_FILE_OK_QUERY) != 0) {
PrintDebugString(" JavaVM failed to write to memory mapped file %s", PrintDebugString("[ERROR]: JavaVM failed to write to memory mapped file %s",
memoryMappedFileName); memoryMappedFileName);
return -1; return -1;
} else { } else {
PrintDebugString(" JavaVM successfully wrote to file!"); PrintDebugString("[INFO]: JavaVM successfully wrote to file!");
} }
...@@ -213,8 +213,8 @@ static void do_event(char *buffer, int bufsize,HWND ourAccessBridgeWindow,HWND w ...@@ -213,8 +213,8 @@ static void do_event(char *buffer, int bufsize,HWND ourAccessBridgeWindow,HWND w
LRESULT LRESULT
AccessBridgeATInstance::sendJavaEventPackage(char *buffer, int bufsize, long eventID) { AccessBridgeATInstance::sendJavaEventPackage(char *buffer, int bufsize, long eventID) {
PrintDebugString("AccessBridgeATInstance::sendJavaEventPackage() eventID = %X", eventID); PrintDebugString("[INFO]: AccessBridgeATInstance::sendJavaEventPackage() eventID = %X", eventID);
PrintDebugString("AccessBridgeATInstance::sendJavaEventPackage() (using PostMessage) eventID = %X", eventID); PrintDebugString("[INFO]: AccessBridgeATInstance::sendJavaEventPackage() (using PostMessage) eventID = %X", eventID);
if (eventID & javaEventMask) { if (eventID & javaEventMask) {
do_event(buffer,bufsize,ourAccessBridgeWindow,winAccessBridgeWindow); do_event(buffer,bufsize,ourAccessBridgeWindow,winAccessBridgeWindow);
...@@ -234,7 +234,7 @@ AccessBridgeATInstance::sendJavaEventPackage(char *buffer, int bufsize, long eve ...@@ -234,7 +234,7 @@ AccessBridgeATInstance::sendJavaEventPackage(char *buffer, int bufsize, long eve
LRESULT LRESULT
AccessBridgeATInstance::sendAccessibilityEventPackage(char *buffer, int bufsize, long eventID) { AccessBridgeATInstance::sendAccessibilityEventPackage(char *buffer, int bufsize, long eventID) {
PrintDebugString("AccessBridgeATInstance::sendAccessibilityEventPackage() eventID = %X", eventID); PrintDebugString("[INFO]: AccessBridgeATInstance::sendAccessibilityEventPackage() eventID = %X", eventID);
if (eventID & accessibilityEventMask) { if (eventID & accessibilityEventMask) {
do_event(buffer,bufsize,ourAccessBridgeWindow,winAccessBridgeWindow); do_event(buffer,bufsize,ourAccessBridgeWindow,winAccessBridgeWindow);
......
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -31,17 +31,66 @@ ...@@ -31,17 +31,66 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <windows.h> #include <windows.h>
#include <cstdlib>
#include <cstring>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
static FILE* logFP = nullptr;
void initializeFileLogger(char * fileName) {
auto var = "JAVA_ACCESSBRIDGE_LOGDIR";
const auto envfilePath = getenv(var);
if (envfilePath != nullptr && fileName != nullptr) {
auto envFilePathLength = strlen(envfilePath);
auto fileNameLength = strlen(fileName);
auto filePathSize = envFilePathLength + 1 + fileNameLength + 5; //1 for "/", 5 for ".log" and 0;
auto filePath = new char[filePathSize];
memset(filePath, 0, filePathSize*sizeof(char));
memcpy(filePath, envfilePath, envFilePathLength*sizeof(char));
filePath[envFilePathLength] = '/';
memcpy(filePath + envFilePathLength + 1, fileName, fileNameLength*sizeof(char));
memcpy(filePath + envFilePathLength + 1 + fileNameLength, ".log", 4*sizeof(char));
logFP = fopen(filePath, "w");
if (logFP == nullptr) {
printf("\n%s\n", filePath);
PrintDebugString("Could not open file %s", filePath);
}
delete [] filePath;
}
}
void finalizeFileLogger() {
if (logFP) {
fclose(logFP);
logFP = nullptr;
}
}
auto getTimeStamp() -> long long {
LARGE_INTEGER freqLarge;
::QueryPerformanceFrequency(&freqLarge);
long long freq = freqLarge.QuadPart;
LARGE_INTEGER counterLarge;
::QueryPerformanceCounter(&counterLarge);
long long counter = counterLarge.QuadPart;
long long milliDen = 1000;
// prevent possible overflow
long long whole = (counter / freq) * milliDen;
long long part = (counter % freq) * milliDen / freq;
return whole + part;
}
/** /**
* Send debugging info to the appropriate place * Send debugging info to the appropriate place
*/ */
void PrintDebugString(char *msg, ...) { void PrintDebugString(char *msg, ...) {
#ifdef DEBUGGING_ON #ifdef DEBUGGING_ON
char buf[1024]; char buf[1024] = {0};
va_list argprt; va_list argprt;
va_start(argprt, msg); // set up argptr va_start(argprt, msg); // set up argptr
...@@ -54,6 +103,14 @@ extern "C" { ...@@ -54,6 +103,14 @@ extern "C" {
printf("\r\n"); printf("\r\n");
#endif #endif
#endif #endif
if (logFP) {
fprintf(logFP, "[%llu] ", getTimeStamp());
va_list args;
va_start(args, msg);
vfprintf(logFP, msg, args);
va_end(args);
fprintf(logFP, "\r\n");
}
} }
/** /**
...@@ -61,7 +118,7 @@ extern "C" { ...@@ -61,7 +118,7 @@ extern "C" {
*/ */
void PrintJavaDebugString2(char *msg, ...) { void PrintJavaDebugString2(char *msg, ...) {
#ifdef JAVA_DEBUGGING_ON #ifdef JAVA_DEBUGGING_ON
char buf[1024]; char buf[1024] = {0};
va_list argprt; va_list argprt;
va_start(argprt, msg); // set up argptr va_start(argprt, msg); // set up argptr
...@@ -74,13 +131,21 @@ extern "C" { ...@@ -74,13 +131,21 @@ extern "C" {
printf("\r\n"); printf("\r\n");
#endif #endif
#endif #endif
if (logFP) {
fprintf(logFP, "[%llu] ", getTimeStamp());
va_list args;
va_start(args, msg);
vfprintf(logFP, msg, args);
va_end(args);
fprintf(logFP, "\r\n");
}
} }
/** /**
* Wide version of the method to send debugging info to the appropriate place * Wide version of the method to send debugging info to the appropriate place
*/ */
void wPrintDebugString(wchar_t *msg, ...) { void wPrintDebugString(wchar_t *msg, ...) {
#ifdef DEBUGGING_ON #ifdef DEBUGGING_ON
char buf[1024]; char buf[1024] = {0};
char charmsg[256]; char charmsg[256];
va_list argprt; va_list argprt;
...@@ -95,6 +160,14 @@ extern "C" { ...@@ -95,6 +160,14 @@ extern "C" {
printf("\r\n"); printf("\r\n");
#endif #endif
#endif #endif
if (logFP) {
fprintf(logFP, "[%llu] ", getTimeStamp());
va_list args;
va_start(args, msg);
vfwprintf(logFP, msg, args);
va_end(args);
fprintf(logFP, "\r\n");
}
} }
/** /**
...@@ -102,8 +175,8 @@ extern "C" { ...@@ -102,8 +175,8 @@ extern "C" {
*/ */
void wPrintJavaDebugString(wchar_t *msg, ...) { void wPrintJavaDebugString(wchar_t *msg, ...) {
#ifdef JAVA_DEBUGGING_ON #ifdef JAVA_DEBUGGING_ON
char buf[1024]; char buf[1024] = {0};
char charmsg[256]; char charmsg[256] = {0};
va_list argprt; va_list argprt;
va_start(argprt, msg); // set up argptr va_start(argprt, msg); // set up argptr
...@@ -117,6 +190,14 @@ extern "C" { ...@@ -117,6 +190,14 @@ extern "C" {
printf("\r\n"); printf("\r\n");
#endif #endif
#endif #endif
if (logFP) {
fprintf(logFP, "[%llu] ", getTimeStamp());
va_list args;
va_start(args, msg);
vfwprintf(logFP, msg, args);
va_end(args);
fprintf(logFP, "\r\n");
}
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
......
/* /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -53,6 +53,8 @@ extern "C" { ...@@ -53,6 +53,8 @@ extern "C" {
void PrintJavaDebugString(char *msg, ...); void PrintJavaDebugString(char *msg, ...);
void wPrintJavaDebugString(wchar_t *msg, ...); void wPrintJavaDebugString(wchar_t *msg, ...);
void wPrintDebugString(wchar_t *msg, ...); void wPrintDebugString(wchar_t *msg, ...);
void initializeFileLogger(char * fileName);
void finalizeFileLogger();
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -170,7 +170,7 @@ AccessBridgeEventHandler::firePropertyChange(long vmID, ...@@ -170,7 +170,7 @@ AccessBridgeEventHandler::firePropertyChange(long vmID,
if (propertyChangeFP != (AccessBridge_PropertyChangeFP) 0) { if (propertyChangeFP != (AccessBridge_PropertyChangeFP) 0) {
propertyChangeFP(vmID, event, source, property, oldName, newName); propertyChangeFP(vmID, event, source, property, oldName, newName);
} else { } else {
DEBUG_CODE(AppendToCallInfo(" Error! propertyChangeFP == 0\r\n")); DEBUG_CODE(AppendToCallInfo("[ERROR]: propertyChangeFP == 0"));
} }
} }
...@@ -186,9 +186,9 @@ AccessBridgeEventHandler::firePropertyChange(long vmID, ...@@ -186,9 +186,9 @@ AccessBridgeEventHandler::firePropertyChange(long vmID,
* *
*/ */
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
const char fireEventDebugString[] = "\r\nIn AccessBridgeEventHandler::%s(%p, %p); vmID = %X\r\n"; const char fireEventDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s(%p, %p); vmID = %X\r\n";
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
const char fireEventDebugString[] = "\r\nIn AccessBridgeEventHandler::%s(%016I64X, %016I64X); vmID = %X\r\n"; const char fireEventDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s(%016I64X, %016I64X); vmID = %X\r\n";
#endif #endif
#define FIRE_EVENT(method, FPprototype, eventFP) \ #define FIRE_EVENT(method, FPprototype, eventFP) \
...@@ -199,18 +199,18 @@ const char fireEventDebugString[] = "\r\nIn AccessBridgeEventHandler::%s(%016I64 ...@@ -199,18 +199,18 @@ const char fireEventDebugString[] = "\r\nIn AccessBridgeEventHandler::%s(%016I64
if (eventFP != (FPprototype) 0) { \ if (eventFP != (FPprototype) 0) { \
eventFP(vmID, event, source); \ eventFP(vmID, event, source); \
} else { \ } else { \
DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0")); \
} \ } \
} }
void AccessBridgeEventHandler::fireJavaShutdown(long vmID) { void AccessBridgeEventHandler::fireJavaShutdown(long vmID) {
DEBUG_CODE(char debugBuf[255]); DEBUG_CODE(char debugBuf[255]);
DEBUG_CODE(sprintf(debugBuf, "\r\nCalling fireJavaShutdown; vmID = %X\r\n", vmID)); DEBUG_CODE(sprintf(debugBuf, "[INFO]: Calling fireJavaShutdown; vmID = %X\r\n", vmID));
DEBUG_CODE(AppendToCallInfo(debugBuf)); DEBUG_CODE(AppendToCallInfo(debugBuf));
if (javaShutdownFP != (AccessBridge_JavaShutdownFP) 0) { if (javaShutdownFP != (AccessBridge_JavaShutdownFP) 0) {
javaShutdownFP(vmID); javaShutdownFP(vmID);
} else { } else {
DEBUG_CODE(AppendToCallInfo(" Error! javaShutdownFP == 0\r\n")); DEBUG_CODE(AppendToCallInfo("[ERROR]: javaShutdownFP == 0"));
} }
} }
...@@ -241,9 +241,9 @@ FIRE_EVENT(firePopupMenuWillBecomeVisible, AccessBridge_PopupMenuWillBecomeVisib ...@@ -241,9 +241,9 @@ FIRE_EVENT(firePopupMenuWillBecomeVisible, AccessBridge_PopupMenuWillBecomeVisib
* *
*/ */
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a no-param property change (%p, %p):\r\n"; const char firePropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a no-param property change (%p, %p):\r\n";
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a no-param property change (%016I64X, %016I64X):\r\n"; const char firePropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a no-param property change (%016I64X, %016I64X):\r\n";
#endif #endif
#define FIRE_PROPERTY_CHANGE(method, FPprototype, eventFP) \ #define FIRE_PROPERTY_CHANGE(method, FPprototype, eventFP) \
...@@ -254,7 +254,7 @@ const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::% ...@@ -254,7 +254,7 @@ const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%
if (eventFP != (FPprototype) 0) { \ if (eventFP != (FPprototype) 0) { \
eventFP(vmID, event, source); \ eventFP(vmID, event, source); \
} else { \ } else { \
DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0")); \
} \ } \
} }
...@@ -269,9 +269,9 @@ const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::% ...@@ -269,9 +269,9 @@ const char firePropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%
* *
*/ */
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a string property change (%p, %p, %ls, %ls):\r\n"; const char fireStringPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a string property change (%p, %p, %ls, %ls):\r\n";
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing a string property change (%016I64X, %016I64X, %ls, %ls):\r\n"; const char fireStringPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing a string property change (%016I64X, %016I64X, %ls, %ls):\r\n";
#endif #endif
#define FIRE_STRING_PROPERTY_CHANGE(method, FPprototype, eventFP, oldValue, newValue) \ #define FIRE_STRING_PROPERTY_CHANGE(method, FPprototype, eventFP, oldValue, newValue) \
...@@ -283,7 +283,7 @@ const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHand ...@@ -283,7 +283,7 @@ const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHand
if (eventFP != (FPprototype) 0) { \ if (eventFP != (FPprototype) 0) { \
eventFP(vmID, event, source, oldValue, newValue); \ eventFP(vmID, event, source, oldValue, newValue); \
} else { \ } else { \
DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0\r\n")); \
} \ } \
} }
...@@ -298,9 +298,9 @@ const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHand ...@@ -298,9 +298,9 @@ const char fireStringPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHand
* *
*/ */
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an int property change (%p, %p, %d, %d):\r\n"; const char fireIntPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an int property change (%p, %p, %d, %d):\r\n";
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an int property change (%016I64X, %016I64X, %d, %d):\r\n"; const char fireIntPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an int property change (%016I64X, %016I64X, %d, %d):\r\n";
#endif #endif
#define FIRE_INT_PROPERTY_CHANGE(method, FPprototype, eventFP) \ #define FIRE_INT_PROPERTY_CHANGE(method, FPprototype, eventFP) \
...@@ -312,7 +312,7 @@ const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler ...@@ -312,7 +312,7 @@ const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler
if (eventFP != (FPprototype) 0) { \ if (eventFP != (FPprototype) 0) { \
eventFP(vmID, event, source, oldValue, newValue); \ eventFP(vmID, event, source, oldValue, newValue); \
} else { \ } else { \
DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0\r\n")); \
} \ } \
} }
...@@ -327,9 +327,9 @@ const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler ...@@ -327,9 +327,9 @@ const char fireIntPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler
* *
*/ */
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
const char fireACPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an AC property change (%p, %p, %p, %p):\r\n"; const char fireACPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an AC property change (%p, %p, %p, %p):\r\n";
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
const char fireACPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler::%s, Firing an AC property change (%016I64X, %016I64X, %016I64X, %016I64X):\r\n"; const char fireACPropertyChangeDebugString[] = "[INFO]: In AccessBridgeEventHandler::%s, Firing an AC property change (%016I64X, %016I64X, %016I64X, %016I64X):\r\n";
#endif #endif
#define FIRE_AC_PROPERTY_CHANGE(method, FPprototype, eventFP) \ #define FIRE_AC_PROPERTY_CHANGE(method, FPprototype, eventFP) \
...@@ -341,7 +341,7 @@ const char fireACPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler: ...@@ -341,7 +341,7 @@ const char fireACPropertyChangeDebugString[] = "\r\nIn AccessBridgeEventHandler:
if (eventFP != (FPprototype) 0) { \ if (eventFP != (FPprototype) 0) { \
eventFP(vmID, event, source, oldValue, newValue); \ eventFP(vmID, event, source, oldValue, newValue); \
} else { \ } else { \
DEBUG_CODE(AppendToCallInfo(" Error! eventFP == 0\r\n")); \ DEBUG_CODE(AppendToCallInfo("[ERROR]: eventFP == 0\r\n")); \
} \ } \
} }
......
...@@ -40,7 +40,7 @@ AccessBridgeJavaEntryPoints::AccessBridgeJavaEntryPoints(JNIEnv *jniEnvironment, ...@@ -40,7 +40,7 @@ AccessBridgeJavaEntryPoints::AccessBridgeJavaEntryPoints(JNIEnv *jniEnvironment,
jobject bridgeObject) { jobject bridgeObject) {
jniEnv = jniEnvironment; jniEnv = jniEnvironment;
accessBridgeObject = (jobject)bridgeObject; accessBridgeObject = (jobject)bridgeObject;
PrintDebugString("AccessBridgeJavaEntryPoints(%p, %p) called", jniEnv, accessBridgeObject); PrintDebugString("[INFO]: AccessBridgeJavaEntryPoints(%p, %p) called", jniEnv, accessBridgeObject);
} }
...@@ -56,15 +56,13 @@ AccessBridgeJavaEntryPoints::~AccessBridgeJavaEntryPoints() { ...@@ -56,15 +56,13 @@ AccessBridgeJavaEntryPoints::~AccessBridgeJavaEntryPoints() {
#define FIND_CLASS(classRef, className) \ #define FIND_CLASS(classRef, className) \
localClassRef = jniEnv->FindClass(className); \ localClassRef = jniEnv->FindClass(className); \
if (localClassRef == (jclass) 0) { \ if (localClassRef == (jclass) 0) { \
PrintDebugString(" Error! FindClass(%s) failed!", className); \ PrintDebugString("[ERROR]: FindClass(%s) failed! -> jniEnv = %p", className, jniEnv); \
PrintDebugString(" -> jniEnv = %p", jniEnv); \
return FALSE; \ return FALSE; \
} \ } \
classRef = (jclass) jniEnv->NewGlobalRef(localClassRef); \ classRef = (jclass) jniEnv->NewGlobalRef(localClassRef); \
jniEnv->DeleteLocalRef(localClassRef); \ jniEnv->DeleteLocalRef(localClassRef); \
if (classRef == (jclass) 0) { \ if (classRef == (jclass) 0) { \
PrintDebugString(" Error! FindClass(%s) failed!", className); \ PrintDebugString("[ERROR]: FindClass(%s) failed! -> (ran out of RAM)", className); \
PrintDebugString(" -> (ran out of RAM)"); \
return FALSE; \ return FALSE; \
} }
...@@ -72,14 +70,13 @@ AccessBridgeJavaEntryPoints::~AccessBridgeJavaEntryPoints() { ...@@ -72,14 +70,13 @@ AccessBridgeJavaEntryPoints::~AccessBridgeJavaEntryPoints() {
#define FIND_METHOD(methodID, classRef, methodString, methodSignature); \ #define FIND_METHOD(methodID, classRef, methodString, methodSignature); \
methodID = jniEnv->GetMethodID(classRef, methodString, methodSignature); \ methodID = jniEnv->GetMethodID(classRef, methodString, methodSignature); \
if (methodID == (jmethodID) 0) { \ if (methodID == (jmethodID) 0) { \
PrintDebugString(" Error! GetMethodID(%s) failed!", methodString); \ PrintDebugString("[ERROR]: GetMethodID(%s) failed! -> jniEnv = %p; classRef = %p", methodString, jniEnv, classRef); \
PrintDebugString(" -> jniEnv = %p; classRef = %p", jniEnv, classRef); \
return FALSE; \ return FALSE; \
} }
#define EXCEPTION_CHECK(situationDescription, returnVal) \ #define EXCEPTION_CHECK(situationDescription, returnVal) \
if (exception = jniEnv->ExceptionOccurred()) { \ if (exception = jniEnv->ExceptionOccurred()) { \
PrintDebugString("\r\n *** Exception occured while doing: %s; returning %d", situationDescription, returnVal); \ PrintDebugString("[ERROR]: *** Exception occured while doing: %s; returning %d", situationDescription, returnVal); \
jniEnv->ExceptionDescribe(); \ jniEnv->ExceptionDescribe(); \
jniEnv->ExceptionClear(); \ jniEnv->ExceptionClear(); \
return (returnVal); \ return (returnVal); \
...@@ -87,7 +84,7 @@ AccessBridgeJavaEntryPoints::~AccessBridgeJavaEntryPoints() { ...@@ -87,7 +84,7 @@ AccessBridgeJavaEntryPoints::~AccessBridgeJavaEntryPoints() {
#define EXCEPTION_CHECK_VOID(situationDescription) \ #define EXCEPTION_CHECK_VOID(situationDescription) \
if (exception = jniEnv->ExceptionOccurred()) { \ if (exception = jniEnv->ExceptionOccurred()) { \
PrintDebugString("\r\n *** Exception occured while doing: %s", situationDescription); \ PrintDebugString("[ERROR]: *** Exception occured while doing: %s", situationDescription); \
jniEnv->ExceptionDescribe(); \ jniEnv->ExceptionDescribe(); \
jniEnv->ExceptionClear(); \ jniEnv->ExceptionClear(); \
return; \ return; \
...@@ -101,7 +98,7 @@ BOOL ...@@ -101,7 +98,7 @@ BOOL
AccessBridgeJavaEntryPoints::BuildJavaEntryPoints() { AccessBridgeJavaEntryPoints::BuildJavaEntryPoints() {
jclass localClassRef; jclass localClassRef;
PrintDebugString("Calling BuildJavaEntryPoints():"); PrintDebugString("[INFO]: Calling BuildJavaEntryPoints():");
FIND_CLASS(bridgeClass, "com/sun/java/accessibility/AccessBridge"); FIND_CLASS(bridgeClass, "com/sun/java/accessibility/AccessBridge");
...@@ -886,14 +883,14 @@ AccessBridgeJavaEntryPoints::isJavaWindow(jint window) { ...@@ -886,14 +883,14 @@ AccessBridgeJavaEntryPoints::isJavaWindow(jint window) {
jthrowable exception; jthrowable exception;
BOOL returnVal; BOOL returnVal;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::isJavaWindow(%X):", window); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::isJavaWindow(%X):", window);
if (isJavaWindowMethod != (jmethodID) 0) { if (isJavaWindowMethod != (jmethodID) 0) {
returnVal = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, isJavaWindowMethod, window); returnVal = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, isJavaWindowMethod, window);
EXCEPTION_CHECK("Getting isJavaWindow - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Getting isJavaWindow - call to CallBooleanMethod()", FALSE);
return returnVal; return returnVal;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or isJavaWindowMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or isJavaWindowMethod == 0");
return FALSE; return FALSE;
} }
} }
...@@ -909,12 +906,12 @@ AccessBridgeJavaEntryPoints::isSameObject(jobject obj1, jobject obj2) { ...@@ -909,12 +906,12 @@ AccessBridgeJavaEntryPoints::isSameObject(jobject obj1, jobject obj2) {
jthrowable exception; jthrowable exception;
BOOL returnVal; BOOL returnVal;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::isSameObject(%p %p):", obj1, obj2); PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::isSameObject(%p %p):", obj1, obj2);
returnVal = (BOOL) jniEnv->IsSameObject((jobject)obj1, (jobject)obj2); returnVal = (BOOL) jniEnv->IsSameObject((jobject)obj1, (jobject)obj2);
EXCEPTION_CHECK("Calling IsSameObject", FALSE); EXCEPTION_CHECK("Calling IsSameObject", FALSE);
PrintDebugString("\r\n isSameObject returning %d", returnVal); PrintDebugString("[INFO]: isSameObject returning %d", returnVal);
return returnVal; return returnVal;
} }
...@@ -930,7 +927,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(jint window) { ...@@ -930,7 +927,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(jint window) {
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(%X):", window); PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(%X):", window);
if (getAccessibleContextFromHWNDMethod != (jmethodID) 0) { if (getAccessibleContextFromHWNDMethod != (jmethodID) 0) {
returnedAccessibleContext = returnedAccessibleContext =
...@@ -941,7 +938,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(jint window) { ...@@ -941,7 +938,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextFromHWND(jint window) {
EXCEPTION_CHECK("Getting AccessibleContextFromHWND - call to CallObjectMethod()", (jobject) 0); EXCEPTION_CHECK("Getting AccessibleContextFromHWND - call to CallObjectMethod()", (jobject) 0);
return globalRef; return globalRef;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or getAccessibleContextFromHWNDMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getAccessibleContextFromHWNDMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -957,17 +954,17 @@ AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(jobject accessibleCont ...@@ -957,17 +954,17 @@ AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(jobject accessibleCont
jthrowable exception; jthrowable exception;
HWND rHWND; HWND rHWND;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(%X):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getHWNDFromAccessibleContext(%X):",
accessibleContext); accessibleContext);
if (getHWNDFromAccessibleContextMethod != (jmethodID) 0) { if (getHWNDFromAccessibleContextMethod != (jmethodID) 0) {
rHWND = (HWND)jniEnv->CallIntMethod(accessBridgeObject, getHWNDFromAccessibleContextMethod, rHWND = (HWND)jniEnv->CallIntMethod(accessBridgeObject, getHWNDFromAccessibleContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting HWNDFromAccessibleContext - call to CallIntMethod()", (HWND)0); EXCEPTION_CHECK("Getting HWNDFromAccessibleContext - call to CallIntMethod()", (HWND)0);
PrintDebugString("\r\n rHWND = %X", rHWND); PrintDebugString("[INFO]: rHWND = %X", rHWND);
return rHWND; return rHWND;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or getHWNDFromAccessibleContextMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getHWNDFromAccessibleContextMethod == 0");
return (HWND)0; return (HWND)0;
} }
} }
...@@ -983,7 +980,7 @@ AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, co ...@@ -983,7 +980,7 @@ AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, co
jthrowable exception; jthrowable exception;
BOOL result = FALSE; BOOL result = FALSE;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::setTextContents(%p, %ls):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::setTextContents(%p, %ls):",
accessibleContext, text); accessibleContext, text);
if (setTextContentsMethod != (jmethodID) 0) { if (setTextContentsMethod != (jmethodID) 0) {
...@@ -991,7 +988,7 @@ AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, co ...@@ -991,7 +988,7 @@ AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, co
// create a Java String for the text // create a Java String for the text
jstring textString = jniEnv->NewString(text, (jsize)wcslen(text)); jstring textString = jniEnv->NewString(text, (jsize)wcslen(text));
if (textString == 0) { if (textString == 0) {
PrintDebugString("\r NewString failed"); PrintDebugString("[ERROR]: NewString failed");
return FALSE; return FALSE;
} }
...@@ -999,10 +996,10 @@ AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, co ...@@ -999,10 +996,10 @@ AccessBridgeJavaEntryPoints::setTextContents(const jobject accessibleContext, co
setTextContentsMethod, setTextContentsMethod,
accessibleContext, textString); accessibleContext, textString);
EXCEPTION_CHECK("setTextContents - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("setTextContents - call to CallBooleanMethod()", FALSE);
PrintDebugString("\r\n result = %d", result); PrintDebugString("[INFO]: result = %d", result);
return result; return result;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or setTextContentsMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or setTextContentsMethod == 0");
return result; return result;
} }
} }
...@@ -1020,14 +1017,14 @@ AccessBridgeJavaEntryPoints::getParentWithRole(const jobject accessibleContext, ...@@ -1020,14 +1017,14 @@ AccessBridgeJavaEntryPoints::getParentWithRole(const jobject accessibleContext,
jthrowable exception; jthrowable exception;
jobject rAccessibleContext; jobject rAccessibleContext;
PrintDebugString("In AccessBridgeJavaEntryPoints::getParentWithRole(%p):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getParentWithRole(%p):",
accessibleContext); accessibleContext);
if (getParentWithRoleMethod != (jmethodID) 0) { if (getParentWithRoleMethod != (jmethodID) 0) {
// create a Java String for the role // create a Java String for the role
jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role)); jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role));
if (roleName == 0) { if (roleName == 0) {
PrintDebugString(" NewString failed"); PrintDebugString("[ERROR]: NewString failed");
return FALSE; return FALSE;
} }
...@@ -1035,14 +1032,14 @@ AccessBridgeJavaEntryPoints::getParentWithRole(const jobject accessibleContext, ...@@ -1035,14 +1032,14 @@ AccessBridgeJavaEntryPoints::getParentWithRole(const jobject accessibleContext,
getParentWithRoleMethod, getParentWithRoleMethod,
accessibleContext, roleName); accessibleContext, roleName);
EXCEPTION_CHECK("Getting ParentWithRole - call to CallObjectMethod()", (AccessibleContext)0); EXCEPTION_CHECK("Getting ParentWithRole - call to CallObjectMethod()", (AccessibleContext)0);
PrintDebugString(" rAccessibleContext = %p", rAccessibleContext); PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ParentWithRole - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting ParentWithRole - call to NewGlobalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef); rAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or getParentWithRoleMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getParentWithRoleMethod == 0");
return 0; return 0;
} }
} }
...@@ -1058,7 +1055,7 @@ AccessBridgeJavaEntryPoints::getTopLevelObject(const jobject accessibleContext) ...@@ -1058,7 +1055,7 @@ AccessBridgeJavaEntryPoints::getTopLevelObject(const jobject accessibleContext)
jthrowable exception; jthrowable exception;
jobject rAccessibleContext; jobject rAccessibleContext;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getTopLevelObject(%p):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getTopLevelObject(%p):",
accessibleContext); accessibleContext);
if (getTopLevelObjectMethod != (jmethodID) 0) { if (getTopLevelObjectMethod != (jmethodID) 0) {
...@@ -1066,14 +1063,14 @@ AccessBridgeJavaEntryPoints::getTopLevelObject(const jobject accessibleContext) ...@@ -1066,14 +1063,14 @@ AccessBridgeJavaEntryPoints::getTopLevelObject(const jobject accessibleContext)
getTopLevelObjectMethod, getTopLevelObjectMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting TopLevelObject - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting TopLevelObject - call to CallObjectMethod()", FALSE);
PrintDebugString("\r\n rAccessibleContext = %p", rAccessibleContext); PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting TopLevelObject - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting TopLevelObject - call to NewGlobalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef); rAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or getTopLevelObjectMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getTopLevelObjectMethod == 0");
return 0; return 0;
} }
} }
...@@ -1089,7 +1086,7 @@ AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleC ...@@ -1089,7 +1086,7 @@ AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleC
jthrowable exception; jthrowable exception;
jobject rAccessibleContext; jobject rAccessibleContext;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(%p):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(%p):",
accessibleContext); accessibleContext);
if (getParentWithRoleElseRootMethod != (jmethodID) 0) { if (getParentWithRoleElseRootMethod != (jmethodID) 0) {
...@@ -1097,7 +1094,7 @@ AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleC ...@@ -1097,7 +1094,7 @@ AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleC
// create a Java String for the role // create a Java String for the role
jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role)); jstring roleName = jniEnv->NewString(role, (jsize)wcslen(role));
if (roleName == 0) { if (roleName == 0) {
PrintDebugString("\r NewString failed"); PrintDebugString("[ERROR]: NewString failed");
return FALSE; return FALSE;
} }
...@@ -1105,14 +1102,14 @@ AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleC ...@@ -1105,14 +1102,14 @@ AccessBridgeJavaEntryPoints::getParentWithRoleElseRoot(const jobject accessibleC
getParentWithRoleElseRootMethod, getParentWithRoleElseRootMethod,
accessibleContext, roleName); accessibleContext, roleName);
EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to CallObjectMethod()", (AccessibleContext)0); EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to CallObjectMethod()", (AccessibleContext)0);
PrintDebugString(" rAccessibleContext = %p", rAccessibleContext); PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting ParentWithRoleElseRoot - call to NewGlobalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef); rAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or getParentWithRoleElseRootMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getParentWithRoleElseRootMethod == 0");
return 0; return 0;
} }
} }
...@@ -1127,7 +1124,7 @@ AccessBridgeJavaEntryPoints::getObjectDepth(const jobject accessibleContext) { ...@@ -1127,7 +1124,7 @@ AccessBridgeJavaEntryPoints::getObjectDepth(const jobject accessibleContext) {
jthrowable exception; jthrowable exception;
jint rResult; jint rResult;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getObjectDepth(%p):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getObjectDepth(%p):",
accessibleContext); accessibleContext);
if (getObjectDepthMethod != (jmethodID) 0) { if (getObjectDepthMethod != (jmethodID) 0) {
...@@ -1135,10 +1132,10 @@ AccessBridgeJavaEntryPoints::getObjectDepth(const jobject accessibleContext) { ...@@ -1135,10 +1132,10 @@ AccessBridgeJavaEntryPoints::getObjectDepth(const jobject accessibleContext) {
getObjectDepthMethod, getObjectDepthMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting ObjectDepth - call to CallIntMethod()", -1); EXCEPTION_CHECK("Getting ObjectDepth - call to CallIntMethod()", -1);
PrintDebugString("\r\n rResult = %d", rResult); PrintDebugString("[INFO]: rResult = %d", rResult);
return rResult; return rResult;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or getObjectDepthMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getObjectDepthMethod == 0");
return -1; return -1;
} }
} }
...@@ -1154,7 +1151,7 @@ AccessBridgeJavaEntryPoints::getActiveDescendent(const jobject accessibleContext ...@@ -1154,7 +1151,7 @@ AccessBridgeJavaEntryPoints::getActiveDescendent(const jobject accessibleContext
jthrowable exception; jthrowable exception;
jobject rAccessibleContext; jobject rAccessibleContext;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getActiveDescendent(%p):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getActiveDescendent(%p):",
accessibleContext); accessibleContext);
if (getActiveDescendentMethod != (jmethodID) 0) { if (getActiveDescendentMethod != (jmethodID) 0) {
...@@ -1162,14 +1159,14 @@ AccessBridgeJavaEntryPoints::getActiveDescendent(const jobject accessibleContext ...@@ -1162,14 +1159,14 @@ AccessBridgeJavaEntryPoints::getActiveDescendent(const jobject accessibleContext
getActiveDescendentMethod, getActiveDescendentMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting ActiveDescendent - call to CallObjectMethod()", (AccessibleContext)0); EXCEPTION_CHECK("Getting ActiveDescendent - call to CallObjectMethod()", (AccessibleContext)0);
PrintDebugString("\r\n rAccessibleContext = %p", rAccessibleContext); PrintDebugString("[INFO]: rAccessibleContext = %p", rAccessibleContext);
jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext); jobject globalRef = jniEnv->NewGlobalRef(rAccessibleContext);
EXCEPTION_CHECK("Getting ActiveDescendant - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting ActiveDescendant - call to NewGlobalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
rAccessibleContext, globalRef); rAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or getActiveDescendentMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getActiveDescendentMethod == 0");
return (AccessibleContext)0; return (AccessibleContext)0;
} }
} }
...@@ -1210,7 +1207,7 @@ AccessBridgeJavaEntryPoints::getVirtualAccessibleName ( ...@@ -1210,7 +1207,7 @@ AccessBridgeJavaEntryPoints::getVirtualAccessibleName (
const wchar_t * stringBytes = NULL; const wchar_t * stringBytes = NULL;
jthrowable exception = NULL; jthrowable exception = NULL;
jsize length = 0; jsize length = 0;
PrintDebugString("\r\n getVirtualAccessibleName called."); PrintDebugString("[INFO]: getVirtualAccessibleName called.");
if (getVirtualAccessibleNameFromContextMethod != (jmethodID) 0) if (getVirtualAccessibleNameFromContextMethod != (jmethodID) 0)
{ {
js = (jstring) jniEnv->CallObjectMethod ( js = (jstring) jniEnv->CallObjectMethod (
...@@ -1231,18 +1228,18 @@ AccessBridgeJavaEntryPoints::getVirtualAccessibleName ( ...@@ -1231,18 +1228,18 @@ AccessBridgeJavaEntryPoints::getVirtualAccessibleName (
accessBridgeObject, accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Name = %ls", name); wPrintDebugString(L"[INFO]: Accessible Name = %ls", name);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
} }
else else
{ {
PrintDebugString(" Accessible Name is null."); PrintDebugString("[INFO]: Accessible Name is null.");
} }
} }
else else
{ {
PrintDebugString("\r\n Error! either jniEnv == 0 or getVirtualAccessibleNameFromContextMethod == 0"); PrintDebugString("[INFO]: either jniEnv == 0 or getVirtualAccessibleNameFromContextMethod == 0");
return FALSE; return FALSE;
} }
if ( 0 != name [0] ) if ( 0 != name [0] )
...@@ -1264,7 +1261,7 @@ AccessBridgeJavaEntryPoints::requestFocus(const jobject accessibleContext) { ...@@ -1264,7 +1261,7 @@ AccessBridgeJavaEntryPoints::requestFocus(const jobject accessibleContext) {
jthrowable exception; jthrowable exception;
BOOL result = FALSE; BOOL result = FALSE;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::requestFocus(%p):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::requestFocus(%p):",
accessibleContext); accessibleContext);
if (requestFocusMethod != (jmethodID) 0) { if (requestFocusMethod != (jmethodID) 0) {
...@@ -1272,10 +1269,10 @@ AccessBridgeJavaEntryPoints::requestFocus(const jobject accessibleContext) { ...@@ -1272,10 +1269,10 @@ AccessBridgeJavaEntryPoints::requestFocus(const jobject accessibleContext) {
requestFocusMethod, requestFocusMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("requestFocus - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("requestFocus - call to CallBooleanMethod()", FALSE);
PrintDebugString("\r\n result = %d", result); PrintDebugString("[INFO]: result = %d", result);
return result; return result;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or requestFocusMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or requestFocusMethod == 0");
return result; return result;
} }
} }
...@@ -1292,7 +1289,7 @@ AccessBridgeJavaEntryPoints::selectTextRange(const jobject accessibleContext, in ...@@ -1292,7 +1289,7 @@ AccessBridgeJavaEntryPoints::selectTextRange(const jobject accessibleContext, in
jthrowable exception; jthrowable exception;
BOOL result = FALSE; BOOL result = FALSE;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::selectTextRange(%p start = %d end = %d):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::selectTextRange(%p start = %d end = %d):",
accessibleContext, startIndex, endIndex); accessibleContext, startIndex, endIndex);
if (selectTextRangeMethod != (jmethodID) 0) { if (selectTextRangeMethod != (jmethodID) 0) {
...@@ -1301,10 +1298,10 @@ AccessBridgeJavaEntryPoints::selectTextRange(const jobject accessibleContext, in ...@@ -1301,10 +1298,10 @@ AccessBridgeJavaEntryPoints::selectTextRange(const jobject accessibleContext, in
accessibleContext, accessibleContext,
startIndex, endIndex); startIndex, endIndex);
EXCEPTION_CHECK("selectTextRange - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("selectTextRange - call to CallBooleanMethod()", FALSE);
PrintDebugString("\r\n result = %d", result); PrintDebugString("[INFO]: result = %d", result);
return result; return result;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or selectTextRangeMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or selectTextRangeMethod == 0");
return result; return result;
} }
} }
...@@ -1361,7 +1358,7 @@ AccessBridgeJavaEntryPoints::getTextAttributesInRange(const jobject accessibleCo ...@@ -1361,7 +1358,7 @@ AccessBridgeJavaEntryPoints::getTextAttributesInRange(const jobject accessibleCo
jsize length; jsize length;
BOOL result = FALSE; BOOL result = FALSE;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::getTextAttributesInRange(%p start = %d end = %d):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::getTextAttributesInRange(%p start = %d end = %d):",
accessibleContext, startIndex, endIndex); accessibleContext, startIndex, endIndex);
*len = 0; *len = 0;
...@@ -1376,12 +1373,12 @@ AccessBridgeJavaEntryPoints::getTextAttributesInRange(const jobject accessibleCo ...@@ -1376,12 +1373,12 @@ AccessBridgeJavaEntryPoints::getTextAttributesInRange(const jobject accessibleCo
AccessibleTextAttributesInfo test_attributes = *attributes; AccessibleTextAttributesInfo test_attributes = *attributes;
// Get the full test_attributes string at i // Get the full test_attributes string at i
if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) { if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) {
PrintDebugString(" Getting full test_attributes string from Context..."); PrintDebugString("[INFO]: Getting full test_attributes string from Context...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributesAtIndexFromContextMethod, getAccessibleAttributesAtIndexFromContextMethod,
accessibleContext, i); accessibleContext, i);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE);
...@@ -1395,16 +1392,16 @@ AccessBridgeJavaEntryPoints::getTextAttributesInRange(const jobject accessibleCo ...@@ -1395,16 +1392,16 @@ AccessBridgeJavaEntryPoints::getTextAttributesInRange(const jobject accessibleCo
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Text attributes = %ls", test_attributes.fullAttributesString); wPrintDebugString(L"[INFO]: Accessible Text attributes = %ls", test_attributes.fullAttributesString);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Text attributes is null."); PrintDebugString("[WARN]: Accessible Text attributes is null.");
test_attributes.fullAttributesString[0] = (wchar_t) 0; test_attributes.fullAttributesString[0] = (wchar_t) 0;
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1427,14 +1424,14 @@ int ...@@ -1427,14 +1424,14 @@ int
AccessBridgeJavaEntryPoints::getVisibleChildrenCount(const jobject accessibleContext) { AccessBridgeJavaEntryPoints::getVisibleChildrenCount(const jobject accessibleContext) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getVisibleChildrenCount(%p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildrenCount(%p)",
accessibleContext); accessibleContext);
// get the visible children count // get the visible children count
int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod, int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### visible children count = %d", numChildren); PrintDebugString("[INFO]: ##### visible children count = %d", numChildren);
return numChildren; return numChildren;
} }
...@@ -1454,14 +1451,14 @@ BOOL AccessBridgeJavaEntryPoints::getVisibleChildren(const jobject accessibleCon ...@@ -1454,14 +1451,14 @@ BOOL AccessBridgeJavaEntryPoints::getVisibleChildren(const jobject accessibleCon
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getVisibleChildren(%p, startIndex = %d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildren(%p, startIndex = %d)",
accessibleContext, nStartIndex); accessibleContext, nStartIndex);
// get the visible children count // get the visible children count
int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod, int numChildren = jniEnv->CallIntMethod(accessBridgeObject, getVisibleChildrenCountMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting visible children count - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### visible children count = %d", numChildren); PrintDebugString("[INFO]: ##### visible children count = %d", numChildren);
if (nStartIndex >= numChildren) { if (nStartIndex >= numChildren) {
return FALSE; return FALSE;
...@@ -1470,7 +1467,7 @@ BOOL AccessBridgeJavaEntryPoints::getVisibleChildren(const jobject accessibleCon ...@@ -1470,7 +1467,7 @@ BOOL AccessBridgeJavaEntryPoints::getVisibleChildren(const jobject accessibleCon
// get the visible children // get the visible children
int bufIndex = 0; int bufIndex = 0;
for (int i = nStartIndex; (i < numChildren) && (i < nStartIndex + MAX_VISIBLE_CHILDREN); i++) { for (int i = nStartIndex; (i < numChildren) && (i < nStartIndex + MAX_VISIBLE_CHILDREN); i++) {
PrintDebugString(" getting visible child %d ...", i); PrintDebugString("[INFO]: getting visible child %d ...", i);
// get the visible child at index i // get the visible child at index i
jobject ac = jniEnv->CallObjectMethod(accessBridgeObject, getVisibleChildMethod, jobject ac = jniEnv->CallObjectMethod(accessBridgeObject, getVisibleChildMethod,
...@@ -1479,13 +1476,13 @@ BOOL AccessBridgeJavaEntryPoints::getVisibleChildren(const jobject accessibleCon ...@@ -1479,13 +1476,13 @@ BOOL AccessBridgeJavaEntryPoints::getVisibleChildren(const jobject accessibleCon
jobject globalRef = jniEnv->NewGlobalRef(ac); jobject globalRef = jniEnv->NewGlobalRef(ac);
EXCEPTION_CHECK("##### getVisibleChildMethod - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### getVisibleChildMethod - call to NewGlobalRef()", FALSE);
visibleChildrenInfo->children[bufIndex] = (JOBJECT64)globalRef; visibleChildrenInfo->children[bufIndex] = (JOBJECT64)globalRef;
PrintDebugString(" ##### visible child = %p", globalRef); PrintDebugString("[INFO]: ##### visible child = %p", globalRef);
bufIndex++; bufIndex++;
} }
visibleChildrenInfo->returnedChildrenCount = bufIndex; visibleChildrenInfo->returnedChildrenCount = bufIndex;
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getVisibleChildren succeeded"); PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getVisibleChildren succeeded");
return TRUE; return TRUE;
} }
...@@ -1500,7 +1497,7 @@ AccessBridgeJavaEntryPoints::setCaretPosition(const jobject accessibleContext, i ...@@ -1500,7 +1497,7 @@ AccessBridgeJavaEntryPoints::setCaretPosition(const jobject accessibleContext, i
jthrowable exception; jthrowable exception;
BOOL result = FALSE; BOOL result = FALSE;
PrintDebugString("\r\nIn AccessBridgeJavaEntryPoints::setCaretPostion(%p position = %d):", PrintDebugString("[INFO]: In AccessBridgeJavaEntryPoints::setCaretPostion(%p position = %d):",
accessibleContext, position); accessibleContext, position);
if (setCaretPositionMethod != (jmethodID) 0) { if (setCaretPositionMethod != (jmethodID) 0) {
...@@ -1508,10 +1505,10 @@ AccessBridgeJavaEntryPoints::setCaretPosition(const jobject accessibleContext, i ...@@ -1508,10 +1505,10 @@ AccessBridgeJavaEntryPoints::setCaretPosition(const jobject accessibleContext, i
setCaretPositionMethod, setCaretPositionMethod,
accessibleContext, position); accessibleContext, position);
EXCEPTION_CHECK("setCaretPostion - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("setCaretPostion - call to CallBooleanMethod()", FALSE);
PrintDebugString("\r\n result = %d", result); PrintDebugString("[ERROR]: result = %d", result);
return result; return result;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or setCaretPositionMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or setCaretPositionMethod == 0");
return result; return result;
} }
} }
...@@ -1531,19 +1528,19 @@ AccessBridgeJavaEntryPoints::getVersionInfo(AccessBridgeVersionInfo *info) { ...@@ -1531,19 +1528,19 @@ AccessBridgeJavaEntryPoints::getVersionInfo(AccessBridgeVersionInfo *info) {
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getVersionInfo():"); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getVersionInfo():");
if (getJavaVersionPropertyMethod != (jmethodID) 0) { if (getJavaVersionPropertyMethod != (jmethodID) 0) {
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getJavaVersionPropertyMethod); getJavaVersionPropertyMethod);
EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
length = jniEnv->GetStringLength(js); length = jniEnv->GetStringLength(js);
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
if (stringBytes == NULL) { if (stringBytes == NULL) {
if (!jniEnv->ExceptionCheck()) { if (!jniEnv->ExceptionCheck()) {
PrintDebugString("\r\n *** Exception when getting JavaVersionProperty - call to GetStringChars"); PrintDebugString("[ERROR]: *** Exception when getting JavaVersionProperty - call to GetStringChars");
jniEnv->ExceptionDescribe(); jniEnv->ExceptionDescribe();
jniEnv->ExceptionClear(); jniEnv->ExceptionClear();
} }
...@@ -1574,16 +1571,16 @@ AccessBridgeJavaEntryPoints::getVersionInfo(AccessBridgeVersionInfo *info) { ...@@ -1574,16 +1571,16 @@ AccessBridgeJavaEntryPoints::getVersionInfo(AccessBridgeVersionInfo *info) {
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting JavaVersionProperty - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Java version = %ls", info->VMversion); wPrintDebugString(L"[INFO]: Java version = %ls", info->VMversion);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting JavaVersionProperty - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting JavaVersionProperty - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Java version is null."); PrintDebugString("[WARN]: Java version is null.");
info->VMversion[0] = (wchar_t) 0; info->VMversion[0] = (wchar_t) 0;
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getJavaVersionPropertyMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getJavaVersionPropertyMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1600,15 +1597,15 @@ BOOL AccessBridgeJavaEntryPoints::verifyAccessibleText(jobject obj) { ...@@ -1600,15 +1597,15 @@ BOOL AccessBridgeJavaEntryPoints::verifyAccessibleText(jobject obj) {
BOOL retval; BOOL retval;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::verifyAccessibleText"); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::verifyAccessibleText");
if (jniEnv->GetJavaVM(&vm) != 0) { if (jniEnv->GetJavaVM(&vm) != 0) {
PrintDebugString(" Error! No Java VM"); PrintDebugString("[ERROR]: No Java VM");
return FALSE; return FALSE;
} }
if (obj == (jobject)0) { if (obj == (jobject)0) {
PrintDebugString(" Error! Null jobject"); PrintDebugString("[ERROR]: Null jobject");
return FALSE; return FALSE;
} }
...@@ -1618,16 +1615,16 @@ BOOL AccessBridgeJavaEntryPoints::verifyAccessibleText(jobject obj) { ...@@ -1618,16 +1615,16 @@ BOOL AccessBridgeJavaEntryPoints::verifyAccessibleText(jobject obj) {
getAccessibleTextFromContextMethod, getAccessibleTextFromContextMethod,
(jobject)obj); (jobject)obj);
EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE);
PrintDebugString(" AccessibleText = %p", returnedJobject); PrintDebugString("[ERROR]: AccessibleText = %p", returnedJobject);
retval = returnedJobject != (jobject) 0; retval = returnedJobject != (jobject) 0;
jniEnv->DeleteLocalRef(returnedJobject); jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextFromContextMethod == 0");
return FALSE; return FALSE;
} }
if (retval == FALSE) { if (retval == FALSE) {
PrintDebugString(" Error! jobject is not an AccessibleText"); PrintDebugString("[ERROR]: jobject is not an AccessibleText");
} }
return retval; return retval;
} }
...@@ -1652,7 +1649,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextAt(jint x, jint y, jobject acce ...@@ -1652,7 +1649,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextAt(jint x, jint y, jobject acce
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleContextAt(%d, %d, %p):", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleContextAt(%d, %d, %p):",
x, y, accessibleContext); x, y, accessibleContext);
if (getAccessibleContextAtMethod != (jmethodID) 0) { if (getAccessibleContextAtMethod != (jmethodID) 0) {
...@@ -1662,11 +1659,11 @@ AccessBridgeJavaEntryPoints::getAccessibleContextAt(jint x, jint y, jobject acce ...@@ -1662,11 +1659,11 @@ AccessBridgeJavaEntryPoints::getAccessibleContextAt(jint x, jint y, jobject acce
EXCEPTION_CHECK("Getting AccessibleContextAt - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleContextAt - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext); globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextAt - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleContextAt - call to NewGlobalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef); returnedAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleContextAtMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleContextAtMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -1687,7 +1684,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus() { ...@@ -1687,7 +1684,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus() {
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus()"); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus()");
if (getAccessibleContextWithFocusMethod != (jmethodID) 0) { if (getAccessibleContextWithFocusMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject, returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
...@@ -1695,11 +1692,11 @@ AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus() { ...@@ -1695,11 +1692,11 @@ AccessBridgeJavaEntryPoints::getAccessibleContextWithFocus() {
EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to CallObjectMethod()", FALSE);
globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext); globalRef = jniEnv->NewGlobalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleContextWithFocus - call to NewGlobalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef); returnedAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString(" Error! either jniEnv == 0 or getAccessibleContextWithFocusMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or getAccessibleContextWithFocusMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -1724,12 +1721,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1724,12 +1721,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleContextInfo(%p):", accessibleContext); PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleContextInfo(%p):", accessibleContext);
ZeroMemory(info, sizeof(AccessibleContextInfo)); ZeroMemory(info, sizeof(AccessibleContextInfo));
if (accessibleContext == (jobject) 0) { if (accessibleContext == (jobject) 0) {
PrintDebugString(" passed in AccessibleContext == null! (oops)"); PrintDebugString("[WARN]: passed in AccessibleContext == null! (oops)");
return (FALSE); return (FALSE);
} }
...@@ -1752,15 +1749,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1752,15 +1749,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Name = %ls", info->name); wPrintDebugString(L"[INFO]: Accessible Name = %ls", info->name);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Name is null."); PrintDebugString("[WARN]: Accessible Name is null.");
info->name[0] = (wchar_t) 0; info->name[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleNameFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleNameFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1784,15 +1781,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1784,15 +1781,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleName - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Description = %ls", info->description); wPrintDebugString(L"[INFO]: Accessible Description = %ls", info->description);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleName - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Description is null."); PrintDebugString("[WARN]: Accessible Description is null.");
info->description[0] = (wchar_t) 0; info->description[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleDescriptionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleDescriptionFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1816,15 +1813,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1816,15 +1813,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleRole - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleRole - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Role = %ls", info->role); wPrintDebugString(L"[INFO]: Accessible Role = %ls", info->role);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRole - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleRole - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Role is null."); PrintDebugString("[WARN]: Accessible Role is null.");
info->role[0] = (wchar_t) 0; info->role[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleRoleStringFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleRoleStringFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1848,15 +1845,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1848,15 +1845,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Role en_US = %ls", info->role_en_US); wPrintDebugString(L"[INFO]: Accessible Role en_US = %ls", info->role_en_US);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleRole_en_US - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Role en_US is null."); PrintDebugString("[WARN]: Accessible Role en_US is null.");
info->role[0] = (wchar_t) 0; info->role[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleRoleStringFromContext_en_USMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleRoleStringFromContext_en_USMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1879,15 +1876,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1879,15 +1876,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleState - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleState - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible States = %ls", info->states); wPrintDebugString(L"[INFO]: Accessible States = %ls", info->states);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleState - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleState - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible States is null."); PrintDebugString("[WARN]: Accessible States is null.");
info->states[0] = (wchar_t) 0; info->states[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleStatesStringFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleStatesStringFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1910,15 +1907,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1910,15 +1907,15 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleState_en_US - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible States en_US = %ls", info->states_en_US); wPrintDebugString(L"[INFO]: Accessible States en_US = %ls", info->states_en_US);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleState_en_US - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleState_en_US - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible States en_US is null."); PrintDebugString("[WARN]: Accessible States en_US is null.");
info->states[0] = (wchar_t) 0; info->states[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleStatesStringFromContext_en_USMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleStatesStringFromContext_en_USMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1929,14 +1926,14 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1929,14 +1926,14 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleIndexInParentFromContextMethod, getAccessibleIndexInParentFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleIndexInParent - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleIndexInParent - call to CallIntMethod()", FALSE);
PrintDebugString(" Index in Parent = %d", info->indexInParent); PrintDebugString("[INFO]: Index in Parent = %d", info->indexInParent);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleIndexInParentFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleIndexInParentFromContextMethod == 0");
return FALSE; return FALSE;
} }
PrintDebugString("*** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %p ***", PrintDebugString("[INFO]: *** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %p ***",
jniEnv, accessBridgeObject, accessibleContext); jniEnv, accessBridgeObject, accessibleContext);
// Get the children count // Get the children count
...@@ -1945,13 +1942,13 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1945,13 +1942,13 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleChildrenCountFromContextMethod, getAccessibleChildrenCountFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleChildrenCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleChildrenCount - call to CallIntMethod()", FALSE);
PrintDebugString(" Children count = %d", info->childrenCount); PrintDebugString("[INFO]: Children count = %d", info->childrenCount);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleChildrenCountFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleChildrenCountFromContextMethod == 0");
return FALSE; return FALSE;
} }
PrintDebugString("*** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %X ***", PrintDebugString("[INFO]: *** jniEnv: %p; accessBridgeObject: %p; AccessibleContext: %X ***",
jniEnv, accessBridgeObject, accessibleContext); jniEnv, accessBridgeObject, accessibleContext);
...@@ -1961,13 +1958,13 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1961,13 +1958,13 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleXcoordFromContextMethod, getAccessibleXcoordFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleXcoord - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleXcoord - call to CallIntMethod()", FALSE);
PrintDebugString(" X coord = %d", info->x); PrintDebugString("[INFO]: X coord = %d", info->x);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleXcoordFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleXcoordFromContextMethod == 0");
return FALSE; return FALSE;
} }
PrintDebugString("*** jniEnv: %X; accessBridgeObject: %X; AccessibleContext: %p ***", PrintDebugString("[INFO]: *** jniEnv: %X; accessBridgeObject: %X; AccessibleContext: %p ***",
jniEnv, accessBridgeObject, accessibleContext); jniEnv, accessBridgeObject, accessibleContext);
...@@ -1977,9 +1974,9 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1977,9 +1974,9 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleYcoordFromContextMethod, getAccessibleYcoordFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleYcoord - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleYcoord - call to CallIntMethod()", FALSE);
PrintDebugString(" Y coord = %d", info->y); PrintDebugString("[INFO]: Y coord = %d", info->y);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleYcoordFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleYcoordFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -1989,9 +1986,9 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -1989,9 +1986,9 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleWidthFromContextMethod, getAccessibleWidthFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleWidth - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleWidth - call to CallIntMethod()", FALSE);
PrintDebugString(" Width = %d", info->width); PrintDebugString("[INFO]: Width = %d", info->width);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleWidthFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleWidthFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2001,9 +1998,9 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2001,9 +1998,9 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleHeightFromContextMethod, getAccessibleHeightFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleHeight - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleHeight - call to CallIntMethod()", FALSE);
PrintDebugString(" Height = %d", info->height); PrintDebugString("[INFO]: Height = %d", info->height);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleHeightFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleHeightFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2013,12 +2010,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2013,12 +2010,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleComponentFromContextMethod, getAccessibleComponentFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleComponent - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleComponent - call to CallObjectMethod()", FALSE);
PrintDebugString(" AccessibleComponent = %p", returnedJobject); PrintDebugString("[INFO]: AccessibleComponent = %p", returnedJobject);
info->accessibleComponent = (returnedJobject != (jobject) 0 ? TRUE : FALSE); info->accessibleComponent = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject); jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleComponent - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleComponent - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleComponentFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleComponentFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2028,12 +2025,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2028,12 +2025,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleActionFromContextMethod, getAccessibleActionFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleAction - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleAction - call to CallObjectMethod()", FALSE);
PrintDebugString(" AccessibleAction = %p", returnedJobject); PrintDebugString("[INFO]: AccessibleAction = %p", returnedJobject);
info->accessibleAction = (returnedJobject != (jobject) 0 ? TRUE : FALSE); info->accessibleAction = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject); jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleAction - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleAction - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleActionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleActionFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2043,24 +2040,24 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2043,24 +2040,24 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleSelectionFromContextMethod, getAccessibleSelectionFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelection - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleSelection - call to CallObjectMethod()", FALSE);
PrintDebugString(" AccessibleSelection = %p", returnedJobject); PrintDebugString("[INFO]: AccessibleSelection = %p", returnedJobject);
info->accessibleSelection = (returnedJobject != (jobject) 0 ? TRUE : FALSE); info->accessibleSelection = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject); jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleSelection - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleSelection - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleSelectionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionFromContextMethod == 0");
return FALSE; return FALSE;
} }
// Get the AccessibleTable // Get the AccessibleTable
if (getAccessibleTableFromContextMethod != (jmethodID) 0) { if (getAccessibleTableFromContextMethod != (jmethodID) 0) {
PrintDebugString("##### Calling getAccessibleTableFromContextMethod ..."); PrintDebugString("[INFO]: ##### Calling getAccessibleTableFromContextMethod ...");
returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject, returnedJobject = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableFromContextMethod, getAccessibleTableFromContextMethod,
accessibleContext); accessibleContext);
PrintDebugString("##### ... Returned from getAccessibleTableFromContextMethod"); PrintDebugString("[INFO]: ##### ... Returned from getAccessibleTableFromContextMethod");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
PrintDebugString(" ##### AccessibleTable = %p", returnedJobject); PrintDebugString("[INFO]: ##### AccessibleTable = %p", returnedJobject);
if (returnedJobject != (jobject) 0) { if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleTableInterface; info->accessibleInterfaces |= cAccessibleTableInterface;
} }
...@@ -2078,7 +2075,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2078,7 +2075,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
*/ */
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2088,12 +2085,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2088,12 +2085,12 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleTextFromContextMethod, getAccessibleTextFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleText - call to CallObjectMethod()", FALSE);
PrintDebugString(" AccessibleText = %p", returnedJobject); PrintDebugString("[INFO]: AccessibleText = %p", returnedJobject);
info->accessibleText = (returnedJobject != (jobject) 0 ? TRUE : FALSE); info->accessibleText = (returnedJobject != (jobject) 0 ? TRUE : FALSE);
jniEnv->DeleteLocalRef(returnedJobject); jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleText - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2103,14 +2100,14 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2103,14 +2100,14 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleValueFromContextMethod, getAccessibleValueFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleValue - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleValue - call to CallObjectMethod()", FALSE);
PrintDebugString(" AccessibleValue = %p", returnedJobject); PrintDebugString("[INFO]: AccessibleValue = %p", returnedJobject);
if (returnedJobject != (jobject) 0) { if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleValueInterface; info->accessibleInterfaces |= cAccessibleValueInterface;
} }
jniEnv->DeleteLocalRef(returnedJobject); jniEnv->DeleteLocalRef(returnedJobject);
EXCEPTION_CHECK("Getting AccessibleValue - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleValue - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleValueFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleValueFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2126,7 +2123,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext, ...@@ -2126,7 +2123,7 @@ AccessBridgeJavaEntryPoints::getAccessibleContextInfo(jobject accessibleContext,
getAccessibleHypertextMethod, getAccessibleHypertextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleHypertext - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleHypertext - call to CallObjectMethod()", FALSE);
PrintDebugString(" AccessibleHypertext = %p", PrintDebugString("[INFO]: AccessibleHypertext = %p",
returnedJobject); returnedJobject);
if (returnedJobject != (jobject) 0) { if (returnedJobject != (jobject) 0) {
info->accessibleInterfaces |= cAccessibleHypertextInterface; info->accessibleInterfaces |= cAccessibleHypertextInterface;
...@@ -2167,7 +2164,7 @@ AccessBridgeJavaEntryPoints::getAccessibleChildFromContext(jobject accessibleCon ...@@ -2167,7 +2164,7 @@ AccessBridgeJavaEntryPoints::getAccessibleChildFromContext(jobject accessibleCon
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleChildContext(%p, %d):", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleChildContext(%p, %d):",
accessibleContext, childIndex); accessibleContext, childIndex);
if (getAccessibleChildFromContextMethod != (jmethodID) 0) { if (getAccessibleChildFromContextMethod != (jmethodID) 0) {
...@@ -2179,11 +2176,11 @@ AccessBridgeJavaEntryPoints::getAccessibleChildFromContext(jobject accessibleCon ...@@ -2179,11 +2176,11 @@ AccessBridgeJavaEntryPoints::getAccessibleChildFromContext(jobject accessibleCon
EXCEPTION_CHECK("Getting AccessibleChild - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleChild - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext); jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleChild - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleChild - call to DeleteLocalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef); returnedAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleChildContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleChildContextMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -2199,7 +2196,7 @@ AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(jobject accessibleCo ...@@ -2199,7 +2196,7 @@ AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(jobject accessibleCo
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(%p):", accessibleContext);
if (getAccessibleParentFromContextMethod != (jmethodID) 0) { if (getAccessibleParentFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject, returnedAccessibleContext = jniEnv->CallObjectMethod(accessBridgeObject,
...@@ -2210,11 +2207,11 @@ AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(jobject accessibleCo ...@@ -2210,11 +2207,11 @@ AccessBridgeJavaEntryPoints::getAccessibleParentFromContext(jobject accessibleCo
EXCEPTION_CHECK("Getting AccessibleParent - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleParent - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext); jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleParent - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleParent - call to DeleteLocalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef); returnedAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleParentFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleParentFromContextMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -2228,7 +2225,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext, ...@@ -2228,7 +2225,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext,
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo(%p):", PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo(%p):",
accessibleContext); accessibleContext);
// get the table row count // get the table row count
...@@ -2237,9 +2234,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext, ...@@ -2237,9 +2234,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext,
getAccessibleTableRowCountMethod, getAccessibleTableRowCountMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleTableRowCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableRowCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table row count = %d", tableInfo->rowCount); PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowCountMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2249,43 +2246,43 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext, ...@@ -2249,43 +2246,43 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext,
getAccessibleTableColumnCountMethod, getAccessibleTableColumnCountMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTableColumnCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table column count = %d", tableInfo->columnCount); PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnCountMethod == 0");
return FALSE; return FALSE;
} }
// get the AccessibleTable // get the AccessibleTable
if (getAccessibleTableFromContextMethod != (jmethodID) 0) { if (getAccessibleTableFromContextMethod != (jmethodID) 0) {
PrintDebugString("##### Calling getAccessibleTableFromContextMethod ..."); PrintDebugString("[INFO]: ##### Calling getAccessibleTableFromContextMethod ...");
jobject accTable = jniEnv->CallObjectMethod(accessBridgeObject, jobject accTable = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleTableFromContextMethod, getAccessibleTableFromContextMethod,
accessibleContext); accessibleContext);
PrintDebugString("##### ... Returned from getAccessibleTableFromContextMethod"); PrintDebugString("[INFO]: ##### ... Returned from getAccessibleTableFromContextMethod");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(accTable); jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef; tableInfo->accessibleTable = (JOBJECT64)globalRef;
PrintDebugString(" ##### accessibleTable = %p", globalRef); PrintDebugString("[INFO]: ##### accessibleTable = %p", globalRef);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableFromContextMethod == 0");
return FALSE; return FALSE;
} }
// cache the AccessibleContext // cache the AccessibleContext
if (getContextFromAccessibleTableMethod != (jmethodID) 0) { if (getContextFromAccessibleTableMethod != (jmethodID) 0) {
PrintDebugString("##### Calling getContextFromAccessibleTable Method ..."); PrintDebugString("[INFO]: ##### Calling getContextFromAccessibleTable Method ...");
jobject ac = jniEnv->CallObjectMethod(accessBridgeObject, jobject ac = jniEnv->CallObjectMethod(accessBridgeObject,
getContextFromAccessibleTableMethod, getContextFromAccessibleTableMethod,
accessibleContext); accessibleContext);
PrintDebugString("##### ... Returned from getContextFromAccessibleTable Method"); PrintDebugString("[INFO]: ##### ... Returned from getContextFromAccessibleTable Method");
EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTable - call to CallObjectMethod()", FALSE);
jobject globalRef = jniEnv->NewGlobalRef(ac); jobject globalRef = jniEnv->NewGlobalRef(ac);
EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTable - call to NewGlobalRef()", FALSE);
tableInfo->accessibleContext = (JOBJECT64)globalRef; tableInfo->accessibleContext = (JOBJECT64)globalRef;
PrintDebugString(" ##### accessibleContext = %p", globalRef); PrintDebugString("[INFO]: ##### accessibleContext = %p", globalRef);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getContextFromAccessibleTable Method == 0"); PrintDebugString("[ERROR]: either env == 0 or getContextFromAccessibleTable Method == 0");
return FALSE; return FALSE;
} }
...@@ -2293,7 +2290,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext, ...@@ -2293,7 +2290,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableInfo(jobject accessibleContext,
tableInfo->caption = NULL; tableInfo->caption = NULL;
tableInfo->summary = NULL; tableInfo->summary = NULL;
PrintDebugString("##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo succeeded"); PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableInfo succeeded");
return TRUE; return TRUE;
} }
...@@ -2303,7 +2300,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, ...@@ -2303,7 +2300,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable,
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(%p): row=%d, column=%d", PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(%p): row=%d, column=%d",
accessibleTable, row, column); accessibleTable, row, column);
// FIX // FIX
...@@ -2318,9 +2315,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, ...@@ -2318,9 +2315,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable,
getAccessibleTableCellIndexMethod, getAccessibleTableCellIndexMethod,
accessibleTable, row, column); accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellIndex - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableCellIndex - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table cell index = %d", tableCellInfo->index); PrintDebugString("[INFO]: ##### table cell index = %d", tableCellInfo->index);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellIndexMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellIndexMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2330,9 +2327,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, ...@@ -2330,9 +2327,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable,
getAccessibleTableCellRowExtentMethod, getAccessibleTableCellRowExtentMethod,
accessibleTable, row, column); accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellRowExtentCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableCellRowExtentCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table cell row extent = %d", tableCellInfo->rowExtent); PrintDebugString("[INFO]: ##### table cell row extent = %d", tableCellInfo->rowExtent);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellRowExtentMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellRowExtentMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2342,9 +2339,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, ...@@ -2342,9 +2339,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable,
getAccessibleTableCellColumnExtentMethod, getAccessibleTableCellColumnExtentMethod,
accessibleTable, row, column); accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting AccessibleTableCellColumnExtentCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableCellColumnExtentCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table cell column extent = %d", tableCellInfo->columnExtent); PrintDebugString("[INFO]: ##### table cell column extent = %d", tableCellInfo->columnExtent);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellColumnExtentMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellColumnExtentMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2354,9 +2351,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, ...@@ -2354,9 +2351,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable,
isAccessibleTableCellSelectedMethod, isAccessibleTableCellSelectedMethod,
accessibleTable, row, column); accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting isAccessibleTableCellSelected - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("##### Getting isAccessibleTableCellSelected - call to CallBooleanMethod()", FALSE);
PrintDebugString(" ##### table cell isSelected = %d", tableCellInfo->isSelected); PrintDebugString("[INFO]: ##### table cell isSelected = %d", tableCellInfo->isSelected);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableCellSelectedMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableCellSelectedMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2369,13 +2366,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable, ...@@ -2369,13 +2366,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo(jobject accessibleTable,
jobject globalRef = jniEnv->NewGlobalRef(tableCellAC); jobject globalRef = jniEnv->NewGlobalRef(tableCellAC);
EXCEPTION_CHECK("##### Getting AccessibleTableCellAccessibleContext - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableCellAccessibleContext - call to NewGlobalRef()", FALSE);
tableCellInfo->accessibleContext = (JOBJECT64)globalRef; tableCellInfo->accessibleContext = (JOBJECT64)globalRef;
PrintDebugString(" ##### table cell AccessibleContext = %p", globalRef); PrintDebugString("[INFO]: ##### table cell AccessibleContext = %p", globalRef);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableCellAccessibleContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableCellAccessibleContextMethod == 0");
return FALSE; return FALSE;
} }
PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo succeeded"); PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableCellInfo succeeded");
return TRUE; return TRUE;
} }
...@@ -2384,7 +2381,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces ...@@ -2384,7 +2381,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(%p):", PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(%p):",
acParent); acParent);
// get the header row count // get the header row count
...@@ -2393,9 +2390,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces ...@@ -2393,9 +2390,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces
getAccessibleTableRowHeaderRowCountMethod, getAccessibleTableRowHeaderRowCountMethod,
acParent); acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeaderRowCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableRowHeaderRowCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table row count = %d", tableInfo->rowCount); PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowHeaderRowCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowHeaderRowCountMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2405,9 +2402,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces ...@@ -2405,9 +2402,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces
getAccessibleTableRowHeaderColumnCountMethod, getAccessibleTableRowHeaderColumnCountMethod,
acParent); acParent);
EXCEPTION_CHECK("Getting AccessibleTableRowHeaderColumnCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTableRowHeaderColumnCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table column count = %d", tableInfo->columnCount); PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowHeaderColumnCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowHeaderColumnCountMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2420,9 +2417,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces ...@@ -2420,9 +2417,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces
jobject globalRef = jniEnv->NewGlobalRef(accTable); jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTableRowHeader - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableRowHeader - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef; tableInfo->accessibleTable = (JOBJECT64)globalRef;
PrintDebugString(" ##### row header AccessibleTable = %p", globalRef); PrintDebugString("[INFO]: ##### row header AccessibleTable = %p", globalRef);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowHeaderMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowHeaderMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2431,7 +2428,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces ...@@ -2431,7 +2428,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader(jobject acParent, Acces
tableInfo->summary = NULL; tableInfo->summary = NULL;
tableInfo->accessibleContext = NULL; tableInfo->accessibleContext = NULL;
PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader succeeded"); PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowHeader succeeded");
return TRUE; return TRUE;
} }
...@@ -2439,7 +2436,7 @@ BOOL ...@@ -2439,7 +2436,7 @@ BOOL
AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, AccessibleTableInfo *tableInfo) { AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, AccessibleTableInfo *tableInfo) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(%p):", PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(%p):",
acParent); acParent);
// get the header row count // get the header row count
...@@ -2448,9 +2445,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac ...@@ -2448,9 +2445,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac
getAccessibleTableColumnHeaderRowCountMethod, getAccessibleTableColumnHeaderRowCountMethod,
acParent); acParent);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeaderRowCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeaderRowCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table row count = %d", tableInfo->rowCount); PrintDebugString("[INFO]: ##### table row count = %d", tableInfo->rowCount);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleColumnHeaderRowCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleColumnHeaderRowCountMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2460,9 +2457,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac ...@@ -2460,9 +2457,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac
getAccessibleTableColumnHeaderColumnCountMethod, getAccessibleTableColumnHeaderColumnCountMethod,
acParent); acParent);
EXCEPTION_CHECK("Getting AccessibleTableColumnHeaderColumnCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTableColumnHeaderColumnCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table column count = %d", tableInfo->columnCount); PrintDebugString("[INFO]: ##### table column count = %d", tableInfo->columnCount);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnHeaderColumnCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnHeaderColumnCountMethod == 0");
return FALSE; return FALSE;
} }
// get the header AccessibleTable // get the header AccessibleTable
...@@ -2474,9 +2471,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac ...@@ -2474,9 +2471,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac
jobject globalRef = jniEnv->NewGlobalRef(accTable); jobject globalRef = jniEnv->NewGlobalRef(accTable);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeader - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableColumnHeader - call to NewGlobalRef()", FALSE);
tableInfo->accessibleTable = (JOBJECT64)globalRef; tableInfo->accessibleTable = (JOBJECT64)globalRef;
PrintDebugString(" ##### column header AccessibleTable = %p", globalRef); PrintDebugString("[INFO]: ##### column header AccessibleTable = %p", globalRef);
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnHeaderMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnHeaderMethod == 0");
return FALSE; return FALSE;
} }
...@@ -2485,7 +2482,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac ...@@ -2485,7 +2482,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader(jobject acParent, Ac
tableInfo->summary = NULL; tableInfo->summary = NULL;
tableInfo->accessibleContext = NULL; tableInfo->accessibleContext = NULL;
PrintDebugString(" ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader succeeded"); PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnHeader succeeded");
return TRUE; return TRUE;
} }
...@@ -2496,7 +2493,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(jobject acParent, ...@@ -2496,7 +2493,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(jobject acParent,
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(%p):", PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(%p):",
acParent); acParent);
if (getAccessibleTableRowDescriptionMethod != (jmethodID) 0) { if (getAccessibleTableRowDescriptionMethod != (jmethodID) 0) {
...@@ -2508,11 +2505,11 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(jobject acParent, ...@@ -2508,11 +2505,11 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowDescription(jobject acParent,
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext); jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleTableRowDescription - call to DeleteLocalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef); returnedAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTableRowDescriptionMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowDescriptionMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -2524,7 +2521,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(jobject acParen ...@@ -2524,7 +2521,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(jobject acParen
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(%p):", PrintDebugString("[INFO]: ##### Calling AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(%p):",
acParent); acParent);
if (getAccessibleTableColumnDescriptionMethod != (jmethodID) 0) { if (getAccessibleTableColumnDescriptionMethod != (jmethodID) 0) {
...@@ -2537,11 +2534,11 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(jobject acParen ...@@ -2537,11 +2534,11 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnDescription(jobject acParen
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to NewGlobalRef()", FALSE);
jniEnv->DeleteLocalRef(returnedAccessibleContext); jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleTableColumnDescription - call to DeleteLocalRef()", FALSE);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef); returnedAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTableColumnDescriptionMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnDescriptionMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -2552,7 +2549,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(jobject accessi ...@@ -2552,7 +2549,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(jobject accessi
jthrowable exception; jthrowable exception;
jint count; jint count;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(%p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(%p)",
accessibleTable); accessibleTable);
// Get the table row selection count // Get the table row selection count
...@@ -2561,14 +2558,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(jobject accessi ...@@ -2561,14 +2558,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount(jobject accessi
getAccessibleTableRowSelectionCountMethod, getAccessibleTableRowSelectionCountMethod,
accessibleTable); accessibleTable);
EXCEPTION_CHECK("##### Getting AccessibleTableRowSelectionCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableRowSelectionCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table row selection count = %d", count); PrintDebugString("[INFO]: ##### table row selection count = %d", count);
return count; return count;
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowSelectionCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowSelectionCountMethod == 0");
return 0; return 0;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount failed"); PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelectionCount failed");
return 0; return 0;
} }
...@@ -2577,7 +2574,7 @@ AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(jobject accessibleTabl ...@@ -2577,7 +2574,7 @@ AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(jobject accessibleTabl
jthrowable exception; jthrowable exception;
BOOL result; BOOL result;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(%p, %d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(%p, %d)",
accessibleTable, row); accessibleTable, row);
if (isAccessibleTableRowSelectedMethod != (jmethodID) 0) { if (isAccessibleTableRowSelectedMethod != (jmethodID) 0) {
...@@ -2585,14 +2582,14 @@ AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(jobject accessibleTabl ...@@ -2585,14 +2582,14 @@ AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected(jobject accessibleTabl
isAccessibleTableRowSelectedMethod, isAccessibleTableRowSelectedMethod,
accessibleTable, row); accessibleTable, row);
EXCEPTION_CHECK("##### Getting isAccessibleTableRowSelected - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("##### Getting isAccessibleTableRowSelected - call to CallBooleanMethod()", FALSE);
PrintDebugString(" ##### table row isSelected = %d", result); PrintDebugString("[INFO]: ##### table row isSelected = %d", result);
return result; return result;
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableRowSelectedMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableRowSelectedMethod == 0");
return FALSE; return FALSE;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected failed"); PrintDebugString("[ERROR]: AccessBridgeJavaEntryPoints::isAccessibleTableRowSelected failed");
return FALSE; return FALSE;
} }
...@@ -2602,7 +2599,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(jobject accessibleT ...@@ -2602,7 +2599,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(jobject accessibleT
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(%p, %d %p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(%p, %d %p)",
accessibleTable, count, selections); accessibleTable, count, selections);
if (getAccessibleTableRowSelectionsMethod == (jmethodID) 0) { if (getAccessibleTableRowSelectionsMethod == (jmethodID) 0) {
...@@ -2616,10 +2613,10 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(jobject accessibleT ...@@ -2616,10 +2613,10 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections(jobject accessibleT
accessibleTable, accessibleTable,
i); i);
EXCEPTION_CHECK("##### Getting AccessibleTableRowSelections - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableRowSelections - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table row selection[%d] = %d", i, selections[i]); PrintDebugString("[INFO]: ##### table row selection[%d] = %d", i, selections[i]);
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections succeeded"); PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRowSelections succeeded");
return TRUE; return TRUE;
} }
...@@ -2630,7 +2627,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(jobject acce ...@@ -2630,7 +2627,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(jobject acce
jthrowable exception; jthrowable exception;
jint count; jint count;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(%p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(%p)",
accessibleTable); accessibleTable);
// Get the table column selection count // Get the table column selection count
...@@ -2639,14 +2636,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(jobject acce ...@@ -2639,14 +2636,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount(jobject acce
getAccessibleTableColumnSelectionCountMethod, getAccessibleTableColumnSelectionCountMethod,
accessibleTable); accessibleTable);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelectionCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelectionCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table column selection count = %d", count); PrintDebugString("[INFO]: ##### table column selection count = %d", count);
return count; return count;
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleRowCountMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleRowCountMethod == 0");
return 0; return 0;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount failed"); PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelectionCount failed");
return 0; return 0;
} }
...@@ -2655,7 +2652,7 @@ AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(jobject accessibleT ...@@ -2655,7 +2652,7 @@ AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(jobject accessibleT
jthrowable exception; jthrowable exception;
BOOL result; BOOL result;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(%p, %d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(%p, %d)",
accessibleTable, column); accessibleTable, column);
if (isAccessibleTableColumnSelectedMethod != (jmethodID) 0) { if (isAccessibleTableColumnSelectedMethod != (jmethodID) 0) {
...@@ -2663,14 +2660,14 @@ AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(jobject accessibleT ...@@ -2663,14 +2660,14 @@ AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected(jobject accessibleT
isAccessibleTableColumnSelectedMethod, isAccessibleTableColumnSelectedMethod,
accessibleTable, column); accessibleTable, column);
EXCEPTION_CHECK("##### Getting isAccessibleTableColumnSelected - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("##### Getting isAccessibleTableColumnSelected - call to CallBooleanMethod()", FALSE);
PrintDebugString(" ##### table column isSelected = %d", result); PrintDebugString("[INFO]: ##### table column isSelected = %d", result);
return result; return result;
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or isAccessibleTableColumnSelectedMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or isAccessibleTableColumnSelectedMethod == 0");
return FALSE; return FALSE;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected failed"); PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::isAccessibleTableColumnSelected failed");
return FALSE; return FALSE;
} }
...@@ -2679,7 +2676,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(jobject accessib ...@@ -2679,7 +2676,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(jobject accessib
jint *selections) { jint *selections) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(%p, %d, %p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(%p, %d, %p)",
accessibleTable, count, selections); accessibleTable, count, selections);
if (getAccessibleTableColumnSelectionsMethod == (jmethodID) 0) { if (getAccessibleTableColumnSelectionsMethod == (jmethodID) 0) {
...@@ -2693,10 +2690,10 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(jobject accessib ...@@ -2693,10 +2690,10 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections(jobject accessib
accessibleTable, accessibleTable,
i); i);
EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelections - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableColumnSelections - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table Column selection[%d] = %d", i, selections[i]); PrintDebugString("[INFO]: ##### table Column selection[%d] = %d", i, selections[i]);
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections succeeded"); PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumnSelections succeeded");
return TRUE; return TRUE;
} }
...@@ -2706,7 +2703,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRow(jobject accessibleTable, jint ...@@ -2706,7 +2703,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRow(jobject accessibleTable, jint
jthrowable exception; jthrowable exception;
jint result; jint result;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableRow(%p, index=%d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow(%p, index=%d)",
accessibleTable, index); accessibleTable, index);
if (getAccessibleTableRowMethod != (jmethodID) 0) { if (getAccessibleTableRowMethod != (jmethodID) 0) {
...@@ -2714,14 +2711,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRow(jobject accessibleTable, jint ...@@ -2714,14 +2711,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableRow(jobject accessibleTable, jint
getAccessibleTableRowMethod, getAccessibleTableRowMethod,
accessibleTable, index); accessibleTable, index);
EXCEPTION_CHECK("##### Getting AccessibleTableRow - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableRow - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table row = %d", result); PrintDebugString("[INFO]: ##### table row = %d", result);
return result; return result;
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableRowMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableRowMethod == 0");
return -1; return -1;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow failed"); PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableRow failed");
return -1; return -1;
} }
...@@ -2730,7 +2727,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumn(jobject accessibleTable, j ...@@ -2730,7 +2727,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumn(jobject accessibleTable, j
jthrowable exception; jthrowable exception;
jint result; jint result;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn(%p, index=%d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn(%p, index=%d)",
accessibleTable, index); accessibleTable, index);
if (getAccessibleTableColumnMethod != (jmethodID) 0) { if (getAccessibleTableColumnMethod != (jmethodID) 0) {
...@@ -2738,14 +2735,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumn(jobject accessibleTable, j ...@@ -2738,14 +2735,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableColumn(jobject accessibleTable, j
getAccessibleTableColumnMethod, getAccessibleTableColumnMethod,
accessibleTable, index); accessibleTable, index);
EXCEPTION_CHECK("##### Getting AccessibleTableColumn - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleTableColumn - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table column = %d", result); PrintDebugString("[INFO]: ##### table column = %d", result);
return result; return result;
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableColumnMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableColumnMethod == 0");
return -1; return -1;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn failed"); PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableColumn failed");
return -1; return -1;
} }
...@@ -2754,7 +2751,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableIndex(jobject accessibleTable, ji ...@@ -2754,7 +2751,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTableIndex(jobject accessibleTable, ji
jthrowable exception; jthrowable exception;
jint result; jint result;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex(%p, row=%d, col=%d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex(%p, row=%d, col=%d)",
accessibleTable, row, column); accessibleTable, row, column);
if (getAccessibleTableIndexMethod != (jmethodID) 0) { if (getAccessibleTableIndexMethod != (jmethodID) 0) {
...@@ -2762,14 +2759,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableIndex(jobject accessibleTable, ji ...@@ -2762,14 +2759,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTableIndex(jobject accessibleTable, ji
getAccessibleTableIndexMethod, getAccessibleTableIndexMethod,
accessibleTable, row, column); accessibleTable, row, column);
EXCEPTION_CHECK("##### Getting getAccessibleTableIndex - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting getAccessibleTableIndex - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### table index = %d", result); PrintDebugString("[INFO]: ##### table index = %d", result);
return result; return result;
} else { } else {
PrintDebugString(" ##### Error! either env == 0 or getAccessibleTableIndexMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTableIndexMethod == 0");
return -1; return -1;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex failed"); PrintDebugString("[ERROR]: ##### AccessBridgeJavaEntryPoints::getAccessibleTableIndex failed");
return -1; return -1;
} }
...@@ -2786,7 +2783,7 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext, ...@@ -2786,7 +2783,7 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext,
const wchar_t *stringBytes; const wchar_t *stringBytes;
jsize length; jsize length;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet(%p, %p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet(%p, %p)",
accessibleContext, relationSet); accessibleContext, relationSet);
if (getAccessibleRelationCountMethod == (jmethodID) 0 || if (getAccessibleRelationCountMethod == (jmethodID) 0 ||
...@@ -2801,7 +2798,7 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext, ...@@ -2801,7 +2798,7 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext,
getAccessibleRelationCountMethod, getAccessibleRelationCountMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("##### Getting AccessibleRelationCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleRelationCount - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### AccessibleRelation count = %d", relationSet->relationCount); PrintDebugString("[INFO]: ##### AccessibleRelation count = %d", relationSet->relationCount);
// Get the relation set // Get the relation set
...@@ -2826,11 +2823,11 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext, ...@@ -2826,11 +2823,11 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext,
// jniEnv->CallVoidMethod(accessBridgeObject, // jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js); // decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleRelation key - call to CallVoidMethod()", FALSE); //EXCEPTION_CHECK("Getting AccessibleRelation key - call to CallVoidMethod()", FALSE);
PrintDebugString("##### AccessibleRelation key = %ls", relationSet->relations[i].key ); PrintDebugString("[INFO]: ##### AccessibleRelation key = %ls", relationSet->relations[i].key );
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleRelation key - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleRelation key - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AccessibleRelation key is null."); PrintDebugString("[WARN]: AccessibleRelation key is null.");
relationSet->relations[i].key [0] = (wchar_t) 0; relationSet->relations[i].key [0] = (wchar_t) 0;
} }
...@@ -2846,11 +2843,11 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext, ...@@ -2846,11 +2843,11 @@ AccessBridgeJavaEntryPoints::getAccessibleRelationSet(jobject accessibleContext,
jobject globalRef = jniEnv->NewGlobalRef(target); jobject globalRef = jniEnv->NewGlobalRef(target);
EXCEPTION_CHECK("Getting AccessibleRelationSet - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleRelationSet - call to NewGlobalRef()", FALSE);
relationSet->relations[i].targets[j] = (JOBJECT64)globalRef; relationSet->relations[i].targets[j] = (JOBJECT64)globalRef;
PrintDebugString(" relation set item: %p", globalRef); PrintDebugString("[INFO]: relation set item: %p", globalRef);
} }
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet succeeded"); PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleRelationSet succeeded");
return TRUE; return TRUE;
} }
...@@ -2868,7 +2865,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext, ...@@ -2868,7 +2865,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext,
const wchar_t *stringBytes; const wchar_t *stringBytes;
jsize length; jsize length;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertext(%p, %p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext(%p, %p)",
accessibleContext, hypertext); accessibleContext, hypertext);
// get the AccessibleHypertext // get the AccessibleHypertext
...@@ -2879,10 +2876,10 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext, ...@@ -2879,10 +2876,10 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext,
jobject globalRef = jniEnv->NewGlobalRef(ht); jobject globalRef = jniEnv->NewGlobalRef(ht);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE);
hypertext->accessibleHypertext = (JOBJECT64)globalRef; hypertext->accessibleHypertext = (JOBJECT64)globalRef;
PrintDebugString(" ##### AccessibleHypertext = %p", globalRef); PrintDebugString("[INFO]: ##### AccessibleHypertext = %p", globalRef);
if (hypertext->accessibleHypertext == 0) { if (hypertext->accessibleHypertext == 0) {
PrintDebugString(" ##### null AccessibleHypertext; returning FALSE"); PrintDebugString("[WARN]: ##### null AccessibleHypertext; returning FALSE");
return false; return false;
} }
...@@ -2891,7 +2888,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext, ...@@ -2891,7 +2888,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext,
getAccessibleHyperlinkCountMethod,accessibleContext); getAccessibleHyperlinkCountMethod,accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink count = %d", hypertext->linkCount); PrintDebugString("[INFO]: ##### hyperlink count = %d", hypertext->linkCount);
// get the hypertext links // get the hypertext links
...@@ -2906,7 +2903,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext, ...@@ -2906,7 +2903,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext,
jobject globalRef = jniEnv->NewGlobalRef(hl); jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
hypertext->links[i].accessibleHyperlink = (JOBJECT64)globalRef; hypertext->links[i].accessibleHyperlink = (JOBJECT64)globalRef;
PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef); PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text // get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject, jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
...@@ -2930,11 +2927,11 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext, ...@@ -2930,11 +2927,11 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext,
// jniEnv->CallVoidMethod(accessBridgeObject, // jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js); // decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE); //EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
PrintDebugString("##### AccessibleHyperlink text = %ls", hypertext->links[i].text ); PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", hypertext->links[i].text );
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AccessibleHyperlink text is null."); PrintDebugString("[WARN]: AccessibleHyperlink text is null.");
hypertext->links[i].text[0] = (wchar_t) 0; hypertext->links[i].text[0] = (wchar_t) 0;
} }
...@@ -2943,7 +2940,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext, ...@@ -2943,7 +2940,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext,
hypertext->links[i].accessibleHyperlink, hypertext->links[i].accessibleHyperlink,
i); i);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink start index = %d", hypertext->links[i].startIndex); PrintDebugString("[INFO]: ##### hyperlink start index = %d", hypertext->links[i].startIndex);
hypertext->links[i].endIndex = jniEnv->CallIntMethod(accessBridgeObject, hypertext->links[i].endIndex = jniEnv->CallIntMethod(accessBridgeObject,
...@@ -2951,11 +2948,11 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext, ...@@ -2951,11 +2948,11 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertext(jobject accessibleContext,
hypertext->links[i].accessibleHyperlink, hypertext->links[i].accessibleHyperlink,
i); i);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink end index = %d", hypertext->links[i].endIndex); PrintDebugString("[INFO]: ##### hyperlink end index = %d", hypertext->links[i].endIndex);
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext succeeded"); PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertext succeeded");
return TRUE; return TRUE;
} }
...@@ -2969,7 +2966,7 @@ AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(jobject accessibleConte ...@@ -2969,7 +2966,7 @@ AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(jobject accessibleConte
jthrowable exception; jthrowable exception;
BOOL returnVal; BOOL returnVal;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(%p, %p):", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(%p, %p):",
accessibleContext, accessibleHyperlink); accessibleContext, accessibleHyperlink);
if (activateAccessibleHyperlinkMethod != (jmethodID) 0) { if (activateAccessibleHyperlinkMethod != (jmethodID) 0) {
...@@ -2978,7 +2975,7 @@ AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(jobject accessibleConte ...@@ -2978,7 +2975,7 @@ AccessBridgeJavaEntryPoints::activateAccessibleHyperlink(jobject accessibleConte
EXCEPTION_CHECK("activateAccessibleHyperlink - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("activateAccessibleHyperlink - call to CallBooleanMethod()", FALSE);
return returnVal; return returnVal;
} else { } else {
PrintDebugString("\r\n Error! either jniEnv == 0 or activateAccessibleHyperlinkMethod == 0"); PrintDebugString("[ERROR]: either jniEnv == 0 or activateAccessibleHyperlinkMethod == 0");
return FALSE; return FALSE;
} }
} }
...@@ -2999,7 +2996,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC ...@@ -2999,7 +2996,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC
jthrowable exception; jthrowable exception;
const wchar_t *stringBytes; const wchar_t *stringBytes;
jsize length; jsize length;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(%p, %p, startIndex = %d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(%p, %p, startIndex = %d)",
accessibleContext, hypertext, nStartIndex); accessibleContext, hypertext, nStartIndex);
// get the AccessibleHypertext // get the AccessibleHypertext
...@@ -3009,9 +3006,9 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC ...@@ -3009,9 +3006,9 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC
jobject globalRef = jniEnv->NewGlobalRef(ht); jobject globalRef = jniEnv->NewGlobalRef(ht);
EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleHypertext - call to NewGlobalRef()", FALSE);
hypertext->accessibleHypertext = (JOBJECT64)globalRef; hypertext->accessibleHypertext = (JOBJECT64)globalRef;
PrintDebugString(" ##### AccessibleHypertext = %p", globalRef); PrintDebugString("[INFO]: ##### AccessibleHypertext = %p", globalRef);
if (hypertext->accessibleHypertext == 0) { if (hypertext->accessibleHypertext == 0) {
PrintDebugString(" ##### null AccessibleHypertext; returning FALSE"); PrintDebugString("[WARN]: ##### null AccessibleHypertext; returning FALSE");
return FALSE; return FALSE;
} }
...@@ -3019,7 +3016,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC ...@@ -3019,7 +3016,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC
hypertext->linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod, hypertext->linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink count = %d", hypertext->linkCount); PrintDebugString("[INFO]: ##### hyperlink count = %d", hypertext->linkCount);
if (nStartIndex >= hypertext->linkCount) { if (nStartIndex >= hypertext->linkCount) {
return FALSE; return FALSE;
...@@ -3031,7 +3028,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC ...@@ -3031,7 +3028,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC
// i < hypertext->linkCount // i < hypertext->linkCount
int bufIndex = 0; int bufIndex = 0;
for (int i = nStartIndex; (i < hypertext->linkCount) && (i < nStartIndex + MAX_HYPERLINKS); i++) { for (int i = nStartIndex; (i < hypertext->linkCount) && (i < nStartIndex + MAX_HYPERLINKS); i++) {
PrintDebugString(" getting hyperlink %d ...", i); PrintDebugString("[INFO]: getting hyperlink %d ...", i);
// get the hyperlink // get the hyperlink
jobject hl = jniEnv->CallObjectMethod(accessBridgeObject, jobject hl = jniEnv->CallObjectMethod(accessBridgeObject,
...@@ -3042,7 +3039,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC ...@@ -3042,7 +3039,7 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC
jobject globalRef = jniEnv->NewGlobalRef(hl); jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
hypertext->links[bufIndex].accessibleHyperlink = (JOBJECT64)globalRef; hypertext->links[bufIndex].accessibleHyperlink = (JOBJECT64)globalRef;
PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef); PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text // get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject, jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
...@@ -3067,12 +3064,12 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC ...@@ -3067,12 +3064,12 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC
// jniEnv->CallVoidMethod(accessBridgeObject, // jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js); // decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE); //EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
PrintDebugString("##### AccessibleHyperlink text = %ls", hypertext->links[bufIndex].text ); PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", hypertext->links[bufIndex].text );
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AccessibleHyperlink text is null."); PrintDebugString("[WARN]: AccessibleHyperlink text is null.");
hypertext->links[bufIndex].text[0] = (wchar_t) 0; hypertext->links[bufIndex].text[0] = (wchar_t) 0;
} }
...@@ -3081,19 +3078,19 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC ...@@ -3081,19 +3078,19 @@ AccessBridgeJavaEntryPoints::getAccessibleHypertextExt(const jobject accessibleC
hypertext->links[bufIndex].accessibleHyperlink, hypertext->links[bufIndex].accessibleHyperlink,
i); i);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink start index = %d", hypertext->links[bufIndex].startIndex); PrintDebugString("[INFO]: ##### hyperlink start index = %d", hypertext->links[bufIndex].startIndex);
hypertext->links[bufIndex].endIndex = jniEnv->CallIntMethod(accessBridgeObject, hypertext->links[bufIndex].endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod, getAccessibleHyperlinkEndIndexMethod,
hypertext->links[bufIndex].accessibleHyperlink, hypertext->links[bufIndex].accessibleHyperlink,
i); i);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink end index = %d", hypertext->links[bufIndex].endIndex); PrintDebugString("[INFO]: ##### hyperlink end index = %d", hypertext->links[bufIndex].endIndex);
bufIndex++; bufIndex++;
} }
PrintDebugString(" ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt succeeded"); PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextExt succeeded");
return TRUE; return TRUE;
} }
...@@ -3101,7 +3098,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(const jobject acce ...@@ -3101,7 +3098,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(const jobject acce
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(%X)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(%X)",
accessibleContext); accessibleContext);
if (getAccessibleHyperlinkCountMethod == (jmethodID)0) { if (getAccessibleHyperlinkCountMethod == (jmethodID)0) {
...@@ -3112,7 +3109,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(const jobject acce ...@@ -3112,7 +3109,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHyperlinkCount(const jobject acce
jint linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod, jint linkCount = jniEnv->CallIntMethod(accessBridgeObject, getAccessibleHyperlinkCountMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", -1); EXCEPTION_CHECK("##### Getting hyperlink count - call to CallIntMethod()", -1);
PrintDebugString(" ##### hyperlink count = %d", linkCount); PrintDebugString("[INFO]: ##### hyperlink count = %d", linkCount);
return linkCount; return linkCount;
} }
...@@ -3123,7 +3120,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(const jobject ...@@ -3123,7 +3120,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(const jobject
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(%p, index = %d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(%p, index = %d)",
hypertext, nIndex); hypertext, nIndex);
if (getAccessibleHypertextLinkIndexMethod == (jmethodID)0) { if (getAccessibleHypertextLinkIndexMethod == (jmethodID)0) {
...@@ -3135,7 +3132,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(const jobject ...@@ -3135,7 +3132,7 @@ jint AccessBridgeJavaEntryPoints::getAccessibleHypertextLinkIndex(const jobject
hypertext, nIndex); hypertext, nIndex);
EXCEPTION_CHECK("##### Getting hyperlink index - call to CallIntMethod()", -1); EXCEPTION_CHECK("##### Getting hyperlink index - call to CallIntMethod()", -1);
PrintDebugString(" ##### hyperlink index = %d", index); PrintDebugString("[INFO]: ##### hyperlink index = %d", index);
return index; return index;
} }
...@@ -3148,7 +3145,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext, ...@@ -3148,7 +3145,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext,
const wchar_t *stringBytes; const wchar_t *stringBytes;
jsize length; jsize length;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleHyperlink(%p, index = %d)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleHyperlink(%p, index = %d)",
hypertext, index); hypertext, index);
...@@ -3161,7 +3158,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext, ...@@ -3161,7 +3158,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext,
jobject globalRef = jniEnv->NewGlobalRef(hl); jobject globalRef = jniEnv->NewGlobalRef(hl);
EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE); EXCEPTION_CHECK("##### Getting AccessibleHyperlink - call to NewGlobalRef()", FALSE);
info->accessibleHyperlink = (JOBJECT64)globalRef; info->accessibleHyperlink = (JOBJECT64)globalRef;
PrintDebugString(" ##### AccessibleHyperlink = %p", globalRef); PrintDebugString("[INFO]: ##### AccessibleHyperlink = %p", globalRef);
// get the hyperlink text // get the hyperlink text
jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject, jstring js = (jstring)jniEnv->CallObjectMethod(accessBridgeObject,
...@@ -3186,12 +3183,12 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext, ...@@ -3186,12 +3183,12 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext,
// jniEnv->CallVoidMethod(accessBridgeObject, // jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js); // decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE); //EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to CallVoidMethod()", FALSE);
PrintDebugString("##### AccessibleHyperlink text = %ls", info->text ); PrintDebugString("[INFO]: ##### AccessibleHyperlink text = %ls", info->text );
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleHyperlink text - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AccessibleHyperlink text is null."); PrintDebugString("[WARN]: AccessibleHyperlink text is null.");
info->text[0] = (wchar_t) 0; info->text[0] = (wchar_t) 0;
} }
...@@ -3200,14 +3197,14 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext, ...@@ -3200,14 +3197,14 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleHyperlink(jobject hypertext,
info->accessibleHyperlink, info->accessibleHyperlink,
index); index);
EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink start index - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink start index = %d", info->startIndex); PrintDebugString("[INFO]: ##### hyperlink start index = %d", info->startIndex);
info->endIndex = jniEnv->CallIntMethod(accessBridgeObject, info->endIndex = jniEnv->CallIntMethod(accessBridgeObject,
getAccessibleHyperlinkEndIndexMethod, getAccessibleHyperlinkEndIndexMethod,
info->accessibleHyperlink, info->accessibleHyperlink,
index); index);
EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting hyperlink end index - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### hyperlink end index = %d", info->endIndex); PrintDebugString("[INFO]: ##### hyperlink end index = %d", info->endIndex);
return TRUE; return TRUE;
} }
...@@ -3221,7 +3218,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon ...@@ -3221,7 +3218,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(%p, %p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(%p, %p)",
accessibleContext, keyBindings); accessibleContext, keyBindings);
if (getAccessibleKeyBindingsCountMethod == (jmethodID) 0 || if (getAccessibleKeyBindingsCountMethod == (jmethodID) 0 ||
...@@ -3236,7 +3233,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon ...@@ -3236,7 +3233,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon
EXCEPTION_CHECK("##### Getting key bindings count - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting key bindings count - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### key bindings count = %d", keyBindings->keyBindingsCount); PrintDebugString("[INFO]: ##### key bindings count = %d", keyBindings->keyBindingsCount);
// get the key bindings // get the key bindings
for (int i = 0; i < keyBindings->keyBindingsCount && i < MAX_KEY_BINDINGS; i++) { for (int i = 0; i < keyBindings->keyBindingsCount && i < MAX_KEY_BINDINGS; i++) {
...@@ -3247,8 +3244,9 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon ...@@ -3247,8 +3244,9 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon
accessibleContext, accessibleContext,
i); i);
EXCEPTION_CHECK("##### Getting key binding character - call to CallCharMethod()", FALSE); EXCEPTION_CHECK("##### Getting key binding character - call to CallCharMethod()", FALSE);
PrintDebugString(" ##### key binding character = %c", keyBindings->keyBindingInfo[i].character); PrintDebugString("[INFO]: ##### key binding character = %c"\
PrintDebugString(" ##### key binding character in hex = %hx", keyBindings->keyBindingInfo[i].character); " ##### key binding character in hex = %hx"\
, keyBindings->keyBindingInfo[i].character, keyBindings->keyBindingInfo[i].character);
// get the key binding modifiers // get the key binding modifiers
keyBindings->keyBindingInfo[i].modifiers = jniEnv->CallIntMethod(accessBridgeObject, keyBindings->keyBindingInfo[i].modifiers = jniEnv->CallIntMethod(accessBridgeObject,
...@@ -3256,7 +3254,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon ...@@ -3256,7 +3254,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleKeyBindings(jobject accessibleCon
accessibleContext, accessibleContext,
i); i);
EXCEPTION_CHECK("##### Getting key binding modifiers - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting key binding modifiers - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### key binding modifiers = %x", keyBindings->keyBindingInfo[i].modifiers); PrintDebugString("[INFO]: ##### key binding modifiers = %x", keyBindings->keyBindingInfo[i].modifiers);
} }
return FALSE; return FALSE;
} }
...@@ -3269,14 +3267,14 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext, ...@@ -3269,14 +3267,14 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext,
const wchar_t *stringBytes; const wchar_t *stringBytes;
jsize length; jsize length;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)",
accessibleContext, icons); accessibleContext, icons);
if (getAccessibleIconsCountMethod == (jmethodID) 0 || if (getAccessibleIconsCountMethod == (jmethodID) 0 ||
getAccessibleIconDescriptionMethod == (jmethodID) 0 || getAccessibleIconDescriptionMethod == (jmethodID) 0 ||
getAccessibleIconHeightMethod == (jmethodID) 0 || getAccessibleIconHeightMethod == (jmethodID) 0 ||
getAccessibleIconWidthMethod == (jmethodID) 0) { getAccessibleIconWidthMethod == (jmethodID) 0) {
PrintDebugString(" ##### missing method(s) !!!"); PrintDebugString("[WARN]: ##### missing method(s) !!!");
return FALSE; return FALSE;
} }
...@@ -3286,7 +3284,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext, ...@@ -3286,7 +3284,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext,
getAccessibleIconsCountMethod, accessibleContext); getAccessibleIconsCountMethod, accessibleContext);
EXCEPTION_CHECK("##### Getting icons count - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting icons count - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### icons count = %d", icons->iconsCount); PrintDebugString("[INFO]: ##### icons count = %d", icons->iconsCount);
// get the icons // get the icons
...@@ -3314,11 +3312,11 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext, ...@@ -3314,11 +3312,11 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext,
// jniEnv->CallVoidMethod(accessBridgeObject, // jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js); // decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleIcon description - call to CallVoidMethod()", FALSE); //EXCEPTION_CHECK("Getting AccessibleIcon description - call to CallVoidMethod()", FALSE);
PrintDebugString("##### AccessibleIcon description = %ls", icons->iconInfo[i].description ); PrintDebugString("[INFO]: ##### AccessibleIcon description = %ls", icons->iconInfo[i].description );
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleIcon description - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleIcon description - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AccessibleIcon description is null."); PrintDebugString("[WARN]: AccessibleIcon description is null.");
icons->iconInfo[i].description[0] = (wchar_t) 0; icons->iconInfo[i].description[0] = (wchar_t) 0;
} }
...@@ -3329,7 +3327,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext, ...@@ -3329,7 +3327,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext,
accessibleContext, accessibleContext,
i); i);
EXCEPTION_CHECK("##### Getting icon height - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting icon height - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### icon height = %d", icons->iconInfo[i].height); PrintDebugString("[INFO]: ##### icon height = %d", icons->iconInfo[i].height);
// get the icon width // get the icon width
icons->iconInfo[i].width = jniEnv->CallIntMethod(accessBridgeObject, icons->iconInfo[i].width = jniEnv->CallIntMethod(accessBridgeObject,
...@@ -3337,7 +3335,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext, ...@@ -3337,7 +3335,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleIcons(jobject accessibleContext,
accessibleContext, accessibleContext,
i); i);
EXCEPTION_CHECK("##### Getting icon width - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting icon width - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### icon width = %d", icons->iconInfo[i].width); PrintDebugString("[INFO]: ##### icon width = %d", icons->iconInfo[i].width);
} }
return FALSE; return FALSE;
} }
...@@ -3350,12 +3348,12 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleActions(jobject accessibleContext ...@@ -3350,12 +3348,12 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleActions(jobject accessibleContext
const wchar_t *stringBytes; const wchar_t *stringBytes;
jsize length; jsize length;
PrintDebugString("\r\n##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)", PrintDebugString("[INFO]: ##### AccessBridgeJavaEntryPoints::getAccessibleIcons(%p, %p)",
accessibleContext, actions); accessibleContext, actions);
if (getAccessibleActionsCountMethod == (jmethodID) 0 || if (getAccessibleActionsCountMethod == (jmethodID) 0 ||
getAccessibleActionNameMethod == (jmethodID) 0) { getAccessibleActionNameMethod == (jmethodID) 0) {
PrintDebugString(" ##### missing method(s) !!!"); PrintDebugString("[WARN]: ##### missing method(s) !!!");
return FALSE; return FALSE;
} }
...@@ -3365,7 +3363,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleActions(jobject accessibleContext ...@@ -3365,7 +3363,7 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleActions(jobject accessibleContext
getAccessibleActionsCountMethod,accessibleContext); getAccessibleActionsCountMethod,accessibleContext);
EXCEPTION_CHECK("##### Getting actions count - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("##### Getting actions count - call to CallIntMethod()", FALSE);
PrintDebugString(" ##### key actions count = %d", actions->actionsCount); PrintDebugString("[INFO]: ##### key actions count = %d", actions->actionsCount);
// get the actions // get the actions
...@@ -3393,11 +3391,11 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleActions(jobject accessibleContext ...@@ -3393,11 +3391,11 @@ BOOL AccessBridgeJavaEntryPoints::getAccessibleActions(jobject accessibleContext
// jniEnv->CallVoidMethod(accessBridgeObject, // jniEnv->CallVoidMethod(accessBridgeObject,
// decrementReferenceMethod, js); // decrementReferenceMethod, js);
//EXCEPTION_CHECK("Getting AccessibleAction name - call to CallVoidMethod()", FALSE); //EXCEPTION_CHECK("Getting AccessibleAction name - call to CallVoidMethod()", FALSE);
PrintDebugString("##### AccessibleAction name = %ls", actions->actionInfo[i].name ); PrintDebugString("[INFO]: ##### AccessibleAction name = %ls", actions->actionInfo[i].name );
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAction name - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleAction name - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AccessibleAction name is null."); PrintDebugString("[WARN]: AccessibleAction name is null.");
actions->actionInfo[i].name [0] = (wchar_t) 0; actions->actionInfo[i].name [0] = (wchar_t) 0;
} }
} }
...@@ -3411,7 +3409,7 @@ BOOL AccessBridgeJavaEntryPoints::doAccessibleActions(jobject accessibleContext, ...@@ -3411,7 +3409,7 @@ BOOL AccessBridgeJavaEntryPoints::doAccessibleActions(jobject accessibleContext,
jthrowable exception; jthrowable exception;
BOOL returnVal; BOOL returnVal;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::doAccessibleActions(%p, #actions %d %s):", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::doAccessibleActions(%p, #actions %d %s):",
accessibleContext, accessibleContext,
actionsToDo->actionsCount, actionsToDo->actionsCount,
actionsToDo->actions[0].name); actionsToDo->actions[0].name);
...@@ -3421,15 +3419,15 @@ BOOL AccessBridgeJavaEntryPoints::doAccessibleActions(jobject accessibleContext, ...@@ -3421,15 +3419,15 @@ BOOL AccessBridgeJavaEntryPoints::doAccessibleActions(jobject accessibleContext,
return FALSE; return FALSE;
} }
PrintDebugString("\r\n doing %d actions ...", actionsToDo->actionsCount); PrintDebugString("[INFO]: doing %d actions ...", actionsToDo->actionsCount);
for (int i = 0; i < actionsToDo->actionsCount && i < MAX_ACTIONS_TO_DO; i++) { for (int i = 0; i < actionsToDo->actionsCount && i < MAX_ACTIONS_TO_DO; i++) {
PrintDebugString("\r doing action %d: %s ...", i, actionsToDo->actions[i].name); PrintDebugString("[INFO]: doing action %d: %s ...", i, actionsToDo->actions[i].name);
// create a Java String for the action name // create a Java String for the action name
wchar_t *actionName = (wchar_t *)actionsToDo->actions[i].name; wchar_t *actionName = (wchar_t *)actionsToDo->actions[i].name;
jstring javaName = jniEnv->NewString(actionName, (jsize)wcslen(actionName)); jstring javaName = jniEnv->NewString(actionName, (jsize)wcslen(actionName));
if (javaName == 0) { if (javaName == 0) {
PrintDebugString("\r NewString failed"); PrintDebugString("[ERROR]: NewString failed");
*failure = i; *failure = i;
return FALSE; return FALSE;
} }
...@@ -3440,7 +3438,7 @@ BOOL AccessBridgeJavaEntryPoints::doAccessibleActions(jobject accessibleContext, ...@@ -3440,7 +3438,7 @@ BOOL AccessBridgeJavaEntryPoints::doAccessibleActions(jobject accessibleContext,
EXCEPTION_CHECK("doAccessibleActions - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("doAccessibleActions - call to CallBooleanMethod()", FALSE);
if (returnVal != TRUE) { if (returnVal != TRUE) {
PrintDebugString("\r Action %d failed", i); PrintDebugString("[ERROR]: Action %d failed", i);
*failure = i; *failure = i;
return FALSE; return FALSE;
} }
...@@ -3464,7 +3462,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext, ...@@ -3464,7 +3462,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext,
return FALSE; return FALSE;
} }
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextInfo(%p, %d, %d):", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextInfo(%p, %d, %d):",
accessibleContext, x, y); accessibleContext, x, y);
// Get the character count // Get the character count
...@@ -3473,9 +3471,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext, ...@@ -3473,9 +3471,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext,
getAccessibleCharCountFromContextMethod, getAccessibleCharCountFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleCharCount - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleCharCount - call to CallIntMethod()", FALSE);
PrintDebugString(" Char count = %d", textInfo->charCount); PrintDebugString("[INFO]: Char count = %d", textInfo->charCount);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleCharCountFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleCharCountFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -3485,9 +3483,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext, ...@@ -3485,9 +3483,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext,
getAccessibleCaretPositionFromContextMethod, getAccessibleCaretPositionFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleCaretPosition - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleCaretPosition - call to CallIntMethod()", FALSE);
PrintDebugString(" Index at caret = %d", textInfo->caretIndex); PrintDebugString("[INFO]: Index at caret = %d", textInfo->caretIndex);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleCaretPositionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleCaretPositionFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -3497,9 +3495,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext, ...@@ -3497,9 +3495,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextInfo(jobject accessibleContext,
getAccessibleIndexAtPointFromContextMethod, getAccessibleIndexAtPointFromContextMethod,
accessibleContext, x, y); accessibleContext, x, y);
EXCEPTION_CHECK("Getting AccessibleIndexAtPoint - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleIndexAtPoint - call to CallIntMethod()", FALSE);
PrintDebugString(" Index at point = %d", textInfo->indexAtPoint); PrintDebugString("[INFO]: Index at point = %d", textInfo->indexAtPoint);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleIndexAtPointFromContextMethod == 0"); PrintDebugString("[ERROR]: Error! either env == 0 or getAccessibleIndexAtPointFromContextMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -3513,7 +3511,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext, ...@@ -3513,7 +3511,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext,
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextItems(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextItems(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is // Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText // an instance of AccessibleText
...@@ -3527,7 +3525,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext, ...@@ -3527,7 +3525,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext,
getAccessibleLetterAtIndexFromContextMethod, getAccessibleLetterAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallIntMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to GetStringChars()", FALSE);
...@@ -3537,15 +3535,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext, ...@@ -3537,15 +3535,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to CallVoidMethod()", FALSE);
PrintDebugString(" Accessible Text letter = %c", textItems->letter); PrintDebugString("[INFO]: Accessible Text letter = %c", textItems->letter);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleLetterAtIndex - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Text letter is null."); PrintDebugString("[WARN]: Accessible Text letter is null.");
textItems->letter = (wchar_t) 0; textItems->letter = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleLetterAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleLetterAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -3556,7 +3554,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext, ...@@ -3556,7 +3554,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext,
getAccessibleWordAtIndexFromContextMethod, getAccessibleWordAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallIntMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to GetStringChars()", FALSE);
...@@ -3570,15 +3568,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext, ...@@ -3570,15 +3568,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Text word = %ls", textItems->word); wPrintDebugString(L"[INFO]: Accessible Text word = %ls", textItems->word);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleWordAtIndex - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Text word is null."); PrintDebugString("[WARN]: Accessible Text word is null.");
textItems->word[0] = (wchar_t) 0; textItems->word[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleWordAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleWordAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -3588,7 +3586,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext, ...@@ -3588,7 +3586,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext,
getAccessibleSentenceAtIndexFromContextMethod, getAccessibleSentenceAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to GetStringChars()", FALSE);
...@@ -3606,15 +3604,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext, ...@@ -3606,15 +3604,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextItems(jobject accessibleContext,
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Text sentence = %ls", textItems->sentence); wPrintDebugString(L"[INFO]: Accessible Text sentence = %ls", textItems->sentence);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleSentenceAtIndex - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Text sentence is null."); PrintDebugString("[WARN]: Accessible Text sentence is null.");
textItems->sentence[0] = (wchar_t) 0; textItems->sentence[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleSentenceAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleSentenceAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -3629,7 +3627,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo ...@@ -3629,7 +3627,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(%p):", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(%p):",
accessibleContext); accessibleContext);
// Verify the Java VM still exists and AccessibleContext is // Verify the Java VM still exists and AccessibleContext is
...@@ -3644,9 +3642,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo ...@@ -3644,9 +3642,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo
getAccessibleTextSelectionStartFromContextMethod, getAccessibleTextSelectionStartFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectionStart - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextSelectionStart - call to CallIntMethod()", FALSE);
PrintDebugString(" Selection start = %d", selectionInfo->selectionStartIndex); PrintDebugString("[INFO]: Selection start = %d", selectionInfo->selectionStartIndex);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectionStartFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextSelectionStartFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -3656,9 +3654,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo ...@@ -3656,9 +3654,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo
getAccessibleTextSelectionEndFromContextMethod, getAccessibleTextSelectionEndFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectionEnd - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextSelectionEnd - call to CallIntMethod()", FALSE);
PrintDebugString(" Selection end = %d", selectionInfo->selectionEndIndex); PrintDebugString("[INFO]: Selection end = %d", selectionInfo->selectionEndIndex);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectionEndFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextSelectionEndFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -3668,7 +3666,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo ...@@ -3668,7 +3666,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo
getAccessibleTextSelectedTextFromContextMethod, getAccessibleTextSelectedTextFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to GetStringChars()", FALSE);
...@@ -3682,15 +3680,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo ...@@ -3682,15 +3680,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextSelectionInfo(jobject accessibleCo
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to CallVoidMethod()", FALSE);
PrintDebugString(" Accessible's selected text = %s", selectionInfo->selectedText); PrintDebugString("[INFO]: Accessible's selected text = %s", selectionInfo->selectedText);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextSelectedText - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible's selected text is null."); PrintDebugString("[WARN]: Accessible's selected text is null.");
selectionInfo->selectedText[0] = (wchar_t) 0; selectionInfo->selectedText[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextSelectedTextFromContextMethod == 0"); PrintDebugString("[WARN]: either env == 0 or getAccessibleTextSelectedTextFromContextMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -3704,7 +3702,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3704,7 +3702,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is // Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText // an instance of AccessibleText
...@@ -3713,7 +3711,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3713,7 +3711,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
} }
if (accessibleContext == (jobject) 0) { if (accessibleContext == (jobject) 0) {
PrintDebugString(" passed in AccessibleContext == null! (oops)"); PrintDebugString("[WARN]: passed in AccessibleContext == null! (oops)");
attributes->bold = FALSE; attributes->bold = FALSE;
attributes->italic = FALSE; attributes->italic = FALSE;
...@@ -3740,19 +3738,19 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3740,19 +3738,19 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the AttributeSet // Get the AttributeSet
if (getAccessibleAttributeSetAtIndexFromContextMethod != (jmethodID) 0) { if (getAccessibleAttributeSetAtIndexFromContextMethod != (jmethodID) 0) {
PrintDebugString(" Getting AttributeSet at index..."); PrintDebugString("[INFO]: Getting AttributeSet at index...");
AttributeSet = jniEnv->CallObjectMethod(accessBridgeObject, AttributeSet = jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributeSetAtIndexFromContextMethod, getAccessibleAttributeSetAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleAttributeSetAtIndex - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributeSetAtIndex - call to CallObjectMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleAttributeSetAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributeSetAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
// It is legal for the AttributeSet object to be null, in which case we return false! // It is legal for the AttributeSet object to be null, in which case we return false!
if (AttributeSet == (jobject) 0) { if (AttributeSet == (jobject) 0) {
PrintDebugString(" AttributeSet returned at index is null (this is legal! - see AWT in J2SE 1.3"); PrintDebugString("[WARN]: AttributeSet returned at index is null (this is legal! - see AWT in J2SE 1.3");
attributes->bold = FALSE; attributes->bold = FALSE;
attributes->italic = FALSE; attributes->italic = FALSE;
...@@ -3779,13 +3777,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3779,13 +3777,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the bold setting // Get the bold setting
if (getBoldFromAttributeSetMethod != (jmethodID) 0) { if (getBoldFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting bold from AttributeSet..."); PrintDebugString("[INFO]: Getting bold from AttributeSet...");
attributes->bold = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, attributes->bold = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getBoldFromAttributeSetMethod, getBoldFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getBoldFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getBoldFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting BoldFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3796,13 +3794,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3796,13 +3794,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the italic setting // Get the italic setting
if (getItalicFromAttributeSetMethod != (jmethodID) 0) { if (getItalicFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting italic from AttributeSet..."); PrintDebugString("[INFO]: Getting italic from AttributeSet...");
attributes->italic = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, attributes->italic = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getItalicFromAttributeSetMethod, getItalicFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getItalicdFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getItalicdFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting ItalicFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3813,13 +3811,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3813,13 +3811,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the underline setting // Get the underline setting
if (getUnderlineFromAttributeSetMethod != (jmethodID) 0) { if (getUnderlineFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting underline from AttributeSet..."); PrintDebugString("[INFO]: Getting underline from AttributeSet...");
attributes->underline = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, attributes->underline = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getUnderlineFromAttributeSetMethod, getUnderlineFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getUnderlineFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getUnderlineFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting UnderlineFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3830,13 +3828,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3830,13 +3828,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the strikethrough setting // Get the strikethrough setting
if (getStrikethroughFromAttributeSetMethod != (jmethodID) 0) { if (getStrikethroughFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting strikethrough from AttributeSet..."); PrintDebugString("[INFO]: Getting strikethrough from AttributeSet...");
attributes->strikethrough = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, attributes->strikethrough = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getStrikethroughFromAttributeSetMethod, getStrikethroughFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getStrikethroughFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getStrikethroughFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting StrikethroughFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3847,13 +3845,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3847,13 +3845,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the superscript setting // Get the superscript setting
if (getSuperscriptFromAttributeSetMethod != (jmethodID) 0) { if (getSuperscriptFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting superscript from AttributeSet..."); PrintDebugString("[INFO]: Getting superscript from AttributeSet...");
attributes->superscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, attributes->superscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getSuperscriptFromAttributeSetMethod, getSuperscriptFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getSuperscripteFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getSuperscripteFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting SuperscriptFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3864,13 +3862,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3864,13 +3862,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the subscript setting // Get the subscript setting
if (getSubscriptFromAttributeSetMethod != (jmethodID) 0) { if (getSubscriptFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting subscript from AttributeSet..."); PrintDebugString("[INFO]: Getting subscript from AttributeSet...");
attributes->subscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject, attributes->subscript = (BOOL) jniEnv->CallBooleanMethod(accessBridgeObject,
getSubscriptFromAttributeSetMethod, getSubscriptFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallBooleanMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getSubscriptFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getSubscriptFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting SubscriptFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3881,7 +3879,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3881,7 +3879,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the backgroundColor setting // Get the backgroundColor setting
if (getBackgroundColorFromAttributeSetMethod != (jmethodID) 0) { if (getBackgroundColorFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting backgroundColor from AttributeSet..."); PrintDebugString("[INFO]: Getting backgroundColor from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getBackgroundColorFromAttributeSetMethod, getBackgroundColorFromAttributeSetMethod,
AttributeSet); AttributeSet);
...@@ -3899,15 +3897,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3899,15 +3897,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" AttributeSet's background color = %ls", attributes->backgroundColor); wPrintDebugString(L"[INFO]: AttributeSet's background color = %ls", attributes->backgroundColor);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AttributeSet's background color is null."); PrintDebugString("[WARN]: AttributeSet's background color is null.");
attributes->backgroundColor[0] = (wchar_t) 0; attributes->backgroundColor[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getBackgroundColorFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getBackgroundColorFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting BackgroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3918,7 +3916,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3918,7 +3916,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the foregroundColor setting // Get the foregroundColor setting
if (getForegroundColorFromAttributeSetMethod != (jmethodID) 0) { if (getForegroundColorFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting foregroundColor from AttributeSet..."); PrintDebugString("[INFO]: Getting foregroundColor from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getForegroundColorFromAttributeSetMethod, getForegroundColorFromAttributeSetMethod,
AttributeSet); AttributeSet);
...@@ -3936,15 +3934,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3936,15 +3934,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" AttributeSet's foreground color = %ls", attributes->foregroundColor); wPrintDebugString(L"[INFO]: AttributeSet's foreground color = %ls", attributes->foregroundColor);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AttributeSet's foreground color is null."); PrintDebugString("[WARN]: AttributeSet's foreground color is null.");
attributes->foregroundColor[0] = (wchar_t) 0; attributes->foregroundColor[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getForegroundColorFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getForegroundColorFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting ForegroundColorFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3955,7 +3953,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3955,7 +3953,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the fontFamily setting // Get the fontFamily setting
if (getFontFamilyFromAttributeSetMethod != (jmethodID) 0) { if (getFontFamilyFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting fontFamily from AttributeSet..."); PrintDebugString("[INFO]: Getting fontFamily from AttributeSet...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getFontFamilyFromAttributeSetMethod, getFontFamilyFromAttributeSetMethod,
AttributeSet); AttributeSet);
...@@ -3973,15 +3971,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3973,15 +3971,15 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" AttributeSet's fontFamily = %ls", attributes->fontFamily); wPrintDebugString(L"[INFO]: AttributeSet's fontFamily = %ls", attributes->fontFamily);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" AttributeSet's fontFamily is null."); PrintDebugString("[WARN]: AttributeSet's fontFamily is null.");
attributes->backgroundColor[0] = (wchar_t) 0; attributes->backgroundColor[0] = (wchar_t) 0;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getFontFamilyFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getFontFamilyFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting FontFamilyFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -3992,14 +3990,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -3992,14 +3990,14 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the font size // Get the font size
if (getFontSizeFromAttributeSetMethod != (jmethodID) 0) { if (getFontSizeFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting font size from AttributeSet..."); PrintDebugString("[INFO]: Getting font size from AttributeSet...");
attributes->fontSize = jniEnv->CallIntMethod(accessBridgeObject, attributes->fontSize = jniEnv->CallIntMethod(accessBridgeObject,
getFontSizeFromAttributeSetMethod, getFontSizeFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallIntMethod()", FALSE);
PrintDebugString(" AttributeSet's font size = %d", attributes->fontSize); PrintDebugString("[INFO]: AttributeSet's font size = %d", attributes->fontSize);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAlignmentFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAlignmentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting FontSizeFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4011,13 +4009,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4011,13 +4009,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the alignment setting // Get the alignment setting
if (getAlignmentFromAttributeSetMethod != (jmethodID) 0) { if (getAlignmentFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting alignment from AttributeSet..."); PrintDebugString("[INFO]: Getting alignment from AttributeSet...");
attributes->alignment = jniEnv->CallIntMethod(accessBridgeObject, attributes->alignment = jniEnv->CallIntMethod(accessBridgeObject,
getAlignmentFromAttributeSetMethod, getAlignmentFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAlignmentFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAlignmentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AlignmentFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4028,13 +4026,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4028,13 +4026,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the bidiLevel setting // Get the bidiLevel setting
if (getBidiLevelFromAttributeSetMethod != (jmethodID) 0) { if (getBidiLevelFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting bidiLevel from AttributeSet..."); PrintDebugString("[INFO]: Getting bidiLevel from AttributeSet...");
attributes->bidiLevel = jniEnv->CallIntMethod(accessBridgeObject, attributes->bidiLevel = jniEnv->CallIntMethod(accessBridgeObject,
getBidiLevelFromAttributeSetMethod, getBidiLevelFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getBidiLevelFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getBidiLevelFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting BidiLevelFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4045,13 +4043,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4045,13 +4043,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the firstLineIndent setting // Get the firstLineIndent setting
if (getFirstLineIndentFromAttributeSetMethod != (jmethodID) 0) { if (getFirstLineIndentFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting firstLineIndent from AttributeSet..."); PrintDebugString("[ERROR]: Getting firstLineIndent from AttributeSet...");
attributes->firstLineIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, attributes->firstLineIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getFirstLineIndentFromAttributeSetMethod, getFirstLineIndentFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getFirstLineIndentFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getFirstLineIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting FirstLineIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4062,13 +4060,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4062,13 +4060,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the leftIndent setting // Get the leftIndent setting
if (getLeftIndentFromAttributeSetMethod != (jmethodID) 0) { if (getLeftIndentFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting leftIndent from AttributeSet..."); PrintDebugString("[INFO]: Getting leftIndent from AttributeSet...");
attributes->leftIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, attributes->leftIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getLeftIndentFromAttributeSetMethod, getLeftIndentFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getLeftIndentFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getLeftIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting LeftIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4079,13 +4077,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4079,13 +4077,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the rightIndent setting // Get the rightIndent setting
if (getRightIndentFromAttributeSetMethod != (jmethodID) 0) { if (getRightIndentFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting rightIndent from AttributeSet..."); PrintDebugString("[INFO]: Getting rightIndent from AttributeSet...");
attributes->rightIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, attributes->rightIndent = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getRightIndentFromAttributeSetMethod, getRightIndentFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getRightIndentFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getRightIndentFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting RightIndentFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4096,13 +4094,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4096,13 +4094,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the lineSpacing setting // Get the lineSpacing setting
if (getLineSpacingFromAttributeSetMethod != (jmethodID) 0) { if (getLineSpacingFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting lineSpacing from AttributeSet..."); PrintDebugString("[INFO]: Getting lineSpacing from AttributeSet...");
attributes->lineSpacing = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, attributes->lineSpacing = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getLineSpacingFromAttributeSetMethod, getLineSpacingFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getLineSpacingFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getLineSpacingFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting LineSpacingFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4113,13 +4111,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4113,13 +4111,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the spaceAbove setting // Get the spaceAbove setting
if (getSpaceAboveFromAttributeSetMethod != (jmethodID) 0) { if (getSpaceAboveFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting spaceAbove from AttributeSet..."); PrintDebugString("[INFO]: Getting spaceAbove from AttributeSet...");
attributes->spaceAbove = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, attributes->spaceAbove = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getSpaceAboveFromAttributeSetMethod, getSpaceAboveFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getSpaceAboveFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getSpaceAboveFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting SpaceAboveFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4130,13 +4128,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4130,13 +4128,13 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the spaceBelow setting // Get the spaceBelow setting
if (getSpaceBelowFromAttributeSetMethod != (jmethodID) 0) { if (getSpaceBelowFromAttributeSetMethod != (jmethodID) 0) {
PrintDebugString(" Getting spaceBelow from AttributeSet..."); PrintDebugString("[INFO]: Getting spaceBelow from AttributeSet...");
attributes->spaceBelow = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject, attributes->spaceBelow = (jfloat) jniEnv->CallFloatMethod(accessBridgeObject,
getSpaceBelowFromAttributeSetMethod, getSpaceBelowFromAttributeSetMethod,
AttributeSet); AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallIntMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or getSpaceBelowFromAttributeSetMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getSpaceBelowFromAttributeSetMethod == 0");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting SpaceBelowFromAttributeSet - call to CallVoidMethod()", FALSE);
...@@ -4147,12 +4145,12 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4147,12 +4145,12 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Release the AttributeSet object // Release the AttributeSet object
if (decrementReferenceMethod != (jmethodID) 0) { if (decrementReferenceMethod != (jmethodID) 0) {
PrintDebugString(" Decrementing reference to AttributeSet..."); PrintDebugString("[INFO]: Decrementing reference to AttributeSet...");
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, AttributeSet); decrementReferenceMethod, AttributeSet);
EXCEPTION_CHECK("Releasing AttributeSet object - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Releasing AttributeSet object - call to CallVoidMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or accessBridgeObject == 0"); PrintDebugString("[ERROR]: either env == 0 or accessBridgeObject == 0");
jniEnv->DeleteLocalRef(AttributeSet); jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Releasing AttributeSet object - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Releasing AttributeSet object - call to DeleteLocalRef()", FALSE);
return FALSE; return FALSE;
...@@ -4160,12 +4158,12 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4160,12 +4158,12 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
// Get the full attributes string at index // Get the full attributes string at index
if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) { if (getAccessibleAttributesAtIndexFromContextMethod != (jmethodID) 0) {
PrintDebugString(" Getting full attributes string from Context..."); PrintDebugString("[INFO]: Getting full attributes string from Context...");
js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject, js = (jstring) jniEnv->CallObjectMethod(accessBridgeObject,
getAccessibleAttributesAtIndexFromContextMethod, getAccessibleAttributesAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to GetStringChars()", FALSE);
...@@ -4179,18 +4177,18 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte ...@@ -4179,18 +4177,18 @@ AccessBridgeJavaEntryPoints::getAccessibleTextAttributes(jobject accessibleConte
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Text attributes = %ls", attributes->fullAttributesString); wPrintDebugString(L"[INFO]: Accessible Text attributes = %ls", attributes->fullAttributesString);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" Accessible Text attributes is null."); PrintDebugString("[WARN]: Accessible Text attributes is null.");
attributes->fullAttributesString[0] = (wchar_t) 0; attributes->fullAttributesString[0] = (wchar_t) 0;
jniEnv->DeleteLocalRef(AttributeSet); jniEnv->DeleteLocalRef(AttributeSet);
EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleAttributesAtIndex - call to DeleteLocalRef()", FALSE);
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleAttributesAtIndexFromContextMethod == 0");
jniEnv->DeleteLocalRef(AttributeSet); jniEnv->DeleteLocalRef(AttributeSet);
return FALSE; return FALSE;
} }
...@@ -4205,7 +4203,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac ...@@ -4205,7 +4203,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextRect(%p), index = %d", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextRect(%p), index = %d",
accessibleContext, index); accessibleContext, index);
// Verify the Java VM still exists and AccessibleContext is // Verify the Java VM still exists and AccessibleContext is
...@@ -4220,9 +4218,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac ...@@ -4220,9 +4218,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac
getAccessibleXcoordTextRectAtIndexFromContextMethod, getAccessibleXcoordTextRectAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleXcoordTextRect - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleXcoordTextRect - call to CallIntMethod()", FALSE);
PrintDebugString(" X coord = %d", rectInfo->x); PrintDebugString("[INFO]: X coord = %d", rectInfo->x);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleXcoordTextRectAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleXcoordTextRectAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4232,9 +4230,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac ...@@ -4232,9 +4230,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac
getAccessibleYcoordTextRectAtIndexFromContextMethod, getAccessibleYcoordTextRectAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleYcoordTextRect - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleYcoordTextRect - call to CallIntMethod()", FALSE);
PrintDebugString(" Y coord = %d", rectInfo->y); PrintDebugString("[INFO]: Y coord = %d", rectInfo->y);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleYcoordTextRectAtIndexFromContextMethod == 0"); PrintDebugString("[INFO]: either env == 0 or getAccessibleYcoordTextRectAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4244,9 +4242,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac ...@@ -4244,9 +4242,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac
getAccessibleWidthTextRectAtIndexFromContextMethod, getAccessibleWidthTextRectAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleWidthTextRect - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleWidthTextRect - call to CallIntMethod()", FALSE);
PrintDebugString(" Width = %d", rectInfo->width); PrintDebugString("[INFO]: Width = %d", rectInfo->width);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleWidthTextRectAtIndexFromContextMethod == 0"); PrintDebugString("[INFO]: either env == 0 or getAccessibleWidthTextRectAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4256,9 +4254,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac ...@@ -4256,9 +4254,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRect(jobject accessibleContext, Ac
getAccessibleHeightTextRectAtIndexFromContextMethod, getAccessibleHeightTextRectAtIndexFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleHeightTextRect - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleHeightTextRect - call to CallIntMethod()", FALSE);
PrintDebugString(" Height = %d", rectInfo->height); PrintDebugString("[INFO]: Height = %d", rectInfo->height);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleHeightTextRectAtIndexFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleHeightTextRectAtIndexFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4275,7 +4273,7 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi ...@@ -4275,7 +4273,7 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getCaretLocation(%p), index = %d", PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getCaretLocation(%p), index = %d",
accessibleContext, index); accessibleContext, index);
// Verify the Java VM still exists and AccessibleContext is // Verify the Java VM still exists and AccessibleContext is
...@@ -4290,9 +4288,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi ...@@ -4290,9 +4288,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi
getCaretLocationXMethod, getCaretLocationXMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting caret X coordinate - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting caret X coordinate - call to CallIntMethod()", FALSE);
PrintDebugString(" X coord = %d", rectInfo->x); PrintDebugString("[INFO]: X coord = %d", rectInfo->x);
} else { } else {
PrintDebugString(" Error! either env == 0 or getCaretLocationXMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getCaretLocationXMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4302,9 +4300,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi ...@@ -4302,9 +4300,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi
getCaretLocationYMethod, getCaretLocationYMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting caret Y coordinate - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting caret Y coordinate - call to CallIntMethod()", FALSE);
PrintDebugString(" Y coord = %d", rectInfo->y); PrintDebugString("[INFO]: Y coord = %d", rectInfo->y);
} else { } else {
PrintDebugString(" Error! either env == 0 or getCaretLocationYMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getCaretLocationYMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4314,9 +4312,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi ...@@ -4314,9 +4312,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi
getCaretLocationWidthMethod, getCaretLocationWidthMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting caret width - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting caret width - call to CallIntMethod()", FALSE);
PrintDebugString(" Width = %d", rectInfo->width); PrintDebugString("[INFO]: Width = %d", rectInfo->width);
} else { } else {
PrintDebugString(" Error! either env == 0 or getCaretLocationWidthMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getCaretLocationWidthMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4326,9 +4324,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi ...@@ -4326,9 +4324,9 @@ AccessBridgeJavaEntryPoints::getCaretLocation(jobject accessibleContext, Accessi
getCaretLocationHeightMethod, getCaretLocationHeightMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting caret height - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting caret height - call to CallIntMethod()", FALSE);
PrintDebugString(" Height = %d", rectInfo->height); PrintDebugString("[INFO]: Height = %d", rectInfo->height);
} else { } else {
PrintDebugString(" Error! either env == 0 or getCaretLocationHeightMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getCaretLocationHeightMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4342,7 +4340,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleConte ...@@ -4342,7 +4340,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleConte
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(%p):", accessibleContext);
// Verify the Java VM still exists and AccessibleContext is // Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText // an instance of AccessibleText
...@@ -4356,9 +4354,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleConte ...@@ -4356,9 +4354,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleConte
getAccessibleTextLineLeftBoundsFromContextMethod, getAccessibleTextLineLeftBoundsFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleTextLineLeftBounds - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextLineLeftBounds - call to CallIntMethod()", FALSE);
PrintDebugString(" startIndex = %d", *startIndex); PrintDebugString("[INFO]: startIndex = %d", *startIndex);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextLineLeftBoundsFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextLineLeftBoundsFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4368,9 +4366,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleConte ...@@ -4368,9 +4366,9 @@ AccessBridgeJavaEntryPoints::getAccessibleTextLineBounds(jobject accessibleConte
getAccessibleTextLineRightBoundsFromContextMethod, getAccessibleTextLineRightBoundsFromContextMethod,
accessibleContext, index); accessibleContext, index);
EXCEPTION_CHECK("Getting AccessibleTextLineRightBounds - call to CallIntMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextLineRightBounds - call to CallIntMethod()", FALSE);
PrintDebugString(" endIndex = %d", *endIndex); PrintDebugString("[INFO]: endIndex = %d", *endIndex);
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextLineRightBoundsFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextLineRightBoundsFromContextMethod == 0");
return FALSE; return FALSE;
} }
...@@ -4385,7 +4383,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRange(jobject accessibleContext, ...@@ -4385,7 +4383,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRange(jobject accessibleContext,
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleTextRange(%p, %d, %d, *text, %d):", accessibleContext, start, end, len); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleTextRange(%p, %d, %d, *text, %d):", accessibleContext, start, end, len);
// Verify the Java VM still exists and AccessibleContext is // Verify the Java VM still exists and AccessibleContext is
// an instance of AccessibleText // an instance of AccessibleText
...@@ -4395,7 +4393,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRange(jobject accessibleContext, ...@@ -4395,7 +4393,7 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRange(jobject accessibleContext,
// range is inclusive // range is inclusive
if (end < start) { if (end < start) {
PrintDebugString(" Error! end < start!"); PrintDebugString("[ERROR]: end < start!");
text[0] = (wchar_t) 0; text[0] = (wchar_t) 0;
return FALSE; return FALSE;
} }
...@@ -4406,32 +4404,32 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRange(jobject accessibleContext, ...@@ -4406,32 +4404,32 @@ AccessBridgeJavaEntryPoints::getAccessibleTextRange(jobject accessibleContext,
getAccessibleTextRangeFromContextMethod, getAccessibleTextRangeFromContextMethod,
accessibleContext, start, end); accessibleContext, start, end);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringChars()", FALSE);
wPrintDebugString(L" Accessible Text stringBytes returned from Java = %ls", stringBytes); wPrintDebugString(L"[INFO]: Accessible Text stringBytes returned from Java = %ls", stringBytes);
wcsncpy(text, stringBytes, len); wcsncpy(text, stringBytes, len);
length = jniEnv->GetStringLength(js); length = jniEnv->GetStringLength(js);
PrintDebugString(" Accessible Text stringBytes length = %d", length); PrintDebugString("[INFO]: Accessible Text stringBytes length = %d", length);
text[length < len ? length : len - 2] = (wchar_t) 0; text[length < len ? length : len - 2] = (wchar_t) 0;
wPrintDebugString(L" Accessible Text 'text' after null termination = %ls", text); wPrintDebugString(L"[INFO]: Accessible Text 'text' after null termination = %ls", text);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringLength()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextRange - call to GetStringLength()", FALSE);
jniEnv->ReleaseStringChars(js, stringBytes); jniEnv->ReleaseStringChars(js, stringBytes);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to ReleaseStringChars()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextRange - call to ReleaseStringChars()", FALSE);
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextRange - call to CallVoidMethod()", FALSE);
wPrintDebugString(L" Accessible Text range = %ls", text); wPrintDebugString(L"[INFO]: Accessible Text range = %ls", text);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting AccessibleTextRange - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting AccessibleTextRange - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" current Accessible Text range is null."); PrintDebugString("[WARN]: current Accessible Text range is null.");
text[0] = (wchar_t) 0; text[0] = (wchar_t) 0;
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleTextRangeFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleTextRangeFromContextMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -4446,7 +4444,7 @@ AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(jobject access ...@@ -4446,7 +4444,7 @@ AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(jobject access
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(%p):", accessibleContext);
// Get the current Accessible Value // Get the current Accessible Value
if (getCurrentAccessibleValueFromContextMethod != (jmethodID) 0) { if (getCurrentAccessibleValueFromContextMethod != (jmethodID) 0) {
...@@ -4454,7 +4452,7 @@ AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(jobject access ...@@ -4454,7 +4452,7 @@ AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(jobject access
getCurrentAccessibleValueFromContextMethod, getCurrentAccessibleValueFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to GetStringChars()", FALSE);
...@@ -4467,16 +4465,16 @@ AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(jobject access ...@@ -4467,16 +4465,16 @@ AccessBridgeJavaEntryPoints::getCurrentAccessibleValueFromContext(jobject access
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to CallVoidMethod()", FALSE);
PrintDebugString(" current Accessible Value = %s", value); PrintDebugString("[INFO]: current Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting CurrentAccessibleValue - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" current Accessible Value is null."); PrintDebugString("[WARN]: current Accessible Value is null.");
value[0] = (wchar_t) 0; value[0] = (wchar_t) 0;
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getCurrentAccessibleValueFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getCurrentAccessibleValueFromContextMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -4489,7 +4487,7 @@ AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(jobject access ...@@ -4489,7 +4487,7 @@ AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(jobject access
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(%p):", accessibleContext);
// Get the maximum Accessible Value // Get the maximum Accessible Value
if (getMaximumAccessibleValueFromContextMethod != (jmethodID) 0) { if (getMaximumAccessibleValueFromContextMethod != (jmethodID) 0) {
...@@ -4497,7 +4495,7 @@ AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(jobject access ...@@ -4497,7 +4495,7 @@ AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(jobject access
getMaximumAccessibleValueFromContextMethod, getMaximumAccessibleValueFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to GetStringChars()", FALSE);
...@@ -4510,16 +4508,16 @@ AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(jobject access ...@@ -4510,16 +4508,16 @@ AccessBridgeJavaEntryPoints::getMaximumAccessibleValueFromContext(jobject access
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to CallVoidMethod()", FALSE);
PrintDebugString(" maximum Accessible Value = %s", value); PrintDebugString("[INFO]: maximum Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting MaximumAccessibleValue - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" maximum Accessible Value is null."); PrintDebugString("[WARN]: maximum Accessible Value is null.");
value[0] = (wchar_t) 0; value[0] = (wchar_t) 0;
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getMaximumAccessibleValueFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getMaximumAccessibleValueFromContextMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -4532,7 +4530,7 @@ AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(jobject access ...@@ -4532,7 +4530,7 @@ AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(jobject access
jthrowable exception; jthrowable exception;
jsize length; jsize length;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(%p):", accessibleContext);
// Get the mimimum Accessible Value // Get the mimimum Accessible Value
if (getMinimumAccessibleValueFromContextMethod != (jmethodID) 0) { if (getMinimumAccessibleValueFromContextMethod != (jmethodID) 0) {
...@@ -4540,7 +4538,7 @@ AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(jobject access ...@@ -4540,7 +4538,7 @@ AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(jobject access
getMinimumAccessibleValueFromContextMethod, getMinimumAccessibleValueFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallObjectMethod()", FALSE); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallObjectMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod(), js = %p", js); PrintDebugString("[INFO]: returned from CallObjectMethod(), js = %p", js);
if (js != (jstring) 0) { if (js != (jstring) 0) {
stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0); stringBytes = (const wchar_t *) jniEnv->GetStringChars(js, 0);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to GetStringChars()", FALSE); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to GetStringChars()", FALSE);
...@@ -4553,16 +4551,16 @@ AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(jobject access ...@@ -4553,16 +4551,16 @@ AccessBridgeJavaEntryPoints::getMinimumAccessibleValueFromContext(jobject access
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
decrementReferenceMethod, js); decrementReferenceMethod, js);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to CallVoidMethod()", FALSE);
PrintDebugString(" mimimum Accessible Value = %s", value); PrintDebugString("[INFO]: mimimum Accessible Value = %s", value);
jniEnv->DeleteLocalRef(js); jniEnv->DeleteLocalRef(js);
EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to DeleteLocalRef()", FALSE); EXCEPTION_CHECK("Getting MinimumAccessibleValue - call to DeleteLocalRef()", FALSE);
} else { } else {
PrintDebugString(" mimimum Accessible Value is null."); PrintDebugString("[WARN]: mimimum Accessible Value is null.");
value[0] = (wchar_t) 0; value[0] = (wchar_t) 0;
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or getMinimumAccessibleValueFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getMinimumAccessibleValueFromContextMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -4575,7 +4573,7 @@ void ...@@ -4575,7 +4573,7 @@ void
AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(jobject accessibleContext, int i) { AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(%p):", accessibleContext);
// Add the child to the AccessibleSelection // Add the child to the AccessibleSelection
if (addAccessibleSelectionFromContextMethod != (jmethodID) 0) { if (addAccessibleSelectionFromContextMethod != (jmethodID) 0) {
...@@ -4583,9 +4581,9 @@ AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(jobject accessibl ...@@ -4583,9 +4581,9 @@ AccessBridgeJavaEntryPoints::addAccessibleSelectionFromContext(jobject accessibl
addAccessibleSelectionFromContextMethod, addAccessibleSelectionFromContextMethod,
accessibleContext, i); accessibleContext, i);
EXCEPTION_CHECK_VOID("Doing addAccessibleSelection - call to CallVoidMethod()"); EXCEPTION_CHECK_VOID("Doing addAccessibleSelection - call to CallVoidMethod()");
PrintDebugString(" returned from CallObjectMethod()"); PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else { } else {
PrintDebugString(" Error! either env == 0 or addAccessibleSelectionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or addAccessibleSelectionFromContextMethod == 0");
} }
} }
...@@ -4593,7 +4591,7 @@ void ...@@ -4593,7 +4591,7 @@ void
AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(jobject accessibleContext) { AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(jobject accessibleContext) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(%p):", accessibleContext);
// Clearing the Selection of the AccessibleSelection // Clearing the Selection of the AccessibleSelection
if (clearAccessibleSelectionFromContextMethod != (jmethodID) 0) { if (clearAccessibleSelectionFromContextMethod != (jmethodID) 0) {
...@@ -4601,9 +4599,9 @@ AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(jobject accessi ...@@ -4601,9 +4599,9 @@ AccessBridgeJavaEntryPoints::clearAccessibleSelectionFromContext(jobject accessi
clearAccessibleSelectionFromContextMethod, clearAccessibleSelectionFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK_VOID("Doing clearAccessibleSelection - call to CallVoidMethod()"); EXCEPTION_CHECK_VOID("Doing clearAccessibleSelection - call to CallVoidMethod()");
PrintDebugString(" returned from CallObjectMethod()"); PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else { } else {
PrintDebugString(" Error! either env == 0 or clearAccessibleSelectionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or clearAccessibleSelectionFromContextMethod == 0");
} }
} }
...@@ -4613,7 +4611,7 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(jobject accessibl ...@@ -4613,7 +4611,7 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(jobject accessibl
jobject globalRef; jobject globalRef;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(%p):", accessibleContext);
if (getAccessibleSelectionContextFromContextMethod != (jmethodID) 0) { if (getAccessibleSelectionContextFromContextMethod != (jmethodID) 0) {
returnedAccessibleContext = jniEnv->CallObjectMethod( returnedAccessibleContext = jniEnv->CallObjectMethod(
...@@ -4625,11 +4623,11 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(jobject accessibl ...@@ -4625,11 +4623,11 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionFromContext(jobject accessibl
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to NewGlobalRef()", (jobject) 0); EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to NewGlobalRef()", (jobject) 0);
jniEnv->DeleteLocalRef(returnedAccessibleContext); jniEnv->DeleteLocalRef(returnedAccessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to DeleteLocalRef()", (jobject) 0); EXCEPTION_CHECK("Getting AccessibleSelectionContext - call to DeleteLocalRef()", (jobject) 0);
PrintDebugString(" Returning - returnedAccessibleContext = %p; globalRef = %p", PrintDebugString("[INFO]: Returning - returnedAccessibleContext = %p; globalRef = %p",
returnedAccessibleContext, globalRef); returnedAccessibleContext, globalRef);
return globalRef; return globalRef;
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleSelectionContextFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionContextFromContextMethod == 0");
return (jobject) 0; return (jobject) 0;
} }
} }
...@@ -4639,7 +4637,7 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(jobject acce ...@@ -4639,7 +4637,7 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(jobject acce
int count; int count;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(%p):", accessibleContext);
// Get (& return) the # of items selected in the AccessibleSelection // Get (& return) the # of items selected in the AccessibleSelection
if (getAccessibleSelectionCountFromContextMethod != (jmethodID) 0) { if (getAccessibleSelectionCountFromContextMethod != (jmethodID) 0) {
...@@ -4647,10 +4645,10 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(jobject acce ...@@ -4647,10 +4645,10 @@ AccessBridgeJavaEntryPoints::getAccessibleSelectionCountFromContext(jobject acce
getAccessibleSelectionCountFromContextMethod, getAccessibleSelectionCountFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK("Getting AccessibleSelectionCount - call to CallIntMethod()", -1); EXCEPTION_CHECK("Getting AccessibleSelectionCount - call to CallIntMethod()", -1);
PrintDebugString(" returned from CallObjectMethod()"); PrintDebugString("[INFO]: returned from CallObjectMethod()");
return count; return count;
} else { } else {
PrintDebugString(" Error! either env == 0 or getAccessibleSelectionCountFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or getAccessibleSelectionCountFromContextMethod == 0");
return -1; return -1;
} }
} }
...@@ -4660,7 +4658,7 @@ AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(jobject access ...@@ -4660,7 +4658,7 @@ AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(jobject access
jboolean result; jboolean result;
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(%p):", accessibleContext);
// Get (& return) the # of items selected in the AccessibleSelection // Get (& return) the # of items selected in the AccessibleSelection
if (isAccessibleChildSelectedFromContextMethod != (jmethodID) 0) { if (isAccessibleChildSelectedFromContextMethod != (jmethodID) 0) {
...@@ -4668,12 +4666,12 @@ AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(jobject access ...@@ -4668,12 +4666,12 @@ AccessBridgeJavaEntryPoints::isAccessibleChildSelectedFromContext(jobject access
isAccessibleChildSelectedFromContextMethod, isAccessibleChildSelectedFromContextMethod,
accessibleContext, i); accessibleContext, i);
EXCEPTION_CHECK("Doing isAccessibleChildSelected - call to CallBooleanMethod()", FALSE); EXCEPTION_CHECK("Doing isAccessibleChildSelected - call to CallBooleanMethod()", FALSE);
PrintDebugString(" returned from CallObjectMethod()"); PrintDebugString("[INFO]: returned from CallObjectMethod()");
if (result != 0) { if (result != 0) {
return TRUE; return TRUE;
} }
} else { } else {
PrintDebugString(" Error! either env == 0 or isAccessibleChildSelectedFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or isAccessibleChildSelectedFromContextMethod == 0");
} }
return FALSE; return FALSE;
} }
...@@ -4683,7 +4681,7 @@ void ...@@ -4683,7 +4681,7 @@ void
AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(jobject accessibleContext, int i) { AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(jobject accessibleContext, int i) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(%p):", accessibleContext);
// Remove the i-th child from the AccessibleSelection // Remove the i-th child from the AccessibleSelection
if (removeAccessibleSelectionFromContextMethod != (jmethodID) 0) { if (removeAccessibleSelectionFromContextMethod != (jmethodID) 0) {
...@@ -4691,9 +4689,9 @@ AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(jobject access ...@@ -4691,9 +4689,9 @@ AccessBridgeJavaEntryPoints::removeAccessibleSelectionFromContext(jobject access
removeAccessibleSelectionFromContextMethod, removeAccessibleSelectionFromContextMethod,
accessibleContext, i); accessibleContext, i);
EXCEPTION_CHECK_VOID("Doing removeAccessibleSelection - call to CallVoidMethod()"); EXCEPTION_CHECK_VOID("Doing removeAccessibleSelection - call to CallVoidMethod()");
PrintDebugString(" returned from CallObjectMethod()"); PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else { } else {
PrintDebugString(" Error! either env == 0 or removeAccessibleSelectionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or removeAccessibleSelectionFromContextMethod == 0");
} }
} }
...@@ -4701,7 +4699,7 @@ void ...@@ -4701,7 +4699,7 @@ void
AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(jobject accessibleContext) { AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(jobject accessibleContext) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\nCalling AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(%p):", accessibleContext); PrintDebugString("[INFO]: Calling AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(%p):", accessibleContext);
// Select all children (if possible) of the AccessibleSelection // Select all children (if possible) of the AccessibleSelection
if (selectAllAccessibleSelectionFromContextMethod != (jmethodID) 0) { if (selectAllAccessibleSelectionFromContextMethod != (jmethodID) 0) {
...@@ -4709,9 +4707,9 @@ AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(jobject acc ...@@ -4709,9 +4707,9 @@ AccessBridgeJavaEntryPoints::selectAllAccessibleSelectionFromContext(jobject acc
selectAllAccessibleSelectionFromContextMethod, selectAllAccessibleSelectionFromContextMethod,
accessibleContext); accessibleContext);
EXCEPTION_CHECK_VOID("Doing selectAllAccessibleSelection - call to CallVoidMethod()"); EXCEPTION_CHECK_VOID("Doing selectAllAccessibleSelection - call to CallVoidMethod()");
PrintDebugString(" returned from CallObjectMethod()"); PrintDebugString("[INFO]: returned from CallObjectMethod()");
} else { } else {
PrintDebugString(" Error! either env == 0 or selectAllAccessibleSelectionFromContextMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or selectAllAccessibleSelectionFromContextMethod == 0");
} }
} }
...@@ -4722,7 +4720,7 @@ BOOL ...@@ -4722,7 +4720,7 @@ BOOL
AccessBridgeJavaEntryPoints::addJavaEventNotification(jlong type) { AccessBridgeJavaEntryPoints::addJavaEventNotification(jlong type) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::addJavaEventNotification(%016I64X);", type); PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::addJavaEventNotification(%016I64X);", type);
// Let AccessBridge know we want to add an event type // Let AccessBridge know we want to add an event type
if (addJavaEventNotificationMethod != (jmethodID) 0) { if (addJavaEventNotificationMethod != (jmethodID) 0) {
...@@ -4730,7 +4728,7 @@ AccessBridgeJavaEntryPoints::addJavaEventNotification(jlong type) { ...@@ -4730,7 +4728,7 @@ AccessBridgeJavaEntryPoints::addJavaEventNotification(jlong type) {
addJavaEventNotificationMethod, type); addJavaEventNotificationMethod, type);
EXCEPTION_CHECK("Doing addJavaEventNotification - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Doing addJavaEventNotification - call to CallVoidMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or addJavaEventNotificationMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or addJavaEventNotificationMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -4740,7 +4738,7 @@ BOOL ...@@ -4740,7 +4738,7 @@ BOOL
AccessBridgeJavaEntryPoints::removeJavaEventNotification(jlong type) { AccessBridgeJavaEntryPoints::removeJavaEventNotification(jlong type) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::removeJavaEventNotification(%016I64X):", type); PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::removeJavaEventNotification(%016I64X):", type);
// Let AccessBridge know we want to remove an event type // Let AccessBridge know we want to remove an event type
if (removeJavaEventNotificationMethod != (jmethodID) 0) { if (removeJavaEventNotificationMethod != (jmethodID) 0) {
...@@ -4748,7 +4746,7 @@ AccessBridgeJavaEntryPoints::removeJavaEventNotification(jlong type) { ...@@ -4748,7 +4746,7 @@ AccessBridgeJavaEntryPoints::removeJavaEventNotification(jlong type) {
removeJavaEventNotificationMethod, type); removeJavaEventNotificationMethod, type);
EXCEPTION_CHECK("Doing removeJavaEventNotification - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Doing removeJavaEventNotification - call to CallVoidMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or removeJavaEventNotificationMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or removeJavaEventNotificationMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -4758,19 +4756,19 @@ BOOL ...@@ -4758,19 +4756,19 @@ BOOL
AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(jlong type) { AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(jlong type) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(%016I64X);", type); PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::addAccessibilityEventNotification(%016I64X);", type);
// Let AccessBridge know we want to add an event type // Let AccessBridge know we want to add an event type
if (addAccessibilityEventNotificationMethod != (jmethodID) 0) { if (addAccessibilityEventNotificationMethod != (jmethodID) 0) {
PrintDebugString("\r\n addAccessibilityEventNotification: calling void method: accessBridgeObject = %p", accessBridgeObject); PrintDebugString("[INFO]: addAccessibilityEventNotification: calling void method: accessBridgeObject = %p", accessBridgeObject);
jniEnv->CallVoidMethod(accessBridgeObject, jniEnv->CallVoidMethod(accessBridgeObject,
addAccessibilityEventNotificationMethod, type); addAccessibilityEventNotificationMethod, type);
EXCEPTION_CHECK("Doing addAccessibilityEvent - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Doing addAccessibilityEvent - call to CallVoidMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or addAccessibilityEventNotificationMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or addAccessibilityEventNotificationMethod == 0");
return FALSE; return FALSE;
} }
PrintDebugString("\r\n addAccessibilityEventNotification: just returning true"); PrintDebugString("[INFO]: addAccessibilityEventNotification: just returning true");
return TRUE; return TRUE;
} }
...@@ -4778,7 +4776,7 @@ BOOL ...@@ -4778,7 +4776,7 @@ BOOL
AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(jlong type) { AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(jlong type) {
jthrowable exception; jthrowable exception;
PrintDebugString("\r\n in AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(%016I64X):", type); PrintDebugString("[INFO]: in AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(%016I64X):", type);
// Let AccessBridge know we want to remove an event type // Let AccessBridge know we want to remove an event type
if (removeAccessibilityEventNotificationMethod != (jmethodID) 0) { if (removeAccessibilityEventNotificationMethod != (jmethodID) 0) {
...@@ -4786,7 +4784,7 @@ AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(jlong type) { ...@@ -4786,7 +4784,7 @@ AccessBridgeJavaEntryPoints::removeAccessibilityEventNotification(jlong type) {
removeAccessibilityEventNotificationMethod, type); removeAccessibilityEventNotificationMethod, type);
EXCEPTION_CHECK("Doing removeAccessibilityEvent - call to CallVoidMethod()", FALSE); EXCEPTION_CHECK("Doing removeAccessibilityEvent - call to CallVoidMethod()", FALSE);
} else { } else {
PrintDebugString(" Error! either env == 0 or removeAccessibilityEventNotificationMethod == 0"); PrintDebugString("[ERROR]: either env == 0 or removeAccessibilityEventNotificationMethod == 0");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
......
...@@ -198,8 +198,8 @@ AccessBridgeJavaVMInstance::sendPackage(char *buffer, long bufsize) { ...@@ -198,8 +198,8 @@ AccessBridgeJavaVMInstance::sendPackage(char *buffer, long bufsize) {
toCopy.cbData = bufsize; toCopy.cbData = bufsize;
toCopy.lpData = buffer; toCopy.lpData = buffer;
PrintDebugString("In AccessBridgeVMInstance::sendPackage"); PrintDebugString("[INFO]: In AccessBridgeVMInstance::sendPackage");
PrintDebugString(" javaAccessBridgeWindow: %p", javaAccessBridgeWindow); PrintDebugString("[INFO]: javaAccessBridgeWindow: %p", javaAccessBridgeWindow);
/* This was SendMessage. Normally that is a blocking call. However, if /* This was SendMessage. Normally that is a blocking call. However, if
* SendMessage is sent to another process, e.g. another JVM and an incoming * SendMessage is sent to another process, e.g. another JVM and an incoming
* SendMessage is pending, control will be passed to the DialogProc to handle * SendMessage is pending, control will be passed to the DialogProc to handle
...@@ -280,7 +280,7 @@ AccessBridgeJavaVMInstance::sendMemoryPackage(char *buffer, long bufsize) { ...@@ -280,7 +280,7 @@ AccessBridgeJavaVMInstance::sendMemoryPackage(char *buffer, long bufsize) {
char *done = &memoryMappedView[bufsize]; char *done = &memoryMappedView[bufsize];
*done = 0; *done = 0;
PrintDebugString(" javaAccessBridgeWindow: %p", javaAccessBridgeWindow); PrintDebugString("[INFO]: javaAccessBridgeWindow: %p", javaAccessBridgeWindow);
// See the comment above the call to SendMessageTimeout in SendPackage method above. // See the comment above the call to SendMessageTimeout in SendPackage method above.
UINT flags = SMTO_BLOCK | SMTO_NOTIMEOUTIFNOTHUNG; UINT flags = SMTO_BLOCK | SMTO_NOTIMEOUTIFNOTHUNG;
DWORD_PTR out; // not used DWORD_PTR out; // not used
...@@ -309,7 +309,7 @@ AccessBridgeJavaVMInstance::sendMemoryPackage(char *buffer, long bufsize) { ...@@ -309,7 +309,7 @@ AccessBridgeJavaVMInstance::sendMemoryPackage(char *buffer, long bufsize) {
*/ */
HWND HWND
AccessBridgeJavaVMInstance::findAccessBridgeWindow(long javaVMID) { AccessBridgeJavaVMInstance::findAccessBridgeWindow(long javaVMID) {
PrintDebugString("In findAccessBridgeWindow"); PrintDebugString("[INFO]: In findAccessBridgeWindow");
// no need to recurse really // no need to recurse really
if (vmID == javaVMID) { if (vmID == javaVMID) {
return javaAccessBridgeWindow; return javaAccessBridgeWindow;
...@@ -338,7 +338,7 @@ AccessBridgeJavaVMInstance::findAccessBridgeWindow(long javaVMID) { ...@@ -338,7 +338,7 @@ AccessBridgeJavaVMInstance::findAccessBridgeWindow(long javaVMID) {
*/ */
AccessBridgeJavaVMInstance * AccessBridgeJavaVMInstance *
AccessBridgeJavaVMInstance::findABJavaVMInstanceFromJavaHWND(HWND window) { AccessBridgeJavaVMInstance::findABJavaVMInstanceFromJavaHWND(HWND window) {
PrintDebugString("In findABJavaInstanceFromJavaHWND"); PrintDebugString("[INFO]: In findABJavaInstanceFromJavaHWND");
// no need to recurse really // no need to recurse really
if (javaAccessBridgeWindow == window) { if (javaAccessBridgeWindow == window) {
return this; return this;
......
...@@ -88,17 +88,17 @@ AccessBridgeMessageQueue::getEventsWaiting() { ...@@ -88,17 +88,17 @@ AccessBridgeMessageQueue::getEventsWaiting() {
*/ */
QueueReturns QueueReturns
AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) { AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) {
PrintDebugString(" in AccessBridgeMessageQueue::add()"); PrintDebugString("[INFO]: in AccessBridgeMessageQueue::add()");
PrintDebugString(" queue size = %d", size); PrintDebugString("[INFO]: queue size = %d", size);
QueueReturns returnVal = cElementPushedOK; QueueReturns returnVal = cElementPushedOK;
if (queueLocked) { if (queueLocked) {
PrintDebugString(" queue was locked; returning cQueueInUse!"); PrintDebugString("[WARN]: queue was locked; returning cQueueInUse!");
return cQueueInUse; return cQueueInUse;
} }
queueLocked = TRUE; queueLocked = TRUE;
{ {
PrintDebugString(" adding element to queue!"); PrintDebugString("[INFO]: adding element to queue!");
if (end == (AccessBridgeQueueElement *) 0) { if (end == (AccessBridgeQueueElement *) 0) {
if (start == (AccessBridgeQueueElement *) 0 && size == 0) { if (start == (AccessBridgeQueueElement *) 0 && size == 0) {
start = element; start = element;
...@@ -118,7 +118,7 @@ AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) { ...@@ -118,7 +118,7 @@ AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) {
} }
} }
queueLocked = FALSE; queueLocked = FALSE;
PrintDebugString(" returning from AccessBridgeMessageQueue::add()"); PrintDebugString("[INFO]: returning from AccessBridgeMessageQueue::add()");
return returnVal; return returnVal;
} }
...@@ -129,17 +129,17 @@ AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) { ...@@ -129,17 +129,17 @@ AccessBridgeMessageQueue::add(AccessBridgeQueueElement *element) {
*/ */
QueueReturns QueueReturns
AccessBridgeMessageQueue::remove(AccessBridgeQueueElement **element) { AccessBridgeMessageQueue::remove(AccessBridgeQueueElement **element) {
PrintDebugString(" in AccessBridgeMessageQueue::remove()"); PrintDebugString("[INFO]: in AccessBridgeMessageQueue::remove()");
PrintDebugString(" queue size = %d", size); PrintDebugString("[INFO]: queue size = %d", size);
QueueReturns returnVal = cMoreMessages; QueueReturns returnVal = cMoreMessages;
if (queueLocked) { if (queueLocked) {
PrintDebugString(" queue was locked; returning cQueueInUse!"); PrintDebugString("[WARN]: queue was locked; returning cQueueInUse!");
return cQueueInUse; return cQueueInUse;
} }
queueLocked = TRUE; queueLocked = TRUE;
{ {
PrintDebugString(" removing element from queue!"); PrintDebugString("[INFO]: removing element from queue!");
if (size > 0) { if (size > 0) {
if (start != (AccessBridgeQueueElement *) 0) { if (start != (AccessBridgeQueueElement *) 0) {
*element = start; *element = start;
...@@ -161,7 +161,7 @@ AccessBridgeMessageQueue::remove(AccessBridgeQueueElement **element) { ...@@ -161,7 +161,7 @@ AccessBridgeMessageQueue::remove(AccessBridgeQueueElement **element) {
} }
} }
queueLocked = FALSE; queueLocked = FALSE;
PrintDebugString(" returning from AccessBridgeMessageQueue::remove()"); PrintDebugString("[INFO]: returning from AccessBridgeMessageQueue::remove()");
return returnVal; return returnVal;
} }
......
/* /*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -87,7 +87,7 @@ extern "C" { ...@@ -87,7 +87,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_com_sun_java_accessibility_AccessBridge_runDLL(JNIEnv *env, jobject obj) { Java_com_sun_java_accessibility_AccessBridge_runDLL(JNIEnv *env, jobject obj) {
PrintDebugString("\r\nJavaAccessBridge.DLL runDLL() called"); PrintDebugString("[INFO]: JavaAccessBridge.DLL runDLL() called");
theJavaAccessBridge->javaRun(env, obj); theJavaAccessBridge->javaRun(env, obj);
} }
...@@ -102,20 +102,20 @@ extern "C" { ...@@ -102,20 +102,20 @@ extern "C" {
switch (message) { switch (message) {
case WM_INITDIALOG: case WM_INITDIALOG:
PrintDebugString("In AccessBridgeDialog - Initializing"); PrintDebugString("[INFO]: In AccessBridgeDialog - Initializing");
break; break;
case WM_COMMAND: case WM_COMMAND:
command = LOWORD (wParam); command = LOWORD (wParam);
PrintDebugString("In AccessBridgeDialog - Got WM_COMMAND, command: %X", command); PrintDebugString("[INFO]: In AccessBridgeDialog - Got WM_COMMAND, command: %X", command);
break; break;
// call from Java with data for us to deliver // call from Java with data for us to deliver
case WM_COPYDATA: case WM_COPYDATA:
if (theDialogWindow == (HWND) wParam) { if (theDialogWindow == (HWND) wParam) {
PrintDebugString("In AccessBridgeDialog - Got WM_COPYDATA from ourselves"); PrintDebugString("[INFO]: In AccessBridgeDialog - Got WM_COPYDATA from ourselves");
} else { } else {
PrintDebugString("In AccessBridgeDialog - Got WM_COPYDATA from HWND %p", wParam); PrintDebugString("[INFO]: In AccessBridgeDialog - Got WM_COPYDATA from HWND %p", wParam);
sentToUs = (COPYDATASTRUCT *) lParam; sentToUs = (COPYDATASTRUCT *) lParam;
package = (char *) sentToUs->lpData; package = (char *) sentToUs->lpData;
theJavaAccessBridge->processPackage(package, sentToUs->cbData); theJavaAccessBridge->processPackage(package, sentToUs->cbData);
...@@ -127,16 +127,16 @@ extern "C" { ...@@ -127,16 +127,16 @@ extern "C" {
// wParam == sourceHwnd // wParam == sourceHwnd
// lParam == buffer size in shared memory // lParam == buffer size in shared memory
if (theDialogWindow == (HWND) wParam) { if (theDialogWindow == (HWND) wParam) {
PrintDebugString("In AccessBridgeDialog - Got AB_MESSAGE_WAITING from ourselves"); PrintDebugString("[INFO]: In AccessBridgeDialog - Got AB_MESSAGE_WAITING from ourselves");
} else { } else {
PrintDebugString("In AccessBridgeDialog - Got AB_MESSAGE_WAITING from HWND %p", wParam); PrintDebugString("[INFO]: In AccessBridgeDialog - Got AB_MESSAGE_WAITING from HWND %p", wParam);
LRESULT returnVal = theJavaAccessBridge->receiveMemoryPackage((HWND) wParam, (long) lParam); LRESULT returnVal = theJavaAccessBridge->receiveMemoryPackage((HWND) wParam, (long) lParam);
} }
break; break;
// a JavaAccessBridge DLL is going away // a JavaAccessBridge DLL is going away
case AB_DLL_GOING_AWAY: case AB_DLL_GOING_AWAY:
PrintDebugString("In AccessBridgeDialog - Got AB_DLL_GOING_AWAY message"); PrintDebugString("[INFO]: In AccessBridgeDialog - Got AB_DLL_GOING_AWAY message");
theJavaAccessBridge->WindowsATDestroyed((HWND) wParam); theJavaAccessBridge->WindowsATDestroyed((HWND) wParam);
break; break;
...@@ -147,7 +147,7 @@ extern "C" { ...@@ -147,7 +147,7 @@ extern "C" {
// A new Windows AT just said "hi"; // A new Windows AT just said "hi";
// say "hi" back so it can mate up with us // say "hi" back so it can mate up with us
// otherwise don't do anything (e.g. don't set up data structures yet) // otherwise don't do anything (e.g. don't set up data structures yet)
PrintDebugString("In AccessBridgeDialog - Got theFromWindowsHelloMsgID message"); PrintDebugString("[INFO]: In AccessBridgeDialog - Got theFromWindowsHelloMsgID message");
theJavaAccessBridge->postHelloToWindowsDLLMsg((HWND) wParam); theJavaAccessBridge->postHelloToWindowsDLLMsg((HWND) wParam);
} }
} }
...@@ -167,6 +167,7 @@ extern "C" { ...@@ -167,6 +167,7 @@ extern "C" {
JavaAccessBridge::JavaAccessBridge(HINSTANCE hInstance) { JavaAccessBridge::JavaAccessBridge(HINSTANCE hInstance) {
windowsInstance = hInstance; windowsInstance = hInstance;
ATs = (AccessBridgeATInstance *) 0; ATs = (AccessBridgeATInstance *) 0;
initializeFileLogger("java_access_bridge");
initBroadcastMessageIDs(); // get the unique to us broadcast msg. IDs initBroadcastMessageIDs(); // get the unique to us broadcast msg. IDs
} }
...@@ -179,7 +180,7 @@ extern DWORD JavaBridgeThreadId; ...@@ -179,7 +180,7 @@ extern DWORD JavaBridgeThreadId;
JavaAccessBridge::~JavaAccessBridge() { JavaAccessBridge::~JavaAccessBridge() {
// inform all other AccessBridges that we're going away // inform all other AccessBridges that we're going away
PrintDebugString("\r\nin JavaAccessBridge::~JavaAccessBridge()"); PrintDebugString("[INFO]: in JavaAccessBridge::~JavaAccessBridge()");
// Send a shutdown message for those applications like StarOffice that do // Send a shutdown message for those applications like StarOffice that do
// send a shutdown message themselves. // send a shutdown message themselves.
...@@ -187,13 +188,13 @@ JavaAccessBridge::~JavaAccessBridge() { ...@@ -187,13 +188,13 @@ JavaAccessBridge::~JavaAccessBridge() {
AccessBridgeATInstance *current = ATs; AccessBridgeATInstance *current = ATs;
while (current != (AccessBridgeATInstance *) 0) { while (current != (AccessBridgeATInstance *) 0) {
PrintDebugString(" telling %p we're going away", current->winAccessBridgeWindow); PrintDebugString("[INFO]: telling %p we're going away", current->winAccessBridgeWindow);
SendMessage(current->winAccessBridgeWindow, SendMessage(current->winAccessBridgeWindow,
AB_DLL_GOING_AWAY, (WPARAM) dialogWindow, (LPARAM) 0); AB_DLL_GOING_AWAY, (WPARAM) dialogWindow, (LPARAM) 0);
current = current->nextATInstance; current = current->nextATInstance;
} }
PrintDebugString(" finished telling ATs about our demise"); PrintDebugString("[INFO]: finished telling ATs about our demise");
if(JavaBridgeThreadId) if(JavaBridgeThreadId)
{ {
...@@ -203,8 +204,9 @@ JavaAccessBridge::~JavaAccessBridge() { ...@@ -203,8 +204,9 @@ JavaAccessBridge::~JavaAccessBridge() {
delete ATs; delete ATs;
PrintDebugString(" finished deleting ATs"); PrintDebugString("[INFO]: finished deleting ATs");
PrintDebugString("GOODBYE CRUEL WORLD..."); PrintDebugString("[INFO]: GOODBYE CRUEL WORLD...");
finalizeFileLogger();
} }
...@@ -212,17 +214,17 @@ void ...@@ -212,17 +214,17 @@ void
JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) { JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) {
MSG msg; MSG msg;
PrintDebugString("JavaAccessBridge::javaRun(%p, %p) called", env, obj); PrintDebugString("[INFO]: JavaAccessBridge::javaRun(%p, %p) called", env, obj);
if (env->GetJavaVM(&javaVM) != 0) { if (env->GetJavaVM(&javaVM) != 0) {
return; // huh!?!?! return; // huh!?!?!
} }
PrintDebugString(" -> javaVM = %p", javaVM); PrintDebugString("[INFO]: -> javaVM = %p", javaVM);
if (javaVM->AttachCurrentThread((void **) &windowsThreadJNIEnv, NULL) != 0) { if (javaVM->AttachCurrentThread((void **) &windowsThreadJNIEnv, NULL) != 0) {
return; // huh!?!?! return; // huh!?!?!
} }
PrintDebugString(" -> windowsThreadJNIEnv = %p", windowsThreadJNIEnv); PrintDebugString("[INFO]: -> windowsThreadJNIEnv = %p", windowsThreadJNIEnv);
javaThreadABObject = env->NewGlobalRef(obj); javaThreadABObject = env->NewGlobalRef(obj);
windowsThreadABObject = windowsThreadJNIEnv->NewGlobalRef(obj); windowsThreadABObject = windowsThreadJNIEnv->NewGlobalRef(obj);
...@@ -232,7 +234,7 @@ JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) { ...@@ -232,7 +234,7 @@ JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) {
if (javaThreadEntryPoints->BuildJavaEntryPoints() == FALSE) { if (javaThreadEntryPoints->BuildJavaEntryPoints() == FALSE) {
return; // couldn't build our entry points; let's get out of here! return; // couldn't build our entry points; let's get out of here!
} }
PrintDebugString(" all Java thread entry points successfully found."); PrintDebugString("[INFO]: all Java thread entry points successfully found.");
// initialize the Windows thread AccessBridge entry points // initialize the Windows thread AccessBridge entry points
windowsThreadEntryPoints = new AccessBridgeJavaEntryPoints(windowsThreadJNIEnv, windowsThreadEntryPoints = new AccessBridgeJavaEntryPoints(windowsThreadJNIEnv,
...@@ -240,12 +242,12 @@ JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) { ...@@ -240,12 +242,12 @@ JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) {
if (windowsThreadEntryPoints->BuildJavaEntryPoints() == FALSE) { if (windowsThreadEntryPoints->BuildJavaEntryPoints() == FALSE) {
return; // couldn't build our entry points; let's get out of here! return; // couldn't build our entry points; let's get out of here!
} }
PrintDebugString(" all Windows thread entry points successfully found."); PrintDebugString("[INFO]: all Windows thread entry points successfully found.");
// open our window // open our window
if (initWindow() == TRUE) { if (initWindow() == TRUE) {
PrintDebugString(" Window created. HWND = %p", dialogWindow); PrintDebugString("[INFO]: Window created. HWND = %p", dialogWindow);
// post a broadcast msg.; let other AccessBridge DLLs know we exist // post a broadcast msg.; let other AccessBridge DLLs know we exist
postHelloToWindowsDLLMsg(HWND_BROADCAST); postHelloToWindowsDLLMsg(HWND_BROADCAST);
...@@ -256,7 +258,7 @@ JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) { ...@@ -256,7 +258,7 @@ JavaAccessBridge::javaRun(JNIEnv *env, jobject obj) {
DispatchMessage(&msg); DispatchMessage(&msg);
} }
} else { } else {
PrintDebugString(" FAILED TO CREATE WINDOW!!!"); PrintDebugString("[ERROR]: FAILED TO CREATE WINDOW!!!");
} }
javaVM->DetachCurrentThread(); javaVM->DetachCurrentThread();
...@@ -303,8 +305,8 @@ JavaAccessBridge::initWindow() { ...@@ -303,8 +305,8 @@ JavaAccessBridge::initWindow() {
*/ */
void void
JavaAccessBridge::postHelloToWindowsDLLMsg(HWND destHwnd) { JavaAccessBridge::postHelloToWindowsDLLMsg(HWND destHwnd) {
PrintDebugString("\r\nIn JavaAccessBridge::postHelloToWindowsDLLMsg"); PrintDebugString("[INFO]: In JavaAccessBridge::postHelloToWindowsDLLMsg");
PrintDebugString(" calling PostMessage(%p, %X, %p, %p)", PrintDebugString("[INFO]: calling PostMessage(%p, %X, %p, %p)",
destHwnd, theFromJavaHelloMsgID, dialogWindow, dialogWindow); destHwnd, theFromJavaHelloMsgID, dialogWindow, dialogWindow);
PostMessage(destHwnd, theFromJavaHelloMsgID, (WPARAM) dialogWindow, (LPARAM) dialogWindow); PostMessage(destHwnd, theFromJavaHelloMsgID, (WPARAM) dialogWindow, (LPARAM) dialogWindow);
} }
...@@ -335,10 +337,10 @@ JavaAccessBridge::sendPackage(char *buffer, int bufsize, HWND destHwnd) { ...@@ -335,10 +337,10 @@ JavaAccessBridge::sendPackage(char *buffer, int bufsize, HWND destHwnd) {
void void
JavaAccessBridge::sendJavaEventPackage(char *buffer, int bufsize, long type) { JavaAccessBridge::sendJavaEventPackage(char *buffer, int bufsize, long type) {
PrintDebugString("JavaAccessBridge::sendJavaEventPackage(), type = %X", type); PrintDebugString("[INFO]: JavaAccessBridge::sendJavaEventPackage(), type = %X", type);
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
} }
AccessBridgeATInstance *ati = ATs; AccessBridgeATInstance *ati = ATs;
...@@ -355,10 +357,10 @@ JavaAccessBridge::sendJavaEventPackage(char *buffer, int bufsize, long type) { ...@@ -355,10 +357,10 @@ JavaAccessBridge::sendJavaEventPackage(char *buffer, int bufsize, long type) {
void void
JavaAccessBridge::sendAccessibilityEventPackage(char *buffer, int bufsize, long type) { JavaAccessBridge::sendAccessibilityEventPackage(char *buffer, int bufsize, long type) {
PrintDebugString("JavaAccessBridge::sendAccessibilityEventPackage(), type = %X", type); PrintDebugString("[INFO]: JavaAccessBridge::sendAccessibilityEventPackage(), type = %X", type);
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR] ATs == 0! (shouldn't happen here!)");
} }
AccessBridgeATInstance *ati = ATs; AccessBridgeATInstance *ati = ATs;
...@@ -383,11 +385,11 @@ BOOL ...@@ -383,11 +385,11 @@ BOOL
JavaAccessBridge::receiveMemoryPackage(HWND srcWindow, long bufsize) { JavaAccessBridge::receiveMemoryPackage(HWND srcWindow, long bufsize) {
char *IPCview; char *IPCview;
PrintDebugString("\r\nJavaAccessBridge::receiveMemoryPackage(%p, %d)", srcWindow, bufsize); PrintDebugString("[INFO]: JavaAccessBridge::receiveMemoryPackage(%p, %d)", srcWindow, bufsize);
// look-up the appropriate IPCview based on the srcHWND of the Windows AccessBridge DLL // look-up the appropriate IPCview based on the srcHWND of the Windows AccessBridge DLL
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR! - ATs == 0 (shouldn't happen in receiveMemoryPackage()!"); PrintDebugString("[ERROR]: - ATs == 0 (shouldn't happen in receiveMemoryPackage()!");
return FALSE; return FALSE;
} }
AccessBridgeATInstance *ati = ATs->findABATInstanceFromATHWND(srcWindow); AccessBridgeATInstance *ati = ATs->findABATInstanceFromATHWND(srcWindow);
...@@ -410,7 +412,7 @@ JavaAccessBridge::receiveMemoryPackage(HWND srcWindow, long bufsize) { ...@@ -410,7 +412,7 @@ JavaAccessBridge::receiveMemoryPackage(HWND srcWindow, long bufsize) {
} else { } else {
//DEBUG_CODE(AppendToCallInfo("ERROR receiving memory package: couldn't find srcWindow")); //DEBUG_CODE(AppendToCallInfo("ERROR receiving memory package: couldn't find srcWindow"));
PrintDebugString("ERROR receiving memory package: couldn't find srcWindow"); PrintDebugString("[ERROR]: receiving memory package: couldn't find srcWindow");
return FALSE; return FALSE;
} }
} }
...@@ -422,11 +424,11 @@ JavaAccessBridge::receiveMemoryPackage(HWND srcWindow, long bufsize) { ...@@ -422,11 +424,11 @@ JavaAccessBridge::receiveMemoryPackage(HWND srcWindow, long bufsize) {
*/ */
LRESULT LRESULT
JavaAccessBridge::processPackage(char *buffer, int bufsize) { JavaAccessBridge::processPackage(char *buffer, int bufsize) {
PrintDebugString("\r\nProcessing package sent from Windows, bufsize = %d:", bufsize); PrintDebugString("[INFO]: Processing package sent from Windows, bufsize = %d:", bufsize);
PackageType *type = (PackageType *) buffer; PackageType *type = (PackageType *) buffer;
LRESULT returnVal = 0; LRESULT returnVal = 0;
PrintDebugString(" PackageType = %X:", *type); PrintDebugString("[INFO]: PackageType = %X:", *type);
jobject rAC; jobject rAC;
switch (*type) { switch (*type) {
...@@ -435,13 +437,13 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -435,13 +437,13 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
case cMemoryMappedFileCreatedPackage: case cMemoryMappedFileCreatedPackage:
// Windows is telling us it created a memory mapped file for us to use // Windows is telling us it created a memory mapped file for us to use
// in repsonding to various information querying packages (see below) // in repsonding to various information querying packages (see below)
PrintDebugString(" type == cMemoryMappedFileCreatedPackage"); PrintDebugString("[INFO]: type == cMemoryMappedFileCreatedPackage");
if (bufsize == (sizeof(PackageType) + sizeof(MemoryMappedFileCreatedPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(MemoryMappedFileCreatedPackage))) {
MemoryMappedFileCreatedPackage *pkg = MemoryMappedFileCreatedPackage *pkg =
(MemoryMappedFileCreatedPackage *) (buffer + sizeof(PackageType)); (MemoryMappedFileCreatedPackage *) (buffer + sizeof(PackageType));
returnVal = MemoryMappedFileCreated((HWND)ABLongToHandle(pkg->bridgeWindow), pkg->filename); returnVal = MemoryMappedFileCreated((HWND)ABLongToHandle(pkg->bridgeWindow), pkg->filename);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(MemoryMappedFileCreatedPackage)); bufsize, sizeof(PackageType) + sizeof(MemoryMappedFileCreatedPackage));
} }
break; break;
...@@ -449,84 +451,84 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -449,84 +451,84 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ information querying packages ------------------ // ------------ information querying packages ------------------
case cReleaseJavaObjectPackage: case cReleaseJavaObjectPackage:
PrintDebugString(" type == cReleaseJavaObjectPackage"); PrintDebugString("[INFO]: type == cReleaseJavaObjectPackage");
if (bufsize == (sizeof(PackageType) + sizeof(ReleaseJavaObjectPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(ReleaseJavaObjectPackage))) {
ReleaseJavaObjectPackage *pkg = ReleaseJavaObjectPackage *pkg =
(ReleaseJavaObjectPackage *) (buffer + sizeof(PackageType)); (ReleaseJavaObjectPackage *) (buffer + sizeof(PackageType));
releaseJavaObject((jobject)pkg->object); releaseJavaObject((jobject)pkg->object);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(ReleaseJavaObjectPackage)); bufsize, sizeof(PackageType) + sizeof(ReleaseJavaObjectPackage));
} }
break; break;
case cGetAccessBridgeVersionPackage: case cGetAccessBridgeVersionPackage:
PrintDebugString(" type == cGetAccessBridgeVersionPackage"); PrintDebugString("[INFO]: type == cGetAccessBridgeVersionPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessBridgeVersionPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessBridgeVersionPackage))) {
GetAccessBridgeVersionPackage *pkg = GetAccessBridgeVersionPackage *pkg =
(GetAccessBridgeVersionPackage *) (buffer + sizeof(PackageType)); (GetAccessBridgeVersionPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getVersionInfo(&(pkg->rVersionInfo)); windowsThreadEntryPoints->getVersionInfo(&(pkg->rVersionInfo));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessBridgeVersionPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessBridgeVersionPackage));
} }
break; break;
case cIsJavaWindowPackage: case cIsJavaWindowPackage:
PrintDebugString(" type == cIsJavaWindowPackage"); PrintDebugString("[INFO]: type == cIsJavaWindowPackage");
if (bufsize == (sizeof(PackageType) + sizeof(IsJavaWindowPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(IsJavaWindowPackage))) {
IsJavaWindowPackage *pkg = IsJavaWindowPackage *pkg =
(IsJavaWindowPackage *) (buffer + sizeof(PackageType)); (IsJavaWindowPackage *) (buffer + sizeof(PackageType));
pkg->rResult = pkg->rResult =
windowsThreadEntryPoints->isJavaWindow(pkg->window); windowsThreadEntryPoints->isJavaWindow(pkg->window);
PrintDebugString(" -> returning result = %d", pkg->rResult); PrintDebugString("[INFO]: -> returning result = %d", pkg->rResult);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(IsJavaWindowPackage)); bufsize, sizeof(PackageType) + sizeof(IsJavaWindowPackage));
} }
break; break;
case cIsSameObjectPackage: case cIsSameObjectPackage:
PrintDebugString(" type == cIsSameObjectPackage"); PrintDebugString("[INFO]: type == cIsSameObjectPackage");
if (bufsize == (sizeof(PackageType) + sizeof(IsSameObjectPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(IsSameObjectPackage))) {
IsSameObjectPackage *pkg = IsSameObjectPackage *pkg =
(IsSameObjectPackage *) (buffer + sizeof(PackageType)); (IsSameObjectPackage *) (buffer + sizeof(PackageType));
pkg->rResult = pkg->rResult =
windowsThreadEntryPoints->isSameObject((jobject)pkg->obj1, (jobject)pkg->obj2); windowsThreadEntryPoints->isSameObject((jobject)pkg->obj1, (jobject)pkg->obj2);
PrintDebugString(" -> returning result = %d", pkg->rResult); PrintDebugString("[INFO]: -> returning result = %d", pkg->rResult);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(IsSameObjectPackage)); bufsize, sizeof(PackageType) + sizeof(IsSameObjectPackage));
} }
break; break;
case cGetAccessibleContextFromHWNDPackage: case cGetAccessibleContextFromHWNDPackage:
PrintDebugString(" type == cGetAccessibleContextFromHWNDPackage"); PrintDebugString("[INFO]: type == cGetAccessibleContextFromHWNDPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextFromHWNDPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextFromHWNDPackage))) {
GetAccessibleContextFromHWNDPackage *pkg = GetAccessibleContextFromHWNDPackage *pkg =
(GetAccessibleContextFromHWNDPackage *) (buffer + sizeof(PackageType)); (GetAccessibleContextFromHWNDPackage *) (buffer + sizeof(PackageType));
rAC = windowsThreadEntryPoints->getAccessibleContextFromHWND(pkg->window); rAC = windowsThreadEntryPoints->getAccessibleContextFromHWND(pkg->window);
pkg->rAccessibleContext = (JOBJECT64)rAC; pkg->rAccessibleContext = (JOBJECT64)rAC;
pkg->rVMID = HandleToLong(dialogWindow); pkg->rVMID = HandleToLong(dialogWindow);
PrintDebugString(" -> returning AC = %p, vmID = %X", rAC, pkg->rVMID); PrintDebugString("[INFO]: -> returning AC = %p, vmID = %X", rAC, pkg->rVMID);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextFromHWNDPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextFromHWNDPackage));
} }
break; break;
case cGetHWNDFromAccessibleContextPackage: case cGetHWNDFromAccessibleContextPackage:
PrintDebugString(" type == cGetHWNDFromAccessibleContextPackage"); PrintDebugString("[INFO]: type == cGetHWNDFromAccessibleContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetHWNDFromAccessibleContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetHWNDFromAccessibleContextPackage))) {
GetHWNDFromAccessibleContextPackage *pkg = GetHWNDFromAccessibleContextPackage *pkg =
(GetHWNDFromAccessibleContextPackage *) (buffer + sizeof(PackageType)); (GetHWNDFromAccessibleContextPackage *) (buffer + sizeof(PackageType));
pkg->rHWND = pkg->rHWND =
ABHandleToLong( windowsThreadEntryPoints->getHWNDFromAccessibleContext((jobject)pkg->accessibleContext) ); ABHandleToLong( windowsThreadEntryPoints->getHWNDFromAccessibleContext((jobject)pkg->accessibleContext) );
PrintDebugString(" -> returning HWND = %p", pkg->rHWND); PrintDebugString("[INFO]: -> returning HWND = %p", pkg->rHWND);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetHWNDFromAccessibleContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetHWNDFromAccessibleContextPackage));
} }
break; break;
...@@ -535,15 +537,15 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -535,15 +537,15 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
/* ===== utility methods ===== */ /* ===== utility methods ===== */
case cSetTextContentsPackage: case cSetTextContentsPackage:
PrintDebugString(" type == cSetTextContentsPackage"); PrintDebugString("[INFO]: type == cSetTextContentsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(SetTextContentsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(SetTextContentsPackage))) {
SetTextContentsPackage *pkg = SetTextContentsPackage *pkg =
(SetTextContentsPackage *) (buffer + sizeof(PackageType)); (SetTextContentsPackage *) (buffer + sizeof(PackageType));
pkg->rResult = pkg->rResult =
windowsThreadEntryPoints->setTextContents((jobject)pkg->accessibleContext, pkg->text); windowsThreadEntryPoints->setTextContents((jobject)pkg->accessibleContext, pkg->text);
PrintDebugString(" -> returning result = %d", pkg->rResult); PrintDebugString("[INFO]: -> returning result = %d", pkg->rResult);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(SetTextContentsPackage)); bufsize, sizeof(PackageType) + sizeof(SetTextContentsPackage));
} }
break; break;
...@@ -554,75 +556,76 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -554,75 +556,76 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
(GetParentWithRolePackage *) (buffer + sizeof(PackageType)); (GetParentWithRolePackage *) (buffer + sizeof(PackageType));
rAC = windowsThreadEntryPoints->getParentWithRole((jobject)pkg->accessibleContext, pkg->role); rAC = windowsThreadEntryPoints->getParentWithRole((jobject)pkg->accessibleContext, pkg->role);
pkg->rAccessibleContext = (JOBJECT64)rAC; pkg->rAccessibleContext = (JOBJECT64)rAC;
PrintDebugString(" type == cGetParentWithRolePackage"); PrintDebugString("[INFO]: type == cGetParentWithRolePackage\n"\
PrintDebugString(" pkg->vmID: %X", pkg->vmID); " pkg->vmID: %X"\
PrintDebugString(" pkg->accessibleContext: %p", (jobject)pkg->accessibleContext); " pkg->accessibleContext: %p"\
PrintDebugString(" pkg->role: %ls", pkg->role); " pkg->role: %ls"\
PrintDebugString(" -> returning rAccessibleContext = %p", rAC); " -> returning rAccessibleContext = %p"\
} else { , pkg->vmID, (jobject)pkg->accessibleContext, pkg->role, rAC);
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", } else {
PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetParentWithRolePackage)); bufsize, sizeof(PackageType) + sizeof(GetParentWithRolePackage));
} }
break; break;
case cGetTopLevelObjectPackage: case cGetTopLevelObjectPackage:
PrintDebugString(" type == cGetTopLevelObjectPackage"); PrintDebugString("[INFO]: type == cGetTopLevelObjectPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetTopLevelObjectPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetTopLevelObjectPackage))) {
GetTopLevelObjectPackage *pkg = GetTopLevelObjectPackage *pkg =
(GetTopLevelObjectPackage *) (buffer + sizeof(PackageType)); (GetTopLevelObjectPackage *) (buffer + sizeof(PackageType));
rAC = windowsThreadEntryPoints->getTopLevelObject((jobject)pkg->accessibleContext); rAC = windowsThreadEntryPoints->getTopLevelObject((jobject)pkg->accessibleContext);
pkg->rAccessibleContext = (JOBJECT64)rAC; pkg->rAccessibleContext = (JOBJECT64)rAC;
PrintDebugString(" -> returning rAccessibleContext = %p", rAC); PrintDebugString("[INFO]: -> returning rAccessibleContext = %p", rAC);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetTopLevelObjectPackage)); bufsize, sizeof(PackageType) + sizeof(GetTopLevelObjectPackage));
} }
break; break;
case cGetParentWithRoleElseRootPackage: case cGetParentWithRoleElseRootPackage:
PrintDebugString(" type == cGetParentWithRoleElseRootPackage"); PrintDebugString("[INFO]: type == cGetParentWithRoleElseRootPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetParentWithRoleElseRootPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetParentWithRoleElseRootPackage))) {
GetParentWithRoleElseRootPackage *pkg = GetParentWithRoleElseRootPackage *pkg =
(GetParentWithRoleElseRootPackage *) (buffer + sizeof(PackageType)); (GetParentWithRoleElseRootPackage *) (buffer + sizeof(PackageType));
rAC = windowsThreadEntryPoints->getParentWithRoleElseRoot((jobject)pkg->accessibleContext, pkg->role); rAC = windowsThreadEntryPoints->getParentWithRoleElseRoot((jobject)pkg->accessibleContext, pkg->role);
pkg->rAccessibleContext = (JOBJECT64)rAC; pkg->rAccessibleContext = (JOBJECT64)rAC;
PrintDebugString(" -> returning rAccessibleContext = %p", rAC); PrintDebugString("[INFO]: -> returning rAccessibleContext = %p", rAC);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetParentWithRoleElseRootPackage)); bufsize, sizeof(PackageType) + sizeof(GetParentWithRoleElseRootPackage));
} }
break; break;
case cGetObjectDepthPackage: case cGetObjectDepthPackage:
PrintDebugString(" type == cGetObjectDepthPackage"); PrintDebugString("[INFO]: type == cGetObjectDepthPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetObjectDepthPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetObjectDepthPackage))) {
GetObjectDepthPackage *pkg = GetObjectDepthPackage *pkg =
(GetObjectDepthPackage *) (buffer + sizeof(PackageType)); (GetObjectDepthPackage *) (buffer + sizeof(PackageType));
pkg->rResult = pkg->rResult =
windowsThreadEntryPoints->getObjectDepth((jobject)pkg->accessibleContext); windowsThreadEntryPoints->getObjectDepth((jobject)pkg->accessibleContext);
PrintDebugString(" -> returning rResult = %d", pkg->rResult); PrintDebugString("[INFO]: -> returning rResult = %d", pkg->rResult);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetObjectDepthPackage)); bufsize, sizeof(PackageType) + sizeof(GetObjectDepthPackage));
} }
break; break;
case cGetActiveDescendentPackage: case cGetActiveDescendentPackage:
PrintDebugString(" type == cGetActiveDescendentPackage"); PrintDebugString("[INFO]: type == cGetActiveDescendentPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetActiveDescendentPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetActiveDescendentPackage))) {
GetActiveDescendentPackage *pkg = GetActiveDescendentPackage *pkg =
(GetActiveDescendentPackage *) (buffer + sizeof(PackageType)); (GetActiveDescendentPackage *) (buffer + sizeof(PackageType));
rAC = windowsThreadEntryPoints->getActiveDescendent((jobject)pkg->accessibleContext); rAC = windowsThreadEntryPoints->getActiveDescendent((jobject)pkg->accessibleContext);
pkg->rAccessibleContext = (JOBJECT64)rAC; pkg->rAccessibleContext = (JOBJECT64)rAC;
PrintDebugString(" -> returning rAccessibleContext = %p", rAC); PrintDebugString("[INFO]: -> returning rAccessibleContext = %p", rAC);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetActiveDescendentPackage)); bufsize, sizeof(PackageType) + sizeof(GetActiveDescendentPackage));
} }
break; break;
case cGetAccessibleContextAtPackage: case cGetAccessibleContextAtPackage:
PrintDebugString(" type == cGetAccessibleContextAtPackage"); PrintDebugString("[INFO]: type == cGetAccessibleContextAtPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextAtPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextAtPackage))) {
GetAccessibleContextAtPackage *pkg = GetAccessibleContextAtPackage *pkg =
(GetAccessibleContextAtPackage *) (buffer + sizeof(PackageType)); (GetAccessibleContextAtPackage *) (buffer + sizeof(PackageType));
...@@ -630,13 +633,13 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -630,13 +633,13 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
windowsThreadEntryPoints->getAccessibleContextAt(pkg->x, pkg->y, windowsThreadEntryPoints->getAccessibleContextAt(pkg->x, pkg->y,
(jobject)pkg->AccessibleContext); (jobject)pkg->AccessibleContext);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextAtPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextAtPackage));
} }
break; break;
case cGetAccessibleContextWithFocusPackage: case cGetAccessibleContextWithFocusPackage:
PrintDebugString(" type == cGetAccessibleContextWithFocusPackage"); PrintDebugString("[INFO]: type == cGetAccessibleContextWithFocusPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextWithFocusPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextWithFocusPackage))) {
GetAccessibleContextWithFocusPackage *pkg = GetAccessibleContextWithFocusPackage *pkg =
(GetAccessibleContextWithFocusPackage *) (buffer + sizeof(PackageType)); (GetAccessibleContextWithFocusPackage *) (buffer + sizeof(PackageType));
...@@ -644,46 +647,46 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -644,46 +647,46 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
windowsThreadEntryPoints->getAccessibleContextWithFocus(); windowsThreadEntryPoints->getAccessibleContextWithFocus();
pkg->rVMID = HandleToLong(dialogWindow); pkg->rVMID = HandleToLong(dialogWindow);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextWithFocusPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextWithFocusPackage));
} }
break; break;
case cGetAccessibleContextInfoPackage: case cGetAccessibleContextInfoPackage:
PrintDebugString(" type == cGetAccessibleContextInfoPackage"); PrintDebugString("[INFO]: type == cGetAccessibleContextInfoPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextInfoPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleContextInfoPackage))) {
GetAccessibleContextInfoPackage *pkg = GetAccessibleContextInfoPackage *pkg =
(GetAccessibleContextInfoPackage *) (buffer + sizeof(PackageType)); (GetAccessibleContextInfoPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleContextInfo( windowsThreadEntryPoints->getAccessibleContextInfo(
(jobject)pkg->AccessibleContext, &(pkg->rAccessibleContextInfo)); (jobject)pkg->AccessibleContext, &(pkg->rAccessibleContextInfo));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleContextInfoPackage));
} }
break; break;
case cGetAccessibleChildFromContextPackage: case cGetAccessibleChildFromContextPackage:
PrintDebugString(" type == cGetAccessibleChildFromContextPackage"); PrintDebugString("[INFO]: type == cGetAccessibleChildFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleChildFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleChildFromContextPackage))) {
GetAccessibleChildFromContextPackage *pkg = GetAccessibleChildFromContextPackage *pkg =
(GetAccessibleChildFromContextPackage *) (buffer + sizeof(PackageType)); (GetAccessibleChildFromContextPackage *) (buffer + sizeof(PackageType));
pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleChildFromContext( pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleChildFromContext(
(jobject)pkg->AccessibleContext, pkg->childIndex); (jobject)pkg->AccessibleContext, pkg->childIndex);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleChildFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleChildFromContextPackage));
} }
break; break;
case cGetAccessibleParentFromContextPackage: case cGetAccessibleParentFromContextPackage:
PrintDebugString(" type == cGetAccessibleParentFromContextPackage"); PrintDebugString("[INFO]: type == cGetAccessibleParentFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleParentFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleParentFromContextPackage))) {
GetAccessibleParentFromContextPackage *pkg = GetAccessibleParentFromContextPackage *pkg =
(GetAccessibleParentFromContextPackage *) (buffer + sizeof(PackageType)); (GetAccessibleParentFromContextPackage *) (buffer + sizeof(PackageType));
pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleParentFromContext( pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleParentFromContext(
(jobject)pkg->AccessibleContext); (jobject)pkg->AccessibleContext);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleParentFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleParentFromContextPackage));
} }
break; break;
...@@ -691,106 +694,106 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -691,106 +694,106 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ begin AccessibleTable packages ------------------ // ------------ begin AccessibleTable packages ------------------
case cGetAccessibleTableInfoPackage: case cGetAccessibleTableInfoPackage:
PrintDebugString(" ##### type == cGetAccessibleTableInfoPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableInfoPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableInfoPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableInfoPackage))) {
GetAccessibleTableInfoPackage *pkg = GetAccessibleTableInfoPackage *pkg =
(GetAccessibleTableInfoPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableInfoPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTableInfo((jobject)pkg->accessibleContext, windowsThreadEntryPoints->getAccessibleTableInfo((jobject)pkg->accessibleContext,
&(pkg->rTableInfo)); &(pkg->rTableInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableInfoPackage));
} }
break; break;
case cGetAccessibleTableCellInfoPackage: case cGetAccessibleTableCellInfoPackage:
PrintDebugString(" ##### type == cGetAccessibleTableCellInfoPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableCellInfoPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableCellInfoPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableCellInfoPackage))) {
GetAccessibleTableCellInfoPackage *pkg = GetAccessibleTableCellInfoPackage *pkg =
(GetAccessibleTableCellInfoPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableCellInfoPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTableCellInfo((jobject)pkg->accessibleTable, pkg->row, windowsThreadEntryPoints->getAccessibleTableCellInfo((jobject)pkg->accessibleTable, pkg->row,
pkg->column, &(pkg->rTableCellInfo)); pkg->column, &(pkg->rTableCellInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableCellInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableCellInfoPackage));
} }
break; break;
case cGetAccessibleTableRowHeaderPackage: case cGetAccessibleTableRowHeaderPackage:
PrintDebugString(" ##### type == cGetAccessibleTableRowHeaderPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowHeaderPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowHeaderPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowHeaderPackage))) {
GetAccessibleTableRowHeaderPackage *pkg = GetAccessibleTableRowHeaderPackage *pkg =
(GetAccessibleTableRowHeaderPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableRowHeaderPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTableRowHeader((jobject)pkg->accessibleContext, windowsThreadEntryPoints->getAccessibleTableRowHeader((jobject)pkg->accessibleContext,
&(pkg->rTableInfo)); &(pkg->rTableInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowHeaderPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowHeaderPackage));
} }
break; break;
case cGetAccessibleTableColumnHeaderPackage: case cGetAccessibleTableColumnHeaderPackage:
PrintDebugString(" ##### type == cGetAccessibleTableColumnHeaderPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnHeaderPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnHeaderPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnHeaderPackage))) {
GetAccessibleTableColumnHeaderPackage *pkg = GetAccessibleTableColumnHeaderPackage *pkg =
(GetAccessibleTableColumnHeaderPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableColumnHeaderPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTableColumnHeader((jobject)pkg->accessibleContext, windowsThreadEntryPoints->getAccessibleTableColumnHeader((jobject)pkg->accessibleContext,
&(pkg->rTableInfo)); &(pkg->rTableInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnHeaderPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnHeaderPackage));
} }
break; break;
case cGetAccessibleTableRowDescriptionPackage: case cGetAccessibleTableRowDescriptionPackage:
PrintDebugString(" ##### type == cGetAccessibleTableRowDescriptionPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowDescriptionPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowDescriptionPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowDescriptionPackage))) {
GetAccessibleTableRowDescriptionPackage *pkg = GetAccessibleTableRowDescriptionPackage *pkg =
(GetAccessibleTableRowDescriptionPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableRowDescriptionPackage *) (buffer + sizeof(PackageType));
pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleTableRowDescription( pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleTableRowDescription(
(jobject)pkg->accessibleContext, pkg->row); (jobject)pkg->accessibleContext, pkg->row);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowDescriptionPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowDescriptionPackage));
} }
break; break;
case cGetAccessibleTableColumnDescriptionPackage: case cGetAccessibleTableColumnDescriptionPackage:
PrintDebugString(" ##### type == cGetAccessibleTableColumnDescriptionPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnDescriptionPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnDescriptionPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnDescriptionPackage))) {
GetAccessibleTableColumnDescriptionPackage *pkg = GetAccessibleTableColumnDescriptionPackage *pkg =
(GetAccessibleTableColumnDescriptionPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableColumnDescriptionPackage *) (buffer + sizeof(PackageType));
pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleTableColumnDescription( pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleTableColumnDescription(
(jobject)pkg->accessibleContext, pkg->column); (jobject)pkg->accessibleContext, pkg->column);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnDescriptionPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnDescriptionPackage));
} }
break; break;
case cGetAccessibleTableColumnSelectionCountPackage: case cGetAccessibleTableColumnSelectionCountPackage:
PrintDebugString(" ##### type == cGetAccessibleTableColumnSelectionCountPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnSelectionCountPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionCountPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionCountPackage))) {
GetAccessibleTableColumnSelectionCountPackage *pkg = GetAccessibleTableColumnSelectionCountPackage *pkg =
(GetAccessibleTableColumnSelectionCountPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableColumnSelectionCountPackage *) (buffer + sizeof(PackageType));
pkg->rCount = windowsThreadEntryPoints->getAccessibleTableColumnSelectionCount( pkg->rCount = windowsThreadEntryPoints->getAccessibleTableColumnSelectionCount(
(jobject)pkg->accessibleTable); (jobject)pkg->accessibleTable);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionCountPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionCountPackage));
} }
break; break;
case cGetAccessibleTableRowSelectionCountPackage: case cGetAccessibleTableRowSelectionCountPackage:
PrintDebugString(" ##### type == cGetAccessibleTableRowSelectionCountPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowSelectionCountPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionCountPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionCountPackage))) {
GetAccessibleTableRowSelectionCountPackage *pkg = GetAccessibleTableRowSelectionCountPackage *pkg =
(GetAccessibleTableRowSelectionCountPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableRowSelectionCountPackage *) (buffer + sizeof(PackageType));
...@@ -798,114 +801,114 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -798,114 +801,114 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
pkg->rCount = windowsThreadEntryPoints->getAccessibleTableRowSelectionCount( pkg->rCount = windowsThreadEntryPoints->getAccessibleTableRowSelectionCount(
(jobject)pkg->accessibleTable); (jobject)pkg->accessibleTable);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionCountPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionCountPackage));
} }
break; break;
case cIsAccessibleTableRowSelectedPackage: case cIsAccessibleTableRowSelectedPackage:
PrintDebugString(" ##### type == cIsAccessibleTableRowSelectedPackage"); PrintDebugString("[INFO]: ##### type == cIsAccessibleTableRowSelectedPackage");
if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleTableRowSelectedPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleTableRowSelectedPackage))) {
IsAccessibleTableRowSelectedPackage *pkg = IsAccessibleTableRowSelectedPackage *pkg =
(IsAccessibleTableRowSelectedPackage *) (buffer + sizeof(PackageType)); (IsAccessibleTableRowSelectedPackage *) (buffer + sizeof(PackageType));
pkg->rResult = windowsThreadEntryPoints->isAccessibleTableRowSelected( pkg->rResult = windowsThreadEntryPoints->isAccessibleTableRowSelected(
(jobject)pkg->accessibleTable, pkg->row); (jobject)pkg->accessibleTable, pkg->row);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(IsAccessibleTableRowSelectedPackage)); bufsize, sizeof(PackageType) + sizeof(IsAccessibleTableRowSelectedPackage));
} }
break; break;
case cIsAccessibleTableColumnSelectedPackage: case cIsAccessibleTableColumnSelectedPackage:
PrintDebugString(" ##### type == cIsAccessibleTableColumnSelectedPackage"); PrintDebugString("[INFO]: ##### type == cIsAccessibleTableColumnSelectedPackage");
if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleTableColumnSelectedPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleTableColumnSelectedPackage))) {
IsAccessibleTableColumnSelectedPackage *pkg = IsAccessibleTableColumnSelectedPackage *pkg =
(IsAccessibleTableColumnSelectedPackage *) (buffer + sizeof(PackageType)); (IsAccessibleTableColumnSelectedPackage *) (buffer + sizeof(PackageType));
pkg->rResult = windowsThreadEntryPoints->isAccessibleTableColumnSelected( pkg->rResult = windowsThreadEntryPoints->isAccessibleTableColumnSelected(
(jobject)pkg->accessibleTable, pkg->column); (jobject)pkg->accessibleTable, pkg->column);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(IsAccessibleTableColumnSelectedPackage)); bufsize, sizeof(PackageType) + sizeof(IsAccessibleTableColumnSelectedPackage));
} }
break; break;
case cGetAccessibleTableColumnSelectionsPackage: case cGetAccessibleTableColumnSelectionsPackage:
PrintDebugString(" ##### type == cGetAccessibleTableColumnSelectionsPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnSelectionsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionsPackage))) {
GetAccessibleTableColumnSelectionsPackage *pkg = GetAccessibleTableColumnSelectionsPackage *pkg =
(GetAccessibleTableColumnSelectionsPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableColumnSelectionsPackage *) (buffer + sizeof(PackageType));
PrintDebugString(" ##### cGetAccessibleTableColumnSelectionsPackage count=%d", pkg->count); PrintDebugString("[INFO]: ##### cGetAccessibleTableColumnSelectionsPackage count=%d", pkg->count);
windowsThreadEntryPoints->getAccessibleTableColumnSelections( windowsThreadEntryPoints->getAccessibleTableColumnSelections(
(jobject)pkg->accessibleTable, pkg->count, pkg->rSelections); (jobject)pkg->accessibleTable, pkg->count, pkg->rSelections);
for (int i = 0; i < pkg->count; i++) { for (int i = 0; i < pkg->count; i++) {
PrintDebugString(" ##### cGetAccessibleTableColumnSelectionsPackage(%d)=%d", i, pkg->rSelections[i]); PrintDebugString("[INFO]: ##### cGetAccessibleTableColumnSelectionsPackage(%d)=%d", i, pkg->rSelections[i]);
} }
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionsPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnSelectionsPackage));
} }
break; break;
case cGetAccessibleTableRowSelectionsPackage: case cGetAccessibleTableRowSelectionsPackage:
PrintDebugString(" ##### type == cGetAccessibleTableRowSelectionsPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowSelectionsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionsPackage))) {
GetAccessibleTableRowSelectionsPackage *pkg = GetAccessibleTableRowSelectionsPackage *pkg =
(GetAccessibleTableRowSelectionsPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableRowSelectionsPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTableRowSelections( windowsThreadEntryPoints->getAccessibleTableRowSelections(
(jobject)pkg->accessibleTable, pkg->count, pkg->rSelections); (jobject)pkg->accessibleTable, pkg->count, pkg->rSelections);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionsPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowSelectionsPackage));
} }
break; break;
case cGetAccessibleTableRowPackage: case cGetAccessibleTableRowPackage:
PrintDebugString(" ##### type == cGetAccessibleTableRowPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableRowPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableRowPackage))) {
GetAccessibleTableRowPackage *pkg = GetAccessibleTableRowPackage *pkg =
(GetAccessibleTableRowPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableRowPackage *) (buffer + sizeof(PackageType));
pkg->rRow = windowsThreadEntryPoints->getAccessibleTableRow( pkg->rRow = windowsThreadEntryPoints->getAccessibleTableRow(
(jobject)pkg->accessibleTable, pkg->index); (jobject)pkg->accessibleTable, pkg->index);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableRowPackage));
} }
break; break;
case cGetAccessibleTableColumnPackage: case cGetAccessibleTableColumnPackage:
PrintDebugString(" ##### type == cGetAccessibleTableColumnPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableColumnPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableColumnPackage))) {
GetAccessibleTableColumnPackage *pkg = GetAccessibleTableColumnPackage *pkg =
(GetAccessibleTableColumnPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableColumnPackage *) (buffer + sizeof(PackageType));
pkg->rColumn = windowsThreadEntryPoints->getAccessibleTableColumn( pkg->rColumn = windowsThreadEntryPoints->getAccessibleTableColumn(
(jobject)pkg->accessibleTable, pkg->index); (jobject)pkg->accessibleTable, pkg->index);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableColumnPackage));
} }
break; break;
case cGetAccessibleTableIndexPackage: case cGetAccessibleTableIndexPackage:
PrintDebugString(" ##### type == cGetAccessibleTableIndexPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleTableIndexPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableIndexPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTableIndexPackage))) {
GetAccessibleTableIndexPackage *pkg = GetAccessibleTableIndexPackage *pkg =
(GetAccessibleTableIndexPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTableIndexPackage *) (buffer + sizeof(PackageType));
pkg->rIndex = windowsThreadEntryPoints->getAccessibleTableIndex( pkg->rIndex = windowsThreadEntryPoints->getAccessibleTableIndex(
(jobject)pkg->accessibleTable, pkg->row, pkg->column); (jobject)pkg->accessibleTable, pkg->row, pkg->column);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableIndexPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTableIndexPackage));
} }
break; break;
...@@ -916,15 +919,15 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -916,15 +919,15 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ begin AccessibleRelationSet packages ------------------ // ------------ begin AccessibleRelationSet packages ------------------
case cGetAccessibleRelationSetPackage: case cGetAccessibleRelationSetPackage:
PrintDebugString(" ##### type == cGetAccessibleRelationSetPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleRelationSetPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleRelationSetPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleRelationSetPackage))) {
GetAccessibleRelationSetPackage *pkg = GetAccessibleRelationSetPackage *pkg =
(GetAccessibleRelationSetPackage *) (buffer + sizeof(PackageType)); (GetAccessibleRelationSetPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleRelationSet( windowsThreadEntryPoints->getAccessibleRelationSet(
(jobject)pkg->accessibleContext, &(pkg->rAccessibleRelationSetInfo)); (jobject)pkg->accessibleContext, &(pkg->rAccessibleRelationSetInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleRelationSetPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleRelationSetPackage));
} }
break; break;
...@@ -934,85 +937,85 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -934,85 +937,85 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ begin AccessibleHypertext packages ------------------ // ------------ begin AccessibleHypertext packages ------------------
case cGetAccessibleHypertextPackage: case cGetAccessibleHypertextPackage:
PrintDebugString(" ##### type == cGetAccessibleHypertextPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleHypertextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextPackage))) {
GetAccessibleHypertextPackage *pkg = GetAccessibleHypertextPackage *pkg =
(GetAccessibleHypertextPackage *) (buffer + sizeof(PackageType)); (GetAccessibleHypertextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleHypertext( windowsThreadEntryPoints->getAccessibleHypertext(
(jobject)pkg->accessibleContext, &(pkg->rAccessibleHypertextInfo)); (jobject)pkg->accessibleContext, &(pkg->rAccessibleHypertextInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextPackage));
} }
break; break;
case cActivateAccessibleHyperlinkPackage: case cActivateAccessibleHyperlinkPackage:
PrintDebugString(" ##### type == cActivateAccessibleHyperlinkPackage"); PrintDebugString("[INFO]: ##### type == cActivateAccessibleHyperlinkPackage");
if (bufsize == (sizeof(PackageType) + sizeof(ActivateAccessibleHyperlinkPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(ActivateAccessibleHyperlinkPackage))) {
ActivateAccessibleHyperlinkPackage *pkg = ActivateAccessibleHyperlinkPackage *pkg =
(ActivateAccessibleHyperlinkPackage *) (buffer + sizeof(PackageType)); (ActivateAccessibleHyperlinkPackage *) (buffer + sizeof(PackageType));
pkg->rResult = windowsThreadEntryPoints->activateAccessibleHyperlink( pkg->rResult = windowsThreadEntryPoints->activateAccessibleHyperlink(
(jobject)pkg->accessibleContext, (jobject)pkg->accessibleHyperlink); (jobject)pkg->accessibleContext, (jobject)pkg->accessibleHyperlink);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(ActivateAccessibleHyperlinkPackage)); bufsize, sizeof(PackageType) + sizeof(ActivateAccessibleHyperlinkPackage));
} }
break; break;
case cGetAccessibleHyperlinkCountPackage: case cGetAccessibleHyperlinkCountPackage:
PrintDebugString(" ##### type == cGetAccessibleHyperlinkCountPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleHyperlinkCountPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHyperlinkCountPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHyperlinkCountPackage))) {
GetAccessibleHyperlinkCountPackage *pkg = GetAccessibleHyperlinkCountPackage *pkg =
(GetAccessibleHyperlinkCountPackage *) (buffer + sizeof(PackageType)); (GetAccessibleHyperlinkCountPackage *) (buffer + sizeof(PackageType));
pkg->rLinkCount = windowsThreadEntryPoints->getAccessibleHyperlinkCount( pkg->rLinkCount = windowsThreadEntryPoints->getAccessibleHyperlinkCount(
(jobject)pkg->accessibleContext); (jobject)pkg->accessibleContext);
PrintDebugString(" ##### processing succeeded: pkg->rLinkCount = %d", pkg->rLinkCount); PrintDebugString("[INFO]: ##### processing succeeded: pkg->rLinkCount = %d", pkg->rLinkCount);
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleHyperlinkCountPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleHyperlinkCountPackage));
} }
break; break;
case cGetAccessibleHypertextExtPackage: case cGetAccessibleHypertextExtPackage:
PrintDebugString(" ##### type == cGetAccessibleHypertextExtPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleHypertextExtPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextExtPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextExtPackage))) {
GetAccessibleHypertextExtPackage *pkg = GetAccessibleHypertextExtPackage *pkg =
(GetAccessibleHypertextExtPackage *) (buffer + sizeof(PackageType)); (GetAccessibleHypertextExtPackage *) (buffer + sizeof(PackageType));
pkg->rSuccess = windowsThreadEntryPoints->getAccessibleHypertextExt( pkg->rSuccess = windowsThreadEntryPoints->getAccessibleHypertextExt(
(jobject)pkg->accessibleContext, pkg->startIndex, &(pkg->rAccessibleHypertextInfo)); (jobject)pkg->accessibleContext, pkg->startIndex, &(pkg->rAccessibleHypertextInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextExtPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextExtPackage));
} }
break; break;
case cGetAccessibleHypertextLinkIndexPackage: case cGetAccessibleHypertextLinkIndexPackage:
PrintDebugString(" ##### type == cGetAccessibleHypertextLinkIndexPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleHypertextLinkIndexPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextLinkIndexPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHypertextLinkIndexPackage))) {
GetAccessibleHypertextLinkIndexPackage *pkg = GetAccessibleHypertextLinkIndexPackage *pkg =
(GetAccessibleHypertextLinkIndexPackage *) (buffer + sizeof(PackageType)); (GetAccessibleHypertextLinkIndexPackage *) (buffer + sizeof(PackageType));
pkg->rLinkIndex = windowsThreadEntryPoints->getAccessibleHypertextLinkIndex( pkg->rLinkIndex = windowsThreadEntryPoints->getAccessibleHypertextLinkIndex(
(jobject)pkg->hypertext, pkg->charIndex); (jobject)pkg->hypertext, pkg->charIndex);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextLinkIndexPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleHypertextLinkIndexPackage));
} }
break; break;
case cGetAccessibleHyperlinkPackage: case cGetAccessibleHyperlinkPackage:
PrintDebugString(" ##### type == cGetAccessibleHyperlinkPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleHyperlinkPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHyperlinkPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleHyperlinkPackage))) {
GetAccessibleHyperlinkPackage *pkg = GetAccessibleHyperlinkPackage *pkg =
(GetAccessibleHyperlinkPackage *) (buffer + sizeof(PackageType)); (GetAccessibleHyperlinkPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleHyperlink((jobject)pkg->hypertext, pkg->linkIndex, windowsThreadEntryPoints->getAccessibleHyperlink((jobject)pkg->hypertext, pkg->linkIndex,
&(pkg->rAccessibleHyperlinkInfo)); &(pkg->rAccessibleHyperlinkInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleHyperlinkPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleHyperlinkPackage));
} }
break; break;
...@@ -1022,59 +1025,59 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1022,59 +1025,59 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ begin Accessible KeyBindings, Icons and Actions // ------------ begin Accessible KeyBindings, Icons and Actions
case cGetAccessibleKeyBindingsPackage: case cGetAccessibleKeyBindingsPackage:
PrintDebugString(" ##### type == cGetAccessibleKeyBindingsPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleKeyBindingsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleKeyBindingsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleKeyBindingsPackage))) {
GetAccessibleKeyBindingsPackage *pkg = GetAccessibleKeyBindingsPackage *pkg =
(GetAccessibleKeyBindingsPackage *) (buffer + sizeof(PackageType)); (GetAccessibleKeyBindingsPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleKeyBindings ( windowsThreadEntryPoints->getAccessibleKeyBindings (
(jobject)pkg->accessibleContext, &(pkg->rAccessibleKeyBindings)); (jobject)pkg->accessibleContext, &(pkg->rAccessibleKeyBindings));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleKeyBindingsPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleKeyBindingsPackage));
} }
break; break;
case cGetAccessibleIconsPackage: case cGetAccessibleIconsPackage:
PrintDebugString(" ##### type == cGetAccessibleIconsPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleIconsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleIconsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleIconsPackage))) {
GetAccessibleIconsPackage *pkg = GetAccessibleIconsPackage *pkg =
(GetAccessibleIconsPackage *) (buffer + sizeof(PackageType)); (GetAccessibleIconsPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleIcons ( windowsThreadEntryPoints->getAccessibleIcons (
(jobject)pkg->accessibleContext, &(pkg->rAccessibleIcons)); (jobject)pkg->accessibleContext, &(pkg->rAccessibleIcons));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleIconsPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleIconsPackage));
} }
break; break;
case cGetAccessibleActionsPackage: case cGetAccessibleActionsPackage:
PrintDebugString(" ##### type == cGetAccessibleActionsPackage"); PrintDebugString("[INFO]: ##### type == cGetAccessibleActionsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleActionsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleActionsPackage))) {
GetAccessibleActionsPackage *pkg = GetAccessibleActionsPackage *pkg =
(GetAccessibleActionsPackage *) (buffer + sizeof(PackageType)); (GetAccessibleActionsPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleActions ( windowsThreadEntryPoints->getAccessibleActions (
(jobject)pkg->accessibleContext, &(pkg->rAccessibleActions)); (jobject)pkg->accessibleContext, &(pkg->rAccessibleActions));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleActionsPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleActionsPackage));
} }
break; break;
case cDoAccessibleActionsPackage: case cDoAccessibleActionsPackage:
PrintDebugString(" ##### type == cDoAccessibleActionsPackage"); PrintDebugString("[INFO]: ##### type == cDoAccessibleActionsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(DoAccessibleActionsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(DoAccessibleActionsPackage))) {
DoAccessibleActionsPackage *pkg = DoAccessibleActionsPackage *pkg =
(DoAccessibleActionsPackage *) (buffer + sizeof(PackageType)); (DoAccessibleActionsPackage *) (buffer + sizeof(PackageType));
pkg->rResult = pkg->rResult =
windowsThreadEntryPoints->doAccessibleActions((jobject)pkg->accessibleContext, &(pkg->actionsToDo), windowsThreadEntryPoints->doAccessibleActions((jobject)pkg->accessibleContext, &(pkg->actionsToDo),
&(pkg->failure)); &(pkg->failure));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(DoAccessibleActionsPackage)); bufsize, sizeof(PackageType) + sizeof(DoAccessibleActionsPackage));
} }
break; break;
...@@ -1082,50 +1085,50 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1082,50 +1085,50 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ begin addtional methods for Teton // ------------ begin addtional methods for Teton
case cGetVirtualAccessibleNamePackage: case cGetVirtualAccessibleNamePackage:
PrintDebugString(" ##### type == GetVirtualAccessibleNamePackage"); PrintDebugString("[INFO]: ##### type == GetVirtualAccessibleNamePackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetVirtualAccessibleNamePackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetVirtualAccessibleNamePackage))) {
GetVirtualAccessibleNamePackage *pkg = GetVirtualAccessibleNamePackage *pkg =
(GetVirtualAccessibleNamePackage *) (buffer + sizeof(PackageType)); (GetVirtualAccessibleNamePackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getVirtualAccessibleName ((const jobject)pkg->accessibleContext, windowsThreadEntryPoints->getVirtualAccessibleName ((const jobject)pkg->accessibleContext,
pkg->rName, pkg->rName,
pkg->len); pkg->len);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetVirtualAccessibleNamePackage)); bufsize, sizeof(PackageType) + sizeof(GetVirtualAccessibleNamePackage));
} }
break; break;
case cRequestFocusPackage: case cRequestFocusPackage:
PrintDebugString(" ##### type == RequestFocusPackage"); PrintDebugString("[INFO]: ##### type == RequestFocusPackage");
if (bufsize == (sizeof(PackageType) + sizeof(RequestFocusPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(RequestFocusPackage))) {
RequestFocusPackage *pkg = RequestFocusPackage *pkg =
(RequestFocusPackage *) (buffer + sizeof(PackageType)); (RequestFocusPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->requestFocus ( windowsThreadEntryPoints->requestFocus (
(jobject)pkg->accessibleContext); (jobject)pkg->accessibleContext);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(RequestFocusPackage)); bufsize, sizeof(PackageType) + sizeof(RequestFocusPackage));
} }
break; break;
case cSelectTextRangePackage: case cSelectTextRangePackage:
PrintDebugString(" ##### type == SelectTextRangePackage"); PrintDebugString("[INFO]: ##### type == SelectTextRangePackage");
if (bufsize == (sizeof(PackageType) + sizeof(SelectTextRangePackage))) { if (bufsize == (sizeof(PackageType) + sizeof(SelectTextRangePackage))) {
SelectTextRangePackage *pkg = SelectTextRangePackage *pkg =
(SelectTextRangePackage *) (buffer + sizeof(PackageType)); (SelectTextRangePackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->selectTextRange ( windowsThreadEntryPoints->selectTextRange (
(jobject)pkg->accessibleContext, pkg->startIndex, pkg->endIndex); (jobject)pkg->accessibleContext, pkg->startIndex, pkg->endIndex);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(SelectTextRangePackage)); bufsize, sizeof(PackageType) + sizeof(SelectTextRangePackage));
} }
break; break;
case cGetTextAttributesInRangePackage: case cGetTextAttributesInRangePackage:
PrintDebugString(" ##### type == GetTextAttributesInRangePackage"); PrintDebugString("[INFO]: ##### type == GetTextAttributesInRangePackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetTextAttributesInRangePackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetTextAttributesInRangePackage))) {
GetTextAttributesInRangePackage *pkg = GetTextAttributesInRangePackage *pkg =
(GetTextAttributesInRangePackage *) (buffer + sizeof(PackageType)); (GetTextAttributesInRangePackage *) (buffer + sizeof(PackageType));
...@@ -1133,30 +1136,30 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1133,30 +1136,30 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
(jobject)pkg->accessibleContext, pkg->startIndex, pkg->endIndex, (jobject)pkg->accessibleContext, pkg->startIndex, pkg->endIndex,
(AccessibleTextAttributesInfo *)&(pkg->attributes), (AccessibleTextAttributesInfo *)&(pkg->attributes),
&(pkg->rLength)); &(pkg->rLength));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetTextAttributesInRangePackage)); bufsize, sizeof(PackageType) + sizeof(GetTextAttributesInRangePackage));
} }
break; break;
case cGetVisibleChildrenCountPackage: case cGetVisibleChildrenCountPackage:
PrintDebugString(" ##### type == GetVisibleChildrenCountPackage"); PrintDebugString("[INFO]: ##### type == GetVisibleChildrenCountPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetVisibleChildrenCountPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetVisibleChildrenCountPackage))) {
GetVisibleChildrenCountPackage *pkg = GetVisibleChildrenCountPackage *pkg =
(GetVisibleChildrenCountPackage *) (buffer + sizeof(PackageType)); (GetVisibleChildrenCountPackage *) (buffer + sizeof(PackageType));
pkg->rChildrenCount = windowsThreadEntryPoints->getVisibleChildrenCount ((jobject)pkg->accessibleContext); pkg->rChildrenCount = windowsThreadEntryPoints->getVisibleChildrenCount ((jobject)pkg->accessibleContext);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetVisibleChildrenCountPackage)); bufsize, sizeof(PackageType) + sizeof(GetVisibleChildrenCountPackage));
} }
break; break;
case cGetVisibleChildrenPackage: case cGetVisibleChildrenPackage:
PrintDebugString(" ##### type == GetVisibleChildrenPackage"); PrintDebugString("[INFO]: ##### type == GetVisibleChildrenPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetVisibleChildrenPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetVisibleChildrenPackage))) {
GetVisibleChildrenPackage *pkg = GetVisibleChildrenPackage *pkg =
(GetVisibleChildrenPackage *) (buffer + sizeof(PackageType)); (GetVisibleChildrenPackage *) (buffer + sizeof(PackageType));
...@@ -1164,23 +1167,23 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1164,23 +1167,23 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
pkg->startIndex, pkg->startIndex,
&(pkg->rVisibleChildrenInfo)); &(pkg->rVisibleChildrenInfo));
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetVisibleChildrenPackage)); bufsize, sizeof(PackageType) + sizeof(GetVisibleChildrenPackage));
} }
break; break;
case cSetCaretPositionPackage: case cSetCaretPositionPackage:
PrintDebugString(" ##### type == SetCaretPositionPackage"); PrintDebugString("[INFO]: ##### type == SetCaretPositionPackage");
if (bufsize == (sizeof(PackageType) + sizeof(SetCaretPositionPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(SetCaretPositionPackage))) {
SetCaretPositionPackage *pkg = SetCaretPositionPackage *pkg =
(SetCaretPositionPackage *) (buffer + sizeof(PackageType)); (SetCaretPositionPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->setCaretPosition ( windowsThreadEntryPoints->setCaretPosition (
(jobject)pkg->accessibleContext, pkg->position); (jobject)pkg->accessibleContext, pkg->position);
PrintDebugString(" ##### processing succeeded"); PrintDebugString("[INFO]: ##### processing succeeded");
} else { } else {
PrintDebugString(" ##### processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: ##### processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(SetCaretPositionPackage)); bufsize, sizeof(PackageType) + sizeof(SetCaretPositionPackage));
} }
break; break;
...@@ -1192,105 +1195,105 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1192,105 +1195,105 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ Accessible Text packages ------------------ // ------------ Accessible Text packages ------------------
case cGetAccessibleTextInfoPackage: case cGetAccessibleTextInfoPackage:
PrintDebugString(" type == cGetAccessibleTextInfoPackage"); PrintDebugString("[INFO]: type == cGetAccessibleTextInfoPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage))) {
GetAccessibleTextInfoPackage *pkg = GetAccessibleTextInfoPackage *pkg =
(GetAccessibleTextInfoPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTextInfoPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTextInfo((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getAccessibleTextInfo((jobject)pkg->AccessibleContext,
&(pkg->rTextInfo), pkg->x, pkg->y); &(pkg->rTextInfo), pkg->x, pkg->y);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage));
} }
break; break;
case cGetAccessibleTextItemsPackage: case cGetAccessibleTextItemsPackage:
PrintDebugString(" type == cGetAccessibleTextItemsPackage"); PrintDebugString("[INFO]: type == cGetAccessibleTextItemsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextItemsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextItemsPackage))) {
GetAccessibleTextItemsPackage *pkg = GetAccessibleTextItemsPackage *pkg =
(GetAccessibleTextItemsPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTextItemsPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTextItems((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getAccessibleTextItems((jobject)pkg->AccessibleContext,
&(pkg->rTextItemsInfo), pkg->index); &(pkg->rTextItemsInfo), pkg->index);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextInfoPackage));
} }
break; break;
case cGetAccessibleTextSelectionInfoPackage: case cGetAccessibleTextSelectionInfoPackage:
PrintDebugString(" type == cGetAccessibleTextSelectionInfoPackage"); PrintDebugString("[INFO]: type == cGetAccessibleTextSelectionInfoPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextSelectionInfoPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextSelectionInfoPackage))) {
GetAccessibleTextSelectionInfoPackage *pkg = GetAccessibleTextSelectionInfoPackage *pkg =
(GetAccessibleTextSelectionInfoPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTextSelectionInfoPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTextSelectionInfo( windowsThreadEntryPoints->getAccessibleTextSelectionInfo(
(jobject)pkg->AccessibleContext, &(pkg->rTextSelectionItemsInfo)); (jobject)pkg->AccessibleContext, &(pkg->rTextSelectionItemsInfo));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextSelectionInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextSelectionInfoPackage));
} }
break; break;
case cGetAccessibleTextAttributeInfoPackage: case cGetAccessibleTextAttributeInfoPackage:
PrintDebugString(" type == cGetAccessibleTextAttributeInfoPackage"); PrintDebugString("[INFO]: type == cGetAccessibleTextAttributeInfoPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextAttributeInfoPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextAttributeInfoPackage))) {
GetAccessibleTextAttributeInfoPackage *pkg = GetAccessibleTextAttributeInfoPackage *pkg =
(GetAccessibleTextAttributeInfoPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTextAttributeInfoPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTextAttributes( windowsThreadEntryPoints->getAccessibleTextAttributes(
(jobject)pkg->AccessibleContext, pkg->index, (AccessibleTextAttributesInfo *) &(pkg->rAttributeInfo)); (jobject)pkg->AccessibleContext, pkg->index, (AccessibleTextAttributesInfo *) &(pkg->rAttributeInfo));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextAttributeInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextAttributeInfoPackage));
} }
break; break;
case cGetAccessibleTextRectInfoPackage: case cGetAccessibleTextRectInfoPackage:
PrintDebugString(" type == cGetAccessibleTextRectInfoPackage"); PrintDebugString("[INFO]: type == cGetAccessibleTextRectInfoPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextRectInfoPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextRectInfoPackage))) {
GetAccessibleTextRectInfoPackage *pkg = GetAccessibleTextRectInfoPackage *pkg =
(GetAccessibleTextRectInfoPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTextRectInfoPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTextRect((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getAccessibleTextRect((jobject)pkg->AccessibleContext,
&(pkg->rTextRectInfo), pkg->index); &(pkg->rTextRectInfo), pkg->index);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextRectInfoPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextRectInfoPackage));
} }
break; break;
case cGetCaretLocationPackage: case cGetCaretLocationPackage:
PrintDebugString(" type == cGetCaretLocationPackage"); PrintDebugString("[INFO]: type == cGetCaretLocationPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetCaretLocationPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetCaretLocationPackage))) {
GetCaretLocationPackage *pkg = GetCaretLocationPackage *pkg =
(GetCaretLocationPackage *) (buffer + sizeof(PackageType)); (GetCaretLocationPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getCaretLocation((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getCaretLocation((jobject)pkg->AccessibleContext,
&(pkg->rTextRectInfo), pkg->index); &(pkg->rTextRectInfo), pkg->index);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetCaretLocationPackage)); bufsize, sizeof(PackageType) + sizeof(GetCaretLocationPackage));
} }
break; break;
case cGetAccessibleTextLineBoundsPackage: case cGetAccessibleTextLineBoundsPackage:
PrintDebugString(" type == cGetAccessibleTextLineBoundsPackage"); PrintDebugString("[INFO]: type == cGetAccessibleTextLineBoundsPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextLineBoundsPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextLineBoundsPackage))) {
GetAccessibleTextLineBoundsPackage *pkg = GetAccessibleTextLineBoundsPackage *pkg =
(GetAccessibleTextLineBoundsPackage *) (buffer + sizeof(PackageType)); (GetAccessibleTextLineBoundsPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTextLineBounds((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getAccessibleTextLineBounds((jobject)pkg->AccessibleContext,
pkg->index, &(pkg->rLineStart), &(pkg->rLineEnd)); pkg->index, &(pkg->rLineStart), &(pkg->rLineEnd));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextLineBoundsPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextLineBoundsPackage));
} }
break; break;
case cGetAccessibleTextRangePackage: case cGetAccessibleTextRangePackage:
PrintDebugString(" type == cGetAccessibleTextRangePackage"); PrintDebugString("[INFO]: type == cGetAccessibleTextRangePackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextRangePackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleTextRangePackage))) {
GetAccessibleTextRangePackage *pkg = GetAccessibleTextRangePackage *pkg =
(GetAccessibleTextRangePackage *) (buffer + sizeof(PackageType)); (GetAccessibleTextRangePackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getAccessibleTextRange((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getAccessibleTextRange((jobject)pkg->AccessibleContext,
pkg->start, pkg->end, (wchar_t *) &(pkg->rText), (sizeof(pkg->rText) / sizeof(wchar_t))); pkg->start, pkg->end, (wchar_t *) &(pkg->rText), (sizeof(pkg->rText) / sizeof(wchar_t)));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextRangePackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleTextRangePackage));
} }
break; break;
...@@ -1299,40 +1302,40 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1299,40 +1302,40 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ Accessible Value packages ------------------ // ------------ Accessible Value packages ------------------
case cGetCurrentAccessibleValueFromContextPackage: case cGetCurrentAccessibleValueFromContextPackage:
PrintDebugString(" type == cGetCurrentAccessibleValueFromContextPackage"); PrintDebugString("[INFO]: type == cGetCurrentAccessibleValueFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetCurrentAccessibleValueFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetCurrentAccessibleValueFromContextPackage))) {
GetCurrentAccessibleValueFromContextPackage *pkg = GetCurrentAccessibleValueFromContextPackage *pkg =
(GetCurrentAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType)); (GetCurrentAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getCurrentAccessibleValueFromContext((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getCurrentAccessibleValueFromContext((jobject)pkg->AccessibleContext,
(wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t))); (wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t)));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetCurrentAccessibleValueFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetCurrentAccessibleValueFromContextPackage));
} }
break; break;
case cGetMaximumAccessibleValueFromContextPackage: case cGetMaximumAccessibleValueFromContextPackage:
PrintDebugString(" type == cGetMaximumAccessibleValueFromContextPackage"); PrintDebugString("[INFO]: type == cGetMaximumAccessibleValueFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetMaximumAccessibleValueFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetMaximumAccessibleValueFromContextPackage))) {
GetMaximumAccessibleValueFromContextPackage *pkg = GetMaximumAccessibleValueFromContextPackage *pkg =
(GetMaximumAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType)); (GetMaximumAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getMaximumAccessibleValueFromContext((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getMaximumAccessibleValueFromContext((jobject)pkg->AccessibleContext,
(wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t))); (wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t)));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetMaximumAccessibleValueFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetMaximumAccessibleValueFromContextPackage));
} }
break; break;
case cGetMinimumAccessibleValueFromContextPackage: case cGetMinimumAccessibleValueFromContextPackage:
PrintDebugString(" type == cGetMinimumAccessibleValueFromContextPackage"); PrintDebugString("[INFO]: type == cGetMinimumAccessibleValueFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetMinimumAccessibleValueFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetMinimumAccessibleValueFromContextPackage))) {
GetMinimumAccessibleValueFromContextPackage *pkg = GetMinimumAccessibleValueFromContextPackage *pkg =
(GetMinimumAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType)); (GetMinimumAccessibleValueFromContextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->getMinimumAccessibleValueFromContext((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->getMinimumAccessibleValueFromContext((jobject)pkg->AccessibleContext,
(wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t))); (wchar_t *) &(pkg->rValue), (sizeof(pkg->rValue) / sizeof(wchar_t)));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetMinimumAccessibleValueFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetMinimumAccessibleValueFromContextPackage));
} }
break; break;
...@@ -1340,90 +1343,90 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1340,90 +1343,90 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ Accessible Selection packages ------------------ // ------------ Accessible Selection packages ------------------
case cAddAccessibleSelectionFromContextPackage: case cAddAccessibleSelectionFromContextPackage:
PrintDebugString(" type == cAddAccessibleSelectionFromContextPackage"); PrintDebugString("[INFO]: type == cAddAccessibleSelectionFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(AddAccessibleSelectionFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(AddAccessibleSelectionFromContextPackage))) {
AddAccessibleSelectionFromContextPackage *pkg = AddAccessibleSelectionFromContextPackage *pkg =
(AddAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); (AddAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->addAccessibleSelectionFromContext((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->addAccessibleSelectionFromContext((jobject)pkg->AccessibleContext,
pkg->index); pkg->index);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(AddAccessibleSelectionFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(AddAccessibleSelectionFromContextPackage));
} }
break; break;
case cClearAccessibleSelectionFromContextPackage: case cClearAccessibleSelectionFromContextPackage:
PrintDebugString(" type == cClearAccessibleSelectionFromContextPackage"); PrintDebugString("[INFO]: type == cClearAccessibleSelectionFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(ClearAccessibleSelectionFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(ClearAccessibleSelectionFromContextPackage))) {
ClearAccessibleSelectionFromContextPackage *pkg = ClearAccessibleSelectionFromContextPackage *pkg =
(ClearAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); (ClearAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->clearAccessibleSelectionFromContext((jobject)pkg->AccessibleContext); windowsThreadEntryPoints->clearAccessibleSelectionFromContext((jobject)pkg->AccessibleContext);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(ClearAccessibleSelectionFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(ClearAccessibleSelectionFromContextPackage));
} }
break; break;
case cGetAccessibleSelectionFromContextPackage: case cGetAccessibleSelectionFromContextPackage:
PrintDebugString(" type == cGetAccessibleSelectionFromContextPackage"); PrintDebugString("[INFO]: type == cGetAccessibleSelectionFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleSelectionFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleSelectionFromContextPackage))) {
GetAccessibleSelectionFromContextPackage *pkg = GetAccessibleSelectionFromContextPackage *pkg =
(GetAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); (GetAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType));
pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleSelectionFromContext( pkg->rAccessibleContext = (JOBJECT64)windowsThreadEntryPoints->getAccessibleSelectionFromContext(
(jobject)pkg->AccessibleContext, pkg->index); (jobject)pkg->AccessibleContext, pkg->index);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleSelectionFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleSelectionFromContextPackage));
} }
break; break;
case cGetAccessibleSelectionCountFromContextPackage: case cGetAccessibleSelectionCountFromContextPackage:
PrintDebugString(" type == cGetAccessibleSelectionCountFromContextPackage"); PrintDebugString("[INFO]: type == cGetAccessibleSelectionCountFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleSelectionCountFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(GetAccessibleSelectionCountFromContextPackage))) {
GetAccessibleSelectionCountFromContextPackage *pkg = GetAccessibleSelectionCountFromContextPackage *pkg =
(GetAccessibleSelectionCountFromContextPackage *) (buffer + sizeof(PackageType)); (GetAccessibleSelectionCountFromContextPackage *) (buffer + sizeof(PackageType));
pkg->rCount = windowsThreadEntryPoints->getAccessibleSelectionCountFromContext( pkg->rCount = windowsThreadEntryPoints->getAccessibleSelectionCountFromContext(
(jobject)pkg->AccessibleContext); (jobject)pkg->AccessibleContext);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(GetAccessibleSelectionCountFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(GetAccessibleSelectionCountFromContextPackage));
} }
break; break;
case cIsAccessibleChildSelectedFromContextPackage: case cIsAccessibleChildSelectedFromContextPackage:
PrintDebugString(" type == cIsAccessibleChildSelectedFromContextPackage"); PrintDebugString("[INFO]: type == cIsAccessibleChildSelectedFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleChildSelectedFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(IsAccessibleChildSelectedFromContextPackage))) {
IsAccessibleChildSelectedFromContextPackage *pkg = IsAccessibleChildSelectedFromContextPackage *pkg =
(IsAccessibleChildSelectedFromContextPackage *) (buffer + sizeof(PackageType)); (IsAccessibleChildSelectedFromContextPackage *) (buffer + sizeof(PackageType));
pkg->rResult = windowsThreadEntryPoints->isAccessibleChildSelectedFromContext( pkg->rResult = windowsThreadEntryPoints->isAccessibleChildSelectedFromContext(
(jobject)pkg->AccessibleContext, pkg->index); (jobject)pkg->AccessibleContext, pkg->index);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(IsAccessibleChildSelectedFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(IsAccessibleChildSelectedFromContextPackage));
} }
break; break;
case cRemoveAccessibleSelectionFromContextPackage: case cRemoveAccessibleSelectionFromContextPackage:
PrintDebugString(" type == cRemoveAccessibleSelectionFromContextPackage"); PrintDebugString("[INFO]: type == cRemoveAccessibleSelectionFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(RemoveAccessibleSelectionFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(RemoveAccessibleSelectionFromContextPackage))) {
RemoveAccessibleSelectionFromContextPackage *pkg = RemoveAccessibleSelectionFromContextPackage *pkg =
(RemoveAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); (RemoveAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->removeAccessibleSelectionFromContext((jobject)pkg->AccessibleContext, windowsThreadEntryPoints->removeAccessibleSelectionFromContext((jobject)pkg->AccessibleContext,
pkg->index); pkg->index);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(RemoveAccessibleSelectionFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(RemoveAccessibleSelectionFromContextPackage));
} }
break; break;
case cSelectAllAccessibleSelectionFromContextPackage: case cSelectAllAccessibleSelectionFromContextPackage:
PrintDebugString(" type == cSelectAllAccessibleSelectionFromContextPackage"); PrintDebugString("[INFO]: type == cSelectAllAccessibleSelectionFromContextPackage");
if (bufsize == (sizeof(PackageType) + sizeof(SelectAllAccessibleSelectionFromContextPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(SelectAllAccessibleSelectionFromContextPackage))) {
SelectAllAccessibleSelectionFromContextPackage *pkg = SelectAllAccessibleSelectionFromContextPackage *pkg =
(SelectAllAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType)); (SelectAllAccessibleSelectionFromContextPackage *) (buffer + sizeof(PackageType));
windowsThreadEntryPoints->selectAllAccessibleSelectionFromContext((jobject)pkg->AccessibleContext); windowsThreadEntryPoints->selectAllAccessibleSelectionFromContext((jobject)pkg->AccessibleContext);
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(SelectAllAccessibleSelectionFromContextPackage)); bufsize, sizeof(PackageType) + sizeof(SelectAllAccessibleSelectionFromContextPackage));
} }
break; break;
...@@ -1432,60 +1435,60 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1432,60 +1435,60 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
// ------------ event notification management packages ------------------ // ------------ event notification management packages ------------------
case cAddJavaEventNotificationPackage: case cAddJavaEventNotificationPackage:
PrintDebugString(" type = cAddJavaEventNotificationPackage"); PrintDebugString("[INFO]: type = cAddJavaEventNotificationPackage");
if (bufsize == (sizeof(PackageType) + sizeof(AddJavaEventNotificationPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(AddJavaEventNotificationPackage))) {
AddJavaEventNotificationPackage *pkg = AddJavaEventNotificationPackage *pkg =
(AddJavaEventNotificationPackage *) (buffer + sizeof(PackageType)); (AddJavaEventNotificationPackage *) (buffer + sizeof(PackageType));
addJavaEventNotification(pkg->type, (HWND)ABLongToHandle( pkg->DLLwindow ) ); addJavaEventNotification(pkg->type, (HWND)ABLongToHandle( pkg->DLLwindow ) );
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(AddJavaEventNotificationPackage)); bufsize, sizeof(PackageType) + sizeof(AddJavaEventNotificationPackage));
} }
break; break;
case cRemoveJavaEventNotificationPackage: case cRemoveJavaEventNotificationPackage:
PrintDebugString(" type = cRemoveJavaEventNotificationPackage"); PrintDebugString("[INFO]: type = cRemoveJavaEventNotificationPackage");
if (bufsize == (sizeof(PackageType) + sizeof(RemoveJavaEventNotificationPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(RemoveJavaEventNotificationPackage))) {
RemoveJavaEventNotificationPackage *pkg = RemoveJavaEventNotificationPackage *pkg =
(RemoveJavaEventNotificationPackage *) (buffer + sizeof(PackageType)); (RemoveJavaEventNotificationPackage *) (buffer + sizeof(PackageType));
removeJavaEventNotification(pkg->type, (HWND)ABLongToHandle( pkg->DLLwindow )); removeJavaEventNotification(pkg->type, (HWND)ABLongToHandle( pkg->DLLwindow ));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(RemoveJavaEventNotificationPackage)); bufsize, sizeof(PackageType) + sizeof(RemoveJavaEventNotificationPackage));
} }
break; break;
case cAddAccessibilityEventNotificationPackage: case cAddAccessibilityEventNotificationPackage:
PrintDebugString(" type = cAddAccessibilityEventNotificationPackage"); PrintDebugString("[INFO]: type = cAddAccessibilityEventNotificationPackage");
if (bufsize == (sizeof(PackageType) + sizeof(AddAccessibilityEventNotificationPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(AddAccessibilityEventNotificationPackage))) {
AddAccessibilityEventNotificationPackage *pkg = AddAccessibilityEventNotificationPackage *pkg =
(AddAccessibilityEventNotificationPackage *) (buffer + sizeof(PackageType)); (AddAccessibilityEventNotificationPackage *) (buffer + sizeof(PackageType));
addAccessibilityEventNotification(pkg->type, (HWND)ABLongToHandle(pkg->DLLwindow)); addAccessibilityEventNotification(pkg->type, (HWND)ABLongToHandle(pkg->DLLwindow));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(AddAccessibilityEventNotificationPackage)); bufsize, sizeof(PackageType) + sizeof(AddAccessibilityEventNotificationPackage));
} }
break; break;
case cRemoveAccessibilityEventNotificationPackage: case cRemoveAccessibilityEventNotificationPackage:
PrintDebugString(" type = cRemoveAccessibilityEventNotificationPackage"); PrintDebugString("[INFO]: type = cRemoveAccessibilityEventNotificationPackage");
if (bufsize == (sizeof(PackageType) + sizeof(RemoveAccessibilityEventNotificationPackage))) { if (bufsize == (sizeof(PackageType) + sizeof(RemoveAccessibilityEventNotificationPackage))) {
RemoveAccessibilityEventNotificationPackage *pkg = RemoveAccessibilityEventNotificationPackage *pkg =
(RemoveAccessibilityEventNotificationPackage *) (buffer + sizeof(PackageType)); (RemoveAccessibilityEventNotificationPackage *) (buffer + sizeof(PackageType));
removeAccessibilityEventNotification(pkg->type, (HWND)ABLongToHandle(pkg->DLLwindow)); removeAccessibilityEventNotification(pkg->type, (HWND)ABLongToHandle(pkg->DLLwindow));
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(RemoveAccessibilityEventNotificationPackage)); bufsize, sizeof(PackageType) + sizeof(RemoveAccessibilityEventNotificationPackage));
} }
break; break;
default: default:
PrintDebugString(" processing FAILED!! -> don't know how to handle type = %X", *type); PrintDebugString("[ERROR]: processing FAILED!! -> don't know how to handle type = %X", *type);
returnVal = -1; returnVal = -1;
break; break;
} }
PrintDebugString(" package processing completed"); PrintDebugString("[INFO]: package processing completed");
return returnVal; return returnVal;
} }
...@@ -1504,17 +1507,17 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) { ...@@ -1504,17 +1507,17 @@ JavaAccessBridge::processPackage(char *buffer, int bufsize) {
*/ */
LRESULT LRESULT
JavaAccessBridge::MemoryMappedFileCreated(HWND ATBridgeDLLWindow, char *filename) { JavaAccessBridge::MemoryMappedFileCreated(HWND ATBridgeDLLWindow, char *filename) {
PrintDebugString(" in MemoryMappedFileCreated(%p, %s)!", ATBridgeDLLWindow, filename); PrintDebugString("[INFO]: in MemoryMappedFileCreated(%p, %s)!", ATBridgeDLLWindow, filename);
AccessBridgeATInstance *newAT = AccessBridgeATInstance *newAT =
new AccessBridgeATInstance(dialogWindow, ATBridgeDLLWindow, filename, ATs); new AccessBridgeATInstance(dialogWindow, ATBridgeDLLWindow, filename, ATs);
PrintDebugString(" just created a new ATInstance = %p, old = %p", newAT, ATs); PrintDebugString("[INFO]: just created a new ATInstance = %p, old = %p", newAT, ATs);
ATs = newAT; ATs = newAT;
LRESULT returnVal = ATs->initiateIPC(); LRESULT returnVal = ATs->initiateIPC();
if (returnVal == 0) { if (returnVal == 0) {
PrintDebugString(" Successfully initiated IPC with AT!!!"); PrintDebugString("[INFO]: Successfully initiated IPC with AT!!!");
} else { } else {
PrintDebugString(" ERROR: Failed to initiate IPC with AT!!!"); PrintDebugString("[ERROR]: Failed to initiate IPC with AT!!!");
} }
return returnVal; return returnVal;
...@@ -1527,9 +1530,9 @@ JavaAccessBridge::MemoryMappedFileCreated(HWND ATBridgeDLLWindow, char *filename ...@@ -1527,9 +1530,9 @@ JavaAccessBridge::MemoryMappedFileCreated(HWND ATBridgeDLLWindow, char *filename
*/ */
void void
JavaAccessBridge::WindowsATDestroyed(HWND ATBridgeDLLWindow) { JavaAccessBridge::WindowsATDestroyed(HWND ATBridgeDLLWindow) {
PrintDebugString("\r\nin JavaAccessBridge::WindowsATDestroyed(%p)", ATBridgeDLLWindow); PrintDebugString("[INFO]: in JavaAccessBridge::WindowsATDestroyed(%p)", ATBridgeDLLWindow);
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! -> ATs == 0! (shouldn't happen here)"); PrintDebugString("[ERROR]: -> ATs == 0! (shouldn't happen here)");
return; return;
} }
...@@ -1541,20 +1544,20 @@ JavaAccessBridge::WindowsATDestroyed(HWND ATBridgeDLLWindow) { ...@@ -1541,20 +1544,20 @@ JavaAccessBridge::WindowsATDestroyed(HWND ATBridgeDLLWindow) {
removeJavaEventNotification(currentAT->javaEventMask, ATBridgeDLLWindow); removeJavaEventNotification(currentAT->javaEventMask, ATBridgeDLLWindow);
removeAccessibilityEventNotification(currentAT->accessibilityEventMask, ATBridgeDLLWindow); removeAccessibilityEventNotification(currentAT->accessibilityEventMask, ATBridgeDLLWindow);
delete currentAT; delete currentAT;
PrintDebugString(" data structures successfully removed"); PrintDebugString("[INFO]: data structures successfully removed");
} else { } else {
while (currentAT != (AccessBridgeATInstance *) NULL) { while (currentAT != (AccessBridgeATInstance *) NULL) {
if (currentAT->winAccessBridgeWindow == ATBridgeDLLWindow) { if (currentAT->winAccessBridgeWindow == ATBridgeDLLWindow) {
previousAT->nextATInstance = currentAT->nextATInstance; previousAT->nextATInstance = currentAT->nextATInstance;
delete currentAT; delete currentAT;
PrintDebugString(" data structures successfully removed"); PrintDebugString("[INFO]: data structures successfully removed");
return; return;
} else { } else {
previousAT = currentAT; previousAT = currentAT;
currentAT = currentAT->nextATInstance; currentAT = currentAT->nextATInstance;
} }
} }
PrintDebugString(" ERROR!! couldn't find matching data structures!"); PrintDebugString("[ERROR]: couldn't find matching data structures!");
} }
} }
...@@ -1572,13 +1575,13 @@ JavaAccessBridge::WindowsATDestroyed(HWND ATBridgeDLLWindow) { ...@@ -1572,13 +1575,13 @@ JavaAccessBridge::WindowsATDestroyed(HWND ATBridgeDLLWindow) {
*/ */
void void
JavaAccessBridge::releaseJavaObject(jobject object) { JavaAccessBridge::releaseJavaObject(jobject object) {
PrintDebugString("In JavaAccessBridge::releaseJavaObject"); PrintDebugString("[INFO]: In JavaAccessBridge::releaseJavaObject");
PrintDebugString(" object X: %p", object); PrintDebugString("[INFO]: object X: %p", object);
if (windowsThreadJNIEnv != (JNIEnv *) 0) { if (windowsThreadJNIEnv != (JNIEnv *) 0) {
windowsThreadJNIEnv->DeleteGlobalRef(object); windowsThreadJNIEnv->DeleteGlobalRef(object);
PrintDebugString(" global reference deleted.", object); PrintDebugString("[INFO]: global reference deleted.", object);
} else { } else {
PrintDebugString(" Error! windowsThreadJNIEnv == 0"); PrintDebugString("[ERROR]: windowsThreadJNIEnv == 0");
} }
} }
...@@ -1592,23 +1595,23 @@ void ...@@ -1592,23 +1595,23 @@ void
JavaAccessBridge::addJavaEventNotification(jlong type, HWND DLLwindow) { JavaAccessBridge::addJavaEventNotification(jlong type, HWND DLLwindow) {
// walk through list of ATs, find this one and add this type // walk through list of ATs, find this one and add this type
// and, if we weren't listening for these before, ask Java for 'em // and, if we weren't listening for these before, ask Java for 'em
PrintDebugString(" adding Java event type %016I64X to HWND %p", type, DLLwindow); PrintDebugString("[INFO]: adding Java event type %016I64X to HWND %p", type, DLLwindow);
AccessBridgeATInstance *ati = ATs; AccessBridgeATInstance *ati = ATs;
long globalEventMask = 0; long globalEventMask = 0;
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->winAccessBridgeWindow == DLLwindow) { if (ati->winAccessBridgeWindow == DLLwindow) {
ati->javaEventMask |= type; ati->javaEventMask |= type;
PrintDebugString(" found HWND, javaEventMask now is %X", ati->javaEventMask); PrintDebugString("[INFO]: found HWND, javaEventMask now is %X", ati->javaEventMask);
} else { } else {
globalEventMask |= ati->javaEventMask; globalEventMask |= ati->javaEventMask;
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" union of all Java AT event masks: %X", globalEventMask); PrintDebugString("[INFO]: union of all Java AT event masks: %X", globalEventMask);
if (!(globalEventMask & type)) { if (!(globalEventMask & type)) {
// no other ATs wanted this event; // no other ATs wanted this event;
// start getting them from Java // start getting them from Java
PrintDebugString(" no other AT wanted this Java event (so not registered); adding to AccessBridge.java"); PrintDebugString("[INFO]: no other AT wanted this Java event (so not registered); adding to AccessBridge.java");
windowsThreadEntryPoints->addJavaEventNotification(type); windowsThreadEntryPoints->addJavaEventNotification(type);
} }
} }
...@@ -1621,23 +1624,23 @@ void ...@@ -1621,23 +1624,23 @@ void
JavaAccessBridge::removeJavaEventNotification(jlong type, HWND DLLwindow) { JavaAccessBridge::removeJavaEventNotification(jlong type, HWND DLLwindow) {
// walk through list of ATs, find this one and remove this type // walk through list of ATs, find this one and remove this type
// and, if no other AT wants 'em either, tell Java we no longer want 'em // and, if no other AT wants 'em either, tell Java we no longer want 'em
PrintDebugString(" removing Java event type %016I64X from HWND %p", type, DLLwindow); PrintDebugString("[INFO]: removing Java event type %016I64X from HWND %p", type, DLLwindow);
AccessBridgeATInstance *ati = ATs; AccessBridgeATInstance *ati = ATs;
long globalEventMask = 0; long globalEventMask = 0;
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->winAccessBridgeWindow == DLLwindow) { if (ati->winAccessBridgeWindow == DLLwindow) {
ati->javaEventMask &= (0xFFFFFFFF - type); ati->javaEventMask &= (0xFFFFFFFF - type);
PrintDebugString(" found HWND, javaEventMask now is %X", ati->javaEventMask); PrintDebugString("[INFO]: found HWND, javaEventMask now is %X", ati->javaEventMask);
} else { } else {
globalEventMask |= ati->javaEventMask; globalEventMask |= ati->javaEventMask;
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" union of all Java AT event masks: %X", globalEventMask); PrintDebugString("[INFO]: union of all Java AT event masks: %X", globalEventMask);
if (!(globalEventMask & type)) { if (!(globalEventMask & type)) {
// no other ATs wanted this event; // no other ATs wanted this event;
// stop getting them from Java // stop getting them from Java
PrintDebugString(" no other AT wanted this Java event (so can remove); removing from AccessBridge.java"); PrintDebugString("[INFO]: no other AT wanted this Java event (so can remove); removing from AccessBridge.java");
windowsThreadEntryPoints->removeJavaEventNotification(type); windowsThreadEntryPoints->removeJavaEventNotification(type);
} }
} }
...@@ -1651,23 +1654,23 @@ void ...@@ -1651,23 +1654,23 @@ void
JavaAccessBridge::addAccessibilityEventNotification(jlong type, HWND DLLwindow) { JavaAccessBridge::addAccessibilityEventNotification(jlong type, HWND DLLwindow) {
// walk through list of ATs, find this one and add this type // walk through list of ATs, find this one and add this type
// and, if we weren't listening for these before, ask Java for 'em // and, if we weren't listening for these before, ask Java for 'em
PrintDebugString(" adding Accesibility event type %016I64X to HWND %p", type, DLLwindow); PrintDebugString("[INFO]: adding Accesibility event type %016I64X to HWND %p", type, DLLwindow);
AccessBridgeATInstance *ati = ATs; AccessBridgeATInstance *ati = ATs;
long globalEventMask = 0; long globalEventMask = 0;
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->winAccessBridgeWindow == DLLwindow) { if (ati->winAccessBridgeWindow == DLLwindow) {
ati->accessibilityEventMask |= type; ati->accessibilityEventMask |= type;
PrintDebugString(" found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask); PrintDebugString("[INFO]: found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask);
} else { } else {
globalEventMask |= ati->accessibilityEventMask; globalEventMask |= ati->accessibilityEventMask;
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" union of all Accessibility AT event masks: %X", globalEventMask); PrintDebugString("[INFO]: union of all Accessibility AT event masks: %X", globalEventMask);
if (!(globalEventMask & type)) { if (!(globalEventMask & type)) {
// no other ATs wanted this event; // no other ATs wanted this event;
// start getting them from Java // start getting them from Java
PrintDebugString(" no other AT wanted this Accesibility event (so not registered); adding to AccessBridge.java"); PrintDebugString("[INFO]: no other AT wanted this Accesibility event (so not registered); adding to AccessBridge.java");
windowsThreadEntryPoints->addAccessibilityEventNotification(type); windowsThreadEntryPoints->addAccessibilityEventNotification(type);
} }
} }
...@@ -1680,23 +1683,23 @@ void ...@@ -1680,23 +1683,23 @@ void
JavaAccessBridge::removeAccessibilityEventNotification(jlong type, HWND DLLwindow) { JavaAccessBridge::removeAccessibilityEventNotification(jlong type, HWND DLLwindow) {
// walk through list of ATs, find this one and remove this type // walk through list of ATs, find this one and remove this type
// and, if no other AT wants 'em either, tell Java we no longer want 'em // and, if no other AT wants 'em either, tell Java we no longer want 'em
PrintDebugString(" removing Accesibility event type %016I64X from HWND %p", type, DLLwindow); PrintDebugString("[INFO]: removing Accesibility event type %016I64X from HWND %p", type, DLLwindow);
AccessBridgeATInstance *ati = ATs; AccessBridgeATInstance *ati = ATs;
long globalEventMask = 0; long globalEventMask = 0;
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->winAccessBridgeWindow == DLLwindow) { if (ati->winAccessBridgeWindow == DLLwindow) {
ati->accessibilityEventMask &= (0xFFFFFFFF - type); ati->accessibilityEventMask &= (0xFFFFFFFF - type);
PrintDebugString(" found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask); PrintDebugString("[INFO]: found HWND, accessibilityEventMask now is %X", ati->accessibilityEventMask);
} else { } else {
globalEventMask |= ati->accessibilityEventMask; globalEventMask |= ati->accessibilityEventMask;
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" union of all Accessibility AT event masks: %X", globalEventMask); PrintDebugString("[INFO]: union of all Accessibility AT event masks: %X", globalEventMask);
if (!(globalEventMask & type)) { if (!(globalEventMask & type)) {
// no other ATs wanted this event; // no other ATs wanted this event;
// stop getting them from Java // stop getting them from Java
PrintDebugString(" no other AT wanted this Accessibility event (so can remove); removing from AccessBridge.java"); PrintDebugString("[INFO]: no other AT wanted this Accessibility event (so can remove); removing from AccessBridge.java");
windowsThreadEntryPoints->removeAccessibilityEventNotification(type); windowsThreadEntryPoints->removeAccessibilityEventNotification(type);
} }
} }
...@@ -1713,13 +1716,13 @@ JavaAccessBridge::firePropertyCaretChange(JNIEnv *env, jobject callingObj, ...@@ -1713,13 +1716,13 @@ JavaAccessBridge::firePropertyCaretChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source, jobject event, jobject source,
jint oldValue, jint newValue) { jint oldValue, jint newValue) {
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyCaretChanged(%p, %p, %p, %p, %d, %d)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyCaretChanged(%p, %p, %p, %p, %d, %d)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -1735,17 +1738,17 @@ JavaAccessBridge::firePropertyCaretChange(JNIEnv *env, jobject callingObj, ...@@ -1735,17 +1738,17 @@ JavaAccessBridge::firePropertyCaretChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) { if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
pkg->oldPosition = oldValue; pkg->oldPosition = oldValue;
...@@ -1755,7 +1758,7 @@ JavaAccessBridge::firePropertyCaretChange(JNIEnv *env, jobject callingObj, ...@@ -1755,7 +1758,7 @@ JavaAccessBridge::firePropertyCaretChange(JNIEnv *env, jobject callingObj,
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyCaretChange event"); PrintDebugString("[INFO]: done with propertyCaretChange event");
} }
/** /**
...@@ -1767,13 +1770,13 @@ JavaAccessBridge::firePropertyDescriptionChange(JNIEnv *env, jobject callingObj, ...@@ -1767,13 +1770,13 @@ JavaAccessBridge::firePropertyDescriptionChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source, jobject event, jobject source,
jstring oldValue, jstring newValue){ jstring oldValue, jstring newValue){
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyDescriptionChanged(%p, %p, %p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyDescriptionChanged(%p, %p, %p, %p, %p, %p)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -1790,17 +1793,17 @@ JavaAccessBridge::firePropertyDescriptionChange(JNIEnv *env, jobject callingObj, ...@@ -1790,17 +1793,17 @@ JavaAccessBridge::firePropertyDescriptionChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) { if (ati->accessibilityEventMask & cPropertyCaretChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
if (oldValue != (jstring) 0) { if (oldValue != (jstring) 0) {
...@@ -1841,7 +1844,7 @@ JavaAccessBridge::firePropertyDescriptionChange(JNIEnv *env, jobject callingObj, ...@@ -1841,7 +1844,7 @@ JavaAccessBridge::firePropertyDescriptionChange(JNIEnv *env, jobject callingObj,
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyDescriptionChange event"); PrintDebugString("[INFO]: done with propertyDescriptionChange event");
} }
/** /**
...@@ -1853,13 +1856,13 @@ JavaAccessBridge::firePropertyNameChange(JNIEnv *env, jobject callingObj, ...@@ -1853,13 +1856,13 @@ JavaAccessBridge::firePropertyNameChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source, jobject event, jobject source,
jstring oldValue, jstring newValue){ jstring oldValue, jstring newValue){
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyNameChanged(%p, %p, %p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyNameChanged(%p, %p, %p, %p, %p, %p)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -1876,17 +1879,17 @@ JavaAccessBridge::firePropertyNameChange(JNIEnv *env, jobject callingObj, ...@@ -1876,17 +1879,17 @@ JavaAccessBridge::firePropertyNameChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyNameChangeEvent) { if (ati->accessibilityEventMask & cPropertyNameChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
if (oldValue != (jstring) 0) { if (oldValue != (jstring) 0) {
...@@ -1927,7 +1930,7 @@ JavaAccessBridge::firePropertyNameChange(JNIEnv *env, jobject callingObj, ...@@ -1927,7 +1930,7 @@ JavaAccessBridge::firePropertyNameChange(JNIEnv *env, jobject callingObj,
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyNameChange event"); PrintDebugString("[INFO]: done with propertyNameChange event");
} }
...@@ -1939,12 +1942,12 @@ void ...@@ -1939,12 +1942,12 @@ void
JavaAccessBridge::firePropertySelectionChange(JNIEnv *env, jobject callingObj, JavaAccessBridge::firePropertySelectionChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source) { jobject event, jobject source) {
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertySelectionChanged(%p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertySelectionChanged(%p, %p, %p, %p)",
env, callingObj, event, source); env, callingObj, event, source);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -1960,24 +1963,24 @@ JavaAccessBridge::firePropertySelectionChange(JNIEnv *env, jobject callingObj, ...@@ -1960,24 +1963,24 @@ JavaAccessBridge::firePropertySelectionChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertySelectionChangeEvent) { if (ati->accessibilityEventMask & cPropertySelectionChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertySelectionChangeEvent); ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertySelectionChangeEvent);
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertySelectionChange event"); PrintDebugString("[INFO]: done with propertySelectionChange event");
} }
...@@ -1990,13 +1993,13 @@ JavaAccessBridge::firePropertyStateChange(JNIEnv *env, jobject callingObj, ...@@ -1990,13 +1993,13 @@ JavaAccessBridge::firePropertyStateChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source, jobject event, jobject source,
jstring oldValue, jstring newValue){ jstring oldValue, jstring newValue){
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyStateChanged(%p, %p, %p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyStateChanged(%p, %p, %p, %p, %p, %p)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -2013,17 +2016,17 @@ JavaAccessBridge::firePropertyStateChange(JNIEnv *env, jobject callingObj, ...@@ -2013,17 +2016,17 @@ JavaAccessBridge::firePropertyStateChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyStateChangeEvent) { if (ati->accessibilityEventMask & cPropertyStateChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
if (oldValue != (jstring) 0) { if (oldValue != (jstring) 0) {
...@@ -2064,7 +2067,7 @@ JavaAccessBridge::firePropertyStateChange(JNIEnv *env, jobject callingObj, ...@@ -2064,7 +2067,7 @@ JavaAccessBridge::firePropertyStateChange(JNIEnv *env, jobject callingObj,
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyStateChange event"); PrintDebugString("[INFO]: done with propertyStateChange event");
} }
...@@ -2076,12 +2079,12 @@ void ...@@ -2076,12 +2079,12 @@ void
JavaAccessBridge::firePropertyTextChange(JNIEnv *env, jobject callingObj, JavaAccessBridge::firePropertyTextChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source) { jobject event, jobject source) {
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyTextChanged(%p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyTextChanged(%p, %p, %p, %p)",
env, callingObj, event, source); env, callingObj, event, source);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -2097,24 +2100,24 @@ JavaAccessBridge::firePropertyTextChange(JNIEnv *env, jobject callingObj, ...@@ -2097,24 +2100,24 @@ JavaAccessBridge::firePropertyTextChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyTextChangeEvent) { if (ati->accessibilityEventMask & cPropertyTextChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p",pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyTextChangeEvent); ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyTextChangeEvent);
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyTextChange event"); PrintDebugString("[INFO]: done with propertyTextChange event");
} }
...@@ -2127,13 +2130,13 @@ JavaAccessBridge::firePropertyValueChange(JNIEnv *env, jobject callingObj, ...@@ -2127,13 +2130,13 @@ JavaAccessBridge::firePropertyValueChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source, jobject event, jobject source,
jstring oldValue, jstring newValue){ jstring oldValue, jstring newValue){
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyValueChanged(%p, %p, %p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyValueChanged(%p, %p, %p, %p, %p, %p)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -2150,17 +2153,17 @@ JavaAccessBridge::firePropertyValueChange(JNIEnv *env, jobject callingObj, ...@@ -2150,17 +2153,17 @@ JavaAccessBridge::firePropertyValueChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyValueChangeEvent) { if (ati->accessibilityEventMask & cPropertyValueChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
if (oldValue != (jstring) 0) { if (oldValue != (jstring) 0) {
...@@ -2201,7 +2204,7 @@ JavaAccessBridge::firePropertyValueChange(JNIEnv *env, jobject callingObj, ...@@ -2201,7 +2204,7 @@ JavaAccessBridge::firePropertyValueChange(JNIEnv *env, jobject callingObj,
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyValueChange event"); PrintDebugString("[INFO]: done with propertyValueChange event");
} }
/** /**
...@@ -2212,12 +2215,12 @@ void ...@@ -2212,12 +2215,12 @@ void
JavaAccessBridge::firePropertyVisibleDataChange(JNIEnv *env, jobject callingObj, JavaAccessBridge::firePropertyVisibleDataChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source) { jobject event, jobject source) {
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyVisibleDataChanged(%p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyVisibleDataChanged(%p, %p, %p, %p)",
env, callingObj, event, source); env, callingObj, event, source);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -2233,24 +2236,24 @@ JavaAccessBridge::firePropertyVisibleDataChange(JNIEnv *env, jobject callingObj, ...@@ -2233,24 +2236,24 @@ JavaAccessBridge::firePropertyVisibleDataChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyVisibleDataChangeEvent) { if (ati->accessibilityEventMask & cPropertyVisibleDataChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyVisibleDataChangeEvent); ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyVisibleDataChangeEvent);
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyVisibleDataChange event"); PrintDebugString("[INFO]: done with propertyVisibleDataChange event");
} }
...@@ -2263,13 +2266,13 @@ JavaAccessBridge::firePropertyChildChange(JNIEnv *env, jobject callingObj, ...@@ -2263,13 +2266,13 @@ JavaAccessBridge::firePropertyChildChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source, jobject event, jobject source,
jobject oldValue, jobject newValue){ jobject oldValue, jobject newValue){
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyChildPropertyChanged(%p, %p, %p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyChildPropertyChanged(%p, %p, %p, %p, %p, %p)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -2285,7 +2288,7 @@ JavaAccessBridge::firePropertyChildChange(JNIEnv *env, jobject callingObj, ...@@ -2285,7 +2288,7 @@ JavaAccessBridge::firePropertyChildChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyChildChangeEvent) { if (ati->accessibilityEventMask & cPropertyChildChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
...@@ -2293,22 +2296,24 @@ JavaAccessBridge::firePropertyChildChange(JNIEnv *env, jobject callingObj, ...@@ -2293,22 +2296,24 @@ JavaAccessBridge::firePropertyChildChange(JNIEnv *env, jobject callingObj,
pkg->oldChildAccessibleContext = (JOBJECT64)env->NewGlobalRef(oldValue); pkg->oldChildAccessibleContext = (JOBJECT64)env->NewGlobalRef(oldValue);
pkg->newChildAccessibleContext = (JOBJECT64)env->NewGlobalRef(newValue); pkg->newChildAccessibleContext = (JOBJECT64)env->NewGlobalRef(newValue);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p"\
PrintDebugString(" GlobalRef'd OldChildAC: %p", pkg->oldChildAccessibleContext); " GlobalRef'd OldChildAC: %p"\
PrintDebugString(" GlobalRef'd NewChildAC: %p", pkg->newChildAccessibleContext); " GlobalRef'd NewChildAC: %p"\
, pkg->Event, pkg->AccessibleContextSource, pkg->oldChildAccessibleContext, pkg->newChildAccessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X"\
PrintDebugString(" GlobalRef'd OldChildAC: %016I64X", pkg->oldChildAccessibleContext); " GlobalRef'd OldChildAC: %016I64X"\
PrintDebugString(" GlobalRef'd NewChildAC: %016I64X", pkg->newChildAccessibleContext); " GlobalRef'd NewChildAC: %016I64X"\
, pkg->Event, pkg->AccessibleContextSource, pkg->oldChildAccessibleContext, pkg->newChildAccessibleContext);
#endif #endif
ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyChildChangeEvent); ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyChildChangeEvent);
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyChildChange event"); PrintDebugString("[INFO]: done with propertyChildChange event");
} }
...@@ -2321,13 +2326,13 @@ JavaAccessBridge::firePropertyActiveDescendentChange(JNIEnv *env, jobject callin ...@@ -2321,13 +2326,13 @@ JavaAccessBridge::firePropertyActiveDescendentChange(JNIEnv *env, jobject callin
jobject event, jobject source, jobject event, jobject source,
jobject oldValue, jobject newValue){ jobject oldValue, jobject newValue){
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyActiveDescendentPropertyChanged(%p, %p, %p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyActiveDescendentPropertyChanged(%p, %p, %p, %p, %p, %p)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -2343,7 +2348,7 @@ JavaAccessBridge::firePropertyActiveDescendentChange(JNIEnv *env, jobject callin ...@@ -2343,7 +2348,7 @@ JavaAccessBridge::firePropertyActiveDescendentChange(JNIEnv *env, jobject callin
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyActiveDescendentChangeEvent) { if (ati->accessibilityEventMask & cPropertyActiveDescendentChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
...@@ -2351,22 +2356,24 @@ JavaAccessBridge::firePropertyActiveDescendentChange(JNIEnv *env, jobject callin ...@@ -2351,22 +2356,24 @@ JavaAccessBridge::firePropertyActiveDescendentChange(JNIEnv *env, jobject callin
pkg->oldActiveDescendentAccessibleContext = (JOBJECT64)env->NewGlobalRef(oldValue); pkg->oldActiveDescendentAccessibleContext = (JOBJECT64)env->NewGlobalRef(oldValue);
pkg->newActiveDescendentAccessibleContext = (JOBJECT64)env->NewGlobalRef(newValue); pkg->newActiveDescendentAccessibleContext = (JOBJECT64)env->NewGlobalRef(newValue);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p"\
PrintDebugString(" GlobalRef'd OldActiveDescendentAC: %p", pkg->oldActiveDescendentAccessibleContext); " GlobalRef'd OldActiveDescendentAC: %p"\
PrintDebugString(" GlobalRef'd NewActiveDescendentAC: %p", pkg->newActiveDescendentAccessibleContext); " GlobalRef'd NewActiveDescendentAC: %p"\
, pkg->Event, pkg->AccessibleContextSource, pkg->oldActiveDescendentAccessibleContext, pkg->newActiveDescendentAccessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X"\
PrintDebugString(" GlobalRef'd OldActiveDescendentAC: %016I64X", pkg->oldActiveDescendentAccessibleContext); " GlobalRef'd OldActiveDescendentAC: %016I64X"\
PrintDebugString(" GlobalRef'd NewActiveDescendentAC: %016I64X", pkg->newActiveDescendentAccessibleContext); " GlobalRef'd NewActiveDescendentAC: %016I64X"\
, pkg->Event, pkg->AccessibleContextSource, pkg->oldActiveDescendentAccessibleContext, pkg->newActiveDescendentAccessibleContext);
#endif #endif
ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyActiveDescendentChangeEvent); ati->sendAccessibilityEventPackage(buffer, sizeof(buffer), cPropertyActiveDescendentChangeEvent);
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyActiveChange event"); PrintDebugString("[INFO]: done with propertyActiveChange event");
} }
/** /**
...@@ -2378,13 +2385,13 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, ...@@ -2378,13 +2385,13 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj,
jobject event, jobject source, jobject event, jobject source,
jstring oldValue, jstring newValue){ jstring oldValue, jstring newValue){
PrintDebugString("\r\nJava_com_sun_java_accessibility_AccessBridge_propertyTableModelChange(%p, %p, %p, %p, %p, %p)", PrintDebugString("[INFO]: Java_com_sun_java_accessibility_AccessBridge_propertyTableModelChange(%p, %p, %p, %p, %p, %p)",
env, callingObj, event, env, callingObj, event,
source, oldValue, newValue); source, oldValue, newValue);
// sanity check // sanity check
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; // panic! return; // panic!
} }
...@@ -2401,17 +2408,17 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, ...@@ -2401,17 +2408,17 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj,
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->accessibilityEventMask & cPropertyTableModelChangeEvent) { if (ati->accessibilityEventMask & cPropertyTableModelChangeEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
// make new GlobalRefs for this AT // make new GlobalRefs for this AT
pkg->Event = (JOBJECT64)env->NewGlobalRef(event); pkg->Event = (JOBJECT64)env->NewGlobalRef(event);
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
if (oldValue != (jstring) 0) { if (oldValue != (jstring) 0) {
...@@ -2452,31 +2459,31 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, ...@@ -2452,31 +2459,31 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj,
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with propertyTableModelChange event"); PrintDebugString("[INFO]: done with propertyTableModelChange event");
} }
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
#define PRINT_GLOBALREFS() \ #define PRINT_GLOBALREFS() \
PrintDebugString(" GlobalRef'd Event: %p", pkg->Event); \ PrintDebugString("[INFO]: GlobalRef'd Event: %p"\
PrintDebugString(" GlobalRef'd Source: %p", pkg->AccessibleContextSource); " GlobalRef'd Source: %p", pkg->Event, pkg->AccessibleContextSource);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
#define PRINT_GLOBALREFS() \ #define PRINT_GLOBALREFS() \
PrintDebugString(" GlobalRef'd Event: %016I64X", pkg->Event); \ PrintDebugString("[INFO]: GlobalRef'd Event: %016I64X"\
PrintDebugString(" GlobalRef'd Source: %016I64X", pkg->AccessibleContextSource); " GlobalRef'd Source: %016I64X", pkg->Event, pkg->AccessibleContextSource);
#endif #endif
#define FIRE_EVENT(function, packageStruct, packageConstant, eventConstant) \ #define FIRE_EVENT(function, packageStruct, packageConstant, eventConstant) \
void JavaAccessBridge::function(JNIEnv *env, jobject callingObj, \ void JavaAccessBridge::function(JNIEnv *env, jobject callingObj, \
jobject eventObj, jobject source) { \ jobject eventObj, jobject source) { \
\ \
PrintDebugString("\r\nFiring event id = %d(%p, %p, %p, %p); vmID = %X", \ PrintDebugString("[INFO]: Firing event id = %d(%p, %p, %p, %p); vmID = %X", \
eventConstant, env, callingObj, eventObj, source, dialogWindow); \ eventConstant, env, callingObj, eventObj, source, dialogWindow);\
\ \
/* sanity check */ \ /* sanity check */ \
if (ATs == (AccessBridgeATInstance *) 0) { \ if (ATs == (AccessBridgeATInstance *) 0) { \
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); \ PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)"); \
return; /* panic! */ \ return; /* panic! */ \
} \ } \
\ \
...@@ -2490,11 +2497,11 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, ...@@ -2490,11 +2497,11 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj,
/* make new Global Refs, send events only to those ATs that want 'em */ \ /* make new Global Refs, send events only to those ATs that want 'em */ \
AccessBridgeATInstance *ati = ATs; \ AccessBridgeATInstance *ati = ATs; \
while (ati != (AccessBridgeATInstance *) 0) { \ while (ati != (AccessBridgeATInstance *) 0) { \
PrintDebugString("\r\njavaEventMask = %X eventConstant=%d pkg->vmID=%X", \ PrintDebugString("[INFO]: javaEventMask = %X eventConstant=%d pkg->vmID=%X",\
ati->javaEventMask, eventConstant, pkg->vmID ); \ ati->javaEventMask, eventConstant, pkg->vmID ); \
if (ati->javaEventMask & eventConstant) { \ if (ati->javaEventMask & eventConstant) { \
\ \
PrintDebugString(" sending to AT"); \ PrintDebugString("[INFO]: sending to AT"); \
/* make new GlobalRefs for this AT */ \ /* make new GlobalRefs for this AT */ \
pkg->Event = (JOBJECT64)env->NewGlobalRef(eventObj); \ pkg->Event = (JOBJECT64)env->NewGlobalRef(eventObj); \
pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); \ pkg->AccessibleContextSource = (JOBJECT64)env->NewGlobalRef(source); \
...@@ -2504,17 +2511,17 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, ...@@ -2504,17 +2511,17 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj,
} \ } \
ati = ati->nextATInstance; \ ati = ati->nextATInstance; \
} \ } \
PrintDebugString(" done with firing AWT event"); \ PrintDebugString("[INFO]: done with firing AWT event"); \
} }
void JavaAccessBridge::javaShutdown(JNIEnv *env, jobject callingObj) { void JavaAccessBridge::javaShutdown(JNIEnv *env, jobject callingObj) {
PrintDebugString("\r\nFiring event id = %d(%p, %p); vmID = %X", PrintDebugString("[INFO]: Firing event id = %d(%p, %p); vmID = %X",
cJavaShutdownEvent, env, callingObj, dialogWindow); cJavaShutdownEvent, env, callingObj, dialogWindow);
/* sanity check */ /* sanity check */
if (ATs == (AccessBridgeATInstance *) 0) { if (ATs == (AccessBridgeATInstance *) 0) {
PrintDebugString(" ERROR!! ATs == 0! (shouldn't happen here!)"); PrintDebugString("[ERROR]: ATs == 0! (shouldn't happen here!)");
return; /* panic! */ return; /* panic! */
} }
...@@ -2529,12 +2536,12 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, ...@@ -2529,12 +2536,12 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj,
AccessBridgeATInstance *ati = ATs; AccessBridgeATInstance *ati = ATs;
while (ati != (AccessBridgeATInstance *) 0) { while (ati != (AccessBridgeATInstance *) 0) {
if (ati->javaEventMask & cJavaShutdownEvent) { if (ati->javaEventMask & cJavaShutdownEvent) {
PrintDebugString(" sending to AT"); PrintDebugString("[INFO]: sending to AT");
ati->sendJavaEventPackage(buffer, sizeof(buffer), cJavaShutdownEvent); ati->sendJavaEventPackage(buffer, sizeof(buffer), cJavaShutdownEvent);
} }
ati = ati->nextATInstance; ati = ati->nextATInstance;
} }
PrintDebugString(" done with firing AWT event"); PrintDebugString("[INFO]: done with firing AWT event");
} }
FIRE_EVENT(fireFocusGained, FocusGainedPackage, cFocusGainedPackage, cFocusGainedEvent) FIRE_EVENT(fireFocusGained, FocusGainedPackage, cFocusGainedPackage, cFocusGainedEvent)
......
/* /*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -76,7 +76,7 @@ BOOL CALLBACK newJVMFoundDialogProc(HWND hwndDlg, UINT message, WPARAM wParam, L ...@@ -76,7 +76,7 @@ BOOL CALLBACK newJVMFoundDialogProc(HWND hwndDlg, UINT message, WPARAM wParam, L
// Remind user later that a new JVM was installed // Remind user later that a new JVM was installed
case cRemindThereIsNewJVM: case cRemindThereIsNewJVM:
PrintDebugString(" newJVMDialogProc: cRemindThereIsNewJVM"); PrintDebugString("[INFO]: newJVMDialogProc: cRemindThereIsNewJVM");
// do nothing // do nothing
EndDialog(hwndDlg, wParam); EndDialog(hwndDlg, wParam);
return TRUE; return TRUE;
...@@ -130,13 +130,14 @@ extern "C" { ...@@ -130,13 +130,14 @@ extern "C" {
switch (fdwReason) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: // A Windows executable loaded us case DLL_PROCESS_ATTACH: // A Windows executable loaded us
PrintDebugString("DLL_PROCESS_ATTACH"); initializeFileLogger("windows_access_bridge");
PrintDebugString("[INFO]: DLL_PROCESS_ATTACH");
theWindowsAccessBridge = new WinAccessBridge(hinstDll); theWindowsAccessBridge = new WinAccessBridge(hinstDll);
break; break;
case DLL_PROCESS_DETACH: // A Windows executable unloaded us case DLL_PROCESS_DETACH: // A Windows executable unloaded us
if (theWindowsAccessBridge != (WinAccessBridge *) 0) { if (theWindowsAccessBridge != (WinAccessBridge *) 0) {
PrintDebugString("*** AccessBridgeDialogProc -> deleting theWindowsAccessBridge"); PrintDebugString("[INFO]: *** AccessBridgeDialogProc -> deleting theWindowsAccessBridge");
delete theWindowsAccessBridge; delete theWindowsAccessBridge;
} }
break; break;
...@@ -173,15 +174,15 @@ extern "C" { ...@@ -173,15 +174,15 @@ extern "C" {
switch (message) { switch (message) {
case WM_INITDIALOG: case WM_INITDIALOG:
PrintDebugString("AccessBridgeDialogProc -> Initializing"); PrintDebugString("[INFO]: AccessBridgeDialogProc -> Initializing");
break; break;
// call from Java with data for us to deliver // call from Java with data for us to deliver
case WM_COPYDATA: case WM_COPYDATA:
if (theDialogWindow == (HWND) wParam) { if (theDialogWindow == (HWND) wParam) {
PrintDebugString("AccessBridgeDialogProc -> Got WM_COPYDATA from Java Bridge DLL"); PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got WM_COPYDATA from Java Bridge DLL");
} else { } else {
PrintDebugString("AccessBridgeDialogProc -> Got WM_COPYDATA from HWND %p", wParam); PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got WM_COPYDATA from HWND %p", wParam);
sentToUs = (COPYDATASTRUCT *) lParam; sentToUs = (COPYDATASTRUCT *) lParam;
package = (char *) sentToUs->lpData; package = (char *) sentToUs->lpData;
theWindowsAccessBridge->preProcessPackage(package, sentToUs->cbData); theWindowsAccessBridge->preProcessPackage(package, sentToUs->cbData);
...@@ -190,7 +191,7 @@ extern "C" { ...@@ -190,7 +191,7 @@ extern "C" {
// message to ourselves -> de-queue messages and send 'em // message to ourselves -> de-queue messages and send 'em
case AB_MESSAGE_QUEUED: case AB_MESSAGE_QUEUED:
PrintDebugString("AccessBridgeDialogProc -> Got AB_MESSAGE_QUEUED from ourselves"); PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got AB_MESSAGE_QUEUED from ourselves");
theWindowsAccessBridge->receiveAQueuedPackage(); theWindowsAccessBridge->receiveAQueuedPackage();
break; break;
...@@ -214,12 +215,12 @@ extern "C" { ...@@ -214,12 +215,12 @@ extern "C" {
// to the message queue. That would delay the destruction of the instance // to the message queue. That would delay the destruction of the instance
// until the chain is not being traversed. // until the chain is not being traversed.
case AB_DLL_GOING_AWAY: case AB_DLL_GOING_AWAY:
PrintDebugString("***** AccessBridgeDialogProc -> Got AB_DLL_GOING_AWAY message"); PrintDebugString("[INFO]: ***** AccessBridgeDialogProc -> Got AB_DLL_GOING_AWAY message");
if (isVMInstanceChainInUse) { if (isVMInstanceChainInUse) {
PrintDebugString(" javaVMs chain in use, calling PostMessage"); PrintDebugString("[INFO]: javaVMs chain in use, calling PostMessage");
PostMessage(hDlg, AB_DLL_GOING_AWAY, wParam, (LPARAM)0); PostMessage(hDlg, AB_DLL_GOING_AWAY, wParam, (LPARAM)0);
} else { } else {
PrintDebugString(" calling javaVMDestroyed"); PrintDebugString("[INFO]: calling javaVMDestroyed");
theWindowsAccessBridge->JavaVMDestroyed((HWND) wParam); theWindowsAccessBridge->JavaVMDestroyed((HWND) wParam);
} }
break; break;
...@@ -228,7 +229,7 @@ extern "C" { ...@@ -228,7 +229,7 @@ extern "C" {
// the JavaVM is saying "hi"! // the JavaVM is saying "hi"!
// wParam == sourceHwnd; lParam == JavaVMID // wParam == sourceHwnd; lParam == JavaVMID
if (message == theFromJavaHelloMsgID) { if (message == theFromJavaHelloMsgID) {
PrintDebugString("AccessBridgeDialogProc -> Got theFromJavaHelloMsgID; wParam = %p, lParam = %p", wParam, lParam); PrintDebugString("[INFO]: AccessBridgeDialogProc -> Got theFromJavaHelloMsgID; wParam = %p, lParam = %p", wParam, lParam);
theWindowsAccessBridge->rendezvousWithNewJavaDLL((HWND) wParam, (long ) lParam); theWindowsAccessBridge->rendezvousWithNewJavaDLL((HWND) wParam, (long ) lParam);
} }
break; break;
...@@ -250,7 +251,7 @@ extern "C" { ...@@ -250,7 +251,7 @@ extern "C" {
*/ */
WinAccessBridge::WinAccessBridge(HINSTANCE hInstance) { WinAccessBridge::WinAccessBridge(HINSTANCE hInstance) {
PrintDebugString("WinAccessBridge ctor"); PrintDebugString("[INFO]: WinAccessBridge ctor");
// IntializeCriticalSection should only be called once. // IntializeCriticalSection should only be called once.
InitializeCriticalSection(&sendMemoryIPCLock); InitializeCriticalSection(&sendMemoryIPCLock);
...@@ -276,25 +277,25 @@ WinAccessBridge::~WinAccessBridge() { ...@@ -276,25 +277,25 @@ WinAccessBridge::~WinAccessBridge() {
// -> shut down all event listening // -> shut down all event listening
// -> release all objects held in the JVM by us // -> release all objects held in the JVM by us
PrintDebugString("*****in WinAccessBridge::~WinAccessBridge()"); PrintDebugString("[INFO]: *****in WinAccessBridge::~WinAccessBridge()");
// send a broadcast msg.; let other AccessBridge DLLs know we're going away // send a broadcast msg.; let other AccessBridge DLLs know we're going away
AccessBridgeJavaVMInstance *current = javaVMs; AccessBridgeJavaVMInstance *current = javaVMs;
while (current != (AccessBridgeJavaVMInstance *) 0) { while (current != (AccessBridgeJavaVMInstance *) 0) {
PrintDebugString(" telling %p we're going away", current->javaAccessBridgeWindow); PrintDebugString("[INFO]: telling %p we're going away", current->javaAccessBridgeWindow);
SendMessage(current->javaAccessBridgeWindow, SendMessage(current->javaAccessBridgeWindow,
AB_DLL_GOING_AWAY, (WPARAM) dialogWindow, (LPARAM) 0); AB_DLL_GOING_AWAY, (WPARAM) dialogWindow, (LPARAM) 0);
current = current->nextJVMInstance; current = current->nextJVMInstance;
} }
PrintDebugString(" finished telling JVMs about our demise"); PrintDebugString("[INFO]: finished telling JVMs about our demise");
delete eventHandler; delete eventHandler;
delete messageQueue; delete messageQueue;
delete javaVMs; delete javaVMs;
PrintDebugString(" finished deleting eventHandler, messageQueue, and javaVMs"); PrintDebugString("[INFO]: finished deleting eventHandler, messageQueue, and javaVMs");
PrintDebugString("GOODBYE CRUEL WORLD..."); PrintDebugString("[INFO]: GOODBYE CRUEL WORLD...");
DestroyWindow(theDialogWindow); DestroyWindow(theDialogWindow);
} }
...@@ -338,7 +339,7 @@ LRESULT ...@@ -338,7 +339,7 @@ LRESULT
WinAccessBridge::rendezvousWithNewJavaDLL(HWND JavaBridgeDLLwindow, long vmID) { WinAccessBridge::rendezvousWithNewJavaDLL(HWND JavaBridgeDLLwindow, long vmID) {
LRESULT returnVal; LRESULT returnVal;
PrintDebugString("in WinAccessBridge::rendezvousWithNewJavaDLL(%p, %X)", PrintDebugString("[INFO]: in WinAccessBridge::rendezvousWithNewJavaDLL(%p, %X)",
JavaBridgeDLLwindow, vmID); JavaBridgeDLLwindow, vmID);
isVMInstanceChainInUse = true; isVMInstanceChainInUse = true;
...@@ -354,23 +355,23 @@ WinAccessBridge::rendezvousWithNewJavaDLL(HWND JavaBridgeDLLwindow, long vmID) { ...@@ -354,23 +355,23 @@ WinAccessBridge::rendezvousWithNewJavaDLL(HWND JavaBridgeDLLwindow, long vmID) {
long javaEventMask = eventHandler->getJavaEventMask(); long javaEventMask = eventHandler->getJavaEventMask();
long accessibilityEventMask = eventHandler->getAccessibilityEventMask(); long accessibilityEventMask = eventHandler->getAccessibilityEventMask();
PrintDebugString(" Setting Java event mask to: %X", javaEventMask); PrintDebugString("[INFO]: Setting Java event mask to: %X", javaEventMask);
if (javaEventMask != 0) { if (javaEventMask != 0) {
addJavaEventNotification(javaEventMask); addJavaEventNotification(javaEventMask);
} }
PrintDebugString(" Setting Accessibility event mask to: %X", accessibilityEventMask); PrintDebugString("[INFO]: Setting Accessibility event mask to: %X", accessibilityEventMask);
if (accessibilityEventMask != 0) { if (accessibilityEventMask != 0) {
addAccessibilityEventNotification(accessibilityEventMask); addAccessibilityEventNotification(accessibilityEventMask);
} }
} else { } else {
PrintDebugString(" ERROR: Failed to initiate IPC with newly created JavaVM!!!"); PrintDebugString("[ERROR]: Failed to initiate IPC with newly created JavaVM!!!");
return FALSE; return FALSE;
} }
PrintDebugString(" Success!! We rendezvoused with the JavaDLL"); PrintDebugString("[INFO]: Success!! We rendezvoused with the JavaDLL");
return returnVal; return returnVal;
} }
...@@ -421,7 +422,7 @@ WinAccessBridge::sendMemoryPackage(char *buffer, long bufsize, HWND destWindow) ...@@ -421,7 +422,7 @@ WinAccessBridge::sendMemoryPackage(char *buffer, long bufsize, HWND destWindow)
return FALSE; return FALSE;
} }
} else { } else {
PrintDebugString("ERROR sending memory package: couldn't find destWindow"); PrintDebugString("[ERROR]: sending memory package: couldn't find destWindow");
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
...@@ -434,7 +435,7 @@ WinAccessBridge::sendMemoryPackage(char *buffer, long bufsize, HWND destWindow) ...@@ -434,7 +435,7 @@ WinAccessBridge::sendMemoryPackage(char *buffer, long bufsize, HWND destWindow)
*/ */
BOOL BOOL
WinAccessBridge::queuePackage(char *buffer, long bufsize) { WinAccessBridge::queuePackage(char *buffer, long bufsize) {
PrintDebugString(" in WinAccessBridge::queuePackage(%p, %d)", buffer, bufsize); PrintDebugString("[INFO]: in WinAccessBridge::queuePackage(%p, %d)", buffer, bufsize);
AccessBridgeQueueElement *element = new AccessBridgeQueueElement(buffer, bufsize); AccessBridgeQueueElement *element = new AccessBridgeQueueElement(buffer, bufsize);
...@@ -454,37 +455,37 @@ BOOL ...@@ -454,37 +455,37 @@ BOOL
WinAccessBridge::receiveAQueuedPackage() { WinAccessBridge::receiveAQueuedPackage() {
AccessBridgeQueueElement *element = NULL; AccessBridgeQueueElement *element = NULL;
PrintDebugString("in WinAccessBridge::receiveAQueuedPackage()"); PrintDebugString("[INFO]: in WinAccessBridge::receiveAQueuedPackage()");
// ensure against re-entrancy problems... // ensure against re-entrancy problems...
if (messageQueue->getRemoveLockSetting() == FALSE) { if (messageQueue->getRemoveLockSetting() == FALSE) {
messageQueue->setRemoveLock(TRUE); messageQueue->setRemoveLock(TRUE);
PrintDebugString(" dequeueing message"); PrintDebugString("[INFO]: dequeueing message");
QueueReturns result = messageQueue->remove(&element); QueueReturns result = messageQueue->remove(&element);
switch (result) { switch (result) {
case cQueueBroken: case cQueueBroken:
PrintDebugString(" ERROR!!! Queue seems to be broken!"); PrintDebugString("[ERROR]: Queue seems to be broken!");
messageQueue->setRemoveLock(FALSE); messageQueue->setRemoveLock(FALSE);
return FALSE; return FALSE;
case cMoreMessages: case cMoreMessages:
case cQueueEmpty: case cQueueEmpty:
if (element != (AccessBridgeQueueElement *) 0) { if (element != (AccessBridgeQueueElement *) 0) {
PrintDebugString(" found one; sending it!"); PrintDebugString("[INFO]: found one; sending it!");
processPackage(element->buffer, element->bufsize); processPackage(element->buffer, element->bufsize);
delete element; delete element;
} else { } else {
PrintDebugString(" ODD... element == 0!"); PrintDebugString("[WARN]: ODD... element == 0!");
return FALSE; return FALSE;
} }
break; break;
case cQueueInUse: case cQueueInUse:
PrintDebugString(" Queue in use, will try again later..."); PrintDebugString("[WARN]: Queue in use, will try again later...");
PostMessage(dialogWindow, AB_MESSAGE_QUEUED, (WPARAM) 0, (LPARAM) 0); PostMessage(dialogWindow, AB_MESSAGE_QUEUED, (WPARAM) 0, (LPARAM) 0);
break; break;
...@@ -493,7 +494,7 @@ WinAccessBridge::receiveAQueuedPackage() { ...@@ -493,7 +494,7 @@ WinAccessBridge::receiveAQueuedPackage() {
return FALSE; // should never get something we don't recognize! return FALSE; // should never get something we don't recognize!
} }
} else { } else {
PrintDebugString(" unable to dequeue message; remove lock is set"); PrintDebugString("[WARN]: unable to dequeue message; remove lock is set");
PostMessage(dialogWindow, AB_MESSAGE_QUEUED, (WPARAM) 0, (LPARAM) 0); // Fix for 6995891 PostMessage(dialogWindow, AB_MESSAGE_QUEUED, (WPARAM) 0, (LPARAM) 0); // Fix for 6995891
} }
...@@ -510,13 +511,13 @@ WinAccessBridge::receiveAQueuedPackage() { ...@@ -510,13 +511,13 @@ WinAccessBridge::receiveAQueuedPackage() {
*/ */
void void
WinAccessBridge::preProcessPackage(char *buffer, long bufsize) { WinAccessBridge::preProcessPackage(char *buffer, long bufsize) {
PrintDebugString("PreProcessing package sent from Java:"); PrintDebugString("[INFO]: PreProcessing package sent from Java:");
PackageType *type = (PackageType *) buffer; PackageType *type = (PackageType *) buffer;
switch (*type) { switch (*type) {
PrintDebugString(" type == %X", *type); PrintDebugString("[INFO]: type == %X", *type);
// event packages all get queued for later handling // event packages all get queued for later handling
//case cPropertyChangePackage: //case cPropertyChangePackage:
...@@ -555,11 +556,11 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) { ...@@ -555,11 +556,11 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) {
// perhaps there will be some other packages to process at some point... // // perhaps there will be some other packages to process at some point... //
default: default:
PrintDebugString(" processing FAILED!! -> don't know how to handle type = %X", *type); PrintDebugString("[ERROR]: processing FAILED!! -> don't know how to handle type = %X", *type);
break; break;
} }
PrintDebugString(" package preprocessing completed"); PrintDebugString("[INFO]: package preprocessing completed");
} }
...@@ -568,12 +569,12 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) { ...@@ -568,12 +569,12 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) {
if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \ if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \
eventPackage *pkg = \ eventPackage *pkg = \
(eventPackage *) (buffer + sizeof(PackageType)); \ (eventPackage *) (buffer + sizeof(PackageType)); \
PrintDebugString(" begin callback to AT, type == %X", *type); \ PrintDebugString("[INFO]: begin callback to AT, type == %X", *type); \
theWindowsAccessBridge->eventHandler->fireEventMethod( \ theWindowsAccessBridge->eventHandler->fireEventMethod( \
pkg->vmID, pkg->Event, pkg->AccessibleContextSource); \ pkg->vmID, pkg->Event, pkg->AccessibleContextSource); \
PrintDebugString(" event callback complete!"); \ PrintDebugString("[INFO]: event callback complete!"); \
} else { \ } else { \
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", \ PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", \
bufsize, sizeof(PackageType) + sizeof(eventPackage)); \ bufsize, sizeof(PackageType) + sizeof(eventPackage)); \
} \ } \
break; break;
...@@ -583,13 +584,13 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) { ...@@ -583,13 +584,13 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) {
if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \ if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \
eventPackage *pkg = \ eventPackage *pkg = \
(eventPackage *) (buffer + sizeof(PackageType)); \ (eventPackage *) (buffer + sizeof(PackageType)); \
PrintDebugString(" begin callback to AT, type == %X", *type); \ PrintDebugString("[INFO]: begin callback to AT, type == %X", *type); \
theWindowsAccessBridge->eventHandler->fireEventMethod( \ theWindowsAccessBridge->eventHandler->fireEventMethod( \
pkg->vmID, pkg->Event, pkg->AccessibleContextSource, \ pkg->vmID, pkg->Event, pkg->AccessibleContextSource, \
pkg->oldValue, pkg->newValue); \ pkg->oldValue, pkg->newValue); \
PrintDebugString(" event callback complete!"); \ PrintDebugString("[INFO]: event callback complete!"); \
} else { \ } else { \
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", \ PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", \
bufsize, sizeof(PackageType) + sizeof(eventPackage)); \ bufsize, sizeof(PackageType) + sizeof(eventPackage)); \
} \ } \
break; break;
...@@ -599,13 +600,13 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) { ...@@ -599,13 +600,13 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) {
if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \ if (bufsize == sizeof(PackageType) + sizeof(eventPackage)) { \
eventPackage *pkg = \ eventPackage *pkg = \
(eventPackage *) (buffer + sizeof(PackageType)); \ (eventPackage *) (buffer + sizeof(PackageType)); \
PrintDebugString(" begin callback to AT, type == %X", *type); \ PrintDebugString("[INFO]: begin callback to AT, type == %X", *type); \
theWindowsAccessBridge->eventHandler->fireEventMethod( \ theWindowsAccessBridge->eventHandler->fireEventMethod( \
pkg->vmID, pkg->Event, pkg->AccessibleContextSource, \ pkg->vmID, pkg->Event, pkg->AccessibleContextSource, \
pkg->oldValue, pkg->newValue); \ pkg->oldValue, pkg->newValue); \
PrintDebugString(" event callback complete!"); \ PrintDebugString("[INFO]: event callback complete!"); \
} else { \ } else { \
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", \ PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d", \
bufsize, sizeof(PackageType) + sizeof(eventPackage)); \ bufsize, sizeof(PackageType) + sizeof(eventPackage)); \
} \ } \
break; break;
...@@ -617,24 +618,24 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) { ...@@ -617,24 +618,24 @@ WinAccessBridge::preProcessPackage(char *buffer, long bufsize) {
*/ */
void void
WinAccessBridge::processPackage(char *buffer, long bufsize) { WinAccessBridge::processPackage(char *buffer, long bufsize) {
PrintDebugString("WinAccessBridge::Processing package sent from Java:"); PrintDebugString("[INFO]: WinAccessBridge::Processing package sent from Java:");
PackageType *type = (PackageType *) buffer; PackageType *type = (PackageType *) buffer;
switch (*type) { switch (*type) {
PrintDebugString(" type == %X", *type); PrintDebugString("[INFO]: type == %X", *type);
case cJavaShutdownPackage: case cJavaShutdownPackage:
PrintDebugString(" type == cJavaShutdownPackage"); PrintDebugString("[INFO]: type == cJavaShutdownPackage");
if (bufsize == sizeof(PackageType) + sizeof(JavaShutdownPackage)) { if (bufsize == sizeof(PackageType) + sizeof(JavaShutdownPackage)) {
JavaShutdownPackage *pkg = JavaShutdownPackage *pkg =
(JavaShutdownPackage *) (buffer + sizeof(PackageType)); (JavaShutdownPackage *) (buffer + sizeof(PackageType));
theWindowsAccessBridge->eventHandler->fireJavaShutdown(pkg->vmID); theWindowsAccessBridge->eventHandler->fireJavaShutdown(pkg->vmID);
PrintDebugString(" event callback complete!"); PrintDebugString("[INFO]: event callback complete!");
PrintDebugString(" event fired!"); PrintDebugString("[INFO]: event fired!");
} else { } else {
PrintDebugString(" processing FAILED!! -> bufsize = %d; expectation = %d", PrintDebugString("[ERROR]: processing FAILED!! -> bufsize = %d; expectation = %d",
bufsize, sizeof(PackageType) + sizeof(JavaShutdownPackage)); bufsize, sizeof(PackageType) + sizeof(JavaShutdownPackage));
} }
break; break;
...@@ -698,11 +699,11 @@ WinAccessBridge::processPackage(char *buffer, long bufsize) { ...@@ -698,11 +699,11 @@ WinAccessBridge::processPackage(char *buffer, long bufsize) {
default: default:
PrintDebugString(" processing FAILED!! -> don't know how to handle type = %X", *type); PrintDebugString("[ERROR]: processing FAILED!! -> don't know how to handle type = %X", *type);
break; break;
} }
PrintDebugString(" package processing completed"); PrintDebugString("[INFO]: package processing completed");
} }
...@@ -710,7 +711,7 @@ WinAccessBridge::processPackage(char *buffer, long bufsize) { ...@@ -710,7 +711,7 @@ WinAccessBridge::processPackage(char *buffer, long bufsize) {
void void
WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) { WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) {
PrintDebugString("***** WinAccessBridge::JavaVMDestroyed(%p)", VMBridgeDLLWindow); PrintDebugString("[INFO]: ***** WinAccessBridge::JavaVMDestroyed(%p)", VMBridgeDLLWindow);
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
return; return;
...@@ -723,7 +724,7 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) { ...@@ -723,7 +724,7 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) {
javaVMs = javaVMs->nextJVMInstance; javaVMs = javaVMs->nextJVMInstance;
delete currentVM; delete currentVM;
PrintDebugString(" data structures successfully removed"); PrintDebugString("[INFO]: data structures successfully removed");
// [[[FIXME]]] inform Windows AT that a JVM went away, // [[[FIXME]]] inform Windows AT that a JVM went away,
// and that any jobjects it's got lying around for that JVM // and that any jobjects it's got lying around for that JVM
...@@ -735,7 +736,7 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) { ...@@ -735,7 +736,7 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) {
previousVM->nextJVMInstance = currentVM->nextJVMInstance; previousVM->nextJVMInstance = currentVM->nextJVMInstance;
delete currentVM; delete currentVM;
PrintDebugString(" data structures successfully removed"); PrintDebugString("[INFO]: data structures successfully removed");
// [[[FIXME]]] inform Windows AT that a JVM went away, // [[[FIXME]]] inform Windows AT that a JVM went away,
// and that any jobjects it's got lying around for that JVM // and that any jobjects it's got lying around for that JVM
...@@ -747,7 +748,7 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) { ...@@ -747,7 +748,7 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) {
currentVM = currentVM->nextJVMInstance; currentVM = currentVM->nextJVMInstance;
} }
} }
PrintDebugString(" ERROR!! couldn't find matching data structures!"); PrintDebugString("[ERROR]: couldn't find matching data structures!");
} }
isVMInstanceChainInUse = false; isVMInstanceChainInUse = false;
} }
...@@ -765,9 +766,9 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) { ...@@ -765,9 +766,9 @@ WinAccessBridge::JavaVMDestroyed(HWND VMBridgeDLLWindow) {
void void
WinAccessBridge::releaseJavaObject(long vmID, JOBJECT64 object) { WinAccessBridge::releaseJavaObject(long vmID, JOBJECT64 object) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::releaseJavaObject(%X, %p)", vmID, object); PrintDebugString("[INFO]: WinAccessBridge::releaseJavaObject(%X, %p)", vmID, object);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::releaseJavaObject(%X, %016I64X)", vmID, object); PrintDebugString("[INFO]: WinAccessBridge::releaseJavaObject(%X, %016I64X)", vmID, object);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
return; return;
...@@ -802,15 +803,16 @@ WinAccessBridge::getVersionInfo(long vmID, AccessBridgeVersionInfo *info) { ...@@ -802,15 +803,16 @@ WinAccessBridge::getVersionInfo(long vmID, AccessBridgeVersionInfo *info) {
*type = cGetAccessBridgeVersionPackage; *type = cGetAccessBridgeVersionPackage;
pkg->vmID = vmID; pkg->vmID = vmID;
PrintDebugString("WinAccessBridge::getVersionInfo(%X, )", vmID); PrintDebugString("[INFO]: WinAccessBridge::getVersionInfo(%X, )", vmID);
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(info, &(pkg->rVersionInfo), sizeof(AccessBridgeVersionInfo)); memcpy(info, &(pkg->rVersionInfo), sizeof(AccessBridgeVersionInfo));
PrintDebugString(" VMversion: %ls", info->VMversion); PrintDebugString("[INFO]: VMversion: %ls\n"\
PrintDebugString(" bridgeJavaClassVersion: %ls", info->bridgeJavaClassVersion); " bridgeJavaClassVersion: %ls\n"\
PrintDebugString(" bridgeJavaDLLVersion: %ls", info->bridgeJavaDLLVersion); " bridgeJavaDLLVersion: %ls\n"\
PrintDebugString(" bridgeWinDLLVersion: %ls", info->bridgeWinDLLVersion); " bridgeWinDLLVersion: %ls\n"\
, info->VMversion, info->bridgeJavaClassVersion, info->bridgeJavaDLLVersion, info->bridgeWinDLLVersion);
return TRUE; return TRUE;
} }
} }
...@@ -843,7 +845,7 @@ WinAccessBridge::isJavaWindow(HWND window) { ...@@ -843,7 +845,7 @@ WinAccessBridge::isJavaWindow(HWND window) {
return FALSE; return FALSE;
} }
PrintDebugString("In WinAccessBridge::isJavaWindow"); PrintDebugString("[INFO]: In WinAccessBridge::isJavaWindow");
...@@ -853,7 +855,7 @@ WinAccessBridge::isJavaWindow(HWND window) { ...@@ -853,7 +855,7 @@ WinAccessBridge::isJavaWindow(HWND window) {
*type = cIsJavaWindowPackage; *type = cIsJavaWindowPackage;
pkg->window = (jint) window; pkg->window = (jint) window;
PrintDebugString("WinAccessBridge::isJavaWindow(%p)", window); PrintDebugString("[INFO]: WinAccessBridge::isJavaWindow(%p)", window);
isVMInstanceChainInUse = true; isVMInstanceChainInUse = true;
AccessBridgeJavaVMInstance *current = javaVMs; AccessBridgeJavaVMInstance *current = javaVMs;
...@@ -908,9 +910,9 @@ BOOL ...@@ -908,9 +910,9 @@ BOOL
WinAccessBridge::isSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2) { WinAccessBridge::isSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::isSameObject(%p %p)", obj1, obj2); PrintDebugString("[INFO]: WinAccessBridge::isSameObject(%p %p)", obj1, obj2);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::isSameObject(%016I64X %016I64X)", obj1, obj2); PrintDebugString("[INFO]: WinAccessBridge::isSameObject(%016I64X %016I64X)", obj1, obj2);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -928,14 +930,14 @@ WinAccessBridge::isSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2) { ...@@ -928,14 +930,14 @@ WinAccessBridge::isSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2) {
HWND destABWindow = javaVMs->findAccessBridgeWindow(pkg->vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(pkg->vmID);
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
if (pkg->rResult != 0) { if (pkg->rResult != 0) {
PrintDebugString(" WinAccessBridge::isSameObject returning TRUE (same object)"); PrintDebugString("[INFO]: WinAccessBridge::isSameObject returning TRUE (same object)");
return TRUE; return TRUE;
} else { } else {
PrintDebugString(" WinAccessBridge::isSameObject returning FALSE (different object)"); PrintDebugString("[INFO]: WinAccessBridge::isSameObject returning FALSE (different object)");
return FALSE; return FALSE;
} }
} }
PrintDebugString(" WinAccessBridge::isSameObject returning FALSE (sendMemoryPackage failed)"); PrintDebugString("[ERROR]: WinAccessBridge::isSameObject returning FALSE (sendMemoryPackage failed)");
return FALSE; return FALSE;
} }
...@@ -958,7 +960,7 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64 ...@@ -958,7 +960,7 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64
*type = cGetAccessibleContextFromHWNDPackage; *type = cGetAccessibleContextFromHWNDPackage;
pkg->window = (jint) window; pkg->window = (jint) window;
PrintDebugString("WinAccessBridge::getAccessibleContextFromHWND(%p, )", window); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextFromHWND(%p, )", window);
DEBUG_CODE(pkg->rVMID = (long ) 0x01010101); DEBUG_CODE(pkg->rVMID = (long ) 0x01010101);
DEBUG_CODE(pkg->rAccessibleContext = (JOBJECT64) 0x01010101); DEBUG_CODE(pkg->rAccessibleContext = (JOBJECT64) 0x01010101);
...@@ -971,15 +973,14 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64 ...@@ -971,15 +973,14 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64
if (pkg->rAccessibleContext != 0) { if (pkg->rAccessibleContext != 0) {
*vmID = pkg->rVMID; *vmID = pkg->rVMID;
*AccessibleContext = (JOBJECT64)pkg->rAccessibleContext; *AccessibleContext = (JOBJECT64)pkg->rAccessibleContext;
PrintDebugString(" current->vmID = %X", current->vmID); PrintDebugString("[INFO]: current->vmID = %X, pkg->rVMID = %X", current->vmID, pkg->rVMID);
PrintDebugString(" pkg->rVMID = %X", pkg->rVMID);
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" pkg->rAccessibleContext = %p", pkg->rAccessibleContext); PrintDebugString("[INFO]: pkg->rAccessibleContext = %p", pkg->rAccessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" pkg->rAccessibleContext = %016I64X", pkg->rAccessibleContext); PrintDebugString("[INFO]: pkg->rAccessibleContext = %016I64X", pkg->rAccessibleContext);
#endif #endif
if (pkg->rVMID != current->vmID) { if (pkg->rVMID != current->vmID) {
PrintDebugString(" ERROR! getAccessibleContextFromHWND vmIDs don't match!"); PrintDebugString("[ERROR]: getAccessibleContextFromHWND vmIDs don't match!");
isVMInstanceChainInUse = false; isVMInstanceChainInUse = false;
return FALSE; return FALSE;
} }
...@@ -994,7 +995,7 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64 ...@@ -994,7 +995,7 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64
// This isn't really an error; it just means that the HWND was for a non-Java // This isn't really an error; it just means that the HWND was for a non-Java
// window. It's also possible the HWND was for a Java window but the JVM has // window. It's also possible the HWND was for a Java window but the JVM has
// since been shut down and sendMemoryPackage returned FALSE. // since been shut down and sendMemoryPackage returned FALSE.
PrintDebugString(" ERROR! getAccessibleContextFromHWND no matching HWND found!"); PrintDebugString("[ERROR]: getAccessibleContextFromHWND no matching HWND found!");
return FALSE; return FALSE;
} }
...@@ -1003,7 +1004,7 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64 ...@@ -1003,7 +1004,7 @@ WinAccessBridge::getAccessibleContextFromHWND(HWND window, long *vmID, JOBJECT64
*/ */
HWND HWND
WinAccessBridge::getHWNDFromAccessibleContext(long vmID, JOBJECT64 accessibleContext) { WinAccessBridge::getHWNDFromAccessibleContext(long vmID, JOBJECT64 accessibleContext) {
PrintDebugString(" in WinAccessBridge::getHWNDFromAccessibleContext"); PrintDebugString("[INFO]: in WinAccessBridge::getHWNDFromAccessibleContext");
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
return (HWND)0; return (HWND)0;
} }
...@@ -1015,9 +1016,9 @@ WinAccessBridge::getHWNDFromAccessibleContext(long vmID, JOBJECT64 accessibleCon ...@@ -1015,9 +1016,9 @@ WinAccessBridge::getHWNDFromAccessibleContext(long vmID, JOBJECT64 accessibleCon
pkg->accessibleContext = accessibleContext; pkg->accessibleContext = accessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getHWNDFromAccessibleContext(%p)", accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getHWNDFromAccessibleContext(%p)", accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getHWNDFromAccessibleContext(%016I64X)", accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getHWNDFromAccessibleContext(%016I64X)", accessibleContext);
#endif #endif
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -1081,7 +1082,7 @@ WinAccessBridge::getAccessibleContextAt(long vmID, JOBJECT64 AccessibleContextPa ...@@ -1081,7 +1082,7 @@ WinAccessBridge::getAccessibleContextAt(long vmID, JOBJECT64 AccessibleContextPa
pkg->x = x; pkg->x = x;
pkg->y = y; pkg->y = y;
PrintDebugString("WinAccessBridge::getAccessibleContextAt(%X, %p, %d, %c)", vmID, AccessibleContextParent, x, y); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextAt(%X, %p, %d, %c)", vmID, AccessibleContextParent, x, y);
HWND destABWindow = javaVMs->findAccessBridgeWindow(pkg->vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(pkg->vmID);
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
*AccessibleContext = pkg->rAccessibleContext; *AccessibleContext = pkg->rAccessibleContext;
...@@ -1114,7 +1115,7 @@ WinAccessBridge::getAccessibleContextWithFocus(HWND window, long *vmID, JOBJECT6 ...@@ -1114,7 +1115,7 @@ WinAccessBridge::getAccessibleContextWithFocus(HWND window, long *vmID, JOBJECT6
GetAccessibleContextWithFocusPackage *pkg = (GetAccessibleContextWithFocusPackage *) (buffer + sizeof(PackageType)); GetAccessibleContextWithFocusPackage *pkg = (GetAccessibleContextWithFocusPackage *) (buffer + sizeof(PackageType));
*type = cGetAccessibleContextWithFocusPackage; *type = cGetAccessibleContextWithFocusPackage;
PrintDebugString("WinAccessBridge::getAccessibleContextWithFocus(%p, %X, )", window, vmID); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextWithFocus(%p, %X, )", window, vmID);
// find vmID, etc. from HWND; ask that VM for the AC w/Focus // find vmID, etc. from HWND; ask that VM for the AC w/Focus
HWND pkgVMID; HWND pkgVMID;
if (getAccessibleContextFromHWND(window, (long *)&(pkgVMID), &(pkg->rAccessibleContext)) == TRUE) { if (getAccessibleContextFromHWND(window, (long *)&(pkgVMID), &(pkg->rAccessibleContext)) == TRUE) {
...@@ -1151,21 +1152,22 @@ WinAccessBridge::getAccessibleContextInfo(long vmID, ...@@ -1151,21 +1152,22 @@ WinAccessBridge::getAccessibleContextInfo(long vmID,
pkg->AccessibleContext = accessibleContext; pkg->AccessibleContext = accessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleContextInfo(%X, %p, )", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextInfo(%X, %p, )", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleContextInfo(%X, %016I64X, )", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleContextInfo(%X, %016I64X, )", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(info, &(pkg->rAccessibleContextInfo), sizeof(AccessibleContextInfo)); memcpy(info, &(pkg->rAccessibleContextInfo), sizeof(AccessibleContextInfo));
PrintDebugString(" name: %ls", info->name); PrintDebugString("[INFO]: name: %ls\n"\
PrintDebugString(" description: %ls", info->description); " description: %ls\n"\
PrintDebugString(" role: %ls", info->role); " role: %ls\n"\
PrintDebugString(" role_en_US: %ls", info->role_en_US); " role_en_US: %ls\n"\
PrintDebugString(" states: %ls", info->states); " states: %ls\n"\
PrintDebugString(" states_en_US: %ls", info->states_en_US); " states_en_US: %ls\n"\
, info->name, info->description, info->role, info->role_en_US, info->states, info->states_en_US);
return TRUE; return TRUE;
} }
} }
...@@ -1200,9 +1202,9 @@ WinAccessBridge::getAccessibleChildFromContext(long vmID, ...@@ -1200,9 +1202,9 @@ WinAccessBridge::getAccessibleChildFromContext(long vmID,
pkg->childIndex = childIndex; pkg->childIndex = childIndex;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleChildFromContext(%X, %p, %d)", vmID, AccessibleContext, childIndex); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleChildFromContext(%X, %p, %d)", vmID, AccessibleContext, childIndex);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleChildFromContext(%X, %016I64X, %d)", vmID, AccessibleContext, childIndex); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleChildFromContext(%X, %016I64X, %d)", vmID, AccessibleContext, childIndex);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -1235,7 +1237,7 @@ WinAccessBridge::getAccessibleParentFromContext(long vmID, ...@@ -1235,7 +1237,7 @@ WinAccessBridge::getAccessibleParentFromContext(long vmID,
pkg->vmID = vmID; pkg->vmID = vmID;
pkg->AccessibleContext = AccessibleContext; pkg->AccessibleContext = AccessibleContext;
PrintDebugString("WinAccessBridge::getAccessibleParentFromContext(%X, %p)", vmID, AccessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleParentFromContext(%X, %p)", vmID, AccessibleContext);
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
...@@ -1255,10 +1257,10 @@ WinAccessBridge::getAccessibleTableInfo(long vmID, ...@@ -1255,10 +1257,10 @@ WinAccessBridge::getAccessibleTableInfo(long vmID,
AccessibleTableInfo *tableInfo) { AccessibleTableInfo *tableInfo) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableInfo(%X, %p, %p)", vmID, accessibleContext, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableInfo(%X, %p, %p)", vmID, accessibleContext,
tableInfo); tableInfo);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableInfo(%X, %016I64X, %p)", vmID, accessibleContext, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableInfo(%X, %016I64X, %p)", vmID, accessibleContext,
tableInfo); tableInfo);
#endif #endif
...@@ -1278,12 +1280,12 @@ WinAccessBridge::getAccessibleTableInfo(long vmID, ...@@ -1278,12 +1280,12 @@ WinAccessBridge::getAccessibleTableInfo(long vmID,
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo)); memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo));
if (pkg->rTableInfo.rowCount != -1) { if (pkg->rTableInfo.rowCount != -1) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableInfo succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableInfo succeeded");
return TRUE; return TRUE;
} }
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableInfo failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableInfo failed");
return FALSE; return FALSE;
} }
...@@ -1292,7 +1294,7 @@ WinAccessBridge::getAccessibleTableCellInfo(long vmID, JOBJECT64 accessibleTable ...@@ -1292,7 +1294,7 @@ WinAccessBridge::getAccessibleTableCellInfo(long vmID, JOBJECT64 accessibleTable
jint row, jint column, jint row, jint column,
AccessibleTableCellInfo *tableCellInfo) { AccessibleTableCellInfo *tableCellInfo) {
PrintDebugString("##### WinAccessBridge::getAccessibleTableCellInfo(%X, %p, %d, %d, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableCellInfo(%X, %p, %d, %d, %p)", vmID,
accessibleTable, row, column, tableCellInfo); accessibleTable, row, column, tableCellInfo);
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1311,13 +1313,13 @@ WinAccessBridge::getAccessibleTableCellInfo(long vmID, JOBJECT64 accessibleTable ...@@ -1311,13 +1313,13 @@ WinAccessBridge::getAccessibleTableCellInfo(long vmID, JOBJECT64 accessibleTable
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" XXXX pkg->rTableCellInfo.accessibleContext = %p", pkg->rTableCellInfo.accessibleContext); PrintDebugString("[INFO]: XXXX pkg->rTableCellInfo.accessibleContext = %p", pkg->rTableCellInfo.accessibleContext);
memcpy(tableCellInfo, &(pkg->rTableCellInfo), sizeof(AccessibleTableCellInfo)); memcpy(tableCellInfo, &(pkg->rTableCellInfo), sizeof(AccessibleTableCellInfo));
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableCellInfo succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableCellInfo succeeded");
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableCellInfo failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableCellInfo failed");
return FALSE; return FALSE;
} }
...@@ -1326,9 +1328,9 @@ BOOL ...@@ -1326,9 +1328,9 @@ BOOL
WinAccessBridge::getAccessibleTableRowHeader(long vmID, JOBJECT64 accessibleContext, AccessibleTableInfo *tableInfo) { WinAccessBridge::getAccessibleTableRowHeader(long vmID, JOBJECT64 accessibleContext, AccessibleTableInfo *tableInfo) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowHeader(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowHeader(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowHeader(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowHeader(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1345,12 +1347,12 @@ WinAccessBridge::getAccessibleTableRowHeader(long vmID, JOBJECT64 accessibleCont ...@@ -1345,12 +1347,12 @@ WinAccessBridge::getAccessibleTableRowHeader(long vmID, JOBJECT64 accessibleCont
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowHeader succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowHeader succeeded");
memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo)); memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo));
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowHeader failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowHeader failed");
return FALSE; return FALSE;
} }
...@@ -1358,9 +1360,9 @@ BOOL ...@@ -1358,9 +1360,9 @@ BOOL
WinAccessBridge::getAccessibleTableColumnHeader(long vmID, JOBJECT64 accessibleContext, AccessibleTableInfo *tableInfo) { WinAccessBridge::getAccessibleTableColumnHeader(long vmID, JOBJECT64 accessibleContext, AccessibleTableInfo *tableInfo) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnHeader(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1377,12 +1379,12 @@ WinAccessBridge::getAccessibleTableColumnHeader(long vmID, JOBJECT64 accessibleC ...@@ -1377,12 +1379,12 @@ WinAccessBridge::getAccessibleTableColumnHeader(long vmID, JOBJECT64 accessibleC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnHeader succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnHeader succeeded");
memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo)); memcpy(tableInfo, &(pkg->rTableInfo), sizeof(AccessibleTableInfo));
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnHeader failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnHeader failed");
return FALSE; return FALSE;
} }
...@@ -1392,10 +1394,10 @@ WinAccessBridge::getAccessibleTableRowDescription(long vmID, ...@@ -1392,10 +1394,10 @@ WinAccessBridge::getAccessibleTableRowDescription(long vmID,
jint row) { jint row) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowDescription(%X, %p, %d)", vmID, accessibleContext, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowDescription(%X, %p, %d)", vmID, accessibleContext,
row); row);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowDescription(%X, %016I64X, %d)", vmID, accessibleContext, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowDescription(%X, %016I64X, %d)", vmID, accessibleContext,
row); row);
#endif #endif
...@@ -1414,11 +1416,11 @@ WinAccessBridge::getAccessibleTableRowDescription(long vmID, ...@@ -1414,11 +1416,11 @@ WinAccessBridge::getAccessibleTableRowDescription(long vmID,
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowDescription succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowDescription succeeded");
return pkg->rAccessibleContext; return pkg->rAccessibleContext;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowDescription failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowDescription failed");
return (JOBJECT64)0; return (JOBJECT64)0;
} }
...@@ -1428,10 +1430,10 @@ WinAccessBridge::getAccessibleTableColumnDescription(long vmID, ...@@ -1428,10 +1430,10 @@ WinAccessBridge::getAccessibleTableColumnDescription(long vmID,
jint column) { jint column) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %p, %d)", vmID, accessibleContext, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %p, %d)", vmID, accessibleContext,
column); column);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %016I64X, %d)", vmID, accessibleContext, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnDescription(%X, %016I64X, %d)", vmID, accessibleContext,
column); column);
#endif #endif
...@@ -1451,11 +1453,11 @@ WinAccessBridge::getAccessibleTableColumnDescription(long vmID, ...@@ -1451,11 +1453,11 @@ WinAccessBridge::getAccessibleTableColumnDescription(long vmID,
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnDescription succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnDescription succeeded");
return pkg->rAccessibleContext; return pkg->rAccessibleContext;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnDescription failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnDescription failed");
return (JOBJECT64)0; return (JOBJECT64)0;
} }
...@@ -1463,9 +1465,9 @@ jint ...@@ -1463,9 +1465,9 @@ jint
WinAccessBridge::getAccessibleTableRowSelectionCount(long vmID, JOBJECT64 accessibleTable) { WinAccessBridge::getAccessibleTableRowSelectionCount(long vmID, JOBJECT64 accessibleTable) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %p)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %p)", vmID, accessibleTable);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %016I64X)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount(%X, %016I64X)", vmID, accessibleTable);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1483,11 +1485,11 @@ WinAccessBridge::getAccessibleTableRowSelectionCount(long vmID, JOBJECT64 access ...@@ -1483,11 +1485,11 @@ WinAccessBridge::getAccessibleTableRowSelectionCount(long vmID, JOBJECT64 access
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelectionCount succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount succeeded");
return pkg->rCount; return pkg->rCount;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelectionCount failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowSelectionCount failed");
return 0; return 0;
} }
...@@ -1495,9 +1497,9 @@ BOOL ...@@ -1495,9 +1497,9 @@ BOOL
WinAccessBridge::isAccessibleTableRowSelected(long vmID, JOBJECT64 accessibleTable, jint row) { WinAccessBridge::isAccessibleTableRowSelected(long vmID, JOBJECT64 accessibleTable, jint row) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::isAccessibleTableRowSelected(%X, %p)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableRowSelected(%X, %p)", vmID, accessibleTable);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::isAccessibleTableRowSelected(%X, %016I64X)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableRowSelected(%X, %016I64X)", vmID, accessibleTable);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1515,11 +1517,11 @@ WinAccessBridge::isAccessibleTableRowSelected(long vmID, JOBJECT64 accessibleTab ...@@ -1515,11 +1517,11 @@ WinAccessBridge::isAccessibleTableRowSelected(long vmID, JOBJECT64 accessibleTab
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::isAccessibleTableRowSelected succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableRowSelected succeeded");
return pkg->rResult; return pkg->rResult;
} }
} }
PrintDebugString(" ##### WinAccessBridge::isAccessibleTableRowSelected failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::isAccessibleTableRowSelected failed");
return FALSE; return FALSE;
} }
...@@ -1527,9 +1529,9 @@ BOOL ...@@ -1527,9 +1529,9 @@ BOOL
WinAccessBridge::getAccessibleTableRowSelections(long vmID, JOBJECT64 accessibleTable, jint count, jint *selections) { WinAccessBridge::getAccessibleTableRowSelections(long vmID, JOBJECT64 accessibleTable, jint count, jint *selections) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelections(%X, %p)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelections(%X, %p)", vmID, accessibleTable);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRowSelections(%X, %016I64X)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelections(%X, %016I64X)", vmID, accessibleTable);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1548,12 +1550,12 @@ WinAccessBridge::getAccessibleTableRowSelections(long vmID, JOBJECT64 accessible ...@@ -1548,12 +1550,12 @@ WinAccessBridge::getAccessibleTableRowSelections(long vmID, JOBJECT64 accessible
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelections succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRowSelections succeeded");
memcpy(selections, pkg->rSelections, count * sizeof(jint)); memcpy(selections, pkg->rSelections, count * sizeof(jint));
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRowSelections failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRowSelections failed");
return FALSE; return FALSE;
} }
...@@ -1562,10 +1564,10 @@ jint ...@@ -1562,10 +1564,10 @@ jint
WinAccessBridge::getAccessibleTableColumnSelectionCount(long vmID, JOBJECT64 accessibleTable) { WinAccessBridge::getAccessibleTableColumnSelectionCount(long vmID, JOBJECT64 accessibleTable) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %p)", vmID,
accessibleTable); accessibleTable);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %016I64X)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount(%X, %016I64X)", vmID,
accessibleTable); accessibleTable);
#endif #endif
...@@ -1584,20 +1586,20 @@ WinAccessBridge::getAccessibleTableColumnSelectionCount(long vmID, JOBJECT64 acc ...@@ -1584,20 +1586,20 @@ WinAccessBridge::getAccessibleTableColumnSelectionCount(long vmID, JOBJECT64 acc
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelectionCount succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount succeeded");
return pkg->rCount; return pkg->rCount;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelectionCount failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnSelectionCount failed");
return 0; return 0;
} }
BOOL BOOL
WinAccessBridge::isAccessibleTableColumnSelected(long vmID, JOBJECT64 accessibleTable, jint column) { WinAccessBridge::isAccessibleTableColumnSelected(long vmID, JOBJECT64 accessibleTable, jint column) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %p)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %p)", vmID, accessibleTable);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %016I64X)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableColumnSelected(%X, %016I64X)", vmID, accessibleTable);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1615,11 +1617,11 @@ WinAccessBridge::isAccessibleTableColumnSelected(long vmID, JOBJECT64 accessible ...@@ -1615,11 +1617,11 @@ WinAccessBridge::isAccessibleTableColumnSelected(long vmID, JOBJECT64 accessible
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::isAccessibleTableColumnSelected succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::isAccessibleTableColumnSelected succeeded");
return pkg->rResult; return pkg->rResult;
} }
} }
PrintDebugString(" ##### WinAccessBridge::isAccessibleTableColumnSelected failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::isAccessibleTableColumnSelected failed");
return FALSE; return FALSE;
} }
...@@ -1628,9 +1630,9 @@ WinAccessBridge::getAccessibleTableColumnSelections(long vmID, JOBJECT64 accessi ...@@ -1628,9 +1630,9 @@ WinAccessBridge::getAccessibleTableColumnSelections(long vmID, JOBJECT64 accessi
jint *selections) { jint *selections) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %p)", vmID, accessibleTable); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %p)", vmID, accessibleTable);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %016I64X)", vmID, accessibleTable); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnSelections(%X, %016I64X)", vmID, accessibleTable);
#endif #endif
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
...@@ -1649,12 +1651,12 @@ WinAccessBridge::getAccessibleTableColumnSelections(long vmID, JOBJECT64 accessi ...@@ -1649,12 +1651,12 @@ WinAccessBridge::getAccessibleTableColumnSelections(long vmID, JOBJECT64 accessi
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelections succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumnSelections succeeded");
memcpy(selections, pkg->rSelections, count * sizeof(jint)); memcpy(selections, pkg->rSelections, count * sizeof(jint));
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumnSelections failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumnSelections failed");
return FALSE; return FALSE;
} }
...@@ -1662,10 +1664,10 @@ jint ...@@ -1662,10 +1664,10 @@ jint
WinAccessBridge::getAccessibleTableRow(long vmID, JOBJECT64 accessibleTable, jint index) { WinAccessBridge::getAccessibleTableRow(long vmID, JOBJECT64 accessibleTable, jint index) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRow(%X, %p, index=%d)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRow(%X, %p, index=%d)", vmID,
accessibleTable, index); accessibleTable, index);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableRow(%X, %016I64X, index=%d)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRow(%X, %016I64X, index=%d)", vmID,
accessibleTable, index); accessibleTable, index);
#endif #endif
...@@ -1685,11 +1687,11 @@ WinAccessBridge::getAccessibleTableRow(long vmID, JOBJECT64 accessibleTable, jin ...@@ -1685,11 +1687,11 @@ WinAccessBridge::getAccessibleTableRow(long vmID, JOBJECT64 accessibleTable, jin
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRow succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableRow succeeded");
return pkg->rRow; return pkg->rRow;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableRow failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableRow failed");
return 0; return 0;
} }
...@@ -1697,10 +1699,10 @@ jint ...@@ -1697,10 +1699,10 @@ jint
WinAccessBridge::getAccessibleTableColumn(long vmID, JOBJECT64 accessibleTable, jint index) { WinAccessBridge::getAccessibleTableColumn(long vmID, JOBJECT64 accessibleTable, jint index) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumn(%X, %p, index=%d)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumn(%X, %p, index=%d)", vmID,
accessibleTable, index); accessibleTable, index);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableColumn(%X, %016I64X, index=%d)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumn(%X, %016I64X, index=%d)", vmID,
accessibleTable, index); accessibleTable, index);
#endif #endif
...@@ -1720,11 +1722,11 @@ WinAccessBridge::getAccessibleTableColumn(long vmID, JOBJECT64 accessibleTable, ...@@ -1720,11 +1722,11 @@ WinAccessBridge::getAccessibleTableColumn(long vmID, JOBJECT64 accessibleTable,
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumn succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableColumn succeeded");
return pkg->rColumn; return pkg->rColumn;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableColumn failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableColumn failed");
return 0; return 0;
} }
...@@ -1732,10 +1734,10 @@ jint ...@@ -1732,10 +1734,10 @@ jint
WinAccessBridge::getAccessibleTableIndex(long vmID, JOBJECT64 accessibleTable, jint row, jint column) { WinAccessBridge::getAccessibleTableIndex(long vmID, JOBJECT64 accessibleTable, jint row, jint column) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleTableIndex(%X, %p, row=%d, col=%d)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableIndex(%X, %p, row=%d, col=%d)", vmID,
accessibleTable, row, column); accessibleTable, row, column);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleTableIndex(%X, %016I64X, row=%d, col=%d)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableIndex(%X, %016I64X, row=%d, col=%d)", vmID,
accessibleTable, row, column); accessibleTable, row, column);
#endif #endif
...@@ -1756,11 +1758,11 @@ WinAccessBridge::getAccessibleTableIndex(long vmID, JOBJECT64 accessibleTable, j ...@@ -1756,11 +1758,11 @@ WinAccessBridge::getAccessibleTableIndex(long vmID, JOBJECT64 accessibleTable, j
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableIndex succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleTableIndex succeeded");
return pkg->rIndex; return pkg->rIndex;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleTableIndex failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleTableIndex failed");
return 0; return 0;
} }
...@@ -1771,10 +1773,10 @@ WinAccessBridge::getAccessibleRelationSet(long vmID, JOBJECT64 accessibleContext ...@@ -1771,10 +1773,10 @@ WinAccessBridge::getAccessibleRelationSet(long vmID, JOBJECT64 accessibleContext
AccessibleRelationSetInfo *relationSetInfo) { AccessibleRelationSetInfo *relationSetInfo) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleRelationSet(%X, %p, %X)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleRelationSet(%X, %p, %X)", vmID,
accessibleContext, relationSetInfo); accessibleContext, relationSetInfo);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleRelationSet(%X, %016I64X, %X)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleRelationSet(%X, %016I64X, %X)", vmID,
accessibleContext, relationSetInfo); accessibleContext, relationSetInfo);
#endif #endif
...@@ -1792,14 +1794,14 @@ WinAccessBridge::getAccessibleRelationSet(long vmID, JOBJECT64 accessibleContext ...@@ -1792,14 +1794,14 @@ WinAccessBridge::getAccessibleRelationSet(long vmID, JOBJECT64 accessibleContext
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### pkg->rAccessibleRelationSetInfo.relationCount = %X", PrintDebugString("[INFO]: ##### pkg->rAccessibleRelationSetInfo.relationCount = %X",
pkg->rAccessibleRelationSetInfo.relationCount); pkg->rAccessibleRelationSetInfo.relationCount);
memcpy(relationSetInfo, &(pkg->rAccessibleRelationSetInfo), sizeof(AccessibleRelationSetInfo)); memcpy(relationSetInfo, &(pkg->rAccessibleRelationSetInfo), sizeof(AccessibleRelationSetInfo));
PrintDebugString(" ##### WinAccessBridge::getAccessibleRelationSet succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleRelationSet succeeded");
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleRelationSet failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleRelationSet failed");
return FALSE; return FALSE;
} }
...@@ -1811,10 +1813,10 @@ WinAccessBridge::getAccessibleHypertext(long vmID, JOBJECT64 accessibleContext, ...@@ -1811,10 +1813,10 @@ WinAccessBridge::getAccessibleHypertext(long vmID, JOBJECT64 accessibleContext,
AccessibleHypertextInfo *hypertextInfo) { AccessibleHypertextInfo *hypertextInfo) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleHypertext(%X, %p, %X)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext(%X, %p, %X)", vmID,
accessibleContext, hypertextInfo); accessibleContext, hypertextInfo);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleHypertext(%X, %016I64X, %X)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext(%X, %016I64X, %X)", vmID,
accessibleContext, hypertextInfo); accessibleContext, hypertextInfo);
#endif #endif
...@@ -1834,13 +1836,13 @@ WinAccessBridge::getAccessibleHypertext(long vmID, JOBJECT64 accessibleContext, ...@@ -1834,13 +1836,13 @@ WinAccessBridge::getAccessibleHypertext(long vmID, JOBJECT64 accessibleContext,
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(hypertextInfo, &(pkg->rAccessibleHypertextInfo), sizeof(AccessibleHypertextInfo)); memcpy(hypertextInfo, &(pkg->rAccessibleHypertextInfo), sizeof(AccessibleHypertextInfo));
PrintDebugString(" ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount); PrintDebugString("[INFO]: ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount);
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext succeeded");
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertext failed");
return FALSE; return FALSE;
} }
...@@ -1850,10 +1852,10 @@ WinAccessBridge::activateAccessibleHyperlink(long vmID, JOBJECT64 accessibleCont ...@@ -1850,10 +1852,10 @@ WinAccessBridge::activateAccessibleHyperlink(long vmID, JOBJECT64 accessibleCont
JOBJECT64 accessibleHyperlink) { JOBJECT64 accessibleHyperlink) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::activateAccessibleHyperlink(%p %p)", accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::activateAccessibleHyperlink(%p %p)", accessibleContext,
accessibleHyperlink); accessibleHyperlink);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::activateAccessibleHyperlink(%016I64X %016I64X)", accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::activateAccessibleHyperlink(%016I64X %016I64X)", accessibleContext,
accessibleHyperlink); accessibleHyperlink);
#endif #endif
...@@ -1873,7 +1875,7 @@ WinAccessBridge::activateAccessibleHyperlink(long vmID, JOBJECT64 accessibleCont ...@@ -1873,7 +1875,7 @@ WinAccessBridge::activateAccessibleHyperlink(long vmID, JOBJECT64 accessibleCont
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
return pkg->rResult; return pkg->rResult;
} }
PrintDebugString(" WinAccessBridge::activateAccessibleHyperlink returning FALSE (sendMemoryPackage failed)"); PrintDebugString("[ERROR]: WinAccessBridge::activateAccessibleHyperlink returning FALSE (sendMemoryPackage failed)");
return FALSE; return FALSE;
} }
...@@ -1887,10 +1889,10 @@ WinAccessBridge::getAccessibleHyperlinkCount(const long vmID, ...@@ -1887,10 +1889,10 @@ WinAccessBridge::getAccessibleHyperlinkCount(const long vmID,
const AccessibleContext accessibleContext) { const AccessibleContext accessibleContext) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %p)", PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %p)",
vmID, accessibleContext); vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %016I64X)", PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlinkCount(%X, %016I64X)",
vmID, accessibleContext); vmID, accessibleContext);
#endif #endif
...@@ -1908,12 +1910,12 @@ WinAccessBridge::getAccessibleHyperlinkCount(const long vmID, ...@@ -1908,12 +1910,12 @@ WinAccessBridge::getAccessibleHyperlinkCount(const long vmID,
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### hypetext link count = %d", pkg->rLinkCount); PrintDebugString("[INFO]: ##### hypetext link count = %d", pkg->rLinkCount);
PrintDebugString(" ##### WinAccessBridge::getAccessibleHyperlinkCount succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlinkCount succeeded");
return pkg->rLinkCount; return pkg->rLinkCount;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleHyperlinkCount failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHyperlinkCount failed");
return -1; return -1;
} }
...@@ -1931,10 +1933,10 @@ WinAccessBridge::getAccessibleHypertextExt(const long vmID, ...@@ -1931,10 +1933,10 @@ WinAccessBridge::getAccessibleHypertextExt(const long vmID,
/* OUT */ AccessibleHypertextInfo *hypertextInfo) { /* OUT */ AccessibleHypertextInfo *hypertextInfo) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleHypertextExt(%X, %p %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextExt(%X, %p %p)", vmID,
accessibleContext, hypertextInfo); accessibleContext, hypertextInfo);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleHypertextExt(%X, %016I64X %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextExt(%X, %016I64X %p)", vmID,
accessibleContext, hypertextInfo); accessibleContext, hypertextInfo);
#endif #endif
...@@ -1953,19 +1955,18 @@ WinAccessBridge::getAccessibleHypertextExt(const long vmID, ...@@ -1953,19 +1955,18 @@ WinAccessBridge::getAccessibleHypertextExt(const long vmID,
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### pkg->rSuccess = %d", pkg->rSuccess); PrintDebugString("[INFO]: ##### pkg->rSuccess = %d", pkg->rSuccess);
memcpy(hypertextInfo, &(pkg->rAccessibleHypertextInfo), sizeof(AccessibleHypertextInfo)); memcpy(hypertextInfo, &(pkg->rAccessibleHypertextInfo), sizeof(AccessibleHypertextInfo));
if (pkg->rSuccess == TRUE) { if (pkg->rSuccess == TRUE) {
PrintDebugString(" ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount); PrintDebugString("[INFO]: ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount);
PrintDebugString(" ##### hypertextInfo.linkCount = %d", hypertextInfo->linkCount);
} else { } else {
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextExt failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertextExt failed");
} }
return pkg->rSuccess;; return pkg->rSuccess;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextExt failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertextExt failed");
return FALSE; return FALSE;
} }
...@@ -1982,10 +1983,10 @@ WinAccessBridge::getAccessibleHypertextLinkIndex(const long vmID, ...@@ -1982,10 +1983,10 @@ WinAccessBridge::getAccessibleHypertextLinkIndex(const long vmID,
const jint charIndex) { const jint charIndex) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %p)", PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %p)",
vmID, hypertext); vmID, hypertext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %016I64X)", PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextLinkIndex(%X, %016I64X)",
vmID, hypertext); vmID, hypertext);
#endif #endif
...@@ -2004,12 +2005,12 @@ WinAccessBridge::getAccessibleHypertextLinkIndex(const long vmID, ...@@ -2004,12 +2005,12 @@ WinAccessBridge::getAccessibleHypertextLinkIndex(const long vmID,
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" ##### hypetext link index = %d", pkg->rLinkIndex); PrintDebugString("[INFO]: ##### hypetext link index = %d", pkg->rLinkIndex);
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextLinkIndex succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertextLinkIndex succeeded");
return pkg->rLinkIndex; return pkg->rLinkIndex;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertextLinkIndex failed"); PrintDebugString("[ERROR] ##### WinAccessBridge::getAccessibleHypertextLinkIndex failed");
return -1; return -1;
} }
...@@ -2025,10 +2026,10 @@ WinAccessBridge::getAccessibleHyperlink(const long vmID, ...@@ -2025,10 +2026,10 @@ WinAccessBridge::getAccessibleHyperlink(const long vmID,
/* OUT */ AccessibleHyperlinkInfo *hyperlinkInfo) { /* OUT */ AccessibleHyperlinkInfo *hyperlinkInfo) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleHyperlink(%X, %p, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlink(%X, %p, %p)", vmID,
hypertext, hyperlinkInfo); hypertext, hyperlinkInfo);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleHyperlink(%X, %016I64X, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHyperlink(%X, %016I64X, %p)", vmID,
hypertext, hyperlinkInfo); hypertext, hyperlinkInfo);
#endif #endif
...@@ -2049,11 +2050,11 @@ WinAccessBridge::getAccessibleHyperlink(const long vmID, ...@@ -2049,11 +2050,11 @@ WinAccessBridge::getAccessibleHyperlink(const long vmID,
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(hyperlinkInfo, &(pkg->rAccessibleHyperlinkInfo), memcpy(hyperlinkInfo, &(pkg->rAccessibleHyperlinkInfo),
sizeof(AccessibleHyperlinkInfo)); sizeof(AccessibleHyperlinkInfo));
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleHypertext succeeded");
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleHypertext failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleHypertext failed");
return FALSE; return FALSE;
} }
...@@ -2065,10 +2066,10 @@ WinAccessBridge::getAccessibleKeyBindings(long vmID, JOBJECT64 accessibleContext ...@@ -2065,10 +2066,10 @@ WinAccessBridge::getAccessibleKeyBindings(long vmID, JOBJECT64 accessibleContext
AccessibleKeyBindings *keyBindings) { AccessibleKeyBindings *keyBindings) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleKeyBindings(%X, %p, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings(%X, %p, %p)", vmID,
accessibleContext, keyBindings); accessibleContext, keyBindings);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleKeyBindings(%X, %016I64X, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings(%X, %016I64X, %p)", vmID,
accessibleContext, keyBindings); accessibleContext, keyBindings);
#endif #endif
...@@ -2088,19 +2089,20 @@ WinAccessBridge::getAccessibleKeyBindings(long vmID, JOBJECT64 accessibleContext ...@@ -2088,19 +2089,20 @@ WinAccessBridge::getAccessibleKeyBindings(long vmID, JOBJECT64 accessibleContext
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(keyBindings, &(pkg->rAccessibleKeyBindings), sizeof(AccessibleKeyBindings)); memcpy(keyBindings, &(pkg->rAccessibleKeyBindings), sizeof(AccessibleKeyBindings));
PrintDebugString(" ##### keyBindings.keyBindingsCount = %d", keyBindings->keyBindingsCount); PrintDebugString("[INFO]: ##### keyBindings.keyBindingsCount = %d", keyBindings->keyBindingsCount);
for (int i = 0; i < keyBindings->keyBindingsCount; ++i) { for (int i = 0; i < keyBindings->keyBindingsCount; ++i) {
PrintDebugString(" Key Binding # %d", i+1); PrintDebugString("[INFO]: Key Binding # %d"\
PrintDebugString(" Modifiers: 0x%x", keyBindings->keyBindingInfo[i].modifiers); " Modifiers: 0x%x"\
PrintDebugString(" Character (hex): 0x%x", keyBindings->keyBindingInfo[i].character); " Character (hex): 0x%x"\
PrintDebugString(" Character (wide char): %lc", keyBindings->keyBindingInfo[i].character); " Character (wide char): %lc"\
, i+1, keyBindings->keyBindingInfo[i].modifiers, keyBindings->keyBindingInfo[i].character, keyBindings->keyBindingInfo[i].character);
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleKeyBindings succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings succeeded");
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleKeyBindings failed"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleKeyBindings failed");
return FALSE; return FALSE;
} }
...@@ -2108,10 +2110,10 @@ BOOL ...@@ -2108,10 +2110,10 @@ BOOL
WinAccessBridge::getAccessibleIcons(long vmID, JOBJECT64 accessibleContext, AccessibleIcons *icons) { WinAccessBridge::getAccessibleIcons(long vmID, JOBJECT64 accessibleContext, AccessibleIcons *icons) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleIcons(%X, %p, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleIcons(%X, %p, %p)", vmID,
accessibleContext, icons); accessibleContext, icons);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleIcons(%X, %016I64X, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleIcons(%X, %016I64X, %p)", vmID,
accessibleContext, icons); accessibleContext, icons);
#endif #endif
...@@ -2131,13 +2133,13 @@ WinAccessBridge::getAccessibleIcons(long vmID, JOBJECT64 accessibleContext, Acce ...@@ -2131,13 +2133,13 @@ WinAccessBridge::getAccessibleIcons(long vmID, JOBJECT64 accessibleContext, Acce
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(icons, &(pkg->rAccessibleIcons), sizeof(AccessibleIcons)); memcpy(icons, &(pkg->rAccessibleIcons), sizeof(AccessibleIcons));
PrintDebugString(" ##### icons.iconsCount = %d", icons->iconsCount); PrintDebugString("[INFO]: ##### icons.iconsCount = %d", icons->iconsCount);
PrintDebugString(" ##### WinAccessBridge::getAccessibleIcons succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleIcons succeeded");
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleIcons failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleIcons failed");
return FALSE; return FALSE;
} }
...@@ -2145,10 +2147,10 @@ BOOL ...@@ -2145,10 +2147,10 @@ BOOL
WinAccessBridge::getAccessibleActions(long vmID, JOBJECT64 accessibleContext, AccessibleActions *actions) { WinAccessBridge::getAccessibleActions(long vmID, JOBJECT64 accessibleContext, AccessibleActions *actions) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("##### WinAccessBridge::getAccessibleActions(%X, %p, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleActions(%X, %p, %p)", vmID,
accessibleContext, actions); accessibleContext, actions);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("##### WinAccessBridge::getAccessibleActions(%X, %016I64X, %p)", vmID, PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleActions(%X, %016I64X, %p)", vmID,
accessibleContext, actions); accessibleContext, actions);
#endif #endif
...@@ -2168,13 +2170,13 @@ WinAccessBridge::getAccessibleActions(long vmID, JOBJECT64 accessibleContext, Ac ...@@ -2168,13 +2170,13 @@ WinAccessBridge::getAccessibleActions(long vmID, JOBJECT64 accessibleContext, Ac
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(actions, &(pkg->rAccessibleActions), sizeof(AccessibleActions)); memcpy(actions, &(pkg->rAccessibleActions), sizeof(AccessibleActions));
PrintDebugString(" ##### actions.actionsCount = %d", actions->actionsCount); PrintDebugString("[INFO]: ##### actions.actionsCount = %d", actions->actionsCount);
PrintDebugString(" ##### WinAccessBridge::getAccessibleActions succeeded"); PrintDebugString("[INFO]: ##### WinAccessBridge::getAccessibleActions succeeded");
return TRUE; return TRUE;
} }
} }
PrintDebugString(" ##### WinAccessBridge::getAccessibleActions failed"); PrintDebugString("[ERROR]: ##### WinAccessBridge::getAccessibleActions failed");
return FALSE; return FALSE;
} }
...@@ -2183,11 +2185,11 @@ WinAccessBridge::doAccessibleActions(long vmID, JOBJECT64 accessibleContext, ...@@ -2183,11 +2185,11 @@ WinAccessBridge::doAccessibleActions(long vmID, JOBJECT64 accessibleContext,
AccessibleActionsToDo *actionsToDo, jint *failure) { AccessibleActionsToDo *actionsToDo, jint *failure) {
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::doAccessibleActions(%p #actions %d %ls)", accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::doAccessibleActions(%p #actions %d %ls)", accessibleContext,
actionsToDo->actionsCount, actionsToDo->actionsCount,
actionsToDo->actions[0].name); actionsToDo->actions[0].name);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::doAccessibleActions(%016I64X #actions %d %ls)", accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::doAccessibleActions(%016I64X #actions %d %ls)", accessibleContext,
actionsToDo->actionsCount, actionsToDo->actionsCount,
actionsToDo->actions[0].name); actionsToDo->actions[0].name);
#endif #endif
...@@ -2209,7 +2211,7 @@ WinAccessBridge::doAccessibleActions(long vmID, JOBJECT64 accessibleContext, ...@@ -2209,7 +2211,7 @@ WinAccessBridge::doAccessibleActions(long vmID, JOBJECT64 accessibleContext,
*failure = pkg->failure; *failure = pkg->failure;
return pkg->rResult; return pkg->rResult;
} }
PrintDebugString(" WinAccessBridge::doAccessibleActions returning FALSE (sendMemoryPackage failed)"); PrintDebugString("[ERROR]: WinAccessBridge::doAccessibleActions returning FALSE (sendMemoryPackage failed)");
return FALSE; return FALSE;
} }
...@@ -2234,9 +2236,9 @@ WinAccessBridge::setTextContents (const long vmID, const AccessibleContext acces ...@@ -2234,9 +2236,9 @@ WinAccessBridge::setTextContents (const long vmID, const AccessibleContext acces
wcsncpy(pkg->text, text, sizeof(pkg->text)/sizeof(wchar_t)); // wide character copy wcsncpy(pkg->text, text, sizeof(pkg->text)/sizeof(wchar_t)); // wide character copy
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::setTextContents(%X, %016I64X %ls)", vmID, accessibleContext, text); PrintDebugString("[INFO]: WinAccessBridge::setTextContents(%X, %016I64X %ls)", vmID, accessibleContext, text);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::setTextContents(%X, %p %ls)", vmID, accessibleContext, text); PrintDebugString("[INFO]: WinAccessBridge::setTextContents(%X, %p %ls)", vmID, accessibleContext, text);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2271,18 +2273,19 @@ WinAccessBridge::getParentWithRole (const long vmID, const AccessibleContext acc ...@@ -2271,18 +2273,19 @@ WinAccessBridge::getParentWithRole (const long vmID, const AccessibleContext acc
memcpy((void *)(&(pkg->role)), (void *)role, sizeof(pkg->role)); memcpy((void *)(&(pkg->role)), (void *)role, sizeof(pkg->role));
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getParentWithRole(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getParentWithRole(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getParentWithRole(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getParentWithRole(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
PrintDebugString(" pkg->vmID: %X", pkg->vmID); PrintDebugString("[INFO]: pkg->vmID: %X"\
PrintDebugString(" pkg->accessibleContext: %p", pkg->accessibleContext); " pkg->accessibleContext: %p"\
PrintDebugString(" pkg->role: %ls", pkg->role); " pkg->role: %ls"\
, pkg->vmID, pkg->accessibleContext, pkg->role);
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
PrintDebugString(" pkg->rAccessibleContext: %p", pkg->rAccessibleContext); PrintDebugString("[INFO]: pkg->rAccessibleContext: %p", pkg->rAccessibleContext);
return pkg->rAccessibleContext; return pkg->rAccessibleContext;
} }
} }
...@@ -2310,9 +2313,9 @@ WinAccessBridge::getTopLevelObject (const long vmID, const AccessibleContext acc ...@@ -2310,9 +2313,9 @@ WinAccessBridge::getTopLevelObject (const long vmID, const AccessibleContext acc
pkg->accessibleContext = accessibleContext; pkg->accessibleContext = accessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getTopLevelObject(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getTopLevelObject(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getTopLevelObject(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getTopLevelObject(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2345,9 +2348,9 @@ WinAccessBridge::getParentWithRoleElseRoot (const long vmID, const AccessibleCon ...@@ -2345,9 +2348,9 @@ WinAccessBridge::getParentWithRoleElseRoot (const long vmID, const AccessibleCon
memcpy((void *)(&(pkg->role)), (void *)role, sizeof(pkg->role)); memcpy((void *)(&(pkg->role)), (void *)role, sizeof(pkg->role));
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getParentWithRoleElseRoot(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getParentWithRoleElseRoot(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getParentWithRoleElseRoot(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getParentWithRoleElseRoot(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2378,9 +2381,9 @@ WinAccessBridge::getObjectDepth (const long vmID, const AccessibleContext access ...@@ -2378,9 +2381,9 @@ WinAccessBridge::getObjectDepth (const long vmID, const AccessibleContext access
pkg->accessibleContext = accessibleContext; pkg->accessibleContext = accessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getObjectDepth(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getObjectDepth(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getObjectDepth(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getObjectDepth(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2410,9 +2413,9 @@ WinAccessBridge::getActiveDescendent (const long vmID, const AccessibleContext a ...@@ -2410,9 +2413,9 @@ WinAccessBridge::getActiveDescendent (const long vmID, const AccessibleContext a
pkg->accessibleContext = accessibleContext; pkg->accessibleContext = accessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getActiveDescendent(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getActiveDescendent(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getActiveDescendent(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getActiveDescendent(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2451,16 +2454,16 @@ WinAccessBridge::getVirtualAccessibleName(long vmID, AccessibleContext accessibl ...@@ -2451,16 +2454,16 @@ WinAccessBridge::getVirtualAccessibleName(long vmID, AccessibleContext accessibl
pkg->len = (int)max; pkg->len = (int)max;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getVirtualAccessibleName(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getVirtualAccessibleName(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getVirtualAccessibleName(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getVirtualAccessibleName(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
if (destABWindow != (HWND) 0) { if (destABWindow != (HWND) 0) {
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
wcsncpy(name, pkg->rName, max); wcsncpy(name, pkg->rName, max);
PrintDebugString(" WinAccessBridge::getVirtualAccessibleName: Virtual name = %ls", name); PrintDebugString("[INFO]: WinAccessBridge::getVirtualAccessibleName: Virtual name = %ls", name);
return TRUE; return TRUE;
} }
} }
...@@ -2486,9 +2489,9 @@ WinAccessBridge::requestFocus(long vmID, AccessibleContext accessibleContext) { ...@@ -2486,9 +2489,9 @@ WinAccessBridge::requestFocus(long vmID, AccessibleContext accessibleContext) {
pkg->accessibleContext = accessibleContext; pkg->accessibleContext = accessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::requestFocus(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::requestFocus(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::requestFocus(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::requestFocus(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2521,10 +2524,10 @@ WinAccessBridge::selectTextRange(long vmID, AccessibleContext accessibleContext, ...@@ -2521,10 +2524,10 @@ WinAccessBridge::selectTextRange(long vmID, AccessibleContext accessibleContext,
pkg->endIndex = endIndex; pkg->endIndex = endIndex;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" WinAccessBridge::selectTextRange(%X, %p %d %d)", vmID, accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::selectTextRange(%X, %p %d %d)", vmID, accessibleContext,
startIndex, endIndex); startIndex, endIndex);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" WinAccessBridge::selectTextRange(%X, %016I64X %d %d)", vmID, accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::selectTextRange(%X, %016I64X %d %d)", vmID, accessibleContext,
startIndex, endIndex); startIndex, endIndex);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
...@@ -2563,10 +2566,10 @@ WinAccessBridge::getTextAttributesInRange(long vmID, AccessibleContext accessibl ...@@ -2563,10 +2566,10 @@ WinAccessBridge::getTextAttributesInRange(long vmID, AccessibleContext accessibl
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString(" WinAccessBridge::getTextAttributesInRange(%X, %p %d %d)", vmID, accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::getTextAttributesInRange(%X, %p %d %d)", vmID, accessibleContext,
startIndex, endIndex); startIndex, endIndex);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString(" WinAccessBridge::getTextAttributesInRange(%X, %016I64X %d %d)", vmID, accessibleContext, PrintDebugString("[INFO]: WinAccessBridge::getTextAttributesInRange(%X, %016I64X %d %d)", vmID, accessibleContext,
startIndex, endIndex); startIndex, endIndex);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
...@@ -2600,9 +2603,9 @@ WinAccessBridge::getVisibleChildrenCount(long vmID, AccessibleContext accessible ...@@ -2600,9 +2603,9 @@ WinAccessBridge::getVisibleChildrenCount(long vmID, AccessibleContext accessible
pkg->accessibleContext = accessibleContext; pkg->accessibleContext = accessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getVisibleChildrenCount(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildrenCount(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getVisibleChildrenCount(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildrenCount(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2635,9 +2638,9 @@ WinAccessBridge::getVisibleChildren(long vmID, AccessibleContext accessibleConte ...@@ -2635,9 +2638,9 @@ WinAccessBridge::getVisibleChildren(long vmID, AccessibleContext accessibleConte
pkg->startIndex = startIndex; pkg->startIndex = startIndex;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getVisibleChildren(%X, %p)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildren(%X, %p)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getVisibleChildren(%X, %016I64X)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::getVisibleChildren(%X, %016I64X)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2670,9 +2673,9 @@ WinAccessBridge::setCaretPosition(long vmID, AccessibleContext accessibleContext ...@@ -2670,9 +2673,9 @@ WinAccessBridge::setCaretPosition(long vmID, AccessibleContext accessibleContext
pkg->position = position; pkg->position = position;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::setCaretPosition(%X, %p %ls)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::setCaretPosition(%X, %p %ls)", vmID, accessibleContext);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::setCaretPosition(%X, %016I64X %ls)", vmID, accessibleContext); PrintDebugString("[INFO]: WinAccessBridge::setCaretPosition(%X, %016I64X %ls)", vmID, accessibleContext);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2712,9 +2715,9 @@ WinAccessBridge::getAccessibleTextInfo(long vmID, ...@@ -2712,9 +2715,9 @@ WinAccessBridge::getAccessibleTextInfo(long vmID,
pkg->y = y; pkg->y = y;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleTextInfo(%X, %p, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextInfo(%X, %p, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleTextInfo(%X, %016I64X, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextInfo(%X, %016I64X, %p, %d, %d)", vmID, AccessibleContext, textInfo, x, y);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2722,9 +2725,10 @@ WinAccessBridge::getAccessibleTextInfo(long vmID, ...@@ -2722,9 +2725,10 @@ WinAccessBridge::getAccessibleTextInfo(long vmID,
if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) { if (sendMemoryPackage(buffer, sizeof(buffer), destABWindow) == TRUE) {
memcpy(textInfo, &(pkg->rTextInfo), sizeof(AccessibleTextInfo)); memcpy(textInfo, &(pkg->rTextInfo), sizeof(AccessibleTextInfo));
if (pkg->rTextInfo.charCount != -1) { if (pkg->rTextInfo.charCount != -1) {
PrintDebugString(" charCount: %d", textInfo->charCount); PrintDebugString("[INFO]: charCount: %d"\
PrintDebugString(" caretIndex: %d", textInfo->caretIndex); " caretIndex: %d"\
PrintDebugString(" indexAtPoint: %d", textInfo->indexAtPoint); " indexAtPoint: %d"\
, textInfo->charCount, textInfo->caretIndex, textInfo->indexAtPoint);
return TRUE; return TRUE;
} }
} }
...@@ -2760,9 +2764,9 @@ WinAccessBridge::getAccessibleTextItems(long vmID, ...@@ -2760,9 +2764,9 @@ WinAccessBridge::getAccessibleTextItems(long vmID,
pkg->rTextItemsInfo.sentence[0] = '\0'; pkg->rTextItemsInfo.sentence[0] = '\0';
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleTextItems(%X, %p, %p, %d)", vmID, AccessibleContext, textItems, index); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextItems(%X, %p, %p, %d)", vmID, AccessibleContext, textItems, index);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleTextItems(%X, %016I64X, %p, %d)", vmID, AccessibleContext, textItems, index); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextItems(%X, %016I64X, %p, %d)", vmID, AccessibleContext, textItems, index);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2799,9 +2803,9 @@ WinAccessBridge::getAccessibleTextSelectionInfo(long vmID, ...@@ -2799,9 +2803,9 @@ WinAccessBridge::getAccessibleTextSelectionInfo(long vmID,
pkg->AccessibleContext = AccessibleContext; pkg->AccessibleContext = AccessibleContext;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleTextSelectionInfo(%X, %p, %p)", vmID, AccessibleContext, selectionInfo); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextSelectionInfo(%X, %p, %p)", vmID, AccessibleContext, selectionInfo);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleTextSelectionInfo(%X, %016I64X, %p)", vmID, AccessibleContext, selectionInfo); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextSelectionInfo(%X, %016I64X, %p)", vmID, AccessibleContext, selectionInfo);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2839,9 +2843,9 @@ WinAccessBridge::getAccessibleTextAttributes(long vmID, ...@@ -2839,9 +2843,9 @@ WinAccessBridge::getAccessibleTextAttributes(long vmID,
pkg->index = index; pkg->index = index;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleTextAttributes(%X, %p, %d, %p)", vmID, AccessibleContext, index, attributes); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextAttributes(%X, %p, %d, %p)", vmID, AccessibleContext, index, attributes);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleTextAttributes(%X, %016I64X, %d, %p)", vmID, AccessibleContext, index, attributes); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextAttributes(%X, %016I64X, %d, %p)", vmID, AccessibleContext, index, attributes);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2877,9 +2881,9 @@ WinAccessBridge::getAccessibleTextRect(long vmID, ...@@ -2877,9 +2881,9 @@ WinAccessBridge::getAccessibleTextRect(long vmID,
pkg->index = index; pkg->index = index;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleTextRect(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRect(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleTextRect(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRect(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2917,9 +2921,9 @@ WinAccessBridge::getCaretLocation(long vmID, ...@@ -2917,9 +2921,9 @@ WinAccessBridge::getCaretLocation(long vmID,
pkg->index = index; pkg->index = index;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getCaretLocation(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index); PrintDebugString("[INFO]: WinAccessBridge::getCaretLocation(%X, %p, %p, %d)", vmID, AccessibleContext, rectInfo, index);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getCaretLocation(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index); PrintDebugString("[INFO]: WinAccessBridge::getCaretLocation(%X, %016I64X, %p, %d)", vmID, AccessibleContext, rectInfo, index);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -2969,9 +2973,9 @@ WinAccessBridge::getAccessibleTextLineBounds(long vmID, ...@@ -2969,9 +2973,9 @@ WinAccessBridge::getAccessibleTextLineBounds(long vmID,
pkg->index = index; pkg->index = index;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleTextLineBounds(%X, %p, %d, )", vmID, AccessibleContext, index); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextLineBounds(%X, %p, %d, )", vmID, AccessibleContext, index);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleTextLineBounds(%X, %016I64X, %d, )", vmID, AccessibleContext, index); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextLineBounds(%X, %016I64X, %d, )", vmID, AccessibleContext, index);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -3011,9 +3015,9 @@ WinAccessBridge::getAccessibleTextRange(long vmID, ...@@ -3011,9 +3015,9 @@ WinAccessBridge::getAccessibleTextRange(long vmID,
pkg->end = end; pkg->end = end;
#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer) #ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
PrintDebugString("WinAccessBridge::getAccessibleTextRange(%X, %p, %d, %d, )", vmID, AccessibleContext, start, end); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRange(%X, %p, %d, %d, )", vmID, AccessibleContext, start, end);
#else // JOBJECT64 is jlong (64 bit) #else // JOBJECT64 is jlong (64 bit)
PrintDebugString("WinAccessBridge::getAccessibleTextRange(%X, %016I64X, %d, %d, )", vmID, AccessibleContext, start, end); PrintDebugString("[INFO]: WinAccessBridge::getAccessibleTextRange(%X, %016I64X, %d, %d, )", vmID, AccessibleContext, start, end);
#endif #endif
// need to call only the HWND/VM that contains this AC // need to call only the HWND/VM that contains this AC
HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID); HWND destABWindow = javaVMs->findAccessBridgeWindow(vmID);
...@@ -3290,7 +3294,7 @@ WinAccessBridge::selectAllAccessibleSelectionFromContext(long vmID, ...@@ -3290,7 +3294,7 @@ WinAccessBridge::selectAllAccessibleSelectionFromContext(long vmID,
*/ */
void void
WinAccessBridge::addJavaEventNotification(jlong type) { WinAccessBridge::addJavaEventNotification(jlong type) {
PrintDebugString("WinAccessBridge::addJavaEventNotification(%016I64X)", type); PrintDebugString("[INFO]: WinAccessBridge::addJavaEventNotification(%016I64X)", type);
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
return; return;
} }
...@@ -3302,7 +3306,7 @@ WinAccessBridge::addJavaEventNotification(jlong type) { ...@@ -3302,7 +3306,7 @@ WinAccessBridge::addJavaEventNotification(jlong type) {
pkg->type = type; pkg->type = type;
pkg->DLLwindow = ABHandleToLong(dialogWindow); pkg->DLLwindow = ABHandleToLong(dialogWindow);
PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %p", PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %p",
*pkgType, pkg->type, pkg->DLLwindow); *pkgType, pkg->type, pkg->DLLwindow);
// send addEventNotification message to all JVMs // send addEventNotification message to all JVMs
...@@ -3327,7 +3331,7 @@ WinAccessBridge::addJavaEventNotification(jlong type) { ...@@ -3327,7 +3331,7 @@ WinAccessBridge::addJavaEventNotification(jlong type) {
*/ */
void void
WinAccessBridge::removeJavaEventNotification(jlong type) { WinAccessBridge::removeJavaEventNotification(jlong type) {
PrintDebugString("in WinAccessBridge::removeJavaEventNotification(%016I64X)", type); PrintDebugString("[INFO]: in WinAccessBridge::removeJavaEventNotification(%016I64X)", type);
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
return; return;
} }
...@@ -3338,7 +3342,7 @@ WinAccessBridge::removeJavaEventNotification(jlong type) { ...@@ -3338,7 +3342,7 @@ WinAccessBridge::removeJavaEventNotification(jlong type) {
pkg->type = type; pkg->type = type;
pkg->DLLwindow = ABHandleToLong(dialogWindow); pkg->DLLwindow = ABHandleToLong(dialogWindow);
PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %p", PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %p",
*pkgType, pkg->type, pkg->DLLwindow); *pkgType, pkg->type, pkg->DLLwindow);
// send removeEventNotification message to all JVMs // send removeEventNotification message to all JVMs
...@@ -3365,7 +3369,7 @@ WinAccessBridge::removeJavaEventNotification(jlong type) { ...@@ -3365,7 +3369,7 @@ WinAccessBridge::removeJavaEventNotification(jlong type) {
*/ */
void void
WinAccessBridge::addAccessibilityEventNotification(jlong type) { WinAccessBridge::addAccessibilityEventNotification(jlong type) {
PrintDebugString("in WinAccessBridge::addAccessibilityEventNotification(%016I64X)", type); PrintDebugString("[INFO]: in WinAccessBridge::addAccessibilityEventNotification(%016I64X)", type);
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
return; return;
} }
...@@ -3376,7 +3380,7 @@ WinAccessBridge::addAccessibilityEventNotification(jlong type) { ...@@ -3376,7 +3380,7 @@ WinAccessBridge::addAccessibilityEventNotification(jlong type) {
pkg->type = type; pkg->type = type;
pkg->DLLwindow = ABHandleToLong(dialogWindow); pkg->DLLwindow = ABHandleToLong(dialogWindow);
PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %X", PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %X",
*pkgType, pkg->type, pkg->DLLwindow); *pkgType, pkg->type, pkg->DLLwindow);
// send addEventNotification message to all JVMs // send addEventNotification message to all JVMs
...@@ -3401,7 +3405,7 @@ WinAccessBridge::addAccessibilityEventNotification(jlong type) { ...@@ -3401,7 +3405,7 @@ WinAccessBridge::addAccessibilityEventNotification(jlong type) {
*/ */
void void
WinAccessBridge::removeAccessibilityEventNotification(jlong type) { WinAccessBridge::removeAccessibilityEventNotification(jlong type) {
PrintDebugString("in WinAccessBridge::removeAccessibilityEventNotification(%016I64X)", type); PrintDebugString("[INFO]: in WinAccessBridge::removeAccessibilityEventNotification(%016I64X)", type);
if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) { if ((AccessBridgeJavaVMInstance *) 0 == javaVMs) {
return; return;
} }
...@@ -3412,7 +3416,7 @@ WinAccessBridge::removeAccessibilityEventNotification(jlong type) { ...@@ -3412,7 +3416,7 @@ WinAccessBridge::removeAccessibilityEventNotification(jlong type) {
pkg->type = type; pkg->type = type;
pkg->DLLwindow = ABHandleToLong(dialogWindow); pkg->DLLwindow = ABHandleToLong(dialogWindow);
PrintDebugString(" ->pkgType = %X, eventType = %016I64X, DLLwindow = %X", PrintDebugString("[INFO]: ->pkgType = %X, eventType = %016I64X, DLLwindow = %X",
*pkgType, pkg->type, pkg->DLLwindow); *pkgType, pkg->type, pkg->DLLwindow);
// send removeEventNotification message to all JVMs // send removeEventNotification message to all JVMs
......
/* /*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -58,12 +58,29 @@ extern void ...@@ -58,12 +58,29 @@ extern void
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_sun_java2d_opengl_WGLSurfaceData_initOps(JNIEnv *env, jobject wglsd, Java_sun_java2d_opengl_WGLSurfaceData_initOps(JNIEnv *env, jobject wglsd,
jlong pConfigInfo, jobject gc, jlong pConfigInfo,
jobject peer, jlong hwnd) jobject peer, jlong hwnd)
{ {
OGLSDOps *oglsdo = (OGLSDOps *)SurfaceData_InitOps(env, wglsd, OGLSDOps *oglsdo;
WGLSDOps *wglsdo;
gc = (*env)->NewGlobalRef(env, gc);
if (gc == NULL) {
JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return;
}
oglsdo = (OGLSDOps *)SurfaceData_InitOps(env, wglsd,
sizeof(OGLSDOps)); sizeof(OGLSDOps));
WGLSDOps *wglsdo = (WGLSDOps *)malloc(sizeof(WGLSDOps)); if (oglsdo == NULL) {
(*env)->DeleteGlobalRef(env, gc);
JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return;
}
// later the graphicsConfig will be used for deallocation of oglsdo
oglsdo->graphicsConfig = gc;
wglsdo = (WGLSDOps *)malloc(sizeof(WGLSDOps));
J2dTraceLn(J2D_TRACE_INFO, "WGLSurfaceData_initOps"); J2dTraceLn(J2D_TRACE_INFO, "WGLSurfaceData_initOps");
...@@ -159,33 +176,6 @@ WGLSD_MakeCurrentToScratch(JNIEnv *env, OGLContext *oglc) ...@@ -159,33 +176,6 @@ WGLSD_MakeCurrentToScratch(JNIEnv *env, OGLContext *oglc)
return JNI_TRUE; return JNI_TRUE;
} }
/**
* Returns a pointer (as a jlong) to the native WGLGraphicsConfigInfo
* associated with the given OGLSDOps. This method can be called from
* shared code to retrieve the native GraphicsConfig data in a platform-
* independent manner.
*/
jlong
OGLSD_GetNativeConfigInfo(OGLSDOps *oglsdo)
{
WGLSDOps *wglsdo;
if (oglsdo == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"OGLSD_GetNativeConfigInfo: ops are null");
return 0L;
}
wglsdo = (WGLSDOps *)oglsdo->privOps;
if (wglsdo == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"OGLSD_GetNativeConfigInfo: wgl ops are null");
return 0L;
}
return ptr_to_jlong(wglsdo->configInfo);
}
/** /**
* Makes the given GraphicsConfig's context current to its associated * Makes the given GraphicsConfig's context current to its associated
* "scratch" surface. If there is a problem making the context current, * "scratch" surface. If there is a problem making the context current,
......
/* /*
* Copyright (c) 2015, Red Hat, Inc. * Copyright (c) 2015, Red Hat, Inc.
* Copyright (c) 2015, Oracle, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,7 +25,14 @@ ...@@ -24,7 +25,14 @@
/* /*
* @test * @test
* @bug 8069072 * @bug 8069072
* @summary Test vectors for com.sun.crypto.provider.GHASH * @summary Test vectors for com.sun.crypto.provider.GHASH.
*
* Single iteration to verify software-only GHASH algorithm.
* @run main TestGHASH
*
* Multi-iteration to verify test intrinsics GHASH, if available.
* Many iterations are needed so we are sure hotspot will use intrinsic
* @run main TestGHASH -n 10000
*/ */
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.Method; import java.lang.reflect.Method;
...@@ -124,16 +132,26 @@ public class TestGHASH { ...@@ -124,16 +132,26 @@ public class TestGHASH {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
TestGHASH test; TestGHASH test;
if (args.length == 0) { String test_class = "com.sun.crypto.provider.GHASH";
test = new TestGHASH("com.sun.crypto.provider.GHASH"); int i = 0;
} else { int num_of_loops = 1;
test = new TestGHASH(args[0]); while (args.length > i) {
if (args[i].compareTo("-c") == 0) {
test_class = args[++i];
} else if (args[i].compareTo("-n") == 0) {
num_of_loops = Integer.parseInt(args[++i]);
}
i++;
} }
System.out.println("Running " + num_of_loops + " iterations.");
test = new TestGHASH(test_class);
i = 0;
while (num_of_loops > i) {
// Test vectors from David A. McGrew, John Viega, // Test vectors from David A. McGrew, John Viega,
// "The Galois/Counter Mode of Operation (GCM)", 2005. // "The Galois/Counter Mode of Operation (GCM)", 2005.
// <http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-revised-spec.pdf> // <http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-revised-spec.pdf>
test.check(1, "66e94bd4ef8a2c3b884cfa59ca342b2e", "", "", test.check(1, "66e94bd4ef8a2c3b884cfa59ca342b2e", "", "",
"00000000000000000000000000000000"); "00000000000000000000000000000000");
test.check(2, test.check(2,
...@@ -162,5 +180,7 @@ public class TestGHASH { ...@@ -162,5 +180,7 @@ public class TestGHASH {
"73806900e49f24b22b097544d4896b42" + "73806900e49f24b22b097544d4896b42" +
"4989b5e1ebac0f07c23f4598", "4989b5e1ebac0f07c23f4598",
"df586bb4c249b92cb6922877e444d37b"); "df586bb4c249b92cb6922877e444d37b");
i++;
}
} }
} }
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test RotatedFontMetricsTest
* @bug 8139178
* @summary This test verifies that rotation does not affect font metrics.
* @run main RotatedFontMetricsTest
*/
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
public class RotatedFontMetricsTest {
static final int FONT_SIZE = Integer.getInteger("font.size", 20);
public static void main(String ... args) {
Font font = new Font(Font.DIALOG, Font.PLAIN, FONT_SIZE);
Graphics2D g2d = createGraphics();
FontMetrics ref = null;
RuntimeException failure = null;
for (int a = 0; a < 360; a += 15) {
Graphics2D g = (Graphics2D)g2d.create();
g.rotate(Math.toRadians(a));
FontMetrics m = g.getFontMetrics(font);
g.dispose();
boolean status = true;
if (ref == null) {
ref = m;
} else {
status = ref.getAscent() == m.getAscent() &&
ref.getDescent() == m.getDescent() &&
ref.getLeading() == m.getLeading() &&
ref.getMaxAdvance() == m.getMaxAdvance();
}
System.out.printf("Metrics a%d, d%d, l%d, m%d (%d) %s\n",
m.getAscent(), m.getDescent(), m.getLeading(), m.getMaxAdvance(),
(int)a, status ? "OK" : "FAIL");
if (!status && failure == null) {
failure = new RuntimeException("Font metrics differ for angle " + a);
}
}
if (failure != null) {
throw failure;
}
System.out.println("done");
}
private static Graphics2D createGraphics() {
BufferedImage dst = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
return dst.createGraphics();
}
}
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @key headful
* @bug 8225505
* @summary CTRL + 1 does not show tooltip message for menu items
* @run main/manual JMenuItemToolTipKeyBindingsTest
*/
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.SwingUtilities;
import java.awt.Button;
import java.awt.Dialog;
import java.awt.Panel;
import java.awt.TextArea;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.concurrent.atomic.AtomicBoolean;
public class JMenuItemToolTipKeyBindingsTest {
private static final long TIMEOUT = 5 * 60 * 1000;
private static final AtomicBoolean testCompleted = new AtomicBoolean(false);
private static volatile boolean testResult = false;
private static Dialog controlDialog;
private static JFrame testFrame;
private static final String instructions =
"Verify that \"CTRL\" + \"F1\" key sequence shows/hides tool tip message" +
"\nfor menu items.\n" +
"\n1. Open pop-up menu \"Menu\", (i.e. press \"F10\")." +
"\n2. Navigate to some menu element using keyboard." +
"\n3. Press \"CTRL\" + \"F1\" once menu item is selected." +
"\nIf tooltip message is displayed for the item then press \"Pass\"," +
"\n otherwise press \"Fail\".";
public static void main(String[] args) throws Exception {
try {
SwingUtilities.invokeAndWait(() -> createAndShowGUI());
waitForCompleting();
if (!testResult) {
throw new RuntimeException("Test FAILED!");
}
} finally {
if (controlDialog != null) {
controlDialog.dispose();
}
if (testFrame != null) {
testFrame.dispose();
}
}
}
private static void createAndShowGUI() {
controlDialog = new Dialog((JFrame)null, "JMenuItemToolTipKeyBindingsTest");
TextArea messageArea = new TextArea(instructions, 15, 80, TextArea.SCROLLBARS_BOTH);
controlDialog.add("North", messageArea);
Button passedButton = new Button("Pass");
passedButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
testResult = true;
completeTest();
}
});
Button failedButton = new Button("Fail");
failedButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
testResult = false;
completeTest();
}
});
Panel buttonPanel = new Panel();
buttonPanel.add("West",passedButton);
buttonPanel.add("East", failedButton);
controlDialog.add("South", buttonPanel);
controlDialog.setBounds(250, 0, 500, 500);
controlDialog.setVisible(true);
testFrame = new JFrame("JMenuItemToolTipKeyBindingsTest");
testFrame.setSize(200, 200);
JMenuBar jMenuBar = new JMenuBar();
JMenu jMenu = new JMenu("Menu");
for (int i = 0; i < 3; i++) {
JMenuItem jMenuItem = new JMenuItem("Item " + i);
jMenuItem.setToolTipText("Tooltip " + i);
jMenu.add(jMenuItem);
}
jMenuBar.add(jMenu);
testFrame.setJMenuBar(jMenuBar);
testFrame.setVisible(true);
}
private static void completeTest() {
testCompleted.set(true);
synchronized (testCompleted) {
testCompleted.notifyAll();
}
}
private static void waitForCompleting() throws Exception {
synchronized (testCompleted) {
long startTime = System.currentTimeMillis();
while (!testCompleted.get()) {
testCompleted.wait(TIMEOUT);
if (System.currentTimeMillis() - startTime >= TIMEOUT) {
break;
}
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册