gobject-introspection: fix virtual annotations and missing type descriptions
[atk.git] / atk / atkversion.h.in
blob36946db4eb56623332146e7d315e5b718f16d1a9
1 /* ATK - Accessibility Toolkit
3 * Copyright (C) 2012 Igalia, S.L.
4 * Copyright (C) 2014 Chun-wei Fan
6 * Author: Alejandro PiƱeiro Iglesias <apinheiro@igalia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
25 #error "Only <atk/atk.h> can be included directly."
26 #endif
28 #ifndef __ATK_VERSION_H__
29 #define __ATK_VERSION_H__
31 #include <glib.h>
33 /**
34 * ATK_MAJOR_VERSION:
36 * Like atk_get_major_version(), but from the headers used at
37 * application compile time, rather than from the library linked
38 * against at application run time.
40 * Since: 2.7.4
42 #define ATK_MAJOR_VERSION (@ATK_MAJOR_VERSION@)
44 /**
45 * ATK_MINOR_VERSION:
47 * Like atk_get_minor_version(), but from the headers used at
48 * application compile time, rather than from the library linked
49 * against at application run time.
51 * Since: 2.7.4
53 #define ATK_MINOR_VERSION (@ATK_MINOR_VERSION@)
55 /**
56 * ATK_MICRO_VERSION:
58 * Like atk_get_micro_version(), but from the headers used at
59 * application compile time, rather than from the library linked
60 * against at application run time.
62 * Since: 2.7.4
64 #define ATK_MICRO_VERSION (@ATK_MICRO_VERSION@)
66 /**
67 * ATK_BINARY_AGE:
69 * Like atk_get_binary_age(), but from the headers used at
70 * application compile time, rather than from the library linked
71 * against at application run time.
73 * Since: 2.7.4
75 #define ATK_BINARY_AGE (@ATK_BINARY_AGE@)
77 /**
78 * ATK_INTERFACE_AGE:
80 * Like atk_get_interface_age(), but from the headers used at
81 * application compile time, rather than from the library linked
82 * against at application run time.
84 * Since: 2.7.4
86 #define ATK_INTERFACE_AGE (@ATK_INTERFACE_AGE@)
88 /**
89 * ATK_CHECK_VERSION:
90 * @major: major version (e.g. 1 for version 1.2.5)
91 * @minor: minor version (e.g. 2 for version 1.2.5)
92 * @micro: micro version (e.g. 5 for version 1.2.5)
94 * Returns %TRUE if the version of the ATK header files is the same as
95 * or newer than the passed-in version.
97 * Since: 2.7.4
99 #define ATK_CHECK_VERSION(major,minor,micro) \
100 (ATK_MAJOR_VERSION > (major) || \
101 (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION > (minor)) || \
102 (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION == (minor) && \
103 ATK_MICRO_VERSION >= (micro)))
105 #ifndef _ATK_EXTERN
106 #define _ATK_EXTERN extern
107 #endif
110 * ATK_VERSION_2_2:
112 * A macro that evaluates to the 2.2 version of ATK, in a format
113 * that can be used by the C pre-processor.
115 * Since: 2.14
117 #define ATK_VERSION_2_2 (G_ENCODE_VERSION (2, 2))
120 * ATK_VERSION_2_4:
122 * A macro that evaluates to the 2.4 version of ATK, in a format
123 * that can be used by the C pre-processor.
125 * Since: 2.14
127 #define ATK_VERSION_2_4 (G_ENCODE_VERSION (2, 4))
130 * ATK_VERSION_2_6:
132 * A macro that evaluates to the 2.6 version of ATK, in a format
133 * that can be used by the C pre-processor.
135 * Since: 2.14
137 #define ATK_VERSION_2_6 (G_ENCODE_VERSION (2, 6))
140 * ATK_VERSION_2_8:
142 * A macro that evaluates to the 2.8 version of ATK, in a format
143 * that can be used by the C pre-processor.
145 * Since: 2.14
147 #define ATK_VERSION_2_8 (G_ENCODE_VERSION (2, 8))
150 * ATK_VERSION_2_10:
152 * A macro that evaluates to the 2.10 version of ATK, in a format
153 * that can be used by the C pre-processor.
155 * Since: 2.14
158 #define ATK_VERSION_2_10 (G_ENCODE_VERSION (2, 10))
160 * ATK_VERSION_2_12:
162 * A macro that evaluates to the 2.12 version of ATK, in a format
163 * that can be used by the C pre-processor.
165 * Since: 2.14
167 #define ATK_VERSION_2_12 (G_ENCODE_VERSION (2, 12))
170 * ATK_VERSION_2_14:
172 * A macro that evaluates to the 2.14 version of ATK, in a format
173 * that can be used by the C pre-processor.
175 * Since: 2.14
177 #define ATK_VERSION_2_14 (G_ENCODE_VERSION (2, 14))
180 * ATK_VERSION_2_30:
182 * A macro that evaluates to the 2.30 version of ATK, in a format
183 * that can be used by the C pre-processor.
185 * Since: 2.30
187 #define ATK_VERSION_2_30 (G_ENCODE_VERSION (2, 30))
189 /* evaluates to the current stable version; for development cycles,
190 * this means the next stable target
192 #if (ATK_MINOR_VERSION % 2)
193 #define ATK_VERSION_CUR_STABLE (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION + 1))
194 #else
195 #define ATK_VERSION_CUR_STABLE (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION))
196 #endif
198 /* evaluates to the previous stable version */
199 #if (ATK_MINOR_VERSION % 2)
200 #define ATK_VERSION_PREV_STABLE (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION - 1))
201 #else
202 #define ATK_VERSION_PREV_STABLE (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION - 2))
203 #endif
206 * ATK_VERSION_MIN_REQUIRED:
208 * A macro that should be defined by the user prior to including
209 * the atk/atk.h header.
210 * The definition should be one of the predefined ATK version
211 * macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,...
213 * This macro defines the earliest version of ATK that the package is
214 * required to be able to compile against.
216 * If the compiler is configured to warn about the use of deprecated
217 * functions, then using functions that were deprecated in version
218 * %ATK_VERSION_MIN_REQUIRED or earlier will cause warnings (but
219 * using functions deprecated in later releases will not).
221 * Since: 2.14
223 /* If the package sets ATK_VERSION_MIN_REQUIRED to some future
224 * ATK_VERSION_X_Y value that we don't know about, it will compare as
225 * 0 in preprocessor tests.
227 #ifndef ATK_VERSION_MIN_REQUIRED
228 # define ATK_VERSION_MIN_REQUIRED (ATK_VERSION_CUR_STABLE)
229 #elif ATK_VERSION_MIN_REQUIRED == 0
230 # undef ATK_VERSION_MIN_REQUIRED
231 # define ATK_VERSION_MIN_REQUIRED (ATK_VERSION_CUR_STABLE + 2)
232 #endif
235 * ATK_VERSION_MAX_ALLOWED:
237 * A macro that should be defined by the user prior to including
238 * the atk/atk.h header.
239 * The definition should be one of the predefined ATK version
240 * macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,...
242 * This macro defines the latest version of the ATK API that the
243 * package is allowed to make use of.
245 * If the compiler is configured to warn about the use of deprecated
246 * functions, then using functions added after version
247 * %ATK_VERSION_MAX_ALLOWED will cause warnings.
249 * Unless you are using ATK_CHECK_VERSION() or the like to compile
250 * different code depending on the ATK version, then this should be
251 * set to the same value as %ATK_VERSION_MIN_REQUIRED.
253 * Since: 2.14
255 #if !defined (ATK_VERSION_MAX_ALLOWED) || (ATK_VERSION_MAX_ALLOWED == 0)
256 # undef ATK_VERSION_MAX_ALLOWED
257 # define ATK_VERSION_MAX_ALLOWED (ATK_VERSION_CUR_STABLE)
258 #endif
260 /* sanity checks */
261 #if ATK_VERSION_MIN_REQUIRED > ATK_VERSION_CUR_STABLE
262 #error "ATK_VERSION_MIN_REQUIRED must be <= ATK_VERSION_CUR_STABLE"
263 #endif
264 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_MIN_REQUIRED
265 #error "ATK_VERSION_MAX_ALLOWED must be >= ATK_VERSION_MIN_REQUIRED"
266 #endif
267 #if ATK_VERSION_MIN_REQUIRED < ATK_VERSION_2_2
268 #error "ATK_VERSION_MIN_REQUIRED must be >= ATK_VERSION_2_2"
269 #endif
271 /* these macros are used to mark deprecated functions, and thus have to be
272 * exposed in a public header.
274 * do *not* use them in other libraries depending on Atk: use G_DEPRECATED
275 * and G_DEPRECATED_FOR, or use your own wrappers around them.
277 #ifdef ATK_DISABLE_DEPRECATION_WARNINGS
278 #define ATK_DEPRECATED _ATK_EXTERN
279 #define ATK_DEPRECATED_FOR(f) _ATK_EXTERN
280 #define ATK_UNAVAILABLE(maj,min) _ATK_EXTERN
281 #else
282 #define ATK_DEPRECATED G_DEPRECATED _ATK_EXTERN
283 #define ATK_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _ATK_EXTERN
284 #define ATK_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _ATK_EXTERN
285 #endif
287 #define ATK_AVAILABLE_IN_ALL _ATK_EXTERN
289 /* XXX: Every new stable minor release should add a set of macros here */
291 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_2
292 # define ATK_DEPRECATED_IN_2_2 ATK_DEPRECATED
293 # define ATK_DEPRECATED_IN_2_2_FOR(f) ATK_DEPRECATED_FOR(f)
294 #else
295 # define ATK_DEPRECATED_IN_2_2 _ATK_EXTERN
296 # define ATK_DEPRECATED_IN_2_2_FOR(f) _ATK_EXTERN
297 #endif
299 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_2
300 # define ATK_AVAILABLE_IN_2_2 ATK_UNAVAILABLE(2, 2)
301 #else
302 # define ATK_AVAILABLE_IN_2_2 _ATK_EXTERN
303 #endif
305 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_4
306 # define ATK_DEPRECATED_IN_2_4 ATK_DEPRECATED
307 # define ATK_DEPRECATED_IN_2_4_FOR(f) ATK_DEPRECATED_FOR(f)
308 #else
309 # define ATK_DEPRECATED_IN_2_4 _ATK_EXTERN
310 # define ATK_DEPRECATED_IN_2_4_FOR(f) _ATK_EXTERN
311 #endif
313 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_4
314 # define ATK_AVAILABLE_IN_2_4 ATK_UNAVAILABLE(2, 4)
315 #else
316 # define ATK_AVAILABLE_IN_2_4 _ATK_EXTERN
317 #endif
319 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_6
320 # define ATK_DEPRECATED_IN_2_6 ATK_DEPRECATED
321 # define ATK_DEPRECATED_IN_2_6_FOR(f) ATK_DEPRECATED_FOR(f)
322 #else
323 # define ATK_DEPRECATED_IN_2_6 _ATK_EXTERN
324 # define ATK_DEPRECATED_IN_2_6_FOR(f) _ATK_EXTERN
325 #endif
327 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_6
328 # define ATK_AVAILABLE_IN_2_6 ATK_UNAVAILABLE(2, 6)
329 #else
330 # define ATK_AVAILABLE_IN_2_6 _ATK_EXTERN
331 #endif
333 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_8
334 # define ATK_DEPRECATED_IN_2_8 ATK_DEPRECATED
335 # define ATK_DEPRECATED_IN_2_8_FOR(f) ATK_DEPRECATED_FOR(f)
336 #else
337 # define ATK_DEPRECATED_IN_2_8 _ATK_EXTERN
338 # define ATK_DEPRECATED_IN_2_8_FOR(f) _ATK_EXTERN
339 #endif
341 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_8
342 # define ATK_AVAILABLE_IN_2_8 ATK_UNAVAILABLE(2, 8)
343 #else
344 # define ATK_AVAILABLE_IN_2_8 _ATK_EXTERN
345 #endif
347 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_10
348 # define ATK_DEPRECATED_IN_2_10 ATK_DEPRECATED
349 # define ATK_DEPRECATED_IN_2_10_FOR(f) ATK_DEPRECATED_FOR(f)
350 #else
351 # define ATK_DEPRECATED_IN_2_10 _ATK_EXTERN
352 # define ATK_DEPRECATED_IN_2_10_FOR(f) _ATK_EXTERN
353 #endif
355 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_10
356 # define ATK_AVAILABLE_IN_2_10 ATK_UNAVAILABLE(2, 10)
357 #else
358 # define ATK_AVAILABLE_IN_2_10 _ATK_EXTERN
359 #endif
361 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_12
362 # define ATK_DEPRECATED_IN_2_12 ATK_DEPRECATED
363 # define ATK_DEPRECATED_IN_2_12_FOR(f) ATK_DEPRECATED_FOR(f)
364 #else
365 # define ATK_DEPRECATED_IN_2_12 _ATK_EXTERN
366 # define ATK_DEPRECATED_IN_2_12_FOR(f) _ATK_EXTERN
367 #endif
369 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_12
370 # define ATK_AVAILABLE_IN_2_12 ATK_UNAVAILABLE(2, 12)
371 #else
372 # define ATK_AVAILABLE_IN_2_12 _ATK_EXTERN
373 #endif
375 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_14
376 # define ATK_DEPRECATED_IN_2_14 ATK_DEPRECATED
377 # define ATK_DEPRECATED_IN_2_14_FOR(f) ATK_DEPRECATED_FOR(f)
378 #else
379 # define ATK_DEPRECATED_IN_2_14 _ATK_EXTERN
380 # define ATK_DEPRECATED_IN_2_14_FOR(f) _ATK_EXTERN
381 #endif
383 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_14
384 # define ATK_AVAILABLE_IN_2_14 ATK_UNAVAILABLE(2, 14)
385 #else
386 # define ATK_AVAILABLE_IN_2_14 _ATK_EXTERN
387 #endif
389 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_30
390 # define ATK_DEPRECATED_IN_2_30 ATK_DEPRECATED
391 # define ATK_DEPRECATED_IN_2_30_FOR(f) ATK_DEPRECATED_FOR(f)
392 #else
393 # define ATK_DEPRECATED_IN_2_30 _ATK_EXTERN
394 # define ATK_DEPRECATED_IN_2_30_FOR(f) _ATK_EXTERN
395 #endif
397 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_30
398 # define ATK_AVAILABLE_IN_2_30 ATK_UNAVAILABLE(2, 30)
399 #else
400 # define ATK_AVAILABLE_IN_2_30 _ATK_EXTERN
401 #endif
403 ATK_AVAILABLE_IN_2_8
404 guint atk_get_major_version (void) G_GNUC_CONST;
405 ATK_AVAILABLE_IN_2_8
406 guint atk_get_minor_version (void) G_GNUC_CONST;
407 ATK_AVAILABLE_IN_2_8
408 guint atk_get_micro_version (void) G_GNUC_CONST;
409 ATK_AVAILABLE_IN_2_8
410 guint atk_get_binary_age (void) G_GNUC_CONST;
411 ATK_AVAILABLE_IN_2_8
412 guint atk_get_interface_age (void) G_GNUC_CONST;
414 #define atk_major_version atk_get_major_version ()
415 #define atk_minor_version atk_get_minor_version ()
416 #define atk_micro_version atk_get_micro_version ()
417 #define atk_binary_age atk_get_binary_age ()
418 #define atk_interface_age atk_get_interface_age ()
420 #endif /* __ATK_VERSION_H__ */