Flutter Engine
The Flutter Engine
Namespaces | Functions | Variables
stub_flutter_windows_api.cc File Reference
#include "flutter/shell/platform/windows/client_wrapper/testing/stub_flutter_windows_api.h"

Go to the source code of this file.

Namespaces

namespace  flutter
 
namespace  flutter::testing
 

Functions

FlutterDesktopViewControllerRef FlutterDesktopViewControllerCreate (int width, int height, FlutterDesktopEngineRef engine)
 
void FlutterDesktopViewControllerDestroy (FlutterDesktopViewControllerRef controller)
 
FlutterDesktopViewId FlutterDesktopViewControllerGetViewId (FlutterDesktopViewControllerRef controller)
 
FlutterDesktopEngineRef FlutterDesktopViewControllerGetEngine (FlutterDesktopViewControllerRef controller)
 
FlutterDesktopViewRef FlutterDesktopViewControllerGetView (FlutterDesktopViewControllerRef controller)
 
void FlutterDesktopViewControllerForceRedraw (FlutterDesktopViewControllerRef controller)
 
bool FlutterDesktopViewControllerHandleTopLevelWindowProc (FlutterDesktopViewControllerRef controller, HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
 
FlutterDesktopEngineRef FlutterDesktopEngineCreate (const FlutterDesktopEngineProperties *engine_properties)
 
bool FlutterDesktopEngineDestroy (FlutterDesktopEngineRef engine_ref)
 
bool FlutterDesktopEngineRun (FlutterDesktopEngineRef engine, const char *entry_point)
 
uint64_t FlutterDesktopEngineProcessMessages (FlutterDesktopEngineRef engine)
 
void FlutterDesktopEngineSetNextFrameCallback (FlutterDesktopEngineRef engine, VoidCallback callback, void *user_data)
 
void FlutterDesktopEngineReloadSystemFonts (FlutterDesktopEngineRef engine)
 
FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar (FlutterDesktopEngineRef engine, const char *plugin_name)
 
FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger (FlutterDesktopEngineRef engine)
 
FlutterDesktopTextureRegistrarRef FlutterDesktopEngineGetTextureRegistrar (FlutterDesktopEngineRef engine)
 
HWND FlutterDesktopViewGetHWND (FlutterDesktopViewRef controller)
 
IDXGIAdapter * FlutterDesktopViewGetGraphicsAdapter (FlutterDesktopViewRef view)
 
bool FlutterDesktopEngineProcessExternalWindowMessage (FlutterDesktopEngineRef engine, HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
 
void FlutterDesktopEngineRegisterPlatformViewType (FlutterDesktopEngineRef engine, const char *view_type_name, FlutterPlatformViewTypeEntry view_type)
 
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView (FlutterDesktopPluginRegistrarRef controller)
 
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetViewById (FlutterDesktopPluginRegistrarRef controller, FlutterDesktopViewId view_id)
 
void FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate (FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate, void *user_data)
 
void FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate (FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate)
 

Variables

static flutter::testing::StubFlutterWindowsApis_stub_implementation
 

Function Documentation

◆ FlutterDesktopEngineCreate()

FlutterDesktopEngineRef FlutterDesktopEngineCreate ( const FlutterDesktopEngineProperties engine_properties)

Definition at line 94 of file stub_flutter_windows_api.cc.

95 {
97 return s_stub_implementation->EngineCreate(*engine_properties);
98 }
99 return nullptr;
100}
virtual FlutterDesktopEngineRef EngineCreate(const FlutterDesktopEngineProperties &engine_properties)
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineDestroy()

bool FlutterDesktopEngineDestroy ( FlutterDesktopEngineRef  engine_ref)

Definition at line 102 of file stub_flutter_windows_api.cc.

102 {
105 }
106 return true;
107}

◆ FlutterDesktopEngineGetMessenger()

FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger ( FlutterDesktopEngineRef  engine)

Definition at line 145 of file stub_flutter_windows_api.cc.

146 {
147 // The stub ignores this, so just return an arbitrary non-zero value.
148 return reinterpret_cast<FlutterDesktopMessengerRef>(2);
149}

