Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
stub_flutter_glfw_api.cc File Reference
#include "flutter/shell/platform/glfw/client_wrapper/testing/stub_flutter_glfw_api.h"

Go to the source code of this file.

Namespaces

namespace  flutter
 
namespace  flutter::testing
 

Functions

bool FlutterDesktopInit ()
 
void FlutterDesktopTerminate ()
 
FlutterDesktopWindowControllerRef FlutterDesktopCreateWindow (const FlutterDesktopWindowProperties &window_properties, const FlutterDesktopEngineProperties &engine_properties)
 
void FlutterDesktopDestroyWindow (FlutterDesktopWindowControllerRef controller)
 
void FlutterDesktopWindowSetHoverEnabled (FlutterDesktopWindowRef flutter_window, bool enabled)
 
void FlutterDesktopWindowSetTitle (FlutterDesktopWindowRef flutter_window, const char *title)
 
void FlutterDesktopWindowSetIcon (FlutterDesktopWindowRef flutter_window, uint8_t *pixel_data, int width, int height)
 
void FlutterDesktopWindowGetFrame (FlutterDesktopWindowRef flutter_window, int *x, int *y, int *width, int *height)
 
void FlutterDesktopWindowSetFrame (FlutterDesktopWindowRef flutter_window, int x, int y, int width, int height)
 
void FlutterDesktopWindowSetSizeLimits (FlutterDesktopWindowRef flutter_window, FlutterDesktopSize minimum_size, FlutterDesktopSize maximum_size)
 
double FlutterDesktopWindowGetScaleFactor (FlutterDesktopWindowRef flutter_window)
 
void FlutterDesktopWindowSetPixelRatioOverride (FlutterDesktopWindowRef flutter_window, double pixel_ratio)
 
bool FlutterDesktopRunWindowEventLoopWithTimeout (FlutterDesktopWindowControllerRef controller, uint32_t millisecond_timeout)
 
FlutterDesktopEngineRef FlutterDesktopRunEngine (const FlutterDesktopEngineProperties &properties)
 
void FlutterDesktopRunEngineEventLoopWithTimeout (FlutterDesktopEngineRef engine, uint32_t timeout_milliseconds)
 
bool FlutterDesktopShutDownEngine (FlutterDesktopEngineRef engine_ref)
 
FlutterDesktopWindowRef FlutterDesktopGetWindow (FlutterDesktopWindowControllerRef controller)
 
FlutterDesktopEngineRef FlutterDesktopGetEngine (FlutterDesktopWindowControllerRef controller)
 
FlutterDesktopPluginRegistrarRef FlutterDesktopGetPluginRegistrar (FlutterDesktopEngineRef engine, const char *plugin_name)
 
FlutterDesktopWindowRef FlutterDesktopPluginRegistrarGetWindow (FlutterDesktopPluginRegistrarRef registrar)
 
void FlutterDesktopPluginRegistrarEnableInputBlocking (FlutterDesktopPluginRegistrarRef registrar, const char *channel)
 

Variables

static flutter::testing::StubFlutterGlfwApis_stub_implementation
 

Function Documentation

◆ FlutterDesktopCreateWindow()

FlutterDesktopWindowControllerRef FlutterDesktopCreateWindow ( const FlutterDesktopWindowProperties window_properties,
const FlutterDesktopEngineProperties engine_properties 
)

Definition at line 51 of file stub_flutter_glfw_api.cc.

53 {
55 return s_stub_implementation->CreateWindow(window_properties,
56 engine_properties);
57 }
58 return nullptr;
59}
virtual FlutterDesktopWindowControllerRef CreateWindow(const FlutterDesktopWindowProperties &window_properties, const FlutterDesktopEngineProperties &engine_properties)
static flutter::testing::StubFlutterGlfwApi * s_stub_implementation

◆ FlutterDesktopDestroyWindow()

void FlutterDesktopDestroyWindow ( FlutterDesktopWindowControllerRef  controller)

◆ FlutterDesktopGetEngine()

FlutterDesktopEngineRef FlutterDesktopGetEngine ( FlutterDesktopWindowControllerRef  controller)

Definition at line 173 of file stub_flutter_glfw_api.cc.

174 {
175 // The stub ignores this, so just return an arbitrary non-zero value.
176 return reinterpret_cast<FlutterDesktopEngineRef>(3);
177}

◆ FlutterDesktopGetPluginRegistrar()

FlutterDesktopPluginRegistrarRef FlutterDesktopGetPluginRegistrar ( FlutterDesktopEngineRef  engine,
const char *  plugin_name 
)

Definition at line 179 of file stub_flutter_glfw_api.cc.

181 {
182 // The stub ignores this, so just return an arbitrary non-zero value.
183 return reinterpret_cast<FlutterDesktopPluginRegistrarRef>(2);
184}

◆ FlutterDesktopGetWindow()

FlutterDesktopWindowRef FlutterDesktopGetWindow ( FlutterDesktopWindowControllerRef  controller)

Definition at line 167 of file stub_flutter_glfw_api.cc.

168 {
169 // The stub ignores this, so just return an arbitrary non-zero value.
170 return reinterpret_cast<FlutterDesktopWindowRef>(1);
171}

◆ FlutterDesktopInit()

bool FlutterDesktopInit ( )

Definition at line 38 of file stub_flutter_glfw_api.cc.

38 {
41 }
42 return true;
43}

◆ FlutterDesktopPluginRegistrarEnableInputBlocking()

void FlutterDesktopPluginRegistrarEnableInputBlocking ( FlutterDesktopPluginRegistrarRef  registrar,
const char *  channel 
)

