5#ifndef FLUTTER_TESTING_TEST_DART_NATIVE_RESOLVER_H_
6#define FLUTTER_TESTING_TEST_DART_NATIVE_RESOLVER_H_
13#include "flutter/fml/macros.h"
14#include "third_party/dart/runtime/include/dart_api.h"
16#define CREATE_NATIVE_ENTRY(native_entry) \
18 static ::flutter::testing::NativeEntry closure; \
19 static Dart_NativeFunction entrypoint = [](Dart_NativeArguments args) { \
22 closure = (native_entry); \
32 :
public std::enable_shared_from_this<TestDartNativeResolver> {
44 std::map<std::string, Dart_NativeFunction> native_callbacks_;
45 std::map<std::string, void*> ffi_native_callbacks_;
48 void* ResolveFfiCallback(
const std::string&
name)
const;
53 bool* auto_setup_scope);
54 static void* FfiNativeResolver(
const char*
name, uintptr_t args_n);
void AddFfiNativeCallback(const std::string &name, void *callback_ptr)
void SetNativeResolverForIsolate()
void AddNativeCallback(const std::string &name, Dart_NativeFunction callback)
~TestDartNativeResolver()
struct _Dart_Handle * Dart_Handle
struct _Dart_NativeArguments * Dart_NativeArguments
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
std::function< void(Dart_NativeArguments)> NativeEntry
DEF_SWITCHES_START aot vmservice shared library name