#ifndef drwFn16_H
 #define drwFn16_H

#include "DRW/drwwh.h"
#include "DRW/drwllwalk.h"

#ifndef drwSelnfnh_H
 #include "DRW/drwSelnfnh.h"
#endif

#if defined NAMESPACE_DRWIMPC
  namespace DrWimpC {
#endif

#if defined NAMESPACE_OSLIB
  using namespace OSLib;
#endif

typedef int (*drw_autofn_accept_ramtfr_fn)(int *ramtfrtype,
                                           int tfrsize,
                                           wimp_w destw,
                                           wimp_i desti,
                                           int destx,
                                           int desty,
                                           bits filetype,
                                           wimp_w wSavew,
                                           byte **buffer,
                                           int *buffpos,
                                           int *buffsize,
                                           void *userdata);

typedef int (*drw_accept_ramtfr_ufn)(int *ramtfrtype,
                                     int tfrsize,
                                     wimp_w destw,
                                     wimp_i desti,
                                     int destx,
                                     int desty,
                                     bits filetype,
                                     wimp_w wSavew,
                                     byte **buffer,
                                     int *buffpos,
                                     int *buffsize);

typedef int (*drw_autofn_ramtfr_fn)(byte *addr,
                                    int tfrinfotype,
                                    void *tfrinfo,
                                    wimp_caret *ghostcaret,
                                    drw_wcaretseln *cseln,
                                    int tfrtype,
                                    int numtfrd,
                                    int end_of_ram_tfr,
                                    int *tfrsize,
                                    byte **buffer,
                                    int *buffpos,
                                    int *buffsize,
                                    int *fndone,
                                    void *userdata);

typedef int (*drw_ramtfr_ufn)(byte *addr,
                              int tfrinfotype,
                              void *tfrinfo,
                              wimp_caret *ghostcaret,
                              drw_wcaretseln *cseln,
                              int tfrtype,
                              int numtfrd,
                              int end_of_ram_tfr,
                              int *tfrsize,
                              byte **buffer,
                              int *buffpos,
                              int *buffsize);

typedef int (*drw_autofn_rtnd_ramtfr_fn)(int my_ref,
                                         int your_ref,
                                         int tfrtype,
                                         int firstfetch,
                                         int tfrinfotype,
                                         void *tfrinfo,
                                         int *fndone,
                                         void *userdata);

typedef int (*drw_rtnd_ramtfr_ufn)(int my_ref,
                                   int your_ref,
                                   int tfrtype,
                                   int firstfetch,
                                   int tfrinfotype,
                                   void *tfrinfo);

typedef int (*drw_autofn_try_ram_fetch_fn)(bits file_type,
                                           int est_size,
                                           wimp_w w,
                                           wimp_i i,
                                           int x,
                                           int y,
                                           wimp_caret *ghostcaret,
                                           void *selndata,
                                           byte **buffptr,
                                           int *buffsize,
                                           int *buffpos,
                                           void *userdata);


typedef int (*drw_try_ram_fetch_ufn)(bits file_type,
                                     int est_size,
                                     wimp_w w,
                                     wimp_i i,
                                     int x,
                                     int y,
                                     wimp_caret *ghostcaret,
                                     void *selndata,
                                     byte **buffptr,
                                     int *buffsize,
                                     int *buffpos);

typedef void (*drw_autofn_post_ramtfr_fn)(int tfrtypein,
                                          int tfrinfotype,
                                          void *tfrinfo,
                                          wimp_caret *ghostcaret,
                                          drw_wcaretseln *cseln,
                                          byte *buffer,
                                          int buffpos,
                                          int buffsize,
                                          int *fndone,
                                          void *userdata);


typedef void (*drw_post_ramtfr_ufn)(int tfrtypein,
                                   int tfrinfotype,
                                   void *tfrinfo,
                                   wimp_caret *ghostcaret,
                                   drw_wcaretseln *cseln,
                                   byte *buffer,
                                   int buffpos,
                                   int buffsize);


typedef struct drw_autofn_ramtfr_data  drw_autofn_ramtfr_data;

struct drw_autofn_ramtfr_data {

int *ramtfrtype;
int tfrsize;
int tfrtype;
int tfrinfotype;
void *tfrinfo;
int firstfetch;
int my_ref;
int your_ref;
wimp_caret *ghostcaret;
drw_wcaretseln *cseln;
byte *addr;
int numtfrd;
int end_of_ram_tfr;
wimp_w destw;
wimp_i desti;
int destx;
int desty;
bits filetype;
wimp_w wSavew;
void *selndata;
byte **buffer;
int *buffpos;
int *buffsize;
int result;

};

#if defined NAMESPACE_DRWIMPC
  }
#endif

#ifndef drwFn00_H
 #include "DRW/drwFn00h.h"
#endif

#include "DRW/drwFn16.h"

#endif

