/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_retouch_params_t
 *     struct dt_iop_retouch_form_data_t
 *       int
 *       formid 
 *         default: 0
 *         range: G_MININT .. G_MAXINT
 * 
 *       int
 *       scale 
 *         default: 0
 *         range: G_MININT .. G_MAXINT
 * 
 *       enum dt_iop_retouch_algo_type_t
 *         DT_IOP_RETOUCH_NONE : unused
 *         DT_IOP_RETOUCH_CLONE : clone
 *         DT_IOP_RETOUCH_HEAL : heal
 *         DT_IOP_RETOUCH_BLUR : blur
 *         DT_IOP_RETOUCH_FILL : fill
 *       algorithm 
 *         default: 0
 * 
 *       enum dt_iop_retouch_blur_types_t
 *         DT_IOP_RETOUCH_BLUR_GAUSSIAN : gaussian
 *         DT_IOP_RETOUCH_BLUR_BILATERAL : bilateral
 *       blur_type 
 *         default: 0
 * 
 *       float
 *       blur_radius 
 *         default: 0.0
 *         range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *       enum dt_iop_retouch_fill_modes_t
 *         DT_IOP_RETOUCH_FILL_ERASE : erase
 *         DT_IOP_RETOUCH_FILL_COLOR : color
 *       fill_mode 
 *         default: 0
 * 
 *       float
 *       fill_color [3]
 *         default: 0.0
 *         range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *       float
 *       fill_brightness 
 *         default: 0.0
 *         range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *       int
 *       distort_mode 
 *         default: 0
 *         range: G_MININT .. G_MAXINT
 * 
 *     rt_forms [RETOUCH_NO_FORMS]
 * 
 *     enum dt_iop_retouch_algo_type_t
 *       DT_IOP_RETOUCH_NONE : unused
 *       DT_IOP_RETOUCH_CLONE : clone
 *       DT_IOP_RETOUCH_HEAL : heal
 *       DT_IOP_RETOUCH_BLUR : blur
 *       DT_IOP_RETOUCH_FILL : fill
 *     algorithm 
 *       default: DT_IOP_RETOUCH_HEAL
 * 
 *     int
 *     num_scales 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     int
 *     curr_scale 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     int
 *     merge_from_scale 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     float
 *     preview_levels [3]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     enum dt_iop_retouch_blur_types_t
 *       DT_IOP_RETOUCH_BLUR_GAUSSIAN : gaussian
 *       DT_IOP_RETOUCH_BLUR_BILATERAL : bilateral
 *     blur_type 
 *       description: blur type
 *       default: DT_IOP_RETOUCH_BLUR_GAUSSIAN
 * 
 *     float
 *     blur_radius 
 *       description: blur radius
 *       default: 10.0
 *       range: 0.1 .. 200.0
 * 
 *     enum dt_iop_retouch_fill_modes_t
 *       DT_IOP_RETOUCH_FILL_ERASE : erase
 *       DT_IOP_RETOUCH_FILL_COLOR : color
 *     fill_mode 
 *       description: fill mode
 *       default: DT_IOP_RETOUCH_FILL_ERASE
 * 
 *     float
 *     fill_color [3]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     fill_brightness 
 *       description: brightness
 *       default: 0.0
 *       range: -1.0 .. 1.0
 * 
 *     int
 *     max_heal_iter 
 *       description: max_iter
 *       default: 2000
 *       range: G_MININT .. G_MAXINT
 * 
 * dt_iop_retouch_params_t
 *
 */

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

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[26+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"rt_forms[0].formid", (char*)"formid", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].formid), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].formid), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"rt_forms[0].scale", (char*)"scale", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].scale), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].scale), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_algo_type_t", (char*)"rt_forms[0].algorithm", (char*)"algorithm", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].algorithm), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].algorithm), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ 0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_blur_types_t", (char*)"rt_forms[0].blur_type", (char*)"blur_type", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].blur_type), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].blur_type), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rt_forms[0].blur_radius", (char*)"blur_radius", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].blur_radius), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].blur_radius), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_fill_modes_t", (char*)"rt_forms[0].fill_mode", (char*)"fill_mode", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_mode), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rt_forms[0].fill_color[0]", (char*)"fill_color[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_color[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_color), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"rt_forms[0].fill_color", (char*)"fill_color", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_color), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_color), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_color), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[6]
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rt_forms[0].fill_brightness", (char*)"fill_brightness", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_brightness), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_brightness), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"rt_forms[0].distort_mode", (char*)"distort_mode", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].distort_mode), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].distort_mode), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_retouch_form_data_t", (char*)"rt_forms[0]", (char*)"rt_forms[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms), NULL },
    /*entries*/ 9, /*fields*/ NULL
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"dt_iop_retouch_form_data_t[]", (char*)"rt_forms", (char*)"rt_forms", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->rt_forms), /*type*/ DT_INTROSPECTION_TYPE_STRUCT, /*field*/ &introspection_linear[10]
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_algo_type_t", (char*)"algorithm", (char*)"algorithm", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->algorithm), G_STRUCT_OFFSET(dt_iop_retouch_params_t, algorithm), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_IOP_RETOUCH_HEAL
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"num_scales", (char*)"num_scales", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->num_scales), G_STRUCT_OFFSET(dt_iop_retouch_params_t, num_scales), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"curr_scale", (char*)"curr_scale", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->curr_scale), G_STRUCT_OFFSET(dt_iop_retouch_params_t, curr_scale), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"merge_from_scale", (char*)"merge_from_scale", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->merge_from_scale), G_STRUCT_OFFSET(dt_iop_retouch_params_t, merge_from_scale), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"preview_levels[0]", (char*)"preview_levels[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->preview_levels[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, preview_levels), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"preview_levels", (char*)"preview_levels", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->preview_levels), G_STRUCT_OFFSET(dt_iop_retouch_params_t, preview_levels), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->preview_levels), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[16]
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_blur_types_t", (char*)"blur_type", (char*)"blur_type", N_((char*)"blur type"), sizeof(((dt_iop_retouch_params_t*)NULL)->blur_type), G_STRUCT_OFFSET(dt_iop_retouch_params_t, blur_type), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_IOP_RETOUCH_BLUR_GAUSSIAN
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blur_radius", (char*)"blur_radius", N_((char*)"blur radius"), sizeof(((dt_iop_retouch_params_t*)NULL)->blur_radius), G_STRUCT_OFFSET(dt_iop_retouch_params_t, blur_radius), NULL },
    /*Min*/ 0.1, /*Max*/ 200.0, /*Default*/ 10.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_fill_modes_t", (char*)"fill_mode", (char*)"fill_mode", N_((char*)"fill mode"), sizeof(((dt_iop_retouch_params_t*)NULL)->fill_mode), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_IOP_RETOUCH_FILL_ERASE
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"fill_color[0]", (char*)"fill_color[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->fill_color[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_color), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"fill_color", (char*)"fill_color", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->fill_color), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_color), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->fill_color), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[21]
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"fill_brightness", (char*)"fill_brightness", N_((char*)"brightness"), sizeof(((dt_iop_retouch_params_t*)NULL)->fill_brightness), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_brightness), NULL },
    /*Min*/ -1.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"max_heal_iter", (char*)"max_heal_iter", N_((char*)"max_iter"), sizeof(((dt_iop_retouch_params_t*)NULL)->max_heal_iter), G_STRUCT_OFFSET(dt_iop_retouch_params_t, max_heal_iter), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 2000
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_retouch_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_retouch_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,
  3,
  "dt_iop_retouch_params_t",
  sizeof(dt_iop_retouch_params_t),
  &introspection_linear[26-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].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"rt_forms[0].formid", (char*)"formid", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].formid), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].formid), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[1].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"rt_forms[0].scale", (char*)"scale", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].scale), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].scale), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[2].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_algo_type_t", (char*)"rt_forms[0].algorithm", (char*)"algorithm", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].algorithm), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].algorithm), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ 0
  };
  introspection_linear[3].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_blur_types_t", (char*)"rt_forms[0].blur_type", (char*)"blur_type", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].blur_type), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].blur_type), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ 0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rt_forms[0].blur_radius", (char*)"blur_radius", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].blur_radius), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].blur_radius), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[5].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_fill_modes_t", (char*)"rt_forms[0].fill_mode", (char*)"fill_mode", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_mode), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ 0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rt_forms[0].fill_color[0]", (char*)"fill_color[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_color[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_color), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[7].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"rt_forms[0].fill_color", (char*)"fill_color", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_color), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_color), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_color), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[6]
  };
  introspection_linear[8].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rt_forms[0].fill_brightness", (char*)"fill_brightness", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].fill_brightness), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].fill_brightness), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[9].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"rt_forms[0].distort_mode", (char*)"distort_mode", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0].distort_mode), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms[0].distort_mode), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[10].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_retouch_form_data_t", (char*)"rt_forms[0]", (char*)"rt_forms[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms), NULL },
    /*entries*/ 9, /*fields*/ NULL
  };
  introspection_linear[11].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"dt_iop_retouch_form_data_t[]", (char*)"rt_forms", (char*)"rt_forms", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->rt_forms), G_STRUCT_OFFSET(dt_iop_retouch_params_t, rt_forms), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->rt_forms), /*type*/ DT_INTROSPECTION_TYPE_STRUCT, /*field*/ &introspection_linear[10]
  };
  introspection_linear[12].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_algo_type_t", (char*)"algorithm", (char*)"algorithm", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->algorithm), G_STRUCT_OFFSET(dt_iop_retouch_params_t, algorithm), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_IOP_RETOUCH_HEAL
  };
  introspection_linear[13].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"num_scales", (char*)"num_scales", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->num_scales), G_STRUCT_OFFSET(dt_iop_retouch_params_t, num_scales), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[14].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"curr_scale", (char*)"curr_scale", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->curr_scale), G_STRUCT_OFFSET(dt_iop_retouch_params_t, curr_scale), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[15].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"merge_from_scale", (char*)"merge_from_scale", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->merge_from_scale), G_STRUCT_OFFSET(dt_iop_retouch_params_t, merge_from_scale), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[16].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"preview_levels[0]", (char*)"preview_levels[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->preview_levels[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, preview_levels), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[17].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"preview_levels", (char*)"preview_levels", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->preview_levels), G_STRUCT_OFFSET(dt_iop_retouch_params_t, preview_levels), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->preview_levels), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[16]
  };
  introspection_linear[18].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_blur_types_t", (char*)"blur_type", (char*)"blur_type", N_((char*)"blur type"), sizeof(((dt_iop_retouch_params_t*)NULL)->blur_type), G_STRUCT_OFFSET(dt_iop_retouch_params_t, blur_type), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_IOP_RETOUCH_BLUR_GAUSSIAN
  };
  introspection_linear[19].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blur_radius", (char*)"blur_radius", N_((char*)"blur radius"), sizeof(((dt_iop_retouch_params_t*)NULL)->blur_radius), G_STRUCT_OFFSET(dt_iop_retouch_params_t, blur_radius), NULL },
    /*Min*/ 0.1, /*Max*/ 200.0, /*Default*/ 10.0
  };
  introspection_linear[20].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_retouch_fill_modes_t", (char*)"fill_mode", (char*)"fill_mode", N_((char*)"fill mode"), sizeof(((dt_iop_retouch_params_t*)NULL)->fill_mode), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_IOP_RETOUCH_FILL_ERASE
  };
  introspection_linear[21].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"fill_color[0]", (char*)"fill_color[0]", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->fill_color[0]), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_color), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[22].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"fill_color", (char*)"fill_color", (char*)"", sizeof(((dt_iop_retouch_params_t*)NULL)->fill_color), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_color), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_retouch_params_t*)NULL)->fill_color), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[21]
  };
  introspection_linear[23].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"fill_brightness", (char*)"fill_brightness", N_((char*)"brightness"), sizeof(((dt_iop_retouch_params_t*)NULL)->fill_brightness), G_STRUCT_OFFSET(dt_iop_retouch_params_t, fill_brightness), NULL },
    /*Min*/ -1.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[24].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"max_heal_iter", (char*)"max_heal_iter", N_((char*)"max_iter"), sizeof(((dt_iop_retouch_params_t*)NULL)->max_heal_iter), G_STRUCT_OFFSET(dt_iop_retouch_params_t, max_heal_iter), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 2000
  };
  introspection_linear[25].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_retouch_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_retouch_params_t), 0, NULL },
    /*entries*/ 12, /*fields*/ NULL
  };
  introspection_linear[26].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f2[] = { 
    { "DT_IOP_RETOUCH_NONE", DT_IOP_RETOUCH_NONE, N_((char*)"unused") },
    { "DT_IOP_RETOUCH_CLONE", DT_IOP_RETOUCH_CLONE, N_((char*)"clone") },
    { "DT_IOP_RETOUCH_HEAL", DT_IOP_RETOUCH_HEAL, N_((char*)"heal") },
    { "DT_IOP_RETOUCH_BLUR", DT_IOP_RETOUCH_BLUR, N_((char*)"blur") },
    { "DT_IOP_RETOUCH_FILL", DT_IOP_RETOUCH_FILL, N_((char*)"fill") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f3[] = { 
    { "DT_IOP_RETOUCH_BLUR_GAUSSIAN", DT_IOP_RETOUCH_BLUR_GAUSSIAN, N_((char*)"gaussian") },
    { "DT_IOP_RETOUCH_BLUR_BILATERAL", DT_IOP_RETOUCH_BLUR_BILATERAL, N_((char*)"bilateral") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f5[] = { 
    { "DT_IOP_RETOUCH_FILL_ERASE", DT_IOP_RETOUCH_FILL_ERASE, N_((char*)"erase") },
    { "DT_IOP_RETOUCH_FILL_COLOR", DT_IOP_RETOUCH_FILL_COLOR, N_((char*)"color") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f10[] = {
    &introspection_linear[0],
    &introspection_linear[1],
    &introspection_linear[2],
    &introspection_linear[3],
    &introspection_linear[4],
    &introspection_linear[5],
    &introspection_linear[7],
    &introspection_linear[8],
    &introspection_linear[9],
    NULL
  };
  static dt_introspection_field_t *f25[] = {
    &introspection_linear[11],
    &introspection_linear[12],
    &introspection_linear[13],
    &introspection_linear[14],
    &introspection_linear[15],
    &introspection_linear[17],
    &introspection_linear[18],
    &introspection_linear[19],
    &introspection_linear[20],
    &introspection_linear[22],
    &introspection_linear[23],
    &introspection_linear[24],
    NULL
  };

  introspection_linear[2].Enum.values = f2;
  introspection_linear[3].Enum.values = f3;
  introspection_linear[5].Enum.values = f5;
  introspection_linear[10].Struct.fields = f10;
  introspection_linear[12].Enum.values = f2;
  introspection_linear[18].Enum.values = f3;
  introspection_linear[20].Enum.values = f5;
  introspection_linear[25].Struct.fields = f25;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_retouch_params_t * p = (dt_iop_retouch_params_t*)param;
  if(!strcmp(name, "rt_forms[0].formid"))
    return &(p->rt_forms[0].formid);
  else if(!strcmp(name, "rt_forms[0].scale"))
    return &(p->rt_forms[0].scale);
  else if(!strcmp(name, "rt_forms[0].algorithm"))
    return &(p->rt_forms[0].algorithm);
  else if(!strcmp(name, "rt_forms[0].blur_type"))
    return &(p->rt_forms[0].blur_type);
  else if(!strcmp(name, "rt_forms[0].blur_radius"))
    return &(p->rt_forms[0].blur_radius);
  else if(!strcmp(name, "rt_forms[0].fill_mode"))
    return &(p->rt_forms[0].fill_mode);
  else if(!strcmp(name, "rt_forms[0].fill_color[0]"))
    return &(p->rt_forms[0].fill_color[0]);
  else if(!strcmp(name, "rt_forms[0].fill_color"))
    return &(p->rt_forms[0].fill_color);
  else if(!strcmp(name, "rt_forms[0].fill_brightness"))
    return &(p->rt_forms[0].fill_brightness);
  else if(!strcmp(name, "rt_forms[0].distort_mode"))
    return &(p->rt_forms[0].distort_mode);
  else if(!strcmp(name, "rt_forms[0]"))
    return &(p->rt_forms[0]);
  else if(!strcmp(name, "rt_forms"))
    return &(p->rt_forms);
  else if(!strcmp(name, "algorithm"))
    return &(p->algorithm);
  else if(!strcmp(name, "num_scales"))
    return &(p->num_scales);
  else if(!strcmp(name, "curr_scale"))
    return &(p->curr_scale);
  else if(!strcmp(name, "merge_from_scale"))
    return &(p->merge_from_scale);
  else if(!strcmp(name, "preview_levels[0]"))
    return &(p->preview_levels[0]);
  else if(!strcmp(name, "preview_levels"))
    return &(p->preview_levels);
  else if(!strcmp(name, "blur_type"))
    return &(p->blur_type);
  else if(!strcmp(name, "blur_radius"))
    return &(p->blur_radius);
  else if(!strcmp(name, "fill_mode"))
    return &(p->fill_mode);
  else if(!strcmp(name, "fill_color[0]"))
    return &(p->fill_color[0]);
  else if(!strcmp(name, "fill_color"))
    return &(p->fill_color);
  else if(!strcmp(name, "fill_brightness"))
    return &(p->fill_brightness);
  else if(!strcmp(name, "max_heal_iter"))
    return &(p->max_heal_iter);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!strcmp(name, "rt_forms[0].formid"))
    return &(introspection_linear[0]);
  else if(!strcmp(name, "rt_forms[0].scale"))
    return &(introspection_linear[1]);
  else if(!strcmp(name, "rt_forms[0].algorithm"))
    return &(introspection_linear[2]);
  else if(!strcmp(name, "rt_forms[0].blur_type"))
    return &(introspection_linear[3]);
  else if(!strcmp(name, "rt_forms[0].blur_radius"))
    return &(introspection_linear[4]);
  else if(!strcmp(name, "rt_forms[0].fill_mode"))
    return &(introspection_linear[5]);
  else if(!strcmp(name, "rt_forms[0].fill_color[0]"))
    return &(introspection_linear[6]);
  else if(!strcmp(name, "rt_forms[0].fill_color"))
    return &(introspection_linear[7]);
  else if(!strcmp(name, "rt_forms[0].fill_brightness"))
    return &(introspection_linear[8]);
  else if(!strcmp(name, "rt_forms[0].distort_mode"))
    return &(introspection_linear[9]);
  else if(!strcmp(name, "rt_forms[0]"))
    return &(introspection_linear[10]);
  else if(!strcmp(name, "rt_forms"))
    return &(introspection_linear[11]);
  else if(!strcmp(name, "algorithm"))
    return &(introspection_linear[12]);
  else if(!strcmp(name, "num_scales"))
    return &(introspection_linear[13]);
  else if(!strcmp(name, "curr_scale"))
    return &(introspection_linear[14]);
  else if(!strcmp(name, "merge_from_scale"))
    return &(introspection_linear[15]);
  else if(!strcmp(name, "preview_levels[0]"))
    return &(introspection_linear[16]);
  else if(!strcmp(name, "preview_levels"))
    return &(introspection_linear[17]);
  else if(!strcmp(name, "blur_type"))
    return &(introspection_linear[18]);
  else if(!strcmp(name, "blur_radius"))
    return &(introspection_linear[19]);
  else if(!strcmp(name, "fill_mode"))
    return &(introspection_linear[20]);
  else if(!strcmp(name, "fill_color[0]"))
    return &(introspection_linear[21]);
  else if(!strcmp(name, "fill_color"))
    return &(introspection_linear[22]);
  else if(!strcmp(name, "fill_brightness"))
    return &(introspection_linear[23]);
  else if(!strcmp(name, "max_heal_iter"))
    return &(introspection_linear[24]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

