Lines Matching defs:option
1570 sane_get_option_descriptor(SANE_Handle handle, SANE_Int option)
1574 if (option < 0 || option >= NUM_OPTIONS)
1577 return s->opt + option;
1590 Activate, deactivate an option. Subroutines so we can add
1592 if we changed an option. If we did not change an option,
1597 activateOption(Epson_Scanner *s, SANE_Int option, SANE_Bool *change)
1599 if (!SANE_OPTION_IS_ACTIVE(s->opt[option].cap)) {
1600 s->opt[option].cap &= ~SANE_CAP_INACTIVE;
1606 deactivateOption(Epson_Scanner *s, SANE_Int option, SANE_Bool *change)
1608 if (SANE_OPTION_IS_ACTIVE(s->opt[option].cap)) {
1609 s->opt[option].cap |= SANE_CAP_INACTIVE;
1615 setOptionState(Epson_Scanner *s, SANE_Bool state, SANE_Int option,
1619 activateOption(s, option, change);
1621 deactivateOption(s, option, change);
1625 getvalue(SANE_Handle handle, SANE_Int option, void *value)
1628 SANE_Option_Descriptor *sopt = &(s->opt[option]);
1629 Option_Value *sval = &(s->val[option]);
1631 DBG(17, "%s: option = %d\n", __func__, option);
1633 switch (option) {
1758 /* disable film type option */
1785 /* enable film type option only if the scanner supports it */
1804 /* disable film type option */
1836 setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
1839 SANE_Option_Descriptor *sopt = &(s->opt[option]);
1840 Option_Value *sval = &(s->val[option]);
1847 DBG(17, "%s: option = %d, value = %p\n", __func__, option, value);
1866 switch (option) {
2018 sane_control_option(SANE_Handle handle, SANE_Int option, SANE_Action action,
2021 DBG(17, "%s: action = %x, option = %d\n", __func__, action, option);
2023 if (option < 0 || option >= NUM_OPTIONS)
2031 return getvalue(handle, option, value);
2034 return setvalue(handle, option, value, info);