Flutter Engine
 
Loading...
Searching...
No Matches
FlutterPlatformNodeDelegateMac.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_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMNODEDELEGATEMAC_H_
6#define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMNODEDELEGATEMAC_H_
7
8#import <Cocoa/Cocoa.h>
9
11
12#include "flutter/fml/macros.h"
16
17namespace flutter {
18
19//------------------------------------------------------------------------------
20/// The macOS implementation of FlutterPlatformNodeDelegate. This class uses
21/// AXPlatformNodeMac to manage the macOS-specific accessibility objects.
23 public:
24 FlutterPlatformNodeDelegateMac(std::weak_ptr<AccessibilityBridge> bridge,
25 __weak FlutterViewController* view_controller);
27
28 void Init(std::weak_ptr<OwnerBridge> bridge, ui::AXNode* node) override;
29
30 void NodeDataChanged(const ui::AXNodeData& old_node_data,
31 const ui::AXNodeData& new_node_data) override;
32
33 //---------------------------------------------------------------------------
34 /// @brief Gets the live region text of this node in UTF-8 format. This
35 /// is useful to determine the changes in between semantics
36 /// updates when generating accessibility events.
37 std::string GetLiveRegionText() const;
38
39 // |ui::AXPlatformNodeDelegate|
41
42 // |ui::AXPlatformNodeDelegate|
44
45 // |FlutterPlatformNodeDelegate|
47
48 // |FlutterPlatformNodeDelegate|
50 const ui::AXCoordinateSystem coordinate_system,
51 const ui::AXClippingBehavior clipping_behavior,
52 ui::AXOffscreenResult* offscreen_result) const override;
53
54 private:
55 ui::AXPlatformNode* ax_platform_node_;
56 std::weak_ptr<AccessibilityBridge> bridge_;
57 __weak FlutterViewController* view_controller_;
58
59 gfx::RectF ConvertBoundsFromLocalToScreen(
60 const gfx::RectF& local_bounds) const;
61 gfx::RectF ConvertBoundsFromScreenToGlobal(
62 const gfx::RectF& window_bounds) const;
63
65};
66
67} // namespace flutter
68
69#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMNODEDELEGATEMAC_H_
gfx::NativeViewAccessible GetNativeViewAccessible() override
void NodeDataChanged(const ui::AXNodeData &old_node_data, const ui::AXNodeData &new_node_data) override
gfx::NativeViewAccessible GetNSWindow() override
gfx::Rect GetBoundsRect(const ui::AXCoordinateSystem coordinate_system, const ui::AXClippingBehavior clipping_behavior, ui::AXOffscreenResult *offscreen_result) const override
void Init(std::weak_ptr< OwnerBridge > bridge, ui::AXNode *node) override
Called only once, immediately after construction. The constructor doesn't take any arguments because ...
std::string GetLiveRegionText() const
Gets the live region text of this node in UTF-8 format. This is useful to determine the changes in be...
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
UnimplementedNativeViewAccessible * NativeViewAccessible