/*->h.acq */

typedef os_error *(*TWendfn)(void);
typedef os_error *(*TWtransfn)(int size,int last,int bpr,int rows);
typedef os_error *(*TWallocfn)(int size);
typedef os_error *(*TWinfofn)(int xpix,int ypix,int bpp,int xres,
                                                        int yres,int planar);
typedef os_error *(*TWpalfn)(int * pword,int n);
typedef void      (*TWpollfn)(void);
typedef void      (*TWerrorfn)(os_error *);


typedef struct TWAcquireblockstr
{
 int       settransfertype:1;
 int       setarea:1;
 int       nouserinterface:1;

 int       transfertype; /* set to TWSX_NATIVE/TWSX_MEMORY/TWSX_FILE */

 struct 
 {
  int       x0;
  int       x1;
  int       y0;
  int       y1;
 } area;


 TWendfn   TWend;
 TWtransfn TWtrans;
 TWallocfn TWalloc;
 TWinfofn  TWinfo;
 TWpollfn  TWpoll;
 TWpalfn   TWpal;
 TWerrorfn TWerror;

 union
 {
  struct 
  {
   sprite_area * sp;
   char          name[12];
  } native;

  struct
  {
   char * buffer;
   int    size;

  } memxfer;

 } memory;


} TWAcquireblockstr;


os_error * TWAcquire(TWAcquireblockstr * TWAcquireblock);
void       TWAcquireDefault(TWAcquireblockstr * TWAcquireblock);

BOOL       TWProcessMessage(wimp_eventstr * wevent);

void       TWTransferImage(void);
void       TWGetCompleteImage(void);

