Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::FlutterViewController Class Reference

#include <flutter_view_controller.h>

Public Member Functions

 FlutterViewController (int width, int height, const DartProject &project)
 
virtual ~FlutterViewController ()
 
 FlutterViewController (FlutterViewController const &)=delete
 
FlutterViewControlleroperator= (FlutterViewController const &)=delete
 
FlutterViewId view_id () const
 
FlutterEngineengine () const
 
FlutterViewview () const
 
void ForceRedraw ()
 
std::optional< LRESULTHandleTopLevelWindowProc (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
 

Detailed Description

Definition at line 25 of file flutter_view_controller.h.

Constructor & Destructor Documentation

◆ FlutterViewController() [1/2]

FlutterViewController::FlutterViewController ( int  width,
int  height,
const DartProject project 
)

Definition at line 12 of file flutter_view_controller.cc.

14 {
15 engine_ = std::make_shared<FlutterEngine>(project);
17 engine_->RelinquishEngine());
18 if (!controller_) {
19 std::cerr << "Failed to create view controller." << std::endl;
20 return;
21 }
22 view_ = std::make_unique<FlutterView>(
24}
int32_t height
int32_t width
FlutterDesktopViewControllerRef FlutterDesktopViewControllerCreate(int width, int height, FlutterDesktopEngineRef engine)
FlutterDesktopViewRef FlutterDesktopViewControllerGetView(FlutterDesktopViewControllerRef controller)

◆ ~FlutterViewController()

FlutterViewController::~FlutterViewController ( )
virtual

Definition at line 26 of file flutter_view_controller.cc.

26 {
27 if (controller_) {
29 }
30}
void FlutterDesktopViewControllerDestroy(FlutterDesktopViewControllerRef controller)

◆ FlutterViewController() [2/2]

flutter::FlutterViewController::FlutterViewController ( FlutterViewController const &  )
delete

Member Function Documentation

◆ engine()

FlutterEngine * flutter::FlutterViewController::engine ( ) const
inline

Definition at line 45 of file flutter_view_controller.h.

45{ return engine_.get(); }

◆ ForceRedraw()

void FlutterViewController::ForceRedraw ( )

Definition at line 38 of file flutter_view_controller.cc.

38 {
40}
void FlutterDesktopViewControllerForceRedraw(FlutterDesktopViewControllerRef controller)

◆ HandleTopLevelWindowProc()

std::optional< LRESULT > FlutterViewController::HandleTopLevelWindowProc ( HWND  hwnd,
UINT  message,
WPARAM  wparam,
LPARAM  lparam 
)

Definition at line 42 of file flutter_view_controller.cc.

46 {
49 controller_, hwnd, message, wparam, lparam, &result);
50 return handled ? result : std::optional<LRESULT>(std::nullopt);
51}
GAsyncResult * result
Win32Message message
bool FlutterDesktopViewControllerHandleTopLevelWindowProc(FlutterDesktopViewControllerRef controller, HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
LONG_PTR LRESULT
Definition: windows_types.h:61

◆ operator=()

FlutterViewController & flutter::FlutterViewController::operator= ( FlutterViewController const &  )
delete

◆ view()

FlutterView * flutter::FlutterViewController::view ( ) const
inline

Definition at line 48 of file flutter_view_controller.h.

48{ return view_.get(); }

◆ view_id()

FlutterViewId FlutterViewController::view_id ( ) const

Definition at line 32 of file flutter_view_controller.cc.

32 {
34
35 return static_cast<FlutterViewId>(view_id);
36}
int64_t FlutterViewId
Definition: embedder.h:275
FlutterDesktopViewId FlutterDesktopViewControllerGetViewId(FlutterDesktopViewControllerRef controller)

The documentation for this class was generated from the following files: