Mock for the |FlutterWindow| base class. More...
#include <mock_window.h>
Public Member Functions | |
| MockWindow () | |
| MockWindow (std::unique_ptr< WindowsProcTable > windows_proc_table, std::unique_ptr< TextInputManager > text_input_manager) | |
| virtual | ~MockWindow () |
| UINT | GetDpi () |
| void | SetDirectManipulationOwner (std::unique_ptr< DirectManipulationOwner > owner) |
| LRESULT | InjectWindowMessage (UINT const message, WPARAM const wparam, LPARAM const lparam) |
| void | InjectMessageList (int count, const Win32Message *messages) |
| MOCK_METHOD (void, OnDpiScale,(unsigned int),(override)) | |
| MOCK_METHOD (void, OnResize,(unsigned int, unsigned int),(override)) | |
| MOCK_METHOD (void, OnPaint,(),(override)) | |
| MOCK_METHOD (void, OnPointerMove,(double, double, FlutterPointerDeviceKind, int32_t, int),(override)) | |
| MOCK_METHOD (void, OnPointerDown,(double, double, FlutterPointerDeviceKind, int32_t, UINT),(override)) | |
| MOCK_METHOD (void, OnPointerUp,(double, double, FlutterPointerDeviceKind, int32_t, UINT),(override)) | |
| MOCK_METHOD (void, OnPointerLeave,(double, double, FlutterPointerDeviceKind, int32_t),(override)) | |
| MOCK_METHOD (void, OnText,(const std::u16string &),(override)) | |
| MOCK_METHOD (void, OnKey,(int, int, int, char32_t, bool, bool, KeyEventCallback),(override)) | |
| MOCK_METHOD (void, OnUpdateSemanticsEnabled,(bool),(override)) | |
| MOCK_METHOD (gfx::NativeViewAccessible, GetNativeViewAccessible,(),(override)) | |
| MOCK_METHOD (void, OnScroll,(double, double, FlutterPointerDeviceKind, int32_t),(override)) | |
| MOCK_METHOD (void, OnComposeBegin,(),(override)) | |
| MOCK_METHOD (void, OnComposeCommit,(),(override)) | |
| MOCK_METHOD (void, OnComposeEnd,(),(override)) | |
| MOCK_METHOD (void, OnComposeChange,(const std::u16string &, int),(override)) | |
| MOCK_METHOD (void, OnImeComposition,(UINT const, WPARAM const, LPARAM const),(override)) | |
| MOCK_METHOD (FlutterEngineDisplayId, GetDisplayId,(),(override)) | |
| MOCK_METHOD (void, OnThemeChange,(),(override)) | |
| MOCK_METHOD (ui::AXFragmentRootDelegateWin *, GetAxFragmentRootDelegate,(),(override)) | |
| MOCK_METHOD (LRESULT, OnGetObject,(UINT, WPARAM, LPARAM),(override)) | |
| MOCK_METHOD (void, OnWindowStateEvent,(WindowStateEvent),(override)) | |
| void | CallOnImeComposition (UINT const message, WPARAM const wparam, LPARAM const lparam) |
Public Member Functions inherited from flutter::FlutterWindow | |
| FlutterWindow (FlutterDesktopWindowRef window) | |
| ~FlutterWindow ()=default | |
| FlutterWindow (FlutterWindow const &)=delete | |
| FlutterWindow & | operator= (FlutterWindow const &)=delete |
| void | SetHoverEnabled (bool enabled) |
| void | SetTitle (const std::string &title) |
| void | SetIcon (uint8_t *pixel_data, int width, int height) |
| WindowFrame | GetFrame () |
| void | SetFrame (const WindowFrame &frame) |
| double | GetScaleFactor () |
| void | SetPixelRatioOverride (double pixel_ratio) |
| void | SetSizeLimits (FlutterDesktopSize minimum_size, FlutterDesktopSize maximum_size) |
| FlutterWindow (int width, int height, std::shared_ptr< DisplayManagerWin32 > const &display_manager, std::shared_ptr< WindowsProcTable > windows_proc_table=nullptr, std::unique_ptr< TextInputManager > text_input_manager=nullptr) | |
| virtual | ~FlutterWindow () |
| void | InitializeChild (const char *title, unsigned int width, unsigned int height) |
| virtual BOOL | Win32PeekMessage (LPMSG lpMsg, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg) override |
| virtual uint32_t | Win32MapVkToChar (uint32_t virtual_key) override |
| virtual UINT | Win32DispatchMessage (UINT Msg, WPARAM wParam, LPARAM lParam) override |
| virtual void | OnDpiScale (unsigned int dpi) |
| virtual void | OnResize (unsigned int width, unsigned int height) |
| virtual void | OnPaint () |
| virtual void | OnPointerMove (double x, double y, FlutterPointerDeviceKind device_kind, int32_t device_id, int modifiers_state) |
| virtual void | OnPointerDown (double x, double y, FlutterPointerDeviceKind device_kind, int32_t device_id, UINT button) |
| virtual void | OnPointerUp (double x, double y, FlutterPointerDeviceKind device_kind, int32_t device_id, UINT button) |
| virtual void | OnPointerLeave (double x, double y, FlutterPointerDeviceKind device_kind, int32_t device_id) |
| virtual void | OnText (const std::u16string &text) override |
| virtual void | OnKey (int key, int scancode, int action, char32_t character, bool extended, bool was_down, KeyEventCallback callback) override |
| virtual void | OnComposeBegin () |
| virtual void | OnComposeCommit () |
| virtual void | OnComposeEnd () |
| virtual void | OnComposeChange (const std::u16string &text, int cursor_pos) |
| virtual void | OnCursorRectUpdated (const Rect &rect) override |
| virtual void | OnResetImeComposing () override |
| virtual void | OnUpdateSemanticsEnabled (bool enabled) |
| virtual void | OnScroll (double delta_x, double delta_y, FlutterPointerDeviceKind device_kind, int32_t device_id) |
| virtual gfx::NativeViewAccessible | GetNativeViewAccessible () |
| virtual void | SetView (WindowBindingHandlerDelegate *view) override |
| virtual HWND | GetWindowHandle () override |
| virtual float | GetDpiScale () override |
| virtual PhysicalWindowBounds | GetPhysicalWindowBounds () override |
| virtual bool | OnBitmapSurfaceCleared () override |
| virtual bool | OnBitmapSurfaceUpdated (const void *allocation, size_t row_bytes, size_t height) override |
| virtual PointerLocation | GetPrimaryPointerLocation () override |
| virtual FlutterEngineDisplayId | GetDisplayId () override |
| virtual void | OnThemeChange () |
| virtual AlertPlatformNodeDelegate * | GetAlertDelegate () override |
| virtual ui::AXPlatformNodeWin * | GetAlert () override |
| virtual bool | Focus () override |
| virtual ui::AXFragmentRootDelegateWin * | GetAxFragmentRootDelegate () |
| virtual void | OnWindowStateEvent (WindowStateEvent event) |
Public Member Functions inherited from flutter::KeyboardManager::WindowDelegate | |
| virtual | ~WindowDelegate ()=default |
Public Member Functions inherited from flutter::WindowBindingHandler | |
| virtual | ~WindowBindingHandler ()=default |
Protected Member Functions | |
| LRESULT | Win32DefWindowProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
Protected Member Functions inherited from flutter::FlutterWindow | |
| FlutterWindow () | |
| std::wstring | NarrowToWide (const char *source) |
| LRESULT | HandleMessage (UINT const message, WPARAM const wparam, LPARAM const lparam) noexcept |
| virtual LRESULT | OnGetObject (UINT const message, WPARAM const wparam, LPARAM const lparam) |
| virtual void | OnImeSetContext (UINT const message, WPARAM const wparam, LPARAM const lparam) |
| virtual void | OnImeStartComposition (UINT const message, WPARAM const wparam, LPARAM const lparam) |
| virtual void | OnImeComposition (UINT const message, WPARAM const wparam, LPARAM const lparam) |
| virtual void | OnImeEndComposition (UINT const message, WPARAM const wparam, LPARAM const lparam) |
| virtual void | OnImeRequest (UINT const message, WPARAM const wparam, LPARAM const lparam) |
| virtual void | AbortImeComposing () |
| virtual void | UpdateCursorRect (const Rect &rect) |
| UINT | GetCurrentDPI () |
| UINT | GetCurrentWidth () |
| UINT | GetCurrentHeight () |
| virtual float | GetScrollOffsetMultiplier () |
Additional Inherited Members | |
Public Types inherited from flutter::KeyboardManager::WindowDelegate | |
| using | KeyEventCallback = std::function< void(bool)> |
Protected Attributes inherited from flutter::FlutterWindow | |
| std::unique_ptr< AlertPlatformNodeDelegate > | alert_delegate_ |
| std::unique_ptr< ui::AXPlatformNodeWin > | alert_node_ |
| std::unique_ptr< DirectManipulationOwner > | direct_manipulation_owner_ |
Mock for the |FlutterWindow| base class.
Definition at line 17 of file mock_window.h.
| flutter::testing::MockWindow::MockWindow | ( | ) |
Definition at line 9 of file mock_window.cc.
| flutter::testing::MockWindow::MockWindow | ( | std::unique_ptr< WindowsProcTable > | windows_proc_table, |
| std::unique_ptr< TextInputManager > | text_input_manager | ||
| ) |
Definition at line 10 of file mock_window.cc.
|
virtualdefault |
| void flutter::testing::MockWindow::CallOnImeComposition | ( | UINT const | message, |
| WPARAM const | wparam, | ||
| LPARAM const | lparam | ||
| ) |
Definition at line 53 of file mock_window.cc.
References message, and flutter::FlutterWindow::OnImeComposition().
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| UINT flutter::testing::MockWindow::GetDpi | ( | ) |
Definition at line 20 of file mock_window.cc.
References flutter::FlutterWindow::GetCurrentDPI().
| void flutter::testing::MockWindow::InjectMessageList | ( | int | count, |
| const Win32Message * | messages | ||
| ) |
Definition at line 42 of file mock_window.cc.
References InjectWindowMessage(), flutter::testing::kWmResultDontCheck, and message.
| LRESULT flutter::testing::MockWindow::InjectWindowMessage | ( | UINT const | message, |
| WPARAM const | wparam, | ||
| LPARAM const | lparam | ||
| ) |
Definition at line 36 of file mock_window.cc.
References flutter::FlutterWindow::HandleMessage(), and message.
Referenced by InjectMessageList(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| flutter::testing::MockWindow::MOCK_METHOD | ( | FlutterEngineDisplayId | , |
| GetDisplayId | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | gfx::NativeViewAccessible | , |
| GetNativeViewAccessible | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | LRESULT | , |
| OnGetObject | , | ||
| (UINT, WPARAM, LPARAM) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | ui::AXFragmentRootDelegateWin * | , |
| GetAxFragmentRootDelegate | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnComposeBegin | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnComposeChange | , | ||
| (const std::u16string &, int) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnComposeCommit | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnComposeEnd | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnDpiScale | , | ||
| (unsigned int) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnImeComposition | , | ||
| (UINT const, WPARAM const, LPARAM const) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnKey | , | ||
| (int, int, int, char32_t, bool, bool, KeyEventCallback) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnPaint | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnPointerDown | , | ||
| (double, double, FlutterPointerDeviceKind, int32_t, UINT) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnPointerLeave | , | ||
| (double, double, FlutterPointerDeviceKind, int32_t) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnPointerMove | , | ||
| (double, double, FlutterPointerDeviceKind, int32_t, int) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnPointerUp | , | ||
| (double, double, FlutterPointerDeviceKind, int32_t, UINT) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnResize | , | ||
| (unsigned int, unsigned int) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnScroll | , | ||
| (double, double, FlutterPointerDeviceKind, int32_t) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnText | , | ||
| (const std::u16string &) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnThemeChange | , | ||
| () | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnUpdateSemanticsEnabled | , | ||
| (bool) | , | ||
| (override) | |||
| ) |
| flutter::testing::MockWindow::MOCK_METHOD | ( | void | , |
| OnWindowStateEvent | , | ||
| (WindowStateEvent) | , | ||
| (override) | |||
| ) |
| void flutter::testing::MockWindow::SetDirectManipulationOwner | ( | std::unique_ptr< DirectManipulationOwner > | owner | ) |
Definition at line 31 of file mock_window.cc.
References flutter::FlutterWindow::direct_manipulation_owner_.
|
protectedvirtual |
Reimplemented from flutter::FlutterWindow.
Definition at line 24 of file mock_window.cc.
References flutter::testing::kWmResultDefault.