58 std::unique_ptr<FlutterDesktopEngineState>
engine;
64 std::vector<std::unique_ptr<flutter::KeyboardHookHandler>>
165 void AddRef() { ref_count_.fetch_add(1); }
172 int32_t old_count = ref_count_.fetch_sub(1);
173 if (old_count <= 1) {
184 std::scoped_lock lock(mutex_);
201 std::atomic<int32_t> ref_count_ = 0;
216 return messenger->
GetEngine() !=
nullptr;
233 glfwGetWindowUserPointer(
window));
241#if defined(__linux__)
242 glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
243 glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
244 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
246 GLFWwindow* share_window = glfwCreateWindow(1, 1,
"", NULL,
window);
247 glfwDefaultWindowHints();
267 auto* primary_monitor = glfwGetPrimaryMonitor();
268 if (primary_monitor ==
nullptr) {
271 auto* primary_monitor_mode = glfwGetVideoMode(primary_monitor);
272 int primary_monitor_width_mm;
273 glfwGetMonitorPhysicalSize(primary_monitor, &primary_monitor_width_mm,
275 if (primary_monitor_width_mm == 0) {
278 return primary_monitor_mode->width / (primary_monitor_width_mm / 25.4);
286 double dpi = controller->
window_wrapper->pixels_per_screen_coordinate *
297 event.pixel_ratio = std::max(dpi /
kDpPerInch, 1.0);
299 event.pixel_ratio = controller->
window_wrapper->pixel_ratio_override;
317 ->event_loop->RunsTasksOnCurrentThread();
320 [](
FlutterTask task, uint64_t target_time_nanos,
void* state) ->
void {
322 task, target_time_nanos);
334 controller->window_wrapper->pixels_per_screen_coordinate =
338 controller->window_wrapper->skip_next_window_refresh =
true;
344 if (controller->window_wrapper->skip_next_window_refresh) {
345 controller->window_wrapper->skip_next_window_refresh =
false;
350 int width_px, height_px;
351 glfwGetFramebufferSize(
window, &width_px, &height_px);
352 if (width_px > 0 && height_px > 0) {
366 if (!controller->pointer_currently_added &&
370 event.x = event_data.
x;
371 event.y = event_data.
y;
376 if (controller->pointer_currently_added &&
385 std::chrono::duration_cast<std::chrono::microseconds>(
386 std::chrono::high_resolution_clock::now().time_since_epoch())
393 double pixels_per_coordinate =
394 controller->window_wrapper->pixels_per_screen_coordinate;
395 event.x *= pixels_per_coordinate;
396 event.y *= pixels_per_coordinate;
397 event.scroll_delta_x *= pixels_per_coordinate;
398 event.scroll_delta_y *= pixels_per_coordinate;
406 controller->pointer_currently_added =
true;
408 controller->pointer_currently_added =
false;
410 controller->pointer_currently_down =
true;
412 controller->pointer_currently_down =
false;
420 glfwGetCursorPos(
window, &event_data->
x, &event_data->
y);
464 if (
key == GLFW_MOUSE_BUTTON_LEFT) {
466 }
else if (
key == GLFW_MOUSE_BUTTON_RIGHT) {
473 controller->buttons = (
action == GLFW_PRESS) ? controller->buttons | button
474 : controller->buttons & ~button;
485 if (!hover_enabled) {
486 glfwSetCursorPosCallback(
window, (controller->buttons != 0)
494 glfwSetCursorEnterCallback(
510 const int kScrollOffsetMultiplier = 20;
511 event.scroll_delta_x = delta_x * kScrollOffsetMultiplier;
512 event.scroll_delta_y = -delta_y * kScrollOffsetMultiplier;
538 glfwSetCursorEnterCallback(
window,
540 glfwSetCursorPosCallback(
window,
558 glfwSetKeyCallback(
window,
nullptr);
559 glfwSetCharCallback(
window,
nullptr);
560 glfwSetMouseButtonCallback(
window,
nullptr);
561 glfwSetScrollCallback(
window,
nullptr);
571 std::cerr <<
"Invalid message size received. Expected: "
603 if (!window_controller) {
606 glfwMakeContextCurrent(window_controller->
window.get());
615 if (!window_controller) {
627 if (!window_controller) {
630 glfwMakeContextCurrent(
nullptr);
639 if (!window_controller) {
642 glfwSwapBuffers(window_controller->
window.get());
653 return reinterpret_cast<void*
>(glfwGetProcAddress(
name));
665 glfwMakeContextCurrent(
window);
667 glClearColor(236.0f / 255.0f, 239.0f / 255.0f, 241.0f / 255.0f, 0.0f);
668 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
671 glfwMakeContextCurrent(
nullptr);
675 std::cerr <<
"GLFW error " << error_code <<
": " << description << std::endl;
681 if (aot_data_path.empty()) {
683 <<
"Attempted to load AOT data, but no aot_data_path was provided."
687 std::string path_string = aot_data_path.string();
688 if (!std::filesystem::exists(aot_data_path)) {
689 std::cerr <<
"Can't load AOT data from " << path_string <<
"; no such file."
695 source.
elf_path = path_string.c_str();
699 std::cerr <<
"Failed to load AOT data from: " << path_string << std::endl;
715 std::unique_ptr<flutter::EventLoop> event_loop) {
719 std::vector<const char*>
argv = {
"placeholder"};
725 std::filesystem::path assets_path =
726 std::filesystem::u8path(engine_properties.
assets_path);
727 std::filesystem::path icu_path =
729 std::filesystem::path aot_library_path =
731 if (assets_path.is_relative() || icu_path.is_relative() ||
732 (!aot_library_path.empty() && aot_library_path.is_relative())) {
734 std::filesystem::path executable_location =
736 if (executable_location.empty()) {
737 std::cerr <<
"Unable to find executable location to resolve paths."
741 assets_path = std::filesystem::path(executable_location) / assets_path;
742 icu_path = std::filesystem::path(executable_location) / icu_path;
743 if (!aot_library_path.empty()) {
745 std::filesystem::path(executable_location) / aot_library_path;
749 engine_state->
event_loop = std::move(event_loop);
769 const std::string assets_path_string = assets_path.string();
770 const std::string icu_path_string = icu_path.string();
773 args.assets_path = assets_path_string.c_str();
774 args.icu_data_path = icu_path_string.c_str();
775 args.command_line_argc =
static_cast<int>(
argv.size());
778 args.custom_task_runners = &task_runners;
783 std::cerr <<
"Unable to start engine without AOT data." << std::endl;
793 std::cerr <<
"Failed to start Flutter engine: error " << result
797 engine_state->flutter_engine =
engine;
803 std::vector<flutter::LanguageInfo> languages =
805 std::vector<FlutterLocale> flutter_locales =
808 std::vector<const FlutterLocale*> flutter_locale_list;
809 flutter_locale_list.reserve(flutter_locales.size());
810 std::transform(flutter_locales.begin(), flutter_locales.end(),
811 std::back_inserter(flutter_locale_list),
812 [](
const auto& arg) ->
const auto* { return &arg; });
814 state->flutter_engine, flutter_locale_list.data(),
815 flutter_locale_list.size());
817 std::cerr <<
"Failed to set up Flutter locales." << std::endl;
834 std::make_unique<flutter::IncomingMessageDispatcher>(
838 state->
plugin_registrar = std::make_unique<FlutterDesktopPluginRegistrar>();
863 auto state = std::make_unique<FlutterDesktopWindowControllerState>();
869#if defined(__linux__)
870 glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
873 glfwCreateWindow(window_properties.
width, window_properties.
height,
874 window_properties.
title, NULL, NULL),
876 glfwDefaultWindowHints();
877 GLFWwindow*
window = state->window.get();
882 glfwSetWindowUserPointer(
window, state.get());
888 state->engine = std::make_unique<FlutterDesktopEngineState>();
889 state->engine->window_controller = state.get();
892 auto event_loop = std::make_unique<flutter::GLFWEventLoop>(
893 std::this_thread::get_id(),
894 [engine_state = state->engine.get()](
const auto* task) {
895 if (FlutterEngineRunTask(engine_state->flutter_engine, task) !=
897 std::cerr <<
"Could not post an engine task." << std::endl;
903 std::move(event_loop))) {
908 state->window_wrapper = std::make_unique<FlutterDesktopWindow>();
909 state->window_wrapper->window =
window;
912 auto internal_plugin_messenger =
913 state->engine->internal_plugin_registrar->messenger();
914 state->keyboard_hook_handlers.push_back(
915 std::make_unique<flutter::KeyEventHandler>(internal_plugin_messenger));
916 state->keyboard_hook_handlers.push_back(
917 std::make_unique<flutter::TextInputPlugin>(internal_plugin_messenger));
921 int width_px, height_px;
922 glfwGetFramebufferSize(
window, &width_px, &height_px);
930 return state.release();
934 controller->
engine->messenger->SetEngine(
nullptr);
936 controller->
engine->plugin_registrar.get();
953 glfwSetWindowTitle(
window, title);
961 glfwSetWindowIcon(flutter_window->
window, pixel_data ? 1 : 0, &
image);
969 glfwGetWindowPos(flutter_window->
window,
x,
y);
973 int frame_left, frame_top, frame_right, frame_bottom;
974 glfwGetWindowFrameSize(flutter_window->
window, &frame_left, &frame_top,
975 &frame_right, &frame_bottom);
983 *
width += frame_left + frame_right;
986 *
height += frame_top + frame_bottom;
997 int frame_left, frame_top, frame_right, frame_bottom;
998 glfwGetWindowFrameSize(flutter_window->
window, &frame_left, &frame_top,
999 &frame_right, &frame_bottom);
1000 glfwSetWindowPos(flutter_window->
window,
x + frame_left,
y + frame_top);
1001 glfwSetWindowSize(flutter_window->
window,
width - frame_left - frame_right,
1002 height - frame_top - frame_bottom);
1012 double pixel_ratio) {
1015 int width_px, height_px;
1016 glfwGetFramebufferSize(flutter_window->
window, &width_px, &height_px);
1017 if (width_px > 0 && height_px > 0) {
1026 glfwSetWindowSizeLimits(flutter_window->
window, minimum_size.
width,
1033 uint32_t timeout_milliseconds) {
1035 timeout_milliseconds);
1036 return !glfwWindowShouldClose(controller->
window.get());
1049 return controller->
engine.get();
1054 const char* plugin_name) {
1058 return engine->plugin_registrar.get();
1063 auto engine_state = std::make_unique<FlutterDesktopEngineState>();
1065 auto event_loop = std::make_unique<flutter::HeadlessEventLoop>(
1066 std::this_thread::get_id(),
1067 [state = engine_state.get()](
const auto* task) {
1068 if (FlutterEngineRunTask(state->flutter_engine, task) != kSuccess) {
1069 std::cerr <<
"Could not post an engine task." << std::endl;
1074 std::move(event_loop))) {
1079 return engine_state.release();
1084 uint32_t timeout_milliseconds) {
1085 std::chrono::nanoseconds wait_duration =
1086 timeout_milliseconds == 0
1087 ? std::chrono::nanoseconds::max()
1088 : std::chrono::milliseconds(timeout_milliseconds);
1089 engine->event_loop->WaitForEvents(wait_duration);
1128 const size_t message_size,
1132 if (reply !=
nullptr &&
user_data !=
nullptr) {
1137 std::cout <<
"Failed to create response handle\n";
1151 messenger->
GetEngine()->flutter_engine, &platform_message);
1153 if (response_handle !=
nullptr) {
1155 messenger->
GetEngine()->flutter_engine, response_handle);
1164 const size_t message_size) {
1166 message_size,
nullptr,
nullptr);
1172 const uint8_t*
data,
1173 size_t data_length) {
1175 messenger->
GetEngine()->flutter_engine, handle,
data, data_length);
1188 std::cerr <<
"GLFW Texture support is not implemented yet." << std::endl;
1195 std::cerr <<
"GLFW Texture support is not implemented yet." << std::endl;
1204 std::cerr <<
"GLFW Texture support is not implemented yet." << std::endl;
1210 std::cerr <<
"GLFW Texture support is not implemented yet." << std::endl;
FlutterEngineResult FlutterEngineRun(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Initialize and run a Flutter engine instance and return a handle to it. This is a convenience method ...
FlutterEngineResult FlutterEngineUpdateLocales(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterLocale **locales, size_t locales_count)
Notify a running engine instance that the locale has been updated. The preferred locale must be the f...
FlutterEngineResult FlutterEngineSendWindowMetricsEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterWindowMetricsEvent *flutter_metrics)
FlutterEngineResult FlutterEngineShutdown(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Shuts down a Flutter engine instance. The engine handle is no longer valid for any calls in the embed...
FlutterEngineResult FlutterPlatformMessageCreateResponseHandle(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterDataCallback data_callback, void *user_data, FlutterPlatformMessageResponseHandle **response_out)
Creates a platform message response handle that allows the embedder to set a native callback for a re...
FlutterEngineResult FlutterEngineCollectAOTData(FlutterEngineAOTData data)
Collects the AOT data.
FlutterEngineResult FlutterEngineSendPlatformMessage(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessage *flutter_message)
bool FlutterEngineRunsAOTCompiledDartCode(void)
Returns if the Flutter engine instance will run AOT compiled Dart code. This call has no threading re...
FlutterEngineResult FlutterEngineSendPointerEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPointerEvent *pointers, size_t events_count)
FlutterEngineResult FlutterEngineSendPlatformMessageResponse(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
Send a response from the native side to a platform message from the Dart Flutter application.
FlutterEngineResult FlutterPlatformMessageReleaseResponseHandle(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterPlatformMessageResponseHandle *response)
Collects the handle created using FlutterPlatformMessageCreateResponseHandle.
FlutterEngineResult FlutterEngineCreateAOTData(const FlutterEngineAOTDataSource *source, FlutterEngineAOTData *data_out)
Creates the necessary data structures to launch a Flutter Dart application in AOT mode....
#define FLUTTER_API_SYMBOL(symbol)
@ kFlutterEngineAOTDataSourceTypeElfPath
@ kHover
The pointer moved while up.
@ kFlutterPointerButtonMousePrimary
@ kFlutterPointerButtonMouseSecondary
@ kFlutterPointerSignalKindScroll
#define FLUTTER_ENGINE_VERSION
@ kFlutterPointerDeviceKindMouse
FlutterVulkanImage * image
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
const gchar FlBinaryMessengerMessageHandler handler
G_BEGIN_DECLS GBytes * message
std::unique_ptr< GLFWwindow, void(*)(GLFWwindow *)> UniqueGLFWwindowPtr
static void SetUpLocales(FlutterDesktopEngineState *state)
static FlutterDesktopMessage ConvertToDesktopMessage(const FlutterPlatformMessage &engine_message)
FlutterDesktopWindowControllerRef FlutterDesktopCreateWindow(const FlutterDesktopWindowProperties &window_properties, const FlutterDesktopEngineProperties &engine_properties)
void GLFWWindowRefreshCallback(GLFWwindow *window)
void FlutterDesktopMessengerSetCallback(FlutterDesktopMessengerRef messenger, const char *channel, FlutterDesktopMessageCallback callback, void *user_data)
static UniqueGLFWwindowPtr CreateShareWindowForWindow(GLFWwindow *window)
void FlutterDesktopDestroyWindow(FlutterDesktopWindowControllerRef controller)
const int kFlutterDesktopDontCare
FlutterDesktopWindowRef FlutterDesktopPluginRegistrarGetWindow(FlutterDesktopPluginRegistrarRef registrar)
bool FlutterDesktopInit()
static void GLFWErrorCallback(int error_code, const char *description)
std::unique_ptr< FlutterDesktopMessenger, decltype(&FlutterDesktopMessengerRelease)> FlutterDesktopMessengerReferenceOwner
Maintains one ref on the FlutterDesktopMessenger's internal reference count.
static void GLFWCursorPositionCallback(GLFWwindow *window, double x, double y)
void FlutterDesktopMessengerSendResponse(FlutterDesktopMessengerRef messenger, const FlutterDesktopMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
double FlutterDesktopWindowGetScaleFactor(FlutterDesktopWindowRef flutter_window)
bool FlutterDesktopMessengerSendWithReply(FlutterDesktopMessengerRef messenger, const char *channel, const uint8_t *message, const size_t message_size, const FlutterDesktopBinaryReply reply, void *user_data)
void FlutterDesktopPluginRegistrarSetDestructionHandler(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopOnPluginRegistrarDestroyed callback)
void FlutterDesktopWindowSetPixelRatioOverride(FlutterDesktopWindowRef flutter_window, double pixel_ratio)
UniqueAotDataPtr LoadAotData(const std::filesystem::path &aot_data_path)
int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture(FlutterDesktopTextureRegistrarRef texture_registrar, const FlutterDesktopTextureInfo *texture_info)
static void SetHoverCallbacksEnabled(GLFWwindow *window, bool enabled)
bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable(FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id)
static bool RunFlutterEngine(FlutterDesktopEngineState *engine_state, const FlutterDesktopEngineProperties &engine_properties, std::unique_ptr< flutter::EventLoop > event_loop)
static FlutterDesktopWindowControllerState * GetWindowController(GLFWwindow *window)
FlutterDesktopMessengerRef FlutterDesktopMessengerLock(FlutterDesktopMessengerRef messenger)
void FlutterDesktopTextureRegistrarUnregisterExternalTexture(FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id, void(*callback)(void *user_data), void *user_data)
static bool EngineClearContext(void *user_data)
static void GLFWKeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
void FlutterDesktopWindowSetSizeLimits(FlutterDesktopWindowRef flutter_window, FlutterDesktopSize minimum_size, FlutterDesktopSize maximum_size)
FlutterDesktopWindowRef FlutterDesktopGetWindow(FlutterDesktopWindowControllerRef controller)
static void SendPointerEventWithData(GLFWwindow *window, const FlutterPointerEvent &event_data)
static void GLFWCharCallback(GLFWwindow *window, unsigned int code_point)
void FlutterDesktopWindowGetFrame(FlutterDesktopWindowRef flutter_window, int *x, int *y, int *width, int *height)
void FlutterDesktopPluginRegistrarEnableInputBlocking(FlutterDesktopPluginRegistrarRef registrar, const char *channel)
void FlutterDesktopRunEngineEventLoopWithTimeout(FlutterDesktopEngineRef engine, uint32_t timeout_milliseconds)
static void GLFWFramebufferSizeCallback(GLFWwindow *window, int width_px, int height_px)
bool FlutterDesktopMessengerIsAvailable(FlutterDesktopMessengerRef messenger)
bool FlutterDesktopMessengerSend(FlutterDesktopMessengerRef messenger, const char *channel, const uint8_t *message, const size_t message_size)
bool FlutterDesktopRunWindowEventLoopWithTimeout(FlutterDesktopWindowControllerRef controller, uint32_t timeout_milliseconds)
void FlutterDesktopWindowSetHoverEnabled(FlutterDesktopWindowRef flutter_window, bool enabled)
static void EngineOnFlutterPlatformMessage(const FlutterPlatformMessage *engine_message, void *user_data)
static void GLFWMouseButtonCallback(GLFWwindow *window, int key, int action, int mods)
static bool EngineMakeResourceContextCurrent(void *user_data)
void FlutterDesktopWindowSetFrame(FlutterDesktopWindowRef flutter_window, int x, int y, int width, int height)
void FlutterDesktopMessengerUnlock(FlutterDesktopMessengerRef messenger)
FlutterDesktopEngineRef FlutterDesktopRunEngine(const FlutterDesktopEngineProperties &properties)
static void SetEventPhaseFromCursorButtonState(GLFWwindow *window, FlutterPointerEvent *event_data, int64_t buttons)
static void SetUpCommonEngineState(FlutterDesktopEngineState *state, GLFWwindow *window)
static void GLFWScrollCallback(GLFWwindow *window, double delta_x, double delta_y)
static void ConfigurePlatformTaskRunner(FlutterTaskRunnerDescription *task_runner, FlutterDesktopEngineState *engine_state)
static double GetScreenCoordinatesPerInch()
FlutterDesktopEngineRef FlutterDesktopGetEngine(FlutterDesktopWindowControllerRef controller)
static bool EngineMakeContextCurrent(void *user_data)
static void SendWindowMetrics(FlutterDesktopWindowControllerState *controller, int width, int height)
static void GLFWAssignEventCallbacks(GLFWwindow *window)
static void GLFWCursorEnterCallback(GLFWwindow *window, int entered)
bool FlutterDesktopShutDownEngine(FlutterDesktopEngineRef engine)
static uint32_t EngineGetActiveFbo(void *user_data)
static bool EnginePresent(void *user_data)
FlutterDesktopTextureRegistrarRef FlutterDesktopRegistrarGetTextureRegistrar(FlutterDesktopPluginRegistrarRef registrar)
std::unique_ptr< _FlutterEngineAOTData, AOTDataDeleter > UniqueAotDataPtr
FlutterDesktopMessengerRef FlutterDesktopPluginRegistrarGetMessenger(FlutterDesktopPluginRegistrarRef registrar)
static void SetEventLocationFromCursorPosition(GLFWwindow *window, FlutterPointerEvent *event_data)
void FlutterDesktopMessengerRelease(FlutterDesktopMessengerRef messenger)
void FlutterDesktopWindowSetTitle(FlutterDesktopWindowRef flutter_window, const char *title)
static void * EngineProcResolver(void *user_data, const char *name)
void FlutterDesktopTerminate()
FlutterDesktopMessengerRef FlutterDesktopMessengerAddRef(FlutterDesktopMessengerRef messenger)
void FlutterDesktopWindowSetIcon(FlutterDesktopWindowRef flutter_window, uint8_t *pixel_data, int width, int height)
static void GLFWClearCanvas(GLFWwindow *window)
FlutterDesktopPluginRegistrarRef FlutterDesktopGetPluginRegistrar(FlutterDesktopEngineRef engine, const char *plugin_name)
static constexpr double kDpPerInch
static void GLFWClearEventCallbacks(GLFWwindow *window)
void(* FlutterDesktopBinaryReply)(const uint8_t *data, size_t data_size, void *user_data)
void(* FlutterDesktopMessageCallback)(FlutterDesktopMessengerRef, const FlutterDesktopMessage *, void *)
void(* FlutterDesktopOnPluginRegistrarDestroyed)(FlutterDesktopPluginRegistrarRef)
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef
FlutterDesktopBinaryReply callback
G_BEGIN_DECLS FlTextureRegistrar * texture_registrar
constexpr int64_t kFlutterImplicitViewId
std::vector< FlutterLocale > ConvertToFlutterLocale(const std::vector< LanguageInfo > &languages)
std::vector< LanguageInfo > GetPreferredLanguageInfo()
std::filesystem::path GetExecutableDirectory()
void operator()(FlutterEngineAOTData aot_data)
const FlutterTaskRunnerDescription * platform_task_runner
size_t struct_size
The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
const char * aot_library_path
const char * icu_data_path
std::unique_ptr< FlutterDesktopPluginRegistrar > plugin_registrar
FLUTTER_API_SYMBOL(FlutterEngine) flutter_engine
UniqueAotDataPtr aot_data
std::unique_ptr< flutter::PluginRegistrar > internal_plugin_registrar
std::unique_ptr< flutter::PlatformHandler > platform_handler
std::unique_ptr< flutter::EventLoop > event_loop
FlutterDesktopMessengerReferenceOwner messenger
std::unique_ptr< flutter::IncomingMessageDispatcher > message_dispatcher
FlutterDesktopWindowControllerState * window_controller
FlutterDesktopMessenger()=default
FlutterDesktopMessenger(const FlutterDesktopMessenger &value)=delete
FlutterDesktopMessenger & operator=(const FlutterDesktopMessenger &value)=delete
void SetEngine(FlutterDesktopEngineState *engine)
FlutterDesktopEngineState * GetEngine() const
Getter for the engine field.
FlutterDesktopEngineState * engine
FlutterDesktopOnPluginRegistrarDestroyed destruction_handler
bool pointer_currently_down
std::unique_ptr< FlutterDesktopWindow > window_wrapper
std::vector< std::unique_ptr< flutter::KeyboardHookHandler > > keyboard_hook_handlers
UniqueGLFWwindowPtr resource_window
double monitor_screen_coordinates_per_inch
UniqueGLFWwindowPtr window
std::unique_ptr< FlutterDesktopEngineState > engine
bool pointer_currently_added
double pixel_ratio_override
bool hover_tracking_enabled
bool skip_next_window_refresh
double pixels_per_screen_coordinate
FlutterEngineAOTDataSourceType type
const char * elf_path
Absolute path to an ELF library file.
ProcResolver gl_proc_resolver
BoolCallback make_current
UIntCallback fbo_callback
size_t struct_size
The size of this struct. Must be sizeof(FlutterOpenGLRendererConfig).
BoolCallback make_resource_current
BoolCallback clear_current
size_t struct_size
The size of this struct. Must be sizeof(FlutterPointerEvent).
double y
The y coordinate of the pointer event in physical pixels.
double x
The x coordinate of the pointer event in physical pixels.
FlutterPointerPhase phase
size_t struct_size
The size of this struct. Must be sizeof(FlutterProjectArgs).
FlutterOpenGLRendererConfig open_gl
size_t struct_size
The size of this struct. Must be sizeof(FlutterTaskRunnerDescription).
BoolCallback runs_task_on_current_thread_callback
FlutterTaskRunnerPostTaskCallback post_task_callback
size_t struct_size
The size of this struct. Must be sizeof(FlutterWindowMetricsEvent).
std::shared_ptr< const fml::Mapping > data