]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change image offsets with tl x y
authorBastian Dehn <hhaalo@arcor.de>
Sun, 16 Feb 2025 20:46:33 +0000 (21:46 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 16 Feb 2025 20:46:33 +0000 (21:46 +0100)
src/kds_s2000w_option_descriptors.c
tests/kds_s2000w_option_descriptor_tests.c

index 494c37083b8fad5dc908eccbae6fff88641fa1d9..d9937e2e86b64fc525516af4d049ecd29e6b970a 100644 (file)
@@ -951,11 +951,11 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_offset_x()
        constraint->quant = 1;
 
        SANE_Option_Descriptor descriptor = {
-               "image-offset-x",
-               "Image offset x",
-               "Image offset x",
+               SANE_NAME_SCAN_TL_X,
+               SANE_TITLE_SCAN_TL_X,
+               SANE_DESC_SCAN_TL_X,
                SANE_TYPE_INT,
-               SANE_UNIT_NONE,
+               SANE_UNIT_MM,
                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 = {
-               "image-offset-y",
-               "Image offset y",
-               "Image offset y",
+               SANE_NAME_SCAN_TL_Y,
+               SANE_TITLE_SCAN_TL_Y,
+               SANE_DESC_SCAN_TL_Y,
                SANE_TYPE_INT,
-               SANE_UNIT_NONE,
+               SANE_UNIT_MM,
                sizeof(SANE_Int),
                SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT,
                SANE_CONSTRAINT_RANGE,
index 4579f1c8813e209e1ad0458f851d0dcde386768d..0ea0ac8894ca76c9187bd9117cc6490132b2e431 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("image-offset-x", option->name);
-       assert_string_equal("Image offset x", option->title);
-       assert_string_equal("Image offset x", option->desc);
+       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_int_equal(SANE_TYPE_INT, option->type);
-       assert_int_equal(SANE_UNIT_NONE, option->unit);
+       assert_int_equal(SANE_UNIT_MM, 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("image-offset-y", option->name);
-       assert_string_equal("Image offset y", option->title);
-       assert_string_equal("Image offset y", option->desc);
+       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_int_equal(SANE_TYPE_INT, option->type);
-       assert_int_equal(SANE_UNIT_NONE, option->unit);
+       assert_int_equal(SANE_UNIT_MM, 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);