summaryrefslogtreecommitdiffstats
path: root/subprojects/libhandy/src/hdy-deprecation-macros.h
blob: e889135bbb2d2fa0dea20235f7fe60cb8527b82f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (C) 2017 Purism SPC
 *
 * SPDX-License-Identifier: LGPL-2.1+
 */

#pragma once

#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif

#if defined(HDY_DISABLE_DEPRECATION_WARNINGS) || defined(HANDY_COMPILATION)
#  define _HDY_DEPRECATED
#  define _HDY_DEPRECATED_FOR(f)
#  define _HDY_DEPRECATED_MACRO
#  define _HDY_DEPRECATED_MACRO_FOR(f)
#  define _HDY_DEPRECATED_ENUMERATOR
#  define _HDY_DEPRECATED_ENUMERATOR_FOR(f)
#  define _HDY_DEPRECATED_TYPE
#  define _HDY_DEPRECATED_TYPE_FOR(f)
#else
#  define _HDY_DEPRECATED                G_DEPRECATED
#  define _HDY_DEPRECATED_FOR(f)         G_DEPRECATED_FOR(f)
#  define _HDY_DEPRECATED_MACRO          G_DEPRECATED
#  define _HDY_DEPRECATED_MACRO_FOR(f)   G_DEPRECATED_FOR(f)
#  define _HDY_DEPRECATED_ENUMERATOR          G_DEPRECATED
#  define _HDY_DEPRECATED_ENUMERATOR_FOR(f)   G_DEPRECATED_FOR(f)
#  define _HDY_DEPRECATED_TYPE           G_DEPRECATED
#  define _HDY_DEPRECATED_TYPE_FOR(f)    G_DEPRECATED_FOR(f)
#endif