VSF Documented
SDL_version.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_SDL2_VERSION_H__
19#define __VSF_SDL2_VERSION_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "../../vsf_sdl2_cfg.h"
24
25#if VSF_USE_SDL2 == ENABLED
26
27#include "SDL_stdinc.h"
28
29#include "begin_code.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/*============================ MACROS ========================================*/
36
37#define SDL_MAJOR_VERSION 2
38#define SDL_MINOR_VERSION 0
39#define SDL_PATCHLEVEL 7
40
41#define SDL_VERSIONNUM(__X, __Y, __Z) ((__X) * 1000 + (__Y) * 100 + (__Z))
42#define SDL_COMPILEDVERSION \
43 SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
44#define SDL_VERSION_ATLEAST(__X, __Y, __Z) \
45 (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(__X, __Y, __Z))
46
47#define SDL_VERSION(x) \
48 do { \
49 (x)->major = SDL_MAJOR_VERSION; \
50 (x)->minor = SDL_MINOR_VERSION; \
51 (x)->patch = SDL_PATCHLEVEL; \
52 } while (0);
53
54
55
56#if VSF_SDL_CFG_WRAPPER == ENABLED
57#define SDL_Linked_Version VSF_SDL_WRAPPER(SDL_Linked_Version)
58#define SDL_GetVersion VSF_SDL_WRAPPER(SDL_GetVersion)
59#endif
60
61/*============================ MACROFIED FUNCTIONS ===========================*/
62/*============================ TYPES =========================================*/
63
64typedef struct SDL_version {
69
70/*============================ GLOBAL VARIABLES ==============================*/
71/*============================ LOCAL VARIABLES ===============================*/
72/*============================ PROTOTYPES ====================================*/
73
74extern const SDL_version * SDL_Linked_Version(void);
75extern void SDL_GetVersion(SDL_version *ver);
76
77
78#ifdef __cplusplus
79}
80#endif
81#include "close_code.h"
82
83#endif // VSF_USE_SDL2
84#endif // __VSF_SDL2_VERSION_H__
85/* EOF */
#define SDL_GetVersion
Definition SDL_version.h:58
#define SDL_Linked_Version
Definition SDL_version.h:57
unsigned char uint8_t
Definition stdint.h:5
Definition SDL_version.h:64
uint8_t patch
Definition SDL_version.h:67
uint8_t minor
Definition SDL_version.h:66
uint8_t major
Definition SDL_version.h:65