2021-08-25 00:30:10 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* libragephoto RAGE Photo Parser
|
2023-02-07 03:06:22 +01:00
|
|
|
* Copyright (C) 2023 Syping
|
2021-08-25 00:30:10 +02:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
|
|
* are permitted provided that the following conditions are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer.
|
|
|
|
*
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* This software is provided as-is, no warranties are given to you, we are not
|
|
|
|
* responsible for anything with use of the software, you are self responsible.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2023-02-07 03:06:22 +01:00
|
|
|
#ifndef RAGEPHOTOLIBRARY_H
|
|
|
|
#define RAGEPHOTOLIBRARY_H
|
2021-08-25 00:30:10 +02:00
|
|
|
|
2023-02-07 03:06:22 +01:00
|
|
|
#include "RagePhotoConfig.h"
|
2021-11-03 10:19:32 +01:00
|
|
|
|
2023-02-07 03:06:22 +01:00
|
|
|
/* RAGEPHOTO LIBRARY BINDING BEGIN */
|
2021-08-25 00:30:10 +02:00
|
|
|
#ifdef _WIN32
|
2021-08-29 03:06:14 +02:00
|
|
|
#ifndef LIBRAGEPHOTO_STATIC
|
2021-08-25 00:30:10 +02:00
|
|
|
#ifdef LIBRAGEPHOTO_LIBRARY
|
2023-04-09 21:22:13 +02:00
|
|
|
#define LIBRAGEPHOTO_C_PUBLIC __declspec(dllexport)
|
|
|
|
#define LIBRAGEPHOTO_CXX_PUBLIC __declspec(dllexport)
|
2021-08-25 00:30:10 +02:00
|
|
|
#else
|
2023-04-09 21:22:13 +02:00
|
|
|
#define LIBRAGEPHOTO_C_PUBLIC __declspec(dllimport)
|
|
|
|
#define LIBRAGEPHOTO_CXX_PUBLIC __declspec(dllimport)
|
2021-11-03 10:19:32 +01:00
|
|
|
#endif // LIBRAGEPHOTO_LIBRARY
|
2021-08-25 00:30:10 +02:00
|
|
|
#else
|
2023-04-09 21:22:13 +02:00
|
|
|
#define LIBRAGEPHOTO_C_PUBLIC
|
|
|
|
#define LIBRAGEPHOTO_CXX_PUBLIC
|
2021-11-03 10:19:32 +01:00
|
|
|
#endif // LIBRAGEPHOTO_STATIC
|
2021-08-29 03:06:14 +02:00
|
|
|
#else
|
2021-11-16 06:20:20 +01:00
|
|
|
#ifdef __EMSCRIPTEN__
|
|
|
|
#include <emscripten/emscripten.h>
|
2023-04-09 21:22:13 +02:00
|
|
|
#define LIBRAGEPHOTO_C_PUBLIC EMSCRIPTEN_KEEPALIVE
|
|
|
|
#define LIBRAGEPHOTO_CXX_PUBLIC
|
2021-11-16 06:20:20 +01:00
|
|
|
#else
|
2023-04-09 21:22:13 +02:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#ifndef LIBRAGEPHOTO_STATIC
|
|
|
|
#define LIBRAGEPHOTO_C_PUBLIC __attribute__((visibility("default")))
|
|
|
|
#define LIBRAGEPHOTO_CXX_PUBLIC __attribute__((visibility("default")))
|
|
|
|
#else
|
|
|
|
#define LIBRAGEPHOTO_C_PUBLIC
|
|
|
|
#define LIBRAGEPHOTO_CXX_PUBLIC
|
|
|
|
#endif // LIBRAGEPHOTO_STATIC
|
|
|
|
#else
|
|
|
|
#define LIBRAGEPHOTO_C_PUBLIC
|
|
|
|
#define LIBRAGEPHOTO_CXX_PUBLIC
|
|
|
|
#endif // __GNUC__
|
2021-11-16 06:20:20 +01:00
|
|
|
#endif // __EMSCRIPTEN__
|
2021-11-03 10:19:32 +01:00
|
|
|
#endif // _WIN32
|
2023-02-07 03:06:22 +01:00
|
|
|
/* RAGEPHOTO LIBRARY BINDING END */
|
2021-08-25 00:30:10 +02:00
|
|
|
|
2023-06-11 05:41:32 +02:00
|
|
|
/* ENABLE C API FOR LIBRAGEPHOTO WASM LIBRARY BEGIN */
|
2023-02-07 03:06:22 +01:00
|
|
|
#ifdef LIBRAGEPHOTO_WASM
|
2023-06-11 05:41:32 +02:00
|
|
|
#ifdef LIBRAGEPHOTO_CXX_ONLY
|
|
|
|
#undef LIBRAGEPHOTO_CXX_ONLY
|
|
|
|
#define LIBRAGEPHOTO_CXX_C
|
|
|
|
#endif // LIBRAGEPHOTO_CXX_ONLY
|
2023-02-07 03:06:22 +01:00
|
|
|
#endif // LIBRAGEPHOTO_WASM
|
2023-06-11 05:41:32 +02:00
|
|
|
/* ENABLE C API FOR LIBRAGEPHOTO WASM LIBRARY END */
|
2023-02-07 03:06:22 +01:00
|
|
|
|
|
|
|
#endif // RAGEPHOTOLIBRARY_H
|