summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-04-22 20:57:31 +0200
committerSlávek Banko <[email protected]>2019-04-28 16:05:06 +0200
commitb314a5b4a87c2c84b77a801348b05c819a44ef7b (patch)
tree9f5d5520de3d05096a84b6a1af7f65d48960a33a
parentdb23722ddb8507a7954d1cecf6217823b2052388 (diff)
downloadlibart-lgpl-b314a5b4a87c2c84b77a801348b05c819a44ef7b.tar.gz
libart-lgpl-b314a5b4a87c2c84b77a801348b05c819a44ef7b.zip
Add support for GCC hidden visibility.
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 2a50894a436559785a7e0f6f65dde13b0082572c)
-rw-r--r--art_affine.h28
-rw-r--r--art_alphagamma.h6
-rw-r--r--art_bpath.h4
-rw-r--r--art_config.h.in11
-rw-r--r--art_gray_svp.h4
-rw-r--r--art_misc.h12
-rw-r--r--art_pixbuf.h20
-rw-r--r--art_rect.h26
-rw-r--r--art_rect_svp.h6
-rw-r--r--art_rect_uta.h4
-rw-r--r--art_render.h21
-rw-r--r--art_render_gradient.h6
-rw-r--r--art_render_mask.h4
-rw-r--r--art_render_svp.h4
-rw-r--r--art_rgb.h6
-rw-r--r--art_rgb_a_affine.h4
-rw-r--r--art_rgb_affine.h4
-rw-r--r--art_rgb_affine_private.h8
-rw-r--r--art_rgb_bitmap_affine.h4
-rw-r--r--art_rgb_pixbuf_affine.h4
-rw-r--r--art_rgb_rgba_affine.h4
-rw-r--r--art_rgb_svp.h6
-rw-r--r--art_rgba.h8
-rw-r--r--art_svp.h8
-rw-r--r--art_svp_intersect.h10
-rw-r--r--art_svp_ops.h10
-rw-r--r--art_svp_point.h10
-rw-r--r--art_svp_render_aa.h10
-rw-r--r--art_svp_vpath.h4
-rw-r--r--art_svp_vpath_stroke.h6
-rw-r--r--art_svp_wind.h6
-rw-r--r--art_uta.h8
-rw-r--r--art_uta_ops.h4
-rw-r--r--art_uta_rect.h4
-rw-r--r--art_uta_svp.h4
-rw-r--r--art_uta_vpath.h7
-rw-r--r--art_vpath.h14
-rw-r--r--art_vpath_bpath.h6
-rw-r--r--art_vpath_dash.h4
-rw-r--r--art_vpath_svp.h4
-rw-r--r--libart-features.c1
-rw-r--r--libart-features.h.in18
-rw-r--r--libart.h1
-rw-r--r--testart.c1
-rw-r--r--testuta.c1
45 files changed, 225 insertions, 120 deletions
diff --git a/art_affine.h b/art_affine.h
index c2baa1e..38982ae 100644
--- a/art_affine.h
+++ b/art_affine.h
@@ -21,8 +21,10 @@
#define __ART_AFFINE_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_point.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_point.h>
#endif
@@ -30,59 +32,59 @@
extern "C" {
#endif /* __cplusplus */
-void
+LIBART_EXPORT void
art_affine_point (ArtPoint *dst, const ArtPoint *src,
const double affine[6]);
-void
+LIBART_EXPORT void
art_affine_invert (double dst_affine[6], const double src_affine[6]);
/* flip the matrix, FALSE, FALSE is a simple copy operation, and
TRUE, TRUE equals a rotation by 180 degrees */
-void
+LIBART_EXPORT void
art_affine_flip (double dst_affine[6], const double src_affine[6],
int horz, int vert);
-void
+LIBART_EXPORT void
art_affine_to_string (char str[128], const double src[6]);
-void
+LIBART_EXPORT void
art_affine_multiply (double dst[6],
const double src1[6], const double src2[6]);
/* set up the identity matrix */
-void
+LIBART_EXPORT void
art_affine_identity (double dst[6]);
/* set up a scaling matrix */
-void
+LIBART_EXPORT void
art_affine_scale (double dst[6], double sx, double sy);
/* set up a rotation matrix; theta is given in degrees */
-void
+LIBART_EXPORT void
art_affine_rotate (double dst[6], double theta);
/* set up a shearing matrix; theta is given in degrees */
-void
+LIBART_EXPORT void
art_affine_shear (double dst[6], double theta);
/* set up a translation matrix */
-void
+LIBART_EXPORT void
art_affine_translate (double dst[6], double tx, double ty);
/* find the affine's "expansion factor", i.e. the scale amount */
-double
+LIBART_EXPORT double
art_affine_expansion (const double src[6]);
/* Determine whether the affine transformation is rectilinear,
i.e. whether a rectangle aligned to the grid is transformed into
another rectangle aligned to the grid. */
-int
+LIBART_EXPORT int
art_affine_rectilinear (const double src[6]);
/* Determine whether two affine transformations are equal within grid allignment */
-int
+LIBART_EXPORT int
art_affine_equal (double matrix1[6], double matrix2[6]);
diff --git a/art_alphagamma.h b/art_alphagamma.h
index f67f048..89bab9c 100644
--- a/art_alphagamma.h
+++ b/art_alphagamma.h
@@ -23,8 +23,10 @@
/* Alphagamma tables */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_misc.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_misc.h>
#endif
@@ -42,10 +44,10 @@ struct _ArtAlphaGamma {
art_u8 invtable[1];
};
-ArtAlphaGamma *
+LIBART_EXPORT ArtAlphaGamma *
art_alphagamma_new (double gamma);
-void
+LIBART_EXPORT void
art_alphagamma_free (ArtAlphaGamma *alphagamma);
#ifdef __cplusplus
diff --git a/art_bpath.h b/art_bpath.h
index f85c226..36afcfe 100644
--- a/art_bpath.h
+++ b/art_bpath.h
@@ -21,10 +21,12 @@
#define __ART_BPATH_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_misc.h"
#include "art_point.h"
#include "art_pathcode.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_misc.h>
#include <libart_lgpl/art_point.h>
#include <libart_lgpl/art_pathcode.h>
@@ -49,7 +51,7 @@ struct _ArtBpath {
double y3;
};
-ArtBpath *
+LIBART_EXPORT ArtBpath *
art_bpath_affine_transform (const ArtBpath *src, const double matrix[6]);
#ifdef __cplusplus
diff --git a/art_config.h.in b/art_config.h.in
index 4d42ed9..cfa4786 100644
--- a/art_config.h.in
+++ b/art_config.h.in
@@ -11,4 +11,15 @@ typedef @ART_U8_TYPE@ art_u8;
typedef @ART_U16_TYPE@ art_u16;
typedef @ART_U32_TYPE@ art_u32;
+#if defined(__KDE_HAVE_GCC_VISIBILITY) || defined(G_HAVE_GCC_VISIBILITY)
+#define LIBART_NO_EXPORT __attribute__ ((visibility("hidden")))
+#define LIBART_EXPORT __attribute__ ((visibility("default")))
+#elif defined(_WIN32)
+#define LIBART_NO_EXPORT
+#define LIBART_EXPORT __declspec(dllexport)
+#else
+#define LIBART_NO_EXPORT
+#define LIBART_EXPORT
+#endif
+
#endif /* _ART_CONFIG_H_ */
diff --git a/art_gray_svp.h b/art_gray_svp.h
index 001878d..06ab08d 100644
--- a/art_gray_svp.h
+++ b/art_gray_svp.h
@@ -23,9 +23,11 @@
#define __ART_GRAY_SVP_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_misc.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_misc.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -34,7 +36,7 @@
extern "C" {
#endif /* __cplusplus */
-void
+LIBART_EXPORT void
art_gray_svp_aa (const ArtSVP *svp,
int x0, int y0, int x1, int y1,
art_u8 *buf, int rowstride);
diff --git a/art_misc.h b/art_misc.h
index 9aff741..a4d6f62 100644
--- a/art_misc.h
+++ b/art_misc.h
@@ -37,9 +37,9 @@
#ifdef __cplusplus
extern "C" {
#endif
-void *art_alloc(size_t size);
-void art_free(void *ptr);
-void *art_realloc(void *ptr, size_t size);
+LIBART_EXPORT void *art_alloc(size_t size);
+LIBART_EXPORT void art_free(void *ptr);
+LIBART_EXPORT void *art_realloc(void *ptr, size_t size);
#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -84,13 +84,13 @@ typedef int art_boolean;
extern "C" {
#endif
-void ART_GNUC_NORETURN
+LIBART_EXPORT void ART_GNUC_NORETURN
art_die (const char *fmt, ...) ART_GNUC_PRINTF (1, 2);
-void
+LIBART_EXPORT void
art_warn (const char *fmt, ...) ART_GNUC_PRINTF (1, 2);
-void
+LIBART_EXPORT void
art_dprint (const char *fmt, ...) ART_GNUC_PRINTF (1, 2);
#ifdef __cplusplus
diff --git a/art_pixbuf.h b/art_pixbuf.h
index d303fc0..bbac88d 100644
--- a/art_pixbuf.h
+++ b/art_pixbuf.h
@@ -25,8 +25,10 @@
pixel buffer formats. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_misc.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_misc.h>
#endif
@@ -64,37 +66,37 @@ struct _ArtPixBuf {
};
/* allocate an ArtPixBuf from art_alloc()ed pixels (automated destruction) */
-ArtPixBuf *
+LIBART_EXPORT ArtPixBuf *
art_pixbuf_new_rgb (art_u8 *pixels, int width, int height, int rowstride);
-ArtPixBuf *
+LIBART_EXPORT ArtPixBuf *
art_pixbuf_new_rgba (art_u8 *pixels, int width, int height, int rowstride);
/* allocate an ArtPixBuf from constant pixels (no destruction) */
-ArtPixBuf *
+LIBART_EXPORT ArtPixBuf *
art_pixbuf_new_const_rgb (const art_u8 *pixels, int width, int height, int rowstride);
-ArtPixBuf *
+LIBART_EXPORT ArtPixBuf *
art_pixbuf_new_const_rgba (const art_u8 *pixels, int width, int height, int rowstride);
/* allocate an ArtPixBuf and notify creator upon destruction */
-ArtPixBuf *
+LIBART_EXPORT ArtPixBuf *
art_pixbuf_new_rgb_dnotify (art_u8 *pixels, int width, int height, int rowstride,
void *dfunc_data, ArtDestroyNotify dfunc);
-ArtPixBuf *
+LIBART_EXPORT ArtPixBuf *
art_pixbuf_new_rgba_dnotify (art_u8 *pixels, int width, int height, int rowstride,
void *dfunc_data, ArtDestroyNotify dfunc);
/* free an ArtPixBuf with destroy notification */
-void
+LIBART_EXPORT void
art_pixbuf_free (ArtPixBuf *pixbuf);
/* deprecated function, use the _dnotify variants for allocation instead */
-void
+LIBART_EXPORT void
art_pixbuf_free_shallow (ArtPixBuf *pixbuf);
-ArtPixBuf *
+LIBART_EXPORT ArtPixBuf *
art_pixbuf_duplicate (const ArtPixBuf *pixbuf);
#ifdef __cplusplus
diff --git a/art_rect.h b/art_rect.h
index 088079f..aed873a 100644
--- a/art_rect.h
+++ b/art_rect.h
@@ -20,6 +20,12 @@
#ifndef __ART_RECT_H__
#define __ART_RECT_H__
+#ifdef LIBART_COMPILATION
+#include "art_config.h"
+#else
+#include <libart_lgpl/art_config.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -38,38 +44,38 @@ struct _ArtIRect {
};
/* Make a copy of the rectangle. */
-void art_irect_copy (ArtIRect *dest, const ArtIRect *src);
+LIBART_EXPORT void art_irect_copy (ArtIRect *dest, const ArtIRect *src);
/* Find the smallest rectangle that includes both source rectangles. */
-void art_irect_union (ArtIRect *dest,
+LIBART_EXPORT void art_irect_union (ArtIRect *dest,
const ArtIRect *src1, const ArtIRect *src2);
/* Return the intersection of the two rectangles */
-void art_irect_intersect (ArtIRect *dest,
+LIBART_EXPORT void art_irect_intersect (ArtIRect *dest,
const ArtIRect *src1, const ArtIRect *src2);
/* Return true if the rectangle is empty. */
-int art_irect_empty (const ArtIRect *src);
+LIBART_EXPORT int art_irect_empty (const ArtIRect *src);
/* Make a copy of the rectangle. */
-void art_drect_copy (ArtDRect *dest, const ArtDRect *src);
+LIBART_EXPORT void art_drect_copy (ArtDRect *dest, const ArtDRect *src);
/* Find the smallest rectangle that includes both source rectangles. */
-void art_drect_union (ArtDRect *dest,
+LIBART_EXPORT void art_drect_union (ArtDRect *dest,
const ArtDRect *src1, const ArtDRect *src2);
/* Return the intersection of the two rectangles */
-void art_drect_intersect (ArtDRect *dest,
+LIBART_EXPORT void art_drect_intersect (ArtDRect *dest,
const ArtDRect *src1, const ArtDRect *src2);
/* Return true if the rectangle is empty. */
-int art_drect_empty (const ArtDRect *src);
+LIBART_EXPORT int art_drect_empty (const ArtDRect *src);
-void
+LIBART_EXPORT void
art_drect_affine_transform (ArtDRect *dst, const ArtDRect *src,
const double matrix[6]);
-void art_drect_to_irect (ArtIRect *dst, ArtDRect *src);
+LIBART_EXPORT void art_drect_to_irect (ArtIRect *dst, ArtDRect *src);
#ifdef __cplusplus
}
diff --git a/art_rect_svp.h b/art_rect_svp.h
index 622d88f..13f7954 100644
--- a/art_rect_svp.h
+++ b/art_rect_svp.h
@@ -23,8 +23,10 @@
/* Find the bounding box of a sorted vector path. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -32,12 +34,12 @@
extern "C" {
#endif /* __cplusplus */
-void
+LIBART_EXPORT void
art_drect_svp (ArtDRect *bbox, const ArtSVP *svp);
/* Compute the bounding box of the svp and union it in to the
existing bounding box. */
-void
+LIBART_EXPORT void
art_drect_svp_union (ArtDRect *bbox, const ArtSVP *svp);
#ifdef __cplusplus
diff --git a/art_rect_uta.h b/art_rect_uta.h
index dfaf1f3..d8b92be 100644
--- a/art_rect_uta.h
+++ b/art_rect_uta.h
@@ -21,9 +21,11 @@
#define __ART_RECT_UTA_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_rect.h"
#include "art_uta.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_rect.h>
#include <libart_lgpl/art_uta.h>
#endif
@@ -32,7 +34,7 @@
extern "C" {
#endif /* __cplusplus */
-ArtIRect *
+LIBART_EXPORT ArtIRect *
art_rect_list_from_uta (ArtUta *uta, int max_width, int max_height,
int *p_nrects);
diff --git a/art_render.h b/art_render.h
index 5e19289..222f705 100644
--- a/art_render.h
+++ b/art_render.h
@@ -24,8 +24,10 @@
#define __ART_RENDER_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_alphagamma.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_alphagamma.h>
#endif
@@ -143,36 +145,36 @@ struct _ArtRender {
art_boolean need_span;
};
-ArtRender *
+LIBART_EXPORT ArtRender *
art_render_new (int x0, int y0, int x1, int y1,
art_u8 *pixels, int rowstride,
int n_chan, int depth, ArtAlphaType alpha_type,
ArtAlphaGamma *alphagamma);
-void
+LIBART_EXPORT void
art_render_invoke (ArtRender *render);
-void
+LIBART_EXPORT void
art_render_clear (ArtRender *render, const ArtPixMaxDepth *clear_color);
-void
+LIBART_EXPORT void
art_render_clear_rgb (ArtRender *render, art_u32 clear_rgb);
-void
+LIBART_EXPORT void
art_render_mask_solid (ArtRender *render, int opacity);
-void
+LIBART_EXPORT void
art_render_image_solid (ArtRender *render, ArtPixMaxDepth *color);
/* The next two functions are for custom mask sources only. */
-void
+LIBART_EXPORT void
art_render_add_mask_source (ArtRender *render, ArtMaskSource *mask_source);
-void
+LIBART_EXPORT void
art_render_invoke_callbacks (ArtRender *render, art_u8 *dest, int y);
/* The following function is for custom image sources only. */
-void
+LIBART_EXPORT void
art_render_add_image_source (ArtRender *render, ArtImageSource *image_source);
#ifdef __cplusplus
@@ -180,4 +182,3 @@ art_render_add_image_source (ArtRender *render, ArtImageSource *image_source);
#endif /* __cplusplus */
#endif /* __ART_RENDER_H__ */
-
diff --git a/art_render_gradient.h b/art_render_gradient.h
index c5b4c46..e253afe 100644
--- a/art_render_gradient.h
+++ b/art_render_gradient.h
@@ -27,9 +27,11 @@
#define __ART_RENDER_GRADIENT_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_filterlevel.h"
#include "art_render.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_filterlevel.h>
#include <libart_lgpl/art_render.h>
#endif
@@ -70,12 +72,12 @@ struct _ArtGradientStop {
ArtPixMaxDepth color[ART_MAX_CHAN + 1];
};
-void
+LIBART_EXPORT void
art_render_gradient_linear (ArtRender *render,
const ArtGradientLinear *gradient,
ArtFilterLevel level);
-void
+LIBART_EXPORT void
art_render_gradient_radial (ArtRender *render,
const ArtGradientRadial *gradient,
ArtFilterLevel level);
diff --git a/art_render_mask.h b/art_render_mask.h
index 639a5d9..d672c96 100644
--- a/art_render_mask.h
+++ b/art_render_mask.h
@@ -26,8 +26,10 @@
#define __ART_RENDER_MASK_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_render.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_render.h>
#endif
@@ -35,7 +37,7 @@
extern "C" {
#endif /* __cplusplus */
-void
+LIBART_EXPORT void
art_render_mask (ArtRender *render,
int x0, int y0, int x1, int y1,
const art_u8 *mask_buf, int rowstride);
diff --git a/art_render_svp.h b/art_render_svp.h
index 7afaeb0..621fba8 100644
--- a/art_render_svp.h
+++ b/art_render_svp.h
@@ -26,9 +26,11 @@
#define __ART_RENDER_SVP_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_render.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_render.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -37,7 +39,7 @@
extern "C" {
#endif /* __cplusplus */
-void
+LIBART_EXPORT void
art_render_svp (ArtRender *render, const ArtSVP *svp);
#ifdef __cplusplus
diff --git a/art_rgb.h b/art_rgb.h
index 160cb82..e72be55 100644
--- a/art_rgb.h
+++ b/art_rgb.h
@@ -21,8 +21,10 @@
#define __ART_RGB_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_misc.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_misc.h>
#endif
@@ -30,10 +32,10 @@
extern "C" {
#endif
-void
+LIBART_EXPORT void
art_rgb_fill_run (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n);
-void
+LIBART_EXPORT void
art_rgb_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha,
int n);
diff --git a/art_rgb_a_affine.h b/art_rgb_a_affine.h
index 8e854ce..7311f7a 100644
--- a/art_rgb_a_affine.h
+++ b/art_rgb_a_affine.h
@@ -24,9 +24,11 @@
over rgb pixel buffers. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_filterlevel.h"
#include "art_alphagamma.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_filterlevel.h>
#include <libart_lgpl/art_alphagamma.h>
#endif
@@ -35,7 +37,7 @@
extern "C" {
#endif
-void
+LIBART_EXPORT void
art_rgb_a_affine (art_u8 *dst,
int x0, int y0, int x1, int y1, int dst_rowstride,
const art_u8 *src,
diff --git a/art_rgb_affine.h b/art_rgb_affine.h
index a7ae3e4..7f74de3 100644
--- a/art_rgb_affine.h
+++ b/art_rgb_affine.h
@@ -24,9 +24,11 @@
over rgb pixel buffers. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_filterlevel.h"
#include "art_alphagamma.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_filterlevel.h>
#include <libart_lgpl/art_alphagamma.h>
#endif
@@ -35,7 +37,7 @@
extern "C" {
#endif
-void
+LIBART_EXPORT void
art_rgb_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride,
const art_u8 *src,
int src_width, int src_height, int src_rowstride,
diff --git a/art_rgb_affine_private.h b/art_rgb_affine_private.h
index edaf0e3..f206ced 100644
--- a/art_rgb_affine_private.h
+++ b/art_rgb_affine_private.h
@@ -20,6 +20,12 @@
#ifndef __ART_RGB_AFFINE_PRIVATE_H__
#define __ART_RGB_AFFINE_PRIVATE_H__
+#ifdef LIBART_COMPILATION
+#include "art_config.h"
+#else
+#include <libart_lgpl/art_config.h>
+#endif
+
/* This module handles compositing of affine-transformed rgb images
over rgb pixel buffers. */
@@ -27,7 +33,7 @@
extern "C" {
#endif
-void
+LIBART_EXPORT void
art_rgb_affine_run (int *p_x0, int *p_x1, int y,
int src_width, int src_height,
const double affine[6]);
diff --git a/art_rgb_bitmap_affine.h b/art_rgb_bitmap_affine.h
index e3b607a..a4f37e0 100644
--- a/art_rgb_bitmap_affine.h
+++ b/art_rgb_bitmap_affine.h
@@ -24,9 +24,11 @@
over rgb pixel buffers. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_filterlevel.h"
#include "art_alphagamma.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_filterlevel.h>
#include <libart_lgpl/art_alphagamma.h>
#endif
@@ -35,7 +37,7 @@
extern "C" {
#endif
-void
+LIBART_EXPORT void
art_rgb_bitmap_affine (art_u8 *dst,
int x0, int y0, int x1, int y1, int dst_rowstride,
const art_u8 *src,
diff --git a/art_rgb_pixbuf_affine.h b/art_rgb_pixbuf_affine.h
index 6b45473..dcdf88a 100644
--- a/art_rgb_pixbuf_affine.h
+++ b/art_rgb_pixbuf_affine.h
@@ -24,10 +24,12 @@
pixbuf images over rgb pixel buffers. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_filterlevel.h"
#include "art_alphagamma.h"
#include "art_pixbuf.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_filterlevel.h>
#include <libart_lgpl/art_alphagamma.h>
#include <libart_lgpl/art_pixbuf.h>
@@ -37,7 +39,7 @@
extern "C" {
#endif
-void
+LIBART_EXPORT void
art_rgb_pixbuf_affine (art_u8 *dst,
int x0, int y0, int x1, int y1, int dst_rowstride,
const ArtPixBuf *pixbuf,
diff --git a/art_rgb_rgba_affine.h b/art_rgb_rgba_affine.h
index 82900ec..d9a5e98 100644
--- a/art_rgb_rgba_affine.h
+++ b/art_rgb_rgba_affine.h
@@ -24,9 +24,11 @@
over rgb pixel buffers. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_filterlevel.h"
#include "art_alphagamma.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_filterlevel.h>
#include <libart_lgpl/art_alphagamma.h>
#endif
@@ -35,7 +37,7 @@
extern "C" {
#endif
-void
+LIBART_EXPORT void
art_rgb_rgba_affine (art_u8 *dst,
int x0, int y0, int x1, int y1, int dst_rowstride,
const art_u8 *src,
diff --git a/art_rgb_svp.h b/art_rgb_svp.h
index d5c3dec..c54b53f 100644
--- a/art_rgb_svp.h
+++ b/art_rgb_svp.h
@@ -23,9 +23,11 @@
/* Render a sorted vector path into an RGB buffer. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_alphagamma.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_alphagamma.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -34,14 +36,14 @@
extern "C" {
#endif /* __cplusplus */
-void
+LIBART_EXPORT void
art_rgb_svp_aa (const ArtSVP *svp,
int x0, int y0, int x1, int y1,
art_u32 fg_color, art_u32 bg_color,
art_u8 *buf, int rowstride,
ArtAlphaGamma *alphagamma);
-void
+LIBART_EXPORT void
art_rgb_svp_alpha (const ArtSVP *svp,
int x0, int y0, int x1, int y1,
art_u32 rgba,
diff --git a/art_rgba.h b/art_rgba.h
index 3ad4aab..b0572e7 100644
--- a/art_rgba.h
+++ b/art_rgba.h
@@ -24,8 +24,10 @@
#define __ART_RGBA_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_misc.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_misc.h>
#endif
@@ -33,13 +35,13 @@
extern "C" {
#endif /* __cplusplus */
-void
+LIBART_EXPORT void
art_rgba_rgba_composite (art_u8 *dst, const art_u8 *src, int n);
-void
+LIBART_EXPORT void
art_rgba_fill_run (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n);
-void
+LIBART_EXPORT void
art_rgba_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n);
#ifdef __cplusplus
diff --git a/art_svp.h b/art_svp.h
index e7eaba4..d27ae1a 100644
--- a/art_svp.h
+++ b/art_svp.h
@@ -23,9 +23,11 @@
/* Basic data structures and constructors for sorted vector paths */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_rect.h"
#include "art_point.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_rect.h>
#include <libart_lgpl/art_point.h>
#endif
@@ -49,16 +51,16 @@ struct _ArtSVP {
ArtSVPSeg segs[1];
};
-int
+LIBART_EXPORT int
art_svp_add_segment (ArtSVP **p_vp, int *pn_segs_max,
int **pn_points_max,
int n_points, int dir, ArtPoint *points,
ArtDRect *bbox);
-void
+LIBART_EXPORT void
art_svp_free (ArtSVP *svp);
-int
+LIBART_EXPORT int
art_svp_seg_compare (const void *s1, const void *s2);
#ifdef __cplusplus
diff --git a/art_svp_intersect.h b/art_svp_intersect.h
index c729a29..3c2df2d 100644
--- a/art_svp_intersect.h
+++ b/art_svp_intersect.h
@@ -23,8 +23,10 @@
/* The funky new SVP intersector. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -51,16 +53,16 @@ struct _ArtSvpWriter {
void (*close_segment) (ArtSvpWriter *self, int seg_id);
};
-ArtSvpWriter *
+LIBART_EXPORT ArtSvpWriter *
art_svp_writer_rewind_new (ArtWindRule rule);
-ArtSVP *
+LIBART_EXPORT ArtSVP *
art_svp_writer_rewind_reap (ArtSvpWriter *self);
-int
+LIBART_EXPORT int
art_svp_seg_compare (const void *s1, const void *s2);
-void
+LIBART_EXPORT void
art_svp_intersector (const ArtSVP *in, ArtSvpWriter *out);
#ifdef __cplusplus
diff --git a/art_svp_ops.h b/art_svp_ops.h
index 7c6d453..0644513 100644
--- a/art_svp_ops.h
+++ b/art_svp_ops.h
@@ -21,8 +21,10 @@
#define __ART_SVP_OPS_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -32,10 +34,10 @@ extern "C" {
/* Vector path set operations, over sorted vpaths. */
-ArtSVP *art_svp_union (const ArtSVP *svp1, const ArtSVP *svp2);
-ArtSVP *art_svp_intersect (const ArtSVP *svp1, const ArtSVP *svp2);
-ArtSVP *art_svp_diff (const ArtSVP *svp1, const ArtSVP *svp2);
-ArtSVP *art_svp_minus (const ArtSVP *svp1, const ArtSVP *svp2);
+LIBART_EXPORT ArtSVP *art_svp_union (const ArtSVP *svp1, const ArtSVP *svp2);
+LIBART_EXPORT ArtSVP *art_svp_intersect (const ArtSVP *svp1, const ArtSVP *svp2);
+LIBART_EXPORT ArtSVP *art_svp_diff (const ArtSVP *svp1, const ArtSVP *svp2);
+LIBART_EXPORT ArtSVP *art_svp_minus (const ArtSVP *svp1, const ArtSVP *svp2);
#ifdef __cplusplus
}
diff --git a/art_svp_point.h b/art_svp_point.h
index a5d43fc..2f5b7df 100644
--- a/art_svp_point.h
+++ b/art_svp_point.h
@@ -23,8 +23,10 @@
/* Determine whether a point is inside, or near, an svp. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -32,10 +34,10 @@
extern "C" {
#endif /* __cplusplus */
-int
+LIBART_EXPORT int
art_svp_point_wind (ArtSVP *svp, double x, double y);
-double
+LIBART_EXPORT double
art_svp_point_dist (ArtSVP *svp, double x, double y);
#ifdef __cplusplus
@@ -43,7 +45,3 @@ art_svp_point_dist (ArtSVP *svp, double x, double y);
#endif /* __cplusplus */
#endif /* __ART_SVP_H__ */
-
-
-
-
diff --git a/art_svp_render_aa.h b/art_svp_render_aa.h
index bb3d885..06d67df 100644
--- a/art_svp_render_aa.h
+++ b/art_svp_render_aa.h
@@ -23,8 +23,10 @@
/* The spiffy antialiased renderer for sorted vector paths. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -40,18 +42,18 @@ struct _ArtSVPRenderAAStep {
int delta; /* stored with 16 fractional bits */
};
-ArtSVPRenderAAIter *
+LIBART_EXPORT ArtSVPRenderAAIter *
art_svp_render_aa_iter (const ArtSVP *svp,
int x0, int y0, int x1, int y1);
-void
+LIBART_EXPORT void
art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, int *p_start,
ArtSVPRenderAAStep **p_steps, int *p_n_steps);
-void
+LIBART_EXPORT void
art_svp_render_aa_iter_done (ArtSVPRenderAAIter *iter);
-void
+LIBART_EXPORT void
art_svp_render_aa (const ArtSVP *svp,
int x0, int y0, int x1, int y1,
void (*callback) (void *callback_data,
diff --git a/art_svp_vpath.h b/art_svp_vpath.h
index ef52bb8..8da4eee 100644
--- a/art_svp_vpath.h
+++ b/art_svp_vpath.h
@@ -21,9 +21,11 @@
#define __ART_SVP_VPATH_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#include "art_vpath.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#include <libart_lgpl/art_vpath.h>
#endif
@@ -34,7 +36,7 @@
extern "C" {
#endif /* __cplusplus */
-ArtSVP *
+LIBART_EXPORT ArtSVP *
art_svp_from_vpath (ArtVpath *vpath);
#ifdef __cplusplus
diff --git a/art_svp_vpath_stroke.h b/art_svp_vpath_stroke.h
index 41a9d7b..890dc88 100644
--- a/art_svp_vpath_stroke.h
+++ b/art_svp_vpath_stroke.h
@@ -23,9 +23,11 @@
/* Sort vector paths into sorted vector paths. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#include "art_vpath.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#include <libart_lgpl/art_vpath.h>
#endif
@@ -46,7 +48,7 @@ typedef enum {
ART_PATH_STROKE_CAP_SQUARE
} ArtPathStrokeCapType;
-ArtSVP *
+LIBART_EXPORT ArtSVP *
art_svp_vpath_stroke (ArtVpath *vpath,
ArtPathStrokeJoinType join,
ArtPathStrokeCapType cap,
@@ -55,7 +57,7 @@ art_svp_vpath_stroke (ArtVpath *vpath,
double flatness);
/* This version may have winding numbers exceeding 1. */
-ArtVpath *
+LIBART_EXPORT ArtVpath *
art_svp_vpath_stroke_raw (ArtVpath *vpath,
ArtPathStrokeJoinType join,
ArtPathStrokeCapType cap,
diff --git a/art_svp_wind.h b/art_svp_wind.h
index 4469ec7..320292a 100644
--- a/art_svp_wind.h
+++ b/art_svp_wind.h
@@ -24,8 +24,10 @@
vector paths. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#endif
@@ -43,10 +45,10 @@ typedef enum {
} ArtWindRule;
#endif
-ArtSVP *
+LIBART_EXPORT ArtSVP *
art_svp_uncross (ArtSVP *vp);
-ArtSVP *
+LIBART_EXPORT ArtSVP *
art_svp_rewind_uncrossed (ArtSVP *vp, ArtWindRule rule);
diff --git a/art_uta.h b/art_uta.h
index 1e832b0..267b038 100644
--- a/art_uta.h
+++ b/art_uta.h
@@ -23,8 +23,10 @@
/* Basic data structures and constructors for microtile arrays */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_misc.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_misc.h>
#endif
@@ -56,13 +58,13 @@ struct _ArtUta {
ArtUtaBbox *utiles;
};
-ArtUta *
+LIBART_EXPORT ArtUta *
art_uta_new (int x0, int y0, int x1, int y1);
-ArtUta *
+LIBART_EXPORT ArtUta *
art_uta_new_coords (int x0, int y0, int x1, int y1);
-void
+LIBART_EXPORT void
art_uta_free (ArtUta *uta);
#ifdef __cplusplus
diff --git a/art_uta_ops.h b/art_uta_ops.h
index e95d341..45b2bd1 100644
--- a/art_uta_ops.h
+++ b/art_uta_ops.h
@@ -23,8 +23,10 @@
/* Basic operations on microtile arrays */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_uta.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_uta.h>
#endif
@@ -32,7 +34,7 @@
extern "C" {
#endif /* __cplusplus */
-ArtUta *
+LIBART_EXPORT ArtUta *
art_uta_union (ArtUta *uta1, ArtUta *uta2);
#ifdef __cplusplus
diff --git a/art_uta_rect.h b/art_uta_rect.h
index d88d5aa..0c6756a 100644
--- a/art_uta_rect.h
+++ b/art_uta_rect.h
@@ -21,9 +21,11 @@
#define __ART_UTA_RECT_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_rect.h"
#include "art_uta.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_rect.h>
#include <libart_lgpl/art_uta.h>
#endif
@@ -32,7 +34,7 @@
extern "C" {
#endif /* __cplusplus */
-ArtUta *
+LIBART_EXPORT ArtUta *
art_uta_from_irect (ArtIRect *bbox);
#ifdef __cplusplus
diff --git a/art_uta_svp.h b/art_uta_svp.h
index 77d0767..ce71e3c 100644
--- a/art_uta_svp.h
+++ b/art_uta_svp.h
@@ -23,9 +23,11 @@
/* Basic data structures and constructors for microtile arrays */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#include "art_uta.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#include <libart_lgpl/art_uta.h>
#endif
@@ -34,7 +36,7 @@
extern "C" {
#endif /* __cplusplus */
-ArtUta *
+LIBART_EXPORT ArtUta *
art_uta_from_svp (const ArtSVP *svp);
#ifdef __cplusplus
diff --git a/art_uta_vpath.h b/art_uta_vpath.h
index f8c9c0b..628c02b 100644
--- a/art_uta_vpath.h
+++ b/art_uta_vpath.h
@@ -23,9 +23,11 @@
/* Basic data structures and constructors for microtile arrays */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_uta.h"
#include "art_vpath.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_uta.h>
#include <libart_lgpl/art_vpath.h>
#endif
@@ -34,11 +36,11 @@
extern "C" {
#endif /* __cplusplus */
-ArtUta *
+LIBART_EXPORT ArtUta *
art_uta_from_vpath (const ArtVpath *vec);
/* This is a private function: */
-void
+LIBART_EXPORT void
art_uta_add_line (ArtUta *uta, double x0, double y0, double x1, double y1,
int *rbuf, int rbuf_rowstride);
@@ -47,4 +49,3 @@ art_uta_add_line (ArtUta *uta, double x0, double y0, double x1, double y1,
#endif /* __cplusplus */
#endif /* __ART_UTA_VPATH_H__ */
-
diff --git a/art_vpath.h b/art_vpath.h
index 4499e77..6b3d3f6 100644
--- a/art_vpath.h
+++ b/art_vpath.h
@@ -21,9 +21,11 @@
#define __ART_VPATH_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_rect.h"
#include "art_pathcode.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_rect.h>
#include <libart_lgpl/art_pathcode.h>
#endif
@@ -45,23 +47,23 @@ struct _ArtVpath {
/* Some of the functions need to go into their own modules */
-void
+LIBART_EXPORT void
art_vpath_add_point (ArtVpath **p_vpath, int *pn_points, int *pn_points_max,
ArtPathcode code, double x, double y);
-ArtVpath *
+LIBART_EXPORT ArtVpath *
art_vpath_new_circle (double x, double y, double r);
-ArtVpath *
+LIBART_EXPORT ArtVpath *
art_vpath_affine_transform (const ArtVpath *src, const double matrix[6]);
-void
+LIBART_EXPORT void
art_vpath_bbox_drect (const ArtVpath *vec, ArtDRect *drect);
-void
+LIBART_EXPORT void
art_vpath_bbox_irect (const ArtVpath *vec, ArtIRect *irect);
-ArtVpath *
+LIBART_EXPORT ArtVpath *
art_vpath_perturb (ArtVpath *src);
#ifdef __cplusplus
diff --git a/art_vpath_bpath.h b/art_vpath_bpath.h
index 9eaeedc..202da9d 100644
--- a/art_vpath_bpath.h
+++ b/art_vpath_bpath.h
@@ -21,9 +21,11 @@
#define __ART_VPATH_BPATH_H__
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_bpath.h"
#include "art_vpath.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_bpath.h>
#include <libart_lgpl/art_vpath.h>
#endif
@@ -32,14 +34,14 @@
extern "C" {
#endif /* __cplusplus */
-ArtPoint *art_bezier_to_vec (double x0, double y0,
+LIBART_EXPORT ArtPoint *art_bezier_to_vec (double x0, double y0,
double x1, double y1,
double x2, double y2,
double x3, double y3,
ArtPoint *p,
int level);
-ArtVpath *art_bez_path_to_vec (const ArtBpath *bez, double flatness);
+LIBART_EXPORT ArtVpath *art_bez_path_to_vec (const ArtBpath *bez, double flatness);
#ifdef __cplusplus
}
diff --git a/art_vpath_dash.h b/art_vpath_dash.h
index ee3cc8e..5f19d67 100644
--- a/art_vpath_dash.h
+++ b/art_vpath_dash.h
@@ -23,8 +23,10 @@
/* Apply a dash style to a vector path. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_vpath.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_vpath.h>
#endif
@@ -40,7 +42,7 @@ struct _ArtVpathDash {
double *dash;
};
-ArtVpath *
+LIBART_EXPORT ArtVpath *
art_vpath_dash (const ArtVpath *vpath, const ArtVpathDash *dash);
#ifdef __cplusplus
diff --git a/art_vpath_svp.h b/art_vpath_svp.h
index 08b22cb..9e4da94 100644
--- a/art_vpath_svp.h
+++ b/art_vpath_svp.h
@@ -23,9 +23,11 @@
/* "Unsort" a sorted vector path into an ordinary vector path. */
#ifdef LIBART_COMPILATION
+#include "art_config.h"
#include "art_svp.h"
#include "art_vpath.h"
#else
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_svp.h>
#include <libart_lgpl/art_vpath.h>
#endif
@@ -34,7 +36,7 @@
extern "C" {
#endif /* __cplusplus */
-ArtVpath *art_vpath_from_svp (const ArtSVP *svp);
+LIBART_EXPORT ArtVpath *art_vpath_from_svp (const ArtSVP *svp);
#ifdef __cplusplus
}
diff --git a/libart-features.c b/libart-features.c
index ff99945..b87511b 100644
--- a/libart-features.c
+++ b/libart-features.c
@@ -1,3 +1,4 @@
+#include "config.h"
#include "libart-features.h"
/* General initialization hooks */
diff --git a/libart-features.h.in b/libart-features.h.in
index 88d4965..7ac16c9 100644
--- a/libart-features.h.in
+++ b/libart-features.h.in
@@ -1,6 +1,14 @@
#ifndef LIBART_FEATURES_H
#define LIBART_FEATURES_H 1
+#if !defined( _ART_CONFIG_H_ )
+#ifdef LIBART_COMPILATION
+#include "art_config.h"
+#else
+#include <libart_lgpl/art_config.h>
+#endif
+#endif
+
#define LIBART_MAJOR_VERSION (@LIBART_MAJOR_VERSION@)
#define LIBART_MINOR_VERSION (@LIBART_MINOR_VERSION@)
#define LIBART_MICRO_VERSION (@LIBART_MICRO_VERSION@)
@@ -13,12 +21,16 @@
# define LIBART_VAR extern __declspec(dllimport)
# endif
#else
-# define LIBART_VAR extern
+# ifdef LIBART_COMPILATION
+# define LIBART_VAR LIBART_EXPORT
+# else
+# define LIBART_VAR extern
+# endif
#endif
LIBART_VAR const unsigned int libart_major_version, libart_minor_version, libart_micro_version;
LIBART_VAR const char *libart_version;
-void libart_preinit(void *app, void *modinfo);
-void libart_postinit(void *app, void *modinfo);
+LIBART_EXPORT void libart_preinit(void *app, void *modinfo);
+LIBART_EXPORT void libart_postinit(void *app, void *modinfo);
#endif
diff --git a/libart.h b/libart.h
index 4a9eeea..a1c5bd9 100644
--- a/libart.h
+++ b/libart.h
@@ -1,6 +1,7 @@
#ifndef LIBART_H
#define LIBART_H 1
+#include <libart_lgpl/art_config.h>
#include <libart_lgpl/art_affine.h>
#include <libart_lgpl/art_alphagamma.h>
#include <libart_lgpl/art_bpath.h>
diff --git a/testart.c b/testart.c
index 994c7ba..b200fcc 100644
--- a/testart.c
+++ b/testart.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
+#include "art_config.h"
#include "art_misc.h"
#include "art_vpath.h"
#include "art_svp.h"
diff --git a/testuta.c b/testuta.c
index ca4c7b3..e1d999f 100644
--- a/testuta.c
+++ b/testuta.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include "art_config.h"
#include "art_misc.h"
#include "art_uta.h"
#include "art_vpath.h"