Swiftgram/inc/lotplayer.h
subhransu mohanty bfbe3c986a lottie: fixed warnings generated by '-Wextra' flag.
Change-Id: I73c122f61e628bdbdb6ab98bb68b7d32ab9f4ec0
2018-08-21 13:26:08 +09:00

42 lines
917 B
C++

#ifndef _LOT_PLAYER_H_
#define _LOT_PLAYER_H_
#include <future>
#include <vector>
#include "lotcommon.h"
//TODO: Hide this.
class LOTPlayerPrivate;
#define _LOT_PLAYER_DECLARE_PRIVATE(A) \
class A##Private *d;
namespace lottieplayer {
class LOT_EXPORT LOTPlayer {
public:
~LOTPlayer();
LOTPlayer();
bool setFilePath(const char *filePath);
float playTime() const;
float pos() const;
const std::vector<LOTNode *> &renderList(float pos) const;
// TODO: Consider correct position...
void setSize(int width, int height);
void size(int &width, int &height) const;
std::future<bool> render(float pos, LOTBuffer buffer, bool forceRender = false);
bool renderSync(float pos, LOTBuffer buffer, bool forceRender = false);
private:
_LOT_PLAYER_DECLARE_PRIVATE(LOTPlayer)
};
} // namespace lotplayer
#endif // _LOT_PLAYER_H_