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

From: Bill Thompson (billt@samart.co.th)
Date: Mon Feb 21 2000 - 16:36:31 PST

  • Next message: Petter Reinholdtsen: "Re: Astra 1220S"

    Karl Heinz Kremer wrote:
    >
    > 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,

      I think it's a good idea.

      Bill Thompson

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



    This archive was generated by hypermail 2b29 : Mon Feb 21 2000 - 16:34:58 PST