Lines Matching refs:od

355   SANE_Option_Descriptor *od;
360 od = &test_device->opt[opt_num_opts];
361 od->name = "";
362 od->title = SANE_TITLE_NUM_OPTIONS;
363 od->desc = SANE_DESC_NUM_OPTIONS;
364 od->type = SANE_TYPE_INT;
365 od->unit = SANE_UNIT_NONE;
366 od->size = sizeof (SANE_Word);
367 od->cap = SANE_CAP_SOFT_DETECT;
368 od->constraint_type = SANE_CONSTRAINT_NONE;
369 od->constraint.range = 0;
375 od = &test_device->opt[opt_mode_group];
376 od->name = "";
377 od->title = SANE_I18N ("Scan Mode");
378 od->desc = "";
379 od->type = SANE_TYPE_GROUP;
380 od->unit = SANE_UNIT_NONE;
381 od->size = 0;
382 od->cap = 0;
383 od->constraint_type = SANE_CONSTRAINT_NONE;
384 od->constraint.range = 0;
388 od = &test_device->opt[opt_mode];
389 od->name = SANE_NAME_SCAN_MODE;
390 od->title = SANE_TITLE_SCAN_MODE;
391 od->desc = SANE_DESC_SCAN_MODE;
392 od->type = SANE_TYPE_STRING;
393 od->unit = SANE_UNIT_NONE;
394 od->size = (SANE_Int) max_string_size (mode_list);
395 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
396 od->constraint_type = SANE_CONSTRAINT_STRING_LIST;
397 od->constraint.string_list = mode_list;
398 test_device->val[opt_mode].s = malloc ((size_t) od->size);
404 od = &test_device->opt[opt_depth];
405 od->name = SANE_NAME_BIT_DEPTH;
406 od->title = SANE_TITLE_BIT_DEPTH;
407 od->desc = SANE_DESC_BIT_DEPTH;
408 od->type = SANE_TYPE_INT;
409 od->unit = SANE_UNIT_NONE;
410 od->size = sizeof (SANE_Word);
411 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
412 od->constraint_type = SANE_CONSTRAINT_WORD_LIST;
413 od->constraint.word_list = depth_list;
417 od = &test_device->opt[opt_hand_scanner];
418 od->name = "hand-scanner";
419 od->title = SANE_I18N ("Hand-scanner simulation");
420 od->desc = SANE_I18N ("Simulate a hand-scanner. Hand-scanners do not "
426 od->type = SANE_TYPE_BOOL;
427 od->unit = SANE_UNIT_NONE;
428 od->size = sizeof (SANE_Word);
429 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
430 od->constraint_type = SANE_CONSTRAINT_NONE;
431 od->constraint.range = 0;
435 od = &test_device->opt[opt_three_pass];
436 od->name = "three-pass";
437 od->title = SANE_I18N ("Three-pass simulation");
438 od->desc = SANE_I18N ("Simulate a three-pass scanner. In color mode, three "
440 od->type = SANE_TYPE_BOOL;
441 od->unit = SANE_UNIT_NONE;
442 od->size = sizeof (SANE_Word);
443 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
445 od->cap |= SANE_CAP_INACTIVE;
446 od->constraint_type = SANE_CONSTRAINT_NONE;
447 od->constraint.range = 0;
451 od = &test_device->opt[opt_three_pass_order];
452 od->name = "three-pass-order";
453 od->title = SANE_I18N ("Set the order of frames");
454 od->desc = SANE_I18N ("Set the order of frames in three-pass color mode.");
455 od->type = SANE_TYPE_STRING;
456 od->unit = SANE_UNIT_NONE;
457 od->size = (SANE_Int) max_string_size (order_list);
458 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
460 od->cap |= SANE_CAP_INACTIVE;
462 od->cap |= SANE_CAP_INACTIVE;
463 od->constraint_type = SANE_CONSTRAINT_STRING_LIST;
464 od->constraint.string_list = order_list;
465 test_device->val[opt_three_pass_order].s = malloc ((size_t) od->size);
471 od = &test_device->opt[opt_resolution];
472 od->name = SANE_NAME_SCAN_RESOLUTION;
473 od->title = SANE_TITLE_SCAN_RESOLUTION;
474 od->desc = SANE_DESC_SCAN_RESOLUTION;
475 od->type = SANE_TYPE_FIXED;
476 od->unit = SANE_UNIT_DPI;
477 od->size = sizeof (SANE_Word);
478 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
479 od->constraint_type = SANE_CONSTRAINT_RANGE;
480 od->constraint.range = &resolution_range;
484 od = &test_device->opt[opt_scan_source];
485 od->name = SANE_NAME_SCAN_SOURCE;
486 od->title = SANE_TITLE_SCAN_SOURCE;
487 od->desc = SANE_I18N("If Automatic Document Feeder is selected, the feeder will be 'empty' after 10 scans.");
488 od->type = SANE_TYPE_STRING;
489 od->unit = SANE_UNIT_NONE;
490 od->size = (SANE_Int) max_string_size (source_list);
491 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
492 od->constraint_type = SANE_CONSTRAINT_STRING_LIST;
493 od->constraint.string_list = source_list;
494 test_device->val[opt_scan_source].s = malloc ((size_t) od->size);
500 od = &test_device->opt[opt_special_group];
501 od->name = "";
502 od->title = SANE_I18N ("Special Options");
503 od->desc = "";
504 od->type = SANE_TYPE_GROUP;
505 od->unit = SANE_UNIT_NONE;
506 od->size = 0;
507 od->cap = 0;
508 od->constraint_type = SANE_CONSTRAINT_NONE;
509 od->constraint.range = 0;
513 od = &test_device->opt[opt_test_picture];
514 od->name = "test-picture";
515 od->title = SANE_I18N ("Select the test picture");
516 od->desc =
524 od->type = SANE_TYPE_STRING;
525 od->unit = SANE_UNIT_NONE;
526 od->size = (SANE_Int) max_string_size (test_picture_list);
527 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
528 od->constraint_type = SANE_CONSTRAINT_STRING_LIST;
529 od->constraint.string_list = test_picture_list;
530 test_device->val[opt_test_picture].s = malloc ((size_t) od->size);
536 od = &test_device->opt[opt_invert_endianess];
537 od->name = "invert-endianess";
538 od->title = SANE_I18N ("Invert endianness");
539 od->desc = SANE_I18N ("Exchange upper and lower byte of image data in 16 "
543 od->type = SANE_TYPE_BOOL;
544 od->unit = SANE_UNIT_NONE;
545 od->size = sizeof (SANE_Word);
546 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
547 od->cap |= SANE_CAP_INACTIVE;
548 od->constraint_type = SANE_CONSTRAINT_NONE;
549 od->constraint.range = 0;
553 od = &test_device->opt[opt_read_limit];
554 od->name = "read-limit";
555 od->title = SANE_I18N ("Read limit");
556 od->desc = SANE_I18N ("Limit the amount of data transferred with each "
558 od->type = SANE_TYPE_BOOL;
559 od->unit = SANE_UNIT_NONE;
560 od->size = sizeof (SANE_Word);
561 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
562 od->constraint_type = SANE_CONSTRAINT_NONE;
563 od->constraint.range = 0;
567 od = &test_device->opt[opt_read_limit_size];
568 od->name = "read-limit-size";
569 od->title = SANE_I18N ("Size of read-limit");
570 od->desc = SANE_I18N ("The (maximum) amount of data transferred with each "
572 od->type = SANE_TYPE_INT;
573 od->unit = SANE_UNIT_NONE;
574 od->size = sizeof (SANE_Word);
575 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
577 od->cap |= SANE_CAP_INACTIVE;
578 od->constraint_type = SANE_CONSTRAINT_RANGE;
579 od->constraint.range = &read_limit_size_range;
583 od = &test_device->opt[opt_read_delay];
584 od->name = "read-delay";
585 od->title = SANE_I18N ("Read delay");
586 od->desc = SANE_I18N ("Delay the transfer of data to the pipe.");
587 od->type = SANE_TYPE_BOOL;
588 od->unit = SANE_UNIT_NONE;
589 od->size = sizeof (SANE_Word);
590 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
591 od->constraint_type = SANE_CONSTRAINT_NONE;
592 od->constraint.range = 0;
596 od = &test_device->opt[opt_read_delay_duration];
597 od->name = "read-delay-duration";
598 od->title = SANE_I18N ("Duration of read-delay");
599 od->desc = SANE_I18N ("How long to wait after transferring each buffer of "
601 od->type = SANE_TYPE_INT;
602 od->unit = SANE_UNIT_MICROSECOND;
603 od->size = sizeof (SANE_Word);
604 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
606 od->cap |= SANE_CAP_INACTIVE;
607 od->constraint_type = SANE_CONSTRAINT_RANGE;
608 od->constraint.range = &read_delay_duration_range;
612 od = &test_device->opt[opt_read_status_code];
613 od->name = "read-return-value";
614 od->title = SANE_I18N ("Return-value of sane_read");
615 od->desc =
619 od->type = SANE_TYPE_STRING;
620 od->unit = SANE_UNIT_NONE;
621 od->size = (SANE_Int) max_string_size (read_status_code_list);
622 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
623 od->constraint_type = SANE_CONSTRAINT_STRING_LIST;
624 od->constraint.string_list = read_status_code_list;
625 test_device->val[opt_read_status_code].s = malloc ((size_t) od->size);
631 od = &test_device->opt[opt_ppl_loss];
632 od->name = "ppl-loss";
633 od->title = SANE_I18N ("Loss of pixels per line");
634 od->desc =
637 od->type = SANE_TYPE_INT;
638 od->unit = SANE_UNIT_PIXEL;
639 od->size = sizeof (SANE_Word);
640 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
641 od->constraint_type = SANE_CONSTRAINT_RANGE;
642 od->constraint.range = &ppl_loss_range;
646 od = &test_device->opt[opt_fuzzy_parameters];
647 od->name = "fuzzy-parameters";
648 od->title = SANE_I18N ("Fuzzy parameters");
649 od->desc = SANE_I18N ("Return fuzzy lines and bytes per line when "
651 od->type = SANE_TYPE_BOOL;
652 od->unit = SANE_UNIT_NONE;
653 od->size = sizeof (SANE_Word);
654 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
655 od->constraint_type = SANE_CONSTRAINT_NONE;
656 od->constraint.range = 0;
660 od = &test_device->opt[opt_non_blocking];
661 od->name = "non-blocking";
662 od->title = SANE_I18N ("Use non-blocking IO");
663 od->desc = SANE_I18N ("Use non-blocking IO for sane_read() if supported "
665 od->type = SANE_TYPE_BOOL;
666 od->unit = SANE_UNIT_NONE;
667 od->size = sizeof (SANE_Word);
668 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
669 od->constraint_type = SANE_CONSTRAINT_NONE;
670 od->constraint.range = 0;
674 od = &test_device->opt[opt_select_fd];
675 od->name = "select-fd";
676 od->title = SANE_I18N ("Offer select file descriptor");
677 od->desc = SANE_I18N ("Offer a select filedescriptor for detecting if "
679 od->type = SANE_TYPE_BOOL;
680 od->unit = SANE_UNIT_NONE;
681 od->size = sizeof (SANE_Word);
682 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
683 od->constraint_type = SANE_CONSTRAINT_NONE;
684 od->constraint.range = 0;
688 od = &test_device->opt[opt_enable_test_options];
689 od->name = "enable-test-options";
690 od->title = SANE_I18N ("Enable test options");
691 od->desc = SANE_I18N ("Enable various test options. This is for testing "
694 od->type = SANE_TYPE_BOOL;
695 od->unit = SANE_UNIT_NONE;
696 od->size = sizeof (SANE_Word);
697 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
698 od->constraint_type = SANE_CONSTRAINT_NONE;
699 od->constraint.range = 0;
703 od = &test_device->opt[opt_print_options];
704 od->name = "print-options";
705 od->title = SANE_I18N ("Print options");
706 od->desc = SANE_I18N ("Print a list of all options.");
707 od->type = SANE_TYPE_BUTTON;
708 od->unit = SANE_UNIT_NONE;
709 od->size = 0;
710 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
711 od->constraint_type = SANE_CONSTRAINT_NONE;
712 od->constraint.string_list = 0;
716 od = &test_device->opt[opt_geometry_group];
717 od->name = "";
718 od->title = SANE_I18N ("Geometry");
719 od->desc = "";
720 od->type = SANE_TYPE_GROUP;
721 od->unit = SANE_UNIT_NONE;
722 od->size = 0;
723 od->cap = 0;
724 od->constraint_type = SANE_CONSTRAINT_NONE;
725 od->constraint.range = 0;
729 od = &test_device->opt[opt_tl_x];
730 od->name = SANE_NAME_SCAN_TL_X;
731 od->title = SANE_TITLE_SCAN_TL_X;
732 od->desc = SANE_DESC_SCAN_TL_X;
733 od->type = SANE_TYPE_FIXED;
734 od->unit = SANE_UNIT_MM;
735 od->size = sizeof (SANE_Word);
736 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
737 od->constraint_type = SANE_CONSTRAINT_RANGE;
738 od->constraint.range = &geometry_range;
742 od = &test_device->opt[opt_tl_y];
743 od->name = SANE_NAME_SCAN_TL_Y;
744 od->title = SANE_TITLE_SCAN_TL_Y;
745 od->desc = SANE_DESC_SCAN_TL_Y;
746 od->type = SANE_TYPE_FIXED;
747 od->unit = SANE_UNIT_MM;
748 od->size = sizeof (SANE_Word);
749 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
750 od->constraint_type = SANE_CONSTRAINT_RANGE;
751 od->constraint.range = &geometry_range;
755 od = &test_device->opt[opt_br_x];
756 od->name = SANE_NAME_SCAN_BR_X;
757 od->title = SANE_TITLE_SCAN_BR_X;
758 od->desc = SANE_DESC_SCAN_BR_X;
759 od->type = SANE_TYPE_FIXED;
760 od->unit = SANE_UNIT_MM;
761 od->size = sizeof (SANE_Word);
762 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
763 od->constraint_type = SANE_CONSTRAINT_RANGE;
764 od->constraint.range = &geometry_range;
768 od = &test_device->opt[opt_br_y];
769 od->name = SANE_NAME_SCAN_BR_Y;
770 od->title = SANE_TITLE_SCAN_BR_Y;
771 od->desc = SANE_DESC_SCAN_BR_Y;
772 od->type = SANE_TYPE_FIXED;
773 od->unit = SANE_UNIT_MM;
774 od->size = sizeof (SANE_Word);
775 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
776 od->constraint_type = SANE_CONSTRAINT_RANGE;
777 od->constraint.range = &geometry_range;
781 od = &test_device->opt[opt_bool_group];
782 od->name = "";
783 od->title = SANE_I18N ("Bool test options");
784 od->desc = "";
785 od->type = SANE_TYPE_GROUP;
786 od->unit = SANE_UNIT_NONE;
787 od->size = 0;
788 od->cap = SANE_CAP_ADVANCED;
789 od->constraint_type = SANE_CONSTRAINT_NONE;
790 od->constraint.range = 0;
794 od = &test_device->opt[opt_bool_soft_select_soft_detect];
795 od->name = "bool-soft-select-soft-detect";
796 od->title = SANE_I18N ("(1/6) Bool soft select soft detect");
797 od->desc =
801 od->type = SANE_TYPE_BOOL;
802 od->unit = SANE_UNIT_NONE;
803 od->size = sizeof (SANE_Word);
804 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
806 od->cap |= SANE_CAP_INACTIVE;
807 od->constraint_type = SANE_CONSTRAINT_NONE;
808 od->constraint.range = 0;
812 od = &test_device->opt[opt_bool_hard_select_soft_detect];
813 od->name = "bool-hard-select-soft-detect";
814 od->title = SANE_I18N ("(2/6) Bool hard select soft detect");
815 od->desc =
820 od->type = SANE_TYPE_BOOL;
821 od->unit = SANE_UNIT_NONE;
822 od->size = sizeof (SANE_Word);
823 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_HARD_SELECT | SANE_CAP_ADVANCED;
825 od->cap |= SANE_CAP_INACTIVE;
826 od->constraint_type = SANE_CONSTRAINT_NONE;
827 od->constraint.range = 0;
831 od = &test_device->opt[opt_bool_hard_select];
832 od->name = "bool-hard-select";
833 od->title = SANE_I18N ("(3/6) Bool hard select");
834 od->desc = SANE_I18N ("(3/6) Bool test option that has hard select "
839 od->type = SANE_TYPE_BOOL;
840 od->unit = SANE_UNIT_NONE;
841 od->size = sizeof (SANE_Word);
842 od->cap = SANE_CAP_HARD_SELECT | SANE_CAP_ADVANCED;
844 od->cap |= SANE_CAP_INACTIVE;
845 od->constraint_type = SANE_CONSTRAINT_NONE;
846 od->constraint.range = 0;
850 od = &test_device->opt[opt_bool_soft_detect];
851 od->name = "bool-soft-detect";
852 od->title = SANE_I18N ("(4/6) Bool soft detect");
853 od->desc = SANE_I18N ("(4/6) Bool test option that has soft detect "
856 od->type = SANE_TYPE_BOOL;
857 od->unit = SANE_UNIT_NONE;
858 od->size = sizeof (SANE_Word);
859 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_ADVANCED;
861 od->cap |= SANE_CAP_INACTIVE;
862 od->constraint_type = SANE_CONSTRAINT_NONE;
863 od->constraint.range = 0;
867 od = &test_device->opt[opt_bool_soft_select_soft_detect_emulated];
868 od->name = "bool-soft-select-soft-detect-emulated";
869 od->title = SANE_I18N ("(5/6) Bool soft select soft detect emulated");
870 od->desc = SANE_I18N ("(5/6) Bool test option that has soft select, soft "
872 od->type = SANE_TYPE_BOOL;
873 od->unit = SANE_UNIT_NONE;
874 od->size = sizeof (SANE_Word);
875 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED
878 od->cap |= SANE_CAP_INACTIVE;
879 od->constraint_type = SANE_CONSTRAINT_NONE;
880 od->constraint.range = 0;
884 od = &test_device->opt[opt_bool_soft_select_soft_detect_auto];
885 od->name = "bool-soft-select-soft-detect-auto";
886 od->title = SANE_I18N ("(6/6) Bool soft select soft detect auto");
887 od->desc = SANE_I18N ("(6/6) Bool test option that has soft select, soft "
890 od->type = SANE_TYPE_BOOL;
891 od->unit = SANE_UNIT_NONE;
892 od->size = sizeof (SANE_Word);
893 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED
896 od->cap |= SANE_CAP_INACTIVE;
897 od->constraint_type = SANE_CONSTRAINT_NONE;
898 od->constraint.range = 0;
902 od = &test_device->opt[opt_int_group];
903 od->name = "";
904 od->title = SANE_I18N ("Int test options");
905 od->desc = "";
906 od->type = SANE_TYPE_GROUP;
907 od->unit = SANE_UNIT_NONE;
908 od->size = 0;
909 od->cap = SANE_CAP_ADVANCED;
910 od->constraint_type = SANE_CONSTRAINT_NONE;
911 od->constraint.range = 0;
915 od = &test_device->opt[opt_int];
916 od->name = "int";
917 od->title = SANE_I18N ("(1/7) Int");
918 od->desc = SANE_I18N ("(1/7) Int test option with no unit and no "
920 od->type = SANE_TYPE_INT;
921 od->unit = SANE_UNIT_NONE;
922 od->size = sizeof (SANE_Word);
923 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
925 od->cap |= SANE_CAP_INACTIVE;
926 od->constraint_type = SANE_CONSTRAINT_NONE;
927 od->constraint.range = 0;
931 od = &test_device->opt[opt_int_constraint_range];
932 od->name = "int-constraint-range";
933 od->title = SANE_I18N ("(2/7) Int constraint range");
934 od->desc = SANE_I18N ("(2/7) Int test option with unit pixel and "
937 od->type = SANE_TYPE_INT;
938 od->unit = SANE_UNIT_PIXEL;
939 od->size = sizeof (SANE_Word);
940 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
942 od->cap |= SANE_CAP_INACTIVE;
943 od->constraint_type = SANE_CONSTRAINT_RANGE;
944 od->constraint.range = &int_constraint_range;
948 od = &test_device->opt[opt_int_constraint_word_list];
949 od->name = "int-constraint-word-list";
950 od->title = SANE_I18N ("(3/7) Int constraint word list");
951 od->desc = SANE_I18N ("(3/7) Int test option with unit bits and "
953 od->type = SANE_TYPE_INT;
954 od->unit = SANE_UNIT_BIT;
955 od->size = sizeof (SANE_Word);
956 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
958 od->cap |= SANE_CAP_INACTIVE;
959 od->constraint_type = SANE_CONSTRAINT_WORD_LIST;
960 od->constraint.word_list = int_constraint_word_list;
964 od = &test_device->opt[opt_int_array];
965 od->name = "int-constraint-array";
966 od->title = SANE_I18N ("(4/7) Int array");
967 od->desc = SANE_I18N ("(4/7) Int test option with unit mm and using "
969 od->type = SANE_TYPE_INT;
970 od->unit = SANE_UNIT_MM;
971 od->size = 6 * sizeof (SANE_Word);
972 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
974 od->cap |= SANE_CAP_INACTIVE;
975 od->constraint_type = SANE_CONSTRAINT_NONE;
976 od->constraint.range = 0;
980 od = &test_device->opt[opt_int_array_constraint_range];
981 od->name = "int-constraint-array-constraint-range";
982 od->title = SANE_I18N ("(5/7) Int array constraint range");
983 od->desc = SANE_I18N ("(5/7) Int test option with unit dpi and using "
986 od->type = SANE_TYPE_INT;
987 od->unit = SANE_UNIT_DPI;
988 od->size = 6 * sizeof (SANE_Word);
989 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
991 od->cap |= SANE_CAP_INACTIVE;
992 od->constraint_type = SANE_CONSTRAINT_RANGE;
993 od->constraint.range = &int_constraint_range;
998 od = &test_device->opt[opt_int_array_constraint_word_list];
999 od->name = "int-constraint-array-constraint-word-list";
1000 od->title = SANE_I18N ("(6/7) Int array constraint word list");
1001 od->desc = SANE_I18N ("(6/7) Int test option with unit percent and using "
1003 od->type = SANE_TYPE_INT;
1004 od->unit = SANE_UNIT_PERCENT;
1005 od->size = 6 * sizeof (SANE_Word);
1006 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1008 od->cap |= SANE_CAP_INACTIVE;
1009 od->constraint_type = SANE_CONSTRAINT_WORD_LIST;
1010 od->constraint.word_list = int_constraint_word_list;
1015 od = &test_device->opt[opt_int_inexact];
1016 od->name = "int-inexact";
1017 od->title = SANE_I18N ("(7/7) Int inexact");
1018 od->desc = SANE_I18N ("(7/7) Int test option that modifies the value "
1020 od->type = SANE_TYPE_INT;
1021 od->unit = SANE_UNIT_NONE;
1022 od->size = sizeof (SANE_Word);
1023 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1025 od->cap |= SANE_CAP_INACTIVE;
1026 od->constraint_type = SANE_CONSTRAINT_NONE;
1027 od->constraint.range = 0;
1033 od = &test_device->opt[opt_gamma_red];
1034 od->name = SANE_NAME_GAMMA_VECTOR_R;
1035 od->title = SANE_TITLE_GAMMA_VECTOR_R;
1036 od->desc = SANE_DESC_GAMMA_VECTOR_R;
1037 od->type = SANE_TYPE_INT;
1038 od->unit = SANE_UNIT_NONE;
1039 od->size = 256 * sizeof (SANE_Word);
1040 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1041 od->constraint_type = SANE_CONSTRAINT_RANGE;
1042 od->constraint.range = &gamma_range;
1047 od = &test_device->opt[opt_gamma_green];
1048 od->name = SANE_NAME_GAMMA_VECTOR_G;
1049 od->title = SANE_TITLE_GAMMA_VECTOR_G;
1050 od->desc = SANE_DESC_GAMMA_VECTOR_G;
1051 od->type = SANE_TYPE_INT;
1052 od->unit = SANE_UNIT_NONE;
1053 od->size = 256 * sizeof (SANE_Word);
1054 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1055 od->constraint_type = SANE_CONSTRAINT_RANGE;
1056 od->constraint.range = &gamma_range;
1061 od = &test_device->opt[opt_gamma_blue];
1062 od->name = SANE_NAME_GAMMA_VECTOR_B;
1063 od->title = SANE_TITLE_GAMMA_VECTOR_B;
1064 od->desc = SANE_DESC_GAMMA_VECTOR_B;
1065 od->type = SANE_TYPE_INT;
1066 od->unit = SANE_UNIT_NONE;
1067 od->size = 256 * sizeof (SANE_Word);
1068 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1069 od->constraint_type = SANE_CONSTRAINT_RANGE;
1070 od->constraint.range = &gamma_range;
1076 od = &test_device->opt[opt_gamma_all];
1077 od->name = SANE_NAME_GAMMA_VECTOR;
1078 od->title = SANE_TITLE_GAMMA_VECTOR;
1079 od->desc = SANE_DESC_GAMMA_VECTOR;
1080 od->type = SANE_TYPE_INT;
1081 od->unit = SANE_UNIT_NONE;
1082 od->size = GAMMA_ALL_SIZE * sizeof (SANE_Word);
1083 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1084 od->constraint_type = SANE_CONSTRAINT_RANGE;
1085 od->constraint.range = &gamma_range;
1089 od = &test_device->opt[opt_fixed_group];
1090 od->name = "";
1091 od->title = SANE_I18N ("Fixed test options");
1092 od->desc = "";
1093 od->type = SANE_TYPE_GROUP;
1094 od->unit = SANE_UNIT_NONE;
1095 od->size = 0;
1096 od->cap = SANE_CAP_ADVANCED;
1097 od->constraint_type = SANE_CONSTRAINT_NONE;
1098 od->constraint.range = 0;
1102 od = &test_device->opt[opt_fixed];
1103 od->name = "fixed";
1104 od->title = SANE_I18N ("(1/3) Fixed");
1105 od->desc = SANE_I18N ("(1/3) Fixed test option with no unit and no "
1107 od->type = SANE_TYPE_FIXED;
1108 od->unit = SANE_UNIT_NONE;
1109 od->size = sizeof (SANE_Word);
1110 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1112 od->cap |= SANE_CAP_INACTIVE;
1113 od->constraint_type = SANE_CONSTRAINT_NONE;
1114 od->constraint.range = 0;
1118 od = &test_device->opt[opt_fixed_constraint_range];
1119 od->name = "fixed-constraint-range";
1120 od->title = SANE_I18N ("(2/3) Fixed constraint range");
1121 od->desc = SANE_I18N ("(2/3) Fixed test option with unit microsecond and "
1124 od->type = SANE_TYPE_FIXED;
1125 od->unit = SANE_UNIT_MICROSECOND;
1126 od->size = sizeof (SANE_Word);
1127 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1129 od->cap |= SANE_CAP_INACTIVE;
1130 od->constraint_type = SANE_CONSTRAINT_RANGE;
1131 od->constraint.range = &fixed_constraint_range;
1135 od = &test_device->opt[opt_fixed_constraint_word_list];
1136 od->name = "fixed-constraint-word-list";
1137 od->title = SANE_I18N ("(3/3) Fixed constraint word list");
1138 od->desc = SANE_I18N ("(3/3) Fixed test option with no unit and "
1140 od->type = SANE_TYPE_FIXED;
1141 od->unit = SANE_UNIT_NONE;
1142 od->size = sizeof (SANE_Word);
1143 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT | SANE_CAP_ADVANCED;
1145 od->cap |= SANE_CAP_INACTIVE;
1146 od->constraint_type = SANE_CONSTRAINT_WORD_LIST;
1147 od->constraint.word_list = fixed_constraint_word_list;
1151 od = &test_device->opt[opt_string_group];
1152 od->name = "";
1153 od->title = SANE_I18N ("String test options");
1154 od->desc = "";
1155 od->type = SANE_TYPE_GROUP;
1156 od->unit = SANE_UNIT_NONE;
1157 od->size = 0;
1158 od->cap = 0;
1159 od->constraint_type = SANE_CONSTRAINT_NONE;
1160 od->constraint.range = 0;
1164 od = &test_device->opt[opt_string];
1165 od->name = "string";
1166 od->title = SANE_I18N ("(1/3) String");
1167 od->desc = SANE_I18N ("(1/3) String test option without constraint.");
1168 od->type = SANE_TYPE_STRING;
1169 od->unit = SANE_UNIT_NONE;
1170 od->size = (SANE_Int) strlen (init_string) + 1;
1171 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
1173 od->cap |= SANE_CAP_INACTIVE;
1174 od->constraint_type = SANE_CONSTRAINT_NONE;
1175 od->constraint.string_list = 0;
1176 test_device->val[opt_string].s = malloc ((size_t) od->size);
1182 od = &test_device->opt[opt_string_constraint_string_list];
1183 od->name = "string-constraint-string-list";
1184 od->title = SANE_I18N ("(2/3) String constraint string list");
1185 od->desc = SANE_I18N ("(2/3) String test option with string list "
1187 od->type = SANE_TYPE_STRING;
1188 od->unit = SANE_UNIT_NONE;
1189 od->size = (SANE_Int) max_string_size (string_constraint_string_list);
1190 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
1192 od->cap |= SANE_CAP_INACTIVE;
1193 od->constraint_type = SANE_CONSTRAINT_STRING_LIST;
1194 od->constraint.string_list = string_constraint_string_list;
1195 test_device->val[opt_string_constraint_string_list].s = malloc ((size_t) od->size);
1202 od = &test_device->opt[opt_string_constraint_long_string_list];
1203 od->name = "string-constraint-long-string-list";
1204 od->title = SANE_I18N ("(3/3) String constraint long string list");
1205 od->desc = SANE_I18N ("(3/3) String test option with string list "
1207 od->type = SANE_TYPE_STRING;
1208 od->unit = SANE_UNIT_NONE;
1209 od->size = (SANE_Int) max_string_size (string_constraint_long_string_list);
1210 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
1212 od->cap |= SANE_CAP_INACTIVE;
1213 od->constraint_type = SANE_CONSTRAINT_STRING_LIST;
1214 od->constraint.string_list = string_constraint_long_string_list;
1216 malloc ((size_t) od->size);
1223 od = &test_device->opt[opt_button_group];
1224 od->name = "";
1225 od->title = SANE_I18N ("Button test options");
1226 od->desc = "";
1227 od->type = SANE_TYPE_GROUP;
1228 od->unit = SANE_UNIT_NONE;
1229 od->size = 0;
1230 od->cap = 0;
1231 od->constraint_type = SANE_CONSTRAINT_NONE;
1232 od->constraint.range = 0;
1236 od = &test_device->opt[opt_button];
1237 od->name = "button";
1238 od->title = SANE_I18N ("(1/1) Button");
1239 od->desc = SANE_I18N ("(1/1) Button test option. Prints some text...");
1240 od->type = SANE_TYPE_BUTTON;
1241 od->unit = SANE_UNIT_NONE;
1242 od->size = 0;
1243 od->cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;
1245 od->cap |= SANE_CAP_INACTIVE;
1246 od->constraint_type = SANE_CONSTRAINT_NONE;
1247 od->constraint.string_list = 0;
1581 SANE_Option_Descriptor *od;
1587 od = &test_device->opt[option_number];
1589 DBG (0, " name: `%s'\n", od->name);
1590 DBG (0, " title: `%s'\n", od->title);
1591 DBG (0, " description: `%s'\n", od->desc);
1593 od->type == SANE_TYPE_BOOL ? "SANE_TYPE_BOOL" :
1594 od->type == SANE_TYPE_INT ? "SANE_TYPE_INT" :
1595 od->type == SANE_TYPE_FIXED ? "SANE_TYPE_FIXED" :
1596 od->type == SANE_TYPE_STRING ? "SANE_TYPE_STRING" :
1597 od->type == SANE_TYPE_BUTTON ? "SANE_TYPE_BUTTON" :
1598 od->type == SANE_TYPE_GROUP ? "SANE_TYPE_GROUP" : "unknown");
1600 od->unit == SANE_UNIT_NONE ? "SANE_UNIT_NONE" :
1601 od->unit == SANE_UNIT_PIXEL ? "SANE_UNIT_PIXEL" :
1602 od->unit == SANE_UNIT_BIT ? "SANE_UNIT_BIT" :
1603 od->unit == SANE_UNIT_MM ? "SANE_UNIT_MM" :
1604 od->unit == SANE_UNIT_DPI ? "SANE_UNIT_DPI" :
1605 od->unit == SANE_UNIT_PERCENT ? "SANE_UNIT_PERCENT" :
1606 od->unit == SANE_UNIT_MICROSECOND ? "SANE_UNIT_MICROSECOND" :
1608 DBG (0, " size: %d\n", od->size);
1610 if (od->cap & SANE_CAP_SOFT_SELECT)
1612 if (od->cap & SANE_CAP_HARD_SELECT)
1614 if (od->cap & SANE_CAP_SOFT_DETECT)
1616 if (od->cap & SANE_CAP_EMULATED)
1618 if (od->cap & SANE_CAP_AUTOMATIC)
1620 if (od->cap & SANE_CAP_INACTIVE)
1622 if (od->cap & SANE_CAP_ADVANCED)
1626 od->constraint_type == SANE_CONSTRAINT_NONE ?
1628 od->constraint_type == SANE_CONSTRAINT_RANGE ?
1630 od->constraint_type == SANE_CONSTRAINT_WORD_LIST ?
1632 od->constraint_type == SANE_CONSTRAINT_STRING_LIST ?