Flutter Engine
The 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
10#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h"
11
12#include "flutter/fml/macros.h"
13#include "flutter/shell/platform/common/accessibility_bridge.h"
14#include "flutter/shell/platform/common/flutter_platform_node_delegate.h"
15#include "flutter/shell/platform/embedder/embedder.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 //---------------------------------------------------------------------------
31 /// @brief Gets the live region text of this node in UTF-8 format. This
32 /// is useful to determine the changes in between semantics
33 /// updates when generating accessibility events.
34 std::string GetLiveRegionText() const;
35
36 // |ui::AXPlatformNodeDelegate|
38
39 // |ui::AXPlatformNodeDelegate|
41
42 // |FlutterPlatformNodeDelegate|
44
45 // |FlutterPlatformNodeDelegate|
47 const ui::AXCoordinateSystem coordinate_system,
48 const ui::AXClippingBehavior clipping_behavior,
49 ui::AXOffscreenResult* offscreen_result) const override;
50
51 private:
52 ui::AXPlatformNode* ax_platform_node_;
53 std::weak_ptr<AccessibilityBridge> bridge_;
54 __weak FlutterViewController* view_controller_;
55
56 gfx::RectF ConvertBoundsFromLocalToScreen(
57 const gfx::RectF& local_bounds) const;
58 gfx::RectF ConvertBoundsFromScreenToGlobal(
59 const gfx::RectF& window_bounds) const;
60
62};
63
64} // namespace flutter
65
66#endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMNODEDELEGATEMAC_H_
gfx::NativeViewAccessible GetNativeViewAccessible() override
gfx::NativeViewAccessible GetNSWindow() override
gfx::Rect GetBoundsRect(const ui::AXCoordinateSystem coordinate_system, const ui::AXClippingBehavior clipping_behavior, ui::AXOffscreenResult *offscreen_result) const override
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
void Init()
UnimplementedNativeViewAccessible * NativeViewAccessible