8#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TEXT_DELEGATE_H_
9#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TEXT_DELEGATE_H_
13#include <fuchsia/ui/input/cpp/fidl.h>
14#include <fuchsia/ui/input3/cpp/fidl.h>
15#include <fuchsia/ui/views/cpp/fidl.h>
16#include <lib/fidl/cpp/binding.h>
18#include "flutter/lib/ui/window/platform_message.h"
19#include "flutter/shell/common/platform_view.h"
20#include "flutter/shell/platform/fuchsia/flutter/keyboard.h"
49 public fuchsia::ui::input::InputMethodEditorClient {
61 fuchsia::ui::input::ImeServiceHandle ime_service,
62 fuchsia::ui::input3::KeyboardHandle keyboard,
63 std::function<
void(std::unique_ptr<flutter::PlatformMessage>)>
69 fuchsia::ui::input3::KeyboardListener::OnKeyEventCallback
75 fuchsia::ui::input::TextInputState
state,
76 std::unique_ptr<fuchsia::ui::input::InputEvent>
event)
override;
81 void OnAction(fuchsia::ui::input::InputMethodAction
action)
override;
95 std::unique_ptr<flutter::PlatformMessage>
message);
113 std::function<void(std::unique_ptr<flutter::PlatformMessage>)>
118 fidl::Binding<fuchsia::ui::input::InputMethodEditorClient> ime_client_;
121 fuchsia::ui::input::InputMethodEditorPtr ime_;
124 fuchsia::ui::input::ImeServicePtr text_sync_service_;
128 int current_text_input_client_ = 0;
131 fidl::Binding<fuchsia::ui::input3::KeyboardListener>
132 keyboard_listener_binding_;
135 fuchsia::ui::input3::KeyboardPtr keyboard_;
141 std::optional<fuchsia::ui::input::TextInputState> last_text_state_;
147 std::optional<fuchsia::ui::input::InputMethodAction> requested_text_action_;
void DidUpdateState(fuchsia::ui::input::TextInputState state, std::unique_ptr< fuchsia::ui::input::InputEvent > event) override
void OnKeyEvent(fuchsia::ui::input3::KeyEvent key_event, fuchsia::ui::input3::KeyboardListener::OnKeyEventCallback callback) override
void OnAction(fuchsia::ui::input::InputMethodAction action) override
TextDelegate(fuchsia::ui::views::ViewRef view_ref, fuchsia::ui::input::ImeServiceHandle ime_service, fuchsia::ui::input3::KeyboardHandle keyboard, std::function< void(std::unique_ptr< flutter::PlatformMessage >)> dispatch_callback)
bool HandleFlutterTextInputChannelPlatformMessage(std::unique_ptr< flutter::PlatformMessage > message)
Channel handler for kTextInputChannel.
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
FlutterKeyEvent key_event
constexpr char kTextInputChannel[]
The channel name used for text editing platofrm messages.
constexpr char kKeyEventChannel[]
The channel name used for key event platform messages.