Sweden-Number/dlls/twain
Jeremy White 63e8d34a42 twain: Reconcile sane's long names to TWAIN's 32 byte limit. 2006-02-14 13:06:06 +01:00
..
.gitignore Renamed all .cvsignore files to .gitignore. 2005-11-26 13:10:33 +01:00
Makefile.in Removed a few more unnecessary import libraries. 2005-08-17 12:42:39 +00:00
README Assorted spelling fixes. 2004-09-14 19:31:22 +00:00
TWAIN Started TWAIN implementation. 2002-03-21 02:58:39 +00:00
capability.c Fix gcc 4.0 warnings. 2005-08-23 09:37:30 +00:00
ds_audio.c Make sure we include config.h before including twain_i.h. 2004-09-13 18:06:46 +00:00
ds_ctrl.c Added include protection for unistd.h and sys/time.h. 2002-08-17 00:43:16 +00:00
ds_image.c Assorted spelling fixes. 2004-09-14 19:31:22 +00:00
dsm_ctrl.c twain: Reconcile sane's long names to TWAIN's 32 byte limit. 2006-02-14 13:06:06 +01:00
twain.h twain: Make structures respect 2 byte packing requirements. 2006-02-14 12:24:45 +01:00
twain.spec Add a 16 bit pair DLL for TWAIN. 2004-07-13 03:37:07 +00:00
twain16_main.c Correct and complete some api documentation. 2005-03-21 10:55:13 +00:00
twain32_main.c Make sure we include config.h before including twain_i.h. 2004-09-13 18:06:46 +00:00
twain_32.spec Take advantage of new winebuild syntax to remove redundant function 2003-03-20 03:53:12 +00:00
twain_i.h Assorted spelling fixes. 2004-09-14 19:31:22 +00:00

README

----- Old Corel README, probably outdated ----------------------------------
1. INTRODUCTION

This library (twain_32.dll) is an implementation of TWAIN API for providing image acquisition devices (scanner or digital camera) support.  It uses SANE drivers as the backend and translates TWAIN API calls into SANE API calls.  Unlike the twain32 library on Windows platform, it combines the Data Source Manager and Data Sources into a single library.  Thus it is our responsiblity to provide a graphical user interface and capability negotiation, which usually are performed by data sources.


2. WHAT'S IMPLEMENTED

- Functions that dispatch operations specified by the operation triplets to the coresponding function.

- All the operation triplets related to the Data Source Manager are implemented.  Appplication is able to enumerate data sources and open them.

- The operation triplets that deal with the UI (such as DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS, MSG_DISABLEDS and MSG_ENABLEDSUIONLY) are partially implemented although it does not really do much.

- The operation triplets that deal with native image transfers (DG_IMAGE/DAT_IMAGENATIVEXFER/MSG_GET) are also partially implemented.  Still need to figure out how to convert the image data obtained from sane to the Windows DIB format.

-  Only the CAP_ICAPXFERMECH capability is implemented.


3. TO-DO

- Image native transfer is not working correctly right now.  It crashed the application due to the invalid DIB created.  We need to fix this.

- Implement other image transfer mode such as file transfer and memory transfer.

- Support all required TWAIN capabilities that have not been implemented currently.  There are a fixed number of capabilities specified by the TWAIN Specification.  However, device capabilities are dynamic in SANE and there isn't a standard about the capability names.  It would be difficult to negotiate capabilities in TWAIN given that we don't know what capabilities a SANE driver would provide.  One possible solution to use a device configuration file to describe the mapping between capabilities supported by a SANE driver and those specified by TWAIN.   
- Build a dynamic user interface that reflects the capabilities of different scanner devices.  According to the TWAIN specification, each TWAIN driver need to provide its own user interface.  However the SANE drivers do not have graphical frontends.  Building a frontend for each SANE driver is a huge task.  It is possible to have a dynamic frontend similar to xscanimage or xsane that works for all the devices.  This is possibly the most difficult part. 

- check into legal issues regarding:
  - TWAIN header file
  - linking to SANE (maybe should dynamically link at run time?)

- add autoconf rules for enabling based on whether sane is installed

4. FILE LISTING

twain32_main.c          Functions to regconize operation tripets and dispatch
                        the requests to the corresponding functions.
dsm_ctrl.c		Implementation of DG_CONTROL group operation triplets
                        destinated for source manager.
ds_ctrl.c               Implementation of DG_CONTROL group operation triplets
                        destinated for data source.
ds_image.c              Implementation of DG_IMAGE group operation triplets
                        destinated for data source.
ds_audio.c              Implementation of DG_AUDIO group operation triplets
                        destinated for data source
capability.c            Functions for negotiating capabilities
twain.h			The original TWAIN header file
twain_i.h		Header file for the internal twain functions	


--
Shi Quan He
shiquan@cyberdude.com