1 /* |
|
2 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle in the LICENSE file that accompanied this code. |
|
10 * |
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
|
15 * accompanied this code). |
|
16 * |
|
17 * You should have received a copy of the GNU General Public License version |
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 * |
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * questions. |
|
24 */ |
|
25 |
|
26 /* |
|
27 * @(#)AccessBridgeCalls.c 1.25 05/08/22 |
|
28 */ |
|
29 |
|
30 /* |
|
31 * Wrapper functions around calls to the AccessBridge DLL |
|
32 */ |
|
33 |
|
34 |
|
35 #include <windows.h> |
|
36 #include <jni.h> |
|
37 |
|
38 |
|
39 //#define ACCESSBRIDGE_32 |
|
40 //#define ACCESSBRIDGE_64 |
|
41 |
|
42 #include "AccessBridgeCalls.h" |
|
43 #include "AccessBridgeDebug.h" |
|
44 |
|
45 #ifdef __cplusplus |
|
46 extern "C" { |
|
47 #endif |
|
48 |
|
49 HINSTANCE theAccessBridgeInstance; |
|
50 AccessBridgeFPs theAccessBridge; |
|
51 |
|
52 BOOL theAccessBridgeInitializedFlag = FALSE; |
|
53 |
|
54 #define LOAD_FP(result, type, name) \ |
|
55 PrintDebugString("LOAD_FP loading: %s ...", name); \ |
|
56 if ((theAccessBridge.result = \ |
|
57 (type) GetProcAddress(theAccessBridgeInstance, name)) == (type) 0) { \ |
|
58 PrintDebugString("LOAD_FP failed: %s", name); \ |
|
59 return FALSE; \ |
|
60 } |
|
61 |
|
62 BOOL initializeAccessBridge() { |
|
63 |
|
64 #ifdef ACCESSBRIDGE_ARCH_32 // For 32bit AT new bridge |
|
65 theAccessBridgeInstance = LoadLibrary("WINDOWSACCESSBRIDGE-32"); |
|
66 #else |
|
67 #ifdef ACCESSBRIDGE_ARCH_64 // For 64bit AT new bridge |
|
68 theAccessBridgeInstance = LoadLibrary("WINDOWSACCESSBRIDGE-64"); |
|
69 #else // legacy |
|
70 theAccessBridgeInstance = LoadLibrary("WINDOWSACCESSBRIDGE"); |
|
71 #endif |
|
72 #endif |
|
73 if (theAccessBridgeInstance != 0) { |
|
74 LOAD_FP(Windows_run, Windows_runFP, "Windows_run"); |
|
75 |
|
76 LOAD_FP(SetJavaShutdown, SetJavaShutdownFP, "setJavaShutdownFP"); |
|
77 LOAD_FP(SetFocusGained, SetFocusGainedFP, "setFocusGainedFP"); |
|
78 LOAD_FP(SetFocusLost, SetFocusLostFP, "setFocusLostFP"); |
|
79 |
|
80 LOAD_FP(SetCaretUpdate, SetCaretUpdateFP, "setCaretUpdateFP"); |
|
81 |
|
82 LOAD_FP(SetMouseClicked, SetMouseClickedFP, "setMouseClickedFP"); |
|
83 LOAD_FP(SetMouseEntered, SetMouseEnteredFP, "setMouseEnteredFP"); |
|
84 LOAD_FP(SetMouseExited, SetMouseExitedFP, "setMouseExitedFP"); |
|
85 LOAD_FP(SetMousePressed, SetMousePressedFP, "setMousePressedFP"); |
|
86 LOAD_FP(SetMouseReleased, SetMouseReleasedFP, "setMouseReleasedFP"); |
|
87 |
|
88 LOAD_FP(SetMenuCanceled, SetMenuCanceledFP, "setMenuCanceledFP"); |
|
89 LOAD_FP(SetMenuDeselected, SetMenuDeselectedFP, "setMenuDeselectedFP"); |
|
90 LOAD_FP(SetMenuSelected, SetMenuSelectedFP, "setMenuSelectedFP"); |
|
91 LOAD_FP(SetPopupMenuCanceled, SetPopupMenuCanceledFP, "setPopupMenuCanceledFP"); |
|
92 LOAD_FP(SetPopupMenuWillBecomeInvisible, SetPopupMenuWillBecomeInvisibleFP, "setPopupMenuWillBecomeInvisibleFP"); |
|
93 LOAD_FP(SetPopupMenuWillBecomeVisible, SetPopupMenuWillBecomeVisibleFP, "setPopupMenuWillBecomeVisibleFP"); |
|
94 |
|
95 LOAD_FP(SetPropertyNameChange, SetPropertyNameChangeFP, "setPropertyNameChangeFP"); |
|
96 LOAD_FP(SetPropertyDescriptionChange, SetPropertyDescriptionChangeFP, "setPropertyDescriptionChangeFP"); |
|
97 LOAD_FP(SetPropertyStateChange, SetPropertyStateChangeFP, "setPropertyStateChangeFP"); |
|
98 LOAD_FP(SetPropertyValueChange, SetPropertyValueChangeFP, "setPropertyValueChangeFP"); |
|
99 LOAD_FP(SetPropertySelectionChange, SetPropertySelectionChangeFP, "setPropertySelectionChangeFP"); |
|
100 LOAD_FP(SetPropertyTextChange, SetPropertyTextChangeFP, "setPropertyTextChangeFP"); |
|
101 LOAD_FP(SetPropertyCaretChange, SetPropertyCaretChangeFP, "setPropertyCaretChangeFP"); |
|
102 LOAD_FP(SetPropertyVisibleDataChange, SetPropertyVisibleDataChangeFP, "setPropertyVisibleDataChangeFP"); |
|
103 LOAD_FP(SetPropertyChildChange, SetPropertyChildChangeFP, "setPropertyChildChangeFP"); |
|
104 LOAD_FP(SetPropertyActiveDescendentChange, SetPropertyActiveDescendentChangeFP, "setPropertyActiveDescendentChangeFP"); |
|
105 |
|
106 LOAD_FP(SetPropertyTableModelChange, SetPropertyTableModelChangeFP, "setPropertyTableModelChangeFP"); |
|
107 |
|
108 LOAD_FP(ReleaseJavaObject, ReleaseJavaObjectFP, "releaseJavaObject"); |
|
109 LOAD_FP(GetVersionInfo, GetVersionInfoFP, "getVersionInfo"); |
|
110 |
|
111 LOAD_FP(IsJavaWindow, IsJavaWindowFP, "isJavaWindow"); |
|
112 LOAD_FP(IsSameObject, IsSameObjectFP, "isSameObject"); |
|
113 LOAD_FP(GetAccessibleContextFromHWND, GetAccessibleContextFromHWNDFP, "getAccessibleContextFromHWND"); |
|
114 LOAD_FP(getHWNDFromAccessibleContext, getHWNDFromAccessibleContextFP, "getHWNDFromAccessibleContext"); |
|
115 |
|
116 LOAD_FP(GetAccessibleContextAt, GetAccessibleContextAtFP, "getAccessibleContextAt"); |
|
117 LOAD_FP(GetAccessibleContextWithFocus, GetAccessibleContextWithFocusFP, "getAccessibleContextWithFocus"); |
|
118 LOAD_FP(GetAccessibleContextInfo, GetAccessibleContextInfoFP, "getAccessibleContextInfo"); |
|
119 LOAD_FP(GetAccessibleChildFromContext, GetAccessibleChildFromContextFP, "getAccessibleChildFromContext"); |
|
120 LOAD_FP(GetAccessibleParentFromContext, GetAccessibleParentFromContextFP, "getAccessibleParentFromContext"); |
|
121 |
|
122 /* begin AccessibleTable */ |
|
123 LOAD_FP(getAccessibleTableInfo, getAccessibleTableInfoFP, "getAccessibleTableInfo"); |
|
124 LOAD_FP(getAccessibleTableCellInfo, getAccessibleTableCellInfoFP, "getAccessibleTableCellInfo"); |
|
125 |
|
126 LOAD_FP(getAccessibleTableRowHeader, getAccessibleTableRowHeaderFP, "getAccessibleTableRowHeader"); |
|
127 LOAD_FP(getAccessibleTableColumnHeader, getAccessibleTableColumnHeaderFP, "getAccessibleTableColumnHeader"); |
|
128 |
|
129 LOAD_FP(getAccessibleTableRowDescription, getAccessibleTableRowDescriptionFP, "getAccessibleTableRowDescription"); |
|
130 LOAD_FP(getAccessibleTableColumnDescription, getAccessibleTableColumnDescriptionFP, "getAccessibleTableColumnDescription"); |
|
131 |
|
132 LOAD_FP(getAccessibleTableRowSelectionCount, getAccessibleTableRowSelectionCountFP, |
|
133 "getAccessibleTableRowSelectionCount"); |
|
134 LOAD_FP(isAccessibleTableRowSelected, isAccessibleTableRowSelectedFP, |
|
135 "isAccessibleTableRowSelected"); |
|
136 LOAD_FP(getAccessibleTableRowSelections, getAccessibleTableRowSelectionsFP, |
|
137 "getAccessibleTableRowSelections"); |
|
138 |
|
139 LOAD_FP(getAccessibleTableColumnSelectionCount, getAccessibleTableColumnSelectionCountFP, |
|
140 "getAccessibleTableColumnSelectionCount"); |
|
141 LOAD_FP(isAccessibleTableColumnSelected, isAccessibleTableColumnSelectedFP, |
|
142 "isAccessibleTableColumnSelected"); |
|
143 LOAD_FP(getAccessibleTableColumnSelections, getAccessibleTableColumnSelectionsFP, |
|
144 "getAccessibleTableColumnSelections"); |
|
145 |
|
146 LOAD_FP(getAccessibleTableRow, getAccessibleTableRowFP, |
|
147 "getAccessibleTableRow"); |
|
148 LOAD_FP(getAccessibleTableColumn, getAccessibleTableColumnFP, |
|
149 "getAccessibleTableColumn"); |
|
150 LOAD_FP(getAccessibleTableIndex, getAccessibleTableIndexFP, |
|
151 "getAccessibleTableIndex"); |
|
152 |
|
153 /* end AccessibleTable */ |
|
154 |
|
155 /* AccessibleRelationSet */ |
|
156 LOAD_FP(getAccessibleRelationSet, getAccessibleRelationSetFP, "getAccessibleRelationSet"); |
|
157 |
|
158 /* AccessibleHypertext */ |
|
159 LOAD_FP(getAccessibleHypertext, getAccessibleHypertextFP, "getAccessibleHypertext"); |
|
160 LOAD_FP(activateAccessibleHyperlink, activateAccessibleHyperlinkFP, "activateAccessibleHyperlink"); |
|
161 LOAD_FP(getAccessibleHyperlinkCount, getAccessibleHyperlinkCountFP, "getAccessibleHyperlinkCount"); |
|
162 LOAD_FP(getAccessibleHypertextExt, getAccessibleHypertextExtFP, "getAccessibleHypertextExt"); |
|
163 LOAD_FP(getAccessibleHypertextLinkIndex, getAccessibleHypertextLinkIndexFP, "getAccessibleHypertextLinkIndex"); |
|
164 LOAD_FP(getAccessibleHyperlink, getAccessibleHyperlinkFP, "getAccessibleHyperlink"); |
|
165 |
|
166 /* Accessible KeyBinding, Icon and Action */ |
|
167 LOAD_FP(getAccessibleKeyBindings, getAccessibleKeyBindingsFP, "getAccessibleKeyBindings"); |
|
168 LOAD_FP(getAccessibleIcons, getAccessibleIconsFP, "getAccessibleIcons"); |
|
169 LOAD_FP(getAccessibleActions, getAccessibleActionsFP, "getAccessibleActions"); |
|
170 LOAD_FP(doAccessibleActions, doAccessibleActionsFP, "doAccessibleActions"); |
|
171 |
|
172 /* AccessibleText */ |
|
173 LOAD_FP(GetAccessibleTextInfo, GetAccessibleTextInfoFP, "getAccessibleTextInfo"); |
|
174 LOAD_FP(GetAccessibleTextItems, GetAccessibleTextItemsFP, "getAccessibleTextItems"); |
|
175 LOAD_FP(GetAccessibleTextSelectionInfo, GetAccessibleTextSelectionInfoFP, "getAccessibleTextSelectionInfo"); |
|
176 LOAD_FP(GetAccessibleTextAttributes, GetAccessibleTextAttributesFP, "getAccessibleTextAttributes"); |
|
177 LOAD_FP(GetAccessibleTextRect, GetAccessibleTextRectFP, "getAccessibleTextRect"); |
|
178 LOAD_FP(GetAccessibleTextLineBounds, GetAccessibleTextLineBoundsFP, "getAccessibleTextLineBounds"); |
|
179 LOAD_FP(GetAccessibleTextRange, GetAccessibleTextRangeFP, "getAccessibleTextRange"); |
|
180 |
|
181 LOAD_FP(GetCurrentAccessibleValueFromContext, GetCurrentAccessibleValueFromContextFP, "getCurrentAccessibleValueFromContext"); |
|
182 LOAD_FP(GetMaximumAccessibleValueFromContext, GetMaximumAccessibleValueFromContextFP, "getMaximumAccessibleValueFromContext"); |
|
183 LOAD_FP(GetMinimumAccessibleValueFromContext, GetMinimumAccessibleValueFromContextFP, "getMinimumAccessibleValueFromContext"); |
|
184 |
|
185 LOAD_FP(AddAccessibleSelectionFromContext, AddAccessibleSelectionFromContextFP, "addAccessibleSelectionFromContext"); |
|
186 LOAD_FP(ClearAccessibleSelectionFromContext, ClearAccessibleSelectionFromContextFP, "clearAccessibleSelectionFromContext"); |
|
187 LOAD_FP(GetAccessibleSelectionFromContext, GetAccessibleSelectionFromContextFP, "getAccessibleSelectionFromContext"); |
|
188 LOAD_FP(GetAccessibleSelectionCountFromContext, GetAccessibleSelectionCountFromContextFP, "getAccessibleSelectionCountFromContext"); |
|
189 LOAD_FP(IsAccessibleChildSelectedFromContext, IsAccessibleChildSelectedFromContextFP, "isAccessibleChildSelectedFromContext"); |
|
190 LOAD_FP(RemoveAccessibleSelectionFromContext, RemoveAccessibleSelectionFromContextFP, "removeAccessibleSelectionFromContext"); |
|
191 LOAD_FP(SelectAllAccessibleSelectionFromContext, SelectAllAccessibleSelectionFromContextFP, "selectAllAccessibleSelectionFromContext"); |
|
192 |
|
193 LOAD_FP(setTextContents, setTextContentsFP, "setTextContents"); |
|
194 LOAD_FP(getParentWithRole, getParentWithRoleFP, "getParentWithRole"); |
|
195 LOAD_FP(getTopLevelObject, getTopLevelObjectFP, "getTopLevelObject"); |
|
196 LOAD_FP(getParentWithRoleElseRoot, getParentWithRoleElseRootFP, "getParentWithRoleElseRoot"); |
|
197 LOAD_FP(getObjectDepth, getObjectDepthFP, "getObjectDepth"); |
|
198 LOAD_FP(getActiveDescendent, getActiveDescendentFP, "getActiveDescendent"); |
|
199 |
|
200 // additional methods for Teton |
|
201 LOAD_FP(getVirtualAccessibleName, getVirtualAccessibleNameFP, "getVirtualAccessibleName"); |
|
202 LOAD_FP(requestFocus, requestFocusFP, "requestFocus"); |
|
203 LOAD_FP(selectTextRange, selectTextRangeFP, "selectTextRange"); |
|
204 LOAD_FP(getTextAttributesInRange, getTextAttributesInRangeFP, "getTextAttributesInRange"); |
|
205 LOAD_FP(getVisibleChildrenCount, getVisibleChildrenCountFP, "getVisibleChildrenCount"); |
|
206 LOAD_FP(getVisibleChildren, getVisibleChildrenFP, "getVisibleChildren"); |
|
207 LOAD_FP(setCaretPosition, setCaretPositionFP, "setCaretPosition"); |
|
208 LOAD_FP(getCaretLocation, getCaretLocationFP, "getCaretLocation"); |
|
209 |
|
210 LOAD_FP(getEventsWaiting, getEventsWaitingFP, "getEventsWaiting"); |
|
211 |
|
212 theAccessBridge.Windows_run(); |
|
213 |
|
214 theAccessBridgeInitializedFlag = TRUE; |
|
215 PrintDebugString("theAccessBridgeInitializedFlag = TRUE"); |
|
216 return TRUE; |
|
217 } else { |
|
218 return FALSE; |
|
219 } |
|
220 } |
|
221 |
|
222 |
|
223 BOOL shutdownAccessBridge() { |
|
224 BOOL result; |
|
225 DWORD error; |
|
226 theAccessBridgeInitializedFlag = FALSE; |
|
227 if (theAccessBridgeInstance != (HANDLE) 0) { |
|
228 result = FreeLibrary(theAccessBridgeInstance); |
|
229 if (result != TRUE) { |
|
230 error = GetLastError(); |
|
231 } |
|
232 return TRUE; |
|
233 } |
|
234 return FALSE; |
|
235 } |
|
236 |
|
237 |
|
238 void SetJavaShutdown(AccessBridge_JavaShutdownFP fp) { |
|
239 if (theAccessBridgeInitializedFlag == TRUE) { |
|
240 theAccessBridge.SetJavaShutdown(fp); |
|
241 } |
|
242 } |
|
243 |
|
244 void SetFocusGained(AccessBridge_FocusGainedFP fp) { |
|
245 if (theAccessBridgeInitializedFlag == TRUE) { |
|
246 theAccessBridge.SetFocusGained(fp); |
|
247 } |
|
248 } |
|
249 |
|
250 void SetFocusLost(AccessBridge_FocusLostFP fp) { |
|
251 if (theAccessBridgeInitializedFlag == TRUE) { |
|
252 theAccessBridge.SetFocusLost(fp); |
|
253 } |
|
254 } |
|
255 |
|
256 |
|
257 void SetCaretUpdate(AccessBridge_CaretUpdateFP fp) { |
|
258 if (theAccessBridgeInitializedFlag == TRUE) { |
|
259 theAccessBridge.SetCaretUpdate(fp); |
|
260 } |
|
261 } |
|
262 |
|
263 |
|
264 void SetMouseClicked(AccessBridge_MouseClickedFP fp) { |
|
265 if (theAccessBridgeInitializedFlag == TRUE) { |
|
266 theAccessBridge.SetMouseClicked(fp); |
|
267 } |
|
268 } |
|
269 |
|
270 void SetMouseEntered(AccessBridge_MouseEnteredFP fp) { |
|
271 if (theAccessBridgeInitializedFlag == TRUE) { |
|
272 theAccessBridge.SetMouseEntered(fp); |
|
273 } |
|
274 } |
|
275 |
|
276 void SetMouseExited(AccessBridge_MouseExitedFP fp) { |
|
277 if (theAccessBridgeInitializedFlag == TRUE) { |
|
278 theAccessBridge.SetMouseExited(fp); |
|
279 } |
|
280 } |
|
281 |
|
282 void SetMousePressed(AccessBridge_MousePressedFP fp) { |
|
283 if (theAccessBridgeInitializedFlag == TRUE) { |
|
284 theAccessBridge.SetMousePressed(fp); |
|
285 } |
|
286 } |
|
287 |
|
288 void SetMouseReleased(AccessBridge_MouseReleasedFP fp) { |
|
289 if (theAccessBridgeInitializedFlag == TRUE) { |
|
290 theAccessBridge.SetMouseReleased(fp); |
|
291 } |
|
292 } |
|
293 |
|
294 |
|
295 void SetMenuCanceled(AccessBridge_MenuCanceledFP fp) { |
|
296 if (theAccessBridgeInitializedFlag == TRUE) { |
|
297 theAccessBridge.SetMenuCanceled(fp); |
|
298 } |
|
299 } |
|
300 |
|
301 void SetMenuDeselected(AccessBridge_MenuDeselectedFP fp) { |
|
302 if (theAccessBridgeInitializedFlag == TRUE) { |
|
303 theAccessBridge.SetMenuDeselected(fp); |
|
304 } |
|
305 } |
|
306 |
|
307 void SetMenuSelected(AccessBridge_MenuSelectedFP fp) { |
|
308 if (theAccessBridgeInitializedFlag == TRUE) { |
|
309 theAccessBridge.SetMenuSelected(fp); |
|
310 } |
|
311 } |
|
312 |
|
313 void SetPopupMenuCanceled(AccessBridge_PopupMenuCanceledFP fp) { |
|
314 if (theAccessBridgeInitializedFlag == TRUE) { |
|
315 theAccessBridge.SetPopupMenuCanceled(fp); |
|
316 } |
|
317 } |
|
318 |
|
319 void SetPopupMenuWillBecomeInvisible(AccessBridge_PopupMenuWillBecomeInvisibleFP fp) { |
|
320 if (theAccessBridgeInitializedFlag == TRUE) { |
|
321 theAccessBridge.SetPopupMenuWillBecomeInvisible(fp); |
|
322 } |
|
323 } |
|
324 |
|
325 void SetPopupMenuWillBecomeVisible(AccessBridge_PopupMenuWillBecomeVisibleFP fp) { |
|
326 if (theAccessBridgeInitializedFlag == TRUE) { |
|
327 theAccessBridge.SetPopupMenuWillBecomeVisible(fp); |
|
328 } |
|
329 } |
|
330 |
|
331 |
|
332 void SetPropertyNameChange(AccessBridge_PropertyNameChangeFP fp) { |
|
333 if (theAccessBridgeInitializedFlag == TRUE) { |
|
334 theAccessBridge.SetPropertyNameChange(fp); |
|
335 } |
|
336 } |
|
337 |
|
338 void SetPropertyDescriptionChange(AccessBridge_PropertyDescriptionChangeFP fp) { |
|
339 if (theAccessBridgeInitializedFlag == TRUE) { |
|
340 theAccessBridge.SetPropertyDescriptionChange(fp); |
|
341 } |
|
342 } |
|
343 |
|
344 void SetPropertyStateChange(AccessBridge_PropertyStateChangeFP fp) { |
|
345 if (theAccessBridgeInitializedFlag == TRUE) { |
|
346 theAccessBridge.SetPropertyStateChange(fp); |
|
347 } |
|
348 } |
|
349 |
|
350 void SetPropertyValueChange(AccessBridge_PropertyValueChangeFP fp) { |
|
351 if (theAccessBridgeInitializedFlag == TRUE) { |
|
352 theAccessBridge.SetPropertyValueChange(fp); |
|
353 } |
|
354 } |
|
355 |
|
356 void SetPropertySelectionChange(AccessBridge_PropertySelectionChangeFP fp) { |
|
357 if (theAccessBridgeInitializedFlag == TRUE) { |
|
358 theAccessBridge.SetPropertySelectionChange(fp); |
|
359 } |
|
360 } |
|
361 |
|
362 void SetPropertyTextChange(AccessBridge_PropertyTextChangeFP fp) { |
|
363 if (theAccessBridgeInitializedFlag == TRUE) { |
|
364 theAccessBridge.SetPropertyTextChange(fp); |
|
365 } |
|
366 } |
|
367 |
|
368 void SetPropertyCaretChange(AccessBridge_PropertyCaretChangeFP fp) { |
|
369 if (theAccessBridgeInitializedFlag == TRUE) { |
|
370 theAccessBridge.SetPropertyCaretChange(fp); |
|
371 } |
|
372 } |
|
373 |
|
374 void SetPropertyVisibleDataChange(AccessBridge_PropertyVisibleDataChangeFP fp) { |
|
375 if (theAccessBridgeInitializedFlag == TRUE) { |
|
376 theAccessBridge.SetPropertyVisibleDataChange(fp); |
|
377 } |
|
378 } |
|
379 |
|
380 void SetPropertyChildChange(AccessBridge_PropertyChildChangeFP fp) { |
|
381 if (theAccessBridgeInitializedFlag == TRUE) { |
|
382 theAccessBridge.SetPropertyChildChange(fp); |
|
383 } |
|
384 } |
|
385 |
|
386 void SetPropertyActiveDescendentChange(AccessBridge_PropertyActiveDescendentChangeFP fp) { |
|
387 if (theAccessBridgeInitializedFlag == TRUE) { |
|
388 theAccessBridge.SetPropertyActiveDescendentChange(fp); |
|
389 } |
|
390 } |
|
391 |
|
392 void SetPropertyTableModelChange(AccessBridge_PropertyTableModelChangeFP fp) { |
|
393 if (theAccessBridgeInitializedFlag == TRUE) { |
|
394 theAccessBridge.SetPropertyTableModelChange(fp); |
|
395 } |
|
396 } |
|
397 |
|
398 /** |
|
399 * General routines |
|
400 */ |
|
401 void ReleaseJavaObject(long vmID, Java_Object object) { |
|
402 if (theAccessBridgeInitializedFlag == TRUE) { |
|
403 theAccessBridge.ReleaseJavaObject(vmID, object); |
|
404 } |
|
405 } |
|
406 |
|
407 BOOL GetVersionInfo(long vmID, AccessBridgeVersionInfo *info) { |
|
408 if (theAccessBridgeInitializedFlag == TRUE) { |
|
409 return theAccessBridge.GetVersionInfo(vmID, info); |
|
410 } |
|
411 return FALSE; |
|
412 } |
|
413 |
|
414 |
|
415 /** |
|
416 * Window routines |
|
417 */ |
|
418 BOOL IsJavaWindow(HWND window) { |
|
419 if (theAccessBridgeInitializedFlag == TRUE) { |
|
420 BOOL ret ; |
|
421 ret = theAccessBridge.IsJavaWindow(window); |
|
422 return ret ; |
|
423 |
|
424 } |
|
425 return FALSE; |
|
426 } |
|
427 |
|
428 |
|
429 /** |
|
430 * Returns the virtual machine ID and AccessibleContext for a top-level window |
|
431 */ |
|
432 BOOL GetAccessibleContextFromHWND(HWND target, long *vmID, AccessibleContext *ac) { |
|
433 if (theAccessBridgeInitializedFlag == TRUE) { |
|
434 return theAccessBridge.GetAccessibleContextFromHWND(target, vmID, ac); |
|
435 } |
|
436 return FALSE; |
|
437 } |
|
438 |
|
439 /** |
|
440 * Returns the HWND from the AccessibleContext of a top-level window. Returns 0 |
|
441 * on error or if the AccessibleContext does not refer to a top-level window. |
|
442 */ |
|
443 HWND getHWNDFromAccessibleContext(long vmID, JOBJECT64 accesibleContext) { |
|
444 if (theAccessBridgeInitializedFlag == TRUE) { |
|
445 return theAccessBridge.getHWNDFromAccessibleContext(vmID, accesibleContext); |
|
446 } |
|
447 return (HWND)0; |
|
448 } |
|
449 |
|
450 /** |
|
451 * returns whether two objects are the same |
|
452 */ |
|
453 BOOL IsSameObject(long vmID, JOBJECT64 obj1, JOBJECT64 obj2) { |
|
454 if (theAccessBridgeInitializedFlag == TRUE) { |
|
455 return theAccessBridge.IsSameObject(vmID, obj1, obj2); |
|
456 } |
|
457 return FALSE; |
|
458 } |
|
459 |
|
460 /** |
|
461 * Sets editable text contents. The AccessibleContext must implement AccessibleEditableText and |
|
462 * be editable. The maximum text length is MAX_STRING_SIZE - 1. |
|
463 * Returns whether successful |
|
464 */ |
|
465 BOOL setTextContents (const long vmID, const AccessibleContext accessibleContext, const wchar_t *text) { |
|
466 |
|
467 if (theAccessBridgeInitializedFlag == TRUE) { |
|
468 return theAccessBridge.setTextContents(vmID, accessibleContext, text); |
|
469 } |
|
470 return FALSE; |
|
471 } |
|
472 |
|
473 /** |
|
474 * Returns the Accessible Context with the specified role that is the |
|
475 * ancestor of a given object. The role is one of the role strings |
|
476 * defined in AccessBridgePackages.h |
|
477 * If there is no ancestor object that has the specified role, |
|
478 * returns (AccessibleContext)0. |
|
479 */ |
|
480 AccessibleContext getParentWithRole (const long vmID, const AccessibleContext accessibleContext, |
|
481 const wchar_t *role) { |
|
482 |
|
483 if (theAccessBridgeInitializedFlag == TRUE) { |
|
484 return theAccessBridge.getParentWithRole(vmID, accessibleContext, role); |
|
485 } |
|
486 return (AccessibleContext)0; |
|
487 } |
|
488 |
|
489 /** |
|
490 * Returns the Accessible Context with the specified role that is the |
|
491 * ancestor of a given object. The role is one of the role strings |
|
492 * defined in AccessBridgePackages.h. If an object with the specified |
|
493 * role does not exist, returns the top level object for the Java Window. |
|
494 * Returns (AccessibleContext)0 on error. |
|
495 */ |
|
496 AccessibleContext getParentWithRoleElseRoot (const long vmID, const AccessibleContext accessibleContext, |
|
497 const wchar_t *role) { |
|
498 |
|
499 if (theAccessBridgeInitializedFlag == TRUE) { |
|
500 return theAccessBridge.getParentWithRoleElseRoot(vmID, accessibleContext, role); |
|
501 } |
|
502 return (AccessibleContext)0; |
|
503 } |
|
504 |
|
505 /** |
|
506 * Returns the Accessible Context for the top level object in |
|
507 * a Java Window. This is same Accessible Context that is obtained |
|
508 * from GetAccessibleContextFromHWND for that window. Returns |
|
509 * (AccessibleContext)0 on error. |
|
510 */ |
|
511 AccessibleContext getTopLevelObject (const long vmID, const AccessibleContext accessibleContext) { |
|
512 |
|
513 if (theAccessBridgeInitializedFlag == TRUE) { |
|
514 return theAccessBridge.getTopLevelObject(vmID, accessibleContext); |
|
515 } |
|
516 return (AccessibleContext)0; |
|
517 } |
|
518 |
|
519 /** |
|
520 * Returns how deep in the object hierarchy a given object is. |
|
521 * The top most object in the object hierarchy has an object depth of 0. |
|
522 * Returns -1 on error. |
|
523 */ |
|
524 int getObjectDepth (const long vmID, const AccessibleContext accessibleContext) { |
|
525 |
|
526 if (theAccessBridgeInitializedFlag == TRUE) { |
|
527 return theAccessBridge.getObjectDepth(vmID, accessibleContext); |
|
528 } |
|
529 return -1; |
|
530 } |
|
531 |
|
532 /** |
|
533 * Returns the Accessible Context of the current ActiveDescendent of an object. |
|
534 * This method assumes the ActiveDescendent is the component that is currently |
|
535 * selected in a container object. |
|
536 * Returns (AccessibleContext)0 on error or if there is no selection. |
|
537 */ |
|
538 AccessibleContext getActiveDescendent (const long vmID, const AccessibleContext accessibleContext) { |
|
539 |
|
540 if (theAccessBridgeInitializedFlag == TRUE) { |
|
541 return theAccessBridge.getActiveDescendent(vmID, accessibleContext); |
|
542 } |
|
543 return (AccessibleContext)0; |
|
544 } |
|
545 |
|
546 |
|
547 /** |
|
548 * Accessible Context routines |
|
549 */ |
|
550 BOOL GetAccessibleContextAt(long vmID, AccessibleContext acParent, |
|
551 jint x, jint y, AccessibleContext *ac) { |
|
552 if (theAccessBridgeInitializedFlag == TRUE) { |
|
553 return theAccessBridge.GetAccessibleContextAt(vmID, acParent, x, y, ac); |
|
554 } |
|
555 return FALSE; |
|
556 } |
|
557 |
|
558 BOOL GetAccessibleContextWithFocus(HWND window, long *vmID, AccessibleContext *ac) { |
|
559 if (theAccessBridgeInitializedFlag == TRUE) { |
|
560 return theAccessBridge.GetAccessibleContextWithFocus(window, vmID, ac); |
|
561 } |
|
562 return FALSE; |
|
563 } |
|
564 |
|
565 BOOL GetAccessibleContextInfo(long vmID, AccessibleContext ac, AccessibleContextInfo *info) { |
|
566 if (theAccessBridgeInitializedFlag == TRUE) { |
|
567 return theAccessBridge.GetAccessibleContextInfo(vmID, ac, info); |
|
568 } |
|
569 return FALSE; |
|
570 } |
|
571 |
|
572 AccessibleContext GetAccessibleChildFromContext(long vmID, AccessibleContext ac, jint index) { |
|
573 if (theAccessBridgeInitializedFlag == TRUE) { |
|
574 return theAccessBridge.GetAccessibleChildFromContext(vmID, ac, index); |
|
575 } |
|
576 return (AccessibleContext) 0; |
|
577 } |
|
578 |
|
579 AccessibleContext GetAccessibleParentFromContext(long vmID, AccessibleContext ac) { |
|
580 if (theAccessBridgeInitializedFlag == TRUE) { |
|
581 return theAccessBridge.GetAccessibleParentFromContext(vmID, ac); |
|
582 } |
|
583 return (AccessibleContext) 0; |
|
584 } |
|
585 |
|
586 /* begin AccessibleTable routines */ |
|
587 |
|
588 /* |
|
589 * get information about an AccessibleTable |
|
590 */ |
|
591 BOOL getAccessibleTableInfo(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo) { |
|
592 if (theAccessBridgeInitializedFlag == TRUE) { |
|
593 return theAccessBridge.getAccessibleTableInfo(vmID, acParent, tableInfo); |
|
594 } |
|
595 return FALSE; |
|
596 } |
|
597 |
|
598 /* |
|
599 * get information about an AccessibleTable cell |
|
600 */ |
|
601 BOOL getAccessibleTableCellInfo(long vmID, AccessibleTable accessibleTable, |
|
602 jint row, jint column, AccessibleTableCellInfo *tableCellInfo) { |
|
603 if (theAccessBridgeInitializedFlag == TRUE) { |
|
604 return theAccessBridge.getAccessibleTableCellInfo(vmID, accessibleTable, row, column, tableCellInfo); |
|
605 } |
|
606 return FALSE; |
|
607 } |
|
608 |
|
609 /* |
|
610 * get information about an AccessibleTable row header |
|
611 */ |
|
612 BOOL getAccessibleTableRowHeader(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo) { |
|
613 if (theAccessBridgeInitializedFlag == TRUE) { |
|
614 return theAccessBridge.getAccessibleTableRowHeader(vmID, acParent, tableInfo); |
|
615 } |
|
616 return FALSE; |
|
617 } |
|
618 |
|
619 /* |
|
620 * get information about an AccessibleTable column header |
|
621 */ |
|
622 BOOL getAccessibleTableColumnHeader(long vmID, AccessibleContext acParent, AccessibleTableInfo *tableInfo) { |
|
623 |
|
624 if (theAccessBridgeInitializedFlag == TRUE) { |
|
625 return theAccessBridge.getAccessibleTableColumnHeader(vmID, acParent, tableInfo); |
|
626 } |
|
627 return FALSE; |
|
628 } |
|
629 |
|
630 /* |
|
631 * return a description of an AccessibleTable row header |
|
632 */ |
|
633 AccessibleContext getAccessibleTableRowDescription(long vmID, AccessibleContext acParent, jint row) { |
|
634 if (theAccessBridgeInitializedFlag == TRUE) { |
|
635 return theAccessBridge.getAccessibleTableRowDescription(vmID, acParent, row); |
|
636 } |
|
637 return (AccessibleContext)0; |
|
638 } |
|
639 |
|
640 /* |
|
641 * return a description of an AccessibleTable column header |
|
642 */ |
|
643 AccessibleContext getAccessibleTableColumnDescription(long vmID, AccessibleContext acParent, jint column) { |
|
644 if (theAccessBridgeInitializedFlag == TRUE) { |
|
645 return theAccessBridge.getAccessibleTableColumnDescription(vmID, acParent, column); |
|
646 } |
|
647 return (AccessibleContext)0; |
|
648 } |
|
649 |
|
650 /* |
|
651 * return the number of rows selected in an AccessibleTable |
|
652 */ |
|
653 jint getAccessibleTableRowSelectionCount(long vmID, AccessibleTable table) { |
|
654 if (theAccessBridgeInitializedFlag == TRUE) { |
|
655 return theAccessBridge.getAccessibleTableRowSelectionCount(vmID, table); |
|
656 } |
|
657 return -1; |
|
658 } |
|
659 |
|
660 /* |
|
661 * return whether a row is selected in an AccessibleTable |
|
662 */ |
|
663 BOOL isAccessibleTableRowSelected(long vmID, AccessibleTable table, jint row) { |
|
664 if (theAccessBridgeInitializedFlag == TRUE) { |
|
665 return theAccessBridge.isAccessibleTableRowSelected(vmID, table, row); |
|
666 } |
|
667 return FALSE; |
|
668 } |
|
669 |
|
670 /* |
|
671 * get an array of selected rows in an AccessibleTable |
|
672 */ |
|
673 BOOL getAccessibleTableRowSelections(long vmID, AccessibleTable table, jint count, jint *selections) { |
|
674 if (theAccessBridgeInitializedFlag == TRUE) { |
|
675 return theAccessBridge.getAccessibleTableRowSelections(vmID, table, count, selections); |
|
676 } |
|
677 return FALSE; |
|
678 } |
|
679 |
|
680 /* |
|
681 * return the number of columns selected in an AccessibleTable |
|
682 */ |
|
683 jint getAccessibleTableColumnSelectionCount(long vmID, AccessibleTable table) { |
|
684 if (theAccessBridgeInitializedFlag == TRUE) { |
|
685 return theAccessBridge.getAccessibleTableColumnSelectionCount(vmID, table); |
|
686 } |
|
687 return -1; |
|
688 } |
|
689 |
|
690 /* |
|
691 * return whether a column is selected in an AccessibleTable |
|
692 */ |
|
693 BOOL isAccessibleTableColumnSelected(long vmID, AccessibleTable table, jint column) { |
|
694 if (theAccessBridgeInitializedFlag == TRUE) { |
|
695 return theAccessBridge.isAccessibleTableColumnSelected(vmID, table, column); |
|
696 } |
|
697 return FALSE; |
|
698 } |
|
699 |
|
700 /* |
|
701 * get an array of columns selected in an AccessibleTable |
|
702 */ |
|
703 BOOL getAccessibleTableColumnSelections(long vmID, AccessibleTable table, jint count, jint *selections) { |
|
704 if (theAccessBridgeInitializedFlag == TRUE) { |
|
705 return theAccessBridge.getAccessibleTableColumnSelections(vmID, table, count, selections); |
|
706 } |
|
707 return FALSE; |
|
708 } |
|
709 |
|
710 /* |
|
711 * return the row number for a cell at a given index |
|
712 */ |
|
713 jint |
|
714 getAccessibleTableRow(long vmID, AccessibleTable table, jint index) { |
|
715 if (theAccessBridgeInitializedFlag == TRUE) { |
|
716 return theAccessBridge.getAccessibleTableRow(vmID, table, index); |
|
717 } |
|
718 return -1; |
|
719 } |
|
720 |
|
721 /* |
|
722 * return the column number for a cell at a given index |
|
723 */ |
|
724 jint |
|
725 getAccessibleTableColumn(long vmID, AccessibleTable table, jint index) { |
|
726 if (theAccessBridgeInitializedFlag == TRUE) { |
|
727 return theAccessBridge.getAccessibleTableColumn(vmID, table, index); |
|
728 } |
|
729 return -1; |
|
730 } |
|
731 |
|
732 /* |
|
733 * return the index of a cell at a given row and column |
|
734 */ |
|
735 jint |
|
736 getAccessibleTableIndex(long vmID, AccessibleTable table, jint row, jint column) { |
|
737 if (theAccessBridgeInitializedFlag == TRUE) { |
|
738 return theAccessBridge.getAccessibleTableIndex(vmID, table, row, column); |
|
739 } |
|
740 return -1; |
|
741 } |
|
742 |
|
743 /* end AccessibleTable routines */ |
|
744 |
|
745 |
|
746 /** |
|
747 * Accessible Text routines |
|
748 */ |
|
749 BOOL GetAccessibleTextInfo(long vmID, AccessibleText at, AccessibleTextInfo *textInfo, jint x, jint y) { |
|
750 if (theAccessBridgeInitializedFlag == TRUE) { |
|
751 return theAccessBridge.GetAccessibleTextInfo(vmID, at, textInfo, x, y); |
|
752 } |
|
753 return FALSE; |
|
754 } |
|
755 |
|
756 BOOL GetAccessibleTextItems(long vmID, AccessibleText at, AccessibleTextItemsInfo *textItems, jint index) { |
|
757 if (theAccessBridgeInitializedFlag == TRUE) { |
|
758 return theAccessBridge.GetAccessibleTextItems(vmID, at, textItems, index); |
|
759 } |
|
760 return FALSE; |
|
761 } |
|
762 |
|
763 BOOL GetAccessibleTextSelectionInfo(long vmID, AccessibleText at, AccessibleTextSelectionInfo *textSelection) { |
|
764 if (theAccessBridgeInitializedFlag == TRUE) { |
|
765 return theAccessBridge.GetAccessibleTextSelectionInfo(vmID, at, textSelection); |
|
766 } |
|
767 return FALSE; |
|
768 } |
|
769 |
|
770 BOOL GetAccessibleTextAttributes(long vmID, AccessibleText at, jint index, AccessibleTextAttributesInfo *attributes) { |
|
771 if (theAccessBridgeInitializedFlag == TRUE) { |
|
772 return theAccessBridge.GetAccessibleTextAttributes(vmID, at, index, attributes); |
|
773 } |
|
774 return FALSE; |
|
775 } |
|
776 |
|
777 BOOL GetAccessibleTextRect(long vmID, AccessibleText at, AccessibleTextRectInfo *rectInfo, jint index) { |
|
778 if (theAccessBridgeInitializedFlag == TRUE) { |
|
779 return theAccessBridge.GetAccessibleTextRect(vmID, at, rectInfo, index); |
|
780 } |
|
781 return FALSE; |
|
782 } |
|
783 |
|
784 BOOL GetAccessibleTextLineBounds(long vmID, AccessibleText at, jint index, jint *startIndex, jint *endIndex) { |
|
785 if (theAccessBridgeInitializedFlag == TRUE) { |
|
786 return theAccessBridge.GetAccessibleTextLineBounds(vmID, at, index, startIndex, endIndex); |
|
787 } |
|
788 return FALSE; |
|
789 } |
|
790 |
|
791 BOOL GetAccessibleTextRange(long vmID, AccessibleText at, jint start, jint end, wchar_t *text, short len) { |
|
792 if (theAccessBridgeInitializedFlag == TRUE) { |
|
793 return theAccessBridge.GetAccessibleTextRange(vmID, at, start, end, text, len); |
|
794 } |
|
795 return FALSE; |
|
796 } |
|
797 |
|
798 /** |
|
799 * AccessibleRelationSet routines |
|
800 */ |
|
801 BOOL getAccessibleRelationSet(long vmID, AccessibleContext accessibleContext, |
|
802 AccessibleRelationSetInfo *relationSetInfo) { |
|
803 if (theAccessBridgeInitializedFlag == TRUE) { |
|
804 return theAccessBridge.getAccessibleRelationSet(vmID, accessibleContext, relationSetInfo); |
|
805 } |
|
806 return FALSE; |
|
807 } |
|
808 |
|
809 /** |
|
810 * AccessibleHypertext routines |
|
811 */ |
|
812 |
|
813 // Gets AccessibleHypertext for an AccessibleContext |
|
814 BOOL getAccessibleHypertext(long vmID, AccessibleContext accessibleContext, |
|
815 AccessibleHypertextInfo *hypertextInfo) { |
|
816 if (theAccessBridgeInitializedFlag == TRUE) { |
|
817 return theAccessBridge.getAccessibleHypertext(vmID, accessibleContext, hypertextInfo); |
|
818 } |
|
819 return FALSE; |
|
820 } |
|
821 |
|
822 // Activates an AccessibleHyperlink for an AccessibleContext |
|
823 BOOL activateAccessibleHyperlink(long vmID, AccessibleContext accessibleContext, |
|
824 AccessibleHyperlink accessibleHyperlink) { |
|
825 if (theAccessBridgeInitializedFlag == TRUE) { |
|
826 return theAccessBridge.activateAccessibleHyperlink(vmID, accessibleContext, accessibleHyperlink); |
|
827 } |
|
828 return FALSE; |
|
829 } |
|
830 |
|
831 /* |
|
832 * Returns the number of hyperlinks in a component |
|
833 * Maps to AccessibleHypertext.getLinkCount. |
|
834 * Returns -1 on error. |
|
835 */ |
|
836 jint getAccessibleHyperlinkCount(const long vmID, |
|
837 const AccessibleContext accessibleContext) { |
|
838 |
|
839 if (theAccessBridgeInitializedFlag == TRUE) { |
|
840 return theAccessBridge.getAccessibleHyperlinkCount(vmID, accessibleContext); |
|
841 } |
|
842 return -1; |
|
843 } |
|
844 |
|
845 /* |
|
846 * This method is used to iterate through the hyperlinks in a component. It |
|
847 * returns hypertext information for a component starting at hyperlink index |
|
848 * nStartIndex. No more than MAX_HYPERLINKS AccessibleHypertextInfo objects will |
|
849 * be returned for each call to this method. |
|
850 * returns FALSE on error. |
|
851 */ |
|
852 BOOL getAccessibleHypertextExt(const long vmID, |
|
853 const AccessibleContext accessibleContext, |
|
854 const jint nStartIndex, |
|
855 /* OUT */ AccessibleHypertextInfo *hypertextInfo) { |
|
856 |
|
857 if (theAccessBridgeInitializedFlag == TRUE) { |
|
858 return theAccessBridge.getAccessibleHypertextExt(vmID, |
|
859 accessibleContext, |
|
860 nStartIndex, |
|
861 hypertextInfo); |
|
862 } |
|
863 return FALSE; |
|
864 } |
|
865 |
|
866 /* |
|
867 * Returns the index into an array of hyperlinks that is associated with |
|
868 * a character index in document; |
|
869 * Maps to AccessibleHypertext.getLinkIndex. |
|
870 * Returns -1 on error. |
|
871 */ |
|
872 jint getAccessibleHypertextLinkIndex(const long vmID, |
|
873 const AccessibleHypertext hypertext, |
|
874 const jint nIndex) { |
|
875 |
|
876 if (theAccessBridgeInitializedFlag == TRUE) { |
|
877 return theAccessBridge.getAccessibleHypertextLinkIndex(vmID, |
|
878 hypertext, |
|
879 nIndex); |
|
880 } |
|
881 return -1; |
|
882 } |
|
883 |
|
884 /* |
|
885 * Returns the nth hyperlink in a document. |
|
886 * Maps to AccessibleHypertext.getLink. |
|
887 * Returns -1 on error |
|
888 */ |
|
889 BOOL getAccessibleHyperlink(const long vmID, |
|
890 const AccessibleHypertext hypertext, |
|
891 const jint nIndex, |
|
892 /* OUT */ AccessibleHyperlinkInfo *hyperlinkInfo) { |
|
893 |
|
894 if (theAccessBridgeInitializedFlag == TRUE) { |
|
895 return theAccessBridge.getAccessibleHyperlink(vmID, |
|
896 hypertext, |
|
897 nIndex, |
|
898 hyperlinkInfo); |
|
899 } |
|
900 return FALSE; |
|
901 } |
|
902 |
|
903 |
|
904 /* Accessible KeyBindings, Icons and Actions */ |
|
905 BOOL getAccessibleKeyBindings(long vmID, AccessibleContext accessibleContext, |
|
906 AccessibleKeyBindings *keyBindings) { |
|
907 if (theAccessBridgeInitializedFlag == TRUE) { |
|
908 return theAccessBridge.getAccessibleKeyBindings(vmID, accessibleContext, keyBindings); |
|
909 } |
|
910 return FALSE; |
|
911 } |
|
912 |
|
913 BOOL getAccessibleIcons(long vmID, AccessibleContext accessibleContext, |
|
914 AccessibleIcons *icons) { |
|
915 if (theAccessBridgeInitializedFlag == TRUE) { |
|
916 return theAccessBridge.getAccessibleIcons(vmID, accessibleContext, icons); |
|
917 } |
|
918 return FALSE; |
|
919 } |
|
920 |
|
921 BOOL getAccessibleActions(long vmID, AccessibleContext accessibleContext, |
|
922 AccessibleActions *actions) { |
|
923 if (theAccessBridgeInitializedFlag == TRUE) { |
|
924 return theAccessBridge.getAccessibleActions(vmID, accessibleContext, actions); |
|
925 } |
|
926 return FALSE; |
|
927 } |
|
928 |
|
929 BOOL doAccessibleActions(long vmID, AccessibleContext accessibleContext, |
|
930 AccessibleActionsToDo *actionsToDo, jint *failure) { |
|
931 if (theAccessBridgeInitializedFlag == TRUE) { |
|
932 return theAccessBridge.doAccessibleActions(vmID, accessibleContext, actionsToDo, failure); |
|
933 } |
|
934 return FALSE; |
|
935 } |
|
936 |
|
937 /** |
|
938 * Accessible Value routines |
|
939 */ |
|
940 BOOL GetCurrentAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len) { |
|
941 if (theAccessBridgeInitializedFlag == TRUE) { |
|
942 return theAccessBridge.GetCurrentAccessibleValueFromContext(vmID, av, value, len); |
|
943 } |
|
944 return FALSE; |
|
945 } |
|
946 |
|
947 BOOL GetMaximumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len) { |
|
948 if (theAccessBridgeInitializedFlag == TRUE) { |
|
949 return theAccessBridge.GetMaximumAccessibleValueFromContext(vmID, av, value, len); |
|
950 } |
|
951 return FALSE; |
|
952 } |
|
953 |
|
954 BOOL GetMinimumAccessibleValueFromContext(long vmID, AccessibleValue av, wchar_t *value, short len) { |
|
955 if (theAccessBridgeInitializedFlag == TRUE) { |
|
956 return theAccessBridge.GetMinimumAccessibleValueFromContext(vmID, av, value, len); |
|
957 } |
|
958 return FALSE; |
|
959 } |
|
960 |
|
961 |
|
962 /** |
|
963 * Accessible Selection routines |
|
964 */ |
|
965 void addAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i) { |
|
966 if (theAccessBridgeInitializedFlag == TRUE) { |
|
967 theAccessBridge.AddAccessibleSelectionFromContext(vmID, as, i); |
|
968 } |
|
969 } |
|
970 |
|
971 void clearAccessibleSelectionFromContext(long vmID, AccessibleSelection as) { |
|
972 if (theAccessBridgeInitializedFlag == TRUE) { |
|
973 theAccessBridge.ClearAccessibleSelectionFromContext(vmID, as); |
|
974 } |
|
975 } |
|
976 |
|
977 JOBJECT64 GetAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i) { |
|
978 if (theAccessBridgeInitializedFlag == TRUE) { |
|
979 return theAccessBridge.GetAccessibleSelectionFromContext(vmID, as, i); |
|
980 } |
|
981 return (JOBJECT64) 0; |
|
982 } |
|
983 |
|
984 int GetAccessibleSelectionCountFromContext(long vmID, AccessibleSelection as) { |
|
985 if (theAccessBridgeInitializedFlag == TRUE) { |
|
986 return theAccessBridge.GetAccessibleSelectionCountFromContext(vmID, as); |
|
987 } |
|
988 return -1; |
|
989 } |
|
990 |
|
991 BOOL IsAccessibleChildSelectedFromContext(long vmID, AccessibleSelection as, int i) { |
|
992 if (theAccessBridgeInitializedFlag == TRUE) { |
|
993 return theAccessBridge.IsAccessibleChildSelectedFromContext(vmID, as, i); |
|
994 } |
|
995 return FALSE; |
|
996 } |
|
997 |
|
998 void RemoveAccessibleSelectionFromContext(long vmID, AccessibleSelection as, int i) { |
|
999 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1000 theAccessBridge.RemoveAccessibleSelectionFromContext(vmID, as, i); |
|
1001 } |
|
1002 } |
|
1003 |
|
1004 void SelectAllAccessibleSelectionFromContext(long vmID, AccessibleSelection as) { |
|
1005 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1006 theAccessBridge.SelectAllAccessibleSelectionFromContext(vmID, as); |
|
1007 } |
|
1008 } |
|
1009 |
|
1010 /** |
|
1011 * Additional methods for Teton |
|
1012 */ |
|
1013 |
|
1014 /** |
|
1015 * Gets the AccessibleName for a component based upon the JAWS algorithm. Returns |
|
1016 * whether successful. |
|
1017 * |
|
1018 * Bug ID 4916682 - Implement JAWS AccessibleName policy |
|
1019 */ |
|
1020 BOOL getVirtualAccessibleName(const long vmID, const AccessibleContext accessibleContext, |
|
1021 wchar_t *name, int len) { |
|
1022 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1023 return theAccessBridge.getVirtualAccessibleName(vmID, accessibleContext, name, len); |
|
1024 } |
|
1025 return FALSE; |
|
1026 } |
|
1027 |
|
1028 /** |
|
1029 * Request focus for a component. Returns whether successful; |
|
1030 * |
|
1031 * Bug ID 4944757 - requestFocus method needed |
|
1032 */ |
|
1033 BOOL requestFocus(const long vmID, const AccessibleContext accessibleContext) { |
|
1034 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1035 return theAccessBridge.requestFocus(vmID, accessibleContext); |
|
1036 } |
|
1037 return FALSE; |
|
1038 } |
|
1039 |
|
1040 /** |
|
1041 * Selects text between two indices. Selection includes the text at the start index |
|
1042 * and the text at the end index. Returns whether successful; |
|
1043 * |
|
1044 * Bug ID 4944758 - selectTextRange method needed |
|
1045 */ |
|
1046 BOOL selectTextRange(const long vmID, const AccessibleContext accessibleContext, |
|
1047 const int startIndex, const int endIndex) { |
|
1048 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1049 return theAccessBridge.selectTextRange(vmID, accessibleContext, startIndex, endIndex); |
|
1050 } |
|
1051 return FALSE; |
|
1052 } |
|
1053 |
|
1054 /** |
|
1055 * Get text attributes between two indices. The attribute list includes the text at the |
|
1056 * start index and the text at the end index. Returns whether successful; |
|
1057 * |
|
1058 * Bug ID 4944761 - getTextAttributes between two indices method needed |
|
1059 */ |
|
1060 BOOL getTextAttributesInRange(const long vmID, const AccessibleContext accessibleContext, |
|
1061 const int startIndex, const int endIndex, |
|
1062 AccessibleTextAttributesInfo *attributes, short *len) { |
|
1063 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1064 return theAccessBridge.getTextAttributesInRange(vmID, accessibleContext, startIndex, |
|
1065 endIndex, attributes, len); |
|
1066 } |
|
1067 return FALSE; |
|
1068 } |
|
1069 |
|
1070 /** |
|
1071 * Returns the number of visible children of a component. Returns -1 on error. |
|
1072 * |
|
1073 * Bug ID 4944762- getVisibleChildren for list-like components needed |
|
1074 */ |
|
1075 int getVisibleChildrenCount(const long vmID, const AccessibleContext accessibleContext) { |
|
1076 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1077 return theAccessBridge.getVisibleChildrenCount(vmID, accessibleContext); |
|
1078 } |
|
1079 return FALSE; |
|
1080 } |
|
1081 |
|
1082 /** |
|
1083 * Gets the visible children of an AccessibleContext. Returns whether successful; |
|
1084 * |
|
1085 * Bug ID 4944762- getVisibleChildren for list-like components needed |
|
1086 */ |
|
1087 BOOL getVisibleChildren(const long vmID, const AccessibleContext accessibleContext, |
|
1088 const int startIndex, VisibleChildrenInfo *visibleChildrenInfo) { |
|
1089 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1090 return theAccessBridge.getVisibleChildren(vmID, accessibleContext, startIndex, |
|
1091 visibleChildrenInfo); |
|
1092 } |
|
1093 return FALSE; |
|
1094 } |
|
1095 |
|
1096 /** |
|
1097 * Set the caret to a text position. Returns whether successful; |
|
1098 * |
|
1099 * Bug ID 4944770 - setCaretPosition method needed |
|
1100 */ |
|
1101 BOOL setCaretPosition(const long vmID, const AccessibleContext accessibleContext, |
|
1102 const int position) { |
|
1103 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1104 return theAccessBridge.setCaretPosition(vmID, accessibleContext, position); |
|
1105 } |
|
1106 return FALSE; |
|
1107 } |
|
1108 |
|
1109 /** |
|
1110 * Gets the text caret location |
|
1111 */ |
|
1112 BOOL getCaretLocation(long vmID, AccessibleContext ac, AccessibleTextRectInfo *rectInfo, jint index) { |
|
1113 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1114 return theAccessBridge.getCaretLocation(vmID, ac, rectInfo, index); |
|
1115 } |
|
1116 return FALSE; |
|
1117 } |
|
1118 |
|
1119 /** |
|
1120 * Gets the number of events waiting to fire |
|
1121 */ |
|
1122 int getEventsWaiting() { |
|
1123 if (theAccessBridgeInitializedFlag == TRUE) { |
|
1124 return theAccessBridge.getEventsWaiting(); |
|
1125 } |
|
1126 return FALSE; |
|
1127 } |
|
1128 |
|
1129 #ifdef __cplusplus |
|
1130 } |
|
1131 #endif |
|