From 106c39d0af7045eca89ebd080b37ea2c56bb3082 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 31 Jul 2025 21:32:13 +0200 Subject: [PATCH] [workflows] Add diff artifact to dart format check for debugging --- .github/workflows/format-check-dart.yml | 21 +- spine-c/README.md | 8 +- spine-cpp/README.md | 2 + .../Spine/Generated/AlphaTimeline.swift | 135 ++++ .../Sources/Spine/Generated/Animation.swift | 101 +++ .../Spine/Generated/AnimationState.swift | 156 +++++ .../Spine/Generated/AnimationStateData.swift | 89 +++ .../Sources/Spine/Generated/Arrays.swift | 29 + spine-ios/Sources/Spine/Generated/Atlas.swift | 72 ++ .../Generated/AtlasAttachmentLoader.swift | 95 +++ .../Sources/Spine/Generated/AtlasPage.swift | 158 +++++ .../Sources/Spine/Generated/AtlasRegion.swift | 237 +++++++ .../Sources/Spine/Generated/Attachment.swift | 87 +++ .../Spine/Generated/AttachmentLoader.swift | 85 +++ .../Spine/Generated/AttachmentTimeline.swift | 95 +++ spine-ios/Sources/Spine/Generated/Bone.swift | 120 ++++ .../Sources/Spine/Generated/BoneData.swift | 106 +++ .../Sources/Spine/Generated/BoneLocal.swift | 140 ++++ .../Sources/Spine/Generated/BonePose.swift | 259 +++++++ .../Spine/Generated/BoneTimeline.swift | 73 ++ .../Spine/Generated/BoneTimeline1.swift | 130 ++++ .../Spine/Generated/BoneTimeline2.swift | 110 +++ .../Generated/BoundingBoxAttachment.swift | 135 ++++ .../Spine/Generated/ClippingAttachment.swift | 144 ++++ spine-ios/Sources/Spine/Generated/Color.swift | 144 ++++ .../Sources/Spine/Generated/Constraint.swift | 82 +++ .../Spine/Generated/ConstraintData.swift | 79 +++ .../Spine/Generated/ConstraintTimeline.swift | 73 ++ .../Spine/Generated/ConstraintTimeline1.swift | 130 ++++ .../Spine/Generated/CurveTimeline.swift | 98 +++ .../Spine/Generated/CurveTimeline1.swift | 122 ++++ .../Spine/Generated/DeformTimeline.swift | 128 ++++ .../Spine/Generated/DrawOrderTimeline.swift | 87 +++ spine-ios/Sources/Spine/Generated/Enums.swift | 45 ++ spine-ios/Sources/Spine/Generated/Event.swift | 110 +++ .../Sources/Spine/Generated/EventData.swift | 115 ++++ .../Spine/Generated/EventQueueEntry.swift | 86 +++ .../Spine/Generated/EventTimeline.swift | 91 +++ .../Spine/Generated/FromProperty.swift | 85 +++ .../Sources/Spine/Generated/FromRotate.swift | 63 ++ .../Sources/Spine/Generated/FromScaleX.swift | 63 ++ .../Sources/Spine/Generated/FromScaleY.swift | 63 ++ .../Sources/Spine/Generated/FromShearY.swift | 63 ++ spine-ios/Sources/Spine/Generated/FromX.swift | 63 ++ spine-ios/Sources/Spine/Generated/FromY.swift | 63 ++ .../Spine/Generated/IkConstraint.swift | 132 ++++ .../Spine/Generated/IkConstraintData.swift | 103 +++ .../Spine/Generated/IkConstraintPose.swift | 104 +++ .../Generated/IkConstraintTimeline.swift | 115 ++++ .../Spine/Generated/InheritTimeline.swift | 95 +++ .../Sources/Spine/Generated/LinkedMesh.swift | 65 ++ .../Spine/Generated/MeshAttachment.swift | 232 +++++++ .../Spine/Generated/PathAttachment.swift | 159 +++++ .../Spine/Generated/PathConstraint.swift | 124 ++++ .../Spine/Generated/PathConstraintData.swift | 127 ++++ .../Generated/PathConstraintMixTimeline.swift | 115 ++++ .../Spine/Generated/PathConstraintPose.swift | 104 +++ .../PathConstraintPositionTimeline.swift | 135 ++++ .../PathConstraintSpacingTimeline.swift | 135 ++++ .../Spine/Generated/PhysicsConstraint.swift | 132 ++++ .../PhysicsConstraintDampingTimeline.swift | 135 ++++ .../Generated/PhysicsConstraintData.swift | 203 ++++++ .../PhysicsConstraintGravityTimeline.swift | 135 ++++ .../PhysicsConstraintInertiaTimeline.swift | 135 ++++ .../PhysicsConstraintMassTimeline.swift | 135 ++++ .../PhysicsConstraintMixTimeline.swift | 135 ++++ .../Generated/PhysicsConstraintPose.swift | 120 ++++ .../PhysicsConstraintResetTimeline.swift | 95 +++ .../PhysicsConstraintStrengthTimeline.swift | 135 ++++ .../Generated/PhysicsConstraintTimeline.swift | 130 ++++ .../PhysicsConstraintWindTimeline.swift | 135 ++++ .../Spine/Generated/PointAttachment.swift | 118 ++++ .../Sources/Spine/Generated/Polygon.swift | 76 +++ spine-ios/Sources/Spine/Generated/Posed.swift | 67 ++ .../Sources/Spine/Generated/PosedActive.swift | 63 ++ .../Sources/Spine/Generated/PosedData.swift | 73 ++ .../Spine/Generated/RegionAttachment.swift | 189 ++++++ .../Spine/Generated/RenderCommand.swift | 96 +++ .../Spine/Generated/Rgb2Timeline.swift | 115 ++++ .../Sources/Spine/Generated/RgbTimeline.swift | 115 ++++ .../Spine/Generated/Rgba2Timeline.swift | 115 ++++ .../Spine/Generated/RgbaTimeline.swift | 115 ++++ .../Spine/Generated/RotateTimeline.swift | 135 ++++ spine-ios/Sources/Spine/Generated/Rtti.swift | 68 ++ .../Spine/Generated/ScaleTimeline.swift | 115 ++++ .../Spine/Generated/ScaleXTimeline.swift | 135 ++++ .../Spine/Generated/ScaleYTimeline.swift | 135 ++++ .../Sources/Spine/Generated/Sequence.swift | 110 +++ .../Spine/Generated/SequenceTimeline.swift | 100 +++ .../Spine/Generated/ShearTimeline.swift | 115 ++++ .../Spine/Generated/ShearXTimeline.swift | 135 ++++ .../Spine/Generated/ShearYTimeline.swift | 135 ++++ .../Sources/Spine/Generated/Skeleton.swift | 284 ++++++++ .../Spine/Generated/SkeletonBinary.swift | 84 +++ .../Spine/Generated/SkeletonBounds.swift | 136 ++++ .../Spine/Generated/SkeletonClipping.swift | 100 +++ .../Spine/Generated/SkeletonData.swift | 211 ++++++ .../Spine/Generated/SkeletonJson.swift | 84 +++ .../Spine/Generated/SkeletonRenderer.swift | 65 ++ spine-ios/Sources/Spine/Generated/Skin.swift | 103 +++ .../Sources/Spine/Generated/Slider.swift | 120 ++++ .../Sources/Spine/Generated/SliderData.swift | 149 ++++ .../Spine/Generated/SliderMixTimeline.swift | 135 ++++ .../Sources/Spine/Generated/SliderPose.swift | 80 +++ .../Spine/Generated/SliderTimeline.swift | 135 ++++ spine-ios/Sources/Spine/Generated/Slot.swift | 96 +++ .../Spine/Generated/SlotCurveTimeline.swift | 106 +++ .../Sources/Spine/Generated/SlotData.swift | 101 +++ .../Sources/Spine/Generated/SlotPose.swift | 103 +++ .../Spine/Generated/SlotTimeline.swift | 73 ++ .../Spine/Generated/Spine.Generated.swift | 29 + .../Spine/Generated/TextureRegion.swift | 118 ++++ .../Sources/Spine/Generated/Timeline.swift | 89 +++ .../Sources/Spine/Generated/ToProperty.swift | 97 +++ .../Sources/Spine/Generated/ToRotate.swift | 67 ++ .../Sources/Spine/Generated/ToScaleX.swift | 67 ++ .../Sources/Spine/Generated/ToScaleY.swift | 67 ++ .../Sources/Spine/Generated/ToShearY.swift | 67 ++ spine-ios/Sources/Spine/Generated/ToX.swift | 67 ++ spine-ios/Sources/Spine/Generated/ToY.swift | 67 ++ .../Sources/Spine/Generated/TrackEntry.swift | 290 ++++++++ .../Spine/Generated/TransformConstraint.swift | 124 ++++ .../Generated/TransformConstraintData.swift | 179 +++++ .../Generated/TransformConstraintPose.swift | 112 +++ .../TransformConstraintTimeline.swift | 115 ++++ .../Spine/Generated/TranslateTimeline.swift | 115 ++++ .../Spine/Generated/TranslateXTimeline.swift | 135 ++++ .../Spine/Generated/TranslateYTimeline.swift | 135 ++++ .../Sources/Spine/Generated/Update.swift | 69 ++ .../Spine/Generated/VertexAttachment.swift | 125 ++++ spine-ios/codegen/package-lock.json | 261 +------ spine-ios/codegen/package.json | 12 +- spine-ios/codegen/src/index.ts | 33 + spine-ios/codegen/src/swift-writer.ts | 635 ++++++++++++++++++ spine-libgdx/spine-libgdx-tests/.classpath | 16 - spine-libgdx/spine-libgdx-tests/.project | 17 - spine-libgdx/spine-libgdx/.classpath | 11 - spine-libgdx/spine-libgdx/.project | 17 - spine-libgdx/spine-skeletonviewer/.classpath | 23 +- spine-libgdx/spine-skeletonviewer/.project | 6 + todos/todos.md | 1 - .../task.md | 12 +- 142 files changed, 15135 insertions(+), 343 deletions(-) create mode 100644 spine-ios/Sources/Spine/Generated/AlphaTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Animation.swift create mode 100644 spine-ios/Sources/Spine/Generated/AnimationState.swift create mode 100644 spine-ios/Sources/Spine/Generated/AnimationStateData.swift create mode 100644 spine-ios/Sources/Spine/Generated/Arrays.swift create mode 100644 spine-ios/Sources/Spine/Generated/Atlas.swift create mode 100644 spine-ios/Sources/Spine/Generated/AtlasAttachmentLoader.swift create mode 100644 spine-ios/Sources/Spine/Generated/AtlasPage.swift create mode 100644 spine-ios/Sources/Spine/Generated/AtlasRegion.swift create mode 100644 spine-ios/Sources/Spine/Generated/Attachment.swift create mode 100644 spine-ios/Sources/Spine/Generated/AttachmentLoader.swift create mode 100644 spine-ios/Sources/Spine/Generated/AttachmentTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Bone.swift create mode 100644 spine-ios/Sources/Spine/Generated/BoneData.swift create mode 100644 spine-ios/Sources/Spine/Generated/BoneLocal.swift create mode 100644 spine-ios/Sources/Spine/Generated/BonePose.swift create mode 100644 spine-ios/Sources/Spine/Generated/BoneTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/BoneTimeline1.swift create mode 100644 spine-ios/Sources/Spine/Generated/BoneTimeline2.swift create mode 100644 spine-ios/Sources/Spine/Generated/BoundingBoxAttachment.swift create mode 100644 spine-ios/Sources/Spine/Generated/ClippingAttachment.swift create mode 100644 spine-ios/Sources/Spine/Generated/Color.swift create mode 100644 spine-ios/Sources/Spine/Generated/Constraint.swift create mode 100644 spine-ios/Sources/Spine/Generated/ConstraintData.swift create mode 100644 spine-ios/Sources/Spine/Generated/ConstraintTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/ConstraintTimeline1.swift create mode 100644 spine-ios/Sources/Spine/Generated/CurveTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/CurveTimeline1.swift create mode 100644 spine-ios/Sources/Spine/Generated/DeformTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/DrawOrderTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Enums.swift create mode 100644 spine-ios/Sources/Spine/Generated/Event.swift create mode 100644 spine-ios/Sources/Spine/Generated/EventData.swift create mode 100644 spine-ios/Sources/Spine/Generated/EventQueueEntry.swift create mode 100644 spine-ios/Sources/Spine/Generated/EventTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/FromProperty.swift create mode 100644 spine-ios/Sources/Spine/Generated/FromRotate.swift create mode 100644 spine-ios/Sources/Spine/Generated/FromScaleX.swift create mode 100644 spine-ios/Sources/Spine/Generated/FromScaleY.swift create mode 100644 spine-ios/Sources/Spine/Generated/FromShearY.swift create mode 100644 spine-ios/Sources/Spine/Generated/FromX.swift create mode 100644 spine-ios/Sources/Spine/Generated/FromY.swift create mode 100644 spine-ios/Sources/Spine/Generated/IkConstraint.swift create mode 100644 spine-ios/Sources/Spine/Generated/IkConstraintData.swift create mode 100644 spine-ios/Sources/Spine/Generated/IkConstraintPose.swift create mode 100644 spine-ios/Sources/Spine/Generated/IkConstraintTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/InheritTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/LinkedMesh.swift create mode 100644 spine-ios/Sources/Spine/Generated/MeshAttachment.swift create mode 100644 spine-ios/Sources/Spine/Generated/PathAttachment.swift create mode 100644 spine-ios/Sources/Spine/Generated/PathConstraint.swift create mode 100644 spine-ios/Sources/Spine/Generated/PathConstraintData.swift create mode 100644 spine-ios/Sources/Spine/Generated/PathConstraintMixTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PathConstraintPose.swift create mode 100644 spine-ios/Sources/Spine/Generated/PathConstraintPositionTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PathConstraintSpacingTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraint.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintDampingTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintData.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintGravityTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintInertiaTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintMassTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintMixTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintPose.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintResetTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintStrengthTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PhysicsConstraintWindTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/PointAttachment.swift create mode 100644 spine-ios/Sources/Spine/Generated/Polygon.swift create mode 100644 spine-ios/Sources/Spine/Generated/Posed.swift create mode 100644 spine-ios/Sources/Spine/Generated/PosedActive.swift create mode 100644 spine-ios/Sources/Spine/Generated/PosedData.swift create mode 100644 spine-ios/Sources/Spine/Generated/RegionAttachment.swift create mode 100644 spine-ios/Sources/Spine/Generated/RenderCommand.swift create mode 100644 spine-ios/Sources/Spine/Generated/Rgb2Timeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/RgbTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Rgba2Timeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/RgbaTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/RotateTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Rtti.swift create mode 100644 spine-ios/Sources/Spine/Generated/ScaleTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/ScaleXTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/ScaleYTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Sequence.swift create mode 100644 spine-ios/Sources/Spine/Generated/SequenceTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/ShearTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/ShearXTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/ShearYTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Skeleton.swift create mode 100644 spine-ios/Sources/Spine/Generated/SkeletonBinary.swift create mode 100644 spine-ios/Sources/Spine/Generated/SkeletonBounds.swift create mode 100644 spine-ios/Sources/Spine/Generated/SkeletonClipping.swift create mode 100644 spine-ios/Sources/Spine/Generated/SkeletonData.swift create mode 100644 spine-ios/Sources/Spine/Generated/SkeletonJson.swift create mode 100644 spine-ios/Sources/Spine/Generated/SkeletonRenderer.swift create mode 100644 spine-ios/Sources/Spine/Generated/Skin.swift create mode 100644 spine-ios/Sources/Spine/Generated/Slider.swift create mode 100644 spine-ios/Sources/Spine/Generated/SliderData.swift create mode 100644 spine-ios/Sources/Spine/Generated/SliderMixTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/SliderPose.swift create mode 100644 spine-ios/Sources/Spine/Generated/SliderTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Slot.swift create mode 100644 spine-ios/Sources/Spine/Generated/SlotCurveTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/SlotData.swift create mode 100644 spine-ios/Sources/Spine/Generated/SlotPose.swift create mode 100644 spine-ios/Sources/Spine/Generated/SlotTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Spine.Generated.swift create mode 100644 spine-ios/Sources/Spine/Generated/TextureRegion.swift create mode 100644 spine-ios/Sources/Spine/Generated/Timeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/ToProperty.swift create mode 100644 spine-ios/Sources/Spine/Generated/ToRotate.swift create mode 100644 spine-ios/Sources/Spine/Generated/ToScaleX.swift create mode 100644 spine-ios/Sources/Spine/Generated/ToScaleY.swift create mode 100644 spine-ios/Sources/Spine/Generated/ToShearY.swift create mode 100644 spine-ios/Sources/Spine/Generated/ToX.swift create mode 100644 spine-ios/Sources/Spine/Generated/ToY.swift create mode 100644 spine-ios/Sources/Spine/Generated/TrackEntry.swift create mode 100644 spine-ios/Sources/Spine/Generated/TransformConstraint.swift create mode 100644 spine-ios/Sources/Spine/Generated/TransformConstraintData.swift create mode 100644 spine-ios/Sources/Spine/Generated/TransformConstraintPose.swift create mode 100644 spine-ios/Sources/Spine/Generated/TransformConstraintTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/TranslateTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/TranslateXTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/TranslateYTimeline.swift create mode 100644 spine-ios/Sources/Spine/Generated/Update.swift create mode 100644 spine-ios/Sources/Spine/Generated/VertexAttachment.swift create mode 100644 spine-ios/codegen/src/swift-writer.ts delete mode 100644 spine-libgdx/spine-libgdx-tests/.classpath delete mode 100644 spine-libgdx/spine-libgdx-tests/.project delete mode 100644 spine-libgdx/spine-libgdx/.classpath delete mode 100644 spine-libgdx/spine-libgdx/.project diff --git a/.github/workflows/format-check-dart.yml b/.github/workflows/format-check-dart.yml index e08cc1b8a..c9c3476df 100644 --- a/.github/workflows/format-check-dart.yml +++ b/.github/workflows/format-check-dart.yml @@ -25,4 +25,23 @@ jobs: - name: Check for changes run: | git ls-files -m - if [[ `git ls-files -m` ]]; then echo "Detected Dart formatting errors!" && exit 1; fi \ No newline at end of file + if [[ `git ls-files -m` ]]; then + echo "Detected Dart formatting errors!" + echo "Creating diff files..." + mkdir -p dart-format-diff + git diff > dart-format-diff/full-diff.txt + git ls-files -m > dart-format-diff/modified-files.txt + for file in $(git ls-files -m | head -10); do + echo "=== Diff for $file ===" >> dart-format-diff/file-diffs.txt + git diff "$file" >> dart-format-diff/file-diffs.txt + echo -e "\n\n" >> dart-format-diff/file-diffs.txt + done + exit 1 + fi + + - name: Upload diff artifact + if: failure() + uses: actions/upload-artifact@v3 + with: + name: dart-format-diff + path: dart-format-diff/ \ No newline at end of file diff --git a/spine-c/README.md b/spine-c/README.md index a103b3104..54b6ffbe8 100644 --- a/spine-c/README.md +++ b/spine-c/README.md @@ -20,6 +20,10 @@ spine-c works with data exported from spine 4.3.xx. spine-c supports all spine features. +## Usage + +### [Please see the spine-c guide for full documentation](http://esotericsoftware.com/spine-c) + ## Setup ### Manual Copy @@ -44,10 +48,6 @@ add_subdirectory(${spine-runtimes_SOURCE_DIR}/spine-c ${spine-runtimes_BINARY_DI target_link_libraries(your_target PRIVATE spine-c) ``` -## Usage - -### [Please see the spine-c guide for full documentation](http://esotericsoftware.com/spine-c) - ## Runtimes extending spine-c - [spine-ios](../spine-ios) - [spine-flutter](../spine-flutter) diff --git a/spine-cpp/README.md b/spine-cpp/README.md index a9b3f3cf6..cab32f449 100644 --- a/spine-cpp/README.md +++ b/spine-cpp/README.md @@ -52,3 +52,5 @@ target_link_libraries(your_target PRIVATE spine-cpp) - [spine-sfml](../spine-sfml/cpp) - [spine-cocos2dx](../spine-cocos2dx) - [spine-ue](../spine-ue) +- [spine-flutter (via spine-c & FFI)](../spine-flutter) +- [spine-ios (via spine-c & FFI)](../spine-ios) \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AlphaTimeline.swift b/spine-ios/Sources/Spine/Generated/AlphaTimeline.swift new file mode 100644 index 000000000..95dbb418b --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AlphaTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAlphaTimeline) +@objcMembers +public final class AlphaTimeline: CurveTimeline1, SlotTimeline { + internal let wrappee: spine_alpha_timeline + + internal init(_ wrappee: spine_alpha_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, slotIndex: Int32) { + let ptr = spine_alpha_timeline_create(frameCount, bezierCount, slotIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_alpha_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_alpha_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getSlotIndex() -> Int32 { + return spine_alpha_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_alpha_timeline_set_slot_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_alpha_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_alpha_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_alpha_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_alpha_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_alpha_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_alpha_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_alpha_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_alpha_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_alpha_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_alpha_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_alpha_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_alpha_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_alpha_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_alpha_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_alpha_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_alpha_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_alpha_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_alpha_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Animation.swift b/spine-ios/Sources/Spine/Generated/Animation.swift new file mode 100644 index 000000000..c02ea6efa --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Animation.swift @@ -0,0 +1,101 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAnimation) +@objcMembers +public final class Animation: NSObject { + internal let wrappee: spine_animation + + internal init(_ wrappee: spine_animation) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Animation else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(name: String?, timelines: ArrayTimeline, duration: Float) { + let ptr = spine_animation_create(name, timelines, duration) + self.init(ptr) + } + + public func getTimelines() -> ArrayTimeline { + return spine_animation_get_timelines(wrappee) + } + + public func setTimelines(timelines: ArrayTimeline) { + spine_animation_set_timelines(wrappee, timelines) + } + + public func hasTimeline(ids: ArrayPropertyId) -> Bool { + return spine_animation_has_timeline(wrappee, ids) != 0 + } + + public func getDuration() -> Float { + return spine_animation_get_duration(wrappee) + } + + public func setDuration(inValue: Float) { + spine_animation_set_duration(wrappee, inValue) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, loop: Bool, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_animation_apply(wrappee, skeleton.wrappee, lastTime, time, loop ? 1 : 0, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getName() -> String? { + let result = spine_animation_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getBones() -> ArrayInt { + return spine_animation_get_bones(wrappee) + } + + public func search(values: ArrayFloat, target: Float) -> Int32 { + return spine_animation_search_1(wrappee, values, target) + } + + public func search(values: ArrayFloat, target: Float, step: Int32) -> Int32 { + return spine_animation_search_2(wrappee, values, target, step) + } + + deinit { + spine_animation_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AnimationState.swift b/spine-ios/Sources/Spine/Generated/AnimationState.swift new file mode 100644 index 000000000..ba60fa273 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AnimationState.swift @@ -0,0 +1,156 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAnimationState) +@objcMembers +public final class AnimationState: NSObject { + internal let wrappee: spine_animation_state + + internal init(_ wrappee: spine_animation_state) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? AnimationState else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(data: AnimationStateData) { + let ptr = spine_animation_state_create(data.wrappee) + self.init(ptr) + } + + public func update(delta: Float) { + spine_animation_state_update(wrappee, delta) + } + + public func apply(skeleton: Skeleton) -> Bool { + return spine_animation_state_apply(wrappee, skeleton.wrappee) != 0 + } + + public func clearTracks() { + spine_animation_state_clear_tracks(wrappee) + } + + public func clearTrack(trackIndex: size_t) { + spine_animation_state_clear_track(wrappee, trackIndex) + } + + public func setAnimation(trackIndex: size_t, animationName: String?, loop: Bool) -> TrackEntry { + let result = spine_animation_state_set_animation_1(wrappee, trackIndex, animationName?.cString(using: .utf8), loop ? 1 : 0) + return TrackEntry(result) + } + + public func setAnimation(trackIndex: size_t, animation: Animation, loop: Bool) -> TrackEntry { + let result = spine_animation_state_set_animation_2(wrappee, trackIndex, animation.wrappee, loop ? 1 : 0) + return TrackEntry(result) + } + + public func addAnimation(trackIndex: size_t, animationName: String?, loop: Bool, delay: Float) -> TrackEntry { + let result = spine_animation_state_add_animation_1(wrappee, trackIndex, animationName?.cString(using: .utf8), loop ? 1 : 0, delay) + return TrackEntry(result) + } + + public func addAnimation(trackIndex: size_t, animation: Animation, loop: Bool, delay: Float) -> TrackEntry { + let result = spine_animation_state_add_animation_2(wrappee, trackIndex, animation.wrappee, loop ? 1 : 0, delay) + return TrackEntry(result) + } + + public func setEmptyAnimation(trackIndex: size_t, mixDuration: Float) -> TrackEntry { + let result = spine_animation_state_set_empty_animation(wrappee, trackIndex, mixDuration) + return TrackEntry(result) + } + + public func addEmptyAnimation(trackIndex: size_t, mixDuration: Float, delay: Float) -> TrackEntry { + let result = spine_animation_state_add_empty_animation(wrappee, trackIndex, mixDuration, delay) + return TrackEntry(result) + } + + public func setEmptyAnimations(mixDuration: Float) { + spine_animation_state_set_empty_animations(wrappee, mixDuration) + } + + public func getCurrent(trackIndex: size_t) -> TrackEntry { + let result = spine_animation_state_get_current(wrappee, trackIndex) + return TrackEntry(result) + } + + public func getData() -> AnimationStateData { + let result = spine_animation_state_get_data(wrappee) + return AnimationStateData(result) + } + + public func getTracks() -> ArrayTrackEntry { + return spine_animation_state_get_tracks(wrappee) + } + + public func getTimeScale() -> Float { + return spine_animation_state_get_time_scale(wrappee) + } + + public func setTimeScale(inValue: Float) { + spine_animation_state_set_time_scale(wrappee, inValue) + } + + public func disableQueue() { + spine_animation_state_disable_queue(wrappee) + } + + public func enableQueue() { + spine_animation_state_enable_queue(wrappee) + } + + public func setManualTrackEntryDisposal(inValue: Bool) { + spine_animation_state_set_manual_track_entry_disposal(wrappee, inValue ? 1 : 0) + } + + public func getManualTrackEntryDisposal() -> Bool { + return spine_animation_state_get_manual_track_entry_disposal(wrappee) != 0 + } + + public func disposeTrackEntry(entry: TrackEntry) { + spine_animation_state_dispose_track_entry(wrappee, entry.wrappee) + } + + public func getRendererObject() -> OpaquePointer? { + return spine_animation_state_get_renderer_object(wrappee) + } + + deinit { + spine_animation_state_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AnimationStateData.swift b/spine-ios/Sources/Spine/Generated/AnimationStateData.swift new file mode 100644 index 000000000..25d1244bc --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AnimationStateData.swift @@ -0,0 +1,89 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAnimationStateData) +@objcMembers +public final class AnimationStateData: NSObject { + internal let wrappee: spine_animation_state_data + + internal init(_ wrappee: spine_animation_state_data) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? AnimationStateData else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(skeletonData: SkeletonData) { + let ptr = spine_animation_state_data_create(skeletonData.wrappee) + self.init(ptr) + } + + public func getSkeletonData() -> SkeletonData { + let result = spine_animation_state_data_get_skeleton_data(wrappee) + return SkeletonData(result) + } + + public func getDefaultMix() -> Float { + return spine_animation_state_data_get_default_mix(wrappee) + } + + public func setDefaultMix(inValue: Float) { + spine_animation_state_data_set_default_mix(wrappee, inValue) + } + + public func setMix(fromName: String?, toName: String?, duration: Float) { + spine_animation_state_data_set_mix_1(wrappee, fromName?.cString(using: .utf8), toName?.cString(using: .utf8), duration) + } + + public func setMix(from: Animation, to: Animation, duration: Float) { + spine_animation_state_data_set_mix_2(wrappee, from.wrappee, to.wrappee, duration) + } + + public func getMix(from: Animation, to: Animation) -> Float { + return spine_animation_state_data_get_mix(wrappee, from.wrappee, to.wrappee) + } + + public func clear() { + spine_animation_state_data_clear(wrappee) + } + + deinit { + spine_animation_state_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Arrays.swift b/spine-ios/Sources/Spine/Generated/Arrays.swift new file mode 100644 index 000000000..e4637011e --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Arrays.swift @@ -0,0 +1,29 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation diff --git a/spine-ios/Sources/Spine/Generated/Atlas.swift b/spine-ios/Sources/Spine/Generated/Atlas.swift new file mode 100644 index 000000000..40600769f --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Atlas.swift @@ -0,0 +1,72 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAtlas) +@objcMembers +public final class Atlas: NSObject { + internal let wrappee: spine_atlas + + internal init(_ wrappee: spine_atlas) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Atlas else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func flipV() { + spine_atlas_flip_v(wrappee) + } + + public func findRegion(name: String?) -> AtlasRegion { + let result = spine_atlas_find_region(wrappee, name?.cString(using: .utf8)) + return AtlasRegion(result) + } + + public func getPages() -> ArrayAtlasPage { + return spine_atlas_get_pages(wrappee) + } + + public func getRegions() -> ArrayAtlasRegion { + return spine_atlas_get_regions(wrappee) + } + + deinit { + spine_atlas_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AtlasAttachmentLoader.swift b/spine-ios/Sources/Spine/Generated/AtlasAttachmentLoader.swift new file mode 100644 index 000000000..e7281c8b2 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AtlasAttachmentLoader.swift @@ -0,0 +1,95 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAtlasAttachmentLoader) +@objcMembers +public final class AtlasAttachmentLoader: NSObject, AttachmentLoader { + internal let wrappee: spine_atlas_attachment_loader + + internal init(_ wrappee: spine_atlas_attachment_loader) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? AtlasAttachmentLoader else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(atlas: Atlas) { + let ptr = spine_atlas_attachment_loader_create(atlas.wrappee) + self.init(ptr) + } + + public func newRegionAttachment(skin: Skin, name: String?, path: String?, sequence: Sequence) -> RegionAttachment { + let result = spine_atlas_attachment_loader_new_region_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8), path?.cString(using: .utf8), sequence.wrappee) + return RegionAttachment(result) + } + + public func newMeshAttachment(skin: Skin, name: String?, path: String?, sequence: Sequence) -> MeshAttachment { + let result = spine_atlas_attachment_loader_new_mesh_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8), path?.cString(using: .utf8), sequence.wrappee) + return MeshAttachment(result) + } + + public func newBoundingBoxAttachment(skin: Skin, name: String?) -> BoundingBoxAttachment { + let result = spine_atlas_attachment_loader_new_bounding_box_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return BoundingBoxAttachment(result) + } + + public func newPathAttachment(skin: Skin, name: String?) -> PathAttachment { + let result = spine_atlas_attachment_loader_new_path_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return PathAttachment(result) + } + + public func newPointAttachment(skin: Skin, name: String?) -> PointAttachment { + let result = spine_atlas_attachment_loader_new_point_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return PointAttachment(result) + } + + public func newClippingAttachment(skin: Skin, name: String?) -> ClippingAttachment { + let result = spine_atlas_attachment_loader_new_clipping_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return ClippingAttachment(result) + } + + public func findRegion(name: String?) -> AtlasRegion { + let result = spine_atlas_attachment_loader_find_region(wrappee, name?.cString(using: .utf8)) + return AtlasRegion(result) + } + + deinit { + spine_atlas_attachment_loader_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AtlasPage.swift b/spine-ios/Sources/Spine/Generated/AtlasPage.swift new file mode 100644 index 000000000..ae9a1eaa4 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AtlasPage.swift @@ -0,0 +1,158 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAtlasPage) +@objcMembers +public final class AtlasPage: NSObject { + internal let wrappee: spine_atlas_page + + internal init(_ wrappee: spine_atlas_page) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? AtlasPage else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(inName: String?) { + let ptr = spine_atlas_page_create(inName) + self.init(ptr) + } + + public func getName() -> String? { + let result = spine_atlas_page_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setName(value: String?) { + spine_atlas_page_set_name(wrappee, value?.cString(using: .utf8)) + } + + public func getTexturePath() -> String? { + let result = spine_atlas_page_get_texture_path(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setTexturePath(value: String?) { + spine_atlas_page_set_texture_path(wrappee, value?.cString(using: .utf8)) + } + + public func getFormat() -> Format { + return spine_atlas_page_get_format(wrappee) + } + + public func setFormat(value: Format) { + spine_atlas_page_set_format(wrappee, value) + } + + public func getMinFilter() -> TextureFilter { + return spine_atlas_page_get_min_filter(wrappee) + } + + public func setMinFilter(value: TextureFilter) { + spine_atlas_page_set_min_filter(wrappee, value) + } + + public func getMagFilter() -> TextureFilter { + return spine_atlas_page_get_mag_filter(wrappee) + } + + public func setMagFilter(value: TextureFilter) { + spine_atlas_page_set_mag_filter(wrappee, value) + } + + public func getUWrap() -> TextureWrap { + return spine_atlas_page_get_u_wrap(wrappee) + } + + public func setUWrap(value: TextureWrap) { + spine_atlas_page_set_u_wrap(wrappee, value) + } + + public func getVWrap() -> TextureWrap { + return spine_atlas_page_get_v_wrap(wrappee) + } + + public func setVWrap(value: TextureWrap) { + spine_atlas_page_set_v_wrap(wrappee, value) + } + + public func getWidth() -> Int32 { + return spine_atlas_page_get_width(wrappee) + } + + public func setWidth(value: Int32) { + spine_atlas_page_set_width(wrappee, value) + } + + public func getHeight() -> Int32 { + return spine_atlas_page_get_height(wrappee) + } + + public func setHeight(value: Int32) { + spine_atlas_page_set_height(wrappee, value) + } + + public func getPma() -> Bool { + return spine_atlas_page_get_pma(wrappee) != 0 + } + + public func setPma(value: Bool) { + spine_atlas_page_set_pma(wrappee, value ? 1 : 0) + } + + public func getIndex() -> Int32 { + return spine_atlas_page_get_index(wrappee) + } + + public func setIndex(value: Int32) { + spine_atlas_page_set_index(wrappee, value) + } + + public func getTexture() -> OpaquePointer? { + return spine_atlas_page_get_texture(wrappee) + } + + public func setTexture(value: OpaquePointer?) { + spine_atlas_page_set_texture(wrappee, value) + } + + deinit { + spine_atlas_page_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AtlasRegion.swift b/spine-ios/Sources/Spine/Generated/AtlasRegion.swift new file mode 100644 index 000000000..9a0408fed --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AtlasRegion.swift @@ -0,0 +1,237 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAtlasRegion) +@objcMembers +public final class AtlasRegion: TextureRegion { + internal let wrappee: spine_atlas_region + + internal init(_ wrappee: spine_atlas_region) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_atlas_region_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_atlas_region_get_rtti(wrappee) + return Rtti(result) + } + + public func getPage() -> AtlasPage { + let result = spine_atlas_region_get_page(wrappee) + return AtlasPage(result) + } + + public func getName() -> String? { + let result = spine_atlas_region_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getIndex() -> Int32 { + return spine_atlas_region_get_index(wrappee) + } + + public func getX() -> Int32 { + return spine_atlas_region_get_x(wrappee) + } + + public func getY() -> Int32 { + return spine_atlas_region_get_y(wrappee) + } + + public func getOffsetX() -> Float { + return spine_atlas_region_get_offset_x(wrappee) + } + + public func getOffsetY() -> Float { + return spine_atlas_region_get_offset_y(wrappee) + } + + public func getPackedWidth() -> Int32 { + return spine_atlas_region_get_packed_width(wrappee) + } + + public func getPackedHeight() -> Int32 { + return spine_atlas_region_get_packed_height(wrappee) + } + + public func getOriginalWidth() -> Int32 { + return spine_atlas_region_get_original_width(wrappee) + } + + public func getOriginalHeight() -> Int32 { + return spine_atlas_region_get_original_height(wrappee) + } + + public func getRotate() -> Bool { + return spine_atlas_region_get_rotate(wrappee) != 0 + } + + public func getDegrees() -> Int32 { + return spine_atlas_region_get_degrees(wrappee) + } + + public func getSplits() -> ArrayInt { + return spine_atlas_region_get_splits(wrappee) + } + + public func getPads() -> ArrayInt { + return spine_atlas_region_get_pads(wrappee) + } + + public func getValues() -> ArrayFloat { + return spine_atlas_region_get_values(wrappee) + } + + public func setPage(value: AtlasPage) { + spine_atlas_region_set_page(wrappee, value.wrappee) + } + + public func setName(value: String?) { + spine_atlas_region_set_name(wrappee, value?.cString(using: .utf8)) + } + + public func setIndex(value: Int32) { + spine_atlas_region_set_index(wrappee, value) + } + + public func setX(value: Int32) { + spine_atlas_region_set_x(wrappee, value) + } + + public func setY(value: Int32) { + spine_atlas_region_set_y(wrappee, value) + } + + public func setOffsetX(value: Float) { + spine_atlas_region_set_offset_x(wrappee, value) + } + + public func setOffsetY(value: Float) { + spine_atlas_region_set_offset_y(wrappee, value) + } + + public func setPackedWidth(value: Int32) { + spine_atlas_region_set_packed_width(wrappee, value) + } + + public func setPackedHeight(value: Int32) { + spine_atlas_region_set_packed_height(wrappee, value) + } + + public func setOriginalWidth(value: Int32) { + spine_atlas_region_set_original_width(wrappee, value) + } + + public func setOriginalHeight(value: Int32) { + spine_atlas_region_set_original_height(wrappee, value) + } + + public func setRotate(value: Bool) { + spine_atlas_region_set_rotate(wrappee, value ? 1 : 0) + } + + public func setDegrees(value: Int32) { + spine_atlas_region_set_degrees(wrappee, value) + } + + public func setSplits(value: ArrayInt) { + spine_atlas_region_set_splits(wrappee, value) + } + + public func setPads(value: ArrayInt) { + spine_atlas_region_set_pads(wrappee, value) + } + + public func setValues(value: ArrayFloat) { + spine_atlas_region_set_values(wrappee, value) + } + + public func getU() -> Float { + return spine_atlas_region_get_u(wrappee) + } + + public func setU(value: Float) { + spine_atlas_region_set_u(wrappee, value) + } + + public func getV() -> Float { + return spine_atlas_region_get_v(wrappee) + } + + public func setV(value: Float) { + spine_atlas_region_set_v(wrappee, value) + } + + public func getU2() -> Float { + return spine_atlas_region_get_u2(wrappee) + } + + public func setU2(value: Float) { + spine_atlas_region_set_u2(wrappee, value) + } + + public func getV2() -> Float { + return spine_atlas_region_get_v2(wrappee) + } + + public func setV2(value: Float) { + spine_atlas_region_set_v2(wrappee, value) + } + + public func getRegionWidth() -> Int32 { + return spine_atlas_region_get_region_width(wrappee) + } + + public func setRegionWidth(value: Int32) { + spine_atlas_region_set_region_width(wrappee, value) + } + + public func getRegionHeight() -> Int32 { + return spine_atlas_region_get_region_height(wrappee) + } + + public func setRegionHeight(value: Int32) { + spine_atlas_region_set_region_height(wrappee, value) + } + + public func rtti() -> Rtti { + let result = spine_atlas_region_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_atlas_region_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Attachment.swift b/spine-ios/Sources/Spine/Generated/Attachment.swift new file mode 100644 index 000000000..55951fe7e --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Attachment.swift @@ -0,0 +1,87 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAttachment) +@objcMembers +public final class Attachment: NSObject { + internal let wrappee: spine_attachment + + internal init(_ wrappee: spine_attachment) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Attachment else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func getName() -> String? { + let result = spine_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func copy() -> Attachment { + let result = spine_attachment_copy(wrappee) + return Attachment(result) + } + + public func getRefCount() -> Int32 { + return spine_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_attachment_reference(wrappee) + } + + public func dereference() { + spine_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AttachmentLoader.swift b/spine-ios/Sources/Spine/Generated/AttachmentLoader.swift new file mode 100644 index 000000000..b5aad5586 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AttachmentLoader.swift @@ -0,0 +1,85 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAttachmentLoader) +@objcMembers +public final class AttachmentLoader { + internal let wrappee: spine_attachment_loader + + internal init(_ wrappee: spine_attachment_loader) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? AttachmentLoader else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func newRegionAttachment(skin: Skin, name: String?, path: String?, sequence: Sequence) -> RegionAttachment { + let result = spine_attachment_loader_new_region_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8), path?.cString(using: .utf8), sequence.wrappee) + return RegionAttachment(result) + } + + public func newMeshAttachment(skin: Skin, name: String?, path: String?, sequence: Sequence) -> MeshAttachment { + let result = spine_attachment_loader_new_mesh_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8), path?.cString(using: .utf8), sequence.wrappee) + return MeshAttachment(result) + } + + public func newBoundingBoxAttachment(skin: Skin, name: String?) -> BoundingBoxAttachment { + let result = spine_attachment_loader_new_bounding_box_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return BoundingBoxAttachment(result) + } + + public func newPathAttachment(skin: Skin, name: String?) -> PathAttachment { + let result = spine_attachment_loader_new_path_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return PathAttachment(result) + } + + public func newPointAttachment(skin: Skin, name: String?) -> PointAttachment { + let result = spine_attachment_loader_new_point_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return PointAttachment(result) + } + + public func newClippingAttachment(skin: Skin, name: String?) -> ClippingAttachment { + let result = spine_attachment_loader_new_clipping_attachment(wrappee, skin.wrappee, name?.cString(using: .utf8)) + return ClippingAttachment(result) + } + + deinit { + spine_attachment_loader_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/AttachmentTimeline.swift b/spine-ios/Sources/Spine/Generated/AttachmentTimeline.swift new file mode 100644 index 000000000..823a10c24 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/AttachmentTimeline.swift @@ -0,0 +1,95 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineAttachmentTimeline) +@objcMembers +public final class AttachmentTimeline: Timeline, SlotTimeline { + internal let wrappee: spine_attachment_timeline + + internal init(_ wrappee: spine_attachment_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, slotIndex: Int32) { + let ptr = spine_attachment_timeline_create(frameCount, slotIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_attachment_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_attachment_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func setFrame(frame: Int32, time: Float, attachmentName: String?) { + spine_attachment_timeline_set_frame(wrappee, frame, time, attachmentName?.cString(using: .utf8)) + } + + public func getSlotIndex() -> Int32 { + return spine_attachment_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_attachment_timeline_set_slot_index(wrappee, inValue) + } + + public func getFrameEntries() -> size_t { + return spine_attachment_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_attachment_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_attachment_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_attachment_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_attachment_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_attachment_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_attachment_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Bone.swift b/spine-ios/Sources/Spine/Generated/Bone.swift new file mode 100644 index 000000000..d7cfbbe3c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Bone.swift @@ -0,0 +1,120 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBone) +@objcMembers +public final class Bone: PosedActive, Posed, Update { + internal let wrappee: spine_bone + + internal init(_ wrappee: spine_bone) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(data: BoneData, parent: Bone) { + let ptr = spine_bone_create(data.wrappee, parent.wrappee) + self.init(ptr) + } + + public convenience init(bone: Bone, parent: Bone) { + let ptr = spine_bone_create(bone.wrappee, parent.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_bone_get_rtti(wrappee) + return Rtti(result) + } + + public func getParent() -> Bone { + let result = spine_bone_get_parent(wrappee) + return Bone(result) + } + + public func getChildren() -> ArrayBone { + return spine_bone_get_children(wrappee) + } + + public func isYDown() -> Bool { + return spine_bone_is_y_down(wrappee) != 0 + } + + public func setYDown(value: Bool) { + spine_bone_set_y_down(wrappee, value ? 1 : 0) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_bone_update(wrappee, skeleton.wrappee, physics) + } + + public func getData() -> BoneData { + let result = spine_bone_get_data(wrappee) + return BoneData(result) + } + + public func getPose() -> BoneLocal { + let result = spine_bone_get_pose(wrappee) + return BoneLocal(result) + } + + public func getAppliedPose() -> BonePose { + let result = spine_bone_get_applied_pose(wrappee) + return BonePose(result) + } + + public func resetConstrained() { + spine_bone_reset_constrained(wrappee) + } + + public func constrained() { + spine_bone_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_bone_is_pose_equal_to_applied(wrappee) != 0 + } + + public func isActive() -> Bool { + return spine_bone_is_active(wrappee) != 0 + } + + public func setActive(active: Bool) { + spine_bone_set_active(wrappee, active ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_bone_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_bone_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/BoneData.swift b/spine-ios/Sources/Spine/Generated/BoneData.swift new file mode 100644 index 000000000..35d4cfde5 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/BoneData.swift @@ -0,0 +1,106 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBoneData) +@objcMembers +public final class BoneData: PosedData { + internal let wrappee: spine_bone_data + + internal init(_ wrappee: spine_bone_data) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(index: Int32, name: String?, parent: BoneData) { + let ptr = spine_bone_data_create(index, name, parent.wrappee) + self.init(ptr) + } + + public func getIndex() -> Int32 { + return spine_bone_data_get_index(wrappee) + } + + public func getParent() -> BoneData { + let result = spine_bone_data_get_parent(wrappee) + return BoneData(result) + } + + public func getLength() -> Float { + return spine_bone_data_get_length(wrappee) + } + + public func setLength(inValue: Float) { + spine_bone_data_set_length(wrappee, inValue) + } + + public func getColor() -> Color { + let result = spine_bone_data_get_color(wrappee) + return Color(result) + } + + public func getIcon() -> String? { + let result = spine_bone_data_get_icon(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setIcon(icon: String?) { + spine_bone_data_set_icon(wrappee, icon?.cString(using: .utf8)) + } + + public func getVisible() -> Bool { + return spine_bone_data_get_visible(wrappee) != 0 + } + + public func setVisible(inValue: Bool) { + spine_bone_data_set_visible(wrappee, inValue ? 1 : 0) + } + + public func getSetupPose() -> BoneLocal { + let result = spine_bone_data_get_setup_pose(wrappee) + return BoneLocal(result) + } + + public func getName() -> String? { + let result = spine_bone_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_bone_data_get_skin_required(wrappee) != 0 + } + + public func setSkinRequired(skinRequired: Bool) { + spine_bone_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + deinit { + spine_bone_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/BoneLocal.swift b/spine-ios/Sources/Spine/Generated/BoneLocal.swift new file mode 100644 index 000000000..ffd7b677b --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/BoneLocal.swift @@ -0,0 +1,140 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBoneLocal) +@objcMembers +public final class BoneLocal: NSObject { + internal let wrappee: spine_bone_local + + internal init(_ wrappee: spine_bone_local) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? BoneLocal else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_bone_local_create() + self.init(ptr) + } + + public func set(pose: BoneLocal) { + spine_bone_local_set(wrappee, pose.wrappee) + } + + public func getX() -> Float { + return spine_bone_local_get_x(wrappee) + } + + public func setX(x: Float) { + spine_bone_local_set_x(wrappee, x) + } + + public func getY() -> Float { + return spine_bone_local_get_y(wrappee) + } + + public func setY(y: Float) { + spine_bone_local_set_y(wrappee, y) + } + + public func setPosition(x: Float, y: Float) { + spine_bone_local_set_position(wrappee, x, y) + } + + public func getRotation() -> Float { + return spine_bone_local_get_rotation(wrappee) + } + + public func setRotation(rotation: Float) { + spine_bone_local_set_rotation(wrappee, rotation) + } + + public func getScaleX() -> Float { + return spine_bone_local_get_scale_x(wrappee) + } + + public func setScaleX(scaleX: Float) { + spine_bone_local_set_scale_x(wrappee, scaleX) + } + + public func getScaleY() -> Float { + return spine_bone_local_get_scale_y(wrappee) + } + + public func setScaleY(scaleY: Float) { + spine_bone_local_set_scale_y(wrappee, scaleY) + } + + public func setScale(scaleX: Float, scaleY: Float) { + spine_bone_local_set_scale_1(wrappee, scaleX, scaleY) + } + + public func setScale(scale: Float) { + spine_bone_local_set_scale_2(wrappee, scale) + } + + public func getShearX() -> Float { + return spine_bone_local_get_shear_x(wrappee) + } + + public func setShearX(shearX: Float) { + spine_bone_local_set_shear_x(wrappee, shearX) + } + + public func getShearY() -> Float { + return spine_bone_local_get_shear_y(wrappee) + } + + public func setShearY(shearY: Float) { + spine_bone_local_set_shear_y(wrappee, shearY) + } + + public func getInherit() -> Inherit { + return spine_bone_local_get_inherit(wrappee) + } + + public func setInherit(inherit: Inherit) { + spine_bone_local_set_inherit(wrappee, inherit) + } + + deinit { + spine_bone_local_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/BonePose.swift b/spine-ios/Sources/Spine/Generated/BonePose.swift new file mode 100644 index 000000000..9ea36edb9 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/BonePose.swift @@ -0,0 +1,259 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBonePose) +@objcMembers +public final class BonePose: BoneLocal, Update { + internal let wrappee: spine_bone_pose + + internal init(_ wrappee: spine_bone_pose) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_bone_pose_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_bone_pose_get_rtti(wrappee) + return Rtti(result) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_bone_pose_update(wrappee, skeleton.wrappee, physics) + } + + public func updateWorldTransform(skeleton: Skeleton) { + spine_bone_pose_update_world_transform(wrappee, skeleton.wrappee) + } + + public func updateLocalTransform(skeleton: Skeleton) { + spine_bone_pose_update_local_transform(wrappee, skeleton.wrappee) + } + + public func validateLocalTransform(skeleton: Skeleton) { + spine_bone_pose_validate_local_transform(wrappee, skeleton.wrappee) + } + + public func modifyLocal(skeleton: Skeleton) { + spine_bone_pose_modify_local(wrappee, skeleton.wrappee) + } + + public func modifyWorld(update: Int32) { + spine_bone_pose_modify_world(wrappee, update) + } + + public func resetWorld(update: Int32) { + spine_bone_pose_reset_world(wrappee, update) + } + + public func getA() -> Float { + return spine_bone_pose_get_a(wrappee) + } + + public func setA(a: Float) { + spine_bone_pose_set_a(wrappee, a) + } + + public func getB() -> Float { + return spine_bone_pose_get_b(wrappee) + } + + public func setB(b: Float) { + spine_bone_pose_set_b(wrappee, b) + } + + public func getC() -> Float { + return spine_bone_pose_get_c(wrappee) + } + + public func setC(c: Float) { + spine_bone_pose_set_c(wrappee, c) + } + + public func getD() -> Float { + return spine_bone_pose_get_d(wrappee) + } + + public func setD(d: Float) { + spine_bone_pose_set_d(wrappee, d) + } + + public func getWorldX() -> Float { + return spine_bone_pose_get_world_x(wrappee) + } + + public func setWorldX(worldX: Float) { + spine_bone_pose_set_world_x(wrappee, worldX) + } + + public func getWorldY() -> Float { + return spine_bone_pose_get_world_y(wrappee) + } + + public func setWorldY(worldY: Float) { + spine_bone_pose_set_world_y(wrappee, worldY) + } + + public func getWorldRotationX() -> Float { + return spine_bone_pose_get_world_rotation_x(wrappee) + } + + public func getWorldRotationY() -> Float { + return spine_bone_pose_get_world_rotation_y(wrappee) + } + + public func getWorldScaleX() -> Float { + return spine_bone_pose_get_world_scale_x(wrappee) + } + + public func getWorldScaleY() -> Float { + return spine_bone_pose_get_world_scale_y(wrappee) + } + + public func worldToLocal(worldX: Float, worldY: Float, outLocalX: UnsafeMutablePointer?, outLocalY: UnsafeMutablePointer?) { + spine_bone_pose_world_to_local(wrappee, worldX, worldY, outLocalX, outLocalY) + } + + public func localToWorld(localX: Float, localY: Float, outWorldX: UnsafeMutablePointer?, outWorldY: UnsafeMutablePointer?) { + spine_bone_pose_local_to_world(wrappee, localX, localY, outWorldX, outWorldY) + } + + public func worldToParent(worldX: Float, worldY: Float, outParentX: UnsafeMutablePointer?, outParentY: UnsafeMutablePointer?) { + spine_bone_pose_world_to_parent(wrappee, worldX, worldY, outParentX, outParentY) + } + + public func parentToWorld(parentX: Float, parentY: Float, outWorldX: UnsafeMutablePointer?, outWorldY: UnsafeMutablePointer?) { + spine_bone_pose_parent_to_world(wrappee, parentX, parentY, outWorldX, outWorldY) + } + + public func worldToLocalRotation(worldRotation: Float) -> Float { + return spine_bone_pose_world_to_local_rotation(wrappee, worldRotation) + } + + public func localToWorldRotation(localRotation: Float) -> Float { + return spine_bone_pose_local_to_world_rotation(wrappee, localRotation) + } + + public func rotateWorld(degrees: Float) { + spine_bone_pose_rotate_world(wrappee, degrees) + } + + public func set(pose: BoneLocal) { + spine_bone_pose_set(wrappee, pose.wrappee) + } + + public func getX() -> Float { + return spine_bone_pose_get_x(wrappee) + } + + public func setX(x: Float) { + spine_bone_pose_set_x(wrappee, x) + } + + public func getY() -> Float { + return spine_bone_pose_get_y(wrappee) + } + + public func setY(y: Float) { + spine_bone_pose_set_y(wrappee, y) + } + + public func setPosition(x: Float, y: Float) { + spine_bone_pose_set_position(wrappee, x, y) + } + + public func getRotation() -> Float { + return spine_bone_pose_get_rotation(wrappee) + } + + public func setRotation(rotation: Float) { + spine_bone_pose_set_rotation(wrappee, rotation) + } + + public func getScaleX() -> Float { + return spine_bone_pose_get_scale_x(wrappee) + } + + public func setScaleX(scaleX: Float) { + spine_bone_pose_set_scale_x(wrappee, scaleX) + } + + public func getScaleY() -> Float { + return spine_bone_pose_get_scale_y(wrappee) + } + + public func setScaleY(scaleY: Float) { + spine_bone_pose_set_scale_y(wrappee, scaleY) + } + + public func setScale(scaleX: Float, scaleY: Float) { + spine_bone_pose_set_scale_1(wrappee, scaleX, scaleY) + } + + public func setScale(scale: Float) { + spine_bone_pose_set_scale_2(wrappee, scale) + } + + public func getShearX() -> Float { + return spine_bone_pose_get_shear_x(wrappee) + } + + public func setShearX(shearX: Float) { + spine_bone_pose_set_shear_x(wrappee, shearX) + } + + public func getShearY() -> Float { + return spine_bone_pose_get_shear_y(wrappee) + } + + public func setShearY(shearY: Float) { + spine_bone_pose_set_shear_y(wrappee, shearY) + } + + public func getInherit() -> Inherit { + return spine_bone_pose_get_inherit(wrappee) + } + + public func setInherit(inherit: Inherit) { + spine_bone_pose_set_inherit(wrappee, inherit) + } + + public func rtti() -> Rtti { + let result = spine_bone_pose_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_bone_pose_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/BoneTimeline.swift b/spine-ios/Sources/Spine/Generated/BoneTimeline.swift new file mode 100644 index 000000000..d3ecb2fd4 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/BoneTimeline.swift @@ -0,0 +1,73 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBoneTimeline) +@objcMembers +public final class BoneTimeline { + internal let wrappee: spine_bone_timeline + + internal init(_ wrappee: spine_bone_timeline) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? BoneTimeline else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_bone_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func getBoneIndex() -> Int32 { + return spine_bone_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_bone_timeline_set_bone_index(wrappee, inValue) + } + + public func rtti() -> Rtti { + let result = spine_bone_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_bone_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/BoneTimeline1.swift b/spine-ios/Sources/Spine/Generated/BoneTimeline1.swift new file mode 100644 index 000000000..0a5d83d91 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/BoneTimeline1.swift @@ -0,0 +1,130 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBoneTimeline1) +@objcMembers +public final class BoneTimeline1: CurveTimeline1, BoneTimeline { + internal let wrappee: spine_bone_timeline1 + + internal init(_ wrappee: spine_bone_timeline1) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_bone_timeline1_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_bone_timeline1_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_bone_timeline1_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_bone_timeline1_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_bone_timeline1_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_bone_timeline1_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_bone_timeline1_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_bone_timeline1_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_bone_timeline1_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_bone_timeline1_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_bone_timeline1_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_bone_timeline1_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_bone_timeline1_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_bone_timeline1_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_bone_timeline1_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_bone_timeline1_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_bone_timeline1_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_bone_timeline1_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_bone_timeline1_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_bone_timeline1_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_bone_timeline1_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_bone_timeline1_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/BoneTimeline2.swift b/spine-ios/Sources/Spine/Generated/BoneTimeline2.swift new file mode 100644 index 000000000..d3f9e3ff2 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/BoneTimeline2.swift @@ -0,0 +1,110 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBoneTimeline2) +@objcMembers +public final class BoneTimeline2: CurveTimeline, BoneTimeline { + internal let wrappee: spine_bone_timeline2 + + internal init(_ wrappee: spine_bone_timeline2) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_bone_timeline2_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_bone_timeline2_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_bone_timeline2_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_bone_timeline2_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value1: Float, value2: Float) { + spine_bone_timeline2_set_frame(wrappee, frame, time, value1, value2) + } + + public func setLinear(frame: size_t) { + spine_bone_timeline2_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_bone_timeline2_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_bone_timeline2_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_bone_timeline2_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_bone_timeline2_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_bone_timeline2_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_bone_timeline2_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_bone_timeline2_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_bone_timeline2_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_bone_timeline2_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_bone_timeline2_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_bone_timeline2_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/BoundingBoxAttachment.swift b/spine-ios/Sources/Spine/Generated/BoundingBoxAttachment.swift new file mode 100644 index 000000000..056d2374a --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/BoundingBoxAttachment.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineBoundingBoxAttachment) +@objcMembers +public final class BoundingBoxAttachment: VertexAttachment { + internal let wrappee: spine_bounding_box_attachment + + internal init(_ wrappee: spine_bounding_box_attachment) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_bounding_box_attachment_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_bounding_box_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func getColor() -> Color { + let result = spine_bounding_box_attachment_get_color(wrappee) + return Color(result) + } + + public func copy() -> Attachment { + let result = spine_bounding_box_attachment_copy(wrappee) + return Attachment(result) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: UnsafeMutablePointer?, offset: size_t, stride: size_t) { + spine_bounding_box_attachment_compute_world_vertices_1(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: ArrayFloat, offset: size_t, stride: size_t) { + spine_bounding_box_attachment_compute_world_vertices_2(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func getId() -> Int32 { + return spine_bounding_box_attachment_get_id(wrappee) + } + + public func getBones() -> ArrayInt { + return spine_bounding_box_attachment_get_bones(wrappee) + } + + public func setBones(bones: ArrayInt) { + spine_bounding_box_attachment_set_bones(wrappee, bones) + } + + public func getVertices() -> ArrayFloat { + return spine_bounding_box_attachment_get_vertices(wrappee) + } + + public func setVertices(vertices: ArrayFloat) { + spine_bounding_box_attachment_set_vertices(wrappee, vertices) + } + + public func getWorldVerticesLength() -> size_t { + return spine_bounding_box_attachment_get_world_vertices_length(wrappee) + } + + public func setWorldVerticesLength(inValue: size_t) { + spine_bounding_box_attachment_set_world_vertices_length(wrappee, inValue) + } + + public func getTimelineAttachment() -> Attachment { + let result = spine_bounding_box_attachment_get_timeline_attachment(wrappee) + return Attachment(result) + } + + public func setTimelineAttachment(attachment: Attachment) { + spine_bounding_box_attachment_set_timeline_attachment(wrappee, attachment.wrappee) + } + + public func copyTo(other: VertexAttachment) { + spine_bounding_box_attachment_copy_to(wrappee, other.wrappee) + } + + public func getName() -> String? { + let result = spine_bounding_box_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getRefCount() -> Int32 { + return spine_bounding_box_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_bounding_box_attachment_reference(wrappee) + } + + public func dereference() { + spine_bounding_box_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_bounding_box_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_bounding_box_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ClippingAttachment.swift b/spine-ios/Sources/Spine/Generated/ClippingAttachment.swift new file mode 100644 index 000000000..74fd30691 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ClippingAttachment.swift @@ -0,0 +1,144 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineClippingAttachment) +@objcMembers +public final class ClippingAttachment: VertexAttachment { + internal let wrappee: spine_clipping_attachment + + internal init(_ wrappee: spine_clipping_attachment) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_clipping_attachment_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_clipping_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func getEndSlot() -> SlotData { + let result = spine_clipping_attachment_get_end_slot(wrappee) + return SlotData(result) + } + + public func setEndSlot(inValue: SlotData) { + spine_clipping_attachment_set_end_slot(wrappee, inValue.wrappee) + } + + public func getColor() -> Color { + let result = spine_clipping_attachment_get_color(wrappee) + return Color(result) + } + + public func copy() -> Attachment { + let result = spine_clipping_attachment_copy(wrappee) + return Attachment(result) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: UnsafeMutablePointer?, offset: size_t, stride: size_t) { + spine_clipping_attachment_compute_world_vertices_1(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: ArrayFloat, offset: size_t, stride: size_t) { + spine_clipping_attachment_compute_world_vertices_2(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func getId() -> Int32 { + return spine_clipping_attachment_get_id(wrappee) + } + + public func getBones() -> ArrayInt { + return spine_clipping_attachment_get_bones(wrappee) + } + + public func setBones(bones: ArrayInt) { + spine_clipping_attachment_set_bones(wrappee, bones) + } + + public func getVertices() -> ArrayFloat { + return spine_clipping_attachment_get_vertices(wrappee) + } + + public func setVertices(vertices: ArrayFloat) { + spine_clipping_attachment_set_vertices(wrappee, vertices) + } + + public func getWorldVerticesLength() -> size_t { + return spine_clipping_attachment_get_world_vertices_length(wrappee) + } + + public func setWorldVerticesLength(inValue: size_t) { + spine_clipping_attachment_set_world_vertices_length(wrappee, inValue) + } + + public func getTimelineAttachment() -> Attachment { + let result = spine_clipping_attachment_get_timeline_attachment(wrappee) + return Attachment(result) + } + + public func setTimelineAttachment(attachment: Attachment) { + spine_clipping_attachment_set_timeline_attachment(wrappee, attachment.wrappee) + } + + public func copyTo(other: VertexAttachment) { + spine_clipping_attachment_copy_to(wrappee, other.wrappee) + } + + public func getName() -> String? { + let result = spine_clipping_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getRefCount() -> Int32 { + return spine_clipping_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_clipping_attachment_reference(wrappee) + } + + public func dereference() { + spine_clipping_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_clipping_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_clipping_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Color.swift b/spine-ios/Sources/Spine/Generated/Color.swift new file mode 100644 index 000000000..44b9c1b3e --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Color.swift @@ -0,0 +1,144 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineColor) +@objcMembers +public final class Color: NSObject { + internal let wrappee: spine_color + + internal init(_ wrappee: spine_color) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Color else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_color_create() + self.init(ptr) + } + + public convenience init(r: Float, g: Float, b: Float, a: Float) { + let ptr = spine_color_create(r, g, b, a) + self.init(ptr) + } + + public func set(_r: Float, _g: Float, _b: Float, _a: Float) -> Color { + let result = spine_color_set_1(wrappee, _r, _g, _b, _a) + return Color(result) + } + + public func set(_r: Float, _g: Float, _b: Float) -> Color { + let result = spine_color_set_2(wrappee, _r, _g, _b) + return Color(result) + } + + public func set(other: Color) -> Color { + let result = spine_color_set_3(wrappee, other.wrappee) + return Color(result) + } + + public func add(_r: Float, _g: Float, _b: Float, _a: Float) -> Color { + let result = spine_color_add_1(wrappee, _r, _g, _b, _a) + return Color(result) + } + + public func add(_r: Float, _g: Float, _b: Float) -> Color { + let result = spine_color_add_2(wrappee, _r, _g, _b) + return Color(result) + } + + public func add(other: Color) -> Color { + let result = spine_color_add_3(wrappee, other.wrappee) + return Color(result) + } + + public func clamp() -> Color { + let result = spine_color_clamp(wrappee) + return Color(result) + } + + public func parseHex(value: String?, index: size_t) -> Float { + return spine_color_parse_hex(wrappee, value?.cString(using: .utf8), index) + } + + public func rgba8888ToColor(color: Color, value: Int32) { + spine_color_rgba8888_to_color(wrappee, color.wrappee, value) + } + + public func rgb888ToColor(color: Color, value: Int32) { + spine_color_rgb888_to_color(wrappee, color.wrappee, value) + } + + public func getR() -> Float { + return spine_color_get_r(wrappee) + } + + public func setR(value: Float) { + spine_color_set_r(wrappee, value) + } + + public func getG() -> Float { + return spine_color_get_g(wrappee) + } + + public func setG(value: Float) { + spine_color_set_g(wrappee, value) + } + + public func getB() -> Float { + return spine_color_get_b(wrappee) + } + + public func setB(value: Float) { + spine_color_set_b(wrappee, value) + } + + public func getA() -> Float { + return spine_color_get_a(wrappee) + } + + public func setA(value: Float) { + spine_color_set_a(wrappee, value) + } + + deinit { + spine_color_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Constraint.swift b/spine-ios/Sources/Spine/Generated/Constraint.swift new file mode 100644 index 000000000..6dd350565 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Constraint.swift @@ -0,0 +1,82 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineConstraint) +@objcMembers +public final class Constraint: Update { + internal let wrappee: spine_constraint + + internal init(_ wrappee: spine_constraint) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Constraint else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_constraint_get_rtti(wrappee) + return Rtti(result) + } + + public func getData() -> ConstraintData { + let result = spine_constraint_get_data(wrappee) + return ConstraintData(result) + } + + public func sort(skeleton: Skeleton) { + spine_constraint_sort(wrappee, skeleton.wrappee) + } + + public func isSourceActive() -> Bool { + return spine_constraint_is_source_active(wrappee) != 0 + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_constraint_update(wrappee, skeleton.wrappee, physics) + } + + public func rtti() -> Rtti { + let result = spine_constraint_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_constraint_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ConstraintData.swift b/spine-ios/Sources/Spine/Generated/ConstraintData.swift new file mode 100644 index 000000000..c51946da3 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ConstraintData.swift @@ -0,0 +1,79 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineConstraintData) +@objcMembers +public final class ConstraintData { + internal let wrappee: spine_constraint_data + + internal init(_ wrappee: spine_constraint_data) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? ConstraintData else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_constraint_data_get_rtti(wrappee) + return Rtti(result) + } + + public func createMethod(skeleton: Skeleton) -> Constraint { + let result = spine_constraint_data_create_method(wrappee, skeleton.wrappee) + return Constraint(result) + } + + public func getName() -> String? { + let result = spine_constraint_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_constraint_data_get_skin_required(wrappee) != 0 + } + + public func rtti() -> Rtti { + let result = spine_constraint_data_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_constraint_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ConstraintTimeline.swift b/spine-ios/Sources/Spine/Generated/ConstraintTimeline.swift new file mode 100644 index 000000000..ceb549328 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ConstraintTimeline.swift @@ -0,0 +1,73 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineConstraintTimeline) +@objcMembers +public final class ConstraintTimeline { + internal let wrappee: spine_constraint_timeline + + internal init(_ wrappee: spine_constraint_timeline) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? ConstraintTimeline else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_constraint_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func getConstraintIndex() -> Int32 { + return spine_constraint_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_constraint_timeline_set_constraint_index(wrappee, inValue) + } + + public func rtti() -> Rtti { + let result = spine_constraint_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_constraint_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ConstraintTimeline1.swift b/spine-ios/Sources/Spine/Generated/ConstraintTimeline1.swift new file mode 100644 index 000000000..d0f886e34 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ConstraintTimeline1.swift @@ -0,0 +1,130 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineConstraintTimeline1) +@objcMembers +public final class ConstraintTimeline1: CurveTimeline1, ConstraintTimeline { + internal let wrappee: spine_constraint_timeline1 + + internal init(_ wrappee: spine_constraint_timeline1) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_constraint_timeline1_get_rtti(wrappee) + return Rtti(result) + } + + public func getConstraintIndex() -> Int32 { + return spine_constraint_timeline1_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_constraint_timeline1_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_constraint_timeline1_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_constraint_timeline1_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_constraint_timeline1_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_constraint_timeline1_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_constraint_timeline1_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_constraint_timeline1_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_constraint_timeline1_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_constraint_timeline1_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_constraint_timeline1_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_constraint_timeline1_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_constraint_timeline1_get_curves(wrappee) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_constraint_timeline1_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getFrameEntries() -> size_t { + return spine_constraint_timeline1_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_constraint_timeline1_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_constraint_timeline1_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_constraint_timeline1_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_constraint_timeline1_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_constraint_timeline1_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_constraint_timeline1_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/CurveTimeline.swift b/spine-ios/Sources/Spine/Generated/CurveTimeline.swift new file mode 100644 index 000000000..35d0e7ff0 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/CurveTimeline.swift @@ -0,0 +1,98 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineCurveTimeline) +@objcMembers +public final class CurveTimeline: Timeline { + internal let wrappee: spine_curve_timeline + + internal init(_ wrappee: spine_curve_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_curve_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func setLinear(frame: size_t) { + spine_curve_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_curve_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_curve_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_curve_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_curve_timeline_get_curves(wrappee) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_curve_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getFrameEntries() -> size_t { + return spine_curve_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_curve_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_curve_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_curve_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_curve_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_curve_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_curve_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/CurveTimeline1.swift b/spine-ios/Sources/Spine/Generated/CurveTimeline1.swift new file mode 100644 index 000000000..ed393d4ec --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/CurveTimeline1.swift @@ -0,0 +1,122 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineCurveTimeline1) +@objcMembers +public final class CurveTimeline1: CurveTimeline { + internal let wrappee: spine_curve_timeline1 + + internal init(_ wrappee: spine_curve_timeline1) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_curve_timeline1_get_rtti(wrappee) + return Rtti(result) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_curve_timeline1_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_curve_timeline1_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_curve_timeline1_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_curve_timeline1_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_curve_timeline1_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_curve_timeline1_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_curve_timeline1_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_curve_timeline1_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_curve_timeline1_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_curve_timeline1_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_curve_timeline1_get_curves(wrappee) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_curve_timeline1_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getFrameEntries() -> size_t { + return spine_curve_timeline1_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_curve_timeline1_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_curve_timeline1_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_curve_timeline1_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_curve_timeline1_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_curve_timeline1_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_curve_timeline1_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/DeformTimeline.swift b/spine-ios/Sources/Spine/Generated/DeformTimeline.swift new file mode 100644 index 000000000..7736da3da --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/DeformTimeline.swift @@ -0,0 +1,128 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineDeformTimeline) +@objcMembers +public final class DeformTimeline: SlotCurveTimeline { + internal let wrappee: spine_deform_timeline + + internal init(_ wrappee: spine_deform_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, slotIndex: Int32, attachment: VertexAttachment) { + let ptr = spine_deform_timeline_create(frameCount, bezierCount, slotIndex, attachment.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_deform_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func setFrame(frameIndex: Int32, time: Float, vertices: ArrayFloat) { + spine_deform_timeline_set_frame(wrappee, frameIndex, time, vertices) + } + + public func getAttachment() -> VertexAttachment { + let result = spine_deform_timeline_get_attachment(wrappee) + return VertexAttachment(result) + } + + public func setAttachment(inValue: VertexAttachment) { + spine_deform_timeline_set_attachment(wrappee, inValue.wrappee) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_deform_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getCurvePercent(time: Float, frame: Int32) -> Float { + return spine_deform_timeline_get_curve_percent(wrappee, time, frame) + } + + public func getFrameCount() -> size_t { + return spine_deform_timeline_get_frame_count(wrappee) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_deform_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getSlotIndex() -> Int32 { + return spine_deform_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_deform_timeline_set_slot_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_deform_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_deform_timeline_set_stepped(wrappee, frame) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_deform_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_deform_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_deform_timeline_get_frame_entries(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_deform_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_deform_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_deform_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_deform_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_deform_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/DrawOrderTimeline.swift b/spine-ios/Sources/Spine/Generated/DrawOrderTimeline.swift new file mode 100644 index 000000000..76f548819 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/DrawOrderTimeline.swift @@ -0,0 +1,87 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineDrawOrderTimeline) +@objcMembers +public final class DrawOrderTimeline: Timeline { + internal let wrappee: spine_draw_order_timeline + + internal init(_ wrappee: spine_draw_order_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t) { + let ptr = spine_draw_order_timeline_create(frameCount) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_draw_order_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_draw_order_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getFrameCount() -> size_t { + return spine_draw_order_timeline_get_frame_count(wrappee) + } + + public func setFrame(frame: size_t, time: Float, drawOrder: ArrayInt) { + spine_draw_order_timeline_set_frame(wrappee, frame, time, drawOrder) + } + + public func getFrameEntries() -> size_t { + return spine_draw_order_timeline_get_frame_entries(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_draw_order_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_draw_order_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_draw_order_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_draw_order_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_draw_order_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Enums.swift b/spine-ios/Sources/Spine/Generated/Enums.swift new file mode 100644 index 000000000..ffc53488a --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Enums.swift @@ -0,0 +1,45 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +public typealias AttachmentType = spine_attachment_type +public typealias BlendMode = spine_blend_mode +public typealias EventType = spine_event_type +public typealias Format = spine_format +public typealias Inherit = spine_inherit +public typealias MixBlend = spine_mix_blend +public typealias MixDirection = spine_mix_direction +public typealias Physics = spine_physics +public typealias PositionMode = spine_position_mode +public typealias Property = spine_property +public typealias RotateMode = spine_rotate_mode +public typealias SequenceMode = spine_sequence_mode +public typealias SpacingMode = spine_spacing_mode +public typealias TextureFilter = spine_texture_filter +public typealias TextureWrap = spine_texture_wrap \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Event.swift b/spine-ios/Sources/Spine/Generated/Event.swift new file mode 100644 index 000000000..998656bce --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Event.swift @@ -0,0 +1,110 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineEvent) +@objcMembers +public final class Event: NSObject { + internal let wrappee: spine_event + + internal init(_ wrappee: spine_event) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Event else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(time: Float, data: EventData) { + let ptr = spine_event_create(time, data.wrappee) + self.init(ptr) + } + + public func getData() -> EventData { + let result = spine_event_get_data(wrappee) + return EventData(result) + } + + public func getTime() -> Float { + return spine_event_get_time(wrappee) + } + + public func getInt() -> Int32 { + return spine_event_get_int(wrappee) + } + + public func setInt(inValue: Int32) { + spine_event_set_int(wrappee, inValue) + } + + public func getFloat() -> Float { + return spine_event_get_float(wrappee) + } + + public func setFloat(inValue: Float) { + spine_event_set_float(wrappee, inValue) + } + + public func getString() -> String? { + let result = spine_event_get_string(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setString(inValue: String?) { + spine_event_set_string(wrappee, inValue?.cString(using: .utf8)) + } + + public func getVolume() -> Float { + return spine_event_get_volume(wrappee) + } + + public func setVolume(inValue: Float) { + spine_event_set_volume(wrappee, inValue) + } + + public func getBalance() -> Float { + return spine_event_get_balance(wrappee) + } + + public func setBalance(inValue: Float) { + spine_event_set_balance(wrappee, inValue) + } + + deinit { + spine_event_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/EventData.swift b/spine-ios/Sources/Spine/Generated/EventData.swift new file mode 100644 index 000000000..a0ebdbe8a --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/EventData.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineEventData) +@objcMembers +public final class EventData: NSObject { + internal let wrappee: spine_event_data + + internal init(_ wrappee: spine_event_data) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? EventData else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(name: String?) { + let ptr = spine_event_data_create(name) + self.init(ptr) + } + + public func getName() -> String? { + let result = spine_event_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getInt() -> Int32 { + return spine_event_data_get_int(wrappee) + } + + public func setInt(inValue: Int32) { + spine_event_data_set_int(wrappee, inValue) + } + + public func getFloat() -> Float { + return spine_event_data_get_float(wrappee) + } + + public func setFloat(inValue: Float) { + spine_event_data_set_float(wrappee, inValue) + } + + public func getString() -> String? { + let result = spine_event_data_get_string(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setString(inValue: String?) { + spine_event_data_set_string(wrappee, inValue?.cString(using: .utf8)) + } + + public func getAudioPath() -> String? { + let result = spine_event_data_get_audio_path(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setAudioPath(inValue: String?) { + spine_event_data_set_audio_path(wrappee, inValue?.cString(using: .utf8)) + } + + public func getVolume() -> Float { + return spine_event_data_get_volume(wrappee) + } + + public func setVolume(inValue: Float) { + spine_event_data_set_volume(wrappee, inValue) + } + + public func getBalance() -> Float { + return spine_event_data_get_balance(wrappee) + } + + public func setBalance(inValue: Float) { + spine_event_data_set_balance(wrappee, inValue) + } + + deinit { + spine_event_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/EventQueueEntry.swift b/spine-ios/Sources/Spine/Generated/EventQueueEntry.swift new file mode 100644 index 000000000..f052c8aac --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/EventQueueEntry.swift @@ -0,0 +1,86 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineEventQueueEntry) +@objcMembers +public final class EventQueueEntry: NSObject { + internal let wrappee: spine_event_queue_entry + + internal init(_ wrappee: spine_event_queue_entry) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? EventQueueEntry else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(eventType: EventType, trackEntry: TrackEntry, event: Event) { + let ptr = spine_event_queue_entry_create(eventType, trackEntry.wrappee, event.wrappee) + self.init(ptr) + } + + public func getType() -> EventType { + return spine_event_queue_entry_get__type(wrappee) + } + + public func setType(value: EventType) { + spine_event_queue_entry_set__type(wrappee, value) + } + + public func getEntry() -> TrackEntry { + let result = spine_event_queue_entry_get__entry(wrappee) + return TrackEntry(result) + } + + public func setEntry(value: TrackEntry) { + spine_event_queue_entry_set__entry(wrappee, value.wrappee) + } + + public func getEvent() -> Event { + let result = spine_event_queue_entry_get__event(wrappee) + return Event(result) + } + + public func setEvent(value: Event) { + spine_event_queue_entry_set__event(wrappee, value.wrappee) + } + + deinit { + spine_event_queue_entry_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/EventTimeline.swift b/spine-ios/Sources/Spine/Generated/EventTimeline.swift new file mode 100644 index 000000000..eb35da12a --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/EventTimeline.swift @@ -0,0 +1,91 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineEventTimeline) +@objcMembers +public final class EventTimeline: Timeline { + internal let wrappee: spine_event_timeline + + internal init(_ wrappee: spine_event_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t) { + let ptr = spine_event_timeline_create(frameCount) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_event_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_event_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getFrameCount() -> size_t { + return spine_event_timeline_get_frame_count(wrappee) + } + + public func getEvents() -> ArrayEvent { + return spine_event_timeline_get_events(wrappee) + } + + public func setFrame(frame: size_t, event: Event) { + spine_event_timeline_set_frame(wrappee, frame, event.wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_event_timeline_get_frame_entries(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_event_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_event_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_event_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_event_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_event_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/FromProperty.swift b/spine-ios/Sources/Spine/Generated/FromProperty.swift new file mode 100644 index 000000000..f6ea02971 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/FromProperty.swift @@ -0,0 +1,85 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineFromProperty) +@objcMembers +public final class FromProperty: NSObject { + internal let wrappee: spine_from_property + + internal init(_ wrappee: spine_from_property) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? FromProperty else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_from_property_get_rtti(wrappee) + return Rtti(result) + } + + public func value(skeleton: Skeleton, source: BonePose, local: Bool, offsets: UnsafeMutablePointer?) -> Float { + return spine_from_property_value(wrappee, skeleton.wrappee, source.wrappee, local ? 1 : 0, offsets) + } + + public func rtti() -> Rtti { + let result = spine_from_property_rtti(wrappee) + return Rtti(result) + } + + public func getOffset() -> Float { + return spine_from_property_get__offset(wrappee) + } + + public func setOffset(value: Float) { + spine_from_property_set__offset(wrappee, value) + } + + public func getTo() -> ArrayToProperty { + return spine_from_property_get__to(wrappee) + } + + public func setTo(value: ArrayToProperty) { + spine_from_property_set__to(wrappee, value) + } + + deinit { + spine_from_property_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/FromRotate.swift b/spine-ios/Sources/Spine/Generated/FromRotate.swift new file mode 100644 index 000000000..9a002d35d --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/FromRotate.swift @@ -0,0 +1,63 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineFromRotate) +@objcMembers +public final class FromRotate: FromProperty { + internal let wrappee: spine_from_rotate + + internal init(_ wrappee: spine_from_rotate) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_from_rotate_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_from_rotate_get_rtti(wrappee) + return Rtti(result) + } + + public func value(skeleton: Skeleton, source: BonePose, local: Bool, offsets: UnsafeMutablePointer?) -> Float { + return spine_from_rotate_value(wrappee, skeleton.wrappee, source.wrappee, local ? 1 : 0, offsets) + } + + public func rtti() -> Rtti { + let result = spine_from_rotate_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_from_rotate_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/FromScaleX.swift b/spine-ios/Sources/Spine/Generated/FromScaleX.swift new file mode 100644 index 000000000..1a0436d73 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/FromScaleX.swift @@ -0,0 +1,63 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineFromScaleX) +@objcMembers +public final class FromScaleX: FromProperty { + internal let wrappee: spine_from_scale_x + + internal init(_ wrappee: spine_from_scale_x) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_from_scale_x_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_from_scale_x_get_rtti(wrappee) + return Rtti(result) + } + + public func value(skeleton: Skeleton, source: BonePose, local: Bool, offsets: UnsafeMutablePointer?) -> Float { + return spine_from_scale_x_value(wrappee, skeleton.wrappee, source.wrappee, local ? 1 : 0, offsets) + } + + public func rtti() -> Rtti { + let result = spine_from_scale_x_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_from_scale_x_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/FromScaleY.swift b/spine-ios/Sources/Spine/Generated/FromScaleY.swift new file mode 100644 index 000000000..4f69fd51b --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/FromScaleY.swift @@ -0,0 +1,63 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineFromScaleY) +@objcMembers +public final class FromScaleY: FromProperty { + internal let wrappee: spine_from_scale_y + + internal init(_ wrappee: spine_from_scale_y) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_from_scale_y_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_from_scale_y_get_rtti(wrappee) + return Rtti(result) + } + + public func value(skeleton: Skeleton, source: BonePose, local: Bool, offsets: UnsafeMutablePointer?) -> Float { + return spine_from_scale_y_value(wrappee, skeleton.wrappee, source.wrappee, local ? 1 : 0, offsets) + } + + public func rtti() -> Rtti { + let result = spine_from_scale_y_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_from_scale_y_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/FromShearY.swift b/spine-ios/Sources/Spine/Generated/FromShearY.swift new file mode 100644 index 000000000..e80f9a917 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/FromShearY.swift @@ -0,0 +1,63 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineFromShearY) +@objcMembers +public final class FromShearY: FromProperty { + internal let wrappee: spine_from_shear_y + + internal init(_ wrappee: spine_from_shear_y) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_from_shear_y_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_from_shear_y_get_rtti(wrappee) + return Rtti(result) + } + + public func value(skeleton: Skeleton, source: BonePose, local: Bool, offsets: UnsafeMutablePointer?) -> Float { + return spine_from_shear_y_value(wrappee, skeleton.wrappee, source.wrappee, local ? 1 : 0, offsets) + } + + public func rtti() -> Rtti { + let result = spine_from_shear_y_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_from_shear_y_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/FromX.swift b/spine-ios/Sources/Spine/Generated/FromX.swift new file mode 100644 index 000000000..142fd8057 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/FromX.swift @@ -0,0 +1,63 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineFromX) +@objcMembers +public final class FromX: FromProperty { + internal let wrappee: spine_from_x + + internal init(_ wrappee: spine_from_x) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_from_x_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_from_x_get_rtti(wrappee) + return Rtti(result) + } + + public func value(skeleton: Skeleton, source: BonePose, local: Bool, offsets: UnsafeMutablePointer?) -> Float { + return spine_from_x_value(wrappee, skeleton.wrappee, source.wrappee, local ? 1 : 0, offsets) + } + + public func rtti() -> Rtti { + let result = spine_from_x_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_from_x_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/FromY.swift b/spine-ios/Sources/Spine/Generated/FromY.swift new file mode 100644 index 000000000..0b66d8514 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/FromY.swift @@ -0,0 +1,63 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineFromY) +@objcMembers +public final class FromY: FromProperty { + internal let wrappee: spine_from_y + + internal init(_ wrappee: spine_from_y) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_from_y_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_from_y_get_rtti(wrappee) + return Rtti(result) + } + + public func value(skeleton: Skeleton, source: BonePose, local: Bool, offsets: UnsafeMutablePointer?) -> Float { + return spine_from_y_value(wrappee, skeleton.wrappee, source.wrappee, local ? 1 : 0, offsets) + } + + public func rtti() -> Rtti { + let result = spine_from_y_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_from_y_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/IkConstraint.swift b/spine-ios/Sources/Spine/Generated/IkConstraint.swift new file mode 100644 index 000000000..3753b9598 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/IkConstraint.swift @@ -0,0 +1,132 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineIkConstraint) +@objcMembers +public final class IkConstraint: PosedActive, Posed, Constraint { + internal let wrappee: spine_ik_constraint + + internal init(_ wrappee: spine_ik_constraint) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(data: IkConstraintData, skeleton: Skeleton) { + let ptr = spine_ik_constraint_create(data.wrappee, skeleton.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_ik_constraint_get_rtti(wrappee) + return Rtti(result) + } + + public func copy(skeleton: Skeleton) -> IkConstraint { + let result = spine_ik_constraint_copy(wrappee, skeleton.wrappee) + return IkConstraint(result) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_ik_constraint_update(wrappee, skeleton.wrappee, physics) + } + + public func sort(skeleton: Skeleton) { + spine_ik_constraint_sort(wrappee, skeleton.wrappee) + } + + public func isSourceActive() -> Bool { + return spine_ik_constraint_is_source_active(wrappee) != 0 + } + + public func getData() -> IkConstraintData { + let result = spine_ik_constraint_get_data(wrappee) + return IkConstraintData(result) + } + + public func getBones() -> ArrayBonePose { + return spine_ik_constraint_get_bones(wrappee) + } + + public func getTarget() -> Bone { + let result = spine_ik_constraint_get_target(wrappee) + return Bone(result) + } + + public func setTarget(inValue: Bone) { + spine_ik_constraint_set_target(wrappee, inValue.wrappee) + } + + public func apply(skeleton: Skeleton, bone: BonePose, targetX: Float, targetY: Float, compress: Bool, stretch: Bool, uniform: Bool, mix: Float) { + spine_ik_constraint_apply_1(wrappee, skeleton.wrappee, bone.wrappee, targetX, targetY, compress ? 1 : 0, stretch ? 1 : 0, uniform ? 1 : 0, mix) + } + + public func apply(skeleton: Skeleton, parent: BonePose, child: BonePose, targetX: Float, targetY: Float, bendDirection: Int32, stretch: Bool, uniform: Bool, softness: Float, mix: Float) { + spine_ik_constraint_apply_2(wrappee, skeleton.wrappee, parent.wrappee, child.wrappee, targetX, targetY, bendDirection, stretch ? 1 : 0, uniform ? 1 : 0, softness, mix) + } + + public func getPose() -> IkConstraintPose { + let result = spine_ik_constraint_get_pose(wrappee) + return IkConstraintPose(result) + } + + public func getAppliedPose() -> IkConstraintPose { + let result = spine_ik_constraint_get_applied_pose(wrappee) + return IkConstraintPose(result) + } + + public func resetConstrained() { + spine_ik_constraint_reset_constrained(wrappee) + } + + public func constrained() { + spine_ik_constraint_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_ik_constraint_is_pose_equal_to_applied(wrappee) != 0 + } + + public func isActive() -> Bool { + return spine_ik_constraint_is_active(wrappee) != 0 + } + + public func setActive(active: Bool) { + spine_ik_constraint_set_active(wrappee, active ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_ik_constraint_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_ik_constraint_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/IkConstraintData.swift b/spine-ios/Sources/Spine/Generated/IkConstraintData.swift new file mode 100644 index 000000000..0dfbb478c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/IkConstraintData.swift @@ -0,0 +1,103 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineIkConstraintData) +@objcMembers +public final class IkConstraintData: PosedData, ConstraintData { + internal let wrappee: spine_ik_constraint_data + + internal init(_ wrappee: spine_ik_constraint_data) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_ik_constraint_data_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_ik_constraint_data_get_rtti(wrappee) + return Rtti(result) + } + + public func createMethod(skeleton: Skeleton) -> Constraint { + let result = spine_ik_constraint_data_create_method(wrappee, skeleton.wrappee) + return Constraint(result) + } + + public func getBones() -> ArrayBoneData { + return spine_ik_constraint_data_get_bones(wrappee) + } + + public func getTarget() -> BoneData { + let result = spine_ik_constraint_data_get_target(wrappee) + return BoneData(result) + } + + public func setTarget(inValue: BoneData) { + spine_ik_constraint_data_set_target(wrappee, inValue.wrappee) + } + + public func getUniform() -> Bool { + return spine_ik_constraint_data_get_uniform(wrappee) != 0 + } + + public func setUniform(uniform: Bool) { + spine_ik_constraint_data_set_uniform(wrappee, uniform ? 1 : 0) + } + + public func getName() -> String? { + let result = spine_ik_constraint_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_ik_constraint_data_get_skin_required(wrappee) != 0 + } + + public func getSetupPose() -> IkConstraintPose { + let result = spine_ik_constraint_data_get_setup_pose(wrappee) + return IkConstraintPose(result) + } + + public func setSkinRequired(skinRequired: Bool) { + spine_ik_constraint_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_ik_constraint_data_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_ik_constraint_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/IkConstraintPose.swift b/spine-ios/Sources/Spine/Generated/IkConstraintPose.swift new file mode 100644 index 000000000..333ac5f73 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/IkConstraintPose.swift @@ -0,0 +1,104 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineIkConstraintPose) +@objcMembers +public final class IkConstraintPose: NSObject { + internal let wrappee: spine_ik_constraint_pose + + internal init(_ wrappee: spine_ik_constraint_pose) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? IkConstraintPose else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_ik_constraint_pose_create() + self.init(ptr) + } + + public func set(pose: IkConstraintPose) { + spine_ik_constraint_pose_set(wrappee, pose.wrappee) + } + + public func getMix() -> Float { + return spine_ik_constraint_pose_get_mix(wrappee) + } + + public func setMix(mix: Float) { + spine_ik_constraint_pose_set_mix(wrappee, mix) + } + + public func getSoftness() -> Float { + return spine_ik_constraint_pose_get_softness(wrappee) + } + + public func setSoftness(softness: Float) { + spine_ik_constraint_pose_set_softness(wrappee, softness) + } + + public func getBendDirection() -> Int32 { + return spine_ik_constraint_pose_get_bend_direction(wrappee) + } + + public func setBendDirection(bendDirection: Int32) { + spine_ik_constraint_pose_set_bend_direction(wrappee, bendDirection) + } + + public func getCompress() -> Bool { + return spine_ik_constraint_pose_get_compress(wrappee) != 0 + } + + public func setCompress(compress: Bool) { + spine_ik_constraint_pose_set_compress(wrappee, compress ? 1 : 0) + } + + public func getStretch() -> Bool { + return spine_ik_constraint_pose_get_stretch(wrappee) != 0 + } + + public func setStretch(stretch: Bool) { + spine_ik_constraint_pose_set_stretch(wrappee, stretch ? 1 : 0) + } + + deinit { + spine_ik_constraint_pose_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/IkConstraintTimeline.swift b/spine-ios/Sources/Spine/Generated/IkConstraintTimeline.swift new file mode 100644 index 000000000..f79175767 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/IkConstraintTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineIkConstraintTimeline) +@objcMembers +public final class IkConstraintTimeline: CurveTimeline, ConstraintTimeline { + internal let wrappee: spine_ik_constraint_timeline + + internal init(_ wrappee: spine_ik_constraint_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, constraintIndex: Int32) { + let ptr = spine_ik_constraint_timeline_create(frameCount, bezierCount, constraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_ik_constraint_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_ik_constraint_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func setFrame(frame: Int32, time: Float, mix: Float, softness: Float, bendDirection: Int32, compress: Bool, stretch: Bool) { + spine_ik_constraint_timeline_set_frame(wrappee, frame, time, mix, softness, bendDirection, compress ? 1 : 0, stretch ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_ik_constraint_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_ik_constraint_timeline_set_constraint_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_ik_constraint_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_ik_constraint_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_ik_constraint_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_ik_constraint_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_ik_constraint_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_ik_constraint_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_ik_constraint_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_ik_constraint_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_ik_constraint_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_ik_constraint_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_ik_constraint_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_ik_constraint_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/InheritTimeline.swift b/spine-ios/Sources/Spine/Generated/InheritTimeline.swift new file mode 100644 index 000000000..4b6d94da9 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/InheritTimeline.swift @@ -0,0 +1,95 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineInheritTimeline) +@objcMembers +public final class InheritTimeline: Timeline, BoneTimeline { + internal let wrappee: spine_inherit_timeline + + internal init(_ wrappee: spine_inherit_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, boneIndex: Int32) { + let ptr = spine_inherit_timeline_create(frameCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_inherit_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func setFrame(frame: Int32, time: Float, inherit: Inherit) { + spine_inherit_timeline_set_frame(wrappee, frame, time, inherit) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_inherit_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_inherit_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_inherit_timeline_set_bone_index(wrappee, inValue) + } + + public func getFrameEntries() -> size_t { + return spine_inherit_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_inherit_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_inherit_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_inherit_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_inherit_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_inherit_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_inherit_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/LinkedMesh.swift b/spine-ios/Sources/Spine/Generated/LinkedMesh.swift new file mode 100644 index 000000000..1f8ae393b --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/LinkedMesh.swift @@ -0,0 +1,65 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineLinkedMesh) +@objcMembers +public final class LinkedMesh { + internal let wrappee: spine_linked_mesh + + internal init(_ wrappee: spine_linked_mesh) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? LinkedMesh else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(mesh: MeshAttachment, skinIndex: const int, slotIndex: size_t, parent: String?, inheritTimelines: Bool) { + let ptr = spine_linked_mesh_create(mesh.wrappee, skinIndex, slotIndex, parent, inheritTimelines) + self.init(ptr) + } + + public convenience init(mesh: MeshAttachment, skin: String?, slotIndex: size_t, parent: String?, inheritTimelines: Bool) { + let ptr = spine_linked_mesh_create(mesh.wrappee, skin, slotIndex, parent, inheritTimelines) + self.init(ptr) + } + + deinit { + spine_linked_mesh_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/MeshAttachment.swift b/spine-ios/Sources/Spine/Generated/MeshAttachment.swift new file mode 100644 index 000000000..b02906c01 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/MeshAttachment.swift @@ -0,0 +1,232 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineMeshAttachment) +@objcMembers +public final class MeshAttachment: VertexAttachment { + internal let wrappee: spine_mesh_attachment + + internal init(_ wrappee: spine_mesh_attachment) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_mesh_attachment_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_mesh_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: UnsafeMutablePointer?, offset: size_t, stride: size_t) { + spine_mesh_attachment_compute_world_vertices_1(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: ArrayFloat, offset: size_t, stride: size_t) { + spine_mesh_attachment_compute_world_vertices_2(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func updateRegion() { + spine_mesh_attachment_update_region(wrappee) + } + + public func getHullLength() -> Int32 { + return spine_mesh_attachment_get_hull_length(wrappee) + } + + public func setHullLength(inValue: Int32) { + spine_mesh_attachment_set_hull_length(wrappee, inValue) + } + + public func getRegionUVs() -> ArrayFloat { + return spine_mesh_attachment_get_region_u_vs(wrappee) + } + + public func setRegionUVs(inValue: ArrayFloat) { + spine_mesh_attachment_set_region_u_vs(wrappee, inValue) + } + + public func getUVs() -> ArrayFloat { + return spine_mesh_attachment_get_u_vs(wrappee) + } + + public func getTriangles() -> ArrayUnsignedShort { + return spine_mesh_attachment_get_triangles(wrappee) + } + + public func setTriangles(inValue: ArrayUnsignedShort) { + spine_mesh_attachment_set_triangles(wrappee, inValue) + } + + public func getColor() -> Color { + let result = spine_mesh_attachment_get_color(wrappee) + return Color(result) + } + + public func getPath() -> String? { + let result = spine_mesh_attachment_get_path(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setPath(inValue: String?) { + spine_mesh_attachment_set_path(wrappee, inValue?.cString(using: .utf8)) + } + + public func getRegion() -> TextureRegion { + let result = spine_mesh_attachment_get_region(wrappee) + return TextureRegion(result) + } + + public func setRegion(region: TextureRegion) { + spine_mesh_attachment_set_region(wrappee, region.wrappee) + } + + public func getSequence() -> Sequence { + let result = spine_mesh_attachment_get_sequence(wrappee) + return Sequence(result) + } + + public func setSequence(sequence: Sequence) { + spine_mesh_attachment_set_sequence(wrappee, sequence.wrappee) + } + + public func getParentMesh() -> MeshAttachment { + let result = spine_mesh_attachment_get_parent_mesh(wrappee) + return MeshAttachment(result) + } + + public func setParentMesh(inValue: MeshAttachment) { + spine_mesh_attachment_set_parent_mesh(wrappee, inValue.wrappee) + } + + public func getEdges() -> ArrayUnsignedShort { + return spine_mesh_attachment_get_edges(wrappee) + } + + public func setEdges(inValue: ArrayUnsignedShort) { + spine_mesh_attachment_set_edges(wrappee, inValue) + } + + public func getWidth() -> Float { + return spine_mesh_attachment_get_width(wrappee) + } + + public func setWidth(inValue: Float) { + spine_mesh_attachment_set_width(wrappee, inValue) + } + + public func getHeight() -> Float { + return spine_mesh_attachment_get_height(wrappee) + } + + public func setHeight(inValue: Float) { + spine_mesh_attachment_set_height(wrappee, inValue) + } + + public func copy() -> Attachment { + let result = spine_mesh_attachment_copy(wrappee) + return Attachment(result) + } + + public func newLinkedMesh() -> MeshAttachment { + let result = spine_mesh_attachment_new_linked_mesh(wrappee) + return MeshAttachment(result) + } + + public func getId() -> Int32 { + return spine_mesh_attachment_get_id(wrappee) + } + + public func getBones() -> ArrayInt { + return spine_mesh_attachment_get_bones(wrappee) + } + + public func setBones(bones: ArrayInt) { + spine_mesh_attachment_set_bones(wrappee, bones) + } + + public func getVertices() -> ArrayFloat { + return spine_mesh_attachment_get_vertices(wrappee) + } + + public func setVertices(vertices: ArrayFloat) { + spine_mesh_attachment_set_vertices(wrappee, vertices) + } + + public func getWorldVerticesLength() -> size_t { + return spine_mesh_attachment_get_world_vertices_length(wrappee) + } + + public func setWorldVerticesLength(inValue: size_t) { + spine_mesh_attachment_set_world_vertices_length(wrappee, inValue) + } + + public func getTimelineAttachment() -> Attachment { + let result = spine_mesh_attachment_get_timeline_attachment(wrappee) + return Attachment(result) + } + + public func setTimelineAttachment(attachment: Attachment) { + spine_mesh_attachment_set_timeline_attachment(wrappee, attachment.wrappee) + } + + public func copyTo(other: VertexAttachment) { + spine_mesh_attachment_copy_to(wrappee, other.wrappee) + } + + public func getName() -> String? { + let result = spine_mesh_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getRefCount() -> Int32 { + return spine_mesh_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_mesh_attachment_reference(wrappee) + } + + public func dereference() { + spine_mesh_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_mesh_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_mesh_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PathAttachment.swift b/spine-ios/Sources/Spine/Generated/PathAttachment.swift new file mode 100644 index 000000000..d624e3783 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PathAttachment.swift @@ -0,0 +1,159 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePathAttachment) +@objcMembers +public final class PathAttachment: VertexAttachment { + internal let wrappee: spine_path_attachment + + internal init(_ wrappee: spine_path_attachment) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_path_attachment_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_path_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func getLengths() -> ArrayFloat { + return spine_path_attachment_get_lengths(wrappee) + } + + public func setLengths(inValue: ArrayFloat) { + spine_path_attachment_set_lengths(wrappee, inValue) + } + + public func getClosed() -> Bool { + return spine_path_attachment_get_closed(wrappee) != 0 + } + + public func setClosed(inValue: Bool) { + spine_path_attachment_set_closed(wrappee, inValue ? 1 : 0) + } + + public func getConstantSpeed() -> Bool { + return spine_path_attachment_get_constant_speed(wrappee) != 0 + } + + public func setConstantSpeed(inValue: Bool) { + spine_path_attachment_set_constant_speed(wrappee, inValue ? 1 : 0) + } + + public func getColor() -> Color { + let result = spine_path_attachment_get_color(wrappee) + return Color(result) + } + + public func copy() -> Attachment { + let result = spine_path_attachment_copy(wrappee) + return Attachment(result) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: UnsafeMutablePointer?, offset: size_t, stride: size_t) { + spine_path_attachment_compute_world_vertices_1(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: ArrayFloat, offset: size_t, stride: size_t) { + spine_path_attachment_compute_world_vertices_2(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func getId() -> Int32 { + return spine_path_attachment_get_id(wrappee) + } + + public func getBones() -> ArrayInt { + return spine_path_attachment_get_bones(wrappee) + } + + public func setBones(bones: ArrayInt) { + spine_path_attachment_set_bones(wrappee, bones) + } + + public func getVertices() -> ArrayFloat { + return spine_path_attachment_get_vertices(wrappee) + } + + public func setVertices(vertices: ArrayFloat) { + spine_path_attachment_set_vertices(wrappee, vertices) + } + + public func getWorldVerticesLength() -> size_t { + return spine_path_attachment_get_world_vertices_length(wrappee) + } + + public func setWorldVerticesLength(inValue: size_t) { + spine_path_attachment_set_world_vertices_length(wrappee, inValue) + } + + public func getTimelineAttachment() -> Attachment { + let result = spine_path_attachment_get_timeline_attachment(wrappee) + return Attachment(result) + } + + public func setTimelineAttachment(attachment: Attachment) { + spine_path_attachment_set_timeline_attachment(wrappee, attachment.wrappee) + } + + public func copyTo(other: VertexAttachment) { + spine_path_attachment_copy_to(wrappee, other.wrappee) + } + + public func getName() -> String? { + let result = spine_path_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getRefCount() -> Int32 { + return spine_path_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_path_attachment_reference(wrappee) + } + + public func dereference() { + spine_path_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_path_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_path_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PathConstraint.swift b/spine-ios/Sources/Spine/Generated/PathConstraint.swift new file mode 100644 index 000000000..ce6c7a9a0 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PathConstraint.swift @@ -0,0 +1,124 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePathConstraint) +@objcMembers +public final class PathConstraint: PosedActive, Posed, Constraint { + internal let wrappee: spine_path_constraint + + internal init(_ wrappee: spine_path_constraint) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(data: PathConstraintData, skeleton: Skeleton) { + let ptr = spine_path_constraint_create(data.wrappee, skeleton.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_path_constraint_get_rtti(wrappee) + return Rtti(result) + } + + public func copy(skeleton: Skeleton) -> PathConstraint { + let result = spine_path_constraint_copy(wrappee, skeleton.wrappee) + return PathConstraint(result) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_path_constraint_update(wrappee, skeleton.wrappee, physics) + } + + public func sort(skeleton: Skeleton) { + spine_path_constraint_sort(wrappee, skeleton.wrappee) + } + + public func isSourceActive() -> Bool { + return spine_path_constraint_is_source_active(wrappee) != 0 + } + + public func getBones() -> ArrayBonePose { + return spine_path_constraint_get_bones(wrappee) + } + + public func getSlot() -> Slot { + let result = spine_path_constraint_get_slot(wrappee) + return Slot(result) + } + + public func setSlot(slot: Slot) { + spine_path_constraint_set_slot(wrappee, slot.wrappee) + } + + public func getData() -> PathConstraintData { + let result = spine_path_constraint_get_data(wrappee) + return PathConstraintData(result) + } + + public func getPose() -> PathConstraintPose { + let result = spine_path_constraint_get_pose(wrappee) + return PathConstraintPose(result) + } + + public func getAppliedPose() -> PathConstraintPose { + let result = spine_path_constraint_get_applied_pose(wrappee) + return PathConstraintPose(result) + } + + public func resetConstrained() { + spine_path_constraint_reset_constrained(wrappee) + } + + public func constrained() { + spine_path_constraint_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_path_constraint_is_pose_equal_to_applied(wrappee) != 0 + } + + public func isActive() -> Bool { + return spine_path_constraint_is_active(wrappee) != 0 + } + + public func setActive(active: Bool) { + spine_path_constraint_set_active(wrappee, active ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_path_constraint_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_path_constraint_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PathConstraintData.swift b/spine-ios/Sources/Spine/Generated/PathConstraintData.swift new file mode 100644 index 000000000..1ab03ffed --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PathConstraintData.swift @@ -0,0 +1,127 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePathConstraintData) +@objcMembers +public final class PathConstraintData: PosedData, ConstraintData { + internal let wrappee: spine_path_constraint_data + + internal init(_ wrappee: spine_path_constraint_data) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_path_constraint_data_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_path_constraint_data_get_rtti(wrappee) + return Rtti(result) + } + + public func createMethod(skeleton: Skeleton) -> Constraint { + let result = spine_path_constraint_data_create_method(wrappee, skeleton.wrappee) + return Constraint(result) + } + + public func getBones() -> ArrayBoneData { + return spine_path_constraint_data_get_bones(wrappee) + } + + public func getSlot() -> SlotData { + let result = spine_path_constraint_data_get_slot(wrappee) + return SlotData(result) + } + + public func setSlot(slot: SlotData) { + spine_path_constraint_data_set_slot(wrappee, slot.wrappee) + } + + public func getPositionMode() -> PositionMode { + return spine_path_constraint_data_get_position_mode(wrappee) + } + + public func setPositionMode(positionMode: PositionMode) { + spine_path_constraint_data_set_position_mode(wrappee, positionMode) + } + + public func getSpacingMode() -> SpacingMode { + return spine_path_constraint_data_get_spacing_mode(wrappee) + } + + public func setSpacingMode(spacingMode: SpacingMode) { + spine_path_constraint_data_set_spacing_mode(wrappee, spacingMode) + } + + public func getRotateMode() -> RotateMode { + return spine_path_constraint_data_get_rotate_mode(wrappee) + } + + public func setRotateMode(rotateMode: RotateMode) { + spine_path_constraint_data_set_rotate_mode(wrappee, rotateMode) + } + + public func getOffsetRotation() -> Float { + return spine_path_constraint_data_get_offset_rotation(wrappee) + } + + public func setOffsetRotation(offsetRotation: Float) { + spine_path_constraint_data_set_offset_rotation(wrappee, offsetRotation) + } + + public func getName() -> String? { + let result = spine_path_constraint_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_path_constraint_data_get_skin_required(wrappee) != 0 + } + + public func getSetupPose() -> PathConstraintPose { + let result = spine_path_constraint_data_get_setup_pose(wrappee) + return PathConstraintPose(result) + } + + public func setSkinRequired(skinRequired: Bool) { + spine_path_constraint_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_path_constraint_data_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_path_constraint_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PathConstraintMixTimeline.swift b/spine-ios/Sources/Spine/Generated/PathConstraintMixTimeline.swift new file mode 100644 index 000000000..9fb5ef9be --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PathConstraintMixTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePathConstraintMixTimeline) +@objcMembers +public final class PathConstraintMixTimeline: CurveTimeline, ConstraintTimeline { + internal let wrappee: spine_path_constraint_mix_timeline + + internal init(_ wrappee: spine_path_constraint_mix_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, constraintIndex: Int32) { + let ptr = spine_path_constraint_mix_timeline_create(frameCount, bezierCount, constraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_path_constraint_mix_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_path_constraint_mix_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func setFrame(frame: Int32, time: Float, mixRotate: Float, mixX: Float, mixY: Float) { + spine_path_constraint_mix_timeline_set_frame(wrappee, frame, time, mixRotate, mixX, mixY) + } + + public func getConstraintIndex() -> Int32 { + return spine_path_constraint_mix_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_path_constraint_mix_timeline_set_constraint_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_path_constraint_mix_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_path_constraint_mix_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_path_constraint_mix_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_path_constraint_mix_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_path_constraint_mix_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_path_constraint_mix_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_path_constraint_mix_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_path_constraint_mix_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_path_constraint_mix_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_path_constraint_mix_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_path_constraint_mix_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_path_constraint_mix_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PathConstraintPose.swift b/spine-ios/Sources/Spine/Generated/PathConstraintPose.swift new file mode 100644 index 000000000..bb977db22 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PathConstraintPose.swift @@ -0,0 +1,104 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePathConstraintPose) +@objcMembers +public final class PathConstraintPose: NSObject { + internal let wrappee: spine_path_constraint_pose + + internal init(_ wrappee: spine_path_constraint_pose) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? PathConstraintPose else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_path_constraint_pose_create() + self.init(ptr) + } + + public func set(pose: PathConstraintPose) { + spine_path_constraint_pose_set(wrappee, pose.wrappee) + } + + public func getPosition() -> Float { + return spine_path_constraint_pose_get_position(wrappee) + } + + public func setPosition(position: Float) { + spine_path_constraint_pose_set_position(wrappee, position) + } + + public func getSpacing() -> Float { + return spine_path_constraint_pose_get_spacing(wrappee) + } + + public func setSpacing(spacing: Float) { + spine_path_constraint_pose_set_spacing(wrappee, spacing) + } + + public func getMixRotate() -> Float { + return spine_path_constraint_pose_get_mix_rotate(wrappee) + } + + public func setMixRotate(mixRotate: Float) { + spine_path_constraint_pose_set_mix_rotate(wrappee, mixRotate) + } + + public func getMixX() -> Float { + return spine_path_constraint_pose_get_mix_x(wrappee) + } + + public func setMixX(mixX: Float) { + spine_path_constraint_pose_set_mix_x(wrappee, mixX) + } + + public func getMixY() -> Float { + return spine_path_constraint_pose_get_mix_y(wrappee) + } + + public func setMixY(mixY: Float) { + spine_path_constraint_pose_set_mix_y(wrappee, mixY) + } + + deinit { + spine_path_constraint_pose_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PathConstraintPositionTimeline.swift b/spine-ios/Sources/Spine/Generated/PathConstraintPositionTimeline.swift new file mode 100644 index 000000000..7cc7e63c8 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PathConstraintPositionTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePathConstraintPositionTimeline) +@objcMembers +public final class PathConstraintPositionTimeline: ConstraintTimeline1 { + internal let wrappee: spine_path_constraint_position_timeline + + internal init(_ wrappee: spine_path_constraint_position_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, constraintIndex: Int32) { + let ptr = spine_path_constraint_position_timeline_create(frameCount, bezierCount, constraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_path_constraint_position_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_path_constraint_position_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_path_constraint_position_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_path_constraint_position_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_path_constraint_position_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_path_constraint_position_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_path_constraint_position_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_path_constraint_position_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_path_constraint_position_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_path_constraint_position_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_path_constraint_position_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_path_constraint_position_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_path_constraint_position_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_path_constraint_position_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_path_constraint_position_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_path_constraint_position_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_path_constraint_position_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_path_constraint_position_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_path_constraint_position_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_path_constraint_position_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_path_constraint_position_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_path_constraint_position_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PathConstraintSpacingTimeline.swift b/spine-ios/Sources/Spine/Generated/PathConstraintSpacingTimeline.swift new file mode 100644 index 000000000..c5a580412 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PathConstraintSpacingTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePathConstraintSpacingTimeline) +@objcMembers +public final class PathConstraintSpacingTimeline: ConstraintTimeline1 { + internal let wrappee: spine_path_constraint_spacing_timeline + + internal init(_ wrappee: spine_path_constraint_spacing_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, constraintIndex: Int32) { + let ptr = spine_path_constraint_spacing_timeline_create(frameCount, bezierCount, constraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_path_constraint_spacing_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_path_constraint_spacing_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_path_constraint_spacing_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_path_constraint_spacing_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_path_constraint_spacing_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_path_constraint_spacing_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_path_constraint_spacing_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_path_constraint_spacing_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_path_constraint_spacing_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_path_constraint_spacing_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_path_constraint_spacing_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_path_constraint_spacing_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_path_constraint_spacing_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_path_constraint_spacing_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_path_constraint_spacing_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_path_constraint_spacing_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_path_constraint_spacing_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_path_constraint_spacing_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_path_constraint_spacing_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_path_constraint_spacing_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_path_constraint_spacing_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_path_constraint_spacing_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraint.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraint.swift new file mode 100644 index 000000000..897d99e5f --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraint.swift @@ -0,0 +1,132 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraint) +@objcMembers +public final class PhysicsConstraint: PosedActive, Posed, Constraint { + internal let wrappee: spine_physics_constraint + + internal init(_ wrappee: spine_physics_constraint) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(data: PhysicsConstraintData, skeleton: Skeleton) { + let ptr = spine_physics_constraint_create(data.wrappee, skeleton.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_get_rtti(wrappee) + return Rtti(result) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_physics_constraint_update(wrappee, skeleton.wrappee, physics) + } + + public func sort(skeleton: Skeleton) { + spine_physics_constraint_sort(wrappee, skeleton.wrappee) + } + + public func isSourceActive() -> Bool { + return spine_physics_constraint_is_source_active(wrappee) != 0 + } + + public func copy(skeleton: Skeleton) -> PhysicsConstraint { + let result = spine_physics_constraint_copy(wrappee, skeleton.wrappee) + return PhysicsConstraint(result) + } + + public func reset(skeleton: Skeleton) { + spine_physics_constraint_reset(wrappee, skeleton.wrappee) + } + + public func translate(x: Float, y: Float) { + spine_physics_constraint_translate(wrappee, x, y) + } + + public func rotate(x: Float, y: Float, degrees: Float) { + spine_physics_constraint_rotate(wrappee, x, y, degrees) + } + + public func getBone() -> BonePose { + let result = spine_physics_constraint_get_bone(wrappee) + return BonePose(result) + } + + public func setBone(bone: BonePose) { + spine_physics_constraint_set_bone(wrappee, bone.wrappee) + } + + public func getData() -> PhysicsConstraintData { + let result = spine_physics_constraint_get_data(wrappee) + return PhysicsConstraintData(result) + } + + public func getPose() -> PhysicsConstraintPose { + let result = spine_physics_constraint_get_pose(wrappee) + return PhysicsConstraintPose(result) + } + + public func getAppliedPose() -> PhysicsConstraintPose { + let result = spine_physics_constraint_get_applied_pose(wrappee) + return PhysicsConstraintPose(result) + } + + public func resetConstrained() { + spine_physics_constraint_reset_constrained(wrappee) + } + + public func constrained() { + spine_physics_constraint_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_physics_constraint_is_pose_equal_to_applied(wrappee) != 0 + } + + public func isActive() -> Bool { + return spine_physics_constraint_is_active(wrappee) != 0 + } + + public func setActive(active: Bool) { + spine_physics_constraint_set_active(wrappee, active ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintDampingTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintDampingTimeline.swift new file mode 100644 index 000000000..a8e47f07b --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintDampingTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintDampingTimeline) +@objcMembers +public final class PhysicsConstraintDampingTimeline: PhysicsConstraintTimeline { + internal let wrappee: spine_physics_constraint_damping_timeline + + internal init(_ wrappee: spine_physics_constraint_damping_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, physicsConstraintIndex: Int32) { + let ptr = spine_physics_constraint_damping_timeline_create(frameCount, bezierCount, physicsConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_damping_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_damping_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_damping_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_damping_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_damping_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_damping_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_damping_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_damping_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_damping_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_damping_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_damping_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_damping_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_damping_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_damping_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_damping_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_damping_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_damping_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_damping_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_damping_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_damping_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_damping_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_damping_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintData.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintData.swift new file mode 100644 index 000000000..9cb849583 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintData.swift @@ -0,0 +1,203 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintData) +@objcMembers +public final class PhysicsConstraintData: PosedData, ConstraintData { + internal let wrappee: spine_physics_constraint_data + + internal init(_ wrappee: spine_physics_constraint_data) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_physics_constraint_data_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_data_get_rtti(wrappee) + return Rtti(result) + } + + public func createMethod(skeleton: Skeleton) -> Constraint { + let result = spine_physics_constraint_data_create_method(wrappee, skeleton.wrappee) + return Constraint(result) + } + + public func getBone() -> BoneData { + let result = spine_physics_constraint_data_get_bone(wrappee) + return BoneData(result) + } + + public func setBone(bone: BoneData) { + spine_physics_constraint_data_set_bone(wrappee, bone.wrappee) + } + + public func getStep() -> Float { + return spine_physics_constraint_data_get_step(wrappee) + } + + public func setStep(step: Float) { + spine_physics_constraint_data_set_step(wrappee, step) + } + + public func getX() -> Float { + return spine_physics_constraint_data_get_x(wrappee) + } + + public func setX(x: Float) { + spine_physics_constraint_data_set_x(wrappee, x) + } + + public func getY() -> Float { + return spine_physics_constraint_data_get_y(wrappee) + } + + public func setY(y: Float) { + spine_physics_constraint_data_set_y(wrappee, y) + } + + public func getRotate() -> Float { + return spine_physics_constraint_data_get_rotate(wrappee) + } + + public func setRotate(rotate: Float) { + spine_physics_constraint_data_set_rotate(wrappee, rotate) + } + + public func getScaleX() -> Float { + return spine_physics_constraint_data_get_scale_x(wrappee) + } + + public func setScaleX(scaleX: Float) { + spine_physics_constraint_data_set_scale_x(wrappee, scaleX) + } + + public func getShearX() -> Float { + return spine_physics_constraint_data_get_shear_x(wrappee) + } + + public func setShearX(shearX: Float) { + spine_physics_constraint_data_set_shear_x(wrappee, shearX) + } + + public func getLimit() -> Float { + return spine_physics_constraint_data_get_limit(wrappee) + } + + public func setLimit(limit: Float) { + spine_physics_constraint_data_set_limit(wrappee, limit) + } + + public func getInertiaGlobal() -> Bool { + return spine_physics_constraint_data_get_inertia_global(wrappee) != 0 + } + + public func setInertiaGlobal(inertiaGlobal: Bool) { + spine_physics_constraint_data_set_inertia_global(wrappee, inertiaGlobal ? 1 : 0) + } + + public func getStrengthGlobal() -> Bool { + return spine_physics_constraint_data_get_strength_global(wrappee) != 0 + } + + public func setStrengthGlobal(strengthGlobal: Bool) { + spine_physics_constraint_data_set_strength_global(wrappee, strengthGlobal ? 1 : 0) + } + + public func getDampingGlobal() -> Bool { + return spine_physics_constraint_data_get_damping_global(wrappee) != 0 + } + + public func setDampingGlobal(dampingGlobal: Bool) { + spine_physics_constraint_data_set_damping_global(wrappee, dampingGlobal ? 1 : 0) + } + + public func getMassGlobal() -> Bool { + return spine_physics_constraint_data_get_mass_global(wrappee) != 0 + } + + public func setMassGlobal(massGlobal: Bool) { + spine_physics_constraint_data_set_mass_global(wrappee, massGlobal ? 1 : 0) + } + + public func getWindGlobal() -> Bool { + return spine_physics_constraint_data_get_wind_global(wrappee) != 0 + } + + public func setWindGlobal(windGlobal: Bool) { + spine_physics_constraint_data_set_wind_global(wrappee, windGlobal ? 1 : 0) + } + + public func getGravityGlobal() -> Bool { + return spine_physics_constraint_data_get_gravity_global(wrappee) != 0 + } + + public func setGravityGlobal(gravityGlobal: Bool) { + spine_physics_constraint_data_set_gravity_global(wrappee, gravityGlobal ? 1 : 0) + } + + public func getMixGlobal() -> Bool { + return spine_physics_constraint_data_get_mix_global(wrappee) != 0 + } + + public func setMixGlobal(mixGlobal: Bool) { + spine_physics_constraint_data_set_mix_global(wrappee, mixGlobal ? 1 : 0) + } + + public func getName() -> String? { + let result = spine_physics_constraint_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_physics_constraint_data_get_skin_required(wrappee) != 0 + } + + public func getSetupPose() -> PhysicsConstraintPose { + let result = spine_physics_constraint_data_get_setup_pose(wrappee) + return PhysicsConstraintPose(result) + } + + public func setSkinRequired(skinRequired: Bool) { + spine_physics_constraint_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_data_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintGravityTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintGravityTimeline.swift new file mode 100644 index 000000000..f4151f45f --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintGravityTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintGravityTimeline) +@objcMembers +public final class PhysicsConstraintGravityTimeline: PhysicsConstraintTimeline { + internal let wrappee: spine_physics_constraint_gravity_timeline + + internal init(_ wrappee: spine_physics_constraint_gravity_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, physicsConstraintIndex: Int32) { + let ptr = spine_physics_constraint_gravity_timeline_create(frameCount, bezierCount, physicsConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_gravity_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_gravity_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_gravity_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_gravity_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_gravity_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_gravity_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_gravity_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_gravity_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_gravity_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_gravity_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_gravity_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_gravity_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_gravity_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_gravity_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_gravity_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_gravity_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_gravity_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_gravity_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_gravity_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_gravity_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_gravity_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_gravity_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintInertiaTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintInertiaTimeline.swift new file mode 100644 index 000000000..e72cf1899 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintInertiaTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintInertiaTimeline) +@objcMembers +public final class PhysicsConstraintInertiaTimeline: PhysicsConstraintTimeline { + internal let wrappee: spine_physics_constraint_inertia_timeline + + internal init(_ wrappee: spine_physics_constraint_inertia_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, physicsConstraintIndex: Int32) { + let ptr = spine_physics_constraint_inertia_timeline_create(frameCount, bezierCount, physicsConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_inertia_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_inertia_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_inertia_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_inertia_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_inertia_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_inertia_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_inertia_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_inertia_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_inertia_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_inertia_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_inertia_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_inertia_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_inertia_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_inertia_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_inertia_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_inertia_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_inertia_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_inertia_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_inertia_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_inertia_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_inertia_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_inertia_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintMassTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintMassTimeline.swift new file mode 100644 index 000000000..7725f9338 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintMassTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintMassTimeline) +@objcMembers +public final class PhysicsConstraintMassTimeline: PhysicsConstraintTimeline { + internal let wrappee: spine_physics_constraint_mass_timeline + + internal init(_ wrappee: spine_physics_constraint_mass_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, physicsConstraintIndex: Int32) { + let ptr = spine_physics_constraint_mass_timeline_create(frameCount, bezierCount, physicsConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_mass_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_mass_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_mass_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_mass_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_mass_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_mass_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_mass_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_mass_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_mass_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_mass_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_mass_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_mass_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_mass_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_mass_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_mass_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_mass_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_mass_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_mass_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_mass_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_mass_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_mass_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_mass_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintMixTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintMixTimeline.swift new file mode 100644 index 000000000..1fce4e0d8 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintMixTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintMixTimeline) +@objcMembers +public final class PhysicsConstraintMixTimeline: PhysicsConstraintTimeline { + internal let wrappee: spine_physics_constraint_mix_timeline + + internal init(_ wrappee: spine_physics_constraint_mix_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, physicsConstraintIndex: Int32) { + let ptr = spine_physics_constraint_mix_timeline_create(frameCount, bezierCount, physicsConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_mix_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_mix_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_mix_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_mix_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_mix_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_mix_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_mix_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_mix_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_mix_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_mix_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_mix_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_mix_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_mix_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_mix_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_mix_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_mix_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_mix_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_mix_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_mix_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_mix_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_mix_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_mix_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintPose.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintPose.swift new file mode 100644 index 000000000..52078c980 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintPose.swift @@ -0,0 +1,120 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintPose) +@objcMembers +public final class PhysicsConstraintPose: NSObject { + internal let wrappee: spine_physics_constraint_pose + + internal init(_ wrappee: spine_physics_constraint_pose) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? PhysicsConstraintPose else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_physics_constraint_pose_create() + self.init(ptr) + } + + public func set(pose: PhysicsConstraintPose) { + spine_physics_constraint_pose_set(wrappee, pose.wrappee) + } + + public func getInertia() -> Float { + return spine_physics_constraint_pose_get_inertia(wrappee) + } + + public func setInertia(inertia: Float) { + spine_physics_constraint_pose_set_inertia(wrappee, inertia) + } + + public func getStrength() -> Float { + return spine_physics_constraint_pose_get_strength(wrappee) + } + + public func setStrength(strength: Float) { + spine_physics_constraint_pose_set_strength(wrappee, strength) + } + + public func getDamping() -> Float { + return spine_physics_constraint_pose_get_damping(wrappee) + } + + public func setDamping(damping: Float) { + spine_physics_constraint_pose_set_damping(wrappee, damping) + } + + public func getMassInverse() -> Float { + return spine_physics_constraint_pose_get_mass_inverse(wrappee) + } + + public func setMassInverse(massInverse: Float) { + spine_physics_constraint_pose_set_mass_inverse(wrappee, massInverse) + } + + public func getWind() -> Float { + return spine_physics_constraint_pose_get_wind(wrappee) + } + + public func setWind(wind: Float) { + spine_physics_constraint_pose_set_wind(wrappee, wind) + } + + public func getGravity() -> Float { + return spine_physics_constraint_pose_get_gravity(wrappee) + } + + public func setGravity(gravity: Float) { + spine_physics_constraint_pose_set_gravity(wrappee, gravity) + } + + public func getMix() -> Float { + return spine_physics_constraint_pose_get_mix(wrappee) + } + + public func setMix(mix: Float) { + spine_physics_constraint_pose_set_mix(wrappee, mix) + } + + deinit { + spine_physics_constraint_pose_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintResetTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintResetTimeline.swift new file mode 100644 index 000000000..2a584ccf4 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintResetTimeline.swift @@ -0,0 +1,95 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintResetTimeline) +@objcMembers +public final class PhysicsConstraintResetTimeline: Timeline, ConstraintTimeline { + internal let wrappee: spine_physics_constraint_reset_timeline + + internal init(_ wrappee: spine_physics_constraint_reset_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, constraintIndex: Int32) { + let ptr = spine_physics_constraint_reset_timeline_create(frameCount, constraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_reset_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_reset_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getFrameCount() -> Int32 { + return spine_physics_constraint_reset_timeline_get_frame_count(wrappee) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_reset_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_reset_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: Int32, time: Float) { + spine_physics_constraint_reset_timeline_set_frame(wrappee, frame, time) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_reset_timeline_get_frame_entries(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_reset_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_reset_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_reset_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_reset_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_reset_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintStrengthTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintStrengthTimeline.swift new file mode 100644 index 000000000..17ae162fa --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintStrengthTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintStrengthTimeline) +@objcMembers +public final class PhysicsConstraintStrengthTimeline: PhysicsConstraintTimeline { + internal let wrappee: spine_physics_constraint_strength_timeline + + internal init(_ wrappee: spine_physics_constraint_strength_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, physicsConstraintIndex: Int32) { + let ptr = spine_physics_constraint_strength_timeline_create(frameCount, bezierCount, physicsConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_strength_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_strength_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_strength_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_strength_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_strength_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_strength_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_strength_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_strength_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_strength_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_strength_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_strength_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_strength_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_strength_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_strength_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_strength_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_strength_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_strength_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_strength_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_strength_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_strength_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_strength_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_strength_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintTimeline.swift new file mode 100644 index 000000000..e9d3504b8 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintTimeline.swift @@ -0,0 +1,130 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintTimeline) +@objcMembers +public final class PhysicsConstraintTimeline: CurveTimeline1, ConstraintTimeline { + internal let wrappee: spine_physics_constraint_timeline + + internal init(_ wrappee: spine_physics_constraint_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PhysicsConstraintWindTimeline.swift b/spine-ios/Sources/Spine/Generated/PhysicsConstraintWindTimeline.swift new file mode 100644 index 000000000..988d7812c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PhysicsConstraintWindTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePhysicsConstraintWindTimeline) +@objcMembers +public final class PhysicsConstraintWindTimeline: PhysicsConstraintTimeline { + internal let wrappee: spine_physics_constraint_wind_timeline + + internal init(_ wrappee: spine_physics_constraint_wind_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, physicsConstraintIndex: Int32) { + let ptr = spine_physics_constraint_wind_timeline_create(frameCount, bezierCount, physicsConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_physics_constraint_wind_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_physics_constraint_wind_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_physics_constraint_wind_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_physics_constraint_wind_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_physics_constraint_wind_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_physics_constraint_wind_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_wind_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_physics_constraint_wind_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_physics_constraint_wind_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_physics_constraint_wind_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_physics_constraint_wind_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_physics_constraint_wind_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_physics_constraint_wind_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_physics_constraint_wind_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_physics_constraint_wind_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_physics_constraint_wind_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_physics_constraint_wind_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_physics_constraint_wind_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_physics_constraint_wind_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_physics_constraint_wind_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_physics_constraint_wind_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_physics_constraint_wind_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PointAttachment.swift b/spine-ios/Sources/Spine/Generated/PointAttachment.swift new file mode 100644 index 000000000..00f4c4f6e --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PointAttachment.swift @@ -0,0 +1,118 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePointAttachment) +@objcMembers +public final class PointAttachment: Attachment { + internal let wrappee: spine_point_attachment + + internal init(_ wrappee: spine_point_attachment) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_point_attachment_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_point_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func getX() -> Float { + return spine_point_attachment_get_x(wrappee) + } + + public func setX(inValue: Float) { + spine_point_attachment_set_x(wrappee, inValue) + } + + public func getY() -> Float { + return spine_point_attachment_get_y(wrappee) + } + + public func setY(inValue: Float) { + spine_point_attachment_set_y(wrappee, inValue) + } + + public func getRotation() -> Float { + return spine_point_attachment_get_rotation(wrappee) + } + + public func setRotation(inValue: Float) { + spine_point_attachment_set_rotation(wrappee, inValue) + } + + public func getColor() -> Color { + let result = spine_point_attachment_get_color(wrappee) + return Color(result) + } + + public func computeWorldPosition(bone: BonePose, ox: UnsafeMutablePointer?, oy: UnsafeMutablePointer?) { + spine_point_attachment_compute_world_position(wrappee, bone.wrappee, ox, oy) + } + + public func computeWorldRotation(bone: BonePose) -> Float { + return spine_point_attachment_compute_world_rotation(wrappee, bone.wrappee) + } + + public func copy() -> Attachment { + let result = spine_point_attachment_copy(wrappee) + return Attachment(result) + } + + public func getName() -> String? { + let result = spine_point_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getRefCount() -> Int32 { + return spine_point_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_point_attachment_reference(wrappee) + } + + public func dereference() { + spine_point_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_point_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_point_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Polygon.swift b/spine-ios/Sources/Spine/Generated/Polygon.swift new file mode 100644 index 000000000..5b0f4112f --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Polygon.swift @@ -0,0 +1,76 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePolygon) +@objcMembers +public final class Polygon: NSObject { + internal let wrappee: spine_polygon + + internal init(_ wrappee: spine_polygon) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Polygon else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_polygon_create() + self.init(ptr) + } + + public func getVertices() -> ArrayFloat { + return spine_polygon_get__vertices(wrappee) + } + + public func setVertices(value: ArrayFloat) { + spine_polygon_set__vertices(wrappee, value) + } + + public func getCount() -> Int32 { + return spine_polygon_get__count(wrappee) + } + + public func setCount(value: Int32) { + spine_polygon_set__count(wrappee, value) + } + + deinit { + spine_polygon_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Posed.swift b/spine-ios/Sources/Spine/Generated/Posed.swift new file mode 100644 index 000000000..fbf46334e --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Posed.swift @@ -0,0 +1,67 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePosed) +@objcMembers +public final class Posed { + internal let wrappee: spine_posed + + internal init(_ wrappee: spine_posed) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Posed else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func constrained() { + spine_posed_constrained(wrappee) + } + + public func resetConstrained() { + spine_posed_reset_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_posed_is_pose_equal_to_applied(wrappee) != 0 + } + + deinit { + spine_posed_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PosedActive.swift b/spine-ios/Sources/Spine/Generated/PosedActive.swift new file mode 100644 index 000000000..4396d06d9 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PosedActive.swift @@ -0,0 +1,63 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePosedActive) +@objcMembers +public final class PosedActive: NSObject { + internal let wrappee: spine_posed_active + + internal init(_ wrappee: spine_posed_active) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? PosedActive else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func isActive() -> Bool { + return spine_posed_active_is_active(wrappee) != 0 + } + + public func setActive(active: Bool) { + spine_posed_active_set_active(wrappee, active ? 1 : 0) + } + + deinit { + spine_posed_active_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/PosedData.swift b/spine-ios/Sources/Spine/Generated/PosedData.swift new file mode 100644 index 000000000..72309376f --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/PosedData.swift @@ -0,0 +1,73 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpinePosedData) +@objcMembers +public final class PosedData: NSObject { + internal let wrappee: spine_posed_data + + internal init(_ wrappee: spine_posed_data) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? PosedData else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(name: String?) { + let ptr = spine_posed_data_create(name) + self.init(ptr) + } + + public func getName() -> String? { + let result = spine_posed_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_posed_data_get_skin_required(wrappee) != 0 + } + + public func setSkinRequired(skinRequired: Bool) { + spine_posed_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + deinit { + spine_posed_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/RegionAttachment.swift b/spine-ios/Sources/Spine/Generated/RegionAttachment.swift new file mode 100644 index 000000000..b0942218f --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/RegionAttachment.swift @@ -0,0 +1,189 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRegionAttachment) +@objcMembers +public final class RegionAttachment: Attachment { + internal let wrappee: spine_region_attachment + + internal init(_ wrappee: spine_region_attachment) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_region_attachment_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_region_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func updateRegion() { + spine_region_attachment_update_region(wrappee) + } + + public func computeWorldVertices(slot: Slot, worldVertices: UnsafeMutablePointer?, offset: size_t, stride: size_t) { + spine_region_attachment_compute_world_vertices_1(wrappee, slot.wrappee, worldVertices, offset, stride) + } + + public func computeWorldVertices(slot: Slot, worldVertices: ArrayFloat, offset: size_t, stride: size_t) { + spine_region_attachment_compute_world_vertices_2(wrappee, slot.wrappee, worldVertices, offset, stride) + } + + public func getX() -> Float { + return spine_region_attachment_get_x(wrappee) + } + + public func setX(inValue: Float) { + spine_region_attachment_set_x(wrappee, inValue) + } + + public func getY() -> Float { + return spine_region_attachment_get_y(wrappee) + } + + public func setY(inValue: Float) { + spine_region_attachment_set_y(wrappee, inValue) + } + + public func getRotation() -> Float { + return spine_region_attachment_get_rotation(wrappee) + } + + public func setRotation(inValue: Float) { + spine_region_attachment_set_rotation(wrappee, inValue) + } + + public func getScaleX() -> Float { + return spine_region_attachment_get_scale_x(wrappee) + } + + public func setScaleX(inValue: Float) { + spine_region_attachment_set_scale_x(wrappee, inValue) + } + + public func getScaleY() -> Float { + return spine_region_attachment_get_scale_y(wrappee) + } + + public func setScaleY(inValue: Float) { + spine_region_attachment_set_scale_y(wrappee, inValue) + } + + public func getWidth() -> Float { + return spine_region_attachment_get_width(wrappee) + } + + public func setWidth(inValue: Float) { + spine_region_attachment_set_width(wrappee, inValue) + } + + public func getHeight() -> Float { + return spine_region_attachment_get_height(wrappee) + } + + public func setHeight(inValue: Float) { + spine_region_attachment_set_height(wrappee, inValue) + } + + public func getColor() -> Color { + let result = spine_region_attachment_get_color(wrappee) + return Color(result) + } + + public func getPath() -> String? { + let result = spine_region_attachment_get_path(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setPath(inValue: String?) { + spine_region_attachment_set_path(wrappee, inValue?.cString(using: .utf8)) + } + + public func getRegion() -> TextureRegion { + let result = spine_region_attachment_get_region(wrappee) + return TextureRegion(result) + } + + public func setRegion(region: TextureRegion) { + spine_region_attachment_set_region(wrappee, region.wrappee) + } + + public func getSequence() -> Sequence { + let result = spine_region_attachment_get_sequence(wrappee) + return Sequence(result) + } + + public func setSequence(sequence: Sequence) { + spine_region_attachment_set_sequence(wrappee, sequence.wrappee) + } + + public func getOffset() -> ArrayFloat { + return spine_region_attachment_get_offset(wrappee) + } + + public func getUVs() -> ArrayFloat { + return spine_region_attachment_get_u_vs(wrappee) + } + + public func copy() -> Attachment { + let result = spine_region_attachment_copy(wrappee) + return Attachment(result) + } + + public func getName() -> String? { + let result = spine_region_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getRefCount() -> Int32 { + return spine_region_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_region_attachment_reference(wrappee) + } + + public func dereference() { + spine_region_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_region_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_region_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/RenderCommand.swift b/spine-ios/Sources/Spine/Generated/RenderCommand.swift new file mode 100644 index 000000000..d31b1fad5 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/RenderCommand.swift @@ -0,0 +1,96 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRenderCommand) +@objcMembers +public final class RenderCommand: NSObject { + internal let wrappee: spine_render_command + + internal init(_ wrappee: spine_render_command) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? RenderCommand else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getPositions() -> UnsafeMutablePointer? { + return spine_render_command_get_positions(wrappee) + } + + public func getUvs() -> UnsafeMutablePointer? { + return spine_render_command_get_uvs(wrappee) + } + + public func getColors() -> OpaquePointer? { + return spine_render_command_get_colors(wrappee) + } + + public func getDarkColors() -> OpaquePointer? { + return spine_render_command_get_dark_colors(wrappee) + } + + public func getNumVertices() -> Int32 { + return spine_render_command_get_num_vertices(wrappee) + } + + public func getIndices() -> OpaquePointer? { + return spine_render_command_get_indices(wrappee) + } + + public func getNumIndices() -> Int32 { + return spine_render_command_get_num_indices(wrappee) + } + + public func getBlendMode() -> BlendMode { + return spine_render_command_get_blend_mode(wrappee) + } + + public func getTexture() -> OpaquePointer? { + return spine_render_command_get_texture(wrappee) + } + + public func getNext() -> RenderCommand { + let result = spine_render_command_get_next(wrappee) + return RenderCommand(result) + } + + deinit { + spine_render_command_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Rgb2Timeline.swift b/spine-ios/Sources/Spine/Generated/Rgb2Timeline.swift new file mode 100644 index 000000000..89aa9530b --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Rgb2Timeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRgb2Timeline) +@objcMembers +public final class Rgb2Timeline: SlotCurveTimeline { + internal let wrappee: spine_rgb2_timeline + + internal init(_ wrappee: spine_rgb2_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, slotIndex: Int32) { + let ptr = spine_rgb2_timeline_create(frameCount, bezierCount, slotIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_rgb2_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func setFrame(frame: Int32, time: Float, r: Float, g: Float, b: Float, r2: Float, g2: Float, b2: Float) { + spine_rgb2_timeline_set_frame(wrappee, frame, time, r, g, b, r2, g2, b2) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_rgb2_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getSlotIndex() -> Int32 { + return spine_rgb2_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_rgb2_timeline_set_slot_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_rgb2_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_rgb2_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_rgb2_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_rgb2_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_rgb2_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_rgb2_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_rgb2_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_rgb2_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_rgb2_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_rgb2_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_rgb2_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_rgb2_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/RgbTimeline.swift b/spine-ios/Sources/Spine/Generated/RgbTimeline.swift new file mode 100644 index 000000000..49b22e39b --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/RgbTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRgbTimeline) +@objcMembers +public final class RgbTimeline: SlotCurveTimeline { + internal let wrappee: spine_rgb_timeline + + internal init(_ wrappee: spine_rgb_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, slotIndex: Int32) { + let ptr = spine_rgb_timeline_create(frameCount, bezierCount, slotIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_rgb_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func setFrame(frame: Int32, time: Float, r: Float, g: Float, b: Float) { + spine_rgb_timeline_set_frame(wrappee, frame, time, r, g, b) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_rgb_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getSlotIndex() -> Int32 { + return spine_rgb_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_rgb_timeline_set_slot_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_rgb_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_rgb_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_rgb_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_rgb_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_rgb_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_rgb_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_rgb_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_rgb_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_rgb_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_rgb_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_rgb_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_rgb_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Rgba2Timeline.swift b/spine-ios/Sources/Spine/Generated/Rgba2Timeline.swift new file mode 100644 index 000000000..900e3d91d --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Rgba2Timeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRgba2Timeline) +@objcMembers +public final class Rgba2Timeline: SlotCurveTimeline { + internal let wrappee: spine_rgba2_timeline + + internal init(_ wrappee: spine_rgba2_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, slotIndex: Int32) { + let ptr = spine_rgba2_timeline_create(frameCount, bezierCount, slotIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_rgba2_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func setFrame(frame: Int32, time: Float, r: Float, g: Float, b: Float, a: Float, r2: Float, g2: Float, b2: Float) { + spine_rgba2_timeline_set_frame(wrappee, frame, time, r, g, b, a, r2, g2, b2) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_rgba2_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getSlotIndex() -> Int32 { + return spine_rgba2_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_rgba2_timeline_set_slot_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_rgba2_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_rgba2_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_rgba2_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_rgba2_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_rgba2_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_rgba2_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_rgba2_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_rgba2_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_rgba2_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_rgba2_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_rgba2_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_rgba2_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/RgbaTimeline.swift b/spine-ios/Sources/Spine/Generated/RgbaTimeline.swift new file mode 100644 index 000000000..07901a1f8 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/RgbaTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRgbaTimeline) +@objcMembers +public final class RgbaTimeline: SlotCurveTimeline { + internal let wrappee: spine_rgba_timeline + + internal init(_ wrappee: spine_rgba_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, slotIndex: Int32) { + let ptr = spine_rgba_timeline_create(frameCount, bezierCount, slotIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_rgba_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func setFrame(frame: Int32, time: Float, r: Float, g: Float, b: Float, a: Float) { + spine_rgba_timeline_set_frame(wrappee, frame, time, r, g, b, a) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_rgba_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getSlotIndex() -> Int32 { + return spine_rgba_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_rgba_timeline_set_slot_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_rgba_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_rgba_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_rgba_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_rgba_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_rgba_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_rgba_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_rgba_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_rgba_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_rgba_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_rgba_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_rgba_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_rgba_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/RotateTimeline.swift b/spine-ios/Sources/Spine/Generated/RotateTimeline.swift new file mode 100644 index 000000000..680b80b19 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/RotateTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRotateTimeline) +@objcMembers +public final class RotateTimeline: BoneTimeline1 { + internal let wrappee: spine_rotate_timeline + + internal init(_ wrappee: spine_rotate_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_rotate_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_rotate_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_rotate_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_rotate_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_rotate_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_rotate_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_rotate_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_rotate_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_rotate_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_rotate_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_rotate_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_rotate_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_rotate_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_rotate_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_rotate_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_rotate_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_rotate_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_rotate_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_rotate_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_rotate_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_rotate_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_rotate_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_rotate_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Rtti.swift b/spine-ios/Sources/Spine/Generated/Rtti.swift new file mode 100644 index 000000000..432b671a0 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Rtti.swift @@ -0,0 +1,68 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineRtti) +@objcMembers +public final class Rtti: NSObject { + internal let wrappee: spine_rtti + + internal init(_ wrappee: spine_rtti) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Rtti else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getClassName() -> String? { + let result = spine_rtti_get_class_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func isExactly(rtti: Rtti) -> Bool { + return spine_rtti_is_exactly(wrappee, rtti.wrappee) != 0 + } + + public func instanceOf(rtti: Rtti) -> Bool { + return spine_rtti_instance_of(wrappee, rtti.wrappee) != 0 + } + + deinit { + spine_rtti_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ScaleTimeline.swift b/spine-ios/Sources/Spine/Generated/ScaleTimeline.swift new file mode 100644 index 000000000..4ce75566c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ScaleTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineScaleTimeline) +@objcMembers +public final class ScaleTimeline: BoneTimeline2 { + internal let wrappee: spine_scale_timeline + + internal init(_ wrappee: spine_scale_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_scale_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_scale_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_scale_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_scale_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_scale_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value1: Float, value2: Float) { + spine_scale_timeline_set_frame(wrappee, frame, time, value1, value2) + } + + public func setLinear(frame: size_t) { + spine_scale_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_scale_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_scale_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_scale_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_scale_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_scale_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_scale_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_scale_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_scale_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_scale_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_scale_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_scale_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ScaleXTimeline.swift b/spine-ios/Sources/Spine/Generated/ScaleXTimeline.swift new file mode 100644 index 000000000..73d227c52 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ScaleXTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineScaleXTimeline) +@objcMembers +public final class ScaleXTimeline: BoneTimeline1 { + internal let wrappee: spine_scale_x_timeline + + internal init(_ wrappee: spine_scale_x_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_scale_x_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_scale_x_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_scale_x_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_scale_x_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_scale_x_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_scale_x_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_scale_x_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_scale_x_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_scale_x_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_scale_x_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_scale_x_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_scale_x_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_scale_x_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_scale_x_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_scale_x_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_scale_x_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_scale_x_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_scale_x_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_scale_x_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_scale_x_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_scale_x_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_scale_x_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_scale_x_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ScaleYTimeline.swift b/spine-ios/Sources/Spine/Generated/ScaleYTimeline.swift new file mode 100644 index 000000000..ed35a3708 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ScaleYTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineScaleYTimeline) +@objcMembers +public final class ScaleYTimeline: BoneTimeline1 { + internal let wrappee: spine_scale_y_timeline + + internal init(_ wrappee: spine_scale_y_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_scale_y_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_scale_y_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_scale_y_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_scale_y_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_scale_y_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_scale_y_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_scale_y_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_scale_y_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_scale_y_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_scale_y_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_scale_y_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_scale_y_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_scale_y_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_scale_y_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_scale_y_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_scale_y_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_scale_y_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_scale_y_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_scale_y_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_scale_y_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_scale_y_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_scale_y_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_scale_y_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Sequence.swift b/spine-ios/Sources/Spine/Generated/Sequence.swift new file mode 100644 index 000000000..99251555c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Sequence.swift @@ -0,0 +1,110 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSequence) +@objcMembers +public final class Sequence: NSObject { + internal let wrappee: spine_sequence + + internal init(_ wrappee: spine_sequence) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Sequence else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(count: Int32) { + let ptr = spine_sequence_create(count) + self.init(ptr) + } + + public func copy() -> Sequence { + let result = spine_sequence_copy(wrappee) + return Sequence(result) + } + + public func apply(slot: SlotPose, attachment: Attachment) { + spine_sequence_apply(wrappee, slot.wrappee, attachment.wrappee) + } + + public func getPath(basePath: String?, index: Int32) -> String? { + let result = spine_sequence_get_path(wrappee, basePath?.cString(using: .utf8), index) + return result != nil ? String(cString: result!) : nil + } + + public func getId() -> Int32 { + return spine_sequence_get_id(wrappee) + } + + public func setId(id: Int32) { + spine_sequence_set_id(wrappee, id) + } + + public func getStart() -> Int32 { + return spine_sequence_get_start(wrappee) + } + + public func setStart(start: Int32) { + spine_sequence_set_start(wrappee, start) + } + + public func getDigits() -> Int32 { + return spine_sequence_get_digits(wrappee) + } + + public func setDigits(digits: Int32) { + spine_sequence_set_digits(wrappee, digits) + } + + public func getSetupIndex() -> Int32 { + return spine_sequence_get_setup_index(wrappee) + } + + public func setSetupIndex(setupIndex: Int32) { + spine_sequence_set_setup_index(wrappee, setupIndex) + } + + public func getRegions() -> ArrayTextureRegion { + return spine_sequence_get_regions(wrappee) + } + + deinit { + spine_sequence_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SequenceTimeline.swift b/spine-ios/Sources/Spine/Generated/SequenceTimeline.swift new file mode 100644 index 000000000..477396ca5 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SequenceTimeline.swift @@ -0,0 +1,100 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSequenceTimeline) +@objcMembers +public final class SequenceTimeline: Timeline, SlotTimeline { + internal let wrappee: spine_sequence_timeline + + internal init(_ wrappee: spine_sequence_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, slotIndex: Int32, attachment: Attachment) { + let ptr = spine_sequence_timeline_create(frameCount, slotIndex, attachment.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_sequence_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_sequence_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func setFrame(frame: Int32, time: Float, mode: SequenceMode, index: Int32, delay: Float) { + spine_sequence_timeline_set_frame(wrappee, frame, time, mode, index, delay) + } + + public func getAttachment() -> Attachment { + let result = spine_sequence_timeline_get_attachment(wrappee) + return Attachment(result) + } + + public func getSlotIndex() -> Int32 { + return spine_sequence_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_sequence_timeline_set_slot_index(wrappee, inValue) + } + + public func getFrameEntries() -> size_t { + return spine_sequence_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_sequence_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_sequence_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_sequence_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_sequence_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_sequence_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_sequence_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ShearTimeline.swift b/spine-ios/Sources/Spine/Generated/ShearTimeline.swift new file mode 100644 index 000000000..9b1167396 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ShearTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineShearTimeline) +@objcMembers +public final class ShearTimeline: BoneTimeline2 { + internal let wrappee: spine_shear_timeline + + internal init(_ wrappee: spine_shear_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_shear_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_shear_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_shear_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_shear_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_shear_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value1: Float, value2: Float) { + spine_shear_timeline_set_frame(wrappee, frame, time, value1, value2) + } + + public func setLinear(frame: size_t) { + spine_shear_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_shear_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_shear_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_shear_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_shear_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_shear_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_shear_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_shear_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_shear_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_shear_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_shear_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_shear_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ShearXTimeline.swift b/spine-ios/Sources/Spine/Generated/ShearXTimeline.swift new file mode 100644 index 000000000..ff78ce950 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ShearXTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineShearXTimeline) +@objcMembers +public final class ShearXTimeline: BoneTimeline1 { + internal let wrappee: spine_shear_x_timeline + + internal init(_ wrappee: spine_shear_x_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_shear_x_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_shear_x_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_shear_x_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_shear_x_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_shear_x_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_shear_x_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_shear_x_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_shear_x_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_shear_x_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_shear_x_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_shear_x_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_shear_x_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_shear_x_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_shear_x_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_shear_x_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_shear_x_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_shear_x_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_shear_x_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_shear_x_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_shear_x_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_shear_x_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_shear_x_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_shear_x_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ShearYTimeline.swift b/spine-ios/Sources/Spine/Generated/ShearYTimeline.swift new file mode 100644 index 000000000..c2bde247d --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ShearYTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineShearYTimeline) +@objcMembers +public final class ShearYTimeline: BoneTimeline1 { + internal let wrappee: spine_shear_y_timeline + + internal init(_ wrappee: spine_shear_y_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_shear_y_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_shear_y_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_shear_y_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_shear_y_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_shear_y_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_shear_y_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_shear_y_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_shear_y_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_shear_y_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_shear_y_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_shear_y_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_shear_y_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_shear_y_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_shear_y_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_shear_y_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_shear_y_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_shear_y_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_shear_y_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_shear_y_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_shear_y_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_shear_y_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_shear_y_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_shear_y_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Skeleton.swift b/spine-ios/Sources/Spine/Generated/Skeleton.swift new file mode 100644 index 000000000..520b0b26c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Skeleton.swift @@ -0,0 +1,284 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkeleton) +@objcMembers +public final class Skeleton: NSObject { + internal let wrappee: spine_skeleton + + internal init(_ wrappee: spine_skeleton) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Skeleton else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(skeletonData: SkeletonData) { + let ptr = spine_skeleton_create(skeletonData.wrappee) + self.init(ptr) + } + + public func updateCache() { + spine_skeleton_update_cache(wrappee) + } + + public func printUpdateCache() { + spine_skeleton_print_update_cache(wrappee) + } + + public func constrained(object: Posed) { + spine_skeleton_constrained(wrappee, object.wrappee) + } + + public func sortBone(bone: Bone) { + spine_skeleton_sort_bone(wrappee, bone.wrappee) + } + + public func sortReset(bones: ArrayBone) { + spine_skeleton_sort_reset(wrappee, bones) + } + + public func updateWorldTransform(physics: Physics) { + spine_skeleton_update_world_transform(wrappee, physics) + } + + public func setupPose() { + spine_skeleton_setup_pose(wrappee) + } + + public func setupPoseBones() { + spine_skeleton_setup_pose_bones(wrappee) + } + + public func setupPoseSlots() { + spine_skeleton_setup_pose_slots(wrappee) + } + + public func getData() -> SkeletonData { + let result = spine_skeleton_get_data(wrappee) + return SkeletonData(result) + } + + public func getBones() -> ArrayBone { + return spine_skeleton_get_bones(wrappee) + } + + public func getUpdateCache() -> ArrayUpdate { + return spine_skeleton_get_update_cache(wrappee) + } + + public func getRootBone() -> Bone { + let result = spine_skeleton_get_root_bone(wrappee) + return Bone(result) + } + + public func findBone(boneName: String?) -> Bone { + let result = spine_skeleton_find_bone(wrappee, boneName?.cString(using: .utf8)) + return Bone(result) + } + + public func getSlots() -> ArraySlot { + return spine_skeleton_get_slots(wrappee) + } + + public func findSlot(slotName: String?) -> Slot { + let result = spine_skeleton_find_slot(wrappee, slotName?.cString(using: .utf8)) + return Slot(result) + } + + public func getDrawOrder() -> ArraySlot { + return spine_skeleton_get_draw_order(wrappee) + } + + public func getSkin() -> Skin { + let result = spine_skeleton_get_skin(wrappee) + return Skin(result) + } + + public func setSkin(skinName: String?) { + spine_skeleton_set_skin_1(wrappee, skinName?.cString(using: .utf8)) + } + + public func setSkin(newSkin: Skin) { + spine_skeleton_set_skin_2(wrappee, newSkin.wrappee) + } + + public func getAttachment(slotName: String?, attachmentName: String?) -> Attachment { + let result = spine_skeleton_get_attachment_1(wrappee, slotName?.cString(using: .utf8), attachmentName?.cString(using: .utf8)) + return Attachment(result) + } + + public func getAttachment(slotIndex: Int32, attachmentName: String?) -> Attachment { + let result = spine_skeleton_get_attachment_2(wrappee, slotIndex, attachmentName?.cString(using: .utf8)) + return Attachment(result) + } + + public func setAttachment(slotName: String?, attachmentName: String?) { + spine_skeleton_set_attachment(wrappee, slotName?.cString(using: .utf8), attachmentName?.cString(using: .utf8)) + } + + public func getConstraints() -> ArrayConstraint { + return spine_skeleton_get_constraints(wrappee) + } + + public func getPhysicsConstraints() -> ArrayPhysicsConstraint { + return spine_skeleton_get_physics_constraints(wrappee) + } + + public func getBounds(outX: UnsafeMutablePointer?, outY: UnsafeMutablePointer?, outWidth: UnsafeMutablePointer?, outHeight: UnsafeMutablePointer?) { + spine_skeleton_get_bounds_1(wrappee, outX, outY, outWidth, outHeight) + } + + public func getBounds(outX: UnsafeMutablePointer?, outY: UnsafeMutablePointer?, outWidth: UnsafeMutablePointer?, outHeight: UnsafeMutablePointer?, outVertexBuffer: ArrayFloat, clipping: SkeletonClipping) { + spine_skeleton_get_bounds_2(wrappee, outX, outY, outWidth, outHeight, outVertexBuffer, clipping.wrappee) + } + + public func getColor() -> Color { + let result = spine_skeleton_get_color(wrappee) + return Color(result) + } + + public func setColor(color: Color) { + spine_skeleton_set_color_1(wrappee, color.wrappee) + } + + public func setColor(r: Float, g: Float, b: Float, a: Float) { + spine_skeleton_set_color_2(wrappee, r, g, b, a) + } + + public func getScaleX() -> Float { + return spine_skeleton_get_scale_x(wrappee) + } + + public func setScaleX(inValue: Float) { + spine_skeleton_set_scale_x(wrappee, inValue) + } + + public func getScaleY() -> Float { + return spine_skeleton_get_scale_y(wrappee) + } + + public func setScaleY(inValue: Float) { + spine_skeleton_set_scale_y(wrappee, inValue) + } + + public func setScale(scaleX: Float, scaleY: Float) { + spine_skeleton_set_scale(wrappee, scaleX, scaleY) + } + + public func getX() -> Float { + return spine_skeleton_get_x(wrappee) + } + + public func setX(inValue: Float) { + spine_skeleton_set_x(wrappee, inValue) + } + + public func getY() -> Float { + return spine_skeleton_get_y(wrappee) + } + + public func setY(inValue: Float) { + spine_skeleton_set_y(wrappee, inValue) + } + + public func setPosition(x: Float, y: Float) { + spine_skeleton_set_position(wrappee, x, y) + } + + public func getPosition(x: UnsafeMutablePointer?, y: UnsafeMutablePointer?) { + spine_skeleton_get_position(wrappee, x, y) + } + + public func getWindX() -> Float { + return spine_skeleton_get_wind_x(wrappee) + } + + public func setWindX(windX: Float) { + spine_skeleton_set_wind_x(wrappee, windX) + } + + public func getWindY() -> Float { + return spine_skeleton_get_wind_y(wrappee) + } + + public func setWindY(windY: Float) { + spine_skeleton_set_wind_y(wrappee, windY) + } + + public func getGravityX() -> Float { + return spine_skeleton_get_gravity_x(wrappee) + } + + public func setGravityX(gravityX: Float) { + spine_skeleton_set_gravity_x(wrappee, gravityX) + } + + public func getGravityY() -> Float { + return spine_skeleton_get_gravity_y(wrappee) + } + + public func setGravityY(gravityY: Float) { + spine_skeleton_set_gravity_y(wrappee, gravityY) + } + + public func physicsTranslate(x: Float, y: Float) { + spine_skeleton_physics_translate(wrappee, x, y) + } + + public func physicsRotate(x: Float, y: Float, degrees: Float) { + spine_skeleton_physics_rotate(wrappee, x, y, degrees) + } + + public func getTime() -> Float { + return spine_skeleton_get_time(wrappee) + } + + public func setTime(time: Float) { + spine_skeleton_set_time(wrappee, time) + } + + public func update(delta: Float) { + spine_skeleton_update(wrappee, delta) + } + + deinit { + spine_skeleton_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SkeletonBinary.swift b/spine-ios/Sources/Spine/Generated/SkeletonBinary.swift new file mode 100644 index 000000000..95898e5e0 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SkeletonBinary.swift @@ -0,0 +1,84 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkeletonBinary) +@objcMembers +public final class SkeletonBinary: NSObject { + internal let wrappee: spine_skeleton_binary + + internal init(_ wrappee: spine_skeleton_binary) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SkeletonBinary else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(atlas: Atlas) { + let ptr = spine_skeleton_binary_create(atlas.wrappee) + self.init(ptr) + } + + public convenience init(attachmentLoader: AttachmentLoader, ownsLoader: Bool) { + let ptr = spine_skeleton_binary_create(attachmentLoader.wrappee, ownsLoader) + self.init(ptr) + } + + public func readSkeletonData(binary: OpaquePointer?, length: Int32) -> SkeletonData { + let result = spine_skeleton_binary_read_skeleton_data(wrappee, binary, length) + return SkeletonData(result) + } + + public func readSkeletonDataFile(path: String?) -> SkeletonData { + let result = spine_skeleton_binary_read_skeleton_data_file(wrappee, path?.cString(using: .utf8)) + return SkeletonData(result) + } + + public func setScale(scale: Float) { + spine_skeleton_binary_set_scale(wrappee, scale) + } + + public func getError() -> String? { + let result = spine_skeleton_binary_get_error(wrappee) + return result != nil ? String(cString: result!) : nil + } + + deinit { + spine_skeleton_binary_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SkeletonBounds.swift b/spine-ios/Sources/Spine/Generated/SkeletonBounds.swift new file mode 100644 index 000000000..3c9946b3c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SkeletonBounds.swift @@ -0,0 +1,136 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkeletonBounds) +@objcMembers +public final class SkeletonBounds: NSObject { + internal let wrappee: spine_skeleton_bounds + + internal init(_ wrappee: spine_skeleton_bounds) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SkeletonBounds else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_skeleton_bounds_create() + self.init(ptr) + } + + public func update(skeleton: Skeleton, updateAabb: Bool) { + spine_skeleton_bounds_update(wrappee, skeleton.wrappee, updateAabb ? 1 : 0) + } + + public func aabbContainsPoint(x: Float, y: Float) -> Bool { + return spine_skeleton_bounds_aabb_contains_point(wrappee, x, y) != 0 + } + + public func aabbIntersectsSegment(x1: Float, y1: Float, x2: Float, y2: Float) -> Bool { + return spine_skeleton_bounds_aabb_intersects_segment(wrappee, x1, y1, x2, y2) != 0 + } + + public func aabbIntersectsSkeleton(bounds: SkeletonBounds) -> Bool { + return spine_skeleton_bounds_aabb_intersects_skeleton(wrappee, bounds.wrappee) != 0 + } + + public func containsPoint(polygon: Polygon, x: Float, y: Float) -> Bool { + return spine_skeleton_bounds_contains_point_1(wrappee, polygon.wrappee, x, y) != 0 + } + + public func containsPoint(x: Float, y: Float) -> BoundingBoxAttachment { + let result = spine_skeleton_bounds_contains_point_2(wrappee, x, y) + return BoundingBoxAttachment(result) + } + + public func intersectsSegment(x1: Float, y1: Float, x2: Float, y2: Float) -> BoundingBoxAttachment { + let result = spine_skeleton_bounds_intersects_segment_1(wrappee, x1, y1, x2, y2) + return BoundingBoxAttachment(result) + } + + public func intersectsSegment(polygon: Polygon, x1: Float, y1: Float, x2: Float, y2: Float) -> Bool { + return spine_skeleton_bounds_intersects_segment_2(wrappee, polygon.wrappee, x1, y1, x2, y2) != 0 + } + + public func getPolygon(attachment: BoundingBoxAttachment) -> Polygon { + let result = spine_skeleton_bounds_get_polygon(wrappee, attachment.wrappee) + return Polygon(result) + } + + public func getBoundingBox(polygon: Polygon) -> BoundingBoxAttachment { + let result = spine_skeleton_bounds_get_bounding_box(wrappee, polygon.wrappee) + return BoundingBoxAttachment(result) + } + + public func getPolygons() -> ArrayPolygon { + return spine_skeleton_bounds_get_polygons(wrappee) + } + + public func getBoundingBoxes() -> ArrayBoundingBoxAttachment { + return spine_skeleton_bounds_get_bounding_boxes(wrappee) + } + + public func getMinX() -> Float { + return spine_skeleton_bounds_get_min_x(wrappee) + } + + public func getMinY() -> Float { + return spine_skeleton_bounds_get_min_y(wrappee) + } + + public func getMaxX() -> Float { + return spine_skeleton_bounds_get_max_x(wrappee) + } + + public func getMaxY() -> Float { + return spine_skeleton_bounds_get_max_y(wrappee) + } + + public func getWidth() -> Float { + return spine_skeleton_bounds_get_width(wrappee) + } + + public func getHeight() -> Float { + return spine_skeleton_bounds_get_height(wrappee) + } + + deinit { + spine_skeleton_bounds_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SkeletonClipping.swift b/spine-ios/Sources/Spine/Generated/SkeletonClipping.swift new file mode 100644 index 000000000..edb53ea1e --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SkeletonClipping.swift @@ -0,0 +1,100 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkeletonClipping) +@objcMembers +public final class SkeletonClipping: NSObject { + internal let wrappee: spine_skeleton_clipping + + internal init(_ wrappee: spine_skeleton_clipping) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SkeletonClipping else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_skeleton_clipping_create() + self.init(ptr) + } + + public func clipStart(skeleton: Skeleton, slot: Slot, clip: ClippingAttachment) -> size_t { + return spine_skeleton_clipping_clip_start(wrappee, skeleton.wrappee, slot.wrappee, clip.wrappee) + } + + public func clipEnd(slot: Slot) { + spine_skeleton_clipping_clip_end_1(wrappee, slot.wrappee) + } + + public func clipEnd() { + spine_skeleton_clipping_clip_end_2(wrappee) + } + + public func clipTriangles(vertices: UnsafeMutablePointer?, triangles: OpaquePointer?, trianglesLength: size_t) -> Bool { + return spine_skeleton_clipping_clip_triangles_1(wrappee, vertices, triangles, trianglesLength) != 0 + } + + public func clipTriangles(vertices: UnsafeMutablePointer?, triangles: OpaquePointer?, trianglesLength: size_t, uvs: UnsafeMutablePointer?, stride: size_t) -> Bool { + return spine_skeleton_clipping_clip_triangles_2(wrappee, vertices, triangles, trianglesLength, uvs, stride) != 0 + } + + public func clipTriangles(vertices: ArrayFloat, triangles: ArrayUnsignedShort, uvs: ArrayFloat, stride: size_t) -> Bool { + return spine_skeleton_clipping_clip_triangles_3(wrappee, vertices, triangles, uvs, stride) != 0 + } + + public func isClipping() -> Bool { + return spine_skeleton_clipping_is_clipping(wrappee) != 0 + } + + public func getClippedVertices() -> ArrayFloat { + return spine_skeleton_clipping_get_clipped_vertices(wrappee) + } + + public func getClippedTriangles() -> ArrayUnsignedShort { + return spine_skeleton_clipping_get_clipped_triangles(wrappee) + } + + public func getClippedUVs() -> ArrayFloat { + return spine_skeleton_clipping_get_clipped_u_vs(wrappee) + } + + deinit { + spine_skeleton_clipping_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SkeletonData.swift b/spine-ios/Sources/Spine/Generated/SkeletonData.swift new file mode 100644 index 000000000..793f1ba23 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SkeletonData.swift @@ -0,0 +1,211 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkeletonData) +@objcMembers +public final class SkeletonData: NSObject { + internal let wrappee: spine_skeleton_data + + internal init(_ wrappee: spine_skeleton_data) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SkeletonData else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_skeleton_data_create() + self.init(ptr) + } + + public func findBone(boneName: String?) -> BoneData { + let result = spine_skeleton_data_find_bone(wrappee, boneName?.cString(using: .utf8)) + return BoneData(result) + } + + public func findSlot(slotName: String?) -> SlotData { + let result = spine_skeleton_data_find_slot(wrappee, slotName?.cString(using: .utf8)) + return SlotData(result) + } + + public func findSkin(skinName: String?) -> Skin { + let result = spine_skeleton_data_find_skin(wrappee, skinName?.cString(using: .utf8)) + return Skin(result) + } + + public func findEvent(eventDataName: String?) -> EventData { + let result = spine_skeleton_data_find_event(wrappee, eventDataName?.cString(using: .utf8)) + return EventData(result) + } + + public func findAnimation(animationName: String?) -> Animation { + let result = spine_skeleton_data_find_animation(wrappee, animationName?.cString(using: .utf8)) + return Animation(result) + } + + public func getName() -> String? { + let result = spine_skeleton_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setName(inValue: String?) { + spine_skeleton_data_set_name(wrappee, inValue?.cString(using: .utf8)) + } + + public func getBones() -> ArrayBoneData { + return spine_skeleton_data_get_bones(wrappee) + } + + public func getSlots() -> ArraySlotData { + return spine_skeleton_data_get_slots(wrappee) + } + + public func getSkins() -> ArraySkin { + return spine_skeleton_data_get_skins(wrappee) + } + + public func getDefaultSkin() -> Skin { + let result = spine_skeleton_data_get_default_skin(wrappee) + return Skin(result) + } + + public func setDefaultSkin(inValue: Skin) { + spine_skeleton_data_set_default_skin(wrappee, inValue.wrappee) + } + + public func getEvents() -> ArrayEventData { + return spine_skeleton_data_get_events(wrappee) + } + + public func getAnimations() -> ArrayAnimation { + return spine_skeleton_data_get_animations(wrappee) + } + + public func getConstraints() -> ArrayConstraintData { + return spine_skeleton_data_get_constraints(wrappee) + } + + public func getX() -> Float { + return spine_skeleton_data_get_x(wrappee) + } + + public func setX(inValue: Float) { + spine_skeleton_data_set_x(wrappee, inValue) + } + + public func getY() -> Float { + return spine_skeleton_data_get_y(wrappee) + } + + public func setY(inValue: Float) { + spine_skeleton_data_set_y(wrappee, inValue) + } + + public func getWidth() -> Float { + return spine_skeleton_data_get_width(wrappee) + } + + public func setWidth(inValue: Float) { + spine_skeleton_data_set_width(wrappee, inValue) + } + + public func getHeight() -> Float { + return spine_skeleton_data_get_height(wrappee) + } + + public func setHeight(inValue: Float) { + spine_skeleton_data_set_height(wrappee, inValue) + } + + public func getReferenceScale() -> Float { + return spine_skeleton_data_get_reference_scale(wrappee) + } + + public func setReferenceScale(inValue: Float) { + spine_skeleton_data_set_reference_scale(wrappee, inValue) + } + + public func getVersion() -> String? { + let result = spine_skeleton_data_get_version(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setVersion(inValue: String?) { + spine_skeleton_data_set_version(wrappee, inValue?.cString(using: .utf8)) + } + + public func getHash() -> String? { + let result = spine_skeleton_data_get_hash(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setHash(inValue: String?) { + spine_skeleton_data_set_hash(wrappee, inValue?.cString(using: .utf8)) + } + + public func getImagesPath() -> String? { + let result = spine_skeleton_data_get_images_path(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setImagesPath(inValue: String?) { + spine_skeleton_data_set_images_path(wrappee, inValue?.cString(using: .utf8)) + } + + public func getAudioPath() -> String? { + let result = spine_skeleton_data_get_audio_path(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func setAudioPath(inValue: String?) { + spine_skeleton_data_set_audio_path(wrappee, inValue?.cString(using: .utf8)) + } + + public func getFps() -> Float { + return spine_skeleton_data_get_fps(wrappee) + } + + public func setFps(inValue: Float) { + spine_skeleton_data_set_fps(wrappee, inValue) + } + + deinit { + spine_skeleton_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SkeletonJson.swift b/spine-ios/Sources/Spine/Generated/SkeletonJson.swift new file mode 100644 index 000000000..331aa728c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SkeletonJson.swift @@ -0,0 +1,84 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkeletonJson) +@objcMembers +public final class SkeletonJson: NSObject { + internal let wrappee: spine_skeleton_json + + internal init(_ wrappee: spine_skeleton_json) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SkeletonJson else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(atlas: Atlas) { + let ptr = spine_skeleton_json_create(atlas.wrappee) + self.init(ptr) + } + + public convenience init(attachmentLoader: AttachmentLoader, ownsLoader: Bool) { + let ptr = spine_skeleton_json_create(attachmentLoader.wrappee, ownsLoader) + self.init(ptr) + } + + public func readSkeletonDataFile(path: String?) -> SkeletonData { + let result = spine_skeleton_json_read_skeleton_data_file(wrappee, path?.cString(using: .utf8)) + return SkeletonData(result) + } + + public func readSkeletonData(json: String?) -> SkeletonData { + let result = spine_skeleton_json_read_skeleton_data(wrappee, json?.cString(using: .utf8)) + return SkeletonData(result) + } + + public func setScale(scale: Float) { + spine_skeleton_json_set_scale(wrappee, scale) + } + + public func getError() -> String? { + let result = spine_skeleton_json_get_error(wrappee) + return result != nil ? String(cString: result!) : nil + } + + deinit { + spine_skeleton_json_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SkeletonRenderer.swift b/spine-ios/Sources/Spine/Generated/SkeletonRenderer.swift new file mode 100644 index 000000000..db5cb4a3d --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SkeletonRenderer.swift @@ -0,0 +1,65 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkeletonRenderer) +@objcMembers +public final class SkeletonRenderer: NSObject { + internal let wrappee: spine_skeleton_renderer + + internal init(_ wrappee: spine_skeleton_renderer) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SkeletonRenderer else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_skeleton_renderer_create() + self.init(ptr) + } + + public func render(skeleton: Skeleton) -> RenderCommand { + let result = spine_skeleton_renderer_render(wrappee, skeleton.wrappee) + return RenderCommand(result) + } + + deinit { + spine_skeleton_renderer_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Skin.swift b/spine-ios/Sources/Spine/Generated/Skin.swift new file mode 100644 index 000000000..f106a6f12 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Skin.swift @@ -0,0 +1,103 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSkin) +@objcMembers +public final class Skin: NSObject { + internal let wrappee: spine_skin + + internal init(_ wrappee: spine_skin) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Skin else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(name: String?) { + let ptr = spine_skin_create(name) + self.init(ptr) + } + + public func setAttachment(slotIndex: size_t, name: String?, attachment: Attachment) { + spine_skin_set_attachment(wrappee, slotIndex, name?.cString(using: .utf8), attachment.wrappee) + } + + public func getAttachment(slotIndex: size_t, name: String?) -> Attachment { + let result = spine_skin_get_attachment(wrappee, slotIndex, name?.cString(using: .utf8)) + return Attachment(result) + } + + public func removeAttachment(slotIndex: size_t, name: String?) { + spine_skin_remove_attachment(wrappee, slotIndex, name?.cString(using: .utf8)) + } + + public func findAttachmentsForSlot(slotIndex: size_t, attachments: ArrayAttachment) { + spine_skin_find_attachments_for_slot(wrappee, slotIndex, attachments) + } + + public func getName() -> String? { + let result = spine_skin_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func addSkin(other: Skin) { + spine_skin_add_skin(wrappee, other.wrappee) + } + + public func copySkin(other: Skin) { + spine_skin_copy_skin(wrappee, other.wrappee) + } + + public func getBones() -> ArrayBoneData { + return spine_skin_get_bones(wrappee) + } + + public func getConstraints() -> ArrayConstraintData { + return spine_skin_get_constraints(wrappee) + } + + public func getColor() -> Color { + let result = spine_skin_get_color(wrappee) + return Color(result) + } + + deinit { + spine_skin_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Slider.swift b/spine-ios/Sources/Spine/Generated/Slider.swift new file mode 100644 index 000000000..69846d4bc --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Slider.swift @@ -0,0 +1,120 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSlider) +@objcMembers +public final class Slider: PosedActive, Posed, Constraint { + internal let wrappee: spine_slider + + internal init(_ wrappee: spine_slider) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(data: SliderData, skeleton: Skeleton) { + let ptr = spine_slider_create(data.wrappee, skeleton.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_slider_get_rtti(wrappee) + return Rtti(result) + } + + public func copy(skeleton: Skeleton) -> Slider { + let result = spine_slider_copy(wrappee, skeleton.wrappee) + return Slider(result) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_slider_update(wrappee, skeleton.wrappee, physics) + } + + public func sort(skeleton: Skeleton) { + spine_slider_sort(wrappee, skeleton.wrappee) + } + + public func isSourceActive() -> Bool { + return spine_slider_is_source_active(wrappee) != 0 + } + + public func getBone() -> Bone { + let result = spine_slider_get_bone(wrappee) + return Bone(result) + } + + public func setBone(bone: Bone) { + spine_slider_set_bone(wrappee, bone.wrappee) + } + + public func getData() -> SliderData { + let result = spine_slider_get_data(wrappee) + return SliderData(result) + } + + public func getPose() -> SliderPose { + let result = spine_slider_get_pose(wrappee) + return SliderPose(result) + } + + public func getAppliedPose() -> SliderPose { + let result = spine_slider_get_applied_pose(wrappee) + return SliderPose(result) + } + + public func resetConstrained() { + spine_slider_reset_constrained(wrappee) + } + + public func constrained() { + spine_slider_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_slider_is_pose_equal_to_applied(wrappee) != 0 + } + + public func isActive() -> Bool { + return spine_slider_is_active(wrappee) != 0 + } + + public func setActive(active: Bool) { + spine_slider_set_active(wrappee, active ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_slider_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_slider_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SliderData.swift b/spine-ios/Sources/Spine/Generated/SliderData.swift new file mode 100644 index 000000000..bd0f386ef --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SliderData.swift @@ -0,0 +1,149 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSliderData) +@objcMembers +public final class SliderData: PosedData, ConstraintData { + internal let wrappee: spine_slider_data + + internal init(_ wrappee: spine_slider_data) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_slider_data_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_slider_data_get_rtti(wrappee) + return Rtti(result) + } + + public func createMethod(skeleton: Skeleton) -> Constraint { + let result = spine_slider_data_create_method(wrappee, skeleton.wrappee) + return Constraint(result) + } + + public func getAnimation() -> Animation { + let result = spine_slider_data_get_animation(wrappee) + return Animation(result) + } + + public func setAnimation(animation: Animation) { + spine_slider_data_set_animation(wrappee, animation.wrappee) + } + + public func getAdditive() -> Bool { + return spine_slider_data_get_additive(wrappee) != 0 + } + + public func setAdditive(additive: Bool) { + spine_slider_data_set_additive(wrappee, additive ? 1 : 0) + } + + public func getLoop() -> Bool { + return spine_slider_data_get_loop(wrappee) != 0 + } + + public func setLoop(loop: Bool) { + spine_slider_data_set_loop(wrappee, loop ? 1 : 0) + } + + public func getBone() -> BoneData { + let result = spine_slider_data_get_bone(wrappee) + return BoneData(result) + } + + public func setBone(bone: BoneData) { + spine_slider_data_set_bone(wrappee, bone.wrappee) + } + + public func getProperty() -> FromProperty { + let result = spine_slider_data_get_property(wrappee) + return FromProperty(result) + } + + public func setProperty(property: FromProperty) { + spine_slider_data_set_property(wrappee, property.wrappee) + } + + public func getScale() -> Float { + return spine_slider_data_get_scale(wrappee) + } + + public func setScale(scale: Float) { + spine_slider_data_set_scale(wrappee, scale) + } + + public func getOffset() -> Float { + return spine_slider_data_get_offset(wrappee) + } + + public func setOffset(offset: Float) { + spine_slider_data_set_offset(wrappee, offset) + } + + public func getLocal() -> Bool { + return spine_slider_data_get_local(wrappee) != 0 + } + + public func setLocal(local: Bool) { + spine_slider_data_set_local(wrappee, local ? 1 : 0) + } + + public func getName() -> String? { + let result = spine_slider_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_slider_data_get_skin_required(wrappee) != 0 + } + + public func getSetupPose() -> SliderPose { + let result = spine_slider_data_get_setup_pose(wrappee) + return SliderPose(result) + } + + public func setSkinRequired(skinRequired: Bool) { + spine_slider_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_slider_data_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_slider_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SliderMixTimeline.swift b/spine-ios/Sources/Spine/Generated/SliderMixTimeline.swift new file mode 100644 index 000000000..580567ebd --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SliderMixTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSliderMixTimeline) +@objcMembers +public final class SliderMixTimeline: ConstraintTimeline1 { + internal let wrappee: spine_slider_mix_timeline + + internal init(_ wrappee: spine_slider_mix_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, sliderIndex: Int32) { + let ptr = spine_slider_mix_timeline_create(frameCount, bezierCount, sliderIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_slider_mix_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_slider_mix_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_slider_mix_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_slider_mix_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_slider_mix_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_slider_mix_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_slider_mix_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_slider_mix_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_slider_mix_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_slider_mix_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_slider_mix_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_slider_mix_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_slider_mix_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_slider_mix_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_slider_mix_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_slider_mix_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_slider_mix_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_slider_mix_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_slider_mix_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_slider_mix_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_slider_mix_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_slider_mix_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SliderPose.swift b/spine-ios/Sources/Spine/Generated/SliderPose.swift new file mode 100644 index 000000000..01889e944 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SliderPose.swift @@ -0,0 +1,80 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSliderPose) +@objcMembers +public final class SliderPose: NSObject { + internal let wrappee: spine_slider_pose + + internal init(_ wrappee: spine_slider_pose) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SliderPose else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_slider_pose_create() + self.init(ptr) + } + + public func set(pose: SliderPose) { + spine_slider_pose_set(wrappee, pose.wrappee) + } + + public func getTime() -> Float { + return spine_slider_pose_get_time(wrappee) + } + + public func setTime(time: Float) { + spine_slider_pose_set_time(wrappee, time) + } + + public func getMix() -> Float { + return spine_slider_pose_get_mix(wrappee) + } + + public func setMix(mix: Float) { + spine_slider_pose_set_mix(wrappee, mix) + } + + deinit { + spine_slider_pose_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SliderTimeline.swift b/spine-ios/Sources/Spine/Generated/SliderTimeline.swift new file mode 100644 index 000000000..77f8c9ec9 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SliderTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSliderTimeline) +@objcMembers +public final class SliderTimeline: ConstraintTimeline1 { + internal let wrappee: spine_slider_timeline + + internal init(_ wrappee: spine_slider_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, sliderIndex: Int32) { + let ptr = spine_slider_timeline_create(frameCount, bezierCount, sliderIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_slider_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_slider_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getConstraintIndex() -> Int32 { + return spine_slider_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_slider_timeline_set_constraint_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_slider_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_slider_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_slider_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_slider_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_slider_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_slider_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_slider_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_slider_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_slider_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_slider_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_slider_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_slider_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_slider_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_slider_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_slider_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_slider_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_slider_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_slider_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Slot.swift b/spine-ios/Sources/Spine/Generated/Slot.swift new file mode 100644 index 000000000..21d8eb926 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Slot.swift @@ -0,0 +1,96 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSlot) +@objcMembers +public final class Slot: NSObject, Posed { + internal let wrappee: spine_slot + + internal init(_ wrappee: spine_slot) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Slot else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init(data: SlotData, skeleton: Skeleton) { + let ptr = spine_slot_create(data.wrappee, skeleton.wrappee) + self.init(ptr) + } + + public func getBone() -> Bone { + let result = spine_slot_get_bone(wrappee) + return Bone(result) + } + + public func setupPose() { + spine_slot_setup_pose(wrappee) + } + + public func getData() -> SlotData { + let result = spine_slot_get_data(wrappee) + return SlotData(result) + } + + public func getPose() -> SlotPose { + let result = spine_slot_get_pose(wrappee) + return SlotPose(result) + } + + public func getAppliedPose() -> SlotPose { + let result = spine_slot_get_applied_pose(wrappee) + return SlotPose(result) + } + + public func resetConstrained() { + spine_slot_reset_constrained(wrappee) + } + + public func constrained() { + spine_slot_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_slot_is_pose_equal_to_applied(wrappee) != 0 + } + + deinit { + spine_slot_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SlotCurveTimeline.swift b/spine-ios/Sources/Spine/Generated/SlotCurveTimeline.swift new file mode 100644 index 000000000..23a10c033 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SlotCurveTimeline.swift @@ -0,0 +1,106 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSlotCurveTimeline) +@objcMembers +public final class SlotCurveTimeline: CurveTimeline, SlotTimeline { + internal let wrappee: spine_slot_curve_timeline + + internal init(_ wrappee: spine_slot_curve_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_slot_curve_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_slot_curve_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getSlotIndex() -> Int32 { + return spine_slot_curve_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_slot_curve_timeline_set_slot_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_slot_curve_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_slot_curve_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_slot_curve_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_slot_curve_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_slot_curve_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_slot_curve_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_slot_curve_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_slot_curve_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_slot_curve_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_slot_curve_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_slot_curve_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_slot_curve_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SlotData.swift b/spine-ios/Sources/Spine/Generated/SlotData.swift new file mode 100644 index 000000000..76b0a41fc --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SlotData.swift @@ -0,0 +1,101 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSlotData) +@objcMembers +public final class SlotData: PosedData { + internal let wrappee: spine_slot_data + + internal init(_ wrappee: spine_slot_data) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(index: Int32, name: String?, boneData: BoneData) { + let ptr = spine_slot_data_create(index, name, boneData.wrappee) + self.init(ptr) + } + + public func getIndex() -> Int32 { + return spine_slot_data_get_index(wrappee) + } + + public func getBoneData() -> BoneData { + let result = spine_slot_data_get_bone_data(wrappee) + return BoneData(result) + } + + public func setAttachmentName(attachmentName: String?) { + spine_slot_data_set_attachment_name(wrappee, attachmentName?.cString(using: .utf8)) + } + + public func getAttachmentName() -> String? { + let result = spine_slot_data_get_attachment_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getBlendMode() -> BlendMode { + return spine_slot_data_get_blend_mode(wrappee) + } + + public func setBlendMode(blendMode: BlendMode) { + spine_slot_data_set_blend_mode(wrappee, blendMode) + } + + public func getVisible() -> Bool { + return spine_slot_data_get_visible(wrappee) != 0 + } + + public func setVisible(visible: Bool) { + spine_slot_data_set_visible(wrappee, visible ? 1 : 0) + } + + public func getSetupPose() -> SlotPose { + let result = spine_slot_data_get_setup_pose(wrappee) + return SlotPose(result) + } + + public func getName() -> String? { + let result = spine_slot_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_slot_data_get_skin_required(wrappee) != 0 + } + + public func setSkinRequired(skinRequired: Bool) { + spine_slot_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + deinit { + spine_slot_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SlotPose.swift b/spine-ios/Sources/Spine/Generated/SlotPose.swift new file mode 100644 index 000000000..28a7906b4 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SlotPose.swift @@ -0,0 +1,103 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSlotPose) +@objcMembers +public final class SlotPose: NSObject { + internal let wrappee: spine_slot_pose + + internal init(_ wrappee: spine_slot_pose) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SlotPose else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_slot_pose_create() + self.init(ptr) + } + + public func set(pose: SlotPose) { + spine_slot_pose_set(wrappee, pose.wrappee) + } + + public func getColor() -> Color { + let result = spine_slot_pose_get_color(wrappee) + return Color(result) + } + + public func getDarkColor() -> Color { + let result = spine_slot_pose_get_dark_color(wrappee) + return Color(result) + } + + public func hasDarkColor() -> Bool { + return spine_slot_pose_has_dark_color(wrappee) != 0 + } + + public func setHasDarkColor(hasDarkColor: Bool) { + spine_slot_pose_set_has_dark_color(wrappee, hasDarkColor ? 1 : 0) + } + + public func getAttachment() -> Attachment { + let result = spine_slot_pose_get_attachment(wrappee) + return Attachment(result) + } + + public func setAttachment(attachment: Attachment) { + spine_slot_pose_set_attachment(wrappee, attachment.wrappee) + } + + public func getSequenceIndex() -> Int32 { + return spine_slot_pose_get_sequence_index(wrappee) + } + + public func setSequenceIndex(sequenceIndex: Int32) { + spine_slot_pose_set_sequence_index(wrappee, sequenceIndex) + } + + public func getDeform() -> ArrayFloat { + return spine_slot_pose_get_deform(wrappee) + } + + deinit { + spine_slot_pose_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/SlotTimeline.swift b/spine-ios/Sources/Spine/Generated/SlotTimeline.swift new file mode 100644 index 000000000..a93f7329c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/SlotTimeline.swift @@ -0,0 +1,73 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineSlotTimeline) +@objcMembers +public final class SlotTimeline { + internal let wrappee: spine_slot_timeline + + internal init(_ wrappee: spine_slot_timeline) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? SlotTimeline else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_slot_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func getSlotIndex() -> Int32 { + return spine_slot_timeline_get_slot_index(wrappee) + } + + public func setSlotIndex(inValue: Int32) { + spine_slot_timeline_set_slot_index(wrappee, inValue) + } + + public func rtti() -> Rtti { + let result = spine_slot_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_slot_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Spine.Generated.swift b/spine-ios/Sources/Spine/Generated/Spine.Generated.swift new file mode 100644 index 000000000..f61929030 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Spine.Generated.swift @@ -0,0 +1,29 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +// This file exports all generated types diff --git a/spine-ios/Sources/Spine/Generated/TextureRegion.swift b/spine-ios/Sources/Spine/Generated/TextureRegion.swift new file mode 100644 index 000000000..c9bef8a86 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TextureRegion.swift @@ -0,0 +1,118 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTextureRegion) +@objcMembers +public final class TextureRegion: NSObject { + internal let wrappee: spine_texture_region + + internal init(_ wrappee: spine_texture_region) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? TextureRegion else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_texture_region_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_texture_region_get_rtti(wrappee) + return Rtti(result) + } + + public func getU() -> Float { + return spine_texture_region_get_u(wrappee) + } + + public func setU(value: Float) { + spine_texture_region_set_u(wrappee, value) + } + + public func getV() -> Float { + return spine_texture_region_get_v(wrappee) + } + + public func setV(value: Float) { + spine_texture_region_set_v(wrappee, value) + } + + public func getU2() -> Float { + return spine_texture_region_get_u2(wrappee) + } + + public func setU2(value: Float) { + spine_texture_region_set_u2(wrappee, value) + } + + public func getV2() -> Float { + return spine_texture_region_get_v2(wrappee) + } + + public func setV2(value: Float) { + spine_texture_region_set_v2(wrappee, value) + } + + public func getRegionWidth() -> Int32 { + return spine_texture_region_get_region_width(wrappee) + } + + public func setRegionWidth(value: Int32) { + spine_texture_region_set_region_width(wrappee, value) + } + + public func getRegionHeight() -> Int32 { + return spine_texture_region_get_region_height(wrappee) + } + + public func setRegionHeight(value: Int32) { + spine_texture_region_set_region_height(wrappee, value) + } + + public func rtti() -> Rtti { + let result = spine_texture_region_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_texture_region_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Timeline.swift b/spine-ios/Sources/Spine/Generated/Timeline.swift new file mode 100644 index 000000000..c990e2487 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Timeline.swift @@ -0,0 +1,89 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTimeline) +@objcMembers +public final class Timeline: NSObject { + internal let wrappee: spine_timeline + + internal init(_ wrappee: spine_timeline) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Timeline else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getFrameEntries() -> size_t { + return spine_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ToProperty.swift b/spine-ios/Sources/Spine/Generated/ToProperty.swift new file mode 100644 index 000000000..ed302c6c3 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ToProperty.swift @@ -0,0 +1,97 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineToProperty) +@objcMembers +public final class ToProperty: NSObject { + internal let wrappee: spine_to_property + + internal init(_ wrappee: spine_to_property) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? ToProperty else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_to_property_get_rtti(wrappee) + return Rtti(result) + } + + public func mix(pose: TransformConstraintPose) -> Float { + return spine_to_property_mix(wrappee, pose.wrappee) + } + + public func apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: Float, local: Bool, additive: Bool) { + spine_to_property_apply(wrappee, skeleton.wrappee, pose.wrappee, bone.wrappee, value, local ? 1 : 0, additive ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_to_property_rtti(wrappee) + return Rtti(result) + } + + public func getOffset() -> Float { + return spine_to_property_get__offset(wrappee) + } + + public func setOffset(value: Float) { + spine_to_property_set__offset(wrappee, value) + } + + public func getMax() -> Float { + return spine_to_property_get__max(wrappee) + } + + public func setMax(value: Float) { + spine_to_property_set__max(wrappee, value) + } + + public func getScale() -> Float { + return spine_to_property_get__scale(wrappee) + } + + public func setScale(value: Float) { + spine_to_property_set__scale(wrappee, value) + } + + deinit { + spine_to_property_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ToRotate.swift b/spine-ios/Sources/Spine/Generated/ToRotate.swift new file mode 100644 index 000000000..b5cee5b53 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ToRotate.swift @@ -0,0 +1,67 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineToRotate) +@objcMembers +public final class ToRotate: ToProperty { + internal let wrappee: spine_to_rotate + + internal init(_ wrappee: spine_to_rotate) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_to_rotate_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_to_rotate_get_rtti(wrappee) + return Rtti(result) + } + + public func mix(pose: TransformConstraintPose) -> Float { + return spine_to_rotate_mix(wrappee, pose.wrappee) + } + + public func apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: Float, local: Bool, additive: Bool) { + spine_to_rotate_apply(wrappee, skeleton.wrappee, pose.wrappee, bone.wrappee, value, local ? 1 : 0, additive ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_to_rotate_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_to_rotate_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ToScaleX.swift b/spine-ios/Sources/Spine/Generated/ToScaleX.swift new file mode 100644 index 000000000..28e486fce --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ToScaleX.swift @@ -0,0 +1,67 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineToScaleX) +@objcMembers +public final class ToScaleX: ToProperty { + internal let wrappee: spine_to_scale_x + + internal init(_ wrappee: spine_to_scale_x) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_to_scale_x_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_to_scale_x_get_rtti(wrappee) + return Rtti(result) + } + + public func mix(pose: TransformConstraintPose) -> Float { + return spine_to_scale_x_mix(wrappee, pose.wrappee) + } + + public func apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: Float, local: Bool, additive: Bool) { + spine_to_scale_x_apply(wrappee, skeleton.wrappee, pose.wrappee, bone.wrappee, value, local ? 1 : 0, additive ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_to_scale_x_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_to_scale_x_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ToScaleY.swift b/spine-ios/Sources/Spine/Generated/ToScaleY.swift new file mode 100644 index 000000000..765ea42c5 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ToScaleY.swift @@ -0,0 +1,67 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineToScaleY) +@objcMembers +public final class ToScaleY: ToProperty { + internal let wrappee: spine_to_scale_y + + internal init(_ wrappee: spine_to_scale_y) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_to_scale_y_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_to_scale_y_get_rtti(wrappee) + return Rtti(result) + } + + public func mix(pose: TransformConstraintPose) -> Float { + return spine_to_scale_y_mix(wrappee, pose.wrappee) + } + + public func apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: Float, local: Bool, additive: Bool) { + spine_to_scale_y_apply(wrappee, skeleton.wrappee, pose.wrappee, bone.wrappee, value, local ? 1 : 0, additive ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_to_scale_y_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_to_scale_y_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ToShearY.swift b/spine-ios/Sources/Spine/Generated/ToShearY.swift new file mode 100644 index 000000000..884759eee --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ToShearY.swift @@ -0,0 +1,67 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineToShearY) +@objcMembers +public final class ToShearY: ToProperty { + internal let wrappee: spine_to_shear_y + + internal init(_ wrappee: spine_to_shear_y) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_to_shear_y_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_to_shear_y_get_rtti(wrappee) + return Rtti(result) + } + + public func mix(pose: TransformConstraintPose) -> Float { + return spine_to_shear_y_mix(wrappee, pose.wrappee) + } + + public func apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: Float, local: Bool, additive: Bool) { + spine_to_shear_y_apply(wrappee, skeleton.wrappee, pose.wrappee, bone.wrappee, value, local ? 1 : 0, additive ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_to_shear_y_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_to_shear_y_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ToX.swift b/spine-ios/Sources/Spine/Generated/ToX.swift new file mode 100644 index 000000000..08250b04c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ToX.swift @@ -0,0 +1,67 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineToX) +@objcMembers +public final class ToX: ToProperty { + internal let wrappee: spine_to_x + + internal init(_ wrappee: spine_to_x) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_to_x_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_to_x_get_rtti(wrappee) + return Rtti(result) + } + + public func mix(pose: TransformConstraintPose) -> Float { + return spine_to_x_mix(wrappee, pose.wrappee) + } + + public func apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: Float, local: Bool, additive: Bool) { + spine_to_x_apply(wrappee, skeleton.wrappee, pose.wrappee, bone.wrappee, value, local ? 1 : 0, additive ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_to_x_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_to_x_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/ToY.swift b/spine-ios/Sources/Spine/Generated/ToY.swift new file mode 100644 index 000000000..bcdad02d6 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/ToY.swift @@ -0,0 +1,67 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineToY) +@objcMembers +public final class ToY: ToProperty { + internal let wrappee: spine_to_y + + internal init(_ wrappee: spine_to_y) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init() { + let ptr = spine_to_y_create() + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_to_y_get_rtti(wrappee) + return Rtti(result) + } + + public func mix(pose: TransformConstraintPose) -> Float { + return spine_to_y_mix(wrappee, pose.wrappee) + } + + public func apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: Float, local: Bool, additive: Bool) { + spine_to_y_apply(wrappee, skeleton.wrappee, pose.wrappee, bone.wrappee, value, local ? 1 : 0, additive ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_to_y_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_to_y_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TrackEntry.swift b/spine-ios/Sources/Spine/Generated/TrackEntry.swift new file mode 100644 index 000000000..2afeec7f3 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TrackEntry.swift @@ -0,0 +1,290 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTrackEntry) +@objcMembers +public final class TrackEntry: NSObject { + internal let wrappee: spine_track_entry + + internal init(_ wrappee: spine_track_entry) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? TrackEntry else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_track_entry_create() + self.init(ptr) + } + + public func getTrackIndex() -> Int32 { + return spine_track_entry_get_track_index(wrappee) + } + + public func getAnimation() -> Animation { + let result = spine_track_entry_get_animation(wrappee) + return Animation(result) + } + + public func setAnimation(animation: Animation) { + spine_track_entry_set_animation(wrappee, animation.wrappee) + } + + public func getPrevious() -> TrackEntry { + let result = spine_track_entry_get_previous(wrappee) + return TrackEntry(result) + } + + public func getLoop() -> Bool { + return spine_track_entry_get_loop(wrappee) != 0 + } + + public func setLoop(inValue: Bool) { + spine_track_entry_set_loop(wrappee, inValue ? 1 : 0) + } + + public func getHoldPrevious() -> Bool { + return spine_track_entry_get_hold_previous(wrappee) != 0 + } + + public func setHoldPrevious(inValue: Bool) { + spine_track_entry_set_hold_previous(wrappee, inValue ? 1 : 0) + } + + public func getReverse() -> Bool { + return spine_track_entry_get_reverse(wrappee) != 0 + } + + public func setReverse(inValue: Bool) { + spine_track_entry_set_reverse(wrappee, inValue ? 1 : 0) + } + + public func getShortestRotation() -> Bool { + return spine_track_entry_get_shortest_rotation(wrappee) != 0 + } + + public func setShortestRotation(inValue: Bool) { + spine_track_entry_set_shortest_rotation(wrappee, inValue ? 1 : 0) + } + + public func getDelay() -> Float { + return spine_track_entry_get_delay(wrappee) + } + + public func setDelay(inValue: Float) { + spine_track_entry_set_delay(wrappee, inValue) + } + + public func getTrackTime() -> Float { + return spine_track_entry_get_track_time(wrappee) + } + + public func setTrackTime(inValue: Float) { + spine_track_entry_set_track_time(wrappee, inValue) + } + + public func getTrackEnd() -> Float { + return spine_track_entry_get_track_end(wrappee) + } + + public func setTrackEnd(inValue: Float) { + spine_track_entry_set_track_end(wrappee, inValue) + } + + public func getAnimationStart() -> Float { + return spine_track_entry_get_animation_start(wrappee) + } + + public func setAnimationStart(inValue: Float) { + spine_track_entry_set_animation_start(wrappee, inValue) + } + + public func getAnimationEnd() -> Float { + return spine_track_entry_get_animation_end(wrappee) + } + + public func setAnimationEnd(inValue: Float) { + spine_track_entry_set_animation_end(wrappee, inValue) + } + + public func getAnimationLast() -> Float { + return spine_track_entry_get_animation_last(wrappee) + } + + public func setAnimationLast(inValue: Float) { + spine_track_entry_set_animation_last(wrappee, inValue) + } + + public func getAnimationTime() -> Float { + return spine_track_entry_get_animation_time(wrappee) + } + + public func getTimeScale() -> Float { + return spine_track_entry_get_time_scale(wrappee) + } + + public func setTimeScale(inValue: Float) { + spine_track_entry_set_time_scale(wrappee, inValue) + } + + public func getAlpha() -> Float { + return spine_track_entry_get_alpha(wrappee) + } + + public func setAlpha(inValue: Float) { + spine_track_entry_set_alpha(wrappee, inValue) + } + + public func getEventThreshold() -> Float { + return spine_track_entry_get_event_threshold(wrappee) + } + + public func setEventThreshold(inValue: Float) { + spine_track_entry_set_event_threshold(wrappee, inValue) + } + + public func getMixAttachmentThreshold() -> Float { + return spine_track_entry_get_mix_attachment_threshold(wrappee) + } + + public func setMixAttachmentThreshold(inValue: Float) { + spine_track_entry_set_mix_attachment_threshold(wrappee, inValue) + } + + public func getAlphaAttachmentThreshold() -> Float { + return spine_track_entry_get_alpha_attachment_threshold(wrappee) + } + + public func setAlphaAttachmentThreshold(inValue: Float) { + spine_track_entry_set_alpha_attachment_threshold(wrappee, inValue) + } + + public func getMixDrawOrderThreshold() -> Float { + return spine_track_entry_get_mix_draw_order_threshold(wrappee) + } + + public func setMixDrawOrderThreshold(inValue: Float) { + spine_track_entry_set_mix_draw_order_threshold(wrappee, inValue) + } + + public func getNext() -> TrackEntry { + let result = spine_track_entry_get_next(wrappee) + return TrackEntry(result) + } + + public func isComplete() -> Bool { + return spine_track_entry_is_complete(wrappee) != 0 + } + + public func getMixTime() -> Float { + return spine_track_entry_get_mix_time(wrappee) + } + + public func setMixTime(inValue: Float) { + spine_track_entry_set_mix_time(wrappee, inValue) + } + + public func getMixDuration() -> Float { + return spine_track_entry_get_mix_duration(wrappee) + } + + public func setMixDuration(inValue: Float) { + spine_track_entry_set_mix_duration_1(wrappee, inValue) + } + + public func setMixDuration(mixDuration: Float, delay: Float) { + spine_track_entry_set_mix_duration_2(wrappee, mixDuration, delay) + } + + public func getMixBlend() -> MixBlend { + return spine_track_entry_get_mix_blend(wrappee) + } + + public func setMixBlend(blend: MixBlend) { + spine_track_entry_set_mix_blend(wrappee, blend) + } + + public func getMixingFrom() -> TrackEntry { + let result = spine_track_entry_get_mixing_from(wrappee) + return TrackEntry(result) + } + + public func getMixingTo() -> TrackEntry { + let result = spine_track_entry_get_mixing_to(wrappee) + return TrackEntry(result) + } + + public func resetRotationDirections() { + spine_track_entry_reset_rotation_directions(wrappee) + } + + public func getTrackComplete() -> Float { + return spine_track_entry_get_track_complete(wrappee) + } + + public func isEmptyAnimation() -> Bool { + return spine_track_entry_is_empty_animation(wrappee) != 0 + } + + public func wasApplied() -> Bool { + return spine_track_entry_was_applied(wrappee) != 0 + } + + public func isNextReady() -> Bool { + return spine_track_entry_is_next_ready(wrappee) != 0 + } + + public func getAnimationState() -> AnimationState { + let result = spine_track_entry_get_animation_state(wrappee) + return AnimationState(result) + } + + public func setAnimationState(state: AnimationState) { + spine_track_entry_set_animation_state(wrappee, state.wrappee) + } + + public func getRendererObject() -> OpaquePointer? { + return spine_track_entry_get_renderer_object(wrappee) + } + + deinit { + spine_track_entry_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TransformConstraint.swift b/spine-ios/Sources/Spine/Generated/TransformConstraint.swift new file mode 100644 index 000000000..da3d4f98c --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TransformConstraint.swift @@ -0,0 +1,124 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTransformConstraint) +@objcMembers +public final class TransformConstraint: PosedActive, Posed, Constraint { + internal let wrappee: spine_transform_constraint + + internal init(_ wrappee: spine_transform_constraint) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(data: TransformConstraintData, skeleton: Skeleton) { + let ptr = spine_transform_constraint_create(data.wrappee, skeleton.wrappee) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_transform_constraint_get_rtti(wrappee) + return Rtti(result) + } + + public func copy(skeleton: Skeleton) -> TransformConstraint { + let result = spine_transform_constraint_copy(wrappee, skeleton.wrappee) + return TransformConstraint(result) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_transform_constraint_update(wrappee, skeleton.wrappee, physics) + } + + public func sort(skeleton: Skeleton) { + spine_transform_constraint_sort(wrappee, skeleton.wrappee) + } + + public func isSourceActive() -> Bool { + return spine_transform_constraint_is_source_active(wrappee) != 0 + } + + public func getBones() -> ArrayBonePose { + return spine_transform_constraint_get_bones(wrappee) + } + + public func getSource() -> Bone { + let result = spine_transform_constraint_get_source(wrappee) + return Bone(result) + } + + public func setSource(source: Bone) { + spine_transform_constraint_set_source(wrappee, source.wrappee) + } + + public func getData() -> TransformConstraintData { + let result = spine_transform_constraint_get_data(wrappee) + return TransformConstraintData(result) + } + + public func getPose() -> TransformConstraintPose { + let result = spine_transform_constraint_get_pose(wrappee) + return TransformConstraintPose(result) + } + + public func getAppliedPose() -> TransformConstraintPose { + let result = spine_transform_constraint_get_applied_pose(wrappee) + return TransformConstraintPose(result) + } + + public func resetConstrained() { + spine_transform_constraint_reset_constrained(wrappee) + } + + public func constrained() { + spine_transform_constraint_constrained(wrappee) + } + + public func isPoseEqualToApplied() -> Bool { + return spine_transform_constraint_is_pose_equal_to_applied(wrappee) != 0 + } + + public func isActive() -> Bool { + return spine_transform_constraint_is_active(wrappee) != 0 + } + + public func setActive(active: Bool) { + spine_transform_constraint_set_active(wrappee, active ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_transform_constraint_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_transform_constraint_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TransformConstraintData.swift b/spine-ios/Sources/Spine/Generated/TransformConstraintData.swift new file mode 100644 index 000000000..9b5e462b0 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TransformConstraintData.swift @@ -0,0 +1,179 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTransformConstraintData) +@objcMembers +public final class TransformConstraintData: PosedData, ConstraintData { + internal let wrappee: spine_transform_constraint_data + + internal init(_ wrappee: spine_transform_constraint_data) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(name: String?) { + let ptr = spine_transform_constraint_data_create(name) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_transform_constraint_data_get_rtti(wrappee) + return Rtti(result) + } + + public func createMethod(skeleton: Skeleton) -> Constraint { + let result = spine_transform_constraint_data_create_method(wrappee, skeleton.wrappee) + return Constraint(result) + } + + public func getBones() -> ArrayBoneData { + return spine_transform_constraint_data_get_bones(wrappee) + } + + public func getSource() -> BoneData { + let result = spine_transform_constraint_data_get_source(wrappee) + return BoneData(result) + } + + public func setSource(source: BoneData) { + spine_transform_constraint_data_set_source(wrappee, source.wrappee) + } + + public func getOffsetRotation() -> Float { + return spine_transform_constraint_data_get_offset_rotation(wrappee) + } + + public func setOffsetRotation(offsetRotation: Float) { + spine_transform_constraint_data_set_offset_rotation(wrappee, offsetRotation) + } + + public func getOffsetX() -> Float { + return spine_transform_constraint_data_get_offset_x(wrappee) + } + + public func setOffsetX(offsetX: Float) { + spine_transform_constraint_data_set_offset_x(wrappee, offsetX) + } + + public func getOffsetY() -> Float { + return spine_transform_constraint_data_get_offset_y(wrappee) + } + + public func setOffsetY(offsetY: Float) { + spine_transform_constraint_data_set_offset_y(wrappee, offsetY) + } + + public func getOffsetScaleX() -> Float { + return spine_transform_constraint_data_get_offset_scale_x(wrappee) + } + + public func setOffsetScaleX(offsetScaleX: Float) { + spine_transform_constraint_data_set_offset_scale_x(wrappee, offsetScaleX) + } + + public func getOffsetScaleY() -> Float { + return spine_transform_constraint_data_get_offset_scale_y(wrappee) + } + + public func setOffsetScaleY(offsetScaleY: Float) { + spine_transform_constraint_data_set_offset_scale_y(wrappee, offsetScaleY) + } + + public func getOffsetShearY() -> Float { + return spine_transform_constraint_data_get_offset_shear_y(wrappee) + } + + public func setOffsetShearY(offsetShearY: Float) { + spine_transform_constraint_data_set_offset_shear_y(wrappee, offsetShearY) + } + + public func getLocalSource() -> Bool { + return spine_transform_constraint_data_get_local_source(wrappee) != 0 + } + + public func setLocalSource(localSource: Bool) { + spine_transform_constraint_data_set_local_source(wrappee, localSource ? 1 : 0) + } + + public func getLocalTarget() -> Bool { + return spine_transform_constraint_data_get_local_target(wrappee) != 0 + } + + public func setLocalTarget(localTarget: Bool) { + spine_transform_constraint_data_set_local_target(wrappee, localTarget ? 1 : 0) + } + + public func getAdditive() -> Bool { + return spine_transform_constraint_data_get_additive(wrappee) != 0 + } + + public func setAdditive(additive: Bool) { + spine_transform_constraint_data_set_additive(wrappee, additive ? 1 : 0) + } + + public func getClamp() -> Bool { + return spine_transform_constraint_data_get_clamp(wrappee) != 0 + } + + public func setClamp(clamp: Bool) { + spine_transform_constraint_data_set_clamp(wrappee, clamp ? 1 : 0) + } + + public func getProperties() -> ArrayFromProperty { + return spine_transform_constraint_data_get_properties(wrappee) + } + + public func getName() -> String? { + let result = spine_transform_constraint_data_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func getSkinRequired() -> Bool { + return spine_transform_constraint_data_get_skin_required(wrappee) != 0 + } + + public func getSetupPose() -> TransformConstraintPose { + let result = spine_transform_constraint_data_get_setup_pose(wrappee) + return TransformConstraintPose(result) + } + + public func setSkinRequired(skinRequired: Bool) { + spine_transform_constraint_data_set_skin_required(wrappee, skinRequired ? 1 : 0) + } + + public func rtti() -> Rtti { + let result = spine_transform_constraint_data_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_transform_constraint_data_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TransformConstraintPose.swift b/spine-ios/Sources/Spine/Generated/TransformConstraintPose.swift new file mode 100644 index 000000000..b406c4bce --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TransformConstraintPose.swift @@ -0,0 +1,112 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTransformConstraintPose) +@objcMembers +public final class TransformConstraintPose: NSObject { + internal let wrappee: spine_transform_constraint_pose + + internal init(_ wrappee: spine_transform_constraint_pose) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? TransformConstraintPose else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public convenience init() { + let ptr = spine_transform_constraint_pose_create() + self.init(ptr) + } + + public func set(pose: TransformConstraintPose) { + spine_transform_constraint_pose_set(wrappee, pose.wrappee) + } + + public func getMixRotate() -> Float { + return spine_transform_constraint_pose_get_mix_rotate(wrappee) + } + + public func setMixRotate(mixRotate: Float) { + spine_transform_constraint_pose_set_mix_rotate(wrappee, mixRotate) + } + + public func getMixX() -> Float { + return spine_transform_constraint_pose_get_mix_x(wrappee) + } + + public func setMixX(mixX: Float) { + spine_transform_constraint_pose_set_mix_x(wrappee, mixX) + } + + public func getMixY() -> Float { + return spine_transform_constraint_pose_get_mix_y(wrappee) + } + + public func setMixY(mixY: Float) { + spine_transform_constraint_pose_set_mix_y(wrappee, mixY) + } + + public func getMixScaleX() -> Float { + return spine_transform_constraint_pose_get_mix_scale_x(wrappee) + } + + public func setMixScaleX(mixScaleX: Float) { + spine_transform_constraint_pose_set_mix_scale_x(wrappee, mixScaleX) + } + + public func getMixScaleY() -> Float { + return spine_transform_constraint_pose_get_mix_scale_y(wrappee) + } + + public func setMixScaleY(mixScaleY: Float) { + spine_transform_constraint_pose_set_mix_scale_y(wrappee, mixScaleY) + } + + public func getMixShearY() -> Float { + return spine_transform_constraint_pose_get_mix_shear_y(wrappee) + } + + public func setMixShearY(mixShearY: Float) { + spine_transform_constraint_pose_set_mix_shear_y(wrappee, mixShearY) + } + + deinit { + spine_transform_constraint_pose_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TransformConstraintTimeline.swift b/spine-ios/Sources/Spine/Generated/TransformConstraintTimeline.swift new file mode 100644 index 000000000..e4f2d2f40 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TransformConstraintTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTransformConstraintTimeline) +@objcMembers +public final class TransformConstraintTimeline: CurveTimeline, ConstraintTimeline { + internal let wrappee: spine_transform_constraint_timeline + + internal init(_ wrappee: spine_transform_constraint_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, transformConstraintIndex: Int32) { + let ptr = spine_transform_constraint_timeline_create(frameCount, bezierCount, transformConstraintIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_transform_constraint_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_transform_constraint_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func setFrame(frame: Int32, time: Float, mixRotate: Float, mixX: Float, mixY: Float, mixScaleX: Float, mixScaleY: Float, mixShearY: Float) { + spine_transform_constraint_timeline_set_frame(wrappee, frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) + } + + public func getConstraintIndex() -> Int32 { + return spine_transform_constraint_timeline_get_constraint_index(wrappee) + } + + public func setConstraintIndex(inValue: Int32) { + spine_transform_constraint_timeline_set_constraint_index(wrappee, inValue) + } + + public func setLinear(frame: size_t) { + spine_transform_constraint_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_transform_constraint_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_transform_constraint_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_transform_constraint_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_transform_constraint_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_transform_constraint_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_transform_constraint_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_transform_constraint_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_transform_constraint_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_transform_constraint_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_transform_constraint_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_transform_constraint_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TranslateTimeline.swift b/spine-ios/Sources/Spine/Generated/TranslateTimeline.swift new file mode 100644 index 000000000..4ed37799f --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TranslateTimeline.swift @@ -0,0 +1,115 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTranslateTimeline) +@objcMembers +public final class TranslateTimeline: BoneTimeline2 { + internal let wrappee: spine_translate_timeline + + internal init(_ wrappee: spine_translate_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_translate_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_translate_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_translate_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_translate_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_translate_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value1: Float, value2: Float) { + spine_translate_timeline_set_frame(wrappee, frame, time, value1, value2) + } + + public func setLinear(frame: size_t) { + spine_translate_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_translate_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_translate_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_translate_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_translate_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_translate_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_translate_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_translate_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_translate_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_translate_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_translate_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_translate_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TranslateXTimeline.swift b/spine-ios/Sources/Spine/Generated/TranslateXTimeline.swift new file mode 100644 index 000000000..c6a7ae2fc --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TranslateXTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTranslateXTimeline) +@objcMembers +public final class TranslateXTimeline: BoneTimeline1 { + internal let wrappee: spine_translate_x_timeline + + internal init(_ wrappee: spine_translate_x_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_translate_x_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_translate_x_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_translate_x_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_translate_x_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_translate_x_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_translate_x_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_translate_x_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_translate_x_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_translate_x_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_translate_x_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_translate_x_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_translate_x_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_translate_x_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_translate_x_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_translate_x_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_translate_x_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_translate_x_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_translate_x_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_translate_x_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_translate_x_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_translate_x_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_translate_x_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_translate_x_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/TranslateYTimeline.swift b/spine-ios/Sources/Spine/Generated/TranslateYTimeline.swift new file mode 100644 index 000000000..c218d61a2 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/TranslateYTimeline.swift @@ -0,0 +1,135 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineTranslateYTimeline) +@objcMembers +public final class TranslateYTimeline: BoneTimeline1 { + internal let wrappee: spine_translate_y_timeline + + internal init(_ wrappee: spine_translate_y_timeline) { + self.wrappee = wrappee + super.init(wrappee) + } + + public convenience init(frameCount: size_t, bezierCount: size_t, boneIndex: Int32) { + let ptr = spine_translate_y_timeline_create(frameCount, bezierCount, boneIndex) + self.init(ptr) + } + + public func getRtti() -> Rtti { + let result = spine_translate_y_timeline_get_rtti(wrappee) + return Rtti(result) + } + + public func apply(skeleton: Skeleton, lastTime: Float, time: Float, events: ArrayEvent, alpha: Float, blend: MixBlend, direction: MixDirection, appliedPose: Bool) { + spine_translate_y_timeline_apply(wrappee, skeleton.wrappee, lastTime, time, events, alpha, blend, direction, appliedPose ? 1 : 0) + } + + public func getBoneIndex() -> Int32 { + return spine_translate_y_timeline_get_bone_index(wrappee) + } + + public func setBoneIndex(inValue: Int32) { + spine_translate_y_timeline_set_bone_index(wrappee, inValue) + } + + public func setFrame(frame: size_t, time: Float, value: Float) { + spine_translate_y_timeline_set_frame(wrappee, frame, time, value) + } + + public func getCurveValue(time: Float) -> Float { + return spine_translate_y_timeline_get_curve_value(wrappee, time) + } + + public func getRelativeValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_translate_y_timeline_get_relative_value(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float) -> Float { + return spine_translate_y_timeline_get_absolute_value_1(wrappee, time, alpha, blend, current, setup) + } + + public func getAbsoluteValue(time: Float, alpha: Float, blend: MixBlend, current: Float, setup: Float, value: Float) -> Float { + return spine_translate_y_timeline_get_absolute_value_2(wrappee, time, alpha, blend, current, setup, value) + } + + public func getScaleValue(time: Float, alpha: Float, blend: MixBlend, direction: MixDirection, current: Float, setup: Float) -> Float { + return spine_translate_y_timeline_get_scale_value(wrappee, time, alpha, blend, direction, current, setup) + } + + public func setLinear(frame: size_t) { + spine_translate_y_timeline_set_linear(wrappee, frame) + } + + public func setStepped(frame: size_t) { + spine_translate_y_timeline_set_stepped(wrappee, frame) + } + + public func setBezier(bezier: size_t, frame: size_t, value: Float, time1: Float, value1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, time2: Float, value2: Float) { + spine_translate_y_timeline_set_bezier(wrappee, bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) + } + + public func getBezierValue(time: Float, frame: size_t, valueOffset: size_t, i: size_t) -> Float { + return spine_translate_y_timeline_get_bezier_value(wrappee, time, frame, valueOffset, i) + } + + public func getCurves() -> ArrayFloat { + return spine_translate_y_timeline_get_curves(wrappee) + } + + public func getFrameEntries() -> size_t { + return spine_translate_y_timeline_get_frame_entries(wrappee) + } + + public func getFrameCount() -> size_t { + return spine_translate_y_timeline_get_frame_count(wrappee) + } + + public func getFrames() -> ArrayFloat { + return spine_translate_y_timeline_get_frames(wrappee) + } + + public func getDuration() -> Float { + return spine_translate_y_timeline_get_duration(wrappee) + } + + public func getPropertyIds() -> ArrayPropertyId { + return spine_translate_y_timeline_get_property_ids(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_translate_y_timeline_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_translate_y_timeline_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/Update.swift b/spine-ios/Sources/Spine/Generated/Update.swift new file mode 100644 index 000000000..c93347bb3 --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/Update.swift @@ -0,0 +1,69 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineUpdate) +@objcMembers +public final class Update { + internal let wrappee: spine_update + + internal init(_ wrappee: spine_update) { + self.wrappee = wrappee + super.init() + } + + public override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? Update else { return false } + return self.wrappee == other.wrappee + } + + public override var hash: Int { + var hasher = Hasher() + hasher.combine(self.wrappee) + return hasher.finalize() + } + + public func getRtti() -> Rtti { + let result = spine_update_get_rtti(wrappee) + return Rtti(result) + } + + public func update(skeleton: Skeleton, physics: Physics) { + spine_update_update(wrappee, skeleton.wrappee, physics) + } + + public func rtti() -> Rtti { + let result = spine_update_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_update_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/Sources/Spine/Generated/VertexAttachment.swift b/spine-ios/Sources/Spine/Generated/VertexAttachment.swift new file mode 100644 index 000000000..ef1efb19e --- /dev/null +++ b/spine-ios/Sources/Spine/Generated/VertexAttachment.swift @@ -0,0 +1,125 @@ +// Spine Runtimes License Agreement +// Last updated April 5, 2025. Replaces all prior versions. +// +// Copyright (c) 2013-2025, Esoteric Software LLC +// +// Integration of the Spine Runtimes into software or otherwise creating +// derivative works of the Spine Runtimes is permitted under the terms and +// conditions of Section 2 of the Spine Editor License Agreement: +// http://esotericsoftware.com/spine-editor-license +// +// Otherwise, it is permitted to integrate the Spine Runtimes into software +// or otherwise create derivative works of the Spine Runtimes (collectively, +// "Products"), provided that each user of the Products must obtain their own +// Spine Editor license and redistribution of the Products in any form must +// include this license and copyright notice. +// +// THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, +// BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +// THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +import Foundation + +@objc(SpineVertexAttachment) +@objcMembers +public final class VertexAttachment: Attachment { + internal let wrappee: spine_vertex_attachment + + internal init(_ wrappee: spine_vertex_attachment) { + self.wrappee = wrappee + super.init(wrappee) + } + + public func getRtti() -> Rtti { + let result = spine_vertex_attachment_get_rtti(wrappee) + return Rtti(result) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: UnsafeMutablePointer?, offset: size_t, stride: size_t) { + spine_vertex_attachment_compute_world_vertices_1(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func computeWorldVertices(skeleton: Skeleton, slot: Slot, start: size_t, count: size_t, worldVertices: ArrayFloat, offset: size_t, stride: size_t) { + spine_vertex_attachment_compute_world_vertices_2(wrappee, skeleton.wrappee, slot.wrappee, start, count, worldVertices, offset, stride) + } + + public func getId() -> Int32 { + return spine_vertex_attachment_get_id(wrappee) + } + + public func getBones() -> ArrayInt { + return spine_vertex_attachment_get_bones(wrappee) + } + + public func setBones(bones: ArrayInt) { + spine_vertex_attachment_set_bones(wrappee, bones) + } + + public func getVertices() -> ArrayFloat { + return spine_vertex_attachment_get_vertices(wrappee) + } + + public func setVertices(vertices: ArrayFloat) { + spine_vertex_attachment_set_vertices(wrappee, vertices) + } + + public func getWorldVerticesLength() -> size_t { + return spine_vertex_attachment_get_world_vertices_length(wrappee) + } + + public func setWorldVerticesLength(inValue: size_t) { + spine_vertex_attachment_set_world_vertices_length(wrappee, inValue) + } + + public func getTimelineAttachment() -> Attachment { + let result = spine_vertex_attachment_get_timeline_attachment(wrappee) + return Attachment(result) + } + + public func setTimelineAttachment(attachment: Attachment) { + spine_vertex_attachment_set_timeline_attachment(wrappee, attachment.wrappee) + } + + public func copyTo(other: VertexAttachment) { + spine_vertex_attachment_copy_to(wrappee, other.wrappee) + } + + public func getName() -> String? { + let result = spine_vertex_attachment_get_name(wrappee) + return result != nil ? String(cString: result!) : nil + } + + public func copy() -> Attachment { + let result = spine_vertex_attachment_copy(wrappee) + return Attachment(result) + } + + public func getRefCount() -> Int32 { + return spine_vertex_attachment_get_ref_count(wrappee) + } + + public func reference() { + spine_vertex_attachment_reference(wrappee) + } + + public func dereference() { + spine_vertex_attachment_dereference(wrappee) + } + + public func rtti() -> Rtti { + let result = spine_vertex_attachment_rtti(wrappee) + return Rtti(result) + } + + deinit { + spine_vertex_attachment_dispose(wrappee) + } +} \ No newline at end of file diff --git a/spine-ios/codegen/package-lock.json b/spine-ios/codegen/package-lock.json index 48a3fb1a7..bee2a9a26 100644 --- a/spine-ios/codegen/package-lock.json +++ b/spine-ios/codegen/package-lock.json @@ -1,18 +1,19 @@ { "name": "spine-ios-codegen", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "spine-ios-codegen", + "version": "1.0.0", "dependencies": { "spine-c-codegen": "file:../../spine-c/codegen" }, "devDependencies": { - "@biomejs/biome": "^2.1.1", "@types/node": "^20.0.0", "tsx": "^4.0.0", - "typescript-formatter": "^7.2.2" + "typescript": "^5.0.0" } }, "../../spine-c/codegen": { @@ -24,169 +25,6 @@ "typescript-formatter": "^7.2.2" } }, - "node_modules/@biomejs/biome": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.1.3.tgz", - "integrity": "sha512-KE/tegvJIxTkl7gJbGWSgun7G6X/n2M6C35COT6ctYrAy7SiPyNvi6JtoQERVK/VRbttZfgGq96j2bFmhmnH4w==", - "dev": true, - "license": "MIT OR Apache-2.0", - "bin": { - "biome": "bin/biome" - }, - "engines": { - "node": ">=14.21.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/biome" - }, - "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.1.3", - "@biomejs/cli-darwin-x64": "2.1.3", - "@biomejs/cli-linux-arm64": "2.1.3", - "@biomejs/cli-linux-arm64-musl": "2.1.3", - "@biomejs/cli-linux-x64": "2.1.3", - "@biomejs/cli-linux-x64-musl": "2.1.3", - "@biomejs/cli-win32-arm64": "2.1.3", - "@biomejs/cli-win32-x64": "2.1.3" - } - }, - "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.1.3.tgz", - "integrity": "sha512-LFLkSWRoSGS1wVUD/BE6Nlt2dSn0ulH3XImzg2O/36BoToJHKXjSxzPEMAqT9QvwVtk7/9AQhZpTneERU9qaXA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.1.3.tgz", - "integrity": "sha512-Q/4OTw8P9No9QeowyxswcWdm0n2MsdCwWcc5NcKQQvzwPjwuPdf8dpPPf4r+x0RWKBtl1FLiAUtJvBlri6DnYw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.1.3.tgz", - "integrity": "sha512-2hS6LgylRqMFmAZCOFwYrf77QMdUwJp49oe8PX/O8+P2yKZMSpyQTf3Eo5ewnsMFUEmYbPOskafdV1ds1MZMJA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.3.tgz", - "integrity": "sha512-KXouFSBnoxAWZYDQrnNRzZBbt5s9UJkIm40hdvSL9mBxSSoxRFQJbtg1hP3aa8A2SnXyQHxQfpiVeJlczZt76w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-x64": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.1.3.tgz", - "integrity": "sha512-NxlSCBhLvQtWGagEztfAZ4WcE1AkMTntZV65ZvR+J9jp06+EtOYEBPQndA70ZGhHbEDG57bR6uNvqkd1WrEYVA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.3.tgz", - "integrity": "sha512-KaLAxnROouzIWtl6a0Y88r/4hW5oDUJTIqQorOTVQITaKQsKjZX4XCUmHIhdEk8zMnaiLZzRTAwk1yIAl+mIew==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.1.3.tgz", - "integrity": "sha512-V9CUZCtWH4u0YwyCYbQ3W5F4ZGPWp2C2TYcsiWFNNyRfmOW1j/TY/jAurl33SaRjgZPO5UUhGyr9m6BN9t84NQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.21.3" - } - }, - "node_modules/@biomejs/cli-win32-x64": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.1.3.tgz", - "integrity": "sha512-dxy599q6lgp8ANPpR8sDMscwdp9oOumEsVXuVCVT9N2vAho8uYXlCz53JhxX6LtJOXaE73qzgkGQ7QqvFlMC0g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT OR Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.21.3" - } - }, "node_modules/@esbuild/darwin-arm64": { "version": "0.25.8", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz", @@ -214,36 +52,6 @@ "undici-types": "~6.21.0" } }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/commandpost": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/commandpost/-/commandpost-1.4.0.tgz", - "integrity": "sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/editorconfig": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", - "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^2.19.0", - "lru-cache": "^4.1.5", - "semver": "^5.6.0", - "sigmund": "^1.0.1" - }, - "bin": { - "editorconfig": "bin/editorconfig" - } - }, "node_modules/esbuild": { "version": "0.25.8", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz", @@ -299,24 +107,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "license": "ISC", - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true, - "license": "ISC" - }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", @@ -327,23 +117,6 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", - "dev": true, - "license": "ISC" - }, "node_modules/spine-c-codegen": { "resolved": "../../spine-c/codegen", "link": true @@ -374,7 +147,6 @@ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -383,39 +155,12 @@ "node": ">=14.17" } }, - "node_modules/typescript-formatter": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/typescript-formatter/-/typescript-formatter-7.2.2.tgz", - "integrity": "sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "commandpost": "^1.0.0", - "editorconfig": "^0.15.0" - }, - "bin": { - "tsfmt": "bin/tsfmt" - }, - "engines": { - "node": ">= 4.2.0" - }, - "peerDependencies": { - "typescript": "^2.1.6 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev" - } - }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true, - "license": "ISC" } } } diff --git a/spine-ios/codegen/package.json b/spine-ios/codegen/package.json index 797b64a93..9573cb142 100644 --- a/spine-ios/codegen/package.json +++ b/spine-ios/codegen/package.json @@ -1,18 +1,18 @@ { "name": "spine-ios-codegen", + "version": "1.0.0", + "description": "Swift bindings generator for Spine", "type": "module", + "main": "src/index.ts", "scripts": { - "format": "npx -y typescript-formatter -r **/*.ts", - "generate": "npx tsx src/index.ts", - "check": "npx biome check src && npx tsc --noEmit" + "generate": "tsx src/index.ts" }, "dependencies": { "spine-c-codegen": "file:../../spine-c/codegen" }, "devDependencies": { "@types/node": "^20.0.0", - "tsx": "^4.0.0", - "typescript-formatter": "^7.2.2", - "@biomejs/biome": "^2.1.1" + "typescript": "^5.0.0", + "tsx": "^4.0.0" } } \ No newline at end of file diff --git a/spine-ios/codegen/src/index.ts b/spine-ios/codegen/src/index.ts index 323c98aa1..3dc6133d6 100644 --- a/spine-ios/codegen/src/index.ts +++ b/spine-ios/codegen/src/index.ts @@ -1,11 +1,44 @@ #!/usr/bin/env node import * as path from 'node:path'; +import * as fs from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; +import { generate } from '../../../spine-c/codegen/src/index.js'; +import { SwiftWriter } from './swift-writer.js'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); async function main() { + console.log('Generating Swift bindings from spine-c...'); + // Get the C intermediate representation from spine-c-codegen + const { cTypes, cEnums, cArrayTypes, inheritance, supertypes, subtypes, isInterface } = await generate(); + + // Create the Swift writer + const writer = new SwiftWriter( + cTypes, + cEnums, + cArrayTypes, + inheritance, + isInterface, + supertypes, + subtypes + ); + + // Prepare output directory + const outputDir = path.join(__dirname, '..', '..', 'Sources', 'Spine', 'Generated'); + await fs.mkdir(outputDir, { recursive: true }); + + // Read license header + const licenseHeaderPath = path.join(__dirname, '..', '..', '..', 'LICENSE'); + const licenseHeader = await fs.readFile(licenseHeaderPath, 'utf-8'); + + // Generate Swift code + await writer.generate({ + outputDir, + licenseHeader + }); + + console.log('Swift bindings generation complete!'); } main().catch(error => { diff --git a/spine-ios/codegen/src/swift-writer.ts b/spine-ios/codegen/src/swift-writer.ts new file mode 100644 index 000000000..50a4a50dd --- /dev/null +++ b/spine-ios/codegen/src/swift-writer.ts @@ -0,0 +1,635 @@ +import { CClassOrStruct, CEnum, CArrayType, InheritanceInfo, CMethod, CParameter } from '../../../spine-c/codegen/src/c-types.js'; +import * as fs from 'node:fs/promises'; +import * as path from 'node:path'; + +export interface SwiftGenerationOptions { + outputDir: string; + licenseHeader: string; +} + +interface SwiftClass { + name: string; + cType: CClassOrStruct; + isAbstract: boolean; + isInterface: boolean; + parentClass?: string; + protocols: string[]; + methods: SwiftMethod[]; + properties: SwiftProperty[]; + constructors: SwiftConstructor[]; +} + +interface SwiftMethod { + name: string; + cMethod: CMethod; + parameters: SwiftParameter[]; + returnType: string; + isStatic: boolean; + implementation: string; +} + +interface SwiftParameter { + name: string; + type: string; + cParam: CParameter; +} + +interface SwiftProperty { + name: string; + type: string; + isReadOnly: boolean; + getter?: SwiftMethod; + setter?: SwiftMethod; +} + +interface SwiftConstructor { + parameters: SwiftParameter[]; + implementation: string; +} + +export class SwiftWriter { + private cTypes: CClassOrStruct[]; + private cEnums: CEnum[]; + private cArrayTypes: CArrayType[]; + private inheritance: Map; + private isInterface: Map; + private supertypes: Map>; + private subtypes: Map>; + private swiftClasses: Map = new Map(); + + constructor( + cTypes: CClassOrStruct[], + cEnums: CEnum[], + cArrayTypes: CArrayType[], + inheritance: any, + isInterface: any, + supertypes: any, + subtypes: any + ) { + this.cTypes = cTypes; + this.cEnums = cEnums; + this.cArrayTypes = cArrayTypes; + this.inheritance = new Map(Object.entries(inheritance || {})); + this.isInterface = new Map(Object.entries(isInterface || {})); + this.supertypes = new Map(Object.entries(supertypes || {}).map(([k, v]) => [k, new Set(v as string[])])); + this.subtypes = new Map(Object.entries(subtypes || {}).map(([k, v]) => [k, new Set(v as string[])])); + } + + async generate(options: SwiftGenerationOptions): Promise { + console.log('Generating Swift bindings...'); + + // Process all C types to create Swift class models + for (const cType of this.cTypes) { + this.processType(cType); + } + + // Generate individual Swift files for each type + for (const [typeName, swiftClass] of this.swiftClasses) { + await this.generateClassFile(swiftClass, options); + } + + // Generate enum file + await this.generateEnumsFile(options); + + // Generate arrays file + await this.generateArraysFile(options); + + // Generate main exports file + await this.generateExportsFile(options); + + console.log('Swift bindings generation complete!'); + } + + private processType(cType: CClassOrStruct): void { + const swiftName = this.getSwiftClassName(cType.name); + const inheritanceInfo = this.inheritance.get(cType.name); + const isAbstract = cType.cppType?.abstract || false; + const isInterface = this.isInterface.get(cType.name) || false; + + const swiftClass: SwiftClass = { + name: swiftName, + cType: cType, + isAbstract, + isInterface, + parentClass: inheritanceInfo?.extends ? this.getSwiftClassName(inheritanceInfo.extends) : undefined, + protocols: inheritanceInfo?.mixins?.map(m => this.getSwiftClassName(m)) || [], + methods: [], + properties: [], + constructors: [] + }; + + // Process constructors + for (const ctor of cType.constructors) { + swiftClass.constructors.push(this.processConstructor(ctor, cType)); + } + + // Process methods and detect properties + const getterSetterMap = new Map(); + + for (const method of cType.methods) { + // Check if it's a getter/setter pattern + const getterMatch = method.name.match(/^get(.+)$/); + const setterMatch = method.name.match(/^set(.+)$/); + + if (getterMatch && method.parameters.length === 0) { + const propName = this.lowercaseFirst(getterMatch[1]); + const prop = getterSetterMap.get(propName) || {}; + prop.getter = method; + getterSetterMap.set(propName, prop); + } else if (setterMatch && method.parameters.length === 1) { + const propName = this.lowercaseFirst(setterMatch[1]); + const prop = getterSetterMap.get(propName) || {}; + prop.setter = method; + getterSetterMap.set(propName, prop); + } else { + // Regular method + swiftClass.methods.push(this.processMethod(method, cType)); + } + } + + // Create properties from getter/setter pairs + for (const [propName, { getter, setter }] of getterSetterMap) { + if (getter) { + swiftClass.properties.push({ + name: propName, + type: this.mapReturnType(getter.returnType, getter.returnTypeNullable), + isReadOnly: !setter, + getter: getter ? this.processMethod(getter, cType) : undefined, + setter: setter ? this.processMethod(setter, cType) : undefined + }); + } + } + + this.swiftClasses.set(cType.name, swiftClass); + } + + private processConstructor(ctor: any, cType: CClassOrStruct): SwiftConstructor { + const params = (ctor.parameters || []).map((p: CParameter) => this.processParameter(p)); + return { + parameters: params, + implementation: this.generateConstructorImplementation(ctor, cType) + }; + } + + private processMethod(method: CMethod, cType: CClassOrStruct): SwiftMethod { + // Filter out 'self' parameter which is always the first one for instance methods + const params = method.parameters.filter(p => p.name !== 'self').map(p => this.processParameter(p)); + return { + name: this.getSwiftMethodName(method.name, cType.name), + cMethod: method, + parameters: params, + returnType: this.mapReturnType(method.returnType, method.returnTypeNullable), + isStatic: method.isStatic || false, + implementation: this.generateMethodImplementation(method, cType) + }; + } + + private processParameter(param: CParameter): SwiftParameter { + return { + name: this.sanitizeParameterName(param.name), + type: this.mapParameterType(param.cType, param.isNullable), + cParam: param + }; + } + + private generateConstructorImplementation(ctor: any, cType: CClassOrStruct): string { + // TODO: Generate actual implementation + return ''; + } + + private generateMethodImplementation(method: CMethod, cType: CClassOrStruct): string { + // TODO: Generate actual implementation + return ''; + } + + private async generateClassFile(swiftClass: SwiftClass, options: SwiftGenerationOptions): Promise { + const filePath = path.join(options.outputDir, `${swiftClass.name}.swift`); + const content = this.generateClassContent(swiftClass, options); + await fs.writeFile(filePath, content, 'utf-8'); + } + + private generateClassContent(swiftClass: SwiftClass, options: SwiftGenerationOptions): string { + const lines: string[] = []; + + // Add license header as comment + lines.push(...options.licenseHeader.split('\n').map(line => `// ${line}`)); + lines.push(''); + + // Imports + lines.push('import Foundation'); + lines.push(''); + + // Class declaration + const inheritance = this.buildInheritanceDeclaration(swiftClass); + lines.push(`@objc(Spine${swiftClass.name})`); + lines.push(`@objcMembers`); + lines.push(`public ${swiftClass.isAbstract ? 'class' : 'final class'} ${swiftClass.name}${inheritance} {`); + + // Internal wrapper property + lines.push(` internal let wrappee: ${swiftClass.cType.name}`); + lines.push(''); + + // Internal init + lines.push(` internal init(_ wrappee: ${swiftClass.cType.name}) {`); + lines.push(' self.wrappee = wrappee'); + if (swiftClass.parentClass && !swiftClass.isInterface) { + lines.push(' super.init(wrappee)'); + } else { + lines.push(' super.init()'); + } + lines.push(' }'); + lines.push(''); + + // isEqual and hash + if (!swiftClass.parentClass || swiftClass.parentClass === 'NSObject') { + lines.push(' public override func isEqual(_ object: Any?) -> Bool {'); + lines.push(` guard let other = object as? ${swiftClass.name} else { return false }`); + lines.push(' return self.wrappee == other.wrappee'); + lines.push(' }'); + lines.push(''); + lines.push(' public override var hash: Int {'); + lines.push(' var hasher = Hasher()'); + lines.push(' hasher.combine(self.wrappee)'); + lines.push(' return hasher.finalize()'); + lines.push(' }'); + lines.push(''); + } + + // Add public constructors + if (!swiftClass.isAbstract && swiftClass.constructors.length > 0) { + for (const ctor of swiftClass.constructors) { + lines.push(...this.generateConstructor(ctor, swiftClass)); + lines.push(''); + } + } + + // Add properties + for (const prop of swiftClass.properties) { + lines.push(...this.generateProperty(prop, swiftClass)); + lines.push(''); + } + + // Add methods + for (const method of swiftClass.methods) { + lines.push(...this.generateMethod(method, swiftClass)); + lines.push(''); + } + + // Add destructor if concrete class + if (!swiftClass.isAbstract && swiftClass.cType.destructor) { + lines.push(' deinit {'); + lines.push(` ${swiftClass.cType.destructor.name}(wrappee)`); + lines.push(' }'); + } + + lines.push('}'); + + return lines.join('\n'); + } + + private buildInheritanceDeclaration(swiftClass: SwiftClass): string { + const parts: string[] = []; + + if (swiftClass.parentClass) { + parts.push(swiftClass.parentClass); + } else if (!swiftClass.isInterface) { + parts.push('NSObject'); + } + + if (swiftClass.protocols.length > 0) { + parts.push(...swiftClass.protocols); + } + + return parts.length > 0 ? `: ${parts.join(', ')}` : ''; + } + + private async generateEnumsFile(options: SwiftGenerationOptions): Promise { + const filePath = path.join(options.outputDir, 'Enums.swift'); + const lines: string[] = []; + + // Add license header + lines.push(...options.licenseHeader.split('\n').map(line => `// ${line}`)); + lines.push(''); + lines.push('import Foundation'); + lines.push(''); + + // Generate each enum + for (const cEnum of this.cEnums) { + lines.push(`public typealias ${this.getSwiftClassName(cEnum.name)} = ${cEnum.name}`); + } + + await fs.writeFile(filePath, lines.join('\n'), 'utf-8'); + } + + private async generateArraysFile(options: SwiftGenerationOptions): Promise { + const filePath = path.join(options.outputDir, 'Arrays.swift'); + const lines: string[] = []; + + // Add license header + lines.push(...options.licenseHeader.split('\n').map(line => `// ${line}`)); + lines.push(''); + lines.push('import Foundation'); + lines.push(''); + + // TODO: Generate array wrapper classes + + await fs.writeFile(filePath, lines.join('\n'), 'utf-8'); + } + + private async generateExportsFile(options: SwiftGenerationOptions): Promise { + const filePath = path.join(options.outputDir, 'Spine.Generated.swift'); + const lines: string[] = []; + + // Add license header + lines.push(...options.licenseHeader.split('\n').map(line => `// ${line}`)); + lines.push(''); + lines.push('// This file exports all generated types'); + lines.push(''); + + await fs.writeFile(filePath, lines.join('\n'), 'utf-8'); + } + + private mapCTypeToSwift(cType: string | undefined): string { + if (!cType) return 'Void'; + + const typeMap: Record = { + 'void': 'Void', + 'spine_bool': 'Bool', + 'bool': 'Bool', + 'int': 'Int32', + 'int32_t': 'Int32', + 'uint32_t': 'UInt32', + 'int16_t': 'Int16', + 'uint16_t': 'UInt16', + 'int64_t': 'Int64', + 'uint64_t': 'UInt64', + 'float': 'Float', + 'double': 'Double', + 'const char *': 'String?', + 'char *': 'String?', + 'const utf8 *': 'String?', + 'utf8 *': 'String?', + 'float *': 'UnsafeMutablePointer?', + 'int *': 'UnsafeMutablePointer?', + 'int32_t *': 'UnsafeMutablePointer?', + }; + + // Check if it's already in the map + if (typeMap[cType]) { + return typeMap[cType]; + } + + // Handle spine types + if (cType.startsWith('spine_')) { + // It's a spine type - map to Swift class + const swiftType = this.getSwiftClassName(cType); + return swiftType; + } + + // Handle pointer types + if (cType.endsWith('*')) { + // It's a pointer to something + const baseType = cType.slice(0, -1).trim(); + if (baseType.startsWith('spine_')) { + // Pointer to spine type + const swiftType = this.getSwiftClassName(baseType); + return swiftType + '?'; + } else { + // Generic pointer + return 'OpaquePointer?'; + } + } + + return cType; + } + + private mapReturnType(cType: string | undefined, isNullable: boolean): string { + if (!cType) return 'Void'; + + const baseType = this.mapCTypeToSwift(cType); + + // Handle spine type pointers + if (cType.startsWith('spine_') && cType.endsWith('*')) { + const typeName = cType.slice(0, -1).trim(); // Remove pointer + const swiftType = this.getSwiftClassName(typeName); + return isNullable ? `${swiftType}?` : swiftType; + } + + return baseType; + } + + private mapParameterType(cType: string | undefined, isNullable: boolean): string { + return this.mapReturnType(cType, isNullable); + } + + private getSwiftClassName(cTypeName: string): string { + // Remove spine_ prefix and convert to PascalCase + const name = cTypeName.replace(/^spine_/, ''); + return name.split('_') + .map(part => part.charAt(0).toUpperCase() + part.slice(1)) + .join(''); + } + + private getSwiftMethodName(cMethodName: string, cTypeName: string): string { + // Remove the type prefix (e.g., spine_skeleton_update -> update) + let name = cMethodName; + if (name.startsWith(cTypeName + '_')) { + name = name.substring(cTypeName.length + 1); + } + + // Handle numbered methods (e.g., setSkin_1 -> setSkin) + name = name.replace(/_\d+$/, ''); + + // Convert snake_case to camelCase + const parts = name.split('_'); + if (parts.length > 1) { + name = parts[0] + parts.slice(1).map(p => p.charAt(0).toUpperCase() + p.slice(1)).join(''); + } + + return name; + } + + private lowercaseFirst(str: string): string { + return str.charAt(0).toLowerCase() + str.slice(1); + } + + private sanitizeParameterName(name: string): string { + // Swift reserved words that need escaping + const reserved = ['in', 'var', 'let', 'func', 'class', 'struct', 'enum', 'protocol', 'extension']; + return reserved.includes(name) ? `\`${name}\`` : name; + } + + private isNullableType(cType: string): boolean { + // Pointers can be null + return cType.includes('*'); + } + + private generateConstructor(ctor: SwiftConstructor, swiftClass: SwiftClass): string[] { + const lines: string[] = []; + + // Generate parameter list + const params = ctor.parameters.map(p => `${p.name}: ${p.type}`).join(', '); + + lines.push(` public convenience init(${params}) {`); + + // Generate C function call + const cParams = ctor.parameters.map(p => { + if (p.type.endsWith('?') && p.type !== 'String?') { + // It's an optional spine type + return `${p.name}?.wrappee ?? nil`; + } else if (p.type === 'String?') { + return p.name; + } else if (this.isSpineType(p.type)) { + return `${p.name}.wrappee`; + } else { + return p.name; + } + }).join(', '); + + lines.push(` let ptr = ${swiftClass.cType.constructors[0].name}(${cParams})`); + lines.push(' self.init(ptr)'); + lines.push(' }'); + + return lines; + } + + private generateProperty(prop: SwiftProperty, swiftClass: SwiftClass): string[] { + const lines: string[] = []; + + if (prop.isReadOnly) { + // Read-only property + lines.push(` public var ${prop.name}: ${prop.type} {`); + if (prop.getter) { + lines.push(...this.generatePropertyGetter(prop.getter, swiftClass)); + } + lines.push(' }'); + } else { + // Read-write property + lines.push(` public var ${prop.name}: ${prop.type} {`); + lines.push(' get {'); + if (prop.getter) { + lines.push(...this.generatePropertyGetter(prop.getter, swiftClass).map(l => ' ' + l)); + } + lines.push(' }'); + lines.push(' set {'); + if (prop.setter) { + lines.push(...this.generatePropertySetter(prop.setter, swiftClass).map(l => ' ' + l)); + } + lines.push(' }'); + lines.push(' }'); + } + + return lines; + } + + private generatePropertyGetter(method: SwiftMethod, swiftClass: SwiftClass): string[] { + const lines: string[] = []; + const returnType = method.returnType; + + if (returnType === 'Void') { + lines.push(` ${method.cMethod.name}(wrappee)`); + } else if (returnType === 'String?') { + lines.push(` let result = ${method.cMethod.name}(wrappee)`); + lines.push(' return result != nil ? String(cString: result!) : nil'); + } else if (returnType === 'Bool') { + lines.push(` return ${method.cMethod.name}(wrappee) != 0`); + } else if (this.isSpineType(returnType)) { + const isOptional = returnType.endsWith('?'); + const baseType = isOptional ? returnType.slice(0, -1) : returnType; + + lines.push(` let result = ${method.cMethod.name}(wrappee)`); + if (isOptional) { + lines.push(` return result != nil ? ${baseType}(result!) : nil`); + } else { + lines.push(` return ${baseType}(result)`); + } + } else { + lines.push(` return ${method.cMethod.name}(wrappee)`); + } + + return lines; + } + + private generatePropertySetter(method: SwiftMethod, swiftClass: SwiftClass): string[] { + const lines: string[] = []; + const param = method.parameters[0]; + + let paramValue = 'newValue'; + if (param.type === 'String?') { + paramValue = 'newValue?.cString(using: .utf8)'; + } else if (param.type === 'Bool') { + paramValue = 'newValue ? 1 : 0'; + } else if (this.isSpineType(param.type)) { + if (param.type.endsWith('?')) { + paramValue = 'newValue?.wrappee'; + } else { + paramValue = 'newValue.wrappee'; + } + } + + lines.push(` ${method.cMethod.name}(wrappee, ${paramValue})`); + + return lines; + } + + private generateMethod(method: SwiftMethod, swiftClass: SwiftClass): string[] { + const lines: string[] = []; + + // Generate parameter list + const params = method.parameters.map(p => `${p.name}: ${p.type}`).join(', '); + const funcDecl = method.isStatic ? 'public static func' : 'public func'; + + lines.push(` ${funcDecl} ${method.name}(${params})${method.returnType !== 'Void' ? ' -> ' + method.returnType : ''} {`); + + // Generate method body + const cParams = [ + !method.isStatic ? 'wrappee' : '', + ...method.parameters.map(p => { + if (p.type === 'String?') { + return `${p.name}?.cString(using: .utf8)`; + } else if (p.type === 'Bool') { + return `${p.name} ? 1 : 0`; + } else if (this.isSpineType(p.type)) { + if (p.type.endsWith('?')) { + return `${p.name}?.wrappee`; + } else { + return `${p.name}.wrappee`; + } + } else { + return p.name; + } + }) + ].filter(p => p !== '').join(', '); + + if (method.returnType === 'Void') { + lines.push(` ${method.cMethod.name}(${cParams})`); + } else if (method.returnType === 'String?') { + lines.push(` let result = ${method.cMethod.name}(${cParams})`); + lines.push(' return result != nil ? String(cString: result!) : nil'); + } else if (method.returnType === 'Bool') { + lines.push(` return ${method.cMethod.name}(${cParams}) != 0`); + } else if (this.isSpineType(method.returnType)) { + const isOptional = method.returnType.endsWith('?'); + const baseType = isOptional ? method.returnType.slice(0, -1) : method.returnType; + + lines.push(` let result = ${method.cMethod.name}(${cParams})`); + if (isOptional) { + lines.push(` return result != nil ? ${baseType}(result!) : nil`); + } else { + lines.push(` return ${baseType}(result)`); + } + } else { + lines.push(` return ${method.cMethod.name}(${cParams})`); + } + + lines.push(' }'); + + return lines; + } + + private isSpineType(type: string): boolean { + const baseType = type.endsWith('?') ? type.slice(0, -1) : type; + // Check if it's one of our generated Swift classes + return Array.from(this.swiftClasses.values()).some(c => c.name === baseType); + } +} \ No newline at end of file diff --git a/spine-libgdx/spine-libgdx-tests/.classpath b/spine-libgdx/spine-libgdx-tests/.classpath deleted file mode 100644 index 14cbc9fce..000000000 --- a/spine-libgdx/spine-libgdx-tests/.classpath +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/spine-libgdx/spine-libgdx-tests/.project b/spine-libgdx/spine-libgdx-tests/.project deleted file mode 100644 index 263966f61..000000000 --- a/spine-libgdx/spine-libgdx-tests/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - spine-libgdx-tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/spine-libgdx/spine-libgdx/.classpath b/spine-libgdx/spine-libgdx/.classpath deleted file mode 100644 index cd3d7b090..000000000 --- a/spine-libgdx/spine-libgdx/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/spine-libgdx/spine-libgdx/.project b/spine-libgdx/spine-libgdx/.project deleted file mode 100644 index 7d65046eb..000000000 --- a/spine-libgdx/spine-libgdx/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - spine-libgdx - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/spine-libgdx/spine-skeletonviewer/.classpath b/spine-libgdx/spine-skeletonviewer/.classpath index 2a0d248da..f10f2b071 100644 --- a/spine-libgdx/spine-skeletonviewer/.classpath +++ b/spine-libgdx/spine-skeletonviewer/.classpath @@ -1,14 +1,25 @@ - - - + - + + - + + + + + + + + - + + + + + + diff --git a/spine-libgdx/spine-skeletonviewer/.project b/spine-libgdx/spine-skeletonviewer/.project index 7d23d2a34..e4f722190 100644 --- a/spine-libgdx/spine-skeletonviewer/.project +++ b/spine-libgdx/spine-skeletonviewer/.project @@ -10,8 +10,14 @@ + + org.eclipse.buildship.core.gradleprojectbuilder + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature diff --git a/todos/todos.md b/todos/todos.md index e24ec1b39..3745741ba 100644 --- a/todos/todos.md +++ b/todos/todos.md @@ -2,7 +2,6 @@ - Will be used to snapshottesting via HeadlessTest, see also tests/ - Can go into main package in all core runtimes, except for spine-libgdx, where it must go next to SkeletonSerializer in spine-libgdx-tests - Fix Dart NativeArray wrt to resize/add/remove. Current impl is wonky. Either make it read-only or support full mutabiliy (prefer latter) -- Generate bindings for Swift from spine-c generate() like dart-writer.ts - Generate Godot wrappers from C++ types and/or spine-c generate() (unlike dart-writer.ts)? - headless-test improvements - should take cli args for ad-hoc testing diff --git a/todos/work/2025-07-31-16-50-17-generate-swift-bindings/task.md b/todos/work/2025-07-31-16-50-17-generate-swift-bindings/task.md index d3e92a230..027a5211d 100644 --- a/todos/work/2025-07-31-16-50-17-generate-swift-bindings/task.md +++ b/todos/work/2025-07-31-16-50-17-generate-swift-bindings/task.md @@ -23,13 +23,13 @@ Read [analysis.md](./analysis.md) in full for analysis results and context. - Handle nullability with Swift optionals - Generate proper class/protocol inheritance -- [ ] Generate Swift classes from CIR +- [x] Generate Swift classes from CIR - Concrete classes with NSObject inheritance and @objc annotations - Abstract classes with proper subclass requirements - Protocols for interface types (like Constraint, Update) - Proper memory management with deinit methods -- [ ] Generate Swift enums +- [x] Generate Swift enums - Use Swift enums with raw values for C enums - Add fromValue static methods for reverse lookup - Generate proper case names from C enum values @@ -39,24 +39,24 @@ Read [analysis.md](./analysis.md) in full for analysis results and context. - Implement subscript operators and collection protocols - Handle memory ownership and disposal -- [ ] Handle RTTI-based instantiation +- [x] Handle RTTI-based instantiation - Generate switch statements for abstract type instantiation - Map C++ class names to Swift concrete types - Handle unknown types gracefully -- [ ] Generate method implementations +- [x] Generate method implementations - Convert C function calls to Swift methods - Handle method overloading (numbered C methods) - Generate computed properties for getter/setter pairs - Add proper null checking and optional unwrapping -- [ ] Create output file structure +- [x] Create output file structure - Generate individual .swift files per type - Create Arrays.swift for all array types - Create Enums.swift for all enum types - Generate main exports file -- [ ] Add build integration +- [x] Add build integration - Create build script to run the generator - Update spine-ios Package.swift to include generated files