From a2183daee59533ff27a1eb8ca329b27642fdfab9 Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Tue, 22 Dec 2009 20:59:32 +0000 Subject: [PATCH] VC6 compatibility updates --- build/win32/vc6/JUCE.dsp | 56 +++++++++------------------ juce_amalgamated.cpp | 8 ++-- juce_amalgamated.h | 2 + src/containers/juce_ValueTree.cpp | 2 +- src/containers/juce_ValueTree.h | 2 + src/gui/components/juce_Component.cpp | 4 +- src/io/streams/juce_OutputStream.cpp | 2 +- 7 files changed, 32 insertions(+), 44 deletions(-) diff --git a/build/win32/vc6/JUCE.dsp b/build/win32/vc6/JUCE.dsp index 9e6e0afa54..1ac6036b7e 100644 --- a/build/win32/vc6/JUCE.dsp +++ b/build/win32/vc6/JUCE.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "../../../bin/intermediate_win32/static" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /G6 /MT /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# ADD CPP /nologo /G6 /MD /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG" @@ -65,7 +65,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "../../../bin/intermediate_win32/staticdebug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c +# ADD CPP /nologo /G6 /MDd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" @@ -702,42 +702,6 @@ SOURCE=..\..\..\src\events\juce_Timer.h # Begin Group "graphics" # PROP Default_Filter "" -# Begin Group "brushes" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_Brush.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_Brush.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_GradientBrush.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_GradientBrush.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_ImageBrush.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_ImageBrush.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_SolidColourBrush.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\src\gui\graphics\brushes\juce_SolidColourBrush.h -# End Source File -# End Group # Begin Group "colour" # PROP Default_Filter "" @@ -783,6 +747,14 @@ SOURCE=..\..\..\src\gui\graphics\contexts\juce_EdgeTable.h # End Source File # Begin Source File +SOURCE=..\..\..\src\gui\graphics\contexts\juce_FillType.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\gui\graphics\contexts\juce_FillType.h +# End Source File +# Begin Source File + SOURCE=..\..\..\src\gui\graphics\contexts\juce_Graphics.cpp # End Source File # Begin Source File @@ -2148,6 +2120,14 @@ SOURCE=..\..\..\src\containers\juce_SparseSet.h # End Source File # Begin Source File +SOURCE=..\..\..\src\containers\juce_ValueTree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\containers\juce_ValueTree.h +# End Source File +# Begin Source File + SOURCE=..\..\..\src\containers\juce_Variant.cpp # End Source File # Begin Source File diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index d34d632ad9..4fa8f1f07a 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -5646,7 +5646,7 @@ void OutputStream::writeCompressedInt (int value) un >>= 8; } - data[0] = num; + data[0] = (uint8) num; if (value < 0) data[0] |= 0x80; @@ -16838,7 +16838,7 @@ bool ValueTree::hasProperty (const var::identifier& name) const throw() void ValueTree::removeProperty (const var::identifier& name, UndoManager* const undoManager) throw() { if (object != 0) - return object->removeProperty (name, undoManager); + object->removeProperty (name, undoManager); } void ValueTree::removeAllProperties (UndoManager* const undoManager) throw() @@ -39012,7 +39012,9 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo) // thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe. checkMessageManagerIsLocked - if (! isOpaque()) + if (isOpaque()) + styleWanted &= ~ComponentPeer::windowIsSemiTransparent; + else styleWanted |= ComponentPeer::windowIsSemiTransparent; int currentStyleFlags = 0; diff --git a/juce_amalgamated.h b/juce_amalgamated.h index e1bb939087..6f5e7d243a 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -13064,6 +13064,8 @@ private: XmlElement* createXml() const throw(); }; + friend class SharedObject; + typedef ReferenceCountedObjectPtr SharedObjectPtr; ReferenceCountedObjectPtr object; diff --git a/src/containers/juce_ValueTree.cpp b/src/containers/juce_ValueTree.cpp index cefe552bf4..6cd5b48e6b 100644 --- a/src/containers/juce_ValueTree.cpp +++ b/src/containers/juce_ValueTree.cpp @@ -491,7 +491,7 @@ bool ValueTree::hasProperty (const var::identifier& name) const throw() void ValueTree::removeProperty (const var::identifier& name, UndoManager* const undoManager) throw() { if (object != 0) - return object->removeProperty (name, undoManager); + object->removeProperty (name, undoManager); } void ValueTree::removeAllProperties (UndoManager* const undoManager) throw() diff --git a/src/containers/juce_ValueTree.h b/src/containers/juce_ValueTree.h index 3b4e89aca8..10b3d752c4 100644 --- a/src/containers/juce_ValueTree.h +++ b/src/containers/juce_ValueTree.h @@ -338,6 +338,8 @@ private: XmlElement* createXml() const throw(); }; + friend class SharedObject; + typedef ReferenceCountedObjectPtr SharedObjectPtr; ReferenceCountedObjectPtr object; diff --git a/src/gui/components/juce_Component.cpp b/src/gui/components/juce_Component.cpp index 706e7ee08f..68e589f226 100644 --- a/src/gui/components/juce_Component.cpp +++ b/src/gui/components/juce_Component.cpp @@ -430,7 +430,9 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo) // thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe. checkMessageManagerIsLocked - if (! isOpaque()) + if (isOpaque()) + styleWanted &= ~ComponentPeer::windowIsSemiTransparent; + else styleWanted |= ComponentPeer::windowIsSemiTransparent; int currentStyleFlags = 0; diff --git a/src/io/streams/juce_OutputStream.cpp b/src/io/streams/juce_OutputStream.cpp index 1c2b3ef8c8..0bb9210e5a 100644 --- a/src/io/streams/juce_OutputStream.cpp +++ b/src/io/streams/juce_OutputStream.cpp @@ -119,7 +119,7 @@ void OutputStream::writeCompressedInt (int value) un >>= 8; } - data[0] = num; + data[0] = (uint8) num; if (value < 0) data[0] |= 0x80;