Flutter Engine
flutter::PlatformHandler Class Referenceabstract

#include <platform_handler.h>

Inheritance diagram for flutter::PlatformHandler:
flutter::PlatformHandlerWin32 flutter::PlatformHandlerWinUwp

Public Member Functions

 PlatformHandler (flutter::BinaryMessenger *messenger, GLFWwindow *window)
 
 PlatformHandler (BinaryMessenger *messenger)
 
virtual ~PlatformHandler ()
 

Static Public Member Functions

static std::unique_ptr< PlatformHandlerCreate (BinaryMessenger *messenger, FlutterWindowsView *view)
 

Protected Member Functions

virtual void GetPlainText (std::unique_ptr< MethodResult< rapidjson::Document >> result, std::string_view key)=0
 
virtual void GetHasStrings (std::unique_ptr< MethodResult< rapidjson::Document >> result)=0
 
virtual void SetPlainText (const std::string &text, std::unique_ptr< MethodResult< rapidjson::Document >> result)=0
 

Static Protected Attributes

static constexpr char kClipboardError [] = "Clipboard error"
 

Detailed Description

Definition at line 18 of file platform_handler.h.

Constructor & Destructor Documentation

◆ PlatformHandler() [1/2]

flutter::PlatformHandler::PlatformHandler ( flutter::BinaryMessenger messenger,
GLFWwindow *  window 
)
explicit

Definition at line 26 of file platform_handler.cc.

28  : channel_(std::make_unique<flutter::MethodChannel<rapidjson::Document>>(
29  messenger,
32  window_(window) {
33  channel_->SetMethodCallHandler(
34  [this](
37  HandleMethodCall(call, std::move(result));
38  });
39 }
static const JsonMethodCodec & GetInstance()
GAsyncResult * result
static constexpr char kChannelName[]

◆ PlatformHandler() [2/2]

flutter::PlatformHandler::PlatformHandler ( BinaryMessenger messenger)
explicit

Definition at line 23 of file platform_handler.cc.

References flutter::MethodCall< T >::arguments(), format, GetHasStrings(), GetPlainText(), kClipboardError, kGetClipboardDataMethod, kHasStringsClipboardMethod, kSetClipboardDataMethod, kTextKey, kTextPlainFormat, kUnknownClipboardFormatMessage, method_call, flutter::MethodCall< T >::method_name(), result, SetPlainText(), and ~PlatformHandler().

24  : channel_(std::make_unique<MethodChannel<rapidjson::Document>>(
25  messenger,
28  channel_->SetMethodCallHandler(
29  [this](const MethodCall<rapidjson::Document>& call,
30  std::unique_ptr<MethodResult<rapidjson::Document>> result) {
31  HandleMethodCall(call, std::move(result));
32  });
33 }
static const JsonMethodCodec & GetInstance()
GAsyncResult * result
static constexpr char kChannelName[]

◆ ~PlatformHandler()

flutter::PlatformHandler::~PlatformHandler ( )
virtualdefault

Referenced by PlatformHandler().

Member Function Documentation

◆ Create()

std::unique_ptr< PlatformHandler > flutter::PlatformHandler::Create ( BinaryMessenger messenger,
FlutterWindowsView view 
)
static

Definition at line 191 of file platform_handler_win32.cc.

References view.

Referenced by flutter::FlutterWindowsView::SetEngine().

193  {
194  return std::make_unique<PlatformHandlerWin32>(messenger, view);
195 }
FlView * view

◆ GetHasStrings()

virtual void flutter::PlatformHandler::GetHasStrings ( std::unique_ptr< MethodResult< rapidjson::Document >>  result)
protectedpure virtual

◆ GetPlainText()

virtual void flutter::PlatformHandler::GetPlainText ( std::unique_ptr< MethodResult< rapidjson::Document >>  result,
std::string_view  key 
)
protectedpure virtual

◆ SetPlainText()

virtual void flutter::PlatformHandler::SetPlainText ( const std::string &  text,
std::unique_ptr< MethodResult< rapidjson::Document >>  result 
)
protectedpure virtual

Member Data Documentation

◆ kClipboardError


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