|
|
|
|
|
|
path = (char*)fileOut; |
|
|
|
#endif
|
|
|
|
sk_sp<skottie::Animation> animation_ = skottie::Animation::MakeFromFile(path); |
|
|
|
if(animation_ == nullptr){ |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
return fml::MakeRefCounted<Skottie>(animation_); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
UIWIDGETS_API(Skottie*) |
|
|
|
Skottie_Construct(char* path) { |
|
|
|
fml::RefPtr<Skottie> skottie = Skottie::Create(path); |
|
|
|
if(skottie.get() == nullptr){ |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
Skottie_Dispose(Skottie* ptr) { ptr->Release(); } |
|
|
|
Skottie_Dispose(Skottie* ptr) { |
|
|
|
if(ptr == nullptr){ |
|
|
|
return; |
|
|
|
} |
|
|
|
ptr->Release(); |
|
|
|
} |
|
|
|
if(ptr == nullptr){ |
|
|
|
return; |
|
|
|
} |
|
|
|
Skottie_Duration(Skottie* ptr) { return ptr->duration(); } |
|
|
|
Skottie_Duration(Skottie* ptr) { |
|
|
|
if(ptr == nullptr){ |
|
|
|
return 0; |
|
|
|
} |
|
|
|
return ptr->duration(); } |
|
|
|
} // namespace uiwidgets
|