4200862db890c93b5f8d4cec2f628fe888529f03
[platform/core/uifw/lottie-player.git] / example / rlottiePlayer / rlottiePlayer.h
1 #pragma once
2
3 #include "resource.h"
4 #include <Commdlg.h>                        // OPENFILENAME
5 #include "atlconv.h"                             // String cast. ex) LPWSTR <-> LPSTR
6 #include <gdiplus.h>
7 #include <CommCtrl.h>                                            // slider handle
8 #include <stdint.h>
9
10 // interval
11 #define UI_INTERVAL 20
12
13 // length
14 #define WND_WIDTH 1000
15 #define WND_HEIGHT 800
16 #define BMP_MAX_LEN     500
17 #define BTN_WIDTH 100
18 #define BTN_HEIGHT 30
19 #define TEXT_HEIGHT 20
20 #define SLIDER_HEIGHT 25
21 #define RDOBTN_WIDTH 60
22 #define RDOBTN_HEIGHT 20
23 #define RESIZE_LENGTH 10
24
25 void setAnimation(char* path, size_t w, size_t h);
26 void initAnimation(size_t w, size_t h);
27 uint32_t* renderRLottieAnimation(uint32_t frameNum);
28 size_t getTotalFrame();
29 bool isAnimNULL();
30 void setAnimationColor(int r, int g, int b);
31
32 typedef struct RlottieBitmap
33 {
34         Gdiplus::Bitmap* image = NULL;
35         int x = 0;
36         int y = 0;
37         unsigned int width = 0;
38         unsigned int height = 0;
39 }RlottieBitmap;