#include <accessibility_bridge_windows.h>
Public Member Functions | |
AccessibilityBridgeWindows (FlutterWindowsView *view) | |
virtual | ~AccessibilityBridgeWindows ()=default |
void | DispatchAccessibilityAction (AccessibilityNodeId target, FlutterSemanticsAction action, fml::MallocMapping data) override |
Dispatch accessibility action back to the Flutter framework. These actions are generated in the native accessibility system when users interact with the assistive technologies. For example, a FlutterSemanticsAction::kFlutterSemanticsActionTap is fired when user click or touch the screen. More... | |
virtual void | DispatchWinAccessibilityEvent (std::shared_ptr< FlutterPlatformNodeDelegateWindows > node_delegate, ax::mojom::Event event_type) |
virtual void | SetFocus (std::shared_ptr< FlutterPlatformNodeDelegateWindows > node_delegate) |
gfx::NativeViewAccessible | GetChildOfAXFragmentRoot () override |
gfx::NativeViewAccessible | GetParentOfAXFragmentRoot () override |
bool | IsAXFragmentRootAControlElement () override |
Public Member Functions inherited from flutter::AccessibilityBridge | |
AccessibilityBridge () | |
Creates a new instance of a accessibility bridge. More... | |
virtual | ~AccessibilityBridge () |
void | AddFlutterSemanticsNodeUpdate (const FlutterSemanticsNode2 &node) |
Adds a semantics node update to the pending semantics update. Calling this method alone will NOT update the semantics tree. To flush the pending updates, call the CommitUpdates(). More... | |
void | AddFlutterSemanticsCustomActionUpdate (const FlutterSemanticsCustomAction2 &action) |
Adds a custom semantics action update to the pending semantics update. Calling this method alone will NOT update the semantics tree. To flush the pending updates, call the CommitUpdates(). More... | |
void | CommitUpdates () |
Flushes the pending updates and applies them to this accessibility bridge. Calling this with no pending updates does nothing, and callers should call this method at the end of an atomic batch to avoid leaving the tree in a unstable state. For example if a node reparents from A to B, callers should only call this method when both removal from A and addition to B are in the pending updates. More... | |
std::weak_ptr< FlutterPlatformNodeDelegate > | GetFlutterPlatformNodeDelegateFromID (AccessibilityNodeId id) const |
Get the flutter platform node delegate with the given id from this accessibility bridge. Returns expired weak_ptr if the delegate associated with the id does not exist or has been removed from the accessibility tree. More... | |
const ui::AXTreeData & | GetAXTreeData () const |
Get the ax tree data from this accessibility bridge. The tree data contains information such as the id of the node that has the keyboard focus or the text selection range. More... | |
const std::vector< ui::AXEventGenerator::TargetedEvent > | GetPendingEvents () const |
Gets all pending accessibility events generated during semantics updates. This is useful when deciding how to handle events in AccessibilityBridgeDelegate::OnAccessibilityEvent in case one may decide to handle an event differently based on all pending events. More... | |
ui::AXNode * | GetNodeFromTree (const ui::AXTreeID tree_id, const ui::AXNode::AXID node_id) const override |
ui::AXNode * | GetNodeFromTree (const ui::AXNode::AXID node_id) const override |
ui::AXTreeID | GetTreeID () const override |
ui::AXTreeID | GetParentTreeID () const override |
ui::AXNode * | GetRootAsAXNode () const override |
ui::AXNode * | GetParentNodeFromParentTreeAsAXNode () const override |
ui::AXTree * | GetTree () const override |
ui::AXPlatformNode * | GetPlatformNodeFromTree (const ui::AXNode::AXID node_id) const override |
ui::AXPlatformNode * | GetPlatformNodeFromTree (const ui::AXNode &node) const override |
ui::AXPlatformNodeDelegate * | RootDelegate () const override |
Public Member Functions inherited from flutter::FlutterPlatformNodeDelegate::OwnerBridge | |
virtual | ~OwnerBridge ()=default |
Protected Member Functions | |
void | OnAccessibilityEvent (ui::AXEventGenerator::TargetedEvent targeted_event) override |
Handle accessibility events generated due to accessibility tree changes. These events are needed to be sent to native accessibility system. See ui::AXEventGenerator::Event for possible events. More... | |
std::shared_ptr< FlutterPlatformNodeDelegate > | CreateFlutterPlatformNodeDelegate () override |
Creates a platform specific FlutterPlatformNodeDelegate. Ownership passes to the caller. This method will be called whenever a new AXNode is created in AXTree. Each platform needs to implement this method in order to inject its subclass into the accessibility bridge. More... | |
virtual std::weak_ptr< FlutterPlatformNodeDelegate > | GetFocusedNode () |
AccessibilityBridgeWindows must be created as a shared_ptr, since some methods acquires its weak_ptr.
Definition at line 27 of file accessibility_bridge_windows.h.
flutter::AccessibilityBridgeWindows::AccessibilityBridgeWindows | ( | FlutterWindowsView * | view | ) |
Definition at line 13 of file accessibility_bridge_windows.cc.
|
virtualdefault |
|
overrideprotectedvirtual |
Creates a platform specific FlutterPlatformNodeDelegate. Ownership passes to the caller. This method will be called whenever a new AXNode is created in AXTree. Each platform needs to implement this method in order to inject its subclass into the accessibility bridge.
Implements flutter::AccessibilityBridge.
Definition at line 170 of file accessibility_bridge_windows.cc.
|
overridevirtual |
Dispatch accessibility action back to the Flutter framework. These actions are generated in the native accessibility system when users interact with the assistive technologies. For example, a FlutterSemanticsAction::kFlutterSemanticsActionTap is fired when user click or touch the screen.
[in] | target | The semantics node id of the action target. |
[in] | action | The generated flutter semantics action. |
[in] | data | Additional data associated with the action. |
Implements flutter::FlutterPlatformNodeDelegate::OwnerBridge.
Definition at line 162 of file accessibility_bridge_windows.cc.
References action, flutter::FlutterWindowsEngine::DispatchSemanticsAction(), and flutter::FlutterWindowsView::GetEngine().
Referenced by flutter::testing::TEST().
|
virtual |
Definition at line 175 of file accessibility_bridge_windows.cc.
References event_type, and node_delegate.
Referenced by OnAccessibilityEvent().
|
override |
Definition at line 187 of file accessibility_bridge_windows.cc.
References flutter::AccessibilityBridge::RootDelegate().
|
protectedvirtual |
Definition at line 206 of file accessibility_bridge_windows.cc.
References flutter::AccessibilityBridge::GetAXTreeData(), and flutter::AccessibilityBridge::GetFlutterPlatformNodeDelegateFromID().
Referenced by OnAccessibilityEvent().
|
override |
Definition at line 197 of file accessibility_bridge_windows.cc.
|
override |
Definition at line 201 of file accessibility_bridge_windows.cc.
|
overrideprotectedvirtual |
Handle accessibility events generated due to accessibility tree changes. These events are needed to be sent to native accessibility system. See ui::AXEventGenerator::Event for possible events.
[in] | targeted_event | The object that contains both the generated event and the event target. |
Implements flutter::AccessibilityBridge.
Definition at line 18 of file accessibility_bridge_windows.cc.
References DispatchWinAccessibilityEvent(), event_type, flutter::AccessibilityBridge::GetFlutterPlatformNodeDelegateFromID(), GetFocusedNode(), node_delegate, and SetFocus().
|
virtual |
Definition at line 181 of file accessibility_bridge_windows.cc.
References node_delegate.
Referenced by OnAccessibilityEvent().