Flutter Engine
fl_engine_private.h File Reference
#include <glib-object.h>
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/fl_renderer.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_dart_project.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"

Go to the source code of this file.

Typedefs

typedef gboolean(* FlEnginePlatformMessageHandler) (FlEngine *engine, const gchar *channel, GBytes *message, const FlutterPlatformMessageResponseHandle *response_handle, gpointer user_data)
 

Enumerations

enum  FlEngineError { FL_ENGINE_ERROR_FAILED }
 

Functions

GQuark fl_engine_error_quark (void) G_GNUC_CONST
 
FlEngine * fl_engine_new (FlDartProject *project, FlRenderer *renderer)
 
void fl_engine_set_platform_message_handler (FlEngine *engine, FlEnginePlatformMessageHandler handler, gpointer user_data, GDestroyNotify destroy_notify)
 
gboolean fl_engine_start (FlEngine *engine, GError **error)
 
void fl_engine_send_window_metrics_event (FlEngine *engine, size_t width, size_t height, double pixel_ratio)
 
void fl_engine_send_mouse_pointer_event (FlEngine *engine, FlutterPointerPhase phase, size_t timestamp, double x, double y, double scroll_delta_x, double scroll_delta_y, int64_t buttons)
 
gboolean fl_engine_send_platform_message_response (FlEngine *engine, const FlutterPlatformMessageResponseHandle *handle, GBytes *response, GError **error)
 
void fl_engine_send_platform_message (FlEngine *engine, const gchar *channel, GBytes *message, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
 
GBytes * fl_engine_send_platform_message_finish (FlEngine *engine, GAsyncResult *result, GError **error)
 

Typedef Documentation

◆ FlEnginePlatformMessageHandler

typedef gboolean(* FlEnginePlatformMessageHandler) (FlEngine *engine, const gchar *channel, GBytes *message, const FlutterPlatformMessageResponseHandle *response_handle, gpointer user_data)

FlEnginePlatformMessageHandler: : an #FlEngine. : channel message received on. : message content received from Dart. : a handle to respond to the message with. : (closure): data provided when registering this handler.

Function called when platform messages are received.

Returns: TRUE if message has been accepted.

Definition at line 40 of file fl_engine_private.h.

Enumeration Type Documentation

◆ FlEngineError

FlEngineError: Errors for #FlEngine objects to set on failures.

Enumerator
FL_ENGINE_ERROR_FAILED 

Definition at line 22 of file fl_engine_private.h.

Function Documentation

◆ fl_engine_error_quark()

GQuark fl_engine_error_quark ( void  )

◆ fl_engine_new()

FlEngine* fl_engine_new ( FlDartProject *  project,
FlRenderer *  renderer 
)

fl_engine_new: : an #FlDartProject. : an #FlRenderer.

Creates new Flutter engine.

Returns: a new #FlEngine.

Definition at line 337 of file fl_engine.cc.

Referenced by fl_engine_new_headless(), fl_view_constructed(), and make_mock_engine().

337  {
338  g_return_val_if_fail(FL_IS_DART_PROJECT(project), nullptr);
339  g_return_val_if_fail(FL_IS_RENDERER(renderer), nullptr);
340 
341  FlEngine* self = FL_ENGINE(g_object_new(fl_engine_get_type(), nullptr));
342  self->project = FL_DART_PROJECT(g_object_ref(project));
343  self->renderer = FL_RENDERER(g_object_ref(renderer));
344  return self;
345 }

◆ fl_engine_send_mouse_pointer_event()

void fl_engine_send_mouse_pointer_event ( FlEngine *  engine,
FlutterPointerPhase  phase,
size_t  timestamp,
double  x,
double  y,
double  scroll_delta_x,
double  scroll_delta_y,
int64_t  buttons 
)

fl_engine_send_mouse_pointer_event: : an #FlEngine. : mouse phase. : time when event occurred in microseconds. : x location of mouse cursor. : y location of mouse cursor. : x offset of scroll. : y offset of scroll. : buttons that are pressed.

Sends a mouse pointer event to the engine.

Definition at line 567 of file fl_engine.cc.

References FlutterPointerEvent::buttons, FlutterPointerEvent::device_kind, FlutterEngineSendPointerEvent(), kFlutterPointerDeviceKindMouse, kFlutterPointerSignalKindScroll, phase, FlutterPointerEvent::phase, FlutterPointerEvent::scroll_delta_x, FlutterPointerEvent::scroll_delta_y, FlutterPointerEvent::signal_kind, FlutterPointerEvent::struct_size, FlutterPointerEvent::timestamp, FlutterPointerEvent::x, and FlutterPointerEvent::y.

574  {
575  g_return_if_fail(FL_IS_ENGINE(self));
576 
577  if (self->engine == nullptr) {
578  return;
579  }
580 
581  FlutterPointerEvent fl_event = {};
582  fl_event.struct_size = sizeof(fl_event);
583  fl_event.phase = phase;
584  fl_event.timestamp = timestamp;
585  fl_event.x = x;
586  fl_event.y = y;
587  if (scroll_delta_x != 0 || scroll_delta_y != 0) {
589  }
590  fl_event.scroll_delta_x = scroll_delta_x;
591  fl_event.scroll_delta_y = scroll_delta_y;
593  fl_event.buttons = buttons;
594  FlutterEngineSendPointerEvent(self->engine, &fl_event, 1);
595 }
double scroll_delta_y
The y offset of the scroll in physical pixels.
Definition: embedder.h:549
double y
The y coordinate of the pointer event in physical pixels.
Definition: embedder.h:541
double scroll_delta_x
The x offset of the scroll in physical pixels.
Definition: embedder.h:547
size_t struct_size
The size of this struct. Must be sizeof(FlutterPointerEvent).
Definition: embedder.h:532
FlutterPointerPhase phase
Definition: fl_view.cc:78
double x
The x coordinate of the pointer event in physical pixels.
Definition: embedder.h:539
int64_t buttons
The buttons currently pressed, if any.
Definition: embedder.h:557
FlutterPointerSignalKind signal_kind
Definition: embedder.h:545
FlutterEngineResult FlutterEngineSendPointerEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPointerEvent *pointers, size_t events_count)
Definition: embedder.cc:1323
FlutterPointerDeviceKind device_kind
Definition: embedder.h:555
FlutterPointerPhase phase
Definition: embedder.h:533

