Flutter Engine
The Flutter Engine
Classes | Typedefs | Functions | Variables
flutter_glfw.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "flutter_export.h"
#include "flutter_messenger.h"
#include "flutter_plugin_registrar.h"

Go to the source code of this file.

Classes

struct  FlutterDesktopSize
 
struct  FlutterDesktopEngineProperties
 
struct  FlutterDesktopWindowProperties
 

Typedefs

typedef struct FlutterDesktopWindowControllerStateFlutterDesktopWindowControllerRef
 
typedef struct FlutterDesktopWindowFlutterDesktopWindowRef
 
typedef struct FlutterDesktopEngineStateFlutterDesktopEngineRef
 

Functions

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

Variables

const int32_t kFlutterDesktopDontCare
 

Typedef Documentation

◆ FlutterDesktopEngineRef

Definition at line 30 of file flutter_glfw.h.

◆ FlutterDesktopWindowControllerRef

Definition at line 24 of file flutter_glfw.h.

◆ FlutterDesktopWindowRef

Definition at line 27 of file flutter_glfw.h.

Function Documentation

◆ FlutterDesktopCreateWindow()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT void FlutterDesktopDestroyWindow ( FlutterDesktopWindowControllerRef  controller)

Definition at line 61 of file stub_flutter_glfw_api.cc.

◆ FlutterDesktopGetEngine()

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()

FLUTTER_EXPORT 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()

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()

FLUTTER_EXPORT bool FlutterDesktopInit ( )

Definition at line 38 of file stub_flutter_glfw_api.cc.

38 {
41 }
42 return true;
43}

◆ FlutterDesktopPluginRegistrarEnableInputBlocking()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT bool FlutterDesktopRunWindowEventLoopWithTimeout ( FlutterDesktopWindowControllerRef  controller,
uint32_t  timeout_milliseconds 
)

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()

FLUTTER_EXPORT bool FlutterDesktopShutDownEngine ( FlutterDesktopEngineRef  engine)

Definition at line 160 of file stub_flutter_glfw_api.cc.

160 {
163 }
164 return true;
165}

◆ FlutterDesktopTerminate()

FLUTTER_EXPORT void FlutterDesktopTerminate ( )

Definition at line 45 of file stub_flutter_glfw_api.cc.

◆ FlutterDesktopWindowGetFrame()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT double FlutterDesktopWindowGetScaleFactor ( FlutterDesktopWindowRef  flutter_window)

Definition at line 118 of file stub_flutter_glfw_api.cc.

119 {
122 }
123 return 1.0;
124}

◆ FlutterDesktopWindowSetFrame()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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()

FLUTTER_EXPORT 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

◆ kFlutterDesktopDontCare

const int32_t kFlutterDesktopDontCare
extern

Definition at line 43 of file flutter_glfw.cc.