comparison include/SDL_version.h @ 4217:4c4113c2162c SDL-1.2

Fixed bug #706 Ken Bull 2009-02-25 13:22:02 PST Adds Doxygen support for all headers (except config and boilerplate headers) in the include folder for SDL-1.2 revision 4446. While in general SDL is quite thoroughly commented, none of these comments are correctly formatted for Doxygen and are generally inconsistent in their formatting.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 21 Sep 2009 09:38:10 +0000
parents 453587d6dc87
children
comparison
equal deleted inserted replaced
4216:5b99971a27b4 4217:4c4113c2162c
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 /* This header defines the current SDL version */ 23 /** @file SDL_version.h
24 * This header defines the current SDL version
25 */
24 26
25 #ifndef _SDL_version_h 27 #ifndef _SDL_version_h
26 #define _SDL_version_h 28 #define _SDL_version_h
27 29
28 #include "SDL_stdinc.h" 30 #include "SDL_stdinc.h"
31 /* Set up for C function definitions, even when using C++ */ 33 /* Set up for C function definitions, even when using C++ */
32 #ifdef __cplusplus 34 #ifdef __cplusplus
33 extern "C" { 35 extern "C" {
34 #endif 36 #endif
35 37
36 /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL 38 /** @name Version Number
37 */ 39 * Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
40 */
41 /*@{*/
38 #define SDL_MAJOR_VERSION 1 42 #define SDL_MAJOR_VERSION 1
39 #define SDL_MINOR_VERSION 2 43 #define SDL_MINOR_VERSION 2
40 #define SDL_PATCHLEVEL 14 44 #define SDL_PATCHLEVEL 14
45 /*@}*/
41 46
42 typedef struct SDL_version { 47 typedef struct SDL_version {
43 Uint8 major; 48 Uint8 major;
44 Uint8 minor; 49 Uint8 minor;
45 Uint8 patch; 50 Uint8 patch;
46 } SDL_version; 51 } SDL_version;
47 52
48 /* This macro can be used to fill a version structure with the compile-time 53 /**
54 * This macro can be used to fill a version structure with the compile-time
49 * version of the SDL library. 55 * version of the SDL library.
50 */ 56 */
51 #define SDL_VERSION(X) \ 57 #define SDL_VERSION(X) \
52 { \ 58 { \
53 (X)->major = SDL_MAJOR_VERSION; \ 59 (X)->major = SDL_MAJOR_VERSION; \
54 (X)->minor = SDL_MINOR_VERSION; \ 60 (X)->minor = SDL_MINOR_VERSION; \
55 (X)->patch = SDL_PATCHLEVEL; \ 61 (X)->patch = SDL_PATCHLEVEL; \
56 } 62 }
57 63
58 /* This macro turns the version numbers into a numeric value: 64 /** This macro turns the version numbers into a numeric value:
59 (1,2,3) -> (1203) 65 * (1,2,3) -> (1203)
60 This assumes that there will never be more than 100 patchlevels 66 * This assumes that there will never be more than 100 patchlevels
61 */ 67 */
62 #define SDL_VERSIONNUM(X, Y, Z) \ 68 #define SDL_VERSIONNUM(X, Y, Z) \
63 ((X)*1000 + (Y)*100 + (Z)) 69 ((X)*1000 + (Y)*100 + (Z))
64 70
65 /* This is the version number macro for the current SDL version */ 71 /** This is the version number macro for the current SDL version */
66 #define SDL_COMPILEDVERSION \ 72 #define SDL_COMPILEDVERSION \
67 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) 73 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
68 74
69 /* This macro will evaluate to true if compiled with SDL at least X.Y.Z */ 75 /** This macro will evaluate to true if compiled with SDL at least X.Y.Z */
70 #define SDL_VERSION_ATLEAST(X, Y, Z) \ 76 #define SDL_VERSION_ATLEAST(X, Y, Z) \
71 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) 77 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
72 78
73 /* This function gets the version of the dynamically linked SDL library. 79 /** This function gets the version of the dynamically linked SDL library.
74 it should NOT be used to fill a version structure, instead you should 80 * it should NOT be used to fill a version structure, instead you should
75 use the SDL_Version() macro. 81 * use the SDL_Version() macro.
76 */ 82 */
77 extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void); 83 extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void);
78 84
79 /* Ends C function definitions when using C++ */ 85 /* Ends C function definitions when using C++ */
80 #ifdef __cplusplus 86 #ifdef __cplusplus