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

## Functions

#define | PANGO_VERSION_ENCODE()
#define | PANGO_VERSION_CHECK()
int | pango_version ()
const char * | pango_version_string ()
const char * | pango_version_check ()

## Types and Values

#define | PANGO_VERSION
#define | PANGO_VERSION_MAJOR
#define | PANGO_VERSION_MINOR
#define | PANGO_VERSION_MICRO
#define | PANGO_VERSION_STRING
#define | PANGO_VERSION_1_2
#define | PANGO_VERSION_1_4
#define | PANGO_VERSION_1_6
#define | PANGO_VERSION_1_8
#define | PANGO_VERSION_1_10
#define | PANGO_VERSION_1_12
#define | PANGO_VERSION_1_14
#define | PANGO_VERSION_1_16
#define | PANGO_VERSION_1_18
#define | PANGO_VERSION_1_20
#define | PANGO_VERSION_1_22
#define | PANGO_VERSION_1_24
#define | PANGO_VERSION_1_26
#define | PANGO_VERSION_1_28
#define | PANGO_VERSION_1_30
#define | PANGO_VERSION_1_32
#define | PANGO_VERSION_1_34
#define | PANGO_VERSION_1_36
#define | PANGO_VERSION_1_38
#define | PANGO_VERSION_1_40
#define | PANGO_VERSION_1_42
#define | PANGO_VERSION_1_44
#define | PANGO_VERSION_MIN_REQUIRED
#define | PANGO_VERSION_MAX_ALLOWED

## 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.

## Functions

### 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.

#### Parameters

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_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.

#### Parameters

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()`.

#### Parameters

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.

[nullable]

Since: 1.16

## Types and Values

### 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 46

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

### PANGO_VERSION_MICRO

    #define PANGO_VERSION_MICRO 1

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

### PANGO_VERSION_STRING

    #define PANGO_VERSION_STRING "1.46.1"

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

### PANGO_VERSION_1_2

    #define PANGO_VERSION_1_2        (G_ENCODE_VERSION (1, 2))

A macro that evaluates to the 1.2 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_4

    #define PANGO_VERSION_1_4        (G_ENCODE_VERSION (1, 4))

A macro that evaluates to the 1.4 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_6

    #define PANGO_VERSION_1_6        (G_ENCODE_VERSION (1, 6))

A macro that evaluates to the 1.6 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_8

    #define PANGO_VERSION_1_8        (G_ENCODE_VERSION (1, 8))

A macro that evaluates to the 1.8 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_10

    #define PANGO_VERSION_1_10       (G_ENCODE_VERSION (1, 10))

A macro that evaluates to the 1.10 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_12

    #define PANGO_VERSION_1_12       (G_ENCODE_VERSION (1, 12))

A macro that evaluates to the 1.12 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_14

    #define PANGO_VERSION_1_14       (G_ENCODE_VERSION (1, 14))

A macro that evaluates to the 1.14 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_16

    #define PANGO_VERSION_1_16       (G_ENCODE_VERSION (1, 16))

A macro that evaluates to the 1.16 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_18

    #define PANGO_VERSION_1_18       (G_ENCODE_VERSION (1, 18))

A macro that evaluates to the 1.18 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_20

    #define PANGO_VERSION_1_20       (G_ENCODE_VERSION (1, 20))

A macro that evaluates to the 1.20 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_22

    #define PANGO_VERSION_1_22       (G_ENCODE_VERSION (1, 22))

A macro that evaluates to the 1.22 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_24

    #define PANGO_VERSION_1_24       (G_ENCODE_VERSION (1, 24))

A macro that evaluates to the 1.24 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_26

    #define PANGO_VERSION_1_26       (G_ENCODE_VERSION (1, 26))

A macro that evaluates to the 1.26 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_28

    #define PANGO_VERSION_1_28       (G_ENCODE_VERSION (1, 28))

A macro that evaluates to the 1.28 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_30

    #define PANGO_VERSION_1_30       (G_ENCODE_VERSION (1, 30))

A macro that evaluates to the 1.30 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_32

    #define PANGO_VERSION_1_32       (G_ENCODE_VERSION (1, 32))

A macro that evaluates to the 1.32 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_34

    #define PANGO_VERSION_1_34       (G_ENCODE_VERSION (1, 34))

A macro that evaluates to the 1.34 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_36

    #define PANGO_VERSION_1_36       (G_ENCODE_VERSION (1, 36))

A macro that evaluates to the 1.36 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_38

    #define PANGO_VERSION_1_38       (G_ENCODE_VERSION (1, 38))

A macro that evaluates to the 1.38 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_40

    #define PANGO_VERSION_1_40       (G_ENCODE_VERSION (1, 40))

A macro that evaluates to the 1.40 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_42

    #define PANGO_VERSION_1_42       (G_ENCODE_VERSION (1, 42))

A macro that evaluates to the 1.42 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.42

### PANGO_VERSION_1_44

    #define PANGO_VERSION_1_44       (G_ENCODE_VERSION (1, 44))

A macro that evaluates to the 1.44 version of Pango, in a format that can be used by the C pre-processor.

Since: 1.44

### PANGO_VERSION_MIN_REQUIRED

    # define PANGO_VERSION_MIN_REQUIRED      (PANGO_VERSION_CUR_STABLE)

A macro that should be defined by the user prior to including the pango.h header. The definition should be one of the predefined Pango version macros: `PANGO_VERSION_1_2`, `PANGO_VERSION_1_4`,...

This macro defines the earliest version of Pango that the package is required to be able to compile against.

If the compiler is configured to warn about the use of deprecated functions, then using functions that were deprecated in version `PANGO_VERSION_MIN_REQUIRED` or earlier will cause warnings (but using functions deprecated in later releases will not).

Since: 1.42

### PANGO_VERSION_MAX_ALLOWED

    # define PANGO_VERSION_MAX_ALLOWED      (PANGO_VERSION_CUR_STABLE)

A macro that should be defined by the user prior to including the glib.h header. The definition should be one of the predefined Pango version macros: `PANGO_VERSION_1_2`, `PANGO_VERSION_1_4`,...

This macro defines the latest version of the Pango API that the package is allowed to make use of.

If the compiler is configured to warn about the use of deprecated functions, then using functions added after version `PANGO_VERSION_MAX_ALLOWED` will cause warnings.

Unless you are using `PANGO_CHECK_VERSION()` or the like to compile different code depending on the Pango version, then this should be set to the same value as `PANGO_VERSION_MIN_REQUIRED`.

Since: 1.42