Flutter Engine
 
Loading...
Searching...
No Matches
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

◆ 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

References CreateShareWindowForWindow(), flutter::testing::StubFlutterGlfwApi::CreateWindow(), GLFW_FALSE, GLFWClearCanvas(), FlutterDesktopWindowProperties::height, FlutterDesktopWindowProperties::prevent_resize, s_stub_implementation, FlutterDesktopWindowProperties::title, FlutterDesktopWindowProperties::width, and window.

Referenced by flutter::FlutterWindowController::CreateWindow().

◆ FlutterDesktopDestroyWindow()

◆ 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}

References FlutterDesktopWindowControllerState::engine.

Referenced by flutter::FlutterWindowController::GetRegistrarForPlugin().

◆ 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}

References engine.

Referenced by flutter::FlutterEngine::GetRegistrarForPlugin(), and flutter::FlutterWindowController::GetRegistrarForPlugin().

◆ 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}

References FlutterDesktopWindowControllerState::window_wrapper.

Referenced by flutter::FlutterWindowController::CreateWindow().

◆ FlutterDesktopInit()

◆ FlutterDesktopPluginRegistrarEnableInputBlocking()

◆ 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}

References FlutterDesktopPluginRegistrar::engine, FlutterDesktopEngineState::window_controller, and FlutterDesktopWindowControllerState::window_wrapper.

Referenced by flutter::PluginRegistrarGlfw::PluginRegistrarGlfw().

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

References flutter::testing::StubFlutterGlfwApi::RunEngine(), and s_stub_implementation.

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

◆ FlutterDesktopRunEngineEventLoopWithTimeout()

FLUTTER_EXPORT void FlutterDesktopRunEngineEventLoopWithTimeout ( FlutterDesktopEngineRef  engine,
uint32_t  timeout_milliseconds 
)

◆ FlutterDesktopRunWindowEventLoopWithTimeout()

FLUTTER_EXPORT bool FlutterDesktopRunWindowEventLoopWithTimeout ( FlutterDesktopWindowControllerRef  controller,
uint32_t  timeout_milliseconds 
)

◆ FlutterDesktopShutDownEngine()

◆ FlutterDesktopTerminate()

◆ FlutterDesktopWindowGetFrame()

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

◆ FlutterDesktopWindowGetScaleFactor()

◆ FlutterDesktopWindowSetFrame()

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

◆ FlutterDesktopWindowSetHoverEnabled()

◆ FlutterDesktopWindowSetIcon()

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

◆ FlutterDesktopWindowSetPixelRatioOverride()

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

References FlutterDesktopSize::height, s_stub_implementation, flutter::testing::StubFlutterGlfwApi::SetSizeLimits(), FlutterDesktopSize::width, and FlutterDesktopWindow::window.

Referenced by flutter::FlutterWindow::SetSizeLimits().

◆ FlutterDesktopWindowSetTitle()

FLUTTER_EXPORT void FlutterDesktopWindowSetTitle ( FlutterDesktopWindowRef  flutter_window,
const char *  title 
)

Variable Documentation

◆ kFlutterDesktopDontCare

const int32_t kFlutterDesktopDontCare
extern

Definition at line 44 of file flutter_glfw.cc.