/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_colorin_params_t
 *     enum dt_colorspaces_color_profile_type_t
 *       DT_COLORSPACE_NONE
 *       DT_COLORSPACE_FILE
 *       DT_COLORSPACE_SRGB
 *       DT_COLORSPACE_ADOBERGB
 *       DT_COLORSPACE_LIN_REC709
 *       DT_COLORSPACE_LIN_REC2020
 *       DT_COLORSPACE_XYZ
 *       DT_COLORSPACE_LAB
 *       DT_COLORSPACE_INFRARED
 *       DT_COLORSPACE_DISPLAY
 *       DT_COLORSPACE_EMBEDDED_ICC
 *       DT_COLORSPACE_EMBEDDED_MATRIX
 *       DT_COLORSPACE_STANDARD_MATRIX
 *       DT_COLORSPACE_ENHANCED_MATRIX
 *       DT_COLORSPACE_VENDOR_MATRIX
 *       DT_COLORSPACE_ALTERNATE_MATRIX
 *       DT_COLORSPACE_BRG
 *       DT_COLORSPACE_EXPORT
 *       DT_COLORSPACE_SOFTPROOF
 *       DT_COLORSPACE_WORK
 *       DT_COLORSPACE_DISPLAY2
 *       DT_COLORSPACE_REC709
 *       DT_COLORSPACE_PROPHOTO_RGB
 *       DT_COLORSPACE_PQ_REC2020
 *       DT_COLORSPACE_HLG_REC2020
 *       DT_COLORSPACE_PQ_P3
 *       DT_COLORSPACE_HLG_P3
 *       DT_COLORSPACE_LAST
 *     type 
 *       default: DT_COLORSPACE_ENHANCED_MATRIX
 * 
 *     char
 *     filename [DT_IOP_COLOR_ICC_LEN]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     enum dt_iop_color_intent_t
 *       DT_INTENT_PERCEPTUAL
 *       DT_INTENT_RELATIVE_COLORIMETRIC
 *       DT_INTENT_SATURATION
 *       DT_INTENT_ABSOLUTE_COLORIMETRIC
 *       DT_INTENT_LAST
 *     intent 
 *       default: DT_INTENT_PERCEPTUAL
 * 
 *     enum dt_iop_color_normalize_t
 *       DT_NORMALIZE_OFF : off
 *       DT_NORMALIZE_SRGB : sRGB
 *       DT_NORMALIZE_ADOBE_RGB : Adobe RGB (compatible)
 *       DT_NORMALIZE_LINEAR_REC709_RGB : linear Rec709 RGB
 *       DT_NORMALIZE_LINEAR_REC2020_RGB : linear Rec2020 RGB
 *     normalize 
 *       description: gamut clipping
 *       default: DT_NORMALIZE_OFF
 * 
 *     int
 *     blue_mapping 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     enum dt_colorspaces_color_profile_type_t
 *       DT_COLORSPACE_NONE
 *       DT_COLORSPACE_FILE
 *       DT_COLORSPACE_SRGB
 *       DT_COLORSPACE_ADOBERGB
 *       DT_COLORSPACE_LIN_REC709
 *       DT_COLORSPACE_LIN_REC2020
 *       DT_COLORSPACE_XYZ
 *       DT_COLORSPACE_LAB
 *       DT_COLORSPACE_INFRARED
 *       DT_COLORSPACE_DISPLAY
 *       DT_COLORSPACE_EMBEDDED_ICC
 *       DT_COLORSPACE_EMBEDDED_MATRIX
 *       DT_COLORSPACE_STANDARD_MATRIX
 *       DT_COLORSPACE_ENHANCED_MATRIX
 *       DT_COLORSPACE_VENDOR_MATRIX
 *       DT_COLORSPACE_ALTERNATE_MATRIX
 *       DT_COLORSPACE_BRG
 *       DT_COLORSPACE_EXPORT
 *       DT_COLORSPACE_SOFTPROOF
 *       DT_COLORSPACE_WORK
 *       DT_COLORSPACE_DISPLAY2
 *       DT_COLORSPACE_REC709
 *       DT_COLORSPACE_PROPHOTO_RGB
 *       DT_COLORSPACE_PQ_REC2020
 *       DT_COLORSPACE_HLG_REC2020
 *       DT_COLORSPACE_PQ_P3
 *       DT_COLORSPACE_HLG_P3
 *       DT_COLORSPACE_LAST
 *     type_work 
 *       default: DT_COLORSPACE_LIN_REC2020
 * 
 *     char
 *     filename_work [DT_IOP_COLOR_ICC_LEN]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 * dt_iop_colorin_params_t
 *
 */

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

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[10+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_colorspaces_color_profile_type_t", (char*)"type", (char*)"type", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->type), G_STRUCT_OFFSET(dt_iop_colorin_params_t, type), NULL },
    /*entries*/ 28, /*values*/ NULL, /*Default*/ DT_COLORSPACE_ENHANCED_MATRIX
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filename[0]", (char*)"filename[0]", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename[0]), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"filename", (char*)"filename", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colorin_params_t*)NULL)->filename), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[1]
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_color_intent_t", (char*)"intent", (char*)"intent", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->intent), G_STRUCT_OFFSET(dt_iop_colorin_params_t, intent), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_INTENT_PERCEPTUAL
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_color_normalize_t", (char*)"normalize", (char*)"normalize", N_((char*)"gamut clipping"), sizeof(((dt_iop_colorin_params_t*)NULL)->normalize), G_STRUCT_OFFSET(dt_iop_colorin_params_t, normalize), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_NORMALIZE_OFF
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"blue_mapping", (char*)"blue_mapping", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->blue_mapping), G_STRUCT_OFFSET(dt_iop_colorin_params_t, blue_mapping), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_colorspaces_color_profile_type_t", (char*)"type_work", (char*)"type_work", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->type_work), G_STRUCT_OFFSET(dt_iop_colorin_params_t, type_work), NULL },
    /*entries*/ 28, /*values*/ NULL, /*Default*/ DT_COLORSPACE_LIN_REC2020
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filename_work[0]", (char*)"filename_work[0]", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename_work[0]), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename_work), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"filename_work", (char*)"filename_work", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename_work), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename_work), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colorin_params_t*)NULL)->filename_work), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[7]
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_colorin_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_colorin_params_t), 0, NULL },
    /*entries*/ 7, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  7,
  "dt_iop_colorin_params_t",
  sizeof(dt_iop_colorin_params_t),
  &introspection_linear[10-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_colorspaces_color_profile_type_t", (char*)"type", (char*)"type", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->type), G_STRUCT_OFFSET(dt_iop_colorin_params_t, type), NULL },
    /*entries*/ 28, /*values*/ NULL, /*Default*/ DT_COLORSPACE_ENHANCED_MATRIX
  };
  introspection_linear[1].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filename[0]", (char*)"filename[0]", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename[0]), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[2].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"filename", (char*)"filename", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colorin_params_t*)NULL)->filename), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[1]
  };
  introspection_linear[3].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_color_intent_t", (char*)"intent", (char*)"intent", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->intent), G_STRUCT_OFFSET(dt_iop_colorin_params_t, intent), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_INTENT_PERCEPTUAL
  };
  introspection_linear[4].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_color_normalize_t", (char*)"normalize", (char*)"normalize", N_((char*)"gamut clipping"), sizeof(((dt_iop_colorin_params_t*)NULL)->normalize), G_STRUCT_OFFSET(dt_iop_colorin_params_t, normalize), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_NORMALIZE_OFF
  };
  introspection_linear[5].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"blue_mapping", (char*)"blue_mapping", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->blue_mapping), G_STRUCT_OFFSET(dt_iop_colorin_params_t, blue_mapping), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[6].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_colorspaces_color_profile_type_t", (char*)"type_work", (char*)"type_work", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->type_work), G_STRUCT_OFFSET(dt_iop_colorin_params_t, type_work), NULL },
    /*entries*/ 28, /*values*/ NULL, /*Default*/ DT_COLORSPACE_LIN_REC2020
  };
  introspection_linear[7].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filename_work[0]", (char*)"filename_work[0]", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename_work[0]), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename_work), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[8].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"filename_work", (char*)"filename_work", (char*)"", sizeof(((dt_iop_colorin_params_t*)NULL)->filename_work), G_STRUCT_OFFSET(dt_iop_colorin_params_t, filename_work), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_colorin_params_t*)NULL)->filename_work), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[7]
  };
  introspection_linear[9].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_colorin_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_colorin_params_t), 0, NULL },
    /*entries*/ 7, /*fields*/ NULL
  };
  introspection_linear[10].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f0[] = { 
    { "DT_COLORSPACE_NONE", DT_COLORSPACE_NONE, (char*)"" },
    { "DT_COLORSPACE_FILE", DT_COLORSPACE_FILE, (char*)"" },
    { "DT_COLORSPACE_SRGB", DT_COLORSPACE_SRGB, (char*)"" },
    { "DT_COLORSPACE_ADOBERGB", DT_COLORSPACE_ADOBERGB, (char*)"" },
    { "DT_COLORSPACE_LIN_REC709", DT_COLORSPACE_LIN_REC709, (char*)"" },
    { "DT_COLORSPACE_LIN_REC2020", DT_COLORSPACE_LIN_REC2020, (char*)"" },
    { "DT_COLORSPACE_XYZ", DT_COLORSPACE_XYZ, (char*)"" },
    { "DT_COLORSPACE_LAB", DT_COLORSPACE_LAB, (char*)"" },
    { "DT_COLORSPACE_INFRARED", DT_COLORSPACE_INFRARED, (char*)"" },
    { "DT_COLORSPACE_DISPLAY", DT_COLORSPACE_DISPLAY, (char*)"" },
    { "DT_COLORSPACE_EMBEDDED_ICC", DT_COLORSPACE_EMBEDDED_ICC, (char*)"" },
    { "DT_COLORSPACE_EMBEDDED_MATRIX", DT_COLORSPACE_EMBEDDED_MATRIX, (char*)"" },
    { "DT_COLORSPACE_STANDARD_MATRIX", DT_COLORSPACE_STANDARD_MATRIX, (char*)"" },
    { "DT_COLORSPACE_ENHANCED_MATRIX", DT_COLORSPACE_ENHANCED_MATRIX, (char*)"" },
    { "DT_COLORSPACE_VENDOR_MATRIX", DT_COLORSPACE_VENDOR_MATRIX, (char*)"" },
    { "DT_COLORSPACE_ALTERNATE_MATRIX", DT_COLORSPACE_ALTERNATE_MATRIX, (char*)"" },
    { "DT_COLORSPACE_BRG", DT_COLORSPACE_BRG, (char*)"" },
    { "DT_COLORSPACE_EXPORT", DT_COLORSPACE_EXPORT, (char*)"" },
    { "DT_COLORSPACE_SOFTPROOF", DT_COLORSPACE_SOFTPROOF, (char*)"" },
    { "DT_COLORSPACE_WORK", DT_COLORSPACE_WORK, (char*)"" },
    { "DT_COLORSPACE_DISPLAY2", DT_COLORSPACE_DISPLAY2, (char*)"" },
    { "DT_COLORSPACE_REC709", DT_COLORSPACE_REC709, (char*)"" },
    { "DT_COLORSPACE_PROPHOTO_RGB", DT_COLORSPACE_PROPHOTO_RGB, (char*)"" },
    { "DT_COLORSPACE_PQ_REC2020", DT_COLORSPACE_PQ_REC2020, (char*)"" },
    { "DT_COLORSPACE_HLG_REC2020", DT_COLORSPACE_HLG_REC2020, (char*)"" },
    { "DT_COLORSPACE_PQ_P3", DT_COLORSPACE_PQ_P3, (char*)"" },
    { "DT_COLORSPACE_HLG_P3", DT_COLORSPACE_HLG_P3, (char*)"" },
    { "DT_COLORSPACE_LAST", DT_COLORSPACE_LAST, (char*)"" },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f3[] = { 
    { "DT_INTENT_PERCEPTUAL", DT_INTENT_PERCEPTUAL, (char*)"" },
    { "DT_INTENT_RELATIVE_COLORIMETRIC", DT_INTENT_RELATIVE_COLORIMETRIC, (char*)"" },
    { "DT_INTENT_SATURATION", DT_INTENT_SATURATION, (char*)"" },
    { "DT_INTENT_ABSOLUTE_COLORIMETRIC", DT_INTENT_ABSOLUTE_COLORIMETRIC, (char*)"" },
    { "DT_INTENT_LAST", DT_INTENT_LAST, (char*)"" },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f4[] = { 
    { "DT_NORMALIZE_OFF", DT_NORMALIZE_OFF, N_((char*)"off") },
    { "DT_NORMALIZE_SRGB", DT_NORMALIZE_SRGB, N_((char*)"sRGB") },
    { "DT_NORMALIZE_ADOBE_RGB", DT_NORMALIZE_ADOBE_RGB, N_((char*)"Adobe RGB (compatible)") },
    { "DT_NORMALIZE_LINEAR_REC709_RGB", DT_NORMALIZE_LINEAR_REC709_RGB, N_((char*)"linear Rec709 RGB") },
    { "DT_NORMALIZE_LINEAR_REC2020_RGB", DT_NORMALIZE_LINEAR_REC2020_RGB, N_((char*)"linear Rec2020 RGB") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f9[] = {
    &introspection_linear[0],
    &introspection_linear[2],
    &introspection_linear[3],
    &introspection_linear[4],
    &introspection_linear[5],
    &introspection_linear[6],
    &introspection_linear[8],
    NULL
  };

  introspection_linear[0].Enum.values = f0;
  introspection_linear[3].Enum.values = f3;
  introspection_linear[4].Enum.values = f4;
  introspection_linear[6].Enum.values = f0;
  introspection_linear[9].Struct.fields = f9;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_colorin_params_t * p = (dt_iop_colorin_params_t*)param;
  if(!strcmp(name, "type"))
    return &(p->type);
  else if(!strcmp(name, "filename[0]"))
    return &(p->filename[0]);
  else if(!strcmp(name, "filename"))
    return &(p->filename);
  else if(!strcmp(name, "intent"))
    return &(p->intent);
  else if(!strcmp(name, "normalize"))
    return &(p->normalize);
  else if(!strcmp(name, "blue_mapping"))
    return &(p->blue_mapping);
  else if(!strcmp(name, "type_work"))
    return &(p->type_work);
  else if(!strcmp(name, "filename_work[0]"))
    return &(p->filename_work[0]);
  else if(!strcmp(name, "filename_work"))
    return &(p->filename_work);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!strcmp(name, "type"))
    return &(introspection_linear[0]);
  else if(!strcmp(name, "filename[0]"))
    return &(introspection_linear[1]);
  else if(!strcmp(name, "filename"))
    return &(introspection_linear[2]);
  else if(!strcmp(name, "intent"))
    return &(introspection_linear[3]);
  else if(!strcmp(name, "normalize"))
    return &(introspection_linear[4]);
  else if(!strcmp(name, "blue_mapping"))
    return &(introspection_linear[5]);
  else if(!strcmp(name, "type_work"))
    return &(introspection_linear[6]);
  else if(!strcmp(name, "filename_work[0]"))
    return &(introspection_linear[7]);
  else if(!strcmp(name, "filename_work"))
    return &(introspection_linear[8]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

