|
1 | 1 | # -*- coding: UTF-8 -*- |
2 | | -#javaAccessBridgeHandler.py |
3 | | -#A part of NonVisual Desktop Access (NVDA) |
4 | | -#Copyright (C) 2007-2018 NV Access Limited, Peter Vágner, Renaud Paquay, Babbage B.V. |
5 | | -#This file is covered by the GNU General Public License. |
6 | | -#See the file COPYING for more details. |
| 2 | +# A part of NonVisual Desktop Access (NVDA) |
| 3 | +# Copyright (C) 2007-2019 NV Access Limited, Peter Vágner, Renaud Paquay, Babbage B.V. |
| 4 | +# This file is covered by the GNU General Public License. |
| 5 | +# See the file COPYING for more details. |
7 | 6 |
|
8 | 7 | import queue |
9 | 8 | from ctypes import * |
@@ -258,6 +257,15 @@ class AccessibleKeyBindings(Structure): |
258 | 257 | _fixBridgeFunc(BOOL,'getAccessibleTextItems',c_long,JOBJECT64,POINTER(AccessibleTextItemsInfo),jint,errcheck=True) |
259 | 258 | _fixBridgeFunc(BOOL,'getAccessibleTextSelectionInfo',c_long,JOBJECT64,POINTER(AccessibleTextSelectionInfo),errcheck=True) |
260 | 259 | _fixBridgeFunc(BOOL,'getAccessibleTextAttributes',c_long,JOBJECT64,jint,POINTER(AccessibleTextAttributesInfo),errcheck=True) |
| 260 | + _fixBridgeFunc( |
| 261 | + BOOL, |
| 262 | + 'getAccessibleTextRect', |
| 263 | + c_long, |
| 264 | + JOBJECT64, |
| 265 | + POINTER(AccessibleTextRectInfo), |
| 266 | + jint, |
| 267 | + errcheck=True |
| 268 | + ) |
261 | 269 | _fixBridgeFunc(BOOL,'getAccessibleTextLineBounds',c_long,JOBJECT64,jint,POINTER(jint),POINTER(jint),errcheck=True) |
262 | 270 | _fixBridgeFunc(BOOL,'getAccessibleTextRange',c_long,JOBJECT64,jint,jint,POINTER(c_char),c_short,errcheck=True) |
263 | 271 | _fixBridgeFunc(BOOL,'getCurrentAccessibleValueFromContext',c_long,JOBJECT64,POINTER(c_wchar),c_short,errcheck=True) |
@@ -494,6 +502,11 @@ def getTextAttributesInRange(self, startIndex, endIndex): |
494 | 502 | bridgeDll.getTextAttributesInRange(self.vmID, self.accContext, startIndex, endIndex, byref(attributes), byref(length)) |
495 | 503 | return attributes, length.value |
496 | 504 |
|
| 505 | + def getAccessibleTextRect(self, index): |
| 506 | + rect = AccessibleTextRectInfo() |
| 507 | + bridgeDll.getAccessibleTextRect(self.vmID, self.accContext, byref(rect), index) |
| 508 | + return rect |
| 509 | + |
497 | 510 | def getAccessibleRelationSet(self): |
498 | 511 | relations = AccessibleRelationSetInfo() |
499 | 512 | bridgeDll.getAccessibleRelationSet(self.vmID, self.accContext, byref(relations)) |
|
0 commit comments