gegl r1890 - in trunk: . bin gegl gegl/module gegl/operation operations/affine



Author: ok
Date: Tue Jan 22 01:17:41 2008
New Revision: 1890
URL: http://svn.gnome.org/viewvc/gegl?rev=1890&view=rev

Log:
Removed some public headers, the only way to get all the symbols
and definitions needed for compiling gegl-plugins or other code
needing acccess to types related to gegl plug-in infrastructure
is now by including the catch-all gegl-plugin.h header.
* gegl/Makefile.am: reduced number of installed headers.
* gegl/module/geglmoduletypes.h: removed.
* gegl/gegl-plugin.h: duplicate portions of private api to make it
public. Moved operation abi version definition and geglmodule
structure here.
Modified the rest to accomodate change.
* gegl/gegl-init.c:
* gegl/gegl-types.h: 
* bin/gegl-node-editor-plugin.h:
* gegl/module/Makefile.am:
* gegl/module/geglmodule.h:
* gegl/module/geglmoduledb.c:
* gegl/module/geglmoduledb.h:
* gegl/operation/gegl-operation.h:
* operations/affine/affine.c:
* operations/affine/chant.h:
* operations/affine/module.h:


Removed:
   trunk/gegl/module/geglmoduletypes.h
Modified:
   trunk/ChangeLog
   trunk/bin/gegl-node-editor-plugin.h
   trunk/gegl/Makefile.am
   trunk/gegl/gegl-init.c
   trunk/gegl/gegl-plugin.h
   trunk/gegl/gegl-types.h
   trunk/gegl/module/Makefile.am
   trunk/gegl/module/geglmodule.h
   trunk/gegl/module/geglmoduledb.c
   trunk/gegl/module/geglmoduledb.h
   trunk/gegl/operation/gegl-operation.h
   trunk/operations/affine/affine.c
   trunk/operations/affine/chant.h
   trunk/operations/affine/module.h

Modified: trunk/bin/gegl-node-editor-plugin.h
==============================================================================
--- trunk/bin/gegl-node-editor-plugin.h	(original)
+++ trunk/bin/gegl-node-editor-plugin.h	Tue Jan 22 01:17:41 2008
@@ -21,7 +21,6 @@
 
 #include <glib-object.h>
 #include <gegl-plugin.h>
-#include <gegl-module.h>
 #include "../gegl-node-editor.h"
 
 void gegl_gui_flush (void);

Modified: trunk/gegl/Makefile.am
==============================================================================
--- trunk/gegl/Makefile.am	(original)
+++ trunk/gegl/Makefile.am	Tue Jan 22 01:17:41 2008
@@ -46,6 +46,8 @@
 INCLUDES = \
 	-I$(top_srcdir)	\
 	-I$(top_srcdir)/gegl/buffer	\
+	-I$(top_srcdir)/gegl/property-types	\
+	-I$(top_srcdir)/gegl/operation\
 	@DEP_CFLAGS@ @BABL_CFLAGS@
 
 AM_CPPFLAGS = -DLIBDIR=\""$(libdir)"\"
@@ -58,7 +60,4 @@
     gegl-chant.h			\
     gegl-plugin.h			\
     buffer/gegl-buffer.h		\
-    module/geglmoduletypes.h		\
-    module/geglmoduledb.h		\
-    module/geglmodule.h			\
     property-types/gegl-paramspecs.h

Modified: trunk/gegl/gegl-init.c
==============================================================================
--- trunk/gegl/gegl-init.c	(original)
+++ trunk/gegl/gegl-init.c	Tue Jan 22 01:17:41 2008
@@ -20,11 +20,11 @@
 #include <babl/babl.h>
 #include <glib-object.h>
 #include "gegl-instrument.h"
-#include "gegl-types.h"
+/*#include "gegl-types.h"*/
 #include "gegl-init.h"
-#include "buffer/gegl-buffer-allocator.h"
 #include "module/geglmodule.h"
 #include "module/geglmoduledb.h"
+#include "buffer/gegl-buffer-allocator.h"
 #include <stdlib.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

Modified: trunk/gegl/gegl-plugin.h
==============================================================================
--- trunk/gegl/gegl-plugin.h	(original)
+++ trunk/gegl/gegl-plugin.h	Tue Jan 22 01:17:41 2008
@@ -23,13 +23,51 @@
 #include <string.h>
 #include <glib-object.h>
 #include <gegl.h>
+
+/* Extra types needed when coding operations */
+typedef struct _GeglOperation        GeglOperation;
+typedef struct _GeglNodeContext      GeglNodeContext;
+typedef struct _GeglPad              GeglPad;
+typedef struct _GeglConnection       GeglConnection;
+
 #include <operation/gegl-operation.h>
