include/SDL_version.h
author Ozkan Sezer <sezeroz@gmail.com>
Sun, 14 Oct 2018 15:25:04 +0300
branchSDL-1.2
changeset 12325 c4f2eeda176f
parent 6137 4720145f848b
child 12988 e92b0859ceed
permissions -rw-r--r--
remove symlink for libSDL-1.0.so.0 from the rpm spec file.

also fix a changelog date.
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@6137
     3
    Copyright (C) 1997-2012 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@0
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@251
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@0
    22
slouken@4217
    23
/** @file SDL_version.h
slouken@4217
    24
 *  This header defines the current SDL version
slouken@4217
    25
 */
slouken@0
    26
slouken@0
    27
#ifndef _SDL_version_h
slouken@0
    28
#define _SDL_version_h
slouken@0
    29
slouken@1356
    30
#include "SDL_stdinc.h"
slouken@0
    31
slouken@0
    32
#include "begin_code.h"
slouken@0
    33
/* Set up for C function definitions, even when using C++ */
slouken@0
    34
#ifdef __cplusplus
slouken@0
    35
extern "C" {
slouken@0
    36
#endif
slouken@0
    37
slouken@4217
    38
/** @name Version Number
slouken@4217
    39
 *  Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
slouken@4217
    40
 */
slouken@4217
    41
/*@{*/
slouken@0
    42
#define SDL_MAJOR_VERSION	1
slouken@0
    43
#define SDL_MINOR_VERSION	2
slouken@6112
    44
#define SDL_PATCHLEVEL		15
slouken@4217
    45
/*@}*/
slouken@0
    46
slouken@911
    47
typedef struct SDL_version {
slouken@0
    48
	Uint8 major;
slouken@0
    49
	Uint8 minor;
slouken@0
    50
	Uint8 patch;
slouken@0
    51
} SDL_version;
slouken@0
    52
slouken@4217
    53
/**
slouken@4217
    54
 * This macro can be used to fill a version structure with the compile-time
slouken@0
    55
 * version of the SDL library.
slouken@0
    56
 */
slouken@0
    57
#define SDL_VERSION(X)							\
slouken@0
    58
{									\
slouken@0
    59
	(X)->major = SDL_MAJOR_VERSION;					\
slouken@0
    60
	(X)->minor = SDL_MINOR_VERSION;					\
slouken@0
    61
	(X)->patch = SDL_PATCHLEVEL;					\
slouken@0
    62
}
slouken@0
    63
slouken@4217
    64
/** This macro turns the version numbers into a numeric value:
slouken@4217
    65
 *  (1,2,3) -> (1203)
slouken@4217
    66
 *  This assumes that there will never be more than 100 patchlevels
slouken@4217
    67
 */
slouken@0
    68
#define SDL_VERSIONNUM(X, Y, Z)						\
icculus@1046
    69
	((X)*1000 + (Y)*100 + (Z))
slouken@0
    70
slouken@4217
    71
/** This is the version number macro for the current SDL version */
slouken@0
    72
#define SDL_COMPILEDVERSION \
slouken@0
    73
	SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
slouken@0
    74
slouken@4217
    75
/** This macro will evaluate to true if compiled with SDL at least X.Y.Z */
slouken@0
    76
#define SDL_VERSION_ATLEAST(X, Y, Z) \
slouken@0
    77
	(SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
slouken@0
    78
slouken@4217
    79
/** This function gets the version of the dynamically linked SDL library.
slouken@4217
    80
 *  it should NOT be used to fill a version structure, instead you should
slouken@4217
    81
 *  use the SDL_Version() macro.
slouken@0
    82
 */
slouken@337
    83
extern DECLSPEC const SDL_version * SDLCALL SDL_Linked_Version(void);
slouken@0
    84
slouken@0
    85
/* Ends C function definitions when using C++ */
slouken@0
    86
#ifdef __cplusplus
slouken@0
    87
}
slouken@0
    88
#endif
slouken@0
    89
#include "close_code.h"
slouken@0
    90
slouken@0
    91
#endif /* _SDL_version_h */