clutter-version

clutter-version — Versioning utility macros

Functions

Types and Values

Description

Clutter offers a set of macros for checking the version of the library at compile time; it also provides a function to perform the same check at run time.

Clutter adds version information to both API deprecations and additions; by definining the macros CLUTTER_VERSION_MIN_REQUIRED and CLUTTER_VERSION_MAX_ALLOWED, you can specify the range of Clutter versions whose API you want to use. Functions that were deprecated before, or introduced after, this range will trigger compiler warnings. For instance, if we define the following symbols:

1
2
CLUTTER_VERSION_MIN_REQUIRED = CLUTTER_VERSION_1_6
CLUTTER_VERSION_MAX_ALLOWED  = CLUTTER_VERSION_1_8

and we have the following functions annotated in the Clutter headers:

1
2
3
4
void clutter_function_A (void) CLUTTER_DEPRECATED_IN_1_4;
void clutter_function_B (void) CLUTTER_DEPRECATED_IN_1_6;
void clutter_function_C (void) CLUTTER_AVAILABLE_IN_1_8;
void clutter_function_D (void) CLUTTER_AVAILABLE_IN_1_10;

then any application code using the functions above will get the output:

1
2
3
4
clutter_function_A: deprecation warning
clutter_function_B: no warning
clutter_function_C: no warning
clutter_function_D: symbol not available warning

It is possible to disable the compiler warnings by defining the macro CLUTTER_DISABLE_DEPRECATION_WARNINGS before including the clutter.h header.

Functions

CLUTTER_CHECK_VERSION()

#define             CLUTTER_CHECK_VERSION(major,minor,micro)

Evaluates to TRUE if the version of the Clutter library is greater than major , minor and micro

Parameters

major

major version, like 1 in 1.2.3

 

minor

minor version, like 2 in 1.2.3

 

micro

micro version, like 3 in 1.2.3

 

Types and Values

CLUTTER_MAJOR_VERSION

#define CLUTTER_MAJOR_VERSION   (1)

The major version of the Clutter library (1, if CLUTTER_VERSION is 1.2.3)


CLUTTER_MINOR_VERSION

#define CLUTTER_MINOR_VERSION   (26)

The minor version of the Clutter library (2, if CLUTTER_VERSION is 1.2.3)


CLUTTER_MICRO_VERSION

#define CLUTTER_MICRO_VERSION   (1)

The micro version of the Clutter library (3, if CLUTTER_VERSION is 1.2.3)


CLUTTER_VERSION

#define CLUTTER_VERSION         1.26.1

The full version of the Clutter library, like 1.2.3


CLUTTER_VERSION_S

#define CLUTTER_VERSION_S       "1.26.1"

The full version of the Clutter library, in string form (suited for string concatenation)


CLUTTER_VERSION_HEX

#define             CLUTTER_VERSION_HEX

Numerically encoded version of the Clutter library, like 0x010203


CLUTTER_VERSION_1_0

#define CLUTTER_VERSION_1_0     (G_ENCODE_VERSION (1, 0))

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

Since: 1.10


CLUTTER_VERSION_1_2

#define CLUTTER_VERSION_1_2     (G_ENCODE_VERSION (1, 2))

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

Since: 1.10


CLUTTER_VERSION_1_4

#define CLUTTER_VERSION_1_4     (G_ENCODE_VERSION (1, 4))

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

Since: 1.10


CLUTTER_VERSION_1_6

#define CLUTTER_VERSION_1_6     (G_ENCODE_VERSION (1, 6))

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

Since: 1.10


CLUTTER_VERSION_1_8

#define CLUTTER_VERSION_1_8     (G_ENCODE_VERSION (1, 8))

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

Since: 1.10


CLUTTER_VERSION_1_10

#define CLUTTER_VERSION_1_10    (G_ENCODE_VERSION (1, 10))

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

Since: 1.10


CLUTTER_VERSION_1_12

#define CLUTTER_VERSION_1_12    (G_ENCODE_VERSION (1, 12))

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

Since: 1.12


CLUTTER_VERSION_1_14

#define CLUTTER_VERSION_1_14    (G_ENCODE_VERSION (1, 14))

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

Since: 1.14


CLUTTER_VERSION_1_16

#define CLUTTER_VERSION_1_16    (G_ENCODE_VERSION (1, 16))

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

Since: 1.16


CLUTTER_VERSION_1_18

#define CLUTTER_VERSION_1_18    (G_ENCODE_VERSION (1, 18))

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

Since: 1.18


CLUTTER_VERSION_1_20

#define CLUTTER_VERSION_1_20    (G_ENCODE_VERSION (1, 20))

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

Since: 1.20


CLUTTER_VERSION_1_22

#define CLUTTER_VERSION_1_22    (G_ENCODE_VERSION (1, 22))

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

Since: 1.22


CLUTTER_VERSION_1_24

#define CLUTTER_VERSION_1_24    (G_ENCODE_VERSION (1, 24))

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

Since: 1.24


CLUTTER_VERSION_1_26

#define CLUTTER_VERSION_1_26    (G_ENCODE_VERSION (1, 26))

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

Since: 1.26


CLUTTER_VERSION_CUR_STABLE

# define CLUTTER_VERSION_CUR_STABLE      (G_ENCODE_VERSION (CLUTTER_MAJOR_VERSION, CLUTTER_MINOR_VERSION + 1))

CLUTTER_VERSION_PREV_STABLE

# define CLUTTER_VERSION_PREV_STABLE     (G_ENCODE_VERSION (CLUTTER_MAJOR_VERSION, CLUTTER_MINOR_VERSION - 1))

CLUTTER_VAR

#define CLUTTER_VAR _CLUTTER_EXTERN

clutter_major_version

extern const guint clutter_major_version;

The major component of the Clutter library version, e.g. 1 if the version is 1.2.3

This value can be used for run-time version checks

For a compile-time check, use CLUTTER_MAJOR_VERSION

Since: 1.2


clutter_minor_version

extern const guint clutter_minor_version;

The minor component of the Clutter library version, e.g. 2 if the version is 1.2.3

This value can be used for run-time version checks

For a compile-time check, use CLUTTER_MINOR_VERSION

Since: 1.2


clutter_micro_version

extern const guint clutter_micro_version;

The micro component of the Clutter library version, e.g. 3 if the version is 1.2.3

This value can be used for run-time version checks

For a compile-time check, use CLUTTER_MICRO_VERSION

Since: 1.2