Skip to content

Commit

Permalink
Merged main
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Lesches committed Jan 21, 2025
2 parents 1d86663 + 3ed5d3d commit bf5d11c
Show file tree
Hide file tree
Showing 105 changed files with 2,487 additions and 1,089 deletions.
80 changes: 38 additions & 42 deletions pkgs/ffigen/example/objective_c/avf_audio_bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import 'dart:ffi' as ffi;
import 'package:objective_c/objective_c.dart' as objc;

final class _NSZone extends ffi.Opaque {}

final class AudioStreamBasicDescription extends ffi.Struct {
@ffi.Double()
external double mSampleRate;
Expand Down Expand Up @@ -214,7 +212,7 @@ class AVAudioFormat extends objc.NSObject {

late final _class_AVAudioPlayer = objc.getClass("AVAudioPlayer");
late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:");
final _objc_msgSend_69e0x1 = objc.msgSendPointer
final _objc_msgSend_19nvye5 = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Bool Function(
Expand All @@ -228,7 +226,7 @@ typedef instancetype = ffi.Pointer<objc.ObjCObject>;
typedef Dartinstancetype = objc.ObjCObjectBase;
late final _sel_initWithContentsOfURL_error_ =
objc.registerName("initWithContentsOfURL:error:");
final _objc_msgSend_1705co6 = objc.msgSendPointer
final _objc_msgSend_1lhpu4m = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObject> Function(
Expand All @@ -245,7 +243,7 @@ final _objc_msgSend_1705co6 = objc.msgSendPointer
late final _sel_initWithData_error_ = objc.registerName("initWithData:error:");
late final _sel_initWithContentsOfURL_fileTypeHint_error_ =
objc.registerName("initWithContentsOfURL:fileTypeHint:error:");
final _objc_msgSend_bo6ep4 = objc.msgSendPointer
final _objc_msgSend_1pnyuds = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObject> Function(
Expand Down Expand Up @@ -320,7 +318,7 @@ final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer
double Function(
ffi.Pointer<objc.ObjCObject>, ffi.Pointer<objc.ObjCSelector>)>();
late final _sel_currentDevice = objc.registerName("currentDevice");
final _objc_msgSend_1x359cv = objc.msgSendPointer
final _objc_msgSend_151sglz = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject>,
Expand All @@ -329,7 +327,7 @@ final _objc_msgSend_1x359cv = objc.msgSendPointer
ffi.Pointer<objc.ObjCObject> Function(
ffi.Pointer<objc.ObjCObject>, ffi.Pointer<objc.ObjCSelector>)>();
late final _sel_setCurrentDevice_ = objc.registerName("setCurrentDevice:");
final _objc_msgSend_1jdvcbf = objc.msgSendPointer
final _objc_msgSend_xtuoz7 = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Void Function(
Expand Down Expand Up @@ -453,14 +451,14 @@ late final _sel_setChannelAssignments_ =
late final _sel_init = objc.registerName("init");
late final _sel_new = objc.registerName("new");
late final _sel_allocWithZone_ = objc.registerName("allocWithZone:");
final _objc_msgSend_hzlb60 = objc.msgSendPointer
final _objc_msgSend_1cwp428 = objc.msgSendPointer
.cast<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject>,
ffi.Pointer<objc.ObjCSelector>, ffi.Pointer<_NSZone>)>>()
ffi.Pointer<objc.ObjCSelector>, ffi.Pointer<objc.NSZone>)>>()
.asFunction<
ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject>,
ffi.Pointer<objc.ObjCSelector>, ffi.Pointer<_NSZone>)>();
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(
Expand Down Expand Up @@ -578,14 +576,14 @@ class AVAudioPlayer extends objc.NSObject {

/// Returns whether [obj] is an instance of [AVAudioPlayer].
static bool isInstance(objc.ObjCObjectBase obj) {
return _objc_msgSend_69e0x1(
return _objc_msgSend_19nvye5(
obj.ref.pointer, _sel_isKindOfClass_, _class_AVAudioPlayer);
}

/// initWithContentsOfURL:error:
AVAudioPlayer? initWithContentsOfURL_error_(
objc.NSURL url, ffi.Pointer<ffi.Pointer<objc.ObjCObject>> outError) {
final _ret = _objc_msgSend_1705co6(this.ref.retainAndReturnPointer(),
final _ret = _objc_msgSend_1lhpu4m(this.ref.retainAndReturnPointer(),
_sel_initWithContentsOfURL_error_, url.ref.pointer, outError);
return _ret.address == 0
? null
Expand All @@ -595,7 +593,7 @@ class AVAudioPlayer extends objc.NSObject {
/// initWithData:error:
AVAudioPlayer? initWithData_error_(
objc.NSData data, ffi.Pointer<ffi.Pointer<objc.ObjCObject>> outError) {
final _ret = _objc_msgSend_1705co6(this.ref.retainAndReturnPointer(),
final _ret = _objc_msgSend_1lhpu4m(this.ref.retainAndReturnPointer(),
_sel_initWithData_error_, data.ref.pointer, outError);
return _ret.address == 0
? null
Expand All @@ -607,7 +605,7 @@ class AVAudioPlayer extends objc.NSObject {
objc.NSURL url,
objc.NSString? utiString,
ffi.Pointer<ffi.Pointer<objc.ObjCObject>> outError) {
final _ret = _objc_msgSend_bo6ep4(
final _ret = _objc_msgSend_1pnyuds(
this.ref.retainAndReturnPointer(),
_sel_initWithContentsOfURL_fileTypeHint_error_,
url.ref.pointer,
Expand All @@ -623,7 +621,7 @@ class AVAudioPlayer extends objc.NSObject {
objc.NSData data,
objc.NSString? utiString,
ffi.Pointer<ffi.Pointer<objc.ObjCObject>> outError) {
final _ret = _objc_msgSend_bo6ep4(
final _ret = _objc_msgSend_1pnyuds(
this.ref.retainAndReturnPointer(),
_sel_initWithData_fileTypeHint_error_,
data.ref.pointer,
Expand Down Expand Up @@ -678,43 +676,43 @@ class AVAudioPlayer extends objc.NSObject {

/// currentDevice
objc.NSString? get currentDevice {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_currentDevice);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_currentDevice);
return _ret.address == 0
? null
: objc.NSString.castFromPointer(_ret, retain: true, release: true);
}

/// setCurrentDevice:
set currentDevice(objc.NSString? value) {
return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setCurrentDevice_,
_objc_msgSend_xtuoz7(this.ref.pointer, _sel_setCurrentDevice_,
value?.ref.pointer ?? ffi.nullptr);
}

/// delegate
objc.ObjCObjectBase? get delegate {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_delegate);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_delegate);
return _ret.address == 0
? null
: objc.ObjCObjectBase(_ret, retain: true, release: true);
}

/// setDelegate:
set delegate(objc.ObjCObjectBase? value) {
return _objc_msgSend_1jdvcbf(
_objc_msgSend_xtuoz7(
this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr);
}

/// url
objc.NSURL? get url {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_url);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_url);
return _ret.address == 0
? null
: objc.NSURL.castFromPointer(_ret, retain: true, release: true);
}

/// data
objc.NSData? get data {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_data);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_data);
return _ret.address == 0
? null
: objc.NSData.castFromPointer(_ret, retain: true, release: true);
Expand All @@ -729,7 +727,7 @@ class AVAudioPlayer extends objc.NSObject {

/// setPan:
set pan(double value) {
return _objc_msgSend_v5hmet(this.ref.pointer, _sel_setPan_, value);
_objc_msgSend_v5hmet(this.ref.pointer, _sel_setPan_, value);
}

/// volume
Expand All @@ -741,7 +739,7 @@ class AVAudioPlayer extends objc.NSObject {

/// setVolume:
set volume(double value) {
return _objc_msgSend_v5hmet(this.ref.pointer, _sel_setVolume_, value);
_objc_msgSend_v5hmet(this.ref.pointer, _sel_setVolume_, value);
}

/// setVolume:fadeDuration:
Expand All @@ -757,7 +755,7 @@ class AVAudioPlayer extends objc.NSObject {

/// setEnableRate:
set enableRate(bool value) {
return _objc_msgSend_1s56lr9(this.ref.pointer, _sel_setEnableRate_, value);
_objc_msgSend_1s56lr9(this.ref.pointer, _sel_setEnableRate_, value);
}

/// rate
Expand All @@ -769,7 +767,7 @@ class AVAudioPlayer extends objc.NSObject {

/// setRate:
set rate(double value) {
return _objc_msgSend_v5hmet(this.ref.pointer, _sel_setRate_, value);
_objc_msgSend_v5hmet(this.ref.pointer, _sel_setRate_, value);
}

/// currentTime
Expand All @@ -781,7 +779,7 @@ class AVAudioPlayer extends objc.NSObject {

/// setCurrentTime:
set currentTime(double value) {
return _objc_msgSend_hwm8nu(this.ref.pointer, _sel_setCurrentTime_, value);
_objc_msgSend_hwm8nu(this.ref.pointer, _sel_setCurrentTime_, value);
}

/// deviceCurrentTime
Expand All @@ -798,19 +796,18 @@ class AVAudioPlayer extends objc.NSObject {

/// setNumberOfLoops:
set numberOfLoops(int value) {
return _objc_msgSend_4sp4xj(
this.ref.pointer, _sel_setNumberOfLoops_, value);
_objc_msgSend_4sp4xj(this.ref.pointer, _sel_setNumberOfLoops_, value);
}

/// settings
objc.NSDictionary get settings {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_settings);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_settings);
return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true);
}

/// format
AVAudioFormat get format {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_format);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_format);
return AVAudioFormat.castFromPointer(_ret, retain: true, release: true);
}

Expand All @@ -821,8 +818,7 @@ class AVAudioPlayer extends objc.NSObject {

/// setMeteringEnabled:
set meteringEnabled(bool value) {
return _objc_msgSend_1s56lr9(
this.ref.pointer, _sel_setMeteringEnabled_, value);
_objc_msgSend_1s56lr9(this.ref.pointer, _sel_setMeteringEnabled_, value);
}

/// updateMeters
Expand Down Expand Up @@ -851,59 +847,59 @@ class AVAudioPlayer extends objc.NSObject {
/// channelAssignments
objc.NSArray? get channelAssignments {
final _ret =
_objc_msgSend_1x359cv(this.ref.pointer, _sel_channelAssignments);
_objc_msgSend_151sglz(this.ref.pointer, _sel_channelAssignments);
return _ret.address == 0
? null
: objc.NSArray.castFromPointer(_ret, retain: true, release: true);
}

/// setChannelAssignments:
set channelAssignments(objc.NSArray? value) {
return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setChannelAssignments_,
_objc_msgSend_xtuoz7(this.ref.pointer, _sel_setChannelAssignments_,
value?.ref.pointer ?? ffi.nullptr);
}

/// init
AVAudioPlayer init() {
final _ret =
_objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init);
_objc_msgSend_151sglz(this.ref.retainAndReturnPointer(), _sel_init);
return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true);
}

/// new
static AVAudioPlayer new1() {
final _ret = _objc_msgSend_1x359cv(_class_AVAudioPlayer, _sel_new);
final _ret = _objc_msgSend_151sglz(_class_AVAudioPlayer, _sel_new);
return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true);
}

/// allocWithZone:
static AVAudioPlayer allocWithZone_(ffi.Pointer<_NSZone> zone) {
static AVAudioPlayer allocWithZone_(ffi.Pointer<objc.NSZone> zone) {
final _ret =
_objc_msgSend_hzlb60(_class_AVAudioPlayer, _sel_allocWithZone_, zone);
_objc_msgSend_1cwp428(_class_AVAudioPlayer, _sel_allocWithZone_, zone);
return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true);
}

/// alloc
static AVAudioPlayer alloc() {
final _ret = _objc_msgSend_1x359cv(_class_AVAudioPlayer, _sel_alloc);
final _ret = _objc_msgSend_151sglz(_class_AVAudioPlayer, _sel_alloc);
return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true);
}

/// self
AVAudioPlayer self() {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self);
return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true);
}

/// retain
AVAudioPlayer retain() {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_retain);
return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true);
}

/// autorelease
AVAudioPlayer autorelease() {
final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease);
final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_autorelease);
return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true);
}
}
Loading

0 comments on commit bf5d11c

Please sign in to comment.