/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_lens_params_t
 *     enum dt_iop_lens_method_t
 *       DT_IOP_LENS_METHOD_EMBEDDED_METADATA : embedded metadata
 *       DT_IOP_LENS_METHOD_LENSFUN : Lensfun database
 *       DT_IOP_LENS_METHOD_ONLYVIGNETTE : only manual vignette
 *     method 
 *       description: correction method
 *       default: DT_IOP_LENS_METHOD_LENSFUN
 * 
 *     enum dt_iop_lens_modflag_t
 *       DT_IOP_LENS_MODFLAG_NONE : none
 *       DT_IOP_LENS_MODFLAG_ALL : all
 *       DT_IOP_LENS_MODFLAG_DIST_TCA : distortion & TCA
 *       DT_IOP_LENS_MODFLAG_DIST_VIGN : distortion & vignetting
 *       DT_IOP_LENS_MODFLAG_TCA_VIGN : TCA & vignetting
 *       DT_IOP_LENS_MODFLAG_DIST : only distortion
 *       DT_IOP_LENS_MODFLAG_TCA : only TCA
 *       DT_IOP_LENS_MODFLAG_VIGN : only vignetting
 *     modify_flags 
 *       description: corrections
 *       default: DT_IOP_LENS_MODFLAG_ALL
 * 
 *     enum dt_iop_lens_mode_t
 *       DT_IOP_LENS_MODE_CORRECT : correct
 *       DT_IOP_LENS_MODE_DISTORT : distort
 *     inverse 
 *       description: mode
 *       default: DT_IOP_LENS_MODE_CORRECT
 * 
 *     float
 *     scale 
 *       default: 1.0
 *       range: 0.1 .. 2.0
 * 
 *     float
 *     crop 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     focal 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     aperture 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     distance 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     enum dt_iop_lens_lenstype_t
 *       DT_IOP_LENS_LENSTYPE_UNKNOWN
 *       DT_IOP_LENS_LENSTYPE_RECTILINEAR : rectilinear
 *       DT_IOP_LENS_LENSTYPE_FISHEYE : fisheye
 *       DT_IOP_LENS_LENSTYPE_PANORAMIC : panoramic
 *       DT_IOP_LENS_LENSTYPE_EQUIRECTANGULAR : equirectangular
 *       DT_IOP_LENS_LENSTYPE_FISHEYE_ORTHOGRAPHIC : orthographic
 *       DT_IOP_LENS_LENSTYPE_FISHEYE_STEREOGRAPHIC : stereographic
 *       DT_IOP_LENS_LENSTYPE_FISHEYE_EQUISOLID : equisolid angle
 *       DT_IOP_LENS_LENSTYPE_FISHEYE_THOBY : Thoby fisheye
 *     target_geom 
 *       description: target geometry
 *       default: DT_IOP_LENS_LENSTYPE_RECTILINEAR
 * 
 *     char
 *     camera [128]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     char
 *     lens [128]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     boolean
 *     tca_override 
 *       description: TCA override
 *       default: FALSE
 * 
 *     float
 *     tca_r 
 *       description: TCA red
 *       default: 1.0
 *       range: 0.99 .. 1.01
 * 
 *     float
 *     tca_b 
 *       description: TCA blue
 *       default: 1.0
 *       range: 0.99 .. 1.01
 * 
 *     float
 *     cor_dist_ft 
 *       description: distortion
 *       default: 1
 *       range: 0 .. 2
 * 
 *     float
 *     cor_vig_ft 
 *       description: vignetting
 *       default: 1
 *       range: 0 .. 2
 * 
 *     float
 *     cor_ca_r_ft 
 *       description: TCA red
 *       default: 1
 *       range: 0 .. 2
 * 
 *     float
 *     cor_ca_b_ft 
 *       description: TCA blue
 *       default: 1
 *       range: 0 .. 2
 * 
 *     float
 *     scale_md_v1 
 *       description: scale fine-tune
 *       default: 1
 *       range: 0.9 .. 1.1
 * 
 *     enum dt_iop_lens_embedded_metadata_version
 *       DT_IOP_LENS_EMBEDDED_METADATA_VERSION_1
 *       DT_IOP_LENS_EMBEDDED_METADATA_VERSION_2
 *     md_version 
 *       default: 0
 * 
 *     float
 *     scale_md 
 *       description: image scale
 *       default: 1
 *       range: 0.1 .. 2.0
 * 
 *     boolean
 *     has_been_set 
 *       default: FALSE
 * 
 *     float
 *     v_strength 
 *       description: strength
 *       default: 0.0
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     v_radius 
 *       description: radius
 *       default: 0.5
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     v_steepness 
 *       description: steepness
 *       default: 0.5
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     reserved [2]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 * dt_iop_lens_params_t
 *
 */

