home *** CD-ROM | disk | FTP | other *** search
- #ifndef __Desk_Export_h
- #define __Desk_Export_h
-
- #ifndef __Desk_wimp_h
- #include "Desk.Wimp.h"
- #endif
-
- typedef int (*Desk_export_filesaver)( const char *filename, void *reference);
- /*
- This type of function should save data to file given by 'filename',
- using info in 'reference'. It should return 0 if it was successful.
- 'ref' is the (void *) originally passed to
- */
-
- typedef int (*Desk_export_ramsaver)( Desk_message_block* ramfetch, int progress, void* reference);
- /*
- This type of function should Wimp_TransferBlock data. Note that you can
- do this using multiple Wimp_TransferBlock's if this is more convenient.
- Should return the total number of bytes transfered into 'destbuffer' -
- if less than buffersize, then transfer has finished. If <0, error has
- occurred. 'reference' is the (void *) originally passed to
- Desk_Export_ExportData.
- */
-
-
- typedef enum {
- Desk_export_result_OK = 0,
- Desk_export_result_RECEIVERFAILED,
- Desk_export_result_FILESAVERFAILED,
- Desk_export_result_RAMSAVERFAILED
- }
- Desk_export_result;
-
-
- typedef void (*Desk_export_resulthandler)( Desk_export_result result, void *reference);
-
-
- void Desk_Export_ExportData(
- Desk_event_pollblock* event, /* NULL or Desk_message_DATAREQUEST if relevent... */
- Desk_mouse_block* mouse, /* NULL if not saving from a drag. Note event_USERDRAG doesn't return mouse info */
- const char* leafname,
- Desk_export_filesaver filesaver,
- Desk_export_ramsaver ramsaver,
- Desk_export_resulthandler resulthandler,
- size_t estimatedsize,
- int filetype,
- void* reference
- );
-
- #endif
-