| 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"
11 #include "flutter/shell/platform/common/client_wrapper/include/flutter/binary_messenger.h"
12
13 namespace flutter {
14
15 using FlutterViewId = int64_t;
16 class FlutterWindowsEngine;
17
18 // Handles messages on the flutter/accessibility channel.
19 //
20 // See:
21 // https://api.flutter.dev/flutter/semantics/SemanticsService-class.html
22 class AccessibilityPlugin {
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_
binary_messenger.h
flutter::AccessibilityPlugin
Definition: accessibility_plugin.h:22
flutter::AccessibilityPlugin::AccessibilityPlugin
AccessibilityPlugin(FlutterWindowsEngine *engine)
Definition: accessibility_plugin.cc:88
flutter::AccessibilityPlugin::SetUp
static void SetUp(BinaryMessenger *binary_messenger, AccessibilityPlugin *plugin)
Definition: accessibility_plugin.cc:91
flutter::AccessibilityPlugin::Announce
virtual void Announce(const FlutterViewId view_id, const std::string_view message)
Definition: accessibility_plugin.cc:107
flutter::BinaryMessenger
Definition: binary_messenger.h:29
flutter::FlutterWindowsEngine
Definition: flutter_windows_engine.h:92
message
Win32Message message
Definition: keyboard_unittests.cc:137
flutter
Definition: accessibility_bridge_windows.cc:11
flutter::FlutterViewId
int64_t FlutterViewId
Definition: accessibility_plugin.h:15