diff --git a/app/core/Makefile.am b/app/core/Makefile.am index c51b10f66f..bded865f72 100644 --- a/app/core/Makefile.am +++ b/app/core/Makefile.am @@ -51,6 +51,8 @@ libappcore_a_sources = \ gimp-utils.h \ gimparea.c \ gimparea.h \ + gimpbezierdesc.h \ + gimpbezierdesc.c \ gimpbrush.c \ gimpbrush.h \ gimpbrush-header.h \ diff --git a/app/core/core-types.h b/app/core/core-types.h index 8e8da6f6d0..d73c687bed 100644 --- a/app/core/core-types.h +++ b/app/core/core-types.h @@ -185,6 +185,24 @@ typedef struct _GimpScanConvert GimpScanConvert; typedef guint32 GimpTattoo; +/* The following hack is made so that we can reuse the definition + * the cairo definition of cairo_path_t without having to translate + * between our own version of a bezier description and cairos version. + * + * to avoid having to include in each and every file + * including this file we only use the "real" definition when cairo.h + * already has been included and use something else. + * + * Note that if you really want to work with GimpBezierDesc (except just + * passing pointers to it around) you also need to include . + */ +#ifdef CAIRO_VERSION +typedef cairo_path_t GimpBezierDesc; +#else +typedef void * GimpBezierDesc; +#endif + + /* functions */ typedef void (* GimpInitStatusFunc) (const gchar *text1, diff --git a/app/vectors/gimpbezierdesc.c b/app/core/gimpbezierdesc.c similarity index 98% rename from app/vectors/gimpbezierdesc.c rename to app/core/gimpbezierdesc.c index 1a88deea44..a21608e475 100644 --- a/app/vectors/gimpbezierdesc.c +++ b/app/core/gimpbezierdesc.c @@ -23,7 +23,7 @@ #include #include -#include "vectors-types.h" +#include "core-types.h" #include "gimpbezierdesc.h" diff --git a/app/vectors/gimpbezierdesc.h b/app/core/gimpbezierdesc.h similarity index 100% rename from app/vectors/gimpbezierdesc.h rename to app/core/gimpbezierdesc.h diff --git a/app/display/gimpcanvaspath.c b/app/display/gimpcanvaspath.c index 03d5f3cdaf..cb12067c63 100644 --- a/app/display/gimpcanvaspath.c +++ b/app/display/gimpcanvaspath.c @@ -28,10 +28,9 @@ #include "display-types.h" +#include "core/gimpbezierdesc.h" #include "core/gimpparamspecs.h" -#include "vectors/gimpbezierdesc.h" - #include "gimpcanvaspath.h" #include "gimpdisplayshell.h" #include "gimpdisplayshell-style.h" diff --git a/app/vectors/Makefile.am b/app/vectors/Makefile.am index 51549ed044..eb2274b5aa 100644 --- a/app/vectors/Makefile.am +++ b/app/vectors/Makefile.am @@ -20,8 +20,6 @@ libappvectors_a_SOURCES = \ vectors-types.h \ gimpanchor.c \ gimpanchor.h \ - gimpbezierdesc.h \ - gimpbezierdesc.c \ gimpbezierstroke.h \ gimpbezierstroke.c \ gimpstroke.h \ diff --git a/app/vectors/gimpbezierstroke.c b/app/vectors/gimpbezierstroke.c index 3efdfbee14..4dc0c7779d 100644 --- a/app/vectors/gimpbezierstroke.c +++ b/app/vectors/gimpbezierstroke.c @@ -27,11 +27,11 @@ #include "vectors-types.h" +#include "core/gimpbezierdesc.h" #include "core/gimpcoords.h" #include "core/gimpcoords-interpolate.h" #include "gimpanchor.h" -#include "gimpbezierdesc.h" #include "gimpbezierstroke.h" diff --git a/app/vectors/gimpvectors.c b/app/vectors/gimpvectors.c index 3b25a8d5b6..842c313d97 100644 --- a/app/vectors/gimpvectors.c +++ b/app/vectors/gimpvectors.c @@ -30,6 +30,7 @@ #include "core/gimp.h" #include "core/gimp-transform-utils.h" +#include "core/gimpbezierdesc.h" #include "core/gimpchannel-select.h" #include "core/gimpcontainer.h" #include "core/gimpcontext.h" @@ -45,7 +46,6 @@ #include "paint/gimppaintoptions.h" #include "gimpanchor.h" -#include "gimpbezierdesc.h" #include "gimpstroke.h" #include "gimpvectors.h" #include "gimpvectors-preview.h" diff --git a/app/vectors/vectors-types.h b/app/vectors/vectors-types.h index 95b2ed00b3..45eef5472f 100644 --- a/app/vectors/vectors-types.h +++ b/app/vectors/vectors-types.h @@ -21,10 +21,12 @@ #ifndef __VECTORS_TYPES_H__ #define __VECTORS_TYPES_H__ + #include "core/core-types.h" #include "vectors/vectors-enums.h" + typedef struct _GimpAnchor GimpAnchor; typedef struct _GimpVectors GimpVectors; @@ -34,23 +36,5 @@ typedef struct _GimpVectorsPropUndo GimpVectorsPropUndo; typedef struct _GimpStroke GimpStroke; typedef struct _GimpBezierStroke GimpBezierStroke; -/* - * The following hack is made so that we can reuse the definition - * the cairo definition of cairo_path_t without having to translate - * between our own version of a bezier description and cairos version. - * - * to avoid having to include in each and every file - * including this file we only use the "real" definition when cairo.h - * already has been included and use something else. - * - * Note that if you really want to work with GimpBezierDesc (except just - * passing pointers to it around) you also need to include . - */ - -#ifdef CAIRO_VERSION -typedef cairo_path_t GimpBezierDesc; -#else -typedef void * GimpBezierDesc; -#endif #endif /* __VECTORS_TYPES_H__ */