Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/libpainter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2016-08-18 01:43:45 +0300
committerJay Sorg <jay.sorg@gmail.com>2016-08-18 01:43:45 +0300
commit583b72b0b6a226019fea20576b39023801cd80c0 (patch)
tree99fc4778ab5767e64bb4ae72cf1b8ed5530ab606
parent46538761c536f7a38a59245b7fc2310be779a10f (diff)
add version to header and lib
-rw-r--r--configure.ac3
-rw-r--r--include/painter.h6
-rw-r--r--src/painter.c10
3 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index acf81eb..b0f1964 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,9 @@ AC_PROG_CC
AC_C_CONST
AC_PROG_LIBTOOL
+# Use silent rules by default if supported by Automake
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"])
if test "x${prefix}" = "xNONE" ; then
diff --git a/include/painter.h b/include/painter.h
index b17dd9c..9267ae8 100644
--- a/include/painter.h
+++ b/include/painter.h
@@ -19,6 +19,10 @@
#if !defined(__PAINTER_H)
#define __PAINTER_H
+#define LIBPAINTER_VERSION_MAJOR 0
+#define LIBPAINTER_VERSION_MINOR 1
+#define LIBPAINTER_VERSION_MICRO 0
+
#define PT_FORMAT_a8b8g8r8 \
((32 << 24) | (3 << 16) | (8 << 12) | (8 << 8) | (8 << 4) | 8)
#define PT_FORMAT_a8r8g8b8 \
@@ -105,5 +109,7 @@ painter_copy(void *handle, struct painter_bitmap *dst,
int
painter_line(void *handle, struct painter_bitmap *dst,
int x1, int y1, int x2, int y2, int width, int flags);
+int
+painter_get_version(int *major, int *minor, int *micro);
#endif
diff --git a/src/painter.c b/src/painter.c
index bad89b1..fd2da5b 100644
--- a/src/painter.c
+++ b/src/painter.c
@@ -426,3 +426,13 @@ painter_line(void *handle, struct painter_bitmap *dst,
return PT_ERROR_NONE;
}
+/*****************************************************************************/
+int
+painter_get_version(int *major, int *minor, int *micro)
+{
+ *major = LIBPAINTER_VERSION_MAJOR;
+ *minor = LIBPAINTER_VERSION_MINOR;
+ *micro = LIBPAINTER_VERSION_MICRO;
+ return 0;
+}
+