Swiftgram/example/demo.cpp
subhransu mohanty 0347a9677f lottie/example: updated evasapp to handle keyevent propagation.
Change-Id: Iecc3479ef011e64e113a50f3914676e0a6341f49
2018-07-17 13:58:51 +09:00

42 lines
696 B
C++

#include "evasapp.h"
#include "lottieview.h"
#include<iostream>
#include <stdio.h>
using namespace std;
static void
onExitCb(void *data, void *extra)
{
LottieView *view = (LottieView *)data;
delete view;
}
int
main(void)
{
EvasApp *app = new EvasApp(800, 800);
app->setup();
std::string filePath = DEMO_DIR;
filePath +="mask.json";
LottieView *view = new LottieView(app->evas());
view->setFilePath(filePath.c_str());
view->setPos(0, 0);
view->setSize(800, 800);
view->show();
view->play();
view->loop(true);
view->setRepeatMode(LottieView::RepeatMode::Reverse);
app->addExitCb(onExitCb, view);
app->run();
delete app;
return 0;
}