| @@ -178,10 +178,10 @@ public: | |||
| if (dc != 0) | |||
| { | |||
| dc->setMarker (DrawableComposite::contentLeftMarkerName, true, RelativeCoordinate (0)); | |||
| dc->setMarker (DrawableComposite::contentTopMarkerName, false, RelativeCoordinate (0)); | |||
| dc->setMarker (DrawableComposite::contentRightMarkerName, true, RelativeCoordinate (getWidth())); | |||
| dc->setMarker (DrawableComposite::contentBottomMarkerName, false, RelativeCoordinate (getHeight())); | |||
| const RelativeCoordinate origin, right (getWidth()), bottom (getHeight()); | |||
| dc->setContentArea (RelativeRectangle (origin, right, origin, bottom)); | |||
| dc->resetBoundingBoxToContentArea(); | |||
| } | |||
| } | |||
| @@ -76,35 +76,38 @@ bool PluginDirectoryScanner::scanNextFile (const bool dontRescanIfAlreadyInList) | |||
| { | |||
| String file (filesOrIdentifiersToScan [nextIndex]); | |||
| if (file.isNotEmpty()) | |||
| if (file.isNotEmpty() && ! list.isListingUpToDate (file)) | |||
| { | |||
| if (! list.isListingUpToDate (file)) | |||
| { | |||
| OwnedArray <PluginDescription> typesFound; | |||
| // Add this plugin to the end of the dead-man's pedal list in case it crashes... | |||
| StringArray crashedPlugins (getDeadMansPedalFile()); | |||
| crashedPlugins.removeString (file); | |||
| crashedPlugins.add (file); | |||
| setDeadMansPedalFile (crashedPlugins); | |||
| list.scanAndAddFile (file, | |||
| dontRescanIfAlreadyInList, | |||
| typesFound, | |||
| format); | |||
| // Managed to load without crashing, so remove it from the dead-man's-pedal.. | |||
| crashedPlugins.removeString (file); | |||
| setDeadMansPedalFile (crashedPlugins); | |||
| if (typesFound.size() == 0) | |||
| failedFiles.add (file); | |||
| } | |||
| ++nextIndex; | |||
| progress = nextIndex / (float) filesOrIdentifiersToScan.size(); | |||
| OwnedArray <PluginDescription> typesFound; | |||
| // Add this plugin to the end of the dead-man's pedal list in case it crashes... | |||
| StringArray crashedPlugins (getDeadMansPedalFile()); | |||
| crashedPlugins.removeString (file); | |||
| crashedPlugins.add (file); | |||
| setDeadMansPedalFile (crashedPlugins); | |||
| list.scanAndAddFile (file, | |||
| dontRescanIfAlreadyInList, | |||
| typesFound, | |||
| format); | |||
| // Managed to load without crashing, so remove it from the dead-man's-pedal.. | |||
| crashedPlugins.removeString (file); | |||
| setDeadMansPedalFile (crashedPlugins); | |||
| if (typesFound.size() == 0) | |||
| failedFiles.add (file); | |||
| } | |||
| return skipNextFile(); | |||
| } | |||
| bool PluginDirectoryScanner::skipNextFile() | |||
| { | |||
| if (nextIndex >= filesOrIdentifiersToScan.size()) | |||
| return false; | |||
| progress = ++nextIndex / (float) filesOrIdentifiersToScan.size(); | |||
| return nextIndex < filesOrIdentifiersToScan.size(); | |||
| } | |||
| @@ -83,6 +83,11 @@ public: | |||
| */ | |||
| bool scanNextFile (bool dontRescanIfAlreadyInList); | |||
| /** Skips over the next file without scanning it. | |||
| Returns false when there are no more files to try. | |||
| */ | |||
| bool skipNextFile(); | |||
| /** Returns the description of the plugin that will be scanned during the next | |||
| call to scanNextFile(). | |||
| @@ -54,7 +54,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| static bool juceInitialisedNonGUI = false; | |||
| void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI() | |||
| JUCE_API void JUCE_CALLTYPE initialiseJuce_NonGUI() | |||
| { | |||
| if (! juceInitialisedNonGUI) | |||
| { | |||
| @@ -80,7 +80,7 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI() | |||
| static_jassert (sizeof (uint64) == 8); | |||
| } | |||
| void JUCE_PUBLIC_FUNCTION shutdownJuce_NonGUI() | |||
| JUCE_API void JUCE_CALLTYPE shutdownJuce_NonGUI() | |||
| { | |||
| if (juceInitialisedNonGUI) | |||
| { | |||
| @@ -108,7 +108,7 @@ void juce_setCurrentThreadName (const String& name); | |||
| static bool juceInitialisedGUI = false; | |||
| void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI() | |||
| JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI() | |||
| { | |||
| if (! juceInitialisedGUI) | |||
| { | |||
| @@ -141,7 +141,7 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI() | |||
| } | |||
| } | |||
| void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI() | |||
| JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI() | |||
| { | |||
| if (juceInitialisedGUI) | |||
| { | |||
| @@ -39,7 +39,7 @@ | |||
| @see shutdownJuce_GUI(), initialiseJuce_NonGUI() | |||
| */ | |||
| void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI(); | |||
| JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI(); | |||
| /** Clears up any static data being used by Juce's GUI classes. | |||
| @@ -49,7 +49,7 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI(); | |||
| @see initialiseJuce_GUI(), initialiseJuce_NonGUI() | |||
| */ | |||
| void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI(); | |||
| JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI(); | |||
| //============================================================================== | |||
| @@ -63,7 +63,7 @@ void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI(); | |||
| @see shutdownJuce_NonGUI, initialiseJuce_GUI | |||
| */ | |||
| void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI(); | |||
| JUCE_API void JUCE_CALLTYPE initialiseJuce_NonGUI(); | |||
| /** Clears up any static data being used by Juce's non-gui core classes. | |||
| @@ -73,7 +73,7 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI(); | |||
| @see initialiseJuce_NonGUI, initialiseJuce_GUI | |||
| */ | |||
| void JUCE_PUBLIC_FUNCTION shutdownJuce_NonGUI(); | |||
| JUCE_API void JUCE_CALLTYPE shutdownJuce_NonGUI(); | |||
| //============================================================================== | |||
| @@ -147,10 +147,10 @@ | |||
| // Now include some basics that are needed by most of the Juce classes... | |||
| BEGIN_JUCE_NAMESPACE | |||
| extern bool JUCE_PUBLIC_FUNCTION juce_isRunningUnderDebugger(); | |||
| extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger(); | |||
| #if JUCE_LOG_ASSERTIONS | |||
| extern void JUCE_API juce_LogAssertion (const char* filename, int lineNum) throw(); | |||
| extern JUCE_API void juce_LogAssertion (const char* filename, int lineNum) throw(); | |||
| #endif | |||
| #include "juce_Memory.h" | |||
| @@ -641,7 +641,7 @@ public: | |||
| private: | |||
| friend void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI(); | |||
| friend JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI(); | |||
| static void clearDefaultLookAndFeel() throw(); // called at shutdown | |||
| Array <int> colourIds; | |||
| @@ -456,15 +456,15 @@ void Path::addEllipse (const float x, const float y, | |||
| const float hw = w * 0.5f; | |||
| const float hw55 = hw * 0.55f; | |||
| const float hh = h * 0.5f; | |||
| const float hh45 = hh * 0.55f; | |||
| const float hh55 = hh * 0.55f; | |||
| const float cx = x + hw; | |||
| const float cy = y + hh; | |||
| startNewSubPath (cx, cy - hh); | |||
| cubicTo (cx + hw55, cy - hh, cx + hw, cy - hh45, cx + hw, cy); | |||
| cubicTo (cx + hw, cy + hh45, cx + hw55, cy + hh, cx, cy + hh); | |||
| cubicTo (cx - hw55, cy + hh, cx - hw, cy + hh45, cx - hw, cy); | |||
| cubicTo (cx - hw, cy - hh45, cx - hw55, cy - hh, cx, cy - hh); | |||
| cubicTo (cx + hw55, cy - hh, cx + hw, cy - hh55, cx + hw, cy); | |||
| cubicTo (cx + hw, cy + hh55, cx + hw55, cy + hh, cx, cy + hh); | |||
| cubicTo (cx - hw55, cy + hh, cx - hw, cy + hh55, cx - hw, cy); | |||
| cubicTo (cx - hw, cy - hh55, cx - hw55, cy - hh, cx, cy - hh); | |||
| closeSubPath(); | |||
| } | |||
| @@ -66,7 +66,7 @@ void Process::terminate() | |||
| exit (0); | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION juce_isRunningUnderDebugger() | |||
| JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger() | |||
| { | |||
| static char testResult = 0; | |||
| @@ -84,7 +84,7 @@ bool JUCE_PUBLIC_FUNCTION juce_isRunningUnderDebugger() | |||
| return testResult < 0; | |||
| } | |||
| bool JUCE_CALLTYPE Process::isRunningUnderDebugger() | |||
| JUCE_API bool JUCE_CALLTYPE Process::isRunningUnderDebugger() | |||
| { | |||
| return juce_isRunningUnderDebugger(); | |||
| } | |||
| @@ -33,7 +33,7 @@ void Logger::outputDebugString (const String& text) | |||
| std::cerr << text << std::endl; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION juce_isRunningUnderDebugger() | |||
| JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger() | |||
| { | |||
| static char testResult = 0; | |||
| @@ -49,7 +49,7 @@ bool JUCE_PUBLIC_FUNCTION juce_isRunningUnderDebugger() | |||
| return testResult > 0; | |||
| } | |||
| bool JUCE_CALLTYPE Process::isRunningUnderDebugger() | |||
| JUCE_API bool JUCE_CALLTYPE Process::isRunningUnderDebugger() | |||
| { | |||
| return juce_isRunningUnderDebugger(); | |||
| } | |||
| @@ -1069,12 +1069,21 @@ NSRect NSViewComponentPeer::constrainRect (NSRect r) | |||
| Rectangle<int> pos (convertToRectInt (r)); | |||
| Rectangle<int> original (convertToRectInt (current)); | |||
| constrainer->checkBounds (pos, original, | |||
| Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), | |||
| pos.getY() != original.getY() && pos.getBottom() == original.getBottom(), | |||
| pos.getX() != original.getX() && pos.getRight() == original.getRight(), | |||
| pos.getY() == original.getY() && pos.getBottom() != original.getBottom(), | |||
| pos.getX() == original.getX() && pos.getRight() != original.getRight()); | |||
| if ([window inLiveResize]) | |||
| { | |||
| constrainer->checkBounds (pos, original, | |||
| Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), | |||
| false, false, true, true); | |||
| } | |||
| else | |||
| { | |||
| constrainer->checkBounds (pos, original, | |||
| Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), | |||
| pos.getY() != original.getY() && pos.getBottom() == original.getBottom(), | |||
| pos.getX() != original.getX() && pos.getRight() == original.getRight(), | |||
| pos.getY() == original.getY() && pos.getBottom() != original.getBottom(), | |||
| pos.getX() == original.getX() && pos.getRight() != original.getRight()); | |||
| } | |||
| r.origin.x = pos.getX(); | |||
| r.origin.y = [[[NSScreen screens] objectAtIndex: 0] frame].size.height - r.size.height - pos.getY(); | |||
| @@ -38,6 +38,11 @@ | |||
| #define log(a) {} | |||
| #endif | |||
| /* The ASIO SDK *should* declare its callback functions as being __cdecl, but different versions seem | |||
| to be pretty random about whether or not they do this. If you hit an error using these functions | |||
| it'll be because you're trying to build using __stdcall, in which case you'd need to either get hold of | |||
| an ASIO SDK which correctly specifies __cdecl, or add the __cdecl keyword to its functions yourself. | |||
| */ | |||
| #define JUCE_ASIOCALLBACK __cdecl | |||
| //============================================================================== | |||
| @@ -142,7 +142,7 @@ namespace ActiveXHelpers | |||
| inplaceSite->Release(); | |||
| } | |||
| HRESULT __stdcall QueryInterface (REFIID type, void __RPC_FAR* __RPC_FAR* result) | |||
| HRESULT __stdcall QueryInterface (REFIID type, void** result) | |||
| { | |||
| if (type == IID_IOleInPlaceSite) | |||
| { | |||
| @@ -259,7 +259,7 @@ public: | |||
| ComBaseClassHelper() : refCount (1) {} | |||
| virtual ~ComBaseClassHelper() {} | |||
| HRESULT __stdcall QueryInterface (REFIID refId, void __RPC_FAR* __RPC_FAR* result) | |||
| HRESULT __stdcall QueryInterface (REFIID refId, void** result) | |||
| { | |||
| #ifndef __MINGW32__ | |||
| if (refId == __uuidof (ComClass)) { AddRef(); *result = dynamic_cast <ComClass*> (this); return S_OK; } | |||
| @@ -273,7 +273,7 @@ void Process::setPriority (ProcessPriority prior) | |||
| } | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION juce_isRunningUnderDebugger() | |||
| JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger() | |||
| { | |||
| return IsDebuggerPresent() != FALSE; | |||
| } | |||
| @@ -158,14 +158,14 @@ private: | |||
| } | |||
| //============================================================================== | |||
| HRESULT __stdcall GetTypeInfoCount (UINT __RPC_FAR*) { return E_NOTIMPL; } | |||
| HRESULT __stdcall GetTypeInfo (UINT, LCID, ITypeInfo __RPC_FAR *__RPC_FAR*) { return E_NOTIMPL; } | |||
| HRESULT __stdcall GetIDsOfNames (REFIID, LPOLESTR __RPC_FAR*, UINT, LCID, DISPID __RPC_FAR*) { return E_NOTIMPL; } | |||
| HRESULT __stdcall GetTypeInfoCount (UINT*) { return E_NOTIMPL; } | |||
| HRESULT __stdcall GetTypeInfo (UINT, LCID, ITypeInfo**) { return E_NOTIMPL; } | |||
| HRESULT __stdcall GetIDsOfNames (REFIID, LPOLESTR*, UINT, LCID, DISPID*) { return E_NOTIMPL; } | |||
| HRESULT __stdcall Invoke (DISPID dispIdMember, REFIID /*riid*/, LCID /*lcid*/, | |||
| WORD /*wFlags*/, DISPPARAMS __RPC_FAR* pDispParams, | |||
| VARIANT __RPC_FAR* /*pVarResult*/, EXCEPINFO __RPC_FAR* /*pExcepInfo*/, | |||
| UINT __RPC_FAR* /*puArgErr*/) | |||
| WORD /*wFlags*/, DISPPARAMS* pDispParams, | |||
| VARIANT* /*pVarResult*/, EXCEPINFO* /*pExcepInfo*/, | |||
| UINT* /*puArgErr*/) | |||
| { | |||
| switch (dispIdMember) | |||
| { | |||
| @@ -1833,36 +1833,48 @@ private: | |||
| return 0; | |||
| //============================================================================== | |||
| case WM_SIZING: | |||
| if (constrainer != 0 && (styleFlags & (windowHasTitleBar | windowIsResizable)) == (windowHasTitleBar | windowIsResizable)) | |||
| { | |||
| RECT* const r = (RECT*) lParam; | |||
| Rectangle<int> pos (r->left, r->top, r->right - r->left, r->bottom - r->top); | |||
| constrainer->checkBounds (pos, windowBorder.addedTo (component->getBounds()), | |||
| Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), | |||
| wParam == WMSZ_TOP || wParam == WMSZ_TOPLEFT || wParam == WMSZ_TOPRIGHT, | |||
| wParam == WMSZ_LEFT || wParam == WMSZ_TOPLEFT || wParam == WMSZ_BOTTOMLEFT, | |||
| wParam == WMSZ_BOTTOM || wParam == WMSZ_BOTTOMLEFT || wParam == WMSZ_BOTTOMRIGHT, | |||
| wParam == WMSZ_RIGHT || wParam == WMSZ_TOPRIGHT || wParam == WMSZ_BOTTOMRIGHT); | |||
| r->left = pos.getX(); | |||
| r->top = pos.getY(); | |||
| r->right = pos.getRight(); | |||
| r->bottom = pos.getBottom(); | |||
| } | |||
| return TRUE; | |||
| case WM_WINDOWPOSCHANGING: | |||
| if ((styleFlags & (windowHasTitleBar | windowIsResizable)) == (windowHasTitleBar | windowIsResizable)) | |||
| if (constrainer != 0 && (styleFlags & (windowHasTitleBar | windowIsResizable)) == (windowHasTitleBar | windowIsResizable)) | |||
| { | |||
| WINDOWPOS* const wp = (WINDOWPOS*) lParam; | |||
| if ((wp->flags & (SWP_NOMOVE | SWP_NOSIZE)) != (SWP_NOMOVE | SWP_NOSIZE)) | |||
| if ((wp->flags & (SWP_NOMOVE | SWP_NOSIZE)) != (SWP_NOMOVE | SWP_NOSIZE) | |||
| && ! Component::isMouseButtonDownAnywhere()) | |||
| { | |||
| if (constrainer != 0) | |||
| { | |||
| const Rectangle<int> current (component->getX() - windowBorder.getLeft(), | |||
| component->getY() - windowBorder.getTop(), | |||
| component->getWidth() + windowBorder.getLeftAndRight(), | |||
| component->getHeight() + windowBorder.getTopAndBottom()); | |||
| Rectangle<int> pos (wp->x, wp->y, wp->cx, wp->cy); | |||
| constrainer->checkBounds (pos, current, | |||
| Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), | |||
| pos.getY() != current.getY() && pos.getBottom() == current.getBottom(), | |||
| pos.getX() != current.getX() && pos.getRight() == current.getRight(), | |||
| pos.getY() == current.getY() && pos.getBottom() != current.getBottom(), | |||
| pos.getX() == current.getX() && pos.getRight() != current.getRight()); | |||
| wp->x = pos.getX(); | |||
| wp->y = pos.getY(); | |||
| wp->cx = pos.getWidth(); | |||
| wp->cy = pos.getHeight(); | |||
| } | |||
| Rectangle<int> pos (wp->x, wp->y, wp->cx, wp->cy); | |||
| const Rectangle<int> current (windowBorder.addedTo (component->getBounds())); | |||
| constrainer->checkBounds (pos, current, | |||
| Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), | |||
| pos.getY() != current.getY() && pos.getBottom() == current.getBottom(), | |||
| pos.getX() != current.getX() && pos.getRight() == current.getRight(), | |||
| pos.getY() == current.getY() && pos.getBottom() != current.getBottom(), | |||
| pos.getX() == current.getX() && pos.getRight() != current.getRight()); | |||
| wp->x = pos.getX(); | |||
| wp->y = pos.getY(); | |||
| wp->cx = pos.getWidth(); | |||
| wp->cy = pos.getHeight(); | |||
| } | |||
| } | |||
| return 0; | |||
| case WM_WINDOWPOSCHANGED: | |||
| @@ -2755,12 +2767,12 @@ public: | |||
| { | |||
| } | |||
| virtual ~JuceDataObject() | |||
| ~JuceDataObject() | |||
| { | |||
| jassert (refCount == 0); | |||
| } | |||
| HRESULT __stdcall GetData (FORMATETC __RPC_FAR* pFormatEtc, STGMEDIUM __RPC_FAR* pMedium) | |||
| HRESULT __stdcall GetData (FORMATETC* pFormatEtc, STGMEDIUM* pMedium) | |||
| { | |||
| if ((pFormatEtc->tymed & format->tymed) != 0 | |||
| && pFormatEtc->cfFormat == format->cfFormat | |||
| @@ -2787,7 +2799,7 @@ public: | |||
| return DV_E_FORMATETC; | |||
| } | |||
| HRESULT __stdcall QueryGetData (FORMATETC __RPC_FAR* f) | |||
| HRESULT __stdcall QueryGetData (FORMATETC* f) | |||
| { | |||
| if (f == 0) | |||
| return E_INVALIDARG; | |||
| @@ -2800,13 +2812,13 @@ public: | |||
| return DV_E_FORMATETC; | |||
| } | |||
| HRESULT __stdcall GetCanonicalFormatEtc (FORMATETC __RPC_FAR*, FORMATETC __RPC_FAR* pFormatEtcOut) | |||
| HRESULT __stdcall GetCanonicalFormatEtc (FORMATETC*, FORMATETC* pFormatEtcOut) | |||
| { | |||
| pFormatEtcOut->ptd = 0; | |||
| return E_NOTIMPL; | |||
| } | |||
| HRESULT __stdcall EnumFormatEtc (DWORD direction, IEnumFORMATETC __RPC_FAR *__RPC_FAR *result) | |||
| HRESULT __stdcall EnumFormatEtc (DWORD direction, IEnumFORMATETC** result) | |||
| { | |||
| if (result == 0) | |||
| return E_POINTER; | |||
| @@ -2821,11 +2833,11 @@ public: | |||
| return E_NOTIMPL; | |||
| } | |||
| HRESULT __stdcall GetDataHere (FORMATETC __RPC_FAR*, STGMEDIUM __RPC_FAR*) { return DATA_E_FORMATETC; } | |||
| HRESULT __stdcall SetData (FORMATETC __RPC_FAR*, STGMEDIUM __RPC_FAR*, BOOL) { return E_NOTIMPL; } | |||
| HRESULT __stdcall DAdvise (FORMATETC __RPC_FAR*, DWORD, IAdviseSink __RPC_FAR*, DWORD __RPC_FAR*) { return OLE_E_ADVISENOTSUPPORTED; } | |||
| HRESULT __stdcall DUnadvise (DWORD) { return E_NOTIMPL; } | |||
| HRESULT __stdcall EnumDAdvise (IEnumSTATDATA __RPC_FAR *__RPC_FAR *) { return OLE_E_ADVISENOTSUPPORTED; } | |||
| HRESULT __stdcall GetDataHere (FORMATETC*, STGMEDIUM*) { return DATA_E_FORMATETC; } | |||
| HRESULT __stdcall SetData (FORMATETC*, STGMEDIUM*, BOOL) { return E_NOTIMPL; } | |||
| HRESULT __stdcall DAdvise (FORMATETC*, DWORD, IAdviseSink*, DWORD*) { return OLE_E_ADVISENOTSUPPORTED; } | |||
| HRESULT __stdcall DUnadvise (DWORD) { return E_NOTIMPL; } | |||
| HRESULT __stdcall EnumDAdvise (IEnumSTATDATA**) { return OLE_E_ADVISENOTSUPPORTED; } | |||
| private: | |||
| JuceDropSource* const dropSource; | |||
| @@ -495,52 +495,52 @@ int64 String::hashCode64() const throw() | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_PUBLIC_FUNCTION operator== (const String& string1, const String& string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, const String& string2) throw() | |||
| { | |||
| return string1.compare (string2) == 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator== (const String& string1, const char* string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, const char* string2) throw() | |||
| { | |||
| return string1.compare (string2) == 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator== (const String& string1, const juce_wchar* string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, const juce_wchar* string2) throw() | |||
| { | |||
| return string1.compare (string2) == 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator!= (const String& string1, const String& string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, const String& string2) throw() | |||
| { | |||
| return string1.compare (string2) != 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator!= (const String& string1, const char* string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, const char* string2) throw() | |||
| { | |||
| return string1.compare (string2) != 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator!= (const String& string1, const juce_wchar* string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, const juce_wchar* string2) throw() | |||
| { | |||
| return string1.compare (string2) != 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator> (const String& string1, const String& string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator> (const String& string1, const String& string2) throw() | |||
| { | |||
| return string1.compare (string2) > 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator< (const String& string1, const String& string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator< (const String& string1, const String& string2) throw() | |||
| { | |||
| return string1.compare (string2) < 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator>= (const String& string1, const String& string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator>= (const String& string1, const String& string2) throw() | |||
| { | |||
| return string1.compare (string2) >= 0; | |||
| } | |||
| bool JUCE_PUBLIC_FUNCTION operator<= (const String& string1, const String& string2) throw() | |||
| JUCE_API bool JUCE_CALLTYPE operator<= (const String& string1, const String& string2) throw() | |||
| { | |||
| return string1.compare (string2) <= 0; | |||
| } | |||
| @@ -659,114 +659,114 @@ void String::append (const juce_wchar* const other, const int howMany) | |||
| } | |||
| //============================================================================== | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (const char* const string1, const String& string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (const char* const string1, const String& string2) | |||
| { | |||
| String s (string1); | |||
| return s += string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (const juce_wchar* const string1, const String& string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (const juce_wchar* const string1, const String& string2) | |||
| { | |||
| String s (string1); | |||
| return s += string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (const char string1, const String& string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (const char string1, const String& string2) | |||
| { | |||
| return String::charToString (string1) + string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (const juce_wchar string1, const String& string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (const juce_wchar string1, const String& string2) | |||
| { | |||
| return String::charToString (string1) + string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const String& string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const String& string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const char* const string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const char* const string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const juce_wchar* const string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const juce_wchar* const string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const char string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const char string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const juce_wchar string2) | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const juce_wchar string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const char characterToAppend) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const char characterToAppend) | |||
| { | |||
| return string1 += characterToAppend; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const juce_wchar characterToAppend) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const juce_wchar characterToAppend) | |||
| { | |||
| return string1 += characterToAppend; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const char* const string2) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const char* const string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const juce_wchar* const string2) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const juce_wchar* const string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const String& string2) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const String& string2) | |||
| { | |||
| return string1 += string2; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const short number) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const short number) | |||
| { | |||
| return string1 += (int) number; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const int number) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const int number) | |||
| { | |||
| return string1 += number; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const unsigned int number) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const unsigned int number) | |||
| { | |||
| return string1 += number; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const long number) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const long number) | |||
| { | |||
| return string1 += (int) number; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const unsigned long number) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const unsigned long number) | |||
| { | |||
| return string1 += (unsigned int) number; | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const float number) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const float number) | |||
| { | |||
| return string1 += String (number); | |||
| } | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const double number) | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const double number) | |||
| { | |||
| return string1 += String (number); | |||
| } | |||
| OutputStream& JUCE_PUBLIC_FUNCTION operator<< (OutputStream& stream, const String& text) | |||
| JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const String& text) | |||
| { | |||
| // (This avoids using toUTF8() to prevent the memory bloat that it would leave behind | |||
| // if lots of large, persistent strings were to be written to streams). | |||
| @@ -1061,86 +1061,86 @@ private: | |||
| //============================================================================== | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (const char* string1, const String& string2); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (const char* string1, const String& string2); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (const juce_wchar* string1, const String& string2); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (const juce_wchar* string1, const String& string2); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (char string1, const String& string2); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (char string1, const String& string2); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (juce_wchar string1, const String& string2); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (juce_wchar string1, const String& string2); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const String& string2); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const String& string2); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const char* string2); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const char* string2); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, const juce_wchar* string2); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, const juce_wchar* string2); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, char characterToAppend); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, char characterToAppend); | |||
| /** Concatenates two strings. */ | |||
| const String JUCE_PUBLIC_FUNCTION operator+ (String string1, juce_wchar characterToAppend); | |||
| JUCE_API const String JUCE_CALLTYPE operator+ (String string1, juce_wchar characterToAppend); | |||
| //============================================================================== | |||
| /** Appends a character at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, char characterToAppend); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, char characterToAppend); | |||
| /** Appends a character at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, juce_wchar characterToAppend); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, juce_wchar characterToAppend); | |||
| /** Appends a string to the end of the first one. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const char* string2); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const char* string2); | |||
| /** Appends a string to the end of the first one. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const juce_wchar* string2); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const juce_wchar* string2); | |||
| /** Appends a string to the end of the first one. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, const String& string2); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const String& string2); | |||
| /** Appends a decimal number at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, short number); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, short number); | |||
| /** Appends a decimal number at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, int number); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, int number); | |||
| /** Appends a decimal number at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, unsigned int number); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, unsigned int number); | |||
| /** Appends a decimal number at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, long number); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, long number); | |||
| /** Appends a decimal number at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, unsigned long number); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, unsigned long number); | |||
| /** Appends a decimal number at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, float number); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, float number); | |||
| /** Appends a decimal number at the end of a string. */ | |||
| String& JUCE_PUBLIC_FUNCTION operator<< (String& string1, double number); | |||
| JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, double number); | |||
| //============================================================================== | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator== (const String& string1, const String& string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, const String& string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator== (const String& string1, const char* string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, const char* string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator== (const String& string1, const juce_wchar* string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, const juce_wchar* string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator!= (const String& string1, const String& string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, const String& string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator!= (const String& string1, const char* string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, const char* string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator!= (const String& string1, const juce_wchar* string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, const juce_wchar* string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator> (const String& string1, const String& string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator> (const String& string1, const String& string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator< (const String& string1, const String& string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator< (const String& string1, const String& string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator>= (const String& string1, const String& string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator>= (const String& string1, const String& string2) throw(); | |||
| /** Case-sensitive comparison of two strings. */ | |||
| bool JUCE_PUBLIC_FUNCTION operator<= (const String& string1, const String& string2) throw(); | |||
| JUCE_API bool JUCE_CALLTYPE operator<= (const String& string1, const String& string2) throw(); | |||
| //============================================================================== | |||
| /** This streaming override allows you to pass a juce String directly into std output streams. | |||
| This is very handy for writing strings to std::cout, std::cerr, etc. | |||
| */ | |||
| template <class charT, class traits> | |||
| std::basic_ostream <charT, traits>& JUCE_PUBLIC_FUNCTION operator<< (std::basic_ostream <charT, traits>& stream, const String& stringToWrite) | |||
| JUCE_API std::basic_ostream <charT, traits>& JUCE_CALLTYPE operator<< (std::basic_ostream <charT, traits>& stream, const String& stringToWrite) | |||
| { | |||
| return stream << stringToWrite.toUTF8(); | |||
| } | |||
| /** Writes a string to an OutputStream as UTF8. */ | |||
| OutputStream& JUCE_PUBLIC_FUNCTION operator<< (OutputStream& stream, const String& text); | |||
| JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const String& text); | |||
| #endif // __JUCE_STRING_JUCEHEADER__ | |||