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)
 
void FlutterDesktopViewControllerDestroy (FlutterDesktopViewControllerRef controller)
 
FlutterDesktopEngineRef FlutterDesktopViewControllerGetEngine (FlutterDesktopViewControllerRef controller)
 
FlutterDesktopViewRef FlutterDesktopViewControllerGetView (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)
 
FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar (FlutterDesktopEngineRef engine, const char *plugin_name)
 
FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger (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 81 of file stub_flutter_windows_api.cc.

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

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

◆ FlutterDesktopEngineDestroy()

bool FlutterDesktopEngineDestroy ( FlutterDesktopEngineRef  engine_ref)

Definition at line 89 of file stub_flutter_windows_api.cc.

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

89  {
92  }
93  return true;
94 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineGetMessenger()

FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger ( FlutterDesktopEngineRef  engine)

Definition at line 124 of file stub_flutter_windows_api.cc.

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

125  {
126  // The stub ignores this, so just return an arbitrary non-zero value.
127  return reinterpret_cast<FlutterDesktopMessengerRef>(2);
128 }

◆ FlutterDesktopEngineGetPluginRegistrar()

FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar ( FlutterDesktopEngineRef  engine,
const char *  plugin_name 
)

Definition at line 117 of file stub_flutter_windows_api.cc.

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

119  {
120  // The stub ignores this, so just return an arbitrary non-zero value.
121  return reinterpret_cast<FlutterDesktopPluginRegistrarRef>(1);
122 }

◆ FlutterDesktopEngineProcessMessages()

uint64_t FlutterDesktopEngineProcessMessages ( FlutterDesktopEngineRef  engine)

Definition at line 104 of file stub_flutter_windows_api.cc.

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

104  {
105  if (s_stub_implementation) {
107  }
108  return 0;
109 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineReloadSystemFonts()

void FlutterDesktopEngineReloadSystemFonts ( FlutterDesktopEngineRef  engine)

Definition at line 111 of file stub_flutter_windows_api.cc.

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

111  {
112  if (s_stub_implementation) {
114  }
115 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

◆ FlutterDesktopEngineRun()

bool FlutterDesktopEngineRun ( FlutterDesktopEngineRef  engine,
const char *  entry_point 
)

Definition at line 96 of file stub_flutter_windows_api.cc.

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

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

◆ FlutterDesktopPluginRegistrarGetView()

FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView ( FlutterDesktopPluginRegistrarRef  controller)

Definition at line 137 of file stub_flutter_windows_api.cc.

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

138  {
139  // The stub ignores this, so just return an arbitrary non-zero value.
140  return reinterpret_cast<FlutterDesktopViewRef>(1);
141 }
struct FlutterDesktopView * FlutterDesktopViewRef

◆ FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate()

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

Definition at line 143 of file stub_flutter_windows_api.cc.

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

146  {
147  if (s_stub_implementation) {
148  return s_stub_implementation
150  user_data);
151  }
152 }
G_BEGIN_DECLS FlValue gpointer 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 154 of file stub_flutter_windows_api.cc.

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

156  {
157  if (s_stub_implementation) {
158  return s_stub_implementation
160  }
161 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation
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.

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

41  {
44  }
45  return nullptr;
46 }
int32_t height
int32_t width
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation
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

◆ 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 67 of file stub_flutter_windows_api.cc.

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

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

◆ FlutterDesktopViewGetHWND()

HWND FlutterDesktopViewGetHWND ( FlutterDesktopViewRef  controller)

Definition at line 130 of file stub_flutter_windows_api.cc.

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

130  {
131  if (s_stub_implementation) {
133  }
134  return reinterpret_cast<HWND>(-1);
135 }
static flutter::testing::StubFlutterWindowsApi * s_stub_implementation

Variable Documentation

◆ s_stub_implementation