blob: ff8280e5075626459b605265920876572a39b205 [file]
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint, unused_import
@ffi.DefaultAsset('package:ffigen/objc_test')
library;
import 'dart:ffi' as ffi;
import 'package:objective_c/objective_c.dart' as objc;
import 'package:ffi/ffi.dart' as pkg_ffi;
@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>()
external void objc_autoreleasePoolPop(ffi.Pointer<ffi.Void> pool);
@ffi.Native<ffi.Pointer<ffi.Void> Function()>()
external ffi.Pointer<ffi.Void> objc_autoreleasePoolPush();
/// ArcDtorTestObject
extension type ArcDtorTestObject._(objc.ObjCObject object$)
implements objc.ObjCObject, objc.NSObject {
/// Constructs a [ArcDtorTestObject] that points to the same underlying object as [other].
ArcDtorTestObject.as(objc.ObjCObject other) : object$ = other {
assert(isA(object$));
}
/// Constructs a [ArcDtorTestObject] that wraps the given raw object pointer.
ArcDtorTestObject.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 [ArcDtorTestObject].
static bool isA(objc.ObjCObject? obj) => obj == null
? false
: _objc_msgSend_19nvye5(
obj.ref.pointer,
_sel_isKindOfClass_,
_class_ArcDtorTestObject,
);
/// alloc
static ArcDtorTestObject alloc() {
final $ret = _objc_msgSend_151sglz(_class_ArcDtorTestObject, _sel_alloc);
return ArcDtorTestObject.fromPointer($ret, retain: false, release: true);
}
/// allocWithZone:
static ArcDtorTestObject allocWithZone(ffi.Pointer<objc.NSZone> zone) {
final $ret = _objc_msgSend_1cwp428(
_class_ArcDtorTestObject,
_sel_allocWithZone_,
zone,
);
return ArcDtorTestObject.fromPointer($ret, retain: false, release: true);
}
/// new
static ArcDtorTestObject new$() {
final $ret = _objc_msgSend_151sglz(_class_ArcDtorTestObject, _sel_new);
return ArcDtorTestObject.fromPointer($ret, retain: false, release: true);
}
/// Returns a new instance of ArcDtorTestObject constructed with the default `new` method.
ArcDtorTestObject() : this.as(new$().object$);
}
extension ArcDtorTestObject$Methods on ArcDtorTestObject {
/// init
ArcDtorTestObject init() {
objc.checkOsVersionInternal(
'ArcDtorTestObject.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
object$.ref.retainAndReturnPointer(),
_sel_init,
);
return ArcDtorTestObject.fromPointer($ret, retain: false, release: true);
}
/// initWithCounters:onMainThread:
ArcDtorTestObject initWithCounters(
ffi.Pointer<ffi.Int32> _dtorCounter, {
required ffi.Pointer<ffi.Int32> onMainThread,
}) {
final $ret = _objc_msgSend_b5hsh3(
object$.ref.retainAndReturnPointer(),
_sel_initWithCounters_onMainThread_,
_dtorCounter,
onMainThread,
);
return ArcDtorTestObject.fromPointer($ret, retain: false, release: true);
}
}
/// ArcTestObject
extension type ArcTestObject._(objc.ObjCObject object$)
implements objc.ObjCObject, objc.NSObject {
/// Constructs a [ArcTestObject] that points to the same underlying object as [other].
ArcTestObject.as(objc.ObjCObject other) : object$ = other {
assert(isA(object$));
}
/// Constructs a [ArcTestObject] that wraps the given raw object pointer.
ArcTestObject.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 [ArcTestObject].
static bool isA(objc.ObjCObject? obj) => obj == null
? false
: _objc_msgSend_19nvye5(
obj.ref.pointer,
_sel_isKindOfClass_,
_class_ArcTestObject,
);
/// alloc
static ArcTestObject alloc() {
final $ret = _objc_msgSend_151sglz(_class_ArcTestObject, _sel_alloc);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// allocTheThing
static ArcTestObject allocTheThing() {
final $ret = _objc_msgSend_151sglz(
_class_ArcTestObject,
_sel_allocTheThing,
);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// allocWithZone:
static ArcTestObject allocWithZone(ffi.Pointer<objc.NSZone> zone) {
final $ret = _objc_msgSend_1cwp428(
_class_ArcTestObject,
_sel_allocWithZone_,
zone,
);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// consumeArg:
static void consumeArg(ArcTestObject arg) {
_objc_msgSend_4js6t(
_class_ArcTestObject,
_sel_consumeArg_,
arg.ref.retainAndReturnPointer(),
);
}
/// makeAndAutorelease:
static ArcTestObject makeAndAutorelease(ffi.Pointer<ffi.Int32> _counter) {
final $ret = _objc_msgSend_129vhbw(
_class_ArcTestObject,
_sel_makeAndAutorelease_,
_counter,
);
return ArcTestObject.fromPointer($ret, retain: true, release: true);
}
/// new
static ArcTestObject new$() {
final $ret = _objc_msgSend_151sglz(_class_ArcTestObject, _sel_new);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// newWithCounter:
static ArcTestObject newWithCounter(ffi.Pointer<ffi.Int32> _counter) {
final $ret = _objc_msgSend_129vhbw(
_class_ArcTestObject,
_sel_newWithCounter_,
_counter,
);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// Returns a new instance of ArcTestObject constructed with the default `new` method.
ArcTestObject() : this.as(new$().object$);
}
extension ArcTestObject$Methods on ArcTestObject {
/// assignedProperty
ArcTestObject get assignedProperty {
final $ret = _objc_msgSend_151sglz(
object$.ref.pointer,
_sel_assignedProperty,
);
return ArcTestObject.fromPointer($ret, retain: true, release: true);
}
/// copiedProperty
ArcTestObject get copiedProperty {
final $ret = _objc_msgSend_151sglz(
object$.ref.pointer,
_sel_copiedProperty,
);
return ArcTestObject.fromPointer($ret, retain: true, release: true);
}
/// copyMe
ArcTestObject copyMe() {
final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_copyMe);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// copyMeAutorelease
ArcTestObject copyMeAutorelease() {
final $ret = _objc_msgSend_151sglz(
object$.ref.pointer,
_sel_copyMeAutorelease,
);
return ArcTestObject.fromPointer($ret, retain: true, release: true);
}
/// copyMeConsumeSelf
ArcTestObject copyMeConsumeSelf() {
final $ret = _objc_msgSend_151sglz(
object$.ref.retainAndReturnPointer(),
_sel_copyMeConsumeSelf,
);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// copyMeNoRetain
ArcTestObject copyMeNoRetain() {
final $ret = _objc_msgSend_151sglz(
object$.ref.pointer,
_sel_copyMeNoRetain,
);
return ArcTestObject.fromPointer($ret, retain: true, release: true);
}
/// copyWithZone:
objc.ObjCObject copyWithZone$1(ffi.Pointer<objc.NSZone> zone) {
final $ret = _objc_msgSend_1cwp428(
object$.ref.pointer,
_sel_copyWithZone_,
zone,
);
return objc.ObjCObject($ret, retain: false, release: true);
}
/// dealloc
void dealloc() {
_objc_msgSend_1pl9qdv(object$.ref.pointer, _sel_dealloc);
}
/// init
ArcTestObject init() {
objc.checkOsVersionInternal(
'ArcTestObject.init',
iOS: (false, (2, 0, 0)),
macOS: (false, (10, 0, 0)),
);
final $ret = _objc_msgSend_151sglz(
object$.ref.retainAndReturnPointer(),
_sel_init,
);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// initWithCounter:
ArcTestObject initWithCounter(ffi.Pointer<ffi.Int32> _counter) {
final $ret = _objc_msgSend_129vhbw(
object$.ref.retainAndReturnPointer(),
_sel_initWithCounter_,
_counter,
);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// mutableCopyMe
ArcTestObject mutableCopyMe() {
final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mutableCopyMe);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// retainedProperty
ArcTestObject get retainedProperty {
final $ret = _objc_msgSend_151sglz(
object$.ref.pointer,
_sel_retainedProperty,
);
return ArcTestObject.fromPointer($ret, retain: true, release: true);
}
/// returnsRetained
ArcTestObject returnsRetained() {
final $ret = _objc_msgSend_151sglz(
object$.ref.pointer,
_sel_returnsRetained,
);
return ArcTestObject.fromPointer($ret, retain: false, release: true);
}
/// setAssignedProperty:
set assignedProperty(ArcTestObject value) {
_objc_msgSend_xtuoz7(
object$.ref.pointer,
_sel_setAssignedProperty_,
value.ref.pointer,
);
}
/// setCopiedProperty:
set copiedProperty(ArcTestObject value) {
_objc_msgSend_xtuoz7(
object$.ref.pointer,
_sel_setCopiedProperty_,
value.ref.pointer,
);
}
/// setCounter:
void setCounter(ffi.Pointer<ffi.Int32> _counter) {
_objc_msgSend_yhkuco(object$.ref.pointer, _sel_setCounter_, _counter);
}
/// setRetainedProperty:
set retainedProperty(ArcTestObject value) {
_objc_msgSend_xtuoz7(
object$.ref.pointer,
_sel_setRetainedProperty_,
value.ref.pointer,
);
}
}
late final _class_ArcDtorTestObject = objc.getClass("ArcDtorTestObject");
late final _class_ArcTestObject = objc.getClass("ArcTestObject");
final _objc_msgSend_129vhbw = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObjectImpl> Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<ffi.Int32>,
)
>
>()
.asFunction<
ffi.Pointer<objc.ObjCObjectImpl> Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<ffi.Int32>,
)
>();
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>,
)
>();
final _objc_msgSend_1pl9qdv = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
)
>
>()
.asFunction<
void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
)
>();
final _objc_msgSend_4js6t = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<objc.ObjCObjectImpl>,
)
>
>()
.asFunction<
void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<objc.ObjCObjectImpl>,
)
>();
final _objc_msgSend_b5hsh3 = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObjectImpl> Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<ffi.Int32>,
ffi.Pointer<ffi.Int32>,
)
>
>()
.asFunction<
ffi.Pointer<objc.ObjCObjectImpl> Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<ffi.Int32>,
ffi.Pointer<ffi.Int32>,
)
>();
final _objc_msgSend_xtuoz7 = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<objc.ObjCObjectImpl>,
)
>
>()
.asFunction<
void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<objc.ObjCObjectImpl>,
)
>();
final _objc_msgSend_yhkuco = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<ffi.Int32>,
)
>
>()
.asFunction<
void Function(
ffi.Pointer<objc.ObjCObjectImpl>,
ffi.Pointer<objc.ObjCSelector>,
ffi.Pointer<ffi.Int32>,
)
>();
late final _sel_alloc = objc.registerName("alloc");
late final _sel_allocTheThing = objc.registerName("allocTheThing");
late final _sel_allocWithZone_ = objc.registerName("allocWithZone:");
late final _sel_assignedProperty = objc.registerName("assignedProperty");
late final _sel_consumeArg_ = objc.registerName("consumeArg:");
late final _sel_copiedProperty = objc.registerName("copiedProperty");
late final _sel_copyMe = objc.registerName("copyMe");
late final _sel_copyMeAutorelease = objc.registerName("copyMeAutorelease");
late final _sel_copyMeConsumeSelf = objc.registerName("copyMeConsumeSelf");
late final _sel_copyMeNoRetain = objc.registerName("copyMeNoRetain");
late final _sel_copyWithZone_ = objc.registerName("copyWithZone:");
late final _sel_dealloc = objc.registerName("dealloc");
late final _sel_init = objc.registerName("init");
late final _sel_initWithCounter_ = objc.registerName("initWithCounter:");
late final _sel_initWithCounters_onMainThread_ = objc.registerName(
"initWithCounters:onMainThread:",
);
late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:");
late final _sel_makeAndAutorelease_ = objc.registerName("makeAndAutorelease:");
late final _sel_mutableCopyMe = objc.registerName("mutableCopyMe");
late final _sel_new = objc.registerName("new");
late final _sel_newWithCounter_ = objc.registerName("newWithCounter:");
late final _sel_retainedProperty = objc.registerName("retainedProperty");
late final _sel_returnsRetained = objc.registerName("returnsRetained");
late final _sel_setAssignedProperty_ = objc.registerName(
"setAssignedProperty:",
);
late final _sel_setCopiedProperty_ = objc.registerName("setCopiedProperty:");
late final _sel_setCounter_ = objc.registerName("setCounter:");
late final _sel_setRetainedProperty_ = objc.registerName(
"setRetainedProperty:",
);
typedef instancetype = ffi.Pointer<objc.ObjCObjectImpl>;
typedef Dartinstancetype = objc.ObjCObject;