◆ fl_engine_send_platform_message()

void fl_engine_send_platform_message ( FlEngine *  engine,
const gchar *  channel,
GBytes *  message,
GCancellable *  cancellable,
GAsyncReadyCallback  callback,
gpointer  user_data 
)

fl_engine_send_platform_message: : an #FlEngine. : channel to send to. : (allow-none): message buffer to send or NULL for an empty message : (allow-none): a #GCancellable or NULL. : (scope async): a #GAsyncReadyCallback to call when the request is satisfied. : (closure): user data to pass to .

Asynchronously sends a platform message.

Definition at line 483 of file fl_engine.cc.

References FlutterPlatformMessage::channel, FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), fl_engine_platform_message_response_cb(), FlutterEngineSendPlatformMessage(), FlutterPlatformMessageCreateResponseHandle(), FlutterPlatformMessageReleaseResponseHandle(), kSuccess, FlutterPlatformMessage::message, FlutterPlatformMessage::message_size, FlutterPlatformMessage::response_handle, and FlutterPlatformMessage::struct_size.

Referenced by fl_binary_messenger_send_on_channel().

488  {
489  g_return_if_fail(FL_IS_ENGINE(self));
490 
491  GTask* task = nullptr;
492  FlutterPlatformMessageResponseHandle* response_handle = nullptr;
493  if (callback != nullptr) {
494  task = g_task_new(self, cancellable, callback, user_data);
495 
496  if (self->engine == nullptr) {
497  g_task_return_new_error(task, fl_engine_error_quark(),
498  FL_ENGINE_ERROR_FAILED, "No engine to send to");
499  return;
500  }
501 
503  self->engine, fl_engine_platform_message_response_cb, task,
504  &response_handle);
505  if (result != kSuccess) {
506  g_task_return_new_error(task, fl_engine_error_quark(),
508  "Failed to create response handle");
509  g_object_unref(task);
510  return;
511  }
512  } else if (self->engine == nullptr) {
513  return;
514  }
515 
516  FlutterPlatformMessage fl_message = {};
517  fl_message.struct_size = sizeof(fl_message);
518  fl_message.channel = channel;
519  fl_message.message =
520  message != nullptr
521  ? static_cast<const uint8_t*>(g_bytes_get_data(message, nullptr))
522  : nullptr;
523  fl_message.message_size = message != nullptr ? g_bytes_get_size(message) : 0;
524  fl_message.response_handle = response_handle;
525  FlutterEngineResult result =
526  FlutterEngineSendPlatformMessage(self->engine, &fl_message);
527 
528  if (result != kSuccess && task != nullptr) {
529  g_task_return_new_error(task, fl_engine_error_quark(),
531  "Failed to send platform messages");
532  g_object_unref(task);
533  }
534 
535  if (response_handle != nullptr) {
536  FlutterPlatformMessageReleaseResponseHandle(self->engine, response_handle);
537  }
538 }
const char * channel
Definition: embedder.h:567
FlutterEngineResult FlutterPlatformMessageReleaseResponseHandle(FLUTTER_API_SYMBOL(FlutterEngine) engine, FlutterPlatformMessageResponseHandle *response)
Collects the handle created using FlutterPlatformMessageCreateResponseHandle.
Definition: embedder.cc:1483
const FlutterPlatformMessageResponseHandle * response_handle
Definition: embedder.h:576
G_BEGIN_DECLS FlValue gpointer user_data
const uint8_t * message
Definition: embedder.h:568
FlutterEngineResult
Definition: embedder.h:65
static void fl_engine_platform_message_response_cb(const uint8_t *data, size_t data_length, void *user_data)
Definition: fl_engine.cc:278
size_t struct_size
The size of this struct. Must be sizeof(FlutterPlatformMessage).
Definition: embedder.h:566
GQuark fl_engine_error_quark(void) G_GNUC_CONST
FlutterEngineResult FlutterEngineSendPlatformMessage(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterPlatformMessage *flutter_message)
Definition: embedder.cc:1396
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...
Definition: embedder.cc:1448

