ffigen library
This is the Dart API for FFIgen. The main entrypoint is the FfiGenerator class.
For most use cases the YAML based API is simpler. See https://pub.flutter-io.cn/packages/ffigen for details.
Classes
- AstNode
- Base class for all AST nodes.
- BindingStyle
-
The style of
dart:ffibindings to generate. - CommentType
- Cpp
- Configuration for C++.
- CppClass
- A C++ class declaration.
- CppMethod
- A C++ method declaration.
- DartOutput
- Configuration for outputting generated Dart bindings.
- Declaration
- A declaration, such as a function or a class.
- DeclNode
- Base class for declaration AST nodes.
- DynamicLibraryBindings
- Generate bindings which take a DynamicLibrary or DynamicLibrary.lookup parameter.
- EnumClass
- An enum declaration.
- EnumConstant
- A constant inside a named enum.
- ExternalVersions
- Target OS version constraints for external platform APIs (such as Objective-C APIs).
- FfiGenerator Apple APIs Objective-C Memory Management Objective-C Method Filtering Dealing with OS Differences Objective-C Runtime Types Objective-C Threading Errors FAQ
-
The generator that generates bindings for
dart:ffifrom C and Objective-C headers. - Field
- A field in a struct or union.
- Func
- A C function declaration.
- Global
- A C global variable declaration.
- ImportedType
- An imported type which will be used in the generated code.
- Input
- The configuration for header parsing of FfiGenerator.
- LibraryImport
- A library import which will be written as an import in the generated file.
- MacroConstant
- A C macro constant declaration.
- NamedNode
- Base class for AST nodes with a name.
- NativeExternalBindings
- Generate bindings with Native external functions.
- ObjCCategory
- An Objective-C category declaration.
- ObjCInterface
- An Objective-C interface (class) declaration.
- ObjCMethod
- An Objective-C method declaration.
- ObjCProtocol
- An Objective-C protocol declaration.
- ObjectiveC
- Configuration for Objective-C.
- Output
- Configuration for outputting bindings.
- PackingValue
- Param
- A function or method parameter.
- Struct
- A C struct declaration.
- SymbolFile
- Typealias
- A C typedef (type alias) declaration.
- Union
- A C union declaration.
- UnnamedEnumConstant
- An unnamed enum constant.
- VarArgFunction
- A specialization of a variadic function with specific argument types.
- Version
- A parsed semantic version number.
- Versions
- Represents a version range constraint with an optional minimum and maximum version.
- Visitor
- Base class for AST visitors that inspect and transform AST nodes.
- YamlConfig
- Provides configurations to other modules.
Enums
- CommentLength
- CommentStyle
- CompoundDependencies
- EnumStyle
- Configuration for how to generate enums.
- TypealiasInclude
-
Controls whether and how a
Typealias(typedef) is included in generated code.
Properties
- iosSdkPath → String
-
The directory within xcodePath where the iOS SDK is installed.
no setter
- iosSdkUri → Uri
-
The directory within xcodePath where the iOS SDK is installed.
no setter
- macSdkPath → String
-
The directory within xcodePath where the macOS SDK is installed.
no setter
- macSdkUri → Uri
-
The directory within xcodePath where the macOS SDK is installed.
no setter
- xcodePath → String
-
The directory where Xcode's APIs are installed.
no setter
- xcodeUri → Uri
-
The directory where Xcode's APIs are installed.
no setter
Functions
-
defaultCompilerOpts(
Logger logger, {bool macIncludeStdLib = true}) → List< String> -
importFromSymbolFile(
Uri symbolFile, {PackageConfig? packageConfig}) → ImportedType? Function(Declaration) -
Returns a function suitable for use as FfiGenerator.importType that
imports declarations defined in the given
symbolFile. -
importFromSymbolFiles(
Iterable< Uri> symbolFiles, {PackageConfig? packageConfig}) → ImportedType? Function(Declaration) -
Returns a function suitable for use as FfiGenerator.importType that
imports declarations defined in the given
symbolFiles.