diff --git a/pipi/pipi.c b/pipi/pipi.c index b4d21eb..aa2a214 100644 --- a/pipi/pipi.c +++ b/pipi/pipi.c @@ -26,6 +26,19 @@ #include "pipi.h" #include "pipi_internals.h" +/** \brief Return the \e libpipi version. + * + * Return a read-only string with the \e libpipi version information. + * + * This function never fails. + * + * \return The \e libpipi version information. + */ +char const * pipi_get_version(void) +{ + return PACKAGE_VERSION; +} + /* static int init = 0; diff --git a/pipi/pipi.h b/pipi/pipi.h index ee2cf7d..fe417bf 100644 --- a/pipi/pipi.h +++ b/pipi/pipi.h @@ -114,6 +114,7 @@ pipi_command_t; extern pipi_pixel_t *pipi_get_color_from_string(const char* s); +char const * pipi_get_version(void); extern pipi_context_t *pipi_create_context(void); extern void pipi_destroy_context(pipi_context_t *);