mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
api: add deprecated syntax for deprecated apis.
This commit is contained in:
parent
8844bdd1e9
commit
d0efdb9854
1 changed files with 13 additions and 6 deletions
19
inc/thorvg.h
19
inc/thorvg.h
|
@ -18,16 +18,22 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifdef TVG_BUILD
|
#ifdef TVG_BUILD
|
||||||
#define TVG_EXPORT __attribute__ ((visibility ("default")))
|
#ifdef _MSC_VER
|
||||||
|
#define TVG_EXPORT __declspec(dllexport)
|
||||||
|
#define TVG_DEPRECATED __declspec(deprecated)
|
||||||
|
#else
|
||||||
|
#define TVG_EXPORT __attribute__ ((visibility ("default")))
|
||||||
|
#define TVG_DEPRECATED __attribute__ ((__deprecated__))
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define TVG_EXPORT
|
#define TVG_EXPORT
|
||||||
|
#define TVG_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define _TVG_DECLARE_PRIVATE(A) \
|
#define _TVG_DECLARE_PRIVATE(A) \
|
||||||
protected: \
|
protected: \
|
||||||
struct Impl; \
|
struct Impl; \
|
||||||
|
@ -1013,11 +1019,10 @@ public:
|
||||||
* @retval Result::Unknown If an error occurs at a later stage.
|
* @retval Result::Unknown If an error occurs at a later stage.
|
||||||
*
|
*
|
||||||
* @warning: you have responsibility to release the @p data memory if the @p copy is true
|
* @warning: you have responsibility to release the @p data memory if the @p copy is true
|
||||||
*
|
* @deprecated Use load(const char* data, uint32_t size, const std::string& mimeType, bool copy) instead.
|
||||||
* @deprecated This method will go away next release.
|
* @see Result load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false) noexcept
|
||||||
* @see load(data, size, mimeType, copy)
|
|
||||||
*/
|
*/
|
||||||
Result load(const char* data, uint32_t size, bool copy = false) noexcept;
|
TVG_DEPRECATED Result load(const char* data, uint32_t size, bool copy = false) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Loads a picture data from a memory block of a given size.
|
* @brief Loads a picture data from a memory block of a given size.
|
||||||
|
@ -1033,6 +1038,8 @@ public:
|
||||||
* @retval Result::Unknown If an error occurs at a later stage.
|
* @retval Result::Unknown If an error occurs at a later stage.
|
||||||
*
|
*
|
||||||
* @warning: you have responsibility to release the @p data memory if the @p copy is true
|
* @warning: you have responsibility to release the @p data memory if the @p copy is true
|
||||||
|
*
|
||||||
|
* @BETA_API
|
||||||
*/
|
*/
|
||||||
Result load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false) noexcept;
|
Result load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false) noexcept;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue