1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-09 04:30:09 +00:00

Tidied up some win32 linkage declarations. Fixed some component size constraining problems on mac and win32.

This commit is contained in:
Julian Storer 2010-10-20 20:37:09 +01:00
parent ea16741b3d
commit 618d3fdf64
19 changed files with 192 additions and 158 deletions

View file

@ -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).

View file

@ -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__