- /*
- * TODO
- */
- return TRUE;
-}
-
-// -------------------------------------------------------------------
-// Portability Layer PL
-// -------------------------------------------------------------------
-// this is the c-api part, the only part of this file that needs to be
-// adapted for supporting a new platform
-// there are two flavours of PL... functions, Callbacks and normal functions
-// Callbacks are called by other PLxxx functions and allow to trigger idle
-// processing etc. the callbacks don't have to be adapted for every platform
-// but only in case of changes to the underlying wx framework
-
-// callbacks
-
-bool PLCallbackIdle()
-{
- return wxTheApp->ProcessIdle() ;
-}
-
-bool PLCallbackRepeat()
-{
- // wxMacProcessSocketEvents() ;
- return false ;
-}
-
-// platform specific static variables
-
-bool gMacHasAppearance = false ;
-long gMacAppearanceVersion = 0 ;
-RgnHandle gMacCursorRgn = NULL ;
-
-#define kMinHeap (29 * 1024)
-#define kMinSpace (20 * 1024)
-#define eWrongMachine 1
-#define eSmallSize 2
-#define eNoMemory 3
-#define eOldSystem 4
-#define eGenericAbout 5
-
-// platform specific prototypes
-
-void DoMacNullEvent( EventRecord *ev ) ;
-void DoMacHighLevelEvent( EventRecord *ev ) ;
-void DoMacMouseDownEvent( EventRecord *ev ) ;
-void DoMacMouseUpEvent( EventRecord *ev ) ;
-void DoMacKeyDownEvent( EventRecord *ev ) ;
-void DoMacKeyUpEvent( EventRecord *ev ) ;
-void DoMacAutoKeyEvent( EventRecord *ev ) ;
-void DoMacActivateEvent( EventRecord *ev ) ;
-void DoMacUpdateEvent( EventRecord *ev ) ;
-void DoMacDiskEvent( EventRecord *ev ) ;
-void DoMacOSEvent( EventRecord *ev ) ;
-
-// platform specific functions
-
-// -------------------------------------------------------------------
-// PLStartupPhase1
-// -------------------------------------------------------------------
-// Initializes the system so that at least the requirements can be tested
-// and that error messages will shop up at all ;-)
-//
-// parameters : none
-// return value : non zero for a implementation specific error code
-
-int PLStartupPhase1()
-{
- ::InitGraf(&qd.thePort);
- ::InitFonts();
- ::InitWindows();
- ::InitMenus();
- ::TEInit();
- ::InitDialogs(0L);
- ::InitCursor();
- CursHandle aCursHandle = ::GetCursor(watchCursor); // Watch should be in system
- if (aCursHandle)
- ::SetCursor(*aCursHandle); // Change cursor to watch
- ::FlushEvents(everyEvent, 0);
-
- gMacCursorRgn = ::NewRgn() ;
-
- return 0 ;
-}
-
-// -------------------------------------------------------------------
-// PLStartupPhase2
-// -------------------------------------------------------------------
-// booting the system further until all subsystems are running
-//
-// parameters : none
-// return value : non zero for a implementation specific error code
-
-int PLStartupPhase2()
-{
- long total,contig;
-
- ::MaxApplZone();
- for (long i = 1; i <= 4; i++)
- ::MoreMasters();
- PurgeSpace(&total, &contig);
- ::SetCursor( &qd.arrow ) ;
-
-#if 0
- InitAEHandlers();
- InitializeAECore() ;
- GUSISetup(GUSIwithInternetSockets);
-#endif
-
- return 0 ;
-}
-
-// -------------------------------------------------------------------
-// PLErrorMessage
-// -------------------------------------------------------------------
-// notifies the user of a implementation specific error
-// is useful for messages before the wx System is up and running
-//
-// parameters : int error = error code (implementation specific)
-// return value : none
-
-void PLErrorMessage( int error )
-{
- short itemHit;
- Str255 message;
-
- SetCursor(&qd.arrow);
- GetIndString(message, 128, error);
- ParamText(message, (ConstStr255Param)"\p", (ConstStr255Param)"\p", (ConstStr255Param)"\p");
- itemHit = Alert(129, nil);
-}
-
-// -------------------------------------------------------------------
-// PLCleanup
-// -------------------------------------------------------------------
-// notifies the user of a implementation specific error
-// is useful for messages before the wx System is up and running
-//
-// parameters : int error = error code (implementation specific)
-// return value : none
-
-void PLCleanup()
-{
- ::PrClose() ;
- if (gMacCursorRgn)
- ::DisposeRgn(gMacCursorRgn);