| # Generate bindings for the C headers. |
| # Regenerate bindings with `dart run tool/generate_code.dart`. |
| name: CBindings |
| output: 'lib/src/c_bindings_generated.dart' |
| headers: |
| entry-points: |
| - 'src/include/dart_api_dl.h' |
| - 'src/objective_c.h' |
| - 'src/objective_c_runtime.h' |
| ffi-native: |
| assetId: 'objective_c.framework/objective_c' |
| exclude-all-by-default: true |
| generate-for-package-objective-c: true |
| functions: |
| include: |
| - 'objc_.*' |
| - 'object_getClass' |
| - 'sel_registerName' |
| - 'protocol_getMethodDescription' |
| - 'disposeObjCBlockWithClosure' |
| - 'isValidBlock' |
| - 'isValidObject' |
| - 'Dart_InitializeApiDL' |
| - 'newFinalizableHandle' |
| - 'newBlockFinalizableHandle' |
| - 'deleteFinalizableHandle' |
| - 'newFinalizableBool' |
| leaf: |
| include: |
| - '.*' |
| exclude: |
| - 'objc_msgSend.*' |
| - 'disposeObjCBlockWithClosure' |
| - 'newFinalizableHandle' |
| - 'deleteFinalizableHandle' |
| - 'newFinalizableBool' |
| rename: |
| 'sel_registerName': 'registerName' |
| 'objc_getClass': 'getClass' |
| 'objc_retain': 'objectRetain' |
| 'objc_retainBlock': 'blockRetain' |
| 'objc_release': 'objectRelease' |
| 'objc_autorelease': 'objectAutorelease' |
| 'objc_msgSend': 'msgSend' |
| 'objc_msgSend_fpret': 'msgSendFpret' |
| 'objc_msgSend_stret': 'msgSendStret' |
| 'object_getClass': 'getObjectClass' |
| 'objc_copyClassList': 'copyClassList' |
| 'objc_getProtocol': 'getProtocol' |
| 'protocol_getMethodDescription': 'getMethodDescription' |
| globals: |
| include: |
| - '_NSConcrete.*Block' |
| rename: |
| '_(.*)': '$1' |
| typedefs: |
| include: |
| - 'ObjC.*' |
| - 'Dart_FinalizableHandle' |
| preamble: | |
| // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| |
| // Bindings for `src/objective_c.h` and `src/objective_c_runtime.h`. |
| // Regenerate bindings with `dart run tool/generate_code.dart`. |
| |
| // ignore_for_file: always_specify_types |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: unused_element |
| // coverage:ignore-file |