◆ fl_engine_send_platform_message_finish()

GBytes* fl_engine_send_platform_message_finish ( FlEngine *  engine,
GAsyncResult *  result,
GError **  error 
)

fl_engine_send_platform_message_finish: : an #FlEngine.

Returns
: a #GAsyncResult. : (allow-none): #GError location to store the error occurring, or NULL to ignore.

Completes request started with fl_engine_send_platform_message().

Returns: message response on success or NULL on error.

Definition at line 540 of file fl_engine.cc.

Referenced by fl_binary_messenger_send_on_channel_finish().

542  {
543  g_return_val_if_fail(FL_IS_ENGINE(self), FALSE);
544  g_return_val_if_fail(g_task_is_valid(result, self), FALSE);
545 
546  return static_cast<GBytes*>(g_task_propagate_pointer(G_TASK(result), error));
547 }
FlMethodResponse GError ** error

◆ fl_engine_send_platform_message_response()

gboolean fl_engine_send_platform_message_response ( FlEngine *  engine,
const FlutterPlatformMessageResponseHandle handle,
GBytes *  response,
GError **  error 
)

fl_engine_send_platform_message_response: : an #FlEngine. : handle that was provided in FlEnginePlatformMessageHandler. : (allow-none): response to send or NULL for an empty response. : (allow-none): #GError location to store the error occurring, or NULL to ignore.

Responds to a platform message.

Returns: TRUE on success.

Definition at line 451 of file fl_engine.cc.

References FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), FlutterEngineSendPlatformMessageResponse(), kSuccess, and TRUE.

Referenced by fl_binary_messenger_send_response(), and fl_engine_platform_message_cb().

455  {
456  g_return_val_if_fail(FL_IS_ENGINE(self), FALSE);
457  g_return_val_if_fail(handle != nullptr, FALSE);
458 
459  if (self->engine == nullptr) {
461  "No engine to send response to");
462  return FALSE;
463  }
464 
465  gsize data_length = 0;
466  const uint8_t* data = nullptr;
467  if (response != nullptr) {
468  data =
469  static_cast<const uint8_t*>(g_bytes_get_data(response, &data_length));
470  }
472  self->engine, handle, data, data_length);
473 
474  if (result != kSuccess) {
476  "Failed to send platorm message response");
477  return FALSE;
478  }
479 
480  return TRUE;
481 }
FlMethodResponse GError ** error
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.
Definition: embedder.cc:1497
FlutterEngineResult
Definition: embedder.h:65
return TRUE
Definition: fl_view.cc:107
GQuark fl_engine_error_quark(void) G_GNUC_CONST

◆ fl_engine_send_window_metrics_event()

void fl_engine_send_window_metrics_event ( FlEngine *  engine,
size_t  width,
size_t  height,
double  pixel_ratio 
)

