# [khk@khk.net: Scanner Button Status / Is there anyting we can do with the buttons?]

From: Karl Heinz Kremer (khk@khk.net)
Date: Mon Feb 21 2000 - 14:52:59 PST

- Next message: Cornelius, John: "Astra 1220S"
  - Previous message: Karl Heinz Kremer: "Re: Xsane-0.55: scan resolution selection (Epson 1200S, CVS Sane)"
  - Next in thread: Bill Thompson: "Re: [khk@khk.net: Scanner Button Status / Is there anyting we can do with the buttons?]"
  - Reply: Bill Thompson: "Re: [khk@khk.net: Scanner Button Status / Is there anyting we can do with the buttons?]"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  I tried to send this to the list a few days ago, but so far I can not
  find it in the archives. Really strange: My last message to the list
  is in there twice, and this one never showed up ...

  ----- Forwarded message from Karl Heinz Kremer <khk@khk.net> -----

  Date: Sat, 19 Feb 2000 13:54:48 -0500
  From: Karl Heinz Kremer <khk@khk.net>
  To: sane-devel@mostang.com
  Subject: Scanner Button Status / Is there anyting we can do with the buttons?
  Mail-Followup-To: sane-devel@mostang.com
  X-Mailer: Mutt 1.0i

  Most of the scanners have one or more buttons that can be used to
  either start the scanning or cancel the scan process - at least when
  using the Windows driver.

  I don't see a way to use the "Scan" button with the current implenentation
  of SANE: Even if I create a thread that checks the button status every
  second, I still can not communicate with the frontend and let it know
  that received a scan request via the button. The frontend would need to
  provide a callback function in order to do that. I guess the cancel
  button could be handled internally in the backend. The frontend does not
  need to know that the button was pressed, it should be sufficient to just
  stop sending data (and report some kind of error instead).

  What we would need is a function that the frontend can call to find out
  how many buttons the scanner supports. In addition to that we would need
  to define a set of well known button "labels" so that the frontend could
  then register callback functions for e.g. "scan", "cancel", "fax", "email",
  ... The backend would default to no callback for all buttons, so that the
  "button watching thread" would not start until at least one callback is
  registered.

  My EPSON scanner has only one button, so this wold be a pretty simple
  implementation: Once the button is pressed the frontend would do the
  same thing as if the scan-button in the GUI would have been pressed.

  What do you think?

  Karl Heinz

      --
      Karl Heinz Kremer                                      khk@khk.net
                                                      http://www.khk.net
      ----- End forwarded message -----
      --
      Karl Heinz Kremer                                      khk@khk.net
                                                      http://www.khk.net

  - application/pgp-signature attachment: stored

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Cornelius, John: "Astra 1220S"
  - Previous message: Karl Heinz Kremer: "Re: Xsane-0.55: scan resolution selection (Epson 1200S, CVS Sane)"
  - Next in thread: Bill Thompson: "Re: [khk@khk.net: Scanner Button Status / Is there anyting we can do with the buttons?]"
  - Reply: Bill Thompson: "Re: [khk@khk.net: Scanner Button Status / Is there anyting we can do with the buttons?]"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Mon Feb 21 2000 - 14:52:04 PST