 |
Flutter Windows Embedder
|
|
Go to the documentation of this file.
17 c_engine_properties.
assets_path = project.assets_path().c_str();
18 c_engine_properties.
icu_data_path = project.icu_data_path().c_str();
26 const std::vector<std::string>& entrypoint_args =
28 std::vector<const char*> entrypoint_argv;
30 entrypoint_args.begin(), entrypoint_args.end(),
31 std::back_inserter(entrypoint_argv),
32 [](
const std::string& arg) ->
const char* { return arg.c_str(); });
35 static_cast<int>(entrypoint_argv.size());
37 entrypoint_argv.empty() ? nullptr : entrypoint_argv.data();
42 messenger_ = std::make_unique<BinaryMessengerImpl>(core_messenger);
55 std::cerr <<
"Cannot run an engine that failed creation." << std::endl;
59 std::cerr <<
"Cannot run an engine more than once." << std::endl;
64 std::cerr <<
"Failed to start engine." << std::endl;
66 run_succeeded_ =
true;
71 if (engine_ && owns_engine_) {
86 const std::string& plugin_name) {
88 std::cerr <<
"Cannot get plugin registrar on an engine that isn't running; "
97 next_frame_callback_ = std::move(
callback);
102 self->next_frame_callback_();
103 self->next_frame_callback_ =
nullptr;
115 engine_, hwnd,
message, wparam, lparam, &result)) {
122 owns_engine_ =
false;
const wchar_t * aot_library_path
FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger(FlutterDesktopEngineRef engine)
FlutterDesktopGpuPreference
void SetNextFrameCallback(std::function< void()> callback)
const char ** dart_entrypoint_argv
const wchar_t * icu_data_path
bool FlutterDesktopEngineProcessExternalWindowMessage(FlutterDesktopEngineRef engine, HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar(FlutterDesktopEngineRef engine, const char *plugin_name)
const char * dart_entrypoint
FlutterDesktopGpuPreference gpu_preference
FlutterDesktopPluginRegistrarRef GetRegistrarForPlugin(const std::string &plugin_name) override
struct FlutterDesktopEngine * FlutterDesktopEngineRef
const std::vector< std::string > & dart_entrypoint_arguments() const
std::optional< LRESULT > ProcessExternalWindowMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
uint64_t FlutterDesktopEngineProcessMessages(FlutterDesktopEngineRef engine)
GpuPreference gpu_preference() const
UIThreadPolicy ui_thread_policy() const
bool FlutterDesktopEngineDestroy(FlutterDesktopEngineRef engine_ref)
FlutterDesktopEngineRef FlutterDesktopEngineCreate(const FlutterDesktopEngineProperties *engine_properties)
FlutterDesktopUIThreadPolicy ui_thread_policy
const std::string & dart_entrypoint() const
void FlutterDesktopEngineSetNextFrameCallback(FlutterDesktopEngineRef engine, VoidCallback callback, void *user_data)
std::chrono::nanoseconds ProcessMessages()
FlutterDesktopUIThreadPolicy
const wchar_t * assets_path
bool FlutterDesktopEngineRun(FlutterDesktopEngineRef engine, const char *entry_point)
FlutterEngine(const DartProject &project)
void FlutterDesktopEngineReloadSystemFonts(FlutterDesktopEngineRef engine)
FlutterDesktopBinaryReply callback