gimp r27401 - in trunk: . app/gegl



Author: martinn
Date: Sat Oct 25 14:16:22 2008
New Revision: 27401
URL: http://svn.gnome.org/viewvc/gimp?rev=27401&view=rev

Log:
* app/gegl/gimpoperationlayermode.[ch]: Rename to

* app/gegl/gimpoperationpointlayermode.[ch]: so that we can later
create a common GimpOperationLayerMode class/interface for
non-point layer modes like GimpOperationDissolveLayerMode.

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c
* app/gegl/gegl-types.h: Adjust accordingly.


Added:
   trunk/app/gegl/gimpoperationpointlayermode.c
      - copied, changed from r27400, /trunk/app/gegl/gimpoperationlayermode.c
   trunk/app/gegl/gimpoperationpointlayermode.h
      - copied, changed from r27400, /trunk/app/gegl/gimpoperationlayermode.h
Removed:
   trunk/app/gegl/gimpoperationlayermode.c
   trunk/app/gegl/gimpoperationlayermode.h
Modified:
   trunk/ChangeLog
   trunk/app/gegl/Makefile.am
   trunk/app/gegl/gegl-types.h
   trunk/app/gegl/gimp-gegl.c

Modified: trunk/app/gegl/Makefile.am
==============================================================================
--- trunk/app/gegl/Makefile.am	(original)
+++ trunk/app/gegl/Makefile.am	Sat Oct 25 14:16:22 2008
@@ -64,5 +64,5 @@
 	gimpoperationthreshold.c	\
 	gimpoperationthreshold.h	\
 	\
-	gimpoperationlayermode.c	\
-	gimpoperationlayermode.h
+	gimpoperationpointlayermode.c	\
+	gimpoperationpointlayermode.h

Modified: trunk/app/gegl/gegl-types.h
==============================================================================
--- trunk/app/gegl/gegl-types.h	(original)
+++ trunk/app/gegl/gegl-types.h	Sat Oct 25 14:16:22 2008
@@ -40,32 +40,7 @@
 typedef struct _GimpOperationPosterize        GimpOperationPosterize;
 typedef struct _GimpOperationThreshold        GimpOperationThreshold;
 
-typedef struct _GimpOperationLayerMode        GimpOperationLayerMode;
-typedef struct _GimpOperationDissolveMode     GimpOperationDissolveMode;
-typedef struct _GimpOperationBehindMode       GimpOperationBehindMode;
-typedef struct _GimpOperationMultiplyMode     GimpOperationMultiplyMode;
-typedef struct _GimpOperationScreenMode       GimpOperationScreenMode;
-typedef struct _GimpOperationOverlayMode      GimpOperationOverlayMode;
-typedef struct _GimpOperationDifferenceMode   GimpOperationDifferenceMode;
-typedef struct _GimpOperationAdditionMode     GimpOperationAdditionMode;
-typedef struct _GimpOperationSubtractMode     GimpOperationSubtractMode;
-typedef struct _GimpOperationDarkenOnlyMode   GimpOperationDarkenOnlyMode;
-typedef struct _GimpOperationLightenOnlyMode  GimpOperationLightenOnlyMode;
-typedef struct _GimpOperationHueMode          GimpOperationHueMode;
-typedef struct _GimpOperationSaturationMode   GimpOperationSaturationMode;
-typedef struct _GimpOperationColorMode        GimpOperationColorMode;
-typedef struct _GimpOperationValueMode        GimpOperationValueMode;
-typedef struct _GimpOperationDivideMode       GimpOperationDivideMode;
-typedef struct _GimpOperationDodgeMode        GimpOperationDodgeMode;
-typedef struct _GimpOperationBurnMode         GimpOperationBurnMode;
-typedef struct _GimpOperationHardlightMode    GimpOperationHardlightMode;
-typedef struct _GimpOperationSoftlightMode    GimpOperationSoftlightMode;
-typedef struct _GimpOperationGrainExtractMode GimpOperationGrainExtractMode;
-typedef struct _GimpOperationGrainMergeMode   GimpOperationGrainMergeMode;
-typedef struct _GimpOperationColorEraseMode   GimpOperationColorEraseMode;
-typedef struct _GimpOperationEraseMode        GimpOperationEraseMode;
-typedef struct _GimpOperationReplaceMode      GimpOperationReplaceMode;
-typedef struct _GimpOperationAntiEraseMode    GimpOperationAntiEraseMode;
+typedef struct _GimpOperationPointLayerMode   GimpOperationPointLayerMode;
 
 
 /*  operation config objects  */

Modified: trunk/app/gegl/gimp-gegl.c
==============================================================================
--- trunk/app/gegl/gimp-gegl.c	(original)
+++ trunk/app/gegl/gimp-gegl.c	Sat Oct 25 14:16:22 2008
@@ -39,7 +39,7 @@
 #include "gimpoperationtilesink.h"
 #include "gimpoperationtilesource.h"
 
-#include "gimpoperationlayermode.h"
+#include "gimpoperationpointlayermode.h"
 
 
 void
