TWAINLib SWI 0x836C0


TWAINLib_Init   0x836C0

Entry

r0=taskhandle

Call this swi when your program starts



TWAINLib_Finit  0x836C1

Entry

r0=taskhandle


Call this swi when your program ends



TWAINLib_Poll   0x836C2

Entry

r0= pointer to data returned from wimp poll

Exit

r0= if zero process event in the usual way, else ignore


All wimp events must be passed to TWAIN before your program.


TWAINLib_Select  0x836C3

Call this when someone clicks on Select source...
Once you call this, you must enable zero polls



TWAINLib_Acquire 0x836C4

Call this when someone clicks on Acquire...
Once you call this, you must enable zero polls until the transfer is over.

*NB* the data block below must be recreated every time. The function
addresses will be overwritten.


Entry

r0= pointer to a data block


Offset 0    flags
            bit  0    set if you are going to preset an area to scan

Offset 4              leave blank

Offset 8    x0        area to scan
Offset 12   x1
Offset 16   y0
Offset 20   y1


Offset 24   address of TWEnd
Offset 28   address of TWtrans
Offset 32   address of TWalloc
Offset 36   address of TWinfo
Offset 40   address of TWpoll
Offset 44   address of TWpal
Offset 48   address of TWerror


Offset 52   pointer to memory allocated for transfers
Offset 56   size of memory allocated for transfers



These are addresses of routines that TWAINLib can call. Zero must be
inserted when a function is not present.

TWEnd       called when transfer is over


TWtrans     r0 size
            r1 last
            r2 bpr
            r3 rows
            transfer function

TWalloc     r0 is the size of a data block that is required to be allocated

TWinfo      r0=pointer to a data structure of words
                 xpix
                 ypix
                 bpp
                 xres   
                 yres
                 planar  *    flag to show if 3 pass colour



TWpoll      called when TWAIN wants to poll. Normally would call
            your poll function. (optional)

TWpal       r0=pointer to palette
            r1=number of entries in palette

TWerror     r0 is a pointer to an error that has occured  (optional)

