From: Bastian Dehn Date: Mon, 17 Feb 2025 20:29:26 +0000 (+0100) Subject: change original nameing cropping options X-Git-Tag: v1.1.0^2~3^2~14 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=971e0328d6b626084c1a76ba3839a893547bb408;p=sane-kds-s2000w-net.git change original nameing cropping options --- diff --git a/src/kds_s2000w_option_descriptors.c b/src/kds_s2000w_option_descriptors.c index 7256ede..0da4517 100644 --- a/src/kds_s2000w_option_descriptors.c +++ b/src/kds_s2000w_option_descriptors.c @@ -951,11 +951,11 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_x() constraint->quant = 1; SANE_Option_Descriptor descriptor = { - SANE_NAME_SCAN_TL_X, - SANE_TITLE_SCAN_TL_X, - SANE_DESC_SCAN_TL_X, + "image-offset-x", + "Image Offset X", + "Image Offset X", SANE_TYPE_INT, - SANE_UNIT_MM, + SANE_UNIT_NONE, sizeof(SANE_Int), SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, SANE_CONSTRAINT_RANGE, @@ -975,11 +975,11 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_y() constraint->quant = 1; SANE_Option_Descriptor descriptor = { - SANE_NAME_SCAN_TL_Y, - SANE_TITLE_SCAN_TL_Y, - SANE_DESC_SCAN_TL_Y, + "image-offset-y", + "Image Offset Y", + "Image Offset Y", SANE_TYPE_INT, - SANE_UNIT_MM, + SANE_UNIT_NONE, sizeof(SANE_Int), SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, SANE_CONSTRAINT_RANGE, @@ -999,9 +999,9 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_width() constraint->quant = 1; SANE_Option_Descriptor descriptor = { - SANE_NAME_PAGE_WIDTH, - SANE_TITLE_PAGE_WIDTH, - SANE_DESC_PAGE_WIDTH, + "image-width", + "Image Width", + "Image Width", SANE_TYPE_INT, SANE_UNIT_NONE, sizeof(SANE_Int), @@ -1023,9 +1023,9 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_height() constraint->quant = 1; SANE_Option_Descriptor descriptor = { - SANE_NAME_PAGE_HEIGHT, - SANE_TITLE_PAGE_HEIGHT, - SANE_DESC_PAGE_HEIGHT, + "image-height", + "Image Height", + "Image Height", SANE_TYPE_INT, SANE_UNIT_NONE, sizeof(SANE_Int), diff --git a/tests/kds_s2000w_option_descriptor_tests.c b/tests/kds_s2000w_option_descriptor_tests.c index 468cec6..42be273 100644 --- a/tests/kds_s2000w_option_descriptor_tests.c +++ b/tests/kds_s2000w_option_descriptor_tests.c @@ -174,11 +174,11 @@ void kds_s2000w_option_get_descriptor_nine_test() { SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(9); - assert_string_equal(SANE_NAME_SCAN_TL_X, option->name); - assert_string_equal(SANE_TITLE_SCAN_TL_X, option->title); - assert_string_equal(SANE_DESC_SCAN_TL_X, option->desc); + assert_string_equal("image-offset-x", option->name); + assert_string_equal("Image Offset X", option->title); + assert_string_equal("Image Offset X", option->desc); assert_int_equal(SANE_TYPE_INT, option->type); - assert_int_equal(SANE_UNIT_MM, option->unit); + assert_int_equal(SANE_UNIT_NONE, option->unit); assert_int_equal(sizeof(SANE_Int), option->size); assert_int_equal(SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, option->cap); assert_int_equal(SANE_CONSTRAINT_RANGE, option->constraint_type); @@ -191,11 +191,11 @@ void kds_s2000w_option_get_descriptor_ten_test() { SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(10); - assert_string_equal(SANE_NAME_SCAN_TL_Y, option->name); - assert_string_equal(SANE_TITLE_SCAN_TL_Y, option->title); - assert_string_equal(SANE_DESC_SCAN_TL_Y, option->desc); + assert_string_equal("image-offset-y", option->name); + assert_string_equal("Image Offset Y", option->title); + assert_string_equal("Image Offset Y", option->desc); assert_int_equal(SANE_TYPE_INT, option->type); - assert_int_equal(SANE_UNIT_MM, option->unit); + assert_int_equal(SANE_UNIT_NONE, option->unit); assert_int_equal(sizeof(SANE_Int), option->size); assert_int_equal(SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, option->cap); assert_int_equal(SANE_CONSTRAINT_RANGE, option->constraint_type); @@ -208,9 +208,9 @@ void kds_s2000w_option_get_descriptor_eleven_test() { SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(11); - assert_string_equal(SANE_NAME_PAGE_WIDTH, option->name); - assert_string_equal(SANE_TITLE_PAGE_WIDTH, option->title); - assert_string_equal(SANE_DESC_PAGE_WIDTH, option->desc); + assert_string_equal("image-width", option->name); + assert_string_equal("Image Width", option->title); + assert_string_equal("Image Width", option->desc); assert_int_equal(SANE_TYPE_INT, option->type); assert_int_equal(SANE_UNIT_NONE, option->unit); assert_int_equal(sizeof(SANE_Int), option->size); @@ -225,9 +225,9 @@ void kds_s2000w_option_get_descriptor_twelve_test() { SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(12); - assert_string_equal(SANE_NAME_PAGE_HEIGHT, option->name); - assert_string_equal(SANE_TITLE_PAGE_HEIGHT, option->title); - assert_string_equal(SANE_DESC_PAGE_HEIGHT, option->desc); + assert_string_equal("image-height", option->name); + assert_string_equal("Image Height", option->title); + assert_string_equal("Image Height", option->desc); assert_int_equal(SANE_TYPE_INT, option->type); assert_int_equal(SANE_UNIT_NONE, option->unit); assert_int_equal(sizeof(SANE_Int), option->size);