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().
This commit is contained in:
Michael Natterer
2017-01-16 22:42:19 +01:00
parent b2e1237480
commit 69c4644e15
6 changed files with 28 additions and 21 deletions

View File

@ -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)
{

View File

@ -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__ */

View File

@ -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)

View File

@ -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,

View File

@ -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__ */

View File

@ -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");