/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_overlay_params_t
 *     float
 *     opacity 
 *       default: 100.0
 *       range: 0.0 .. 100.0
 * 
 *     float
 *     scale 
 *       default: 100.0
 *       range: 1.0 .. 500.0
 * 
 *     float
 *     xoffset 
 *       description: x offset
 *       default: 0.0
 *       range: -1.0 .. 1.0
 * 
 *     float
 *     yoffset 
 *       description: y offset
 *       default: 0.0
 *       range: -1.0 .. 1.0
 * 
 *     int
 *     alignment 
 *       default: 4
 *       range: G_MININT .. G_MAXINT
 * 
 *     float
 *     rotate 
 *       description: rotation
 *       default: 0.0
 *       range: -180.0 .. 180.0
 * 
 *     enum dt_iop_overlay_base_scale_t
 *       DT_SCALE_MAINMENU_IMAGE : image
 *       DT_SCALE_MAINMENU_LARGER_BORDER : larger border
 *       DT_SCALE_MAINMENU_SMALLER_BORDER : smaller border
 *       DT_SCALE_MAINMENU_MARKERHEIGHT : height
 *       DT_SCALE_MAINMENU_ADVANCED : advanced options
 *     scale_base 
 *       description: scale on
 *       default: DT_SCALE_MAINMENU_IMAGE
 * 
 *     enum dt_iop_overlay_img_scale_t
 *       DT_SCALE_IMG_WIDTH : image width
 *       DT_SCALE_IMG_HEIGHT : image height
 *       DT_SCALE_IMG_LARGER : larger image border
 *       DT_SCALE_IMG_SMALLER : smaller image border
 *     scale_img 
 *       description: scale marker to
 *       default: DT_SCALE_IMG_LARGER
 * 
 *     enum dt_iop_overlay_svg_scale_t
 *       DT_SCALE_SVG_WIDTH : marker width
 *       DT_SCALE_SVG_HEIGHT : marker height
 *     scale_svg 
 *       description: scale marker reference
 *       default: DT_SCALE_SVG_WIDTH
 * 
 *     int
 *     imgid 
 *       description: image id
 *       default: 0
 *       range: G_MININT .. G_MAXINT
 * 
 *     char
 *     filename [1024]
 *       default: 0
 *       range: CHAR_MIN .. CHAR_MAX
 * 
 *     size_t
 *     dummy0 
 * 
 *     size_t
 *     dummy1 
 * 
 *     int64_t
 *     dummy2 
 * 
 * dt_iop_overlay_params_t
 *
 */

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

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[16+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"opacity", (char*)"opacity", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->opacity), G_STRUCT_OFFSET(dt_iop_overlay_params_t, opacity), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 100.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale", (char*)"scale", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->scale), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale), NULL },
    /*Min*/ 1.0, /*Max*/ 500.0, /*Default*/ 100.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"xoffset", (char*)"xoffset", N_((char*)"x offset"), sizeof(((dt_iop_overlay_params_t*)NULL)->xoffset), G_STRUCT_OFFSET(dt_iop_overlay_params_t, xoffset), NULL },
    /*Min*/ -1.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"yoffset", (char*)"yoffset", N_((char*)"y offset"), sizeof(((dt_iop_overlay_params_t*)NULL)->yoffset), G_STRUCT_OFFSET(dt_iop_overlay_params_t, yoffset), NULL },
    /*Min*/ -1.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"alignment", (char*)"alignment", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->alignment), G_STRUCT_OFFSET(dt_iop_overlay_params_t, alignment), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 4
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rotate", (char*)"rotate", N_((char*)"rotation"), sizeof(((dt_iop_overlay_params_t*)NULL)->rotate), G_STRUCT_OFFSET(dt_iop_overlay_params_t, rotate), NULL },
    /*Min*/ -180.0, /*Max*/ 180.0, /*Default*/ 0.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_overlay_base_scale_t", (char*)"scale_base", (char*)"scale_base", N_((char*)"scale on"), sizeof(((dt_iop_overlay_params_t*)NULL)->scale_base), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale_base), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_SCALE_MAINMENU_IMAGE
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_overlay_img_scale_t", (char*)"scale_img", (char*)"scale_img", N_((char*)"scale marker to"), sizeof(((dt_iop_overlay_params_t*)NULL)->scale_img), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale_img), NULL },
    /*entries*/ 4, /*values*/ NULL, /*Default*/ DT_SCALE_IMG_LARGER
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_overlay_svg_scale_t", (char*)"scale_svg", (char*)"scale_svg", N_((char*)"scale marker reference"), sizeof(((dt_iop_overlay_params_t*)NULL)->scale_svg), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale_svg), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_SCALE_SVG_WIDTH
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"imgid", (char*)"imgid", N_((char*)"image id"), sizeof(((dt_iop_overlay_params_t*)NULL)->imgid), G_STRUCT_OFFSET(dt_iop_overlay_params_t, imgid), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  }
},
{
  .Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filename[0]", (char*)"filename[0]", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->filename[0]), G_STRUCT_OFFSET(dt_iop_overlay_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_overlay_params_t*)NULL)->filename), G_STRUCT_OFFSET(dt_iop_overlay_params_t, filename), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_overlay_params_t*)NULL)->filename), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[10]
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"size_t", (char*)"dummy0", (char*)"dummy0", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->dummy0), G_STRUCT_OFFSET(dt_iop_overlay_params_t, dummy0), NULL },
    /* no data for this type */
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"size_t", (char*)"dummy1", (char*)"dummy1", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->dummy1), G_STRUCT_OFFSET(dt_iop_overlay_params_t, dummy1), NULL },
    /* no data for this type */
  }
},
{
  .Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"int64_t", (char*)"dummy2", (char*)"dummy2", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->dummy2), G_STRUCT_OFFSET(dt_iop_overlay_params_t, dummy2), NULL },
    /* no data for this type */
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_overlay_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_overlay_params_t), 0, NULL },
    /*entries*/ 14, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  1,
  "dt_iop_overlay_params_t",
  sizeof(dt_iop_overlay_params_t),
  &introspection_linear[16-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*)"opacity", (char*)"opacity", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->opacity), G_STRUCT_OFFSET(dt_iop_overlay_params_t, opacity), NULL },
    /*Min*/ 0.0, /*Max*/ 100.0, /*Default*/ 100.0
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scale", (char*)"scale", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->scale), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale), NULL },
    /*Min*/ 1.0, /*Max*/ 500.0, /*Default*/ 100.0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"xoffset", (char*)"xoffset", N_((char*)"x offset"), sizeof(((dt_iop_overlay_params_t*)NULL)->xoffset), G_STRUCT_OFFSET(dt_iop_overlay_params_t, xoffset), NULL },
    /*Min*/ -1.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"yoffset", (char*)"yoffset", N_((char*)"y offset"), sizeof(((dt_iop_overlay_params_t*)NULL)->yoffset), G_STRUCT_OFFSET(dt_iop_overlay_params_t, yoffset), NULL },
    /*Min*/ -1.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[4].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"alignment", (char*)"alignment", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->alignment), G_STRUCT_OFFSET(dt_iop_overlay_params_t, alignment), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 4
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"rotate", (char*)"rotate", N_((char*)"rotation"), sizeof(((dt_iop_overlay_params_t*)NULL)->rotate), G_STRUCT_OFFSET(dt_iop_overlay_params_t, rotate), NULL },
    /*Min*/ -180.0, /*Max*/ 180.0, /*Default*/ 0.0
  };
  introspection_linear[6].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_overlay_base_scale_t", (char*)"scale_base", (char*)"scale_base", N_((char*)"scale on"), sizeof(((dt_iop_overlay_params_t*)NULL)->scale_base), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale_base), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_SCALE_MAINMENU_IMAGE
  };
  introspection_linear[7].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_overlay_img_scale_t", (char*)"scale_img", (char*)"scale_img", N_((char*)"scale marker to"), sizeof(((dt_iop_overlay_params_t*)NULL)->scale_img), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale_img), NULL },
    /*entries*/ 4, /*values*/ NULL, /*Default*/ DT_SCALE_IMG_LARGER
  };
  introspection_linear[8].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_overlay_svg_scale_t", (char*)"scale_svg", (char*)"scale_svg", N_((char*)"scale marker reference"), sizeof(((dt_iop_overlay_params_t*)NULL)->scale_svg), G_STRUCT_OFFSET(dt_iop_overlay_params_t, scale_svg), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ DT_SCALE_SVG_WIDTH
  };
  introspection_linear[9].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"imgid", (char*)"imgid", N_((char*)"image id"), sizeof(((dt_iop_overlay_params_t*)NULL)->imgid), G_STRUCT_OFFSET(dt_iop_overlay_params_t, imgid), NULL },
    /*Min*/ G_MININT, /*Max*/ G_MAXINT, /*Default*/ 0
  };
  introspection_linear[10].Char = {
    { DT_INTROSPECTION_TYPE_CHAR, (char*)"char", (char*)"filename[0]", (char*)"filename[0]", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->filename[0]), G_STRUCT_OFFSET(dt_iop_overlay_params_t, filename), NULL },
    /*Min*/ CHAR_MIN, /*Max*/ CHAR_MAX, /*Default*/ 0
  };
  introspection_linear[11].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"char[]", (char*)"filename", (char*)"filename", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->filename), G_STRUCT_OFFSET(dt_iop_overlay_params_t, filename), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_overlay_params_t*)NULL)->filename), /*type*/ DT_INTROSPECTION_TYPE_CHAR, /*field*/ &introspection_linear[10]
  };
  introspection_linear[12].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"size_t", (char*)"dummy0", (char*)"dummy0", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->dummy0), G_STRUCT_OFFSET(dt_iop_overlay_params_t, dummy0), NULL },
    /* no data for this type */
  };
  introspection_linear[13].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"size_t", (char*)"dummy1", (char*)"dummy1", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->dummy1), G_STRUCT_OFFSET(dt_iop_overlay_params_t, dummy1), NULL },
    /* no data for this type */
  };
  introspection_linear[14].Opaque = {
    { DT_INTROSPECTION_TYPE_OPAQUE, (char*)"int64_t", (char*)"dummy2", (char*)"dummy2", (char*)"", sizeof(((dt_iop_overlay_params_t*)NULL)->dummy2), G_STRUCT_OFFSET(dt_iop_overlay_params_t, dummy2), NULL },
    /* no data for this type */
  };
  introspection_linear[15].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_overlay_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_overlay_params_t), 0, NULL },
    /*entries*/ 14, /*fields*/ NULL
  };
  introspection_linear[16].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f6[] = { 
    { "DT_SCALE_MAINMENU_IMAGE", DT_SCALE_MAINMENU_IMAGE, N_((char*)"image") },
    { "DT_SCALE_MAINMENU_LARGER_BORDER", DT_SCALE_MAINMENU_LARGER_BORDER, N_((char*)"larger border") },
    { "DT_SCALE_MAINMENU_SMALLER_BORDER", DT_SCALE_MAINMENU_SMALLER_BORDER, N_((char*)"smaller border") },
    { "DT_SCALE_MAINMENU_MARKERHEIGHT", DT_SCALE_MAINMENU_MARKERHEIGHT, N_((char*)"height") },
    { "DT_SCALE_MAINMENU_ADVANCED", DT_SCALE_MAINMENU_ADVANCED, N_((char*)"advanced options") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f7[] = { 
    { "DT_SCALE_IMG_WIDTH", DT_SCALE_IMG_WIDTH, N_((char*)"image width") },
    { "DT_SCALE_IMG_HEIGHT", DT_SCALE_IMG_HEIGHT, N_((char*)"image height") },
    { "DT_SCALE_IMG_LARGER", DT_SCALE_IMG_LARGER, N_((char*)"larger image border") },
    { "DT_SCALE_IMG_SMALLER", DT_SCALE_IMG_SMALLER, N_((char*)"smaller image border") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f8[] = { 
    { "DT_SCALE_SVG_WIDTH", DT_SCALE_SVG_WIDTH, N_((char*)"marker width") },
    { "DT_SCALE_SVG_HEIGHT", DT_SCALE_SVG_HEIGHT, N_((char*)"marker height") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f15[] = {
    &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[11],
    &introspection_linear[12],
    &introspection_linear[13],
    &introspection_linear[14],
    NULL
  };

  introspection_linear[6].Enum.values = f6;
  introspection_linear[7].Enum.values = f7;
  introspection_linear[8].Enum.values = f8;
  introspection_linear[15].Struct.fields = f15;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_overlay_params_t * p = (dt_iop_overlay_params_t*)param;
  if(!strcmp(name, "opacity"))
    return &(p->opacity);
  else if(!strcmp(name, "scale"))
    return &(p->scale);
  else if(!strcmp(name, "xoffset"))
    return &(p->xoffset);
  else if(!strcmp(name, "yoffset"))
    return &(p->yoffset);
  else if(!strcmp(name, "alignment"))
    return &(p->alignment);
  else if(!strcmp(name, "rotate"))
    return &(p->rotate);
  else if(!strcmp(name, "scale_base"))
    return &(p->scale_base);
  else if(!strcmp(name, "scale_img"))
    return &(p->scale_img);
  else if(!strcmp(name, "scale_svg"))
    return &(p->scale_svg);
  else if(!strcmp(name, "imgid"))
    return &(p->imgid);
  else if(!strcmp(name, "filename[0]"))
    return &(p->filename[0]);
  else if(!strcmp(name, "filename"))
    return &(p->filename);
  else if(!strcmp(name, "dummy0"))
    return &(p->dummy0);
  else if(!strcmp(name, "dummy1"))
    return &(p->dummy1);
  else if(!strcmp(name, "dummy2"))
    return &(p->dummy2);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "opacity"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "scale"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "xoffset"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "yoffset"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "alignment"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "rotate"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "scale_base"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "scale_img"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "scale_svg"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "imgid"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "filename[0]"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "filename"))
    return &(introspection_linear[11]);
  else if(!g_ascii_strcasecmp(name, "dummy0"))
    return &(introspection_linear[12]);
  else if(!g_ascii_strcasecmp(name, "dummy1"))
    return &(introspection_linear[13]);
  else if(!g_ascii_strcasecmp(name, "dummy2"))
    return &(introspection_linear[14]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

