#ifndef drwFn24_H
 #define  drwFn24_H

#include "DRW/drwwh.h"


#if defined NAMESPACE_DRWIMPC
  namespace DrWimpC {
#endif

#if defined NAMESPACE_OSLIB
  using namespace OSLib;
#endif

typedef void (*drw_autofn_edituserinit_fn)(void *userdata);

typedef void (*drw_edituserinit_ufn)(void);

typedef extedit_job_handle (*drw_autofn_setjobhandle_fn)(int source1,
                                                         int source2,
                                                         int source3,
                                                         int source4,
                                                         void *userdata);

typedef extedit_job_handle (*drw_setjobhandle_ufn)(int source1,
                                                   int source2,
                                                   int source3,
                                                   int source4);

typedef int (*drw_autofn_rocheck_fn)(extedit_job_handle job_handle,
                                     int source1,
                                     int source2,
                                     int source3,
                                     int source4,
                                     void *userdata);

typedef int (*drw_rocheck_ufn)(extedit_job_handle job_handle,
                               int source1,
                               int source2,
                               int source3,
                               int source4);

typedef extedit_data_type (*drw_autofn_retryedit_fn)(int source1,
                                                     int source2,
                                                     int source3,
                                                     int source4,
                                             extedit_message_rq *emrq,
                                                     void *userdata);

typedef extedit_data_type (*drw_retryedit_ufn)(int source1,
                                               int source2,
                                               int source3,
                                               int source4,
                                               extedit_message_rq *emrq);

typedef int (*drw_autofn_startdatasave_fn)(int returningdata,
                                           extedit_job_handle job_handle,
                                           int source1,
                                           int source2,
                                           int source3,
                                           int source4,
                                           extedit_message_rq *emrq,
                                           int *est_size,
                                           bits *rtfiletype,
                                           drw_wcaretseln *cseln,
                                           char *filename,
                                           void *userdata);

typedef int (*drw_startdatasave_ufn)(int returningdata,
                                     extedit_job_handle job_handle,
                                     int source1,
                                     int source2,
                                     int source3,
                                     int source4,
                                     extedit_message_rq *emrq,
                                     int *est_size,
                                     bits *rtfiletype,
                                     drw_wcaretseln *cseln,
                                     char *filename);

typedef int (*drw_autofn_abortedit_fn)(extedit_job_handle job_handle,
                                       int source1,
                                       int source2,
                                       int source3,
                                       int source4,
                                       void *userdata);

typedef int (*drw_abortedit_ufn)(extedit_job_handle job_handle,
                                 int source1,
                                 int source2,
                                 int source3,
                                 int source4);

typedef int (*drw_autofn_editaborted_fn)(int source1,
                                         int source2,
                                         int source3,
                                         int source4,
                                         extedit_message_rq *emrq,
                                         void *userdata);

typedef int (*drw_editaborted_ufn)(int source1,
                                   int source2,
                                   int source3,
                                   int source4,
                                   extedit_message_rq *emrq);

typedef int (*drw_autofn_acceptedit_fn)(extedit_job_handle job_handle,
                                        extedit_data_type data_type,
                                        const char *parent_name,
                                        char *leaf_name,
                                        bits file_type,
                                        bits sub_type,
                                        int *read_only,
                                        int *source1,
                                        int *source2,
                                        int *source3,
                                        int *source4,
                                        void *userdata);

typedef int (*drw_acceptedit_ufn)(extedit_job_handle job_handle,
                                  extedit_data_type data_type,
                                  const char *parent_name,
                                  char *leaf_name,
                                  bits file_type,
                                  bits sub_type,
                                  int *read_only,
                                  int *source1,
                                  int *source2,
                                  int *source3,
                                  int *source4);

typedef int (*drw_autofn_processcursor_fn)(extedit_job_handle job_handle,
                                            int source1,
                                            int source2,
                                            int source3,
                                            int source4,
                                            int new_cursor_pos,
                                            int new_sos_pos,
                                            int new_eos_pos,
                                            int *old_cursor_pos,
                                            int *old_sos_pos,
                                            int *old_eos_pos,
                                            void *userdata);

typedef void (*drw_processcursor_ufn)(extedit_job_handle job_handle,
                                      int source1,
                                      int source2,
                                      int source3,
                                      int source4,
                                      int new_cursor_pos,
                                      int new_sos_pos,
                                      int new_eos_pos,
                                      int *old_cursor_pos,
                                      int *old_sos_pos,
                                      int *old_eos_pos);

typedef int (*drw_autofn_processrtdcursor_fn)(extedit_job_handle job_handle,
                                               int source1,
                                               int source2,
                                               int source3,
                                               int source4,
                                               int old_cursor_pos,
                                               int old_sos_pos,
                                               int old_eos_pos,
                                               int new_cursor_pos,
                                               int new_sos_pos,
                                               int new_eos_pos,
                                               void *userdata);

typedef int (*drw_processrtdcursor_ufn)(extedit_job_handle job_handle,
                                         int source1,
                                         int source2,
                                         int source3,
                                         int source4,
                                         int old_cursor_pos,
                                         int old_sos_pos,
                                         int old_eos_pos,
                                         int new_cursor_pos,
                                         int new_sos_pos,
                                         int new_eos_pos);

typedef int (*drw_autofn_processeditsave_fn)(extedit_job_handle job_handle,
                                             int source1,
                                             int source2,
                                             int source3,
                                             int source4,
                                             bits file_type,
                                             bits sub_type,
                                             bits *rtfile_type,
                                             char *file_name,
                                             int *est_size,
                                             int *buffpos,
                                             byte **rtbuffer,
                                             void *userdata);

typedef int (*drw_processeditsave_ufn)(extedit_job_handle job_handle,
                                       int source1,
                                       int source2,
                                       int source3,
                                       int source4,
                                       bits file_type,
                                       bits sub_type,
                                       bits *rtfile_type,
                                       char *file_name,
                                       int *est_size,
                                       int *buffpos,
                                       byte **rtbuffer);

typedef int (*drw_autofn_loadeditdata_fn)(extedit_job_handle job_handle,
                                           int source1,
                                           int source2,
                                           int source3,
                                           int source4,
                                           extedit_flags extflags,
                                           char *filename,
                                           wimp_w whan,
                                           wimp_i icon,
                                           bits filetype,
                                           int workx,
                                           int worky,
                                           void *userdata);

typedef void (*drw_loadeditdata_ufn)(extedit_job_handle job_handle,
                                     int source1,
                                     int source2,
                                     int source3,
                                     int source4,
                                     extedit_flags extflags,
                                     char *filename,
                                     wimp_w whan,
                                     wimp_i icon,
                                     bits filetype,
                                     int workx,
                                     int worky);

typedef int (*drw_autofn_postedittfr_fn)(bits msgtype,
                                          char *path,
                                          char *leafname,
                                          wimp_w whandle,
                                          wimp_i iconno,
                                          char *ftype,
                                          bits filetype,
                                          int workx,
                                          int worky,
                                          void *userdata);

typedef int (*drw_postedittfr_ufn)(bits msgtype,
                                    char *path,
                                    char *leafname,
                                    wimp_w whandle,
                                    wimp_i iconno,
                                    char *ftype,
                                    bits filetype,
                                    int workx,
                                    int worky);

typedef int (*drw_autofn_editsave_fn)(extedit_job_handle job_handle,
                                      int source1,
                                      int source2,
                                      int source3,
                                      int source4,
                                      char *filename,
                                      bits filetype,
                                      drw_wcaretseln *cseln,
                                      void *userdata);

typedef int (*drw_editsave_ufn)(extedit_job_handle job_handle,
                                int source1,
                                int source2,
                                int source3,
                                int source4,
                                char *filename,
                                bits filetype,
                                drw_wcaretseln *cseln);

typedef int (*drw_autofn_recvdlack_fn)(extedit_job_handle job_handle,
                                        int source1,
                                        int source2,
                                        int source3,
                                        int source4,
                                        wimp_t desttask,
                                        int inmyref,
                                        int inyourref,
                                        wimp_w destwhan,
                                        wimp_i destic,
                                        int destx,
                                        int desty,
                                        int est_size,
                                        bits filetype,
                                        char *filename,
                                        void *userdata);

typedef void (*drw_recvdlack_ufn)(extedit_job_handle job_handle,
                                  int source1,
                                  int source2,
                                  int source3,
                                  int source4,
                                  wimp_t desttask,
                                  int inmyref,
                                  int inyourref,
                                  wimp_w destwhan,
                                  wimp_i destic,
                                  int destx,
                                  int desty,
                                  int est_size,
                                  bits filetype,
                                  char *filename);

typedef int (*drw_autofn_resizeeditw_fn)(extedit_job_handle job_handle,
                                         wimp_w whan,
                                         int source1,
                                         int source2,
                                         int source3,
                                         int source4,
                                         void *userdata);

typedef int (*drw_resizeeditw_ufn)(extedit_job_handle job_handle,
                                   wimp_w whan,
                                   int source1,
                                   int source2,
                                   int source3,
                                   int source4);

typedef int (*drw_autofn_cueditanyway_fn)(extedit_data_type data_type,
                                          const char *parent_name,
                                          char *leaf_name,
                                          int source1,
                                          int source2,
                                          int source3,
                                          int source4,
                                          void *userdata);

typedef int (*drw_cueditanyway_ufn)(extedit_data_type data_type,
                                    const char *parent_name,
                                    char *leaf_name,
                                    int source1,
                                    int source2,
                                    int source3,
                                    int source4);

typedef char *(*drw_autofn_editfilename_fn)(char *suggested_file_name,
                                            extedit_job_handle job_handle,
                                            int source1,
                                            int source2,
                                            int source3,
                                            int source4,
                                            int iseditrequest,
                                            void *userdata);

typedef char *(*drw_editfilename_ufn)(char *suggested_file_name,
                                      extedit_job_handle job_handle,
                                      int source1,
                                      int source2,
                                      int source3,
                                      int source4,
                                      int iseditrequest);

typedef int (*drw_autofn_saveeditanyway_fn)(extedit_job_handle job_handle,
                                            extedit_data_type data_type,
                                            int cu_editing,
                                            int source1,
                                            int source2,
                                            int source3,
                                             int source4,
                                            char *filename,
                                            void *userdata);

typedef int (*drw_saveeditanyway_ufn)(extedit_job_handle job_handle,
                                      extedit_data_type data_type,
                                      int cu_editing,
                                      int source1,
                                      int source2,
                                      int source3,
                                      int source4,
                                      char *filename);

typedef int (*drw_autofn_checkeditname_fn)(wimp_t taskh,
                                           wimp_w editwhan,
                                           char *editwtitle,
                                           char *leafname,
                                           extedit_job_handle job_handle,
                                           drw_extedit_source_str *exdsrce,
                                           void *userdata);

typedef int (*drw_checkeditname_ufn)(wimp_t taskh,
                                     wimp_w editwhan,
                                     char *editwtitle,
                                     char *leafname,
                                     extedit_job_handle job_handle,
                                     drw_extedit_source_str *exdsrce);


typedef struct drw_autofn_extedit_data      drw_autofn_extedit_data;

struct drw_autofn_extedit_data {

int source1;
int source2;
int source3;
int source4;
extedit_job_handle job_handle;
extedit_data_type data_type;
extedit_flags eeflags;        /* Used to pass various flags to the autofns. */
extedit_message_rq *emrq;
int cu_editing;
const char *parent_name;
char *leaf_name;
char *file_name;
char *suggested_file_name;
wimp_t desttask;
int inmyref;
int inyourref;
wimp_w destwhan;
wimp_i destic;
int destx;
int desty;
int *est_size;
int *buffpos;
int *buffsize;
int finalbuffpos;
int finalbuffsize;
byte *finalbuffer;
byte **rtbuffer;
int tfrtype;
int firstfetch;
byte *addr;
int xfer_size;
int numtfrd;
int end_of_ram_tfr;
bits *rtfiletype;
drw_wcaretseln *cseln;
bits file_type;
bits sub_type;
char *ftype;
int *read_only;
int returningdata;
int iseditrequest;
int old_cursor_pos;
int old_sos_pos;
int old_eos_pos;
int new_cursor_pos;
int new_sos_pos;
int new_eos_pos;
int *rtold_cursor_pos;
int *rtold_sos_pos;
int *rtold_eos_pos;
int workx;
int worky;
bits msgtype;
wimp_t taskh;
wimp_w editwhan;
char *editwtitle;
drw_extedit_source_str *exdsrce;

};

#if defined NAMESPACE_DRWIMPC
  }
#endif

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

#include "DRW/drwFn24.h"

#endif