Definition at line 192 of file stub_flutter_glfw_api.cc.

194 {
197 }
198}
virtual void PluginRegistrarEnableInputBlocking(const char *channel)

◆ FlutterDesktopPluginRegistrarGetWindow()

FlutterDesktopWindowRef FlutterDesktopPluginRegistrarGetWindow ( FlutterDesktopPluginRegistrarRef  registrar)

Definition at line 186 of file stub_flutter_glfw_api.cc.

187 {
188 // The stub ignores this, so just return an arbitrary non-zero value.
189 return reinterpret_cast<FlutterDesktopWindowRef>(3);
190}

◆ FlutterDesktopRunEngine()

FlutterDesktopEngineRef FlutterDesktopRunEngine ( const FlutterDesktopEngineProperties properties)

Definition at line 144 of file stub_flutter_glfw_api.cc.

145 {
147 return s_stub_implementation->RunEngine(properties);
148 }
149 return nullptr;
150}
virtual FlutterDesktopEngineRef RunEngine(const FlutterDesktopEngineProperties &properties)

◆ FlutterDesktopRunEngineEventLoopWithTimeout()

void FlutterDesktopRunEngineEventLoopWithTimeout ( FlutterDesktopEngineRef  engine,
uint32_t  timeout_milliseconds 
)

Definition at line 152 of file stub_flutter_glfw_api.cc.

154 {
157 }
158}
virtual void RunEngineEventLoopWithTimeout(uint32_t millisecond_timeout)

◆ FlutterDesktopRunWindowEventLoopWithTimeout()

bool FlutterDesktopRunWindowEventLoopWithTimeout ( FlutterDesktopWindowControllerRef  controller,
uint32_t  millisecond_timeout 
)

Definition at line 134 of file stub_flutter_glfw_api.cc.

136 {
139 millisecond_timeout);
140 }
141 return true;
142}
virtual bool RunWindowEventLoopWithTimeout(uint32_t millisecond_timeout)

◆ FlutterDesktopShutDownEngine()

bool FlutterDesktopShutDownEngine ( FlutterDesktopEngineRef  engine_ref)

Definition at line 160 of file stub_flutter_glfw_api.cc.

160 {
163 }
164 return true;
165}

◆ FlutterDesktopTerminate()

void FlutterDesktopTerminate ( )

Definition at line 45 of file stub_flutter_glfw_api.cc.

◆ FlutterDesktopWindowGetFrame()

void FlutterDesktopWindowGetFrame ( FlutterDesktopWindowRef  flutter_window,
int x,
int y,
int width,
int height 
)

Definition at line 90 of file stub_flutter_glfw_api.cc.

94 {
97 }
98}
virtual void GetWindowFrame(int *x, int *y, int *width, int *height)
double y
double x
int32_t height
int32_t width

◆ FlutterDesktopWindowGetScaleFactor()

double FlutterDesktopWindowGetScaleFactor ( FlutterDesktopWindowRef  flutter_window)

Definition at line 118 of file stub_flutter_glfw_api.cc.

119 {
122 }
123 return 1.0;
124}

◆ FlutterDesktopWindowSetFrame()

void FlutterDesktopWindowSetFrame ( FlutterDesktopWindowRef  flutter_window,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 100 of file stub_flutter_glfw_api.cc.

104 {
107 }
108}
virtual void SetWindowFrame(int x, int y, int width, int height)

◆ FlutterDesktopWindowSetHoverEnabled()

void FlutterDesktopWindowSetHoverEnabled ( FlutterDesktopWindowRef  flutter_window,
bool  enabled 
)

Definition at line 67 of file stub_flutter_glfw_api.cc.

68 {
71 }
72}
virtual void SetHoverEnabled(bool enabled)

◆ FlutterDesktopWindowSetIcon()

void FlutterDesktopWindowSetIcon ( FlutterDesktopWindowRef  flutter_window,
uint8_t *  pixel_data,
int  width,
int  height 
)

Definition at line 81 of file stub_flutter_glfw_api.cc.

84 {
87 }
88}
virtual void SetWindowIcon(uint8_t *pixel_data, int width, int height)

◆ FlutterDesktopWindowSetPixelRatioOverride()

void FlutterDesktopWindowSetPixelRatioOverride ( FlutterDesktopWindowRef  flutter_window,
double  pixel_ratio 
)

Definition at line 126 of file stub_flutter_glfw_api.cc.

128 {
130 return s_stub_implementation->SetPixelRatioOverride(pixel_ratio);
131 }
132}
virtual void SetPixelRatioOverride(double pixel_ratio)

◆ FlutterDesktopWindowSetSizeLimits()

void FlutterDesktopWindowSetSizeLimits ( FlutterDesktopWindowRef  flutter_window,
FlutterDesktopSize  minimum_size,
FlutterDesktopSize  maximum_size 
)

Definition at line 110 of file stub_flutter_glfw_api.cc.

112 {
114 s_stub_implementation->SetSizeLimits(minimum_size, maximum_size);
115 }
116}
virtual void SetSizeLimits(FlutterDesktopSize minimum_size, FlutterDesktopSize maximum_size)

◆ FlutterDesktopWindowSetTitle()

void FlutterDesktopWindowSetTitle ( FlutterDesktopWindowRef  flutter_window,
const char *  title 
)

Definition at line 74 of file stub_flutter_glfw_api.cc.

75 {
78 }
79}
virtual void SetWindowTitle(const char *title)

Variable Documentation

◆ s_stub_implementation

flutter::testing::StubFlutterGlfwApi* s_stub_implementation
static

Definition at line 7 of file stub_flutter_glfw_api.cc.