]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change original nameing cropping options
authorBastian Dehn <hhaalo@arcor.de>
Mon, 17 Feb 2025 20:29:26 +0000 (21:29 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Mon, 17 Feb 2025 20:30:47 +0000 (21:30 +0100)
src/kds_s2000w_option_descriptors.c
tests/kds_s2000w_option_descriptor_tests.c

index 7256ede94a0c9c3ea54834efd972d95f094178e1..0da45177f640bb23338d7517b74cf7caa0ac6985 100644 (file)
@@ -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),
index 468cec6ded415e74d613ecb934d5b93d6ef107ce..42be273bc7cdbe787d40d137ab3a8405d076a7dc 100644 (file)
@@ -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);