forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cancel IME composing on clear text input client
When a text input client is cleared, such as when the user changes focus from one text input widget to another, or when the window itself loses focus, cancel IME composing mode, close the composing candidates window (if any), and reset the composing text. Issue: flutter/flutter#90503
- Loading branch information
Showing
16 changed files
with
125 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 43 additions & 42 deletions
85
shell/platform/windows/testing/mock_window_binding_handler.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
// 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_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_ | ||
#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_ | ||
|
||
#include <windowsx.h> | ||
|
||
#include "flutter/shell/platform/windows/window_binding_handler.h" | ||
#include "gmock/gmock.h" | ||
|
||
namespace flutter { | ||
namespace testing { | ||
|
||
/// Mock for the |WindowWin32| base class. | ||
class MockWindowBindingHandler : public WindowBindingHandler { | ||
public: | ||
MockWindowBindingHandler(); | ||
virtual ~MockWindowBindingHandler(); | ||
|
||
// Prevent copying. | ||
MockWindowBindingHandler(MockWindowBindingHandler const&) = delete; | ||
MockWindowBindingHandler& operator=(MockWindowBindingHandler const&) = delete; | ||
|
||
MOCK_METHOD1(SetView, void(WindowBindingHandlerDelegate* view)); | ||
MOCK_METHOD0(GetRenderTarget, WindowsRenderTarget()); | ||
MOCK_METHOD0(GetPlatformWindow, PlatformWindow()); | ||
MOCK_METHOD0(GetDpiScale, float()); | ||
MOCK_METHOD0(IsVisible, bool()); | ||
MOCK_METHOD0(OnWindowResized, void()); | ||
MOCK_METHOD0(GetPhysicalWindowBounds, PhysicalWindowBounds()); | ||
MOCK_METHOD1(UpdateFlutterCursor, void(const std::string& cursor_name)); | ||
MOCK_METHOD1(OnCursorRectUpdated, void(const Rect& rect)); | ||
MOCK_METHOD3(OnBitmapSurfaceUpdated, | ||
bool(const void* allocation, size_t row_bytes, size_t height)); | ||
}; | ||
|
||
} // namespace testing | ||
} // namespace flutter | ||
|
||
#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_ | ||
// 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_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_ | ||
#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_ | ||
|
||
#include <windowsx.h> | ||
|
||
#include "flutter/shell/platform/windows/window_binding_handler.h" | ||
#include "gmock/gmock.h" | ||
|
||
namespace flutter { | ||
namespace testing { | ||
|
||
/// Mock for the |WindowWin32| base class. | ||
class MockWindowBindingHandler : public WindowBindingHandler { | ||
public: | ||
MockWindowBindingHandler(); | ||
virtual ~MockWindowBindingHandler(); | ||
|
||
// Prevent copying. | ||
MockWindowBindingHandler(MockWindowBindingHandler const&) = delete; | ||
MockWindowBindingHandler& operator=(MockWindowBindingHandler const&) = delete; | ||
|
||
MOCK_METHOD1(SetView, void(WindowBindingHandlerDelegate* view)); | ||
MOCK_METHOD0(GetRenderTarget, WindowsRenderTarget()); | ||
MOCK_METHOD0(GetPlatformWindow, PlatformWindow()); | ||
MOCK_METHOD0(GetDpiScale, float()); | ||
MOCK_METHOD0(IsVisible, bool()); | ||
MOCK_METHOD0(OnWindowResized, void()); | ||
MOCK_METHOD0(GetPhysicalWindowBounds, PhysicalWindowBounds()); | ||
MOCK_METHOD1(UpdateFlutterCursor, void(const std::string& cursor_name)); | ||
MOCK_METHOD1(OnCursorRectUpdated, void(const Rect& rect)); | ||
MOCK_METHOD0(OnResetImeComposing, void()); | ||
MOCK_METHOD3(OnBitmapSurfaceUpdated, | ||
bool(const void* allocation, size_t row_bytes, size_t height)); | ||
}; | ||
|
||
} // namespace testing | ||
} // namespace flutter | ||
|
||
#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters