[sane-devel] plustek:libusb bugs on canon canoscan n1220U

Gerhard Jaeger gerhard at gjaeger.de
Wed Aug 9 13:41:06 UTC 2006


On Wednesday 09 August 2006 15:20, Étienne Bersac wrote:
> Hello,
> 
> > SANE standard 1 does not specify how to handle scanner buttons,
> > but it is clear, that an option, which deals with a button has to deliver
> > a value (button pressed or not). Regarding that requirement, you have either
> > to use SANE_TYPE_BOOL or SANE_TYPE_INT - I choose BOOL.
> > SANE_TYPE_BUTTON is maybe misleading. It is intended to be used by a backend
> > to allow changes by pressing that button from the GUI and NOT to reflect
> > the status of a scanner button. An option of type SANE_TYPE_BUTTON has no value.
> > See also chapter 4.2.9.4 of the SANE Standard 
> > http://www.sane-project.org/html/doc011.html
> 
> Okey, the strange part of this button handling is : how an app using
> sane know an option reflect a button status ? Just in order to ignore
> that option. For example, xsane advanced options dialog shows a fieldset
> entitled "Buttons" with one option "Scanner button" which is inactive
> and always false. That's useless. I don't know how multiple buttons are
> handle. Do the app has to parse name or title or desc field in order to
> find a "button" string and then treat the option as a button state
> option ?
> 

checkout the experimental tree of SANE CVS, there's a sample application
which does the button handling. XSane is not aware of this "special" handling,
and therefore it only displays the button(s).
Please keep in mind, that the scanner-button handling is not defined in the
SANE standard and more or less inofficial (the avision backend does it the
same way)

--
Gerhard




More information about the sane-devel mailing list