mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
During multi-step text input composing, such as with Chinese, Japanese, and Korean text input, the framework sends embedders cursor rect updates in the form of two messages: * TextInput.setMarkedTextRect: notifies the embedder the size and position of the composing text rect (or cursor when not composing) in local coordinates. * TextInput.setEditableSizeAndTransform: notifies the embedder of the size of the EditableText and 4x4 transform matrix from local to PipelineOwner.rootNode coordinates. On receipt of either message, we cache a local copy on the TextInputPlugin and notify the Win32FlutterWindow of the updated cursor rect. In a followup patch, we update Win32FlutterWindow to implement the Win32 input manager (IMM) calls required to position the IME candidates window while editing.
22 lines
697 B
C++
22 lines
697 B
C++
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_TEXT_INPUT_PLUGIN_DELEGATE_H_
|
|
#define FLUTTER_SHELL_PLATFORM_WINDOWS_TEXT_INPUT_PLUGIN_DELEGATE_H_
|
|
|
|
#include "flutter/shell/platform/common/cpp/geometry.h"
|
|
#include "flutter/shell/platform/embedder/embedder.h"
|
|
|
|
namespace flutter {
|
|
|
|
class TextInputPluginDelegate {
|
|
public:
|
|
// Notifies delegate that the cursor position has changed.
|
|
virtual void OnCursorRectUpdated(const Rect& rect) = 0;
|
|
};
|
|
|
|
} // namespace flutter
|
|
|
|
#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TEXT_INPUT_PLUGIN_DELEGATE_H_
|