mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
b6b9ac0b85
This adds a version header which contains macros to define which version of Cogl the application is being compiled against. This helps applications that want to support multiple incompatible versions of Cogl at compile time. The macros are called COGL_VERSION_{MAJOR,MINOR,MICRO}. This does not match Clutter which names them CLUTTER_{MAJOR,MINOR,MICRO}_VERSION but I think the former is nicer and it at least matches Cairo and Pango. The values of the macro are defined to COGL_VERSION_*_INTERNAL which is generated by the configure script into cogl-defines.h. There is also a macro for the entire version as a string called COGL_VERSION_STRING. The internal utility macros for encoding a 3 part version number into a single integer have been moved into the new header so they can be used publicly as a convenient way to check if the version is within a particular range. There is also a COGL_VERSION_CHECK macro for the very common case that a feature will be used since a particular version of Cogl. There is a macro called COGL_VERSION which contains the pre-encoded version of Cogl being compiled against for convenience. Unlike in Clutter this patch does not add any runtime version identification mechanism. A test case is also added which just contains static asserts to sanity check the macros. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 3480cf140dc355fa87ab3fbcf0aeeb0124798a8f) |
||
---|---|---|
.. | ||
reference | ||
CODING_STYLE | ||
Makefile.am | ||
RELEASING |