◆ FlutterDesktopEngineGetPluginRegistrar()

FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar ( FlutterDesktopEngineRef  engine,
const char *  plugin_name 
)

Definition at line 138 of file stub_flutter_windows_api.cc.

140 {
141 // The stub ignores this, so just return an arbitrary non-zero value.
142 return reinterpret_cast<FlutterDesktopPluginRegistrarRef>(1);
143}

◆ FlutterDesktopEngineGetTextureRegistrar()

FlutterDesktopTextureRegistrarRef FlutterDesktopEngineGetTextureRegistrar ( FlutterDesktopEngineRef  engine)

Definition at line 151 of file stub_flutter_windows_api.cc.

152 {
153 // The stub ignores this, so just return an arbitrary non-zero value.
154 return reinterpret_cast<FlutterDesktopTextureRegistrarRef>(3);
155}
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef

◆ FlutterDesktopEngineProcessExternalWindowMessage()

bool FlutterDesktopEngineProcessExternalWindowMessage ( FlutterDesktopEngineRef  engine,
HWND  hwnd,
UINT  message,
WPARAM  wparam,
LPARAM  lparam,
LRESULT result 
)

Definition at line 171 of file stub_flutter_windows_api.cc.

177 {
180 engine, hwnd, message, wparam, lparam, result);
181 }
182 return false;
183}
virtual bool EngineProcessExternalWindowMessage(FlutterDesktopEngineRef engine, HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
FlutterEngine engine
Definition: main.cc:68
GAsyncResult * result
Win32Message message

◆ FlutterDesktopEngineProcessMessages()

uint64_t FlutterDesktopEngineProcessMessages ( FlutterDesktopEngineRef  engine)

Definition at line 117 of file stub_flutter_windows_api.cc.

117 {
120 }
121 return 0;
122}

◆ FlutterDesktopEngineRegisterPlatformViewType()

void FlutterDesktopEngineRegisterPlatformViewType ( FlutterDesktopEngineRef  engine,
const char *  view_type_name,
FlutterPlatformViewTypeEntry  view_type 
)

Definition at line 185 of file stub_flutter_windows_api.cc.

188 {
191 view_type);
192 }
193}
virtual void EngineRegisterPlatformViewType(const char *view_type_name, FlutterPlatformViewTypeEntry view_type)

◆ FlutterDesktopEngineReloadSystemFonts()

void FlutterDesktopEngineReloadSystemFonts ( FlutterDesktopEngineRef  engine)

◆ FlutterDesktopEngineRun()

bool FlutterDesktopEngineRun ( FlutterDesktopEngineRef  engine,
const char *  entry_point 
)

Definition at line 109 of file stub_flutter_windows_api.cc.

110 {
112 return s_stub_implementation->EngineRun(entry_point);
113 }
114 return true;
115}
virtual bool EngineRun(const char *entry_point)

◆ FlutterDesktopEngineSetNextFrameCallback()

void FlutterDesktopEngineSetNextFrameCallback ( FlutterDesktopEngineRef  engine,
VoidCallback  callback,
void *  user_data 
)

Definition at line 124 of file stub_flutter_windows_api.cc.

126 {
129 }
130}
virtual void EngineSetNextFrameCallback(VoidCallback callback, void *user_data)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
void * user_data

◆ FlutterDesktopPluginRegistrarGetView()

FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView ( FlutterDesktopPluginRegistrarRef  controller)

Definition at line 195 of file stub_flutter_windows_api.cc.

196 {
199 }
200 return nullptr;
201}
virtual FlutterDesktopViewRef PluginRegistrarGetView()

◆ FlutterDesktopPluginRegistrarGetViewById()

FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetViewById ( FlutterDesktopPluginRegistrarRef  controller,
FlutterDesktopViewId  view_id 
)

Definition at line 203 of file stub_flutter_windows_api.cc.

205 {
208 }
209 return nullptr;
210}
virtual FlutterDesktopViewRef PluginRegistrarGetViewById(FlutterDesktopViewId view_id)

◆ FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate()

void FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate ( FlutterDesktopPluginRegistrarRef  registrar,
FlutterDesktopWindowProcCallback  delegate,
void *  user_data 
)

