• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package io.flutter.plugin.platform;
6 
7 import android.view.View;
8 import io.flutter.view.AccessibilityBridge;
9 
10 /**
11  * Facilitates interaction between the accessibility bridge and embedded platform views.
12  */
13 public interface PlatformViewsAccessibilityDelegate {
14     /**
15      * Returns the root of the view hierarchy for the platform view with the requested id, or null if there is no
16      * corresponding view.
17      */
getPlatformViewById(Integer id)18     View getPlatformViewById(Integer id);
19 
20     /**
21      * Attaches an accessibility bridge for this platform views accessibility delegate.
22      *
23      * Accessibility events originating in platform views belonging to this delegate will be delegated
24      * to this accessibility bridge.
25      */
attachAccessibilityBridge(AccessibilityBridge accessibilityBridge)26     void attachAccessibilityBridge(AccessibilityBridge accessibilityBridge);
27 
28     /**
29      * Detaches the current accessibility bridge.
30      *
31      * Any accessibility events sent by platform views belonging to this delegate will be ignored until
32      * a new accessibility bridge is attached.
33      */
detachAccessibiltyBridge()34     void detachAccessibiltyBridge();
35 }
36