@@ -62,5 +62,5 @@
   g_type_class_ref (GIMP_TYPE_OPERATION_POSTERIZE);
   g_type_class_ref (GIMP_TYPE_OPERATION_THRESHOLD);
 
-  g_type_class_ref (GIMP_TYPE_OPERATION_LAYER_MODE);
+  g_type_class_ref (GIMP_TYPE_OPERATION_POINT_LAYER_MODE);
 }

Copied: trunk/app/gegl/gimpoperationpointlayermode.c (from r27400, /trunk/app/gegl/gimpoperationlayermode.c)
==============================================================================
--- /trunk/app/gegl/gimpoperationlayermode.c	(original)
+++ trunk/app/gegl/gimpoperationpointlayermode.c	Sat Oct 25 14:16:22 2008
@@ -3,6 +3,7 @@
  *
  * gimpoperationpointcomposer.c
  * Copyright (C) 2008 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2008 Martin Nordholts <martinn svn gnome org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,12 +22,11 @@
 
 #include "config.h"
 
-#include <babl/babl.h>
-#include <gegl.h>
+#include <gegl-plugin.h>
 
 #include "gegl-types.h"
 
-#include "gimpoperationlayermode.h"
+#include "gimpoperationpointlayermode.h"
 
 
 enum
@@ -36,14 +36,12 @@
 };
 
 
-typedef struct _GimpOperationLayerModeClass GimpOperationLayerModeClass;
-
-struct _GimpOperationLayerModeClass
+struct _GimpOperationPointLayerModeClass
 {
   GeglOperationPointComposerClass  parent_class;
 };
 
-struct _GimpOperationLayerMode
+struct _GimpOperationPointLayerMode
 {
   GeglOperationPointComposer  parent_instance;
 
@@ -51,45 +49,45 @@
 };
 
 
