Flutter Windows Embedder
accessibility_plugin.h
Go to the documentation of this file.
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 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_ACCESSIBILITY_PLUGIN_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_ACCESSIBILITY_PLUGIN_H_
7 
8 #include <string_view>
9 
10 #include "flutter/fml/macros.h"
12 
13 namespace flutter {
14 
15 using FlutterViewId = int64_t;
17 
18 // Handles messages on the flutter/accessibility channel.
19 //
20 // See:
21 // https://api.flutter.dev/flutter/semantics/SemanticsService-class.html
23  public:
24  explicit AccessibilityPlugin(FlutterWindowsEngine* engine);
25 
26  // Begin handling accessibility messages on the `binary_messenger`.
27  static void SetUp(BinaryMessenger* binary_messenger,
28  AccessibilityPlugin* plugin);
29 
30  // Announce a message through the assistive technology.
31  virtual void Announce(const FlutterViewId view_id,
32  const std::string_view message);
33 
34  private:
35  // The engine that owns this plugin.
36  FlutterWindowsEngine* engine_ = nullptr;
37 
38  FML_DISALLOW_COPY_AND_ASSIGN(AccessibilityPlugin);
39 };
40 
41 } // namespace flutter
42 
43 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_ACCESSIBILITY_PLUGIN_H_
AccessibilityPlugin(FlutterWindowsEngine *engine)
static void SetUp(BinaryMessenger *binary_messenger, AccessibilityPlugin *plugin)
virtual void Announce(const FlutterViewId view_id, const std::string_view message)
Win32Message message
int64_t FlutterViewId