Flutter Engine
dart_binding_macros.h File Reference
#include "tonic/dart_args.h"

Go to the source code of this file.

Macros

#define DART_NATIVE_NO_UI_CHECK_CALLBACK(CLASS, METHOD)
 
#define DART_NATIVE_CALLBACK(CLASS, METHOD)
 
#define DART_NATIVE_CALLBACK_STATIC(CLASS, METHOD)
 
#define DART_REGISTER_NATIVE(CLASS, METHOD)
 
#define DART_REGISTER_NATIVE_STATIC(CLASS, METHOD)
 
#define DART_BIND_ALL(CLASS, FOR_EACH)
 

Macro Definition Documentation

◆ DART_BIND_ALL

#define DART_BIND_ALL (   CLASS,
  FOR_EACH 
)
Value:
void CLASS::RegisterNatives(tonic::DartLibraryNatives* natives) { \
natives->Register({FOR_EACH(DART_REGISTER_NATIVE)}); \
}
#define DART_NATIVE_CALLBACK(CLASS, METHOD)
#define DART_REGISTER_NATIVE(CLASS, METHOD)

Definition at line 36 of file dart_binding_macros.h.

◆ DART_NATIVE_CALLBACK

#define DART_NATIVE_CALLBACK (   CLASS,
  METHOD 
)
Value:
static void CLASS##_##METHOD(Dart_NativeArguments args) { \
UIDartState::ThrowIfUIOperationsProhibited(); \
tonic::DartCall(&CLASS::METHOD, args); \
}
void DartCall(Sig func, Dart_NativeArguments args)
Definition: dart_args.h:198

Definition at line 15 of file dart_binding_macros.h.

◆ DART_NATIVE_CALLBACK_STATIC

#define DART_NATIVE_CALLBACK_STATIC (   CLASS,
  METHOD 
)
Value:
static void CLASS##_##METHOD(Dart_NativeArguments args) { \
tonic::DartCallStatic(&CLASS::METHOD, args); \
}
void DartCallStatic(Sig func, Dart_NativeArguments args)
Definition: dart_args.h:208

Definition at line 21 of file dart_binding_macros.h.

◆ DART_NATIVE_NO_UI_CHECK_CALLBACK

#define DART_NATIVE_NO_UI_CHECK_CALLBACK (   CLASS,
  METHOD 
)
Value:
static void CLASS##_##METHOD(Dart_NativeArguments args) { \
tonic::DartCall(&CLASS::METHOD, args); \
}
void DartCall(Sig func, Dart_NativeArguments args)
Definition: dart_args.h:198

Definition at line 10 of file dart_binding_macros.h.

◆ DART_REGISTER_NATIVE

◆ DART_REGISTER_NATIVE_STATIC

#define DART_REGISTER_NATIVE_STATIC (   CLASS,
  METHOD 
)
Value:
{ \
#CLASS "_" #METHOD, CLASS##_##METHOD, \
tonic::IndicesForSignature < decltype(&CLASS::METHOD)> ::count, true \
}

Definition at line 30 of file dart_binding_macros.h.