zenilib: zenilib/jni/external/sdl/SDL/SDL_version.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
SDL_version.h File Reference
`#include "SDL_stdinc.h"`
`#include "begin_code.h"`
`#include "close_code.h"`

Go to the source code of this file.

## Classes

struct | SDL_version
| Information the version of SDL in use. More...

## Macros

#define | SDL_COMPILEDVERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
#define | SDL_MAJOR_VERSION 2
#define | SDL_MINOR_VERSION 0
#define | SDL_PATCHLEVEL 0
#define | SDL_VERSION(x)
| Macro to determine SDL version program was compiled against. More...
#define | SDL_VERSION_ATLEAST(X, Y, Z) (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
#define | SDL_VERSIONNUM(X, Y, Z) ((X)*1000 + (Y)*100 + (Z))

## Typedefs

typedef struct SDL_version | SDL_version
| Information the version of SDL in use. More...

## Functions

DECLSPEC const char *SDLCALL | SDL_GetRevision (void)
| Get the code revision of SDL that is linked against your program. More...
DECLSPEC int SDLCALL | SDL_GetRevisionNumber (void)
| Get the revision number of SDL that is linked against your program. More...
DECLSPEC void SDLCALL | SDL_GetVersion (SDL_version *ver)
| Get the version of SDL that is linked against your program. More...

## Detailed Description

This header defines the current SDL version.

Definition in file SDL_version.h.

## Macro Definition Documentation

#define SDL_COMPILEDVERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)

This is the version number macro for the current SDL version.

Definition at line 100 of file SDL_version.h.

#define SDL_MAJOR_VERSION 2

Definition at line 60 of file SDL_version.h.

#define SDL_MINOR_VERSION 0

Definition at line 61 of file SDL_version.h.

#define SDL_PATCHLEVEL 0

Definition at line 62 of file SDL_version.h.

#define SDL_VERSION | ( |  | x | ) |

Value:
{ \
(x)->major = SDL_MAJOR_VERSION; \
(x)->minor = SDL_MINOR_VERSION; \
(x)->patch = SDL_PATCHLEVEL; \
}
SDL_PATCHLEVEL
#define SDL_PATCHLEVEL
Definition: SDL_version.h:62
SDL_MINOR_VERSION
#define SDL_MINOR_VERSION
Definition: SDL_version.h:61
SDL_MAJOR_VERSION
#define SDL_MAJOR_VERSION
Definition: SDL_version.h:60
x
EGLSurface EGLint x
Definition: eglext.h:293

Macro to determine SDL version program was compiled against.

This macro fills in a SDL_version structure with the version of the library you compiled against. This is determined by what header the compiler uses. Note that if you dynamically linked the library, you might have a slightly newer or older version at runtime. That version can be determined with SDL_GetVersion(), which, unlike SDL_VERSION(), is not a macro.

Parameters

  x | A pointer to a SDL_version struct to initialize.

See Also
  SDL_version
  SDL_GetVersion

Definition at line 79 of file SDL_version.h.

Referenced by Zeni::Video_DX9::init(), SDL_GetVersion(), SDL_MessageboxValidForDriver(), and Zeni::Window::Window().

#define SDL_VERSION_ATLEAST | ( |  | X,
|  |  | Y,
|  |  | Z
| ) |  | (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))

This macro will evaluate to true if compiled with SDL at least X.Y.Z.

Definition at line 106 of file SDL_version.h.

#define SDL_VERSIONNUM | ( |  | X,
|  |  | Y,
|  |  | Z
| ) |  | ((X)*1000 + (Y)*100 + (Z))

This macro turns the version numbers into a numeric value:

    (1,2,3) -> (1203)

This assumes that there will never be more than 100 patchlevels.

Definition at line 94 of file SDL_version.h.

## Typedef Documentation

typedef struct SDL_version SDL_version

Information the version of SDL in use.

Represents the library's version as three levels: major revision (increments with massive changes, additions, and enhancements), minor revision (increments with backwards-compatible changes to the major revision), and patchlevel (increments with fixes to the minor revision).

See Also
  SDL_VERSION
  SDL_GetVersion

## Function Documentation

DECLSPEC const char* SDLCALL SDL_GetRevision | ( | void |  | ) |

Get the code revision of SDL that is linked against your program.

Returns an arbitrary string (a hash value) uniquely identifying the exact revision of the SDL library in use, and is only useful in comparing against other revisions. It is NOT an incrementing number.

Definition at line 373 of file SDL.c.

References SDL_REVISION.

DECLSPEC int SDLCALL SDL_GetRevisionNumber | ( | void |  | ) |

Get the revision number of SDL that is linked against your program.

Returns a number uniquely identifying the exact revision of the SDL library in use. It is an incrementing number based on commits to hg.libsdl.org.

Definition at line 380 of file SDL.c.

References SDL_REVISION_NUMBER.

DECLSPEC void SDLCALL SDL_GetVersion | ( | SDL_version * | ver | ) |

Get the version of SDL that is linked against your program.

If you are linking to SDL dynamically, then it is possible that the current version will be different than the version you compiled against. This function returns the current version, while SDL_VERSION() is a macro that tells you what version you compiled with.

* SDL_version compiled;
* SDL_version linked;
*
* SDL_VERSION(&compiled);
* SDL_GetVersion(&linked);
* printf("We compiled against SDL version %d.%d.%d ...\n",
* compiled.major, compiled.minor, compiled.patch);
* printf("But we linked against SDL version %d.%d.%d.\n",
* linked.major, linked.minor, linked.patch);
*

This function may be called safely at any time, even before SDL_Init().

See Also
  SDL_VERSION

Definition at line 366 of file SDL.c.

References SDL_VERSION.