Flutter Engine
The Flutter Engine
Macros
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); \
}
struct _Dart_NativeArguments * Dart_NativeArguments
Definition: dart_api.h:3019
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
void DartCall(Sig func, Dart_NativeArguments args)
Definition: dart_args.h:210

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:220

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); \
}

Definition at line 10 of file dart_binding_macros.h.

◆ DART_REGISTER_NATIVE

#define DART_REGISTER_NATIVE (   CLASS,
  METHOD 
)
Value:
{#CLASS "_" #METHOD, CLASS##_##METHOD, \
tonic::IndicesForSignature<decltype(&CLASS::METHOD)>::count + 1, true},
int count
Definition: FontMgrTest.cpp:50

Definition at line 26 of file dart_binding_macros.h.

◆ 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.