home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Frameworks / PennyWise™ Framework / PennyView / Source / Main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-08  |  1.9 KB  |  47 lines  |  [TEXT/KAHL]

  1. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. //                                                                                //
  3. //                                                                                //
  4. //                    Copyright PennyWise Software, 1994.                            //
  5. //                                                                                //
  6. //            Part of the PennyWise Software Application Framework                //
  7. //                                                                                //
  8. //                                                                                //
  9. //            Main.c                    Written by Peter Kaplan                        //
  10. //                                                                                //
  11. //                                                                                //
  12. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  13. //                                                                                //
  14. //        This is the main for the application. It will initialize the             //
  15. //        macintosh toolbox, initialize the appliaction, and then go into the      //
  16. //        main event loop.                                                        //
  17. //                                                                                //
  18. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  19. // local defines
  20. #define SLEEP_VALUE              20
  21. #define    MASTER_POINTERS            10
  22. #define STACK_GROWTH            0
  23. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  24. // local includes
  25. #include "InitApplication.h"
  26. #include <PWFramework.h>
  27. #include <PWWindowList.h>
  28. #include "WindowID.h"
  29. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  30. Boolean    GlobalIdle(EventRecord *);
  31. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  32.  void main()                      
  33.  
  34.     PWInitMac(MASTER_POINTERS, STACK_GROWTH, kMAX_WINDOW_IDS);    // Init the Mac
  35.     InitApplication();                                            // Init the App
  36.     UnloadSeg(InitApplication);                                    // Unload the Init Seg
  37.     PWMainEventLoop(SLEEP_VALUE, FALSE);        // Enter Event Loop
  38. }  
  39. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  40. // This is a function that MUST be defined. If you do not wish have a global
  41. // idle loop you must still declare it and then pass !ALLOW_GLOBAL_IDLE
  42. // to PWMainEventLoop.
  43. Boolean    GlobalIdle(EventRecord *theEvent)
  44. {
  45. return FALSE;
  46. }