fl_engine_send_window_metrics_event: : an #FlEngine. : width of the window in pixels. : height of the window in pixels. : scale factor for window.

Sends a window metrics event to the engine.

Definition at line 549 of file fl_engine.cc.

References event, FlutterEngineSendWindowMetricsEvent(), height, FlutterWindowMetricsEvent::struct_size, and width.

Referenced by fl_view_geometry_changed().

552  {
553  g_return_if_fail(FL_IS_ENGINE(self));
554 
555  if (self->engine == nullptr) {
556  return;
557  }
558 
559  FlutterWindowMetricsEvent event = {};
560  event.struct_size = sizeof(FlutterWindowMetricsEvent);
561  event.width = width;
562  event.height = height;
563  event.pixel_ratio = pixel_ratio;
565 }
int32_t height
int32_t width
size_t struct_size
The size of this struct. Must be sizeof(FlutterWindowMetricsEvent).
Definition: embedder.h:457
GdkEventButton * event
Definition: fl_view.cc:62
FlutterEngineResult FlutterEngineSendWindowMetricsEvent(FLUTTER_API_SYMBOL(FlutterEngine) engine, const FlutterWindowMetricsEvent *flutter_metrics)
Definition: embedder.cc:1229

◆ fl_engine_set_platform_message_handler()

void fl_engine_set_platform_message_handler ( FlEngine *  engine,
FlEnginePlatformMessageHandler  handler,
gpointer  user_data,
GDestroyNotify  destroy_notify 
)

fl_engine_set_platform_message_handler: : an #FlEngine. : function to call when a platform message is received. : (closure): user data to pass to . : (allow-none): a function which gets called to free , or NULL.

Registers the function called when a platform message is reveived. Call fl_engine_send_platform_message_response() with the response to this message. Ownership of FlutterPlatformMessageResponseHandle is transferred to the caller, and the message must be responded to to avoid memory leaks.

Definition at line 433 of file fl_engine.cc.

References user_data.

Referenced by fl_binary_messenger_new().

437  {
438  g_return_if_fail(FL_IS_ENGINE(self));
439  g_return_if_fail(handler != nullptr);
440 
441  if (self->platform_message_handler_destroy_notify) {
442  self->platform_message_handler_destroy_notify(
443  self->platform_message_handler_data);
444  }
445 
446  self->platform_message_handler = handler;
447  self->platform_message_handler_data = user_data;
448  self->platform_message_handler_destroy_notify = destroy_notify;
449 }
G_BEGIN_DECLS FlValue gpointer user_data

◆ fl_engine_start()

gboolean fl_engine_start ( FlEngine *  engine,
GError **  error 
)

fl_engine_start: : an #FlEngine. : (allow-none): #GError location to store the error occurring, or NULL to ignore.

Starts the Flutter engine.

Returns: TRUE on success.

Definition at line 352 of file fl_engine.cc.

References FlutterProjectArgs::aot_data, args, FlutterProjectArgs::assets_path, FlutterOpenGLRendererConfig::clear_current, FlutterProjectArgs::command_line_argc, FlutterProjectArgs::command_line_argv, FlutterProjectArgs::custom_task_runners, FlutterProjectArgs::dart_entrypoint_argc, FlutterProjectArgs::dart_entrypoint_argv, FlutterEngineAOTDataSource::elf_path, FlutterOpenGLRendererConfig::fbo_callback, fl_dart_project_get_aot_library_path(), fl_dart_project_get_assets_path(), fl_dart_project_get_dart_entrypoint_arguments(), fl_dart_project_get_icu_data_path(), fl_dart_project_get_switches(), FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), fl_engine_gl_clear_current(), fl_engine_gl_get_fbo(), fl_engine_gl_make_current(), fl_engine_gl_make_resource_current(), fl_engine_gl_present(), fl_engine_gl_proc_resolver(), fl_engine_platform_message_cb(), fl_engine_post_task(), fl_engine_runs_task_on_current_thread(), FLUTTER_ENGINE_VERSION, FlutterEngineCreateAOTData(), FlutterEngineInitialize(), FlutterEngineRunInitialized(), FlutterEngineRunsAOTCompiledDartCode(), FlutterOpenGLRendererConfig::gl_proc_resolver, FlutterProjectArgs::icu_data_path, FlutterTaskRunnerDescription::identifier, kFlutterEngineAOTDataSourceTypeElfPath, kOpenGL, kPlatformTaskRunnerIdentifier, kSuccess, FlutterOpenGLRendererConfig::make_current, FlutterOpenGLRendererConfig::make_resource_current, FlutterRendererConfig::open_gl, FlutterProjectArgs::platform_message_callback, FlutterCustomTaskRunners::platform_task_runner, FlutterTaskRunnerDescription::post_task_callback, FlutterOpenGLRendererConfig::present, FlutterTaskRunnerDescription::runs_task_on_current_thread_callback, setup_locales(), FlutterProjectArgs::shutdown_dart_vm_when_done, FlutterOpenGLRendererConfig::struct_size, FlutterTaskRunnerDescription::struct_size, FlutterCustomTaskRunners::struct_size, FlutterProjectArgs::struct_size, TRUE, FlutterRendererConfig::type, FlutterEngineAOTDataSource::type, and FlutterTaskRunnerDescription::user_data.

