]> git.saurik.com Git - wxWidgets.git/blob - include/wx/version.h
Add new methods to transform coordinates expressed in Cocoa's bounds rect to
[wxWidgets.git] / include / wx / version.h
1 /**
2 * Name: wx/version.h
3 * Purpose: wxWidgets version numbers
4 * Author: Julian Smart
5 * Modified by: Ryan Norton (Converted to C)
6 * Created: 29/01/98
7 * RCS-ID: $Id$
8 * Copyright: (c) 1998 Julian Smart
9 * Licence: wxWindows licence
10 */
11
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
13
14 #ifndef _WX_VERSION_H_
15 #define _WX_VERSION_H_
16
17 /* the constants below must be changed with each new version */
18 /* ---------------------------------------------------------------------------- */
19
20 /* NB: this file is parsed by Perl code in tmake templates in distrib/msw/tmake */
21 /* so don't change its format too much or they could break */
22 #define wxMAJOR_VERSION 2
23 #define wxMINOR_VERSION 5
24 #define wxRELEASE_NUMBER 3
25 #define wxSUBRELEASE_NUMBER 3
26 #define wxVERSION_STRING _T("wxWidgets 2.5.3")
27
28 /* nothing to update below this line when updating the version */
29 /* ---------------------------------------------------------------------------- */
30
31 /* helpers for wxVERSION_NUM_XXX */
32 #define wxSTRINGIZE(x) #x
33 #define wxMAKE_VERSION_STRING(x, y, z) \
34 wxSTRINGIZE(x) wxSTRINGIZE(y) wxSTRINGIZE(z)
35 #define wxMAKE_VERSION_DOT_STRING(x, y, z) \
36 wxSTRINGIZE(x) "." wxSTRINGIZE(y) "." wxSTRINGIZE(z)
37
38 /* these are used by src/msw/version.rc and should always be ASCII, not Unicode */
39 #define wxVERSION_NUM_STRING \
40 wxMAKE_VERSION_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
41 #define wxVERSION_NUM_DOT_STRING \
42 wxMAKE_VERSION_DOT_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
43
44 /* some more defines, not really sure if they're [still] useful */
45 #define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER
46 #define wxBETA_NUMBER 0
47 #define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
48
49 /* check if the current version is at least major.minor.release */
50 #define wxCHECK_VERSION(major,minor,release) \
51 (wxMAJOR_VERSION > (major) || \
52 (wxMAJOR_VERSION == (major) && wxMINOR_VERSION > (minor)) || \
53 (wxMAJOR_VERSION == (major) && wxMINOR_VERSION == (minor) && wxRELEASE_NUMBER >= (release)))
54
55 /* the same but check the subrelease also */
56 #define wxCHECK_VERSION_FULL(major,minor,release,subrel) \
57 wxCHECK_VERSION(major, minor, release) && \
58 ((major) != wxMAJOR_VERSION || \
59 (minor) != wxMINOR_VERSION || \
60 (release) != wxRELEASE_NUMBER || \
61 (subrel) <= wxSUBRELEASE_NUMBER)
62
63 #endif /* _WX_VERSION_H_ */
64