rlottie: rename LOT_EXPORT to RLOTTIE_API
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Fri, 7 Aug 2020 01:40:05 +0000 (10:40 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 9 Aug 2020 21:37:12 +0000 (06:37 +0900)
inc/rlottie.h
inc/rlottie_capi.h
inc/rlottiecommon.h
src/binding/c/lottieanimation_capi.cpp
src/lottie/lottieanimation.cpp
src/vector/stb/stb_image.cpp

index a34b451..9301045 100644 (file)
 
 #if defined _WIN32 || defined __CYGWIN__
   #ifdef LOT_BUILD
-    #define LOT_EXPORT __declspec(dllexport)
+    #define RLOTTIE_API __declspec(dllexport)
   #else
-    #define LOT_EXPORT __declspec(dllimport)
+    #define RLOTTIE_API __declspec(dllimport)
   #endif
 #else
   #ifdef LOT_BUILD
-      #define LOT_EXPORT __attribute__ ((visibility ("default")))
+      #define RLOTTIE_API __attribute__ ((visibility ("default")))
   #else
-      #define LOT_EXPORT
+      #define RLOTTIE_API
   #endif
 #endif
 
@@ -62,7 +62,7 @@ namespace rlottie {
  *
  *  @internal
  */
-LOT_EXPORT void configureModelCacheSize(size_t cacheSize);
+RLOTTIE_API void configureModelCacheSize(size_t cacheSize);
 
 struct Color {
     Color() = default;
@@ -122,7 +122,7 @@ struct Size_Type{};
 struct Float_Type{};
 template <typename T> struct MapType;
 
-class LOT_EXPORT Surface {
+class RLOTTIE_API Surface {
 public:
     /**
      *  @brief Surface object constructor.
@@ -268,7 +268,7 @@ using LayerInfoList = std::vector<std::tuple<std::string, int , int>>;
 
 using ColorFilter = std::function<void(float &r , float &g, float &b)>;
 
-class LOT_EXPORT Animation {
+class RLOTTIE_API Animation {
 public:
 
     /**
index 458f09e..9bdf336 100644 (file)
@@ -59,7 +59,7 @@ typedef struct Lottie_Animation_S Lottie_Animation;
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT Lottie_Animation *lottie_animation_from_file(const char *path);
+RLOTTIE_API Lottie_Animation *lottie_animation_from_file(const char *path);
 
 /**
  *  @brief Constructs an animation object from JSON string data.
@@ -74,7 +74,7 @@ LOT_EXPORT Lottie_Animation *lottie_animation_from_file(const char *path);
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT Lottie_Animation *lottie_animation_from_data(const char *data, const char *key, const char *resource_path);
+RLOTTIE_API Lottie_Animation *lottie_animation_from_data(const char *data, const char *key, const char *resource_path);
 
 /**
  *  @brief Free given Animation object resource.
@@ -87,7 +87,7 @@ LOT_EXPORT Lottie_Animation *lottie_animation_from_data(const char *data, const
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT void lottie_animation_destroy(Lottie_Animation *animation);
+RLOTTIE_API void lottie_animation_destroy(Lottie_Animation *animation);
 
 /**
  *  @brief Returns default viewport size of the Lottie resource.
@@ -99,7 +99,7 @@ LOT_EXPORT void lottie_animation_destroy(Lottie_Animation *animation);
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT void lottie_animation_get_size(const Lottie_Animation *animation, size_t *width, size_t *height);
+RLOTTIE_API void lottie_animation_get_size(const Lottie_Animation *animation, size_t *width, size_t *height);
 
 /**
  *  @brief Returns total animation duration of Lottie resource in second.
@@ -117,7 +117,7 @@ LOT_EXPORT void lottie_animation_get_size(const Lottie_Animation *animation, siz
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT double lottie_animation_get_duration(const Lottie_Animation *animation);
+RLOTTIE_API double lottie_animation_get_duration(const Lottie_Animation *animation);
 
 /**
  *  @brief Returns total number of frames present in the Lottie resource.
@@ -134,7 +134,7 @@ LOT_EXPORT double lottie_animation_get_duration(const Lottie_Animation *animatio
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT size_t lottie_animation_get_totalframe(const Lottie_Animation *animation);
+RLOTTIE_API size_t lottie_animation_get_totalframe(const Lottie_Animation *animation);
 
 /**
  *  @brief Returns default framerate of the Lottie resource.
@@ -147,7 +147,7 @@ LOT_EXPORT size_t lottie_animation_get_totalframe(const Lottie_Animation *animat
  *  @internal
  *
  */
-LOT_EXPORT double lottie_animation_get_framerate(const Lottie_Animation *animation);
+RLOTTIE_API double lottie_animation_get_framerate(const Lottie_Animation *animation);
 
 /**
  *  @brief Get the render tree which contains the snapshot of the animation object
@@ -168,7 +168,7 @@ LOT_EXPORT double lottie_animation_get_framerate(const Lottie_Animation *animati
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT const LOTLayerNode *lottie_animation_render_tree(Lottie_Animation *animation, size_t frame_num, size_t width, size_t height);
+RLOTTIE_API const LOTLayerNode *lottie_animation_render_tree(Lottie_Animation *animation, size_t frame_num, size_t width, size_t height);
 
 /**
  *  @brief Maps position to frame number and returns it.
@@ -183,7 +183,7 @@ LOT_EXPORT const LOTLayerNode *lottie_animation_render_tree(Lottie_Animation *an
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT size_t lottie_animation_get_frame_at_pos(const Lottie_Animation *animation, float pos);
+RLOTTIE_API size_t lottie_animation_get_frame_at_pos(const Lottie_Animation *animation, float pos);
 
 /**
  *  @brief Request to render the content of the frame @p frame_num to buffer @p buffer.
@@ -199,7 +199,7 @@ LOT_EXPORT size_t lottie_animation_get_frame_at_pos(const Lottie_Animation *anim
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT void lottie_animation_render(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
+RLOTTIE_API void lottie_animation_render(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
 
 /**
  *  @brief Request to render the content of the frame @p frame_num to buffer @p buffer asynchronously.
@@ -216,7 +216,7 @@ LOT_EXPORT void lottie_animation_render(Lottie_Animation *animation, size_t fram
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT void lottie_animation_render_async(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
+RLOTTIE_API void lottie_animation_render_async(Lottie_Animation *animation, size_t frame_num, uint32_t *buffer, size_t width, size_t height, size_t bytes_per_line);
 
 /**
  *  @brief Request to finish the current async renderer job for this animation object.
@@ -233,7 +233,7 @@ LOT_EXPORT void lottie_animation_render_async(Lottie_Animation *animation, size_
  *  @ingroup Lottie_Animation
  *  @internal
  */
-LOT_EXPORT uint32_t *lottie_animation_render_flush(Lottie_Animation *animation);
+RLOTTIE_API uint32_t *lottie_animation_render_flush(Lottie_Animation *animation);
 
 
 /**
@@ -257,7 +257,7 @@ LOT_EXPORT uint32_t *lottie_animation_render_flush(Lottie_Animation *animation);
  *  @ingroup Lottie_Animation
  *  @internal
  * */
-LOT_EXPORT void lottie_animation_property_override(Lottie_Animation *animation, const Lottie_Animation_Property type, const char *keypath, ...);
+RLOTTIE_API void lottie_animation_property_override(Lottie_Animation *animation, const Lottie_Animation_Property type, const char *keypath, ...);
 
 
 /**
@@ -272,7 +272,7 @@ LOT_EXPORT void lottie_animation_property_override(Lottie_Animation *animation,
  *  @ingroup Lottie_Animation
  *  @internal
  * */
-LOT_EXPORT const LOTMarkerList* lottie_animation_get_markerlist(Lottie_Animation *animation);
+RLOTTIE_API const LOTMarkerList* lottie_animation_get_markerlist(Lottie_Animation *animation);
 
 #ifdef __cplusplus
 }
index 609778e..b0302a8 100644 (file)
 
 #if defined _WIN32 || defined __CYGWIN__
   #ifdef LOT_BUILD
-    #define LOT_EXPORT __declspec(dllexport)
+    #define RLOTTIE_API __declspec(dllexport)
   #else
-    #define LOT_EXPORT __declspec(dllimport)
+    #define RLOTTIE_API __declspec(dllimport)
   #endif
 #else
   #ifdef LOT_BUILD
-      #define LOT_EXPORT __attribute__ ((visibility ("default")))
+      #define RLOTTIE_API __attribute__ ((visibility ("default")))
   #else
-      #define LOT_EXPORT
+      #define RLOTTIE_API
   #endif
 #endif
 
index 1eeba24..2434b5f 100644 (file)
@@ -38,7 +38,7 @@ struct Lottie_Animation_S
     LOTMarkerList                  *mMarkerList;
 };
 
-LOT_EXPORT Lottie_Animation_S *lottie_animation_from_file(const char *path)
+RLOTTIE_API Lottie_Animation_S *lottie_animation_from_file(const char *path)
 {
     if (auto animation = Animation::loadFromFile(path) ) {
         Lottie_Animation_S *handle = new Lottie_Animation_S();
@@ -49,7 +49,7 @@ LOT_EXPORT Lottie_Animation_S *lottie_animation_from_file(const char *path)
     }
 }
 
-LOT_EXPORT Lottie_Animation_S *lottie_animation_from_data(const char *data, const char *key, const char *resourcePath)
+RLOTTIE_API Lottie_Animation_S *lottie_animation_from_data(const char *data, const char *key, const char *resourcePath)
 {
     if (auto animation = Animation::loadFromData(data, key, resourcePath) ) {
         Lottie_Animation_S *handle = new Lottie_Animation_S();
@@ -60,7 +60,7 @@ LOT_EXPORT Lottie_Animation_S *lottie_animation_from_data(const char *data, cons
     }
 }
 
-LOT_EXPORT void lottie_animation_destroy(Lottie_Animation_S *animation)
+RLOTTIE_API void lottie_animation_destroy(Lottie_Animation_S *animation)
 {
     if (animation) {
         if (animation->mMarkerList) {
@@ -79,21 +79,21 @@ LOT_EXPORT void lottie_animation_destroy(Lottie_Animation_S *animation)
     }
 }
 
-LOT_EXPORT void lottie_animation_get_size(const Lottie_Animation_S *animation, size_t *width, size_t *height)
+RLOTTIE_API void lottie_animation_get_size(const Lottie_Animation_S *animation, size_t *width, size_t *height)
 {
    if (!animation) return;
 
    animation->mAnimation->size(*width, *height);
 }
 
-LOT_EXPORT double lottie_animation_get_duration(const Lottie_Animation_S *animation)
+RLOTTIE_API double lottie_animation_get_duration(const Lottie_Animation_S *animation)
 {
    if (!animation) return 0;
 
    return animation->mAnimation->duration();
 }
 
-LOT_EXPORT size_t lottie_animation_get_totalframe(const Lottie_Animation_S *animation)
+RLOTTIE_API size_t lottie_animation_get_totalframe(const Lottie_Animation_S *animation)
 {
    if (!animation) return 0;
 
@@ -101,21 +101,21 @@ LOT_EXPORT size_t lottie_animation_get_totalframe(const Lottie_Animation_S *anim
 }
 
 
-LOT_EXPORT double lottie_animation_get_framerate(const Lottie_Animation_S *animation)
+RLOTTIE_API double lottie_animation_get_framerate(const Lottie_Animation_S *animation)
 {
    if (!animation) return 0;
 
    return animation->mAnimation->frameRate();
 }
 
-LOT_EXPORT const LOTLayerNode * lottie_animation_render_tree(Lottie_Animation_S *animation, size_t frame_num, size_t width, size_t height)
+RLOTTIE_API const LOTLayerNode * lottie_animation_render_tree(Lottie_Animation_S *animation, size_t frame_num, size_t width, size_t height)
 {
     if (!animation) return nullptr;
 
     return animation->mAnimation->renderTree(frame_num, width, height);
 }
 
-LOT_EXPORT size_t
+RLOTTIE_API size_t
 lottie_animation_get_frame_at_pos(const Lottie_Animation_S *animation, float pos)
 {
     if (!animation) return 0;
@@ -123,7 +123,7 @@ lottie_animation_get_frame_at_pos(const Lottie_Animation_S *animation, float pos
     return animation->mAnimation->frameAtPos(pos);
 }
 
-LOT_EXPORT void
+RLOTTIE_API void
 lottie_animation_render(Lottie_Animation_S *animation,
                         size_t frame_number,
                         uint32_t *buffer,
@@ -137,7 +137,7 @@ lottie_animation_render(Lottie_Animation_S *animation,
     animation->mAnimation->renderSync(frame_number, surface);
 }
 
-LOT_EXPORT void
+RLOTTIE_API void
 lottie_animation_render_async(Lottie_Animation_S *animation,
                               size_t frame_number,
                               uint32_t *buffer,
@@ -152,7 +152,7 @@ lottie_animation_render_async(Lottie_Animation_S *animation,
     animation->mBufferRef = buffer;
 }
 
-LOT_EXPORT uint32_t *
+RLOTTIE_API uint32_t *
 lottie_animation_render_flush(Lottie_Animation_S *animation)
 {
     if (!animation) return nullptr;
@@ -164,7 +164,7 @@ lottie_animation_render_flush(Lottie_Animation_S *animation)
     return animation->mBufferRef;
 }
 
-LOT_EXPORT void
+RLOTTIE_API void
 lottie_animation_property_override(Lottie_Animation_S *animation,
                                    const Lottie_Animation_Property type,
                                    const char *keypath,
@@ -254,7 +254,7 @@ lottie_animation_property_override(Lottie_Animation_S *animation,
     }
 }
 
-LOT_EXPORT const LOTMarkerList*
+RLOTTIE_API const LOTMarkerList*
 lottie_animation_get_markerlist(Lottie_Animation_S *animation)
 {
    if (!animation) return nullptr;
index 28de6b8..601c065 100644 (file)
@@ -29,7 +29,7 @@
 using namespace rlottie;
 using namespace rlottie::internal;
 
-LOT_EXPORT void rlottie::configureModelCacheSize(size_t cacheSize)
+RLOTTIE_API void rlottie::configureModelCacheSize(size_t cacheSize)
 {
     internal::model::configureModelCacheSize(cacheSize);
 }
index dceab58..ea67017 100644 (file)
 
 #if defined _WIN32 || defined __CYGWIN__
   #ifdef LOT_BUILD
-    #define LOT_EXPORT __declspec(dllexport)
+    #define RLOTTIE_API __declspec(dllexport)
   #else
-    #define LOT_EXPORT __declspec(dllimport)
+    #define RLOTTIE_API __declspec(dllimport)
   #endif
 #else
   #ifdef LOT_BUILD
-      #define LOT_EXPORT __attribute__ ((visibility ("default")))
+      #define RLOTTIE_API __attribute__ ((visibility ("default")))
   #else
-      #define LOT_EXPORT
+      #define RLOTTIE_API
   #endif
 #endif
 
@@ -35,13 +35,13 @@ extern "C" {
  * exported function wrapper from the library
  */
 
-LOT_EXPORT unsigned char *lottie_image_load(char const *filename, int *x,
+RLOTTIE_API unsigned char *lottie_image_load(char const *filename, int *x,
                                             int *y, int *comp, int req_comp)
 {
     return stbi_load(filename, x, y, comp, req_comp);
 }
 
-LOT_EXPORT unsigned char *lottie_image_load_from_data(const char *imageData,
+RLOTTIE_API unsigned char *lottie_image_load_from_data(const char *imageData,
                                                       int len, int *x, int *y,
                                                       int *comp, int req_comp)
 {
@@ -49,7 +49,7 @@ LOT_EXPORT unsigned char *lottie_image_load_from_data(const char *imageData,
     return stbi_load_from_memory(data, len, x, y, comp, req_comp);
 }
 
-LOT_EXPORT void lottie_image_free(unsigned char *data)
+RLOTTIE_API void lottie_image_free(unsigned char *data)
 {
     stbi_image_free(data);
 }