option_descriptor** descriptors = NULL;
uint8_t max_option_count = 0;
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_num_options()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_num_options()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_num_options");
- SANE_Option_Descriptor descriptor = {
- SANE_NAME_NUM_OPTIONS,
- SANE_TITLE_NUM_OPTIONS,
- SANE_DESC_NUM_OPTIONS,
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = SANE_NAME_NUM_OPTIONS;
+ descriptor->title = SANE_TITLE_NUM_OPTIONS;
+ descriptor->desc = SANE_DESC_NUM_OPTIONS;
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
/*******************************************************************************
* standard group
*******************************************************************************/
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_standard_group()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_standard_group()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_standard_group");
- SANE_Option_Descriptor descriptor = {
- SANE_NAME_STANDARD,
- SANE_TITLE_STANDARD,
- SANE_DESC_STANDARD,
- SANE_TYPE_GROUP,
- SANE_UNIT_NONE,
- 0,
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = SANE_NAME_STANDARD;
+ descriptor->title = SANE_TITLE_STANDARD;
+ descriptor->desc = SANE_DESC_STANDARD;
+ descriptor->type = SANE_TYPE_GROUP;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = 0;
+ descriptor->cap = SANE_CAP_SOFT_DETECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_scan_source()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_scan_source()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_source");
constraint[2] = "Flatbed";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- SANE_NAME_SCAN_SOURCE,
- SANE_TITLE_SCAN_SOURCE,
- SANE_DESC_SCAN_SOURCE,
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = SANE_NAME_SCAN_SOURCE;
+ descriptor->title = SANE_TITLE_SCAN_SOURCE;
+ descriptor->desc = SANE_DESC_SCAN_SOURCE;
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_mode()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_mode()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_mode");
constraint[2] = "BW";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- SANE_NAME_SCAN_MODE,
- SANE_TITLE_SCAN_MODE,
- SANE_DESC_SCAN_MODE,
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = SANE_NAME_SCAN_MODE;
+ descriptor->title = SANE_TITLE_SCAN_MODE;
+ descriptor->desc = SANE_DESC_SCAN_MODE;
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_dpi()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_dpi()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_dpi");
constraint[4] = 300;
constraint[5] = 600;
- SANE_Option_Descriptor descriptor = {
- SANE_NAME_SCAN_RESOLUTION,
- SANE_TITLE_SCAN_RESOLUTION,
- SANE_DESC_SCAN_RESOLUTION,
- SANE_TYPE_INT,
- SANE_UNIT_DPI,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_WORD_LIST,
- {.word_list = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = SANE_NAME_SCAN_RESOLUTION;
+ descriptor->title = SANE_TITLE_SCAN_RESOLUTION;
+ descriptor->desc = SANE_DESC_SCAN_RESOLUTION;
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_DPI;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_WORD_LIST;
+ descriptor->constraint.word_list = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_scanside()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_scanside()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scanside");
constraint[1] = "Duplex";
constraint[2] = NULL;
- SANE_Option_Descriptor descriptor = {
- "scanside",
- "Duplex Mode",
- "Duplex Mode",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 3,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "scanside";
+ descriptor->title = "Duplex Mode";
+ descriptor->desc = "Duplex Mode";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 3;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
/*******************************************************************************
* geometry group
*******************************************************************************/
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_geometry_group()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_geometry_group()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_scan_area_group");
- SANE_Option_Descriptor descriptor = {
- SANE_NAME_GEOMETRY,
- SANE_TITLE_GEOMETRY,
- SANE_DESC_GEOMETRY,
- SANE_TYPE_GROUP,
- SANE_UNIT_NONE,
- 0,
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = SANE_NAME_GEOMETRY;
+ descriptor->title = SANE_TITLE_GEOMETRY;
+ descriptor->desc = SANE_DESC_GEOMETRY;
+ descriptor->type = SANE_TYPE_GROUP;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = 0;
+ descriptor->cap = SANE_CAP_SOFT_DETECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_cropping_mode()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_cropping_mode()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_mode");
constraint[3] = "Manual";
constraint[4] = NULL;
- SANE_Option_Descriptor descriptor = {
- "cropping-mode",
- "Cropping Mode",
- "Cropping Mode",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 5,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "cropping-mode";
+ descriptor->title = "Cropping Mode";
+ descriptor->desc = "Cropping Mode";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 5;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_cropping_image()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_cropping_image()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_cropping_image");
constraint[1] = "PartialDocument";
constraint[2] = NULL;
- SANE_Option_Descriptor descriptor = {
- "cropping-image",
- "Cropping Image",
- "Cropping Image",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 3,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "cropping-image";
+ descriptor->title = "Cropping Image";
+ descriptor->desc = "Cropping Image";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 3;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_x()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_image_offset_x()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_x");
constraint->max = 75;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "image-offset-x",
- "Image Offset X",
- "Image Offset X",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "image-offset-x";
+ descriptor->title = "Image Offset X";
+ descriptor->desc = "Image Offset X";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_y()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_image_offset_y()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_offset_y");
constraint->max = 390;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "image-offset-y",
- "Image Offset Y",
- "Image Offset Y",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "image-offset-y";
+ descriptor->title = "Image Offset Y";
+ descriptor->desc = "Image Offset Y";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_width()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_image_width()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_width");
constraint->max = 85;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "image-width",
- "Image Width",
- "Image Width",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "image-width";
+ descriptor->title = "Image Width";
+ descriptor->desc = "Image Width";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_height()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_image_height()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_height");
constraint->max = 400;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "image-height",
- "Image Height",
- "Image Height",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "image-height";
+ descriptor->title = "Image Height";
+ descriptor->desc = "Image Height";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
/*******************************************************************************
* boldness smoothing group
*******************************************************************************/
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_boldness_smoothing_group()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_boldness_smoothing_group()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_advanced_group");
- SANE_Option_Descriptor descriptor = {
- "boldness-smoothing",
- "Boldness / Smoothing Options",
- "Foreground boldness Options and background smoothing options",
- SANE_TYPE_GROUP,
- SANE_UNIT_NONE,
- 0,
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "boldness-smoothing";
+ descriptor->title = "Boldness / Smoothing Options";
+ descriptor->desc = "Foreground boldness Options and background smoothing options";
+ descriptor->type = SANE_TYPE_GROUP;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = 0;
+ descriptor->cap = SANE_CAP_SOFT_DETECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_mode()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_foreground_boldness_mode()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_foreground_boldness_mode");
constraint[2] = "Automatic";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- "foreground-boldness-mode",
- "Foreground Boldness Mode",
- "Foreground Boldness Mode",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "foreground-boldness-mode";
+ descriptor->title = "Foreground Boldness Mode";
+ descriptor->desc = "Foreground Boldness Mode";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_foreground_boldness_aggressiveness()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_foreground_boldness_aggressiveness()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_foreground_boldness_aggressiveness");
constraint->max = 10;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "foreground-boldness-aggressiveness",
- "Foreground Boldness Aggressiveness",
- "Foreground Boldness Aggressiveness",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "foreground-boldness-aggressiveness";
+ descriptor->title = "Foreground Boldness Aggressiveness";
+ descriptor->desc = "Foreground Boldness Aggressiveness";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_background_smoothing_mode()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_background_smoothing_mode()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_background_smoothing_mode");
constraint[2] = "Automatic";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- "background-smoothing-mode",
- "Background Smoothing Mode",
- "Background Smoothing Mode",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "background-smoothing-mode";
+ descriptor->title = "Background Smoothing Mode";
+ descriptor->desc = "Background Smoothing Mode";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_background_smoothing_aggressiveness()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_background_smoothing_aggressiveness()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_background_smoothing_aggressiveness");
constraint->max = 10;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "background-smoothing-aggressiveness",
- "Background Smoothing Aggressiveness",
- "Background Smoothing Aggressiveness",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "background-smoothing-aggressiveness";
+ descriptor->title = "Background Smoothing Aggressiveness";
+ descriptor->desc = "Background Smoothing Aggressiveness";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
/*******************************************************************************
* boldness color group
*******************************************************************************/
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_boldness_color_group()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_boldness_color_group()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_boldness_color_group");
- SANE_Option_Descriptor descriptor = {
- "color-options",
- "Color Options",
- "Color Options",
- SANE_TYPE_GROUP,
- SANE_UNIT_NONE,
- 0,
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-options";
+ descriptor->title = "Color Options";
+ descriptor->desc = "Color Options";
+ descriptor->type = SANE_TYPE_GROUP;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = 0;
+ descriptor->cap = SANE_CAP_SOFT_DETECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_drop()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop");
constraint[7] = "Multiple";
constraint[8] = NULL;
- SANE_Option_Descriptor descriptor = {
- "color-drop-out",
- "Color Drop Out",
- "Color Drop Out",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 9,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-drop-out";
+ descriptor->title = "Color Drop Out";
+ descriptor->desc = "Color Drop Out";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const) * 9;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_drop_out_aggressiveness()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_drop_out_aggressiveness()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_drop_out_aggressiveness");
constraint->max = 10;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "color-drop-out-aggressiveness",
- "Color Drop Out Aggressiveness",
- "Color Drop Out Aggressiveness",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-drop-out-aggressiveness";
+ descriptor->title = "Color Drop Out Aggressiveness";
+ descriptor->desc = "Color Drop Out Aggressiveness";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_auto_brightness_mode()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_auto_brightness_mode()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_auto_brightness_mode");
constraint[2] = "Automatic";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- "color-auto-brightness-mode",
- "Color Auto Brightness Mode",
- "Color Auto Brightness Mode",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-auto-brightness-mode";
+ descriptor->title = "Color Auto Brightness Mode";
+ descriptor->desc = "Color Auto Brightness Mode";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_brightness()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_brightness()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_brightness");
constraint->max = 50;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "color-brightness",
- "Color Brightness",
- "Color Brightness",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-brightness";
+ descriptor->title = "Color Brightness";
+ descriptor->desc = "Color Brightness";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT ;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_contrast()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_contrast()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_contrast");
constraint->max = 50;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "color-contrast",
- "Color Contrast",
- "Color Contrast",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-contrast";
+ descriptor->title = "Color Contrast";
+ descriptor->desc = "Color Contrast";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT ;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_mode()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_balance_mode()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_mode");
constraint[3] = "AutomaticAdvanced";
constraint[4] = NULL;
- SANE_Option_Descriptor descriptor = {
- "color-balance-mode",
- "Color Balance Mode",
- "Color Balance Mode",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 5,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-balance-mode";
+ descriptor->title = "Color Balance Mode";
+ descriptor->desc = "Color Balance Mode";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 5;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_agressiveness()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_balance_agressiveness()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balancea_agressiveness");
constraint->max = 2;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "color-balance-aggressiveness",
- "Color Balance Aggressiveness",
- "Color Balance Aggressiveness",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-balance-aggressiveness";
+ descriptor->title = "Color Balance Aggressiveness";
+ descriptor->desc = "Color Balance Aggressiveness";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT ;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_red()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_balance_red()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_red");
constraint->max = 50;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "color-balance-red",
- "Color Balance Red",
- "Color Balance Red",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-balance-red";
+ descriptor->title = "Color Balance Red";
+ descriptor->desc = "Color Balance Red";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT ;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_green()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_balance_green()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_green");
constraint->max = 50;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "color-balance-green",
- "Color Balance Green",
- "Color Balance Green",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-balance-green";
+ descriptor->title = "Color Balance Green";
+ descriptor->desc = "Color Balance Green";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT ;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_balance_blue()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_balance_blue()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_balance_blue");
constraint->max = 50;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "color-balance-blue",
- "Color Balance Blue",
- "Color Balance Blue",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-balance-blue";
+ descriptor->title = "Color Balance Blue";
+ descriptor->desc = "Color Balance Blue";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT ;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_color_sharpen()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_color_sharpen()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_color_sharpen");
constraint[3] = "Exaggerated";
constraint[4] = NULL;
- SANE_Option_Descriptor descriptor = {
- "color-sharpen",
- "Color Sharpen",
- "Color Sharpen",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 5,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "color-sharpen";
+ descriptor->title = "Color Sharpen";
+ descriptor->desc = "Color Sharpen";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 5;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_binarization_contrast()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_binarization_contrast()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_binarization_contrast");
constraint->max = 50;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "binarization-contrast",
- "Binarization Contrast",
- "Binarization Contrast",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "binarization-contrast";
+ descriptor->title = "Binarization Contrast";
+ descriptor->desc = "Binarization Contrast";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_config_reset()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_config_reset()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_config_reset");
- SANE_Option_Descriptor descriptor = {
- "config-reset",
- "Reset Config",
- "Load default configuration from scanner",
- SANE_TYPE_BUTTON,
- SANE_UNIT_NONE,
- 0,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "config-reset";
+ descriptor->title = "Reset Config";
+ descriptor->desc = "Load default configuration from scanner";
+ descriptor->type = SANE_TYPE_BUTTON;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = 0;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
/*******************************************************************************
* image processing group
*******************************************************************************/
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_processing_group()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_image_processing_group()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_processing_group");
- SANE_Option_Descriptor descriptor = {
- "image-processing-options",
- "Image Processing Options",
- "Image Processing Options",
- SANE_TYPE_GROUP,
- SANE_UNIT_NONE,
- 0,
- SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "image-processing-options";
+ descriptor->title = "Image Processing Options";
+ descriptor->desc = "Image Processing Options";
+ descriptor->type = SANE_TYPE_GROUP;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = 0;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_skip_blank_pages()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_skip_blank_pages()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_skip_blank_pages");
- SANE_Option_Descriptor descriptor = {
- "skip-blank-pages",
- "Blank Blank Pages",
- "Blank Blank Pages",
- SANE_TYPE_BOOL,
- SANE_UNIT_NONE,
- sizeof(SANE_Bool),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "skip-blank-pages";
+ descriptor->title = "Blank Blank Pages";
+ descriptor->desc = "Blank Blank Pages";
+ descriptor->type = SANE_TYPE_BOOL;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Bool);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_skip_blank_page_content()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_skip_blank_page_content()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_skip_blank_page_content");
constraint->max = 100;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "skip-blank-page-content",
- "Skip Blank Page Content",
- "Skip Blank Page Content",
- SANE_TYPE_INT,
- SANE_UNIT_PERCENT,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "skip-blank-page-content";
+ descriptor->title = "Skip Blank Page Content";
+ descriptor->desc = "Skip Blank Page Content";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_PERCENT;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_hole_fill()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_hole_fill()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_hole_fill");
- SANE_Option_Descriptor descriptor = {
- "hole-fill",
- "Hole Fill",
- "Hole Fill",
- SANE_TYPE_BOOL,
- SANE_UNIT_NONE,
- sizeof(SANE_Bool),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_NONE,
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "hole-fill";
+ descriptor->title = "Hole Fill";
+ descriptor->desc = "Hole Fill";
+ descriptor->type = SANE_TYPE_BOOL;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Bool);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_post_scan_rotation()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_post_scan_rotation()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_post_scan_rotation");
constraint[4] = "Automatic270";
constraint[5] = NULL;
- SANE_Option_Descriptor descriptor = {
- "post-scan-rotation",
- "Post Scan Rotation",
- "Post Scan Rotation",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 6,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "post-scan-rotation";
+ descriptor->title = "Post Scan Rotation";
+ descriptor->desc = "Post Scan Rotation";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 6;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_edge_fill()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_edge_fill()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_edge_fill");
constraint[2] = "AutomaticIncludeTears";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- "edge-fill",
- "Edge Fill",
- "Edge Fill",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "edge-fill";
+ descriptor->title = "Edge Fill";
+ descriptor->desc = "Edge Fill";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_border()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_image_border()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_border");
constraint[2] = "Remove";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- "image-border",
- "Image Border",
- "Image Border",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "image-border";
+ descriptor->title = "Image Border";
+ descriptor->desc = "Image Border";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_jpeg_quality()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_jpeg_quality()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_jpeg_quality");
constraint[4] = "Superior";
constraint[5] = NULL;
- SANE_Option_Descriptor descriptor = {
- "jpeg-quality",
- "Jpeg Quality",
- "Jpeg Quality",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 6,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "jpeg-quality";
+ descriptor->title = "Jpeg Quality";
+ descriptor->desc = "Jpeg Quality";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 6;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
/*******************************************************************************
* feeder group
*******************************************************************************/
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_feeder_group()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_feeder_group()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_feeder_group");
- SANE_Option_Descriptor descriptor = {
- "feeder-options",
- "Feeder Options",
- "Feeder Options",
- SANE_TYPE_GROUP,
- SANE_UNIT_NONE,
- 0,
- SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "feeder-options";
+ descriptor->title = "Feeder Options";
+ descriptor->desc = "Feeder Options";
+ descriptor->type = SANE_TYPE_GROUP;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = 0;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_autostart()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_autostart()
{
kds_s2000w_debug_printf(ALL, "_kds_s2000w_option_descriptor_autostart");
- SANE_Option_Descriptor descriptor = {
- "autostart",
- "Autostart",
- "Autostart",
- SANE_TYPE_BOOL,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_NONE
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "autostart";
+ descriptor->title = "Autostart";
+ descriptor->desc = "Autostart";
+ descriptor->type = SANE_TYPE_BOOL;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Bool);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_max_document_length()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_max_document_length()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_max_document_length");
constraint->max = 400;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "max-document-length",
- "Max Document Length",
- "Max Document Length",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "max-document-length";
+ descriptor->title = "Max Document Length";
+ descriptor->desc = "Max Document Length";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_transport_handling()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_transport_handling()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_transport_handling");
constraint[3] = "Special";
constraint[4] = NULL;
- SANE_Option_Descriptor descriptor = {
- "transport-handling",
- "Transport Handling",
- "Transport Handling",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 5,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "transport-handling";
+ descriptor->title = "Transport Handling";
+ descriptor->desc = "Transport Handling";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 5;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_multifeed_sensitivity()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_multifeed_sensitivity()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_sensitivity");
constraint[3] = "High";
constraint[4] = NULL;
- SANE_Option_Descriptor descriptor = {
- "multifeed-sensitivity",
- "Multifeed Sensitivity",
- "Multifeed Sensitivity",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 5,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "multifeed-sensitivity";
+ descriptor->title = "Multifeed Sensitivity";
+ descriptor->desc = "Multifeed Sensitivity";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 5;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_multifeed_response()
+SANE_Option_Descriptor *_kds_s2000w_option_descriptor_multifeed_response()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_multifeed_response");
constraint[1] = "StopAndGenerateImage";
constraint[2] = NULL;
- SANE_Option_Descriptor descriptor = {
- "multifeed-response",
- "Multifeed Response",
- "Multifeed Response",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 3,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "multifeed-response";
+ descriptor->title = "Multifeed Response";
+ descriptor->desc = "Multifeed Response";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 3;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_document_feeder_timeout()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_document_feeder_timeout()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout");
constraint->max = 120;
constraint->quant = 1;
- SANE_Option_Descriptor descriptor = {
- "document-feeder-timeout",
- "Document Feeder Timeout",
- "Document Feeder Timeout",
- SANE_TYPE_INT,
- SANE_UNIT_NONE,
- sizeof(SANE_Int),
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_RANGE,
- {.range = constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "document-feeder-timeout";
+ descriptor->title = "Document Feeder Timeout";
+ descriptor->desc = "Document Feeder Timeout";
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_Int);
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_RANGE;
+ descriptor->constraint.range = constraint;
return descriptor;
}
-SANE_Option_Descriptor _kds_s2000w_option_descriptor_document_feeder_timeout_response()
+SANE_Option_Descriptor* _kds_s2000w_option_descriptor_document_feeder_timeout_response()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_document_feeder_timeout_response");
constraint[2] = "PauseAndWait";
constraint[3] = NULL;
- SANE_Option_Descriptor descriptor = {
- "document-feeder-timeout-response",
- "Document Feeder Timeout Response",
- "Document Feeder Timeout Response",
- SANE_TYPE_STRING,
- SANE_UNIT_NONE,
- sizeof(SANE_String_Const*) * 4,
- SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED,
- SANE_CONSTRAINT_STRING_LIST,
- {.string_list = (SANE_String_Const*) constraint}
- };
+ SANE_Option_Descriptor* descriptor = malloc(sizeof(SANE_Option_Descriptor));
+
+ descriptor->name = "document-feeder-timeout-response";
+ descriptor->title = "Document Feeder Timeout Response";
+ descriptor->desc = "Document Feeder Timeout Response";
+ descriptor->type = SANE_TYPE_STRING;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->size = sizeof(SANE_String_Const*) * 4;
+ descriptor->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
+ descriptor->constraint_type = SANE_CONSTRAINT_STRING_LIST;
+ descriptor->constraint.string_list = (SANE_String_Const*) constraint;
return descriptor;
}
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptors_free");
for (int i = 0; i < max_option_count; i++) {
- if (descriptors[i]->descriptor.constraint_type == SANE_CONSTRAINT_STRING_LIST) {
- free((void*) descriptors[i]->descriptor.constraint.string_list);
- descriptors[i]->descriptor.constraint.string_list = NULL;
+ if (descriptors[i]->descriptor->constraint_type == SANE_CONSTRAINT_STRING_LIST) {
+ free((void*) descriptors[i]->descriptor->constraint.string_list);
+ descriptors[i]->descriptor->constraint.string_list = NULL;
}
- if (descriptors[i]->descriptor.constraint_type == SANE_CONSTRAINT_WORD_LIST) {
- free((void*) descriptors[i]->descriptor.constraint.word_list);
- descriptors[i]->descriptor.constraint.word_list = NULL;
+ if (descriptors[i]->descriptor->constraint_type == SANE_CONSTRAINT_WORD_LIST) {
+ free((void*) descriptors[i]->descriptor->constraint.word_list);
+ descriptors[i]->descriptor->constraint.word_list = NULL;
}
- if (descriptors[i]->descriptor.constraint_type == SANE_CONSTRAINT_RANGE) {
- free((void*) descriptors[i]->descriptor.constraint.range);
- descriptors[i]->descriptor.constraint.range = NULL;
+ if (descriptors[i]->descriptor->constraint_type == SANE_CONSTRAINT_RANGE) {
+ free((void*) descriptors[i]->descriptor->constraint.range);
+ descriptors[i]->descriptor->constraint.range = NULL;
}
+ free(descriptors[i]->descriptor);
+ descriptors[i]->descriptor = NULL;
free(descriptors[i]);
descriptors[i] = NULL;
}
if (number >= max_option_count)
return NULL;
- return &descriptors[number]->descriptor;
+ return descriptors[number]->descriptor;
}
SANE_Option_Descriptor* kds_s2000w_option_descriptors_get_by_name(const char* name)
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_get_by_name");
for (int i = 0; i < max_option_count; i++) {
- if (strcmp(descriptors[i]->descriptor.name, name) == 0)
- return &descriptors[i]->descriptor;
+ if (strcmp(descriptors[i]->descriptor->name, name) == 0)
+ return descriptors[i]->descriptor;
}
return NULL;