/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_ashift_params_t
 *     float
 *     rotation 
 *       default: 0.0
 *       range: -ROTATION_RANGE_SOFT .. ROTATION_RANGE_SOFT
 * 
 *     float
 *     lensshift_v 
 *       description: lens shift (vertical)
 *       default: 0.0
 *       range: -LENSSHIFT_RANGE_SOFT .. LENSSHIFT_RANGE_SOFT
 * 
 *     float
 *     lensshift_h 
 *       description: lens shift (horizontal)
 *       default: 0.0
 *       range: -LENSSHIFT_RANGE_SOFT .. LENSSHIFT_RANGE_SOFT
 * 
 *     float
 *     shear 
 *       description: shear
 *       default: 0.0
 *       range: -SHEAR_RANGE_SOFT .. SHEAR_RANGE_SOFT
 * 
 *     float
 *     f_length 
 *       description: focal length
 *       default: DEFAULT_F_LENGTH
 *       range: 1.0 .. 2000.0
 * 
 *     float
 *     crop_factor 
 *       description: crop factor
 *       default: 1.0
 *       range: 0.5 .. 10.0
 * 
 *     float
 *     orthocorr 
 *       description: lens dependence
 *       default: 100.0
 *       range: 0.0 .. 100.0
 * 
 *     float
 *     aspect 
 *       description: aspect adjust
 *       default: 1.0
 *       range: 0.5 .. 2.0
 * 
 *     enum dt_iop_ashift_mode_t
 *       ASHIFT_MODE_GENERIC : generic
 *       ASHIFT_MODE_SPECIFIC : specific
 *     mode 
 *       description: lens model
 *       default: ASHIFT_MODE_GENERIC
 * 
 *     enum dt_iop_ashift_crop_t
 *       ASHIFT_CROP_OFF : off
 *       ASHIFT_CROP_LARGEST : largest area
 *       ASHIFT_CROP_ASPECT : original format
 *     cropmode 
 *       description: automatic cropping
 *       default: ASHIFT_CROP_LARGEST
 * 
 *     float
 *     cl 
 *       default: 0.0
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     cr 
 *       default: 1.0
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     ct 
 *       default: 0.0
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     cb 
 *       default: 1.0
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     last_drawn_lines [MAX_SAVED_LINES * 4]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     int
 *     last_drawn_lines_count 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     float
 *     last_quad_lines [8]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 * dt_iop_ashift_params_t
 *
 */

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

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[20+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rotation", (char*)"rotation", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->rotation), G_STRUCT_OFFSET(dt_iop_ashift_params_t, rotation), NULL },
    /*Min*/ -ROTATION_RANGE_SOFT, /*Max*/ ROTATION_RANGE_SOFT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"lensshift_v", (char*)"lensshift_v", N_((char*)"lens shift (vertical)"), sizeof(((dt_iop_ashift_params_t*)NULL)->lensshift_v), G_STRUCT_OFFSET(dt_iop_ashift_params_t, lensshift_v), NULL },
    /*Min*/ -LENSSHIFT_RANGE_SOFT, /*Max*/ LENSSHIFT_RANGE_SOFT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"lensshift_h", (char*)"lensshift_h", N_((char*)"lens shift (horizontal)"), sizeof(((dt_iop_ashift_params_t*)NULL)->lensshift_h), G_STRUCT_OFFSET(dt_iop_ashift_params_t, lensshift_h), NULL },
    /*Min*/ -LENSSHIFT_RANGE_SOFT, /*Max*/ LENSSHIFT_RANGE_SOFT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"shear", (char*)"shear", N_((char*)"shear"), sizeof(((dt_iop_ashift_params_t*)NULL)->shear), G_STRUCT_OFFSET(dt_iop_ashift_params_t, shear), NULL },
    /*Min*/ -SHEAR_RANGE_SOFT, /*Max*/ SHEAR_RANGE_SOFT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"f_length", (char*)"f_length", N_((char*)"focal length"), sizeof(((dt_iop_ashift_params_t*)NULL)->f_length), G_STRUCT_OFFSET(dt_iop_ashift_params_t, f_length), NULL },
    /*Min*/ 1.0, /*Max*/ 2000.0, /*Default*/ DEFAULT_F_LENGTH
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"crop_factor", (char*)"crop_factor", N_((char*)"crop factor"), sizeof(((dt_iop_ashift_params_t*)NULL)->crop_factor), G_STRUCT_OFFSET(dt_iop_ashift_params_t, crop_factor), NULL },
    /*Min*/ 0.5, /*Max*/ 10.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"orthocorr", (char*)"orthocorr", N_((char*)"lens dependence"), sizeof(((dt_iop_ashift_params_t*)NULL)->orthocorr), G_STRUCT_OFFSET(dt_iop_ashift_params_t, orthocorr), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 100.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"aspect", (char*)"aspect", N_((char*)"aspect adjust"), sizeof(((dt_iop_ashift_params_t*)NULL)->aspect), G_STRUCT_OFFSET(dt_iop_ashift_params_t, aspect), NULL },
    /*Min*/ 0.5, /*Max*/ 2.0, /*Default*/ 1.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_ashift_mode_t", (char*)"mode", (char*)"mode", N_((char*)"lens model"), sizeof(((dt_iop_ashift_params_t*)NULL)->mode), G_STRUCT_OFFSET(dt_iop_ashift_params_t, mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ ASHIFT_MODE_GENERIC
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_ashift_crop_t", (char*)"cropmode", (char*)"cropmode", N_((char*)"automatic cropping"), sizeof(((dt_iop_ashift_params_t*)NULL)->cropmode), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cropmode), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ ASHIFT_CROP_LARGEST
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cl", (char*)"cl", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->cl), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cl), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cr", (char*)"cr", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->cr), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cr), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"ct", (char*)"ct", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->ct), G_STRUCT_OFFSET(dt_iop_ashift_params_t, ct), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cb", (char*)"cb", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->cb), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cb), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"last_drawn_lines[0]", (char*)"last_drawn_lines[0]", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines[0]), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_drawn_lines), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"last_drawn_lines", (char*)"last_drawn_lines", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_drawn_lines), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[14]
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"last_drawn_lines_count", (char*)"last_drawn_lines_count", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines_count), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_drawn_lines_count), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"last_quad_lines[0]", (char*)"last_quad_lines[0]", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_quad_lines[0]), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_quad_lines), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"last_quad_lines", (char*)"last_quad_lines", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_quad_lines), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_quad_lines), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_ashift_params_t*)NULL)->last_quad_lines), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[17]
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_ashift_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_ashift_params_t), 0, NULL },
    /*entries*/ 17, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  5,
  "dt_iop_ashift_params_t",
  sizeof(dt_iop_ashift_params_t),
  &introspection_linear[20-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*)"rotation", (char*)"rotation", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->rotation), G_STRUCT_OFFSET(dt_iop_ashift_params_t, rotation), NULL },
    /*Min*/ -ROTATION_RANGE_SOFT, /*Max*/ ROTATION_RANGE_SOFT, /*Default*/ 0.0
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"lensshift_v", (char*)"lensshift_v", N_((char*)"lens shift (vertical)"), sizeof(((dt_iop_ashift_params_t*)NULL)->lensshift_v), G_STRUCT_OFFSET(dt_iop_ashift_params_t, lensshift_v), NULL },
    /*Min*/ -LENSSHIFT_RANGE_SOFT, /*Max*/ LENSSHIFT_RANGE_SOFT, /*Default*/ 0.0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"lensshift_h", (char*)"lensshift_h", N_((char*)"lens shift (horizontal)"), sizeof(((dt_iop_ashift_params_t*)NULL)->lensshift_h), G_STRUCT_OFFSET(dt_iop_ashift_params_t, lensshift_h), NULL },
    /*Min*/ -LENSSHIFT_RANGE_SOFT, /*Max*/ LENSSHIFT_RANGE_SOFT, /*Default*/ 0.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"shear", (char*)"shear", N_((char*)"shear"), sizeof(((dt_iop_ashift_params_t*)NULL)->shear), G_STRUCT_OFFSET(dt_iop_ashift_params_t, shear), NULL },
    /*Min*/ -SHEAR_RANGE_SOFT, /*Max*/ SHEAR_RANGE_SOFT, /*Default*/ 0.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"f_length", (char*)"f_length", N_((char*)"focal length"), sizeof(((dt_iop_ashift_params_t*)NULL)->f_length), G_STRUCT_OFFSET(dt_iop_ashift_params_t, f_length), NULL },
    /*Min*/ 1.0, /*Max*/ 2000.0, /*Default*/ DEFAULT_F_LENGTH
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"crop_factor", (char*)"crop_factor", N_((char*)"crop factor"), sizeof(((dt_iop_ashift_params_t*)NULL)->crop_factor), G_STRUCT_OFFSET(dt_iop_ashift_params_t, crop_factor), NULL },
    /*Min*/ 0.5, /*Max*/ 10.0, /*Default*/ 1.0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"orthocorr", (char*)"orthocorr", N_((char*)"lens dependence"), sizeof(((dt_iop_ashift_params_t*)NULL)->orthocorr), G_STRUCT_OFFSET(dt_iop_ashift_params_t, orthocorr), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 100.0
  };
  introspection_linear[7].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"aspect", (char*)"aspect", N_((char*)"aspect adjust"), sizeof(((dt_iop_ashift_params_t*)NULL)->aspect), G_STRUCT_OFFSET(dt_iop_ashift_params_t, aspect), NULL },
    /*Min*/ 0.5, /*Max*/ 2.0, /*Default*/ 1.0
  };
  introspection_linear[8].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_ashift_mode_t", (char*)"mode", (char*)"mode", N_((char*)"lens model"), sizeof(((dt_iop_ashift_params_t*)NULL)->mode), G_STRUCT_OFFSET(dt_iop_ashift_params_t, mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ ASHIFT_MODE_GENERIC
  };
  introspection_linear[9].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_ashift_crop_t", (char*)"cropmode", (char*)"cropmode", N_((char*)"automatic cropping"), sizeof(((dt_iop_ashift_params_t*)NULL)->cropmode), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cropmode), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ ASHIFT_CROP_LARGEST
  };
  introspection_linear[10].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cl", (char*)"cl", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->cl), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cl), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[11].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cr", (char*)"cr", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->cr), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cr), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 1.0
  };
  introspection_linear[12].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"ct", (char*)"ct", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->ct), G_STRUCT_OFFSET(dt_iop_ashift_params_t, ct), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[13].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cb", (char*)"cb", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->cb), G_STRUCT_OFFSET(dt_iop_ashift_params_t, cb), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 1.0
  };
  introspection_linear[14].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"last_drawn_lines[0]", (char*)"last_drawn_lines[0]", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines[0]), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_drawn_lines), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[15].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"last_drawn_lines", (char*)"last_drawn_lines", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_drawn_lines), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[14]
  };
  introspection_linear[16].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"last_drawn_lines_count", (char*)"last_drawn_lines_count", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_drawn_lines_count), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_drawn_lines_count), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[17].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"last_quad_lines[0]", (char*)"last_quad_lines[0]", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_quad_lines[0]), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_quad_lines), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[18].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"last_quad_lines", (char*)"last_quad_lines", (char*)"", sizeof(((dt_iop_ashift_params_t*)NULL)->last_quad_lines), G_STRUCT_OFFSET(dt_iop_ashift_params_t, last_quad_lines), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_ashift_params_t*)NULL)->last_quad_lines), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[17]
  };
  introspection_linear[19].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_ashift_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_ashift_params_t), 0, NULL },
    /*entries*/ 17, /*fields*/ NULL
  };
  introspection_linear[20].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f8[] = { 
    { "ASHIFT_MODE_GENERIC", ASHIFT_MODE_GENERIC, N_((char*)"generic") },
    { "ASHIFT_MODE_SPECIFIC", ASHIFT_MODE_SPECIFIC, N_((char*)"specific") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f9[] = { 
    { "ASHIFT_CROP_OFF", ASHIFT_CROP_OFF, N_((char*)"off") },
    { "ASHIFT_CROP_LARGEST", ASHIFT_CROP_LARGEST, N_((char*)"largest area") },
    { "ASHIFT_CROP_ASPECT", ASHIFT_CROP_ASPECT, N_((char*)"original format") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f19[] = {
    &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[15],
    &introspection_linear[16],
    &introspection_linear[18],
    NULL
  };

  introspection_linear[8].Enum.values = f8;
  introspection_linear[9].Enum.values = f9;
  introspection_linear[19].Struct.fields = f19;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_ashift_params_t * p = (dt_iop_ashift_params_t*)param;
  if(!strcmp(name, "rotation"))
    return &(p->rotation);
  else if(!strcmp(name, "lensshift_v"))
    return &(p->lensshift_v);
  else if(!strcmp(name, "lensshift_h"))
    return &(p->lensshift_h);
  else if(!strcmp(name, "shear"))
    return &(p->shear);
  else if(!strcmp(name, "f_length"))
    return &(p->f_length);
  else if(!strcmp(name, "crop_factor"))
    return &(p->crop_factor);
  else if(!strcmp(name, "orthocorr"))
    return &(p->orthocorr);
  else if(!strcmp(name, "aspect"))
    return &(p->aspect);
  else if(!strcmp(name, "mode"))
    return &(p->mode);
  else if(!strcmp(name, "cropmode"))
    return &(p->cropmode);
  else if(!strcmp(name, "cl"))
    return &(p->cl);
  else if(!strcmp(name, "cr"))
    return &(p->cr);
  else if(!strcmp(name, "ct"))
    return &(p->ct);
  else if(!strcmp(name, "cb"))
    return &(p->cb);
  else if(!strcmp(name, "last_drawn_lines[0]"))
    return &(p->last_drawn_lines[0]);
  else if(!strcmp(name, "last_drawn_lines"))
    return &(p->last_drawn_lines);
  else if(!strcmp(name, "last_drawn_lines_count"))
    return &(p->last_drawn_lines_count);
  else if(!strcmp(name, "last_quad_lines[0]"))
    return &(p->last_quad_lines[0]);
  else if(!strcmp(name, "last_quad_lines"))
    return &(p->last_quad_lines);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "rotation"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "lensshift_v"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "lensshift_h"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "shear"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "f_length"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "crop_factor"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "orthocorr"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "aspect"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "mode"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "cropmode"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "cl"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "cr"))
    return &(introspection_linear[11]);
  else if(!g_ascii_strcasecmp(name, "ct"))
    return &(introspection_linear[12]);
  else if(!g_ascii_strcasecmp(name, "cb"))
    return &(introspection_linear[13]);
  else if(!g_ascii_strcasecmp(name, "last_drawn_lines[0]"))
    return &(introspection_linear[14]);
  else if(!g_ascii_strcasecmp(name, "last_drawn_lines"))
    return &(introspection_linear[15]);
  else if(!g_ascii_strcasecmp(name, "last_drawn_lines_count"))
    return &(introspection_linear[16]);
  else if(!g_ascii_strcasecmp(name, "last_quad_lines[0]"))
    return &(introspection_linear[17]);
  else if(!g_ascii_strcasecmp(name, "last_quad_lines"))
    return &(introspection_linear[18]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

