Flutter Engine
mock_window_binding_handler.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_
7 
8 #include <windowsx.h>
9 
10 #include "flutter/shell/platform/windows/window_binding_handler.h"
11 #include "gmock/gmock.h"
12 
13 namespace flutter {
14 namespace testing {
15 
16 /// Mock for the |WindowWin32| base class.
18  public:
20  virtual ~MockWindowBindingHandler();
21 
22  // Prevent copying.
25 
29  MOCK_METHOD0(GetDpiScale, float());
30  MOCK_METHOD0(IsVisible, bool());
33  MOCK_METHOD1(UpdateFlutterCursor, void(const std::string& cursor_name));
34  MOCK_METHOD1(OnCursorRectUpdated, void(const Rect& rect));
37  bool(const void* allocation, size_t row_bytes, size_t height));
39 };
40 
41 } // namespace testing
42 } // namespace flutter
43 
44 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_MOCK_WINDOW_BINDING_HANDLER_H_
virtual void SetView(WindowBindingHandlerDelegate *view)=0
MOCK_METHOD1(SetView, void(WindowBindingHandlerDelegate *view))
virtual void OnCursorRectUpdated(const Rect &rect)=0
virtual WindowsRenderTarget GetRenderTarget()=0
virtual void OnWindowResized()=0
std::variant< HWND > WindowsRenderTarget
virtual void UpdateFlutterCursor(const std::string &cursor_name)=0
MOCK_METHOD0(GetRenderTarget, WindowsRenderTarget())
virtual PlatformWindow GetPlatformWindow()=0
virtual bool OnBitmapSurfaceUpdated(const void *allocation, size_t row_bytes, size_t height)=0
int32_t height
virtual void OnResetImeComposing()=0
virtual PointerLocation GetPrimaryPointerLocation()=0
Mock for the |WindowWin32| base class.
virtual PhysicalWindowBounds GetPhysicalWindowBounds()=0
MockWindowBindingHandler & operator=(MockWindowBindingHandler const &)=delete
MOCK_METHOD3(OnBitmapSurfaceUpdated, bool(const void *allocation, size_t row_bytes, size_t height))
virtual float GetDpiScale()=0