1/* anjuta-version.h - Anjuta versioning information 2 * 3 * Based on json-version from json-glib 4 * Authored by Emmanuele Bassi <ebassi@o-hand.com> 5 * Adapted for Anjuta by Rob Bradford <rob@o-hand.com> 6 * Copyright (C) 2007 OpenedHand Ltd. 7 * 8 * You may redistribute it and/or modify it under the terms of the 9 * GNU General Public License, as published by the Free Software 10 * Foundation; either version 2 of the License, or (at your option) 11 * any later version. 12 * 13 * anjuta 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. 16 * See the GNU General Public License for more details. 17 * 18 */ 19 20#ifndef _LIBANJUTA_VERSION_H_ 21#define _LIBANJUTA_VERSION_H_ 22 23/** 24 * SECTION:anjuta-version 25 * @short_description: Anjuta version checking 26 * 27 * Anjuta provides macros to check the version of the library 28 * at compile-time 29 */ 30 31/** 32 * LIBANJUTA_MAJOR_VERSION: 33 * 34 * Anjuta major version component (e.g. 1 if %LIBANJUTA_VERSION is 1.2.3) 35 */ 36#define LIBANJUTA_MAJOR_VERSION (@ANJUTA_MAJOR_VERSION@) 37 38/** 39 * LIBANJUTA_MINOR_VERSION: 40 * 41 * Anjuta minor version component (e.g. 2 if %LIBANJUTA_VERSION is 1.2.3) 42 */ 43#define LIBANJUTA_MINOR_VERSION (@ANJUTA_MINOR_VERSION@) 44 45/** 46 * LIBANJUTA_MICRO_VERSION: 47 * 48 * Anjuta micro version component (e.g. 3 if %LIBANJUTA_VERSION is 1.2.3) 49 */ 50#define LIBANJUTA_MICRO_VERSION (@ANJUTA_MICRO_VERSION@) 51 52/** 53 * LIBANJUTA_VERSION 54 * 55 * Anjuta version. 56 */ 57#define LIBANJUTA_VERSION (@ANJUTA_VERSION@) 58 59/** 60 * LIBANJUTA_VERSION_S: 61 * 62 * Anjuta version, encoded as a string, useful for printing and 63 * concatenation. 64 */ 65#define LIBANJUTA_VERSION_S "@ANJUTA_VERSION@" 66 67/** 68 * LIBANJUTA_VERSION_HEX: 69 * 70 * Anjuta version, encoded as an hexadecimal number, useful for 71 * integer comparisons. 72 */ 73#define LIBANJUTA_VERSION_HEX (LIBANJUTA_MAJOR_VERSION << 24 | \ 74 LIBANJUTA_MINOR_VERSION << 16 | \ 75 LIBANJUTA_MICRO_VERSION << 8) 76 77/** 78 * ANJUTA_CHECK_VERSION: 79 * @major: required major version 80 * @minor: required minor version 81 * @micro: required micro version 82 * 83 * Compile-time version checking. Evaluates to %TRUE if the version 84 * of Anjuta is greater than the required one. 85 */ 86#define ANJUTA_CHECK_VERSION(major,minor,micro) \ 87 (LIBANJUTA_MAJOR_VERSION > (major) || \ 88 (LIBANJUTA_MAJOR_VERSION == (major) && LIBANJUTA_MINOR_VERSION > (minor)) || \ 89 (LIBANJUTA_MAJOR_VERSION == (major) && LIBANJUTA_MINOR_VERSION == (minor) && \ 90 LIBANJUTA_MICRO_VERSION >= (micro))) 91 92#endif /* _LIBANJUTA_VERSION_H_ */ 93 94