/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_colormapping_params_t
 *     enum dt_iop_colormapping_flags_t
 *       NEUTRAL
 *       HAS_SOURCE
 *       HAS_TARGET
 *       HAS_SOURCE_TARGET
 *       ACQUIRE
 *       GET_SOURCE
 *       GET_TARGET
 *     flag 
 *       default: NEUTRAL
 * 
 *     int
 *     n 
 *       description: number of clusters
 *       default: 3
 *       range: 1 .. 5
 * 
 *     float
 *     dominance 
 *       description: color dominance
 *       default: 100.0
 *       range: 0.0 .. 100.0
 * 
 *     float
 *     equalization 
 *       description: histogram equalization
 *       default: 50.0
 *       range: 0.0 .. 100.0
 * 
 *     float
 *     source_ihist [HISTN]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float2
 *     source_mean [MAXN]
 * 
 *     float2
 *     source_var [MAXN]
 * 
 *     float
 *     source_weight [MAXN]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     int
 *     target_hist [HISTN]
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     float2
 *     target_mean [MAXN]
 * 
 *     float2
 *     target_var [MAXN]
 * 
 *     float
 *     target_weight [MAXN]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 * dt_iop_colormapping_params_t
 *
 */

#include "/build/darktable/src/darktable-4.0.0/src/iop/colormapping.c"

#ifdef __cplusplus
extern "C"
{
#endif

#include <string.h>
#include "common/introspection.h"

static dt_introspection_field_t introspection_linear[21+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_colormapping_flags_t", (char*)"flag", (char*)"flag", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->flag), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, flag), NULL },
    /*entries*/ 7, /*values*/ NULL, /*Default*/ NEUTRAL
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"n", (char*)"n", N_((char*)"number of clusters"), sizeof(((dt_iop_colormapping_params_t*)NULL)->n), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, n), NULL },
    /*Min*/ 1, /*Max*/ 5, /*Default*/ 3
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"dominance", (char*)"dominance", N_((char*)"color dominance"), sizeof(((dt_iop_colormapping_params_t*)NULL)->dominance), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, dominance), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 100.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"equalization", (char*)"equalization", N_((char*)"histogram equalization"), sizeof(((dt_iop_colormapping_params_t*)NULL)->equalization), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, equalization), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 50.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"source_ihist[0]", (char*)"source_ihist[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_ihist[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_ihist), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"source_ihist", (char*)"source_ihist", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_ihist), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_ihist), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_ihist), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[4]
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"source_mean[0]", (char*)"source_mean[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_mean[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_mean), NULL },
    /* no data for this type */
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"source_mean", (char*)"source_mean", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_mean), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_mean), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_mean), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[6]
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"source_var[0]", (char*)"source_var[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_var[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_var), NULL },
    /* no data for this type */
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"source_var", (char*)"source_var", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_var), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_var), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_var), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[8]
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"source_weight[0]", (char*)"source_weight[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_weight[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_weight), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"source_weight", (char*)"source_weight", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_weight), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_weight), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_weight), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[10]
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"target_hist[0]", (char*)"target_hist[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_hist[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_hist), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"int[]", (char*)"target_hist", (char*)"target_hist", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_hist), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_hist), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_hist), /*type*/ DT_INTROSPECTION_TYPE_INT, /*field*/ &introspection_linear[12]
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"target_mean[0]", (char*)"target_mean[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_mean[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_mean), NULL },
    /* no data for this type */
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"target_mean", (char*)"target_mean", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_mean), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_mean), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_mean), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[14]
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"target_var[0]", (char*)"target_var[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_var[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_var), NULL },
    /* no data for this type */
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"target_var", (char*)"target_var", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_var), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_var), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_var), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[16]
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"target_weight[0]", (char*)"target_weight[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_weight[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_weight), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"target_weight", (char*)"target_weight", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_weight), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_weight), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_weight), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[18]
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_colormapping_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_colormapping_params_t), 0, NULL },
    /*entries*/ 12, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  1,
  "dt_iop_colormapping_params_t",
  sizeof(dt_iop_colormapping_params_t),
  &introspection_linear[21-1],
  sizeof(dt_iop_module_t),
  G_STRUCT_OFFSET(dt_iop_module_t, default_params)
};

dt_introspection_field_t* get_introspection_linear()
{
  return introspection_linear;
}