#include "/build/darktable/src/darktable-5.6.0/src/iop/lens.cc"

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[30+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_method_t", (char*)"method", (char*)"method", N_((char*)"correction method"), sizeof(((dt_iop_lens_params_t*)NULL)->method), G_STRUCT_OFFSET(dt_iop_lens_params_t, method), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_IOP_LENS_METHOD_LENSFUN
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_modflag_t", (char*)"modify_flags", (char*)"modify_flags", N_((char*)"corrections"), sizeof(((dt_iop_lens_params_t*)NULL)->modify_flags), G_STRUCT_OFFSET(dt_iop_lens_params_t, modify_flags), NULL },
    /*entries*/ 8, /*values*/ NULL, /*Default*/ DT_IOP_LENS_MODFLAG_ALL
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_mode_t", (char*)"inverse", (char*)"inverse", N_((char*)"mode"), sizeof(((dt_iop_lens_params_t*)NULL)->inverse), G_STRUCT_OFFSET(dt_iop_lens_params_t, inverse), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_IOP_LENS_MODE_CORRECT
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale", (char*)"scale", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->scale), G_STRUCT_OFFSET(dt_iop_lens_params_t, scale), NULL },
    /*Min*/ 0.1, /*Max*/ 2.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"crop", (char*)"crop", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->crop), G_STRUCT_OFFSET(dt_iop_lens_params_t, crop), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"focal", (char*)"focal", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->focal), G_STRUCT_OFFSET(dt_iop_lens_params_t, focal), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"aperture", (char*)"aperture", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->aperture), G_STRUCT_OFFSET(dt_iop_lens_params_t, aperture), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"distance", (char*)"distance", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->distance), G_STRUCT_OFFSET(dt_iop_lens_params_t, distance), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_lenstype_t", (char*)"target_geom", (char*)"target_geom", N_((char*)"target geometry"), sizeof(((dt_iop_lens_params_t*)NULL)->target_geom), G_STRUCT_OFFSET(dt_iop_lens_params_t, target_geom), NULL },
    /*entries*/ 9, /*values*/ NULL, /*Default*/ DT_IOP_LENS_LENSTYPE_RECTILINEAR
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"camera[0]", (char*)"camera[0]", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->camera[0]), G_STRUCT_OFFSET(dt_iop_lens_params_t, camera), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"camera", (char*)"camera", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->camera), G_STRUCT_OFFSET(dt_iop_lens_params_t, camera), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lens_params_t*)NULL)->camera), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[9]
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"lens[0]", (char*)"lens[0]", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->lens[0]), G_STRUCT_OFFSET(dt_iop_lens_params_t, lens), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"lens", (char*)"lens", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->lens), G_STRUCT_OFFSET(dt_iop_lens_params_t, lens), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lens_params_t*)NULL)->lens), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[11]
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"tca_override", (char*)"tca_override", N_((char*)"TCA override"), sizeof(((dt_iop_lens_params_t*)NULL)->tca_override), G_STRUCT_OFFSET(dt_iop_lens_params_t, tca_override), NULL },
    /*Default*/ FALSE
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_r", (char*)"tca_r", N_((char*)"TCA red"), sizeof(((dt_iop_lens_params_t*)NULL)->tca_r), G_STRUCT_OFFSET(dt_iop_lens_params_t, tca_r), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_b", (char*)"tca_b", N_((char*)"TCA blue"), sizeof(((dt_iop_lens_params_t*)NULL)->tca_b), G_STRUCT_OFFSET(dt_iop_lens_params_t, tca_b), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_dist_ft", (char*)"cor_dist_ft", N_((char*)"distortion"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_dist_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_dist_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_vig_ft", (char*)"cor_vig_ft", N_((char*)"vignetting"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_vig_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_vig_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_ca_r_ft", (char*)"cor_ca_r_ft", N_((char*)"TCA red"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_ca_r_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_ca_r_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_ca_b_ft", (char*)"cor_ca_b_ft", N_((char*)"TCA blue"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_ca_b_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_ca_b_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale_md_v1", (char*)"scale_md_v1", N_((char*)"scale fine-tune"), sizeof(((dt_iop_lens_params_t*)NULL)->scale_md_v1), G_STRUCT_OFFSET(dt_iop_lens_params_t, scale_md_v1), NULL },
    /*Min*/ 0.9, /*Max*/ 1.1, /*Default*/ 1
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_embedded_metadata_version", (char*)"md_version", (char*)"md_version", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->md_version), G_STRUCT_OFFSET(dt_iop_lens_params_t, md_version), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale_md", (char*)"scale_md", N_((char*)"image scale"), sizeof(((dt_iop_lens_params_t*)NULL)->scale_md), G_STRUCT_OFFSET(dt_iop_lens_params_t, scale_md), NULL },
    /*Min*/ 0.1, /*Max*/ 2.0, /*Default*/ 1
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"has_been_set", (char*)"has_been_set", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->has_been_set), G_STRUCT_OFFSET(dt_iop_lens_params_t, has_been_set), NULL },
    /*Default*/ FALSE
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"v_strength", (char*)"v_strength", N_((char*)"strength"), sizeof(((dt_iop_lens_params_t*)NULL)->v_strength), G_STRUCT_OFFSET(dt_iop_lens_params_t, v_strength), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"v_radius", (char*)"v_radius", N_((char*)"radius"), sizeof(((dt_iop_lens_params_t*)NULL)->v_radius), G_STRUCT_OFFSET(dt_iop_lens_params_t, v_radius), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.5
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"v_steepness", (char*)"v_steepness", N_((char*)"steepness"), sizeof(((dt_iop_lens_params_t*)NULL)->v_steepness), G_STRUCT_OFFSET(dt_iop_lens_params_t, v_steepness), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.5
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reserved[0]", (char*)"reserved[0]", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->reserved[0]), G_STRUCT_OFFSET(dt_iop_lens_params_t, reserved), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"reserved", (char*)"reserved", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->reserved), G_STRUCT_OFFSET(dt_iop_lens_params_t, reserved), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lens_params_t*)NULL)->reserved), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[27]
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_lens_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_lens_params_t), 0, NULL },
    /*entries*/ 26, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  10,
  "dt_iop_lens_params_t",
  sizeof(dt_iop_lens_params_t),
  &introspection_linear[30-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_lens_method_t", (char*)"method", (char*)"method", N_((char*)"correction method"), sizeof(((dt_iop_lens_params_t*)NULL)->method), G_STRUCT_OFFSET(dt_iop_lens_params_t, method), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_IOP_LENS_METHOD_LENSFUN
  };
  introspection_linear[1].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_modflag_t", (char*)"modify_flags", (char*)"modify_flags", N_((char*)"corrections"), sizeof(((dt_iop_lens_params_t*)NULL)->modify_flags), G_STRUCT_OFFSET(dt_iop_lens_params_t, modify_flags), NULL },
    /*entries*/ 8, /*values*/ NULL, /*Default*/ DT_IOP_LENS_MODFLAG_ALL
  };
  introspection_linear[2].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_mode_t", (char*)"inverse", (char*)"inverse", N_((char*)"mode"), sizeof(((dt_iop_lens_params_t*)NULL)->inverse), G_STRUCT_OFFSET(dt_iop_lens_params_t, inverse), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_IOP_LENS_MODE_CORRECT
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale", (char*)"scale", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->scale), G_STRUCT_OFFSET(dt_iop_lens_params_t, scale), NULL },
    /*Min*/ 0.1, /*Max*/ 2.0, /*Default*/ 1.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"crop", (char*)"crop", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->crop), G_STRUCT_OFFSET(dt_iop_lens_params_t, crop), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"focal", (char*)"focal", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->focal), G_STRUCT_OFFSET(dt_iop_lens_params_t, focal), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"aperture", (char*)"aperture", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->aperture), G_STRUCT_OFFSET(dt_iop_lens_params_t, aperture), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[7].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"distance", (char*)"distance", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->distance), G_STRUCT_OFFSET(dt_iop_lens_params_t, distance), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[8].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_lenstype_t", (char*)"target_geom", (char*)"target_geom", N_((char*)"target geometry"), sizeof(((dt_iop_lens_params_t*)NULL)->target_geom), G_STRUCT_OFFSET(dt_iop_lens_params_t, target_geom), NULL },
    /*entries*/ 9, /*values*/ NULL, /*Default*/ DT_IOP_LENS_LENSTYPE_RECTILINEAR
  };
  introspection_linear[9].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"camera[0]", (char*)"camera[0]", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->camera[0]), G_STRUCT_OFFSET(dt_iop_lens_params_t, camera), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[10].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"camera", (char*)"camera", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->camera), G_STRUCT_OFFSET(dt_iop_lens_params_t, camera), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lens_params_t*)NULL)->camera), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[9]
  };
  introspection_linear[11].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"lens[0]", (char*)"lens[0]", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->lens[0]), G_STRUCT_OFFSET(dt_iop_lens_params_t, lens), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[12].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"lens", (char*)"lens", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->lens), G_STRUCT_OFFSET(dt_iop_lens_params_t, lens), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lens_params_t*)NULL)->lens), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[11]
  };
  introspection_linear[13].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"tca_override", (char*)"tca_override", N_((char*)"TCA override"), sizeof(((dt_iop_lens_params_t*)NULL)->tca_override), G_STRUCT_OFFSET(dt_iop_lens_params_t, tca_override), NULL },
    /*Default*/ FALSE
  };
  introspection_linear[14].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_r", (char*)"tca_r", N_((char*)"TCA red"), sizeof(((dt_iop_lens_params_t*)NULL)->tca_r), G_STRUCT_OFFSET(dt_iop_lens_params_t, tca_r), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  };
  introspection_linear[15].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"tca_b", (char*)"tca_b", N_((char*)"TCA blue"), sizeof(((dt_iop_lens_params_t*)NULL)->tca_b), G_STRUCT_OFFSET(dt_iop_lens_params_t, tca_b), NULL },
    /*Min*/ 0.99, /*Max*/ 1.01, /*Default*/ 1.0
  };
  introspection_linear[16].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_dist_ft", (char*)"cor_dist_ft", N_((char*)"distortion"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_dist_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_dist_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  };
  introspection_linear[17].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_vig_ft", (char*)"cor_vig_ft", N_((char*)"vignetting"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_vig_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_vig_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  };
  introspection_linear[18].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_ca_r_ft", (char*)"cor_ca_r_ft", N_((char*)"TCA red"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_ca_r_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_ca_r_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  };
  introspection_linear[19].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cor_ca_b_ft", (char*)"cor_ca_b_ft", N_((char*)"TCA blue"), sizeof(((dt_iop_lens_params_t*)NULL)->cor_ca_b_ft), G_STRUCT_OFFSET(dt_iop_lens_params_t, cor_ca_b_ft), NULL },
    /*Min*/ 0, /*Max*/ 2, /*Default*/ 1
  };
  introspection_linear[20].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale_md_v1", (char*)"scale_md_v1", N_((char*)"scale fine-tune"), sizeof(((dt_iop_lens_params_t*)NULL)->scale_md_v1), G_STRUCT_OFFSET(dt_iop_lens_params_t, scale_md_v1), NULL },
    /*Min*/ 0.9, /*Max*/ 1.1, /*Default*/ 1
  };
  introspection_linear[21].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lens_embedded_metadata_version", (char*)"md_version", (char*)"md_version", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->md_version), G_STRUCT_OFFSET(dt_iop_lens_params_t, md_version), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ 0
  };
  introspection_linear[22].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale_md", (char*)"scale_md", N_((char*)"image scale"), sizeof(((dt_iop_lens_params_t*)NULL)->scale_md), G_STRUCT_OFFSET(dt_iop_lens_params_t, scale_md), NULL },
    /*Min*/ 0.1, /*Max*/ 2.0, /*Default*/ 1
  };
  introspection_linear[23].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"has_been_set", (char*)"has_been_set", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->has_been_set), G_STRUCT_OFFSET(dt_iop_lens_params_t, has_been_set), NULL },
    /*Default*/ FALSE
  };
  introspection_linear[24].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"v_strength", (char*)"v_strength", N_((char*)"strength"), sizeof(((dt_iop_lens_params_t*)NULL)->v_strength), G_STRUCT_OFFSET(dt_iop_lens_params_t, v_strength), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[25].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"v_radius", (char*)"v_radius", N_((char*)"radius"), sizeof(((dt_iop_lens_params_t*)NULL)->v_radius), G_STRUCT_OFFSET(dt_iop_lens_params_t, v_radius), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.5
  };
  introspection_linear[26].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"v_steepness", (char*)"v_steepness", N_((char*)"steepness"), sizeof(((dt_iop_lens_params_t*)NULL)->v_steepness), G_STRUCT_OFFSET(dt_iop_lens_params_t, v_steepness), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.5
  };
  introspection_linear[27].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reserved[0]", (char*)"reserved[0]", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->reserved[0]), G_STRUCT_OFFSET(dt_iop_lens_params_t, reserved), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[28].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"reserved", (char*)"reserved", (char*)"", sizeof(((dt_iop_lens_params_t*)NULL)->reserved), G_STRUCT_OFFSET(dt_iop_lens_params_t, reserved), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lens_params_t*)NULL)->reserved), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[27]
  };
  introspection_linear[29].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_lens_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_lens_params_t), 0, NULL },
    /*entries*/ 26, /*fields*/ NULL
  };
  introspection_linear[30].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f0[] = { 
    { "DT_IOP_LENS_METHOD_EMBEDDED_METADATA", DT_IOP_LENS_METHOD_EMBEDDED_METADATA, N_((char*)"embedded metadata") },
    { "DT_IOP_LENS_METHOD_LENSFUN", DT_IOP_LENS_METHOD_LENSFUN, N_((char*)"Lensfun database") },
    { "DT_IOP_LENS_METHOD_ONLYVIGNETTE", DT_IOP_LENS_METHOD_ONLYVIGNETTE, N_((char*)"only manual vignette") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f1[] = { 
    { "DT_IOP_LENS_MODFLAG_NONE", DT_IOP_LENS_MODFLAG_NONE, N_((char*)"none") },
    { "DT_IOP_LENS_MODFLAG_ALL", DT_IOP_LENS_MODFLAG_ALL, N_((char*)"all") },
    { "DT_IOP_LENS_MODFLAG_DIST_TCA", DT_IOP_LENS_MODFLAG_DIST_TCA, N_((char*)"distortion & TCA") },
    { "DT_IOP_LENS_MODFLAG_DIST_VIGN", DT_IOP_LENS_MODFLAG_DIST_VIGN, N_((char*)"distortion & vignetting") },
    { "DT_IOP_LENS_MODFLAG_TCA_VIGN", DT_IOP_LENS_MODFLAG_TCA_VIGN, N_((char*)"TCA & vignetting") },
    { "DT_IOP_LENS_MODFLAG_DIST", DT_IOP_LENS_MODFLAG_DIST, N_((char*)"only distortion") },
    { "DT_IOP_LENS_MODFLAG_TCA", DT_IOP_LENS_MODFLAG_TCA, N_((char*)"only TCA") },
    { "DT_IOP_LENS_MODFLAG_VIGN", DT_IOP_LENS_MODFLAG_VIGN, N_((char*)"only vignetting") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f2[] = { 
    { "DT_IOP_LENS_MODE_CORRECT", DT_IOP_LENS_MODE_CORRECT, N_((char*)"correct") },
    { "DT_IOP_LENS_MODE_DISTORT", DT_IOP_LENS_MODE_DISTORT, N_((char*)"distort") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f8[] = { 
    { "DT_IOP_LENS_LENSTYPE_UNKNOWN", DT_IOP_LENS_LENSTYPE_UNKNOWN, (char*)"" },
    { "DT_IOP_LENS_LENSTYPE_RECTILINEAR", DT_IOP_LENS_LENSTYPE_RECTILINEAR, N_((char*)"rectilinear") },
    { "DT_IOP_LENS_LENSTYPE_FISHEYE", DT_IOP_LENS_LENSTYPE_FISHEYE, N_((char*)"fisheye") },
    { "DT_IOP_LENS_LENSTYPE_PANORAMIC", DT_IOP_LENS_LENSTYPE_PANORAMIC, N_((char*)"panoramic") },
    { "DT_IOP_LENS_LENSTYPE_EQUIRECTANGULAR", DT_IOP_LENS_LENSTYPE_EQUIRECTANGULAR, N_((char*)"equirectangular") },
    { "DT_IOP_LENS_LENSTYPE_FISHEYE_ORTHOGRAPHIC", DT_IOP_LENS_LENSTYPE_FISHEYE_ORTHOGRAPHIC, N_((char*)"orthographic") },
    { "DT_IOP_LENS_LENSTYPE_FISHEYE_STEREOGRAPHIC", DT_IOP_LENS_LENSTYPE_FISHEYE_STEREOGRAPHIC, N_((char*)"stereographic") },
    { "DT_IOP_LENS_LENSTYPE_FISHEYE_EQUISOLID", DT_IOP_LENS_LENSTYPE_FISHEYE_EQUISOLID, N_((char*)"equisolid angle") },
    { "DT_IOP_LENS_LENSTYPE_FISHEYE_THOBY", DT_IOP_LENS_LENSTYPE_FISHEYE_THOBY, N_((char*)"Thoby fisheye") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f21[] = { 
    { "DT_IOP_LENS_EMBEDDED_METADATA_VERSION_1", DT_IOP_LENS_EMBEDDED_METADATA_VERSION_1, (char*)"" },
    { "DT_IOP_LENS_EMBEDDED_METADATA_VERSION_2", DT_IOP_LENS_EMBEDDED_METADATA_VERSION_2, (char*)"" },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f29[] = {
    &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[10],
    &introspection_linear[12],
    &introspection_linear[13],
    &introspection_linear[14],
    &introspection_linear[15],
    &introspection_linear[16],
    &introspection_linear[17],
    &introspection_linear[18],
    &introspection_linear[19],
    &introspection_linear[20],
    &introspection_linear[21],
    &introspection_linear[22],
    &introspection_linear[23],
    &introspection_linear[24],
    &introspection_linear[25],
    &introspection_linear[26],
    &introspection_linear[28],
    NULL
  };

  introspection_linear[0].Enum.values = f0;
  introspection_linear[1].Enum.values = f1;
  introspection_linear[2].Enum.values = f2;
  introspection_linear[8].Enum.values = f8;
  introspection_linear[21].Enum.values = f21;
  introspection_linear[29].Struct.fields = f29;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_lens_params_t * p = (dt_iop_lens_params_t*)param;
  if(!strcmp(name, "method"))
    return &(p->method);
  else if(!strcmp(name, "modify_flags"))
    return &(p->modify_flags);
  else if(!strcmp(name, "inverse"))
    return &(p->inverse);
  else if(!strcmp(name, "scale"))
    return &(p->scale);
  else if(!strcmp(name, "crop"))
    return &(p->crop);
  else if(!strcmp(name, "focal"))
    return &(p->focal);
  else if(!strcmp(name, "aperture"))
    return &(p->aperture);
  else if(!strcmp(name, "distance"))
    return &(p->distance);
  else if(!strcmp(name, "target_geom"))
    return &(p->target_geom);
  else if(!strcmp(name, "camera[0]"))
    return &(p->camera[0]);
  else if(!strcmp(name, "camera"))
    return &(p->camera);
  else if(!strcmp(name, "lens[0]"))
    return &(p->lens[0]);
  else if(!strcmp(name, "lens"))
    return &(p->lens);
  else if(!strcmp(name, "tca_override"))
    return &(p->tca_override);
  else if(!strcmp(name, "tca_r"))
    return &(p->tca_r);
  else if(!strcmp(name, "tca_b"))
    return &(p->tca_b);
  else if(!strcmp(name, "cor_dist_ft"))
    return &(p->cor_dist_ft);
  else if(!strcmp(name, "cor_vig_ft"))
    return &(p->cor_vig_ft);
  else if(!strcmp(name, "cor_ca_r_ft"))
    return &(p->cor_ca_r_ft);
  else if(!strcmp(name, "cor_ca_b_ft"))
    return &(p->cor_ca_b_ft);
  else if(!strcmp(name, "scale_md_v1"))
    return &(p->scale_md_v1);
  else if(!strcmp(name, "md_version"))
    return &(p->md_version);
  else if(!strcmp(name, "scale_md"))
    return &(p->scale_md);
  else if(!strcmp(name, "has_been_set"))
    return &(p->has_been_set);
  else if(!strcmp(name, "v_strength"))
    return &(p->v_strength);
  else if(!strcmp(name, "v_radius"))
    return &(p->v_radius);
  else if(!strcmp(name, "v_steepness"))
    return &(p->v_steepness);
  else if(!strcmp(name, "reserved[0]"))
    return &(p->reserved[0]);
  else if(!strcmp(name, "reserved"))
    return &(p->reserved);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "method"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "modify_flags"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "inverse"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "scale"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "crop"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "focal"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "aperture"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "distance"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "target_geom"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "camera[0]"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "camera"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "lens[0]"))
    return &(introspection_linear[11]);
  else if(!g_ascii_strcasecmp(name, "lens"))
    return &(introspection_linear[12]);
  else if(!g_ascii_strcasecmp(name, "tca_override"))
    return &(introspection_linear[13]);
  else if(!g_ascii_strcasecmp(name, "tca_r"))
    return &(introspection_linear[14]);
  else if(!g_ascii_strcasecmp(name, "tca_b"))
    return &(introspection_linear[15]);
  else if(!g_ascii_strcasecmp(name, "cor_dist_ft"))
    return &(introspection_linear[16]);
  else if(!g_ascii_strcasecmp(name, "cor_vig_ft"))
    return &(introspection_linear[17]);
  else if(!g_ascii_strcasecmp(name, "cor_ca_r_ft"))
    return &(introspection_linear[18]);
  else if(!g_ascii_strcasecmp(name, "cor_ca_b_ft"))
    return &(introspection_linear[19]);
  else if(!g_ascii_strcasecmp(name, "scale_md_v1"))
    return &(introspection_linear[20]);
  else if(!g_ascii_strcasecmp(name, "md_version"))
    return &(introspection_linear[21]);
  else if(!g_ascii_strcasecmp(name, "scale_md"))
    return &(introspection_linear[22]);
  else if(!g_ascii_strcasecmp(name, "has_been_set"))
    return &(introspection_linear[23]);
  else if(!g_ascii_strcasecmp(name, "v_strength"))
    return &(introspection_linear[24]);
  else if(!g_ascii_strcasecmp(name, "v_radius"))
    return &(introspection_linear[25]);
  else if(!g_ascii_strcasecmp(name, "v_steepness"))
    return &(introspection_linear[26]);
  else if(!g_ascii_strcasecmp(name, "reserved[0]"))
    return &(introspection_linear[27]);
  else if(!g_ascii_strcasecmp(name, "reserved"))
    return &(introspection_linear[28]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

