[sane-standard] Button handling

m. allan noah kitno455 at gmail.com
Mon Jan 22 01:54:28 CET 2007


On 1/21/07, Étienne Bersac <bersace03 at laposte.net> wrote:
> Hi,
>
> > SANE_TYPE_BUTTON is _completely_ different from the things we have
> > discussed so far. The name is perhaps misleading, but it means an
> > option that may be represented in the GUI of a frontend by a
> > clickable button. Several backends provide such options, a quick
> > grep through the source code of the backends shows that they are
> > used for things like "swicth lamp on/off", "calbrate now" etc.
>
> Ok, thanks, i misunderstood this. Off-topic, can you explain what
> actually is calibration, and how often is that needed ?

you must be a front-end developer :) there is a natural variance in strength
of signal from each cell in a read-head, variation in brightness of
lamp, etc. most scanners
have a white or black (or both) stripe inside, which the head reads to
determine offsets
required to correct for many such issues. some scanners ($$$) do this
automatically, others require this from backend.

>
> > Cleanup of Sane1 options will not work. Why should anyone put much
> > work into cleanup of old code, when you can expect that work on new
> > code will start quite soon?
>
> Whatever version you call it, (1.1 or 2.0), SANE needs a clean up in
> option names and value variation in backends. That's doable in SANE 1, i
> mean keeping the current SANE API (excluding Well-Known-Option by using
> an external Well-Known options reference), keeping binary compatibility.
>

sure- its doable, but will any developer bother if he is thinking
about sane2? perhaps- if a minimum subset of this list is required for
sane2 compliance...

> > As explained above, some scanners have "UI elements" like
> > "function-wheel" that are so vague that you can't give a better
> > option name.
>
> Ok.
>
> Is there an easy way to know if an option is for frontend itself or for
> user ? For example, the plustek backend show 5 "button" option for my
> CanoScan N1220U, and xsane shows an unsensitive checkbox for this
> button, in a "buttons" frame. That's useless and even annoying for
> end-users. Why is that option shown ? Is there a way for backend to
> tell : this option is not for user. I think about SANE_CAP_HARD_SELECT.
> Am i wrong ?

xsane does not handle reading button presses from backend AFAIK.

allan

-- 
"The truth is an offense, but not a sin"



More information about the sane-standard mailing list