Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
fl_view_monitor.h File Reference

Go to the source code of this file.

Functions

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (FlViewMonitor, fl_view_monitor, FL, VIEW_MONITOR, GObject)
 
FlViewMonitor * fl_view_monitor_new (FlView *view, void(*on_first_frame)(void))
 

Function Documentation

◆ fl_view_monitor_new()

FlViewMonitor * fl_view_monitor_new ( FlView *  view,
void(*)(void)  on_first_frame 
)

fl_view_monitor_new: @view: the view being monitored. @on_first_frame: the function to call when the first frame is rendered.

Helper class to allow the Flutter engine to monitor a FlView using FFI. Callbacks are called in the isolate this class was created with.

Returns: a new #FlViewMonitor.

Definition at line 49 of file fl_view_monitor.cc.

51 {
52 FlViewMonitor* self =
53 FL_VIEW_MONITOR(g_object_new(fl_view_monitor_get_type(), nullptr));
54
55 self->view = FL_VIEW(g_object_ref(view));
57 self->on_first_frame = on_first_frame;
58 g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb),
59 self);
60
61 return self;
62}
static Isolate Current()
static void first_frame_cb(FlViewMonitor *self)

References flutter::Isolate::Current(), first_frame_cb(), self, and view.

◆ G_DECLARE_FINAL_TYPE()

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE ( FlViewMonitor  ,
fl_view_monitor  ,
FL  ,
VIEW_MONITOR  ,
GObject   
)