## Version Checking Version Checking — Tools for checking Pango version at compile- and run-time. |

## Synopsis

    #define             PANGO_VERSION_ENCODE                (major, minor, micro)
    #define             PANGO_VERSION
    #define             PANGO_VERSION_MAJOR
    #define             PANGO_VERSION_MINOR
    #define             PANGO_VERSION_MICRO
    #define             PANGO_VERSION_STRING
    #define             PANGO_VERSION_CHECK                 (major,minor,micro)
    int                 pango_version                       (void);
    const char *        pango_version_string                (void);
    const char *        pango_version_check                 (int required_major,
                                                             int required_minor,
                                                             int required_micro);

## Description

The capital-letter macros defined here can be used to check the version of Pango at compile-time, and to encode Pango versions into integers. The functions can be used to check the version of the linked Pango library at run-time.

## Details

### PANGO_VERSION_ENCODE()

    #define             PANGO_VERSION_ENCODE(major, minor, micro)

This macro encodes the given Pango version into an integer. The numbers returned by `PANGO_VERSION` and `pango_version()` are encoded using this macro. Two encoded version numbers can be compared as integers.

`major` : | the major component of the version number
`minor` : | the minor component of the version number
`micro` : | the micro component of the version number

### PANGO_VERSION

    #define             PANGO_VERSION

The version of Pango available at compile-time, encoded using `PANGO_VERSION_ENCODE()`.

### PANGO_VERSION_MAJOR

    #define PANGO_VERSION_MAJOR 1

The major component of the version of Pango available at compile-time.

### PANGO_VERSION_MINOR

    #define PANGO_VERSION_MINOR 26

The minor component of the version of Pango available at compile-time.

### PANGO_VERSION_MICRO

    #define PANGO_VERSION_MICRO 2

The micro component of the version of Pango available at compile-time.

### PANGO_VERSION_STRING

    #define PANGO_VERSION_STRING "1.26.2"

A string literal containing the version of Pango available at compile-time.

### PANGO_VERSION_CHECK()

    #define             PANGO_VERSION_CHECK(major,minor,micro)

Checks that the version of Pango available at compile-time is not older than the provided version number.

`major` : | the major component of the version number
`minor` : | the minor component of the version number
`micro` : | the micro component of the version number

### pango_version ()

    int                 pango_version                       (void);

This is similar to the macro `PANGO_VERSION` except that it returns the encoded version of Pango available at run-time, as opposed to the version available at compile-time.

A version number can be encoded into an integer using `PANGO_VERSION_ENCODE()`.

Returns : | The encoded version of Pango library available at run time.

Since 1.16

### pango_version_string ()

    const char *        pango_version_string                (void);

This is similar to the macro `PANGO_VERSION_STRING` except that it returns the version of Pango available at run-time, as opposed to the version available at compile-time.

Returns : | A string containing the version of Pango library available at run time. The returned string is owned by Pango and should not be modified or freed.

Since 1.16

### pango_version_check ()

    const char *        pango_version_check                 (int required_major,
                                                             int required_minor,
                                                             int required_micro);

Checks that the Pango library in use is compatible with the given version. Generally you would pass in the constants `PANGO_VERSION_MAJOR`, `PANGO_VERSION_MINOR`, `PANGO_VERSION_MICRO` as the three arguments to this function; that produces a check that the library in use at run-time is compatible with the version of Pango the application or module was compiled against.

Compatibility is defined by two things: first the version of the running library is newer than the version `required_major.required_minor`.`required_micro`. Second the running library must be binary compatible with the version `required_major.required_minor`.`required_micro` (same major version.)

For compile-time version checking use `PANGO_VERSION_CHECK()`.

`required_major` : | the required major version.
`required_minor` : | the required minor version.
`required_micro` : | the required major version.
Returns : | `NULL` if the Pango library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by Pango and should not be modified or freed.

Since 1.16