#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
#include <gmodule.h>
#include <cstring>
#include <string>
#include <vector>
#include "flutter/common/constants.h"
#include "flutter/shell/platform/common/engine_switches.h"
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/fl_binary_messenger_private.h"
#include "flutter/shell/platform/linux/fl_dart_project_private.h"
#include "flutter/shell/platform/linux/fl_engine_private.h"
#include "flutter/shell/platform/linux/fl_pixel_buffer_texture_private.h"
#include "flutter/shell/platform/linux/fl_plugin_registrar_private.h"
#include "flutter/shell/platform/linux/fl_renderer.h"
#include "flutter/shell/platform/linux/fl_renderer_gdk.h"
#include "flutter/shell/platform/linux/fl_renderer_headless.h"
#include "flutter/shell/platform/linux/fl_settings_handler.h"
#include "flutter/shell/platform/linux/fl_texture_gl_private.h"
#include "flutter/shell/platform/linux/fl_texture_registrar_private.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_plugin_registry.h"
Go to the source code of this file.
Classes | |
struct | _FlEngine |
Enumerations | |
enum | { kSignalOnPreEngineRestart, kSignalLastSignal } |
Functions | |
static void | fl_engine_plugin_registry_iface_init (FlPluginRegistryInterface *iface) |
G_DEFINE_TYPE_WITH_CODE (FlEngine, fl_engine, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(fl_plugin_registry_get_type(), fl_engine_plugin_registry_iface_init)) enum | |
static void | parse_locale (const gchar *locale, gchar **language, gchar **territory, gchar **codeset, gchar **modifier) |
static void | view_added_cb (const FlutterAddViewResult *result) |
static void | view_removed_cb (const FlutterRemoveViewResult *result) |
static void | free_locale (FlutterLocale *locale) |
static void | setup_locales (FlEngine *self) |
static bool | compositor_create_backing_store_callback (const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out, void *user_data) |
static bool | compositor_collect_backing_store_callback (const FlutterBackingStore *backing_store, void *user_data) |
static bool | compositor_present_view_callback (const FlutterPresentViewInfo *info) |
static void * | fl_engine_gl_proc_resolver (void *user_data, const char *name) |
static bool | fl_engine_gl_make_current (void *user_data) |
static bool | fl_engine_gl_clear_current (void *user_data) |
static uint32_t | fl_engine_gl_get_fbo (void *user_data) |
static bool | fl_engine_gl_present (void *user_data) |
static bool | fl_engine_gl_make_resource_current (void *user_data) |
static bool | fl_engine_gl_external_texture_frame_callback (void *user_data, int64_t texture_id, size_t width, size_t height, FlutterOpenGLTexture *opengl_texture) |
static bool | fl_engine_runs_task_on_current_thread (void *user_data) |
static void | fl_engine_post_task (FlutterTask task, uint64_t target_time_nanos, void *user_data) |
static void | fl_engine_platform_message_cb (const FlutterPlatformMessage *message, void *user_data) |
static void | fl_engine_update_semantics_cb (const FlutterSemanticsUpdate2 *update, void *user_data) |
static void | fl_engine_on_pre_engine_restart_cb (void *user_data) |
static void | fl_engine_platform_message_response_cb (const uint8_t *data, size_t data_length, void *user_data) |
static FlPluginRegistrar * | fl_engine_get_registrar_for_plugin (FlPluginRegistry *registry, const gchar *name) |
static void | fl_engine_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
static void | fl_engine_dispose (GObject *object) |
static void | fl_engine_class_init (FlEngineClass *klass) |
static void | fl_engine_init (FlEngine *self) |
FlEngine * | fl_engine_new_with_renderer (FlDartProject *project, FlRenderer *renderer) |
G_MODULE_EXPORT FlEngine * | fl_engine_new (FlDartProject *project) |
G_MODULE_EXPORT FlEngine * | fl_engine_new_headless (FlDartProject *project) |
FlRenderer * | fl_engine_get_renderer (FlEngine *self) |
gboolean | fl_engine_start (FlEngine *self, GError **error) |
FlutterEngineProcTable * | fl_engine_get_embedder_api (FlEngine *self) |
FlutterViewId | fl_engine_add_view (FlEngine *self, size_t width, size_t height, double pixel_ratio, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
gboolean | fl_engine_add_view_finish (FlEngine *self, GAsyncResult *result, GError **error) |
void | fl_engine_remove_view (FlEngine *self, FlutterViewId view_id, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
gboolean | fl_engine_remove_view_finish (FlEngine *self, GAsyncResult *result, GError **error) |
void | fl_engine_set_platform_message_handler (FlEngine *self, FlEnginePlatformMessageHandler handler, gpointer user_data, GDestroyNotify destroy_notify) |
void | fl_engine_set_update_semantics_handler (FlEngine *self, FlEngineUpdateSemanticsHandler handler, gpointer user_data, GDestroyNotify destroy_notify) |
gboolean | fl_engine_send_platform_message_response (FlEngine *self, const FlutterPlatformMessageResponseHandle *handle, GBytes *response, GError **error) |
void | fl_engine_send_platform_message (FlEngine *self, const gchar *channel, GBytes *message, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
GBytes * | fl_engine_send_platform_message_finish (FlEngine *self, GAsyncResult *result, GError **error) |
void | fl_engine_send_window_metrics_event (FlEngine *self, FlutterViewId view_id, size_t width, size_t height, double pixel_ratio) |
void | fl_engine_send_mouse_pointer_event (FlEngine *self, FlutterViewId view_id, FlutterPointerPhase phase, size_t timestamp, double x, double y, FlutterPointerDeviceKind device_kind, double scroll_delta_x, double scroll_delta_y, int64_t buttons) |
void | fl_engine_send_pointer_pan_zoom_event (FlEngine *self, FlutterViewId view_id, size_t timestamp, double x, double y, FlutterPointerPhase phase, double pan_x, double pan_y, double scale, double rotation) |
void | fl_engine_send_key_event (FlEngine *self, const FlutterKeyEvent *event, FlutterKeyEventCallback callback, void *user_data) |
void | fl_engine_dispatch_semantics_action (FlEngine *self, uint64_t id, FlutterSemanticsAction action, GBytes *data) |
gboolean | fl_engine_mark_texture_frame_available (FlEngine *self, int64_t texture_id) |
gboolean | fl_engine_register_external_texture (FlEngine *self, int64_t texture_id) |
gboolean | fl_engine_unregister_external_texture (FlEngine *self, int64_t texture_id) |
G_MODULE_EXPORT FlBinaryMessenger * | fl_engine_get_binary_messenger (FlEngine *self) |
FlTaskRunner * | fl_engine_get_task_runner (FlEngine *self) |
void | fl_engine_execute_task (FlEngine *self, FlutterTask *task) |
G_MODULE_EXPORT FlTextureRegistrar * | fl_engine_get_texture_registrar (FlEngine *self) |
void | fl_engine_update_accessibility_features (FlEngine *self, int32_t flags) |
GPtrArray * | fl_engine_get_switches (FlEngine *self) |
Variables | |
static constexpr size_t | kPlatformTaskRunnerIdentifier = 1 |
static constexpr int32_t | kMousePointerDeviceId = 0 |
static constexpr int32_t | kPointerPanZoomDeviceId = 1 |
static guint | fl_engine_signals [kSignalLastSignal] |
anonymous enum |
Enumerator | |
---|---|
kSignalOnPreEngineRestart | |
kSignalLastSignal |
Definition at line 72 of file fl_engine.cc.
|
static |
Definition at line 219 of file fl_engine.cc.
References fl_renderer_collect_backing_store(), and user_data.
Referenced by fl_engine_start().
|
static |
Definition at line 209 of file fl_engine.cc.
References fl_renderer_create_backing_store(), and user_data.
Referenced by fl_engine_start().
|
static |
Definition at line 228 of file fl_engine.cc.
References fl_renderer_present_layers().
Referenced by fl_engine_start().
FlutterViewId fl_engine_add_view | ( | FlEngine * | engine, |
size_t | width, | ||
size_t | height, | ||
double | pixel_ratio, | ||
GCancellable * | cancellable, | ||
GAsyncReadyCallback | callback, | ||
gpointer | user_data | ||
) |
fl_engine_add_view: @engine: an #FlEngine. @width: width of view in pixels. @height: height of view in pixels. @pixel_ratio: scale factor for view. @cancellable: (allow-none): a #GCancellable or NULL. @callback: (scope async): a #GAsyncReadyCallback to call when the view is added. @user_data: (closure): user data to pass to @callback.
Asynchronously add a new view. The returned view ID should not be used until this function completes.
Returns: the ID for the view.
Definition at line 641 of file fl_engine.cc.
References callback, FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), height, result, user_data, view_added_cb(), and width.
Referenced by fl_view_new_for_engine(), and TEST().
gboolean fl_engine_add_view_finish | ( | FlEngine * | engine, |
GAsyncResult * | result, | ||
GError ** | error | ||
) |
fl_engine_add_view_finish: @engine: an #FlEngine.
Completes request started with fl_engine_add_view().
Returns: TRUE on success.
Definition at line 679 of file fl_engine.cc.
Referenced by add_view_cb(), add_view_engine_error_cb(), add_view_error_cb(), and view_added_cb().
|
static |
Definition at line 450 of file fl_engine.cc.
References fl_engine_dispose(), fl_engine_set_property(), fl_engine_signals, and kSignalOnPreEngineRestart.
void fl_engine_dispatch_semantics_action | ( | FlEngine * | engine, |
uint64_t | id, | ||
FlutterSemanticsAction | action, | ||
GBytes * | data | ||
) |
fl_engine_dispatch_semantics_action: @engine: an #FlEngine. @id: the semantics action identifier. @action: the action being dispatched. @data: (allow-none): data associated with the action.
Definition at line 953 of file fl_engine.cc.
Referenced by fl_accessible_node_perform_action_impl(), and TEST().
|
static |
Definition at line 410 of file fl_engine.cc.
References fl_binary_messenger_shutdown(), and fl_texture_registrar_shutdown().
Referenced by fl_engine_class_init().
void fl_engine_execute_task | ( | FlEngine * | engine, |
FlutterTask * | task | ||
) |
fl_engine_execute_task: @engine: an #FlEngine. @task: a #FlutterTask to execute.
Executes given Flutter task.
Definition at line 1006 of file fl_engine.cc.
Referenced by fl_task_runner_process_expired_tasks_locked().
G_MODULE_EXPORT FlBinaryMessenger* fl_engine_get_binary_messenger | ( | FlEngine * | engine | ) |
fl_engine_get_binary_messenger: @engine: an #FlEngine.
Gets the messenger to communicate with this engine.
Returns: an #FlBinaryMessenger.
Definition at line 995 of file fl_engine.cc.
Referenced by create_context_cb(), fl_settings_handler_new(), fl_view_get_registrar_for_plugin(), fl_view_keyboard_delegate_iface_init(), init_keyboard(), realize_cb(), and TEST().
FlutterEngineProcTable* fl_engine_get_embedder_api | ( | FlEngine * | engine | ) |
fl_engine_get_embedder_api: @engine: an #FlEngine.
Gets the embedder API proc table, allowing modificiations for unit testing.
Returns: a mutable pointer to the embedder API proc table.
Definition at line 637 of file fl_engine.cc.
Referenced by TEST().
|
static |
Definition at line 380 of file fl_engine.cc.
References fl_plugin_registrar_new().
Referenced by fl_engine_plugin_registry_iface_init().
FlRenderer* fl_engine_get_renderer | ( | FlEngine * | engine | ) |
fl_engine_get_renderer: @engine: an #FlEngine.
Gets the renderer used by this engine.
Returns: an #FlRenderer.
Definition at line 504 of file fl_engine.cc.
Referenced by fl_view_new(), and fl_view_new_for_engine().
GPtrArray* fl_engine_get_switches | ( | FlEngine * | engine | ) |
fl_engine_get_switches: @project: an #FlEngine.
Determines the switches that should be passed to the Flutter engine.
Returns: an array of switches to pass to the Flutter engine.
Definition at line 1028 of file fl_engine.cc.
References flutter::GetSwitchesFromEnvironment().
Referenced by fl_engine_start(), and TEST().
FlTaskRunner* fl_engine_get_task_runner | ( | FlEngine * | engine | ) |
fl_engine_get_task_runner: @engine: an #FlEngine.
Returns: task runner responsible for scheduling Flutter tasks.
Definition at line 1001 of file fl_engine.cc.
Referenced by fl_renderer_unblock_main_thread(), and fl_renderer_wait_for_frame().
G_MODULE_EXPORT FlTextureRegistrar* fl_engine_get_texture_registrar | ( | FlEngine * | engine | ) |
fl_engine_get_texture_registrar: @engine: an #FlEngine.
Gets the texture registrar for registering textures.
Returns: an #FlTextureRegistrar.
Definition at line 1011 of file fl_engine.cc.
Referenced by fl_view_get_registrar_for_plugin().
|
static |
Definition at line 248 of file fl_engine.cc.
References fl_renderer_clear_current(), and user_data.
Referenced by fl_engine_start().
|
static |
Definition at line 272 of file fl_engine.cc.
References error, fl_pixel_buffer_texture_populate(), fl_texture_gl_populate(), fl_texture_registrar_lookup_texture(), height, result, texture_id, user_data, and width.
Referenced by fl_engine_start().
|
static |
Definition at line 254 of file fl_engine.cc.
References fl_renderer_get_fbo(), and user_data.
Referenced by fl_engine_start().
|
static |
Definition at line 242 of file fl_engine.cc.
References fl_renderer_make_current(), and user_data.
Referenced by fl_engine_start().
|
static |
Definition at line 265 of file fl_engine.cc.
References fl_renderer_make_resource_current(), and user_data.
Referenced by fl_engine_start().
|
static |
|
static |
Definition at line 237 of file fl_engine.cc.
References fl_renderer_get_proc_address(), and user_data.
Referenced by fl_engine_start().
|
static |
gboolean fl_engine_mark_texture_frame_available | ( | FlEngine * | engine, |
int64_t | texture_id | ||
) |
fl_engine_mark_texture_frame_available: @engine: an #FlEngine. @texture_id: the identifier of the texture whose frame has been updated.
Tells the Flutter engine that a new texture frame is available for the given texture.
Returns: TRUE on success.
Definition at line 974 of file fl_engine.cc.
References texture_id.
Referenced by mark_texture_frame_available().
G_MODULE_EXPORT FlEngine* fl_engine_new | ( | FlDartProject * | project | ) |
FlEngine:
#FlEngine is an object that contains a running Flutter engine. fl_engine_new: @project: an #FlDartProject.
Creates new Flutter engine.
Returns: a new #FlEngine.
Definition at line 494 of file fl_engine.cc.
References fl_engine_new_with_renderer(), and fl_renderer_gdk_new().
Referenced by fl_view_new().
G_MODULE_EXPORT FlEngine* fl_engine_new_headless | ( | FlDartProject * | project | ) |
fl_engine_new_headless: @project: an #FlDartProject.
Creates new Flutter engine running in headless mode.
Returns: a new #FlEngine.
Definition at line 499 of file fl_engine.cc.
References fl_engine_new_with_renderer(), and fl_renderer_headless_new().
FlEngine* fl_engine_new_with_renderer | ( | FlDartProject * | project, |
FlRenderer * | renderer | ||
) |
fl_engine_new_with_renderer: @project: an #FlDartProject. @renderer: an #FlRenderer.
Creates new Flutter engine.
Returns: a new #FlEngine.
Definition at line 479 of file fl_engine.cc.
References fl_binary_messenger_new(), and fl_renderer_set_engine().
Referenced by fl_engine_new(), fl_engine_new_headless(), and make_mock_engine().
|
static |
Definition at line 363 of file fl_engine.cc.
References fl_engine_signals, kSignalOnPreEngineRestart, and user_data.
Referenced by fl_engine_start().
|
static |
Definition at line 328 of file fl_engine.cc.
References fl_engine_send_platform_message_response(), and user_data.
Referenced by fl_engine_start().
|
static |
Definition at line 371 of file fl_engine.cc.
References user_data.
Referenced by fl_engine_send_platform_message().
|
static |
Definition at line 389 of file fl_engine.cc.
References fl_engine_get_registrar_for_plugin().
|
static |
Definition at line 319 of file fl_engine.cc.
References fl_task_runner_post_task(), and user_data.
Referenced by fl_engine_start().
gboolean fl_engine_register_external_texture | ( | FlEngine * | engine, |
int64_t | texture_id | ||
) |
fl_engine_register_external_texture: @engine: an #FlEngine. @texture_id: the identifier of the texture that is available.
Tells the Flutter engine that a new external texture is available.
Returns: TRUE on success.
Definition at line 981 of file fl_engine.cc.
References texture_id.
Referenced by register_texture().
void fl_engine_remove_view | ( | FlEngine * | engine, |
FlutterViewId | view_id, | ||
GCancellable * | cancellable, | ||
GAsyncReadyCallback | callback, | ||
gpointer | user_data | ||
) |
fl_engine_remove_view: @engine: an #FlEngine. @view_id: ID to remove. @cancellable: (allow-none): a #GCancellable or NULL. @callback: (scope async): a #GAsyncReadyCallback to call when the view is added. @user_data: (closure): user data to pass to @callback.
Removes a view previously added with fl_engine_add_view().
Definition at line 686 of file fl_engine.cc.
References callback, FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), result, user_data, and view_removed_cb().
Referenced by fl_view_dispose(), and TEST().
gboolean fl_engine_remove_view_finish | ( | FlEngine * | engine, |
GAsyncResult * | result, | ||
GError ** | error | ||
) |
fl_engine_remove_view_finish: @engine: an #FlEngine.
Completes request started with fl_engine_remove_view().
Returns: TRUE on succcess.
Definition at line 711 of file fl_engine.cc.
Referenced by remove_view_cb(), remove_view_engine_error_cb(), and remove_view_error_cb().
|
static |
void fl_engine_send_key_event | ( | FlEngine * | engine, |
const FlutterKeyEvent * | event, | ||
FlutterKeyEventCallback | callback, | ||
void * | user_data | ||
) |
fl_engine_send_key_event:
Definition at line 940 of file fl_engine.cc.
References callback, event, and user_data.
Referenced by fl_view_keyboard_delegate_iface_init().
void fl_engine_send_mouse_pointer_event | ( | FlEngine * | engine, |
FlutterViewId | view_id, | ||
FlutterPointerPhase | phase, | ||
size_t | timestamp, | ||
double | x, | ||
double | y, | ||
FlutterPointerDeviceKind | device_kind, | ||
double | scroll_delta_x, | ||
double | scroll_delta_y, | ||
int64_t | buttons | ||
) |
fl_engine_send_mouse_pointer_event: @engine: an #FlEngine. @view_id: the view that the event occured on. @phase: mouse phase. @timestamp: time when event occurred in microseconds. @x: x location of mouse cursor. @y: y location of mouse cursor. @device_kind: kind of pointing device. @scroll_delta_x: x offset of scroll. @scroll_delta_y: y offset of scroll. @buttons: buttons that are pressed.
Sends a mouse pointer event to the engine.
Definition at line 874 of file fl_engine.cc.
References kMousePointerDeviceId.
Referenced by check_pointer_inside(), fl_view_scrolling_delegate_iface_init(), leave_notify_event_cb(), motion_notify_event_cb(), send_pointer_button_event(), and TEST().
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: @engine: an #FlEngine. @channel: channel to send to. @message: (allow-none): message buffer to send or NULL for an empty message @cancellable: (allow-none): a #GCancellable or NULL. @callback: (scope async): a #GAsyncReadyCallback to call when the request is satisfied. @user_data: (closure): user data to pass to @callback.
Asynchronously sends a platform message.
Definition at line 786 of file fl_engine.cc.
References callback, FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), fl_engine_platform_message_response_cb(), result, and user_data.
Referenced by send_on_channel(), and TEST().
GBytes* fl_engine_send_platform_message_finish | ( | FlEngine * | engine, |
GAsyncResult * | result, | ||
GError ** | error | ||
) |
fl_engine_send_platform_message_finish: @engine: an #FlEngine.
Completes request started with fl_engine_send_platform_message().
Returns: message response on success or NULL on error.
Definition at line 845 of file fl_engine.cc.
Referenced by send_on_channel_finish().
gboolean fl_engine_send_platform_message_response | ( | FlEngine * | engine, |
const FlutterPlatformMessageResponseHandle * | handle, | ||
GBytes * | response, | ||
GError ** | error | ||
) |
fl_engine_send_platform_message_response: @engine: an #FlEngine. @handle: handle that was provided in FlEnginePlatformMessageHandler. @response: (allow-none): response to send or NULL for an empty response. @error: (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 754 of file fl_engine.cc.
References error, FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), result, and TRUE.
Referenced by fl_engine_platform_message_cb(), send_response(), and TEST().
void fl_engine_send_pointer_pan_zoom_event | ( | FlEngine * | engine, |
FlutterViewId | view_id, | ||
size_t | timestamp, | ||
double | x, | ||
double | y, | ||
FlutterPointerPhase | phase, | ||
double | pan_x, | ||
double | pan_y, | ||
double | scale, | ||
double | rotation | ||
) |
fl_engine_send_pointer_pan_zoom_event: @engine: an #FlEngine. @view_id: the view that the event occured on. @timestamp: time when event occurred in microseconds. @x: x location of mouse cursor. @y: y location of mouse cursor. @phase: mouse phase. @pan_x: x offset of the pan/zoom in pixels. @pan_y: y offset of the pan/zoom in pixels. @scale: scale of the pan/zoom. @rotation: rotation of the pan/zoom in radians.
Sends a pan/zoom pointer event to the engine.
Definition at line 908 of file fl_engine.cc.
References kPointerPanZoomDeviceId.
Referenced by fl_view_scrolling_delegate_iface_init(), and TEST().
void fl_engine_send_window_metrics_event | ( | FlEngine * | engine, |
FlutterViewId | view_id, | ||
size_t | width, | ||
size_t | height, | ||
double | pixel_ratio | ||
) |
fl_engine_send_window_metrics_event: @engine: an #FlEngine. @view_id: the view that the event occured on. @width: width of the window in pixels. @height: height of the window in pixels. @pixel_ratio: scale factor for window.
Sends a window metrics event to the engine.
Definition at line 854 of file fl_engine.cc.
References event, height, and width.
Referenced by handle_geometry_changed(), and TEST().
void fl_engine_set_platform_message_handler | ( | FlEngine * | engine, |
FlEnginePlatformMessageHandler | handler, | ||
gpointer | user_data, | ||
GDestroyNotify | destroy_notify | ||
) |
fl_engine_set_platform_message_handler: @engine: an #FlEngine. @handler: function to call when a platform message is received. @user_data: (closure): user data to pass to @handler. @destroy_notify: (allow-none): a function which gets called to free @user_data, or NULL.
Registers the function called when a platform message is received. 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 avoid memory leaks.
Definition at line 718 of file fl_engine.cc.
References user_data.
Referenced by fl_binary_messenger_new().
|
static |
Definition at line 394 of file fl_engine.cc.
References prop_id, pspec, and value.
Referenced by fl_engine_class_init().
void fl_engine_set_update_semantics_handler | ( | FlEngine * | engine, |
FlEngineUpdateSemanticsHandler | handler, | ||
gpointer | user_data, | ||
GDestroyNotify | destroy_notify | ||
) |
fl_engine_set_update_semantics_handler: @engine: an #FlEngine. @handler: function to call when a semantics update is received. @user_data: (closure): user data to pass to @handler. @destroy_notify: (allow-none): a function which gets called to free @user_data, or NULL.
Registers the function called when a semantics update is received.
Definition at line 736 of file fl_engine.cc.
References user_data.
Referenced by fl_view_dispose(), and fl_view_new().
gboolean fl_engine_start | ( | FlEngine * | engine, |
GError ** | error | ||
) |
fl_engine_start: @engine: an #FlEngine. @error: (allow-none): #GError location to store the error occurring, or NULL to ignore.
Starts the Flutter engine.
Returns: TRUE on success.
Definition at line 509 of file fl_engine.cc.
References args, compositor_collect_backing_store_callback(), compositor_create_backing_store_callback(), compositor_present_view_callback(), error, 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_ENGINE_ERROR_FAILED, fl_engine_error_quark(), fl_engine_get_switches(), fl_engine_gl_clear_current(), fl_engine_gl_external_texture_frame_callback(), 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_on_pre_engine_restart_cb(), fl_engine_platform_message_cb(), fl_engine_post_task(), fl_engine_runs_task_on_current_thread(), fl_engine_update_semantics_cb(), fl_renderer_get_refresh_rate(), fl_settings_handler_new(), fl_settings_handler_start(), fl_settings_new(), fl_task_runner_new(), kPlatformTaskRunnerIdentifier, result, setup_locales(), and TRUE.
Referenced by make_mock_engine(), realize_cb(), and TEST().
gboolean fl_engine_unregister_external_texture | ( | FlEngine * | engine, |
int64_t | texture_id | ||
) |
fl_engine_unregister_external_texture: @engine: an #FlEngine. @texture_id: the identifier of the texture that is not available anymore.
Tells the Flutter engine that an existing external texture is not available anymore.
Returns: TRUE on success.
Definition at line 988 of file fl_engine.cc.
References texture_id.
Referenced by unregister_texture().
void fl_engine_update_accessibility_features | ( | FlEngine * | engine, |
int32_t | flags | ||
) |
fl_engine_update_accessibility_features: @engine: an #FlEngine. @flags: the features to enable in the accessibility tree.
Tells the Flutter engine to update the flags on the accessibility tree.
Definition at line 1017 of file fl_engine.cc.
References flags.
Referenced by update_settings().
|
static |
|
static |
G_DEFINE_TYPE_WITH_CODE | ( | FlEngine | , |
fl_engine | , | ||
G_TYPE_OBJECT | , | ||
G_IMPLEMENT_INTERFACE(fl_plugin_registry_get_type(), fl_engine_plugin_registry_iface_init) | |||
) |
|
static |
|
static |
Definition at line 158 of file fl_engine.cc.
References free_locale(), i, parse_locale(), and result.
Referenced by fl_engine_start().
|
static |
Definition at line 129 of file fl_engine.cc.
References FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), result, and TRUE.
Referenced by fl_engine_add_view().
|
static |
Definition at line 140 of file fl_engine.cc.
References FL_ENGINE_ERROR_FAILED, fl_engine_error_quark(), result, and TRUE.
Referenced by fl_engine_remove_view().
|
static |
Definition at line 74 of file fl_engine.cc.
Referenced by fl_engine_class_init(), and fl_engine_on_pre_engine_restart_cb().
|
staticconstexpr |
Definition at line 34 of file fl_engine.cc.
Referenced by fl_engine_send_mouse_pointer_event().
|
staticconstexpr |
Definition at line 30 of file fl_engine.cc.
Referenced by fl_engine_start().
|
staticconstexpr |
Definition at line 35 of file fl_engine.cc.
Referenced by fl_engine_send_pointer_pan_zoom_event().