Flutter Engine
The Flutter Engine
|
#include <focus_delegate.h>
Public Member Functions | |
FocusDelegate (fuchsia::ui::views::ViewRefFocusedHandle view_ref_focused, fuchsia::ui::views::FocuserHandle focuser) | |
void | WatchLoop (std::function< void(bool)> callback) |
bool | HandlePlatformMessage (rapidjson::Value request, fml::RefPtr< flutter::PlatformMessageResponse > response) |
void | OnChildViewViewRef (uint64_t view_id, fuchsia::ui::views::ViewRef view_ref) |
void | OnDisposeChildView (uint64_t view_id) |
Definition at line 18 of file focus_delegate.h.
|
inline |
Definition at line 20 of file focus_delegate.h.
bool flutter_runner::FocusDelegate::HandlePlatformMessage | ( | rapidjson::Value | request, |
fml::RefPtr< flutter::PlatformMessageResponse > | response | ||
) |
Handles the following focus-related platform message requests: View.focus.getCurrent
Returns false if a malformed/invalid request needs to be completed empty.
Definition at line 27 of file focus_delegate.cc.
void flutter_runner::FocusDelegate::OnChildViewViewRef | ( | uint64_t | view_id, |
fuchsia::ui::views::ViewRef | view_ref | ||
) |
Definition at line 102 of file focus_delegate.cc.
void flutter_runner::FocusDelegate::OnDisposeChildView | ( | uint64_t | view_id | ) |
Definition at line 108 of file focus_delegate.cc.
void flutter_runner::FocusDelegate::WatchLoop | ( | std::function< void(bool)> | callback | ) |
Continuously watches the host viewRef for focus events, invoking a callback each time.
The callback is invoked on each Watch() call, which consumes the callback argument. Hence, the callback argument must be copyable, so that a copy can be freely moved into the Watch() call.
This method can only be called once.
Definition at line 11 of file focus_delegate.cc.