5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_FOCUS_DELEGATE_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_FOCUS_DELEGATE_H_
8#include <fuchsia/ui/views/cpp/fidl.h>
10#include <unordered_map>
12#include "flutter/fml/macros.h"
13#include "flutter/lib/ui/window/platform_message.h"
14#include "third_party/rapidjson/include/rapidjson/document.h"
20 FocusDelegate(fuchsia::ui::views::ViewRefFocusedHandle view_ref_focused,
21 fuchsia::ui::views::FocuserHandle focuser)
22 : view_ref_focused_(view_ref_focused.
Bind()), focuser_(focuser.
Bind()) {}
49 rapidjson::Value request,
53 fuchsia::ui::views::ViewRef view_ref);
58 fuchsia::ui::views::ViewRefFocusedPtr view_ref_focused_;
59 fuchsia::ui::views::FocuserPtr focuser_;
61 std::unordered_map<uint64_t ,
62 fuchsia::ui::views::ViewRef>
63 child_view_view_refs_;
65 std::function<void(fuchsia::ui::views::FocusState)> watch_loop_;
66 bool is_focused_ =
false;
74 bool RequestFocusById(uint64_t view_id,
76 bool RequestFocusByViewRef(
77 fuchsia::ui::views::ViewRef view_ref,
FocusDelegate(fuchsia::ui::views::ViewRefFocusedHandle view_ref_focused, fuchsia::ui::views::FocuserHandle focuser)
bool HandlePlatformMessage(rapidjson::Value request, fml::RefPtr< flutter::PlatformMessageResponse > response)
void OnChildViewViewRef(uint64_t view_id, fuchsia::ui::views::ViewRef view_ref)
void WatchLoop(std::function< void(bool)> callback)
void OnDisposeChildView(uint64_t view_id)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
static bool Bind(PassBindingsCacheMTL &pass, ShaderStage stage, size_t bind_index, const BufferView &view)