move function prototype to animation.h
authorstart1a <start3a@gmail.com>
Mon, 28 Sep 2020 07:52:32 +0000 (16:52 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 11 Oct 2020 21:09:32 +0000 (06:09 +0900)
To prevent function prototype duplicate code in source.cpp.

example/rlottiePlayer/Source.cpp
example/rlottiePlayer/animation.h [new file with mode: 0644]
example/rlottiePlayer/rlottiePlayer.h
example/rlottiePlayer/rlottiePlayer.vcxproj
example/rlottiePlayer/rlottiePlayer.vcxproj.filters

index 2db0ba3..2eab13c 100644 (file)
@@ -1,4 +1,5 @@
 #include "rlottie.h"
+#include "animation.h"
 using namespace rlottie;
 
 std::unique_ptr<Animation> anim;
diff --git a/example/rlottiePlayer/animation.h b/example/rlottiePlayer/animation.h
new file mode 100644 (file)
index 0000000..0b1c199
--- /dev/null
@@ -0,0 +1,10 @@
+#pragma once
+#include <stdint.h>
+
+void      setAnimation(char* path, size_t w, size_t h);
+void      initAnimation(size_t w, size_t h);
+uint32_t* renderRLottieAnimation(uint32_t frameNum);
+size_t    getTotalFrame();
+bool      isAnimNULL();
+void      setAnimationColor(int r, int g, int b);
+void      freeAnimation();
\ No newline at end of file
index 404d97b..07e5fd2 100644 (file)
@@ -1,11 +1,11 @@
 #pragma once
 
 #include "resource.h"
+#include "animation.h"
 #include <Commdlg.h>                    // OPENFILENAME
 #include "atlconv.h"                    // String cast. (ex. LPWSTR <-> LPSTR)
 #include <gdiplus.h>
 #include <CommCtrl.h>                    // slider handle
-#include <stdint.h>
 
 // interval
 #define UI_INTERVAL 20
 #define RDOBTN_HEIGHT 20
 #define RESIZE_LENGTH 10
 
-void setAnimation(char* path, size_t w, size_t h);
-void initAnimation(size_t w, size_t h);
-uint32_t* renderRLottieAnimation(uint32_t frameNum);
-size_t getTotalFrame();
-bool isAnimNULL();
-void setAnimationColor(int r, int g, int b);
-void freeAnimation();
-
 typedef struct RlottieBitmap
 {
        Gdiplus::Bitmap* image = NULL;
index 700b030..18e6533 100644 (file)
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <ClInclude Include="animation.h" />
     <ClInclude Include="framework.h" />
     <ClInclude Include="Resource.h" />
     <ClInclude Include="rlottiePlayer.h" />
index 5c0486e..c8cf65b 100644 (file)
@@ -27,6 +27,9 @@
     <ClInclude Include="rlottiePlayer.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="animation.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="rlottiePlayer.cpp">