/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_highlights_params_t
 *     enum dt_iop_highlights_mode_t
 *       DT_IOP_HIGHLIGHTS_OPPOSED : inpaint opposed
 *       DT_IOP_HIGHLIGHTS_LCH : reconstruct in LCh
 *       DT_IOP_HIGHLIGHTS_CLIP : clip highlights
 *       DT_IOP_HIGHLIGHTS_SEGMENTS : segmentation based
 *       DT_IOP_HIGHLIGHTS_LAPLACIAN : guided laplacians
 *       DT_IOP_HIGHLIGHTS_INPAINT : reconstruct color
 *     mode 
 *       description: method
 *       default: DT_IOP_HIGHLIGHTS_OPPOSED
 * 
 *     float
 *     blendL 
 *       default: 1.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     blendC 
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     strength 
 *       description: strength
 *       default: 0.0
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     clip 
 *       description: clipping threshold
 *       default: 1.0
 *       range: 0.0 .. 2.0
 * 
 *     float
 *     noise_level 
 *       description: noise level
 *       default: 0.00
 *       range: 0. .. 0.5
 * 
 *     int
 *     iterations 
 *       description: iterations
 *       default: 30
 *       range: 1 .. 256
 * 
 *     enum dt_atrous_wavelets_scales_t
 *       WAVELETS_1_SCALE : 2 px
 *       WAVELETS_2_SCALE : 4 px
 *       WAVELETS_3_SCALE : 8 px
 *       WAVELETS_4_SCALE : 16 px
 *       WAVELETS_5_SCALE : 32 px
 *       WAVELETS_6_SCALE : 64 px
 *       WAVELETS_7_SCALE : 128 px (slow)
 *       WAVELETS_8_SCALE : 256 px (slow)
 *       WAVELETS_9_SCALE : 512 px (very slow)
 *       WAVELETS_10_SCALE : 1024 px (very slow)
 *       WAVELETS_11_SCALE : 2048 px (insanely slow)
 *       WAVELETS_12_SCALE : 4096 px (insanely slow)
 *     scales 
 *       description: diameter of reconstruction
 *       default: WAVELETS_7_SCALE
 * 
 *     float
 *     candidating 
 *       description: candidating
 *       default: 0.4
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     combine 
 *       description: combine
 *       default: 2.0
 *       range: 0.0 .. 8.0
 * 
 *     enum dt_recovery_mode_t
 *       DT_RECOVERY_MODE_OFF : off
 *       DT_RECOVERY_MODE_ADAPT : generic
 *       DT_RECOVERY_MODE_ADAPTF : flat generic
 *       DT_RECOVERY_MODE_SMALL : small segments
 *       DT_RECOVERY_MODE_LARGE : large segments
 *       DT_RECOVERY_MODE_SMALLF : flat small segments
 *       DT_RECOVERY_MODE_LARGEF : flat large segments
 *     recovery 
 *       description: rebuild
 *       default: DT_RECOVERY_MODE_OFF
 * 
 *     float
 *     solid_color 
 *       description: inpaint a flat color
 *       default: 0.0
 *       range: 0.0 .. 1.0
 * 
 * dt_iop_highlights_params_t
 *
 */

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

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[13+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_highlights_mode_t", (char*)"mode", (char*)"mode", N_((char*)"method"), sizeof(((dt_iop_highlights_params_t*)NULL)->mode), G_STRUCT_OFFSET(dt_iop_highlights_params_t, mode), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_IOP_HIGHLIGHTS_OPPOSED
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blendL", (char*)"blendL", (char*)"", sizeof(((dt_iop_highlights_params_t*)NULL)->blendL), G_STRUCT_OFFSET(dt_iop_highlights_params_t, blendL), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blendC", (char*)"blendC", (char*)"", sizeof(((dt_iop_highlights_params_t*)NULL)->blendC), G_STRUCT_OFFSET(dt_iop_highlights_params_t, blendC), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"strength", (char*)"strength", N_((char*)"strength"), sizeof(((dt_iop_highlights_params_t*)NULL)->strength), G_STRUCT_OFFSET(dt_iop_highlights_params_t, strength), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"clip", (char*)"clip", N_((char*)"clipping threshold"), sizeof(((dt_iop_highlights_params_t*)NULL)->clip), G_STRUCT_OFFSET(dt_iop_highlights_params_t, clip), NULL },
    /*Min*/ 0.0, /*Max*/ 2.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"noise_level", (char*)"noise_level", N_((char*)"noise level"), sizeof(((dt_iop_highlights_params_t*)NULL)->noise_level), G_STRUCT_OFFSET(dt_iop_highlights_params_t, noise_level), NULL },
    /*Min*/ 0., /*Max*/ 0.5, /*Default*/ 0.00
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"iterations", (char*)"iterations", N_((char*)"iterations"), sizeof(((dt_iop_highlights_params_t*)NULL)->iterations), G_STRUCT_OFFSET(dt_iop_highlights_params_t, iterations), NULL },
    /*Min*/ 1, /*Max*/ 256, /*Default*/ 30
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_atrous_wavelets_scales_t", (char*)"scales", (char*)"scales", N_((char*)"diameter of reconstruction"), sizeof(((dt_iop_highlights_params_t*)NULL)->scales), G_STRUCT_OFFSET(dt_iop_highlights_params_t, scales), NULL },
    /*entries*/ 12, /*values*/ NULL, /*Default*/ WAVELETS_7_SCALE
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"candidating", (char*)"candidating", N_((char*)"candidating"), sizeof(((dt_iop_highlights_params_t*)NULL)->candidating), G_STRUCT_OFFSET(dt_iop_highlights_params_t, candidating), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.4
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"combine", (char*)"combine", N_((char*)"combine"), sizeof(((dt_iop_highlights_params_t*)NULL)->combine), G_STRUCT_OFFSET(dt_iop_highlights_params_t, combine), NULL },
    /*Min*/ 0.0, /*Max*/ 8.0, /*Default*/ 2.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_recovery_mode_t", (char*)"recovery", (char*)"recovery", N_((char*)"rebuild"), sizeof(((dt_iop_highlights_params_t*)NULL)->recovery), G_STRUCT_OFFSET(dt_iop_highlights_params_t, recovery), NULL },
    /*entries*/ 7, /*values*/ NULL, /*Default*/ DT_RECOVERY_MODE_OFF
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"solid_color", (char*)"solid_color", N_((char*)"inpaint a flat color"), sizeof(((dt_iop_highlights_params_t*)NULL)->solid_color), G_STRUCT_OFFSET(dt_iop_highlights_params_t, solid_color), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_highlights_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_highlights_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,
  4,
  "dt_iop_highlights_params_t",
  sizeof(dt_iop_highlights_params_t),
  &introspection_linear[13-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_highlights_mode_t", (char*)"mode", (char*)"mode", N_((char*)"method"), sizeof(((dt_iop_highlights_params_t*)NULL)->mode), G_STRUCT_OFFSET(dt_iop_highlights_params_t, mode), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_IOP_HIGHLIGHTS_OPPOSED
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blendL", (char*)"blendL", (char*)"", sizeof(((dt_iop_highlights_params_t*)NULL)->blendL), G_STRUCT_OFFSET(dt_iop_highlights_params_t, blendL), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 1.0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"blendC", (char*)"blendC", (char*)"", sizeof(((dt_iop_highlights_params_t*)NULL)->blendC), G_STRUCT_OFFSET(dt_iop_highlights_params_t, blendC), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"strength", (char*)"strength", N_((char*)"strength"), sizeof(((dt_iop_highlights_params_t*)NULL)->strength), G_STRUCT_OFFSET(dt_iop_highlights_params_t, strength), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"clip", (char*)"clip", N_((char*)"clipping threshold"), sizeof(((dt_iop_highlights_params_t*)NULL)->clip), G_STRUCT_OFFSET(dt_iop_highlights_params_t, clip), NULL },
    /*Min*/ 0.0, /*Max*/ 2.0, /*Default*/ 1.0
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"noise_level", (char*)"noise_level", N_((char*)"noise level"), sizeof(((dt_iop_highlights_params_t*)NULL)->noise_level), G_STRUCT_OFFSET(dt_iop_highlights_params_t, noise_level), NULL },
    /*Min*/ 0., /*Max*/ 0.5, /*Default*/ 0.00
  };
  introspection_linear[6].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"iterations", (char*)"iterations", N_((char*)"iterations"), sizeof(((dt_iop_highlights_params_t*)NULL)->iterations), G_STRUCT_OFFSET(dt_iop_highlights_params_t, iterations), NULL },
    /*Min*/ 1, /*Max*/ 256, /*Default*/ 30
  };
  introspection_linear[7].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_atrous_wavelets_scales_t", (char*)"scales", (char*)"scales", N_((char*)"diameter of reconstruction"), sizeof(((dt_iop_highlights_params_t*)NULL)->scales), G_STRUCT_OFFSET(dt_iop_highlights_params_t, scales), NULL },
    /*entries*/ 12, /*values*/ NULL, /*Default*/ WAVELETS_7_SCALE
  };
  introspection_linear[8].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"candidating", (char*)"candidating", N_((char*)"candidating"), sizeof(((dt_iop_highlights_params_t*)NULL)->candidating), G_STRUCT_OFFSET(dt_iop_highlights_params_t, candidating), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.4
  };
  introspection_linear[9].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"combine", (char*)"combine", N_((char*)"combine"), sizeof(((dt_iop_highlights_params_t*)NULL)->combine), G_STRUCT_OFFSET(dt_iop_highlights_params_t, combine), NULL },
    /*Min*/ 0.0, /*Max*/ 8.0, /*Default*/ 2.0
  };
  introspection_linear[10].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_recovery_mode_t", (char*)"recovery", (char*)"recovery", N_((char*)"rebuild"), sizeof(((dt_iop_highlights_params_t*)NULL)->recovery), G_STRUCT_OFFSET(dt_iop_highlights_params_t, recovery), NULL },
    /*entries*/ 7, /*values*/ NULL, /*Default*/ DT_RECOVERY_MODE_OFF
  };
  introspection_linear[11].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"solid_color", (char*)"solid_color", N_((char*)"inpaint a flat color"), sizeof(((dt_iop_highlights_params_t*)NULL)->solid_color), G_STRUCT_OFFSET(dt_iop_highlights_params_t, solid_color), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[12].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_highlights_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_highlights_params_t), 0, NULL },
    /*entries*/ 12, /*fields*/ NULL
  };
  introspection_linear[13].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f0[] = { 
    { "DT_IOP_HIGHLIGHTS_OPPOSED", DT_IOP_HIGHLIGHTS_OPPOSED, N_((char*)"inpaint opposed") },
    { "DT_IOP_HIGHLIGHTS_LCH", DT_IOP_HIGHLIGHTS_LCH, N_((char*)"reconstruct in LCh") },
    { "DT_IOP_HIGHLIGHTS_CLIP", DT_IOP_HIGHLIGHTS_CLIP, N_((char*)"clip highlights") },
    { "DT_IOP_HIGHLIGHTS_SEGMENTS", DT_IOP_HIGHLIGHTS_SEGMENTS, N_((char*)"segmentation based") },
    { "DT_IOP_HIGHLIGHTS_LAPLACIAN", DT_IOP_HIGHLIGHTS_LAPLACIAN, N_((char*)"guided laplacians") },
    { "DT_IOP_HIGHLIGHTS_INPAINT", DT_IOP_HIGHLIGHTS_INPAINT, N_((char*)"reconstruct color") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f7[] = { 
    { "WAVELETS_1_SCALE", WAVELETS_1_SCALE, N_((char*)"2 px") },
    { "WAVELETS_2_SCALE", WAVELETS_2_SCALE, N_((char*)"4 px") },
    { "WAVELETS_3_SCALE", WAVELETS_3_SCALE, N_((char*)"8 px") },
    { "WAVELETS_4_SCALE", WAVELETS_4_SCALE, N_((char*)"16 px") },
    { "WAVELETS_5_SCALE", WAVELETS_5_SCALE, N_((char*)"32 px") },
    { "WAVELETS_6_SCALE", WAVELETS_6_SCALE, N_((char*)"64 px") },
    { "WAVELETS_7_SCALE", WAVELETS_7_SCALE, N_((char*)"128 px (slow)") },
    { "WAVELETS_8_SCALE", WAVELETS_8_SCALE, N_((char*)"256 px (slow)") },
    { "WAVELETS_9_SCALE", WAVELETS_9_SCALE, N_((char*)"512 px (very slow)") },
    { "WAVELETS_10_SCALE", WAVELETS_10_SCALE, N_((char*)"1024 px (very slow)") },
    { "WAVELETS_11_SCALE", WAVELETS_11_SCALE, N_((char*)"2048 px (insanely slow)") },
    { "WAVELETS_12_SCALE", WAVELETS_12_SCALE, N_((char*)"4096 px (insanely slow)") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f10[] = { 
    { "DT_RECOVERY_MODE_OFF", DT_RECOVERY_MODE_OFF, N_((char*)"off") },
    { "DT_RECOVERY_MODE_ADAPT", DT_RECOVERY_MODE_ADAPT, N_((char*)"generic") },
    { "DT_RECOVERY_MODE_ADAPTF", DT_RECOVERY_MODE_ADAPTF, N_((char*)"flat generic") },
    { "DT_RECOVERY_MODE_SMALL", DT_RECOVERY_MODE_SMALL, N_((char*)"small segments") },
    { "DT_RECOVERY_MODE_LARGE", DT_RECOVERY_MODE_LARGE, N_((char*)"large segments") },
    { "DT_RECOVERY_MODE_SMALLF", DT_RECOVERY_MODE_SMALLF, N_((char*)"flat small segments") },
    { "DT_RECOVERY_MODE_LARGEF", DT_RECOVERY_MODE_LARGEF, N_((char*)"flat large segments") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f12[] = {
    &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],
    NULL
  };

  introspection_linear[0].Enum.values = f0;
  introspection_linear[7].Enum.values = f7;
  introspection_linear[10].Enum.values = f10;
  introspection_linear[12].Struct.fields = f12;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_highlights_params_t * p = (dt_iop_highlights_params_t*)param;
  if(!strcmp(name, "mode"))
    return &(p->mode);
  else if(!strcmp(name, "blendL"))
    return &(p->blendL);
  else if(!strcmp(name, "blendC"))
    return &(p->blendC);
  else if(!strcmp(name, "strength"))
    return &(p->strength);
  else if(!strcmp(name, "clip"))
    return &(p->clip);
  else if(!strcmp(name, "noise_level"))
    return &(p->noise_level);
  else if(!strcmp(name, "iterations"))
    return &(p->iterations);
  else if(!strcmp(name, "scales"))
    return &(p->scales);
  else if(!strcmp(name, "candidating"))
    return &(p->candidating);
  else if(!strcmp(name, "combine"))
    return &(p->combine);
  else if(!strcmp(name, "recovery"))
    return &(p->recovery);
  else if(!strcmp(name, "solid_color"))
    return &(p->solid_color);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "mode"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "blendL"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "blendC"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "strength"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "clip"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "noise_level"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "iterations"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "scales"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "candidating"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "combine"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "recovery"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "solid_color"))
    return &(introspection_linear[11]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

