Flutter Windows Embedder
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
platform_view_manager.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_PLATFORM_VIEW_MANAGER_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_PLATFORM_VIEW_MANAGER_H_
7 
8 #include <memory>
9 
13 
14 namespace flutter {
15 
16 // Possible reasons for change of keyboard focus.
18  kProgrammatic, // Un-directed focus change.
19  kForward, // Keyboard focus moves forwards, e.g. TAB key.
20  kBackward // Keyboard focus moves backwards, e.g. Shift+TAB.
21 };
22 
23 // The platform method handler for platform view related communication between
24 // the engine and the framework. This base class is derived by a concrete class
25 // (i.e. PlatformViewPlugin) to provide implementation of its abstract virtual
26 // methods.
28  public:
29  PlatformViewManager(BinaryMessenger* binary_messenger);
30 
31  virtual ~PlatformViewManager();
32 
33  // Add a new platform view instance to be lazily instantiated when it is next
34  // composited. The manager will invoke Success when this method returns true,
35  // and invoke Error otherwise.
37  std::string_view type_name) = 0;
38 
39  // The framework may invoke this method when keyboard focus must be given to
40  // the platform view. The manager will invoke Success when this method returns
41  // true, and invoke Error otherwise.
43  FocusChangeDirection direction,
44  bool focus) = 0;
45 
46  private:
47  std::unique_ptr<MethodChannel<EncodableValue>> channel_;
48 };
49 
50 } // namespace flutter
51 
52 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_PLATFORM_VIEW_MANAGER_H_
virtual bool FocusPlatformView(PlatformViewId id, FocusChangeDirection direction, bool focus)=0
PlatformViewManager(BinaryMessenger *binary_messenger)
virtual bool AddPlatformView(PlatformViewId id, std::string_view type_name)=0
int64_t PlatformViewId