Files
clapper/src/lib/shared/clapper-api-visibility.h.in
Rafał Dzięgiel 72ab32d4ef shared: Do not print deprecations when compiling own code
We keep and use old functions in code for the compatibility reasons with
older API versions. Do not print warnings about them being deprecated when
compiling Clapper library that has and uses such function internally.
2025-06-08 17:17:23 +02:00

52 lines
2.0 KiB
C

/* Clapper API Visibility
* Copyright (C) 2024 Rafał Dzięgiel <rafostar.github@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#pragma once
#if !defined(__@CLAPPER_API@_INSIDE__) && !defined(@CLAPPER_API@_COMPILATION)
#error "This header file can not be included directly."
#endif
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(@CLAPPER_API@_STATIC_COMPILATION)
#define _@CLAPPER_API@_EXPORT __declspec(dllexport) extern
#define _@CLAPPER_API@_IMPORT __declspec(dllimport) extern
#elif __GNUC__ >= 4
#define _@CLAPPER_API@_EXPORT __attribute__((visibility("default"))) extern
#define _@CLAPPER_API@_IMPORT extern
#else
#define _@CLAPPER_API@_EXPORT extern
#define _@CLAPPER_API@_IMPORT extern
#endif
#if defined(@CLAPPER_API@_COMPILATION)
#define _@CLAPPER_API@_VISIBILITY _@CLAPPER_API@_EXPORT
#else
#define _@CLAPPER_API@_VISIBILITY _@CLAPPER_API@_IMPORT
#endif
#define @CLAPPER_API@_API _@CLAPPER_API@_VISIBILITY
#if !defined(@CLAPPER_API@_COMPILATION)
#define @CLAPPER_API@_DEPRECATED G_DEPRECATED _@CLAPPER_API@_VISIBILITY
#define @CLAPPER_API@_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _@CLAPPER_API@_VISIBILITY
#else
#define @CLAPPER_API@_DEPRECATED _@CLAPPER_API@_VISIBILITY
#define @CLAPPER_API@_DEPRECATED_FOR(f) _@CLAPPER_API@_VISIBILITY
#endif