Flutter Engine
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

 flutter
 
 flutter::testing
 

Functions

FlutterDesktopViewControllerRef FlutterDesktopViewControllerCreate (int width, int height, FlutterDesktopEngineRef engine)
 WINUWP. More...
 
void FlutterDesktopViewControllerDestroy (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 FlutterDesktopEngineReloadSystemFonts (FlutterDesktopEngineRef engine)
 
void FlutterDesktopEngineReloadPlatformBrightness (FlutterDesktopEngineRef engine)
 
FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar (FlutterDesktopEngineRef engine, const char *plugin_name)
 
FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger (FlutterDesktopEngineRef engine)
 
FlutterDesktopTextureRegistrarRef FlutterDesktopEngineGetTextureRegistrar (FlutterDesktopEngineRef engine)
 
HWND FlutterDesktopViewGetHWND (FlutterDesktopViewRef controller)
 
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView (FlutterDesktopPluginRegistrarRef controller)
 
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 84 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::FlutterEngine().

85  {
87  return s_stub_implementation->EngineCreate(*engine_properties);
88  }
89  return nullptr;
90 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation
virtual FlutterDesktopEngineRef EngineCreate(const FlutterDesktopEngineProperties &engine_properties)

◆ FlutterDesktopEngineDestroy()

bool FlutterDesktopEngineDestroy ( FlutterDesktopEngineRef  engine_ref)

Definition at line 92 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::Run().

92  {
95  }
96  return true;
97 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineGetMessenger()

FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger ( FlutterDesktopEngineRef  engine)

Definition at line 134 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::FlutterEngine().

135  {
136  // The stub ignores this, so just return an arbitrary non-zero value.
137  return reinterpret_cast<FlutterDesktopMessengerRef>(2);
138 }

◆ FlutterDesktopEngineGetPluginRegistrar()

FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar ( FlutterDesktopEngineRef  engine,
const char *  plugin_name 
)

Definition at line 127 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::ReloadPlatformBrightness().

129  {
130  // The stub ignores this, so just return an arbitrary non-zero value.
131  return reinterpret_cast<FlutterDesktopPluginRegistrarRef>(1);
132 }

◆ FlutterDesktopEngineGetTextureRegistrar()

FlutterDesktopTextureRegistrarRef FlutterDesktopEngineGetTextureRegistrar ( FlutterDesktopEngineRef  engine)

Definition at line 140 of file stub_flutter_windows_api.cc.

141  {
142  // The stub ignores this, so just return an arbitrary non-zero value.
143  return reinterpret_cast<FlutterDesktopTextureRegistrarRef>(3);
144 }
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef

◆ FlutterDesktopEngineProcessMessages()

uint64_t FlutterDesktopEngineProcessMessages ( FlutterDesktopEngineRef  engine)

Definition at line 107 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::ProcessMessages().

107  {
108  if (s_stub_implementation) {
110  }
111  return 0;
112 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineReloadPlatformBrightness()

void FlutterDesktopEngineReloadPlatformBrightness ( FlutterDesktopEngineRef  engine)

Definition at line 120 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::ReloadPlatformBrightness().

121  {
122  if (s_stub_implementation) {
124  }
125 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineReloadSystemFonts()

void FlutterDesktopEngineReloadSystemFonts ( FlutterDesktopEngineRef  engine)

Definition at line 114 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::ReloadSystemFonts().

114  {
115  if (s_stub_implementation) {
117  }
118 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineRun()

bool FlutterDesktopEngineRun ( FlutterDesktopEngineRef  engine,
const char *  entry_point 
)

Definition at line 99 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterEngine::Run().

100  {
101  if (s_stub_implementation) {
102  return s_stub_implementation->EngineRun(entry_point);
103  }
104  return true;
105 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation
virtual bool EngineRun(const char *entry_point)

◆ FlutterDesktopPluginRegistrarGetView()

FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView ( FlutterDesktopPluginRegistrarRef  controller)

Definition at line 153 of file stub_flutter_windows_api.cc.

Referenced by flutter::PluginRegistrarWindows::PluginRegistrarWindows().

154  {
155  // The stub ignores this, so just return an arbitrary non-zero value.
156  return reinterpret_cast<FlutterDesktopViewRef>(1);
157 }
struct FlutterDesktopView * FlutterDesktopViewRef

◆ FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate()

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

Definition at line 159 of file stub_flutter_windows_api.cc.

Referenced by flutter::PluginRegistrarWindows::RegisterTopLevelWindowProcDelegate().

162  {
163  if (s_stub_implementation) {
164  return s_stub_implementation
166  user_data);
167  }
168 }
void * user_data
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation
virtual void PluginRegistrarRegisterTopLevelWindowProcDelegate(FlutterDesktopWindowProcCallback delegate, void *user_data)

◆ FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate()

void FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate ( FlutterDesktopPluginRegistrarRef  registrar,
FlutterDesktopWindowProcCallback  delegate 
)

Definition at line 170 of file stub_flutter_windows_api.cc.

Referenced by flutter::PluginRegistrarWindows::UnregisterTopLevelWindowProcDelegate().

172  {
173  if (s_stub_implementation) {
174  return s_stub_implementation
176  }
177 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation
virtual void PluginRegistrarUnregisterTopLevelWindowProcDelegate(FlutterDesktopWindowProcCallback delegate)

◆ FlutterDesktopViewControllerCreate()

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

WINUWP.

Definition at line 38 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterViewController::FlutterViewController().

41  {
44  }
45  return nullptr;
46 }
int32_t width
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation
int32_t height
virtual FlutterDesktopViewControllerRef ViewControllerCreate(int width, int height, FlutterDesktopEngineRef engine)

◆ FlutterDesktopViewControllerDestroy()

void FlutterDesktopViewControllerDestroy ( FlutterDesktopViewControllerRef  controller)

Definition at line 48 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterViewController::~FlutterViewController().

49  {
52  }
53 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopViewControllerForceRedraw()

void FlutterDesktopViewControllerForceRedraw ( FlutterDesktopViewControllerRef  controller)

Definition at line 67 of file stub_flutter_windows_api.cc.

68  {}

◆ FlutterDesktopViewControllerGetEngine()

FlutterDesktopEngineRef FlutterDesktopViewControllerGetEngine ( 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 reinterpret_cast<FlutterDesktopEngineRef>(1);
59 }

◆ FlutterDesktopViewControllerGetView()

FlutterDesktopViewRef FlutterDesktopViewControllerGetView ( FlutterDesktopViewControllerRef  controller)

Definition at line 61 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterViewController::FlutterViewController().

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

◆ FlutterDesktopViewControllerHandleTopLevelWindowProc()

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

Definition at line 70 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterViewController::HandleTopLevelWindowProc().

76  {
79  hwnd, message, wparam, lparam, result);
80  }
81  return false;
82 }
virtual bool ViewControllerHandleTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
GAsyncResult * result
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopViewGetHWND()

HWND FlutterDesktopViewGetHWND ( FlutterDesktopViewRef  controller)

Definition at line 146 of file stub_flutter_windows_api.cc.

Referenced by flutter::FlutterView::GetNativeWindow().

146  {
147  if (s_stub_implementation) {
149  }
150  return reinterpret_cast<HWND>(-1);
151 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

Variable Documentation

◆ s_stub_implementation