OpenShot Audio Library | OpenShotAudio 0.3.2

Loading...
Searching...
No Matches
juce_Initialisation.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23 namespace juce
24{
25
26//==============================================================================
38 JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI();
39
48JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI();
49
50
51//==============================================================================
69 class JUCE_API ScopedJuceInitialiser_GUI final
70{
71 public:
73 ScopedJuceInitialiser_GUI();
74
76 ~ScopedJuceInitialiser_GUI();
77};
78
79
80//==============================================================================
87#ifdef DOXYGEN
88 #define START_JUCE_APPLICATION(AppClass)
89#else
90 #if JUCE_WINDOWS && ! defined (_CONSOLE)
91 #define JUCE_MAIN_FUNCTION int __stdcall WinMain (struct HINSTANCE__*, struct HINSTANCE__*, char*, int)
92 #define JUCE_MAIN_FUNCTION_ARGS
93 #else
94 #define JUCE_MAIN_FUNCTION int main (int argc, char* argv[])
95 #define JUCE_MAIN_FUNCTION_ARGS argc, (const char**) argv
96 #endif
97
98 #if JUCE_IOS
99
100 #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \
101 juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \
102 void* juce_GetIOSCustomDelegateClass() { return nullptr; }
103
104 #define JUCE_CREATE_APPLICATION_DEFINE_CUSTOM_DELEGATE(AppClass, DelegateClass) \
105 juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \
106 void* juce_GetIOSCustomDelegateClass() { return [DelegateClass class]; }
107
108 #define JUCE_MAIN_FUNCTION_DEFINITION \
109 extern "C" JUCE_MAIN_FUNCTION \
110 { \
111 juce::JUCEApplicationBase::createInstance = &juce_CreateApplication; \
112 juce::JUCEApplicationBase::iOSCustomDelegate = juce_GetIOSCustomDelegateClass(); \
113 return juce::JUCEApplicationBase::main (JUCE_MAIN_FUNCTION_ARGS); \
114 }
115
116 #elif JUCE_ANDROID
117
118 #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \
119 extern "C" juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); }
120
121 #define JUCE_MAIN_FUNCTION_DEFINITION
122
123 #else
124
125 #define JUCE_CREATE_APPLICATION_DEFINE(AppClass) \
126 juce::JUCEApplicationBase* juce_CreateApplication(); \
127 juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); }
128
129 #define JUCE_MAIN_FUNCTION_DEFINITION \
130 extern "C" JUCE_MAIN_FUNCTION \
131 { \
132 juce::JUCEApplicationBase::createInstance = &juce_CreateApplication; \
133 return juce::JUCEApplicationBase::main (JUCE_MAIN_FUNCTION_ARGS); \
134 }
135
136 #endif
137
138 #if JucePlugin_Build_Standalone
139 #if JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP
140 #define START_JUCE_APPLICATION(AppClass) JUCE_CREATE_APPLICATION_DEFINE(AppClass)
141 #if JUCE_IOS
142 #define START_JUCE_APPLICATION_WITH_CUSTOM_DELEGATE(AppClass, DelegateClass) JUCE_CREATE_APPLICATION_DEFINE_CUSTOM_DELEGATE(AppClass, DelegateClass)
143 #endif
144 #else
145 #define START_JUCE_APPLICATION(AppClass) static_assert(false, "You are trying to use START_JUCE_APPLICATION in an audio plug-in. Define JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 if you want to use a custom standalone target app.");
146 #if JUCE_IOS
147 #define START_JUCE_APPLICATION_WITH_CUSTOM_DELEGATE(AppClass, DelegateClass) static_assert(false, "You are trying to use START_JUCE_APPLICATION in an audio plug-in. Define JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 if you want to use a custom standalone target app.");
148 #endif
149 #endif
150 #else
151
152 #define START_JUCE_APPLICATION(AppClass) \
153 JUCE_CREATE_APPLICATION_DEFINE(AppClass) \
154 JUCE_MAIN_FUNCTION_DEFINITION
155
156 #if JUCE_IOS
197 #define START_JUCE_APPLICATION_WITH_CUSTOM_DELEGATE(AppClass, DelegateClass) \
198 JUCE_CREATE_APPLICATION_DEFINE_CUSTOM_DELEGATE(AppClass, DelegateClass) \
199 JUCE_MAIN_FUNCTION_DEFINITION
200 #endif
201 #endif
202#endif
203
204} // namespace juce
juce::ScopedJuceInitialiser_GUI
Definition: juce_Initialisation.h:70