dart:ffi library
Foreign Function Interface for interoperability with the C programming language.
For further details, please see:https://dart.dev/server/c-interop.
Classes
- Abi
- An application binary interface (ABI).
- AbiSpecificInteger
- The supertype of allAbi-specific integer types.
- AbiSpecificIntegerMapping
- Mapping for a subtype ofAbiSpecificInteger.
- Allocator
- Manages memory on the native heap.
- Array<
T extendsNativeType> - A fixed-sized array of
Ts. - Bool
- Represents a native bool in C.
- Char
- The C
chartype. - Dart_CObject
- Opaque, not exposing it's members.
- DartRepresentationOf
- DefaultAsset
- Annotation specifying the default asset ID for the current library.
- Double
- Represents a native 64 bit double in C.
- DynamicLibrary
- A dynamically loaded native library.
- Finalizable
- Marker interface for objects which should not be finalized too soon.
- Float
- Represents a native 32 bit float in C.
- Handle
- Represents
Dart_Handlefromdart_api.hin C. - Int
- The C
inttype. - Int16
- Represents a native signed 16 bit integer in C.
- Int32
- Represents a native signed 32 bit integer in C.
- Int64
- Represents a native signed 64 bit integer in C.
- Int8
- Represents a native signed 8 bit integer in C.
- IntPtr
- The C
intptr_ttype. - Long
- The C
long int, aka.long, type. - LongLong
- The C
long longtype. - Native<
T> - Annotation binding an external declaration to its native implementation.
- NativeApi
- Utilities for accessing the Dart VM API from Dart code orfrom C code via
dart_api_dl.h. - NativeCallable<
T extendsFunction> - A native callable which listens for calls to a native function.
- NativeFinalizer
- A native finalizer which can be attached to Dart objects.
- NativeFunction<
T extendsFunction> - Represents a function type in C.
- NativeType
- NativeType's subtypes represent a native type in C.
- Opaque
- Opaque's subtypes represent opaque types in C.
- Packed
- Annotation to specify on
Structsubtypes to indicate that its membersneed to be packed. - Pointer<
T extendsNativeType> - Represents a pointer into the native C memory. Cannot be extended.
- Short
- The C
shorttype. - SignedChar
- The C
signed chartype. - Size
- The C
size_ttype. - SizedNativeType
- ANativeType with a known size.
- Struct
- The supertype of all FFI struct types.
- Uint16
- Represents a native unsigned 16 bit integer in C.
- Uint32
- Represents a native unsigned 32 bit integer in C.
- Uint64
- Represents a native unsigned 64 bit integer in C.
- Uint8
- Represents a native unsigned 8 bit integer in C.
- UintPtr
- The C
uintptr_ttype. - Union
- The supertype of all FFI union types.
- UnsignedChar
- The C
unsigned chartype. - UnsignedInt
- The C
unsigned inttype. - UnsignedLong
- The C
unsigned long int, aka.unsigned long, type. - UnsignedLongLong
- The C
unsigned long longtype. - UnsignedShort
- The C
unsigned shorttype. - VarArgs<
T extendsRecord> - The types of variadic arguments passed in C.
- Void
- Represents a void type in C.
- WChar
- The C
wchar_ttype.
Extensions
- AbiSpecificIntegerArray onArray<
T> - Bounds checking indexing methods onArrays ofAbiSpecificInteger.
- AbiSpecificIntegerPointer onPointer<
T> - Extension onPointer specialized for the type argumentAbiSpecificInteger.
- AllocatorAlloc onAllocator
- Extension onAllocator to provide allocation withNativeType.
- ArrayAddress onArray<
T> - ArrayArray onArray<
Array< T> > - Bounds checking indexing methods onArrays ofArray.
- BoolAddress onbool
- BoolArray onArray<
Bool> - Bounds checking indexing methods onArrays ofBool.
- BoolPointer onPointer<
Bool> - Extension onPointer specialized for the type argumentBool.
- DoubleAddress ondouble
- DoubleArray onArray<
Double> - Bounds checking indexing methods onArrays ofDouble.
- DoublePointer onPointer<
Double> - Extension onPointer specialized for the type argumentDouble.
- DynamicLibraryExtension onDynamicLibrary
- Method which must not be invoked dynamically.
- Float32ListAddress onFloat32List
- Float64ListAddress onFloat64List
- FloatArray onArray<
Float> - Bounds checking indexing methods onArrays ofFloat.
- FloatPointer onPointer<
Float> - Extension onPointer specialized for the type argumentFloat.
- Int16Array onArray<
Int16> - Bounds checking indexing methods onArrays ofInt16.
- Int16ListAddress onInt16List
- Int16Pointer onPointer<
Int16> - Extension onPointer specialized for the type argumentInt16.
- Int32Array onArray<
Int32> - Bounds checking indexing methods onArrays ofInt32.
- Int32ListAddress onInt32List
- Int32Pointer onPointer<
Int32> - Extension onPointer specialized for the type argumentInt32.
- Int64Array onArray<
Int64> - Bounds checking indexing methods onArrays ofInt64.
- Int64ListAddress onInt64List
- Int64Pointer onPointer<
Int64> - Extension onPointer specialized for the type argumentInt64.
- Int8Array onArray<
Int8> - Bounds checking indexing methods onArrays ofInt8.
- Int8ListAddress onInt8List
- Int8Pointer onPointer<
Int8> - Extension onPointer specialized for the type argumentInt8.
- IntAddress onint
- NativeFunctionPointer onPointer<
NativeFunction< NF> > - Extension onPointer specialized for the type argumentNativeFunction.
- NativePort onSendPort
- Extension to retrieve the native
Dart_Portfrom aSendPort. - PointerArray onArray<
Pointer< T> > - Bounds checking indexing methods onArrays ofPointer.
- PointerPointer onPointer<
Pointer< T> > - Extension onPointer specialized for the type argumentPointer.
- StructAddress on T
- StructArray onArray<
T> - Bounds checking indexing methods onArrays ofStruct.
- StructPointer onPointer<
T> - Extension onPointer specialized for the type argumentStruct.
- Uint16Array onArray<
Uint16> - Bounds checking indexing methods onArrays ofUint16.
- Uint16ListAddress onUint16List
- Uint16Pointer onPointer<
Uint16> - Extension onPointer specialized for the type argumentUint16.
- Uint32Array onArray<
Uint32> - Bounds checking indexing methods onArrays ofUint32.
- Uint32ListAddress onUint32List
- Uint32Pointer onPointer<
Uint32> - Extension onPointer specialized for the type argumentUint32.
- Uint64Array onArray<
Uint64> - Bounds checking indexing methods onArrays ofUint64.
- Uint64ListAddress onUint64List
- Uint64Pointer onPointer<
Uint64> - Extension onPointer specialized for the type argumentUint64.
- Uint8Array onArray<
Uint8> - Bounds checking indexing methods onArrays ofUint8.
- Uint8ListAddress onUint8List
- Uint8Pointer onPointer<
Uint8> - Extension onPointer specialized for the type argumentUint8.
- UnionAddress on T
- UnionArray onArray<
T> - Bounds checking indexing methods onArrays ofUnion.
- UnionPointer onPointer<
T> - Extension onPointer specialized for the type argumentUnion.
Properties
Functions
- sizeOf<
T extendsSizedNativeType> ()→int - Number of bytes used by native type T.
Typedefs
- Dart_NativeMessageHandler=Void Function(Int64,Pointer<
Dart_CObject> ) - NativeFinalizerFunction =NativeFunction<
Void Function(Pointer< Void> token)> - The native function type forNativeFinalizers.