home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / Level 0 Macintosh 29Sep94 / StartupOpen.h < prev   
Encoding:
C/C++ Source or Header  |  1994-11-23  |  1.9 KB  |  50 lines  |  [TEXT/KAHL]

  1. /* StartupOpen.h */
  2.  
  3. #ifndef Included_StartupOpen_h
  4. #define Included_StartupOpen_h
  5.  
  6. /* StartupOpen module depends on: */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* Array */
  13. /* Files */
  14.  
  15. /* this is so we don't have to drag Files.h in the header. */
  16. struct FileSpec;
  17.  
  18. /* compile a list of files that should be opened when the program starts up. */
  19. /* The parameters should be exactly the ones passed into main() upon startup. */
  20. /* It is implementation defined as to whether they will be used; the Macintosh */
  21. /* does not use them, but uses Apple Events for opening startup documents instead. */
  22. void                    PrepareStartupDocuments(int argc, char* argv[]);
  23.  
  24. /* Get a startup item.  It will initially return False.  Once the open event is */
  25. /* received, it will return True from then on.  If there is a file specification */
  26. /* to get, it will be returned, otherwise NIL will be returned.  The file */
  27. /* specification should be disposed of with DisposeFileSpec.  Here's how you know if */
  28. /* you should open an untitled document:  the first time it returns True, if it */
  29. /* also returns NIL, then do it. */
  30. MyBoolean            GetStartupObject(struct FileSpec** ReturnStuff);
  31.  
  32. /* clean up any internal structures allocated by PrepareStartupDocument. */
  33. void                    ClearStartupDocuments(void);
  34.  
  35. /* this returns True if the system would like the program to quit.  The program */
  36. /* should then ask the user if he wants to save all changed documents. */
  37. /* A Quit event on the Macintosh will cause this to return True */
  38. MyBoolean            CheckQuitPending(void);
  39.  
  40. /* If some other signal besides an implementation defined system quit signal */
  41. /* is received, this can be used to indicate such, and cause a normal shutdown */
  42. /* of the program to occur. */
  43. void                    SetQuitPending(void);
  44.  
  45. /* If the user cancels the quit, this should be used to clear the flag and */
  46. /* allow the program to continue running */
  47. void                    AbortQuitInProgress(void);
  48.  
  49. #endif
  50.