summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-04-15 18:33:47 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-05-06 00:18:35 +0800
commit6e38964c3237d4426710245c2e43dc12a4bafa0f (patch)
tree6769a43e1807d1254bbeafa625f76ec18e921b35
parentce7a220afa319e926250c3cc2e77292b82f31f54 (diff)
cairomm/*.h: Decorate public symbols with CAIROMM_API
This include the public class definitions and function prototypes, so that we can use compiler directives to export these items. By doing so we will no longer need to use gendef.exe to export symbols for Visual Studio DLL builds.
-rw-r--r--cairomm/context.h2
-rw-r--r--cairomm/device.h2
-rw-r--r--cairomm/exception.h4
-rw-r--r--cairomm/fontface.h12
-rw-r--r--cairomm/fontoptions.h4
-rw-r--r--cairomm/matrix.h9
-rw-r--r--cairomm/path.h4
-rw-r--r--cairomm/pattern.h14
-rw-r--r--cairomm/quartz_font.h2
-rw-r--r--cairomm/quartz_surface.h2
-rw-r--r--cairomm/region.h2
-rw-r--r--cairomm/scaledfont.h4
-rw-r--r--cairomm/script.h2
-rw-r--r--cairomm/script_surface.h2
-rw-r--r--cairomm/surface.h14
-rw-r--r--cairomm/types.h2
-rw-r--r--cairomm/win32_font.h4
-rw-r--r--cairomm/win32_surface.h4
-rw-r--r--cairomm/xlib_surface.h2
19 files changed, 53 insertions, 38 deletions
diff --git a/cairomm/context.h b/cairomm/context.h
index 90e6e7b..93ab2ce 100644
--- a/cairomm/context.h
+++ b/cairomm/context.h
@@ -48,7 +48,7 @@ namespace Cairo
*
* Context is a reference-counted object that should be used via Cairo::RefPtr.
*/
-class Context
+class CAIROMM_API Context
{
protected:
explicit Context(const RefPtr<Surface>& target);
diff --git a/cairomm/device.h b/cairomm/device.h
index 3cb1e7c..79cd84c 100644
--- a/cairomm/device.h
+++ b/cairomm/device.h
@@ -53,7 +53,7 @@ namespace Cairo
*
* @since 1.10
*/
-class Device
+class CAIROMM_API Device
{
public:
/** A convenience class for acquiring a Device object in an exception-safe
diff --git a/cairomm/exception.h b/cairomm/exception.h
index 25731a9..b60c190 100644
--- a/cairomm/exception.h
+++ b/cairomm/exception.h
@@ -19,6 +19,8 @@
#ifndef __CAIRO_EXCEPTION_H
#define __CAIRO_EXCEPTION_H
+#include <cairommconfig.h>
+
#include <cairomm/enums.h>
#include <stdexcept>
@@ -32,7 +34,7 @@ namespace Cairo
/**
*/
-class logic_error: public std::logic_error
+class CAIROMM_API logic_error: public std::logic_error
{
public:
explicit logic_error(ErrorStatus status);
diff --git a/cairomm/fontface.h b/cairomm/fontface.h
index 4243b09..7a05ad0 100644
--- a/cairomm/fontface.h
+++ b/cairomm/fontface.h
@@ -34,8 +34,8 @@
namespace Cairo
{
-class ScaledFont;
-class Context;
+class CAIROMM_API ScaledFont;
+class CAIROMM_API Context;
/**
* A FontFace represents a particular font at a particular weight, slant, and
@@ -45,7 +45,7 @@ class Context;
* using the toy text API by way of Context::select_font_face(). The resulting
* face can be accessed using Context::get_font_face().
*/
-class FontFace
+class CAIROMM_API FontFace
{
protected:
@@ -101,7 +101,7 @@ protected:
* A simple font face used for the cairo 'toy' font API.
* @since 1.8
*/
-class ToyFontFace : public FontFace
+class CAIROMM_API ToyFontFace : public FontFace
{
public:
@@ -204,7 +204,7 @@ protected:
*
* @since 1.8
*/
-class UserFontFace : public FontFace
+class CAIROMM_API UserFontFace : public FontFace
{
public:
@@ -397,7 +397,7 @@ private:
// font system support
#ifdef CAIRO_HAS_FT_FONT
-class FtFontFace : public FontFace
+class CAIROMM_API FtFontFace : public FontFace
{
public:
/** Creates a new font face for the FreeType font backend from a pre-opened
diff --git a/cairomm/fontoptions.h b/cairomm/fontoptions.h
index 3059c69..7279b2e 100644
--- a/cairomm/fontoptions.h
+++ b/cairomm/fontoptions.h
@@ -19,6 +19,8 @@
#ifndef __CAIROMM_FONTOPTIONS_H
#define __CAIROMM_FONTOPTIONS_H
+#include <cairommconfig.h>
+
#include <cairomm/enums.h>
#include <string>
//#include <cairo.h>
@@ -35,7 +37,7 @@ namespace Cairo
* need any changes, but for pixel-based targets tweaking font options
* may result in superior output on a particular display.
*/
-class FontOptions
+class CAIROMM_API FontOptions
{
public:
FontOptions();
diff --git a/cairomm/matrix.h b/cairomm/matrix.h
index fe2fef9..603576d 100644
--- a/cairomm/matrix.h
+++ b/cairomm/matrix.h
@@ -18,6 +18,8 @@
#ifndef __CAIROMM_MATRIX_H
#define __CAIROMM_MATRIX_H
+#include <cairommconfig.h>
+
#include <cairo.h>
namespace Cairo
@@ -47,7 +49,7 @@ namespace Cairo
* @sa Context::get_matrix()
* @sa Context::set_matrix()
*/
-class Matrix : public cairo_matrix_t
+class CAIROMM_API Matrix : public cairo_matrix_t
{
public:
/** Creates an uninitialized matrix. If you want a matrix initialized to a
@@ -163,6 +165,7 @@ public:
*
* @relates Matrix
*/
+CAIROMM_API
Matrix identity_matrix();
/** Returns a Matrix initialized to a transformation that translates by tx and
@@ -173,6 +176,7 @@ Matrix identity_matrix();
*
* @relates Matrix
*/
+CAIROMM_API
Matrix translation_matrix(double tx, double ty);
/** Returns a Matrix initialized to a transformation that scales by sx and sy in
@@ -183,6 +187,7 @@ Matrix translation_matrix(double tx, double ty);
*
* @relates Matrix
*/
+CAIROMM_API
Matrix scaling_matrix(double sx, double sy);
/** Returns a Matrix initialized to a transformation that rotates by radians.
@@ -194,6 +199,7 @@ Matrix scaling_matrix(double sx, double sy);
*
* @relates Matrix
*/
+CAIROMM_API
Matrix rotation_matrix(double radians);
/** Multiplies the affine transformations in a and b together and returns the
@@ -208,6 +214,7 @@ Matrix rotation_matrix(double radians);
*
* @relates Matrix
*/
+CAIROMM_API
Matrix operator*(const Matrix& a, const Matrix& b);
} // namespace Cairo
diff --git a/cairomm/path.h b/cairomm/path.h
index f168d94..d1f7d5f 100644
--- a/cairomm/path.h
+++ b/cairomm/path.h
@@ -19,6 +19,8 @@
#ifndef __CAIROMM_PATH_H
#define __CAIROMM_PATH_H
+#include <cairommconfig.h>
+
#include <cairomm/enums.h>
#include <string>
#include <cairo.h>
@@ -35,7 +37,7 @@ namespace Cairo
* @todo There's currently no way to access the path data without reverting to
* the C object (see cobj())
*/
-class Path
+class CAIROMM_API Path
{
public:
//Path();
diff --git a/cairomm/pattern.h b/cairomm/pattern.h
index 269fe0d..957ed12 100644
--- a/cairomm/pattern.h
+++ b/cairomm/pattern.h
@@ -32,7 +32,7 @@ struct ColorStop
double red, green, blue, alpha;
};
-class Matrix;
+class CAIROMM_API Matrix;
/**
* Cairo::Pattern is the paint with which cairo draws. The primary use of
@@ -41,7 +41,7 @@ class Matrix;
*
* This is a reference-counted object that should be used via Cairo::RefPtr.
*/
-class Pattern
+class CAIROMM_API Pattern
{
protected:
//Use derived constructors.
@@ -152,7 +152,7 @@ protected:
cobject* m_cobject;
};
-class SolidPattern : public Pattern
+class CAIROMM_API SolidPattern : public Pattern
{
protected:
@@ -205,7 +205,7 @@ public:
~SolidPattern() override;
};
-class SurfacePattern : public Pattern
+class CAIROMM_API SurfacePattern : public Pattern
{
protected:
@@ -272,7 +272,7 @@ public:
Filter get_filter() const;
};
-class Gradient : public Pattern
+class CAIROMM_API Gradient : public Pattern
{
protected:
//Use derived constructors.
@@ -346,7 +346,7 @@ protected:
Gradient();
};
-class LinearGradient : public Gradient
+class CAIROMM_API LinearGradient : public Gradient
{
protected:
@@ -394,7 +394,7 @@ public:
static RefPtr<LinearGradient> create(double x0, double y0, double x1, double y1);
};
-class RadialGradient : public Gradient
+class CAIROMM_API RadialGradient : public Gradient
{
protected:
diff --git a/cairomm/quartz_font.h b/cairomm/quartz_font.h
index 5c3ddb2..16fd479 100644
--- a/cairomm/quartz_font.h
+++ b/cairomm/quartz_font.h
@@ -35,7 +35,7 @@ namespace Cairo
*
* @since 1.8
*/
-class QuartzFontFace : public FontFace
+class CAIROMM_API QuartzFontFace : public FontFace
{
public:
diff --git a/cairomm/quartz_surface.h b/cairomm/quartz_surface.h
index 4f9fcfb..31737f7 100644
--- a/cairomm/quartz_surface.h
+++ b/cairomm/quartz_surface.h
@@ -39,7 +39,7 @@ namespace Cairo
*
* @since 1.4
*/
-class QuartzSurface : public Surface
+class CAIROMM_API QuartzSurface : public Surface
{
public:
diff --git a/cairomm/region.h b/cairomm/region.h
index 686d3f1..01dde0c 100644
--- a/cairomm/region.h
+++ b/cairomm/region.h
@@ -38,7 +38,7 @@ namespace Cairo
*
* @since: 1.10
**/
-class Region
+class CAIROMM_API Region
{
private:
diff --git a/cairomm/scaledfont.h b/cairomm/scaledfont.h
index d82b957..5ccecca 100644
--- a/cairomm/scaledfont.h
+++ b/cairomm/scaledfont.h
@@ -37,7 +37,7 @@ namespace Cairo
* is most useful for low-level font usage where a library or application wants
* to cache a reference to a scaled font to speed up the computation of metrics.
*/
-class ScaledFont
+class CAIROMM_API ScaledFont
{
public:
@@ -238,7 +238,7 @@ protected:
/**
* @since 1.8
*/
-class FtScaledFont : public ScaledFont
+class CAIROMM_API FtScaledFont : public ScaledFont
{
public:
/** Creates a ScaledFont From a FtFontFace.
diff --git a/cairomm/script.h b/cairomm/script.h
index 8bc543e..5a27417 100644
--- a/cairomm/script.h
+++ b/cairomm/script.h
@@ -55,7 +55,7 @@ enum ScriptMode {
*
* @since 1.12
*/
-class Script : public Device {
+class CAIROMM_API Script : public Device {
public:
/**
diff --git a/cairomm/script_surface.h b/cairomm/script_surface.h
index 75bff7b..f2fc076 100644
--- a/cairomm/script_surface.h
+++ b/cairomm/script_surface.h
@@ -33,7 +33,7 @@ namespace Cairo {
*
* @since 1.12
*/
-class ScriptSurface : public Surface {
+class CAIROMM_API ScriptSurface : public Surface {
public:
/**
diff --git a/cairomm/surface.h b/cairomm/surface.h
index 865fc8e..93277f6 100644
--- a/cairomm/surface.h
+++ b/cairomm/surface.h
@@ -75,7 +75,7 @@ namespace Cairo
*
* Surfaces are reference-counted objects that should be used via Cairo::RefPtr.
*/
-class Surface
+class CAIROMM_API Surface
{
public:
/** For example:
@@ -436,7 +436,7 @@ protected:
*
* Note that like all surfaces, an ImageSurface is a reference-counted object that should be used via Cairo::RefPtr.
*/
-class ImageSurface : public Surface
+class CAIROMM_API ImageSurface : public Surface
{
protected:
//TODO?: Surface(cairo_surface_t *target);
@@ -612,7 +612,7 @@ public:
* Note that like all surfaces, a RecordingSurface is a reference-counted object
* that should be used via Cairo::RefPtr.
*/
-class RecordingSurface : public Surface
+class CAIROMM_API RecordingSurface : public Surface
{
public:
@@ -704,7 +704,7 @@ typedef enum
* @note For this Surface to be available, cairo must have been compiled with
* PDF support
*/
-class PdfSurface : public Surface
+class CAIROMM_API PdfSurface : public Surface
{
public:
@@ -807,7 +807,7 @@ typedef enum {
* @note For this Surface to be available, cairo must have been compiled with
* PostScript support
*/
-class PsSurface : public Surface
+class CAIROMM_API PsSurface : public Surface
{
public:
@@ -962,7 +962,7 @@ typedef enum
* @note For this Surface to be available, cairo must have been compiled with
* SVG support
*/
-class SvgSurface : public Surface
+class CAIROMM_API SvgSurface : public Surface
{
public:
@@ -1049,7 +1049,7 @@ public:
* @warning This is an experimental surface. It is not yet marked as a fully
* supported surface by the cairo library
*/
-class GlitzSurface : public Surface
+class CAIROMM_API GlitzSurface : public Surface
{
public:
diff --git a/cairomm/types.h b/cairomm/types.h
index 2565b04..80f7a5c 100644
--- a/cairomm/types.h
+++ b/cairomm/types.h
@@ -18,6 +18,8 @@
#ifndef __CAIROMM_TYPES_H
#define __CAIROMM_TYPES_H
+#include <cairommconfig.h>
+
#include <cairo.h>
namespace Cairo
diff --git a/cairomm/win32_font.h b/cairomm/win32_font.h
index 070d664..65d50e7 100644
--- a/cairomm/win32_font.h
+++ b/cairomm/win32_font.h
@@ -32,7 +32,7 @@ namespace Cairo
*
* @since 1.8
*/
-class Win32FontFace : public FontFace
+class CAIROMM_API Win32FontFace : public FontFace
{
public:
@@ -83,7 +83,7 @@ protected:
*
* @since 1.8
*/
-class Win32ScaledFont : public ScaledFont
+class CAIROMM_API Win32ScaledFont : public ScaledFont
{
public:
diff --git a/cairomm/win32_surface.h b/cairomm/win32_surface.h
index e8dae37..aa8ae23 100644
--- a/cairomm/win32_surface.h
+++ b/cairomm/win32_surface.h
@@ -40,7 +40,7 @@ namespace Cairo
* @note For this Surface to be available, cairo must have been compiled with
* Win32 support
*/
-class Win32Surface : public Surface
+class CAIROMM_API Win32Surface : public Surface
{
public:
@@ -124,7 +124,7 @@ public:
*
* @since 1.8
*/
-class Win32PrintingSurface : public Surface
+class CAIROMM_API Win32PrintingSurface : public Surface
{
public:
explicit Win32PrintingSurface(cairo_surface_t* cobject, bool has_reference = false);
diff --git a/cairomm/xlib_surface.h b/cairomm/xlib_surface.h
index 37c8c9c..24e5a29 100644
--- a/cairomm/xlib_surface.h
+++ b/cairomm/xlib_surface.h
@@ -45,7 +45,7 @@ namespace Cairo
* @note For this surface to be availabe, cairo must have been compiled with
* support for XLib Surfaces
*/
-class XlibSurface : public Surface
+class CAIROMM_API XlibSurface : public Surface
{
public: