4 #ifndef EFL_BETA_API_SUPPORT
5 #define EFL_BETA_API_SUPPORT
8 #ifndef EFL_EO_API_SUPPORT
9 #define EFL_EO_API_SUPPORT
16 #include <Ecore_Evas.h>
17 #include "lottieanimation.h"
18 #include "lottieanimation_capi.h"
23 enum class RepeatMode {
27 LottieView(Evas *evas, bool renderMode = true, bool asyncRender = true);
29 Evas_Object *getImage();
30 void setSize(int w, int h);
31 void setPos(int x, int y);
32 void setFilePath(const char *filePath);
33 void loadFromData(const std::string &jsonData, const std::string &key);
37 void setSpeed(float speed) { mSpeed = speed;}
38 void setRepeatCount(int count);
39 void setRepeatMode(LottieView::RepeatMode mode);
40 float getFrameRate() const { return mFrameRate; }
41 long getTotalFrame() const { return mTotalFrame; }
50 void initializeBufferObject(Evas *evas);
52 void createVgNode(LOTNode *node, Efl_VG *parent);
53 void update(const std::vector<LOTNode *> &);
62 LottieView::RepeatMode mRepeatMode;
63 std::unique_ptr<lottie::Animation> mPlayer;
64 size_t mCurFrame{UINT_MAX};
65 Ecore_Animator *mAnimator{nullptr};
79 std::future<lottie::Surface> mRenderTask;
87 Lottie_Animation *mAnimation;