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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
* GObject introspection: Versioning and export macros
*
* Copyright (C) 2014 Chun-wei Fan
*
* 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 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <glib.h>
#ifndef __GIVERSIONMACROS_H__
#define __GIVERSIONMACROS_H__
#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
#error "Only <girepository.h> can be included directly."
#endif
#ifndef _GI_EXTERN
#define _GI_EXTERN extern
#endif
#define GI_AVAILABLE_IN_ALL _GI_EXTERN
/* XXX: Every new stable minor release should add a set of macros here
*
* We are using the GLib versions here as the G-I minor versions
* need to be in sync with the GLib minor versions. Api's added
* at or before 1.30 are marked as GI_AVAILABLE_IN_ALL
*/
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32
# define GI_DEPRECATED_IN_1_32 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_32_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_32 _GI_EXTERN
# define GI_DEPRECATED_IN_1_32_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32
# define GI_AVAILABLE_IN_1_32 GLIB_UNAVAILABLE(2, 32)
#else
# define GI_AVAILABLE_IN_1_32 _GI_EXTERN
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34
# define GI_DEPRECATED_IN_1_34 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_34_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_34 _GI_EXTERN
# define GI_DEPRECATED_IN_1_34_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34
# define GI_AVAILABLE_IN_1_34 GLIB_UNAVAILABLE(2, 34)
#else
# define GI_AVAILABLE_IN_1_34 _GI_EXTERN
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36
# define GI_DEPRECATED_IN_1_36 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_36_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_36 _GI_EXTERN
# define GI_DEPRECATED_IN_1_36_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36
# define GI_AVAILABLE_IN_1_36 GLIB_UNAVAILABLE(2, 36)
#else
# define GI_AVAILABLE_IN_1_36 _GI_EXTERN
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38
# define GI_DEPRECATED_IN_1_38 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_38_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_38 _GI_EXTERN
# define GI_DEPRECATED_IN_1_38_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
# define GI_AVAILABLE_IN_1_38 GLIB_UNAVAILABLE(2, 38)
#else
# define GI_AVAILABLE_IN_1_38 _GI_EXTERN
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40
# define GI_DEPRECATED_IN_1_40 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_40_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_40 _GI_EXTERN
# define GI_DEPRECATED_IN_1_40_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40
# define GI_AVAILABLE_IN_1_40 GLIB_UNAVAILABLE(2, 40)
#else
# define GI_AVAILABLE_IN_1_40 _GI_EXTERN
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42
# define GI_DEPRECATED_IN_1_42 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_42_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_42 _GI_EXTERN
# define GI_DEPRECATED_IN_1_42_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42
# define GI_AVAILABLE_IN_1_42 GLIB_UNAVAILABLE(2, 42)
#else
# define GI_AVAILABLE_IN_1_42 _GI_EXTERN
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44
# define GI_DEPRECATED_IN_1_44 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_44_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_44 _GI_EXTERN
# define GI_DEPRECATED_IN_1_44_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44
# define GI_AVAILABLE_IN_1_44 GLIB_UNAVAILABLE(2, 44)
#else
# define GI_AVAILABLE_IN_1_44 _GI_EXTERN
#endif
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46
# define GI_DEPRECATED_IN_1_46 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_46_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_46 _GI_EXTERN
# define GI_DEPRECATED_IN_1_46_FOR(f) _GI_EXTERN
#endif
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46
# define GI_AVAILABLE_IN_1_46 GLIB_UNAVAILABLE(2, 46)
#else
# define GI_AVAILABLE_IN_1_46 _GI_EXTERN
#endif
#if defined(GLIB_VERSION_2_60) && GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60
# define GI_AVAILABLE_IN_1_60 GLIB_UNAVAILABLE(2, 60)
#else
# define GI_AVAILABLE_IN_1_60 _GI_EXTERN
#endif
#if defined(GLIB_VERSION_2_66) && GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66
# define GI_AVAILABLE_IN_1_66 GLIB_UNAVAILABLE(2, 66)
#else
# define GI_AVAILABLE_IN_1_66 _GI_EXTERN
#endif
#if defined(GLIB_VERSION_2_70) && GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_70
# define GI_AVAILABLE_IN_1_70 GLIB_UNAVAILABLE(2, 70)
#else
# define GI_AVAILABLE_IN_1_70 _GI_EXTERN
#endif
#if defined(GLIB_VERSION_2_72) && GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_72
# define GI_DEPRECATED_IN_1_72 GLIB_DEPRECATED
# define GI_DEPRECATED_IN_1_72_FOR(f) GLIB_DEPRECATED_FOR(f)
#else
# define GI_DEPRECATED_IN_1_72 _GI_EXTERN
# define GI_DEPRECATED_IN_1_72_FOR(f) _GI_EXTERN
#endif
#if defined(GLIB_VERSION_2_72) && GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_72
# define GI_AVAILABLE_IN_1_72 GLIB_UNAVAILABLE(2, 72)
#else
# define GI_AVAILABLE_IN_1_72 _GI_EXTERN
#endif
#endif /* __GIVERSIONMACROS_H__ */
|