444 lines
18 KiB
Dart
444 lines
18 KiB
Dart
// ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field, return_of_invalid_type, void_checks, annotate_overrides, no_leading_underscores_for_local_identifiers, library_private_types_in_public_apia
|
|
// AUTO GENERATED FILE, DO NOT EDIT.
|
|
//
|
|
// Generated by `package:ffigen`.
|
|
// ignore_for_file: type=lint
|
|
import 'dart:ffi' as ffi;
|
|
import 'package:objective_c/objective_c.dart' as objc;
|
|
|
|
@ffi.Native<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<objc.ObjCObject>, ffi.Pointer<ffi.Void>)>()
|
|
external ffi.Pointer<objc.ObjCObject>
|
|
_ThermionTextureSwift_protocolTrampoline_1mbt9g9(
|
|
ffi.Pointer<objc.ObjCObject> target,
|
|
ffi.Pointer<ffi.Void> arg0,
|
|
);
|
|
|
|
late final _class_ThermionTextureSwift =
|
|
objc.getClass("swift_module.ThermionTextureSwift");
|
|
late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:");
|
|
final _objc_msgSend_19nvye5 = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Bool Function(
|
|
ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>,
|
|
ffi.Pointer<objc.ObjCObject>)>>()
|
|
.asFunction<
|
|
bool Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, ffi.Pointer<objc.ObjCObject>)>();
|
|
late final _sel_cvMetalTextureCache = objc.registerName("cvMetalTextureCache");
|
|
final _objc_msgSend_13yqbb6 = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Int Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>)>>()
|
|
.asFunction<
|
|
int Function(
|
|
ffi.Pointer<objc.ObjCObject>, ffi.Pointer<objc.ObjCSelector>)>();
|
|
late final _sel_setCvMetalTextureCache_ =
|
|
objc.registerName("setCvMetalTextureCache:");
|
|
final _objc_msgSend_9o8504 = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Void Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, ffi.Int)>>()
|
|
.asFunction<
|
|
void Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, int)>();
|
|
|
|
/// WARNING: MTLDevice is a stub. To generate bindings for this class, include
|
|
/// MTLDevice in your config's objc-protocols list.
|
|
///
|
|
/// MTLDevice
|
|
interface class MTLDevice extends objc.ObjCProtocolBase {
|
|
MTLDevice._(ffi.Pointer<objc.ObjCObject> pointer,
|
|
{bool retain = false, bool release = false})
|
|
: super(pointer, retain: retain, release: release);
|
|
|
|
/// Constructs a [MTLDevice] that points to the same underlying object as [other].
|
|
MTLDevice.castFrom(objc.ObjCObjectBase other)
|
|
: this._(other.ref.pointer, retain: true, release: true);
|
|
|
|
/// Constructs a [MTLDevice] that wraps the given raw object pointer.
|
|
MTLDevice.castFromPointer(ffi.Pointer<objc.ObjCObject> other,
|
|
{bool retain = false, bool release = false})
|
|
: this._(other, retain: retain, release: release);
|
|
}
|
|
|
|
late final _sel_metalDevice = objc.registerName("metalDevice");
|
|
final _objc_msgSend_151sglz = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>)>>()
|
|
.asFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<objc.ObjCObject>, ffi.Pointer<objc.ObjCSelector>)>();
|
|
late final _sel_setMetalDevice_ = objc.registerName("setMetalDevice:");
|
|
final _objc_msgSend_xtuoz7 = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Void Function(
|
|
ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>,
|
|
ffi.Pointer<objc.ObjCObject>)>>()
|
|
.asFunction<
|
|
void Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, ffi.Pointer<objc.ObjCObject>)>();
|
|
late final _sel_cvMetalTexture = objc.registerName("cvMetalTexture");
|
|
late final _sel_setCvMetalTexture_ = objc.registerName("setCvMetalTexture:");
|
|
|
|
/// WARNING: MTLTexture is a stub. To generate bindings for this class, include
|
|
/// MTLTexture in your config's objc-protocols list.
|
|
///
|
|
/// MTLTexture
|
|
interface class MTLTexture extends objc.ObjCProtocolBase {
|
|
MTLTexture._(ffi.Pointer<objc.ObjCObject> pointer,
|
|
{bool retain = false, bool release = false})
|
|
: super(pointer, retain: retain, release: release);
|
|
|
|
/// Constructs a [MTLTexture] that points to the same underlying object as [other].
|
|
MTLTexture.castFrom(objc.ObjCObjectBase other)
|
|
: this._(other.ref.pointer, retain: true, release: true);
|
|
|
|
/// Constructs a [MTLTexture] that wraps the given raw object pointer.
|
|
MTLTexture.castFromPointer(ffi.Pointer<objc.ObjCObject> other,
|
|
{bool retain = false, bool release = false})
|
|
: this._(other, retain: retain, release: release);
|
|
}
|
|
|
|
late final _sel_metalTexture = objc.registerName("metalTexture");
|
|
late final _sel_setMetalTexture_ = objc.registerName("setMetalTexture:");
|
|
late final _sel_metalTextureAddress = objc.registerName("metalTextureAddress");
|
|
final _objc_msgSend_1hz7y9r = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Long Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>)>>()
|
|
.asFunction<
|
|
int Function(
|
|
ffi.Pointer<objc.ObjCObject>, ffi.Pointer<objc.ObjCSelector>)>();
|
|
late final _sel_setMetalTextureAddress_ =
|
|
objc.registerName("setMetalTextureAddress:");
|
|
final _objc_msgSend_4sp4xj = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Void Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, ffi.Long)>>()
|
|
.asFunction<
|
|
void Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, int)>();
|
|
typedef instancetype = ffi.Pointer<objc.ObjCObject>;
|
|
typedef Dartinstancetype = objc.ObjCObjectBase;
|
|
late final _sel_init = objc.registerName("init");
|
|
late final _sel_initWithWidth_height_isDepth_ =
|
|
objc.registerName("initWithWidth:height:isDepth:");
|
|
final _objc_msgSend_1gtkwyl = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>,
|
|
ffi.Int64,
|
|
ffi.Int64,
|
|
ffi.Bool)>>()
|
|
.asFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, int, int, bool)>();
|
|
late final _sel_destroyTexture = objc.registerName("destroyTexture");
|
|
final _objc_msgSend_1pl9qdv = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Void Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>)>>()
|
|
.asFunction<
|
|
void Function(
|
|
ffi.Pointer<objc.ObjCObject>, ffi.Pointer<objc.ObjCSelector>)>();
|
|
late final _sel_fillWithPNGImageWithImageURL_ =
|
|
objc.registerName("fillWithPNGImageWithImageURL:");
|
|
late final _sel_fillColor = objc.registerName("fillColor");
|
|
late final _sel_getTextureBytes = objc.registerName("getTextureBytes");
|
|
late final _sel_new = objc.registerName("new");
|
|
late final _sel_allocWithZone_ = objc.registerName("allocWithZone:");
|
|
final _objc_msgSend_1cwp428 = objc.msgSendPointer
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, ffi.Pointer<objc.NSZone>)>>()
|
|
.asFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject>,
|
|
ffi.Pointer<objc.ObjCSelector>, ffi.Pointer<objc.NSZone>)>();
|
|
late final _sel_alloc = objc.registerName("alloc");
|
|
late final _sel_self = objc.registerName("self");
|
|
ffi.Pointer<objc.ObjCObject> _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline(
|
|
ffi.Pointer<objc.ObjCBlockImpl> block, ffi.Pointer<ffi.Void> arg0) =>
|
|
block.ref.target
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<ffi.Void> arg0)>>()
|
|
.asFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<ffi.Void>)>()(arg0);
|
|
ffi.Pointer<ffi.Void> _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable =
|
|
ffi.Pointer.fromFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<objc.ObjCBlockImpl>, ffi.Pointer<ffi.Void>)>(
|
|
_ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline)
|
|
.cast();
|
|
ffi.Pointer<objc.ObjCObject>
|
|
_ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline(
|
|
ffi.Pointer<objc.ObjCBlockImpl> block,
|
|
ffi.Pointer<ffi.Void> arg0) =>
|
|
(objc.getBlockClosure(block) as ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<ffi.Void>))(arg0);
|
|
ffi.Pointer<ffi.Void> _ObjCBlock_objcObjCObject_ffiVoid_closureCallable =
|
|
ffi.Pointer.fromFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<objc.ObjCBlockImpl>, ffi.Pointer<ffi.Void>)>(
|
|
_ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline)
|
|
.cast();
|
|
|
|
/// Construction methods for `objc.ObjCBlock<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>`.
|
|
abstract final class ObjCBlock_objcObjCObject_ffiVoid {
|
|
/// Returns a block that wraps the given raw block pointer.
|
|
static objc
|
|
.ObjCBlock<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>
|
|
castFromPointer(ffi.Pointer<objc.ObjCBlockImpl> pointer,
|
|
{bool retain = false, bool release = false}) =>
|
|
objc.ObjCBlock<
|
|
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>(
|
|
pointer,
|
|
retain: retain,
|
|
release: release);
|
|
|
|
/// Creates a block from a C function pointer.
|
|
///
|
|
/// This block must be invoked by native code running on the same thread as
|
|
/// the isolate that registered it. Invoking the block on the wrong thread
|
|
/// will result in a crash.
|
|
static objc.ObjCBlock<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>
|
|
fromFunctionPointer(
|
|
ffi.Pointer<
|
|
ffi.NativeFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<ffi.Void> arg0)>>
|
|
ptr) =>
|
|
objc.ObjCBlock<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>(
|
|
objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()),
|
|
retain: false,
|
|
release: true);
|
|
|
|
/// Creates a block from a Dart function.
|
|
///
|
|
/// This block must be invoked by native code running on the same thread as
|
|
/// the isolate that registered it. Invoking the block on the wrong thread
|
|
/// will result in a crash.
|
|
///
|
|
/// If `keepIsolateAlive` is true, this block will keep this isolate alive
|
|
/// until it is garbage collected by both Dart and ObjC.
|
|
static objc
|
|
.ObjCBlock<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>
|
|
fromFunction(objc.ObjCObjectBase Function(ffi.Pointer<ffi.Void>) fn,
|
|
{bool keepIsolateAlive = true}) =>
|
|
objc.ObjCBlock<
|
|
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>(
|
|
objc.newClosureBlock(
|
|
_ObjCBlock_objcObjCObject_ffiVoid_closureCallable,
|
|
(ffi.Pointer<ffi.Void> arg0) =>
|
|
fn(arg0).ref.retainAndAutorelease(),
|
|
keepIsolateAlive),
|
|
retain: false,
|
|
release: true);
|
|
}
|
|
|
|
/// Call operator for `objc.ObjCBlock<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)>`.
|
|
extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc
|
|
.ObjCBlock<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<ffi.Void>)> {
|
|
objc.ObjCObjectBase call(ffi.Pointer<ffi.Void> arg0) => objc.ObjCObjectBase(
|
|
ref.pointer.ref.invoke
|
|
.cast<
|
|
ffi.NativeFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<objc.ObjCBlockImpl> block,
|
|
ffi.Pointer<ffi.Void> arg0)>>()
|
|
.asFunction<
|
|
ffi.Pointer<objc.ObjCObject> Function(
|
|
ffi.Pointer<objc.ObjCBlockImpl>,
|
|
ffi.Pointer<ffi.Void>)>()(ref.pointer, arg0),
|
|
retain: true,
|
|
release: true);
|
|
}
|
|
|
|
late final _sel_retain = objc.registerName("retain");
|
|
late final _sel_autorelease = objc.registerName("autorelease");
|
|
|
|
/// ThermionTextureSwift
|
|
class ThermionTextureSwift extends objc.NSObject {
|
|
ThermionTextureSwift._(ffi.Pointer<objc.ObjCObject> pointer,
|
|
{bool retain = false, bool release = false})
|
|
: super.castFromPointer(pointer, retain: retain, release: release);
|
|
|
|
/// Constructs a [ThermionTextureSwift] that points to the same underlying object as [other].
|
|
ThermionTextureSwift.castFrom(objc.ObjCObjectBase other)
|
|
: this._(other.ref.pointer, retain: true, release: true);
|
|
|
|
/// Constructs a [ThermionTextureSwift] that wraps the given raw object pointer.
|
|
ThermionTextureSwift.castFromPointer(ffi.Pointer<objc.ObjCObject> other,
|
|
{bool retain = false, bool release = false})
|
|
: this._(other, retain: retain, release: release);
|
|
|
|
/// Returns whether [obj] is an instance of [ThermionTextureSwift].
|
|
static bool isInstance(objc.ObjCObjectBase obj) {
|
|
return _objc_msgSend_19nvye5(
|
|
obj.ref.pointer, _sel_isKindOfClass_, _class_ThermionTextureSwift);
|
|
}
|
|
|
|
/// cvMetalTextureCache
|
|
int get cvMetalTextureCache {
|
|
return _objc_msgSend_13yqbb6(this.ref.pointer, _sel_cvMetalTextureCache);
|
|
}
|
|
|
|
/// setCvMetalTextureCache:
|
|
set cvMetalTextureCache(int value) {
|
|
_objc_msgSend_9o8504(this.ref.pointer, _sel_setCvMetalTextureCache_, value);
|
|
}
|
|
|
|
/// metalDevice
|
|
MTLDevice? get metalDevice {
|
|
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_metalDevice);
|
|
return _ret.address == 0
|
|
? null
|
|
: MTLDevice.castFromPointer(_ret, retain: true, release: true);
|
|
}
|
|
|
|
/// setMetalDevice:
|
|
set metalDevice(MTLDevice? value) {
|
|
_objc_msgSend_xtuoz7(this.ref.pointer, _sel_setMetalDevice_,
|
|
value?.ref.pointer ?? ffi.nullptr);
|
|
}
|
|
|
|
/// cvMetalTexture
|
|
int get cvMetalTexture {
|
|
return _objc_msgSend_13yqbb6(this.ref.pointer, _sel_cvMetalTexture);
|
|
}
|
|
|
|
/// setCvMetalTexture:
|
|
set cvMetalTexture(int value) {
|
|
_objc_msgSend_9o8504(this.ref.pointer, _sel_setCvMetalTexture_, value);
|
|
}
|
|
|
|
/// metalTexture
|
|
MTLTexture? get metalTexture {
|
|
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_metalTexture);
|
|
return _ret.address == 0
|
|
? null
|
|
: MTLTexture.castFromPointer(_ret, retain: true, release: true);
|
|
}
|
|
|
|
/// setMetalTexture:
|
|
set metalTexture(MTLTexture? value) {
|
|
_objc_msgSend_xtuoz7(this.ref.pointer, _sel_setMetalTexture_,
|
|
value?.ref.pointer ?? ffi.nullptr);
|
|
}
|
|
|
|
/// metalTextureAddress
|
|
int get metalTextureAddress {
|
|
return _objc_msgSend_1hz7y9r(this.ref.pointer, _sel_metalTextureAddress);
|
|
}
|
|
|
|
/// setMetalTextureAddress:
|
|
set metalTextureAddress(int value) {
|
|
_objc_msgSend_4sp4xj(this.ref.pointer, _sel_setMetalTextureAddress_, value);
|
|
}
|
|
|
|
/// init
|
|
ThermionTextureSwift init() {
|
|
final _ret =
|
|
_objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: false, release: true);
|
|
}
|
|
|
|
/// initWithWidth:height:isDepth:
|
|
ThermionTextureSwift initWithWidth_height_isDepth_(
|
|
int width, int height, bool isDepth) {
|
|
final _ret = _objc_msgSend_1gtkwyl(this.ref.retainAndReturnPointer(),
|
|
_sel_initWithWidth_height_isDepth_, width, height, isDepth);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: false, release: true);
|
|
}
|
|
|
|
/// destroyTexture
|
|
void destroyTexture() {
|
|
_objc_msgSend_1pl9qdv(this.ref.pointer, _sel_destroyTexture);
|
|
}
|
|
|
|
/// fillWithPNGImageWithImageURL:
|
|
bool fillWithPNGImageWithImageURL_(objc.NSURL imageURL) {
|
|
return _objc_msgSend_19nvye5(this.ref.pointer,
|
|
_sel_fillWithPNGImageWithImageURL_, imageURL.ref.pointer);
|
|
}
|
|
|
|
/// fillColor
|
|
void fillColor() {
|
|
_objc_msgSend_1pl9qdv(this.ref.pointer, _sel_fillColor);
|
|
}
|
|
|
|
/// getTextureBytes
|
|
objc.NSData? getTextureBytes() {
|
|
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_getTextureBytes);
|
|
return _ret.address == 0
|
|
? null
|
|
: objc.NSData.castFromPointer(_ret, retain: true, release: true);
|
|
}
|
|
|
|
/// new
|
|
static ThermionTextureSwift new$() {
|
|
final _ret = _objc_msgSend_151sglz(_class_ThermionTextureSwift, _sel_new);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: false, release: true);
|
|
}
|
|
|
|
/// allocWithZone:
|
|
static ThermionTextureSwift allocWithZone_(ffi.Pointer<objc.NSZone> zone) {
|
|
final _ret = _objc_msgSend_1cwp428(
|
|
_class_ThermionTextureSwift, _sel_allocWithZone_, zone);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: false, release: true);
|
|
}
|
|
|
|
/// alloc
|
|
static ThermionTextureSwift alloc() {
|
|
final _ret = _objc_msgSend_151sglz(_class_ThermionTextureSwift, _sel_alloc);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: false, release: true);
|
|
}
|
|
|
|
/// self
|
|
ThermionTextureSwift self$1() {
|
|
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: true, release: true);
|
|
}
|
|
|
|
/// retain
|
|
ThermionTextureSwift retain() {
|
|
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: true, release: true);
|
|
}
|
|
|
|
/// autorelease
|
|
ThermionTextureSwift autorelease() {
|
|
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease);
|
|
return ThermionTextureSwift.castFromPointer(_ret,
|
|
retain: true, release: true);
|
|
}
|
|
|
|
/// Returns a new instance of ThermionTextureSwift constructed with the default `new` method.
|
|
factory ThermionTextureSwift() => new$();
|
|
}
|