Lines Matching defs:option
10 License, or (at your option) any later version.
703 sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
707 if ((unsigned) option >= NUM_OPTIONS || option < 0)
709 DBG (4, "sane_get_option_descriptor: option %d (%s)\n", option,
710 s->opt[option].name ? s->opt[option].name : s->opt[option].title);
711 return s->opt + option;
715 sane_control_option (SANE_Handle handle, SANE_Int option,
725 if (option >= NUM_OPTIONS || option < 0)
728 DBG (4, "sane_control_option: %s option %d (%s)\n",
732 "(unknown action with)", option,
733 s->opt[option].name ? s->opt[option].name : s->opt[option].title);
735 cap = s->opt[option].cap;
739 DBG (1, "sane_control option: option is inactive\n");
745 switch (option)
758 *(SANE_Word *) val = s->val[option].w;
762 strcpy (val, s->val[option].s);
765 DBG (1, "sane_control_option: option %d unknown\n", option);
772 DBG (1, "sane_control_option: option is not settable\n");
775 status = sanei_constrain_value (s->opt + option, val, info);
782 if (option >= OPT_TL_X && option <= OPT_BR_Y)
784 s->user_corner |= 1 << (option - OPT_TL_X);
798 switch (option)
820 s->val[option].s = strdup (val);
821 if (!s->val[option].s)
823 if (strcmp (s->val[option].s, SANE_VALUE_SCAN_MODE_GRAY) == 0)
831 s->val[option].w = *(SANE_Word *) val;
835 s->val[option].w = *(SANE_Word *) val;
839 s->val[option].w = *(SANE_Word *) val;
843 s->val[option].w = *(SANE_Word *) val;
847 s->val[option].w = *(SANE_Word *) val;
854 s->val[option].s = strdup (val);
855 if (!s->val[option].s)
881 DBG (1, "sane_control_option: option %d unknown\n", option);
884 if (option >= OPT_TL_X && option <= OPT_BR_Y)
899 if (option >= OPT_BRIGHTNESS && option <= OPT_WHITE_LEVEL)
914 DBG (1, "sane_control_option: option can't be set automatically\n");
917 switch (option)