forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccessibility_handler.pyx
More file actions
34 lines (31 loc) · 1.22 KB
/
accessibility_handler.pyx
File metadata and controls
34 lines (31 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright (c) 2018 CEF Python, see the Authors file.
# All rights reserved. Licensed under BSD 3-clause license.
# Project website: https://github.com/cztomczak/cefpython
include "../cefpython.pyx"
include "../browser.pyx"
include "../frame.pyx"
include "../process_message_utils.pyx"
cdef public void AccessibilityHandler_OnAccessibilityTreeChange(
CefRefPtr[CefValue] cefValue
) except * with gil:
cdef object value = CefValueToPyValue(cefValue)
cdef object callback
try:
callback = GetGlobalClientCallback("OnAccessibilityTreeChange")
if callback:
callback(value=value)
except:
(exc_type, exc_value, exc_trace) = sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)
cdef public void AccessibilityHandler_OnAccessibilityLocationChange(
CefRefPtr[CefValue] cefValue
) except * with gil:
cdef object value = CefValueToPyValue(cefValue)
cdef object callback
try:
callback = GetGlobalClientCallback("OnAccessibilityLocationChange")
if callback:
callback(value=value)
except:
(exc_type, exc_value, exc_trace) = sys.exc_info()
sys.excepthook(exc_type, exc_value, exc_trace)