dt_introspection_t* get_introspection()
{
  return &introspection;
}

int introspection_init(struct dt_iop_module_so_t *self, int api_version)
{
  // here we check that the generated code matches the api at compile time and also at runtime
  if(introspection.api_version != DT_INTROSPECTION_VERSION || api_version != DT_INTROSPECTION_VERSION)
    return 1;

#if defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406)
  introspection_linear[0].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_colormapping_flags_t", (char*)"flag", (char*)"flag", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->flag), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, flag), NULL },
    /*entries*/ 7, /*values*/ NULL, /*Default*/ NEUTRAL
  };
  introspection_linear[1].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"n", (char*)"n", N_((char*)"number of clusters"), sizeof(((dt_iop_colormapping_params_t*)NULL)->n), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, n), NULL },
    /*Min*/ 1, /*Max*/ 5, /*Default*/ 3
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"dominance", (char*)"dominance", N_((char*)"color dominance"), sizeof(((dt_iop_colormapping_params_t*)NULL)->dominance), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, dominance), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 100.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"equalization", (char*)"equalization", N_((char*)"histogram equalization"), sizeof(((dt_iop_colormapping_params_t*)NULL)->equalization), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, equalization), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 50.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"source_ihist[0]", (char*)"source_ihist[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_ihist[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_ihist), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[5].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"source_ihist", (char*)"source_ihist", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_ihist), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_ihist), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_ihist), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[4]
  };
  introspection_linear[6].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"source_mean[0]", (char*)"source_mean[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_mean[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_mean), NULL },
    /* no data for this type */
  };
  introspection_linear[7].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"source_mean", (char*)"source_mean", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_mean), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_mean), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_mean), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[6]
  };
  introspection_linear[8].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"source_var[0]", (char*)"source_var[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_var[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_var), NULL },
    /* no data for this type */
  };
  introspection_linear[9].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"source_var", (char*)"source_var", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_var), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_var), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_var), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[8]
  };
  introspection_linear[10].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"source_weight[0]", (char*)"source_weight[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_weight[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_weight), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[11].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"source_weight", (char*)"source_weight", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->source_weight), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, source_weight), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->source_weight), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[10]
  };
  introspection_linear[12].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"target_hist[0]", (char*)"target_hist[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_hist[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_hist), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[13].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"int[]", (char*)"target_hist", (char*)"target_hist", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_hist), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_hist), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_hist), /*type*/ DT_INTROSPECTION_TYPE_INT, /*field*/ &introspection_linear[12]
  };
  introspection_linear[14].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"target_mean[0]", (char*)"target_mean[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_mean[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_mean), NULL },
    /* no data for this type */
  };
  introspection_linear[15].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"target_mean", (char*)"target_mean", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_mean), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_mean), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_mean), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[14]
  };
  introspection_linear[16].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"float2", (char*)"target_var[0]", (char*)"target_var[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_var[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_var), NULL },
    /* no data for this type */
  };
  introspection_linear[17].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float2[]", (char*)"target_var", (char*)"target_var", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_var), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_var), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_var), /*type*/ DT_INTROSPECTION_TYPE_OPAQUE, /*field*/ &introspection_linear[16]
  };
  introspection_linear[18].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"target_weight[0]", (char*)"target_weight[0]", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_weight[0]), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_weight), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[19].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"target_weight", (char*)"target_weight", (char*)"", sizeof(((dt_iop_colormapping_params_t*)NULL)->target_weight), G_STRUCT_OFFSET(dt_iop_colormapping_params_t, target_weight), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colormapping_params_t*)NULL)->target_weight), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[18]
  };
  introspection_linear[20].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_colormapping_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_colormapping_params_t), 0, NULL },
    /*entries*/ 12, /*fields*/ NULL
  };
  introspection_linear[21].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

  for(int i = 0; i <= 21; i++)
    introspection_linear[i].header.so = self;

  static dt_introspection_type_enum_tuple_t f0[] = { 
    { "NEUTRAL", NEUTRAL, (char*)"" },
    { "HAS_SOURCE", HAS_SOURCE, (char*)"" },
    { "HAS_TARGET", HAS_TARGET, (char*)"" },
    { "HAS_SOURCE_TARGET", HAS_SOURCE_TARGET, (char*)"" },
    { "ACQUIRE", ACQUIRE, (char*)"" },
    { "GET_SOURCE", GET_SOURCE, (char*)"" },
    { "GET_TARGET", GET_TARGET, (char*)"" },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f20[] = {
    &introspection_linear[0],
    &introspection_linear[1],
    &introspection_linear[2],
    &introspection_linear[3],
    &introspection_linear[5],
    &introspection_linear[7],
    &introspection_linear[9],
    &introspection_linear[11],
    &introspection_linear[13],
    &introspection_linear[15],
    &introspection_linear[17],
    &introspection_linear[19],
    NULL
  };

  introspection_linear[0].Enum.values = f0;
  introspection_linear[20].Struct.fields = f20;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_colormapping_params_t * p = (dt_iop_colormapping_params_t*)param;
  if(!strcmp(name, "flag"))
    return &(p->flag);
  else if(!strcmp(name, "n"))
    return &(p->n);
  else if(!strcmp(name, "dominance"))
    return &(p->dominance);
  else if(!strcmp(name, "equalization"))
    return &(p->equalization);
  else if(!strcmp(name, "source_ihist[0]"))
    return &(p->source_ihist[0]);
  else if(!strcmp(name, "source_ihist"))
    return &(p->source_ihist);
  else if(!strcmp(name, "source_mean[0]"))
    return &(p->source_mean[0]);
  else if(!strcmp(name, "source_mean"))
    return &(p->source_mean);
  else if(!strcmp(name, "source_var[0]"))
    return &(p->source_var[0]);
  else if(!strcmp(name, "source_var"))
    return &(p->source_var);
  else if(!strcmp(name, "source_weight[0]"))
    return &(p->source_weight[0]);
  else if(!strcmp(name, "source_weight"))
    return &(p->source_weight);
  else if(!strcmp(name, "target_hist[0]"))
    return &(p->target_hist[0]);
  else if(!strcmp(name, "target_hist"))
    return &(p->target_hist);
  else if(!strcmp(name, "target_mean[0]"))
    return &(p->target_mean[0]);
  else if(!strcmp(name, "target_mean"))
    return &(p->target_mean);
  else if(!strcmp(name, "target_var[0]"))
    return &(p->target_var[0]);
  else if(!strcmp(name, "target_var"))
    return &(p->target_var);
  else if(!strcmp(name, "target_weight[0]"))
    return &(p->target_weight[0]);
  else if(!strcmp(name, "target_weight"))
    return &(p->target_weight);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!strcmp(name, "flag"))
    return &(introspection_linear[0]);
  else if(!strcmp(name, "n"))
    return &(introspection_linear[1]);
  else if(!strcmp(name, "dominance"))
    return &(introspection_linear[2]);
  else if(!strcmp(name, "equalization"))
    return &(introspection_linear[3]);
  else if(!strcmp(name, "source_ihist[0]"))
    return &(introspection_linear[4]);
  else if(!strcmp(name, "source_ihist"))
    return &(introspection_linear[5]);
  else if(!strcmp(name, "source_mean[0]"))
    return &(introspection_linear[6]);
  else if(!strcmp(name, "source_mean"))
    return &(introspection_linear[7]);
  else if(!strcmp(name, "source_var[0]"))
    return &(introspection_linear[8]);
  else if(!strcmp(name, "source_var"))
    return &(introspection_linear[9]);
  else if(!strcmp(name, "source_weight[0]"))
    return &(introspection_linear[10]);
  else if(!strcmp(name, "source_weight"))
    return &(introspection_linear[11]);
  else if(!strcmp(name, "target_hist[0]"))
    return &(introspection_linear[12]);
  else if(!strcmp(name, "target_hist"))
    return &(introspection_linear[13]);
  else if(!strcmp(name, "target_mean[0]"))
    return &(introspection_linear[14]);
  else if(!strcmp(name, "target_mean"))
    return &(introspection_linear[15]);
  else if(!strcmp(name, "target_var[0]"))
    return &(introspection_linear[16]);
  else if(!strcmp(name, "target_var"))
    return &(introspection_linear[17]);
  else if(!strcmp(name, "target_weight[0]"))
    return &(introspection_linear[18]);
  else if(!strcmp(name, "target_weight"))
    return &(introspection_linear[19]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