Definition at line 212 of file stub_flutter_windows_api.cc.

215 {
219 user_data);
220 }
221}
virtual void PluginRegistrarRegisterTopLevelWindowProcDelegate(FlutterDesktopWindowProcCallback delegate, void *user_data)

◆ FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate()

void FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate ( FlutterDesktopPluginRegistrarRef  registrar,
FlutterDesktopWindowProcCallback  delegate 
)

Definition at line 223 of file stub_flutter_windows_api.cc.

225 {
229 }
230}
virtual void PluginRegistrarUnregisterTopLevelWindowProcDelegate(FlutterDesktopWindowProcCallback delegate)

◆ FlutterDesktopViewControllerCreate()

FlutterDesktopViewControllerRef FlutterDesktopViewControllerCreate ( int  width,
int  height,
FlutterDesktopEngineRef  engine 
)

Definition at line 38 of file stub_flutter_windows_api.cc.

41 {
44 }
45 return nullptr;
46}
virtual FlutterDesktopViewControllerRef ViewControllerCreate(int width, int height, FlutterDesktopEngineRef engine)
int32_t height
int32_t width

◆ FlutterDesktopViewControllerDestroy()

void FlutterDesktopViewControllerDestroy ( FlutterDesktopViewControllerRef  controller)

◆ FlutterDesktopViewControllerForceRedraw()

void FlutterDesktopViewControllerForceRedraw ( FlutterDesktopViewControllerRef  controller)

◆ FlutterDesktopViewControllerGetEngine()

FlutterDesktopEngineRef FlutterDesktopViewControllerGetEngine ( FlutterDesktopViewControllerRef  controller)

Definition at line 61 of file stub_flutter_windows_api.cc.

62 {
63 // The stub ignores this, so just return an arbitrary non-zero value.
64 return reinterpret_cast<FlutterDesktopEngineRef>(1);
65}

◆ FlutterDesktopViewControllerGetView()

FlutterDesktopViewRef FlutterDesktopViewControllerGetView ( FlutterDesktopViewControllerRef  controller)

Definition at line 67 of file stub_flutter_windows_api.cc.

68 {
69 // The stub ignores this, so just return an arbitrary non-zero value.
70 return reinterpret_cast<FlutterDesktopViewRef>(1);
71}
struct FlutterDesktopView * FlutterDesktopViewRef

◆ FlutterDesktopViewControllerGetViewId()

FlutterDesktopViewId FlutterDesktopViewControllerGetViewId ( FlutterDesktopViewControllerRef  controller)

Definition at line 55 of file stub_flutter_windows_api.cc.

56 {
57 // The stub ignores this, so just return an arbitrary non-zero value.
58 return static_cast<FlutterDesktopViewId>(1);
59}
int64_t FlutterDesktopViewId

◆ FlutterDesktopViewControllerHandleTopLevelWindowProc()

bool FlutterDesktopViewControllerHandleTopLevelWindowProc ( FlutterDesktopViewControllerRef  controller,
HWND  hwnd,
UINT  message,
WPARAM  wparam,
LPARAM  lparam,
LRESULT result 
)

Definition at line 80 of file stub_flutter_windows_api.cc.

86 {
89 hwnd, message, wparam, lparam, result);
90 }
91 return false;
92}
virtual bool ViewControllerHandleTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)

◆ FlutterDesktopViewGetGraphicsAdapter()

IDXGIAdapter * FlutterDesktopViewGetGraphicsAdapter ( FlutterDesktopViewRef  view)

Definition at line 164 of file stub_flutter_windows_api.cc.

164 {
167 }
168 return nullptr;
169}

◆ FlutterDesktopViewGetHWND()

HWND FlutterDesktopViewGetHWND ( FlutterDesktopViewRef  controller)

Definition at line 157 of file stub_flutter_windows_api.cc.

157 {
160 }
161 return reinterpret_cast<HWND>(-1);
162}

Variable Documentation

◆ s_stub_implementation

flutter::testing::StubFlutterWindowsApi* s_stub_implementation
static

Definition at line 7 of file stub_flutter_windows_api.cc.