home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 108.lha / Life / Sources / getfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-20  |  1.4 KB  |  52 lines

  1. /***************************************************
  2. *  get_fname(window,screen,hail,ddef,ddir);
  3. *
  4. *   Displays a window/requester that
  5. * gets a file name for device,directory,default file, extension
  6. *
  7. *   Calling args:
  8. * window:   Window making the request
  9. * screen:   Screen, if NULL assummed workbench
  10. * hail:   Text prompt at top of requester
  11. * ddef:   Input default file-name. Has NO DIRECTORY OR EXTENSION.
  12. * ddir:   Directory of file, may be null
  13. *   Return value:
  14. * READPICK  if READ gadget picked.
  15. * WRTPICK   if WRITE gadget picked.
  16. * CANPICK   if CANCEL gadget picked.
  17. *
  18. *  The basic call is:
  19. *
  20. * typepick = getfile(Window,Screen,Hailing_string,file_name,directory_name);
  21. *
  22. * Where:
  23. *   Window is a pointer to your window
  24. *   Screen is a pointer to your screen ... or (long)NULL if workbench
  25. *   Hailing_string is a prompt displayed in the requester
  26. *   file_name is a text array which will be altered by getfile,
  27. *   it returns the file name.
  28. *   directory_name is a text array altered by getfile, it
  29. *   is the directory.
  30. *
  31. *
  32. *   You must reserve two text areas for file and directory like so:
  33. *
  34. * #define FNAME_SIZE 33
  35. * TEXT   file_name[FNAME_SIZE + 1];
  36. * TEXT   dir_name[FNAME_SIZE + 2]
  37. **********************************************************************/
  38.  
  39. #ifndef GET_FNAME
  40.  
  41. #define GET_FNAME
  42.  
  43. #define FNAME_SIZE 33
  44.  
  45. extern get_fname();
  46.  
  47. #define CANPICK 0
  48. #define WRTPICK 1
  49. #define READPICK 2
  50. #endif
  51.  
  52.