-static void     gimp_operation_layer_mode_set_property (GObject             *object,
-                                                        guint                property_id,
-                                                        const GValue        *value,
-                                                        GParamSpec          *pspec);
-static void     gimp_operation_layer_mode_get_property (GObject             *object,
-                                                        guint                property_id,
-                                                        GValue              *value,
-                                                        GParamSpec          *pspec);
-
-static void     gimp_operation_layer_mode_prepare      (GeglOperation       *operation);
-static gboolean gimp_operation_layer_mode_process      (GeglOperation       *operation,
-                                                        void                *in_buf,
-                                                        void                *aux_buf,
-                                                        void                *out_buf,
-                                                        glong                samples,
-                                                        const GeglRectangle *roi);
+static void     gimp_operation_point_layer_mode_set_property (GObject             *object,
+                                                              guint                property_id,
+                                                              const GValue        *value,
+                                                              GParamSpec          *pspec);
+static void     gimp_operation_point_layer_mode_get_property (GObject             *object,
+                                                              guint                property_id,
+                                                              GValue              *value,
+                                                              GParamSpec          *pspec);
+
+static void     gimp_operation_point_layer_mode_prepare      (GeglOperation       *operation);
+static gboolean gimp_operation_point_layer_mode_process      (GeglOperation       *operation,
+                                                              void                *in_buf,
+                                                              void                *aux_buf,
+                                                              void                *out_buf,
+                                                              glong                samples,
+                                                              const GeglRectangle *roi);
 
 
-G_DEFINE_TYPE (GimpOperationLayerMode, gimp_operation_layer_mode,
+G_DEFINE_TYPE (GimpOperationPointLayerMode, gimp_operation_point_layer_mode,
                GEGL_TYPE_OPERATION_POINT_COMPOSER)
 
 
 static void
-gimp_operation_layer_mode_class_init (GimpOperationLayerModeClass *klass)
+gimp_operation_point_layer_mode_class_init (GimpOperationPointLayerModeClass *klass)
 {
   GObjectClass                    *object_class    = G_OBJECT_CLASS (klass);
   GeglOperationClass              *operation_class = GEGL_OPERATION_CLASS (klass);
   GeglOperationPointComposerClass *point_class     = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
 
-  object_class->set_property  = gimp_operation_layer_mode_set_property;
-  object_class->get_property  = gimp_operation_layer_mode_get_property;
+  object_class->set_property  = gimp_operation_point_layer_mode_set_property;
+  object_class->get_property  = gimp_operation_point_layer_mode_get_property;
 
   operation_class->name        = "gimp:layer-mode";
   operation_class->description = "GIMP layer mode operation";
   operation_class->categories  = "compositors";
 
-  operation_class->prepare    = gimp_operation_layer_mode_prepare;
+  operation_class->prepare    = gimp_operation_point_layer_mode_prepare;
 
-  point_class->process        = gimp_operation_layer_mode_process;
+  point_class->process        = gimp_operation_point_layer_mode_process;
 
   g_object_class_install_property (object_class, PROP_BLEND_MODE,
                                    g_param_spec_enum ("blend-mode", NULL, NULL,
@@ -99,17 +97,17 @@
 }
 
 static void
-gimp_operation_layer_mode_init (GimpOperationLayerMode *self)
+gimp_operation_point_layer_mode_init (GimpOperationPointLayerMode *self)
 {
 }
 
 static void
-gimp_operation_layer_mode_set_property (GObject      *object,
+gimp_operation_point_layer_mode_set_property (GObject      *object,
                                         guint         property_id,
                                         const GValue *value,
                                         GParamSpec   *pspec)
 {
-  GimpOperationLayerMode *self = GIMP_OPERATION_LAYER_MODE (object);
+  GimpOperationPointLayerMode *self = GIMP_OPERATION_POINT_LAYER_MODE (object);
 
   switch (property_id)
     {
@@ -124,12 +122,12 @@
 }
 
 static void
-gimp_operation_layer_mode_get_property (GObject    *object,
+gimp_operation_point_layer_mode_get_property (GObject    *object,
                                         guint       property_id,
                                         GValue     *value,
                                         GParamSpec *pspec)
 {
-  GimpOperationLayerMode *self = GIMP_OPERATION_LAYER_MODE (object);
+  GimpOperationPointLayerMode *self = GIMP_OPERATION_POINT_LAYER_MODE (object);
 
   switch (property_id)
     {
@@ -144,7 +142,7 @@
 }
 
 static void
-gimp_operation_layer_mode_prepare (GeglOperation *operation)
+gimp_operation_point_layer_mode_prepare (GeglOperation *operation)
 {
   Babl *format = babl_format ("RaGaBaA float");
 
@@ -154,14 +152,14 @@
 }
 
 static gboolean
-gimp_operation_layer_mode_process (GeglOperation       *operation,
+gimp_operation_point_layer_mode_process (GeglOperation       *operation,
                                    void                *in_buf,
                                    void                *aux_buf,
                                    void                *out_buf,
                                    glong                samples,
                                    const GeglRectangle *roi)
 {
-  GimpOperationLayerMode *self = GIMP_OPERATION_LAYER_MODE (operation);
+  GimpOperationPointLayerMode *self = GIMP_OPERATION_POINT_LAYER_MODE (operation);
 
   gfloat *in    = in_buf;
   gfloat *layer = aux_buf;

Copied: trunk/app/gegl/gimpoperationpointlayermode.h (from r27400, /trunk/app/gegl/gimpoperationlayermode.h)
==============================================================================
--- /trunk/app/gegl/gimpoperationlayermode.h	(original)
+++ trunk/app/gegl/gimpoperationpointlayermode.h	Sat Oct 25 14:16:22 2008
@@ -19,23 +19,22 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __GIMP_OPERATION_LAYER_MODE_H__
-#define __GIMP_OPERATION_LAYER_MODE_H__
+#ifndef __GIMP_OPERATION_POINT_LAYER_MODE_H__
+#define __GIMP_OPERATION_POINT_LAYER_MODE_H__
 
 
-#include <gegl-plugin.h>
-#include <operation/gegl-operation-point-composer.h>
+#define GIMP_TYPE_OPERATION_POINT_LAYER_MODE            (gimp_operation_point_layer_mode_get_type ())
+#define GIMP_OPERATION_POINT_LAYER_MODE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_POINT_LAYER_MODE, GimpOperationPointLayerMode))
+#define GIMP_OPERATION_POINT_LAYER_MODE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GIMP_TYPE_OPERATION_POINT_LAYER_MODE, GimpOperationPointLayerModeClass))
+#define GIMP_IS_OPERATION_POINT_LAYER_MODE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_POINT_LAYER_MODE))
+#define GIMP_IS_OPERATION_POINT_LAYER_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GIMP_TYPE_OPERATION_POINT_LAYER_MODE))
+#define GIMP_OPERATION_POINT_LAYER_MODE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GIMP_TYPE_OPERATION_POINT_LAYER_MODE, GimpOperationPointLayerModeClass))
 
 
-#define GIMP_TYPE_OPERATION_LAYER_MODE            (gimp_operation_layer_mode_get_type ())
-#define GIMP_OPERATION_LAYER_MODE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LAYER_MODE, GimpOperationLayerMode))
-#define GIMP_OPERATION_LAYER_MODE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GIMP_TYPE_OPERATION_LAYER_MODE, GimpOperationLayerModeClass))
-#define GIMP_IS_OPERATION_LAYER_MODE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LAYER_MODE))
-#define GIMP_IS_OPERATION_LAYER_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GIMP_TYPE_OPERATION_LAYER_MODE))
-#define GIMP_OPERATION_LAYER_MODE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GIMP_TYPE_OPERATION_LAYER_MODE, GimpOperationLayerModeClass))
+typedef struct _GimpOperationPointLayerModeClass GimpOperationPointLayerModeClass;
 
 
-GType   gimp_operation_layer_mode_get_type (void) G_GNUC_CONST;
+GType   gimp_operation_point_layer_mode_get_type (void) G_GNUC_CONST;
 
 
-#endif /* __GIMP_OPERATION_LAYER_MODE_H__ */
+#endif /* __GIMP_OPERATION_POINT_LAYER_MODE_H__ */



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