/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_toneequalizer_params_t
 *     float
 *     noise 
 *       description: blacks
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     ultra_deep_blacks 
 *       description: deep shadows
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     deep_blacks 
 *       description: shadows
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     blacks 
 *       description: light shadows
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     shadows 
 *       description: mid-tones
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     midtones 
 *       description: dark highlights
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     highlights 
 *       description: highlights
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     whites 
 *       description: whites
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     speculars 
 *       description: speculars
 *       default: 0.0
 *       range: -2.0 .. 2.0
 * 
 *     float
 *     blending 
 *       description: smoothing diameter
 *       default: 5.0
 *       range: 0.01 .. 100.0
 * 
 *     float
 *     smoothing 
 *       default: 1.414213562
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     feathering 
 *       description: edges refinement/feathering
 *       default: 1.0
 *       range: 0.01 .. 10000.0
 * 
 *     float
 *     quantization 
 *       description: mask quantization
 *       default: 0.0
 *       range: 0.0 .. 2.0
 * 
 *     float
 *     contrast_boost 
 *       description: mask contrast compensation
 *       default: 0.0
 *       range: -16.0 .. 16.0
 * 
 *     float
 *     exposure_boost 
 *       description: mask exposure compensation
 *       default: 0.0
 *       range: -16.0 .. 16.0
 * 
 *     enum dt_iop_toneequalizer_filter_t
 *       DT_TONEEQ_NONE : no
 *       DT_TONEEQ_AVG_GUIDED : averaged guided filter
 *       DT_TONEEQ_GUIDED : guided filter
 *       DT_TONEEQ_AVG_EIGF : averaged EIGF
 *       DT_TONEEQ_EIGF : EIGF
 *     details 
 *       description: preserve details
 *       default: DT_TONEEQ_EIGF
 * 
 *     enum dt_iop_luminance_mask_method_t
 *       DT_TONEEQ_MEAN : RGB average
 *       DT_TONEEQ_LIGHTNESS : HSL lightness
 *       DT_TONEEQ_VALUE : HSV value / RGB max
 *       DT_TONEEQ_NORM_1 : RGB sum
 *       DT_TONEEQ_NORM_2 : RGB euclidean norm
 *       DT_TONEEQ_NORM_POWER : RGB power norm
 *       DT_TONEEQ_GEOMEAN : RGB geometric mean
 *       DT_TONEEQ_LAST
 *     method 
 *       description: luminance estimator
 *       default: DT_TONEEQ_NORM_2
 * 
 *     int
 *     iterations 
 *       description: filter diffusion
 *       default: 1
 *       range: 1 .. 20
 * 
 * dt_iop_toneequalizer_params_t
 *
 */

