-
Notifications
You must be signed in to change notification settings - Fork 6k
Add Platform View Manager to Windows shell #50598
Changes from 1 commit
500e60c
8dd4543
ae0d049
5f14af0
200f13a
ed90810
5d410ff
484c8c1
b8fadd7
1d203f4
b9acc1a
35eb688
659ebd6
db2851b
db48ddd
f87ed96
42f976e
284b309
e000930
676868f
6e6ef7e
22a9e46
95a8498
1fa97f3
5453b29
dfa6b73
cde468e
585ca11
54d91a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,25 +5,46 @@ | |
| #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_PLATFORM_VIEW_MANAGER_H_ | ||
| #define FLUTTER_SHELL_PLATFORM_WINDOWS_PLATFORM_VIEW_MANAGER_H_ | ||
|
|
||
| #include <functional> | ||
| #include <map> | ||
| #include <memory> | ||
| #include <optional> | ||
|
|
||
| #include "flutter/shell/platform/common/client_wrapper/include/flutter/method_channel.h" | ||
| #include "flutter/shell/platform/windows/public/flutter_windows.h" | ||
| #include "flutter/shell/platform/windows/task_runner.h" | ||
|
|
||
| namespace flutter { | ||
|
|
||
| enum class FocusChangeDirection { | ||
| kProgrammatic, | ||
| kForward, | ||
| kBackward | ||
| }; | ||
|
|
||
| class PlatformViewManager { | ||
| public: | ||
| PlatformViewManager(TaskRunner* task_runner, BinaryMessenger* binary_messenger); | ||
|
|
||
| void QueuePlatformViewCreation(std::string_view type_name, int64_t id); | ||
|
|
||
| void InstantiatePlatformView(int64_t id); | ||
|
|
||
| void RegisterPlatformViewType(std::string_view type_name, const FlutterPlatformViewTypeEntry& type); | ||
|
|
||
| void FocusPlatformView(int64_t id, FocusChangeDirection direction, bool focus); | ||
|
|
||
| std::optional<HWND> GetNativeHandleForId(int64_t id) const; | ||
|
||
| private: | ||
| std::unique_ptr<MethodChannel<EncodableValue>> channel_; | ||
|
|
||
| std::map<std::string, FlutterPlatformViewTypeEntry> platform_view_types_; | ||
|
||
|
|
||
| std::map<int64_t, HWND> platform_views_; | ||
|
|
||
| std::map<int64_t, FlutterPlatformViewCreationParameters> pending_platform_views_; | ||
| std::map<int64_t, std::function<HWND()>> pending_platform_views_; | ||
|
|
||
| TaskRunner* task_runner_; | ||
|
||
| }; | ||
|
|
||
| } // namespace flutter | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.