Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:18

0001 /* ATK -  Accessibility Toolkit
0002  *
0003  * Copyright (C) 2012 Igalia, S.L.
0004  * Copyright (C) 2014 Chun-wei Fan
0005  *
0006  * Author: Alejandro PiƱeiro Iglesias <apinheiro@igalia.com>
0007  *
0008  * This library is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Library General Public
0010  * License as published by the Free Software Foundation; either
0011  * version 2 of the License, or (at your option) any later version.
0012  *
0013  * This library is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016  * Library General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU Library General Public
0019  * License along with this library; if not, write to the
0020  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0021  * Boston, MA 02111-1307, USA.
0022  */
0023 
0024 #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
0025 #error "Only <atk/atk.h> can be included directly."
0026 #endif
0027 
0028 #ifndef __ATK_VERSION_H__
0029 #define __ATK_VERSION_H__
0030 
0031 #include <glib.h>
0032 
0033 /**
0034  * ATK_MAJOR_VERSION:
0035  *
0036  * Like atk_get_major_version(), but from the headers used at
0037  * application compile time, rather than from the library linked
0038  * against at application run time.
0039  *
0040  * Since: 2.7.4
0041  */
0042 #define ATK_MAJOR_VERSION (2)
0043 
0044 /**
0045  * ATK_MINOR_VERSION:
0046  *
0047  * Like atk_get_minor_version(), but from the headers used at
0048  * application compile time, rather than from the library linked
0049  * against at application run time.
0050  *
0051  * Since: 2.7.4
0052  */
0053 #define ATK_MINOR_VERSION (54)
0054 
0055 /**
0056  * ATK_MICRO_VERSION:
0057  *
0058  * Like atk_get_micro_version(), but from the headers used at
0059  * application compile time, rather than from the library linked
0060  * against at application run time.
0061  *
0062  * Since: 2.7.4
0063  */
0064 #define ATK_MICRO_VERSION (0)
0065 
0066 /**
0067  * ATK_BINARY_AGE:
0068  *
0069  * Like atk_get_binary_age(), but from the headers used at
0070  * application compile time, rather than from the library linked
0071  * against at application run time.
0072  *
0073  * Since: 2.7.4
0074  */
0075 #define ATK_BINARY_AGE    (25410)
0076 
0077 /**
0078  * ATK_INTERFACE_AGE:
0079  *
0080  * Like atk_get_interface_age(), but from the headers used at
0081  * application compile time, rather than from the library linked
0082  * against at application run time.
0083  *
0084  * Since: 2.7.4
0085  */
0086 #define ATK_INTERFACE_AGE (1)
0087 
0088 /**
0089  * ATK_CHECK_VERSION:
0090  * @major: major version (e.g. 1 for version 1.2.5)
0091  * @minor: minor version (e.g. 2 for version 1.2.5)
0092  * @micro: micro version (e.g. 5 for version 1.2.5)
0093  *
0094  * Returns %TRUE if the version of the ATK header files is the same as
0095  * or newer than the passed-in version.
0096  *
0097  * Since: 2.7.4
0098  */
0099 #define ATK_CHECK_VERSION(major,minor,micro)                          \
0100     (ATK_MAJOR_VERSION > (major) ||                                   \
0101      (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION > (minor)) || \
0102      (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION == (minor) && \
0103       ATK_MICRO_VERSION >= (micro)))
0104 
0105 #ifndef _ATK_EXTERN
0106 #define _ATK_EXTERN extern
0107 #endif
0108 
0109 /**
0110  * ATK_VERSION_2_2:
0111  *
0112  * A macro that evaluates to the 2.2 version of ATK, in a format
0113  * that can be used by the C pre-processor.
0114  *
0115  * Since: 2.14
0116  */
0117 #define ATK_VERSION_2_2       (G_ENCODE_VERSION (2, 2))
0118 
0119 /**
0120  * ATK_VERSION_2_4:
0121  *
0122  * A macro that evaluates to the 2.4 version of ATK, in a format
0123  * that can be used by the C pre-processor.
0124  *
0125  * Since: 2.14
0126  */
0127 #define ATK_VERSION_2_4       (G_ENCODE_VERSION (2, 4))
0128 
0129 /**
0130  * ATK_VERSION_2_6:
0131  *
0132  * A macro that evaluates to the 2.6 version of ATK, in a format
0133  * that can be used by the C pre-processor.
0134  *
0135  * Since: 2.14
0136  */
0137 #define ATK_VERSION_2_6       (G_ENCODE_VERSION (2, 6))
0138 
0139 /**
0140  * ATK_VERSION_2_8:
0141  *
0142  * A macro that evaluates to the 2.8 version of ATK, in a format
0143  * that can be used by the C pre-processor.
0144  *
0145  * Since: 2.14
0146  */
0147 #define ATK_VERSION_2_8       (G_ENCODE_VERSION (2, 8))
0148 
0149 /**
0150  * ATK_VERSION_2_10:
0151  *
0152  * A macro that evaluates to the 2.10 version of ATK, in a format
0153  * that can be used by the C pre-processor.
0154  *
0155  * Since: 2.14
0156  */
0157 
0158 #define ATK_VERSION_2_10       (G_ENCODE_VERSION (2, 10))
0159 /**
0160  * ATK_VERSION_2_12:
0161  *
0162  * A macro that evaluates to the 2.12 version of ATK, in a format
0163  * that can be used by the C pre-processor.
0164  *
0165  * Since: 2.14
0166  */
0167 #define ATK_VERSION_2_12       (G_ENCODE_VERSION (2, 12))
0168 
0169 /**
0170  * ATK_VERSION_2_14:
0171  *
0172  * A macro that evaluates to the 2.14 version of ATK, in a format
0173  * that can be used by the C pre-processor.
0174  *
0175  * Since: 2.14
0176  */
0177 #define ATK_VERSION_2_14       (G_ENCODE_VERSION (2, 14))
0178 
0179 /**
0180  * ATK_VERSION_2_30:
0181  *
0182  * A macro that evaluates to the 2.30 version of ATK, in a format
0183  * that can be used by the C pre-processor.
0184  *
0185  * Since: 2.30
0186  */
0187 #define ATK_VERSION_2_30       (G_ENCODE_VERSION (2, 30))
0188 
0189 /**
0190  * ATK_VERSION_2_32:
0191  *
0192  * A macro that evaluates to the 2.30 version of ATK, in a format
0193  * that can be used by the C pre-processor.
0194  *
0195  * Since: 2.52
0196  */
0197 #define ATK_VERSION_2_32       (G_ENCODE_VERSION (2, 32))
0198 
0199 /**
0200  * ATK_VERSION_2_36:
0201  *
0202  * A macro that evaluates to the 2.36 version of ATK, in a format
0203  * that can be used by the C pre-processor.
0204  *
0205  * Since: 2.36
0206  */
0207 #define ATK_VERSION_2_36       (G_ENCODE_VERSION (2, 36))
0208 
0209 /**
0210  * ATK_VERSION_2_52:
0211  *
0212  * A macro that evaluates to the 2.52 version of ATK, in a format
0213  * that can be used by the C pre-processor.
0214  *
0215  * Since: 2.52
0216  */
0217 #define ATK_VERSION_2_52       (G_ENCODE_VERSION (2, 52))
0218 
0219 /* evaluates to the current stable version; for development cycles,
0220  * this means the next stable target
0221  */
0222 #if (ATK_MINOR_VERSION % 2)
0223 #define ATK_VERSION_CUR_STABLE         (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION + 1))
0224 #else
0225 #define ATK_VERSION_CUR_STABLE         (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION))
0226 #endif
0227 
0228 /* evaluates to the previous stable version */
0229 #if (ATK_MINOR_VERSION % 2)
0230 #define ATK_VERSION_PREV_STABLE        (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION - 1))
0231 #else
0232 #define ATK_VERSION_PREV_STABLE        (G_ENCODE_VERSION (ATK_MAJOR_VERSION, ATK_MINOR_VERSION - 2))
0233 #endif
0234 
0235 /**
0236  * ATK_VERSION_MIN_REQUIRED:
0237  *
0238  * A macro that should be defined by the user prior to including
0239  * the atk/atk.h header.
0240  * The definition should be one of the predefined ATK version
0241  * macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,...
0242  *
0243  * This macro defines the earliest version of ATK that the package is
0244  * required to be able to compile against.
0245  *
0246  * If the compiler is configured to warn about the use of deprecated
0247  * functions, then using functions that were deprecated in version
0248  * %ATK_VERSION_MIN_REQUIRED or earlier will cause warnings (but
0249  * using functions deprecated in later releases will not).
0250  *
0251  * Since: 2.14
0252  */
0253 /* If the package sets ATK_VERSION_MIN_REQUIRED to some future
0254  * ATK_VERSION_X_Y value that we don't know about, it will compare as
0255  * 0 in preprocessor tests.
0256  */
0257 #ifndef ATK_VERSION_MIN_REQUIRED
0258 # define ATK_VERSION_MIN_REQUIRED      (ATK_VERSION_CUR_STABLE)
0259 #elif ATK_VERSION_MIN_REQUIRED == 0
0260 # undef  ATK_VERSION_MIN_REQUIRED
0261 # define ATK_VERSION_MIN_REQUIRED      (ATK_VERSION_CUR_STABLE + 2)
0262 #endif
0263 
0264 /**
0265  * ATK_VERSION_MAX_ALLOWED:
0266  *
0267  * A macro that should be defined by the user prior to including
0268  * the atk/atk.h header.
0269  * The definition should be one of the predefined ATK version
0270  * macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,...
0271  *
0272  * This macro defines the latest version of the ATK API that the
0273  * package is allowed to make use of.
0274  *
0275  * If the compiler is configured to warn about the use of deprecated
0276  * functions, then using functions added after version
0277  * %ATK_VERSION_MAX_ALLOWED will cause warnings.
0278  *
0279  * Unless you are using ATK_CHECK_VERSION() or the like to compile
0280  * different code depending on the ATK version, then this should be
0281  * set to the same value as %ATK_VERSION_MIN_REQUIRED.
0282  *
0283  * Since: 2.14
0284  */
0285 #if !defined (ATK_VERSION_MAX_ALLOWED) || (ATK_VERSION_MAX_ALLOWED == 0)
0286 # undef ATK_VERSION_MAX_ALLOWED
0287 # define ATK_VERSION_MAX_ALLOWED      (ATK_VERSION_CUR_STABLE)
0288 #endif
0289 
0290 /* sanity checks */
0291 #if ATK_VERSION_MIN_REQUIRED > ATK_VERSION_CUR_STABLE
0292 #error "ATK_VERSION_MIN_REQUIRED must be <= ATK_VERSION_CUR_STABLE"
0293 #endif
0294 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_MIN_REQUIRED
0295 #error "ATK_VERSION_MAX_ALLOWED must be >= ATK_VERSION_MIN_REQUIRED"
0296 #endif
0297 #if ATK_VERSION_MIN_REQUIRED < ATK_VERSION_2_2
0298 #error "ATK_VERSION_MIN_REQUIRED must be >= ATK_VERSION_2_2"
0299 #endif
0300 
0301 /* these macros are used to mark deprecated functions, and thus have to be
0302  * exposed in a public header.
0303  *
0304  * do *not* use them in other libraries depending on Atk: use G_DEPRECATED
0305  * and G_DEPRECATED_FOR, or use your own wrappers around them.
0306  */
0307 #ifdef ATK_DISABLE_DEPRECATION_WARNINGS
0308 #define ATK_DEPRECATED _ATK_EXTERN
0309 #define ATK_DEPRECATED_FOR(f) _ATK_EXTERN
0310 #define ATK_UNAVAILABLE(maj,min) _ATK_EXTERN
0311 #else
0312 #define ATK_DEPRECATED G_DEPRECATED _ATK_EXTERN
0313 #define ATK_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _ATK_EXTERN
0314 #define ATK_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _ATK_EXTERN
0315 #endif
0316 
0317 #define ATK_AVAILABLE_IN_ALL _ATK_EXTERN
0318 
0319 /* XXX: Every new stable minor release should add a set of macros here */
0320 
0321 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_2
0322 # define ATK_DEPRECATED_IN_2_2                ATK_DEPRECATED
0323 # define ATK_DEPRECATED_IN_2_2_FOR(f)         ATK_DEPRECATED_FOR(f)
0324 #else
0325 # define ATK_DEPRECATED_IN_2_2                _ATK_EXTERN
0326 # define ATK_DEPRECATED_IN_2_2_FOR(f)         _ATK_EXTERN
0327 #endif
0328 
0329 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_2
0330 # define ATK_AVAILABLE_IN_2_2                 ATK_UNAVAILABLE(2, 2)
0331 #else
0332 # define ATK_AVAILABLE_IN_2_2                 _ATK_EXTERN
0333 #endif
0334 
0335 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_4
0336 # define ATK_DEPRECATED_IN_2_4                ATK_DEPRECATED
0337 # define ATK_DEPRECATED_IN_2_4_FOR(f)         ATK_DEPRECATED_FOR(f)
0338 #else
0339 # define ATK_DEPRECATED_IN_2_4                _ATK_EXTERN
0340 # define ATK_DEPRECATED_IN_2_4_FOR(f)         _ATK_EXTERN
0341 #endif
0342 
0343 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_4
0344 # define ATK_AVAILABLE_IN_2_4                 ATK_UNAVAILABLE(2, 4)
0345 #else
0346 # define ATK_AVAILABLE_IN_2_4                 _ATK_EXTERN
0347 #endif
0348 
0349 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_6
0350 # define ATK_DEPRECATED_IN_2_6                ATK_DEPRECATED
0351 # define ATK_DEPRECATED_IN_2_6_FOR(f)         ATK_DEPRECATED_FOR(f)
0352 #else
0353 # define ATK_DEPRECATED_IN_2_6                _ATK_EXTERN
0354 # define ATK_DEPRECATED_IN_2_6_FOR(f)         _ATK_EXTERN
0355 #endif
0356 
0357 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_6
0358 # define ATK_AVAILABLE_IN_2_6                 ATK_UNAVAILABLE(2, 6)
0359 #else
0360 # define ATK_AVAILABLE_IN_2_6                 _ATK_EXTERN
0361 #endif
0362 
0363 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_8
0364 # define ATK_DEPRECATED_IN_2_8                ATK_DEPRECATED
0365 # define ATK_DEPRECATED_IN_2_8_FOR(f)         ATK_DEPRECATED_FOR(f)
0366 #else
0367 # define ATK_DEPRECATED_IN_2_8                _ATK_EXTERN
0368 # define ATK_DEPRECATED_IN_2_8_FOR(f)         _ATK_EXTERN
0369 #endif
0370 
0371 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_8
0372 # define ATK_AVAILABLE_IN_2_8                 ATK_UNAVAILABLE(2, 8)
0373 #else
0374 # define ATK_AVAILABLE_IN_2_8                 _ATK_EXTERN
0375 #endif
0376 
0377 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_10
0378 # define ATK_DEPRECATED_IN_2_10                ATK_DEPRECATED
0379 # define ATK_DEPRECATED_IN_2_10_FOR(f)         ATK_DEPRECATED_FOR(f)
0380 #else
0381 # define ATK_DEPRECATED_IN_2_10                _ATK_EXTERN
0382 # define ATK_DEPRECATED_IN_2_10_FOR(f)         _ATK_EXTERN
0383 #endif
0384 
0385 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_10
0386 # define ATK_AVAILABLE_IN_2_10                 ATK_UNAVAILABLE(2, 10)
0387 #else
0388 # define ATK_AVAILABLE_IN_2_10                 _ATK_EXTERN
0389 #endif
0390 
0391 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_12
0392 # define ATK_DEPRECATED_IN_2_12                ATK_DEPRECATED
0393 # define ATK_DEPRECATED_IN_2_12_FOR(f)         ATK_DEPRECATED_FOR(f)
0394 #else
0395 # define ATK_DEPRECATED_IN_2_12                _ATK_EXTERN
0396 # define ATK_DEPRECATED_IN_2_12_FOR(f)         _ATK_EXTERN
0397 #endif
0398 
0399 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_12
0400 # define ATK_AVAILABLE_IN_2_12                 ATK_UNAVAILABLE(2, 12)
0401 #else
0402 # define ATK_AVAILABLE_IN_2_12                 _ATK_EXTERN
0403 #endif
0404 
0405 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_14
0406 # define ATK_DEPRECATED_IN_2_14                ATK_DEPRECATED
0407 # define ATK_DEPRECATED_IN_2_14_FOR(f)         ATK_DEPRECATED_FOR(f)
0408 #else
0409 # define ATK_DEPRECATED_IN_2_14                _ATK_EXTERN
0410 # define ATK_DEPRECATED_IN_2_14_FOR(f)         _ATK_EXTERN
0411 #endif
0412 
0413 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_14
0414 # define ATK_AVAILABLE_IN_2_14                 ATK_UNAVAILABLE(2, 14)
0415 #else
0416 # define ATK_AVAILABLE_IN_2_14                 _ATK_EXTERN
0417 #endif
0418 
0419 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_30
0420 # define ATK_DEPRECATED_IN_2_30                ATK_DEPRECATED
0421 # define ATK_DEPRECATED_IN_2_30_FOR(f)         ATK_DEPRECATED_FOR(f)
0422 #else
0423 # define ATK_DEPRECATED_IN_2_30                _ATK_EXTERN
0424 # define ATK_DEPRECATED_IN_2_30_FOR(f)         _ATK_EXTERN
0425 #endif
0426 
0427 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_30
0428 # define ATK_AVAILABLE_IN_2_30                 ATK_UNAVAILABLE(2, 30)
0429 #else
0430 # define ATK_AVAILABLE_IN_2_30                 _ATK_EXTERN
0431 #endif
0432 
0433 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_32
0434 # define ATK_AVAILABLE_IN_2_32                 ATK_UNAVAILABLE(2, 32)
0435 #else
0436 # define ATK_AVAILABLE_IN_2_32                 _ATK_EXTERN
0437 #endif
0438 
0439 #if ATK_VERSION_MIN_REQUIRED >= ATK_VERSION_2_36
0440 # define ATK_DEPRECATED_IN_2_36                ATK_DEPRECATED
0441 # define ATK_DEPRECATED_IN_2_36_FOR(f)         ATK_DEPRECATED_FOR(f)
0442 #else
0443 # define ATK_DEPRECATED_IN_2_36                _ATK_EXTERN
0444 # define ATK_DEPRECATED_IN_2_36_FOR(f)         _ATK_EXTERN
0445 #endif
0446 
0447 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_36
0448 # define ATK_AVAILABLE_IN_2_36                 ATK_UNAVAILABLE(2, 36)
0449 #else
0450 # define ATK_AVAILABLE_IN_2_36                 _ATK_EXTERN
0451 #endif
0452 
0453 #if ATK_VERSION_MAX_ALLOWED < ATK_VERSION_2_52
0454 # define ATK_AVAILABLE_IN_2_52                 ATK_UNAVAILABLE(2, 52)
0455 #else
0456 # define ATK_AVAILABLE_IN_2_52                 _ATK_EXTERN
0457 #endif
0458 
0459 ATK_AVAILABLE_IN_2_8
0460 guint atk_get_major_version (void) G_GNUC_CONST;
0461 ATK_AVAILABLE_IN_2_8
0462 guint atk_get_minor_version (void) G_GNUC_CONST;
0463 ATK_AVAILABLE_IN_2_8
0464 guint atk_get_micro_version (void) G_GNUC_CONST;
0465 ATK_AVAILABLE_IN_2_8
0466 guint atk_get_binary_age    (void) G_GNUC_CONST;
0467 ATK_AVAILABLE_IN_2_8
0468 guint atk_get_interface_age (void) G_GNUC_CONST;
0469 
0470 #define atk_major_version atk_get_major_version ()
0471 #define atk_minor_version atk_get_minor_version ()
0472 #define atk_micro_version atk_get_micro_version ()
0473 #define atk_binary_age atk_get_binary_age ()
0474 #define atk_interface_age atk_get_interface_age ()
0475 
0476 #endif /* __ATK_VERSION_H__ */