diff --git a/spine-flutter/example/lib/main.dart b/spine-flutter/example/lib/main.dart index 59a188a09..5179b484d 100644 --- a/spine-flutter/example/lib/main.dart +++ b/spine-flutter/example/lib/main.dart @@ -36,7 +36,9 @@ class Spineboy extends StatelessWidget { @override Widget build(BuildContext context) { final controller = SpineWidgetController((controller) { - controller.animationState?.setAnimation(0, "walk", true); + final state = controller.animationState; + state?.setAnimation(0, "walk", false).setMixDuration(2); + state?.addEmptyAnimation(0, 0.2, 0); }); return Scaffold( diff --git a/spine-flutter/lib/spine_flutter.dart b/spine-flutter/lib/spine_flutter.dart index 477c50461..5f4d9722d 100644 --- a/spine-flutter/lib/spine_flutter.dart +++ b/spine-flutter/lib/spine_flutter.dart @@ -124,10 +124,287 @@ class Skeleton { Skeleton(this._skeleton); } +class Animation { + final spine_animation _animation; + + Animation(this._animation); +} + +enum MixBlend { + Setup(0), + First(1), + Replace(2), + Add(3); + + final int value; + const MixBlend(this.value); +} + class TrackEntry { final spine_track_entry _entry; TrackEntry(this._entry); + + /// The index of the track where this entry is either current or queued. + int getTtrackIndex() { + return _bindings.spine_track_entry_get_track_index(_entry); + } + + /// The animation to apply for this track entry. + Animation getAnimation() { + return Animation(_bindings.spine_track_entry_get_animation(_entry)); + } + + /// If true, the animation will repeat. If false, it will not, instead its last frame is applied if played beyond its duration. + bool getLoop() { + return _bindings.spine_track_entry_get_loop(_entry) == -1; + } + + void setLoop(bool loop) { + _bindings.spine_track_entry_set_loop(_entry, loop ? -1 : 0); + } + + /// If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead + /// of being mixed out. + /// + /// When mixing between animations that key the same property, if a lower track also keys that property then the value will + /// briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0% + /// while the second animation mixes from 0% to 100%. Setting holdPrevious to true applies the first animation + /// at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which + /// keys the property, only when a higher track also keys the property. + /// + /// Snapping will occur if holdPrevious is true and this animation does not key all the same properties as the + /// previous animation. + bool getHoldPrevious() { + return _bindings.spine_track_entry_get_hold_previous(_entry) == -1; + } + + void setHoldPrevious(bool holdPrevious) { + _bindings.spine_track_entry_set_hold_previous(_entry, holdPrevious ? -1 : 0); + } + + bool getReverse() { + return _bindings.spine_track_entry_get_reverse(_entry) == -1; + } + + void setReverse(bool reverse) { + _bindings.spine_track_entry_set_reverse(_entry, reverse ? -1 : 0); + } + + bool getShortestRotation() { + return _bindings.spine_track_entry_get_shortest_rotation(_entry) == 1; + } + + void setShortestRotation(bool shortestRotation) { + _bindings.spine_track_entry_set_shortest_rotation(_entry, shortestRotation ? -1 : 0); + } + + /// Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones incrementing + /// the track time. When a track entry is queued, delay is the time from the start of the previous animation to when the + /// track entry will become the current track entry. + double getDelay() { + return _bindings.spine_track_entry_get_delay(_entry); + } + + void setDelay(double delay) { + _bindings.spine_track_entry_set_delay(_entry, delay); + } + + /// Current time in seconds this track entry has been the current track entry. The track time determines + /// TrackEntry.AnimationTime. The track time can be set to start the animation at a time other than 0, without affecting looping. + double getTrackTime() { + return _bindings.spine_track_entry_get_track_time(_entry); + } + + void setTrackTime(double trackTime) { + _bindings.spine_track_entry_set_track_time(_entry, trackTime); + } + + /// The track time in seconds when this animation will be removed from the track. Defaults to the animation duration for + /// non-looping animations and to int.MaxValue for looping animations. If the track end time is reached and no + /// other animations are queued for playback, and mixing from any previous animations is complete, properties keyed by the animation, + /// are set to the setup pose and the track is cleared. + /// + /// It may be desired to use AnimationState.addEmptyAnimation(int, float, float) to mix the properties back to the + /// setup pose over time, rather than have it happen instantly. + double getTrackEnd() { + return _bindings.spine_track_entry_get_track_end(_entry); + } + + void setTrackEnd(double trackEnd) { + _bindings.spine_track_entry_set_track_end(_entry, trackEnd); + } + + /// Seconds when this animation starts, both initially and after looping. Defaults to 0. + /// + /// When changing the animation start time, it often makes sense to set TrackEntry.AnimationLast to the same value to + /// prevent timeline keys before the start time from triggering. + double getAnimationStart() { + return _bindings.spine_track_entry_get_animation_start(_entry); + } + + void setAnimationStart(double animationStart) { + _bindings.spine_track_entry_set_animation_start(_entry, animationStart); + } + + /// Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will + /// loop back to TrackEntry.AnimationStart at this time. Defaults to the animation duration. + double getAnimationEnd() { + return _bindings.spine_track_entry_get_animation_end(_entry); + } + + void setAnimationEnd(double animationEnd) { + _bindings.spine_track_entry_set_animation_end(_entry, animationEnd); + } + + /// The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this + /// animation is applied, event timelines will fire all events between the animation last time (exclusive) and animation time + /// (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation is applied. + double getAnimationLast() { + return _bindings.spine_track_entry_get_animation_last(_entry); + } + + void setAnimationLast(double animationLast) { + _bindings.spine_track_entry_set_animation_last(_entry, animationLast); + } + + /// Uses TrackEntry.TrackTime to compute the animation time between TrackEntry.AnimationStart. and + /// TrackEntry.AnimationEnd. When the track time is 0, the animation time is equal to the animation start time. + double getAnimationTime() { + return _bindings.spine_track_entry_get_animation_time(_entry); + } + + /// Multiplier for the delta time when the animation state is updated, causing time for this animation to play slower or + /// faster. Defaults to 1. + double getTimeScale() { + return _bindings.spine_animation_state_get_time_scale(_entry); + } + + void setTimeScale(double timeScale) { + _bindings.spine_track_entry_set_time_scale(_entry, timeScale); + } + + /// Values less than 1 mix this animation with the last skeleton pose. Defaults to 1, which overwrites the last skeleton pose with + /// this animation. + /// + /// Typically track 0 is used to completely pose the skeleton, then alpha can be used on higher tracks. It doesn't make sense + /// to use alpha on track 0 if the skeleton pose is from the last frame render. + double getAlpha() { + return _bindings.spine_track_entry_get_alpha(_entry); + } + + void setAlpha(double alpha) { + _bindings.spine_track_entry_set_alpha(_entry, alpha); + } + + /// When the mix percentage (mix time / mix duration) is less than the event threshold, event timelines for the animation + /// being mixed out will be applied. Defaults to 0, so event timelines are not applied for an animation being mixed out. + double getEventThreshold() { + return _bindings.spine_track_entry_get_event_threshold(_entry); + } + + void setEventThreshold(double eventThreshold) { + _bindings.spine_track_entry_set_event_threshold(_entry, eventThreshold); + } + + /// When the mix percentage (mix time / mix duration) is less than the attachment threshold, attachment timelines for the + /// animation being mixed out will be applied. Defaults to 0, so attachment timelines are not applied for an animation being + /// mixed out. + double getAttachmentThreshold() { + return _bindings.spine_track_entry_get_attachment_threshold(_entry); + } + + void setAttachmentThreshold(double attachmentThreshold) { + _bindings.spine_track_entry_set_attachment_threshold(_entry, attachmentThreshold); + } + + /// When the mix percentage (mix time / mix duration) is less than the draw order threshold, draw order timelines for the + /// animation being mixed out will be applied. Defaults to 0, so draw order timelines are not applied for an animation being + /// mixed out. + double getDrawOrderThreshold() { + return _bindings.spine_track_entry_get_draw_order_threshold(_entry); + } + + void setDrawOrderThreshold(double drawOrderThreshold) { + _bindings.spine_track_entry_set_draw_order_threshold(_entry, drawOrderThreshold); + } + + /// The animation queued to start after this animation, or null. + TrackEntry? getNext() { + final next = _bindings.spine_track_entry_get_next(_entry); + if (next.address == nullptr.address) return null; + return TrackEntry(next); + } + + /// Returns true if at least one loop has been completed. + bool isComplete() { + return _bindings.spine_track_entry_is_complete(_entry) == -1; + } + + /// Seconds from 0 to the mix duration when mixing from the previous animation to this animation. May be slightly more than + /// TrackEntry.MixDuration when the mix is complete. + double getMixTime() { + return _bindings.spine_track_entry_get_mix_time(_entry); + } + + void setMixTime(double mixTime) { + _bindings.spine_track_entry_set_mix_time(_entry, mixTime); + } + + /// Seconds for mixing from the previous animation to this animation. Defaults to the value provided by + /// AnimationStateData based on the animation before this animation (if any). + /// + /// The mix duration can be set manually rather than use the value from AnimationStateData.GetMix. + /// In that case, the mixDuration must be set before AnimationState.update(float) is next called. + /// + /// When using AnimationState::addAnimation(int, Animation, bool, float) with a delay + /// less than or equal to 0, note the Delay is set using the mix duration from the AnimationStateData + double getMixDuration() { + return _bindings.spine_track_entry_get_mix_duration(_entry); + } + + void setMixDuration(double mixDuration) { + _bindings.spine_track_entry_set_mix_duration(_entry, mixDuration); + } + + MixBlend getMixBlend() { + return MixBlend.values[_bindings.spine_track_entry_get_mix_blend(_entry)]; + } + + void setMixBlend(MixBlend mixBlend) { + _bindings.spine_track_entry_set_mix_blend(_entry, mixBlend.value); + } + + /// The track entry for the previous animation when mixing from the previous animation to this animation, or NULL if no + /// mixing is currently occuring. When mixing from multiple animations, MixingFrom makes up a double linked list with MixingTo. + TrackEntry? getMixingFrom() { + final from = _bindings.spine_track_entry_get_mixing_from(_entry); + if (from.address == nullptr.address) return null; + return TrackEntry(from); + } + + /// The track entry for the next animation when mixing from this animation, or NULL if no mixing is currently occuring. + /// When mixing from multiple animations, MixingTo makes up a double linked list with MixingFrom. + TrackEntry? getMixingTo() { + final to = _bindings.spine_track_entry_get_mixing_to(_entry); + if (to.address == nullptr.address) return null; + return TrackEntry(to); + } + + /// Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the + /// long way around when using alpha and starting animations on other tracks. + /// + /// Mixing involves finding a rotation between two others, which has two possible solutions: the short way or the long way around. + /// The two rotations likely change over time, so which direction is the short or long way also changes. + /// If the short way was always chosen, bones would flip to the other side when that direction became the long way. + /// TrackEntry chooses the short way the first time it is applied and remembers that direction. + void resetRotationDirections() { + _bindings.spine_track_entry_reset_rotation_directions(_entry); + } + + double getTrackComplete() { + return _bindings.spine_track_entry_get_track_complete(_entry); + } } class AnimationState { @@ -135,6 +412,8 @@ class AnimationState { AnimationState(this._state); + // FIXME add listener methods, get current + /// Increments the track entry times, setting queued animations as current if needed /// @param delta delta time void update(double delta) { diff --git a/spine-flutter/lib/spine_flutter_bindings_generated.dart b/spine-flutter/lib/spine_flutter_bindings_generated.dart index c852f49cf..dd0a0df85 100644 --- a/spine-flutter/lib/spine_flutter_bindings_generated.dart +++ b/spine-flutter/lib/spine_flutter_bindings_generated.dart @@ -427,6 +427,722 @@ class SpineFlutterBindings { late final _spine_animation_state_set_time_scale = _spine_animation_state_set_time_scalePtr .asFunction(); + + int spine_track_entry_get_track_index( + spine_track_entry entry, + ) { + return _spine_track_entry_get_track_index( + entry, + ); + } + + late final _spine_track_entry_get_track_indexPtr = + _lookup>( + 'spine_track_entry_get_track_index'); + late final _spine_track_entry_get_track_index = + _spine_track_entry_get_track_indexPtr + .asFunction(); + + spine_animation spine_track_entry_get_animation( + spine_track_entry entry, + ) { + return _spine_track_entry_get_animation( + entry, + ); + } + + late final _spine_track_entry_get_animationPtr = + _lookup>( + 'spine_track_entry_get_animation'); + late final _spine_track_entry_get_animation = + _spine_track_entry_get_animationPtr + .asFunction(); + + spine_track_entry spine_track_entry_get_previous( + spine_track_entry entry, + ) { + return _spine_track_entry_get_previous( + entry, + ); + } + + late final _spine_track_entry_get_previousPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_get_previous'); + late final _spine_track_entry_get_previous = + _spine_track_entry_get_previousPtr + .asFunction(); + + int spine_track_entry_get_loop( + spine_track_entry entry, + ) { + return _spine_track_entry_get_loop( + entry, + ); + } + + late final _spine_track_entry_get_loopPtr = + _lookup>( + 'spine_track_entry_get_loop'); + late final _spine_track_entry_get_loop = _spine_track_entry_get_loopPtr + .asFunction(); + + void spine_track_entry_set_loop( + spine_track_entry entry, + int loop, + ) { + return _spine_track_entry_set_loop( + entry, + loop, + ); + } + + late final _spine_track_entry_set_loopPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_loop'); + late final _spine_track_entry_set_loop = _spine_track_entry_set_loopPtr + .asFunction(); + + int spine_track_entry_get_hold_previous( + spine_track_entry entry, + ) { + return _spine_track_entry_get_hold_previous( + entry, + ); + } + + late final _spine_track_entry_get_hold_previousPtr = + _lookup>( + 'spine_track_entry_get_hold_previous'); + late final _spine_track_entry_get_hold_previous = + _spine_track_entry_get_hold_previousPtr + .asFunction(); + + void spine_track_entry_set_hold_previous( + spine_track_entry entry, + int holdPrevious, + ) { + return _spine_track_entry_set_hold_previous( + entry, + holdPrevious, + ); + } + + late final _spine_track_entry_set_hold_previousPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_hold_previous'); + late final _spine_track_entry_set_hold_previous = + _spine_track_entry_set_hold_previousPtr + .asFunction(); + + int spine_track_entry_get_reverse( + spine_track_entry entry, + ) { + return _spine_track_entry_get_reverse( + entry, + ); + } + + late final _spine_track_entry_get_reversePtr = + _lookup>( + 'spine_track_entry_get_reverse'); + late final _spine_track_entry_get_reverse = _spine_track_entry_get_reversePtr + .asFunction(); + + void spine_track_entry_set_reverse( + spine_track_entry entry, + int reverse, + ) { + return _spine_track_entry_set_reverse( + entry, + reverse, + ); + } + + late final _spine_track_entry_set_reversePtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_reverse'); + late final _spine_track_entry_set_reverse = _spine_track_entry_set_reversePtr + .asFunction(); + + int spine_track_entry_get_shortest_rotation( + spine_track_entry entry, + ) { + return _spine_track_entry_get_shortest_rotation( + entry, + ); + } + + late final _spine_track_entry_get_shortest_rotationPtr = + _lookup>( + 'spine_track_entry_get_shortest_rotation'); + late final _spine_track_entry_get_shortest_rotation = + _spine_track_entry_get_shortest_rotationPtr + .asFunction(); + + void spine_track_entry_set_shortest_rotation( + spine_track_entry entry, + int shortestRotation, + ) { + return _spine_track_entry_set_shortest_rotation( + entry, + shortestRotation, + ); + } + + late final _spine_track_entry_set_shortest_rotationPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_shortest_rotation'); + late final _spine_track_entry_set_shortest_rotation = + _spine_track_entry_set_shortest_rotationPtr + .asFunction(); + + double spine_track_entry_get_delay( + spine_track_entry entry, + ) { + return _spine_track_entry_get_delay( + entry, + ); + } + + late final _spine_track_entry_get_delayPtr = + _lookup>( + 'spine_track_entry_get_delay'); + late final _spine_track_entry_get_delay = _spine_track_entry_get_delayPtr + .asFunction(); + + void spine_track_entry_set_delay( + spine_track_entry entry, + double delay, + ) { + return _spine_track_entry_set_delay( + entry, + delay, + ); + } + + late final _spine_track_entry_set_delayPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_delay'); + late final _spine_track_entry_set_delay = _spine_track_entry_set_delayPtr + .asFunction(); + + double spine_track_entry_get_track_time( + spine_track_entry entry, + ) { + return _spine_track_entry_get_track_time( + entry, + ); + } + + late final _spine_track_entry_get_track_timePtr = + _lookup>( + 'spine_track_entry_get_track_time'); + late final _spine_track_entry_get_track_time = + _spine_track_entry_get_track_timePtr + .asFunction(); + + void spine_track_entry_set_track_time( + spine_track_entry entry, + double trackTime, + ) { + return _spine_track_entry_set_track_time( + entry, + trackTime, + ); + } + + late final _spine_track_entry_set_track_timePtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_track_time'); + late final _spine_track_entry_set_track_time = + _spine_track_entry_set_track_timePtr + .asFunction(); + + double spine_track_entry_get_track_end( + spine_track_entry entry, + ) { + return _spine_track_entry_get_track_end( + entry, + ); + } + + late final _spine_track_entry_get_track_endPtr = + _lookup>( + 'spine_track_entry_get_track_end'); + late final _spine_track_entry_get_track_end = + _spine_track_entry_get_track_endPtr + .asFunction(); + + void spine_track_entry_set_track_end( + spine_track_entry entry, + double trackEnd, + ) { + return _spine_track_entry_set_track_end( + entry, + trackEnd, + ); + } + + late final _spine_track_entry_set_track_endPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_track_end'); + late final _spine_track_entry_set_track_end = + _spine_track_entry_set_track_endPtr + .asFunction(); + + double spine_track_entry_get_animation_start( + spine_track_entry entry, + ) { + return _spine_track_entry_get_animation_start( + entry, + ); + } + + late final _spine_track_entry_get_animation_startPtr = + _lookup>( + 'spine_track_entry_get_animation_start'); + late final _spine_track_entry_get_animation_start = + _spine_track_entry_get_animation_startPtr + .asFunction(); + + void spine_track_entry_set_animation_start( + spine_track_entry entry, + double animationStart, + ) { + return _spine_track_entry_set_animation_start( + entry, + animationStart, + ); + } + + late final _spine_track_entry_set_animation_startPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_animation_start'); + late final _spine_track_entry_set_animation_start = + _spine_track_entry_set_animation_startPtr + .asFunction(); + + double spine_track_entry_get_animation_end( + spine_track_entry entry, + ) { + return _spine_track_entry_get_animation_end( + entry, + ); + } + + late final _spine_track_entry_get_animation_endPtr = + _lookup>( + 'spine_track_entry_get_animation_end'); + late final _spine_track_entry_get_animation_end = + _spine_track_entry_get_animation_endPtr + .asFunction(); + + void spine_track_entry_set_animation_end( + spine_track_entry entry, + double animationEnd, + ) { + return _spine_track_entry_set_animation_end( + entry, + animationEnd, + ); + } + + late final _spine_track_entry_set_animation_endPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_animation_end'); + late final _spine_track_entry_set_animation_end = + _spine_track_entry_set_animation_endPtr + .asFunction(); + + double spine_track_entry_get_animation_last( + spine_track_entry entry, + ) { + return _spine_track_entry_get_animation_last( + entry, + ); + } + + late final _spine_track_entry_get_animation_lastPtr = + _lookup>( + 'spine_track_entry_get_animation_last'); + late final _spine_track_entry_get_animation_last = + _spine_track_entry_get_animation_lastPtr + .asFunction(); + + void spine_track_entry_set_animation_last( + spine_track_entry entry, + double animationLast, + ) { + return _spine_track_entry_set_animation_last( + entry, + animationLast, + ); + } + + late final _spine_track_entry_set_animation_lastPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_animation_last'); + late final _spine_track_entry_set_animation_last = + _spine_track_entry_set_animation_lastPtr + .asFunction(); + + double spine_track_entry_get_animation_time( + spine_track_entry entry, + ) { + return _spine_track_entry_get_animation_time( + entry, + ); + } + + late final _spine_track_entry_get_animation_timePtr = + _lookup>( + 'spine_track_entry_get_animation_time'); + late final _spine_track_entry_get_animation_time = + _spine_track_entry_get_animation_timePtr + .asFunction(); + + double spine_track_entry_get_time_scale( + spine_track_entry entry, + ) { + return _spine_track_entry_get_time_scale( + entry, + ); + } + + late final _spine_track_entry_get_time_scalePtr = + _lookup>( + 'spine_track_entry_get_time_scale'); + late final _spine_track_entry_get_time_scale = + _spine_track_entry_get_time_scalePtr + .asFunction(); + + void spine_track_entry_set_time_scale( + spine_track_entry entry, + double timeScale, + ) { + return _spine_track_entry_set_time_scale( + entry, + timeScale, + ); + } + + late final _spine_track_entry_set_time_scalePtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_time_scale'); + late final _spine_track_entry_set_time_scale = + _spine_track_entry_set_time_scalePtr + .asFunction(); + + double spine_track_entry_get_alpha( + spine_track_entry entry, + ) { + return _spine_track_entry_get_alpha( + entry, + ); + } + + late final _spine_track_entry_get_alphaPtr = + _lookup>( + 'spine_track_entry_get_alpha'); + late final _spine_track_entry_get_alpha = _spine_track_entry_get_alphaPtr + .asFunction(); + + void spine_track_entry_set_alpha( + spine_track_entry entry, + double alpha, + ) { + return _spine_track_entry_set_alpha( + entry, + alpha, + ); + } + + late final _spine_track_entry_set_alphaPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_alpha'); + late final _spine_track_entry_set_alpha = _spine_track_entry_set_alphaPtr + .asFunction(); + + double spine_track_entry_get_event_threshold( + spine_track_entry entry, + ) { + return _spine_track_entry_get_event_threshold( + entry, + ); + } + + late final _spine_track_entry_get_event_thresholdPtr = + _lookup>( + 'spine_track_entry_get_event_threshold'); + late final _spine_track_entry_get_event_threshold = + _spine_track_entry_get_event_thresholdPtr + .asFunction(); + + void spine_track_entry_set_event_threshold( + spine_track_entry entry, + double eventThreshold, + ) { + return _spine_track_entry_set_event_threshold( + entry, + eventThreshold, + ); + } + + late final _spine_track_entry_set_event_thresholdPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_event_threshold'); + late final _spine_track_entry_set_event_threshold = + _spine_track_entry_set_event_thresholdPtr + .asFunction(); + + double spine_track_entry_get_attachment_threshold( + spine_track_entry entry, + ) { + return _spine_track_entry_get_attachment_threshold( + entry, + ); + } + + late final _spine_track_entry_get_attachment_thresholdPtr = + _lookup>( + 'spine_track_entry_get_attachment_threshold'); + late final _spine_track_entry_get_attachment_threshold = + _spine_track_entry_get_attachment_thresholdPtr + .asFunction(); + + void spine_track_entry_set_attachment_threshold( + spine_track_entry entry, + double attachmentThreshold, + ) { + return _spine_track_entry_set_attachment_threshold( + entry, + attachmentThreshold, + ); + } + + late final _spine_track_entry_set_attachment_thresholdPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_attachment_threshold'); + late final _spine_track_entry_set_attachment_threshold = + _spine_track_entry_set_attachment_thresholdPtr + .asFunction(); + + double spine_track_entry_get_draw_order_threshold( + spine_track_entry entry, + ) { + return _spine_track_entry_get_draw_order_threshold( + entry, + ); + } + + late final _spine_track_entry_get_draw_order_thresholdPtr = + _lookup>( + 'spine_track_entry_get_draw_order_threshold'); + late final _spine_track_entry_get_draw_order_threshold = + _spine_track_entry_get_draw_order_thresholdPtr + .asFunction(); + + void spine_track_entry_set_draw_order_threshold( + spine_track_entry entry, + double drawOrderThreshold, + ) { + return _spine_track_entry_set_draw_order_threshold( + entry, + drawOrderThreshold, + ); + } + + late final _spine_track_entry_set_draw_order_thresholdPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_draw_order_threshold'); + late final _spine_track_entry_set_draw_order_threshold = + _spine_track_entry_set_draw_order_thresholdPtr + .asFunction(); + + spine_track_entry spine_track_entry_get_next( + spine_track_entry entry, + ) { + return _spine_track_entry_get_next( + entry, + ); + } + + late final _spine_track_entry_get_nextPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_get_next'); + late final _spine_track_entry_get_next = _spine_track_entry_get_nextPtr + .asFunction(); + + int spine_track_entry_is_complete( + spine_track_entry entry, + ) { + return _spine_track_entry_is_complete( + entry, + ); + } + + late final _spine_track_entry_is_completePtr = + _lookup>( + 'spine_track_entry_is_complete'); + late final _spine_track_entry_is_complete = _spine_track_entry_is_completePtr + .asFunction(); + + double spine_track_entry_get_mix_time( + spine_track_entry entry, + ) { + return _spine_track_entry_get_mix_time( + entry, + ); + } + + late final _spine_track_entry_get_mix_timePtr = + _lookup>( + 'spine_track_entry_get_mix_time'); + late final _spine_track_entry_get_mix_time = + _spine_track_entry_get_mix_timePtr + .asFunction(); + + void spine_track_entry_set_mix_time( + spine_track_entry entry, + double mixTime, + ) { + return _spine_track_entry_set_mix_time( + entry, + mixTime, + ); + } + + late final _spine_track_entry_set_mix_timePtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_mix_time'); + late final _spine_track_entry_set_mix_time = + _spine_track_entry_set_mix_timePtr + .asFunction(); + + double spine_track_entry_get_mix_duration( + spine_track_entry entry, + ) { + return _spine_track_entry_get_mix_duration( + entry, + ); + } + + late final _spine_track_entry_get_mix_durationPtr = + _lookup>( + 'spine_track_entry_get_mix_duration'); + late final _spine_track_entry_get_mix_duration = + _spine_track_entry_get_mix_durationPtr + .asFunction(); + + void spine_track_entry_set_mix_duration( + spine_track_entry entry, + double mixDuration, + ) { + return _spine_track_entry_set_mix_duration( + entry, + mixDuration, + ); + } + + late final _spine_track_entry_set_mix_durationPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_mix_duration'); + late final _spine_track_entry_set_mix_duration = + _spine_track_entry_set_mix_durationPtr + .asFunction(); + + int spine_track_entry_get_mix_blend( + spine_track_entry entry, + ) { + return _spine_track_entry_get_mix_blend( + entry, + ); + } + + late final _spine_track_entry_get_mix_blendPtr = + _lookup>( + 'spine_track_entry_get_mix_blend'); + late final _spine_track_entry_get_mix_blend = + _spine_track_entry_get_mix_blendPtr + .asFunction(); + + void spine_track_entry_set_mix_blend( + spine_track_entry entry, + int mixBlend, + ) { + return _spine_track_entry_set_mix_blend( + entry, + mixBlend, + ); + } + + late final _spine_track_entry_set_mix_blendPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_set_mix_blend'); + late final _spine_track_entry_set_mix_blend = + _spine_track_entry_set_mix_blendPtr + .asFunction(); + + spine_track_entry spine_track_entry_get_mixing_from( + spine_track_entry entry, + ) { + return _spine_track_entry_get_mixing_from( + entry, + ); + } + + late final _spine_track_entry_get_mixing_fromPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_get_mixing_from'); + late final _spine_track_entry_get_mixing_from = + _spine_track_entry_get_mixing_fromPtr + .asFunction(); + + spine_track_entry spine_track_entry_get_mixing_to( + spine_track_entry entry, + ) { + return _spine_track_entry_get_mixing_to( + entry, + ); + } + + late final _spine_track_entry_get_mixing_toPtr = _lookup< + ffi.NativeFunction>( + 'spine_track_entry_get_mixing_to'); + late final _spine_track_entry_get_mixing_to = + _spine_track_entry_get_mixing_toPtr + .asFunction(); + + void spine_track_entry_reset_rotation_directions( + spine_track_entry entry, + ) { + return _spine_track_entry_reset_rotation_directions( + entry, + ); + } + + late final _spine_track_entry_reset_rotation_directionsPtr = + _lookup>( + 'spine_track_entry_reset_rotation_directions'); + late final _spine_track_entry_reset_rotation_directions = + _spine_track_entry_reset_rotation_directionsPtr + .asFunction(); + + double spine_track_entry_get_track_complete( + spine_track_entry entry, + ) { + return _spine_track_entry_get_track_complete( + entry, + ); + } + + late final _spine_track_entry_get_track_completePtr = + _lookup>( + 'spine_track_entry_get_track_complete'); + late final _spine_track_entry_get_track_complete = + _spine_track_entry_get_track_completePtr + .asFunction(); } class spine_atlas extends ffi.Struct { @@ -453,6 +1169,13 @@ abstract class spine_blend_mode { static const int SPINE_BLEND_MODE_SCREEN = 3; } +abstract class spine_mix_blend { + static const int SPINE_MIX_BLEND_SETUP = 0; + static const int SPINE_MIX_BLEND_FIRST = 1; + static const int SPINE_MIX_BLEND_REPLACE = 2; + static const int SPINE_MIX_BLEND_ADD = 3; +} + class spine_render_command extends ffi.Struct { external ffi.Pointer positions; @@ -490,3 +1213,4 @@ class spine_skeleton_drawable extends ffi.Struct { typedef spine_skeleton = ffi.Pointer; typedef spine_animation_state = ffi.Pointer; typedef spine_track_entry = ffi.Pointer; +typedef spine_animation = ffi.Pointer; diff --git a/spine-flutter/src/spine_flutter.cpp b/spine-flutter/src/spine_flutter.cpp index 15f5ee10f..8c0826d88 100644 --- a/spine-flutter/src/spine_flutter.cpp +++ b/spine-flutter/src/spine_flutter.cpp @@ -330,3 +330,279 @@ FFI_PLUGIN_EXPORT void spine_animation_state_set_time_scale(spine_animation_stat AnimationState *_state = (AnimationState*)state; _state->setTimeScale(timeScale); } + +FFI_PLUGIN_EXPORT int spine_track_entry_get_track_index(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getTrackIndex(); +} + +FFI_PLUGIN_EXPORT spine_animation spine_track_entry_get_animation(spine_track_entry entry) { + if (entry == nullptr) return nullptr; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getAnimation(); +} + +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_previous(spine_track_entry entry) { + if (entry == nullptr) return nullptr; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getPrevious(); +} + +FFI_PLUGIN_EXPORT int spine_track_entry_get_loop(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getLoop() ? -1 : 0; +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_loop(spine_track_entry entry, int loop) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setLoop(loop); +} + +FFI_PLUGIN_EXPORT int spine_track_entry_get_hold_previous(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getHoldPrevious() ? -1 : 0; +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_hold_previous(spine_track_entry entry, int holdPrevious) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setHoldPrevious(holdPrevious); +} + +FFI_PLUGIN_EXPORT int spine_track_entry_get_reverse(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getReverse() ? -1 : 0; +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_reverse(spine_track_entry entry, int reverse) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setReverse(reverse); +} + +FFI_PLUGIN_EXPORT int spine_track_entry_get_shortest_rotation(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getShortestRotation() ? -1 : 0; +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_shortest_rotation(spine_track_entry entry, int shortestRotation) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setShortestRotation(shortestRotation); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_delay(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getDelay(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_delay(spine_track_entry entry, float delay) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setDelay(delay); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_track_time(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getTrackTime(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_track_time(spine_track_entry entry, float trackTime) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setTrackTime(trackTime); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_track_end(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getTrackEnd(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_track_end(spine_track_entry entry, float trackEnd) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setTrackEnd(trackEnd); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_start(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getAnimationStart(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_animation_start(spine_track_entry entry, float animationStart) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setAnimationStart(animationStart); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_end(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getAnimationEnd(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_animation_end(spine_track_entry entry, float animationEnd) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setAnimationEnd(animationEnd); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_last(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getAnimationLast(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_animation_last(spine_track_entry entry, float animationLast) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setAnimationLast(animationLast); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_time(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getAnimationTime(); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_time_scale(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getTimeScale(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_time_scale(spine_track_entry entry, float timeScale) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setTimeScale(timeScale); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_alpha(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getAlpha(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_alpha(spine_track_entry entry, float alpha) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setAlpha(alpha); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_event_threshold(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getEventThreshold(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_event_threshold(spine_track_entry entry, float eventThreshold) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setEventThreshold(eventThreshold); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_attachment_threshold(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getAttachmentThreshold(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_attachment_threshold(spine_track_entry entry, float attachmentThreshold) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setAttachmentThreshold(attachmentThreshold); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_draw_order_threshold(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getDrawOrderThreshold(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_draw_order_threshold(spine_track_entry entry, float drawOrderThreshold) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setDrawOrderThreshold(drawOrderThreshold); +} + +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_next(spine_track_entry entry) { + if (entry == nullptr) return nullptr; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getNext(); +} + +FFI_PLUGIN_EXPORT int spine_track_entry_is_complete(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->isComplete() ? -1 : 0; +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_mix_time(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getMixTime(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_mix_time(spine_track_entry entry, float mixTime) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setMixTime(mixTime); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_mix_duration(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getMixDuration(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_mix_duration(spine_track_entry entry, float mixDuration) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setMixDuration(mixDuration); +} + +FFI_PLUGIN_EXPORT spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry entry) { + if (entry == nullptr) return SPINE_MIX_BLEND_SETUP; + TrackEntry *_entry = (TrackEntry*)entry; + return (spine_mix_blend)_entry->getMixBlend(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_set_mix_blend(spine_track_entry entry, spine_mix_blend mixBlend) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->setMixBlend((MixBlend)mixBlend); +} + +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_mixing_from(spine_track_entry entry) { + if (entry == nullptr) return nullptr; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getMixingFrom(); +} + +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry entry) { + if (entry == nullptr) return nullptr; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getMixingTo(); +} + +FFI_PLUGIN_EXPORT void spine_track_entry_reset_rotation_directions(spine_track_entry entry) { + if (entry == nullptr) return; + TrackEntry *_entry = (TrackEntry*)entry; + _entry->resetRotationDirections(); +} + +FFI_PLUGIN_EXPORT float spine_track_entry_get_track_complete(spine_track_entry entry) { + if (entry == nullptr) return 0; + TrackEntry *_entry = (TrackEntry*)entry; + return _entry->getTrackComplete(); +} \ No newline at end of file diff --git a/spine-flutter/src/spine_flutter.h b/spine-flutter/src/spine_flutter.h index b80b9a3bb..4cdd65527 100644 --- a/spine-flutter/src/spine_flutter.h +++ b/spine-flutter/src/spine_flutter.h @@ -53,6 +53,13 @@ typedef enum spine_blend_mode { SPINE_BLEND_MODE_SCREEN } spine_blend_mode; +typedef enum spine_mix_blend { + SPINE_MIX_BLEND_SETUP = 0, + SPINE_MIX_BLEND_FIRST, + SPINE_MIX_BLEND_REPLACE, + SPINE_MIX_BLEND_ADD +} spine_mix_blend; + typedef struct spine_render_command { float *positions; float *uvs; @@ -68,6 +75,7 @@ typedef struct spine_render_command { typedef void* spine_skeleton; typedef void* spine_animation_state; typedef void* spine_track_entry; +typedef void* spine_animation; typedef struct spine_skeleton_drawable { spine_skeleton skeleton; @@ -92,3 +100,50 @@ FFI_PLUGIN_EXPORT spine_track_entry spine_animation_state_add_empty_animation(sp FFI_PLUGIN_EXPORT void spine_animation_state_set_empty_animations(spine_animation_state state, float mixDuration); FFI_PLUGIN_EXPORT float spine_animation_state_get_time_scale(spine_animation_state state); FFI_PLUGIN_EXPORT void spine_animation_state_set_time_scale(spine_animation_state state, float timeScale); + +FFI_PLUGIN_EXPORT int spine_track_entry_get_track_index(spine_track_entry entry); +FFI_PLUGIN_EXPORT spine_animation spine_track_entry_get_animation(spine_track_entry entry); +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_previous(spine_track_entry entry); +FFI_PLUGIN_EXPORT int spine_track_entry_get_loop(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_loop(spine_track_entry entry, int loop); +FFI_PLUGIN_EXPORT int spine_track_entry_get_hold_previous(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_hold_previous(spine_track_entry entry, int holdPrevious); +FFI_PLUGIN_EXPORT int spine_track_entry_get_reverse(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_reverse(spine_track_entry entry, int reverse); +FFI_PLUGIN_EXPORT int spine_track_entry_get_shortest_rotation(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_shortest_rotation(spine_track_entry entry, int shortestRotation); +FFI_PLUGIN_EXPORT float spine_track_entry_get_delay(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_delay(spine_track_entry entry, float delay); +FFI_PLUGIN_EXPORT float spine_track_entry_get_track_time(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_track_time(spine_track_entry entry, float trackTime); +FFI_PLUGIN_EXPORT float spine_track_entry_get_track_end(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_track_end(spine_track_entry entry, float trackEnd); +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_start(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_animation_start(spine_track_entry entry, float animationStart); +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_end(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_animation_end(spine_track_entry entry, float animationEnd); +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_last(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_animation_last(spine_track_entry entry, float animationLast); +FFI_PLUGIN_EXPORT float spine_track_entry_get_animation_time(spine_track_entry entry); +FFI_PLUGIN_EXPORT float spine_track_entry_get_time_scale(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_time_scale(spine_track_entry entry, float timeScale); +FFI_PLUGIN_EXPORT float spine_track_entry_get_alpha(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_alpha(spine_track_entry entry, float alpha); +FFI_PLUGIN_EXPORT float spine_track_entry_get_event_threshold(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_event_threshold(spine_track_entry entry, float eventThreshold); +FFI_PLUGIN_EXPORT float spine_track_entry_get_attachment_threshold(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_attachment_threshold(spine_track_entry entry, float attachmentThreshold); +FFI_PLUGIN_EXPORT float spine_track_entry_get_draw_order_threshold(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_draw_order_threshold(spine_track_entry entry, float drawOrderThreshold); +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_next(spine_track_entry entry); +FFI_PLUGIN_EXPORT int spine_track_entry_is_complete(spine_track_entry entry); +FFI_PLUGIN_EXPORT float spine_track_entry_get_mix_time(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_mix_time(spine_track_entry entry, float mixTime); +FFI_PLUGIN_EXPORT float spine_track_entry_get_mix_duration(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_mix_duration(spine_track_entry entry, float mixDuration); +FFI_PLUGIN_EXPORT spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_set_mix_blend(spine_track_entry entry, spine_mix_blend mixBlend); +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_mixing_from(spine_track_entry entry); +FFI_PLUGIN_EXPORT spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry entry); +FFI_PLUGIN_EXPORT void spine_track_entry_reset_rotation_directions(spine_track_entry entry); +FFI_PLUGIN_EXPORT float spine_track_entry_get_track_complete(spine_track_entry entry);