[gimp] app: move GimpBezierDesc from app/vectors/ to app/core/



commit 8b4870dad787705b7441f5742f43442804235030
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 4 18:40:12 2011 +0200

    app: move GimpBezierDesc from app/vectors/ to app/core/

 app/core/Makefile.am                   |    2 ++
 app/core/core-types.h                  |   18 ++++++++++++++++++
 app/{vectors => core}/gimpbezierdesc.c |    2 +-
 app/{vectors => core}/gimpbezierdesc.h |    0
 app/display/gimpcanvaspath.c           |    3 +--
 app/vectors/Makefile.am                |    2 --
 app/vectors/gimpbezierstroke.c         |    2 +-
 app/vectors/gimpvectors.c              |    2 +-
 app/vectors/vectors-types.h            |   20 ++------------------
 9 files changed, 26 insertions(+), 25 deletions(-)
---
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index c51b10f..bded865 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 8e8da6f..d73c687 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 <cairo.h> 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 <cairo.h>.
+ */
+#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 1a88dee..a21608e 100644
--- a/app/vectors/gimpbezierdesc.c
+++ b/app/core/gimpbezierdesc.c
@@ -23,7 +23,7 @@
 #include <gegl.h>
 #include <cairo.h>
 
-#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 03d5f3c..cb12067 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 51549ed..eb2274b 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 3efdfbe..4dc0c77 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 3b25a8d..842c313 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 95b2ed0..45eef54 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 <cairo/cairo.h> 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 <cairo/cairo.h>.
- */
-
-#ifdef CAIRO_VERSION
-typedef cairo_path_t GimpBezierDesc;
-#else
-typedef void * GimpBezierDesc;
-#endif
 
 #endif /* __VECTORS_TYPES_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]