65c9ecefa91136915fbdbc08de4f8321be44fc62
[platform/upstream/atk.git] / atk / atkversion.h.in
1 /* ATK -  Accessibility Toolkit
2  *
3  * Copyright (C) 2012 Igalia, S.L.
4  *
5  * Author: Alejandro PiƱeiro Iglesias <apinheiro@igalia.com>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
24 #error "Only <atk/atk.h> can be included directly."
25 #endif
26
27 #ifndef __ATK_VERSION_H__
28 #define __ATK_VERSION_H__
29
30 /**
31  * ATK_MAJOR_VERSION:
32  *
33  * Like atk_get_major_version(), but from the headers used at
34  * application compile time, rather than from the library linked
35  * against at application run time.
36  *
37  * Since: 2.7.4
38  */
39 #define ATK_MAJOR_VERSION (@ATK_MAJOR_VERSION@)
40
41 /**
42  * ATK_MINOR_VERSION:
43  *
44  * Like atk_get_minor_version(), but from the headers used at
45  * application compile time, rather than from the library linked
46  * against at application run time.
47  *
48  * Since: 2.7.4
49  */
50 #define ATK_MINOR_VERSION (@ATK_MINOR_VERSION@)
51
52 /**
53  * ATK_MICRO_VERSION:
54  *
55  * Like atk_get_micro_version(), but from the headers used at
56  * application compile time, rather than from the library linked
57  * against at application run time.
58  *
59  * Since: 2.7.4
60  */
61 #define ATK_MICRO_VERSION (@ATK_MICRO_VERSION@)
62
63 /**
64  * ATK_BINARY_AGE:
65  *
66  * Like atk_get_binary_age(), but from the headers used at
67  * application compile time, rather than from the library linked
68  * against at application run time.
69  *
70  * Since: 2.7.4
71  */
72 #define ATK_BINARY_AGE    (@ATK_BINARY_AGE@)
73
74 /**
75  * ATK_INTERFACE_AGE:
76  *
77  * Like atk_get_interface_age(), but from the headers used at
78  * application compile time, rather than from the library linked
79  * against at application run time.
80  *
81  * Since: 2.7.4
82  */
83 #define ATK_INTERFACE_AGE (@ATK_INTERFACE_AGE@)
84
85 /**
86  * ATK_CHECK_VERSION:
87  * @major: major version (e.g. 1 for version 1.2.5)
88  * @minor: minor version (e.g. 2 for version 1.2.5)
89  * @micro: micro version (e.g. 5 for version 1.2.5)
90  *
91  * Returns %TRUE if the version of the ATK header files is the same as
92  * or newer than the passed-in version.
93  *
94  * Since: 2.7.4
95  */
96 #define ATK_CHECK_VERSION(major,minor,micro)                          \
97     (ATK_MAJOR_VERSION > (major) ||                                   \
98      (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION > (minor)) || \
99      (ATK_MAJOR_VERSION == (major) && ATK_MINOR_VERSION == (minor) && \
100       ATK_MICRO_VERSION >= (micro)))
101
102
103 guint atk_get_major_version (void) G_GNUC_CONST;
104 guint atk_get_minor_version (void) G_GNUC_CONST;
105 guint atk_get_micro_version (void) G_GNUC_CONST;
106 guint atk_get_binary_age    (void) G_GNUC_CONST;
107 guint atk_get_interface_age (void) G_GNUC_CONST;
108
109 #define atk_major_version atk_get_major_version ()
110 #define atk_minor_version atk_get_minor_version ()
111 #define atk_micro_version atk_get_micro_version ()
112 #define atk_binary_age atk_get_binary_age ()
113 #define atk_interface_age atk_get_interface_age ()
114
115 #endif /* __ATK_VERSION_H__ */