/*********************************************************************** * * FUNCTION: StarterPalmMain * * DESCRIPTION: This is the main entry point for the application. * * PARAMETERS: cmd - word value specifying the launch code. * cmdPB - pointer to a structure that is associated with the launch code. * launchFlags - word value providing extra information about the launch. * * RETURNED: Result of launch * * REVISION HISTORY: * * ***********************************************************************/ static UInt32 StarterPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) { Err error; error = RomVersionCompatible (ourMinVersion, launchFlags); if (error) return (error); switch (cmd) { case sysAppLaunchCmdNormalLaunch: error = AppStart(); if (error) return error; FrmGotoForm(MainForm); AppEventLoop(); AppStop(); break; default: break; } return errNone; }
UInt32 PilotMain(UInt16 launchCode, MemPtr launchParameters, UInt16 launchFlags) { Err error; UInt32 romVersion; FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romVersion); if (romVersion < ROM_VERSION_REQUIRED_FOR_FLOP) { FrmAlert(RomIncompatibleAlert); return (sysErrRomIncompatible); } switch(launchCode) { case sysAppLaunchCmdNormalLaunch: error = AppStart(); if (error) return error; FrmGotoForm(FlopForm); AppEventLoop(); AppStop(); break; default: break; } return errNone; }
UInt32 PilotMain(UInt16 cmd, void *cmdPBP, UInt16 launchFlags) { Err error; error = RomVersionCompatible(kOurMinVersion, launchFlags); if (error) return (error); switch (cmd) { case sysAppLaunchCmdGoToURL: case sysAppLaunchCmdGotoHomepage: case sysAppLaunchCmdGotoBlank: case sysAppLaunchCmdNormalLaunch: error = AppStart(cmd, cmdPBP); if (error) return error; AppEventLoop(); AppStop(); break; } return errNone; }