From 554efc015a79f40a98fef7beae1e7d5d3843c0bb Mon Sep 17 00:00:00 2001 From: Nicolas Aguirre Date: Fri, 10 Oct 2014 11:45:02 +0200 Subject: [PATCH] evas: add documentation for Evas_Version structure. --- src/lib/evas/Evas_Common.h | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h index 6826c79b72..f9a517d8cf 100644 --- a/src/lib/evas/Evas_Common.h +++ b/src/lib/evas/Evas_Common.h @@ -5,12 +5,34 @@ #define EVAS_VERSION_MAJOR EFL_VERSION_MAJOR #define EVAS_VERSION_MINOR EFL_VERSION_MINOR +/** + * @typedef Evas_Version + * + * This is the Evas version information structure that can be used at + * runtime to detect which version of evas is being used and adapt + * appropriately as follows for example: + * + * @code + * #if defined(EVAS_VERSION_MAJOR) && (EVAS_VERSION_MAJOR >= 1) && defined(EVAS_VERSION_MINOR) && (EVAS_VERSION_MINOR > 0) + * printf("Evas version: %i.%i.%i\n", + * evas_version->major, + * evas_version->minor, + * evas_version->micro); + * if (evas_version->revision > 0) + * { + * printf(" Built from Git revision # %i\n", evas_version->revision); + * } + * #endif + * @endcode + * + */ + typedef struct _Evas_Version { - int major; - int minor; - int micro; - int revision; + int major; /** < major (binary or source incompatible changes) */ + int minor; /** < minor (new features, bugfixes, major improvements version) */ + int micro; /** < micro (bugfix, internal improvements, no new features version) */ + int revision; /** < git revision (0 if a proper release or the git revision number Evas is built from) */ } Evas_Version; EAPI extern Evas_Version * evas_version;