/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_lut3d_params_t
 *     char
 *     filepath [DT_IOP_LUT3D_MAX_PATHNAME]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     enum dt_iop_lut3d_colorspace_t
 *       DT_IOP_SRGB : sRGB
 *       DT_IOP_ARGB : Adobe RGB
 *       DT_IOP_REC709 : gamma Rec709 RGB
 *       DT_IOP_LIN_REC709 : linear Rec709 RGB
 *       DT_IOP_LIN_REC2020 : linear Rec2020 RGB
 *       DT_IOP_LIN_PROPHOTO : linear ProPhoto RGB
 *     colorspace 
 *       description: application color space
 *       default: DT_IOP_SRGB
 * 
 *     enum dt_iop_lut3d_interpolation_t
 *       DT_IOP_TETRAHEDRAL : tetrahedral
 *       DT_IOP_TRILINEAR : trilinear
 *       DT_IOP_PYRAMID : pyramid
 *     interpolation 
 *       default: DT_IOP_TETRAHEDRAL
 * 
 *     int
 *     nb_keypoints 
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     char
 *     c_clut [DT_IOP_LUT3D_MAX_KEYPOINTS * 2 * 3]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     char
 *     lutname [DT_IOP_LUT3D_MAX_LUTNAME]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 * dt_iop_lut3d_params_t
 *
 */

#include "/build/darktable/src/darktable-5.6.0/src/iop/lut3d.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) )
= {
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filepath[0]", (char*)"filepath[0]", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->filepath[0]), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, filepath), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"filepath", (char*)"filepath", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->filepath), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, filepath), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lut3d_params_t*)NULL)->filepath), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[0]
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lut3d_colorspace_t", (char*)"colorspace", (char*)"colorspace", N_((char*)"application color space"), sizeof(((dt_iop_lut3d_params_t*)NULL)->colorspace), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, colorspace), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_IOP_SRGB
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lut3d_interpolation_t", (char*)"interpolation", (char*)"interpolation", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->interpolation), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, interpolation), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_IOP_TETRAHEDRAL
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"nb_keypoints", (char*)"nb_keypoints", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->nb_keypoints), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, nb_keypoints), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"c_clut[0]", (char*)"c_clut[0]", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->c_clut[0]), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, c_clut), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"c_clut", (char*)"c_clut", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->c_clut), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, c_clut), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lut3d_params_t*)NULL)->c_clut), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[5]
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"lutname[0]", (char*)"lutname[0]", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->lutname[0]), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, lutname), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"lutname", (char*)"lutname", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->lutname), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, lutname), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lut3d_params_t*)NULL)->lutname), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[7]
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_lut3d_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_lut3d_params_t), 0, NULL },
    /*entries*/ 6, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  3,
  "dt_iop_lut3d_params_t",
  sizeof(dt_iop_lut3d_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].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filepath[0]", (char*)"filepath[0]", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->filepath[0]), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, filepath), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[1].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"filepath", (char*)"filepath", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->filepath), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, filepath), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lut3d_params_t*)NULL)->filepath), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[0]
  };
  introspection_linear[2].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lut3d_colorspace_t", (char*)"colorspace", (char*)"colorspace", N_((char*)"application color space"), sizeof(((dt_iop_lut3d_params_t*)NULL)->colorspace), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, colorspace), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_IOP_SRGB
  };
  introspection_linear[3].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_lut3d_interpolation_t", (char*)"interpolation", (char*)"interpolation", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->interpolation), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, interpolation), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_IOP_TETRAHEDRAL
  };
  introspection_linear[4].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"nb_keypoints", (char*)"nb_keypoints", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->nb_keypoints), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, nb_keypoints), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[5].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"c_clut[0]", (char*)"c_clut[0]", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->c_clut[0]), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, c_clut), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[6].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"c_clut", (char*)"c_clut", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->c_clut), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, c_clut), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lut3d_params_t*)NULL)->c_clut), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[5]
  };
  introspection_linear[7].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"lutname[0]", (char*)"lutname[0]", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->lutname[0]), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, lutname), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[8].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"lutname", (char*)"lutname", (char*)"", sizeof(((dt_iop_lut3d_params_t*)NULL)->lutname), G_STRUCT_OFFSET(dt_iop_lut3d_params_t, lutname), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_lut3d_params_t*)NULL)->lutname), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[7]
  };
  introspection_linear[9].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_lut3d_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_lut3d_params_t), 0, NULL },
    /*entries*/ 6, /*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 f2[] = { 
    { "DT_IOP_SRGB", DT_IOP_SRGB, N_((char*)"sRGB") },
    { "DT_IOP_ARGB", DT_IOP_ARGB, N_((char*)"Adobe RGB") },
    { "DT_IOP_REC709", DT_IOP_REC709, N_((char*)"gamma Rec709 RGB") },
    { "DT_IOP_LIN_REC709", DT_IOP_LIN_REC709, N_((char*)"linear Rec709 RGB") },
    { "DT_IOP_LIN_REC2020", DT_IOP_LIN_REC2020, N_((char*)"linear Rec2020 RGB") },
    { "DT_IOP_LIN_PROPHOTO", DT_IOP_LIN_PROPHOTO, N_((char*)"linear ProPhoto RGB") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f3[] = { 
    { "DT_IOP_TETRAHEDRAL", DT_IOP_TETRAHEDRAL, N_((char*)"tetrahedral") },
    { "DT_IOP_TRILINEAR", DT_IOP_TRILINEAR, N_((char*)"trilinear") },
    { "DT_IOP_PYRAMID", DT_IOP_PYRAMID, N_((char*)"pyramid") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f9[] = {
    &introspection_linear[1],
    &introspection_linear[2],
    &introspection_linear[3],
    &introspection_linear[4],
    &introspection_linear[6],
    &introspection_linear[8],
    NULL
  };

  introspection_linear[2].Enum.values = f2;
  introspection_linear[3].Enum.values = f3;
  introspection_linear[9].Struct.fields = f9;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_lut3d_params_t * p = (dt_iop_lut3d_params_t*)param;
  if(!strcmp(name, "filepath[0]"))
    return &(p->filepath[0]);
  else if(!strcmp(name, "filepath"))
    return &(p->filepath);
  else if(!strcmp(name, "colorspace"))
    return &(p->colorspace);
  else if(!strcmp(name, "interpolation"))
    return &(p->interpolation);
  else if(!strcmp(name, "nb_keypoints"))
    return &(p->nb_keypoints);
  else if(!strcmp(name, "c_clut[0]"))
    return &(p->c_clut[0]);
  else if(!strcmp(name, "c_clut"))
    return &(p->c_clut);
  else if(!strcmp(name, "lutname[0]"))
    return &(p->lutname[0]);
  else if(!strcmp(name, "lutname"))
    return &(p->lutname);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "filepath[0]"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "filepath"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "colorspace"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "interpolation"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "nb_keypoints"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "c_clut[0]"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "c_clut"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "lutname[0]"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "lutname"))
    return &(introspection_linear[8]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

