annotate touchTest/Iphone Test/touchTestIPhone2/touchTestIPhone/include/SDL_version.h @ 4691:73f5c530afac

Fixed hgIgnore to ignore test/gesturetest
author Jim Grandpre <jim.tla@gmail.com>
date Thu, 19 Aug 2010 13:49:11 -0400
parents 31607094315c
children
rev   line source
4677
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
1 /*
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
3 Copyright (C) 1997-2010 Sam Lantinga
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
4
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
7 License as published by the Free Software Foundation; either
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
9
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
13 Lesser General Public License for more details.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
14
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
18
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
19 Sam Lantinga
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
20 slouken@libsdl.org
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
21 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
22
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
23 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
24 * \file SDL_version.h
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
25 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
26 * This header defines the current SDL version.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
27 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
28
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
29 #ifndef _SDL_version_h
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
30 #define _SDL_version_h
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
31
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
32 #include "SDL_stdinc.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
33 #include "SDL_revision.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
34
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
35 #include "begin_code.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
36 /* Set up for C function definitions, even when using C++ */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
37 #ifdef __cplusplus
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
38 /* *INDENT-OFF* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
39 extern "C" {
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
40 /* *INDENT-ON* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
41 #endif
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
42
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
43 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
44 * \brief Information the version of SDL in use.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
45 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
46 * Represents the library's version as three levels: major revision
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
47 * (increments with massive changes, additions, and enhancements),
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
48 * minor revision (increments with backwards-compatible changes to the
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
49 * major revision), and patchlevel (increments with fixes to the minor
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
50 * revision).
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
51 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
52 * \sa SDL_VERSION
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
53 * \sa SDL_GetVersion
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
54 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
55 typedef struct SDL_version
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
56 {
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
57 Uint8 major; /**< major version */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
58 Uint8 minor; /**< minor version */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
59 Uint8 patch; /**< update version */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
60 } SDL_version;
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
61
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
62 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
63 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
64 #define SDL_MAJOR_VERSION 1
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
65 #define SDL_MINOR_VERSION 3
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
66 #define SDL_PATCHLEVEL 0
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
67
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
68 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
69 * \brief Macro to determine SDL version program was compiled against.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
70 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
71 * This macro fills in a SDL_version structure with the version of the
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
72 * library you compiled against. This is determined by what header the
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
73 * compiler uses. Note that if you dynamically linked the library, you might
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
74 * have a slightly newer or older version at runtime. That version can be
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
75 * determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
76 * is not a macro.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
77 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
78 * \param x A pointer to a SDL_version struct to initialize.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
79 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
80 * \sa SDL_version
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
81 * \sa SDL_GetVersion
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
82 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
83 #define SDL_VERSION(x) \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
84 { \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
85 (x)->major = SDL_MAJOR_VERSION; \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
86 (x)->minor = SDL_MINOR_VERSION; \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
87 (x)->patch = SDL_PATCHLEVEL; \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
88 }
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
89
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
90 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
91 * This macro turns the version numbers into a numeric value:
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
92 * \verbatim
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
93 (1,2,3) -> (1203)
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
94 \endverbatim
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
95 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
96 * This assumes that there will never be more than 100 patchlevels.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
97 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
98 #define SDL_VERSIONNUM(X, Y, Z) \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
99 ((X)*1000 + (Y)*100 + (Z))
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
100
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
101 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
102 * This is the version number macro for the current SDL version.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
103 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
104 #define SDL_COMPILEDVERSION \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
105 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
106
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
107 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
108 * This macro will evaluate to true if compiled with SDL at least X.Y.Z.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
109 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
110 #define SDL_VERSION_ATLEAST(X, Y, Z) \
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
111 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
112
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
113 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
114 * \brief Get the version of SDL that is linked against your program.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
115 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
116 * If you are using a shared library (DLL) version of SDL, then it is
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
117 * possible that it will be different than the version you compiled against.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
118 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
119 * This is a real function; the macro SDL_VERSION() tells you what version
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
120 * of SDL you compiled against:
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
121 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
122 * \code
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
123 * SDL_version compiled;
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
124 * SDL_version linked;
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
125 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
126 * SDL_VERSION(&compiled);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
127 * SDL_GetVersion(&linked);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
128 * printf("We compiled against SDL version %d.%d.%d ...\n",
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
129 * compiled.major, compiled.minor, compiled.patch);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
130 * printf("But we linked against SDL version %d.%d.%d.\n",
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
131 * linked.major, linked.minor, linked.patch);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
132 * \endcode
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
133 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
134 * This function may be called safely at any time, even before SDL_Init().
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
135 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
136 * \sa SDL_VERSION
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
137 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
138 extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
139
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
140 /**
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
141 * \brief Get the code revision of SDL that is linked against your program.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
142 *
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
143 * This is an arbitrary string (a hash value, actually), and is only useful
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
144 * in comparing against other revisions. It is NOT an incrementing number.
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
145 */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
146 extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
147
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
148 /* Ends C function definitions when using C++ */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
149 #ifdef __cplusplus
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
150 /* *INDENT-OFF* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
151 }
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
152 /* *INDENT-ON* */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
153 #endif
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
154 #include "close_code.h"
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
155
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
156 #endif /* _SDL_version_h */
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
157
31607094315c Added Iphone project. Iphone multi-touch is now functional.
jimtla
parents:
diff changeset
158 /* vi: set ts=4 sw=4 expandtab: */