Skip to content

Commit

Permalink
Prepare to publish ffigen 16 and objective_c 4 (#1720)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe authored Nov 15, 2024
1 parent d65584a commit d0b4bd6
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkgs/ffigen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 16.0.0-wip
## 16.0.0

- Ensure all protocols referenced in bindings are available at runtime.
- Use `package:dart_style` directly to format generated Dart code, rather than
Expand Down
2 changes: 1 addition & 1 deletion pkgs/ffigen/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.

name: ffigen
version: 16.0.0-wip
version: 16.0.0
description: >
Generator for FFI bindings, using LibClang to parse C, Objective-C, and Swift
files.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/objective_c/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 4.0.0-wip
## 4.0.0

- Use ffigen 16.0.0
- Add `NSOrderedCollectionDifference` to the package.
Expand Down
1 change: 1 addition & 0 deletions pkgs/objective_c/ffigen_objc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ objc-categories:
include:
- NSDataCreation
- NSExtendedMutableData
- NSNumberCreation
- NSStringExtensionMethods
structs:
include:
Expand Down
1 change: 1 addition & 0 deletions pkgs/objective_c/lib/objective_c.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export 'src/objective_c_bindings_generated.dart'
NSMutableString,
NSNotification,
NSNumber,
NSNumberCreation,
NSObject,
NSOrderedCollectionDifference,
NSOrderedCollectionDifferenceCalculationOptions,
Expand Down
129 changes: 129 additions & 0 deletions pkgs/objective_c/lib/src/objective_c_bindings_generated.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4766,6 +4766,114 @@ class NSNumber extends NSValue {
}
}

/// NSNumberCreation
extension NSNumberCreation on NSNumber {
/// numberWithBool:
static NSNumber numberWithBool_(bool value) {
final _ret =
_objc_msgSend_1l3kbc1(_class_NSNumber, _sel_numberWithBool_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithChar:
static NSNumber numberWithChar_(int value) {
final _ret =
_objc_msgSend_vx1f2d(_class_NSNumber, _sel_numberWithChar_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithDouble:
static NSNumber numberWithDouble_(double value) {
final _ret =
_objc_msgSend_1x911p2(_class_NSNumber, _sel_numberWithDouble_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithFloat:
static NSNumber numberWithFloat_(double value) {
final _ret =
_objc_msgSend_1f4qa0h(_class_NSNumber, _sel_numberWithFloat_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithInt:
static NSNumber numberWithInt_(int value) {
final _ret =
_objc_msgSend_1a0iyvk(_class_NSNumber, _sel_numberWithInt_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithInteger:
static NSNumber numberWithInteger_(int value) {
final _ret =
_objc_msgSend_8o14b(_class_NSNumber, _sel_numberWithInteger_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithLong:
static NSNumber numberWithLong_(int value) {
final _ret =
_objc_msgSend_8o14b(_class_NSNumber, _sel_numberWithLong_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithLongLong:
static NSNumber numberWithLongLong_(int value) {
final _ret =
_objc_msgSend_94zdgv(_class_NSNumber, _sel_numberWithLongLong_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithShort:
static NSNumber numberWithShort_(int value) {
final _ret =
_objc_msgSend_cvzqr9(_class_NSNumber, _sel_numberWithShort_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithUnsignedChar:
static NSNumber numberWithUnsignedChar_(int value) {
final _ret = _objc_msgSend_uzucl8(
_class_NSNumber, _sel_numberWithUnsignedChar_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithUnsignedInt:
static NSNumber numberWithUnsignedInt_(int value) {
final _ret = _objc_msgSend_12mhqtk(
_class_NSNumber, _sel_numberWithUnsignedInt_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithUnsignedInteger:
static NSNumber numberWithUnsignedInteger_(int value) {
final _ret = _objc_msgSend_1qrcblu(
_class_NSNumber, _sel_numberWithUnsignedInteger_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithUnsignedLong:
static NSNumber numberWithUnsignedLong_(int value) {
final _ret = _objc_msgSend_1qrcblu(
_class_NSNumber, _sel_numberWithUnsignedLong_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithUnsignedLongLong:
static NSNumber numberWithUnsignedLongLong_(int value) {
final _ret = _objc_msgSend_98pnic(
_class_NSNumber, _sel_numberWithUnsignedLongLong_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}

/// numberWithUnsignedShort:
static NSNumber numberWithUnsignedShort_(int value) {
final _ret = _objc_msgSend_onx6bi(
_class_NSNumber, _sel_numberWithUnsignedShort_, value);
return NSNumber.castFromPointer(_ret, retain: true, release: true);
}
}

/// NSObject
class NSObject extends objc.ObjCObjectBase {
NSObject._(ffi.Pointer<objc.ObjCObject> pointer,
Expand Down Expand Up @@ -13011,6 +13119,27 @@ late final _sel_notificationWithName_object_ =
late final _sel_notificationWithName_object_userInfo_ =
objc.registerName("notificationWithName:object:userInfo:");
late final _sel_numberOfArguments = objc.registerName("numberOfArguments");
late final _sel_numberWithBool_ = objc.registerName("numberWithBool:");
late final _sel_numberWithChar_ = objc.registerName("numberWithChar:");
late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:");
late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:");
late final _sel_numberWithInt_ = objc.registerName("numberWithInt:");
late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:");
late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:");
late final _sel_numberWithLong_ = objc.registerName("numberWithLong:");
late final _sel_numberWithShort_ = objc.registerName("numberWithShort:");
late final _sel_numberWithUnsignedChar_ =
objc.registerName("numberWithUnsignedChar:");
late final _sel_numberWithUnsignedInt_ =
objc.registerName("numberWithUnsignedInt:");
late final _sel_numberWithUnsignedInteger_ =
objc.registerName("numberWithUnsignedInteger:");
late final _sel_numberWithUnsignedLongLong_ =
objc.registerName("numberWithUnsignedLongLong:");
late final _sel_numberWithUnsignedLong_ =
objc.registerName("numberWithUnsignedLong:");
late final _sel_numberWithUnsignedShort_ =
objc.registerName("numberWithUnsignedShort:");
late final _sel_objCType = objc.registerName("objCType");
late final _sel_object = objc.registerName("object");
late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:");
Expand Down
2 changes: 1 addition & 1 deletion pkgs/objective_c/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: objective_c
description: 'A library to access Objective C from Flutter that acts as a support library for package:ffigen.'
version: 4.0.0-wip
version: 4.0.0
repository: https://github.com/dart-lang/native/tree/main/pkgs/objective_c

topics:
Expand Down

0 comments on commit d0b4bd6

Please sign in to comment.