Version Information

Version Information — Compile and run time version checks

Synopsis

#define             CAIRO_VERSION
#define             CAIRO_VERSION_ENCODE                (major, minor, micro)
int                 cairo_version                       (void);
const char*         cairo_version_string                (void);

Description

Details

CAIRO_VERSION

#define             CAIRO_VERSION


CAIRO_VERSION_ENCODE()

#define             CAIRO_VERSION_ENCODE(major, minor, micro)

major :

minor :

micro :


cairo_version ()

int                 cairo_version                       (void);

Returns the version of the cairo library encoded in a single integer as per CAIRO_VERSION_ENCODE. The encoding ensures that later versions compare greater than earlier versions.

A run-time comparison to check that cairo's version is greater than or equal to version X.Y.Z could be performed as follows:

if (cairo_version() >= CAIRO_VERSION_ENCODE(X,Y,Z)) {...}

See also cairo_version_string() as well as the compile-time equivalents CAIRO_VERSION and CAIRO_VERSION_STRING.

Returns :

the encoded version.

cairo_version_string ()

const char*         cairo_version_string                (void);

Returns the version of the cairo library as a human-readable string of the form "X.Y.Z".

See also cairo_version() as well as the compile-time equivalents CAIRO_VERSION_STRING and CAIRO_VERSION.

Returns :

a string containing the version.