Referenced by fl_view_realize(), and make_mock_engine().

352  {
353  g_return_val_if_fail(FL_IS_ENGINE(self), FALSE);
354 
355  FlutterRendererConfig config = {};
356  config.type = kOpenGL;
364 
365  FlutterTaskRunnerDescription platform_task_runner = {};
366  platform_task_runner.struct_size = sizeof(FlutterTaskRunnerDescription);
367  platform_task_runner.user_data = self;
368  platform_task_runner.runs_task_on_current_thread_callback =
370  platform_task_runner.post_task_callback = fl_engine_post_task;
371  platform_task_runner.identifier = kPlatformTaskRunnerIdentifier;
372 
373  FlutterCustomTaskRunners custom_task_runners = {};
374  custom_task_runners.struct_size = sizeof(FlutterCustomTaskRunners);
375  custom_task_runners.platform_task_runner = &platform_task_runner;
376 
377  g_autoptr(GPtrArray) command_line_args =
378  fl_dart_project_get_switches(self->project);
379  // FlutterProjectArgs expects a full argv, so when processing it for flags
380  // the first item is treated as the executable and ignored. Add a dummy value
381  // so that all switches are used.
382  g_ptr_array_insert(command_line_args, 0, g_strdup("flutter"));
383 
384  gchar** dart_entrypoint_args =
386 
388  args.struct_size = sizeof(FlutterProjectArgs);
389  args.assets_path = fl_dart_project_get_assets_path(self->project);
390  args.icu_data_path = fl_dart_project_get_icu_data_path(self->project);
391  args.command_line_argc = command_line_args->len;
392  args.command_line_argv =
393  reinterpret_cast<const char* const*>(command_line_args->pdata);
395  args.custom_task_runners = &custom_task_runners;
396  args.shutdown_dart_vm_when_done = true;
397  args.dart_entrypoint_argc = g_strv_length(dart_entrypoint_args);
398  args.dart_entrypoint_argv =
399  reinterpret_cast<const char* const*>(dart_entrypoint_args);
400 
402  FlutterEngineAOTDataSource source = {};
404  source.elf_path = fl_dart_project_get_aot_library_path(self->project);
405  if (FlutterEngineCreateAOTData(&source, &self->aot_data) != kSuccess) {
407  "Failed to create AOT data");
408  return FALSE;
409  }
410  args.aot_data = self->aot_data;
411  }
412 
414  FLUTTER_ENGINE_VERSION, &config, &args, self, &self->engine);
415  if (result != kSuccess) {
417  "Failed to initialize Flutter engine");
418  return FALSE;
419  }
420 
421  result = FlutterEngineRunInitialized(self->engine);
422  if (result != kSuccess) {
424  "Failed to run Flutter engine");
425  return FALSE;
426  }
427 
428  setup_locales(self);
429 
430  return TRUE;
431 }
static void fl_engine_post_task(FlutterTask task, uint64_t target_time_nanos, void *user_data)
Definition: fl_engine.cc:240
G_BEGIN_DECLS FlValue * args
G_MODULE_EXPORT const gchar * fl_dart_project_get_icu_data_path(FlDartProject *self)
const char * icu_data_path
Definition: embedder.h:1199
FlMethodResponse GError ** error
size_t struct_size
The size of this struct. Must be sizeof(FlutterTaskRunnerDescription).
Definition: embedder.h:722
const FlutterCustomTaskRunners * custom_task_runners
Definition: embedder.h:1313
G_MODULE_EXPORT gchar ** fl_dart_project_get_dart_entrypoint_arguments(FlDartProject *self)
G_MODULE_EXPORT const gchar * fl_dart_project_get_aot_library_path(FlDartProject *self)
GPtrArray * fl_dart_project_get_switches(FlDartProject *self)
static bool fl_engine_gl_make_resource_current(void *user_data)
Definition: fl_engine.cc:223
FlutterPlatformMessageCallback platform_message_callback
Definition: embedder.h:1222
static void setup_locales(FlEngine *self)
Definition: fl_engine.cc:98
static void fl_engine_platform_message_cb(const FlutterPlatformMessage *message, void *user_data)
Definition: fl_engine.cc:257
const char *const * command_line_argv
Definition: embedder.h:1217
static bool fl_engine_gl_clear_current(void *user_data)
Definition: fl_engine.cc:198
bool shutdown_dart_vm_when_done
Definition: embedder.h:1332
const char *const * dart_entrypoint_argv
Definition: embedder.h:1386
static bool fl_engine_gl_present(void *user_data)
Definition: fl_engine.cc:213
#define FLUTTER_ENGINE_VERSION
Definition: embedder.h:63
FlutterRendererType type
Definition: embedder.h:448
size_t struct_size
The size of this struct. Must be sizeof(FlutterOpenGLRendererConfig).
Definition: embedder.h:379
BoolCallback make_resource_current
Definition: embedder.h:398
BoolCallback clear_current
Definition: embedder.h:381
static constexpr size_t kPlatformTaskRunnerIdentifier
Definition: fl_engine.cc:22
FlutterEngineResult FlutterEngineInitialize(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Initialize a Flutter engine instance. This does not run the Flutter application code till the Flutter...
Definition: embedder.cc:734
static bool fl_engine_gl_make_current(void *user_data)
Definition: fl_engine.cc:188
const char * assets_path
Definition: embedder.h:1175
BoolCallback make_current
Definition: embedder.h:380
FlutterOpenGLRendererConfig open_gl
Definition: embedder.h:450
FlutterEngineResult
Definition: embedder.h:65
size_t struct_size
The size of this struct. Must be sizeof(FlutterProjectArgs).
Definition: embedder.h:1171
UIntCallback fbo_callback
Definition: embedder.h:391
return TRUE
Definition: fl_view.cc:107
const FlutterTaskRunnerDescription * platform_task_runner
Definition: embedder.h:752
static bool fl_engine_runs_task_on_current_thread(void *user_data)
Definition: fl_engine.cc:234
FlutterTaskRunnerPostTaskCallback post_task_callback
Definition: embedder.h:739
FlutterEngineAOTDataSourceType type
Definition: embedder.h:1126
FlutterEngineAOTData aot_data
Definition: embedder.h:1363
static uint32_t fl_engine_gl_get_fbo(void *user_data)
Definition: fl_engine.cc:208
ProcResolver gl_proc_resolver
Definition: embedder.h:415
size_t struct_size
The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
Definition: embedder.h:747
G_MODULE_EXPORT const gchar * fl_dart_project_get_assets_path(FlDartProject *self)
FlutterEngineResult FlutterEngineRunInitialized(FLUTTER_API_SYMBOL(FlutterEngine) engine)
Runs an initialized engine instance. An engine can be initialized via FlutterEngineInitialize. An initialized instance can only be run once. During and after this call, custom task runners supplied by the embedder are expected to start servicing tasks.
Definition: embedder.cc:1167
bool FlutterEngineRunsAOTCompiledDartCode(void)
Returns if the Flutter engine instance will run AOT compiled Dart code. This call has no threading re...
Definition: embedder.cc:1821
BoolCallback runs_task_on_current_thread_callback
Definition: embedder.h:728
GQuark fl_engine_error_quark(void) G_GNUC_CONST
int command_line_argc
The command line argument count used to initialize the project.
Definition: embedder.h:1201
const char * elf_path
Absolute path to an ELF library file.
Definition: embedder.h:1129
static void * fl_engine_gl_proc_resolver(void *user_data, const char *name)
Definition: fl_engine.cc:183
FlutterEngineResult FlutterEngineCreateAOTData(const FlutterEngineAOTDataSource *source, FlutterEngineAOTData *data_out)
Creates the necessary data structures to launch a Flutter Dart application in AOT mode...
Definition: embedder.cc:597