[gimp] app: rename GimpLayerModeFunction to GimpLayerModeFunc



commit 69c4644e15b245d1312ded00c6612f1b5b13cf23
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jan 16 22:42:19 2017 +0100

    app: rename GimpLayerModeFunction to GimpLayerModeFunc
    
    like all other function typedefs and add GimpBlendFunc typedef which
    will be needed soon. Also rename get_layer_mode_function() to
    gimp_get_layer_mode_function().

 .../layer-modes/gimplayermodefunctions.c           |    8 +++---
 .../layer-modes/gimplayermodefunctions.h           |    4 +-
 app/operations/layer-modes/gimpoperationnormal.c   |    6 ++--
 app/operations/layer-modes/gimpoperationnormal.h   |    2 +-
 app/operations/operations-types.h                  |   24 +++++++++++++------
 app/paint/gimppaintcore-loops.c                    |    5 +--
 6 files changed, 28 insertions(+), 21 deletions(-)
---
diff --git a/app/operations/layer-modes/gimplayermodefunctions.c 
b/app/operations/layer-modes/gimplayermodefunctions.c
index 6089d7e..e59c4ef 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.c
+++ b/app/operations/layer-modes/gimplayermodefunctions.c
@@ -77,11 +77,11 @@
 #include "gimpoperationsubtract.h"
 
 
-GimpLayerModeFunction
-get_layer_mode_function (GimpLayerMode  paint_mode,
-                         gboolean       linear_mode)
+GimpLayerModeFunc
+gimp_get_layer_mode_function (GimpLayerMode  paint_mode,
+                              gboolean       linear_mode)
 {
-  GimpLayerModeFunction func;
+  GimpLayerModeFunc func;
 
   switch (paint_mode)
     {
diff --git a/app/operations/layer-modes/gimplayermodefunctions.h 
b/app/operations/layer-modes/gimplayermodefunctions.h
index 5b9a9ea..618824d 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.h
+++ b/app/operations/layer-modes/gimplayermodefunctions.h
@@ -22,8 +22,8 @@
 #define __GIMP_LAYER_MODE_FUNCTIONS_H__
 
 
-GimpLayerModeFunction get_layer_mode_function (GimpLayerMode  paint_mode,
-                                               gboolean       linear_mode);
+GimpLayerModeFunc   gimp_get_layer_mode_function (GimpLayerMode  paint_mode,
+                                                  gboolean       linear_mode);
 
 
 #endif /* __GIMP_LAYER_MODE_FUNCTIONS_H__ */
diff --git a/app/operations/layer-modes/gimpoperationnormal.c 
b/app/operations/layer-modes/gimpoperationnormal.c
index 8e9ac69..e492000 100644
--- a/app/operations/layer-modes/gimpoperationnormal.c
+++ b/app/operations/layer-modes/gimpoperationnormal.c
@@ -30,9 +30,6 @@
 #include "gimpoperationnormal.h"
 
 
-GimpLayerModeFunction gimp_operation_normal_process_pixels = NULL;
-
-
 static gboolean gimp_operation_normal_parent_process (GeglOperation        *operation,
                                                       GeglOperationContext *context,
                                                       const gchar          *output_prop,
@@ -53,6 +50,7 @@ G_DEFINE_TYPE (GimpOperationNormal, gimp_operation_normal,
 
 #define parent_class gimp_operation_normal_parent_class
 
+
 static const gchar* reference_xml = "<?xml version='1.0' encoding='UTF-8'?>"
 "<gegl>"
 "<node operation='gimp:normal'>"
@@ -69,6 +67,8 @@ static const gchar* reference_xml = "<?xml version='1.0' encoding='UTF-8'?>"
 "</node>"
 "</gegl>";
 
+GimpLayerModeFunc gimp_operation_normal_process_pixels = NULL;
+
 
 static void
 gimp_operation_normal_class_init (GimpOperationNormalClass *klass)
diff --git a/app/operations/layer-modes/gimpoperationnormal.h 
b/app/operations/layer-modes/gimpoperationnormal.h
index fb3c378..1b8e401 100644
--- a/app/operations/layer-modes/gimpoperationnormal.h
+++ b/app/operations/layer-modes/gimpoperationnormal.h
@@ -49,7 +49,7 @@ struct _GimpOperationNormalClass
 
 GType    gimp_operation_normal_get_type            (void) G_GNUC_CONST;
 
-extern GimpLayerModeFunction gimp_operation_normal_process_pixels;
+extern GimpLayerModeFunc gimp_operation_normal_process_pixels;
 
 gboolean gimp_operation_normal_process_pixels_core (gfloat              *in,
                                                     gfloat              *aux,
diff --git a/app/operations/operations-types.h b/app/operations/operations-types.h
index 2e624dc..c1d2d32 100644
--- a/app/operations/operations-types.h
+++ b/app/operations/operations-types.h
@@ -22,6 +22,7 @@
 
 
 #include <gegl-types.h>
+
 #include "gegl/gimp-gegl-types.h"
 
 
@@ -49,15 +50,22 @@ typedef struct _GimpThresholdConfig             GimpThresholdConfig;
 
 typedef struct _GimpCagePoint                   GimpCagePoint;
 
+
 /*  functions  */
 
-typedef gboolean (*GimpLayerModeFunction)(gfloat              *in,
-                                          gfloat              *aux,
-                                          gfloat              *mask,
-                                          gfloat              *out,
-                                          gfloat               opacity,
-                                          glong                samples,
-                                          const GeglRectangle *roi,
-                                          gint                 level);
+typedef gboolean (* GimpLayerModeFunc) (gfloat              *in,
+                                        gfloat              *aux,
+                                        gfloat              *mask,
+                                        gfloat              *out,
+                                        gfloat               opacity,
+                                        glong                samples,
+                                        const GeglRectangle *roi,
+                                        gint                 level);
+
+typedef  void    (* GimpBlendFunc)     (const float         *dest,
+                                        const float         *src,
+                                        float               *out,
+                                        gint                 samples);
+
 
 #endif /* __OPERATIONS_TYPES_H__ */
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index 3f088f0..8ab5e27 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -305,9 +305,8 @@ do_layer_blend (GeglBuffer    *src_buffer,
 
   const guint         paint_stride = gimp_temp_buf_get_width (paint_buf);
   gfloat             *paint_data   = (gfloat *) gimp_temp_buf_get_data (paint_buf);
-
-  GimpLayerModeFunction apply_func = get_layer_mode_function (paint_mode,
-                                                              linear_mode);
+  GimpLayerModeFunc   apply_func   = gimp_get_layer_mode_function (paint_mode,
+                                                                   linear_mode);
 
   if (linear_mode)
     iterator_format = babl_format ("RGBA float");


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