#include "/build/darktable/src/darktable-5.6.0/src/iop/toneequal.c"

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[19+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"noise", (char*)"noise", N_((char*)"blacks"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->noise), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, noise), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"ultra_deep_blacks", (char*)"ultra_deep_blacks", N_((char*)"deep shadows"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->ultra_deep_blacks), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, ultra_deep_blacks), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"deep_blacks", (char*)"deep_blacks", N_((char*)"shadows"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->deep_blacks), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, deep_blacks), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blacks", (char*)"blacks", N_((char*)"light shadows"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->blacks), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, blacks), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"shadows", (char*)"shadows", N_((char*)"mid-tones"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->shadows), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, shadows), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"midtones", (char*)"midtones", N_((char*)"dark highlights"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->midtones), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, midtones), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"highlights", (char*)"highlights", N_((char*)"highlights"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->highlights), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, highlights), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"whites", (char*)"whites", N_((char*)"whites"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->whites), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, whites), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"speculars", (char*)"speculars", N_((char*)"speculars"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->speculars), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, speculars), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blending", (char*)"blending", N_((char*)"smoothing diameter"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->blending), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, blending), NULL },
    /*Min*/ 0.01, /*Max*/ 100.0, /*Default*/ 5.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"smoothing", (char*)"smoothing", (char*)"", sizeof(((dt_iop_toneequalizer_params_t*)NULL)->smoothing), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, smoothing), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 1.414213562
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"feathering", (char*)"feathering", N_((char*)"edges refinement/feathering"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->feathering), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, feathering), NULL },
    /*Min*/ 0.01, /*Max*/ 10000.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"quantization", (char*)"quantization", N_((char*)"mask quantization"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->quantization), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, quantization), NULL },
    /*Min*/ 0.0, /*Max*/ 2.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"contrast_boost", (char*)"contrast_boost", N_((char*)"mask contrast compensation"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->contrast_boost), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, contrast_boost), NULL },
    /*Min*/ -16.0, /*Max*/ 16.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"exposure_boost", (char*)"exposure_boost", N_((char*)"mask exposure compensation"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->exposure_boost), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, exposure_boost), NULL },
    /*Min*/ -16.0, /*Max*/ 16.0, /*Default*/ 0.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_toneequalizer_filter_t", (char*)"details", (char*)"details", N_((char*)"preserve details"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->details), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, details), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_TONEEQ_EIGF
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_luminance_mask_method_t", (char*)"method", (char*)"method", N_((char*)"luminance estimator"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->method), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, method), NULL },
    /*entries*/ 8, /*values*/ NULL, /*Default*/ DT_TONEEQ_NORM_2
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"iterations", (char*)"iterations", N_((char*)"filter diffusion"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->iterations), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, iterations), NULL },
    /*Min*/ 1, /*Max*/ 20, /*Default*/ 1
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_toneequalizer_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_toneequalizer_params_t), 0, NULL },
    /*entries*/ 18, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  2,
  "dt_iop_toneequalizer_params_t",
  sizeof(dt_iop_toneequalizer_params_t),
  &introspection_linear[19-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].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"noise", (char*)"noise", N_((char*)"blacks"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->noise), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, noise), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"ultra_deep_blacks", (char*)"ultra_deep_blacks", N_((char*)"deep shadows"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->ultra_deep_blacks), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, ultra_deep_blacks), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"deep_blacks", (char*)"deep_blacks", N_((char*)"shadows"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->deep_blacks), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, deep_blacks), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blacks", (char*)"blacks", N_((char*)"light shadows"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->blacks), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, blacks), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"shadows", (char*)"shadows", N_((char*)"mid-tones"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->shadows), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, shadows), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"midtones", (char*)"midtones", N_((char*)"dark highlights"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->midtones), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, midtones), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"highlights", (char*)"highlights", N_((char*)"highlights"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->highlights), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, highlights), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[7].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"whites", (char*)"whites", N_((char*)"whites"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->whites), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, whites), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[8].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"speculars", (char*)"speculars", N_((char*)"speculars"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->speculars), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, speculars), NULL },
    /*Min*/ -2.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[9].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blending", (char*)"blending", N_((char*)"smoothing diameter"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->blending), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, blending), NULL },
    /*Min*/ 0.01, /*Max*/ 100.0, /*Default*/ 5.0
  };
  introspection_linear[10].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"smoothing", (char*)"smoothing", (char*)"", sizeof(((dt_iop_toneequalizer_params_t*)NULL)->smoothing), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, smoothing), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 1.414213562
  };
  introspection_linear[11].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"feathering", (char*)"feathering", N_((char*)"edges refinement/feathering"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->feathering), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, feathering), NULL },
    /*Min*/ 0.01, /*Max*/ 10000.0, /*Default*/ 1.0
  };
  introspection_linear[12].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"quantization", (char*)"quantization", N_((char*)"mask quantization"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->quantization), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, quantization), NULL },
    /*Min*/ 0.0, /*Max*/ 2.0, /*Default*/ 0.0
  };
  introspection_linear[13].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"contrast_boost", (char*)"contrast_boost", N_((char*)"mask contrast compensation"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->contrast_boost), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, contrast_boost), NULL },
    /*Min*/ -16.0, /*Max*/ 16.0, /*Default*/ 0.0
  };
  introspection_linear[14].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"exposure_boost", (char*)"exposure_boost", N_((char*)"mask exposure compensation"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->exposure_boost), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, exposure_boost), NULL },
    /*Min*/ -16.0, /*Max*/ 16.0, /*Default*/ 0.0
  };
  introspection_linear[15].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_toneequalizer_filter_t", (char*)"details", (char*)"details", N_((char*)"preserve details"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->details), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, details), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_TONEEQ_EIGF
  };
  introspection_linear[16].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_luminance_mask_method_t", (char*)"method", (char*)"method", N_((char*)"luminance estimator"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->method), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, method), NULL },
    /*entries*/ 8, /*values*/ NULL, /*Default*/ DT_TONEEQ_NORM_2
  };
  introspection_linear[17].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"iterations", (char*)"iterations", N_((char*)"filter diffusion"), sizeof(((dt_iop_toneequalizer_params_t*)NULL)->iterations), G_STRUCT_OFFSET(dt_iop_toneequalizer_params_t, iterations), NULL },
    /*Min*/ 1, /*Max*/ 20, /*Default*/ 1
  };
  introspection_linear[18].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_toneequalizer_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_toneequalizer_params_t), 0, NULL },
    /*entries*/ 18, /*fields*/ NULL
  };
  introspection_linear[19].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f15[] = { 
    { "DT_TONEEQ_NONE", DT_TONEEQ_NONE, N_((char*)"no") },
    { "DT_TONEEQ_AVG_GUIDED", DT_TONEEQ_AVG_GUIDED, N_((char*)"averaged guided filter") },
    { "DT_TONEEQ_GUIDED", DT_TONEEQ_GUIDED, N_((char*)"guided filter") },
    { "DT_TONEEQ_AVG_EIGF", DT_TONEEQ_AVG_EIGF, N_((char*)"averaged EIGF") },
    { "DT_TONEEQ_EIGF", DT_TONEEQ_EIGF, N_((char*)"EIGF") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f16[] = { 
    { "DT_TONEEQ_MEAN", DT_TONEEQ_MEAN, N_((char*)"RGB average") },
    { "DT_TONEEQ_LIGHTNESS", DT_TONEEQ_LIGHTNESS, N_((char*)"HSL lightness") },
    { "DT_TONEEQ_VALUE", DT_TONEEQ_VALUE, N_((char*)"HSV value / RGB max") },
    { "DT_TONEEQ_NORM_1", DT_TONEEQ_NORM_1, N_((char*)"RGB sum") },
    { "DT_TONEEQ_NORM_2", DT_TONEEQ_NORM_2, N_((char*)"RGB euclidean norm") },
    { "DT_TONEEQ_NORM_POWER", DT_TONEEQ_NORM_POWER, N_((char*)"RGB power norm") },
    { "DT_TONEEQ_GEOMEAN", DT_TONEEQ_GEOMEAN, N_((char*)"RGB geometric mean") },
    { "DT_TONEEQ_LAST", DT_TONEEQ_LAST, (char*)"" },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f18[] = {
    &introspection_linear[0],
    &introspection_linear[1],
    &introspection_linear[2],
    &introspection_linear[3],
    &introspection_linear[4],
    &introspection_linear[5],
    &introspection_linear[6],
    &introspection_linear[7],
    &introspection_linear[8],
    &introspection_linear[9],
    &introspection_linear[10],
    &introspection_linear[11],
    &introspection_linear[12],
    &introspection_linear[13],
    &introspection_linear[14],
    &introspection_linear[15],
    &introspection_linear[16],
    &introspection_linear[17],
    NULL
  };

  introspection_linear[15].Enum.values = f15;
  introspection_linear[16].Enum.values = f16;
  introspection_linear[18].Struct.fields = f18;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_toneequalizer_params_t * p = (dt_iop_toneequalizer_params_t*)param;
  if(!strcmp(name, "noise"))
    return &(p->noise);
  else if(!strcmp(name, "ultra_deep_blacks"))
    return &(p->ultra_deep_blacks);
  else if(!strcmp(name, "deep_blacks"))
    return &(p->deep_blacks);
  else if(!strcmp(name, "blacks"))
    return &(p->blacks);
  else if(!strcmp(name, "shadows"))
    return &(p->shadows);
  else if(!strcmp(name, "midtones"))
    return &(p->midtones);
  else if(!strcmp(name, "highlights"))
    return &(p->highlights);
  else if(!strcmp(name, "whites"))
    return &(p->whites);
  else if(!strcmp(name, "speculars"))
    return &(p->speculars);
  else if(!strcmp(name, "blending"))
    return &(p->blending);
  else if(!strcmp(name, "smoothing"))
    return &(p->smoothing);
  else if(!strcmp(name, "feathering"))
    return &(p->feathering);
  else if(!strcmp(name, "quantization"))
    return &(p->quantization);
  else if(!strcmp(name, "contrast_boost"))
    return &(p->contrast_boost);
  else if(!strcmp(name, "exposure_boost"))
    return &(p->exposure_boost);
  else if(!strcmp(name, "details"))
    return &(p->details);
  else if(!strcmp(name, "method"))
    return &(p->method);
  else if(!strcmp(name, "iterations"))
    return &(p->iterations);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "noise"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "ultra_deep_blacks"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "deep_blacks"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "blacks"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "shadows"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "midtones"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "highlights"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "whites"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "speculars"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "blending"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "smoothing"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "feathering"))
    return &(introspection_linear[11]);
  else if(!g_ascii_strcasecmp(name, "quantization"))
    return &(introspection_linear[12]);
  else if(!g_ascii_strcasecmp(name, "contrast_boost"))
    return &(introspection_linear[13]);
  else if(!g_ascii_strcasecmp(name, "exposure_boost"))
    return &(introspection_linear[14]);
  else if(!g_ascii_strcasecmp(name, "details"))
    return &(introspection_linear[15]);
  else if(!g_ascii_strcasecmp(name, "method"))
    return &(introspection_linear[16]);
  else if(!g_ascii_strcasecmp(name, "iterations"))
    return &(introspection_linear[17]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

