155 virtual void shutdown() = 0;
199 const String& sourceFilename,
245 static StringArray JUCE_CALLTYPE getCommandLineParameterArray();
250 static String JUCE_CALLTYPE getCommandLineParameters();
261 void setApplicationReturnValue (
int newReturnValue)
noexcept;
286 static int main (
int argc,
const char* argv[]);
288 static void appWillTerminateByForce();
290 static CreateInstanceFunction createInstance;
293 static void* iOSCustomDelegate;
296 virtual bool initialiseApp();
298 static void JUCE_CALLTYPE sendUnhandledException (
const std::exception*,
const char* sourceFile,
int lineNumber);
299 bool sendCommandLineToPreexistingInstance();
305 int appReturnValue = 0;
306 bool stillInitialising =
true;
308 struct MultipleInstanceHandler;
309 std::unique_ptr<MultipleInstanceHandler> multipleInstanceHandler;
316#if JUCE_CATCH_UNHANDLED_EXCEPTIONS || defined (DOXYGEN)
328 #define JUCE_CATCH_EXCEPTION \
329 catch (const std::exception& e) { juce::JUCEApplicationBase::sendUnhandledException (&e, __FILE__, __LINE__); } \
330 catch (...) { juce::JUCEApplicationBase::sendUnhandledException (nullptr, __FILE__, __LINE__); }
334 #define JUCE_CATCH_EXCEPTION
Abstract base class for application classes.
bool isInitialising() const noexcept
Returns true if the application hasn't yet completed its initialise() method and entered the main eve...
virtual void systemRequestedQuit()=0
Called when the operating system is trying to close the application.
virtual void initialise(const String &commandLineParameters)=0
Called when the application starts.
virtual const String getApplicationName()=0
Returns the application's name.
virtual void memoryWarningReceived()
Called by the operating system to indicate that you should reduce your memory footprint.
virtual void suspended()=0
This method is called when the application is being put into background mode by the operating system.
virtual void resumed()=0
This method is called when the application is being woken from background mode by the operating syste...
virtual void anotherInstanceStarted(const String &commandLine)=0
Indicates that the user has tried to start up another instance of the app.
virtual bool backButtonPressed()
This will be called when the back button on a device is pressed.
static JUCEApplicationBase * getInstance() noexcept
Returns the global instance of the application object that's running.
virtual const String getApplicationVersion()=0
Returns the application's version number.
static bool isStandaloneApp() noexcept
Returns true if this executable is running as an app (as opposed to being a plugin or other kind of s...
virtual void unhandledException(const std::exception *, const String &sourceFilename, int lineNumber)=0
If any unhandled exceptions make it through to the message dispatch loop, this callback will be trigg...
virtual bool moreThanOneInstanceAllowed()=0
Checks whether multiple instances of the app are allowed.
int getApplicationReturnValue() const noexcept
Returns the value that has been set as the application's exit code.
A special array for holding a list of strings.
#define JUCE_API
This macro is added to all JUCE public class declarations.