mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
feat(spine-ios): Add Objective-C support to generated Swift bindings
- Add NSObject inheritance to root classes for ObjC compatibility - Add @objc(Spine<ClassName>) and @objcMembers annotations to all classes - Fix property name conflicts (className -> rttiClassName, hash -> hashString) - Use @nonobjc on subclass initializers to avoid selector conflicts - Fix convenience init override modifiers - Update ObjC example to use new API method names - Update test to use rttiClassName property
This commit is contained in:
parent
81c9f5630a
commit
cb62bd70c0
@ -42,7 +42,7 @@
|
|||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
self.spineController = [[SpineController alloc] initOnInitialized:^(SpineController *controller) {
|
self.spineController = [[SpineController alloc] initOnInitialized:^(SpineController *controller) {
|
||||||
[controller.animationState setAnimationByNameWithTrackIndex:0 animationName:@"walk" loop:YES];
|
[controller.animationState setAnimation:0 :@"walk" :YES];
|
||||||
}
|
}
|
||||||
onBeforeUpdateWorldTransforms:nil
|
onBeforeUpdateWorldTransforms:nil
|
||||||
onAfterUpdateWorldTransforms:nil
|
onAfterUpdateWorldTransforms:nil
|
||||||
@ -60,8 +60,8 @@
|
|||||||
skeletonFileName:@"spineboy-pro.skel"
|
skeletonFileName:@"spineboy-pro.skel"
|
||||||
bundle:[NSBundle mainBundle]
|
bundle:[NSBundle mainBundle]
|
||||||
controller:self.spineController
|
controller:self.spineController
|
||||||
mode:ContentModeFit
|
mode:SpineContentModeFit
|
||||||
alignment:AlignmentCenter
|
alignment:SpineAlignmentCenter
|
||||||
boundsProvider:[[SpineSetupPoseBounds alloc] init]
|
boundsProvider:[[SpineSetupPoseBounds alloc] init]
|
||||||
backgroundColor:[UIColor clearColor]];
|
backgroundColor:[UIColor clearColor]];
|
||||||
spineView.frame = self.view.bounds;
|
spineView.frame = self.view.bounds;
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Animation wrapper
|
/// Animation wrapper
|
||||||
public class Animation {
|
@objc(SpineAnimation)
|
||||||
|
@objcMembers
|
||||||
|
public class Animation: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_animation) {
|
public init(fromPointer ptr: spine_animation) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ name: String, _ timelines: ArrayTimeline, _ duration: Float) {
|
public convenience init(_ name: String, _ timelines: ArrayTimeline, _ duration: Float) {
|
||||||
|
|||||||
@ -33,18 +33,21 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ArrayFloat wrapper
|
/// ArrayFloat wrapper
|
||||||
public class ArrayFloat {
|
@objc(SpineArrayFloat)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayFloat: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_float, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_float, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_float_create()!
|
let ptr = spine_array_float_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -107,18 +110,21 @@ public class ArrayFloat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayInt wrapper
|
/// ArrayInt wrapper
|
||||||
public class ArrayInt {
|
@objc(SpineArrayInt)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayInt: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_int, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_int, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_int_create()!
|
let ptr = spine_array_int_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -181,18 +187,21 @@ public class ArrayInt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayUnsignedShort wrapper
|
/// ArrayUnsignedShort wrapper
|
||||||
public class ArrayUnsignedShort {
|
@objc(SpineArrayUnsignedShort)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayUnsignedShort: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_unsigned_short, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_unsigned_short, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_unsigned_short_create()!
|
let ptr = spine_array_unsigned_short_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -255,18 +264,21 @@ public class ArrayUnsignedShort {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayPropertyId wrapper
|
/// ArrayPropertyId wrapper
|
||||||
public class ArrayPropertyId {
|
@objc(SpineArrayPropertyId)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayPropertyId: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_property_id, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_property_id, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_property_id_create()!
|
let ptr = spine_array_property_id_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -329,18 +341,21 @@ public class ArrayPropertyId {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayAnimation wrapper
|
/// ArrayAnimation wrapper
|
||||||
public class ArrayAnimation {
|
@objc(SpineArrayAnimation)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayAnimation: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_animation, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_animation, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_animation_create()!
|
let ptr = spine_array_animation_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -404,18 +419,21 @@ public class ArrayAnimation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayAtlasPage wrapper
|
/// ArrayAtlasPage wrapper
|
||||||
public class ArrayAtlasPage {
|
@objc(SpineArrayAtlasPage)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayAtlasPage: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_atlas_page, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_atlas_page, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_atlas_page_create()!
|
let ptr = spine_array_atlas_page_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -479,18 +497,21 @@ public class ArrayAtlasPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayAtlasRegion wrapper
|
/// ArrayAtlasRegion wrapper
|
||||||
public class ArrayAtlasRegion {
|
@objc(SpineArrayAtlasRegion)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayAtlasRegion: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_atlas_region, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_atlas_region, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_atlas_region_create()!
|
let ptr = spine_array_atlas_region_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -554,18 +575,21 @@ public class ArrayAtlasRegion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayAttachment wrapper
|
/// ArrayAttachment wrapper
|
||||||
public class ArrayAttachment {
|
@objc(SpineArrayAttachment)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayAttachment: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_attachment, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_attachment, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_attachment_create()!
|
let ptr = spine_array_attachment_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -587,8 +611,8 @@ public class ArrayAttachment {
|
|||||||
let elementPtr = buffer[Int(index)]
|
let elementPtr = buffer[Int(index)]
|
||||||
guard let ptr = elementPtr else { return nil }
|
guard let ptr = elementPtr else { return nil }
|
||||||
let rtti = spine_attachment_get_rtti(ptr)
|
let rtti = spine_attachment_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -602,7 +626,7 @@ public class ArrayAttachment {
|
|||||||
case "spine_region_attachment":
|
case "spine_region_attachment":
|
||||||
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Attachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -647,18 +671,21 @@ public class ArrayAttachment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayBone wrapper
|
/// ArrayBone wrapper
|
||||||
public class ArrayBone {
|
@objc(SpineArrayBone)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayBone: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_bone, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_bone, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_bone_create()!
|
let ptr = spine_array_bone_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -722,18 +749,21 @@ public class ArrayBone {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayBoneData wrapper
|
/// ArrayBoneData wrapper
|
||||||
public class ArrayBoneData {
|
@objc(SpineArrayBoneData)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayBoneData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_bone_data, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_bone_data, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_bone_data_create()!
|
let ptr = spine_array_bone_data_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -797,18 +827,21 @@ public class ArrayBoneData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayBonePose wrapper
|
/// ArrayBonePose wrapper
|
||||||
public class ArrayBonePose {
|
@objc(SpineArrayBonePose)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayBonePose: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_bone_pose, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_bone_pose, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_bone_pose_create()!
|
let ptr = spine_array_bone_pose_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -872,18 +905,21 @@ public class ArrayBonePose {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayBoundingBoxAttachment wrapper
|
/// ArrayBoundingBoxAttachment wrapper
|
||||||
public class ArrayBoundingBoxAttachment {
|
@objc(SpineArrayBoundingBoxAttachment)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayBoundingBoxAttachment: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_bounding_box_attachment, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_bounding_box_attachment, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_bounding_box_attachment_create()!
|
let ptr = spine_array_bounding_box_attachment_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -947,18 +983,21 @@ public class ArrayBoundingBoxAttachment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayConstraint wrapper
|
/// ArrayConstraint wrapper
|
||||||
public class ArrayConstraint {
|
@objc(SpineArrayConstraint)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayConstraint: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_constraint, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_constraint, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_constraint_create()!
|
let ptr = spine_array_constraint_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -980,8 +1019,8 @@ public class ArrayConstraint {
|
|||||||
let elementPtr = buffer[Int(index)]
|
let elementPtr = buffer[Int(index)]
|
||||||
guard let ptr = elementPtr else { return nil }
|
guard let ptr = elementPtr else { return nil }
|
||||||
let rtti = spine_constraint_get_rtti(ptr)
|
let rtti = spine_constraint_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_ik_constraint":
|
case "spine_ik_constraint":
|
||||||
return IkConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
return IkConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
||||||
case "spine_path_constraint":
|
case "spine_path_constraint":
|
||||||
@ -993,7 +1032,7 @@ public class ArrayConstraint {
|
|||||||
case "spine_transform_constraint":
|
case "spine_transform_constraint":
|
||||||
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Constraint")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Constraint")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1038,18 +1077,21 @@ public class ArrayConstraint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayConstraintData wrapper
|
/// ArrayConstraintData wrapper
|
||||||
public class ArrayConstraintData {
|
@objc(SpineArrayConstraintData)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayConstraintData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_constraint_data, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_constraint_data, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_constraint_data_create()!
|
let ptr = spine_array_constraint_data_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1071,8 +1113,8 @@ public class ArrayConstraintData {
|
|||||||
let elementPtr = buffer[Int(index)]
|
let elementPtr = buffer[Int(index)]
|
||||||
guard let ptr = elementPtr else { return nil }
|
guard let ptr = elementPtr else { return nil }
|
||||||
let rtti = spine_constraint_data_get_rtti(ptr)
|
let rtti = spine_constraint_data_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_ik_constraint_data":
|
case "spine_ik_constraint_data":
|
||||||
return IkConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self))
|
return IkConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self))
|
||||||
case "spine_path_constraint_data":
|
case "spine_path_constraint_data":
|
||||||
@ -1084,7 +1126,7 @@ public class ArrayConstraintData {
|
|||||||
case "spine_transform_constraint_data":
|
case "spine_transform_constraint_data":
|
||||||
return TransformConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self))
|
return TransformConstraintData(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_data_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class ConstraintData")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class ConstraintData")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1129,18 +1171,21 @@ public class ArrayConstraintData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayEvent wrapper
|
/// ArrayEvent wrapper
|
||||||
public class ArrayEvent {
|
@objc(SpineArrayEvent)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayEvent: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_event, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_event, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_event_create()!
|
let ptr = spine_array_event_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1204,18 +1249,21 @@ public class ArrayEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayEventData wrapper
|
/// ArrayEventData wrapper
|
||||||
public class ArrayEventData {
|
@objc(SpineArrayEventData)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayEventData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_event_data, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_event_data, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_event_data_create()!
|
let ptr = spine_array_event_data_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1279,18 +1327,21 @@ public class ArrayEventData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayFromProperty wrapper
|
/// ArrayFromProperty wrapper
|
||||||
public class ArrayFromProperty {
|
@objc(SpineArrayFromProperty)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayFromProperty: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_from_property, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_from_property, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_from_property_create()!
|
let ptr = spine_array_from_property_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1312,8 +1363,8 @@ public class ArrayFromProperty {
|
|||||||
let elementPtr = buffer[Int(index)]
|
let elementPtr = buffer[Int(index)]
|
||||||
guard let ptr = elementPtr else { return nil }
|
guard let ptr = elementPtr else { return nil }
|
||||||
let rtti = spine_from_property_get_rtti(ptr)
|
let rtti = spine_from_property_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_from_rotate":
|
case "spine_from_rotate":
|
||||||
return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self))
|
return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self))
|
||||||
case "spine_from_scale_x":
|
case "spine_from_scale_x":
|
||||||
@ -1327,7 +1378,7 @@ public class ArrayFromProperty {
|
|||||||
case "spine_from_y":
|
case "spine_from_y":
|
||||||
return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self))
|
return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class FromProperty")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class FromProperty")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1372,18 +1423,21 @@ public class ArrayFromProperty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayPhysicsConstraint wrapper
|
/// ArrayPhysicsConstraint wrapper
|
||||||
public class ArrayPhysicsConstraint {
|
@objc(SpineArrayPhysicsConstraint)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayPhysicsConstraint: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_physics_constraint, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_physics_constraint, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_physics_constraint_create()!
|
let ptr = spine_array_physics_constraint_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1447,18 +1501,21 @@ public class ArrayPhysicsConstraint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayPolygon wrapper
|
/// ArrayPolygon wrapper
|
||||||
public class ArrayPolygon {
|
@objc(SpineArrayPolygon)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayPolygon: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_polygon, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_polygon, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_polygon_create()!
|
let ptr = spine_array_polygon_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1522,18 +1579,21 @@ public class ArrayPolygon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArraySkin wrapper
|
/// ArraySkin wrapper
|
||||||
public class ArraySkin {
|
@objc(SpineArraySkin)
|
||||||
|
@objcMembers
|
||||||
|
public class ArraySkin: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_skin, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_skin, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_skin_create()!
|
let ptr = spine_array_skin_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1597,18 +1657,21 @@ public class ArraySkin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArraySlot wrapper
|
/// ArraySlot wrapper
|
||||||
public class ArraySlot {
|
@objc(SpineArraySlot)
|
||||||
|
@objcMembers
|
||||||
|
public class ArraySlot: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_slot, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_slot, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_slot_create()!
|
let ptr = spine_array_slot_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1672,18 +1735,21 @@ public class ArraySlot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArraySlotData wrapper
|
/// ArraySlotData wrapper
|
||||||
public class ArraySlotData {
|
@objc(SpineArraySlotData)
|
||||||
|
@objcMembers
|
||||||
|
public class ArraySlotData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_slot_data, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_slot_data, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_slot_data_create()!
|
let ptr = spine_array_slot_data_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1747,18 +1813,21 @@ public class ArraySlotData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayTextureRegion wrapper
|
/// ArrayTextureRegion wrapper
|
||||||
public class ArrayTextureRegion {
|
@objc(SpineArrayTextureRegion)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayTextureRegion: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_texture_region, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_texture_region, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_texture_region_create()!
|
let ptr = spine_array_texture_region_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1822,18 +1891,21 @@ public class ArrayTextureRegion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayTimeline wrapper
|
/// ArrayTimeline wrapper
|
||||||
public class ArrayTimeline {
|
@objc(SpineArrayTimeline)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayTimeline: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_timeline, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_timeline, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_timeline_create()!
|
let ptr = spine_array_timeline_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -1855,8 +1927,8 @@ public class ArrayTimeline {
|
|||||||
let elementPtr = buffer[Int(index)]
|
let elementPtr = buffer[Int(index)]
|
||||||
guard let ptr = elementPtr else { return nil }
|
guard let ptr = elementPtr else { return nil }
|
||||||
let rtti = spine_timeline_get_rtti(ptr)
|
let rtti = spine_timeline_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_alpha_timeline":
|
case "spine_alpha_timeline":
|
||||||
return AlphaTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_alpha_timeline_wrapper.self))
|
return AlphaTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_alpha_timeline_wrapper.self))
|
||||||
case "spine_attachment_timeline":
|
case "spine_attachment_timeline":
|
||||||
@ -1930,7 +2002,7 @@ public class ArrayTimeline {
|
|||||||
case "spine_translate_y_timeline":
|
case "spine_translate_y_timeline":
|
||||||
return TranslateYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_y_timeline_wrapper.self))
|
return TranslateYTimeline(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_translate_y_timeline_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Timeline")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Timeline")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1975,18 +2047,21 @@ public class ArrayTimeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayToProperty wrapper
|
/// ArrayToProperty wrapper
|
||||||
public class ArrayToProperty {
|
@objc(SpineArrayToProperty)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayToProperty: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_to_property, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_to_property, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_to_property_create()!
|
let ptr = spine_array_to_property_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -2008,8 +2083,8 @@ public class ArrayToProperty {
|
|||||||
let elementPtr = buffer[Int(index)]
|
let elementPtr = buffer[Int(index)]
|
||||||
guard let ptr = elementPtr else { return nil }
|
guard let ptr = elementPtr else { return nil }
|
||||||
let rtti = spine_to_property_get_rtti(ptr)
|
let rtti = spine_to_property_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_to_rotate":
|
case "spine_to_rotate":
|
||||||
return ToRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_rotate_wrapper.self))
|
return ToRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_rotate_wrapper.self))
|
||||||
case "spine_to_scale_x":
|
case "spine_to_scale_x":
|
||||||
@ -2023,7 +2098,7 @@ public class ArrayToProperty {
|
|||||||
case "spine_to_y":
|
case "spine_to_y":
|
||||||
return ToY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_y_wrapper.self))
|
return ToY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_to_y_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class ToProperty")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class ToProperty")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2068,18 +2143,21 @@ public class ArrayToProperty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayTrackEntry wrapper
|
/// ArrayTrackEntry wrapper
|
||||||
public class ArrayTrackEntry {
|
@objc(SpineArrayTrackEntry)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayTrackEntry: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_track_entry, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_track_entry, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_track_entry_create()!
|
let ptr = spine_array_track_entry_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -2143,18 +2221,21 @@ public class ArrayTrackEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// ArrayUpdate wrapper
|
/// ArrayUpdate wrapper
|
||||||
public class ArrayUpdate {
|
@objc(SpineArrayUpdate)
|
||||||
|
@objcMembers
|
||||||
|
public class ArrayUpdate: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
private let _ownsMemory: Bool
|
private let _ownsMemory: Bool
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_array_update, ownsMemory: Bool = false) {
|
public init(fromPointer ptr: spine_array_update, ownsMemory: Bool = false) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
self._ownsMemory = ownsMemory
|
self._ownsMemory = ownsMemory
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a new empty array
|
/// Create a new empty array
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_array_update_create()!
|
let ptr = spine_array_update_create()!
|
||||||
self.init(fromPointer: ptr, ownsMemory: true)
|
self.init(fromPointer: ptr, ownsMemory: true)
|
||||||
}
|
}
|
||||||
@ -2176,8 +2257,8 @@ public class ArrayUpdate {
|
|||||||
let elementPtr = buffer[Int(index)]
|
let elementPtr = buffer[Int(index)]
|
||||||
guard let ptr = elementPtr else { return nil }
|
guard let ptr = elementPtr else { return nil }
|
||||||
let rtti = spine_update_get_rtti(ptr)
|
let rtti = spine_update_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bone":
|
case "spine_bone":
|
||||||
return Bone(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_wrapper.self))
|
return Bone(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_wrapper.self))
|
||||||
case "spine_bone_pose":
|
case "spine_bone_pose":
|
||||||
@ -2193,7 +2274,7 @@ public class ArrayUpdate {
|
|||||||
case "spine_transform_constraint":
|
case "spine_transform_constraint":
|
||||||
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Update")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Update")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Atlas wrapper
|
/// Atlas wrapper
|
||||||
public class Atlas {
|
@objc(SpineAtlas)
|
||||||
|
@objcMembers
|
||||||
|
public class Atlas: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_atlas) {
|
public init(fromPointer ptr: spine_atlas) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public var pages: ArrayAtlasPage {
|
public var pages: ArrayAtlasPage {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Attachment wrapper
|
/// Attachment wrapper
|
||||||
open class Attachment {
|
@objc(SpineAttachment)
|
||||||
|
@objcMembers
|
||||||
|
open class Attachment: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_attachment) {
|
public init(fromPointer ptr: spine_attachment) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public var rtti: Rtti {
|
public var rtti: Rtti {
|
||||||
@ -58,8 +61,8 @@ open class Attachment {
|
|||||||
public func copyAttachment() -> Attachment {
|
public func copyAttachment() -> Attachment {
|
||||||
let result = spine_attachment_copy(_ptr.assumingMemoryBound(to: spine_attachment_wrapper.self))
|
let result = spine_attachment_copy(_ptr.assumingMemoryBound(to: spine_attachment_wrapper.self))
|
||||||
let rtti = spine_attachment_get_rtti(result!)
|
let rtti = spine_attachment_get_rtti(result!)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -73,7 +76,7 @@ open class Attachment {
|
|||||||
case "spine_region_attachment":
|
case "spine_region_attachment":
|
||||||
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Attachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Bone wrapper
|
/// Bone wrapper
|
||||||
|
@objc(SpineBone)
|
||||||
|
@objcMembers
|
||||||
public class Bone: PosedActive, Posed, Update {
|
public class Bone: PosedActive, Posed, Update {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_bone) {
|
public init(fromPointer ptr: spine_bone) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Color wrapper
|
/// Color wrapper
|
||||||
public class Color {
|
@objc(SpineColor)
|
||||||
|
@objcMembers
|
||||||
|
public class Color: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_color) {
|
public init(fromPointer ptr: spine_color) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_color_create()
|
let ptr = spine_color_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Event wrapper
|
/// Event wrapper
|
||||||
public class Event {
|
@objc(SpineEvent)
|
||||||
|
@objcMembers
|
||||||
|
public class Event: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_event) {
|
public init(fromPointer ptr: spine_event) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ time: Float, _ data: EventData) {
|
public convenience init(_ time: Float, _ data: EventData) {
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Polygon wrapper
|
/// Polygon wrapper
|
||||||
public class Polygon {
|
@objc(SpinePolygon)
|
||||||
|
@objcMembers
|
||||||
|
public class Polygon: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_polygon) {
|
public init(fromPointer ptr: spine_polygon) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_polygon_create()
|
let ptr = spine_polygon_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Rtti wrapper
|
/// Rtti wrapper
|
||||||
public class Rtti {
|
@objc(SpineRtti)
|
||||||
|
@objcMembers
|
||||||
|
public class Rtti: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_rtti) {
|
public init(fromPointer ptr: spine_rtti) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public var className: String? {
|
public var rttiClassName: String? {
|
||||||
let result = spine_rtti_get_class_name(_ptr.assumingMemoryBound(to: spine_rtti_wrapper.self))
|
let result = spine_rtti_get_class_name(_ptr.assumingMemoryBound(to: spine_rtti_wrapper.self))
|
||||||
return result.map { String(cString: $0) }
|
return result.map { String(cString: $0) }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Sequence wrapper
|
/// Sequence wrapper
|
||||||
public class Sequence {
|
@objc(SpineSequence)
|
||||||
|
@objcMembers
|
||||||
|
public class Sequence: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_sequence) {
|
public init(fromPointer ptr: spine_sequence) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ count: Int32) {
|
public convenience init(_ count: Int32) {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Skeleton wrapper
|
/// Skeleton wrapper
|
||||||
public class Skeleton {
|
@objc(SpineSkeleton)
|
||||||
|
@objcMembers
|
||||||
|
public class Skeleton: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skeleton) {
|
public init(fromPointer ptr: spine_skeleton) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ skeletonData: SkeletonData) {
|
public convenience init(_ skeletonData: SkeletonData) {
|
||||||
@ -274,8 +277,8 @@ public class Skeleton {
|
|||||||
let result = spine_skeleton_get_attachment_1(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), slotName, attachmentName)
|
let result = spine_skeleton_get_attachment_1(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), slotName, attachmentName)
|
||||||
guard let ptr = result else { return nil }
|
guard let ptr = result else { return nil }
|
||||||
let rtti = spine_attachment_get_rtti(ptr)
|
let rtti = spine_attachment_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -289,7 +292,7 @@ public class Skeleton {
|
|||||||
case "spine_region_attachment":
|
case "spine_region_attachment":
|
||||||
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Attachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,8 +300,8 @@ public class Skeleton {
|
|||||||
let result = spine_skeleton_get_attachment_2(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), slotIndex, attachmentName)
|
let result = spine_skeleton_get_attachment_2(_ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self), slotIndex, attachmentName)
|
||||||
guard let ptr = result else { return nil }
|
guard let ptr = result else { return nil }
|
||||||
let rtti = spine_attachment_get_rtti(ptr)
|
let rtti = spine_attachment_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -312,7 +315,7 @@ public class Skeleton {
|
|||||||
case "spine_region_attachment":
|
case "spine_region_attachment":
|
||||||
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Attachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Skin wrapper
|
/// Skin wrapper
|
||||||
public class Skin {
|
@objc(SpineSkin)
|
||||||
|
@objcMembers
|
||||||
|
public class Skin: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skin) {
|
public init(fromPointer ptr: spine_skin) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ name: String) {
|
public convenience init(_ name: String) {
|
||||||
@ -73,8 +76,8 @@ public class Skin {
|
|||||||
let result = spine_skin_get_attachment(_ptr.assumingMemoryBound(to: spine_skin_wrapper.self), slotIndex, name)
|
let result = spine_skin_get_attachment(_ptr.assumingMemoryBound(to: spine_skin_wrapper.self), slotIndex, name)
|
||||||
guard let ptr = result else { return nil }
|
guard let ptr = result else { return nil }
|
||||||
let rtti = spine_attachment_get_rtti(ptr)
|
let rtti = spine_attachment_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -88,7 +91,7 @@ public class Skin {
|
|||||||
case "spine_region_attachment":
|
case "spine_region_attachment":
|
||||||
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Attachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Slider wrapper
|
/// Slider wrapper
|
||||||
|
@objc(SpineSlider)
|
||||||
|
@objcMembers
|
||||||
public class Slider: PosedActive, Posed, Constraint {
|
public class Slider: PosedActive, Posed, Constraint {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_slider) {
|
public init(fromPointer ptr: spine_slider) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Slot wrapper
|
/// Slot wrapper
|
||||||
public class Slot: Posed {
|
@objc(SpineSlot)
|
||||||
|
@objcMembers
|
||||||
|
public class Slot: NSObject, Posed {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_slot) {
|
public init(fromPointer ptr: spine_slot) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ data: SlotData, _ skeleton: Skeleton) {
|
public convenience init(_ data: SlotData, _ skeleton: Skeleton) {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Timeline wrapper
|
/// Timeline wrapper
|
||||||
open class Timeline {
|
@objc(SpineTimeline)
|
||||||
|
@objcMembers
|
||||||
|
open class Timeline: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_timeline) {
|
public init(fromPointer ptr: spine_timeline) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public var rtti: Rtti {
|
public var rtti: Rtti {
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// AlphaTimeline wrapper
|
/// AlphaTimeline wrapper
|
||||||
|
@objc(SpineAlphaTimeline)
|
||||||
|
@objcMembers
|
||||||
public class AlphaTimeline: CurveTimeline1, SlotTimeline {
|
public class AlphaTimeline: CurveTimeline1, SlotTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_alpha_timeline) {
|
public init(fromPointer ptr: spine_alpha_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// AnimationState wrapper
|
/// AnimationState wrapper
|
||||||
public class AnimationState {
|
@objc(SpineAnimationState)
|
||||||
|
@objcMembers
|
||||||
|
public class AnimationState: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_animation_state) {
|
public init(fromPointer ptr: spine_animation_state) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ data: AnimationStateData) {
|
public convenience init(_ data: AnimationStateData) {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// AnimationStateData wrapper
|
/// AnimationStateData wrapper
|
||||||
public class AnimationStateData {
|
@objc(SpineAnimationStateData)
|
||||||
|
@objcMembers
|
||||||
|
public class AnimationStateData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_animation_state_data) {
|
public init(fromPointer ptr: spine_animation_state_data) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ skeletonData: SkeletonData) {
|
public convenience init(_ skeletonData: SkeletonData) {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// AtlasAttachmentLoader wrapper
|
/// AtlasAttachmentLoader wrapper
|
||||||
public class AtlasAttachmentLoader: AttachmentLoader {
|
@objc(SpineAtlasAttachmentLoader)
|
||||||
|
@objcMembers
|
||||||
|
public class AtlasAttachmentLoader: NSObject, AttachmentLoader {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_atlas_attachment_loader) {
|
public init(fromPointer ptr: spine_atlas_attachment_loader) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ atlas: Atlas) {
|
public convenience init(_ atlas: Atlas) {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// AtlasPage wrapper
|
/// AtlasPage wrapper
|
||||||
public class AtlasPage {
|
@objc(SpineAtlasPage)
|
||||||
|
@objcMembers
|
||||||
|
public class AtlasPage: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_atlas_page) {
|
public init(fromPointer ptr: spine_atlas_page) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ inName: String) {
|
public convenience init(_ inName: String) {
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// AtlasRegion wrapper
|
/// AtlasRegion wrapper
|
||||||
|
@objc(SpineAtlasRegion)
|
||||||
|
@objcMembers
|
||||||
public class AtlasRegion: TextureRegion {
|
public class AtlasRegion: TextureRegion {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_atlas_region) {
|
public init(fromPointer ptr: spine_atlas_region) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_texture_region_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_texture_region_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// AttachmentTimeline wrapper
|
/// AttachmentTimeline wrapper
|
||||||
|
@objc(SpineAttachmentTimeline)
|
||||||
|
@objcMembers
|
||||||
public class AttachmentTimeline: Timeline, SlotTimeline {
|
public class AttachmentTimeline: Timeline, SlotTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_attachment_timeline) {
|
public init(fromPointer ptr: spine_attachment_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// BoneData wrapper
|
/// BoneData wrapper
|
||||||
|
@objc(SpineBoneData)
|
||||||
|
@objcMembers
|
||||||
public class BoneData: PosedData {
|
public class BoneData: PosedData {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_bone_data) {
|
public init(fromPointer ptr: spine_bone_data) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// BoneLocal wrapper
|
/// BoneLocal wrapper
|
||||||
public class BoneLocal {
|
@objc(SpineBoneLocal)
|
||||||
|
@objcMembers
|
||||||
|
public class BoneLocal: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_bone_local) {
|
public init(fromPointer ptr: spine_bone_local) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_bone_local_create()
|
let ptr = spine_bone_local_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// BonePose wrapper
|
/// BonePose wrapper
|
||||||
|
@objc(SpineBonePose)
|
||||||
|
@objcMembers
|
||||||
public class BonePose: BoneLocal, Update {
|
public class BonePose: BoneLocal, Update {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_bone_pose) {
|
public init(fromPointer ptr: spine_bone_pose) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_local_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_local_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// BoneTimeline1 wrapper
|
/// BoneTimeline1 wrapper
|
||||||
|
@objc(SpineBoneTimeline1)
|
||||||
|
@objcMembers
|
||||||
open class BoneTimeline1: CurveTimeline1, BoneTimeline {
|
open class BoneTimeline1: CurveTimeline1, BoneTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_bone_timeline1) {
|
public init(fromPointer ptr: spine_bone_timeline1) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// BoneTimeline2 wrapper
|
/// BoneTimeline2 wrapper
|
||||||
|
@objc(SpineBoneTimeline2)
|
||||||
|
@objcMembers
|
||||||
open class BoneTimeline2: CurveTimeline, BoneTimeline {
|
open class BoneTimeline2: CurveTimeline, BoneTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_bone_timeline2) {
|
public init(fromPointer ptr: spine_bone_timeline2) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// BoundingBoxAttachment wrapper
|
/// BoundingBoxAttachment wrapper
|
||||||
|
@objc(SpineBoundingBoxAttachment)
|
||||||
|
@objcMembers
|
||||||
public class BoundingBoxAttachment: VertexAttachment {
|
public class BoundingBoxAttachment: VertexAttachment {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_bounding_box_attachment) {
|
public init(fromPointer ptr: spine_bounding_box_attachment) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ClippingAttachment wrapper
|
/// ClippingAttachment wrapper
|
||||||
|
@objc(SpineClippingAttachment)
|
||||||
|
@objcMembers
|
||||||
public class ClippingAttachment: VertexAttachment {
|
public class ClippingAttachment: VertexAttachment {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_clipping_attachment) {
|
public init(fromPointer ptr: spine_clipping_attachment) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ConstraintTimeline1 wrapper
|
/// ConstraintTimeline1 wrapper
|
||||||
|
@objc(SpineConstraintTimeline1)
|
||||||
|
@objcMembers
|
||||||
open class ConstraintTimeline1: CurveTimeline1, ConstraintTimeline {
|
open class ConstraintTimeline1: CurveTimeline1, ConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_constraint_timeline1) {
|
public init(fromPointer ptr: spine_constraint_timeline1) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// CurveTimeline wrapper
|
/// CurveTimeline wrapper
|
||||||
|
@objc(SpineCurveTimeline)
|
||||||
|
@objcMembers
|
||||||
open class CurveTimeline: Timeline {
|
open class CurveTimeline: Timeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_curve_timeline) {
|
public init(fromPointer ptr: spine_curve_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// CurveTimeline1 wrapper
|
/// CurveTimeline1 wrapper
|
||||||
|
@objc(SpineCurveTimeline1)
|
||||||
|
@objcMembers
|
||||||
open class CurveTimeline1: CurveTimeline {
|
open class CurveTimeline1: CurveTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_curve_timeline1) {
|
public init(fromPointer ptr: spine_curve_timeline1) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// DeformTimeline wrapper
|
/// DeformTimeline wrapper
|
||||||
|
@objc(SpineDeformTimeline)
|
||||||
|
@objcMembers
|
||||||
public class DeformTimeline: SlotCurveTimeline {
|
public class DeformTimeline: SlotCurveTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_deform_timeline) {
|
public init(fromPointer ptr: spine_deform_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
@ -47,8 +50,8 @@ public class DeformTimeline: SlotCurveTimeline {
|
|||||||
get {
|
get {
|
||||||
let result = spine_deform_timeline_get_attachment(_ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self))
|
let result = spine_deform_timeline_get_attachment(_ptr.assumingMemoryBound(to: spine_deform_timeline_wrapper.self))
|
||||||
let rtti = spine_vertex_attachment_get_rtti(result!)
|
let rtti = spine_vertex_attachment_get_rtti(result!)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -58,7 +61,7 @@ public class DeformTimeline: SlotCurveTimeline {
|
|||||||
case "spine_path_attachment":
|
case "spine_path_attachment":
|
||||||
return PathAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_path_attachment_wrapper.self))
|
return PathAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_path_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class VertexAttachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class VertexAttachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// DrawOrderTimeline wrapper
|
/// DrawOrderTimeline wrapper
|
||||||
|
@objc(SpineDrawOrderTimeline)
|
||||||
|
@objcMembers
|
||||||
public class DrawOrderTimeline: Timeline {
|
public class DrawOrderTimeline: Timeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_draw_order_timeline) {
|
public init(fromPointer ptr: spine_draw_order_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// EventData wrapper
|
/// EventData wrapper
|
||||||
public class EventData {
|
@objc(SpineEventData)
|
||||||
|
@objcMembers
|
||||||
|
public class EventData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_event_data) {
|
public init(fromPointer ptr: spine_event_data) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ name: String) {
|
public convenience init(_ name: String) {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// EventQueueEntry wrapper
|
/// EventQueueEntry wrapper
|
||||||
public class EventQueueEntry {
|
@objc(SpineEventQueueEntry)
|
||||||
|
@objcMembers
|
||||||
|
public class EventQueueEntry: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_event_queue_entry) {
|
public init(fromPointer ptr: spine_event_queue_entry) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ eventType: EventType, _ trackEntry: TrackEntry?, _ event: Event?) {
|
public convenience init(_ eventType: EventType, _ trackEntry: TrackEntry?, _ event: Event?) {
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// EventTimeline wrapper
|
/// EventTimeline wrapper
|
||||||
|
@objc(SpineEventTimeline)
|
||||||
|
@objcMembers
|
||||||
public class EventTimeline: Timeline {
|
public class EventTimeline: Timeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_event_timeline) {
|
public init(fromPointer ptr: spine_event_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// FromProperty wrapper
|
/// FromProperty wrapper
|
||||||
open class FromProperty {
|
@objc(SpineFromProperty)
|
||||||
|
@objcMembers
|
||||||
|
open class FromProperty: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_from_property) {
|
public init(fromPointer ptr: spine_from_property) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public var rtti: Rtti {
|
public var rtti: Rtti {
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// FromRotate wrapper
|
/// FromRotate wrapper
|
||||||
|
@objc(SpineFromRotate)
|
||||||
|
@objcMembers
|
||||||
public class FromRotate: FromProperty {
|
public class FromRotate: FromProperty {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_from_rotate) {
|
public init(fromPointer ptr: spine_from_rotate) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// FromScaleX wrapper
|
/// FromScaleX wrapper
|
||||||
|
@objc(SpineFromScaleX)
|
||||||
|
@objcMembers
|
||||||
public class FromScaleX: FromProperty {
|
public class FromScaleX: FromProperty {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_from_scale_x) {
|
public init(fromPointer ptr: spine_from_scale_x) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// FromScaleY wrapper
|
/// FromScaleY wrapper
|
||||||
|
@objc(SpineFromScaleY)
|
||||||
|
@objcMembers
|
||||||
public class FromScaleY: FromProperty {
|
public class FromScaleY: FromProperty {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_from_scale_y) {
|
public init(fromPointer ptr: spine_from_scale_y) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// FromShearY wrapper
|
/// FromShearY wrapper
|
||||||
|
@objc(SpineFromShearY)
|
||||||
|
@objcMembers
|
||||||
public class FromShearY: FromProperty {
|
public class FromShearY: FromProperty {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_from_shear_y) {
|
public init(fromPointer ptr: spine_from_shear_y) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// FromX wrapper
|
/// FromX wrapper
|
||||||
|
@objc(SpineFromX)
|
||||||
|
@objcMembers
|
||||||
public class FromX: FromProperty {
|
public class FromX: FromProperty {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_from_x) {
|
public init(fromPointer ptr: spine_from_x) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// FromY wrapper
|
/// FromY wrapper
|
||||||
|
@objc(SpineFromY)
|
||||||
|
@objcMembers
|
||||||
public class FromY: FromProperty {
|
public class FromY: FromProperty {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_from_y) {
|
public init(fromPointer ptr: spine_from_y) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_property_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// IkConstraint wrapper
|
/// IkConstraint wrapper
|
||||||
|
@objc(SpineIkConstraint)
|
||||||
|
@objcMembers
|
||||||
public class IkConstraint: PosedActive, Posed, Constraint {
|
public class IkConstraint: PosedActive, Posed, Constraint {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_ik_constraint) {
|
public init(fromPointer ptr: spine_ik_constraint) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// IkConstraintData wrapper
|
/// IkConstraintData wrapper
|
||||||
|
@objc(SpineIkConstraintData)
|
||||||
|
@objcMembers
|
||||||
public class IkConstraintData: PosedData, ConstraintData {
|
public class IkConstraintData: PosedData, ConstraintData {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_ik_constraint_data) {
|
public init(fromPointer ptr: spine_ik_constraint_data) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
||||||
}
|
}
|
||||||
@ -81,8 +84,8 @@ public class IkConstraintData: PosedData, ConstraintData {
|
|||||||
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
||||||
let result = spine_ik_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
let result = spine_ik_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_ik_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
||||||
let rtti = spine_constraint_get_rtti(result!)
|
let rtti = spine_constraint_get_rtti(result!)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_ik_constraint":
|
case "spine_ik_constraint":
|
||||||
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
||||||
case "spine_path_constraint":
|
case "spine_path_constraint":
|
||||||
@ -94,7 +97,7 @@ public class IkConstraintData: PosedData, ConstraintData {
|
|||||||
case "spine_transform_constraint":
|
case "spine_transform_constraint":
|
||||||
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Constraint")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Constraint")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// IkConstraintPose wrapper
|
/// IkConstraintPose wrapper
|
||||||
public class IkConstraintPose {
|
@objc(SpineIkConstraintPose)
|
||||||
|
@objcMembers
|
||||||
|
public class IkConstraintPose: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_ik_constraint_pose) {
|
public init(fromPointer ptr: spine_ik_constraint_pose) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_ik_constraint_pose_create()
|
let ptr = spine_ik_constraint_pose_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// IkConstraintTimeline wrapper
|
/// IkConstraintTimeline wrapper
|
||||||
|
@objc(SpineIkConstraintTimeline)
|
||||||
|
@objcMembers
|
||||||
public class IkConstraintTimeline: CurveTimeline, ConstraintTimeline {
|
public class IkConstraintTimeline: CurveTimeline, ConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_ik_constraint_timeline) {
|
public init(fromPointer ptr: spine_ik_constraint_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// InheritTimeline wrapper
|
/// InheritTimeline wrapper
|
||||||
|
@objc(SpineInheritTimeline)
|
||||||
|
@objcMembers
|
||||||
public class InheritTimeline: Timeline, BoneTimeline {
|
public class InheritTimeline: Timeline, BoneTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_inherit_timeline) {
|
public init(fromPointer ptr: spine_inherit_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// MeshAttachment wrapper
|
/// MeshAttachment wrapper
|
||||||
|
@objc(SpineMeshAttachment)
|
||||||
|
@objcMembers
|
||||||
public class MeshAttachment: VertexAttachment {
|
public class MeshAttachment: VertexAttachment {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_mesh_attachment) {
|
public init(fromPointer ptr: spine_mesh_attachment) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PathAttachment wrapper
|
/// PathAttachment wrapper
|
||||||
|
@objc(SpinePathAttachment)
|
||||||
|
@objcMembers
|
||||||
public class PathAttachment: VertexAttachment {
|
public class PathAttachment: VertexAttachment {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_path_attachment) {
|
public init(fromPointer ptr: spine_path_attachment) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_vertex_attachment_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PathConstraint wrapper
|
/// PathConstraint wrapper
|
||||||
|
@objc(SpinePathConstraint)
|
||||||
|
@objcMembers
|
||||||
public class PathConstraint: PosedActive, Posed, Constraint {
|
public class PathConstraint: PosedActive, Posed, Constraint {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_path_constraint) {
|
public init(fromPointer ptr: spine_path_constraint) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PathConstraintData wrapper
|
/// PathConstraintData wrapper
|
||||||
|
@objc(SpinePathConstraintData)
|
||||||
|
@objcMembers
|
||||||
public class PathConstraintData: PosedData, ConstraintData {
|
public class PathConstraintData: PosedData, ConstraintData {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_path_constraint_data) {
|
public init(fromPointer ptr: spine_path_constraint_data) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
||||||
}
|
}
|
||||||
@ -111,8 +114,8 @@ public class PathConstraintData: PosedData, ConstraintData {
|
|||||||
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
||||||
let result = spine_path_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
let result = spine_path_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_path_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
||||||
let rtti = spine_constraint_get_rtti(result!)
|
let rtti = spine_constraint_get_rtti(result!)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_ik_constraint":
|
case "spine_ik_constraint":
|
||||||
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
||||||
case "spine_path_constraint":
|
case "spine_path_constraint":
|
||||||
@ -124,7 +127,7 @@ public class PathConstraintData: PosedData, ConstraintData {
|
|||||||
case "spine_transform_constraint":
|
case "spine_transform_constraint":
|
||||||
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Constraint")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Constraint")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PathConstraintMixTimeline wrapper
|
/// PathConstraintMixTimeline wrapper
|
||||||
|
@objc(SpinePathConstraintMixTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PathConstraintMixTimeline: CurveTimeline, ConstraintTimeline {
|
public class PathConstraintMixTimeline: CurveTimeline, ConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_path_constraint_mix_timeline) {
|
public init(fromPointer ptr: spine_path_constraint_mix_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PathConstraintPose wrapper
|
/// PathConstraintPose wrapper
|
||||||
public class PathConstraintPose {
|
@objc(SpinePathConstraintPose)
|
||||||
|
@objcMembers
|
||||||
|
public class PathConstraintPose: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_path_constraint_pose) {
|
public init(fromPointer ptr: spine_path_constraint_pose) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_path_constraint_pose_create()
|
let ptr = spine_path_constraint_pose_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PathConstraintPositionTimeline wrapper
|
/// PathConstraintPositionTimeline wrapper
|
||||||
|
@objc(SpinePathConstraintPositionTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PathConstraintPositionTimeline: ConstraintTimeline1 {
|
public class PathConstraintPositionTimeline: ConstraintTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_path_constraint_position_timeline) {
|
public init(fromPointer ptr: spine_path_constraint_position_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PathConstraintSpacingTimeline wrapper
|
/// PathConstraintSpacingTimeline wrapper
|
||||||
|
@objc(SpinePathConstraintSpacingTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PathConstraintSpacingTimeline: ConstraintTimeline1 {
|
public class PathConstraintSpacingTimeline: ConstraintTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_path_constraint_spacing_timeline) {
|
public init(fromPointer ptr: spine_path_constraint_spacing_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraint wrapper
|
/// PhysicsConstraint wrapper
|
||||||
|
@objc(SpinePhysicsConstraint)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraint: PosedActive, Posed, Constraint {
|
public class PhysicsConstraint: PosedActive, Posed, Constraint {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint) {
|
public init(fromPointer ptr: spine_physics_constraint) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_active_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintDampingTimeline wrapper
|
/// PhysicsConstraintDampingTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintDampingTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintDampingTimeline: PhysicsConstraintTimeline {
|
public class PhysicsConstraintDampingTimeline: PhysicsConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_damping_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_damping_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintData wrapper
|
/// PhysicsConstraintData wrapper
|
||||||
|
@objc(SpinePhysicsConstraintData)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintData: PosedData, ConstraintData {
|
public class PhysicsConstraintData: PosedData, ConstraintData {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_data) {
|
public init(fromPointer ptr: spine_physics_constraint_data) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
||||||
}
|
}
|
||||||
@ -206,8 +209,8 @@ public class PhysicsConstraintData: PosedData, ConstraintData {
|
|||||||
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
||||||
let result = spine_physics_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
let result = spine_physics_constraint_data_create_method(_ptr.assumingMemoryBound(to: spine_physics_constraint_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
||||||
let rtti = spine_constraint_get_rtti(result!)
|
let rtti = spine_constraint_get_rtti(result!)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_ik_constraint":
|
case "spine_ik_constraint":
|
||||||
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
||||||
case "spine_path_constraint":
|
case "spine_path_constraint":
|
||||||
@ -219,7 +222,7 @@ public class PhysicsConstraintData: PosedData, ConstraintData {
|
|||||||
case "spine_transform_constraint":
|
case "spine_transform_constraint":
|
||||||
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Constraint")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Constraint")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintGravityTimeline wrapper
|
/// PhysicsConstraintGravityTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintGravityTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintGravityTimeline: PhysicsConstraintTimeline {
|
public class PhysicsConstraintGravityTimeline: PhysicsConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_gravity_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_gravity_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintInertiaTimeline wrapper
|
/// PhysicsConstraintInertiaTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintInertiaTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintInertiaTimeline: PhysicsConstraintTimeline {
|
public class PhysicsConstraintInertiaTimeline: PhysicsConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_inertia_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_inertia_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintMassTimeline wrapper
|
/// PhysicsConstraintMassTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintMassTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintMassTimeline: PhysicsConstraintTimeline {
|
public class PhysicsConstraintMassTimeline: PhysicsConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_mass_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_mass_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintMixTimeline wrapper
|
/// PhysicsConstraintMixTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintMixTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintMixTimeline: PhysicsConstraintTimeline {
|
public class PhysicsConstraintMixTimeline: PhysicsConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_mix_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_mix_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintPose wrapper
|
/// PhysicsConstraintPose wrapper
|
||||||
public class PhysicsConstraintPose {
|
@objc(SpinePhysicsConstraintPose)
|
||||||
|
@objcMembers
|
||||||
|
public class PhysicsConstraintPose: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_physics_constraint_pose) {
|
public init(fromPointer ptr: spine_physics_constraint_pose) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_physics_constraint_pose_create()
|
let ptr = spine_physics_constraint_pose_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintResetTimeline wrapper
|
/// PhysicsConstraintResetTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintResetTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintResetTimeline: Timeline, ConstraintTimeline {
|
public class PhysicsConstraintResetTimeline: Timeline, ConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_reset_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_reset_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintStrengthTimeline wrapper
|
/// PhysicsConstraintStrengthTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintStrengthTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintStrengthTimeline: PhysicsConstraintTimeline {
|
public class PhysicsConstraintStrengthTimeline: PhysicsConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_strength_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_strength_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintTimeline wrapper
|
/// PhysicsConstraintTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintTimeline)
|
||||||
|
@objcMembers
|
||||||
open class PhysicsConstraintTimeline: CurveTimeline1, ConstraintTimeline {
|
open class PhysicsConstraintTimeline: CurveTimeline1, ConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PhysicsConstraintWindTimeline wrapper
|
/// PhysicsConstraintWindTimeline wrapper
|
||||||
|
@objc(SpinePhysicsConstraintWindTimeline)
|
||||||
|
@objcMembers
|
||||||
public class PhysicsConstraintWindTimeline: PhysicsConstraintTimeline {
|
public class PhysicsConstraintWindTimeline: PhysicsConstraintTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_physics_constraint_wind_timeline) {
|
public init(fromPointer ptr: spine_physics_constraint_wind_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_physics_constraint_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PointAttachment wrapper
|
/// PointAttachment wrapper
|
||||||
|
@objc(SpinePointAttachment)
|
||||||
|
@objcMembers
|
||||||
public class PointAttachment: Attachment {
|
public class PointAttachment: Attachment {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_point_attachment) {
|
public init(fromPointer ptr: spine_point_attachment) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_attachment_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_attachment_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PosedActive wrapper
|
/// PosedActive wrapper
|
||||||
public class PosedActive {
|
@objc(SpinePosedActive)
|
||||||
|
@objcMembers
|
||||||
|
public class PosedActive: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_posed_active) {
|
public init(fromPointer ptr: spine_posed_active) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public var isActive: Bool {
|
public var isActive: Bool {
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// PosedData wrapper
|
/// PosedData wrapper
|
||||||
public class PosedData {
|
@objc(SpinePosedData)
|
||||||
|
@objcMembers
|
||||||
|
public class PosedData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_posed_data) {
|
public init(fromPointer ptr: spine_posed_data) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ name: String) {
|
public convenience init(_ name: String) {
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// RegionAttachment wrapper
|
/// RegionAttachment wrapper
|
||||||
|
@objc(SpineRegionAttachment)
|
||||||
|
@objcMembers
|
||||||
public class RegionAttachment: Attachment {
|
public class RegionAttachment: Attachment {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_region_attachment) {
|
public init(fromPointer ptr: spine_region_attachment) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_attachment_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_attachment_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// RenderCommand wrapper
|
/// RenderCommand wrapper
|
||||||
public class RenderCommand {
|
@objc(SpineRenderCommand)
|
||||||
|
@objcMembers
|
||||||
|
public class RenderCommand: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_render_command) {
|
public init(fromPointer ptr: spine_render_command) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public var positions: UnsafeMutablePointer<Float>? {
|
public var positions: UnsafeMutablePointer<Float>? {
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Rgb2Timeline wrapper
|
/// Rgb2Timeline wrapper
|
||||||
|
@objc(SpineRgb2Timeline)
|
||||||
|
@objcMembers
|
||||||
public class Rgb2Timeline: SlotCurveTimeline {
|
public class Rgb2Timeline: SlotCurveTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_rgb2_timeline) {
|
public init(fromPointer ptr: spine_rgb2_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// RgbTimeline wrapper
|
/// RgbTimeline wrapper
|
||||||
|
@objc(SpineRgbTimeline)
|
||||||
|
@objcMembers
|
||||||
public class RgbTimeline: SlotCurveTimeline {
|
public class RgbTimeline: SlotCurveTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_rgb_timeline) {
|
public init(fromPointer ptr: spine_rgb_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// Rgba2Timeline wrapper
|
/// Rgba2Timeline wrapper
|
||||||
|
@objc(SpineRgba2Timeline)
|
||||||
|
@objcMembers
|
||||||
public class Rgba2Timeline: SlotCurveTimeline {
|
public class Rgba2Timeline: SlotCurveTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_rgba2_timeline) {
|
public init(fromPointer ptr: spine_rgba2_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// RgbaTimeline wrapper
|
/// RgbaTimeline wrapper
|
||||||
|
@objc(SpineRgbaTimeline)
|
||||||
|
@objcMembers
|
||||||
public class RgbaTimeline: SlotCurveTimeline {
|
public class RgbaTimeline: SlotCurveTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_rgba_timeline) {
|
public init(fromPointer ptr: spine_rgba_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_slot_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// RotateTimeline wrapper
|
/// RotateTimeline wrapper
|
||||||
|
@objc(SpineRotateTimeline)
|
||||||
|
@objcMembers
|
||||||
public class RotateTimeline: BoneTimeline1 {
|
public class RotateTimeline: BoneTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_rotate_timeline) {
|
public init(fromPointer ptr: spine_rotate_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ScaleTimeline wrapper
|
/// ScaleTimeline wrapper
|
||||||
|
@objc(SpineScaleTimeline)
|
||||||
|
@objcMembers
|
||||||
public class ScaleTimeline: BoneTimeline2 {
|
public class ScaleTimeline: BoneTimeline2 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_scale_timeline) {
|
public init(fromPointer ptr: spine_scale_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline2_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline2_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ScaleXTimeline wrapper
|
/// ScaleXTimeline wrapper
|
||||||
|
@objc(SpineScaleXTimeline)
|
||||||
|
@objcMembers
|
||||||
public class ScaleXTimeline: BoneTimeline1 {
|
public class ScaleXTimeline: BoneTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_scale_x_timeline) {
|
public init(fromPointer ptr: spine_scale_x_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ScaleYTimeline wrapper
|
/// ScaleYTimeline wrapper
|
||||||
|
@objc(SpineScaleYTimeline)
|
||||||
|
@objcMembers
|
||||||
public class ScaleYTimeline: BoneTimeline1 {
|
public class ScaleYTimeline: BoneTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_scale_y_timeline) {
|
public init(fromPointer ptr: spine_scale_y_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SequenceTimeline wrapper
|
/// SequenceTimeline wrapper
|
||||||
|
@objc(SpineSequenceTimeline)
|
||||||
|
@objcMembers
|
||||||
public class SequenceTimeline: Timeline, SlotTimeline {
|
public class SequenceTimeline: Timeline, SlotTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_sequence_timeline) {
|
public init(fromPointer ptr: spine_sequence_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
@ -46,8 +49,8 @@ public class SequenceTimeline: Timeline, SlotTimeline {
|
|||||||
public var attachment: Attachment {
|
public var attachment: Attachment {
|
||||||
let result = spine_sequence_timeline_get_attachment(_ptr.assumingMemoryBound(to: spine_sequence_timeline_wrapper.self))
|
let result = spine_sequence_timeline_get_attachment(_ptr.assumingMemoryBound(to: spine_sequence_timeline_wrapper.self))
|
||||||
let rtti = spine_attachment_get_rtti(result!)
|
let rtti = spine_attachment_get_rtti(result!)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -61,7 +64,7 @@ public class SequenceTimeline: Timeline, SlotTimeline {
|
|||||||
case "spine_region_attachment":
|
case "spine_region_attachment":
|
||||||
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Attachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ShearTimeline wrapper
|
/// ShearTimeline wrapper
|
||||||
|
@objc(SpineShearTimeline)
|
||||||
|
@objcMembers
|
||||||
public class ShearTimeline: BoneTimeline2 {
|
public class ShearTimeline: BoneTimeline2 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_shear_timeline) {
|
public init(fromPointer ptr: spine_shear_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline2_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline2_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ShearXTimeline wrapper
|
/// ShearXTimeline wrapper
|
||||||
|
@objc(SpineShearXTimeline)
|
||||||
|
@objcMembers
|
||||||
public class ShearXTimeline: BoneTimeline1 {
|
public class ShearXTimeline: BoneTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_shear_x_timeline) {
|
public init(fromPointer ptr: spine_shear_x_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// ShearYTimeline wrapper
|
/// ShearYTimeline wrapper
|
||||||
|
@objc(SpineShearYTimeline)
|
||||||
|
@objcMembers
|
||||||
public class ShearYTimeline: BoneTimeline1 {
|
public class ShearYTimeline: BoneTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_shear_y_timeline) {
|
public init(fromPointer ptr: spine_shear_y_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bone_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SkeletonBinary wrapper
|
/// SkeletonBinary wrapper
|
||||||
public class SkeletonBinary {
|
@objc(SpineSkeletonBinary)
|
||||||
|
@objcMembers
|
||||||
|
public class SkeletonBinary: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skeleton_binary) {
|
public init(fromPointer ptr: spine_skeleton_binary) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ atlas: Atlas) {
|
public convenience init(_ atlas: Atlas) {
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SkeletonBounds wrapper
|
/// SkeletonBounds wrapper
|
||||||
public class SkeletonBounds {
|
@objc(SpineSkeletonBounds)
|
||||||
|
@objcMembers
|
||||||
|
public class SkeletonBounds: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skeleton_bounds) {
|
public init(fromPointer ptr: spine_skeleton_bounds) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_skeleton_bounds_create()
|
let ptr = spine_skeleton_bounds_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SkeletonClipping wrapper
|
/// SkeletonClipping wrapper
|
||||||
public class SkeletonClipping {
|
@objc(SpineSkeletonClipping)
|
||||||
|
@objcMembers
|
||||||
|
public class SkeletonClipping: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skeleton_clipping) {
|
public init(fromPointer ptr: spine_skeleton_clipping) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_skeleton_clipping_create()
|
let ptr = spine_skeleton_clipping_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SkeletonData wrapper
|
/// SkeletonData wrapper
|
||||||
public class SkeletonData {
|
@objc(SpineSkeletonData)
|
||||||
|
@objcMembers
|
||||||
|
public class SkeletonData: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skeleton_data) {
|
public init(fromPointer ptr: spine_skeleton_data) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_skeleton_data_create()
|
let ptr = spine_skeleton_data_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
@ -155,7 +158,7 @@ public class SkeletonData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var hash: String {
|
public var hashString: String {
|
||||||
get {
|
get {
|
||||||
let result = spine_skeleton_data_get_hash(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self))
|
let result = spine_skeleton_data_get_hash(_ptr.assumingMemoryBound(to: spine_skeleton_data_wrapper.self))
|
||||||
return String(cString: result!)
|
return String(cString: result!)
|
||||||
|
|||||||
@ -33,11 +33,14 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SkeletonJson wrapper
|
/// SkeletonJson wrapper
|
||||||
public class SkeletonJson {
|
@objc(SpineSkeletonJson)
|
||||||
|
@objcMembers
|
||||||
|
public class SkeletonJson: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skeleton_json) {
|
public init(fromPointer ptr: spine_skeleton_json) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init(_ atlas: Atlas) {
|
public convenience init(_ atlas: Atlas) {
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SkeletonRenderer wrapper
|
/// SkeletonRenderer wrapper
|
||||||
public class SkeletonRenderer {
|
@objc(SpineSkeletonRenderer)
|
||||||
|
@objcMembers
|
||||||
|
public class SkeletonRenderer: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_skeleton_renderer) {
|
public init(fromPointer ptr: spine_skeleton_renderer) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_skeleton_renderer_create()
|
let ptr = spine_skeleton_renderer_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SliderData wrapper
|
/// SliderData wrapper
|
||||||
|
@objc(SpineSliderData)
|
||||||
|
@objcMembers
|
||||||
public class SliderData: PosedData, ConstraintData {
|
public class SliderData: PosedData, ConstraintData {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_slider_data) {
|
public init(fromPointer ptr: spine_slider_data) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
||||||
}
|
}
|
||||||
@ -93,8 +96,8 @@ public class SliderData: PosedData, ConstraintData {
|
|||||||
let result = spine_slider_data_get_property(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self))
|
let result = spine_slider_data_get_property(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self))
|
||||||
guard let ptr = result else { return nil }
|
guard let ptr = result else { return nil }
|
||||||
let rtti = spine_from_property_get_rtti(ptr)
|
let rtti = spine_from_property_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_from_rotate":
|
case "spine_from_rotate":
|
||||||
return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self))
|
return FromRotate(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_rotate_wrapper.self))
|
||||||
case "spine_from_scale_x":
|
case "spine_from_scale_x":
|
||||||
@ -108,7 +111,7 @@ public class SliderData: PosedData, ConstraintData {
|
|||||||
case "spine_from_y":
|
case "spine_from_y":
|
||||||
return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self))
|
return FromY(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_from_y_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class FromProperty")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class FromProperty")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
@ -154,8 +157,8 @@ public class SliderData: PosedData, ConstraintData {
|
|||||||
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
public func createMethod(_ skeleton: Skeleton) -> Constraint {
|
||||||
let result = spine_slider_data_create_method(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
let result = spine_slider_data_create_method(_ptr.assumingMemoryBound(to: spine_slider_data_wrapper.self), skeleton._ptr.assumingMemoryBound(to: spine_skeleton_wrapper.self))
|
||||||
let rtti = spine_constraint_get_rtti(result!)
|
let rtti = spine_constraint_get_rtti(result!)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_ik_constraint":
|
case "spine_ik_constraint":
|
||||||
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
return IkConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_ik_constraint_wrapper.self))
|
||||||
case "spine_path_constraint":
|
case "spine_path_constraint":
|
||||||
@ -167,7 +170,7 @@ public class SliderData: PosedData, ConstraintData {
|
|||||||
case "spine_transform_constraint":
|
case "spine_transform_constraint":
|
||||||
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
return TransformConstraint(fromPointer: UnsafeMutableRawPointer(result!).assumingMemoryBound(to: spine_transform_constraint_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Constraint")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Constraint")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SliderMixTimeline wrapper
|
/// SliderMixTimeline wrapper
|
||||||
|
@objc(SpineSliderMixTimeline)
|
||||||
|
@objcMembers
|
||||||
public class SliderMixTimeline: ConstraintTimeline1 {
|
public class SliderMixTimeline: ConstraintTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_slider_mix_timeline) {
|
public init(fromPointer ptr: spine_slider_mix_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SliderPose wrapper
|
/// SliderPose wrapper
|
||||||
public class SliderPose {
|
@objc(SpineSliderPose)
|
||||||
|
@objcMembers
|
||||||
|
public class SliderPose: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_slider_pose) {
|
public init(fromPointer ptr: spine_slider_pose) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_slider_pose_create()
|
let ptr = spine_slider_pose_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SliderTimeline wrapper
|
/// SliderTimeline wrapper
|
||||||
|
@objc(SpineSliderTimeline)
|
||||||
|
@objcMembers
|
||||||
public class SliderTimeline: ConstraintTimeline1 {
|
public class SliderTimeline: ConstraintTimeline1 {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_slider_timeline) {
|
public init(fromPointer ptr: spine_slider_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_constraint_timeline1_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SlotCurveTimeline wrapper
|
/// SlotCurveTimeline wrapper
|
||||||
|
@objc(SpineSlotCurveTimeline)
|
||||||
|
@objcMembers
|
||||||
open class SlotCurveTimeline: CurveTimeline, SlotTimeline {
|
open class SlotCurveTimeline: CurveTimeline, SlotTimeline {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_slot_curve_timeline) {
|
public init(fromPointer ptr: spine_slot_curve_timeline) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_curve_timeline_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,10 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SlotData wrapper
|
/// SlotData wrapper
|
||||||
|
@objc(SpineSlotData)
|
||||||
|
@objcMembers
|
||||||
public class SlotData: PosedData {
|
public class SlotData: PosedData {
|
||||||
|
@nonobjc
|
||||||
public init(fromPointer ptr: spine_slot_data) {
|
public init(fromPointer ptr: spine_slot_data) {
|
||||||
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
super.init(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_posed_data_wrapper.self))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,14 +33,17 @@ import Foundation
|
|||||||
import SpineC
|
import SpineC
|
||||||
|
|
||||||
/// SlotPose wrapper
|
/// SlotPose wrapper
|
||||||
public class SlotPose {
|
@objc(SpineSlotPose)
|
||||||
|
@objcMembers
|
||||||
|
public class SlotPose: NSObject {
|
||||||
public let _ptr: UnsafeMutableRawPointer
|
public let _ptr: UnsafeMutableRawPointer
|
||||||
|
|
||||||
public init(fromPointer ptr: spine_slot_pose) {
|
public init(fromPointer ptr: spine_slot_pose) {
|
||||||
self._ptr = UnsafeMutableRawPointer(ptr)
|
self._ptr = UnsafeMutableRawPointer(ptr)
|
||||||
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
public convenience init() {
|
public override convenience init() {
|
||||||
let ptr = spine_slot_pose_create()
|
let ptr = spine_slot_pose_create()
|
||||||
self.init(fromPointer: ptr!)
|
self.init(fromPointer: ptr!)
|
||||||
}
|
}
|
||||||
@ -70,8 +73,8 @@ public class SlotPose {
|
|||||||
let result = spine_slot_pose_get_attachment(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self))
|
let result = spine_slot_pose_get_attachment(_ptr.assumingMemoryBound(to: spine_slot_pose_wrapper.self))
|
||||||
guard let ptr = result else { return nil }
|
guard let ptr = result else { return nil }
|
||||||
let rtti = spine_attachment_get_rtti(ptr)
|
let rtti = spine_attachment_get_rtti(ptr)
|
||||||
let className = String(cString: spine_rtti_get_class_name(rtti)!)
|
let rttiClassName = String(cString: spine_rtti_get_class_name(rtti)!)
|
||||||
switch className {
|
switch rttiClassName {
|
||||||
case "spine_bounding_box_attachment":
|
case "spine_bounding_box_attachment":
|
||||||
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
return BoundingBoxAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_bounding_box_attachment_wrapper.self))
|
||||||
case "spine_clipping_attachment":
|
case "spine_clipping_attachment":
|
||||||
@ -85,7 +88,7 @@ public class SlotPose {
|
|||||||
case "spine_region_attachment":
|
case "spine_region_attachment":
|
||||||
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
return RegionAttachment(fromPointer: UnsafeMutableRawPointer(ptr).assumingMemoryBound(to: spine_region_attachment_wrapper.self))
|
||||||
default:
|
default:
|
||||||
fatalError("Unknown concrete type: \(className) for abstract class Attachment")
|
fatalError("Unknown concrete type: \(rttiClassName) for abstract class Attachment")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user