Flutter Engine
flutter::testing::MockWin32Window Class Reference

Mock for the Win32Window base class. More...

#include <mock_win32_window.h>

Inheritance diagram for flutter::testing::MockWin32Window:
flutter::Win32Window

Public Member Functions

 MockWin32Window ()
 
virtual ~MockWin32Window ()
 
 MockWin32Window (MockWin32Window const &)=delete
 
MockWin32Windowoperator= (MockWin32Window const &)=delete
 
UINT GetDpi ()
 
void InjectWindowMessage (UINT const message, WPARAM const wparam, LPARAM const lparam)
 
 MOCK_METHOD1 (OnDpiScale, void(unsigned int))
 
 MOCK_METHOD2 (OnResize, void(unsigned int, unsigned int))
 
 MOCK_METHOD2 (OnPointerMove, void(double, double))
 
 MOCK_METHOD3 (OnPointerDown, void(double, double, UINT))
 
 MOCK_METHOD3 (OnPointerUp, void(double, double, UINT))
 
 MOCK_METHOD0 (OnPointerLeave, void())
 
 MOCK_METHOD0 (OnSetCursor, void())
 
 MOCK_METHOD1 (OnText, void(const std::u16string &))
 
 MOCK_METHOD4 (OnKey, void(int, int, int, char32_t))
 
 MOCK_METHOD2 (OnScroll, void(double, double))
 
- Public Member Functions inherited from flutter::Win32Window
 Win32Window ()
 
virtual ~Win32Window ()
 
void InitializeChild (const char *title, unsigned int width, unsigned int height)
 
HWND GetWindowHandle ()
 

Additional Inherited Members

- Protected Member Functions inherited from flutter::Win32Window
std::wstring NarrowToWide (const char *source)
 
WNDCLASS RegisterWindowClass (std::wstring &title)
 
LRESULT HandleMessage (UINT const message, WPARAM const wparam, LPARAM const lparam) noexcept
 
LRESULT HandleDpiChange (HWND hWnd, WPARAM wParam, LPARAM lParam, bool top_level)
 
virtual void OnDpiScale (UINT dpi)=0
 
virtual void OnResize (UINT width, UINT height)=0
 
virtual void OnPointerMove (double x, double y)=0
 
virtual void OnPointerDown (double x, double y, UINT button)=0
 
virtual void OnPointerUp (double x, double y, UINT button)=0
 
virtual void OnPointerLeave ()=0
 
virtual void OnSetCursor ()=0
 
virtual void OnText (const std::u16string &text)=0
 
virtual void OnKey (int key, int scancode, int action, char32_t character)=0
 
virtual void OnScroll (double delta_x, double delta_y)=0
 
UINT GetCurrentDPI ()
 
UINT GetCurrentWidth ()
 
UINT GetCurrentHeight ()
 
- Static Protected Member Functions inherited from flutter::Win32Window
static LRESULT CALLBACK WndProc (HWND const window, UINT const message, WPARAM const wparam, LPARAM const lparam) noexcept
 

Detailed Description

Mock for the Win32Window base class.

Definition at line 14 of file mock_win32_window.h.

Constructor & Destructor Documentation

◆ MockWin32Window() [1/2]

flutter::testing::MockWin32Window::MockWin32Window ( )

Definition at line 10 of file mock_win32_window.cc.

References ~MockWin32Window().

◆ ~MockWin32Window()

flutter::testing::MockWin32Window::~MockWin32Window ( )
virtualdefault

Referenced by MockWin32Window().

◆ MockWin32Window() [2/2]

flutter::testing::MockWin32Window::MockWin32Window ( MockWin32Window const &  )
delete

Member Function Documentation

◆ GetDpi()

UINT flutter::testing::MockWin32Window::GetDpi ( )

Definition at line 14 of file mock_win32_window.cc.

References flutter::Win32Window::GetCurrentDPI().

Referenced by flutter::testing::TEST().

14  {
15  return GetCurrentDPI();
16 }

◆ InjectWindowMessage()

void flutter::testing::MockWin32Window::InjectWindowMessage ( UINT const  message,
WPARAM const  wparam,
LPARAM const  lparam 
)

Definition at line 18 of file mock_win32_window.cc.

References flutter::Win32Window::HandleMessage().

Referenced by flutter::testing::TEST().

20  {
21  HandleMessage(message, wparam, lparam);
22 }
LRESULT HandleMessage(UINT const message, WPARAM const wparam, LPARAM const lparam) noexcept

◆ MOCK_METHOD0() [1/2]

flutter::testing::MockWin32Window::MOCK_METHOD0 ( OnPointerLeave  ,
void()   
)

◆ MOCK_METHOD0() [2/2]

flutter::testing::MockWin32Window::MOCK_METHOD0 ( OnSetCursor  ,
void()   
)

◆ MOCK_METHOD1() [1/2]

flutter::testing::MockWin32Window::MOCK_METHOD1 ( OnDpiScale  ,
void(unsigned int)   
)

◆ MOCK_METHOD1() [2/2]

flutter::testing::MockWin32Window::MOCK_METHOD1 ( OnText  ,
void(const std::u16string &)   
)

◆ MOCK_METHOD2() [1/3]

flutter::testing::MockWin32Window::MOCK_METHOD2 ( OnResize  ,
void(unsigned int, unsigned int)   
)

◆ MOCK_METHOD2() [2/3]

flutter::testing::MockWin32Window::MOCK_METHOD2 ( OnPointerMove  ,
void(double, double)   
)

◆ MOCK_METHOD2() [3/3]

flutter::testing::MockWin32Window::MOCK_METHOD2 ( OnScroll  ,
void(double, double)   
)

◆ MOCK_METHOD3() [1/2]

flutter::testing::MockWin32Window::MOCK_METHOD3 ( OnPointerDown  ,
void(double, double, UINT)   
)

◆ MOCK_METHOD3() [2/2]

flutter::testing::MockWin32Window::MOCK_METHOD3 ( OnPointerUp  ,
void(double, double, UINT)   
)

◆ MOCK_METHOD4()

flutter::testing::MockWin32Window::MOCK_METHOD4 ( OnKey  ,
void(int, int, int, char32_t)   
)

◆ operator=()

MockWin32Window& flutter::testing::MockWin32Window::operator= ( MockWin32Window const &  )
delete

The documentation for this class was generated from the following files: