| // Copyright (c) 2025, 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. | |
| // coverage:ignore-file | |
| // AUTO GENERATED FILE, DO NOT EDIT. | |
| // | |
| // Generated by `package:ffigen`. | |
| // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package | |
| import 'dart:ffi' as ffi; | |
| import 'package:objective_c/objective_c.dart' as objc; | |
| import 'package:ffi/ffi.dart' as pkg_ffi; | |
| const _$objcVersionCheck = objc.ObjCVersionCheck(9, 6); | |
| /// TestClassWrapper | |
| extension type TestClassWrapper._(objc.ObjCObject object$) | |
| implements objc.ObjCObject, objc.NSObject { | |
| /// Constructs a [TestClassWrapper] that points to the same underlying object as [other]. | |
| TestClassWrapper.as(objc.ObjCObject other) : object$ = other { | |
| assert(isA(object$)); | |
| } | |
| /// Constructs a [TestClassWrapper] that wraps the given raw object pointer. | |
| TestClassWrapper.fromPointer( | |
| ffi.Pointer<objc.ObjCObjectImpl> other, { | |
| bool retain = false, | |
| bool release = false, | |
| }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { | |
| assert(isA(object$)); | |
| } | |
| /// Returns whether [obj] is an instance of [TestClassWrapper]. | |
| static bool isA(objc.ObjCObject? obj) => obj == null | |
| ? false | |
| : _objc_msgSend_19nvye5( | |
| obj.ref.pointer, | |
| _sel_isKindOfClass_, | |
| _class_TestClassWrapper, | |
| ); | |
| /// alloc | |
| static TestClassWrapper alloc() { | |
| final $ret = _objc_msgSend_151sglz(_class_TestClassWrapper, _sel_alloc); | |
| return TestClassWrapper.fromPointer($ret, retain: false, release: true); | |
| } | |
| /// allocWithZone: | |
| static TestClassWrapper allocWithZone(ffi.Pointer<objc.NSZone> zone) { | |
| final $ret = _objc_msgSend_1cwp428( | |
| _class_TestClassWrapper, | |
| _sel_allocWithZone_, | |
| zone, | |
| ); | |
| return TestClassWrapper.fromPointer($ret, retain: false, release: true); | |
| } | |
| /// create | |
| static TestClassWrapper create() { | |
| final $ret = _objc_msgSend_151sglz(_class_TestClassWrapper, _sel_create); | |
| return TestClassWrapper.fromPointer($ret, retain: true, release: true); | |
| } | |
| } | |
| extension TestClassWrapper$Methods on TestClassWrapper { | |
| /// myMethod | |
| TestOtherClassWrapper myMethod() { | |
| final _$$ref = object$.ref; | |
| final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_myMethod); | |
| return TestOtherClassWrapper.fromPointer($ret, retain: true, release: true); | |
| } | |
| } | |
| /// TestOtherClassWrapper | |
| extension type TestOtherClassWrapper._(objc.ObjCObject object$) | |
| implements objc.ObjCObject, objc.NSObject { | |
| /// Constructs a [TestOtherClassWrapper] that points to the same underlying object as [other]. | |
| TestOtherClassWrapper.as(objc.ObjCObject other) : object$ = other { | |
| assert(isA(object$)); | |
| } | |
| /// Constructs a [TestOtherClassWrapper] that wraps the given raw object pointer. | |
| TestOtherClassWrapper.fromPointer( | |
| ffi.Pointer<objc.ObjCObjectImpl> other, { | |
| bool retain = false, | |
| bool release = false, | |
| }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { | |
| assert(isA(object$)); | |
| } | |
| /// Returns whether [obj] is an instance of [TestOtherClassWrapper]. | |
| static bool isA(objc.ObjCObject? obj) => obj == null | |
| ? false | |
| : _objc_msgSend_19nvye5( | |
| obj.ref.pointer, | |
| _sel_isKindOfClass_, | |
| _class_TestOtherClassWrapper, | |
| ); | |
| /// alloc | |
| static TestOtherClassWrapper alloc() { | |
| final $ret = _objc_msgSend_151sglz( | |
| _class_TestOtherClassWrapper, | |
| _sel_alloc, | |
| ); | |
| return TestOtherClassWrapper.fromPointer( | |
| $ret, | |
| retain: false, | |
| release: true, | |
| ); | |
| } | |
| /// allocWithZone: | |
| static TestOtherClassWrapper allocWithZone(ffi.Pointer<objc.NSZone> zone) { | |
| final $ret = _objc_msgSend_1cwp428( | |
| _class_TestOtherClassWrapper, | |
| _sel_allocWithZone_, | |
| zone, | |
| ); | |
| return TestOtherClassWrapper.fromPointer( | |
| $ret, | |
| retain: false, | |
| release: true, | |
| ); | |
| } | |
| } | |
| extension TestOtherClassWrapper$Methods on TestOtherClassWrapper { | |
| /// times10WithX: | |
| int times10WithX(int x) { | |
| final _$$ref = object$.ref; | |
| return _objc_msgSend_12hwf9n(_$$ref.pointer, _sel_times10WithX_, x); | |
| } | |
| } | |
| @ffi.Native<ffi.Pointer<objc.ObjCObjectImpl>>( | |
| symbol: 'OBJC_CLASS_\$__TtC7classes16TestClassWrapper', | |
| ) | |
| external ffi.Pointer<objc.ObjCObjectImpl> _class_TestClassWrapper_raw; | |
| final _class_TestClassWrapper = objc.getClass( | |
| "classes.TestClassWrapper", | |
| () => ffi.Native.addressOf<ffi.Pointer<objc.ObjCObjectImpl>>( | |
| _class_TestClassWrapper_raw, | |
| ).cast(), | |
| ); | |
| @ffi.Native<ffi.Pointer<objc.ObjCObjectImpl>>( | |
| symbol: 'OBJC_CLASS_\$__TtC7classes21TestOtherClassWrapper', | |
| ) | |
| external ffi.Pointer<objc.ObjCObjectImpl> _class_TestOtherClassWrapper_raw; | |
| final _class_TestOtherClassWrapper = objc.getClass( | |
| "classes.TestOtherClassWrapper", | |
| () => ffi.Native.addressOf<ffi.Pointer<objc.ObjCObjectImpl>>( | |
| _class_TestOtherClassWrapper_raw, | |
| ).cast(), | |
| ); | |
| final _objc_msgSend_12hwf9n = objc.msgSendPointer | |
| .cast< | |
| ffi.NativeFunction< | |
| ffi.Long Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| ffi.Long, | |
| ) | |
| > | |
| >() | |
| .asFunction< | |
| int Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| int, | |
| ) | |
| >(); | |
| final _objc_msgSend_151sglz = objc.msgSendPointer | |
| .cast< | |
| ffi.NativeFunction< | |
| ffi.Pointer<objc.ObjCObjectImpl> Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| ) | |
| > | |
| >() | |
| .asFunction< | |
| ffi.Pointer<objc.ObjCObjectImpl> Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| ) | |
| >(); | |
| final _objc_msgSend_19nvye5 = objc.msgSendPointer | |
| .cast< | |
| ffi.NativeFunction< | |
| ffi.Bool Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ) | |
| > | |
| >() | |
| .asFunction< | |
| bool Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ) | |
| >(); | |
| final _objc_msgSend_1cwp428 = objc.msgSendPointer | |
| .cast< | |
| ffi.NativeFunction< | |
| ffi.Pointer<objc.ObjCObjectImpl> Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| ffi.Pointer<objc.NSZone>, | |
| ) | |
| > | |
| >() | |
| .asFunction< | |
| ffi.Pointer<objc.ObjCObjectImpl> Function( | |
| ffi.Pointer<objc.ObjCObjectImpl>, | |
| ffi.Pointer<objc.ObjCSelector>, | |
| ffi.Pointer<objc.NSZone>, | |
| ) | |
| >(); | |
| late final _sel_alloc = objc.registerName("alloc"); | |
| late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); | |
| late final _sel_create = objc.registerName("create"); | |
| late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); | |
| late final _sel_myMethod = objc.registerName("myMethod"); | |
| late final _sel_times10WithX_ = objc.registerName("times10WithX:"); | |
| typedef instancetype = ffi.Pointer<objc.ObjCObjectImpl>; | |
| typedef Dartinstancetype = objc.ObjCObject; |