#import <SemanticsObject.h>
Instance Methods | |
(BOOL) | - isAccessibilityBridgeAlive |
(void) | - setSemanticsNode: |
(void) | - replaceChildAtIndex:withChild: |
(BOOL) | - nodeWillCauseLayoutChange: |
(BOOL) | - nodeWillCauseScroll: |
(BOOL) | - nodeShouldTriggerAnnouncement: |
(void) | - collectRoutes: |
(NSString *) | - routeName |
(BOOL) | - onCustomAccessibilityAction: |
(void) | - accessibilityBridgeDidFinishUpdate |
((unavailable("Use initWithBridge instead") | - __attribute__ |
(instancetype) | - initWithBridge:uid: |
(BOOL) | - accessibilityScrollToVisible |
(BOOL) | - accessibilityScrollToVisibleWithChild: |
(id) | - _accessibilityHitTest:withEvent: |
Properties | |
int32_t | uid |
SemanticsObject * | parent |
fml::WeakPtr< flutter::AccessibilityBridgeIos > | bridge |
flutter::SemanticsNode | node |
BOOL | hasChildren |
NSArray< SemanticsObject * > * | children |
NSArray< SemanticsObject * > * | childrenInHitTestOrder |
id | nativeAccessibility |
A node in the iOS semantics tree. This object is a wrapper over a native accessibiliy object, which is stored in the property nativeAccessibility
. In the most case, the nativeAccessibility
directly returns this object. Some subclasses such as the FlutterScrollableSemanticsObject
creates a native UIScrollView
as its nativeAccessibility
so that it can interact with iOS.
Definition at line 30 of file SemanticsObject.h.
- ((unavailable("Use initWithBridge instead") __attribute__ |
- (id) _accessibilityHitTest: | (CGPoint) | point | |
withEvent: | (UIEvent *) | event | |
Provided by category SemanticsObject(Tests).
- (void) accessibilityBridgeDidFinishUpdate |
Called after accessibility bridge finishes a semantics update.
Subclasses can override this method if they contain states that can only be updated once every node in the accessibility tree has finished updating.
Definition at line 332 of file SemanticsObject.mm.
- (BOOL) accessibilityScrollToVisible |
Provided by category SemanticsObject(Tests).
- (BOOL) accessibilityScrollToVisibleWithChild: | (id) | child |
Provided by category SemanticsObject(Tests).
- (void) collectRoutes: | (NSMutableArray<SemanticsObject*>*) | edges |
Definition at line 469 of file SemanticsObject.mm.
- (instancetype) initWithBridge: | (fml::WeakPtr<flutter::AccessibilityBridgeIos>) | bridge | |
uid: | (int32_t) | NS_DESIGNATED_INITIALIZER | |
Reimplemented in FlutterPlatformViewSemanticsContainer.
Definition at line 260 of file SemanticsObject.mm.
References kRootNodeId.
- (BOOL) isAccessibilityBridgeAlive |
Due to the fact that VoiceOver may hold onto SemanticObjects even after it shuts down, there can be situations where the AccessibilityBridge is shutdown, but the SemanticObject will still be alive. If VoiceOver is turned on again, it may try to access this orphaned SemanticObject. Methods that are called from the accessiblity framework should use this to guard against this case by just returning early if its bridge has been shutdown.
See https://github.com/flutter/flutter/issues/43795 for more information.
Definition at line 324 of file SemanticsObject.mm.
References bridge.
- (BOOL) nodeShouldTriggerAnnouncement: | (const flutter::SemanticsNode*) | node |
Whether calling setSemanticsNode:
with node
should trigger an announcement.
Definition at line 354 of file SemanticsObject.mm.
- (BOOL) nodeWillCauseLayoutChange: | (const flutter::SemanticsNode*) | node |
Whether calling setSemanticsNode:
with node
would cause a layout change.
Definition at line 338 of file SemanticsObject.mm.
- (BOOL) nodeWillCauseScroll: | (const flutter::SemanticsNode*) | node |
Whether calling setSemanticsNode:
with node
would cause a scroll event.
Definition at line 345 of file SemanticsObject.mm.
- (BOOL) onCustomAccessibilityAction: | (FlutterCustomAccessibilityAction*) | action |
Definition at line 480 of file SemanticsObject.mm.
References FlutterCustomAccessibilityAction::uid.
- (void) replaceChildAtIndex: | (NSInteger) | index | |
withChild: | (SemanticsObject*) | child | |
- (NSString *) routeName |
Definition at line 376 of file SemanticsObject.mm.
- (void) setSemanticsNode: | (const flutter::SemanticsNode*) | NS_REQUIRES_SUPER |
Updates this semantics object using data from the node
argument.
Definition at line 328 of file SemanticsObject.mm.
|
readnonatomicassign |
The accessibility bridge that this semantics object is attached to. This object may use the bridge to access contextual application information. A weak pointer is used because the platform view owns the accessibility bridge. If you are referencing this property from an iOS callback, be sure to use isAccessibilityBridgeActive
to protect against the case where this node may be orphaned.
Definition at line 51 of file SemanticsObject.h.
Referenced by FLUTTER_ASSERT_ARC::ConvertPointToGlobal(), FLUTTER_ASSERT_ARC::ConvertRectToGlobal(), and isAccessibilityBridgeAlive.
|
readwritenonatomiccopy |
Direct children of this semantics object. Each child's parent
property must be equal to this object.
Definition at line 67 of file SemanticsObject.h.
|
readwritenonatomiccopy |
Direct children of this semantics object in hit test order. Each child's parent
property must be equal to this object.
Definition at line 73 of file SemanticsObject.h.
|
readnonatomicassign |
Whether this semantics object has child semantics objects.
Definition at line 61 of file SemanticsObject.h.
|
readnonatomicassign |
The UIAccessibility that represents this object.
By default, this return self. Subclasses can override to return different objects to represent them. For example, FlutterScrollableSemanticsObject[s] maintain UIScrollView[s] to represent their UIAccessibility[s].
Definition at line 82 of file SemanticsObject.h.
|
readnonatomicassign |
The semantics node used to produce this semantics object.
Definition at line 56 of file SemanticsObject.h.
|
readnonatomicweak |
The parent of this node in the node tree. Will be nil for the root node and during transient state changes.
Definition at line 41 of file SemanticsObject.h.
Referenced by FLUTTER_ASSERT_ARC::GetGlobalTransform(), and replaceChildAtIndex:withChild:.
|
readnonatomicassign |
The globally unique identifier for this node.
Definition at line 35 of file SemanticsObject.h.