| @@ -1,11 +1,13 @@ | |||
| ARCHS = ppc i386 | |||
| MACOSX_DEPLOYMENT_TARGET_ppc = 10.3 | |||
| SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk | |||
| SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk | |||
| // For 10.2 compatibility, use these values: | |||
| GCC_VERSION_ppc = 3.3 | |||
| MACOSX_DEPLOYMENT_TARGET_ppc = 10.2 | |||
| OTHER_LD_FLAGS_ppc = /Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3/libstdc++.a | |||
| SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk | |||
| // For 10.3 compatibility, use these: | |||
| // MACOSX_DEPLOYMENT_TARGET_ppc = 10.3 | |||
| // SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk | |||
| // SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk | |||
| // N.B. For 10.2 compatibility, use these values instead of the ones above: | |||
| // GCC_VERSION_ppc = 3.3 | |||
| // MACOSX_DEPLOYMENT_TARGET_ppc = 10.2 | |||
| // OTHER_LD_FLAGS_ppc = /Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3/libstdc++.a | |||
| // SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk | |||
| @@ -8,7 +8,6 @@ Changelist for version 1.44 | |||
| - added a method Desktop::setScreenSaverEnabled(), which lets you prevent the screen-saver from being activated - handy if your app is doing some kind of presentation. (only implemented on windows/mac - anyone know how to do this on linux?) | |||
| - new Mac-only class: AppleRemoteDevice, which lets you grab and listen for events from your Apple remote control. (Only works if you build for 10.3 or above). | |||
| - the default Mac build is now 10.3 compatible by default. (If anyone still needs 10.2 ppc compatibility, it still works, you just need to change the settings in the juce.xconfig file) | |||
| - tweaks to get it working under Wine. | |||
| - change to the keyPressed() and keyStateChanged() callbacks in Component and KeyListener. These used to be void, but they now return a bool to indicate whether the key event was needed or not. Any existing code you've got will break in the compiler, so just change it to return true if the key was used, or false to allow the event to be passed up to the next component in the chain. (This change is a better architecture than before, and was also needed so that plugins can allow unused key events to be passed on to the host application) | |||
| - swapped the look and feel classes around, so that the basic LookAndFeel class is now what used to be the "shiny" one. The ShinyLookAndFeel class has been removed, and for that old fashioned look, I've added an OldSchoolLookAndFeel that you can use if you need the original L+F. This means that any custom looks that you were using may need to change their base class. | |||
| @@ -60,7 +60,8 @@ static JUCEApplication* appInstance = 0; | |||
| //============================================================================== | |||
| JUCEApplication::JUCEApplication() | |||
| : stillInitialising (true) | |||
| : appReturnValue (0), | |||
| stillInitialising (true) | |||
| { | |||
| } | |||
| @@ -103,6 +104,11 @@ void JUCEApplication::quit (const bool useMaximumForce) | |||
| MessageManager::getInstance()->postQuitMessage (useMaximumForce); | |||
| } | |||
| void JUCEApplication::setApplicationReturnValue (const int newReturnValue) throw() | |||
| { | |||
| appReturnValue = newReturnValue; | |||
| } | |||
| //============================================================================== | |||
| void JUCEApplication::unhandledException (const std::exception*, | |||
| const String&, | |||
| @@ -218,15 +224,14 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app) | |||
| } | |||
| #endif | |||
| shutdownAppAndClearUp (useForce); | |||
| return 0; | |||
| return shutdownAppAndClearUp (useForce); | |||
| } | |||
| void JUCEApplication::shutdownAppAndClearUp (bool useMaximumForce) | |||
| int JUCEApplication::shutdownAppAndClearUp (const bool useMaximumForce) | |||
| { | |||
| jassert (appInstance != 0); | |||
| JUCEApplication* const app = appInstance; | |||
| int returnValue = 0; | |||
| static bool reentrancyCheck = false; | |||
| @@ -254,6 +259,8 @@ void JUCEApplication::shutdownAppAndClearUp (bool useMaximumForce) | |||
| { | |||
| shutdownJuce_GUI(); | |||
| returnValue = app->getApplicationReturnValue(); | |||
| appInstance = 0; | |||
| delete app; | |||
| } | |||
| @@ -266,6 +273,8 @@ void JUCEApplication::shutdownAppAndClearUp (bool useMaximumForce) | |||
| reentrancyCheck = false; | |||
| } | |||
| return returnValue; | |||
| } | |||
| int JUCEApplication::main (int argc, char* argv[], | |||
| @@ -248,6 +248,20 @@ public: | |||
| */ | |||
| static void quit (const bool useMaximumForce = false); | |||
| /** Sets the value that should be returned as the application's exit code when the | |||
| app quits. | |||
| This is the value that's returned by the main() function. Normally you'd leave this | |||
| as 0 unless you want to indicate an error code. | |||
| @see getApplicationReturnValue | |||
| */ | |||
| void setApplicationReturnValue (const int newReturnValue) throw(); | |||
| /** Returns the value that has been set as the application's exit code. | |||
| @see setApplicationReturnValue | |||
| */ | |||
| int getApplicationReturnValue() const throw() { return appReturnValue; } | |||
| //============================================================================== | |||
| // These are used by the START_JUCE_APPLICATION() macro and aren't for public use. | |||
| @@ -276,9 +290,10 @@ public: | |||
| private: | |||
| //============================================================================== | |||
| int appReturnValue; | |||
| bool stillInitialising; | |||
| static void shutdownAppAndClearUp (bool useMaximumForce); | |||
| static int shutdownAppAndClearUp (const bool useMaximumForce); | |||
| }; | |||