Go to the source code of this file.
Functions | |
G_BEGIN_DECLS G_MODULE_EXPORT FlView * | fl_view_new (FlDartProject *project) |
FlView * | fl_view_new_for_engine (FlEngine *engine) |
FlEngine * | fl_view_get_engine (FlView *view) |
int64_t | fl_view_get_id (FlView *view) |
void | fl_view_set_background_color (FlView *view, const GdkRGBA *color) |
FlEngine* fl_view_get_engine | ( | FlView * | view | ) |
fl_view_get_engine: @view: an #FlView.
Gets the engine being rendered in the view.
Returns: an #FlEngine.
Definition at line 874 of file fl_view.cc.
Referenced by TEST().
int64_t fl_view_get_id | ( | FlView * | view | ) |
fl_view_get_id: @view: an #FlView.
Gets the Flutter view ID used by this view.
Returns: a view ID or -1 if now ID assigned.
Definition at line 880 of file fl_view.cc.
Referenced by TEST().
G_BEGIN_DECLS G_MODULE_EXPORT FlView* fl_view_new | ( | FlDartProject * | project | ) |
FlView:
#FlView is a GTK widget that is capable of displaying a Flutter application.
The following example shows how to set up a view in a GTK application: |[ FlDartProject *project = fl_dart_project_new (); FlView *view = fl_view_new (project); gtk_widget_show (GTK_WIDGET (view)); gtk_container_add (GTK_CONTAINER (parent), view);
FlBinaryMessenger *messenger = fl_engine_get_binary_messenger (fl_view_get_engine (view)); setup_channels_or_plugins (messenger); ]| fl_view_new: @project: The project to show.
Creates a widget to show a Flutter application.
Returns: a new #FlView.
Definition at line 829 of file fl_view.cc.
References create_context_cb(), fl_engine_get_renderer(), fl_engine_new(), fl_engine_set_update_semantics_handler(), on_pre_engine_restart_cb(), realize_cb(), unrealize_cb(), and update_semantics_cb().
Referenced by fl_application_activate(), and TEST().
FlView* fl_view_new_for_engine | ( | FlEngine * | engine | ) |
fl_view_new_for_engine: @engine: an #FlEngine.
Creates a widget to show a window in a Flutter application. The engine must be not be headless.
Returns: a new #FlView.
Definition at line 855 of file fl_view.cc.
References fl_engine_add_view(), fl_engine_get_renderer(), fl_renderer_add_view(), on_pre_engine_restart_cb(), and view_added_cb().
Referenced by TEST().
void fl_view_set_background_color | ( | FlView * | view, |
const GdkRGBA * | color | ||
) |
fl_view_set_background_color: @view: an #FlView. @color: a background color.
Set the background color for Flutter (defaults to black).
Definition at line 885 of file fl_view.cc.