home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / code / desklib / DeskLib / !DeskLib / h / Save < prev    next >
Encoding:
Text File  |  1995-07-17  |  1.6 KB  |  81 lines

  1.  
  2. #ifndef __dl_save_h
  3. #define __dl_save_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifndef __stdlib_h
  8. #include <stdlib.h>
  9. #endif
  10. #ifndef __dl_event_h
  11. #include "Event.h"
  12. #endif
  13. typedef BOOL (*save_filesaver)(char *f, void *ref);
  14. typedef int (*save_ramsaver)(
  15. task_handle sourcetask, 
  16. void *ref,
  17. task_handle desttask,
  18. void *destbuffer,
  19. unsigned int buffersize,
  20. int progress 
  21. );
  22. typedef enum
  23. {
  24. save_SAVEOK = 0,
  25. save_RECEIVERFAILED,
  26. save_FILESAVERFAILED,
  27. save_RAMSAVERFAILED
  28. } save_result;
  29. typedef void (*save_resulthandler)(save_result result, void *ref);
  30. typedef struct
  31. {
  32. window_handle window; 
  33. union
  34. {
  35. unsigned int value;
  36. struct
  37. {
  38. unsigned int is_menu : 1; 
  39. unsigned int is_save_window : 1; 
  40. unsigned int we_are_dragging : 1; 
  41. unsigned int quit_after_save : 1; 
  42. unsigned int release_after : 1; 
  43. unsigned int padding : 27;
  44. } data;
  45. } flags;
  46. icon_handle dragsprite;
  47. icon_handle okbutton;
  48. icon_handle cancelbutton;
  49. icon_handle filenameicon;
  50. save_filesaver filesaver;
  51. save_ramsaver ramsaver;
  52. save_resulthandler resulthandler;
  53. size_t estimatedsize;
  54. int filetype;
  55. void *ref;
  56. int ram_progress; 
  57. unsigned int last_message_ref; 
  58. } save_saveblock;
  59. save_saveblock *Save_InitSaveWindowHandler(
  60. window_handle window, 
  61. BOOL is_menu, 
  62. BOOL is_save_window, 
  63. BOOL release_after, 
  64. icon_handle dragsprite, 
  65. icon_handle okbutton, 
  66. icon_handle cancelbutton, 
  67. icon_handle filenameicon, 
  68. save_filesaver filesaver, 
  69. save_ramsaver ramsaver, 
  70. save_resulthandler resulthandler, 
  71. size_t estimatedsize, 
  72. int filetype,
  73. void *ref 
  74. );
  75. void Save_ReleaseSaveHandlers(save_saveblock *saveblock);
  76. void Save_SetFiletype(save_saveblock *saveblock, int filetype);
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80. #endif
  81.