-#include <operation/gegl-extension-handler.h>
 #include <gegl-utils.h>
 #include <gegl-buffer.h>
 #include <gegl-paramspecs.h>
-#include <geglmoduletypes.h>
-#include <geglmodule.h>
+#include <gmodule.h>
+
+typedef struct _GeglModule     GeglModule;
+typedef struct _GeglModuleInfo GeglModuleInfo;
+typedef struct _GeglModuleDB   GeglModuleDB;
+
+/*#include <geglmodule.h>*/
+
+/*  increment the ABI version each time one of the following changes:
+ *
+ *  - the libgeglmodule implementation (if the change affects modules).
+ *  - GeglOperation or one of it's base classes changes. (XXX:-
+ *    should be extended so a range of abi versions are accepted.
+ */
+#define GEGL_MODULE_ABI_VERSION 0x0004
+
+struct _GeglModuleInfo
+{
+  guint32  abi_version;
+  gchar   *purpose;
+  gchar   *author;
+  gchar   *version;
+  gchar   *copyright;
+  gchar   *date;
+};
+
+GType
+gegl_module_register_type (GTypeModule     *module,
+                           GType            parent_type,
+                           const gchar     *type_name,
+                           const GTypeInfo *type_info,
+                           GTypeFlags       flags);
+
+
 
 GeglBuffer     *gegl_node_context_get_source (GeglNodeContext *self,
                                               const gchar     *padname);
@@ -40,7 +78,6 @@
                                               GObject         *data);
 
 
-
 GParamSpec *
 gegl_param_spec_color_from_string (const gchar *name,
                                    const gchar *nick,
@@ -56,5 +93,9 @@
                                         GParamFlags  flags);
 
 
+void          gegl_extension_handler_register (const gchar *extension,
+                                                const gchar *handler);
+const gchar * gegl_extension_handler_get      (const gchar *extension);
+
 
 #endif  /* __GEGL_PLUGIN_H__ */

Modified: trunk/gegl/gegl-types.h
==============================================================================
--- trunk/gegl/gegl-types.h	(original)
+++ trunk/gegl/gegl-types.h	Tue Jan 22 01:17:41 2008
@@ -53,8 +53,7 @@
 typedef struct _GeglGraph            GeglGraph;
 typedef struct _GeglHaveVisitor      GeglHaveVisitor;
 typedef struct _GeglNeedVisitor      GeglNeedVisitor;
-#ifndef GEGL_OPERATION_TYPE
-#define GEGL_OPERATION_TYPE
+#ifndef __GEGL_PLUGIN_H__
 typedef struct _GeglPad              GeglPad;
 typedef struct _GeglOperation        GeglOperation;
 typedef struct _GeglNodeContext      GeglNodeContext;

Modified: trunk/gegl/module/Makefile.am
==============================================================================
--- trunk/gegl/module/Makefile.am	(original)
+++ trunk/gegl/module/Makefile.am	Tue Jan 22 01:17:41 2008
@@ -8,14 +8,15 @@
 MODULE_headers = 	\
     gegldatafiles.h	\
     geglmoduledb.h	\
-    geglmodule.h	\
-    geglmoduletypes.h
+    geglmodule.h
 
 libmodule_la_SOURCES = $(MODULE_sources) $(MODULE_headers)
 #libmoduleinclude_HEADERS = #$(MODULE_headers)
 #libmoduleincludedir = $(includedir)/gegl-$(GEGL_API_VERSION)/gegl/module
 
 INCLUDES = \
-	   -I$(top_srcdir)	\
-	   -I$(top_srcdir)/gegl	\
-	   @DEP_CFLAGS@
+	   -I$(top_srcdir)			\
+	   -I$(top_srcdir)/gegl			\
+	   -I$(top_srcdir)/gegl/buffer		\
+	   -I$(top_srcdir)/gegl/property-types	\
+	   @DEP_CFLAGS@ @BABL_CFLAGS@

Modified: trunk/gegl/module/geglmodule.h
==============================================================================
--- trunk/gegl/module/geglmodule.h	(original)
+++ trunk/gegl/module/geglmodule.h	Tue Jan 22 01:17:41 2008
@@ -21,22 +21,10 @@
 #define __GEGL_MODULE_H__
 
 #include <gmodule.h>
-
-#include "geglmoduletypes.h"
-#include "geglmoduledb.h"
+#include "gegl-plugin.h"
 
 G_BEGIN_DECLS
 
-
-/*  increment the ABI version each time one of the following changes:
- *
- *  - the libgeglmodule implementation (if the change affects modules).
- *  - GeglOperation or one of it's base classes changes. (XXX: 
- *    should be extended so a range of abi versions are accepted.
- */
-#define GEGL_MODULE_ABI_VERSION 0x0004
-
-
 typedef enum
 {
   GEGL_MODULE_STATE_ERROR,       /* missing gegl_module_register function
@@ -52,17 +40,6 @@
                                   */
 } GeglModuleState;
 
