diff --git a/ChangeLog b/ChangeLog index 4143148758..c1125c31ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-01-06 Michael Natterer + + * app/gegl/gegl/buffer/gegl-buffer-types.h + * app/gegl/gegl/gegl-operation-filter.h + * app/gegl/gegl/gegl-operation-point-filter.h + * app/gegl/gegl/gegl-operation-sink.h + * app/gegl/gegl/gegl-operation-source.h + * app/gegl/gegl/gegl-operation.h: updated from GEGL. + 2008-01-06 Michael Natterer * app/tools/gimpimagemaptool.c (gimp_image_map_tool_create_map): diff --git a/app/gegl/gegl/buffer/gegl-buffer-types.h b/app/gegl/gegl/buffer/gegl-buffer-types.h index 8d46f555c7..628f2d3b58 100644 --- a/app/gegl/gegl/buffer/gegl-buffer-types.h +++ b/app/gegl/gegl/buffer/gegl-buffer-types.h @@ -15,8 +15,9 @@ * * Copyright 2006,2007 Øyvind Kolås */ -#ifndef _GEGL_BUFFER_TYPES_H -#define _GEGL_BUFFER_TYPES_H + +#ifndef __GEGL_BUFFER_TYPES_H__ +#define __GEGL_BUFFER_TYPES_H__ typedef struct _GeglSampler GeglSampler; @@ -38,7 +39,7 @@ typedef struct _GeglHandlersClass GeglHandlersClass; typedef struct _GeglStorage GeglStorage; typedef struct _GeglStorageClass GeglStorageClass; -#ifndef _GEGL_BUFFER_H +#ifndef __GEGL_BUFFER_H__ typedef struct _GeglBuffer GeglBuffer; #endif typedef struct _GeglBufferClass GeglBufferClass; diff --git a/app/gegl/gegl/gegl-operation-filter.h b/app/gegl/gegl/gegl-operation-filter.h index 845244bb71..5bf7b48008 100644 --- a/app/gegl/gegl/gegl-operation-filter.h +++ b/app/gegl/gegl/gegl-operation-filter.h @@ -15,8 +15,9 @@ * * Copyright 2006 Øyvind Kolås */ -#ifndef _GEGL_OPERATION_FILTER_H -#define _GEGL_OPERATION_FILTER_H + +#ifndef __GEGL_OPERATION_FILTER_H__ +#define __GEGL_OPERATION_FILTER_H__ #include #include "gegl-types.h" @@ -24,10 +25,12 @@ G_BEGIN_DECLS -#define GEGL_TYPE_OPERATION_FILTER (gegl_operation_filter_get_type ()) -#define GEGL_OPERATION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilter)) -#define GEGL_OPERATION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilterClass)) -#define GEGL_OPERATION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilterClass)) +#define GEGL_TYPE_OPERATION_FILTER (gegl_operation_filter_get_type ()) +#define GEGL_OPERATION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilter)) +#define GEGL_OPERATION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilterClass)) +#define GEGL_IS_OPERATION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_FILTER)) +#define GEGL_IS_OPERATION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_FILTER)) +#define GEGL_OPERATION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_FILTER, GeglOperationFilterClass)) typedef struct _GeglOperationFilter GeglOperationFilter; struct _GeglOperationFilter @@ -40,8 +43,9 @@ struct _GeglOperationFilterClass { GeglOperationClass parent_class; - gboolean (* process) (GeglOperation *self, - gpointer context_id); + gboolean (* process) (GeglOperation *self, + GeglNodeContext *context, + const GeglRectangle *result); }; GType gegl_operation_filter_get_type (void) G_GNUC_CONST; diff --git a/app/gegl/gegl/gegl-operation-point-filter.h b/app/gegl/gegl/gegl-operation-point-filter.h index 05a5c1280e..dabd178bc2 100644 --- a/app/gegl/gegl/gegl-operation-point-filter.h +++ b/app/gegl/gegl/gegl-operation-point-filter.h @@ -15,19 +15,20 @@ * * Copyright 2006 Øyvind Kolås */ -#ifndef _GEGL_OPERATION_POINT_FILTER_H -#define _GEGL_OPERATION_POINT_FILTER_H -#include -#include "gegl-types.h" +#ifndef __GEGL_OPERATION_POINT_FILTER_H__ +#define __GEGL_OPERATION_POINT_FILTER_H__ + #include "gegl-operation-filter.h" G_BEGIN_DECLS -#define GEGL_TYPE_OPERATION_POINT_FILTER (gegl_operation_point_filter_get_type ()) -#define GEGL_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilter)) -#define GEGL_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass)) -#define GEGL_OPERATION_POINT_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass)) +#define GEGL_TYPE_OPERATION_POINT_FILTER (gegl_operation_point_filter_get_type ()) +#define GEGL_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilter)) +#define GEGL_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass)) +#define GEGL_IS_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_POINT_FILTER)) +#define GEGL_IS_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_POINT_FILTER)) +#define GEGL_OPERATION_POINT_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_POINT_FILTER, GeglOperationPointFilterClass)) typedef struct _GeglOperationPointFilter GeglOperationPointFilter; struct _GeglOperationPointFilter @@ -44,7 +45,6 @@ struct _GeglOperationPointFilterClass void *in_buf, /* input buffer */ void *out_buf, /* output buffer */ glong samples); /* number of samples */ - }; GType gegl_operation_point_filter_get_type (void) G_GNUC_CONST; diff --git a/app/gegl/gegl/gegl-operation-sink.h b/app/gegl/gegl/gegl-operation-sink.h index 2f7ca2b1f1..88e72c3d60 100644 --- a/app/gegl/gegl/gegl-operation-sink.h +++ b/app/gegl/gegl/gegl-operation-sink.h @@ -15,11 +15,10 @@ * * Copyright 2006 Øyvind Kolås */ -#ifndef _GEGL_OPERATION_SINK_H -#define _GEGL_OPERATION_SINK_H -#include -#include "gegl-types.h" +#ifndef __GEGL_OPERATION_SINK_H__ +#define __GEGL_OPERATION_SINK_H__ + #include "gegl-operation.h" G_BEGIN_DECLS @@ -27,9 +26,9 @@ G_BEGIN_DECLS #define GEGL_TYPE_OPERATION_SINK (gegl_operation_sink_get_type ()) #define GEGL_OPERATION_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_SINK, GeglOperationSink)) #define GEGL_OPERATION_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_SINK, GeglOperationSinkClass)) -#define GEGL_OPERATION_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_SINK, GeglOperationSinkClass)) #define GEGL_IS_OPERATION_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_SINK)) #define GEGL_IS_OPERATION_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_SINK)) +#define GEGL_OPERATION_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_SINK, GeglOperationSinkClass)) typedef struct _GeglOperationSink GeglOperationSink; struct _GeglOperationSink @@ -44,8 +43,8 @@ struct _GeglOperationSinkClass gboolean needs_full; - gboolean (* process) (GeglOperation *self, - GeglNodeContext *context, + gboolean (* process) (GeglOperation *self, + GeglNodeContext *context, const GeglRectangle *result); }; diff --git a/app/gegl/gegl/gegl-operation-source.h b/app/gegl/gegl/gegl-operation-source.h index 82be7451fa..72711597fa 100644 --- a/app/gegl/gegl/gegl-operation-source.h +++ b/app/gegl/gegl/gegl-operation-source.h @@ -15,19 +15,20 @@ * * Copyright 2006 Øyvind Kolås */ + #ifndef __GEGL_OPERATION_SOURCE_H__ #define __GEGL_OPERATION_SOURCE_H__ -#include -#include "gegl-types.h" #include "gegl-operation.h" G_BEGIN_DECLS -#define GEGL_TYPE_OPERATION_SOURCE (gegl_operation_source_get_type ()) -#define GEGL_OPERATION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSource)) -#define GEGL_OPERATION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass)) -#define GEGL_OPERATION_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass)) +#define GEGL_TYPE_OPERATION_SOURCE (gegl_operation_source_get_type ()) +#define GEGL_OPERATION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSource)) +#define GEGL_OPERATION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass)) +#define GEGL_IS_OPERATION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSource)) +#define GEGL_IS_OPERATION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass)) +#define GEGL_OPERATION_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_OPERATION_SOURCE, GeglOperationSourceClass)) typedef struct _GeglOperationSource GeglOperationSource; struct _GeglOperationSource @@ -38,9 +39,10 @@ struct _GeglOperationSource typedef struct _GeglOperationSourceClass GeglOperationSourceClass; struct _GeglOperationSourceClass { - GeglOperationClass parent_class; - gboolean (*process) (GeglOperation *self, - GeglNodeContext *context, + GeglOperationClass parent_class; + + gboolean (* process) (GeglOperation *self, + GeglNodeContext *context, const GeglRectangle *result); }; diff --git a/app/gegl/gegl/gegl-operation.h b/app/gegl/gegl/gegl-operation.h index dc9bbbec08..9bc2e5c583 100644 --- a/app/gegl/gegl/gegl-operation.h +++ b/app/gegl/gegl/gegl-operation.h @@ -20,13 +20,13 @@ #ifndef __GEGL_OPERATION_H__ #define __GEGL_OPERATION_H__ +#include +#include #include "gegl-types.h" #include "buffer/gegl-buffer-types.h" -#include G_BEGIN_DECLS - #define GEGL_TYPE_OPERATION (gegl_operation_get_type ()) #define GEGL_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_OPERATION, GeglOperation)) #define GEGL_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEGL_TYPE_OPERATION, GeglOperationClass)) @@ -87,9 +87,9 @@ struct _GeglOperationClass * graph. A default implementation of this, if not provided should probably * be to report that the entire defined region is dirtied. */ - GeglRectangle (*compute_affected_region) (GeglOperation *operation, - const gchar *input_pad, - GeglRectangle region); + GeglRectangle (*compute_affected_region) (GeglOperation *operation, + const gchar *input_pad, + const GeglRectangle *input_region); /* computes the rectangle needed to be correctly computed in a buffer * on the named input_pad, for a given result rectangle @@ -107,17 +107,14 @@ struct _GeglOperationClass /* Returns the node providing data for a specific location */ - GeglNode* (*detect) (GeglOperation *operation, - gint x, - gint y); - - gboolean (*process) (GeglOperation *operation, - GeglNodeContext *context, - const gchar *output_pad, - const GeglRectangle *result_rect - ); - + GeglNode* (*detect) (GeglOperation *operation, + gint x, + gint y); + gboolean (*process) (GeglOperation *operation, + GeglNodeContext *context, + const gchar *output_pad, + const GeglRectangle *result_rect); }; /* returns|registers the gtype for GeglOperation */ @@ -129,10 +126,10 @@ GeglRectangle * gegl_operation_source_get_defined_region (GeglOperation *operati /* sets the ROI needed to be computed on one of the sources */ -void gegl_operation_set_source_region (GeglOperation *operation, - gpointer context_id, - const gchar *pad_name, - GeglRectangle *region); +void gegl_operation_set_source_region (GeglOperation *operation, + gpointer context_id, + const gchar *pad_name, + const GeglRectangle *region); /* virtual method invokers that depends only on the set properties of a @@ -144,7 +141,7 @@ GeglNode * gegl_operation_get_source_node (GeglOperation *operation, const gchar *pad_name); GeglRectangle gegl_operation_compute_affected_region (GeglOperation *operation, const gchar *input_pad, - GeglRectangle region); + const GeglRectangle *input_region); GeglRectangle gegl_operation_get_defined_region (GeglOperation *operation); GeglRectangle gegl_operation_adjust_result_region (GeglOperation *operation, const GeglRectangle *roi);