Flutter Engine
The Flutter Engine
Classes | Macros | Typedefs | Functions
dart_api_dl.h File Reference
#include "dart_api.h"
#include "dart_native_api.h"

Go to the source code of this file.

Classes

struct  Dart_PortEx_DL
 

Macros

#define DART_NATIVE_API_DL_SYMBOLS(F)
 
#define DART_API_DL_SYMBOLS(F)
 
#define DART_API_DEPRECATED_DL_SYMBOLS(F)
 
#define DART_API_ALL_DL_SYMBOLS(F)
 
#define DART_API_DL_DECLARATIONS(name, R, A)
 

Typedefs

typedef int64_t Dart_Port_DL
 
typedef void(* Dart_NativeMessageHandler_DL) (Dart_Port_DL dest_port_id, Dart_CObject *message)
 

Functions

DART_EXPORT intptr_t Dart_InitializeApiDL (void *data)
 

Macro Definition Documentation

◆ DART_API_ALL_DL_SYMBOLS

#define DART_API_ALL_DL_SYMBOLS (   F)
Value:
DART_API_DL_SYMBOLS(F)
#define DART_NATIVE_API_DL_SYMBOLS(F)
Definition: dart_api_dl.h:50
Definition: SkMD5.cpp:120

Definition at line 123 of file dart_api_dl.h.

◆ DART_API_DEPRECATED_DL_SYMBOLS

#define DART_API_DEPRECATED_DL_SYMBOLS (   F)
Value:
F(Dart_UpdateExternalSize, void, \
(Dart_WeakPersistentHandle object, intptr_t external_allocation_size)) \
F(Dart_UpdateFinalizableExternalSize, void, \
(Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object, \
intptr_t external_allocation_size))
#define F(x)
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
struct _Dart_FinalizableHandle * Dart_FinalizableHandle
Definition: dart_api.h:261
struct _Dart_WeakPersistentHandle * Dart_WeakPersistentHandle
Definition: dart_api.h:260

Definition at line 116 of file dart_api_dl.h.

◆ DART_API_DL_DECLARATIONS

#define DART_API_DL_DECLARATIONS (   name,
  R,
  A 
)
Value:
typedef R(*name##_Type) A; \
DART_EXPORT_DL name##_Type name##_DL;
#define R(r)
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

Definition at line 161 of file dart_api_dl.h.

◆ DART_API_DL_SYMBOLS

#define DART_API_DL_SYMBOLS (   F)

Definition at line 61 of file dart_api_dl.h.

◆ DART_NATIVE_API_DL_SYMBOLS

#define DART_NATIVE_API_DL_SYMBOLS (   F)
Value:
/***** dart_native_api.h *****/ \
/* Dart_Port */ \
F(Dart_PostInteger, bool, (Dart_Port_DL port_id, int64_t message)) \
(const char* name, Dart_NativeMessageHandler_DL handler, \
bool handle_concurrently)) \
F(Dart_CloseNativePort, bool, (Dart_Port_DL native_port_id))
void(* Dart_NativeMessageHandler_DL)(Dart_Port_DL dest_port_id, Dart_CObject *message)
Definition: dart_api_dl.h:46
int64_t Dart_Port_DL
Definition: dart_api_dl.h:40
DART_EXPORT bool Dart_PostInteger(Dart_Port port_id, int64_t message)
DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject *message)
DART_EXPORT Dart_Port Dart_NewNativePort(const char *name, Dart_NativeMessageHandler handler, bool handle_concurrently)
DART_EXPORT bool Dart_CloseNativePort(Dart_Port native_port_id)
Win32Message message

Definition at line 50 of file dart_api_dl.h.

Typedef Documentation

◆ Dart_NativeMessageHandler_DL

typedef void(* Dart_NativeMessageHandler_DL) (Dart_Port_DL dest_port_id, Dart_CObject *message)

Definition at line 46 of file dart_api_dl.h.

◆ Dart_Port_DL

typedef int64_t Dart_Port_DL

Definition at line 40 of file dart_api_dl.h.

Function Documentation

◆ Dart_InitializeApiDL()

DART_EXPORT intptr_t Dart_InitializeApiDL ( void *  data)

Definition at line 45 of file dart_api_dl.c.

45 {
47
49 // If the DartVM we're running on does not have the same version as this
50 // file was compiled against, refuse to initialize. The symbols are not
51 // compatible.
52 return -1;
53 }
54 // Minor versions are allowed to be different.
55 // If the DartVM has a higher minor version, it will provide more symbols
56 // than we initialize here.
57 // If the DartVM has a lower minor version, it will not provide all symbols.
58 // In that case, we leave the missing symbols un-initialized. Those symbols
59 // should not be used by the Dart and native code. The client is responsible
60 // for checking the minor version number himself based on which symbols it
61 // is using.
62 // (If we would error out on this case, recompiling native code against a
63 // newer SDK would break all uses on older SDKs, which is too strict.)
64
65 const DartApiEntry* dart_api_function_pointers = dart_api_data->functions;
66
67#define DART_API_DL_INIT(name, R, A) \
68 name##_DL = \
69 (name##_Type)(FindFunctionPointer(dart_api_function_pointers, #name));
71#undef DART_API_DL_INIT
72
73#define DART_API_DEPRECATED_DL_INIT(name, R, A) \
74 name##_DL = name##_Deprecated;
76#undef DART_API_DEPRECATED_DL_INIT
77
78 return 0;
79}
#define DART_API_DL_INIT(name, R, A)
#define DART_API_DEPRECATED_DL_INIT(name, R, A)
#define DART_API_ALL_DL_SYMBOLS(F)
Definition: dart_api_dl.h:123
#define DART_API_DEPRECATED_DL_SYMBOLS(F)
Definition: dart_api_dl.h:116
#define DART_API_DL_MAJOR_VERSION
Definition: dart_version.h:13
static const DartApi dart_api_data
Definition: ffi.cc:93
const int major
const DartApiEntry *const functions
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63