## Versioning macros Versioning macros — Variables and functions to check the ATK version |

## Functions

guint | atk_get_major_version ()
guint | atk_get_minor_version ()
guint | atk_get_micro_version ()
guint | atk_get_binary_age ()
guint | atk_get_interface_age ()
#define | ATK_CHECK_VERSION()

## Types and Values

#define | ATK_BINARY_AGE
#define | ATK_INTERFACE_AGE
#define | ATK_MAJOR_VERSION
#define | ATK_MINOR_VERSION
#define | ATK_MICRO_VERSION
#define | ATK_VERSION_2_2
#define | ATK_VERSION_2_4
#define | ATK_VERSION_2_6
#define | ATK_VERSION_2_8
#define | ATK_VERSION_2_10
#define | ATK_VERSION_2_12
#define | ATK_VERSION_2_14
#define | ATK_VERSION_2_30
#define | ATK_VERSION_MAX_ALLOWED
#define | ATK_VERSION_MIN_REQUIRED

## Includes

    #include <atk/atk.h>

## Description

ATK provides a set of macros and methods for checking the version of the library at compile and run time.

## Functions

### atk_get_major_version ()

    guint
    atk_get_major_version (void);

Returns the major version number of the ATK library. (e.g. in ATK version 2.7.4 this is 2.)

This function is in the library, so it represents the ATK library your code is running against. In contrast, the ATK_MAJOR_VERSION macro represents the major version of the ATK headers you have included when compiling your code.

#### Returns

the major version number of the ATK library

Since: 2.8

### atk_get_minor_version ()

    guint
    atk_get_minor_version (void);

Returns the minor version number of the ATK library. (e.g. in ATK version 2.7.4 this is 7.)

This function is in the library, so it represents the ATK library your code is are running against. In contrast, the ATK_MINOR_VERSION macro represents the minor version of the ATK headers you have included when compiling your code.

#### Returns

the minor version number of the ATK library

Since: 2.8

### atk_get_micro_version ()

    guint
    atk_get_micro_version (void);

Returns the micro version number of the ATK library. (e.g. in ATK version 2.7.4 this is 4.)

This function is in the library, so it represents the ATK library your code is are running against. In contrast, the ATK_MICRO_VERSION macro represents the micro version of the ATK headers you have included when compiling your code.

#### Returns

the micro version number of the ATK library

Since: 2.8

### atk_get_binary_age ()

    guint
    atk_get_binary_age (void);

Returns the binary age as passed to libtool when building the ATK library the process is running against.

#### Returns

the binary age of the ATK library

Since: 2.8

### atk_get_interface_age ()

    guint
    atk_get_interface_age (void);

Returns the interface age as passed to libtool when building the ATK library the process is running against.

#### Returns

the interface age of the ATK library

Since: 2.8

### ATK_CHECK_VERSION()

    #define             ATK_CHECK_VERSION(major,minor,micro)

Returns `TRUE` if the version of the ATK header files is the same as or newer than the passed-in version.

#### Parameters

major | major version (e.g. 1 for version 1.2.5) |
minor | minor version (e.g. 2 for version 1.2.5) |
micro | micro version (e.g. 5 for version 1.2.5) |

Since: 2.7.4

## Types and Values

### ATK_BINARY_AGE

    #define ATK_BINARY_AGE    (24610)

Like `atk_get_binary_age()`, but from the headers used at application compile time, rather than from the library linked against at application run time.

Since: 2.7.4

### ATK_INTERFACE_AGE

    #define ATK_INTERFACE_AGE (1)

Like `atk_get_interface_age()`, but from the headers used at application compile time, rather than from the library linked against at application run time.

Since: 2.7.4

### ATK_MAJOR_VERSION

    #define ATK_MAJOR_VERSION (2)

Like `atk_get_major_version()`, but from the headers used at application compile time, rather than from the library linked against at application run time.

Since: 2.7.4

### ATK_MINOR_VERSION

    #define ATK_MINOR_VERSION (46)

Like `atk_get_minor_version()`, but from the headers used at application compile time, rather than from the library linked against at application run time.

Since: 2.7.4

### ATK_MICRO_VERSION

    #define ATK_MICRO_VERSION (0)

Like `atk_get_micro_version()`, but from the headers used at application compile time, rather than from the library linked against at application run time.

Since: 2.7.4

### ATK_VERSION_2_2

    #define ATK_VERSION_2_2       (G_ENCODE_VERSION (2, 2))

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

Since: 2.14

### ATK_VERSION_2_4

    #define ATK_VERSION_2_4       (G_ENCODE_VERSION (2, 4))

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

Since: 2.14

### ATK_VERSION_2_6

    #define ATK_VERSION_2_6       (G_ENCODE_VERSION (2, 6))

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

Since: 2.14

### ATK_VERSION_2_8

    #define ATK_VERSION_2_8       (G_ENCODE_VERSION (2, 8))

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

Since: 2.14

### ATK_VERSION_2_10

    #define ATK_VERSION_2_10       (G_ENCODE_VERSION (2, 10))

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

Since: 2.14

### ATK_VERSION_2_12

    #define ATK_VERSION_2_12       (G_ENCODE_VERSION (2, 12))

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

Since: 2.14

### ATK_VERSION_2_14

    #define ATK_VERSION_2_14       (G_ENCODE_VERSION (2, 14))

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

Since: 2.14

### ATK_VERSION_2_30

    #define ATK_VERSION_2_30       (G_ENCODE_VERSION (2, 30))

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

Since: 2.30

### ATK_VERSION_MAX_ALLOWED

    # define ATK_VERSION_MAX_ALLOWED      (ATK_VERSION_CUR_STABLE)

A macro that should be defined by the user prior to including the atk/atk.h header. The definition should be one of the predefined ATK version macros: `ATK_VERSION_2_12`, `ATK_VERSION_2_14`,...

This macro defines the latest version of the ATK 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 `ATK_VERSION_MAX_ALLOWED` will cause warnings.

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

Since: 2.14

### ATK_VERSION_MIN_REQUIRED

    # define ATK_VERSION_MIN_REQUIRED      (ATK_VERSION_CUR_STABLE)

A macro that should be defined by the user prior to including the atk/atk.h header. The definition should be one of the predefined ATK version macros: `ATK_VERSION_2_12`, `ATK_VERSION_2_14`,...

This macro defines the earliest version of ATK 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 `ATK_VERSION_MIN_REQUIRED` or earlier will cause warnings (but using functions deprecated in later releases will not).

Since: 2.14