diff --git a/.gitignore b/.gitignore index 4b963dd124..6f163de2c1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ *.pdb *.dep *.idb +*.manifest +*.manifest.res extras/juce demo/build/macosx/build extras/juce demo/build/win32_vc8/Debug extras/juce demo/build/win32_vc8/Release diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index c91e311ca8..f090d59112 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -717,6 +717,7 @@ public: #import #import #import + #include #include #include #endif @@ -52044,8 +52045,7 @@ public: bool keep = false; - if ((itemsToKeep[i] || (comp == Component::getComponentUnderMouse() && comp->isMouseButtonDown())) - && isParentOf (comp)) + if (isParentOf (comp)) { if (itemsToKeep[i]) { @@ -52060,8 +52060,13 @@ public: comp->setBounds (pos); } } - else + + if ((! keep) + && Component::isMouseButtonDownAnywhere() + && (comp == Component::getComponentUnderMouse() + || comp->isParentOf (Component::getComponentUnderMouse()))) { + keep = true; comp->setSize (0, 0); } } @@ -61078,7 +61083,7 @@ void LookAndFeel::drawScrollbar (Graphics& g, gy2 = y + height * 0.7f; } - const Colour thumbColour (scrollbar.findColour (ScrollBar::trackColourId)); + const Colour thumbColour (scrollbar.findColour (ScrollBar::thumbColourId)); GradientBrush gb (thumbColour.overlaidWith (Colour (0x44000000)), gx1, gy1, @@ -248871,7 +248876,7 @@ void InterProcessLock::exit() throw() /********* Start of inlined file: juce_linux_Files.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #define U_ISOFS_SUPER_MAGIC (short) 0x9660 // linux/iso_fs.h #define U_MSDOS_SUPER_MAGIC (short) 0x4d44 // linux/msdos_fs.h @@ -249474,7 +249479,7 @@ int NamedPipe::write (const void* sourceBuffer, int numBytesToWrite, int timeOut /********* Start of inlined file: juce_linux_Network.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littleEndian) throw() { @@ -249921,7 +249926,7 @@ int juce_seekInInternetFile (void* handle, int newPosition) /********* Start of inlined file: juce_linux_SystemStats.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE /*static juce_noinline unsigned int getCPUIDWord (int* familyModel, int* extFeatures) throw() { @@ -250151,7 +250156,7 @@ void PlatformUtilities::fpuReset() /********* Start of inlined file: juce_linux_Threads.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE /* Note that a lot of methods that you'd expect to find in this file actually @@ -250383,7 +250388,7 @@ void* PlatformUtilities::getProcedureEntryPoint (void* libraryHandle, const Stri /********* Start of inlined file: juce_linux_Messaging.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #ifdef JUCE_DEBUG #define JUCE_DEBUG_XERRORS 1 @@ -250760,7 +250765,7 @@ bool juce_dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages) /********* Start of inlined file: juce_linux_Fonts.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class FreeTypeFontFace { @@ -251347,7 +251352,7 @@ void Typeface::getDefaultFontNames (String& defaultSans, String& defaultSerif, S /********* Start of inlined file: juce_linux_Windowing.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #define TAKE_FOCUS 0 #define DELETE_WINDOW 1 @@ -254587,7 +254592,7 @@ const int KeyPress::rewindKey = (0xffeeff03) | extendedKeyModifier; /********* Start of inlined file: juce_linux_Audio.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE && JUCE_ALSA +#if JUCE_INCLUDED_FILE && JUCE_ALSA static const int maxNumChans = 64; @@ -255546,9 +255551,7 @@ AudioIODeviceType* juce_createAudioIODeviceType_ALSA() /********* Start of inlined file: juce_linux_Midi.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE - -#if JUCE_ALSA +#if JUCE_INCLUDED_FILE && JUCE_ALSA static snd_seq_t* iterateDevices (const bool forInput, StringArray& deviceNamesFound, @@ -255970,7 +255973,7 @@ MidiInput* MidiInput::createNewDevice (const String&, MidiInputCallback*) { re /********* Start of inlined file: juce_linux_AudioCDReader.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE AudioCDReader::AudioCDReader() : AudioFormatReader (0, T("CD Audio")) @@ -256047,7 +256050,7 @@ int AudioCDReader::getCDDBId() /********* Start of inlined file: juce_linux_FileChooser.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE void FileChooser::showPlatformDialog (OwnedArray& results, const String& title, @@ -256069,9 +256072,7 @@ void FileChooser::showPlatformDialog (OwnedArray& results, /********* Start of inlined file: juce_linux_WebBrowserComponent.cpp *********/ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE - -#if JUCE_WEB_BROWSER +#if JUCE_INCLUDED_FILE && JUCE_WEB_BROWSER /* Sorry.. This class isn't implemented on Linux! @@ -256165,7 +256166,6 @@ bool WebBrowserComponent::pageAboutToLoad (const String& url) return true; } -#endif #endif /********* End of inlined file: juce_linux_WebBrowserComponent.cpp *********/ @@ -256220,7 +256220,7 @@ BEGIN_JUCE_NAMESPACE /********* Start of inlined file: juce_mac_Strings.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE static const String nsStringToJuce (NSString* s) { @@ -256391,7 +256391,7 @@ const String SystemClipboard::getTextFromClipboard() throw() /********* Start of inlined file: juce_mac_SystemStats.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE static int64 highResTimerFrequency = 0; static double highResTimerToMillisecRatio = 0; @@ -257213,7 +257213,7 @@ int NamedPipe::write (const void* sourceBuffer, int numBytesToWrite, int timeOut /********* Start of inlined file: juce_mac_Threads.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE /* Note that a lot of methods that you'd expect to find in this file actually @@ -257789,7 +257789,7 @@ void InterProcessLock::exit() throw() /********* Start of inlined file: juce_mac_Files.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE /* Note that a lot of methods that you'd expect to find in this file actually @@ -258274,7 +258274,8 @@ OSType PlatformUtilities::getTypeOfFile (const String& filename) #else NSDictionary* fileDict = [[NSFileManager defaultManager] fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; #endif - return (OSType) [fileDict objectForKey: NSFileHFSTypeCode]; + //return (OSType) [fileDict objectForKey: NSFileHFSTypeCode]; + return [fileDict fileHFSTypeCode]; } bool PlatformUtilities::isBundle (const String& filename) @@ -258295,7 +258296,7 @@ bool PlatformUtilities::isBundle (const String& filename) /********* Start of inlined file: juce_iphone_MiscUtilities.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE static JUCEApplication* juce_intialisingApp; @@ -258437,7 +258438,7 @@ void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool c /********* Start of inlined file: juce_mac_MiscUtilities.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE ScopedAutoReleasePool::ScopedAutoReleasePool() { @@ -258671,7 +258672,7 @@ void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool c /********* Start of inlined file: juce_mac_Debugging.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE void Logger::outputDebugString (const String& text) throw() { @@ -258718,7 +258719,7 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw() /********* Start of inlined file: juce_iphone_UIViewComponentPeer.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class UIViewComponentPeer; @@ -259596,7 +259597,7 @@ const int KeyPress::rewindKey = 0x30003; /********* Start of inlined file: juce_iphone_Fonts.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class FontHelper { @@ -259921,7 +259922,7 @@ void Typeface::getDefaultFontNames (String& defaultSans, String& defaultSerif, S /********* Start of inlined file: juce_iphone_MessageManager.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE struct CallbackMessagePayload { @@ -260223,7 +260224,7 @@ void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* call /********* Start of inlined file: juce_mac_FileChooser.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC @@ -260679,7 +260680,7 @@ void juce_glViewport (const int w, const int h) /********* Start of inlined file: juce_mac_MouseCursor.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC @@ -261162,7 +261163,7 @@ bool WebBrowserComponent::pageAboutToLoad (const String& url) /********* Start of inlined file: juce_iphone_Audio.cpp *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class IPhoneAudioIODevice : public AudioIODeviceType { @@ -261450,7 +261451,7 @@ AudioIODeviceType* juce_createAudioIODeviceType_iPhoneAudio() /********* Start of inlined file: juce_mac_CoreMidi.cpp *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC @@ -262060,7 +262061,7 @@ MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) /********* Start of inlined file: juce_mac_NSViewComponentPeer.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class NSViewComponentPeer; @@ -263598,7 +263599,7 @@ const int KeyPress::rewindKey = 0x30003; /********* Start of inlined file: juce_mac_MouseCursor.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC @@ -263776,7 +263777,7 @@ void MouseCursor::showInWindow (ComponentPeer*) const throw() /********* Start of inlined file: juce_mac_NSViewComponent.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class NSViewComponentInternal : public ComponentMovementWatcher { @@ -263905,7 +263906,7 @@ void NSViewComponent::paint (Graphics& g) /********* Start of inlined file: juce_mac_AppleRemote.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE AppleRemoteDevice::AppleRemoteDevice() : device (0), @@ -264459,7 +264460,7 @@ void juce_glViewport (const int w, const int h) /********* Start of inlined file: juce_mac_MainMenu.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class JuceMainMenuHandler; @@ -264942,7 +264943,7 @@ void initialiseMainMenu() /********* Start of inlined file: juce_mac_FileChooser.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC @@ -265762,7 +265763,7 @@ void AudioCDReader::ejectDisk() /********* Start of inlined file: juce_mac_Fonts.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class FontHelper { @@ -266088,7 +266089,7 @@ void Typeface::getDefaultFontNames (String& defaultSans, String& defaultSerif, S /********* Start of inlined file: juce_mac_MessageManager.mm *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE struct CallbackMessagePayload { @@ -266836,7 +266837,7 @@ bool WebBrowserComponent::pageAboutToLoad (const String& url) /********* Start of inlined file: juce_mac_CoreAudio.cpp *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #ifndef JUCE_COREAUDIO_ERROR_LOGGING_ENABLED #define JUCE_COREAUDIO_ERROR_LOGGING_ENABLED 1 @@ -268172,7 +268173,7 @@ AudioIODeviceType* juce_createAudioIODeviceType_CoreAudio() /********* Start of inlined file: juce_mac_CoreMidi.cpp *********/ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC diff --git a/src/gui/components/controls/juce_TreeView.cpp b/src/gui/components/controls/juce_TreeView.cpp index 9c81fc7bb9..ebecc3da57 100644 --- a/src/gui/components/controls/juce_TreeView.cpp +++ b/src/gui/components/controls/juce_TreeView.cpp @@ -218,8 +218,7 @@ public: bool keep = false; - if ((itemsToKeep[i] || (comp == Component::getComponentUnderMouse() && comp->isMouseButtonDown())) - && isParentOf (comp)) + if (isParentOf (comp)) { if (itemsToKeep[i]) { @@ -234,8 +233,13 @@ public: comp->setBounds (pos); } } - else + + if ((! keep) + && Component::isMouseButtonDownAnywhere() + && (comp == Component::getComponentUnderMouse() + || comp->isParentOf (Component::getComponentUnderMouse()))) { + keep = true; comp->setSize (0, 0); } } diff --git a/src/gui/components/lookandfeel/juce_LookAndFeel.cpp b/src/gui/components/lookandfeel/juce_LookAndFeel.cpp index 536fa82fd1..e82ddfd2fe 100644 --- a/src/gui/components/lookandfeel/juce_LookAndFeel.cpp +++ b/src/gui/components/lookandfeel/juce_LookAndFeel.cpp @@ -774,7 +774,7 @@ void LookAndFeel::drawScrollbar (Graphics& g, gy2 = y + height * 0.7f; } - const Colour thumbColour (scrollbar.findColour (ScrollBar::trackColourId)); + const Colour thumbColour (scrollbar.findColour (ScrollBar::thumbColourId)); GradientBrush gb (thumbColour.overlaidWith (Colour (0x44000000)), gx1, gy1, diff --git a/src/native/linux/juce_linux_Audio.cpp b/src/native/linux/juce_linux_Audio.cpp index fdb0a3ed8d..cb9f2cbe00 100644 --- a/src/native/linux/juce_linux_Audio.cpp +++ b/src/native/linux/juce_linux_Audio.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE && JUCE_ALSA +#if JUCE_INCLUDED_FILE && JUCE_ALSA //============================================================================== static const int maxNumChans = 64; diff --git a/src/native/linux/juce_linux_AudioCDReader.cpp b/src/native/linux/juce_linux_AudioCDReader.cpp index 72e956f4aa..33f7923730 100644 --- a/src/native/linux/juce_linux_AudioCDReader.cpp +++ b/src/native/linux/juce_linux_AudioCDReader.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/linux/juce_linux_FileChooser.cpp b/src/native/linux/juce_linux_FileChooser.cpp index 79af20fefb..9a5b921cca 100644 --- a/src/native/linux/juce_linux_FileChooser.cpp +++ b/src/native/linux/juce_linux_FileChooser.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== void FileChooser::showPlatformDialog (OwnedArray& results, diff --git a/src/native/linux/juce_linux_Files.cpp b/src/native/linux/juce_linux_Files.cpp index 4fdf6389a5..c7a4613888 100644 --- a/src/native/linux/juce_linux_Files.cpp +++ b/src/native/linux/juce_linux_Files.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #define U_ISOFS_SUPER_MAGIC (short) 0x9660 // linux/iso_fs.h #define U_MSDOS_SUPER_MAGIC (short) 0x4d44 // linux/msdos_fs.h diff --git a/src/native/linux/juce_linux_Fonts.cpp b/src/native/linux/juce_linux_Fonts.cpp index eb87245e5b..a6787164ed 100644 --- a/src/native/linux/juce_linux_Fonts.cpp +++ b/src/native/linux/juce_linux_Fonts.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/linux/juce_linux_Messaging.cpp b/src/native/linux/juce_linux_Messaging.cpp index 8f89ac82f7..753e2e8266 100644 --- a/src/native/linux/juce_linux_Messaging.cpp +++ b/src/native/linux/juce_linux_Messaging.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== #ifdef JUCE_DEBUG diff --git a/src/native/linux/juce_linux_Midi.cpp b/src/native/linux/juce_linux_Midi.cpp index f963f87a83..c210864569 100644 --- a/src/native/linux/juce_linux_Midi.cpp +++ b/src/native/linux/juce_linux_Midi.cpp @@ -25,9 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE - -#if JUCE_ALSA +#if JUCE_INCLUDED_FILE && JUCE_ALSA //============================================================================== static snd_seq_t* iterateDevices (const bool forInput, diff --git a/src/native/linux/juce_linux_Network.cpp b/src/native/linux/juce_linux_Network.cpp index d3dba90d16..5c98dfd80f 100644 --- a/src/native/linux/juce_linux_Network.cpp +++ b/src/native/linux/juce_linux_Network.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/linux/juce_linux_SystemStats.cpp b/src/native/linux/juce_linux_SystemStats.cpp index 5dd067391f..c4498ba155 100644 --- a/src/native/linux/juce_linux_SystemStats.cpp +++ b/src/native/linux/juce_linux_SystemStats.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/linux/juce_linux_Threads.cpp b/src/native/linux/juce_linux_Threads.cpp index fe31daeab9..1e4986b63a 100644 --- a/src/native/linux/juce_linux_Threads.cpp +++ b/src/native/linux/juce_linux_Threads.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE /* Note that a lot of methods that you'd expect to find in this file actually diff --git a/src/native/linux/juce_linux_WebBrowserComponent.cpp b/src/native/linux/juce_linux_WebBrowserComponent.cpp index f6039c9b63..e6f7f34e05 100644 --- a/src/native/linux/juce_linux_WebBrowserComponent.cpp +++ b/src/native/linux/juce_linux_WebBrowserComponent.cpp @@ -25,9 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE - -#if JUCE_WEB_BROWSER +#if JUCE_INCLUDED_FILE && JUCE_WEB_BROWSER /* Sorry.. This class isn't implemented on Linux! @@ -126,4 +124,3 @@ bool WebBrowserComponent::pageAboutToLoad (const String& url) } #endif -#endif diff --git a/src/native/linux/juce_linux_Windowing.cpp b/src/native/linux/juce_linux_Windowing.cpp index 92534754e0..138dda04e9 100644 --- a/src/native/linux/juce_linux_Windowing.cpp +++ b/src/native/linux/juce_linux_Windowing.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_linux_NativeCode.cpp, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== #define TAKE_FOCUS 0 diff --git a/src/native/mac/juce_iphone_Audio.cpp b/src/native/mac/juce_iphone_Audio.cpp index ffcd2446ee..06153b5a7e 100644 --- a/src/native/mac/juce_iphone_Audio.cpp +++ b/src/native/mac/juce_iphone_Audio.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE diff --git a/src/native/mac/juce_iphone_Fonts.mm b/src/native/mac/juce_iphone_Fonts.mm index c734523f19..3c16a6c3df 100644 --- a/src/native/mac/juce_iphone_Fonts.mm +++ b/src/native/mac/juce_iphone_Fonts.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/mac/juce_iphone_MessageManager.mm b/src/native/mac/juce_iphone_MessageManager.mm index af83f0c7fa..2ede5fc287 100644 --- a/src/native/mac/juce_iphone_MessageManager.mm +++ b/src/native/mac/juce_iphone_MessageManager.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE struct CallbackMessagePayload { diff --git a/src/native/mac/juce_iphone_MiscUtilities.mm b/src/native/mac/juce_iphone_MiscUtilities.mm index 7e6f40fb10..aa9d0a91ab 100644 --- a/src/native/mac/juce_iphone_MiscUtilities.mm +++ b/src/native/mac/juce_iphone_MiscUtilities.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/mac/juce_iphone_UIViewComponentPeer.mm b/src/native/mac/juce_iphone_UIViewComponentPeer.mm index 37ce36f1c2..8e30c826e1 100644 --- a/src/native/mac/juce_iphone_UIViewComponentPeer.mm +++ b/src/native/mac/juce_iphone_UIViewComponentPeer.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class UIViewComponentPeer; diff --git a/src/native/mac/juce_mac_AppleRemote.mm b/src/native/mac/juce_mac_AppleRemote.mm index 0376f9fc8e..7cdf587efc 100644 --- a/src/native/mac/juce_mac_AppleRemote.mm +++ b/src/native/mac/juce_mac_AppleRemote.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== AppleRemoteDevice::AppleRemoteDevice() diff --git a/src/native/mac/juce_mac_CoreAudio.cpp b/src/native/mac/juce_mac_CoreAudio.cpp index 7dc0b9b04e..bf6be0f8c6 100644 --- a/src/native/mac/juce_mac_CoreAudio.cpp +++ b/src/native/mac/juce_mac_CoreAudio.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/mac/juce_mac_CoreMidi.cpp b/src/native/mac/juce_mac_CoreMidi.cpp index a7a68ebd29..119d45a451 100644 --- a/src/native/mac/juce_mac_CoreMidi.cpp +++ b/src/native/mac/juce_mac_CoreMidi.cpp @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC diff --git a/src/native/mac/juce_mac_Debugging.mm b/src/native/mac/juce_mac_Debugging.mm index a5972989e4..1e6e6d0333 100644 --- a/src/native/mac/juce_mac_Debugging.mm +++ b/src/native/mac/juce_mac_Debugging.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== void Logger::outputDebugString (const String& text) throw() diff --git a/src/native/mac/juce_mac_FileChooser.mm b/src/native/mac/juce_mac_FileChooser.mm index 781bcb4ba5..20d13f8abc 100644 --- a/src/native/mac/juce_mac_FileChooser.mm +++ b/src/native/mac/juce_mac_FileChooser.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC diff --git a/src/native/mac/juce_mac_Files.mm b/src/native/mac/juce_mac_Files.mm index d54b9f6175..b81c0f3f4a 100644 --- a/src/native/mac/juce_mac_Files.mm +++ b/src/native/mac/juce_mac_Files.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE /* Note that a lot of methods that you'd expect to find in this file actually @@ -521,7 +521,8 @@ OSType PlatformUtilities::getTypeOfFile (const String& filename) #else NSDictionary* fileDict = [[NSFileManager defaultManager] fileAttributesAtPath: juceStringToNS (filename) traverseLink: NO]; #endif - return (OSType) [fileDict objectForKey: NSFileHFSTypeCode]; + //return (OSType) [fileDict objectForKey: NSFileHFSTypeCode]; + return [fileDict fileHFSTypeCode]; } bool PlatformUtilities::isBundle (const String& filename) diff --git a/src/native/mac/juce_mac_Fonts.mm b/src/native/mac/juce_mac_Fonts.mm index 9972ba10fa..ae957799e6 100644 --- a/src/native/mac/juce_mac_Fonts.mm +++ b/src/native/mac/juce_mac_Fonts.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/mac/juce_mac_MainMenu.mm b/src/native/mac/juce_mac_MainMenu.mm index 29fc3f1815..7643f7dc9a 100644 --- a/src/native/mac/juce_mac_MainMenu.mm +++ b/src/native/mac/juce_mac_MainMenu.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== class JuceMainMenuHandler; diff --git a/src/native/mac/juce_mac_MessageManager.mm b/src/native/mac/juce_mac_MessageManager.mm index db9014c406..751d6bae6c 100644 --- a/src/native/mac/juce_mac_MessageManager.mm +++ b/src/native/mac/juce_mac_MessageManager.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE struct CallbackMessagePayload { diff --git a/src/native/mac/juce_mac_MiscUtilities.mm b/src/native/mac/juce_mac_MiscUtilities.mm index 5a11603225..b5f511488c 100644 --- a/src/native/mac/juce_mac_MiscUtilities.mm +++ b/src/native/mac/juce_mac_MiscUtilities.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== diff --git a/src/native/mac/juce_mac_MouseCursor.mm b/src/native/mac/juce_mac_MouseCursor.mm index 108efac618..915cc87a57 100644 --- a/src/native/mac/juce_mac_MouseCursor.mm +++ b/src/native/mac/juce_mac_MouseCursor.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE #if JUCE_MAC diff --git a/src/native/mac/juce_mac_NSViewComponent.mm b/src/native/mac/juce_mac_NSViewComponent.mm index 1f4d360e50..aac7661326 100644 --- a/src/native/mac/juce_mac_NSViewComponent.mm +++ b/src/native/mac/juce_mac_NSViewComponent.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== class NSViewComponentInternal : public ComponentMovementWatcher diff --git a/src/native/mac/juce_mac_NSViewComponentPeer.mm b/src/native/mac/juce_mac_NSViewComponentPeer.mm index c4be715be5..b158c55609 100644 --- a/src/native/mac/juce_mac_NSViewComponentPeer.mm +++ b/src/native/mac/juce_mac_NSViewComponentPeer.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE class NSViewComponentPeer; diff --git a/src/native/mac/juce_mac_NativeIncludes.h b/src/native/mac/juce_mac_NativeIncludes.h index 340dcf66b4..a2a2e5441a 100644 --- a/src/native/mac/juce_mac_NativeIncludes.h +++ b/src/native/mac/juce_mac_NativeIncludes.h @@ -56,6 +56,7 @@ #import #import #import + #include #include #include #endif diff --git a/src/native/mac/juce_mac_Strings.mm b/src/native/mac/juce_mac_Strings.mm index 8114cd3162..6d2716a616 100644 --- a/src/native/mac/juce_mac_Strings.mm +++ b/src/native/mac/juce_mac_Strings.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== static const String nsStringToJuce (NSString* s) diff --git a/src/native/mac/juce_mac_SystemStats.mm b/src/native/mac/juce_mac_SystemStats.mm index 32e32e080d..d810d747a1 100644 --- a/src/native/mac/juce_mac_SystemStats.mm +++ b/src/native/mac/juce_mac_SystemStats.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE static int64 highResTimerFrequency = 0; static double highResTimerToMillisecRatio = 0; diff --git a/src/native/mac/juce_mac_Threads.mm b/src/native/mac/juce_mac_Threads.mm index 15529adf7a..a57fdcb73c 100644 --- a/src/native/mac/juce_mac_Threads.mm +++ b/src/native/mac/juce_mac_Threads.mm @@ -25,7 +25,7 @@ // (This file gets included by juce_mac_NativeCode.mm, rather than being // compiled on its own). -#ifdef JUCE_INCLUDED_FILE +#if JUCE_INCLUDED_FILE //============================================================================== /*