diff --git a/extras/Introjucer/Source/Project/jucer_ProjectSaver.h b/extras/Introjucer/Source/Project/jucer_ProjectSaver.h index 8b5f7e043d..b0ea5e1357 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectSaver.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectSaver.h @@ -305,7 +305,7 @@ private: << "#if ! DONT_SET_USING_JUCE_NAMESPACE" << newLine << " // If your code uses a lot of JUCE classes, then this will obviously save you" << newLine << " // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE." << newLine - << " using namespace JUCE_NAMESPACE;" << newLine + << " using namespace juce;" << newLine << "#endif" << newLine << newLine << "namespace ProjectInfo" << newLine diff --git a/extras/JuceDemo/JuceLibraryCode/JuceHeader.h b/extras/JuceDemo/JuceLibraryCode/JuceHeader.h index 0371cd1584..aeafec40b8 100644 --- a/extras/JuceDemo/JuceLibraryCode/JuceHeader.h +++ b/extras/JuceDemo/JuceLibraryCode/JuceHeader.h @@ -33,7 +33,7 @@ #if ! DONT_SET_USING_JUCE_NAMESPACE // If your code uses a lot of JUCE classes, then this will obviously save you // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. - using namespace JUCE_NAMESPACE; + using namespace juce; #endif namespace ProjectInfo diff --git a/extras/audio plugin host/JuceLibraryCode/JuceHeader.h b/extras/audio plugin host/JuceLibraryCode/JuceHeader.h index 4a7c0085d6..a69c36e534 100644 --- a/extras/audio plugin host/JuceLibraryCode/JuceHeader.h +++ b/extras/audio plugin host/JuceLibraryCode/JuceHeader.h @@ -31,7 +31,7 @@ #if ! DONT_SET_USING_JUCE_NAMESPACE // If your code uses a lot of JUCE classes, then this will obviously save you // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. - using namespace JUCE_NAMESPACE; + using namespace juce; #endif namespace ProjectInfo diff --git a/extras/binarybuilder/JuceLibraryCode/JuceHeader.h b/extras/binarybuilder/JuceLibraryCode/JuceHeader.h index 121c0f610a..602f860a64 100644 --- a/extras/binarybuilder/JuceLibraryCode/JuceHeader.h +++ b/extras/binarybuilder/JuceLibraryCode/JuceHeader.h @@ -19,7 +19,7 @@ #if ! DONT_SET_USING_JUCE_NAMESPACE // If your code uses a lot of JUCE classes, then this will obviously save you // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. - using namespace JUCE_NAMESPACE; + using namespace juce; #endif namespace ProjectInfo diff --git a/extras/browser plugin demo/src/JuceHeader.h b/extras/browser plugin demo/src/JuceHeader.h index 5dbe269d0a..2c5b1a0bdd 100644 --- a/extras/browser plugin demo/src/JuceHeader.h +++ b/extras/browser plugin demo/src/JuceHeader.h @@ -10,9 +10,9 @@ #include "AppConfig.h" #include "../../../modules/juce_browser_plugin/juce_browser_plugin.h" -#if defined (JUCE_NAMESPACE) && ! DONT_SET_USING_JUCE_NAMESPACE +#if ! DONT_SET_USING_JUCE_NAMESPACE /* If you're not mixing JUCE with other libraries, then this will obviously save a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. */ - using namespace JUCE_NAMESPACE; + using namespace juce; #endif diff --git a/extras/example projects/JuceLibraryCode/JuceHeader.h b/extras/example projects/JuceLibraryCode/JuceHeader.h index ce56372e44..d4a2fc13ef 100644 --- a/extras/example projects/JuceLibraryCode/JuceHeader.h +++ b/extras/example projects/JuceLibraryCode/JuceHeader.h @@ -24,7 +24,7 @@ #if ! DONT_SET_USING_JUCE_NAMESPACE // If your code uses a lot of JUCE classes, then this will obviously save you // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. - using namespace JUCE_NAMESPACE; + using namespace juce; #endif namespace ProjectInfo diff --git a/extras/static library/JuceLibraryCode/JuceHeader.h b/extras/static library/JuceLibraryCode/JuceHeader.h index a144c8537b..62b91e2993 100644 --- a/extras/static library/JuceLibraryCode/JuceHeader.h +++ b/extras/static library/JuceLibraryCode/JuceHeader.h @@ -31,7 +31,7 @@ #if ! DONT_SET_USING_JUCE_NAMESPACE // If your code uses a lot of JUCE classes, then this will obviously save you // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. - using namespace JUCE_NAMESPACE; + using namespace juce; #endif namespace ProjectInfo diff --git a/extras/windows dll/JuceLibraryCode/JuceHeader.h b/extras/windows dll/JuceLibraryCode/JuceHeader.h index 9104600f58..68d4c6b9b5 100644 --- a/extras/windows dll/JuceLibraryCode/JuceHeader.h +++ b/extras/windows dll/JuceLibraryCode/JuceHeader.h @@ -29,11 +29,11 @@ #include "../../../modules/juce_opengl/juce_opengl.h" #include "../../../modules/juce_video/juce_video.h" -#if defined (JUCE_NAMESPACE) && ! DONT_SET_USING_JUCE_NAMESPACE +#if ! DONT_SET_USING_JUCE_NAMESPACE /* If you're not mixing JUCE with other libraries, then this will obviously save a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. */ - using namespace JUCE_NAMESPACE; + using namespace juce; #endif namespace ProjectInfo diff --git a/juce.h b/juce.h index 5859c12444..efc96ea782 100644 --- a/juce.h +++ b/juce.h @@ -61,11 +61,11 @@ //============================================================================== -#if defined (JUCE_NAMESPACE) && ! DONT_SET_USING_JUCE_NAMESPACE +#if ! DONT_SET_USING_JUCE_NAMESPACE /* If you're not mixing JUCE with other libraries, then this will obviously save a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. */ - using namespace JUCE_NAMESPACE; + using namespace juce; #endif #endif // __JUCE_JUCEHEADER__ diff --git a/modules/juce_audio_devices/juce_audio_devices.cpp b/modules/juce_audio_devices/juce_audio_devices.cpp index 8a24cecf7b..7e6fb97333 100644 --- a/modules/juce_audio_devices/juce_audio_devices.cpp +++ b/modules/juce_audio_devices/juce_audio_devices.cpp @@ -138,7 +138,7 @@ // END_AUTOINCLUDE //============================================================================== -using namespace JUCE_NAMESPACE; +using namespace juce; BEGIN_JUCE_NAMESPACE diff --git a/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp b/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp index 5521bdd325..999a4158df 100644 --- a/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp +++ b/modules/juce_audio_devices/native/juce_linux_JackAudio.cpp @@ -123,7 +123,7 @@ public: jassert (deviceName.isNotEmpty()); jack_status_t status; - client = JUCE_NAMESPACE::jack_client_open (JUCE_JACK_CLIENT_NAME, JackNoStartServer, &status); + client = juce::jack_client_open (JUCE_JACK_CLIENT_NAME, JackNoStartServer, &status); if (client == 0) { @@ -131,7 +131,7 @@ public: } else { - JUCE_NAMESPACE::jack_set_error_function (errorCallback); + juce::jack_set_error_function (errorCallback); // open input ports const StringArray inputChannels (getInputChannelNames()); @@ -140,8 +140,8 @@ public: String inputName; inputName << "in_" << ++totalNumberOfInputChannels; - inputPorts.add (JUCE_NAMESPACE::jack_port_register (client, inputName.toUTF8(), - JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0)); + inputPorts.add (juce::jack_port_register (client, inputName.toUTF8(), + JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0)); } // open output ports @@ -151,8 +151,8 @@ public: String outputName; outputName << "out_" << ++totalNumberOfOutputChannels; - outputPorts.add (JUCE_NAMESPACE::jack_port_register (client, outputName.toUTF8(), - JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0)); + outputPorts.add (juce::jack_port_register (client, outputName.toUTF8(), + JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0)); } inChans.calloc (totalNumberOfInputChannels + 2); @@ -165,7 +165,7 @@ public: close(); if (client != 0) { - JUCE_NAMESPACE::jack_client_close (client); + juce::jack_client_close (client); client = 0; } } @@ -173,8 +173,8 @@ public: StringArray getChannelNames (bool forInput) const { StringArray names; - const char** const ports = JUCE_NAMESPACE::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ - forInput ? JackPortIsInput : JackPortIsOutput); + const char** const ports = juce::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ + forInput ? JackPortIsInput : JackPortIsOutput); if (ports != 0) { @@ -196,10 +196,10 @@ public: StringArray getOutputChannelNames() { return getChannelNames (false); } StringArray getInputChannelNames() { return getChannelNames (true); } int getNumSampleRates() { return client != 0 ? 1 : 0; } - double getSampleRate (int index) { return client != 0 ? JUCE_NAMESPACE::jack_get_sample_rate (client) : 0; } + double getSampleRate (int index) { return client != 0 ? juce::jack_get_sample_rate (client) : 0; } int getNumBufferSizesAvailable() { return client != 0 ? 1 : 0; } int getBufferSizeSamples (int index) { return getDefaultBufferSize(); } - int getDefaultBufferSize() { return client != 0 ? JUCE_NAMESPACE::jack_get_buffer_size (client) : 0; } + int getDefaultBufferSize() { return client != 0 ? juce::jack_get_buffer_size (client) : 0; } String open (const BigInteger& inputChannels, const BigInteger& outputChannels, double sampleRate, int bufferSizeSamples) @@ -213,14 +213,14 @@ public: lastError = String::empty; close(); - JUCE_NAMESPACE::jack_set_process_callback (client, processCallback, this); - JUCE_NAMESPACE::jack_on_shutdown (client, shutdownCallback, this); - JUCE_NAMESPACE::jack_activate (client); + juce::jack_set_process_callback (client, processCallback, this); + juce::jack_on_shutdown (client, shutdownCallback, this); + juce::jack_activate (client); isOpen_ = true; if (! inputChannels.isZero()) { - const char** const ports = JUCE_NAMESPACE::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsOutput); + const char** const ports = juce::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsOutput); if (ports != 0) { @@ -232,7 +232,7 @@ public: if (inputChannels[i] && portName.upToFirstOccurrenceOf (":", false, false) == getName()) { - int error = JUCE_NAMESPACE::jack_connect (client, ports[i], JUCE_NAMESPACE::jack_port_name ((jack_port_t*) inputPorts[i])); + int error = juce::jack_connect (client, ports[i], juce::jack_port_name ((jack_port_t*) inputPorts[i])); if (error != 0) jack_Log ("Cannot connect input port " + String (i) + " (" + String (ports[i]) + "), error " + String (error)); } @@ -244,7 +244,7 @@ public: if (! outputChannels.isZero()) { - const char** const ports = JUCE_NAMESPACE::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsInput); + const char** const ports = juce::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsInput); if (ports != 0) { @@ -256,7 +256,7 @@ public: if (outputChannels[i] && portName.upToFirstOccurrenceOf (":", false, false) == getName()) { - int error = JUCE_NAMESPACE::jack_connect (client, JUCE_NAMESPACE::jack_port_name ((jack_port_t*) outputPorts[i]), ports[i]); + int error = juce::jack_connect (client, juce::jack_port_name ((jack_port_t*) outputPorts[i]), ports[i]); if (error != 0) jack_Log ("Cannot connect output port " + String (i) + " (" + String (ports[i]) + "), error " + String (error)); } @@ -275,9 +275,9 @@ public: if (client != 0) { - JUCE_NAMESPACE::jack_deactivate (client); - JUCE_NAMESPACE::jack_set_process_callback (client, processCallback, 0); - JUCE_NAMESPACE::jack_on_shutdown (client, shutdownCallback, 0); + juce::jack_deactivate (client); + juce::jack_set_process_callback (client, processCallback, 0); + juce::jack_on_shutdown (client, shutdownCallback, 0); } isOpen_ = false; @@ -319,7 +319,7 @@ public: BigInteger outputBits; for (int i = 0; i < outputPorts.size(); i++) - if (JUCE_NAMESPACE::jack_port_connected ((jack_port_t*) outputPorts [i])) + if (juce::jack_port_connected ((jack_port_t*) outputPorts [i])) outputBits.setBit (i); return outputBits; @@ -330,7 +330,7 @@ public: BigInteger inputBits; for (int i = 0; i < inputPorts.size(); i++) - if (JUCE_NAMESPACE::jack_port_connected ((jack_port_t*) inputPorts [i])) + if (juce::jack_port_connected ((jack_port_t*) inputPorts [i])) inputBits.setBit (i); return inputBits; @@ -341,7 +341,7 @@ public: int latency = 0; for (int i = 0; i < outputPorts.size(); i++) - latency = jmax (latency, (int) JUCE_NAMESPACE::jack_port_get_total_latency (client, (jack_port_t*) outputPorts [i])); + latency = jmax (latency, (int) juce::jack_port_get_total_latency (client, (jack_port_t*) outputPorts [i])); return latency; } @@ -351,7 +351,7 @@ public: int latency = 0; for (int i = 0; i < inputPorts.size(); i++) - latency = jmax (latency, (int) JUCE_NAMESPACE::jack_port_get_total_latency (client, (jack_port_t*) inputPorts [i])); + latency = jmax (latency, (int) juce::jack_port_get_total_latency (client, (jack_port_t*) inputPorts [i])); return latency; } @@ -366,7 +366,7 @@ private: for (i = 0; i < totalNumberOfInputChannels; ++i) { jack_default_audio_sample_t* in - = (jack_default_audio_sample_t*) JUCE_NAMESPACE::jack_port_get_buffer ((jack_port_t*) inputPorts.getUnchecked(i), numSamples); + = (jack_default_audio_sample_t*) juce::jack_port_get_buffer ((jack_port_t*) inputPorts.getUnchecked(i), numSamples); if (in != nullptr) inChans [numActiveInChans++] = (float*) in; @@ -375,7 +375,7 @@ private: for (i = 0; i < totalNumberOfOutputChannels; ++i) { jack_default_audio_sample_t* out - = (jack_default_audio_sample_t*) JUCE_NAMESPACE::jack_port_get_buffer ((jack_port_t*) outputPorts.getUnchecked(i), numSamples); + = (jack_default_audio_sample_t*) juce::jack_port_get_buffer ((jack_port_t*) outputPorts.getUnchecked(i), numSamples); if (out != nullptr) outChans [numActiveOutChans++] = (float*) out; @@ -469,7 +469,7 @@ public: // open a dummy client jack_status_t status; - jack_client_t* client = JUCE_NAMESPACE::jack_client_open ("JuceJackDummy", JackNoStartServer, &status); + jack_client_t* client = juce::jack_client_open ("JuceJackDummy", JackNoStartServer, &status); if (client == 0) { @@ -478,7 +478,7 @@ public: else { // scan for output devices - const char** ports = JUCE_NAMESPACE::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsOutput); + const char** ports = juce::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsOutput); if (ports != 0) { @@ -502,7 +502,7 @@ public: } // scan for input devices - ports = JUCE_NAMESPACE::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsInput); + ports = juce::jack_get_ports (client, 0, 0, /* JackPortIsPhysical | */ JackPortIsInput); if (ports != 0) { @@ -525,7 +525,7 @@ public: free (ports); } - JUCE_NAMESPACE::jack_client_close (client); + juce::jack_client_close (client); } } diff --git a/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm b/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm index 89e45c4595..5507c12d0e 100644 --- a/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm +++ b/modules/juce_audio_devices/native/juce_mac_AudioCDBurner.mm @@ -39,8 +39,8 @@ END_JUCE_NAMESPACE - (OpenDiskDevice*) initWithDRDevice: (DRDevice*) device; - (void) dealloc; -- (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) numSamples_; -- (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error +- (void) addSourceTrack: (juce::AudioSource*) source numSamples: (int) numSamples_; +- (void) burn: (juce::AudioCDBurner::BurnProgressListener*) listener errorString: (juce::String*) error ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting speed: (int) burnSpeed; @end @@ -49,12 +49,12 @@ END_JUCE_NAMESPACE @interface AudioTrackProducer : NSObject { - JUCE_NAMESPACE::AudioSource* source; + juce::AudioSource* source; int readPosition, lengthInFrames; } - (AudioTrackProducer*) init: (int) lengthInFrames; -- (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) lengthInSamples; +- (AudioTrackProducer*) initWithAudioSource: (juce::AudioSource*) source numSamples: (int) lengthInSamples; - (void) dealloc; - (void) setupTrackProperties: (DRTrack*) track; @@ -99,7 +99,7 @@ END_JUCE_NAMESPACE [super dealloc]; } -- (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) numSamples_ +- (void) addSourceTrack: (juce::AudioSource*) source_ numSamples: (int) numSamples_ { AudioTrackProducer* p = [[AudioTrackProducer alloc] initWithAudioSource: source_ numSamples: numSamples_]; DRTrack* t = [[DRTrack alloc] initWithProducer: p]; @@ -111,7 +111,7 @@ END_JUCE_NAMESPACE [p release]; } -- (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error +- (void) burn: (juce::AudioCDBurner::BurnProgressListener*) listener errorString: (juce::String*) error ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting speed: (int) burnSpeed { DRBurn* burn = [DRBurn burnForDevice: device]; @@ -131,7 +131,7 @@ END_JUCE_NAMESPACE [d setObject: (shouldEject ? DRBurnCompletionActionEject : DRBurnCompletionActionMount) forKey: DRBurnCompletionActionKey]; if (burnSpeed > 0) - [d setObject: [NSNumber numberWithFloat: burnSpeed * JUCE_NAMESPACE::kilobytesPerSecond1x] forKey: DRBurnRequestedSpeedKey]; + [d setObject: [NSNumber numberWithFloat: burnSpeed * juce::kilobytesPerSecond1x] forKey: DRBurnRequestedSpeedKey]; if (! underrunProtection) [d setObject: [NSNumber numberWithBool: false] forKey: DRBurnUnderrunProtectionKey]; @@ -142,7 +142,7 @@ END_JUCE_NAMESPACE for (;;) { - JUCE_NAMESPACE::Thread::sleep (300); + juce::Thread::sleep (300); float progress = [[[burn status] objectForKey: DRStatusPercentCompleteKey] floatValue]; if (listener != nullptr && listener->audioCDBurnProgress (progress)) @@ -167,7 +167,7 @@ END_JUCE_NAMESPACE if ([err length] > 0) { - *error = JUCE_NAMESPACE::CharPointer_UTF8 ([err UTF8String]); + *error = juce::CharPointer_UTF8 ([err UTF8String]); break; } } @@ -202,7 +202,7 @@ END_JUCE_NAMESPACE [p release]; } -- (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) lengthInSamples +- (AudioTrackProducer*) initWithAudioSource: (juce::AudioSource*) source_ numSamples: (int) lengthInSamples { AudioTrackProducer* s = [self init: (lengthInSamples + 587) / 588]; @@ -269,28 +269,28 @@ END_JUCE_NAMESPACE if (source != nullptr) { - const int numSamples = JUCE_NAMESPACE::jmin ((int) bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); + const int numSamples = juce::jmin ((int) bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); if (numSamples > 0) { - JUCE_NAMESPACE::AudioSampleBuffer tempBuffer (2, numSamples); + juce::AudioSampleBuffer tempBuffer (2, numSamples); - JUCE_NAMESPACE::AudioSourceChannelInfo info; + juce::AudioSourceChannelInfo info; info.buffer = &tempBuffer; info.startSample = 0; info.numSamples = numSamples; source->getNextAudioBlock (info); - typedef JUCE_NAMESPACE::AudioData::Pointer CDSampleFormat; + typedef juce::AudioData::Pointer CDSampleFormat; - typedef JUCE_NAMESPACE::AudioData::Pointer SourceSampleFormat; + typedef juce::AudioData::Pointer SourceSampleFormat; CDSampleFormat left (buffer, 2); left.convertSamples (SourceSampleFormat (tempBuffer.getSampleData (0)), numSamples); CDSampleFormat right (buffer + 2, 2); @@ -538,7 +538,7 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps) return false; } -String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener* listener, +String AudioCDBurner::burn (juce::AudioCDBurner::BurnProgressListener* listener, bool ejectDiscAfterwards, bool performFakeBurnForTesting, int writeSpeed) diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index 83f666c460..f1465cc193 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -308,7 +308,7 @@ public: if (juceFilter != nullptr) { - JUCE_NAMESPACE::MemoryBlock state; + juce::MemoryBlock state; juceFilter->getCurrentProgramStateInformation (state); if (state.getSize() > 0) @@ -339,7 +339,7 @@ public: if (data != 0) { const int numBytes = (int) CFDataGetLength (data); - const JUCE_NAMESPACE::uint8* const rawBytes = CFDataGetBytePtr (data); + const juce::uint8* const rawBytes = CFDataGetBytePtr (data); if (numBytes > 0) juceFilter->setCurrentProgramStateInformation (rawBytes, numBytes); @@ -777,7 +777,7 @@ public: if (! midiEvents.isEmpty()) { #if JucePlugin_ProducesMidiOutput - const JUCE_NAMESPACE::uint8* midiEventData; + const juce::uint8* midiEventData; int midiEventSize, midiEventPosition; MidiBuffer::Iterator i (midiEvents); @@ -842,9 +842,9 @@ protected: { #if JucePlugin_WantsMidiInput const ScopedLock sl (incomingMidiLock); - const JUCE_NAMESPACE::uint8 data[] = { (JUCE_NAMESPACE::uint8) (nStatus | inChannel), - (JUCE_NAMESPACE::uint8) inData1, - (JUCE_NAMESPACE::uint8) inData2 }; + const juce::uint8 data[] = { (juce::uint8) (nStatus | inChannel), + (juce::uint8) inData1, + (juce::uint8) inData2 }; incomingEvents.addEvent (data, 3, inStartFrame); #endif @@ -926,7 +926,7 @@ private: SMPTETime lastSMPTETime; AUChannelInfo channelInfo [numChannelConfigs]; AudioUnitEvent auEvent; - mutable JUCE_NAMESPACE::MemoryBlock presetsArray; + mutable juce::MemoryBlock presetsArray; CriticalSection incomingMidiLock; JUCE_DECLARE_NON_COPYABLE (JuceAU); diff --git a/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp b/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp index 799734d91d..af265952e3 100644 --- a/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp @@ -112,14 +112,14 @@ //============================================================================== #if JUCE_WINDOWS - extern void JUCE_CALLTYPE attachSubWindow (void* hostWindow, int& titleW, int& titleH, JUCE_NAMESPACE::Component* comp); - extern void JUCE_CALLTYPE resizeHostWindow (void* hostWindow, int& titleW, int& titleH, JUCE_NAMESPACE::Component* comp); + extern void JUCE_CALLTYPE attachSubWindow (void* hostWindow, int& titleW, int& titleH, juce::Component* comp); + extern void JUCE_CALLTYPE resizeHostWindow (void* hostWindow, int& titleW, int& titleH, juce::Component* comp); #if ! JucePlugin_EditorRequiresKeyboardFocus extern void JUCE_CALLTYPE passFocusToHostWindow (void* hostWindow); #endif #else - extern void* attachSubWindow (void* hostWindowRef, JUCE_NAMESPACE::Component* comp); - extern void removeSubWindow (void* nsWindow, JUCE_NAMESPACE::Component* comp); + extern void* attachSubWindow (void* hostWindowRef, juce::Component* comp); + extern void removeSubWindow (void* nsWindow, juce::Component* comp); extern void forwardCurrentKeyEventToHostWindow(); #endif @@ -232,7 +232,7 @@ public: void timerCallback() { - if (! JUCE_NAMESPACE::Component::isMouseButtonDownAnywhere()) + if (! juce::Component::isMouseButtonDownAnywhere()) { stopTimer(); @@ -287,7 +287,7 @@ public: private: AudioProcessor* const filter; JucePlugInProcess* const process; - ScopedPointer wrapper; + ScopedPointer wrapper; ScopedPointer editorComp; void deleteEditorComp() @@ -297,7 +297,7 @@ public: JUCE_AUTORELEASEPOOL PopupMenu::dismissAllActiveMenus(); - JUCE_NAMESPACE::Component* const modalComponent = JUCE_NAMESPACE::Component::getCurrentlyModalComponent(); + juce::Component* const modalComponent = juce::Component::getCurrentlyModalComponent(); if (modalComponent != nullptr) modalComponent->exitModalState (0); @@ -311,7 +311,7 @@ public: //============================================================================== // A component to hold the AudioProcessorEditor, and cope with some housekeeping // chores when it changes or repaints. - class EditorCompWrapper : public JUCE_NAMESPACE::Component + class EditorCompWrapper : public juce::Component #if ! JUCE_MAC , public FocusChangeListener #endif @@ -364,7 +364,7 @@ public: void resized() { - JUCE_NAMESPACE::Component* const c = getChildComponent (0); + juce::Component* const c = getChildComponent (0); if (c != nullptr) c->setBounds (0, 0, getWidth(), getHeight()); @@ -373,7 +373,7 @@ public: } #if JUCE_WINDOWS - void globalFocusChanged (JUCE_NAMESPACE::Component*) + void globalFocusChanged (juce::Component*) { #if ! JucePlugin_EditorRequiresKeyboardFocus if (hasKeyboardFocus (true)) @@ -382,7 +382,7 @@ public: } #endif - void childBoundsChanged (JUCE_NAMESPACE::Component* child) + void childBoundsChanged (juce::Component* child) { setSize (child->getWidth(), child->getHeight()); child->setTopLeftPosition (0, 0); @@ -605,7 +605,7 @@ protected: if (! midiEvents.isEmpty()) { #if JucePlugin_ProducesMidiOutput - const JUCE_NAMESPACE::uint8* midiEventData; + const juce::uint8* midiEventData; int midiEventSize, midiEventPosition; MidiBuffer::Iterator i (midiEvents); @@ -798,7 +798,7 @@ private: ScopedPointer asyncUpdater; - JUCE_NAMESPACE::MemoryBlock tempFilterData; + juce::MemoryBlock tempFilterData; HeapBlock channels; bool prepared; double sampleRate; diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 7ec8f8f1c2..7c45a4ac98 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -89,7 +89,7 @@ class JuceVSTWrapper; static bool recursionCheck = false; -static JUCE_NAMESPACE::uint32 lastMasterIdleCall = 0; +static juce::uint32 lastMasterIdleCall = 0; BEGIN_JUCE_NAMESPACE extern void JUCE_API juce_callAnyTimersSynchronously(); @@ -559,7 +559,7 @@ public: outgoingEvents.ensureSize (numEvents); outgoingEvents.clear(); - const JUCE_NAMESPACE::uint8* midiEventData; + const juce::uint8* midiEventData; int midiEventSize, midiEventPosition; MidiBuffer::Iterator i (midiEvents); @@ -869,7 +869,7 @@ public: // because the chunk is only needed temporarily by the host (or at least you'd // hope so) we'll give it a while and then free it in the timer callback. - chunkMemoryTime = JUCE_NAMESPACE::Time::getApproximateMillisecondCounter(); + chunkMemoryTime = juce::Time::getApproximateMillisecondCounter(); return (VstInt32) chunkMemory.getSize(); } @@ -902,7 +902,7 @@ public: } if (chunkMemoryTime > 0 - && chunkMemoryTime < JUCE_NAMESPACE::Time::getApproximateMillisecondCounter() - 2000 + && chunkMemoryTime < juce::Time::getApproximateMillisecondCounter() - 2000 && ! recursionCheck) { chunkMemoryTime = 0; @@ -921,7 +921,7 @@ public: { if (Component::isMouseButtonDownAnywhere() && ! recursionCheck) { - const JUCE_NAMESPACE::uint32 now = JUCE_NAMESPACE::Time::getMillisecondCounter(); + const juce::uint32 now = juce::Time::getMillisecondCounter(); if (now > lastMasterIdleCall + 20 && editorComp != nullptr) { @@ -1291,8 +1291,8 @@ public: //============================================================================== private: AudioProcessor* filter; - JUCE_NAMESPACE::MemoryBlock chunkMemory; - JUCE_NAMESPACE::uint32 chunkMemoryTime; + juce::MemoryBlock chunkMemory; + juce::uint32 chunkMemoryTime; ScopedPointer editorComp; ERect editorSize; MidiBuffer midiEvents; diff --git a/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h b/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h index 0f03b96dd2..e24d59e28c 100644 --- a/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h +++ b/modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h @@ -25,9 +25,9 @@ #include "../juce_audio_plugin_client.h" -using namespace JUCE_NAMESPACE; +using namespace juce; #if JUCE_MAC - #define Point JUCE_NAMESPACE::Point - #define Component JUCE_NAMESPACE::Component + #define Point juce::Point + #define Component juce::Component #endif diff --git a/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h b/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h index ef09a4b301..68c0794065 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h +++ b/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h @@ -114,12 +114,12 @@ public: { if (e->type == kVstMidiType) { - dest.addEvent ((const JUCE_NAMESPACE::uint8*) ((const VstMidiEvent*) e)->midiData, + dest.addEvent ((const juce::uint8*) ((const VstMidiEvent*) e)->midiData, 4, e->deltaFrames); } else if (e->type == kVstSysExType) { - dest.addEvent ((const JUCE_NAMESPACE::uint8*) ((const VstMidiSysexEvent*) e)->sysexDump, + dest.addEvent ((const juce::uint8*) ((const VstMidiSysexEvent*) e)->sysexDump, (int) ((const VstMidiSysexEvent*) e)->dumpBytes, e->deltaFrames); } diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 8949419887..42fae03b00 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -66,10 +66,10 @@ BEGIN_JUCE_NAMESPACE //============================================================================== #if JUCE_LINUX - #define Font JUCE_NAMESPACE::Font - #define KeyPress JUCE_NAMESPACE::KeyPress - #define Drawable JUCE_NAMESPACE::Drawable - #define Time JUCE_NAMESPACE::Time + #define Font juce::Font + #define KeyPress juce::KeyPress + #define Drawable juce::Drawable + #define Time juce::Time #endif #include "juce_VSTMidiEventList.h" @@ -1386,7 +1386,7 @@ private: setSize (w, h); - startTimer (18 + JUCE_NAMESPACE::Random::getSystemRandom().nextInt (5)); + startTimer (18 + juce::Random::getSystemRandom().nextInt (5)); repaint(); } @@ -1500,7 +1500,7 @@ private: checkPluginWindowSize(); #endif - startTimer (18 + JUCE_NAMESPACE::Random::getSystemRandom().nextInt (5)); + startTimer (18 + juce::Random::getSystemRandom().nextInt (5)); repaint(); } #endif diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index 4a5ce27c3d..a5061bc1db 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -237,7 +237,7 @@ AudioProcessorEditor* AudioProcessor::createEditorIfNeeded() } //============================================================================== -void AudioProcessor::getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) +void AudioProcessor::getCurrentProgramStateInformation (juce::MemoryBlock& destData) { getStateInformation (destData); } @@ -251,8 +251,7 @@ void AudioProcessor::setCurrentProgramStateInformation (const void* data, int si // magic number to identify memory blocks that we've stored as XML const uint32 magicXmlNumber = 0x21324356; -void AudioProcessor::copyXmlToBinary (const XmlElement& xml, - JUCE_NAMESPACE::MemoryBlock& destData) +void AudioProcessor::copyXmlToBinary (const XmlElement& xml, juce::MemoryBlock& destData) { const String xmlString (xml.createDocument (String::empty, true, false)); const int stringLength = xmlString.getNumBytesAsUTF8(); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 57e47bef26..f5c224c971 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -486,7 +486,7 @@ public: @see getCurrentProgramStateInformation */ - virtual void getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData) = 0; + virtual void getStateInformation (juce::MemoryBlock& destData) = 0; /** The host will call this method if it wants to save the state of just the filter's current program. @@ -499,7 +499,7 @@ public: @see getStateInformation, setCurrentProgramStateInformation */ - virtual void getCurrentProgramStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); + virtual void getCurrentProgramStateInformation (juce::MemoryBlock& destData); /** This must restore the filter's state from a block of data previously created using getStateInformation(). @@ -559,7 +559,7 @@ protected: from a binary blob. */ static void copyXmlToBinary (const XmlElement& xml, - JUCE_NAMESPACE::MemoryBlock& destData); + juce::MemoryBlock& destData); /** Retrieves an XML element that was stored as binary with the copyXmlToBinary() method. diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp index 62cfa3c824..b7ac1b3b92 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp @@ -1332,7 +1332,7 @@ bool AudioProcessorGraph::isInputChannelStereoPair (int /*index*/) const { re bool AudioProcessorGraph::isOutputChannelStereoPair (int /*index*/) const { return true; } bool AudioProcessorGraph::acceptsMidi() const { return true; } bool AudioProcessorGraph::producesMidi() const { return true; } -void AudioProcessorGraph::getStateInformation (JUCE_NAMESPACE::MemoryBlock& /*destData*/) {} +void AudioProcessorGraph::getStateInformation (juce::MemoryBlock& /*destData*/) {} void AudioProcessorGraph::setStateInformation (const void* /*data*/, int /*sizeInBytes*/) {} @@ -1495,7 +1495,7 @@ void AudioProcessorGraph::AudioGraphIOProcessor::setCurrentProgram (int) const String AudioProcessorGraph::AudioGraphIOProcessor::getProgramName (int) { return String::empty; } void AudioProcessorGraph::AudioGraphIOProcessor::changeProgramName (int, const String&) {} -void AudioProcessorGraph::AudioGraphIOProcessor::getStateInformation (JUCE_NAMESPACE::MemoryBlock&) {} +void AudioProcessorGraph::AudioGraphIOProcessor::getStateInformation (juce::MemoryBlock&) {} void AudioProcessorGraph::AudioGraphIOProcessor::setStateInformation (const void*, int) {} void AudioProcessorGraph::AudioGraphIOProcessor::setParentGraph (AudioProcessorGraph* const newGraph) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index 14cfca6f5e..6a98ee38e6 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -342,7 +342,7 @@ public: const String getProgramName (int); void changeProgramName (int, const String&); - void getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); + void getStateInformation (juce::MemoryBlock& destData); void setStateInformation (const void* data, int sizeInBytes); /** @internal */ @@ -387,7 +387,7 @@ public: const String getProgramName (int) { return String::empty; } void changeProgramName (int, const String&) { } - void getStateInformation (JUCE_NAMESPACE::MemoryBlock& destData); + void getStateInformation (juce::MemoryBlock& destData); void setStateInformation (const void* data, int sizeInBytes); /** @internal */ diff --git a/modules/juce_browser_plugin/juce_browser_plugin.cpp b/modules/juce_browser_plugin/juce_browser_plugin.cpp index 92754831be..9088b0ae88 100644 --- a/modules/juce_browser_plugin/juce_browser_plugin.cpp +++ b/modules/juce_browser_plugin/juce_browser_plugin.cpp @@ -43,7 +43,7 @@ #endif #include "juce_browser_plugin.h" -using namespace JUCE_NAMESPACE; +using namespace juce; #if JUCE_BUILD_NPAPI #define JUCE_NPAPI_WRAPPED_IN_MM 1 diff --git a/modules/juce_browser_plugin/juce_browser_plugin.h b/modules/juce_browser_plugin/juce_browser_plugin.h index c59d1294b6..07630784ce 100644 --- a/modules/juce_browser_plugin/juce_browser_plugin.h +++ b/modules/juce_browser_plugin/juce_browser_plugin.h @@ -140,7 +140,7 @@ END_JUCE_NAMESPACE Obviously multiple instances may be used simultaneously, so be VERY cautious in your use of static variables! */ -JUCE_NAMESPACE::BrowserPluginComponent* JUCE_CALLTYPE createBrowserPlugin(); +juce::BrowserPluginComponent* JUCE_CALLTYPE createBrowserPlugin(); #endif // __JUCE_BROWSER_PLUGIN_JUCEHEADER__ diff --git a/modules/juce_browser_plugin/wrapper/juce_ActiveX_GlueCode.cpp b/modules/juce_browser_plugin/wrapper/juce_ActiveX_GlueCode.cpp index cbaf372582..c0b952f19c 100644 --- a/modules/juce_browser_plugin/wrapper/juce_ActiveX_GlueCode.cpp +++ b/modules/juce_browser_plugin/wrapper/juce_ActiveX_GlueCode.cpp @@ -39,7 +39,7 @@ #pragma warning (disable:4584) #include "../juce_browser_plugin.h" -using namespace JUCE_NAMESPACE; +using namespace juce; #include "juce_BrowserPluginComponent.h" diff --git a/modules/juce_core/memory/juce_LeakedObjectDetector.h b/modules/juce_core/memory/juce_LeakedObjectDetector.h index 77f81764b3..a707314de3 100644 --- a/modules/juce_core/memory/juce_LeakedObjectDetector.h +++ b/modules/juce_core/memory/juce_LeakedObjectDetector.h @@ -133,9 +133,9 @@ private: @see JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR, LeakedObjectDetector */ #define JUCE_LEAK_DETECTOR(OwnerClass) \ - friend class JUCE_NAMESPACE::LeakedObjectDetector; \ + friend class juce::LeakedObjectDetector; \ static const char* getLeakedObjectClassName() noexcept { return #OwnerClass; } \ - JUCE_NAMESPACE::LeakedObjectDetector JUCE_JOIN_MACRO (leakDetector, __LINE__); + juce::LeakedObjectDetector JUCE_JOIN_MACRO (leakDetector, __LINE__); #else #define JUCE_LEAK_DETECTOR(OwnerClass) #endif diff --git a/modules/juce_core/memory/juce_Memory.h b/modules/juce_core/memory/juce_Memory.h index 1a8dbca9a5..7c8d102545 100644 --- a/modules/juce_core/memory/juce_Memory.h +++ b/modules/juce_core/memory/juce_Memory.h @@ -87,9 +87,9 @@ inline int getAddressDifference (Type1* pointer1, Type2* pointer2) noexcept { r extern JUCE_API void juceDLL_free (void*); #define JUCE_LEAK_DETECTOR(OwnerClass) public:\ - static void* operator new (size_t sz) { return JUCE_NAMESPACE::juceDLL_malloc ((int) sz); } \ + static void* operator new (size_t sz) { return juce::juceDLL_malloc ((int) sz); } \ static void* operator new (size_t, void* p) { return p; } \ - static void operator delete (void* p) { JUCE_NAMESPACE::juceDLL_free (p); } \ + static void operator delete (void* p) { juce::juceDLL_free (p); } \ static void operator delete (void*, void*) {} #endif diff --git a/modules/juce_core/memory/juce_Singleton.h b/modules/juce_core/memory/juce_Singleton.h index cf3dc9d67a..b9b6e82d1b 100644 --- a/modules/juce_core/memory/juce_Singleton.h +++ b/modules/juce_core/memory/juce_Singleton.h @@ -89,13 +89,13 @@ #define juce_DeclareSingleton(classname, doNotRecreateAfterDeletion) \ \ static classname* _singletonInstance; \ - static JUCE_NAMESPACE::CriticalSection _singletonLock; \ + static juce::CriticalSection _singletonLock; \ \ static classname* JUCE_CALLTYPE getInstance() \ { \ if (_singletonInstance == nullptr) \ {\ - const JUCE_NAMESPACE::ScopedLock sl (_singletonLock); \ + const juce::ScopedLock sl (_singletonLock); \ \ if (_singletonInstance == nullptr) \ { \ @@ -126,7 +126,7 @@ \ static void JUCE_CALLTYPE deleteInstance() \ { \ - const JUCE_NAMESPACE::ScopedLock sl (_singletonLock); \ + const juce::ScopedLock sl (_singletonLock); \ if (_singletonInstance != nullptr) \ { \ classname* const old = _singletonInstance; \ @@ -151,7 +151,7 @@ #define juce_ImplementSingleton(classname) \ \ classname* classname::_singletonInstance = nullptr; \ - JUCE_NAMESPACE::CriticalSection classname::_singletonLock; + juce::CriticalSection classname::_singletonLock; //============================================================================== diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index 096efd0c65..e576b6bbdb 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -100,7 +100,7 @@ bool Process::openEmailWithAttachments (const String& targetEmailAddress, //============================================================================== END_JUCE_NAMESPACE -using namespace JUCE_NAMESPACE; +using namespace juce; //============================================================================== #define JuceURLConnection MakeObjCClassName(JuceURLConnection) diff --git a/modules/juce_core/system/juce_PlatformDefs.h b/modules/juce_core/system/juce_PlatformDefs.h index d32dce6e00..175daa6f94 100644 --- a/modules/juce_core/system/juce_PlatformDefs.h +++ b/modules/juce_core/system/juce_PlatformDefs.h @@ -87,14 +87,14 @@ This is only compiled in a debug build. @see Logger::outputDebugString */ - #define DBG(dbgtext) { JUCE_NAMESPACE::String tempDbgBuf; tempDbgBuf << dbgtext; JUCE_NAMESPACE::Logger::outputDebugString (tempDbgBuf); } + #define DBG(dbgtext) { juce::String tempDbgBuf; tempDbgBuf << dbgtext; juce::Logger::outputDebugString (tempDbgBuf); } //============================================================================== /** This will always cause an assertion failure. It is only compiled in a debug build, (unless JUCE_LOG_ASSERTIONS is enabled for your build). @see jassert */ - #define jassertfalse { juce_LogCurrentAssertion; if (JUCE_NAMESPACE::juce_isRunningUnderDebugger()) juce_breakDebugger; } + #define jassertfalse { juce_LogCurrentAssertion; if (juce::juce_isRunningUnderDebugger()) juce_breakDebugger; } //============================================================================== /** Platform-independent assertion macro. @@ -134,7 +134,7 @@ message that the compiler generates may be completely bizarre and seem to have no relation to the place where you put the static_assert though!) */ -#define static_jassert(expression) JUCE_NAMESPACE::JuceStaticAssert::dummy(); +#define static_jassert(expression) juce::JuceStaticAssert::dummy(); /** This is a shorthand macro for declaring stubs for a class's copy constructor and operator=. diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index 38b21430df..8c2f64187d 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -50,11 +50,9 @@ #include "juce_TargetPlatform.h" // (sets up the various JUCE_WINDOWS, JUCE_MAC, etc flags) //============================================================================== -#ifndef JUCE_NAMESPACE - #define JUCE_NAMESPACE juce -#endif +#define JUCE_NAMESPACE juce -#define BEGIN_JUCE_NAMESPACE namespace JUCE_NAMESPACE { +#define BEGIN_JUCE_NAMESPACE namespace juce { #define END_JUCE_NAMESPACE } //============================================================================== @@ -202,7 +200,7 @@ extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger(); }; /** A macro that can be used to easily declare a local ScopedAutoReleasePool object for RAII-based obj-C autoreleasing. */ - #define JUCE_AUTORELEASEPOOL const JUCE_NAMESPACE::ScopedAutoReleasePool JUCE_JOIN_MACRO (autoReleasePool_, __LINE__); + #define JUCE_AUTORELEASEPOOL const juce::ScopedAutoReleasePool JUCE_JOIN_MACRO (autoReleasePool_, __LINE__); #else #define JUCE_AUTORELEASEPOOL diff --git a/modules/juce_core/text/juce_LocalisedStrings.h b/modules/juce_core/text/juce_LocalisedStrings.h index 2e437265c7..295f838c22 100644 --- a/modules/juce_core/text/juce_LocalisedStrings.h +++ b/modules/juce_core/text/juce_LocalisedStrings.h @@ -37,7 +37,7 @@ @see LocalisedStrings */ #define TRANS(stringLiteral) \ - JUCE_NAMESPACE::LocalisedStrings::translateWithCurrentMappings (stringLiteral) + juce::LocalisedStrings::translateWithCurrentMappings (stringLiteral) diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index 3da7cc21c1..becf92ef3e 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -53,7 +53,7 @@ */ #define forEachXmlChildElement(parentXmlElement, childElementVariableName) \ \ - for (JUCE_NAMESPACE::XmlElement* childElementVariableName = (parentXmlElement).getFirstChildElement(); \ + for (juce::XmlElement* childElementVariableName = (parentXmlElement).getFirstChildElement(); \ childElementVariableName != 0; \ childElementVariableName = childElementVariableName->getNextElement()) @@ -82,7 +82,7 @@ */ #define forEachXmlChildElementWithTagName(parentXmlElement, childElementVariableName, requiredTagName) \ \ - for (JUCE_NAMESPACE::XmlElement* childElementVariableName = (parentXmlElement).getChildByName (requiredTagName); \ + for (juce::XmlElement* childElementVariableName = (parentXmlElement).getChildByName (requiredTagName); \ childElementVariableName != 0; \ childElementVariableName = childElementVariableName->getNextElementWithTagName (requiredTagName)) diff --git a/modules/juce_events/juce_events.cpp b/modules/juce_events/juce_events.cpp index 87f8532681..4a983f27d9 100644 --- a/modules/juce_events/juce_events.cpp +++ b/modules/juce_events/juce_events.cpp @@ -69,7 +69,7 @@ // END_AUTOINCLUDE //============================================================================== -using namespace JUCE_NAMESPACE; +using namespace juce; BEGIN_JUCE_NAMESPACE diff --git a/modules/juce_events/native/juce_ios_MessageManager.mm b/modules/juce_events/native/juce_ios_MessageManager.mm index b017cf9039..6e8cb5c652 100644 --- a/modules/juce_events/native/juce_ios_MessageManager.mm +++ b/modules/juce_events/native/juce_ios_MessageManager.mm @@ -49,7 +49,7 @@ END_JUCE_NAMESPACE { if ([info isKindOfClass: [NSData class]]) { - JUCE_NAMESPACE::CallbackMessagePayload* pl = (JUCE_NAMESPACE::CallbackMessagePayload*) [((NSData*) info) bytes]; + juce::CallbackMessagePayload* pl = (juce::CallbackMessagePayload*) [((NSData*) info) bytes]; if (pl != nullptr) { diff --git a/modules/juce_events/native/juce_mac_MessageManager.mm b/modules/juce_events/native/juce_mac_MessageManager.mm index b93d61d2b3..6a882107b2 100644 --- a/modules/juce_events/native/juce_mac_MessageManager.mm +++ b/modules/juce_events/native/juce_mac_MessageManager.mm @@ -137,7 +137,7 @@ private: END_JUCE_NAMESPACE -using namespace JUCE_NAMESPACE; +using namespace juce; #define JuceAppDelegate MakeObjCClassName(JuceAppDelegate) diff --git a/modules/juce_gui_basics/application/juce_Initialisation.h b/modules/juce_gui_basics/application/juce_Initialisation.h index 592d8a9f40..ff03508de8 100644 --- a/modules/juce_gui_basics/application/juce_Initialisation.h +++ b/modules/juce_gui_basics/application/juce_Initialisation.h @@ -87,44 +87,44 @@ public: */ #if JUCE_ANDROID #define START_JUCE_APPLICATION(AppClass) \ - JUCE_NAMESPACE::JUCEApplication* juce_CreateApplication() { return new AppClass(); } + juce::JUCEApplication* juce_CreateApplication() { return new AppClass(); } #elif defined (JUCE_GCC) || defined (__MWERKS__) #define START_JUCE_APPLICATION(AppClass) \ - static JUCE_NAMESPACE::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ + static juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ int main (int argc, char* argv[]) \ { \ - JUCE_NAMESPACE::JUCEApplication::createInstance = &juce_CreateApplication; \ - return JUCE_NAMESPACE::JUCEApplication::main (argc, (const char**) argv); \ + juce::JUCEApplication::createInstance = &juce_CreateApplication; \ + return juce::JUCEApplication::main (argc, (const char**) argv); \ } #elif JUCE_WINDOWS #ifdef _CONSOLE #define START_JUCE_APPLICATION(AppClass) \ - static JUCE_NAMESPACE::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ + static juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ int main (int, char* argv[]) \ { \ - JUCE_NAMESPACE::JUCEApplication::createInstance = &juce_CreateApplication; \ - return JUCE_NAMESPACE::JUCEApplication::main (JUCE_NAMESPACE::Process::getCurrentCommandLineParams()); \ + juce::JUCEApplication::createInstance = &juce_CreateApplication; \ + return juce::JUCEApplication::main (juce::Process::getCurrentCommandLineParams()); \ } #elif ! defined (_AFXDLL) #ifdef _WINDOWS_ #define START_JUCE_APPLICATION(AppClass) \ - static JUCE_NAMESPACE::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ + static juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ int WINAPI WinMain (HINSTANCE, HINSTANCE, LPSTR, int) \ { \ - JUCE_NAMESPACE::JUCEApplication::createInstance = &juce_CreateApplication; \ - return JUCE_NAMESPACE::JUCEApplication::main (JUCE_NAMESPACE::Process::getCurrentCommandLineParams()); \ + juce::JUCEApplication::createInstance = &juce_CreateApplication; \ + return juce::JUCEApplication::main (juce::Process::getCurrentCommandLineParams()); \ } #else #define START_JUCE_APPLICATION(AppClass) \ - static JUCE_NAMESPACE::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ + static juce::JUCEApplicationBase* juce_CreateApplication() { return new AppClass(); } \ int __stdcall WinMain (void*, void*, const char*, int) \ { \ - JUCE_NAMESPACE::JUCEApplication::createInstance = &juce_CreateApplication; \ - return JUCE_NAMESPACE::JUCEApplication::main (JUCE_NAMESPACE::Process::getCurrentCommandLineParams()); \ + juce::JUCEApplication::createInstance = &juce_CreateApplication; \ + return juce::JUCEApplication::main (juce::Process::getCurrentCommandLineParams()); \ } #endif #endif diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp index c884114900..8b69a9e5a1 100644 --- a/modules/juce_gui_basics/juce_gui_basics.cpp +++ b/modules/juce_gui_basics/juce_gui_basics.cpp @@ -235,7 +235,7 @@ #include "misc/juce_DropShadower.cpp" // END_AUTOINCLUDE -using namespace JUCE_NAMESPACE; +using namespace juce; //============================================================================== BEGIN_JUCE_NAMESPACE diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index e15da2fe11..8e69031a3e 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -24,7 +24,7 @@ */ END_JUCE_NAMESPACE -extern JUCE_NAMESPACE::JUCEApplicationBase* juce_CreateApplication(); // (from START_JUCE_APPLICATION) +extern juce::JUCEApplicationBase* juce_CreateApplication(); // (from START_JUCE_APPLICATION) BEGIN_JUCE_NAMESPACE //============================================================================== diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index 17e885fef0..85fd5297f1 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -292,7 +292,7 @@ void ModifierKeys::updateCurrentModifiers() noexcept currentModifiers = UIViewComponentPeer::currentModifiers; } -JUCE_NAMESPACE::Point juce_lastMousePos; +juce::Point juce_lastMousePos; //============================================================================== - (void) touchesBegan: (NSSet*) touches withEvent: (UIEvent*) event @@ -917,7 +917,7 @@ void UIViewComponentPeer::drawRect (CGRect r) bool UIViewComponentPeer::canBecomeKeyWindow() { - return (getStyleFlags() & JUCE_NAMESPACE::ComponentPeer::windowIgnoresKeyPresses) == 0; + return (getStyleFlags() & juce::ComponentPeer::windowIgnoresKeyPresses) == 0; } bool UIViewComponentPeer::windowShouldClose() diff --git a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm index 8936e8ae55..951c9cdac2 100644 --- a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm @@ -27,7 +27,7 @@ //============================================================================== END_JUCE_NAMESPACE -using namespace JUCE_NAMESPACE; +using namespace juce; #define JuceFileChooserDelegate MakeObjCClassName(JuceFileChooserDelegate) diff --git a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm index 9312ecc5e2..1b0fc5ef3f 100644 --- a/modules/juce_gui_basics/native/juce_mac_MainMenu.mm +++ b/modules/juce_gui_basics/native/juce_mac_MainMenu.mm @@ -26,7 +26,7 @@ class JuceMainMenuHandler; END_JUCE_NAMESPACE -using namespace JUCE_NAMESPACE; +using namespace juce; #define JuceMenuCallback MakeObjCClassName(JuceMenuCallback) @@ -423,9 +423,9 @@ END_JUCE_NAMESPACE NSEvent* e = [NSApp currentEvent]; if ([e type] == NSKeyDown || [e type] == NSKeyUp) { - if (JUCE_NAMESPACE::Component::getCurrentlyFocusedComponent() != nullptr) + if (juce::Component::getCurrentlyFocusedComponent() != nullptr) { - JUCE_NAMESPACE::NSViewComponentPeer* peer = dynamic_cast (JUCE_NAMESPACE::Component::getCurrentlyFocusedComponent()->getPeer()); + juce::NSViewComponentPeer* peer = dynamic_cast (juce::Component::getCurrentlyFocusedComponent()->getPeer()); if (peer != nullptr) { diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 36f86d14e1..3d15b35897 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -669,7 +669,7 @@ END_JUCE_NAMESPACE - (NSRect) firstRectForCharacterRange: (NSRange) theRange { (void) theRange; - JUCE_NAMESPACE::Component* const comp = dynamic_cast (owner->findCurrentTextInputTarget()); + juce::Component* const comp = dynamic_cast (owner->findCurrentTextInputTarget()); if (comp == 0) return NSMakeRect (0, 0, 0, 0); @@ -820,10 +820,10 @@ END_JUCE_NAMESPACE if (owner != nullptr) frameRect = owner->constrainRect (frameRect); - if (JUCE_NAMESPACE::Component::getCurrentlyModalComponent() != nullptr + if (juce::Component::getCurrentlyModalComponent() != nullptr && owner->getComponent()->isCurrentlyBlockedByAnotherModalComponent() && owner->hasNativeTitleBar()) - JUCE_NAMESPACE::Component::getCurrentlyModalComponent()->inputAttemptWhenModal(); + juce::Component::getCurrentlyModalComponent()->inputAttemptWhenModal(); return frameRect.size; } @@ -841,10 +841,10 @@ END_JUCE_NAMESPACE { (void) notification; - if (JUCE_NAMESPACE::Component::getCurrentlyModalComponent() != nullptr + if (juce::Component::getCurrentlyModalComponent() != nullptr && owner->getComponent()->isCurrentlyBlockedByAnotherModalComponent() && owner->hasNativeTitleBar()) - JUCE_NAMESPACE::Component::getCurrentlyModalComponent()->inputAttemptWhenModal(); + juce::Component::getCurrentlyModalComponent()->inputAttemptWhenModal(); } @end @@ -1685,7 +1685,7 @@ void NSViewComponentPeer::setCurrentRenderingEngine (int index) bool NSViewComponentPeer::canBecomeKeyWindow() { - return (getStyleFlags() & JUCE_NAMESPACE::ComponentPeer::windowIgnoresKeyPresses) == 0; + return (getStyleFlags() & juce::ComponentPeer::windowIgnoresKeyPresses) == 0; } void NSViewComponentPeer::becomeKeyWindow() diff --git a/modules/juce_gui_extra/juce_gui_extra.cpp b/modules/juce_gui_extra/juce_gui_extra.cpp index a56f191186..4881bf7315 100644 --- a/modules/juce_gui_extra/juce_gui_extra.cpp +++ b/modules/juce_gui_extra/juce_gui_extra.cpp @@ -88,7 +88,7 @@ #include "misc/juce_SystemTrayIconComponent.cpp" // END_AUTOINCLUDE -using namespace JUCE_NAMESPACE; +using namespace juce; BEGIN_JUCE_NAMESPACE diff --git a/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm b/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm index b19018dd9b..f97b74f978 100644 --- a/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm +++ b/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm @@ -29,10 +29,10 @@ END_JUCE_NAMESPACE @interface DownloadClickDetector : NSObject { - JUCE_NAMESPACE::WebBrowserComponent* ownerComponent; + juce::WebBrowserComponent* ownerComponent; } -- (DownloadClickDetector*) initWithWebBrowserOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent; +- (DownloadClickDetector*) initWithWebBrowserOwner: (juce::WebBrowserComponent*) ownerComponent; - (void) webView: (WebView*) webView decidePolicyForNavigationAction: (NSDictionary*) actionInformation request: (NSURLRequest*) request @@ -43,7 +43,7 @@ END_JUCE_NAMESPACE //============================================================================== @implementation DownloadClickDetector -- (DownloadClickDetector*) initWithWebBrowserOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent_ +- (DownloadClickDetector*) initWithWebBrowserOwner: (juce::WebBrowserComponent*) ownerComponent_ { [super init]; ownerComponent = ownerComponent_; diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp index d532335e66..f69bac1e3c 100644 --- a/modules/juce_opengl/juce_opengl.cpp +++ b/modules/juce_opengl/juce_opengl.cpp @@ -122,7 +122,7 @@ #include "opengl/juce_OpenGLComponent.cpp" // END_AUTOINCLUDE -using namespace JUCE_NAMESPACE; +using namespace juce; //============================================================================== BEGIN_JUCE_NAMESPACE diff --git a/modules/juce_video/juce_video.cpp b/modules/juce_video/juce_video.cpp index e161506529..e9daa04f96 100644 --- a/modules/juce_video/juce_video.cpp +++ b/modules/juce_video/juce_video.cpp @@ -113,7 +113,7 @@ #endif //============================================================================== -using namespace JUCE_NAMESPACE; +using namespace juce; BEGIN_JUCE_NAMESPACE