zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_version.h
Go to the documentation of this file.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 
28 #ifndef _SDL_version_h
29 #define _SDL_version_h
30 
31 #include "SDL_stdinc.h"
32 
33 #include "begin_code.h"
34 /* Set up for C function definitions, even when using C++ */
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
51 typedef struct SDL_version
52 {
56 } SDL_version;
57 
58 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
59 */
60 #define SDL_MAJOR_VERSION 2
61 #define SDL_MINOR_VERSION 0
62 #define SDL_PATCHLEVEL 0
63 
79 #define SDL_VERSION(x) \
80 { \
81  (x)->major = SDL_MAJOR_VERSION; \
82  (x)->minor = SDL_MINOR_VERSION; \
83  (x)->patch = SDL_PATCHLEVEL; \
84 }
85 
94 #define SDL_VERSIONNUM(X, Y, Z) \
95  ((X)*1000 + (Y)*100 + (Z))
96 
100 #define SDL_COMPILEDVERSION \
101  SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
102 
106 #define SDL_VERSION_ATLEAST(X, Y, Z) \
107  (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
108 
133 extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
134 
142 extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
143 
151 extern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
152 
153 
154 /* Ends C function definitions when using C++ */
155 #ifdef __cplusplus
156 }
157 #endif
158 #include "close_code.h"
159 
160 #endif /* _SDL_version_h */
161 
162 /* vi: set ts=4 sw=4 expandtab: */
DECLSPEC const char *SDLCALL SDL_GetRevision(void)
Get the code revision of SDL that is linked against your program.
Definition: SDL.c:373
DECLSPEC int SDLCALL SDL_GetRevisionNumber(void)
Get the revision number of SDL that is linked against your program.
Definition: SDL.c:380
DECLSPEC void SDLCALL SDL_GetVersion(SDL_version *ver)
Get the version of SDL that is linked against your program.
Definition: SDL.c:366
Uint8 major
Definition: SDL_version.h:53
#define DECLSPEC
Definition: begin_code.h:62
#define SDLCALL
Definition: begin_code.h:72
Information the version of SDL in use.
Definition: SDL_version.h:51
struct SDL_version SDL_version
Information the version of SDL in use.
Uint8 minor
Definition: SDL_version.h:54
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:129
Uint8 patch
Definition: SDL_version.h:55