-
-struct _GeglModuleInfo
-{
-  guint32  abi_version;
-  gchar   *purpose;
-  gchar   *author;
-  gchar   *version;
-  gchar   *copyright;
-  gchar   *date;
-};
-
 typedef const GeglModuleInfo * (* GeglModuleQueryFunc)    (GTypeModule *module);
 typedef gboolean               (* GeglModuleRegisterFunc) (GTypeModule *module);
 

Modified: trunk/gegl/module/geglmoduledb.c
==============================================================================
--- trunk/gegl/module/geglmoduledb.c	(original)
+++ trunk/gegl/module/geglmoduledb.c	Tue Jan 22 01:17:41 2008
@@ -17,8 +17,7 @@
 #include <string.h>
 
 #include <glib-object.h>
-
-#include "geglmoduletypes.h"
+#include "gegl-plugin.h"
 #include "geglmodule.h"
 #include "geglmoduledb.h"
 #include "gegldatafiles.h"

Modified: trunk/gegl/module/geglmoduledb.h
==============================================================================
--- trunk/gegl/module/geglmoduledb.h	(original)
+++ trunk/gegl/module/geglmoduledb.h	Tue Jan 22 01:17:41 2008
@@ -19,6 +19,8 @@
 
 G_BEGIN_DECLS
 
+#include "gegl-plugin.h"
+
 
 #define GEGL_TYPE_MODULE_DB            (gegl_module_db_get_type ())
 #define GEGL_MODULE_DB(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_MODULE_DB, GeglModuleDB))

Modified: trunk/gegl/operation/gegl-operation.h
==============================================================================
--- trunk/gegl/operation/gegl-operation.h	(original)
+++ trunk/gegl/operation/gegl-operation.h	Tue Jan 22 01:17:41 2008
@@ -23,14 +23,6 @@
 #include <glib-object.h>
 #include <babl/babl.h>
 
-/* Evil hack to make sure types are defined */
-#ifndef GEGL_OPERATION_TYPE
-#define GEGL_OPERATION_TYPE
-typedef struct _GeglOperation        GeglOperation;
-typedef struct _GeglNodeContext      GeglNodeContext;
-typedef struct _GeglPad              GeglPad;
-typedef struct _GeglConnection       GeglConnection;
-#endif
 
 #include "gegl-buffer.h"
 

Modified: trunk/operations/affine/affine.c
==============================================================================
--- trunk/operations/affine/affine.c	(original)
+++ trunk/operations/affine/affine.c	Tue Jan 22 01:17:41 2008
@@ -25,11 +25,10 @@
 
 #include <math.h>
 #include <gegl-plugin.h>
-#include <gegl-types.h>
 #include <graph/gegl-pad.h>
 #include <graph/gegl-node.h>
 #include <graph/gegl-connection.h>
-#include "buffer/gegl-sampler.h"
+/*#include "buffer/gegl-sampler.h"*/
 
 #include "affine.h"
 #include "module.h"
@@ -582,6 +581,11 @@
 
 }
 
+void  gegl_sampler_prepare     (GeglSampler *self);
+  /*XXX: Eeeek, obsessive avoidance of public headers, the API needed to
+   *     satisfy this use case should probably be provided.
+   */
+
 void
 affine_generic (GeglBuffer        *dest,
                 GeglBuffer        *src,

Modified: trunk/operations/affine/chant.h
==============================================================================
--- trunk/operations/affine/chant.h	(original)
+++ trunk/operations/affine/chant.h	Tue Jan 22 01:17:41 2008
@@ -55,8 +55,6 @@
 
 #define GEGL_CHANT_OPERATION(obj) ((GeglChantOperation*)(obj))
 
-#include <gegl-module.h>
-
 #define M_DEFINE_TYPE_EXTENDED(type_name, TYPE_PARENT, flags, CODE) \
   \
 static void     gegl_chant_init              (GeglChantOperation *self); \

Modified: trunk/operations/affine/module.h
==============================================================================
--- trunk/operations/affine/module.h	(original)
+++ trunk/operations/affine/module.h	Tue Jan 22 01:17:41 2008
@@ -4,7 +4,7 @@
 G_BEGIN_DECLS
 
 #include <glib-object.h>
-#include <gegl-module.h>
+#include <gegl-plugin.h>
 
 G_MODULE_EXPORT GTypeModule          * affine_module_get_module (void);
 G_MODULE_EXPORT const GeglModuleInfo * gegl_module_query        (GTypeModule *module);



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