Flutter Engine
zircon::dart Namespace Reference

Classes

class  Handle
 
class  HandleDisposition
 
class  HandleWaiter
 
struct  SizedRegion
 
class  System
 

Functions

 IMPLEMENT_WRAPPERTYPEINFO (zircon, Handle)
 
 IMPLEMENT_WRAPPERTYPEINFO (zircon, HandleDisposition)
 
void HandleDisposition_constructor (Dart_NativeArguments args)
 
 IMPLEMENT_WRAPPERTYPEINFO (zircon, HandleWaiter)
 
void Initialize ()
 
 IMPLEMENT_WRAPPERTYPEINFO (zircon, System)
 

Function Documentation

◆ HandleDisposition_constructor()

void zircon::dart::HandleDisposition_constructor ( Dart_NativeArguments  args)

Definition at line 19 of file handle_disposition.cc.

References zircon::dart::HandleDisposition::create(), and tonic::DartCallConstructor().

Referenced by zircon::dart::HandleDisposition::RegisterNatives().

19  {
20  DartCallConstructor(&HandleDisposition::create, args);
21 }
G_BEGIN_DECLS FlValue * args
void DartCallConstructor(Sig func, Dart_NativeArguments args)
Definition: dart_args.h:218

◆ IMPLEMENT_WRAPPERTYPEINFO() [1/4]

zircon::dart::IMPLEMENT_WRAPPERTYPEINFO ( zircon  ,
HandleDisposition   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [2/4]

zircon::dart::IMPLEMENT_WRAPPERTYPEINFO ( zircon  ,
Handle   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [3/4]

zircon::dart::IMPLEMENT_WRAPPERTYPEINFO ( zircon  ,
HandleWaiter   
)

◆ IMPLEMENT_WRAPPERTYPEINFO() [4/4]

zircon::dart::IMPLEMENT_WRAPPERTYPEINFO ( zircon  ,
System   
)

◆ Initialize()

void zircon::dart::Initialize ( )

Definition at line 68 of file natives.cc.

References tonic::DartState::Current(), FML_CHECK, tonic::LogIfError(), and tonic::ToDart().

Referenced by fuchsia::dart::Initialize().

68  {
69  Dart_Handle library = Dart_LookupLibrary(ToDart("dart:zircon"));
70  FML_CHECK(!tonic::LogIfError(library));
71  Dart_Handle result = Dart_SetNativeResolver(
72  library, zircon::dart::NativeLookup, zircon::dart::NativeSymbol);
73  FML_CHECK(!tonic::LogIfError(result));
74 
75  auto dart_state = tonic::DartState::Current();
76  std::unique_ptr<tonic::DartClassProvider> zircon_class_provider(
77  new tonic::DartClassProvider(dart_state, "dart:zircon"));
78  dart_state->class_library().add_provider("zircon",
79  std::move(zircon_class_provider));
80 }
static DartState * Current()
Definition: dart_state.cc:56
GAsyncResult * result
#define FML_CHECK(condition)
Definition: logging.h:68
Dart_Handle ToDart(const T &object)
bool LogIfError(Dart_Handle handle)
Definition: dart_error.cc:15