Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
47cf2369e5
100 changed files with 54414 additions and 43622 deletions
  1. +348
    -354
      build/linux/JUCE.make
  2. +6
    -6
      build/linux/platform_specific_code/juce_linux_Audio.cpp
  3. +7
    -7
      build/linux/platform_specific_code/juce_linux_Messaging.cpp
  4. +387
    -3
      build/linux/platform_specific_code/juce_linux_Network.cpp
  5. +6
    -5
      build/linux/platform_specific_code/juce_linux_Threads.cpp
  6. +2
    -5
      build/linux/platform_specific_code/juce_linux_WebBrowserComponent.cpp
  7. +3
    -3
      build/linux/platform_specific_code/juce_linux_Windowing.cpp
  8. +129
    -84
      build/macosx/Juce.xcodeproj/project.pbxproj
  9. +14
    -14
      build/macosx/juce.xcconfig
  10. +278
    -0
      build/macosx/platform_specific_code/juce_mac_AppleRemote.mm
  11. +432
    -448
      build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm
  12. +1299
    -1291
      build/macosx/platform_specific_code/juce_mac_CoreAudio.cpp
  13. +583
    -592
      build/macosx/platform_specific_code/juce_mac_CoreMidi.cpp
  14. +74
    -0
      build/macosx/platform_specific_code/juce_mac_Debugging.mm
  15. +150
    -156
      build/macosx/platform_specific_code/juce_mac_FileChooser.mm
  16. +541
    -0
      build/macosx/platform_specific_code/juce_mac_Files.mm
  17. +4
    -15
      build/macosx/platform_specific_code/juce_mac_Fonts.mm
  18. +414
    -0
      build/macosx/platform_specific_code/juce_mac_MainMenu.mm
  19. +275
    -0
      build/macosx/platform_specific_code/juce_mac_MessageManager.mm
  20. +0
    -503
      build/macosx/platform_specific_code/juce_mac_Messaging.mm
  21. +238
    -0
      build/macosx/platform_specific_code/juce_mac_MiscUtilities.mm
  22. +196
    -0
      build/macosx/platform_specific_code/juce_mac_MouseCursor.mm
  23. +149
    -0
      build/macosx/platform_specific_code/juce_mac_NSViewComponent.mm
  24. +1258
    -0
      build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm
  25. +236
    -236
      build/macosx/platform_specific_code/juce_mac_NamedPipe.cpp
  26. +111
    -0
      build/macosx/platform_specific_code/juce_mac_NativeCode.mm
  27. +1
    -1
      build/macosx/platform_specific_code/juce_mac_NativeHeaders.h
  28. +73
    -0
      build/macosx/platform_specific_code/juce_mac_NativeIncludes.h
  29. +449
    -469
      build/macosx/platform_specific_code/juce_mac_Network.mm
  30. +235
    -0
      build/macosx/platform_specific_code/juce_mac_OpenGLComponent.mm
  31. +294
    -0
      build/macosx/platform_specific_code/juce_mac_QuickTimeMovieComponent.mm
  32. +186
    -0
      build/macosx/platform_specific_code/juce_mac_Strings.mm
  33. +85
    -63
      build/macosx/platform_specific_code/juce_mac_SystemStats.mm
  34. +202
    -202
      build/macosx/platform_specific_code/juce_mac_Threads.cpp
  35. +129
    -0
      build/macosx/platform_specific_code/juce_mac_Threads.mm
  36. +258
    -443
      build/macosx/platform_specific_code/juce_mac_WebBrowserComponent.mm
  37. +0
    -3551
      build/macosx/platform_specific_code/juce_mac_Windowing.mm
  38. +6
    -53
      build/win32/platform_specific_code/juce_win32_ASIO.cpp
  39. +552
    -0
      build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp
  40. +3
    -34
      build/win32/platform_specific_code/juce_win32_AudioCDReader.cpp
  41. +10
    -31
      build/win32/platform_specific_code/juce_win32_DirectSound.cpp
  42. +5
    -6
      build/win32/platform_specific_code/juce_win32_DynamicLibraryLoader.cpp
  43. +4
    -19
      build/win32/platform_specific_code/juce_win32_FileChooser.cpp
  44. +40
    -50
      build/win32/platform_specific_code/juce_win32_Files.cpp
  45. +4
    -11
      build/win32/platform_specific_code/juce_win32_Fonts.cpp
  46. +5
    -11
      build/win32/platform_specific_code/juce_win32_Messaging.cpp
  47. +6
    -17
      build/win32/platform_specific_code/juce_win32_Midi.cpp
  48. +4
    -37
      build/win32/platform_specific_code/juce_win32_Misc.cpp
  49. +156
    -0
      build/win32/platform_specific_code/juce_win32_NativeIncludes.h
  50. +4
    -24
      build/win32/platform_specific_code/juce_win32_Network.cpp
  51. +11
    -18
      build/win32/platform_specific_code/juce_win32_PlatformUtils.cpp
  52. +517
    -0
      build/win32/platform_specific_code/juce_win32_QuickTimeMovieComponent.cpp
  53. +4
    -17
      build/win32/platform_specific_code/juce_win32_SystemStats.cpp
  54. +10
    -30
      build/win32/platform_specific_code/juce_win32_Threads.cpp
  55. +4
    -28
      build/win32/platform_specific_code/juce_win32_WebBrowserComponent.cpp
  56. +21
    -1067
      build/win32/platform_specific_code/juce_win32_Windowing.cpp
  57. +20
    -4
      build/win32/vc8/JUCE.vcproj
  58. +15
    -21
      extras/audio plugin host/build/mac/PluginHost.xcodeproj/project.pbxproj
  59. +2
    -0
      extras/audio plugin host/src/HostStartup.cpp
  60. +7
    -7
      extras/audio plugin host/src/host/MainHostWindow.cpp
  61. +2
    -1
      extras/audio plugin host/src/includes.h
  62. +8
    -9
      extras/audio plugins/demo/build/AudioUnit/JuceAU.exp
  63. +13
    -43
      extras/audio plugins/demo/build/AudioUnit/JuceDemoAU.xcodeproj/project.pbxproj
  64. +30
    -34
      extras/audio plugins/demo/build/RTAS_Mac/juce_RTASDemo.xcodeproj/project.pbxproj
  65. +21
    -13
      extras/audio plugins/demo/build/VST_Mac/JuceVST.xcodeproj/project.pbxproj
  66. +151
    -219
      extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.mm
  67. +0
    -13
      extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r
  68. +82
    -0
      extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.mm
  69. +34
    -186
      extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp
  70. +12
    -0
      extras/audio plugins/wrapper/formats/VST/MacExportedSymbols.txt
  71. +42
    -69
      extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp
  72. +111
    -0
      extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.mm
  73. +4
    -8
      extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj
  74. +21
    -21
      extras/juce demo/build/linux/JuceDemo.make
  75. +11
    -7
      extras/juce demo/build/macosx/Info.plist
  76. +180
    -251
      extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj
  77. +3
    -0
      extras/juce demo/build/win32_vc8/jucedemo.sln
  78. +7431
    -7434
      extras/juce demo/src/BinaryData.cpp
  79. +30
    -30
      extras/juce demo/src/BinaryData.h
  80. +0
    -4
      extras/juce demo/src/binarydata/OpenGLDemo.cpp
  81. +1
    -1
      extras/juce demo/src/binarydata/ThreadingDemo.cpp
  82. +1
    -1
      extras/juce demo/src/demos/ThreadingDemo.cpp
  83. +2
    -2
      extras/juce demo/src/juce_AppConfig.h
  84. +10
    -18
      extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj
  85. +0
    -1
      extras/the jucer/src/BinaryData.cpp
  86. +2
    -2
      extras/the jucer/src/juce_AppConfig.h
  87. +1
    -1
      extras/the jucer/src/jucer_Headers.h
  88. +1
    -1
      extras/the jucer/src/jucer_Main.cpp
  89. +3
    -0
      extras/the jucer/src/utility/jucer_UtilityFunctions.cpp
  90. +7
    -3
      juce_Config.h
  91. +27425
    -18384
      juce_amalgamated.cpp
  92. +6926
    -6835
      juce_amalgamated.h
  93. +13
    -69
      src/juce_amalgamated_template.cpp
  94. +3
    -3
      src/juce_app_includes.h
  95. +16
    -11
      src/juce_appframework/application/juce_Application.cpp
  96. +2
    -5
      src/juce_appframework/application/juce_Application.h
  97. +3
    -1
      src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp
  98. +17
    -4
      src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp
  99. +1
    -2
      src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.h
  100. +1332
    -0
      src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.mm

+ 348
- 354
build/linux/JUCE.make
File diff suppressed because it is too large
View File


+ 6
- 6
build/linux/platform_specific_code/juce_linux_Audio.cpp View File

@@ -367,7 +367,7 @@ private:
class ALSAThread : public Thread
{
public:
ALSAThread (const String& inputId_,
ALSAThread (const String& inputId_,
const String& outputId_)
: Thread ("Juce ALSA"),
sampleRate (0),
@@ -446,7 +446,7 @@ public:
return;
}
if (! outputDevice->setParameters ((unsigned int) sampleRate,
if (! outputDevice->setParameters ((unsigned int) sampleRate,
currentOutputChans.getHighestBit() + 1,
bufferSize))
{
@@ -467,7 +467,7 @@ public:
return;
}
if (! inputDevice->setParameters ((unsigned int) sampleRate,
if (! inputDevice->setParameters ((unsigned int) sampleRate,
currentInputChans.getHighestBit() + 1,
bufferSize))
{
@@ -673,7 +673,7 @@ class ALSAAudioIODevice : public AudioIODevice
{
public:
ALSAAudioIODevice (const String& deviceName,
const String& inputId_,
const String& inputId_,
const String& outputId_)
: AudioIODevice (deviceName, T("ALSA")),
inputId (inputId_),
@@ -980,8 +980,8 @@ public:
deviceName = inputDeviceName;
if (index >= 0)
return new ALSAAudioIODevice (deviceName,
inputIds [inputIndex],
return new ALSAAudioIODevice (deviceName,
inputIds [inputIndex],
outputIds [outputIndex]);
return 0;


+ 7
- 7
build/linux/platform_specific_code/juce_linux_Messaging.cpp View File

@@ -157,7 +157,7 @@ static void sig_handler (int sig)
void MessageManager::doPlatformSpecificInitialisation()
{
// Initialise xlib for multiple thread support
static bool initThreadCalled = false;
static bool initThreadCalled = false;
if (! initThreadCalled)
{
@@ -168,10 +168,10 @@ void MessageManager::doPlatformSpecificInitialisation()
if (juce_isRunningAsApplication())
Process::terminate();
return;
}
initThreadCalled = true;
}
@@ -212,7 +212,7 @@ void MessageManager::doPlatformSpecificInitialisation()
if (juce_isRunningAsApplication())
Process::terminate();
return;
}
@@ -247,11 +247,11 @@ void MessageManager::doPlatformSpecificShutdown()
{
XDestroyWindow (display, juce_messageWindowHandle);
XCloseDisplay (display);
// reset pointers
juce_messageWindowHandle = 0;
display = 0;
// Restore original error handlers
XSetIOErrorHandler (oldIOErrorHandler);
oldIOErrorHandler = 0;
@@ -350,7 +350,7 @@ bool juce_dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages)
if (juce_isRunningAsApplication())
Process::terminate();
return false;
}


+ 387
- 3
build/linux/platform_specific_code/juce_linux_Network.cpp View File

@@ -49,9 +49,6 @@ BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/io/network/juce_URL.h"
// we'll borrow the mac's socket-based http streaming code..
#include "../../macosx/platform_specific_code/juce_mac_HTTPStream.h"
//==============================================================================
int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littleEndian) throw()
@@ -103,5 +100,392 @@ bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAdd
return false;
}
//==============================================================================
/** A HTTP input stream that uses sockets.
*/
class JUCE_HTTPSocketStream
{
public:
//==============================================================================
JUCE_HTTPSocketStream()
: readPosition (0),
socketHandle (-1),
levelsOfRedirection (0),
timeoutSeconds (15)
{
}
~JUCE_HTTPSocketStream()
{
closeSocket();
}
//==============================================================================
bool open (const String& url,
const String& headers,
const MemoryBlock& postData,
const bool isPost,
URL::OpenStreamProgressCallback* callback,
void* callbackContext,
int timeOutMs)
{
closeSocket();
uint32 timeOutTime = Time::getMillisecondCounter();
if (timeOutMs == 0)
timeOutTime += 60000;
else if (timeOutMs < 0)
timeOutTime = 0xffffffff;
else
timeOutTime += timeOutMs;
String hostName, hostPath;
int hostPort;
if (! decomposeURL (url, hostName, hostPath, hostPort))
return false;
const struct hostent* host = 0;
int port = 0;
String proxyName, proxyPath;
int proxyPort = 0;
String proxyURL (getenv ("http_proxy"));
if (proxyURL.startsWithIgnoreCase (T("http://")))
{
if (! decomposeURL (proxyURL, proxyName, proxyPath, proxyPort))
return false;
host = gethostbyname ((const char*) proxyName.toUTF8());
port = proxyPort;
}
else
{
host = gethostbyname ((const char*) hostName.toUTF8());
port = hostPort;
}
if (host == 0)
return false;
struct sockaddr_in address;
zerostruct (address);
memcpy ((void*) &address.sin_addr, (const void*) host->h_addr, host->h_length);
address.sin_family = host->h_addrtype;
address.sin_port = htons (port);
socketHandle = socket (host->h_addrtype, SOCK_STREAM, 0);
if (socketHandle == -1)
return false;
int receiveBufferSize = 16384;
setsockopt (socketHandle, SOL_SOCKET, SO_RCVBUF, (char*) &receiveBufferSize, sizeof (receiveBufferSize));
setsockopt (socketHandle, SOL_SOCKET, SO_KEEPALIVE, 0, 0);
#if JUCE_MAC
setsockopt (socketHandle, SOL_SOCKET, SO_NOSIGPIPE, 0, 0);
#endif
if (connect (socketHandle, (struct sockaddr*) &address, sizeof (address)) == -1)
{
closeSocket();
return false;
}
const MemoryBlock requestHeader (createRequestHeader (hostName, hostPort,
proxyName, proxyPort,
hostPath, url,
headers, postData,
isPost));
int totalHeaderSent = 0;
while (totalHeaderSent < requestHeader.getSize())
{
if (Time::getMillisecondCounter() > timeOutTime)
{
closeSocket();
return false;
}
const int numToSend = jmin (1024, requestHeader.getSize() - totalHeaderSent);
if (send (socketHandle,
((const char*) requestHeader.getData()) + totalHeaderSent,
numToSend, 0)
!= numToSend)
{
closeSocket();
return false;
}
totalHeaderSent += numToSend;
if (callback != 0 && ! callback (callbackContext, totalHeaderSent, requestHeader.getSize()))
{
closeSocket();
return false;
}
}
const String responseHeader (readResponse (timeOutTime));
if (responseHeader.isNotEmpty())
{
//DBG (responseHeader);
StringArray lines;
lines.addLines (responseHeader);
// NB - using charToString() here instead of just T(" "), because that was
// causing a mysterious gcc internal compiler error...
const int statusCode = responseHeader.fromFirstOccurrenceOf (String::charToString (T(' ')), false, false)
.substring (0, 3)
.getIntValue();
//int contentLength = findHeaderItem (lines, T("Content-Length:")).getIntValue();
//bool isChunked = findHeaderItem (lines, T("Transfer-Encoding:")).equalsIgnoreCase ("chunked");
String location (findHeaderItem (lines, T("Location:")));
if (statusCode >= 300 && statusCode < 400
&& location.isNotEmpty())
{
if (! location.startsWithIgnoreCase (T("http://")))
location = T("http://") + location;
if (levelsOfRedirection++ < 3)
return open (location, headers, postData, isPost, callback, callbackContext, timeOutMs);
}
else
{
levelsOfRedirection = 0;
return true;
}
}
closeSocket();
return false;
}
//==============================================================================
int read (void* buffer, int bytesToRead)
{
fd_set readbits;
FD_ZERO (&readbits);
FD_SET (socketHandle, &readbits);
struct timeval tv;
tv.tv_sec = timeoutSeconds;
tv.tv_usec = 0;
if (select (socketHandle + 1, &readbits, 0, 0, &tv) <= 0)
return 0; // (timeout)
const int bytesRead = jmax (0, recv (socketHandle, buffer, bytesToRead, MSG_WAITALL));
readPosition += bytesRead;
return bytesRead;
}
//==============================================================================
int readPosition;
//==============================================================================
juce_UseDebuggingNewOperator
private:
int socketHandle, levelsOfRedirection;
const int timeoutSeconds;
//==============================================================================
void closeSocket()
{
if (socketHandle >= 0)
close (socketHandle);
socketHandle = -1;
}
const MemoryBlock createRequestHeader (const String& hostName,
const int hostPort,
const String& proxyName,
const int proxyPort,
const String& hostPath,
const String& originalURL,
const String& headers,
const MemoryBlock& postData,
const bool isPost)
{
String header (isPost ? "POST " : "GET ");
if (proxyName.isEmpty())
{
header << hostPath << " HTTP/1.0\r\nHost: "
<< hostName << ':' << hostPort;
}
else
{
header << originalURL << " HTTP/1.0\r\nHost: "
<< proxyName << ':' << proxyPort;
}
header << "\r\nUser-Agent: JUCE/"
<< JUCE_MAJOR_VERSION << '.' << JUCE_MINOR_VERSION
<< "\r\nConnection: Close\r\nContent-Length: "
<< postData.getSize() << "\r\n"
<< headers << "\r\n";
MemoryBlock mb;
mb.append (header.toUTF8(), (int) strlen (header.toUTF8()));
mb.append (postData.getData(), postData.getSize());
return mb;
}
const String readResponse (const uint32 timeOutTime)
{
int bytesRead = 0, numConsecutiveLFs = 0;
MemoryBlock buffer (1024, true);
while (numConsecutiveLFs < 2 && bytesRead < 32768
&& Time::getMillisecondCounter() <= timeOutTime)
{
fd_set readbits;
FD_ZERO (&readbits);
FD_SET (socketHandle, &readbits);
struct timeval tv;
tv.tv_sec = timeoutSeconds;
tv.tv_usec = 0;
if (select (socketHandle + 1, &readbits, 0, 0, &tv) <= 0)
return String::empty; // (timeout)
buffer.ensureSize (bytesRead + 8, true);
char* const dest = (char*) buffer.getData() + bytesRead;
if (recv (socketHandle, dest, 1, 0) == -1)
return String::empty;
const char lastByte = *dest;
++bytesRead;
if (lastByte == '\n')
++numConsecutiveLFs;
else if (lastByte != '\r')
numConsecutiveLFs = 0;
}
const String header (String::fromUTF8 ((const uint8*) buffer.getData()));
if (header.startsWithIgnoreCase (T("HTTP/")))
return header.trimEnd();
return String::empty;
}
//==============================================================================
static bool decomposeURL (const String& url,
String& host, String& path, int& port)
{
if (! url.startsWithIgnoreCase (T("http://")))
return false;
const int nextSlash = url.indexOfChar (7, '/');
int nextColon = url.indexOfChar (7, ':');
if (nextColon > nextSlash && nextSlash > 0)
nextColon = -1;
if (nextColon >= 0)
{
host = url.substring (7, nextColon);
if (nextSlash >= 0)
port = url.substring (nextColon + 1, nextSlash).getIntValue();
else
port = url.substring (nextColon + 1).getIntValue();
}
else
{
port = 80;
if (nextSlash >= 0)
host = url.substring (7, nextSlash);
else
host = url.substring (7);
}
if (nextSlash >= 0)
path = url.substring (nextSlash);
else
path = T("/");
return true;
}
//==============================================================================
static const String findHeaderItem (const StringArray& lines, const String& itemName)
{
for (int i = 0; i < lines.size(); ++i)
if (lines[i].startsWithIgnoreCase (itemName))
return lines[i].substring (itemName.length()).trim();
return String::empty;
}
};
//==============================================================================
bool juce_isOnLine()
{
return true;
}
void* juce_openInternetFile (const String& url,
const String& headers,
const MemoryBlock& postData,
const bool isPost,
URL::OpenStreamProgressCallback* callback,
void* callbackContext,
int timeOutMs)
{
JUCE_HTTPSocketStream* const s = new JUCE_HTTPSocketStream();
if (s->open (url, headers, postData, isPost,
callback, callbackContext, timeOutMs))
return s;
delete s;
return 0;
}
void juce_closeInternetFile (void* handle)
{
JUCE_HTTPSocketStream* const s = (JUCE_HTTPSocketStream*) handle;
if (s != 0)
delete s;
}
int juce_readFromInternetFile (void* handle, void* buffer, int bytesToRead)
{
JUCE_HTTPSocketStream* const s = (JUCE_HTTPSocketStream*) handle;
if (s != 0)
return s->read (buffer, bytesToRead);
return 0;
}
int juce_seekInInternetFile (void* handle, int newPosition)
{
JUCE_HTTPSocketStream* const s = (JUCE_HTTPSocketStream*) handle;
if (s != 0)
return s->readPosition;
return 0;
}
END_JUCE_NAMESPACE

+ 6
- 5
build/linux/platform_specific_code/juce_linux_Threads.cpp View File

@@ -44,6 +44,7 @@ BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/threads/juce_Process.h"
#include "../../../src/juce_core/io/files/juce_File.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
//==============================================================================
/*
@@ -90,9 +91,9 @@ void juce_setCurrentThreadName (const String& /*name*/) throw()
{
}
int Thread::getCurrentThreadId() throw()
int64 Thread::getCurrentThreadId() throw()
{
return (int) pthread_self();
return pthread_self();
}
/*
@@ -255,17 +256,17 @@ void Process::lowerPrivilege()
}
#if JUCE_BUILD_GUI_CLASSES
void* Process::loadDynamicLibrary (const String& name)
void* PlatformUtilities::loadDynamicLibrary (const String& name)
{
return dlopen ((const char*) name.toUTF8(), RTLD_LOCAL | RTLD_NOW);
}
void Process::freeDynamicLibrary (void* handle)
void PlatformUtilities::freeDynamicLibrary (void* handle)
{
dlclose(handle);
}
void* Process::getProcedureEntryPoint (void* libraryHandle, const String& procedureName)
void* PlatformUtilities::getProcedureEntryPoint (void* libraryHandle, const String& procedureName)
{
return dlsym (libraryHandle, (const char*) procedureName);
}


+ 2
- 5
build/linux/platform_specific_code/juce_linux_WebBrowserComponent.cpp View File

@@ -35,6 +35,7 @@ BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h"
#if JUCE_WEB_BROWSER
/*
Sorry.. This class isn't implemented on Linux!
@@ -113,10 +114,6 @@ void WebBrowserComponent::parentHierarchyChanged()
checkWindowAssociation();
}
void WebBrowserComponent::moved()
{
}
void WebBrowserComponent::resized()
{
}
@@ -131,5 +128,5 @@ bool WebBrowserComponent::pageAboutToLoad (const String& url)
return true;
}
#endif
END_JUCE_NAMESPACE

+ 3
- 3
build/linux/platform_specific_code/juce_linux_Windowing.cpp View File

@@ -467,7 +467,7 @@ static Pixmap juce_createColourPixmapFromImage (Display* display, const Image& i
XImage* ximage = XCreateImage (display, CopyFromParent, 24, ZPixmap,
0, (char*) colour, width, height, 32, 0);
Pixmap pixmap = XCreatePixmap (display, DefaultRootWindow (display),
Pixmap pixmap = XCreatePixmap (display, DefaultRootWindow (display),
width, height, 24);
GC gc = XCreateGC (display, pixmap, 0, 0);
@@ -1184,7 +1184,7 @@ public:
wmHints->icon_mask = juce_createMaskPixmapFromImage (display, newIcon);
XSetWMHints (display, windowH, wmHints);
XFree (wmHints);
XFree (wmHints);
XSync (display, False);
}
@@ -1754,7 +1754,7 @@ public:
trayAtom = XInternAtom (display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", false);
XChangeProperty (display, windowH, trayAtom, XA_WINDOW, 32, PropModeReplace, (unsigned char*) &windowH, 1);
// a minimum size must be specified for GNOME and Xfce, otherwise the icon is displayed with a width of 1
// a minimum size must be specified for GNOME and Xfce, otherwise the icon is displayed with a width of 1
XSizeHints* hints = XAllocSizeHints();
hints->flags = PMinSize;
hints->min_width = 22;


+ 129
- 84
build/macosx/Juce.xcodeproj/project.pbxproj View File

@@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
84022DFD0DAE4CB9004CF59A /* juce_mac_HTTPStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 84022DFB0DAE4CB9004CF59A /* juce_mac_HTTPStream.h */; };
84052DE408D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84052DE208D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.cpp */; };
84052DE508D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 84052DE308D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.h */; };
8406AA5A0C4BDF90003A0D6A /* juce_MidiOutput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8406AA590C4BDF90003A0D6A /* juce_MidiOutput.cpp */; };
@@ -34,11 +33,10 @@
84198B14096D8E2B0022A439 /* juce_MidiOutput.h in Headers */ = {isa = PBXBuildFile; fileRef = 84198B0E096D8E2B0022A439 /* juce_MidiOutput.h */; };
84198BB5096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84198BB3096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.cpp */; };
84198BB6096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 84198BB4096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.h */; };
841B22E20D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.cpp */; };
841B22E20D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.mm in Sources */ = {isa = PBXBuildFile; fileRef = 841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.mm */; };
841B22E30D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 841B22CF0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.h */; };
841B22E40D2E7FE3009D01AA /* juce_DirectXPluginFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 841B22D00D2E7FE3009D01AA /* juce_DirectXPluginFormat.h */; };
841B22E50D2E7FE3009D01AA /* juce_LADSPAPluginFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 841B22D10D2E7FE3009D01AA /* juce_LADSPAPluginFormat.h */; };
841B22E60D2E7FE3009D01AA /* juce_VSTPluginFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841B22D20D2E7FE3009D01AA /* juce_VSTPluginFormat.cpp */; };
841B22E70D2E7FE3009D01AA /* juce_VSTPluginFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 841B22D30D2E7FE3009D01AA /* juce_VSTPluginFormat.h */; };
841B22E80D2E7FE3009D01AA /* juce_AudioPluginFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841B22D40D2E7FE3009D01AA /* juce_AudioPluginFormat.cpp */; };
841B22E90D2E7FE3009D01AA /* juce_AudioPluginFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 841B22D50D2E7FE3009D01AA /* juce_AudioPluginFormat.h */; };
@@ -79,18 +77,19 @@
842F9D6E0A19C9AF00B1358D /* juce_TextPropertyComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 842F9D620A19C9AF00B1358D /* juce_TextPropertyComponent.h */; };
842F9DE20A19D2AF00B1358D /* juce_PositionedRectangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 842F9DE00A19D2AF00B1358D /* juce_PositionedRectangle.cpp */; };
842F9DE30A19D2AF00B1358D /* juce_PositionedRectangle.h in Headers */ = {isa = PBXBuildFile; fileRef = 842F9DE10A19D2AF00B1358D /* juce_PositionedRectangle.h */; };
8435D90D0E9406D2008FBD1C /* juce_mac_Strings.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8435D90C0E9406D2008FBD1C /* juce_mac_Strings.mm */; };
8435D9650E940A3E008FBD1C /* juce_mac_MiscUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8435D9640E940A3E008FBD1C /* juce_mac_MiscUtilities.mm */; };
8435DA420E95527D008FBD1C /* juce_mac_Debugging.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8435DA410E95527D008FBD1C /* juce_mac_Debugging.mm */; };
8440CD3E0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8440CD3C0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.cpp */; };
8440CD3F0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8440CD3D0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.h */; };
8440CD620ACD112E0086FFD7 /* juce_SliderListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 8440CD610ACD112E0086FFD7 /* juce_SliderListener.h */; };
8457783E0E8947C8006D9E4E /* juce_NSViewComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 8457783D0E8947C8006D9E4E /* juce_NSViewComponent.h */; };
84581EEA0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581EE80D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp */; };
84581EEB0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581EE90D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h */; };
846034DE09CB374E00E255CF /* juce_InterprocessConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846034DA09CB374E00E255CF /* juce_InterprocessConnection.cpp */; };
846034DF09CB374E00E255CF /* juce_InterprocessConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 846034DB09CB374E00E255CF /* juce_InterprocessConnection.h */; };
846034E009CB374E00E255CF /* juce_InterprocessConnectionServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846034DC09CB374E00E255CF /* juce_InterprocessConnectionServer.cpp */; };
846034E109CB374E00E255CF /* juce_InterprocessConnectionServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 846034DD09CB374E00E255CF /* juce_InterprocessConnectionServer.h */; };
8463D3220E1FC25A003B46B2 /* juce_mac_Fonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8463D31F0E1FC25A003B46B2 /* juce_mac_Fonts.mm */; };
8463D3230E1FC25A003B46B2 /* juce_mac_Messaging.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8463D3200E1FC25A003B46B2 /* juce_mac_Messaging.mm */; };
8463D3240E1FC25A003B46B2 /* juce_mac_Windowing.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8463D3210E1FC25A003B46B2 /* juce_mac_Windowing.mm */; };
8463D5C1098BD2DD00F9AEC2 /* juce_MidiBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8463D5B5098BD2DD00F9AEC2 /* juce_MidiBuffer.cpp */; };
8463D5C2098BD2DD00F9AEC2 /* juce_MidiBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8463D5B6098BD2DD00F9AEC2 /* juce_MidiBuffer.h */; };
8463D5C3098BD2DD00F9AEC2 /* juce_MidiFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8463D5B7098BD2DD00F9AEC2 /* juce_MidiFile.cpp */; };
@@ -115,12 +114,10 @@
846927DF0A49ABE600314975 /* juce_RectanglePlacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 846927DD0A49ABE600314975 /* juce_RectanglePlacement.h */; };
846927E10A49ABFD00314975 /* juce_SVGParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846927E00A49ABFD00314975 /* juce_SVGParser.cpp */; };
847824810D7816A00082A5C5 /* juce_AudioCDBurner.h in Headers */ = {isa = PBXBuildFile; fileRef = 8478247F0D7816A00082A5C5 /* juce_AudioCDBurner.h */; };
847D06470DD88D1100DF6A61 /* juce_mac_Network.mm in Sources */ = {isa = PBXBuildFile; fileRef = 847D06460DD88D1100DF6A61 /* juce_mac_Network.mm */; };
847F72DB0C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F72D70C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.cpp */; };
847F72DC0C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 847F72D80C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.h */; };
847F72DD0C2702A000CBECEC /* juce_FileTreeComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F72D90C2702A000CBECEC /* juce_FileTreeComponent.cpp */; };
847F72DE0C2702A000CBECEC /* juce_FileTreeComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 847F72DA0C2702A000CBECEC /* juce_FileTreeComponent.h */; };
848A560B0DDDD3E40041C706 /* juce_mac_WebBrowserComponent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 848A560A0DDDD3E40041C706 /* juce_mac_WebBrowserComponent.mm */; };
848A560E0DDDD3FB0041C706 /* juce_WebBrowserComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 848A560D0DDDD3FB0041C706 /* juce_WebBrowserComponent.h */; };
8495BB8C0D8067B2001D9C0B /* juce_AudioThumbnail.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8495BB880D8067B2001D9C0B /* juce_AudioThumbnail.cpp */; };
8495BB8D0D8067B2001D9C0B /* juce_AudioThumbnail.h in Headers */ = {isa = PBXBuildFile; fileRef = 8495BB890D8067B2001D9C0B /* juce_AudioThumbnail.h */; };
@@ -132,11 +129,6 @@
84A06BAD09CAD6A3006A43BD /* juce_AudioIODevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A06BAA09CAD6A3006A43BD /* juce_AudioIODevice.cpp */; };
84A06BAE09CAD6A3006A43BD /* juce_AudioIODeviceType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A06BAB09CAD6A3006A43BD /* juce_AudioIODeviceType.cpp */; };
84A06BAF09CAD6A3006A43BD /* juce_AudioIODeviceType.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A06BAC09CAD6A3006A43BD /* juce_AudioIODeviceType.h */; };
84A06BE309CADB06006A43BD /* juce_mac_NamedPipe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A06BE209CADB06006A43BD /* juce_mac_NamedPipe.cpp */; };
84A4882908A22E2400752A2B /* juce_mac_CoreAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A4881E08A22E2400752A2B /* juce_mac_CoreAudio.cpp */; };
84A4882A08A22E2400752A2B /* juce_mac_CoreMidi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A4881F08A22E2400752A2B /* juce_mac_CoreMidi.cpp */; };
84A4882C08A22E2400752A2B /* juce_mac_Files.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A4882108A22E2400752A2B /* juce_mac_Files.cpp */; };
84A4883108A22E2400752A2B /* juce_mac_Threads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A4882608A22E2400752A2B /* juce_mac_Threads.cpp */; };
84A48A2808A22E4B00752A2B /* juce_Application.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A4883508A22E4900752A2B /* juce_Application.cpp */; };
84A48A2908A22E4B00752A2B /* juce_Application.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A4883608A22E4900752A2B /* juce_Application.h */; };
84A48A2A08A22E4B00752A2B /* juce_DeletedAtShutdown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A4883708A22E4900752A2B /* juce_DeletedAtShutdown.cpp */; };
@@ -288,7 +280,6 @@
84A48ACE08A22E4B00752A2B /* juce_OpenGLComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A488E908A22E4900752A2B /* juce_OpenGLComponent.h */; };
84A48ACF08A22E4B00752A2B /* juce_PreferencesPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A488EA08A22E4900752A2B /* juce_PreferencesPanel.cpp */; };
84A48AD008A22E4B00752A2B /* juce_PreferencesPanel.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A488EB08A22E4900752A2B /* juce_PreferencesPanel.h */; };
84A48AD108A22E4B00752A2B /* juce_QuickTimeMovieComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A488EC08A22E4900752A2B /* juce_QuickTimeMovieComponent.cpp */; };
84A48AD208A22E4B00752A2B /* juce_QuickTimeMovieComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A488ED08A22E4900752A2B /* juce_QuickTimeMovieComponent.h */; };
84A48AD308A22E4B00752A2B /* juce_AlertWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A488EF08A22E4900752A2B /* juce_AlertWindow.cpp */; };
84A48AD408A22E4B00752A2B /* juce_AlertWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A488F008A22E4900752A2B /* juce_AlertWindow.h */; };
@@ -490,12 +481,32 @@
84BC4E2E0C8DD38C00FA249B /* juce_AudioProcessorListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BC4E260C8DD38C00FA249B /* juce_AudioProcessorListener.h */; };
84BC4E2F0C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84BC4E270C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp */; };
84BC4E300C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 84BC4E280C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h */; };
84BE9E1C0DE56DEB00AB8F23 /* juce_mac_SystemStats.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84BE9E1B0DE56DEB00AB8F23 /* juce_mac_SystemStats.mm */; };
84C0EA5E0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C0EA5C0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.cpp */; };
84C0EA5F0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 84C0EA5D0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.h */; };
84CE8A410DC5D7D600799A0E /* juce_mac_AudioCDBurner.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84CE8A400DC5D7D600799A0E /* juce_mac_AudioCDBurner.mm */; };
84CA4AF40E9BF8B6004CCC0E /* juce_VSTPluginFormat.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84CA4AF30E9BF8B6004CCC0E /* juce_VSTPluginFormat.mm */; };
84D296BD09B763190026C535 /* juce_PropertiesFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D296BB09B763190026C535 /* juce_PropertiesFile.cpp */; };
84D296BE09B763190026C535 /* juce_PropertiesFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D296BC09B763190026C535 /* juce_PropertiesFile.h */; };
84E024F10E94028C003E41AF /* juce_mac_AppleRemote.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024DB0E94028C003E41AF /* juce_mac_AppleRemote.mm */; };
84E024F20E94028C003E41AF /* juce_mac_AudioCDBurner.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024DC0E94028C003E41AF /* juce_mac_AudioCDBurner.mm */; };
84E024F30E94028C003E41AF /* juce_mac_CoreAudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E024DD0E94028C003E41AF /* juce_mac_CoreAudio.cpp */; };
84E024F40E94028C003E41AF /* juce_mac_CoreMidi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E024DE0E94028C003E41AF /* juce_mac_CoreMidi.cpp */; };
84E024F50E94028C003E41AF /* juce_mac_FileChooser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024DF0E94028C003E41AF /* juce_mac_FileChooser.mm */; };
84E024F60E94028C003E41AF /* juce_mac_Files.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E00E94028C003E41AF /* juce_mac_Files.mm */; };
84E024F70E94028C003E41AF /* juce_mac_Fonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E10E94028C003E41AF /* juce_mac_Fonts.mm */; };
84E024F80E94028C003E41AF /* juce_mac_MainMenu.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E20E94028C003E41AF /* juce_mac_MainMenu.mm */; };
84E024F90E94028C003E41AF /* juce_mac_MessageManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E30E94028C003E41AF /* juce_mac_MessageManager.mm */; };
84E024FA0E94028C003E41AF /* juce_mac_MouseCursor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E40E94028C003E41AF /* juce_mac_MouseCursor.mm */; };
84E024FB0E94028C003E41AF /* juce_mac_NamedPipe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E50E94028C003E41AF /* juce_mac_NamedPipe.cpp */; };
84E024FC0E94028C003E41AF /* juce_mac_NativeCode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E60E94028C003E41AF /* juce_mac_NativeCode.mm */; };
84E024FE0E94028C003E41AF /* juce_mac_Network.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E80E94028C003E41AF /* juce_mac_Network.mm */; };
84E024FF0E94028C003E41AF /* juce_mac_NSViewComponent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024E90E94028C003E41AF /* juce_mac_NSViewComponent.mm */; };
84E025000E94028C003E41AF /* juce_mac_NSViewComponentPeer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024EA0E94028C003E41AF /* juce_mac_NSViewComponentPeer.mm */; };
84E025010E94028C003E41AF /* juce_mac_OpenGLComponent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024EB0E94028C003E41AF /* juce_mac_OpenGLComponent.mm */; };
84E025020E94028C003E41AF /* juce_mac_QuickTimeMovieComponent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024EC0E94028C003E41AF /* juce_mac_QuickTimeMovieComponent.mm */; };
84E025030E94028C003E41AF /* juce_mac_SystemStats.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024ED0E94028C003E41AF /* juce_mac_SystemStats.mm */; };
84E025040E94028C003E41AF /* juce_mac_Threads.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024EE0E94028C003E41AF /* juce_mac_Threads.mm */; };
84E025050E94028C003E41AF /* juce_mac_WebBrowserComponent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E024EF0E94028C003E41AF /* juce_mac_WebBrowserComponent.mm */; };
84E025060E94028C003E41AF /* juce_posix_SharedCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 84E024F00E94028C003E41AF /* juce_posix_SharedCode.h */; };
84E8209409729D2A0097675B /* juce_AudioFormatManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E8209209729D2A0097675B /* juce_AudioFormatManager.cpp */; };
84E8209509729D2A0097675B /* juce_AudioFormatManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 84E8209309729D2A0097675B /* juce_AudioFormatManager.h */; };
84F1B8DA09499F1400AD8EDE /* juce_MidiKeyboardComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F1B8D809499F1400AD8EDE /* juce_MidiKeyboardComponent.cpp */; };
@@ -529,10 +540,8 @@
84F593AE09855679008153BA /* juce_DocumentWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F593AC09855679008153BA /* juce_DocumentWindow.cpp */; };
84F593AF09855679008153BA /* juce_DocumentWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F593AD09855679008153BA /* juce_DocumentWindow.h */; };
84F593B109855693008153BA /* juce_LassoComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F593B009855693008153BA /* juce_LassoComponent.h */; };
84F597000E23DDBB00E92E85 /* juce_mac_NativeHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F596FF0E23DDBB00E92E85 /* juce_mac_NativeHeaders.h */; };
84F6B7540C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F6B7520C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.cpp */; };
84F6B7550C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F6B7530C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.h */; };
84F703230E1E56FB00EB338A /* juce_mac_FileChooser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84F703220E1E56FB00EB338A /* juce_mac_FileChooser.mm */; };
84F7A7AF0A8383A100D36246 /* juce_ToolbarButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F7A7AD0A8383A100D36246 /* juce_ToolbarButton.cpp */; };
84F7A7B00A8383A100D36246 /* juce_ToolbarButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F7A7AE0A8383A100D36246 /* juce_ToolbarButton.h */; };
84F7A7B80A8383C200D36246 /* juce_Toolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F7A7B10A8383C200D36246 /* juce_Toolbar.cpp */; };
@@ -546,6 +555,7 @@
84F7A7C20A8383E000D36246 /* juce_MultiTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F7A7C00A8383E000D36246 /* juce_MultiTimer.h */; };
84F7A7EF0A838CC900D36246 /* juce_ComponentAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F7A7ED0A838CC900D36246 /* juce_ComponentAnimator.cpp */; };
84F7A7F00A838CC900D36246 /* juce_ComponentAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F7A7EE0A838CC900D36246 /* juce_ComponentAnimator.h */; };
84F8B60D0EB5B9230020D98D /* juce_mac_NativeIncludes.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F8B60C0EB5B9230020D98D /* juce_mac_NativeIncludes.h */; };
84F8DAD0099C963A00E911ED /* juce_ComponentPeer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F8DACE099C963A00E911ED /* juce_ComponentPeer.cpp */; };
84F8DAD1099C963A00E911ED /* juce_ComponentPeer.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F8DACF099C963A00E911ED /* juce_ComponentPeer.h */; };
84FC318F09B749FD00B75141 /* juce_FileBasedDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84FC318709B749FD00B75141 /* juce_FileBasedDocument.cpp */; };
@@ -582,7 +592,6 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
84022DFB0DAE4CB9004CF59A /* juce_mac_HTTPStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_mac_HTTPStream.h; sourceTree = "<group>"; };
84052DE208D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ToneGeneratorAudioSource.cpp; sourceTree = "<group>"; };
84052DE308D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ToneGeneratorAudioSource.h; sourceTree = "<group>"; };
8406AA590C4BDF90003A0D6A /* juce_MidiOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_MidiOutput.cpp; sourceTree = "<group>"; };
@@ -609,11 +618,10 @@
84198B0E096D8E2B0022A439 /* juce_MidiOutput.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_MidiOutput.h; sourceTree = "<group>"; };
84198BB3096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioDeviceSelectorComponent.cpp; sourceTree = "<group>"; };
84198BB4096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioDeviceSelectorComponent.h; sourceTree = "<group>"; };
841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioUnitPluginFormat.cpp; sourceTree = "<group>"; };
841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 2; path = juce_AudioUnitPluginFormat.mm; sourceTree = "<group>"; };
841B22CF0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioUnitPluginFormat.h; sourceTree = "<group>"; };
841B22D00D2E7FE3009D01AA /* juce_DirectXPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_DirectXPluginFormat.h; sourceTree = "<group>"; };
841B22D10D2E7FE3009D01AA /* juce_LADSPAPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_LADSPAPluginFormat.h; sourceTree = "<group>"; };
841B22D20D2E7FE3009D01AA /* juce_VSTPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_VSTPluginFormat.cpp; sourceTree = "<group>"; };
841B22D30D2E7FE3009D01AA /* juce_VSTPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_VSTPluginFormat.h; sourceTree = "<group>"; };
841B22D40D2E7FE3009D01AA /* juce_AudioPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioPluginFormat.cpp; sourceTree = "<group>"; };
841B22D50D2E7FE3009D01AA /* juce_AudioPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioPluginFormat.h; sourceTree = "<group>"; };
@@ -639,7 +647,6 @@
842B63B709D8508F00255DC7 /* juce_FlacAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_FlacAudioFormat.h; sourceTree = "<group>"; };
842B63B809D8508F00255DC7 /* juce_OggVorbisAudioFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_OggVorbisAudioFormat.cpp; sourceTree = "<group>"; };
842B63B909D8508F00255DC7 /* juce_OggVorbisAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_OggVorbisAudioFormat.h; sourceTree = "<group>"; };
842B64EA09D87B7900255DC7 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = juce.xcconfig; sourceTree = "<group>"; };
842D3D0D0C0D7CF200E9FFE4 /* juce_MenuBarModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_MenuBarModel.cpp; sourceTree = "<group>"; };
842F9D570A19C9AF00B1358D /* juce_ButtonPropertyComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ButtonPropertyComponent.cpp; sourceTree = "<group>"; };
842F9D580A19C9AF00B1358D /* juce_ButtonPropertyComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ButtonPropertyComponent.h; sourceTree = "<group>"; };
@@ -655,20 +662,21 @@
842F9D620A19C9AF00B1358D /* juce_TextPropertyComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_TextPropertyComponent.h; sourceTree = "<group>"; };
842F9DE00A19D2AF00B1358D /* juce_PositionedRectangle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_PositionedRectangle.cpp; sourceTree = "<group>"; };
842F9DE10A19D2AF00B1358D /* juce_PositionedRectangle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_PositionedRectangle.h; sourceTree = "<group>"; };
8435D90C0E9406D2008FBD1C /* juce_mac_Strings.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Strings.mm; sourceTree = "<group>"; };
8435D9640E940A3E008FBD1C /* juce_mac_MiscUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MiscUtilities.mm; sourceTree = "<group>"; };
8435DA410E95527D008FBD1C /* juce_mac_Debugging.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Debugging.mm; sourceTree = "<group>"; };
8440CD3C0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ComponentMovementWatcher.cpp; sourceTree = "<group>"; };
8440CD3D0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ComponentMovementWatcher.h; sourceTree = "<group>"; };
8440CD610ACD112E0086FFD7 /* juce_SliderListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_SliderListener.h; sourceTree = "<group>"; };
8456EC6508A2A6C80087C412 /* juce_Config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_Config.h; path = ../../juce_Config.h; sourceTree = SOURCE_ROOT; };
8456EC6908A2A6F00087C412 /* JUCE changelist.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = "JUCE changelist.txt"; path = "../../docs/JUCE changelist.txt"; sourceTree = SOURCE_ROOT; };
8457783D0E8947C8006D9E4E /* juce_NSViewComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_NSViewComponent.h; sourceTree = "<group>"; };
84581EE80D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_QuickTimeAudioFormat.cpp; sourceTree = "<group>"; };
84581EE90D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_QuickTimeAudioFormat.h; sourceTree = "<group>"; };
846034DA09CB374E00E255CF /* juce_InterprocessConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_InterprocessConnection.cpp; sourceTree = "<group>"; };
846034DB09CB374E00E255CF /* juce_InterprocessConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_InterprocessConnection.h; sourceTree = "<group>"; };
846034DC09CB374E00E255CF /* juce_InterprocessConnectionServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_InterprocessConnectionServer.cpp; sourceTree = "<group>"; };
846034DD09CB374E00E255CF /* juce_InterprocessConnectionServer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_InterprocessConnectionServer.h; sourceTree = "<group>"; };
8463D31F0E1FC25A003B46B2 /* juce_mac_Fonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Fonts.mm; sourceTree = "<group>"; };
8463D3200E1FC25A003B46B2 /* juce_mac_Messaging.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Messaging.mm; sourceTree = "<group>"; };
8463D3210E1FC25A003B46B2 /* juce_mac_Windowing.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Windowing.mm; sourceTree = "<group>"; };
8463D5B5098BD2DD00F9AEC2 /* juce_MidiBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MidiBuffer.cpp; path = midi/juce_MidiBuffer.cpp; sourceTree = "<group>"; };
8463D5B6098BD2DD00F9AEC2 /* juce_MidiBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_MidiBuffer.h; path = midi/juce_MidiBuffer.h; sourceTree = "<group>"; };
8463D5B7098BD2DD00F9AEC2 /* juce_MidiFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MidiFile.cpp; path = midi/juce_MidiFile.cpp; sourceTree = "<group>"; };
@@ -693,12 +701,10 @@
846927DD0A49ABE600314975 /* juce_RectanglePlacement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_RectanglePlacement.h; sourceTree = "<group>"; };
846927E00A49ABFD00314975 /* juce_SVGParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_SVGParser.cpp; sourceTree = "<group>"; };
8478247F0D7816A00082A5C5 /* juce_AudioCDBurner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioCDBurner.h; sourceTree = "<group>"; };
847D06460DD88D1100DF6A61 /* juce_mac_Network.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Network.mm; sourceTree = "<group>"; };
847F72D70C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_DirectoryContentsDisplayComponent.cpp; path = filebrowser/juce_DirectoryContentsDisplayComponent.cpp; sourceTree = "<group>"; };
847F72D80C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_DirectoryContentsDisplayComponent.h; path = filebrowser/juce_DirectoryContentsDisplayComponent.h; sourceTree = "<group>"; };
847F72D90C2702A000CBECEC /* juce_FileTreeComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_FileTreeComponent.cpp; path = filebrowser/juce_FileTreeComponent.cpp; sourceTree = "<group>"; };
847F72DA0C2702A000CBECEC /* juce_FileTreeComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_FileTreeComponent.h; path = filebrowser/juce_FileTreeComponent.h; sourceTree = "<group>"; };
848A560A0DDDD3E40041C706 /* juce_mac_WebBrowserComponent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_WebBrowserComponent.mm; sourceTree = "<group>"; };
848A560D0DDDD3FB0041C706 /* juce_WebBrowserComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_WebBrowserComponent.h; sourceTree = "<group>"; };
8495BB880D8067B2001D9C0B /* juce_AudioThumbnail.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioThumbnail.cpp; sourceTree = "<group>"; };
8495BB890D8067B2001D9C0B /* juce_AudioThumbnail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_AudioThumbnail.h; sourceTree = "<group>"; };
@@ -710,11 +716,6 @@
84A06BAA09CAD6A3006A43BD /* juce_AudioIODevice.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioIODevice.cpp; sourceTree = "<group>"; };
84A06BAB09CAD6A3006A43BD /* juce_AudioIODeviceType.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioIODeviceType.cpp; sourceTree = "<group>"; };
84A06BAC09CAD6A3006A43BD /* juce_AudioIODeviceType.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioIODeviceType.h; sourceTree = "<group>"; };
84A06BE209CADB06006A43BD /* juce_mac_NamedPipe.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_NamedPipe.cpp; sourceTree = "<group>"; };
84A4881E08A22E2400752A2B /* juce_mac_CoreAudio.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_mac_CoreAudio.cpp; path = platform_specific_code/juce_mac_CoreAudio.cpp; sourceTree = SOURCE_ROOT; };
84A4881F08A22E2400752A2B /* juce_mac_CoreMidi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_mac_CoreMidi.cpp; path = platform_specific_code/juce_mac_CoreMidi.cpp; sourceTree = SOURCE_ROOT; };
84A4882108A22E2400752A2B /* juce_mac_Files.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_mac_Files.cpp; path = platform_specific_code/juce_mac_Files.cpp; sourceTree = SOURCE_ROOT; };
84A4882608A22E2400752A2B /* juce_mac_Threads.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_mac_Threads.cpp; path = platform_specific_code/juce_mac_Threads.cpp; sourceTree = SOURCE_ROOT; };
84A4883508A22E4900752A2B /* juce_Application.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Application.cpp; path = ../../src/juce_appframework/application/juce_Application.cpp; sourceTree = SOURCE_ROOT; };
84A4883608A22E4900752A2B /* juce_Application.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_Application.h; path = ../../src/juce_appframework/application/juce_Application.h; sourceTree = SOURCE_ROOT; };
84A4883708A22E4900752A2B /* juce_DeletedAtShutdown.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_DeletedAtShutdown.cpp; path = ../../src/juce_appframework/application/juce_DeletedAtShutdown.cpp; sourceTree = SOURCE_ROOT; };
@@ -866,7 +867,6 @@
84A488E908A22E4900752A2B /* juce_OpenGLComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_OpenGLComponent.h; path = ../../src/juce_appframework/gui/components/special/juce_OpenGLComponent.h; sourceTree = SOURCE_ROOT; };
84A488EA08A22E4900752A2B /* juce_PreferencesPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_PreferencesPanel.cpp; path = ../../src/juce_appframework/gui/components/special/juce_PreferencesPanel.cpp; sourceTree = SOURCE_ROOT; };
84A488EB08A22E4900752A2B /* juce_PreferencesPanel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_PreferencesPanel.h; path = ../../src/juce_appframework/gui/components/special/juce_PreferencesPanel.h; sourceTree = SOURCE_ROOT; };
84A488EC08A22E4900752A2B /* juce_QuickTimeMovieComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_QuickTimeMovieComponent.cpp; path = ../../src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.cpp; sourceTree = SOURCE_ROOT; };
84A488ED08A22E4900752A2B /* juce_QuickTimeMovieComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_QuickTimeMovieComponent.h; path = ../../src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.h; sourceTree = SOURCE_ROOT; };
84A488EF08A22E4900752A2B /* juce_AlertWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AlertWindow.cpp; path = ../../src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp; sourceTree = SOURCE_ROOT; };
84A488F008A22E4900752A2B /* juce_AlertWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_AlertWindow.h; path = ../../src/juce_appframework/gui/components/windows/juce_AlertWindow.h; sourceTree = SOURCE_ROOT; };
@@ -1061,19 +1061,40 @@
84A48A2608A22E4A00752A2B /* juce_TimeSliceThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_TimeSliceThread.h; path = ../../src/juce_core/threads/juce_TimeSliceThread.h; sourceTree = SOURCE_ROOT; };
84A48A2708A22E4A00752A2B /* juce_WaitableEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_WaitableEvent.h; path = ../../src/juce_core/threads/juce_WaitableEvent.h; sourceTree = SOURCE_ROOT; };
84BC4E210C8DD38C00FA249B /* juce_AudioPlayHead.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioPlayHead.h; sourceTree = "<group>"; };
84BC4E220C8DD38C00FA249B /* juce_AudioProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioProcessor.cpp; sourceTree = "<group>"; };
84BC4E220C8DD38C00FA249B /* juce_AudioProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = juce_AudioProcessor.cpp; sourceTree = "<group>"; };
84BC4E230C8DD38C00FA249B /* juce_AudioProcessor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessor.h; sourceTree = "<group>"; };
84BC4E240C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioProcessorEditor.cpp; sourceTree = "<group>"; };
84BC4E250C8DD38C00FA249B /* juce_AudioProcessorEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessorEditor.h; sourceTree = "<group>"; };
84BC4E260C8DD38C00FA249B /* juce_AudioProcessorListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessorListener.h; sourceTree = "<group>"; };
84BC4E270C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_GenericAudioProcessorEditor.cpp; sourceTree = "<group>"; };
84BC4E280C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_GenericAudioProcessorEditor.h; sourceTree = "<group>"; };
84BE9E1B0DE56DEB00AB8F23 /* juce_mac_SystemStats.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_SystemStats.mm; sourceTree = "<group>"; };
84C0EA5C0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_IIRFilterAudioSource.cpp; path = ../../src/juce_appframework/audio/audio_sources/juce_IIRFilterAudioSource.cpp; sourceTree = SOURCE_ROOT; };
84C0EA5D0B3DDF2400EDF9D9 /* juce_IIRFilterAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_IIRFilterAudioSource.h; path = ../../src/juce_appframework/audio/audio_sources/juce_IIRFilterAudioSource.h; sourceTree = SOURCE_ROOT; };
84CE8A400DC5D7D600799A0E /* juce_mac_AudioCDBurner.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_AudioCDBurner.mm; sourceTree = "<group>"; };
84CA4AF30E9BF8B6004CCC0E /* juce_VSTPluginFormat.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_VSTPluginFormat.mm; sourceTree = "<group>"; };
84CA4AFA0E9BF9EC004CCC0E /* juce_VSTPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_VSTPluginFormat.cpp; sourceTree = "<group>"; };
84D296BB09B763190026C535 /* juce_PropertiesFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_PropertiesFile.cpp; sourceTree = "<group>"; };
84D296BC09B763190026C535 /* juce_PropertiesFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_PropertiesFile.h; sourceTree = "<group>"; };
84E024DB0E94028C003E41AF /* juce_mac_AppleRemote.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_AppleRemote.mm; sourceTree = "<group>"; };
84E024DC0E94028C003E41AF /* juce_mac_AudioCDBurner.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_AudioCDBurner.mm; sourceTree = "<group>"; };
84E024DD0E94028C003E41AF /* juce_mac_CoreAudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_CoreAudio.cpp; sourceTree = "<group>"; };
84E024DE0E94028C003E41AF /* juce_mac_CoreMidi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_CoreMidi.cpp; sourceTree = "<group>"; };
84E024DF0E94028C003E41AF /* juce_mac_FileChooser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_FileChooser.mm; sourceTree = "<group>"; };
84E024E00E94028C003E41AF /* juce_mac_Files.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Files.mm; sourceTree = "<group>"; };
84E024E10E94028C003E41AF /* juce_mac_Fonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Fonts.mm; sourceTree = "<group>"; };
84E024E20E94028C003E41AF /* juce_mac_MainMenu.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MainMenu.mm; sourceTree = "<group>"; };
84E024E30E94028C003E41AF /* juce_mac_MessageManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MessageManager.mm; sourceTree = "<group>"; };
84E024E40E94028C003E41AF /* juce_mac_MouseCursor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MouseCursor.mm; sourceTree = "<group>"; };
84E024E50E94028C003E41AF /* juce_mac_NamedPipe.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_NamedPipe.cpp; sourceTree = "<group>"; };
84E024E60E94028C003E41AF /* juce_mac_NativeCode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_NativeCode.mm; sourceTree = "<group>"; };
84E024E80E94028C003E41AF /* juce_mac_Network.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Network.mm; sourceTree = "<group>"; };
84E024E90E94028C003E41AF /* juce_mac_NSViewComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_NSViewComponent.mm; sourceTree = "<group>"; };
84E024EA0E94028C003E41AF /* juce_mac_NSViewComponentPeer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_NSViewComponentPeer.mm; sourceTree = "<group>"; };
84E024EB0E94028C003E41AF /* juce_mac_OpenGLComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_OpenGLComponent.mm; sourceTree = "<group>"; };
84E024EC0E94028C003E41AF /* juce_mac_QuickTimeMovieComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_QuickTimeMovieComponent.mm; sourceTree = "<group>"; };
84E024ED0E94028C003E41AF /* juce_mac_SystemStats.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_SystemStats.mm; sourceTree = "<group>"; };
84E024EE0E94028C003E41AF /* juce_mac_Threads.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Threads.mm; sourceTree = "<group>"; };
84E024EF0E94028C003E41AF /* juce_mac_WebBrowserComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_WebBrowserComponent.mm; sourceTree = "<group>"; };
84E024F00E94028C003E41AF /* juce_posix_SharedCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_posix_SharedCode.h; sourceTree = "<group>"; };
84E8209209729D2A0097675B /* juce_AudioFormatManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioFormatManager.cpp; sourceTree = "<group>"; };
84E8209309729D2A0097675B /* juce_AudioFormatManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioFormatManager.h; sourceTree = "<group>"; };
84F1B8D809499F1400AD8EDE /* juce_MidiKeyboardComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_MidiKeyboardComponent.cpp; sourceTree = "<group>"; };
@@ -1107,10 +1128,8 @@
84F593AC09855679008153BA /* juce_DocumentWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_DocumentWindow.cpp; sourceTree = "<group>"; };
84F593AD09855679008153BA /* juce_DocumentWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_DocumentWindow.h; sourceTree = "<group>"; };
84F593B009855693008153BA /* juce_LassoComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_LassoComponent.h; sourceTree = "<group>"; };
84F596FF0E23DDBB00E92E85 /* juce_mac_NativeHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_mac_NativeHeaders.h; sourceTree = "<group>"; };
84F6B7520C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ChannelRemappingAudioSource.cpp; sourceTree = "<group>"; };
84F6B7530C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ChannelRemappingAudioSource.h; sourceTree = "<group>"; };
84F703220E1E56FB00EB338A /* juce_mac_FileChooser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_FileChooser.mm; sourceTree = "<group>"; };
84F7A7AD0A8383A100D36246 /* juce_ToolbarButton.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ToolbarButton.cpp; sourceTree = "<group>"; };
84F7A7AE0A8383A100D36246 /* juce_ToolbarButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ToolbarButton.h; sourceTree = "<group>"; };
84F7A7B10A8383C200D36246 /* juce_Toolbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_Toolbar.cpp; sourceTree = "<group>"; };
@@ -1124,6 +1143,7 @@
84F7A7C00A8383E000D36246 /* juce_MultiTimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_MultiTimer.h; sourceTree = "<group>"; };
84F7A7ED0A838CC900D36246 /* juce_ComponentAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ComponentAnimator.cpp; sourceTree = "<group>"; };
84F7A7EE0A838CC900D36246 /* juce_ComponentAnimator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ComponentAnimator.h; sourceTree = "<group>"; };
84F8B60C0EB5B9230020D98D /* juce_mac_NativeIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_mac_NativeIncludes.h; sourceTree = "<group>"; };
84F8DACE099C963A00E911ED /* juce_ComponentPeer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ComponentPeer.cpp; sourceTree = "<group>"; };
84F8DACF099C963A00E911ED /* juce_ComponentPeer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ComponentPeer.h; sourceTree = "<group>"; };
84FC318709B749FD00B75141 /* juce_FileBasedDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_FileBasedDocument.cpp; path = documents/juce_FileBasedDocument.cpp; sourceTree = "<group>"; };
@@ -1157,7 +1177,7 @@
84FED3C80CAA96DA00003997 /* juce_FileDragAndDropTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_FileDragAndDropTarget.h; sourceTree = "<group>"; };
84FFAF290C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_FileSearchPathListComponent.cpp; path = filebrowser/juce_FileSearchPathListComponent.cpp; sourceTree = "<group>"; };
84FFAF2A0C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_FileSearchPathListComponent.h; path = filebrowser/juce_FileSearchPathListComponent.h; sourceTree = "<group>"; };
D2AAC046055464E500DB518D /* libjuce.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjuce.a; sourceTree = BUILT_PRODUCTS_DIR; };
D2AAC046055464E500DB518D /* libjucedebug.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjucedebug.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -1177,7 +1197,6 @@
08FB7795FE84155DC02AAC07 /* Source */,
8456EC6508A2A6C80087C412 /* juce_Config.h */,
840F80BB092B399D005E7B4E /* juce.h */,
842B64EA09D87B7900255DC7 /* juce.xcconfig */,
8456EC6908A2A6F00087C412 /* JUCE changelist.txt */,
1AB674ADFE9D54B511CA2CBB /* Products */,
);
@@ -1197,7 +1216,7 @@
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
D2AAC046055464E500DB518D /* libjuce.a */,
D2AAC046055464E500DB518D /* libjucedebug.a */,
);
name = Products;
sourceTree = "<group>";
@@ -1254,11 +1273,12 @@
841B22CD0D2E7FE3009D01AA /* formats */ = {
isa = PBXGroup;
children = (
841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.cpp */,
841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.mm */,
841B22CF0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.h */,
841B22D00D2E7FE3009D01AA /* juce_DirectXPluginFormat.h */,
841B22D10D2E7FE3009D01AA /* juce_LADSPAPluginFormat.h */,
841B22D20D2E7FE3009D01AA /* juce_VSTPluginFormat.cpp */,
84CA4AFA0E9BF9EC004CCC0E /* juce_VSTPluginFormat.cpp */,
84CA4AF30E9BF8B6004CCC0E /* juce_VSTPluginFormat.mm */,
841B22D30D2E7FE3009D01AA /* juce_VSTPluginFormat.h */,
);
path = formats;
@@ -1320,21 +1340,31 @@
84A4881C08A22E2400752A2B /* mac specific code */ = {
isa = PBXGroup;
children = (
84F596FF0E23DDBB00E92E85 /* juce_mac_NativeHeaders.h */,
8463D31F0E1FC25A003B46B2 /* juce_mac_Fonts.mm */,
8463D3200E1FC25A003B46B2 /* juce_mac_Messaging.mm */,
8463D3210E1FC25A003B46B2 /* juce_mac_Windowing.mm */,
84CE8A400DC5D7D600799A0E /* juce_mac_AudioCDBurner.mm */,
84A4881E08A22E2400752A2B /* juce_mac_CoreAudio.cpp */,
84A4881F08A22E2400752A2B /* juce_mac_CoreMidi.cpp */,
84F703220E1E56FB00EB338A /* juce_mac_FileChooser.mm */,
84A4882108A22E2400752A2B /* juce_mac_Files.cpp */,
84022DFB0DAE4CB9004CF59A /* juce_mac_HTTPStream.h */,
84A06BE209CADB06006A43BD /* juce_mac_NamedPipe.cpp */,
847D06460DD88D1100DF6A61 /* juce_mac_Network.mm */,
84BE9E1B0DE56DEB00AB8F23 /* juce_mac_SystemStats.mm */,
84A4882608A22E2400752A2B /* juce_mac_Threads.cpp */,
848A560A0DDDD3E40041C706 /* juce_mac_WebBrowserComponent.mm */,
84E024DB0E94028C003E41AF /* juce_mac_AppleRemote.mm */,
84E024DC0E94028C003E41AF /* juce_mac_AudioCDBurner.mm */,
84E024DD0E94028C003E41AF /* juce_mac_CoreAudio.cpp */,
84E024DE0E94028C003E41AF /* juce_mac_CoreMidi.cpp */,
8435DA410E95527D008FBD1C /* juce_mac_Debugging.mm */,
84E024DF0E94028C003E41AF /* juce_mac_FileChooser.mm */,
84E024E00E94028C003E41AF /* juce_mac_Files.mm */,
84E024E10E94028C003E41AF /* juce_mac_Fonts.mm */,
84E024E20E94028C003E41AF /* juce_mac_MainMenu.mm */,
84E024E30E94028C003E41AF /* juce_mac_MessageManager.mm */,
8435D9640E940A3E008FBD1C /* juce_mac_MiscUtilities.mm */,
84E024E40E94028C003E41AF /* juce_mac_MouseCursor.mm */,
84E024E50E94028C003E41AF /* juce_mac_NamedPipe.cpp */,
84E024E60E94028C003E41AF /* juce_mac_NativeCode.mm */,
84F8B60C0EB5B9230020D98D /* juce_mac_NativeIncludes.h */,
84E024E80E94028C003E41AF /* juce_mac_Network.mm */,
84E024E90E94028C003E41AF /* juce_mac_NSViewComponent.mm */,
84E024EA0E94028C003E41AF /* juce_mac_NSViewComponentPeer.mm */,
84E024EB0E94028C003E41AF /* juce_mac_OpenGLComponent.mm */,
84E024EC0E94028C003E41AF /* juce_mac_QuickTimeMovieComponent.mm */,
8435D90C0E9406D2008FBD1C /* juce_mac_Strings.mm */,
84E024ED0E94028C003E41AF /* juce_mac_SystemStats.mm */,
84E024EE0E94028C003E41AF /* juce_mac_Threads.mm */,
84E024EF0E94028C003E41AF /* juce_mac_WebBrowserComponent.mm */,
84E024F00E94028C003E41AF /* juce_posix_SharedCode.h */,
);
name = "mac specific code";
path = platform_specific_code;
@@ -1694,8 +1724,6 @@
84A488DF08A22E4900752A2B /* special */ = {
isa = PBXGroup;
children = (
84F1F0630A36CF31008CCC5E /* juce_MagnifierComponent.cpp */,
84F1F0640A36CF31008CCC5E /* juce_MagnifierComponent.h */,
84198BB3096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.cpp */,
84198BB4096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.h */,
84A488E008A22E4900752A2B /* juce_BubbleComponent.cpp */,
@@ -1706,13 +1734,15 @@
84A488E508A22E4900752A2B /* juce_ColourSelector.h */,
84A488E608A22E4900752A2B /* juce_DropShadower.cpp */,
84A488E708A22E4900752A2B /* juce_DropShadower.h */,
84F1F0630A36CF31008CCC5E /* juce_MagnifierComponent.cpp */,
84F1F0640A36CF31008CCC5E /* juce_MagnifierComponent.h */,
84F1B8D809499F1400AD8EDE /* juce_MidiKeyboardComponent.cpp */,
84F1B8D909499F1400AD8EDE /* juce_MidiKeyboardComponent.h */,
8457783D0E8947C8006D9E4E /* juce_NSViewComponent.h */,
84A488E808A22E4900752A2B /* juce_OpenGLComponent.cpp */,
84A488E908A22E4900752A2B /* juce_OpenGLComponent.h */,
84A488EA08A22E4900752A2B /* juce_PreferencesPanel.cpp */,
84A488EB08A22E4900752A2B /* juce_PreferencesPanel.h */,
84A488EC08A22E4900752A2B /* juce_QuickTimeMovieComponent.cpp */,
84A488ED08A22E4900752A2B /* juce_QuickTimeMovieComponent.h */,
848A560D0DDDD3FB0041C706 /* juce_WebBrowserComponent.h */,
);
@@ -2510,11 +2540,12 @@
8495BB950D806BDA001D9C0B /* juce_FileInputSource.h in Headers */,
8495BB960D806BDA001D9C0B /* juce_InputSource.h in Headers */,
84581EEB0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h in Headers */,
84022DFD0DAE4CB9004CF59A /* juce_mac_HTTPStream.h in Headers */,
848A560E0DDDD3FB0041C706 /* juce_WebBrowserComponent.h in Headers */,
84688AFC0DED58820077FDEA /* juce_AudioProcessorGraph.h in Headers */,
84688AFE0DED58820077FDEA /* juce_AudioProcessorPlayer.h in Headers */,
84F597000E23DDBB00E92E85 /* juce_mac_NativeHeaders.h in Headers */,
8457783E0E8947C8006D9E4E /* juce_NSViewComponent.h in Headers */,
84E025060E94028C003E41AF /* juce_posix_SharedCode.h in Headers */,
84F8B60D0EB5B9230020D98D /* juce_mac_NativeIncludes.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2535,7 +2566,7 @@
);
name = Juce;
productName = Juce;
productReference = D2AAC046055464E500DB518D /* libjuce.a */;
productReference = D2AAC046055464E500DB518D /* libjucedebug.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
@@ -2560,10 +2591,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
84A4882908A22E2400752A2B /* juce_mac_CoreAudio.cpp in Sources */,
84A4882A08A22E2400752A2B /* juce_mac_CoreMidi.cpp in Sources */,
84A4882C08A22E2400752A2B /* juce_mac_Files.cpp in Sources */,
84A4883108A22E2400752A2B /* juce_mac_Threads.cpp in Sources */,
84A48A2808A22E4B00752A2B /* juce_Application.cpp in Sources */,
84A48A2A08A22E4B00752A2B /* juce_DeletedAtShutdown.cpp in Sources */,
84A48A2E08A22E4B00752A2B /* juce_AiffAudioFormat.cpp in Sources */,
@@ -2634,7 +2661,6 @@
84A48ACB08A22E4B00752A2B /* juce_DropShadower.cpp in Sources */,
84A48ACD08A22E4B00752A2B /* juce_OpenGLComponent.cpp in Sources */,
84A48ACF08A22E4B00752A2B /* juce_PreferencesPanel.cpp in Sources */,
84A48AD108A22E4B00752A2B /* juce_QuickTimeMovieComponent.cpp in Sources */,
84A48AD308A22E4B00752A2B /* juce_AlertWindow.cpp in Sources */,
84A48AD508A22E4B00752A2B /* juce_DialogWindow.cpp in Sources */,
84A48ADB08A22E4B00752A2B /* juce_ResizableWindow.cpp in Sources */,
@@ -2752,7 +2778,6 @@
84F5598809CACFF700AC5000 /* juce_NamedPipe.cpp in Sources */,
84A06BAD09CAD6A3006A43BD /* juce_AudioIODevice.cpp in Sources */,
84A06BAE09CAD6A3006A43BD /* juce_AudioIODeviceType.cpp in Sources */,
84A06BE309CADB06006A43BD /* juce_mac_NamedPipe.cpp in Sources */,
846034DE09CB374E00E255CF /* juce_InterprocessConnection.cpp in Sources */,
846034E009CB374E00E255CF /* juce_InterprocessConnectionServer.cpp in Sources */,
842B63BA09D8508F00255DC7 /* juce_FlacAudioFormat.cpp in Sources */,
@@ -2802,8 +2827,7 @@
84BC4E2A0C8DD38C00FA249B /* juce_AudioProcessor.cpp in Sources */,
84BC4E2C0C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp in Sources */,
84BC4E2F0C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp in Sources */,
841B22E20D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.cpp in Sources */,
841B22E60D2E7FE3009D01AA /* juce_VSTPluginFormat.cpp in Sources */,
841B22E20D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.mm in Sources */,
841B22E80D2E7FE3009D01AA /* juce_AudioPluginFormat.cpp in Sources */,
841B22EA0D2E7FE3009D01AA /* juce_AudioPluginFormatManager.cpp in Sources */,
841B22EC0D2E7FE3009D01AA /* juce_AudioPluginInstance.cpp in Sources */,
@@ -2815,16 +2839,32 @@
8495BB8E0D8067B2001D9C0B /* juce_AudioThumbnailCache.cpp in Sources */,
8495BB940D806BDA001D9C0B /* juce_FileInputSource.cpp in Sources */,
84581EEA0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp in Sources */,
84CE8A410DC5D7D600799A0E /* juce_mac_AudioCDBurner.mm in Sources */,
847D06470DD88D1100DF6A61 /* juce_mac_Network.mm in Sources */,
848A560B0DDDD3E40041C706 /* juce_mac_WebBrowserComponent.mm in Sources */,
84BE9E1C0DE56DEB00AB8F23 /* juce_mac_SystemStats.mm in Sources */,
84688AFB0DED58820077FDEA /* juce_AudioProcessorGraph.cpp in Sources */,
84688AFD0DED58820077FDEA /* juce_AudioProcessorPlayer.cpp in Sources */,
84F703230E1E56FB00EB338A /* juce_mac_FileChooser.mm in Sources */,
8463D3220E1FC25A003B46B2 /* juce_mac_Fonts.mm in Sources */,
8463D3230E1FC25A003B46B2 /* juce_mac_Messaging.mm in Sources */,
8463D3240E1FC25A003B46B2 /* juce_mac_Windowing.mm in Sources */,
84E024F10E94028C003E41AF /* juce_mac_AppleRemote.mm in Sources */,
84E024F20E94028C003E41AF /* juce_mac_AudioCDBurner.mm in Sources */,
84E024F30E94028C003E41AF /* juce_mac_CoreAudio.cpp in Sources */,
84E024F40E94028C003E41AF /* juce_mac_CoreMidi.cpp in Sources */,
84E024F50E94028C003E41AF /* juce_mac_FileChooser.mm in Sources */,
84E024F60E94028C003E41AF /* juce_mac_Files.mm in Sources */,
84E024F70E94028C003E41AF /* juce_mac_Fonts.mm in Sources */,
84E024F80E94028C003E41AF /* juce_mac_MainMenu.mm in Sources */,
84E024F90E94028C003E41AF /* juce_mac_MessageManager.mm in Sources */,
84E024FA0E94028C003E41AF /* juce_mac_MouseCursor.mm in Sources */,
84E024FB0E94028C003E41AF /* juce_mac_NamedPipe.cpp in Sources */,
84E024FC0E94028C003E41AF /* juce_mac_NativeCode.mm in Sources */,
84E024FE0E94028C003E41AF /* juce_mac_Network.mm in Sources */,
84E024FF0E94028C003E41AF /* juce_mac_NSViewComponent.mm in Sources */,
84E025000E94028C003E41AF /* juce_mac_NSViewComponentPeer.mm in Sources */,
84E025010E94028C003E41AF /* juce_mac_OpenGLComponent.mm in Sources */,
84E025020E94028C003E41AF /* juce_mac_QuickTimeMovieComponent.mm in Sources */,
84E025030E94028C003E41AF /* juce_mac_SystemStats.mm in Sources */,
84E025040E94028C003E41AF /* juce_mac_Threads.mm in Sources */,
84E025050E94028C003E41AF /* juce_mac_WebBrowserComponent.mm in Sources */,
8435D90D0E9406D2008FBD1C /* juce_mac_Strings.mm in Sources */,
8435D9650E940A3E008FBD1C /* juce_mac_MiscUtilities.mm in Sources */,
8435DA420E95527D008FBD1C /* juce_mac_Debugging.mm in Sources */,
84CA4AF40E9BF8B6004CCC0E /* juce_VSTPluginFormat.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2834,25 +2874,32 @@
84A487F808A22DD800752A2B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
};
name = Debug;
};
84A487F908A22DD800752A2B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
STRIP_STYLE = "non-global";
};
name = Release;
};
84A487FC08A22DD800752A2B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 842B64EA09D87B7900255DC7 /* juce.xcconfig */;
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
COPY_PHASE_STRIP = NO;
DEPLOYMENT_LOCATION = YES;
DSTROOT = ../../bin;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"_DEBUG=1",
@@ -2869,13 +2916,11 @@
};
84A487FD08A22DD800752A2B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 842B64EA09D87B7900255DC7 /* juce.xcconfig */;
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
DEPLOYMENT_LOCATION = YES;
DSTROOT = ../../bin;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
GCC_PREPROCESSOR_DEFINITIONS = (
"_NDEBUG=1",
"NDEBUG=1",


+ 14
- 14
build/macosx/juce.xcconfig View File

@@ -1,14 +1,14 @@
ARCHS = i386 ppc
// These settings let you build for compatibility with 10.3 onwards.
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3
MACOSX_DEPLOYMENT_TARGET = 10.4
// In XCode 3, this is the best SDK to use..
SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk
// (if you're building in XCode 2.5, you might need to use this line
// instead of the 10.5 line above..)
//SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk
ARCHS = i386 ppc
// These settings let you build for compatibility with 10.3 onwards.
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3
MACOSX_DEPLOYMENT_TARGET = 10.4
// In XCode 3, this is the best SDK to use..
SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk
// (if you're building in XCode 2.5, you might need to use this line
// instead of the 10.5 line above..)
//SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk

+ 278
- 0
build/macosx/platform_specific_code/juce_mac_AppleRemote.mm View File

@@ -0,0 +1,278 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
AppleRemoteDevice::AppleRemoteDevice()
: device (0),
queue (0),
remoteId (0)
{
}
AppleRemoteDevice::~AppleRemoteDevice()
{
stop();
}
static io_object_t getAppleRemoteDevice() throw()
{
CFMutableDictionaryRef dict = IOServiceMatching ("AppleIRController");
io_iterator_t iter = 0;
io_object_t iod = 0;
if (IOServiceGetMatchingServices (kIOMasterPortDefault, dict, &iter) == kIOReturnSuccess
&& iter != 0)
{
iod = IOIteratorNext (iter);
}
IOObjectRelease (iter);
return iod;
}
static bool createAppleRemoteInterface (io_object_t iod, void** device) throw()
{
jassert (*device == 0);
io_name_t classname;
if (IOObjectGetClass (iod, classname) == kIOReturnSuccess)
{
IOCFPlugInInterface** cfPlugInInterface = 0;
SInt32 score = 0;
if (IOCreatePlugInInterfaceForService (iod,
kIOHIDDeviceUserClientTypeID,
kIOCFPlugInInterfaceID,
&cfPlugInInterface,
&score) == kIOReturnSuccess)
{
HRESULT hr = (*cfPlugInInterface)->QueryInterface (cfPlugInInterface,
CFUUIDGetUUIDBytes (kIOHIDDeviceInterfaceID),
device);
(void) hr;
(*cfPlugInInterface)->Release (cfPlugInInterface);
}
}
return *device != 0;
}
bool AppleRemoteDevice::start (const bool inExclusiveMode) throw()
{
if (queue != 0)
return true;
stop();
bool result = false;
io_object_t iod = getAppleRemoteDevice();
if (iod != 0)
{
if (createAppleRemoteInterface (iod, &device) && open (inExclusiveMode))
result = true;
else
stop();
IOObjectRelease (iod);
}
return result;
}
void AppleRemoteDevice::stop() throw()
{
if (queue != 0)
{
(*(IOHIDQueueInterface**) queue)->stop ((IOHIDQueueInterface**) queue);
(*(IOHIDQueueInterface**) queue)->dispose ((IOHIDQueueInterface**) queue);
(*(IOHIDQueueInterface**) queue)->Release ((IOHIDQueueInterface**) queue);
queue = 0;
}
if (device != 0)
{
(*(IOHIDDeviceInterface**) device)->close ((IOHIDDeviceInterface**) device);
(*(IOHIDDeviceInterface**) device)->Release ((IOHIDDeviceInterface**) device);
device = 0;
}
}
bool AppleRemoteDevice::isActive() const throw()
{
return queue != 0;
}
static void appleRemoteQueueCallback (void* const target, const IOReturn result, void*, void*)
{
if (result == kIOReturnSuccess)
((AppleRemoteDevice*) target)->handleCallbackInternal();
}
bool AppleRemoteDevice::open (const bool openInExclusiveMode) throw()
{
#if ! MACOS_10_2_OR_EARLIER
Array <int> cookies;
CFArrayRef elements;
IOHIDDeviceInterface122** const device122 = (IOHIDDeviceInterface122**) device;
if ((*device122)->copyMatchingElements (device122, 0, &elements) != kIOReturnSuccess)
return false;
for (int i = 0; i < CFArrayGetCount (elements); ++i)
{
CFDictionaryRef element = (CFDictionaryRef) CFArrayGetValueAtIndex (elements, i);
// get the cookie
CFTypeRef object = CFDictionaryGetValue (element, CFSTR (kIOHIDElementCookieKey));
if (object == 0 || CFGetTypeID (object) != CFNumberGetTypeID())
continue;
long number;
if (! CFNumberGetValue ((CFNumberRef) object, kCFNumberLongType, &number))
continue;
cookies.add ((int) number);
}
CFRelease (elements);
if ((*(IOHIDDeviceInterface**) device)
->open ((IOHIDDeviceInterface**) device,
openInExclusiveMode ? kIOHIDOptionsTypeSeizeDevice
: kIOHIDOptionsTypeNone) == KERN_SUCCESS)
{
queue = (*(IOHIDDeviceInterface**) device)->allocQueue ((IOHIDDeviceInterface**) device);
if (queue != 0)
{
(*(IOHIDQueueInterface**) queue)->create ((IOHIDQueueInterface**) queue, 0, 12);
for (int i = 0; i < cookies.size(); ++i)
{
IOHIDElementCookie cookie = (IOHIDElementCookie) cookies.getUnchecked(i);
(*(IOHIDQueueInterface**) queue)->addElement ((IOHIDQueueInterface**) queue, cookie, 0);
}
CFRunLoopSourceRef eventSource;
if ((*(IOHIDQueueInterface**) queue)
->createAsyncEventSource ((IOHIDQueueInterface**) queue, &eventSource) == KERN_SUCCESS)
{
if ((*(IOHIDQueueInterface**) queue)->setEventCallout ((IOHIDQueueInterface**) queue,
appleRemoteQueueCallback, this, 0) == KERN_SUCCESS)
{
CFRunLoopAddSource (CFRunLoopGetCurrent(), eventSource, kCFRunLoopDefaultMode);
(*(IOHIDQueueInterface**) queue)->start ((IOHIDQueueInterface**) queue);
return true;
}
}
}
}
#endif
return false;
}
void AppleRemoteDevice::handleCallbackInternal()
{
#if ! MACOS_10_2_OR_EARLIER
int totalValues = 0;
AbsoluteTime nullTime = { 0, 0 };
char cookies [12];
int numCookies = 0;
while (numCookies < numElementsInArray (cookies))
{
IOHIDEventStruct e;
if ((*(IOHIDQueueInterface**) queue)->getNextEvent ((IOHIDQueueInterface**) queue, &e, nullTime, 0) != kIOReturnSuccess)
break;
if ((int) e.elementCookie == 19)
{
remoteId = e.value;
buttonPressed (switched, false);
}
else
{
totalValues += e.value;
cookies [numCookies++] = (char) (pointer_sized_int) e.elementCookie;
}
}
cookies [numCookies++] = 0;
//DBG (String::toHexString ((uint8*) cookies, numCookies, 1) + " " + String (totalValues));
static const char buttonPatterns[] =
{
0x1f, 0x14, 0x12, 0x1f, 0x14, 0x12, 0,
0x1f, 0x15, 0x12, 0x1f, 0x15, 0x12, 0,
0x1f, 0x1d, 0x1c, 0x12, 0,
0x1f, 0x1e, 0x1c, 0x12, 0,
0x1f, 0x16, 0x12, 0x1f, 0x16, 0x12, 0,
0x1f, 0x17, 0x12, 0x1f, 0x17, 0x12, 0,
0x1f, 0x12, 0x04, 0x02, 0,
0x1f, 0x12, 0x03, 0x02, 0,
0x1f, 0x12, 0x1f, 0x12, 0,
0x23, 0x1f, 0x12, 0x23, 0x1f, 0x12, 0,
19, 0
};
int buttonNum = (int) menuButton;
int i = 0;
while (i < numElementsInArray (buttonPatterns))
{
if (strcmp (cookies, buttonPatterns + i) == 0)
{
buttonPressed ((ButtonType) buttonNum, totalValues > 0);
break;
}
i += strlen (buttonPatterns + i) + 1;
++buttonNum;
}
#endif
}
#endif

+ 432
- 448
build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm View File

@@ -1,448 +1,432 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

#include "juce_mac_NativeHeaders.h"

#if JUCE_USE_CDBURNER

#import <DiscRecording/DiscRecording.h>

BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/audio/audio_file_formats/juce_AudioCDBurner.h"
#include "../../../src/juce_appframework/audio/audio_sources/juce_AudioSource.h"
#include "../../../src/juce_appframework/audio/dsp/juce_AudioDataConverters.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
END_JUCE_NAMESPACE


//==============================================================================
@interface OpenDiskDevice : NSObject
{
DRDevice* device;

NSMutableArray* tracks;
}

- (OpenDiskDevice*) initWithDevice: (DRDevice*) device;
- (void) dealloc;
- (bool) isDiskPresent;
- (int) getNumAvailableAudioBlocks;
- (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) numSamples_;
- (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error
ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting;
@end

//==============================================================================
@interface AudioTrackProducer : NSObject
{
JUCE_NAMESPACE::AudioSource* source;
int readPosition, lengthInFrames;
}

- (AudioTrackProducer*) init: (int) lengthInFrames;
- (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) lengthInSamples;
- (void) dealloc;
- (void) setupTrackProperties: (DRTrack*) track;

- (void) cleanupTrackAfterBurn: (DRTrack*) track;
- (BOOL) cleanupTrackAfterVerification:(DRTrack*)track;
- (uint64_t) estimateLengthOfTrack:(DRTrack*)track;
- (BOOL) prepareTrack:(DRTrack*)track forBurn:(DRBurn*)burn
toMedia:(NSDictionary*)mediaInfo;
- (BOOL) prepareTrackForVerification:(DRTrack*)track;
- (uint32_t) produceDataForTrack:(DRTrack*)track intoBuffer:(char*)buffer
length:(uint32_t)bufferLength atAddress:(uint64_t)address
blockSize:(uint32_t)blockSize ioFlags:(uint32_t*)flags;
- (uint32_t) producePreGapForTrack:(DRTrack*)track
intoBuffer:(char*)buffer length:(uint32_t)bufferLength
atAddress:(uint64_t)address blockSize:(uint32_t)blockSize
ioFlags:(uint32_t*)flags;
- (BOOL) verifyDataForTrack:(DRTrack*)track inBuffer:(const char*)buffer
length:(uint32_t)bufferLength atAddress:(uint64_t)address
blockSize:(uint32_t)blockSize ioFlags:(uint32_t*)flags;
- (uint32_t) producePreGapForTrack:(DRTrack*)track
intoBuffer:(char*)buffer length:(uint32_t)bufferLength
atAddress:(uint64_t)address blockSize:(uint32_t)blockSize
ioFlags:(uint32_t*)flags;
@end

//==============================================================================
@implementation OpenDiskDevice

- (OpenDiskDevice*) initWithDevice: (DRDevice*) device_
{
[super init];

device = device_;
tracks = [[NSMutableArray alloc] init];
return self;
}

- (void) dealloc
{
[tracks release];
[super dealloc];
}

- (bool) isDiskPresent
{
return [device isValid]
&& [[[device status] objectForKey: DRDeviceMediaStateKey]
isEqualTo: DRDeviceMediaStateMediaPresent];
}

- (int) getNumAvailableAudioBlocks
{
return [[[[device status] objectForKey: DRDeviceMediaInfoKey]
objectForKey: DRDeviceMediaBlocksFreeKey] intValue];
}

- (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) numSamples_
{
AudioTrackProducer* p = [[AudioTrackProducer alloc] initWithAudioSource: source_ numSamples: numSamples_];
DRTrack* t = [[DRTrack alloc] initWithProducer: p];
[p setupTrackProperties: t];

[tracks addObject: t];

[t release];
[p release];
}

- (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error
ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting
{
DRBurn* burn = [DRBurn burnForDevice: device];

if (! [device acquireExclusiveAccess])
{
*error = "Couldn't open or write to the CD device";
return;
}

[device acquireMediaReservation];

NSMutableDictionary* d = [[burn properties] mutableCopy];
[d autorelease];
[d setObject: [NSNumber numberWithBool: peformFakeBurnForTesting] forKey: DRBurnTestingKey];
[d setObject: [NSNumber numberWithBool: false] forKey: DRBurnVerifyDiscKey];
[d setObject: (shouldEject ? DRBurnCompletionActionEject : DRBurnCompletionActionMount)
forKey: DRBurnCompletionActionKey];
[burn setProperties: d];

[burn writeLayout: tracks];

for (;;)
{
JUCE_NAMESPACE::Thread::sleep (300);
float progress = [[[burn status] objectForKey: DRStatusPercentCompleteKey] floatValue];

NSLog ([[burn status] description]);

if (listener != 0 && listener->audioCDBurnProgress (progress))
{
[burn abort];
*error = "User cancelled the write operation";
break;
}

if ([[[burn status] objectForKey: DRStatusStateKey] isEqualTo: DRStatusStateFailed])
{
*error = "Write operation failed";
break;
}
else if ([[[burn status] objectForKey: DRStatusStateKey] isEqualTo: DRStatusStateDone])
{
break;
}

NSString* err = (NSString*) [[[burn status] objectForKey: DRErrorStatusKey]
objectForKey: DRErrorStatusErrorStringKey];

if ([err length] > 0)
{
*error = JUCE_NAMESPACE::String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [err UTF8String]);
break;
}
}

[device releaseMediaReservation];
[device releaseExclusiveAccess];
}
@end

//==============================================================================
@implementation AudioTrackProducer

- (AudioTrackProducer*) init: (int) lengthInFrames_
{
lengthInFrames = lengthInFrames_;
readPosition = 0;
return self;
}

- (void) setupTrackProperties: (DRTrack*) track
{
NSMutableDictionary* p = [[track properties] mutableCopy];
[p setObject:[DRMSF msfWithFrames: lengthInFrames] forKey: DRTrackLengthKey];
[p setObject:[NSNumber numberWithUnsignedShort:2352] forKey: DRBlockSizeKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRDataFormKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRBlockTypeKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRTrackModeKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRSessionFormatKey];

[track setProperties: p];
[p release];
}

- (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) lengthInSamples
{
AudioTrackProducer* s = [self init: (lengthInSamples + 587) / 588];

if (s != nil)
s->source = source_;

return s;
}

- (void) dealloc
{
if (source != 0)
{
source->releaseResources();
delete source;
}

[super dealloc];
}

- (void) cleanupTrackAfterBurn: (DRTrack*) track
{
}

- (BOOL) cleanupTrackAfterVerification:(DRTrack*)track
{
return true;
}

- (uint64_t) estimateLengthOfTrack:(DRTrack*)track
{
return lengthInFrames;
}

- (BOOL) prepareTrack:(DRTrack*)track forBurn:(DRBurn*)burn
toMedia:(NSDictionary*)mediaInfo
{
if (source != 0)
source->prepareToPlay (44100 / 75, 44100);

readPosition = 0;
return true;
}

- (BOOL) prepareTrackForVerification:(DRTrack*)track
{
if (source != 0)
source->prepareToPlay (44100 / 75, 44100);

return true;
}

- (uint32_t) produceDataForTrack:(DRTrack*)track intoBuffer:(char*)buffer
length:(uint32_t)bufferLength atAddress:(uint64_t)address
blockSize:(uint32_t)blockSize ioFlags:(uint32_t*)flags
{
if (source != 0)
{
const int numSamples = JUCE_NAMESPACE::jmin (bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition);

if (numSamples > 0)
{
JUCE_NAMESPACE::AudioSampleBuffer tempBuffer (2, numSamples);

JUCE_NAMESPACE::AudioSourceChannelInfo info;
info.buffer = &tempBuffer;
info.startSample = 0;
info.numSamples = numSamples;

source->getNextAudioBlock (info);

JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (0),
buffer, numSamples, 4);
JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (1),
buffer + 2, numSamples, 4);

readPosition += numSamples;
}

return numSamples * 4;
}

return 0;
}

- (uint32_t) producePreGapForTrack:(DRTrack*)track
intoBuffer:(char*)buffer length:(uint32_t)bufferLength
atAddress:(uint64_t)address blockSize:(uint32_t)blockSize
ioFlags:(uint32_t*)flags
{
zeromem (buffer, bufferLength);
return bufferLength;
}

- (BOOL) verifyDataForTrack:(DRTrack*)track inBuffer:(const char*)buffer
length:(uint32_t)bufferLength atAddress:(uint64_t)address
blockSize:(uint32_t)blockSize ioFlags:(uint32_t*)flags
{
return true;
}

@end


BEGIN_JUCE_NAMESPACE

//==============================================================================
AudioCDBurner::AudioCDBurner (const int deviceIndex)
: internal (0)
{
const AutoPool pool;
OpenDiskDevice* dev = [[OpenDiskDevice alloc] initWithDevice: [[DRDevice devices] objectAtIndex: deviceIndex]];

internal = (void*) dev;
}

AudioCDBurner::~AudioCDBurner()
{
const AutoPool pool;
OpenDiskDevice* dev = (OpenDiskDevice*) internal;

if (dev != 0)
[dev release];
}

AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex)
{
const AutoPool pool;
AudioCDBurner* b = new AudioCDBurner (deviceIndex);

if (b->internal == 0)
deleteAndZero (b);

return b;
}

static NSArray* findDiskBurnerDevices()
{
NSMutableArray* results = [NSMutableArray array];
NSArray* devs = [DRDevice devices];

if (devs != 0)
{
int num = [devs count];
int i;
for (i = 0; i < num; ++i)
{
NSDictionary* dic = [[devs objectAtIndex: i] info];
NSString* name = [dic valueForKey: DRDeviceProductNameKey];
if (name != nil)
[results addObject: name];
}
}

return results;
}

const StringArray AudioCDBurner::findAvailableDevices()
{
const AutoPool pool;
NSArray* names = findDiskBurnerDevices();
StringArray s;

for (int i = 0; i < [names count]; ++i)
s.add (String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [[names objectAtIndex: i] UTF8String]));

return s;
}

bool AudioCDBurner::isDiskPresent() const
{
OpenDiskDevice* dev = (OpenDiskDevice*) internal;

return dev != 0 && [dev isDiskPresent];
}

int AudioCDBurner::getNumAvailableAudioBlocks() const
{
OpenDiskDevice* dev = (OpenDiskDevice*) internal;

return [dev getNumAvailableAudioBlocks];
}

bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps)
{
const AutoPool pool;
OpenDiskDevice* dev = (OpenDiskDevice*) internal;

if (dev != 0)
{
[dev addSourceTrack: source numSamples: numSamps];
return true;
}

return false;
}

const String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener* listener,
const bool ejectDiscAfterwards,
const bool peformFakeBurnForTesting)
{
const AutoPool pool;
JUCE_NAMESPACE::String error ("Couldn't open or write to the CD device");

OpenDiskDevice* dev = (OpenDiskDevice*) internal;

if (dev != 0)
{
error = JUCE_NAMESPACE::String::empty;
[dev burn: listener
errorString: &error
ejectAfterwards: ejectDiscAfterwards
isFake: peformFakeBurnForTesting];
}

return error;
}

END_JUCE_NAMESPACE

#endif
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_USE_CDBURNER
//==============================================================================
END_JUCE_NAMESPACE
@interface OpenDiskDevice : NSObject
{
DRDevice* device;
NSMutableArray* tracks;
}
- (OpenDiskDevice*) initWithDevice: (DRDevice*) device;
- (void) dealloc;
- (bool) isDiskPresent;
- (int) getNumAvailableAudioBlocks;
- (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) numSamples_;
- (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error
ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting;
@end
//==============================================================================
@interface AudioTrackProducer : NSObject
{
JUCE_NAMESPACE::AudioSource* source;
int readPosition, lengthInFrames;
}
- (AudioTrackProducer*) init: (int) lengthInFrames;
- (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) lengthInSamples;
- (void) dealloc;
- (void) setupTrackProperties: (DRTrack*) track;
- (void) cleanupTrackAfterBurn: (DRTrack*) track;
- (BOOL) cleanupTrackAfterVerification:(DRTrack*)track;
- (uint64_t) estimateLengthOfTrack:(DRTrack*)track;
- (BOOL) prepareTrack:(DRTrack*)track forBurn:(DRBurn*)burn
toMedia:(NSDictionary*)mediaInfo;
- (BOOL) prepareTrackForVerification:(DRTrack*)track;
- (uint32_t) produceDataForTrack:(DRTrack*)track intoBuffer:(char*)buffer
length:(uint32_t)bufferLength atAddress:(uint64_t)address
blockSize:(uint32_t)blockSize ioFlags:(uint32_t*)flags;
- (uint32_t) producePreGapForTrack:(DRTrack*)track
intoBuffer:(char*)buffer length:(uint32_t)bufferLength
atAddress:(uint64_t)address blockSize:(uint32_t)blockSize
ioFlags:(uint32_t*)flags;
- (BOOL) verifyDataForTrack:(DRTrack*)track inBuffer:(const char*)buffer
length:(uint32_t)bufferLength atAddress:(uint64_t)address
blockSize:(uint32_t)blockSize ioFlags:(uint32_t*)flags;
- (uint32_t) producePreGapForTrack:(DRTrack*)track
intoBuffer:(char*)buffer length:(uint32_t)bufferLength
atAddress:(uint64_t)address blockSize:(uint32_t)blockSize
ioFlags:(uint32_t*)flags;
@end
//==============================================================================
@implementation OpenDiskDevice
- (OpenDiskDevice*) initWithDevice: (DRDevice*) device_
{
[super init];
device = device_;
tracks = [[NSMutableArray alloc] init];
return self;
}
- (void) dealloc
{
[tracks release];
[super dealloc];
}
- (bool) isDiskPresent
{
return [device isValid]
&& [[[device status] objectForKey: DRDeviceMediaStateKey]
isEqualTo: DRDeviceMediaStateMediaPresent];
}
- (int) getNumAvailableAudioBlocks
{
return [[[[device status] objectForKey: DRDeviceMediaInfoKey]
objectForKey: DRDeviceMediaBlocksFreeKey] intValue];
}
- (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) numSamples_
{
AudioTrackProducer* p = [[AudioTrackProducer alloc] initWithAudioSource: source_ numSamples: numSamples_];
DRTrack* t = [[DRTrack alloc] initWithProducer: p];
[p setupTrackProperties: t];
[tracks addObject: t];
[t release];
[p release];
}
- (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error
ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting
{
DRBurn* burn = [DRBurn burnForDevice: device];
if (! [device acquireExclusiveAccess])
{
*error = "Couldn't open or write to the CD device";
return;
}
[device acquireMediaReservation];
NSMutableDictionary* d = [[burn properties] mutableCopy];
[d autorelease];
[d setObject: [NSNumber numberWithBool: peformFakeBurnForTesting] forKey: DRBurnTestingKey];
[d setObject: [NSNumber numberWithBool: false] forKey: DRBurnVerifyDiscKey];
[d setObject: (shouldEject ? DRBurnCompletionActionEject : DRBurnCompletionActionMount)
forKey: DRBurnCompletionActionKey];
[burn setProperties: d];
[burn writeLayout: tracks];
for (;;)
{
JUCE_NAMESPACE::Thread::sleep (300);
float progress = [[[burn status] objectForKey: DRStatusPercentCompleteKey] floatValue];
NSLog ([[burn status] description]);
if (listener != 0 && listener->audioCDBurnProgress (progress))
{
[burn abort];
*error = "User cancelled the write operation";
break;
}
if ([[[burn status] objectForKey: DRStatusStateKey] isEqualTo: DRStatusStateFailed])
{
*error = "Write operation failed";
break;
}
else if ([[[burn status] objectForKey: DRStatusStateKey] isEqualTo: DRStatusStateDone])
{
break;
}
NSString* err = (NSString*) [[[burn status] objectForKey: DRErrorStatusKey]
objectForKey: DRErrorStatusErrorStringKey];
if ([err length] > 0)
{
*error = JUCE_NAMESPACE::String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [err UTF8String]);
break;
}
}
[device releaseMediaReservation];
[device releaseExclusiveAccess];
}
@end
//==============================================================================
@implementation AudioTrackProducer
- (AudioTrackProducer*) init: (int) lengthInFrames_
{
lengthInFrames = lengthInFrames_;
readPosition = 0;
return self;
}
- (void) setupTrackProperties: (DRTrack*) track
{
NSMutableDictionary* p = [[track properties] mutableCopy];
[p setObject:[DRMSF msfWithFrames: lengthInFrames] forKey: DRTrackLengthKey];
[p setObject:[NSNumber numberWithUnsignedShort:2352] forKey: DRBlockSizeKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRDataFormKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRBlockTypeKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRTrackModeKey];
[p setObject:[NSNumber numberWithInt:0] forKey: DRSessionFormatKey];
[track setProperties: p];
[p release];
}
- (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) lengthInSamples
{
AudioTrackProducer* s = [self init: (lengthInSamples + 587) / 588];
if (s != nil)
s->source = source_;
return s;
}
- (void) dealloc
{
if (source != 0)
{
source->releaseResources();
delete source;
}
[super dealloc];
}
- (void) cleanupTrackAfterBurn: (DRTrack*) track
{
}
- (BOOL) cleanupTrackAfterVerification: (DRTrack*) track
{
return true;
}
- (uint64_t) estimateLengthOfTrack: (DRTrack*) track
{
return lengthInFrames;
}
- (BOOL) prepareTrack: (DRTrack*) track forBurn: (DRBurn*) burn
toMedia: (NSDictionary*) mediaInfo
{
if (source != 0)
source->prepareToPlay (44100 / 75, 44100);
readPosition = 0;
return true;
}
- (BOOL) prepareTrackForVerification: (DRTrack*) track
{
if (source != 0)
source->prepareToPlay (44100 / 75, 44100);
return true;
}
- (uint32_t) produceDataForTrack: (DRTrack*) track intoBuffer: (char*) buffer
length: (uint32_t) bufferLength atAddress: (uint64_t) address
blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags
{
if (source != 0)
{
const int numSamples = JUCE_NAMESPACE::jmin (bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition);
if (numSamples > 0)
{
JUCE_NAMESPACE::AudioSampleBuffer tempBuffer (2, numSamples);
JUCE_NAMESPACE::AudioSourceChannelInfo info;
info.buffer = &tempBuffer;
info.startSample = 0;
info.numSamples = numSamples;
source->getNextAudioBlock (info);
JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (0),
buffer, numSamples, 4);
JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (1),
buffer + 2, numSamples, 4);
readPosition += numSamples;
}
return numSamples * 4;
}
return 0;
}
- (uint32_t) producePreGapForTrack: (DRTrack*) track
intoBuffer: (char*) buffer length: (uint32_t) bufferLength
atAddress: (uint64_t) address blockSize: (uint32_t) blockSize
ioFlags: (uint32_t*) flags
{
zeromem (buffer, bufferLength);
return bufferLength;
}
- (BOOL) verifyDataForTrack: (DRTrack*) track inBuffer: (const char*) buffer
length: (uint32_t) bufferLength atAddress: (uint64_t) address
blockSize: (uint32_t) blockSize ioFlags: (uint32_t*) flags
{
return true;
}
@end
BEGIN_JUCE_NAMESPACE
//==============================================================================
AudioCDBurner::AudioCDBurner (const int deviceIndex)
: internal (0)
{
OpenDiskDevice* dev = [[OpenDiskDevice alloc] initWithDevice: [[DRDevice devices] objectAtIndex: deviceIndex]];
internal = (void*) dev;
}
AudioCDBurner::~AudioCDBurner()
{
OpenDiskDevice* dev = (OpenDiskDevice*) internal;
if (dev != 0)
[dev release];
}
AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex)
{
AudioCDBurner* b = new AudioCDBurner (deviceIndex);
if (b->internal == 0)
deleteAndZero (b);
return b;
}
static NSArray* findDiskBurnerDevices()
{
NSMutableArray* results = [NSMutableArray array];
NSArray* devs = [DRDevice devices];
if (devs != 0)
{
int num = [devs count];
int i;
for (i = 0; i < num; ++i)
{
NSDictionary* dic = [[devs objectAtIndex: i] info];
NSString* name = [dic valueForKey: DRDeviceProductNameKey];
if (name != nil)
[results addObject: name];
}
}
return results;
}
const StringArray AudioCDBurner::findAvailableDevices()
{
NSArray* names = findDiskBurnerDevices();
StringArray s;
for (int i = 0; i < [names count]; ++i)
s.add (String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [[names objectAtIndex: i] UTF8String]));
return s;
}
bool AudioCDBurner::isDiskPresent() const
{
OpenDiskDevice* dev = (OpenDiskDevice*) internal;
return dev != 0 && [dev isDiskPresent];
}
int AudioCDBurner::getNumAvailableAudioBlocks() const
{
OpenDiskDevice* dev = (OpenDiskDevice*) internal;
return [dev getNumAvailableAudioBlocks];
}
bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps)
{
OpenDiskDevice* dev = (OpenDiskDevice*) internal;
if (dev != 0)
{
[dev addSourceTrack: source numSamples: numSamps];
return true;
}
return false;
}
const String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener* listener,
const bool ejectDiscAfterwards,
const bool peformFakeBurnForTesting)
{
String error ("Couldn't open or write to the CD device");
OpenDiskDevice* dev = (OpenDiskDevice*) internal;
if (dev != 0)
{
error = String::empty;
[dev burn: listener
errorString: &error
ejectAfterwards: ejectDiscAfterwards
isFake: peformFakeBurnForTesting];
}
return error;
}
#endif

+ 1299
- 1291
build/macosx/platform_specific_code/juce_mac_CoreAudio.cpp
File diff suppressed because it is too large
View File


+ 583
- 592
build/macosx/platform_specific_code/juce_mac_CoreMidi.cpp
File diff suppressed because it is too large
View File


+ 74
- 0
build/macosx/platform_specific_code/juce_mac_Debugging.mm View File

@@ -0,0 +1,74 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
void Logger::outputDebugString (const String& text) throw()
{
const ScopedAutoReleasePool pool;
NSLog (juceStringToNS (text + T("\n")));
}
void Logger::outputDebugPrintf (const tchar* format, ...) throw()
{
String text;
va_list args;
va_start (args, format);
text.vprintf(format, args);
outputDebugString (text);
}
bool JUCE_CALLTYPE juce_isRunningUnderDebugger() throw()
{
static char testResult = 0;
if (testResult == 0)
{
struct kinfo_proc info;
int m[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
size_t sz = sizeof (info);
sysctl (m, 4, &info, &sz, 0, 0);
testResult = ((info.kp_proc.p_flag & P_TRACED) != 0) ? 1 : -1;
}
return testResult > 0;
}
bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw()
{
return juce_isRunningUnderDebugger();
}
#endif

+ 150
- 156
build/macosx/platform_specific_code/juce_mac_FileChooser.mm View File

@@ -1,156 +1,150 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

#include "juce_mac_NativeHeaders.h"
#include <fnmatch.h>

BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/gui/components/filebrowser/juce_FileChooser.h"
END_JUCE_NAMESPACE


//==============================================================================
@interface JuceFileChooserDelegate : NSObject
{
JUCE_NAMESPACE::StringArray* filters;
}

- (JuceFileChooserDelegate*) initWithFilters: (JUCE_NAMESPACE::StringArray*) filters_;
- (void) dealloc;
- (BOOL) panel: (id) sender shouldShowFilename: (NSString*) filename;

@end

@implementation JuceFileChooserDelegate
- (JuceFileChooserDelegate*) initWithFilters: (JUCE_NAMESPACE::StringArray*) filters_
{
[super init];
filters = filters_;
return self;
}

- (void) dealloc
{
delete filters;
[super dealloc];
}

- (BOOL) panel:(id) sender shouldShowFilename: (NSString*) filename
{
const JUCE_NAMESPACE::String fname (nsStringToJuce (filename));

for (int i = filters->size(); --i >= 0;)
{
const JUCE_NAMESPACE::String wildcard ((*filters)[i]);

if (fnmatch (wildcard.toLowerCase().toUTF8(),
fname.toLowerCase().toUTF8(), 0) == 0)
return true;
}

return JUCE_NAMESPACE::File (fname).isDirectory();
}
@end

BEGIN_JUCE_NAMESPACE


void FileChooser::showPlatformDialog (OwnedArray<File>& results,
const String& title,
const File& currentFileOrDirectory,
const String& filter,
bool selectsDirectory,
bool isSaveDialogue,
bool warnAboutOverwritingExistingFiles,
bool selectMultipleFiles,
FilePreviewComponent* extraInfoComponent)
{
const AutoPool pool;

StringArray* filters = new StringArray();
filters->addTokens (filter.replaceCharacters (T(",:"), T(";;")), T(";"), 0);
filters->trim();
filters->removeEmptyStrings();

JuceFileChooserDelegate* delegate = [[JuceFileChooserDelegate alloc] initWithFilters: filters];
[delegate autorelease];

NSSavePanel* panel = isSaveDialogue ? [NSSavePanel savePanel]
: [NSOpenPanel openPanel];

[panel setTitle: juceStringToNS (title)];

if (! isSaveDialogue)
{
NSOpenPanel* openPanel = (NSOpenPanel*) panel;
[openPanel setCanChooseDirectories: selectsDirectory];
[openPanel setCanChooseFiles: ! selectsDirectory];
[openPanel setAllowsMultipleSelection: selectMultipleFiles];
}

[panel setDelegate: delegate];

String directory, filename;
if (currentFileOrDirectory.isDirectory())
{
directory = currentFileOrDirectory.getFullPathName();
}
else
{
directory = currentFileOrDirectory.getParentDirectory().getFullPathName();
filename = currentFileOrDirectory.getFileName();
}

if ([panel runModalForDirectory: juceStringToNS (directory)
file: juceStringToNS (filename)]
== NSOKButton)
{
if (isSaveDialogue)
{
results.add (new File (nsStringToJuce ([panel filename])));
}
else
{
NSOpenPanel* openPanel = (NSOpenPanel*) panel;
NSArray* urls = [openPanel filenames];
for (int i = 0; i < [urls count]; ++i)
{
NSString* f = [urls objectAtIndex: i];
results.add (new File (nsStringToJuce (f)));
}
}
}

[panel setDelegate: nil];
}

END_JUCE_NAMESPACE
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
END_JUCE_NAMESPACE
using namespace JUCE_NAMESPACE;
@interface JuceFileChooserDelegate : NSObject
{
StringArray* filters;
}
- (JuceFileChooserDelegate*) initWithFilters: (StringArray*) filters_;
- (void) dealloc;
- (BOOL) panel: (id) sender shouldShowFilename: (NSString*) filename;
@end
@implementation JuceFileChooserDelegate
- (JuceFileChooserDelegate*) initWithFilters: (StringArray*) filters_
{
[super init];
filters = filters_;
return self;
}
- (void) dealloc
{
delete filters;
[super dealloc];
}
- (BOOL) panel: (id) sender shouldShowFilename: (NSString*) filename
{
const String fname (nsStringToJuce (filename));
for (int i = filters->size(); --i >= 0;)
if (fname.matchesWildcard ((*filters)[i], true))
return true;
return File (fname).isDirectory();
}
@end
BEGIN_JUCE_NAMESPACE
//==============================================================================
void FileChooser::showPlatformDialog (OwnedArray<File>& results,
const String& title,
const File& currentFileOrDirectory,
const String& filter,
bool selectsDirectory,
bool isSaveDialogue,
bool warnAboutOverwritingExistingFiles,
bool selectMultipleFiles,
FilePreviewComponent* extraInfoComponent)
{
const ScopedAutoReleasePool pool;
StringArray* filters = new StringArray();
filters->addTokens (filter.replaceCharacters (T(",:"), T(";;")), T(";"), 0);
filters->trim();
filters->removeEmptyStrings();
JuceFileChooserDelegate* delegate = [[JuceFileChooserDelegate alloc] initWithFilters: filters];
[delegate autorelease];
NSSavePanel* panel = isSaveDialogue ? [NSSavePanel savePanel]
: [NSOpenPanel openPanel];
[panel setTitle: juceStringToNS (title)];
if (! isSaveDialogue)
{
NSOpenPanel* openPanel = (NSOpenPanel*) panel;
[openPanel setCanChooseDirectories: selectsDirectory];
[openPanel setCanChooseFiles: ! selectsDirectory];
[openPanel setAllowsMultipleSelection: selectMultipleFiles];
}
[panel setDelegate: delegate];
String directory, filename;
if (currentFileOrDirectory.isDirectory())
{
directory = currentFileOrDirectory.getFullPathName();
}
else
{
directory = currentFileOrDirectory.getParentDirectory().getFullPathName();
filename = currentFileOrDirectory.getFileName();
}
if ([panel runModalForDirectory: juceStringToNS (directory)
file: juceStringToNS (filename)]
== NSOKButton)
{
if (isSaveDialogue)
{
results.add (new File (nsStringToJuce ([panel filename])));
}
else
{
NSOpenPanel* openPanel = (NSOpenPanel*) panel;
NSArray* urls = [openPanel filenames];
for (int i = 0; i < [urls count]; ++i)
{
NSString* f = [urls objectAtIndex: i];
results.add (new File (nsStringToJuce (f)));
}
}
}
[panel setDelegate: nil];
}
#endif

+ 541
- 0
build/macosx/platform_specific_code/juce_mac_Files.mm View File

@@ -0,0 +1,541 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
/*
Note that a lot of methods that you'd expect to find in this file actually
live in juce_posix_SharedCode.h!
*/
//==============================================================================
static File executableFile;
const unsigned int macTimeToUnixTimeDiff = 0x7c25be90;
static uint64 utcDateTimeToUnixTime (const UTCDateTime& d) throw()
{
if (d.highSeconds == 0 && d.lowSeconds == 0 && d.fraction == 0)
return 0;
return (((((uint64) d.highSeconds) << 32) | (uint64) d.lowSeconds) * 1000)
+ ((d.fraction * 1000) >> 16)
- 2082844800000ll;
}
static void unixTimeToUtcDateTime (uint64 t, UTCDateTime& d) throw()
{
if (t != 0)
t += 2082844800000ll;
d.highSeconds = (t / 1000) >> 32;
d.lowSeconds = (t / 1000) & (uint64) 0xffffffff;
d.fraction = ((t % 1000) << 16) / 1000;
}
void juce_getFileTimes (const String& fileName,
int64& modificationTime,
int64& accessTime,
int64& creationTime) throw()
{
modificationTime = 0;
accessTime = 0;
creationTime = 0;
FSRef fileRef;
if (PlatformUtilities::makeFSRefFromPath (&fileRef, fileName))
{
FSRefParam info;
zerostruct (info);
info.ref = &fileRef;
info.whichInfo = kFSCatInfoAllDates;
FSCatalogInfo catInfo;
info.catInfo = &catInfo;
if (PBGetCatalogInfoSync (&info) == noErr)
{
creationTime = utcDateTimeToUnixTime (catInfo.createDate);
accessTime = utcDateTimeToUnixTime (catInfo.accessDate);
modificationTime = utcDateTimeToUnixTime (catInfo.contentModDate);
}
}
}
bool juce_setFileTimes (const String& fileName,
int64 modificationTime,
int64 accessTime,
int64 creationTime) throw()
{
FSRef fileRef;
if (PlatformUtilities::makeFSRefFromPath (&fileRef, fileName))
{
FSRefParam info;
zerostruct (info);
info.ref = &fileRef;
info.whichInfo = kFSCatInfoAllDates;
FSCatalogInfo catInfo;
info.catInfo = &catInfo;
if (PBGetCatalogInfoSync (&info) == noErr)
{
if (creationTime != 0)
unixTimeToUtcDateTime (creationTime, catInfo.createDate);
if (modificationTime != 0)
unixTimeToUtcDateTime (modificationTime, catInfo.contentModDate);
if (accessTime != 0)
unixTimeToUtcDateTime (accessTime, catInfo.accessDate);
return PBSetCatalogInfoSync (&info) == noErr;
}
}
return false;
}
bool juce_setFileReadOnly (const String& fileName, bool isReadOnly) throw()
{
const char* const fileNameUTF8 = fileName.toUTF8();
struct stat info;
const int res = stat (fileNameUTF8, &info);
bool ok = false;
if (res == 0)
{
info.st_mode &= 0777; // Just permissions
if (isReadOnly)
info.st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
else
// Give everybody write permission?
info.st_mode |= S_IWUSR | S_IWGRP | S_IWOTH;
ok = chmod (fileNameUTF8, info.st_mode) == 0;
}
return ok;
}
bool juce_copyFile (const String& src, const String& dst) throw()
{
const ScopedAutoReleasePool pool;
NSFileManager* fm = [NSFileManager defaultManager];
return [fm fileExistsAtPath: juceStringToNS (src)]
&& [fm copyPath: juceStringToNS (src)
toPath: juceStringToNS (dst)
handler: nil];
}
const StringArray juce_getFileSystemRoots() throw()
{
StringArray s;
s.add (T("/"));
return s;
}
//==============================================================================
static bool isFileOnDriveType (const File* const f, const char** types) throw()
{
struct statfs buf;
if (doStatFS (f, buf))
{
const String type (buf.f_fstypename);
while (*types != 0)
if (type.equalsIgnoreCase (*types++))
return true;
}
return false;
}
bool File::isOnCDRomDrive() const throw()
{
static const char* const cdTypes[] = { "cd9660", "cdfs", "cddafs", "udf", 0 };
return isFileOnDriveType (this, (const char**) cdTypes);
}
bool File::isOnHardDisk() const throw()
{
static const char* const nonHDTypes[] = { "nfs", "smbfs", "ramfs", 0 };
return ! (isOnCDRomDrive() || isFileOnDriveType (this, (const char**) nonHDTypes));
}
bool File::isOnRemovableDrive() const throw()
{
jassertfalse // xxx not implemented for mac!
return false;
}
static bool juce_isHiddenFile (const String& path) throw()
{
FSRef ref;
if (! PlatformUtilities::makeFSRefFromPath (&ref, path))
return false;
FSCatalogInfo info;
FSGetCatalogInfo (&ref, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo, &info, 0, 0, 0);
if ((info.nodeFlags & kFSNodeIsDirectoryBit) != 0)
return (((FolderInfo*) &info.finderInfo)->finderFlags & kIsInvisible) != 0;
return (((FileInfo*) &info.finderInfo)->finderFlags & kIsInvisible) != 0;
}
bool File::isHidden() const throw()
{
return juce_isHiddenFile (getFullPathName());
}
//==============================================================================
const File File::getSpecialLocation (const SpecialLocationType type)
{
const char* resultPath = 0;
switch (type)
{
case userHomeDirectory:
resultPath = nsStringToJuce (NSHomeDirectory());
break;
case userDocumentsDirectory:
resultPath = "~/Documents";
break;
case userDesktopDirectory:
resultPath = "~/Desktop";
break;
case userApplicationDataDirectory:
resultPath = "~/Library";
break;
case commonApplicationDataDirectory:
resultPath = "/Library";
break;
case globalApplicationsDirectory:
resultPath = "/Applications";
break;
case userMusicDirectory:
resultPath = "~/Music";
break;
case userMoviesDirectory:
resultPath = "~/Movies";
break;
case tempDirectory:
{
File tmp (T("~/Library/Caches/") + executableFile.getFileNameWithoutExtension());
tmp.createDirectory();
return tmp.getFullPathName();
}
case currentExecutableFile:
return executableFile;
case currentApplicationFile:
{
const File parent (executableFile.getParentDirectory());
return parent.getFullPathName().endsWithIgnoreCase (T("Contents/MacOS"))
? parent.getParentDirectory().getParentDirectory()
: executableFile;
}
default:
jassertfalse // unknown type?
break;
}
if (resultPath != 0)
return File (PlatformUtilities::convertToPrecomposedUnicode (resultPath));
return File::nonexistent;
}
void juce_setCurrentExecutableFileName (const String& filename) throw()
{
executableFile = File::getCurrentWorkingDirectory()
.getChildFile (PlatformUtilities::convertToPrecomposedUnicode (filename));
}
void juce_setCurrentExecutableFileNameFromBundleId (const String& bundleId) throw()
{
const ScopedAutoReleasePool pool;
NSBundle* b = [NSBundle bundleWithIdentifier: juceStringToNS (bundleId)];
if (b != nil)
executableFile = nsStringToJuce ([b executablePath]);
}
//==============================================================================
const File File::getCurrentWorkingDirectory() throw()
{
char buf [2048];
getcwd (buf, sizeof(buf));
return File (PlatformUtilities::convertToPrecomposedUnicode (buf));
}
bool File::setAsCurrentWorkingDirectory() const throw()
{
return chdir (getFullPathName().toUTF8()) == 0;
}
//==============================================================================
struct FindFileStruct
{
String parentDir, wildCard;
DIR* dir;
bool getNextMatch (String& result, bool* const isDir, bool* const isHidden, int64* const fileSize,
Time* const modTime, Time* const creationTime, bool* const isReadOnly) throw()
{
const char* const wildCardUTF8 = wildCard.toUTF8();
for (;;)
{
struct dirent* const de = readdir (dir);
if (de == 0)
break;
if (fnmatch (wildCardUTF8, de->d_name, 0) == 0)
{
result = PlatformUtilities::convertToPrecomposedUnicode (String::fromUTF8 ((const uint8*) de->d_name));
const String path (parentDir + result);
if (isDir != 0 || fileSize != 0)
{
struct stat info;
const bool statOk = juce_stat (path, info);
if (isDir != 0)
*isDir = path.isEmpty() || (statOk && ((info.st_mode & S_IFDIR) != 0));
if (isHidden != 0)
*isHidden = (de->d_name[0] == '.')
|| juce_isHiddenFile (path);
if (fileSize != 0)
*fileSize = statOk ? info.st_size : 0;
}
if (modTime != 0 || creationTime != 0)
{
int64 m, a, c;
juce_getFileTimes (path, m, a, c);
if (modTime != 0)
*modTime = m;
if (creationTime != 0)
*creationTime = c;
}
if (isReadOnly != 0)
*isReadOnly = ! juce_canWriteToFile (path);
return true;
}
}
return false;
}
};
// returns 0 on failure
void* juce_findFileStart (const String& directory, const String& wildCard, String& firstResultFile,
bool* isDir, bool* isHidden, int64* fileSize, Time* modTime,
Time* creationTime, bool* isReadOnly) throw()
{
DIR* const d = opendir (directory.toUTF8());
if (d != 0)
{
FindFileStruct* const ff = new FindFileStruct();
ff->parentDir = directory;
if (!ff->parentDir.endsWithChar (File::separator))
ff->parentDir += File::separator;
ff->wildCard = wildCard;
ff->dir = d;
if (ff->getNextMatch (firstResultFile, isDir, isHidden, fileSize, modTime, creationTime, isReadOnly))
{
return ff;
}
else
{
firstResultFile = String::empty;
isDir = false;
closedir (d);
delete ff;
}
}
return 0;
}
bool juce_findFileNext (void* handle, String& resultFile,
bool* isDir, bool* isHidden, int64* fileSize, Time* modTime, Time* creationTime, bool* isReadOnly) throw()
{
FindFileStruct* const ff = (FindFileStruct*) handle;
if (ff != 0)
return ff->getNextMatch (resultFile, isDir, isHidden, fileSize, modTime, creationTime, isReadOnly);
return false;
}
void juce_findFileClose (void* handle) throw()
{
FindFileStruct* const ff = (FindFileStruct*)handle;
if (ff != 0)
{
closedir (ff->dir);
delete ff;
}
}
//==============================================================================
bool juce_launchExecutable (const String& pathAndArguments) throw()
{
char* const argv[4] = { "/bin/sh", "-c", (char*) (const char*) pathAndArguments, 0 };
const int cpid = fork();
if (cpid == 0)
{
// Child process
if (execve (argv[0], argv, 0) < 0)
exit (0);
}
else
{
if (cpid < 0)
return false;
}
return true;
}
bool juce_launchFile (const String& fileName,
const String& parameters) throw()
{
const ScopedAutoReleasePool pool;
if (parameters.isEmpty())
return [[NSWorkspace sharedWorkspace] openFile: juceStringToNS (fileName)];
bool ok = false;
FSRef ref;
if (PlatformUtilities::makeFSRefFromPath (&ref, fileName))
{
if (PlatformUtilities::isBundle (fileName))
{
NSMutableArray* urls = [NSMutableArray array];
StringArray docs;
docs.addTokens (parameters, true);
for (int i = 0; i < docs.size(); ++i)
[urls addObject: juceStringToNS (docs[i])];
ok = [[NSWorkspace sharedWorkspace] openURLs: urls
withAppBundleIdentifier: [[NSBundle bundleWithPath: juceStringToNS (fileName)] bundleIdentifier]
options: nil
additionalEventParamDescriptor: nil
launchIdentifiers: nil];
}
else
{
ok = juce_launchExecutable (T("\"") + fileName + T("\" ") + parameters);
}
}
return ok;
}
//==============================================================================
bool PlatformUtilities::makeFSRefFromPath (FSRef* destFSRef, const String& path)
{
return FSPathMakeRef ((const UInt8*) path.toUTF8(), destFSRef, 0) == noErr;
}
const String PlatformUtilities::makePathFromFSRef (FSRef* file)
{
uint8 path [2048];
zeromem (path, sizeof (path));
String result;
if (FSRefMakePath (file, (UInt8*) path, sizeof (path) - 1) == noErr)
result = String::fromUTF8 (path);
return PlatformUtilities::convertToPrecomposedUnicode (result);
}
//==============================================================================
OSType PlatformUtilities::getTypeOfFile (const String& filename)
{
const ScopedAutoReleasePool pool;
return NSHFSTypeCodeFromFileType (NSHFSTypeOfFile (juceStringToNS (filename)));
}
bool PlatformUtilities::isBundle (const String& filename)
{
const ScopedAutoReleasePool pool;
return [[NSWorkspace sharedWorkspace] isFilePackageAtPath: juceStringToNS (filename)];
}
#endif

+ 4
- 15
build/macosx/platform_specific_code/juce_mac_Fonts.mm View File

@@ -29,19 +29,9 @@
==============================================================================
*/
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
#include <ApplicationServices/ApplicationServices.h>
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/gui/graphics/fonts/juce_Font.h"
#include "../../../src/juce_appframework/events/juce_Timer.h"
#include "../../../src/juce_appframework/events/juce_MessageManager.h"
#include "../../../src/juce_appframework/application/juce_DeletedAtShutdown.h"
#include "../../../src/juce_core/basics/juce_Singleton.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
static OSStatus pascal CubicMoveTo (const Float32Point *pt,
@@ -539,5 +529,4 @@ void Font::getDefaultFontNames (String& defaultSans, String& defaultSerif, Strin
defaultFixed = "Monaco";
}
END_JUCE_NAMESPACE
#endif

+ 414
- 0
build/macosx/platform_specific_code/juce_mac_MainMenu.mm View File

@@ -0,0 +1,414 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
class JuceMainMenuHandler;
END_JUCE_NAMESPACE
using namespace JUCE_NAMESPACE;
@interface JuceMenuCallback : NSObject
{
JuceMainMenuHandler* owner;
}
- (JuceMenuCallback*) initWithOwner: (JuceMainMenuHandler*) owner_;
- (void) dealloc;
- (void) menuItemInvoked: (id) menu;
@end
BEGIN_JUCE_NAMESPACE
//==============================================================================
class JuceMainMenuHandler : private MenuBarModelListener,
private DeletedAtShutdown
{
public:
static JuceMainMenuHandler* instance;
//==============================================================================
JuceMainMenuHandler() throw()
: currentModel (0)
{
callback = [[JuceMenuCallback alloc] initWithOwner: this];
}
~JuceMainMenuHandler() throw()
{
setMenu (0);
jassert (instance == this);
instance = 0;
[callback release];
}
void setMenu (MenuBarModel* const newMenuBarModel) throw()
{
if (currentModel != newMenuBarModel)
{
if (currentModel != 0)
currentModel->removeListener (this);
currentModel = newMenuBarModel;
if (currentModel != 0)
currentModel->addListener (this);
menuBarItemsChanged (0);
}
}
void addSubMenu (NSMenu* parent, const PopupMenu& child,
const String& name, int& menuId, int& tag)
{
NSMenuItem* item = [parent addItemWithTitle: juceStringToNS (name)
action: nil
keyEquivalent: @""];
[item setTag: tag];
NSMenu* sub = createMenu (child, name, menuId, tag);
[parent setSubmenu: sub forItem: item];
[sub setAutoenablesItems: false];
[sub release];
}
void menuBarItemsChanged (MenuBarModel*)
{
NSMenu* menuBar = [NSApp mainMenu];
while ([menuBar numberOfItems] > 1)
[menuBar removeItemAtIndex: 1];
if (currentModel != 0)
{
const StringArray menuNames (currentModel->getMenuBarNames());
int menuId = 1;
for (int i = 0; i < menuNames.size(); ++i)
{
const PopupMenu menu (currentModel->getMenuForIndex (i, menuNames [i]));
addSubMenu (menuBar, menu, menuNames [i], menuId, i);
}
}
}
static void flashMenuBar (NSMenu* menu)
{
const unichar f35Key = NSF35FunctionKey;
NSString* f35String = [NSString stringWithCharacters: &f35Key length: 1];
NSMenuItem* item = [[NSMenuItem alloc] initWithTitle: @"x"
action: nil
keyEquivalent: f35String];
[item setTarget: nil];
[menu insertItem: item atIndex: [menu numberOfItems]];
[item release];
NSEvent* f35Event = [NSEvent keyEventWithType: NSKeyDown
location: NSZeroPoint
modifierFlags: NSCommandKeyMask
timestamp: 0
windowNumber: 0
context: [NSGraphicsContext currentContext]
characters: f35String
charactersIgnoringModifiers: f35String
isARepeat: NO
keyCode: 0];
[menu performKeyEquivalent: f35Event];
[menu removeItem: item];
}
void menuCommandInvoked (MenuBarModel*, const ApplicationCommandTarget::InvocationInfo& info)
{
NSMenuItem* item = [[NSApp mainMenu] itemWithTag: info.commandID];
if (item != 0)
flashMenuBar ([item menu]);
}
void invoke (const int commandId, ApplicationCommandManager* const commandManager, const int topLevelIndex) const
{
if (currentModel != 0)
{
if (commandManager != 0)
{
ApplicationCommandTarget::InvocationInfo info (commandId);
info.invocationMethod = ApplicationCommandTarget::InvocationInfo::fromMenu;
commandManager->invoke (info, true);
}
currentModel->menuItemSelected (commandId, topLevelIndex);
}
}
MenuBarModel* currentModel;
private:
JuceMenuCallback* callback;
NSMenu* createMenu (const PopupMenu menu,
const String& menuName,
int& id,
const int topLevelIndex)
{
NSMenu* m = [[NSMenu alloc] initWithTitle: juceStringToNS (menuName)];
[m setAutoenablesItems: false];
PopupMenu::MenuItemIterator iter (menu);
while (iter.next())
{
NSString* text = juceStringToNS (iter.itemName.upToFirstOccurrenceOf (T("<end>"), false, true));
if (iter.isSeparator)
{
[m addItem: [NSMenuItem separatorItem]];
}
else if (iter.isSectionHeader)
{
NSMenuItem* item = [m addItemWithTitle: text
action: nil
keyEquivalent: @""];
[item setEnabled: iter.isEnabled];
}
else if (iter.subMenu != 0)
{
NSMenuItem* item = [m addItemWithTitle: text
action: nil
keyEquivalent: @""];
[item setTag: iter.itemId];
[item setEnabled: iter.isEnabled];
NSMenu* sub = createMenu (*iter.subMenu, iter.itemName, id, topLevelIndex);
[m setSubmenu: sub forItem: item];
[sub release];
}
else
{
NSMenuItem* item = [m addItemWithTitle: text
action: @selector (menuItemInvoked:)
keyEquivalent: @""];
[item setTag: iter.itemId];
[item setEnabled: iter.isEnabled];
[item setState: iter.isTicked ? NSOnState : NSOffState];
[item setTarget: (id) callback];
NSMutableArray* info = [NSMutableArray arrayWithObject: [NSNumber numberWithUnsignedLongLong: (pointer_sized_int) (void*) iter.commandManager]];
[info addObject: [NSNumber numberWithInt: topLevelIndex]];
[item setRepresentedObject: info];
if (iter.commandManager != 0)
{
const Array <KeyPress> keyPresses (iter.commandManager->getKeyMappings()
->getKeyPressesAssignedToCommand (iter.itemId));
if (keyPresses.size() > 0)
{
const KeyPress& kp = keyPresses.getReference(0);
juce_wchar key = kp.getTextCharacter();
if (kp.getKeyCode() == KeyPress::backspaceKey)
key = NSBackspaceCharacter;
else if (kp.getKeyCode() == KeyPress::deleteKey)
key = NSDeleteCharacter;
else if (key == 0)
key = (juce_wchar) kp.getKeyCode();
unsigned int mods = 0;
if (kp.getModifiers().isShiftDown())
mods |= NSShiftKeyMask;
if (kp.getModifiers().isCtrlDown())
mods |= NSControlKeyMask;
if (kp.getModifiers().isAltDown())
mods |= NSAlternateKeyMask;
if (kp.getModifiers().isCommandDown())
mods |= NSCommandKeyMask;
[item setKeyEquivalent: juceStringToNS (String::charToString (key))];
[item setKeyEquivalentModifierMask: mods];
}
}
}
}
[m update];
return m;
}
};
JuceMainMenuHandler* JuceMainMenuHandler::instance = 0;
END_JUCE_NAMESPACE
@implementation JuceMenuCallback
- (JuceMenuCallback*) initWithOwner: (JuceMainMenuHandler*) owner_
{
[super init];
owner = owner_;
return self;
}
- (void) dealloc
{
[super dealloc];
}
- (void) menuItemInvoked: (id) menu
{
NSMenuItem* item = (NSMenuItem*) menu;
if ([[item representedObject] isKindOfClass: [NSArray class]])
{
NSArray* info = (NSArray*) [item representedObject];
owner->invoke ([item tag],
(ApplicationCommandManager*) (pointer_sized_int)
[((NSNumber*) [info objectAtIndex: 0]) unsignedLongLongValue],
(int) [((NSNumber*) [info objectAtIndex: 1]) intValue]);
}
}
@end
BEGIN_JUCE_NAMESPACE
void MenuBarModel::setMacMainMenu (MenuBarModel* newMenuBarModel) throw()
{
if (getMacMainMenu() != newMenuBarModel)
{
if (newMenuBarModel == 0)
{
delete JuceMainMenuHandler::instance;
jassert (JuceMainMenuHandler::instance == 0); // should be zeroed in the destructor
}
else
{
if (JuceMainMenuHandler::instance == 0)
JuceMainMenuHandler::instance = new JuceMainMenuHandler();
JuceMainMenuHandler::instance->setMenu (newMenuBarModel);
}
}
}
MenuBarModel* MenuBarModel::getMacMainMenu() throw()
{
return JuceMainMenuHandler::instance != 0
? JuceMainMenuHandler::instance->currentModel : 0;
}
//==============================================================================
static NSMenu* createStandardAppMenu (const String& appName)
{
NSMenu* menu = [[NSMenu alloc] initWithTitle: @"Apple"];
NSMenuItem* item;
// xxx should allow the 'about' and 'preferences' items to be turned on programatically...
/* item = [menu addItemWithTitle: juceStringToNS ("About " + appName)]
action: @selector(orderFrontStandardAboutPanel:) keyEquivalent: @""];
[item setTarget: NSApp];
[menu addItem: [NSMenuItem separatorItem]];
*/
/* item = [menu addItemWithTitle: NSLocalizedString (@"Preferences...", nil)
action: nil keyEquivalent: @","];
[menu addItem: [NSMenuItem separatorItem]];
*/
// Services...
item = [menu addItemWithTitle: NSLocalizedString (@"Services", nil)
action: nil keyEquivalent: @""];
NSMenu* servicesMenu = [[NSMenu alloc] initWithTitle: @"Services"];
[menu setSubmenu: servicesMenu forItem: item];
[NSApp setServicesMenu: servicesMenu];
[servicesMenu release];
[menu addItem: [NSMenuItem separatorItem]];
// Hide + Show stuff...
item = [menu addItemWithTitle: juceStringToNS ("Hide " + appName)
action: @selector (hide:) keyEquivalent: @"h"];
[item setTarget: NSApp];
item = [menu addItemWithTitle: NSLocalizedString (@"Hide Others", nil)
action: @selector (hideOtherApplications:) keyEquivalent: @"h"];
[item setKeyEquivalentModifierMask: NSCommandKeyMask | NSAlternateKeyMask];
[item setTarget: NSApp];
item = [menu addItemWithTitle: NSLocalizedString (@"Show All", nil)
action: @selector (unhideAllApplications:) keyEquivalent: @""];
[item setTarget: NSApp];
[menu addItem: [NSMenuItem separatorItem]];
// Quit item....
item = [menu addItemWithTitle: juceStringToNS ("Quit " + appName)
action: @selector (terminate:) keyEquivalent: @"q"];
[item setTarget: NSApp];
return menu;
}
// Since our app has no NIB, this initialises a standard app menu...
void initialiseMainMenu()
{
if (JUCEApplication::getInstance() != 0) // only needed in an app
{
const ScopedAutoReleasePool pool;
NSMenu* mainMenu = [[NSMenu alloc] initWithTitle: @"MainMenu"];
NSMenuItem* item = [mainMenu addItemWithTitle: @"Apple" action: nil keyEquivalent: @""];
NSMenu* appMenu = createStandardAppMenu (JUCEApplication::getInstance()->getApplicationName());
[NSApp performSelector: @selector (setAppleMenu:) withObject: appMenu];
[mainMenu setSubmenu: appMenu forItem: item];
[NSApp setMainMenu: mainMenu];
[appMenu release];
[mainMenu release];
}
}
#endif

+ 275
- 0
build/macosx/platform_specific_code/juce_mac_MessageManager.mm View File

@@ -0,0 +1,275 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
struct CallbackMessagePayload
{
MessageCallbackFunction* function;
void* parameter;
void* volatile result;
bool volatile hasBeenExecuted;
};
END_JUCE_NAMESPACE
using namespace JUCE_NAMESPACE;
@interface JuceAppDelegate : NSObject
{
id oldDelegate;
}
- (JuceAppDelegate*) init;
- (void) dealloc;
- (BOOL) application: (NSApplication*) theApplication openFile: (NSString*) filename;
- (void) application: (NSApplication*) sender openFiles: (NSArray*) filenames;
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication*) app;
- (void) applicationDidBecomeActive: (NSNotification*) aNotification;
- (void) applicationDidResignActive: (NSNotification*) aNotification;
- (void) applicationWillUnhide: (NSNotification*) aNotification;
- (void) customEvent: (id) data;
- (void) performCallback: (id) info;
@end
@implementation JuceAppDelegate
- (JuceAppDelegate*) init
{
[super init];
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
if (JUCEApplication::getInstance() != 0)
{
oldDelegate = [NSApp delegate];
[NSApp setDelegate: self];
}
else
{
oldDelegate = 0;
[center addObserver: self selector: @selector (applicationDidResignActive:)
name: NSApplicationDidResignActiveNotification object: NSApp];
[center addObserver: self selector: @selector (applicationDidBecomeActive:)
name: NSApplicationDidBecomeActiveNotification object: NSApp];
[center addObserver: self selector: @selector (applicationWillUnhide:)
name: NSApplicationWillUnhideNotification object: NSApp];
}
return self;
}
- (void) dealloc
{
if (oldDelegate != 0)
[NSApp setDelegate: oldDelegate];
[super dealloc];
}
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication*) app
{
if (JUCEApplication::getInstance() != 0)
{
JUCEApplication::getInstance()->systemRequestedQuit();
if (! MessageManager::getInstance()->hasStopMessageBeenSent())
return NSTerminateCancel;
}
return NSTerminateNow;
}
- (BOOL) application: (NSApplication*) app openFile: (NSString*) filename
{
if (JUCEApplication::getInstance() != 0)
{
JUCEApplication::getInstance()->anotherInstanceStarted (nsStringToJuce (filename));
return YES;
}
return NO;
}
- (void) application: (NSApplication*) sender openFiles: (NSArray*) filenames
{
StringArray files;
for (int i = 0; i < [filenames count]; ++i)
files.add (nsStringToJuce ((NSString*) [filenames objectAtIndex: i]));
if (files.size() > 0 && JUCEApplication::getInstance() != 0)
JUCEApplication::getInstance()->anotherInstanceStarted (files.joinIntoString (T(" ")));
}
- (void) applicationDidBecomeActive: (NSNotification*) aNotification
{
juce_HandleProcessFocusChange();
}
- (void) applicationDidResignActive: (NSNotification*) aNotification
{
juce_HandleProcessFocusChange();
}
- (void) applicationWillUnhide: (NSNotification*) aNotification
{
juce_HandleProcessFocusChange();
}
- (void) customEvent: (id) n
{
NSData* data = (NSData*) n;
void* message = 0;
[data getBytes: &message length: sizeof (message)];
if (message != 0)
MessageManager::getInstance()->deliverMessage (message);
[data release];
}
- (void) performCallback: (id) info
{
CallbackMessagePayload* pl = (CallbackMessagePayload*) info;
if (pl != 0)
{
pl->result = (*pl->function) (pl->parameter);
pl->hasBeenExecuted = true;
}
}
@end
BEGIN_JUCE_NAMESPACE
static JuceAppDelegate* juceAppDelegate = 0;
void MessageManager::runDispatchLoop()
{
const ScopedAutoReleasePool pool;
MessageManagerLock mml;
// must only be called by the message thread!
jassert (isThisTheMessageThread());
[NSApp run];
}
void MessageManager::stopDispatchLoop()
{
quitMessagePosted = true;
[NSApp stop: nil];
}
bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
{
const ScopedAutoReleasePool pool;
jassert (isThisTheMessageThread()); // must only be called by the message thread
uint32 endTime = Time::getMillisecondCounter() + millisecondsToRunFor;
NSDate* endDate = [NSDate dateWithTimeIntervalSinceNow: millisecondsToRunFor * 0.001];
while (Time::getMillisecondCounter() < endTime)
{
const ScopedAutoReleasePool pool;
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
beforeDate: endDate];
NSEvent* e = [NSApp nextEventMatchingMask: NSAnyEventMask
untilDate: endDate
inMode: NSDefaultRunLoopMode
dequeue: YES];
[NSApp sendEvent: e];
}
return ! quitMessagePosted;
}
//==============================================================================
void MessageManager::doPlatformSpecificInitialisation()
{
if (juceAppDelegate == 0)
juceAppDelegate = [[JuceAppDelegate alloc] init];
initialiseMainMenu();
}
void MessageManager::doPlatformSpecificShutdown()
{
[[NSRunLoop currentRunLoop] cancelPerformSelectorsWithTarget: juceAppDelegate];
[[NSNotificationCenter defaultCenter] removeObserver: juceAppDelegate];
[juceAppDelegate release];
juceAppDelegate = 0;
}
bool juce_postMessageToSystemQueue (void* message)
{
[juceAppDelegate performSelectorOnMainThread: @selector (customEvent:)
withObject: (id) [[NSData alloc] initWithBytes: &message
length: (int) sizeof (message)]
waitUntilDone: NO];
return true;
}
void MessageManager::broadcastMessage (const String& value) throw()
{
}
void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback,
void* data)
{
if (isThisTheMessageThread())
{
return (*callback) (data);
}
else
{
CallbackMessagePayload cmp;
cmp.function = callback;
cmp.parameter = data;
cmp.result = 0;
cmp.hasBeenExecuted = false;
[juceAppDelegate performSelectorOnMainThread: @selector (performCallback:)
withObject: (id) &cmp
waitUntilDone: YES];
return cmp.result;
}
}
#endif

+ 0
- 503
build/macosx/platform_specific_code/juce_mac_Messaging.mm View File

@@ -1,503 +0,0 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

#include "juce_mac_NativeHeaders.h"
#include <Carbon/Carbon.h>

BEGIN_JUCE_NAMESPACE

#include "../../../src/juce_appframework/events/juce_MessageManager.h"
#include "../../../src/juce_appframework/application/juce_Application.h"
#include "../../../src/juce_appframework/gui/components/juce_Desktop.h"
#include "../../../src/juce_core/text/juce_StringArray.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"

#undef Point

extern void juce_HandleProcessFocusChange();
extern void juce_maximiseAllMinimisedWindows();
extern void juce_InvokeMainMenuCommand (const HICommand& command);
extern void juce_MainMenuAboutToBeUsed();

struct CallbackMessagePayload
{
MessageCallbackFunction* function;
void* parameter;
void* volatile result;
bool volatile hasBeenExecuted;
};

END_JUCE_NAMESPACE

#if JUCE_COCOA

NSString* juceMessageName = 0;

@interface JuceAppDelegate : NSObject
id oldDelegate;
- (JuceAppDelegate*) init;
- (void) dealloc;
- (BOOL) application: (NSApplication*) theApplication openFile: (NSString*) filename;
- (void) application: (NSApplication*) sender openFiles: (NSArray*) filenames;
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication*) app;
- (void) applicationDidBecomeActive: (NSNotification*) aNotification;
- (void) applicationDidResignActive: (NSNotification*) aNotification;
- (void) applicationWillUnhide: (NSNotification*) aNotification;
- (void) customEvent: (NSNotification*) aNotification;
- (void) performCallback: (id) info;
@end

@implementation JuceAppDelegate

- (JuceAppDelegate*) init
{
[super init];

NSNotificationCenter* center = [NSNotificationCenter defaultCenter];

if (JUCE_NAMESPACE::JUCEApplication::getInstance() != 0)
{
oldDelegate = [NSApp delegate];
[NSApp setDelegate: self];
}
else
{
oldDelegate = 0;
[center addObserver: self selector: @selector (applicationDidResignActive:)
name: NSApplicationDidResignActiveNotification object: NSApp];

[center addObserver: self selector: @selector (applicationDidBecomeActive:)
name: NSApplicationDidBecomeActiveNotification object: NSApp];

[center addObserver: self selector: @selector (applicationWillUnhide:)
name: NSApplicationWillUnhideNotification object: NSApp];

}

[center addObserver: self selector: @selector (customEvent:)
name: juceMessageName object: nil];

return self;
}

- (void) dealloc
{
if (oldDelegate != 0)
[NSApp setDelegate: oldDelegate];

[[NSNotificationCenter defaultCenter] removeObserver: self];
[super dealloc];
}

- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication*) app
{
if (JUCE_NAMESPACE::JUCEApplication::getInstance() != 0)
JUCE_NAMESPACE::JUCEApplication::getInstance()->systemRequestedQuit();

return NSTerminateLater;
}

- (BOOL) application: (NSApplication*) app openFile: (NSString*) filename
{
if (JUCE_NAMESPACE::JUCEApplication::getInstance() != 0)
{
JUCE_NAMESPACE::JUCEApplication::getInstance()->anotherInstanceStarted (nsStringToJuce (filename));
return YES;
}

return NO;
}

- (void) application: (NSApplication*) sender openFiles: (NSArray*) filenames
{
JUCE_NAMESPACE::StringArray files;
for (int i = 0; i < [filenames count]; ++i)
files.add (nsStringToJuce ((NSString*) [filenames objectAtIndex: i]));

if (files.size() > 0 && JUCE_NAMESPACE::JUCEApplication::getInstance() != 0)
JUCE_NAMESPACE::JUCEApplication::getInstance()->anotherInstanceStarted (files.joinIntoString (T(" ")));
}

- (void) applicationDidBecomeActive: (NSNotification*) aNotification
{
JUCE_NAMESPACE::juce_HandleProcessFocusChange();
}

- (void) applicationDidResignActive: (NSNotification*) aNotification
{
JUCE_NAMESPACE::juce_HandleProcessFocusChange();
}

- (void) applicationWillUnhide: (NSNotification*) aNotification
{
JUCE_NAMESPACE::juce_maximiseAllMinimisedWindows();
}

- (void) customEvent: (NSNotification*) n
{
void* message = 0;
[((NSData*) [n object]) getBytes: &message length: sizeof (message)];

if (message != 0)
JUCE_NAMESPACE::MessageManager::getInstance()->deliverMessage (message);
}

- (void) performCallback: (id) info
{
JUCE_NAMESPACE::CallbackMessagePayload* pl = (JUCE_NAMESPACE::CallbackMessagePayload*) info;

if (pl != 0)
{
pl->result = (*pl->function) (pl->parameter);
pl->hasBeenExecuted = true;
}
}

@end
#endif

BEGIN_JUCE_NAMESPACE


#if JUCE_COCOA
static JuceAppDelegate* juceAppDelegate = 0;

#else
static int kJUCEClass = FOUR_CHAR_CODE ('JUCE');
const int kJUCEKind = 1;
const int kCallbackKind = 2;


static pascal OSStatus EventHandlerProc (EventHandlerCallRef, EventRef theEvent, void* userData)
{
void* event = 0;
GetEventParameter (theEvent, 'mess', typeVoidPtr, 0, sizeof (void*), 0, &event);

if (event != 0)
MessageManager::getInstance()->deliverMessage (event);

return noErr;
}

static pascal OSStatus CallbackHandlerProc (EventHandlerCallRef, EventRef theEvent, void* userData)
{
CallbackMessagePayload* pl = 0;
GetEventParameter (theEvent, 'mess', typeVoidPtr, 0, sizeof(pl), 0, &pl);

if (pl != 0)
{
pl->result = (*pl->function) (pl->parameter);
pl->hasBeenExecuted = true;
}

return noErr;
}

static pascal OSStatus MouseClickHandlerProc (EventHandlerCallRef, EventRef theEvent, void* userData)
{
::Point where;
GetEventParameter (theEvent, kEventParamMouseLocation, typeQDPoint, 0, sizeof(::Point), 0, &where);
WindowRef window;
if (FindWindow (where, &window) == inMenuBar)
{
// turn off the wait cursor before going in here..
const int oldTimeBeforeWaitCursor = MessageManager::getInstance()->getTimeBeforeShowingWaitCursor();
MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (0);

if (Component::getCurrentlyModalComponent() != 0)
Component::getCurrentlyModalComponent()->inputAttemptWhenModal();

juce_MainMenuAboutToBeUsed();
MenuSelect (where);
HiliteMenu (0);

MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (oldTimeBeforeWaitCursor);
return noErr;
}

return eventNotHandledErr;
}

static pascal OSErr QuitAppleEventHandler (const AppleEvent *appleEvt, AppleEvent* reply, long refcon)
{
if (JUCEApplication::getInstance() != 0)
JUCEApplication::getInstance()->systemRequestedQuit();

return noErr;
}

static pascal OSErr OpenDocEventHandler (const AppleEvent *appleEvt, AppleEvent* reply, long refcon)
{
AEDescList docs;
StringArray files;

if (AEGetParamDesc (appleEvt, keyDirectObject, typeAEList, &docs) == noErr)
{
long num;
if (AECountItems (&docs, &num) == noErr)
{
for (int i = 1; i <= num; ++i)
{
FSRef file;
AEKeyword keyword;
DescType type;
Size size;

if (AEGetNthPtr (&docs, i, typeFSRef, &keyword, &type,
&file, sizeof (file), &size) == noErr)
{
const String path (PlatformUtilities::makePathFromFSRef (&file));

if (path.isNotEmpty())
files.add (path.quoted());
}
}

if (files.size() > 0
&& JUCEApplication::getInstance() != 0)
{
JUCE_TRY
{
JUCEApplication::getInstance()
->anotherInstanceStarted (files.joinIntoString (T(" ")));
}
JUCE_CATCH_ALL
}
}

AEDisposeDesc (&docs);
};

return noErr;
}

static pascal OSStatus AppEventHandlerProc (EventHandlerCallRef, EventRef theEvent, void* userData)
{
const UInt32 eventClass = GetEventClass (theEvent);

if (eventClass == kEventClassCommand)
{
HICommand command;

if (GetEventParameter (theEvent, kEventParamHICommand, typeHICommand, 0, sizeof (command), 0, &command) == noErr
|| GetEventParameter (theEvent, kEventParamDirectObject, typeHICommand, 0, sizeof (command), 0, &command) == noErr)
{
if (command.commandID == kHICommandQuit)
{
if (JUCEApplication::getInstance() != 0)
JUCEApplication::getInstance()->systemRequestedQuit();

return noErr;
}
else if (command.commandID == kHICommandMaximizeAll
|| command.commandID == kHICommandMaximizeWindow
|| command.commandID == kHICommandBringAllToFront)
{
juce_maximiseAllMinimisedWindows();
return noErr;
}
else
{
juce_InvokeMainMenuCommand (command);
}
}
}
else if (eventClass == kEventClassApplication)
{
if (GetEventKind (theEvent) == kEventAppFrontSwitched)
{
juce_HandleProcessFocusChange();
}
else if (GetEventKind (theEvent) == kEventAppShown)
{
// this seems to blank the windows, so we need to do a repaint..
for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;)
{
Component* const c = Desktop::getInstance().getComponent (i);

if (c != 0)
c->repaint();
}
}
}

return eventNotHandledErr;
}

static EventQueueRef mainQueue;
static EventHandlerRef juceEventHandler = 0;
static EventHandlerRef callbackEventHandler = 0;

#endif

//==============================================================================
void MessageManager::doPlatformSpecificInitialisation()
{
static bool initialised = false;

if (! initialised)
{
initialised = true;

#if JUCE_COCOA
// if we're linking a Juce app to one or more dynamic libraries, we'll need different values
// for this so each module doesn't interfere with the others.
UnsignedWide t;
Microseconds (&t);
kJUCEClass ^= t.lo;

juceMessageName = juceStringToNS ("juce_" + String::toHexString ((int) t.lo));

juceAppDelegate = [[JuceAppDelegate alloc] init];
#else
mainQueue = GetMainEventQueue();
#endif
}

#if ! JUCE_COCOA
const EventTypeSpec type1 = { kJUCEClass, kJUCEKind };
InstallApplicationEventHandler (NewEventHandlerUPP (EventHandlerProc), 1, &type1, 0, &juceEventHandler);

const EventTypeSpec type2 = { kJUCEClass, kCallbackKind };
InstallApplicationEventHandler (NewEventHandlerUPP (CallbackHandlerProc), 1, &type2, 0, &callbackEventHandler);

// only do this stuff if we're running as an application rather than a library..
if (JUCEApplication::getInstance() != 0)
{
const EventTypeSpec type3 = { kEventClassMouse, kEventMouseDown };
InstallApplicationEventHandler (NewEventHandlerUPP (MouseClickHandlerProc), 1, &type3, 0, 0);

const EventTypeSpec type4[] = { { kEventClassApplication, kEventAppShown },
{ kEventClassApplication, kEventAppFrontSwitched },
{ kEventClassCommand, kEventProcessCommand } };

InstallApplicationEventHandler (NewEventHandlerUPP (AppEventHandlerProc), 3, type4, 0, 0);

AEInstallEventHandler (kCoreEventClass, kAEQuitApplication,
NewAEEventHandlerUPP (QuitAppleEventHandler), 0, false);

AEInstallEventHandler (kCoreEventClass, kAEOpenDocuments,
NewAEEventHandlerUPP (OpenDocEventHandler), 0, false);
}
#endif
}

void MessageManager::doPlatformSpecificShutdown()
{
if (juceEventHandler != 0)
{
RemoveEventHandler (juceEventHandler);
juceEventHandler = 0;
}

if (callbackEventHandler != 0)
{
RemoveEventHandler (callbackEventHandler);
callbackEventHandler = 0;
}
}

bool juce_postMessageToSystemQueue (void* message)
{
#if JUCE_COCOA
[[NSNotificationCenter defaultCenter] postNotificationName: juceMessageName
object: [NSData dataWithBytes: &message
length: (int) sizeof (message)]];

return true;

#else
jassert (mainQueue == GetMainEventQueue());

EventRef event;
if (CreateEvent (0, kJUCEClass, kJUCEKind, 0, kEventAttributeUserEvent, &event) == noErr)
{
SetEventParameter (event, 'mess', typeVoidPtr, sizeof (void*), &message);
const bool ok = PostEventToQueue (mainQueue, event, kEventPriorityStandard) == noErr;
ReleaseEvent (event);
return ok;
}

return false;
#endif
}

void MessageManager::broadcastMessage (const String& value) throw()
{
}

void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback,
void* data)
{
if (isThisTheMessageThread())
{
return (*callback) (data);
}
else
{
CallbackMessagePayload cmp;
cmp.function = callback;
cmp.parameter = data;
cmp.result = 0;
cmp.hasBeenExecuted = false;

#if JUCE_COCOA
[juceAppDelegate performSelectorOnMainThread: @selector (performCallback:)
withObject: (id) &cmp
waitUntilDone: YES];

return cmp.result;

#else
jassert (mainQueue == GetMainEventQueue());

EventRef event;
if (CreateEvent (0, kJUCEClass, kCallbackKind, 0, kEventAttributeUserEvent, &event) == noErr)
{
void* v = &cmp;
SetEventParameter (event, 'mess', typeVoidPtr, sizeof (void*), &v);

if (PostEventToQueue (mainQueue, event, kEventPriorityStandard) == noErr)
{
while (! cmp.hasBeenExecuted)
Thread::yield();

return cmp.result;
}
}

return 0;
#endif
}
}

END_JUCE_NAMESPACE

+ 238
- 0
build/macosx/platform_specific_code/juce_mac_MiscUtilities.mm View File

@@ -0,0 +1,238 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE


//==============================================================================
ScopedAutoReleasePool::ScopedAutoReleasePool()
{
pool = [[NSAutoreleasePool alloc] init];
}

ScopedAutoReleasePool::~ScopedAutoReleasePool()
{
[((NSAutoreleasePool*) pool) release];
}

//==============================================================================
void PlatformUtilities::beep()
{
NSBeep();
}

//==============================================================================
bool AlertWindow::showNativeDialogBox (const String& title,
const String& bodyText,
bool isOkCancel)
{
const ScopedAutoReleasePool pool;
return NSRunAlertPanel (juceStringToNS (title),
juceStringToNS (bodyText),
@"Ok",
isOkCancel ? @"Cancel" : nil,
nil) == 0;
}

//==============================================================================
bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles)
{
if (files.size() == 0)
return false;

Component* sourceComp = Component::getComponentUnderMouse();
if (sourceComp == 0)
{
jassertfalse // this method must be called in response to a
// component's mouseDrag event!
return false;
}

const ScopedAutoReleasePool pool;

NSView* view = (NSView*) sourceComp->getWindowHandle();

if (view == 0)
return false;

NSPasteboard* pboard = [NSPasteboard pasteboardWithName: NSDragPboard];
[pboard declareTypes: [NSArray arrayWithObject: NSFilenamesPboardType]
owner: nil];

NSMutableArray* filesArray = [NSMutableArray arrayWithCapacity: 4];
for (int i = 0; i < files.size(); ++i)
[filesArray addObject: juceStringToNS (files[i])];

[pboard setPropertyList: filesArray
forType: NSFilenamesPboardType];

NSPoint dragPosition = [view convertPoint: [[[view window] currentEvent] locationInWindow]
fromView: nil];
dragPosition.x -= 16;
dragPosition.y -= 16;

[view dragImage: [[NSWorkspace sharedWorkspace] iconForFile: juceStringToNS (files[0])]
at: dragPosition
offset: NSMakeSize (0, 0)
event: [[view window] currentEvent]
pasteboard: pboard
source: view
slideBack: YES];

return true;
}

bool DragAndDropContainer::performExternalDragDropOfText (const String& text)
{
jassertfalse // not implemented!
return false;
}

//==============================================================================
bool Desktop::canUseSemiTransparentWindows() throw()
{
return true;
}

void Desktop::getMousePosition (int& x, int& y) throw()
{
const ScopedAutoReleasePool pool;
const NSPoint p ([NSEvent mouseLocation]);
x = roundFloatToInt (p.x);
y = roundFloatToInt ([[NSScreen mainScreen] frame].size.height - p.y);
}

void Desktop::setMousePosition (int x, int y) throw()
{
// this rubbish needs to be done around the warp call, to avoid causing a
// bizarre glitch..
CGAssociateMouseAndMouseCursorPosition (false);
CGSetLocalEventsSuppressionInterval (0);

CGPoint pos = { x, y };
CGWarpMouseCursorPosition (pos);

CGAssociateMouseAndMouseCursorPosition (true);
}

//==============================================================================
#if MACOS_10_4_OR_EARLIER
class ScreenSaverDefeater : public Timer,
public DeletedAtShutdown
{
public:
ScreenSaverDefeater() throw()
{
startTimer (10000);
timerCallback();
}

~ScreenSaverDefeater() {}

void timerCallback()
{
if (Process::isForegroundProcess())
UpdateSystemActivity (UsrActivity);
}
};

static ScreenSaverDefeater* screenSaverDefeater = 0;

void Desktop::setScreenSaverEnabled (const bool isEnabled) throw()
{
if (screenSaverDefeater == 0)
screenSaverDefeater = new ScreenSaverDefeater();
}

bool Desktop::isScreenSaverEnabled() throw()
{
return screenSaverDefeater == 0;
}

#else
//==============================================================================
static IOPMAssertionID screenSaverDisablerID = 0;

void Desktop::setScreenSaverEnabled (const bool isEnabled) throw()
{
if (isEnabled)
{
if (screenSaverDisablerID != 0)
{
IOPMAssertionRelease (screenSaverDisablerID);
screenSaverDisablerID = 0;
}
}
else
{
if (screenSaverDisablerID == 0)
{
IOPMAssertionCreate (kIOPMAssertionTypeNoIdleSleep,
kIOPMAssertionLevelOn, &screenSaverDisablerID);
}
}
}

bool Desktop::isScreenSaverEnabled() throw()
{
return screenSaverDisablerID == 0;
}

#endif

//==============================================================================
void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool clipToWorkArea) throw()
{
const ScopedAutoReleasePool pool;
monitorCoords.clear();
NSArray* screens = [NSScreen screens];
const float mainScreenBottom = [[NSScreen mainScreen] frame].size.height;

for (int i = 0; i < [screens count]; ++i)
{
NSScreen* s = (NSScreen*) [screens objectAtIndex: i];

NSRect r = clipToWorkArea ? [s visibleFrame]
: [s frame];

monitorCoords.add (Rectangle ((int) r.origin.x,
(int) (mainScreenBottom - (r.origin.y + r.size.height)),
(int) r.size.width,
(int) r.size.height));
}

jassert (monitorCoords.size() > 0);
}

#endif

+ 196
- 0
build/macosx/platform_specific_code/juce_mac_MouseCursor.mm View File

@@ -0,0 +1,196 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
static NSImage* juceImageToNSImage (const Image& image)
{
const ScopedAutoReleasePool pool;
int lineStride, pixelStride;
const uint8* pixels = image.lockPixelDataReadOnly (0, 0, image.getWidth(), image.getHeight(),
lineStride, pixelStride);
NSBitmapImageRep* rep = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes: NULL
pixelsWide: image.getWidth()
pixelsHigh: image.getHeight()
bitsPerSample: 8
samplesPerPixel: image.hasAlphaChannel() ? 4 : 3
hasAlpha: image.hasAlphaChannel()
isPlanar: NO
colorSpaceName: NSCalibratedRGBColorSpace
bitmapFormat: (NSBitmapFormat) 0
bytesPerRow: lineStride
bitsPerPixel: pixelStride * 8];
unsigned char* newData = [rep bitmapData];
memcpy (newData, pixels, lineStride * image.getHeight());
image.releasePixelDataReadOnly (pixels);
NSImage* im = [[NSImage alloc] init];
[im addRepresentation: rep];
[rep release];
return im;
}
//==============================================================================
void* juce_createMouseCursorFromImage (const Image& image, int hotspotX, int hotspotY) throw()
{
NSImage* im = juceImageToNSImage (image);
NSCursor* c = [[NSCursor alloc] initWithImage: im
hotSpot: NSMakePoint (hotspotX, hotspotY)];
[im release];
return (void*) c;
}
static void* juce_cursorFromData (const unsigned char* data, const int size, float hx, float hy) throw()
{
Image* const im = ImageFileFormat::loadFrom ((const char*) data, size);
jassert (im != 0);
if (im == 0)
return 0;
void* const curs = juce_createMouseCursorFromImage (*im,
(int) (hx * im->getWidth()),
(int) (hy * im->getHeight()));
delete im;
return curs;
}
static void* juce_cursorFromWebKitFile (const char* filename, float hx, float hy)
{
File f ("/System/Library/Frameworks/WebKit.framework/Frameworks/WebCore.framework/Resources");
MemoryBlock mb;
if (f.getChildFile (filename).loadFileAsData (mb))
return juce_cursorFromData ((const unsigned char*) mb.getData(), mb.getSize(), hx, hy);
return 0;
}
void* juce_createStandardMouseCursor (MouseCursor::StandardCursorType type) throw()
{
const ScopedAutoReleasePool pool;
NSCursor* c = 0;
switch (type)
{
case MouseCursor::NormalCursor:
c = [NSCursor arrowCursor];
break;
case MouseCursor::NoCursor:
{
Image blank (Image::ARGB, 8, 8, true);
return juce_createMouseCursorFromImage (blank, 0, 0);
}
case MouseCursor::DraggingHandCursor:
c = [NSCursor openHandCursor];
break;
case MouseCursor::CopyingCursor:
return juce_cursorFromWebKitFile ("copyCursor.png", 0, 0);
case MouseCursor::WaitCursor:
c = [NSCursor arrowCursor]; // avoid this on the mac, let the OS provide the beachball
break;
//return juce_cursorFromWebKitFile ("waitCursor.png", 0.5f, 0.5f);
case MouseCursor::IBeamCursor:
c = [NSCursor IBeamCursor];
break;
case MouseCursor::PointingHandCursor:
c = [NSCursor pointingHandCursor];
break;
case MouseCursor::LeftRightResizeCursor:
c = [NSCursor resizeLeftRightCursor];
break;
case MouseCursor::LeftEdgeResizeCursor:
c = [NSCursor resizeLeftCursor];
break;
case MouseCursor::RightEdgeResizeCursor:
c = [NSCursor resizeRightCursor];
break;
case MouseCursor::UpDownResizeCursor:
case MouseCursor::TopEdgeResizeCursor:
case MouseCursor::BottomEdgeResizeCursor:
return juce_cursorFromWebKitFile ("northSouthResizeCursor.png", 0.5f, 0.5f);
case MouseCursor::TopLeftCornerResizeCursor:
case MouseCursor::BottomRightCornerResizeCursor:
return juce_cursorFromWebKitFile ("northWestSouthEastResizeCursor.png", 0.5f, 0.5f);
case MouseCursor::TopRightCornerResizeCursor:
case MouseCursor::BottomLeftCornerResizeCursor:
return juce_cursorFromWebKitFile ("northEastSouthWestResizeCursor.png", 0.5f, 0.5f);
case MouseCursor::UpDownLeftRightResizeCursor:
return juce_cursorFromWebKitFile ("moveCursor.png", 0.5f, 0.5f);
case MouseCursor::CrosshairCursor:
c = [NSCursor crosshairCursor];
break;
}
[c retain];
return (void*) c;
}
void juce_deleteMouseCursor (void* const cursorHandle, const bool isStandard) throw()
{
NSCursor* c = (NSCursor*) cursorHandle;
[c release];
}
void MouseCursor::showInAllWindows() const throw()
{
showInWindow (0);
}
void MouseCursor::showInWindow (ComponentPeer*) const throw()
{
NSCursor* const c = (NSCursor*) getHandle();
[c set];
}
#endif

+ 149
- 0
build/macosx/platform_specific_code/juce_mac_NSViewComponent.mm View File

@@ -0,0 +1,149 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
class NSViewComponentInternal : public ComponentMovementWatcher
{
Component* const owner;
NSViewComponentPeer* currentPeer;
bool wasShowing;
public:
NSView* view;
//==============================================================================
NSViewComponentInternal (NSView* view_, Component* const owner_)
: ComponentMovementWatcher (owner_),
owner (owner_),
wasShowing (false),
currentPeer (0),
view (view_)
{
[view retain];
if (owner_->isShowing())
componentPeerChanged();
}
~NSViewComponentInternal()
{
[view removeFromSuperview];
[view release];
}
//==============================================================================
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
{
Component* const topComp = owner->getTopLevelComponent();
if (topComp->getPeer() != 0)
{
int x = 0, y = 0;
owner->relativePositionToOtherComponent (topComp, x, y);
NSRect r;
r.origin.x = (float) x;
r.origin.y = (float) y;
r.size.width = (float) owner->getWidth();
r.size.height = (float) owner->getHeight();
r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height);
[view setFrame: r];
}
}
void componentPeerChanged()
{
NSViewComponentPeer* const peer = dynamic_cast <NSViewComponentPeer*> (owner->getPeer());
if (currentPeer != peer)
{
[view removeFromSuperview];
currentPeer = peer;
if (peer != 0)
{
[peer->view addSubview: view];
componentMovedOrResized (false, false);
}
}
[view setHidden: ! owner->isShowing()];
}
void componentVisibilityChanged (Component&)
{
componentPeerChanged();
}
juce_UseDebuggingNewOperator
private:
NSViewComponentInternal (const NSViewComponentInternal&);
const NSViewComponentInternal& operator= (const NSViewComponentInternal&);
};
//==============================================================================
NSViewComponent::NSViewComponent()
: info (0)
{
}
NSViewComponent::~NSViewComponent()
{
delete info;
}
void NSViewComponent::setView (void* view)
{
if (view != getView())
{
deleteAndZero (info);
if (view != 0)
info = new NSViewComponentInternal ((NSView*) view, this);
}
}
void* NSViewComponent::getView() const
{
return info == 0 ? 0 : info->view;
}
void NSViewComponent::paint (Graphics& g)
{
}
#endif

+ 1258
- 0
build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm
File diff suppressed because it is too large
View File


+ 236
- 236
build/macosx/platform_specific_code/juce_mac_NamedPipe.cpp View File

@@ -1,236 +1,236 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
#include <sys/stat.h>
#include <sys/dir.h>
#include <fcntl.h>
// As well as being for the mac, this file is included by the linux build.
#if ! JUCE_MAC
#include <sys/wait.h>
#include <errno.h>
#include <unistd.h>
#endif
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/io/files/juce_File.h"
#include "../../../src/juce_core/io/files/juce_NamedPipe.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
//==============================================================================
struct NamedPipeInternal
{
String pipeInName, pipeOutName;
int pipeIn, pipeOut;
bool volatile createdPipe, blocked, stopReadOperation;
static void signalHandler (int) {}
};
void NamedPipe::cancelPendingReads()
{
while (internal != 0 && ((NamedPipeInternal*) internal)->blocked)
{
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
intern->stopReadOperation = true;
char buffer [1] = { 0 };
::write (intern->pipeIn, buffer, 1);
int timeout = 2000;
while (intern->blocked && --timeout >= 0)
Thread::sleep (2);
intern->stopReadOperation = false;
}
}
void NamedPipe::close()
{
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
if (intern != 0)
{
internal = 0;
if (intern->pipeIn != -1)
::close (intern->pipeIn);
if (intern->pipeOut != -1)
::close (intern->pipeOut);
if (intern->createdPipe)
{
unlink (intern->pipeInName);
unlink (intern->pipeOutName);
}
delete intern;
}
}
bool NamedPipe::openInternal (const String& pipeName, const bool createPipe)
{
close();
NamedPipeInternal* const intern = new NamedPipeInternal();
internal = intern;
intern->createdPipe = createPipe;
intern->blocked = false;
intern->stopReadOperation = false;
signal (SIGPIPE, NamedPipeInternal::signalHandler);
siginterrupt (SIGPIPE, 1);
const String pipePath (T("/tmp/") + File::createLegalFileName (pipeName));
intern->pipeInName = pipePath + T("_in");
intern->pipeOutName = pipePath + T("_out");
intern->pipeIn = -1;
intern->pipeOut = -1;
if (createPipe)
{
if ((mkfifo (intern->pipeInName, 0666) && errno != EEXIST)
|| (mkfifo (intern->pipeOutName, 0666) && errno != EEXIST))
{
delete intern;
internal = 0;
return false;
}
}
return true;
}
int NamedPipe::read (void* destBuffer, int maxBytesToRead, int /*timeOutMilliseconds*/)
{
int bytesRead = -1;
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
if (intern != 0)
{
intern->blocked = true;
if (intern->pipeIn == -1)
{
if (intern->createdPipe)
intern->pipeIn = ::open (intern->pipeInName, O_RDWR);
else
intern->pipeIn = ::open (intern->pipeOutName, O_RDWR);
if (intern->pipeIn == -1)
{
intern->blocked = false;
return -1;
}
}
bytesRead = 0;
char* p = (char*) destBuffer;
while (bytesRead < maxBytesToRead)
{
const int bytesThisTime = maxBytesToRead - bytesRead;
const int numRead = ::read (intern->pipeIn, p, bytesThisTime);
if (numRead <= 0 || intern->stopReadOperation)
{
bytesRead = -1;
break;
}
bytesRead += numRead;
p += bytesRead;
}
intern->blocked = false;
}
return bytesRead;
}
int NamedPipe::write (const void* sourceBuffer, int numBytesToWrite, int timeOutMilliseconds)
{
int bytesWritten = -1;
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
if (intern != 0)
{
if (intern->pipeOut == -1)
{
if (intern->createdPipe)
intern->pipeOut = ::open (intern->pipeOutName, O_WRONLY);
else
intern->pipeOut = ::open (intern->pipeInName, O_WRONLY);
if (intern->pipeOut == -1)
{
return -1;
}
}
const char* p = (const char*) sourceBuffer;
bytesWritten = 0;
const uint32 timeOutTime = Time::getMillisecondCounter() + timeOutMilliseconds;
while (bytesWritten < numBytesToWrite
&& (timeOutMilliseconds < 0 || Time::getMillisecondCounter() < timeOutTime))
{
const int bytesThisTime = numBytesToWrite - bytesWritten;
const int numWritten = ::write (intern->pipeOut, p, bytesThisTime);
if (numWritten <= 0)
{
bytesWritten = -1;
break;
}
bytesWritten += numWritten;
p += bytesWritten;
}
}
return bytesWritten;
}
END_JUCE_NAMESPACE
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
#include <sys/stat.h>
#include <sys/dir.h>
#include <fcntl.h>
// As well as being for the mac, this file is included by the linux build.
#if ! JUCE_MAC
#include <sys/wait.h>
#include <errno.h>
#include <unistd.h>
#endif
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/io/files/juce_File.h"
#include "../../../src/juce_core/io/files/juce_NamedPipe.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
//==============================================================================
struct NamedPipeInternal
{
String pipeInName, pipeOutName;
int pipeIn, pipeOut;
bool volatile createdPipe, blocked, stopReadOperation;
static void signalHandler (int) {}
};
void NamedPipe::cancelPendingReads()
{
while (internal != 0 && ((NamedPipeInternal*) internal)->blocked)
{
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
intern->stopReadOperation = true;
char buffer [1] = { 0 };
::write (intern->pipeIn, buffer, 1);
int timeout = 2000;
while (intern->blocked && --timeout >= 0)
Thread::sleep (2);
intern->stopReadOperation = false;
}
}
void NamedPipe::close()
{
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
if (intern != 0)
{
internal = 0;
if (intern->pipeIn != -1)
::close (intern->pipeIn);
if (intern->pipeOut != -1)
::close (intern->pipeOut);
if (intern->createdPipe)
{
unlink (intern->pipeInName);
unlink (intern->pipeOutName);
}
delete intern;
}
}
bool NamedPipe::openInternal (const String& pipeName, const bool createPipe)
{
close();
NamedPipeInternal* const intern = new NamedPipeInternal();
internal = intern;
intern->createdPipe = createPipe;
intern->blocked = false;
intern->stopReadOperation = false;
signal (SIGPIPE, NamedPipeInternal::signalHandler);
siginterrupt (SIGPIPE, 1);
const String pipePath (T("/tmp/") + File::createLegalFileName (pipeName));
intern->pipeInName = pipePath + T("_in");
intern->pipeOutName = pipePath + T("_out");
intern->pipeIn = -1;
intern->pipeOut = -1;
if (createPipe)
{
if ((mkfifo (intern->pipeInName, 0666) && errno != EEXIST)
|| (mkfifo (intern->pipeOutName, 0666) && errno != EEXIST))
{
delete intern;
internal = 0;
return false;
}
}
return true;
}
int NamedPipe::read (void* destBuffer, int maxBytesToRead, int /*timeOutMilliseconds*/)
{
int bytesRead = -1;
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
if (intern != 0)
{
intern->blocked = true;
if (intern->pipeIn == -1)
{
if (intern->createdPipe)
intern->pipeIn = ::open (intern->pipeInName, O_RDWR);
else
intern->pipeIn = ::open (intern->pipeOutName, O_RDWR);
if (intern->pipeIn == -1)
{
intern->blocked = false;
return -1;
}
}
bytesRead = 0;
char* p = (char*) destBuffer;
while (bytesRead < maxBytesToRead)
{
const int bytesThisTime = maxBytesToRead - bytesRead;
const int numRead = ::read (intern->pipeIn, p, bytesThisTime);
if (numRead <= 0 || intern->stopReadOperation)
{
bytesRead = -1;
break;
}
bytesRead += numRead;
p += bytesRead;
}
intern->blocked = false;
}
return bytesRead;
}
int NamedPipe::write (const void* sourceBuffer, int numBytesToWrite, int timeOutMilliseconds)
{
int bytesWritten = -1;
NamedPipeInternal* const intern = (NamedPipeInternal*) internal;
if (intern != 0)
{
if (intern->pipeOut == -1)
{
if (intern->createdPipe)
intern->pipeOut = ::open (intern->pipeOutName, O_WRONLY);
else
intern->pipeOut = ::open (intern->pipeInName, O_WRONLY);
if (intern->pipeOut == -1)
{
return -1;
}
}
const char* p = (const char*) sourceBuffer;
bytesWritten = 0;
const uint32 timeOutTime = Time::getMillisecondCounter() + timeOutMilliseconds;
while (bytesWritten < numBytesToWrite
&& (timeOutMilliseconds < 0 || Time::getMillisecondCounter() < timeOutTime))
{
const int bytesThisTime = numBytesToWrite - bytesWritten;
const int numWritten = ::write (intern->pipeOut, p, bytesThisTime);
if (numWritten <= 0)
{
bytesWritten = -1;
break;
}
bytesWritten += numWritten;
p += bytesWritten;
}
}
return bytesWritten;
}
END_JUCE_NAMESPACE

+ 111
- 0
build/macosx/platform_specific_code/juce_mac_NativeCode.mm View File

@@ -0,0 +1,111 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

/*
This file wraps together all the mac-specific code, so that
we can include all the native headers just once, and compile all our
platform-specific stuff in one big lump, keeping it out of the way of
the rest of the codebase.
*/

#include "juce_mac_NativeIncludes.h"


BEGIN_JUCE_NAMESPACE

//==============================================================================
#include "../../../src/juce_core/basics/juce_Singleton.h"
#include "../../../src/juce_core/basics/juce_Random.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/threads/juce_Process.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_core/threads/juce_InterProcessLock.h"
#include "../../../src/juce_core/io/files/juce_FileInputStream.h"
#include "../../../src/juce_core/io/network/juce_URL.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/text/juce_LocalisedStrings.h"
#include "../../../src/juce_appframework/application/juce_DeletedAtShutdown.h"
#include "../../../src/juce_appframework/application/juce_Application.h"
#include "../../../src/juce_appframework/application/juce_SystemClipboard.h"
#include "../../../src/juce_appframework/events/juce_MessageManager.h"
#include "../../../src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h"
#include "../../../src/juce_appframework/gui/graphics/imaging/juce_ImageFileFormat.h"
#include "../../../src/juce_appframework/gui/components/windows/juce_AlertWindow.h"
#include "../../../src/juce_appframework/gui/components/juce_Desktop.h"
#include "../../../src/juce_appframework/gui/components/menus/juce_MenuBarModel.h"
#include "../../../src/juce_appframework/gui/components/special/juce_OpenGLComponent.h"
#include "../../../src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.h"
#include "../../../src/juce_appframework/gui/components/mouse/juce_DragAndDropContainer.h"
#include "../../../src/juce_appframework/gui/components/keyboard/juce_KeyPressMappingSet.h"
#include "../../../src/juce_appframework/gui/components/special/juce_NSViewComponent.h"
#include "../../../src/juce_appframework/gui/components/layout/juce_ComponentMovementWatcher.h"
#include "../../../src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h"
#include "../../../src/juce_appframework/gui/components/filebrowser/juce_FileChooser.h"
#include "../../../src/juce_appframework/audio/audio_file_formats/juce_AudioCDBurner.h"
#include "../../../src/juce_appframework/audio/audio_sources/juce_AudioSource.h"
#include "../../../src/juce_appframework/audio/dsp/juce_AudioDataConverters.h"
#include "../../../src/juce_appframework/audio/devices/juce_AudioIODeviceType.h"
#include "../../../src/juce_appframework/audio/devices/juce_MidiOutput.h"
#include "../../../src/juce_appframework/audio/devices/juce_MidiInput.h"
#undef Point

//==============================================================================
#define JUCE_INCLUDED_FILE 1

// Now include the actual code files..

#include "juce_mac_Strings.mm"
#include "juce_mac_SystemStats.mm"
#include "juce_mac_Network.mm"
#include "juce_mac_Threads.mm"
#include "juce_posix_SharedCode.h"
#include "juce_mac_Files.mm"
#include "juce_mac_MiscUtilities.mm"
#include "juce_mac_Debugging.mm"

#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
#include "juce_mac_NSViewComponentPeer.mm"
#include "juce_mac_MouseCursor.mm"
#include "juce_mac_NSViewComponent.mm"
#include "juce_mac_AppleRemote.mm"
#include "juce_mac_OpenGLComponent.mm"
#include "juce_mac_MainMenu.mm"
#include "juce_mac_FileChooser.mm"
#include "juce_mac_QuickTimeMovieComponent.mm"
#include "juce_mac_AudioCDBurner.mm"
#include "juce_mac_Fonts.mm"
#include "juce_mac_MessageManager.mm"
#include "juce_mac_WebBrowserComponent.mm"
#include "juce_mac_CoreAudio.cpp"
#include "juce_mac_CoreMidi.cpp"
#endif

END_JUCE_NAMESPACE

+ 1
- 1
build/macosx/platform_specific_code/juce_mac_NativeHeaders.h View File

@@ -64,4 +64,4 @@ static NSString* juceStringToNS (const JUCE_NAMESPACE::String& s)
}
#endif
#endif // __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__

+ 73
- 0
build/macosx/platform_specific_code/juce_mac_NativeIncludes.h View File

@@ -0,0 +1,73 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#ifndef __JUCE_MAC_NATIVEINCLUDES_JUCEHEADER__
#define __JUCE_MAC_NATIVEINCLUDES_JUCEHEADER__
/*
This file wraps together all the mac-specific code, so that
we can include all the native headers just once, and compile all our
platform-specific stuff in one big lump, keeping it out of the way of
the rest of the codebase.
*/
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
#import <Cocoa/Cocoa.h>
#import <CoreAudio/HostTime.h>
#import <CoreAudio/AudioHardware.h>
#import <CoreMIDI/MIDIServices.h>
#import <QTKit/QTKit.h>
#import <WebKit/WebKit.h>
#import <DiscRecording/DiscRecording.h>
#import <ApplicationServices/ApplicationServices.h>
#import <IOKit/IOKitLib.h>
#import <IOKit/IOCFPlugIn.h>
#import <IOKit/hid/IOHIDLib.h>
#import <IOKit/hid/IOHIDKeys.h>
#import <IOKit/network/IOEthernetInterface.h>
#import <IOKit/network/IONetworkInterface.h>
#import <IOKit/network/IOEthernetController.h>
#import <IOKit/pwr_mgt/IOPMLib.h>
#include <sys/sysctl.h>
#include <sys/stat.h>
#include <sys/dir.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <fnmatch.h>
#include <utime.h>
#if MACOS_10_4_OR_EARLIER
#include <GLUT/glut.h>
#endif
#endif // __JUCE_MAC_NATIVEINCLUDES_JUCEHEADER__

+ 449
- 469
build/macosx/platform_specific_code/juce_mac_Network.mm View File

@@ -1,469 +1,449 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

#include "juce_mac_NativeHeaders.h"

#include <IOKit/IOKitLib.h>
#include <IOKit/network/IOEthernetInterface.h>
#include <IOKit/network/IONetworkInterface.h>
#include <IOKit/network/IOEthernetController.h>

BEGIN_JUCE_NAMESPACE

#include "../../../src/juce_core/text/juce_String.h"
#include "../../../src/juce_core/basics/juce_Time.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/basics/juce_Logger.h"
#include "../../../src/juce_core/threads/juce_ScopedLock.h"
#include "../../../src/juce_core/threads/juce_WaitableEvent.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_core/containers/juce_MemoryBlock.h"
#include "../../../src/juce_core/text/juce_StringArray.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/io/network/juce_URL.h"

//#include "juce_mac_HTTPStream.h"

//==============================================================================
static bool GetEthernetIterator (io_iterator_t* matchingServices) throw()
{
mach_port_t masterPort;

if (IOMasterPort (MACH_PORT_NULL, &masterPort) == KERN_SUCCESS)
{
CFMutableDictionaryRef dict = IOServiceMatching (kIOEthernetInterfaceClass);

if (dict != 0)
{
CFMutableDictionaryRef propDict = CFDictionaryCreateMutable (kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);

if (propDict != 0)
{
CFDictionarySetValue (propDict, CFSTR (kIOPrimaryInterface), kCFBooleanTrue);

CFDictionarySetValue (dict, CFSTR (kIOPropertyMatchKey), propDict);
CFRelease (propDict);
}
}

return IOServiceGetMatchingServices (masterPort, dict, matchingServices) == KERN_SUCCESS;
}

return false;
}

int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littleEndian) throw()
{
int numResults = 0;
io_iterator_t it;

if (GetEthernetIterator (&it))
{
io_object_t i;

while ((i = IOIteratorNext (it)) != 0)
{
io_object_t controller;

if (IORegistryEntryGetParentEntry (i, kIOServicePlane, &controller) == KERN_SUCCESS)
{
CFTypeRef data = IORegistryEntryCreateCFProperty (controller,
CFSTR (kIOMACAddress),
kCFAllocatorDefault,
0);
if (data != 0)
{
UInt8 addr [kIOEthernetAddressSize];
zeromem (addr, sizeof (addr));

CFDataGetBytes ((CFDataRef) data, CFRangeMake (0, sizeof (addr)), addr);
CFRelease (data);

int64 a = 0;
for (int i = 6; --i >= 0;)
a = (a << 8) | addr[i];

if (! littleEndian)
a = (int64) swapByteOrder ((uint64) a);

if (numResults < maxNum)
{
*addresses++ = a;
++numResults;
}
}

IOObjectRelease (controller);
}

IOObjectRelease (i);
}

IOObjectRelease (it);
}

return numResults;
}

//==============================================================================
bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAddress,
const String& emailSubject,
const String& bodyText,
const StringArray& filesToAttach)
{
const AutoPool pool;

String script;
script << "tell application \"Mail\"\r\n"
"set newMessage to make new outgoing message with properties {subject:\""
<< emailSubject.replace (T("\""), T("\\\""))
<< "\", content:\""
<< bodyText.replace (T("\""), T("\\\""))
<< "\" & return & return}\r\n"
"tell newMessage\r\n"
"set visible to true\r\n"
"set sender to \"sdfsdfsdfewf\"\r\n"
"make new to recipient at end of to recipients with properties {address:\""
<< targetEmailAddress
<< "\"}\r\n";

for (int i = 0; i < filesToAttach.size(); ++i)
{
script << "tell content\r\n"
"make new attachment with properties {file name:\""
<< filesToAttach[i].replace (T("\""), T("\\\""))
<< "\"} at after the last paragraph\r\n"
"end tell\r\n";
}

script << "end tell\r\n"
"end tell\r\n";

NSAppleScript* s = [[NSAppleScript alloc]
initWithSource: [NSString stringWithUTF8String: (const char*) script.toUTF8()]];
NSDictionary* error = 0;
const bool ok = [s executeAndReturnError: &error] != nil;
[s release];

return ok;
}

//==============================================================================
END_JUCE_NAMESPACE

using namespace JUCE_NAMESPACE;

//==============================================================================
@interface JuceURLConnection : NSObject
{
NSURLRequest* request;
NSURLConnection* connection;
NSMutableData* data;
Thread* runLoopThread;
bool initialised, hasFailed, hasFinished;
int position;
NSLock* dataLock;
}

- (JuceURLConnection*) initWithRequest: (NSURLRequest*) req withCallback: (URL::OpenStreamProgressCallback*) callback withContext: (void*) context;
- (void) dealloc;
- (void) connection: (NSURLConnection*) connection didReceiveResponse: (NSURLResponse*) response;
- (void) connection: (NSURLConnection*) connection didFailWithError: (NSError*) error;
- (void) connection: (NSURLConnection*) connection didReceiveData: (NSData*) data;
- (void) connectionDidFinishLoading: (NSURLConnection*) connection;

- (BOOL) isOpen;
- (int) read: (char*) dest numBytes: (int) num;
- (int) readPosition;
- (void) stop;
- (void) createConnection;

@end

class JuceURLConnectionMessageThread : public Thread
{
JuceURLConnection* owner;
public:
JuceURLConnectionMessageThread (JuceURLConnection* owner_)
: Thread (T("http connection")),
owner (owner_)
{
startThread();
}

~JuceURLConnectionMessageThread()
{
stopThread (5000);
}

void run()
{
AutoPool pool;
[owner createConnection];

while (! threadShouldExit())
{
AutoPool pool;
[[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.01]];
}
}
};

@implementation JuceURLConnection

- (JuceURLConnection*) initWithRequest: (NSURLRequest*) req
withCallback: (URL::OpenStreamProgressCallback*) callback
withContext: (void*) context;
{
[super init];
request = req;
[request retain];
data = [[NSMutableData data] retain];
dataLock = [[NSLock alloc] init];
connection = 0;
initialised = false;
hasFailed = false;
hasFinished = false;

runLoopThread = new JuceURLConnectionMessageThread (self);

while (runLoopThread->isThreadRunning() && ! initialised)
{
if (callback != 0)
callback (context, -1, [[request HTTPBody] length]);

Thread::sleep (1);
}

return self;
}

- (void) dealloc
{
[self stop];

delete runLoopThread;
[connection release];
[data release];
[dataLock release];
[request release];
[super dealloc];
}

- (void) createConnection
{
connection = [[NSURLConnection alloc] initWithRequest: request
delegate: self];

if (connection == nil)
runLoopThread->signalThreadShouldExit();
}

- (void) connection: (NSURLConnection*) connection didReceiveResponse: (NSURLResponse*) response
{
[dataLock lock];
[data setLength: 0];
[dataLock unlock];
initialised = true;
}

- (void) connection: (NSURLConnection*) connection didFailWithError: (NSError*) error
{
NSLog ([error description]);
hasFailed = true;
initialised = true;
runLoopThread->signalThreadShouldExit();
}

- (void) connection: (NSURLConnection*) connection didReceiveData: (NSData*) newData
{
[dataLock lock];
[data appendData: newData];
[dataLock unlock];
initialised = true;
}

- (void) connectionDidFinishLoading: (NSURLConnection*) connection
{
hasFinished = true;
initialised = true;
runLoopThread->signalThreadShouldExit();
}

- (BOOL) isOpen
{
return connection != 0 && ! hasFailed;
}

- (int) readPosition
{
return position;
}

- (int) read: (char*) dest numBytes: (int) numNeeded
{
int numDone = 0;
while (numNeeded > 0)
{
int available = jmin (numNeeded, [data length]);

if (available > 0)
{
[dataLock lock];
[data getBytes: dest length: available];
[data replaceBytesInRange: NSMakeRange (0, available) withBytes: nil length: 0];
[dataLock unlock];
numDone += available;
numNeeded -= available;
dest += available;
}
else
{
if (hasFailed || hasFinished)
break;

Thread::sleep (1);
}
}

position += numDone;
return numDone;
}

- (void) stop
{
[connection cancel];
runLoopThread->stopThread (5000);
}

@end
BEGIN_JUCE_NAMESPACE


bool juce_isOnLine()
{
return true;
}

void* juce_openInternetFile (const String& url,
const String& headers,
const MemoryBlock& postData,
const bool isPost,
URL::OpenStreamProgressCallback* callback,
void* callbackContext,
int timeOutMs)
{
AutoPool pool;

NSMutableURLRequest* req = [NSMutableURLRequest
requestWithURL: [NSURL URLWithString: juceStringToNS (url)]
cachePolicy: NSURLRequestUseProtocolCachePolicy
timeoutInterval: timeOutMs <= 0 ? 60.0 : (timeOutMs / 1000.0)];

if (req == nil)
return 0;

[req setHTTPMethod: isPost ? @"POST" : @"GET"];
//[req setCachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheData];

StringArray headerLines;
headerLines.addLines (headers);
headerLines.removeEmptyStrings (true);

for (int i = 0; i < headerLines.size(); ++i)
{
const String key (headerLines[i].upToFirstOccurrenceOf (T(":"), false, false).trim());
const String value (headerLines[i].fromFirstOccurrenceOf (T(":"), false, false).trim());

if (key.isNotEmpty() && value.isNotEmpty())
[req addValue: juceStringToNS (value) forHTTPHeaderField: juceStringToNS (key)];
}

if (isPost && postData.getSize() > 0)
{
[req setHTTPBody: [NSData dataWithBytes: postData.getData()
length: postData.getSize()]];
}

JuceURLConnection* const s = [[JuceURLConnection alloc] initWithRequest: req
withCallback: callback
withContext: callbackContext];

if ([s isOpen])
return s;

[s release];
return 0;
}

void juce_closeInternetFile (void* handle)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;
if (s != 0)
{
AutoPool pool;
[s stop];
[s release];
}
}

int juce_readFromInternetFile (void* handle, void* buffer, int bytesToRead)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;
if (s != 0)
{
AutoPool pool;
return [s read: (char*) buffer numBytes: bytesToRead];
}

return 0;
}

int juce_seekInInternetFile (void* handle, int newPosition)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;
if (s != 0)
return [s readPosition];

return 0;
}


END_JUCE_NAMESPACE
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
//==============================================================================
static bool getEthernetIterator (io_iterator_t* matchingServices) throw()
{
mach_port_t masterPort;
if (IOMasterPort (MACH_PORT_NULL, &masterPort) == KERN_SUCCESS)
{
CFMutableDictionaryRef dict = IOServiceMatching (kIOEthernetInterfaceClass);
if (dict != 0)
{
CFMutableDictionaryRef propDict = CFDictionaryCreateMutable (kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
if (propDict != 0)
{
CFDictionarySetValue (propDict, CFSTR (kIOPrimaryInterface), kCFBooleanTrue);
CFDictionarySetValue (dict, CFSTR (kIOPropertyMatchKey), propDict);
CFRelease (propDict);
}
}
return IOServiceGetMatchingServices (masterPort, dict, matchingServices) == KERN_SUCCESS;
}
return false;
}
int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littleEndian) throw()
{
int numResults = 0;
io_iterator_t it;
if (getEthernetIterator (&it))
{
io_object_t i;
while ((i = IOIteratorNext (it)) != 0)
{
io_object_t controller;
if (IORegistryEntryGetParentEntry (i, kIOServicePlane, &controller) == KERN_SUCCESS)
{
CFTypeRef data = IORegistryEntryCreateCFProperty (controller,
CFSTR (kIOMACAddress),
kCFAllocatorDefault,
0);
if (data != 0)
{
UInt8 addr [kIOEthernetAddressSize];
zeromem (addr, sizeof (addr));
CFDataGetBytes ((CFDataRef) data, CFRangeMake (0, sizeof (addr)), addr);
CFRelease (data);
int64 a = 0;
for (int i = 6; --i >= 0;)
a = (a << 8) | addr[i];
if (! littleEndian)
a = (int64) swapByteOrder ((uint64) a);
if (numResults < maxNum)
{
*addresses++ = a;
++numResults;
}
}
IOObjectRelease (controller);
}
IOObjectRelease (i);
}
IOObjectRelease (it);
}
return numResults;
}
//==============================================================================
bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAddress,
const String& emailSubject,
const String& bodyText,
const StringArray& filesToAttach)
{
const ScopedAutoReleasePool pool;
String script;
script << "tell application \"Mail\"\r\n"
"set newMessage to make new outgoing message with properties {subject:\""
<< emailSubject.replace (T("\""), T("\\\""))
<< "\", content:\""
<< bodyText.replace (T("\""), T("\\\""))
<< "\" & return & return}\r\n"
"tell newMessage\r\n"
"set visible to true\r\n"
"set sender to \"sdfsdfsdfewf\"\r\n"
"make new to recipient at end of to recipients with properties {address:\""
<< targetEmailAddress
<< "\"}\r\n";
for (int i = 0; i < filesToAttach.size(); ++i)
{
script << "tell content\r\n"
"make new attachment with properties {file name:\""
<< filesToAttach[i].replace (T("\""), T("\\\""))
<< "\"} at after the last paragraph\r\n"
"end tell\r\n";
}
script << "end tell\r\n"
"end tell\r\n";
NSAppleScript* s = [[NSAppleScript alloc]
initWithSource: juceStringToNS (script)];
NSDictionary* error = 0;
const bool ok = [s executeAndReturnError: &error] != nil;
[s release];
return ok;
}
//==============================================================================
END_JUCE_NAMESPACE
using namespace JUCE_NAMESPACE;
//==============================================================================
@interface JuceURLConnection : NSObject
{
NSURLRequest* request;
NSURLConnection* connection;
NSMutableData* data;
Thread* runLoopThread;
bool initialised, hasFailed, hasFinished;
int position;
NSLock* dataLock;
}
- (JuceURLConnection*) initWithRequest: (NSURLRequest*) req withCallback: (URL::OpenStreamProgressCallback*) callback withContext: (void*) context;
- (void) dealloc;
- (void) connection: (NSURLConnection*) connection didReceiveResponse: (NSURLResponse*) response;
- (void) connection: (NSURLConnection*) connection didFailWithError: (NSError*) error;
- (void) connection: (NSURLConnection*) connection didReceiveData: (NSData*) data;
- (void) connectionDidFinishLoading: (NSURLConnection*) connection;
- (BOOL) isOpen;
- (int) read: (char*) dest numBytes: (int) num;
- (int) readPosition;
- (void) stop;
- (void) createConnection;
@end
class JuceURLConnectionMessageThread : public Thread
{
JuceURLConnection* owner;
public:
JuceURLConnectionMessageThread (JuceURLConnection* owner_)
: Thread (T("http connection")),
owner (owner_)
{
startThread();
}
~JuceURLConnectionMessageThread()
{
stopThread (10000);
}
void run()
{
[owner createConnection];
while (! threadShouldExit())
{
const ScopedAutoReleasePool pool;
[[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.01]];
}
}
};
@implementation JuceURLConnection
- (JuceURLConnection*) initWithRequest: (NSURLRequest*) req
withCallback: (URL::OpenStreamProgressCallback*) callback
withContext: (void*) context;
{
[super init];
request = req;
[request retain];
data = [[NSMutableData data] retain];
dataLock = [[NSLock alloc] init];
connection = 0;
initialised = false;
hasFailed = false;
hasFinished = false;
runLoopThread = new JuceURLConnectionMessageThread (self);
while (runLoopThread->isThreadRunning() && ! initialised)
{
if (callback != 0)
callback (context, -1, [[request HTTPBody] length]);
Thread::sleep (1);
}
return self;
}
- (void) dealloc
{
[self stop];
delete runLoopThread;
[connection release];
[data release];
[dataLock release];
[request release];
[super dealloc];
}
- (void) createConnection
{
connection = [[NSURLConnection alloc] initWithRequest: request
delegate: self];
if (connection == nil)
runLoopThread->signalThreadShouldExit();
}
- (void) connection: (NSURLConnection*) connection didReceiveResponse: (NSURLResponse*) response
{
[dataLock lock];
[data setLength: 0];
[dataLock unlock];
initialised = true;
}
- (void) connection: (NSURLConnection*) connection didFailWithError: (NSError*) error
{
NSLog ([error description]);
hasFailed = true;
initialised = true;
runLoopThread->signalThreadShouldExit();
}
- (void) connection: (NSURLConnection*) connection didReceiveData: (NSData*) newData
{
[dataLock lock];
[data appendData: newData];
[dataLock unlock];
initialised = true;
}
- (void) connectionDidFinishLoading: (NSURLConnection*) connection
{
hasFinished = true;
initialised = true;
runLoopThread->signalThreadShouldExit();
}
- (BOOL) isOpen
{
return connection != 0 && ! hasFailed;
}
- (int) readPosition
{
return position;
}
- (int) read: (char*) dest numBytes: (int) numNeeded
{
int numDone = 0;
while (numNeeded > 0)
{
int available = jmin (numNeeded, [data length]);
if (available > 0)
{
[dataLock lock];
[data getBytes: dest length: available];
[data replaceBytesInRange: NSMakeRange (0, available) withBytes: nil length: 0];
[dataLock unlock];
numDone += available;
numNeeded -= available;
dest += available;
}
else
{
if (hasFailed || hasFinished)
break;
Thread::sleep (1);
}
}
position += numDone;
return numDone;
}
- (void) stop
{
[connection cancel];
runLoopThread->stopThread (10000);
}
@end
BEGIN_JUCE_NAMESPACE
bool juce_isOnLine()
{
return true;
}
void* juce_openInternetFile (const String& url,
const String& headers,
const MemoryBlock& postData,
const bool isPost,
URL::OpenStreamProgressCallback* callback,
void* callbackContext,
int timeOutMs)
{
const ScopedAutoReleasePool pool;
NSMutableURLRequest* req = [NSMutableURLRequest
requestWithURL: [NSURL URLWithString: juceStringToNS (url)]
cachePolicy: NSURLRequestUseProtocolCachePolicy
timeoutInterval: timeOutMs <= 0 ? 60.0 : (timeOutMs / 1000.0)];
if (req == nil)
return 0;
[req setHTTPMethod: isPost ? @"POST" : @"GET"];
//[req setCachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheData];
StringArray headerLines;
headerLines.addLines (headers);
headerLines.removeEmptyStrings (true);
for (int i = 0; i < headerLines.size(); ++i)
{
const String key (headerLines[i].upToFirstOccurrenceOf (T(":"), false, false).trim());
const String value (headerLines[i].fromFirstOccurrenceOf (T(":"), false, false).trim());
if (key.isNotEmpty() && value.isNotEmpty())
[req addValue: juceStringToNS (value) forHTTPHeaderField: juceStringToNS (key)];
}
if (isPost && postData.getSize() > 0)
{
[req setHTTPBody: [NSData dataWithBytes: postData.getData()
length: postData.getSize()]];
}
JuceURLConnection* const s = [[JuceURLConnection alloc] initWithRequest: req
withCallback: callback
withContext: callbackContext];
if ([s isOpen])
return s;
[s release];
return 0;
}
void juce_closeInternetFile (void* handle)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;
if (s != 0)
{
const ScopedAutoReleasePool pool;
[s stop];
[s release];
}
}
int juce_readFromInternetFile (void* handle, void* buffer, int bytesToRead)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;
if (s != 0)
{
const ScopedAutoReleasePool pool;
return [s read: (char*) buffer numBytes: bytesToRead];
}
return 0;
}
int juce_seekInInternetFile (void* handle, int newPosition)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;
if (s != 0)
return [s readPosition];
return 0;
}
#endif

+ 235
- 0
build/macosx/platform_specific_code/juce_mac_OpenGLComponent.mm View File

@@ -0,0 +1,235 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_OPENGL
//==============================================================================
class WindowedGLContext : public OpenGLContext
{
public:
WindowedGLContext (Component* const component,
const OpenGLPixelFormat& pixelFormat_,
NSOpenGLContext* sharedContext)
: renderContext (0),
pixelFormat (pixelFormat_)
{
jassert (component != 0);
NSOpenGLPixelFormatAttribute attribs [64];
int n = 0;
attribs[n++] = NSOpenGLPFADoubleBuffer;
attribs[n++] = NSOpenGLPFAAccelerated;
attribs[n++] = NSOpenGLPFAColorSize;
attribs[n++] = (NSOpenGLPixelFormatAttribute) jmax (pixelFormat.redBits,
pixelFormat.greenBits,
pixelFormat.blueBits);
attribs[n++] = NSOpenGLPFAAlphaSize;
attribs[n++] = (NSOpenGLPixelFormatAttribute) pixelFormat.alphaBits;
attribs[n++] = NSOpenGLPFADepthSize;
attribs[n++] = (NSOpenGLPixelFormatAttribute) pixelFormat.depthBufferBits;
attribs[n++] = NSOpenGLPFAStencilSize;
attribs[n++] = (NSOpenGLPixelFormatAttribute) pixelFormat.stencilBufferBits;
attribs[n++] = NSOpenGLPFAAccumSize;
attribs[n++] = (NSOpenGLPixelFormatAttribute) jmax (pixelFormat.accumulationBufferRedBits,
pixelFormat.accumulationBufferGreenBits,
pixelFormat.accumulationBufferBlueBits,
pixelFormat.accumulationBufferAlphaBits);
// xxx not sure how to do fullSceneAntiAliasingNumSamples..
attribs[n++] = NSOpenGLPFASampleBuffers;
attribs[n++] = (NSOpenGLPixelFormatAttribute) 1;
attribs[n++] = NSOpenGLPFAClosestPolicy;
attribs[n++] = NSOpenGLPFANoRecovery;
attribs[n++] = (NSOpenGLPixelFormatAttribute) 0;
NSOpenGLPixelFormat* format
= [[NSOpenGLPixelFormat alloc] initWithAttributes: attribs];
NSOpenGLView* view
= [[NSOpenGLView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)
pixelFormat: format];
renderContext = [view openGLContext];
[format release];
viewHolder = new NSViewComponentInternal (view, component);
}
~WindowedGLContext()
{
makeInactive();
[renderContext setView: nil];
delete viewHolder;
}
bool makeActive() const throw()
{
jassert (renderContext != 0);
[renderContext makeCurrentContext];
return renderContext != 0;
}
bool makeInactive() const throw()
{
if (! isActive())
[NSOpenGLContext clearCurrentContext];
return true;
}
bool isActive() const throw()
{
return [NSOpenGLContext currentContext] == renderContext;
}
const OpenGLPixelFormat getPixelFormat() const { return pixelFormat; }
void* getRawContext() const throw() { return renderContext; }
void updateWindowPosition (int x, int y, int w, int h, int outerWindowHeight)
{
}
void swapBuffers()
{
glFlush();
[renderContext flushBuffer];
}
bool setSwapInterval (const int numFramesPerSwap)
{
[renderContext setValues: (const GLint*) &numFramesPerSwap
forParameter: NSOpenGLCPSwapInterval];
return true;
}
int getSwapInterval() const
{
GLint numFrames = 0;
[renderContext getValues: &numFrames
forParameter: NSOpenGLCPSwapInterval];
return numFrames;
}
void repaint()
{
// we need to invalidate the juce view that holds this gl view, to make it
// cause a repaint callback
NSView* v = (NSView*) viewHolder->view;
NSRect r = [v frame];
// bit of a bodge here.. if we only invalidate the area of the gl component,
// it's completely covered by the NSOpenGLView, so the OS throws away the
// repaint message, thus never causing our paint() callback, and never repainting
// the comp. So invalidating just a little bit around the edge helps..
[[v superview] setNeedsDisplayInRect: NSInsetRect (r, -2.0f, -2.0f)];
}
void* getNativeWindowHandle() const { return viewHolder->view; }
//==============================================================================
juce_UseDebuggingNewOperator
NSOpenGLContext* renderContext;
private:
OpenGLPixelFormat pixelFormat;
NSViewComponentInternal* viewHolder;
//==============================================================================
WindowedGLContext (const WindowedGLContext&);
const WindowedGLContext& operator= (const WindowedGLContext&);
};
//==============================================================================
OpenGLContext* OpenGLContext::createContextForWindow (Component* const component,
const OpenGLPixelFormat& pixelFormat,
const OpenGLContext* const contextToShareWith)
{
WindowedGLContext* c = new WindowedGLContext (component, pixelFormat,
contextToShareWith != 0 ? (NSOpenGLContext*) contextToShareWith->getRawContext() : 0);
if (c->renderContext == 0)
deleteAndZero (c);
return c;
}
void* OpenGLComponent::getNativeWindowHandle() const
{
return context != 0 ? ((WindowedGLContext*) context)->getNativeWindowHandle()
: 0;
}
void juce_glViewport (const int w, const int h)
{
glViewport (0, 0, w, h);
}
void OpenGLPixelFormat::getAvailablePixelFormats (Component* /*component*/,
OwnedArray <OpenGLPixelFormat>& results)
{
/* GLint attribs [64];
int n = 0;
attribs[n++] = AGL_RGBA;
attribs[n++] = AGL_DOUBLEBUFFER;
attribs[n++] = AGL_ACCELERATED;
attribs[n++] = AGL_NO_RECOVERY;
attribs[n++] = AGL_NONE;
AGLPixelFormat p = aglChoosePixelFormat (0, 0, attribs);
while (p != 0)
{
OpenGLPixelFormat* const pf = new OpenGLPixelFormat();
pf->redBits = getAGLAttribute (p, AGL_RED_SIZE);
pf->greenBits = getAGLAttribute (p, AGL_GREEN_SIZE);
pf->blueBits = getAGLAttribute (p, AGL_BLUE_SIZE);
pf->alphaBits = getAGLAttribute (p, AGL_ALPHA_SIZE);
pf->depthBufferBits = getAGLAttribute (p, AGL_DEPTH_SIZE);
pf->stencilBufferBits = getAGLAttribute (p, AGL_STENCIL_SIZE);
pf->accumulationBufferRedBits = getAGLAttribute (p, AGL_ACCUM_RED_SIZE);
pf->accumulationBufferGreenBits = getAGLAttribute (p, AGL_ACCUM_GREEN_SIZE);
pf->accumulationBufferBlueBits = getAGLAttribute (p, AGL_ACCUM_BLUE_SIZE);
pf->accumulationBufferAlphaBits = getAGLAttribute (p, AGL_ACCUM_ALPHA_SIZE);
results.add (pf);
p = aglNextPixelFormat (p);
}*/
//jassertfalse //xxx can't see how you do this in cocoa!
}
#endif

+ 294
- 0
build/macosx/platform_specific_code/juce_mac_QuickTimeMovieComponent.mm View File

@@ -0,0 +1,294 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_QUICKTIME
#define theMovie ((QTMovie*) movie)
//==============================================================================
QuickTimeMovieComponent::QuickTimeMovieComponent()
: movie (0)
{
setOpaque (true);
setVisible (true);
QTMovieView* view = [[QTMovieView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)];
setView (view);
}
QuickTimeMovieComponent::~QuickTimeMovieComponent()
{
closeMovie();
setView (0);
}
bool QuickTimeMovieComponent::isQuickTimeAvailable() throw()
{
return true;
}
bool QuickTimeMovieComponent::loadMovie (InputStream* movieStream,
const bool controllerVisible)
{
closeMovie();
if (getPeer() == 0)
{
// To open a movie, this component must be visible inside a functioning window, so that
// the QT control can be assigned to the window.
jassertfalse
return false;
}
FileInputStream* const fin = dynamic_cast <FileInputStream*> (movieStream);
if (fin != 0)
{
movieFile = fin->getFile();
movie = [QTMovie movieWithFile: juceStringToNS (movieFile.getFullPathName())
error: nil];
}
else
{
MemoryBlock temp;
movieStream->readIntoMemoryBlock (temp);
movie = [QTMovie movieWithData: [NSData dataWithBytes: temp.getData()
length: temp.getSize()]
error: nil];
}
[theMovie retain];
QTMovieView* view = (QTMovieView*) getView();
[view setMovie: theMovie];
[view setControllerVisible: controllerVisible];
setLooping (looping);
return movie != nil;
}
void QuickTimeMovieComponent::closeMovie()
{
stop();
QTMovieView* view = (QTMovieView*) getView();
[view setMovie: nil];
[theMovie release];
movie = 0;
movieFile = File::nonexistent;
}
bool QuickTimeMovieComponent::isMovieOpen() const
{
return movie != nil;
}
const File QuickTimeMovieComponent::getCurrentMovieFile() const
{
return movieFile;
}
void QuickTimeMovieComponent::play()
{
[theMovie play];
}
void QuickTimeMovieComponent::stop()
{
[theMovie stop];
}
bool QuickTimeMovieComponent::isPlaying() const
{
return movie != 0 && [theMovie rate] != 0;
}
void QuickTimeMovieComponent::setPosition (const double seconds)
{
if (movie != 0)
{
QTTime t;
t.timeValue = (uint64) (100000.0 * seconds);
t.timeScale = 100000;
t.flags = 0;
[theMovie setCurrentTime: t];
}
}
double QuickTimeMovieComponent::getPosition() const
{
if (movie == 0)
return 0.0;
QTTime t = [theMovie currentTime];
return t.timeValue / (double) t.timeScale;
}
void QuickTimeMovieComponent::setSpeed (const float newSpeed)
{
[theMovie setRate: newSpeed];
}
double QuickTimeMovieComponent::getMovieDuration() const
{
if (movie == 0)
return 0.0;
QTTime t = [theMovie duration];
return t.timeValue / (double) t.timeScale;
}
void QuickTimeMovieComponent::setLooping (const bool shouldLoop)
{
looping = shouldLoop;
[theMovie setAttribute: [NSNumber numberWithBool: shouldLoop]
forKey: QTMovieLoopsAttribute];
}
bool QuickTimeMovieComponent::isLooping() const
{
return looping;
}
void QuickTimeMovieComponent::setMovieVolume (const float newVolume)
{
[theMovie setVolume: newVolume];
}
float QuickTimeMovieComponent::getMovieVolume() const
{
return movie != 0 ? [theMovie volume] : 0.0f;
}
void QuickTimeMovieComponent::getMovieNormalSize (int& width, int& height) const
{
width = 0;
height = 0;
if (movie != 0)
{
NSSize s = [[theMovie attributeForKey: QTMovieNaturalSizeAttribute] sizeValue];
width = s.width;
height = s.height;
}
}
void QuickTimeMovieComponent::paint (Graphics& g)
{
if (movie == 0)
g.fillAll (Colours::black);
}
bool QuickTimeMovieComponent::isControllerVisible() const
{
return controllerVisible;
}
//==============================================================================
bool QuickTimeMovieComponent::loadMovie (const File& movieFile_,
const bool isControllerVisible)
{
const bool ok = loadMovie ((InputStream*) movieFile_.createInputStream(), isControllerVisible);
movieFile = movieFile_;
return ok;
}
void QuickTimeMovieComponent::goToStart()
{
setPosition (0.0);
}
void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin,
const RectanglePlacement& placement)
{
int normalWidth, normalHeight;
getMovieNormalSize (normalWidth, normalHeight);
if (normalWidth > 0 && normalHeight > 0 && ! spaceToFitWithin.isEmpty())
{
double x = 0.0, y = 0.0, w = normalWidth, h = normalHeight;
placement.applyTo (x, y, w, h,
spaceToFitWithin.getX(), spaceToFitWithin.getY(),
spaceToFitWithin.getWidth(), spaceToFitWithin.getHeight());
if (w > 0 && h > 0)
{
setBounds (roundDoubleToInt (x), roundDoubleToInt (y),
roundDoubleToInt (w), roundDoubleToInt (h));
}
}
else
{
setBounds (spaceToFitWithin);
}
}
//==============================================================================
#if ! (JUCE_MAC && JUCE_64BIT)
bool juce_OpenQuickTimeMovieFromStream (InputStream* movieStream, Movie& result, Handle& dataHandle)
{
if (movieStream == 0)
return false;
QTMovie* movie = nil;
FileInputStream* const fin = dynamic_cast <FileInputStream*> (movieStream);
if (fin != 0)
{
movie = [QTMovie movieWithFile: juceStringToNS (fin->getFile().getFullPathName())
error: nil];
}
else
{
MemoryBlock temp;
movieStream->readIntoMemoryBlock (temp);
movie = [QTMovie movieWithData: [NSData dataWithBytes: temp.getData()
length: temp.getSize()]
error: nil];
}
if (movie != nil)
result = [movie quickTimeMovie];
return movie != nil;
}
#endif
#endif

+ 186
- 0
build/macosx/platform_specific_code/juce_mac_Strings.mm View File

@@ -0,0 +1,186 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE
//==============================================================================
static const String nsStringToJuce (NSString* s)
{
return String::fromUTF8 ((uint8*) [s UTF8String]);
}
static NSString* juceStringToNS (const String& s)
{
return [NSString stringWithUTF8String: (const char*) s.toUTF8()];
}
//==============================================================================
static const String convertUTF16ToString (const UniChar* utf16)
{
String s;
while (*utf16 != 0)
s += (juce_wchar) *utf16++;
return s;
}
const String PlatformUtilities::cfStringToJuceString (CFStringRef cfString)
{
String result;
if (cfString != 0)
{
#if JUCE_STRINGS_ARE_UNICODE
CFRange range = { 0, CFStringGetLength (cfString) };
UniChar* const u = (UniChar*) juce_malloc (sizeof (UniChar) * (range.length + 1));
CFStringGetCharacters (cfString, range, u);
u[range.length] = 0;
result = convertUTF16ToString (u);
juce_free (u);
#else
const int len = CFStringGetLength (cfString);
char* buffer = (char*) juce_malloc (len + 1);
CFStringGetCString (cfString, buffer, len + 1, CFStringGetSystemEncoding());
result = buffer;
juce_free (buffer);
#endif
}
return result;
}
CFStringRef PlatformUtilities::juceStringToCFString (const String& s)
{
#if JUCE_STRINGS_ARE_UNICODE
const int len = s.length();
const juce_wchar* t = (const juce_wchar*) s;
UniChar* temp = (UniChar*) juce_malloc (sizeof (UniChar) * len + 4);
for (int i = 0; i <= len; ++i)
temp[i] = t[i];
CFStringRef result = CFStringCreateWithCharacters (kCFAllocatorDefault, temp, len);
juce_free (temp);
return result;
#else
return CFStringCreateWithCString (kCFAllocatorDefault,
(const char*) s,
CFStringGetSystemEncoding());
#endif
}
const String PlatformUtilities::convertToPrecomposedUnicode (const String& s)
{
UnicodeMapping map;
map.unicodeEncoding = CreateTextEncoding (kTextEncodingUnicodeDefault,
kUnicodeNoSubset,
kTextEncodingDefaultFormat);
map.otherEncoding = CreateTextEncoding (kTextEncodingUnicodeDefault,
kUnicodeCanonicalCompVariant,
kTextEncodingDefaultFormat);
map.mappingVersion = kUnicodeUseLatestMapping;
UnicodeToTextInfo conversionInfo = 0;
String result;
if (CreateUnicodeToTextInfo (&map, &conversionInfo) == noErr)
{
const int len = s.length();
UniChar* const tempIn = (UniChar*) juce_calloc (sizeof (UniChar) * len + 4);
UniChar* const tempOut = (UniChar*) juce_calloc (sizeof (UniChar) * len + 4);
for (int i = 0; i <= len; ++i)
tempIn[i] = s[i];
ByteCount bytesRead = 0;
ByteCount outputBufferSize = 0;
if (ConvertFromUnicodeToText (conversionInfo,
len * sizeof (UniChar), tempIn,
kUnicodeDefaultDirectionMask,
0, 0, 0, 0,
len * sizeof (UniChar), &bytesRead,
&outputBufferSize, tempOut) == noErr)
{
result.preallocateStorage (bytesRead / sizeof (UniChar) + 2);
tchar* t = const_cast <tchar*> ((const tchar*) result);
int i;
for (i = 0; i < bytesRead / sizeof (UniChar); ++i)
t[i] = (tchar) tempOut[i];
t[i] = 0;
}
juce_free (tempIn);
juce_free (tempOut);
DisposeUnicodeToTextInfo (&conversionInfo);
}
return result;
}
//==============================================================================
void SystemClipboard::copyTextToClipboard (const String& text) throw()
{
[[NSPasteboard generalPasteboard] declareTypes: [NSArray arrayWithObject: NSStringPboardType]
owner: nil];
[[NSPasteboard generalPasteboard] setString: juceStringToNS (text)
forType: NSStringPboardType];
}
const String SystemClipboard::getTextFromClipboard() throw()
{
NSString* text = [[NSPasteboard generalPasteboard] stringForType: NSStringPboardType];
return text == 0 ? String::empty
: nsStringToJuce (text);
}
#endif

+ 85
- 63
build/macosx/platform_specific_code/juce_mac_SystemStats.mm View File

@@ -29,18 +29,9 @@
==============================================================================
*/

#include "juce_mac_NativeHeaders.h"
#include <AppKit/AppKit.h>
#include <CoreAudio/HostTime.h>
#include <ctime>
#include <sys/resource.h>

BEGIN_JUCE_NAMESPACE

#include "../../../src/juce_appframework/application/juce_Application.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/basics/juce_Time.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE

static int64 highResTimerFrequency;

@@ -90,29 +81,74 @@ static CPUFlags cpuFlags;
#endif

//==============================================================================
void Logger::outputDebugString (const String& text) throw()
void SystemStats::initialiseStats() throw()
{
String withLineFeed (text + T("\n"));
const char* const utf8 = withLineFeed.toUTF8();
fwrite (utf8, strlen (utf8), 1, stdout);
}
static bool initialised = false;

void Logger::outputDebugPrintf (const tchar* format, ...) throw()
{
String text;
va_list args;
va_start (args, format);
text.vprintf(format, args);
outputDebugString (text);
if (! initialised)
{
initialised = true;

NSApplicationLoad();
[NSApplication sharedApplication];

#if JUCE_INTEL
{
unsigned int familyModel, extFeatures;
const unsigned int features = getCPUIDWord (familyModel, extFeatures);

cpuFlags.hasMMX = ((features & (1 << 23)) != 0);
cpuFlags.hasSSE = ((features & (1 << 25)) != 0);
cpuFlags.hasSSE2 = ((features & (1 << 26)) != 0);
cpuFlags.has3DNow = ((extFeatures & (1 << 31)) != 0);
}
#endif

highResTimerFrequency = (int64) AudioGetHostClockFrequency();

String s (SystemStats::getJUCEVersion());

rlimit lim;
getrlimit (RLIMIT_NOFILE, &lim);
lim.rlim_cur = lim.rlim_max = RLIM_INFINITY;
setrlimit (RLIMIT_NOFILE, &lim);
}
}

int SystemStats::getMemorySizeInMegabytes() throw()
static const String getCpuInfo (const char* key, bool lastOne = false) throw()
{
long bytes;
if (Gestalt (gestaltPhysicalRAMSize, &bytes) == noErr)
return (int) (((unsigned long) bytes) / (1024 * 1024));
String info;
char buf [256];

return 0;
FILE* f = fopen ("/proc/cpuinfo", "r");

while (f != 0 && fgets (buf, sizeof(buf), f))
{
if (strncmp (buf, key, strlen (key)) == 0)
{
char* p = buf;

while (*p && *p != '\n')
++p;

if (*p != 0)
*p = 0;

p = buf;

while (*p != 0 && *p != ':')
++p;

if (*p != 0 && *(p + 1) != 0)
info = p + 2;

if (! lastOne)
break;
}
}

fclose (f);
return info;
}

//==============================================================================
@@ -136,39 +172,17 @@ bool SystemStats::isOperatingSystem64Bit() throw()
#endif
}

//==============================================================================
void SystemStats::initialiseStats() throw()
int SystemStats::getMemorySizeInMegabytes() throw()
{
static bool initialised = false;

if (! initialised)
{
initialised = true;

//[NSApplication sharedApplication];
NSApplicationLoad();

#if JUCE_INTEL
{
unsigned int familyModel, extFeatures;
const unsigned int features = getCPUIDWord (familyModel, extFeatures);

cpuFlags.hasMMX = ((features & (1 << 23)) != 0);
cpuFlags.hasSSE = ((features & (1 << 25)) != 0);
cpuFlags.hasSSE2 = ((features & (1 << 26)) != 0);
cpuFlags.has3DNow = ((extFeatures & (1 << 31)) != 0);
}
#if MACOS_10_4_OR_EARLIER
long bytes;
if (Gestalt (gestaltPhysicalRAMSize, &bytes) == noErr)
return (int) (((unsigned long) bytes) / (1024 * 1024));
return 0;
#else
return (int) ([[NSProcessInfo processInfo] physicalMemory] / (1024 * 1024));
#endif

highResTimerFrequency = (int64) AudioGetHostClockFrequency();

String s (SystemStats::getJUCEVersion());

rlimit lim;
getrlimit (RLIMIT_NOFILE, &lim);
lim.rlim_cur = lim.rlim_max = RLIM_INFINITY;
setrlimit (RLIMIT_NOFILE, &lim);
}
}

bool SystemStats::hasMMX() throw()
@@ -220,12 +234,20 @@ const String SystemStats::getCpuVendor() throw()

int SystemStats::getCpuSpeedInMegaherz() throw()
{
#if MACOS_10_4_OR_EARLIER
return GetCPUSpeed();
#else
return roundDoubleToInt (getCpuInfo ("cpu MHz").getDoubleValue());
#endif
}

int SystemStats::getNumCpus() throw()
{
#if MACOS_10_4_OR_EARLIER
return MPProcessors();
#else
return [[NSProcessInfo processInfo] activeProcessorCount];
#endif
}

//==============================================================================
@@ -272,12 +294,12 @@ bool Time::setSystemTimeToThisTime() const throw()
//==============================================================================
int SystemStats::getPageSize() throw()
{
jassertfalse
return 512; //xxx
return NSPageSize();
}

void PlatformUtilities::fpuReset()
{
}

END_JUCE_NAMESPACE

#endif

+ 202
- 202
build/macosx/platform_specific_code/juce_mac_Threads.cpp View File

@@ -1,202 +1,202 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
#include <pthread.h>
#include <sched.h>
#include <sys/file.h>
#include <sys/types.h>
#include <sys/sysctl.h>
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/threads/juce_CriticalSection.h"
#include "../../../src/juce_core/threads/juce_WaitableEvent.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_core/threads/juce_Process.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/io/files/juce_File.h"
//==============================================================================
/*
Note that a lot of methods that you'd expect to find in this file actually
live in juce_posix_SharedCode.h!
*/
//==============================================================================
void JUCE_API juce_threadEntryPoint (void*);
void* threadEntryProc (void* userData) throw()
{
juce_threadEntryPoint (userData);
return 0;
}
void* juce_createThread (void* userData) throw()
{
pthread_t handle = 0;
if (pthread_create (&handle, 0, threadEntryProc, userData) == 0)
{
pthread_detach (handle);
return (void*) handle;
}
return 0;
}
void juce_killThread (void* handle) throw()
{
if (handle != 0)
pthread_cancel ((pthread_t) handle);
}
void juce_setCurrentThreadName (const String& /*name*/) throw()
{
}
int Thread::getCurrentThreadId() throw()
{
return (int) pthread_self();
}
void juce_setThreadPriority (void* handle, int priority) throw()
{
if (handle == 0)
handle = (void*) pthread_self();
struct sched_param param;
int policy;
pthread_getschedparam ((pthread_t) handle, &policy, &param);
param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11);
pthread_setschedparam ((pthread_t) handle, policy, &param);
}
void Thread::yield() throw()
{
sched_yield();
}
void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) throw()
{
// xxx
jassertfalse
}
//==============================================================================
bool JUCE_CALLTYPE juce_isRunningUnderDebugger() throw()
{
static char testResult = 0;
if (testResult == 0)
{
struct kinfo_proc info;
int m[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
size_t sz = sizeof (info);
sysctl (m, 4, &info, &sz, 0, 0);
testResult = ((info.kp_proc.p_flag & P_TRACED) != 0) ? 1 : -1;
}
return testResult > 0;
}
bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw()
{
return juce_isRunningUnderDebugger();
}
void Process::raisePrivilege()
{
jassertfalse
}
void Process::lowerPrivilege()
{
jassertfalse
}
void Process::terminate()
{
exit (0);
}
void Process::setPriority (ProcessPriority p)
{
// xxx
}
void* Process::loadDynamicLibrary (const String& name)
{
// xxx needs to use bundles
FSSpec fs;
if (PlatformUtilities::makeFSSpecFromPath (&fs, name))
{
CFragConnectionID connID;
Ptr mainPtr;
Str255 errorMessage;
Str63 nm;
PlatformUtilities::copyToStr63 (nm, name);
const OSErr err = GetDiskFragment (&fs, 0, kCFragGoesToEOF, nm, kReferenceCFrag, &connID, &mainPtr, errorMessage);
if (err == noErr)
return (void*)connID;
}
return 0;
}
void Process::freeDynamicLibrary (void* handle)
{
if (handle != 0)
CloseConnection ((CFragConnectionID*)&handle);
}
void* Process::getProcedureEntryPoint (void* h, const String& procedureName)
{
if (h != 0)
{
CFragSymbolClass cl;
Ptr ptr;
Str255 name;
PlatformUtilities::copyToStr255 (name, procedureName);
if (FindSymbol ((CFragConnectionID) h, name, &ptr, &cl) == noErr)
{
return ptr;
}
}
return 0;
}
END_JUCE_NAMESPACE
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
#include <pthread.h>
#include <sched.h>
#include <sys/file.h>
#include <sys/types.h>
#include <sys/sysctl.h>
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/threads/juce_CriticalSection.h"
#include "../../../src/juce_core/threads/juce_WaitableEvent.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_core/threads/juce_Process.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/io/files/juce_File.h"
//==============================================================================
/*
Note that a lot of methods that you'd expect to find in this file actually
live in juce_posix_SharedCode.h!
*/
//==============================================================================
void JUCE_API juce_threadEntryPoint (void*);
void* threadEntryProc (void* userData) throw()
{
juce_threadEntryPoint (userData);
return 0;
}
void* juce_createThread (void* userData) throw()
{
pthread_t handle = 0;
if (pthread_create (&handle, 0, threadEntryProc, userData) == 0)
{
pthread_detach (handle);
return (void*) handle;
}
return 0;
}
void juce_killThread (void* handle) throw()
{
if (handle != 0)
pthread_cancel ((pthread_t) handle);
}
void juce_setCurrentThreadName (const String& /*name*/) throw()
{
}
int Thread::getCurrentThreadId() throw()
{
return (int) pthread_self();
}
void juce_setThreadPriority (void* handle, int priority) throw()
{
if (handle == 0)
handle = (void*) pthread_self();
struct sched_param param;
int policy;
pthread_getschedparam ((pthread_t) handle, &policy, &param);
param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11);
pthread_setschedparam ((pthread_t) handle, policy, &param);
}
void Thread::yield() throw()
{
sched_yield();
}
void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) throw()
{
// xxx
jassertfalse
}
//==============================================================================
bool JUCE_CALLTYPE juce_isRunningUnderDebugger() throw()
{
static char testResult = 0;
if (testResult == 0)
{
struct kinfo_proc info;
int m[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
size_t sz = sizeof (info);
sysctl (m, 4, &info, &sz, 0, 0);
testResult = ((info.kp_proc.p_flag & P_TRACED) != 0) ? 1 : -1;
}
return testResult > 0;
}
bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw()
{
return juce_isRunningUnderDebugger();
}
void Process::raisePrivilege()
{
jassertfalse
}
void Process::lowerPrivilege()
{
jassertfalse
}
void Process::terminate()
{
exit (0);
}
void Process::setPriority (ProcessPriority p)
{
// xxx
}
void* Process::loadDynamicLibrary (const String& name)
{
// xxx needs to use bundles
FSSpec fs;
if (PlatformUtilities::makeFSSpecFromPath (&fs, name))
{
CFragConnectionID connID;
Ptr mainPtr;
Str255 errorMessage;
Str63 nm;
PlatformUtilities::copyToStr63 (nm, name);
const OSErr err = GetDiskFragment (&fs, 0, kCFragGoesToEOF, nm, kReferenceCFrag, &connID, &mainPtr, errorMessage);
if (err == noErr)
return (void*)connID;
}
return 0;
}
void Process::freeDynamicLibrary (void* handle)
{
if (handle != 0)
CloseConnection ((CFragConnectionID*)&handle);
}
void* Process::getProcedureEntryPoint (void* h, const String& procedureName)
{
if (h != 0)
{
CFragSymbolClass cl;
Ptr ptr;
Str255 name;
PlatformUtilities::copyToStr255 (name, procedureName);
if (FindSymbol ((CFragConnectionID) h, name, &ptr, &cl) == noErr)
{
return ptr;
}
}
return 0;
}
END_JUCE_NAMESPACE

+ 129
- 0
build/macosx/platform_specific_code/juce_mac_Threads.mm View File

@@ -0,0 +1,129 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#ifdef JUCE_INCLUDED_FILE

//==============================================================================
/*
Note that a lot of methods that you'd expect to find in this file actually
live in juce_posix_SharedCode.h!
*/

//==============================================================================
void JUCE_API juce_threadEntryPoint (void*);

void* threadEntryProc (void* userData) throw()
{
const ScopedAutoReleasePool pool;
juce_threadEntryPoint (userData);
return 0;
}

void* juce_createThread (void* userData) throw()
{
pthread_t handle = 0;

if (pthread_create (&handle, 0, threadEntryProc, userData) == 0)
{
pthread_detach (handle);
return (void*) handle;
}

return 0;
}

void juce_killThread (void* handle) throw()
{
if (handle != 0)
pthread_cancel ((pthread_t) handle);
}

void juce_setCurrentThreadName (const String& /*name*/) throw()
{
}

int64 Thread::getCurrentThreadId() throw()
{
return (int64) pthread_self();
}

void juce_setThreadPriority (void* handle, int priority) throw()
{
if (handle == 0)
handle = (void*) pthread_self();

struct sched_param param;
int policy;
pthread_getschedparam ((pthread_t) handle, &policy, &param);
param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11);
pthread_setschedparam ((pthread_t) handle, policy, &param);
}

void Thread::yield() throw()
{
sched_yield();
}

void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) throw()
{
// xxx
jassertfalse
}

//==============================================================================
bool Process::isForegroundProcess() throw()
{
return [NSApp isActive];
}

void Process::raisePrivilege()
{
jassertfalse
}

void Process::lowerPrivilege()
{
jassertfalse
}

void Process::terminate()
{
exit (0);
}

void Process::setPriority (ProcessPriority p)
{
// xxx
}

#endif

+ 258
- 443
build/macosx/platform_specific_code/juce_mac_WebBrowserComponent.mm View File

@@ -1,443 +1,258 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

#include "../../../src/juce_core/basics/juce_StandardHeader.h"

#include <Cocoa/Cocoa.h>
#include <WebKit/WebKit.h>
#include <WebKit/HIWebView.h>
#include <WebKit/WebPolicyDelegate.h>
#include <WebKit/CarbonUtils.h>

BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/events/juce_Timer.h"
#include "../../../src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h"
END_JUCE_NAMESPACE

//==============================================================================
@interface DownloadClickDetector : NSObject
{
JUCE_NAMESPACE::WebBrowserComponent* ownerComponent;
}

- (DownloadClickDetector*) initWithOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent;

- (void) webView: (WebView*) webView decidePolicyForNavigationAction: (NSDictionary*) actionInformation
request: (NSURLRequest*) request
frame: (WebFrame*) frame
decisionListener: (id<WebPolicyDecisionListener>) listener;
@end

//==============================================================================
@implementation DownloadClickDetector

- (DownloadClickDetector*) initWithOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent_
{
[super init];
ownerComponent = ownerComponent_;
return self;
}

- (void) webView: (WebView*) sender decidePolicyForNavigationAction: (NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id < WebPolicyDecisionListener >)listener
{
NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"];

if (ownerComponent->pageAboutToLoad (JUCE_NAMESPACE::String::fromUTF8 ((const JUCE_NAMESPACE::uint8*) [[url absoluteString] UTF8String])))
[listener use];
else
[listener ignore];
}

@end

BEGIN_JUCE_NAMESPACE

//==============================================================================
class WebBrowserComponentInternal : public Timer
{
public:
WebBrowserComponentInternal (WebBrowserComponent* owner_)
: owner (owner_),
view (0),
webView (0)
{
HIWebViewCreate (&view);

ComponentPeer* const peer = owner_->getPeer();
jassert (peer != 0);

if (view != 0 && peer != 0)
{
WindowRef parentWindow = (WindowRef) peer->getNativeHandle();

WindowAttributes attributes;
GetWindowAttributes (parentWindow, &attributes);

HIViewRef parentView = 0;

if ((attributes & kWindowCompositingAttribute) != 0)
{
HIViewRef root = HIViewGetRoot (parentWindow);
HIViewFindByID (root, kHIViewWindowContentID, &parentView);

if (parentView == 0)
parentView = root;
}
else
{
GetRootControl (parentWindow, (ControlRef*) &parentView);

if (parentView == 0)
CreateRootControl (parentWindow, (ControlRef*) &parentView);
}

HIViewAddSubview (parentView, view);
updateBounds();
show();

webView = HIWebViewGetWebView (view);

clickListener = [[DownloadClickDetector alloc] initWithOwner: owner_];
[webView setPolicyDelegate: clickListener];
}

startTimer (500);
}

~WebBrowserComponentInternal()
{
[webView setPolicyDelegate: nil];
[clickListener release];

if (view != 0)
CFRelease (view);
}

// Horrific bodge-workaround for the fact that the webview somehow hangs onto key
// focus when you pop up a new window, no matter what that window does to
// try to grab focus for itself. This catches such a situation and forces
// focus away from the webview, then back to the place it should be..
void timerCallback()
{
WindowRef viewWindow = HIViewGetWindow (view);
WindowRef focusedWindow = GetUserFocusWindow();

if (focusedWindow != viewWindow)
{
if (HIViewSubtreeContainsFocus (view))
{
HIViewAdvanceFocus (HIViewGetRoot (viewWindow), 0);
HIViewAdvanceFocus (HIViewGetRoot (focusedWindow), 0);
}
}
}

void show()
{
HIViewSetVisible (view, true);
}

void hide()
{
HIViewSetVisible (view, false);
}

void goToURL (const String& url,
const StringArray* headers,
const MemoryBlock* postData)
{
char** headerNamesAsChars = 0;
char** headerValuesAsChars = 0;
int numHeaders = 0;

if (headers != 0)
{
numHeaders = headers->size();

headerNamesAsChars = (char**) juce_malloc (sizeof (char*) * numHeaders);
headerValuesAsChars = (char**) juce_malloc (sizeof (char*) * numHeaders);

int i;
for (i = 0; i < numHeaders; ++i)
{
const String headerName ((*headers)[i].upToFirstOccurrenceOf (T(":"), false, false).trim());
headerNamesAsChars[i] = (char*) juce_calloc (headerName.copyToUTF8 (0));
headerName.copyToUTF8 ((JUCE_NAMESPACE::uint8*) headerNamesAsChars[i]);

const String headerValue ((*headers)[i].fromFirstOccurrenceOf (T(":"), false, false).trim());
headerValuesAsChars[i] = (char*) juce_calloc (headerValue.copyToUTF8 (0));
headerValue.copyToUTF8 ((JUCE_NAMESPACE::uint8*) headerValuesAsChars[i]);
}
}

sendWebViewToURL ((const char*) url.toUTF8(),
(const char**) headerNamesAsChars,
(const char**) headerValuesAsChars,
numHeaders,
postData != 0 ? (const char*) postData->getData() : 0,
postData != 0 ? postData->getSize() : 0);

for (int i = 0; i < numHeaders; ++i)
{
juce_free (headerNamesAsChars[i]);
juce_free (headerValuesAsChars[i]);
}

juce_free (headerNamesAsChars);
juce_free (headerValuesAsChars);
}

void goBack()
{
[webView goBack];
}

void goForward()
{
[webView goForward];
}

void stop()
{
[webView stopLoading: nil];
}

void updateBounds()
{
HIRect r;
r.origin.x = (float) owner->getScreenX() - owner->getTopLevelComponent()->getScreenX();
r.origin.y = (float) owner->getScreenY() - owner->getTopLevelComponent()->getScreenY();
r.size.width = (float) owner->getWidth();
r.size.height = (float) owner->getHeight();
HIViewSetFrame (view, &r);
}

private:
WebBrowserComponent* const owner;
HIViewRef view;
WebView* webView;
DownloadClickDetector* clickListener;
void sendWebViewToURL (const char* utf8URL,
const char** headerNames,
const char** headerValues,
int numHeaders,
const char* postData,
int postDataSize)
{
NSMutableURLRequest* r = [NSMutableURLRequest
requestWithURL: [NSURL URLWithString: [NSString stringWithUTF8String: utf8URL]]
cachePolicy: NSURLRequestUseProtocolCachePolicy
timeoutInterval: 30.0];

if (postDataSize > 0)
{
[ r setHTTPMethod: @"POST"];
[ r setHTTPBody: [NSData dataWithBytes: postData length: postDataSize]];
}

int i;
for (i = 0; i < numHeaders; ++i)
{
[ r setValue: [NSString stringWithUTF8String: headerValues[i]]
forHTTPHeaderField: [NSString stringWithUTF8String: headerNames[i]]];
}

[[webView mainFrame] stopLoading ];
[[webView mainFrame] loadRequest: r];
}
WebBrowserComponentInternal (const WebBrowserComponentInternal&);
const WebBrowserComponentInternal& operator= (const WebBrowserComponentInternal&);
};

//==============================================================================
WebBrowserComponent::WebBrowserComponent()
: browser (0),
associatedWindow (0),
blankPageShown (false)
{
setOpaque (true);
}

WebBrowserComponent::~WebBrowserComponent()
{
deleteBrowser();
}

//==============================================================================
void WebBrowserComponent::goToURL (const String& url,
const StringArray* headers,
const MemoryBlock* postData)
{
lastURL = url;

lastHeaders.clear();
if (headers != 0)
lastHeaders = *headers;

lastPostData.setSize (0);
if (postData != 0)
lastPostData = *postData;

blankPageShown = false;

if (browser != 0)
browser->goToURL (url, headers, postData);
}

void WebBrowserComponent::stop()
{
if (browser != 0)
browser->stop();
}

void WebBrowserComponent::goBack()
{
lastURL = String::empty;
blankPageShown = false;

if (browser != 0)
browser->goBack();
}

void WebBrowserComponent::goForward()
{
lastURL = String::empty;

if (browser != 0)
browser->goForward();
}

//==============================================================================
void WebBrowserComponent::paint (Graphics& g)
{
if (browser == 0)
g.fillAll (Colours::white);
}

void WebBrowserComponent::checkWindowAssociation()
{
void* const window = getWindowHandle();

if (window != associatedWindow
|| (browser == 0 && window != 0))
{
associatedWindow = window;

deleteBrowser();
createBrowser();
}

if (browser != 0)
{
if (associatedWindow != 0 && isShowing())
{
browser->show();

if (blankPageShown)
goBack();
}
else
{
if (! blankPageShown)
{
// when the component becomes invisible, some stuff like flash
// carries on playing audio, so we need to force it onto a blank
// page to avoid this..

blankPageShown = true;
browser->goToURL ("about:blank", 0, 0);
}

browser->hide();
}
}
}

void WebBrowserComponent::createBrowser()
{
deleteBrowser();

if (isShowing())
{
WebInitForCarbon();
browser = new WebBrowserComponentInternal (this);
reloadLastURL();
}
}

void WebBrowserComponent::deleteBrowser()
{
deleteAndZero (browser);
}

void WebBrowserComponent::reloadLastURL()
{
if (lastURL.isNotEmpty())
{
goToURL (lastURL, &lastHeaders, &lastPostData);
lastURL = String::empty;
}
}

void WebBrowserComponent::updateBrowserPosition()
{
if (getPeer() != 0 && browser != 0)
browser->updateBounds();
}

void WebBrowserComponent::parentHierarchyChanged()
{
checkWindowAssociation();
}

void WebBrowserComponent::moved()
{
updateBrowserPosition();
}

void WebBrowserComponent::resized()
{
updateBrowserPosition();
}

void WebBrowserComponent::visibilityChanged()
{
checkWindowAssociation();
}

bool WebBrowserComponent::pageAboutToLoad (const String& url)
{
return true;
}

END_JUCE_NAMESPACE
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_mac_NativeCode.mm, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_WEB_BROWSER
//==============================================================================
END_JUCE_NAMESPACE
@interface DownloadClickDetector : NSObject
{
JUCE_NAMESPACE::WebBrowserComponent* ownerComponent;
}
- (DownloadClickDetector*) initWithWebBrowserOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent;
- (void) webView: (WebView*) webView decidePolicyForNavigationAction: (NSDictionary*) actionInformation
request: (NSURLRequest*) request
frame: (WebFrame*) frame
decisionListener: (id<WebPolicyDecisionListener>) listener;
@end
//==============================================================================
@implementation DownloadClickDetector
- (DownloadClickDetector*) initWithWebBrowserOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent_
{
[super init];
ownerComponent = ownerComponent_;
return self;
}
- (void) webView: (WebView*) sender decidePolicyForNavigationAction: (NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id < WebPolicyDecisionListener >)listener
{
NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"];
if (ownerComponent->pageAboutToLoad (JUCE_NAMESPACE::String::fromUTF8 ((const JUCE_NAMESPACE::uint8*) [[url absoluteString] UTF8String])))
[listener use];
else
[listener ignore];
}
@end
BEGIN_JUCE_NAMESPACE
//==============================================================================
class WebBrowserComponentInternal : public NSViewComponent
{
public:
WebBrowserComponentInternal (WebBrowserComponent* owner)
{
webView = [[WebView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)
frameName: @""
groupName: @""];
setView (webView);
clickListener = [[DownloadClickDetector alloc] initWithWebBrowserOwner: owner];
[webView setPolicyDelegate: clickListener];
}
~WebBrowserComponentInternal()
{
[webView setPolicyDelegate: nil];
[clickListener release];
setView (0);
}
void goToURL (const String& url,
const StringArray* headers,
const MemoryBlock* postData)
{
NSMutableURLRequest* r
= [NSMutableURLRequest requestWithURL: [NSURL URLWithString: juceStringToNS (url)]
cachePolicy: NSURLRequestUseProtocolCachePolicy
timeoutInterval: 30.0];
if (postData != 0 && postData->getSize() > 0)
{
[r setHTTPMethod: @"POST"];
[r setHTTPBody: [NSData dataWithBytes: postData->getData()
length: postData->getSize()]];
}
if (headers != 0)
{
for (int i = 0; i < headers->size(); ++i)
{
const String headerName ((*headers)[i].upToFirstOccurrenceOf (T(":"), false, false).trim());
const String headerValue ((*headers)[i].fromFirstOccurrenceOf (T(":"), false, false).trim());
[r setValue: juceStringToNS (headerValue)
forHTTPHeaderField: juceStringToNS (headerName)];
}
}
stop();
[[webView mainFrame] loadRequest: r];
}
void goBack()
{
[webView goBack];
}
void goForward()
{
[webView goForward];
}
void stop()
{
[webView stopLoading: nil];
}
private:
WebView* webView;
DownloadClickDetector* clickListener;
};
//==============================================================================
WebBrowserComponent::WebBrowserComponent()
: browser (0),
blankPageShown (false)
{
setOpaque (true);
addAndMakeVisible (browser = new WebBrowserComponentInternal (this));
}
WebBrowserComponent::~WebBrowserComponent()
{
deleteAndZero (browser);
}
//==============================================================================
void WebBrowserComponent::goToURL (const String& url,
const StringArray* headers,
const MemoryBlock* postData)
{
lastURL = url;
lastHeaders.clear();
if (headers != 0)
lastHeaders = *headers;
lastPostData.setSize (0);
if (postData != 0)
lastPostData = *postData;
blankPageShown = false;
browser->goToURL (url, headers, postData);
}
void WebBrowserComponent::stop()
{
browser->stop();
}
void WebBrowserComponent::goBack()
{
lastURL = String::empty;
blankPageShown = false;
browser->goBack();
}
void WebBrowserComponent::goForward()
{
lastURL = String::empty;
browser->goForward();
}
//==============================================================================
void WebBrowserComponent::paint (Graphics& g)
{
}
void WebBrowserComponent::checkWindowAssociation()
{
// when the component becomes invisible, some stuff like flash
// carries on playing audio, so we need to force it onto a blank
// page to avoid this, (and send it back when it's made visible again).
if (isShowing())
{
if (blankPageShown)
goBack();
}
else
{
if (! blankPageShown)
{
blankPageShown = true;
browser->goToURL ("about:blank", 0, 0);
}
}
}
void WebBrowserComponent::reloadLastURL()
{
if (lastURL.isNotEmpty())
{
goToURL (lastURL, &lastHeaders, &lastPostData);
lastURL = String::empty;
}
}
void WebBrowserComponent::parentHierarchyChanged()
{
checkWindowAssociation();
}
void WebBrowserComponent::resized()
{
browser->setSize (getWidth(), getHeight());
}
void WebBrowserComponent::visibilityChanged()
{
checkWindowAssociation();
}
bool WebBrowserComponent::pageAboutToLoad (const String& url)
{
return true;
}
#endif

+ 0
- 3551
build/macosx/platform_specific_code/juce_mac_Windowing.mm
File diff suppressed because it is too large
View File


+ 6
- 53
build/win32/platform_specific_code/juce_win32_ASIO.cpp View File

@@ -29,55 +29,11 @@
==============================================================================
*/
#include "win32_headers.h"
#undef WINDOWS
#if JUCE_ASIO
//==============================================================================
/*
This is very frustrating - we only need to use a handful of definitions from
a couple of the header files in Steinberg's ASIO SDK, and it'd be easy to copy
about 30 lines of code into this cpp file to create a fully stand-alone ASIO
implementation...
..unfortunately that would break Steinberg's license agreement for use of
their SDK, so I'm not allowed to do this.
This means that anyone who wants to use JUCE's ASIO abilities will have to:
1) Agree to Steinberg's licensing terms and download the ASIO SDK
(see www.steinberg.net/Steinberg/Developers.asp).
2) Rebuild the whole of JUCE, setting the global definition JUCE_ASIO (you
can un-comment the "#define JUCE_ASIO" line in juce_Config.h
if you prefer). Make sure that your header search path will find the
iasiodrv.h file that comes with the SDK. (Only about 2-3 of the SDK header
files are actually needed - so to simplify things, you could just copy
these into your JUCE directory).
*/
#include "iasiodrv.h" // if you're compiling and this line causes an error because
// you don't have the ASIO SDK installed, you can disable ASIO
// support by commenting-out the "#define JUCE_ASIO" line in
// juce_Config.h
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/audio/devices/juce_AudioIODeviceType.h"
#include "../../../src/juce_appframework/audio/devices/juce_AudioDeviceManager.h"
#include "../../../src/juce_appframework/gui/components/buttons/juce_TextButton.h"
#include "../../../src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h"
#include "../../../src/juce_core/threads/juce_ScopedLock.h"
#include "../../../src/juce_core/basics/juce_Time.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_appframework/events/juce_Timer.h"
#include "../../../src/juce_appframework/events/juce_MessageManager.h"
#include "../../../src/juce_appframework/gui/components/windows/juce_AlertWindow.h"
#include "../../../src/juce_appframework/gui/components/controls/juce_ListBox.h"
#include "../../../src/juce_core/text/juce_LocalisedStrings.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_ASIO
#undef WINDOWS
//==============================================================================
// #define ASIO_DEBUGGING
@@ -1806,7 +1762,7 @@ public:
#if JUCE_DEBUG
if (deviceNames.size() > 1 && deviceNames[0].containsIgnoreCase (T("digidesign")))
return 1; // (the digi m-box driver crashes the app when you run
return 1; // (the digi m-box driver crashes the app when you run
// it in the debugger, which can be a bit annoying)
#endif
@@ -1974,7 +1930,7 @@ AudioIODeviceType* juce_createASIOAudioIODeviceType()
return new ASIOAudioIODeviceType();
}
AudioIODevice* juce_createASIOAudioIODeviceForGUID (const String& name,
AudioIODevice* juce_createASIOAudioIODeviceForGUID (const String& name,
void* guid)
{
const int freeSlot = ASIOAudioIODeviceType::findFreeSlot();
@@ -1985,9 +1941,6 @@ AudioIODevice* juce_createASIOAudioIODeviceForGUID (const String& name,
return new ASIOAudioIODevice (name, *(CLSID*) guid, freeSlot);
}
END_JUCE_NAMESPACE
#undef log
#endif

+ 552
- 0
build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp View File

@@ -0,0 +1,552 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
//==============================================================================
class JuceIStorage : public IStorage
{
int refCount;
public:
JuceIStorage() : refCount (1) {}
virtual ~JuceIStorage()
{
jassert (refCount == 0);
}
HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result)
{
if (id == IID_IUnknown || id == IID_IStorage)
{
AddRef();
*result = this;
return S_OK;
}
*result = 0;
return E_NOINTERFACE;
}
ULONG __stdcall AddRef() { return ++refCount; }
ULONG __stdcall Release() { const int r = --refCount; if (r == 0) delete this; return r; }
HRESULT __stdcall CreateStream (const WCHAR*, DWORD, DWORD, DWORD, IStream**) { return E_NOTIMPL; }
HRESULT __stdcall OpenStream (const WCHAR*, void*, DWORD, DWORD, IStream**) { return E_NOTIMPL; }
HRESULT __stdcall CreateStorage (const WCHAR*, DWORD, DWORD, DWORD, IStorage**) { return E_NOTIMPL; }
HRESULT __stdcall OpenStorage (const WCHAR*, IStorage*, DWORD, SNB, DWORD, IStorage**) { return E_NOTIMPL; }
HRESULT __stdcall CopyTo (DWORD, IID const*, SNB, IStorage*) { return E_NOTIMPL; }
HRESULT __stdcall MoveElementTo (const OLECHAR*,IStorage*, const OLECHAR*, DWORD) { return E_NOTIMPL; }
HRESULT __stdcall Commit (DWORD) { return E_NOTIMPL; }
HRESULT __stdcall Revert() { return E_NOTIMPL; }
HRESULT __stdcall EnumElements (DWORD, void*, DWORD, IEnumSTATSTG**) { return E_NOTIMPL; }
HRESULT __stdcall DestroyElement (const OLECHAR*) { return E_NOTIMPL; }
HRESULT __stdcall RenameElement (const WCHAR*, const WCHAR*) { return E_NOTIMPL; }
HRESULT __stdcall SetElementTimes (const WCHAR*, FILETIME const*, FILETIME const*, FILETIME const*) { return E_NOTIMPL; }
HRESULT __stdcall SetClass (REFCLSID) { return S_OK; }
HRESULT __stdcall SetStateBits (DWORD, DWORD) { return E_NOTIMPL; }
HRESULT __stdcall Stat (STATSTG*, DWORD) { return E_NOTIMPL; }
juce_UseDebuggingNewOperator
};
class JuceOleInPlaceFrame : public IOleInPlaceFrame
{
int refCount;
HWND window;
public:
JuceOleInPlaceFrame (HWND window_)
: refCount (1),
window (window_)
{
}
virtual ~JuceOleInPlaceFrame()
{
jassert (refCount == 0);
}
HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result)
{
if (id == IID_IUnknown || id == IID_IOleInPlaceFrame)
{
AddRef();
*result = this;
return S_OK;
}
*result = 0;
return E_NOINTERFACE;
}
ULONG __stdcall AddRef() { return ++refCount; }
ULONG __stdcall Release() { const int r = --refCount; if (r == 0) delete this; return r; }
HRESULT __stdcall GetWindow (HWND* lphwnd) { *lphwnd = window; return S_OK; }
HRESULT __stdcall ContextSensitiveHelp (BOOL) { return E_NOTIMPL; }
HRESULT __stdcall GetBorder (LPRECT) { return E_NOTIMPL; }
HRESULT __stdcall RequestBorderSpace (LPCBORDERWIDTHS) { return E_NOTIMPL; }
HRESULT __stdcall SetBorderSpace (LPCBORDERWIDTHS) { return E_NOTIMPL; }
HRESULT __stdcall SetActiveObject (IOleInPlaceActiveObject*, LPCOLESTR) { return S_OK; }
HRESULT __stdcall InsertMenus (HMENU, LPOLEMENUGROUPWIDTHS) { return E_NOTIMPL; }
HRESULT __stdcall SetMenu (HMENU, HOLEMENU, HWND) { return S_OK; }
HRESULT __stdcall RemoveMenus (HMENU) { return E_NOTIMPL; }
HRESULT __stdcall SetStatusText (LPCOLESTR) { return S_OK; }
HRESULT __stdcall EnableModeless (BOOL) { return S_OK; }
HRESULT __stdcall TranslateAccelerator(LPMSG, WORD) { return E_NOTIMPL; }
juce_UseDebuggingNewOperator
};
class JuceIOleInPlaceSite : public IOleInPlaceSite
{
int refCount;
HWND window;
JuceOleInPlaceFrame* frame;
public:
JuceIOleInPlaceSite (HWND window_)
: refCount (1),
window (window_)
{
frame = new JuceOleInPlaceFrame (window);
}
virtual ~JuceIOleInPlaceSite()
{
jassert (refCount == 0);
frame->Release();
}
HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result)
{
if (id == IID_IUnknown || id == IID_IOleInPlaceSite)
{
AddRef();
*result = this;
return S_OK;
}
*result = 0;
return E_NOINTERFACE;
}
ULONG __stdcall AddRef() { return ++refCount; }
ULONG __stdcall Release() { const int r = --refCount; if (r == 0) delete this; return r; }
HRESULT __stdcall GetWindow (HWND* lphwnd) { *lphwnd = window; return S_OK; }
HRESULT __stdcall ContextSensitiveHelp (BOOL) { return E_NOTIMPL; }
HRESULT __stdcall CanInPlaceActivate() { return S_OK; }
HRESULT __stdcall OnInPlaceActivate() { return S_OK; }
HRESULT __stdcall OnUIActivate() { return S_OK; }
HRESULT __stdcall GetWindowContext (LPOLEINPLACEFRAME* lplpFrame, LPOLEINPLACEUIWINDOW* lplpDoc, LPRECT, LPRECT, LPOLEINPLACEFRAMEINFO lpFrameInfo)
{
frame->AddRef();
*lplpFrame = frame;
*lplpDoc = 0;
lpFrameInfo->fMDIApp = FALSE;
lpFrameInfo->hwndFrame = window;
lpFrameInfo->haccel = 0;
lpFrameInfo->cAccelEntries = 0;
return S_OK;
}
HRESULT __stdcall Scroll (SIZE) { return E_NOTIMPL; }
HRESULT __stdcall OnUIDeactivate (BOOL) { return S_OK; }
HRESULT __stdcall OnInPlaceDeactivate() { return S_OK; }
HRESULT __stdcall DiscardUndoState() { return E_NOTIMPL; }
HRESULT __stdcall DeactivateAndUndo() { return E_NOTIMPL; }
HRESULT __stdcall OnPosRectChange (LPCRECT) { return S_OK; }
juce_UseDebuggingNewOperator
};
class JuceIOleClientSite : public IOleClientSite
{
int refCount;
JuceIOleInPlaceSite* inplaceSite;
public:
JuceIOleClientSite (HWND window)
: refCount (1)
{
inplaceSite = new JuceIOleInPlaceSite (window);
}
virtual ~JuceIOleClientSite()
{
jassert (refCount == 0);
inplaceSite->Release();
}
HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result)
{
if (id == IID_IUnknown || id == IID_IOleClientSite)
{
AddRef();
*result = this;
return S_OK;
}
else if (id == IID_IOleInPlaceSite)
{
inplaceSite->AddRef();
*result = inplaceSite;
return S_OK;
}
*result = 0;
return E_NOINTERFACE;
}
ULONG __stdcall AddRef() { return ++refCount; }
ULONG __stdcall Release() { const int r = --refCount; if (r == 0) delete this; return r; }
HRESULT __stdcall SaveObject() { return E_NOTIMPL; }
HRESULT __stdcall GetMoniker (DWORD, DWORD, IMoniker**) { return E_NOTIMPL; }
HRESULT __stdcall GetContainer (LPOLECONTAINER* ppContainer) { *ppContainer = 0; return E_NOINTERFACE; }
HRESULT __stdcall ShowObject() { return S_OK; }
HRESULT __stdcall OnShowWindow (BOOL) { return E_NOTIMPL; }
HRESULT __stdcall RequestNewObjectLayout() { return E_NOTIMPL; }
juce_UseDebuggingNewOperator
};
//==============================================================================
class ActiveXControlData : public ComponentMovementWatcher
{
ActiveXControlComponent* const owner;
bool wasShowing;
public:
HWND controlHWND;
IStorage* storage;
IOleClientSite* clientSite;
IOleObject* control;
//==============================================================================
ActiveXControlData (HWND hwnd,
ActiveXControlComponent* const owner_)
: ComponentMovementWatcher (owner_),
owner (owner_),
wasShowing (owner_ != 0 && owner_->isShowing()),
controlHWND (0),
storage (new JuceIStorage()),
clientSite (new JuceIOleClientSite (hwnd)),
control (0)
{
}
~ActiveXControlData()
{
if (control != 0)
{
control->Close (OLECLOSE_NOSAVE);
control->Release();
}
clientSite->Release();
storage->Release();
}
//==============================================================================
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
{
Component* const topComp = owner->getTopLevelComponent();
if (topComp->getPeer() != 0)
{
int x = 0, y = 0;
owner->relativePositionToOtherComponent (topComp, x, y);
owner->setControlBounds (Rectangle (x, y, owner->getWidth(), owner->getHeight()));
}
}
void componentPeerChanged()
{
const bool isShowingNow = owner->isShowing();
if (wasShowing != isShowingNow)
{
wasShowing = isShowingNow;
owner->setControlVisible (isShowingNow);
}
}
void componentVisibilityChanged (Component&)
{
componentPeerChanged();
}
static bool doesWindowMatch (const ActiveXControlComponent* const ax, HWND hwnd)
{
return ((ActiveXControlData*) ax->control) != 0
&& ((ActiveXControlData*) ax->control)->controlHWND == hwnd;
}
};
//==============================================================================
static VoidArray activeXComps;
static HWND getHWND (const ActiveXControlComponent* const component)
{
HWND hwnd = 0;
const IID iid = IID_IOleWindow;
IOleWindow* const window = (IOleWindow*) component->queryInterface (&iid);
if (window != 0)
{
window->GetWindow (&hwnd);
window->Release();
}
return hwnd;
}
static void offerActiveXMouseEventToPeer (ComponentPeer* const peer, HWND hwnd, UINT message, LPARAM lParam)
{
RECT activeXRect, peerRect;
GetWindowRect (hwnd, &activeXRect);
GetWindowRect ((HWND) peer->getNativeHandle(), &peerRect);
const int mx = GET_X_LPARAM (lParam) + activeXRect.left - peerRect.left;
const int my = GET_Y_LPARAM (lParam) + activeXRect.top - peerRect.top;
const int64 mouseEventTime = getMouseEventTime();
const int oldModifiers = currentModifiers;
ModifierKeys::getCurrentModifiersRealtime(); // to update the mouse button flags
switch (message)
{
case WM_MOUSEMOVE:
if (ModifierKeys (currentModifiers).isAnyMouseButtonDown())
peer->handleMouseDrag (mx, my, mouseEventTime);
else
peer->handleMouseMove (mx, my, mouseEventTime);
break;
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_RBUTTONDOWN:
peer->handleMouseDown (mx, my, mouseEventTime);
break;
case WM_LBUTTONUP:
case WM_MBUTTONUP:
case WM_RBUTTONUP:
peer->handleMouseUp (oldModifiers, mx, my, mouseEventTime);
break;
default:
break;
}
}
// intercepts events going to an activeX control, so we can sneakily use the mouse events
static LRESULT CALLBACK activeXHookWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
for (int i = activeXComps.size(); --i >= 0;)
{
const ActiveXControlComponent* const ax = (const ActiveXControlComponent*) activeXComps.getUnchecked(i);
if (ActiveXControlData::doesWindowMatch (ax, hwnd))
{
switch (message)
{
case WM_MOUSEMOVE:
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MBUTTONUP:
case WM_RBUTTONUP:
case WM_LBUTTONDBLCLK:
case WM_MBUTTONDBLCLK:
case WM_RBUTTONDBLCLK:
if (ax->isShowing())
{
ComponentPeer* const peer = ax->getPeer();
if (peer != 0)
{
offerActiveXMouseEventToPeer (peer, hwnd, message, lParam);
if (! ax->areMouseEventsAllowed())
return 0;
}
}
break;
default:
break;
}
return CallWindowProc ((WNDPROC) (ax->originalWndProc), hwnd, message, wParam, lParam);
}
}
return DefWindowProc (hwnd, message, wParam, lParam);
}
ActiveXControlComponent::ActiveXControlComponent()
: originalWndProc (0),
control (0),
mouseEventsAllowed (true)
{
activeXComps.add (this);
}
ActiveXControlComponent::~ActiveXControlComponent()
{
deleteControl();
activeXComps.removeValue (this);
}
void ActiveXControlComponent::paint (Graphics& g)
{
if (control == 0)
g.fillAll (Colours::lightgrey);
}
bool ActiveXControlComponent::createControl (const void* controlIID)
{
deleteControl();
ComponentPeer* const peer = getPeer();
// the component must have already been added to a real window when you call this!
jassert (dynamic_cast <Win32ComponentPeer*> (peer) != 0);
if (dynamic_cast <Win32ComponentPeer*> (peer) != 0)
{
int x = 0, y = 0;
relativePositionToOtherComponent (getTopLevelComponent(), x, y);
HWND hwnd = (HWND) peer->getNativeHandle();
ActiveXControlData* const info = new ActiveXControlData (hwnd, this);
HRESULT hr;
if ((hr = OleCreate (*(const IID*) controlIID, IID_IOleObject, 1 /*OLERENDER_DRAW*/, 0,
info->clientSite, info->storage,
(void**) &(info->control))) == S_OK)
{
info->control->SetHostNames (L"Juce", 0);
if (OleSetContainedObject (info->control, TRUE) == S_OK)
{
RECT rect;
rect.left = x;
rect.top = y;
rect.right = x + getWidth();
rect.bottom = y + getHeight();
if (info->control->DoVerb (OLEIVERB_SHOW, 0, info->clientSite, 0, hwnd, &rect) == S_OK)
{
control = info;
setControlBounds (Rectangle (x, y, getWidth(), getHeight()));
info->controlHWND = getHWND (this);
if (info->controlHWND != 0)
{
originalWndProc = (void*) GetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC);
SetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC, (LONG_PTR) activeXHookWndProc);
}
return true;
}
}
}
delete info;
}
return false;
}
void ActiveXControlComponent::deleteControl()
{
ActiveXControlData* const info = (ActiveXControlData*) control;
if (info != 0)
{
delete info;
control = 0;
originalWndProc = 0;
}
}
void* ActiveXControlComponent::queryInterface (const void* iid) const
{
ActiveXControlData* const info = (ActiveXControlData*) control;
void* result = 0;
if (info != 0 && info->control != 0
&& info->control->QueryInterface (*(const IID*) iid, &result) == S_OK)
return result;
return 0;
}
void ActiveXControlComponent::setControlBounds (const Rectangle& newBounds) const
{
HWND hwnd = ((ActiveXControlData*) control)->controlHWND;
if (hwnd != 0)
MoveWindow (hwnd, newBounds.getX(), newBounds.getY(), newBounds.getWidth(), newBounds.getHeight(), TRUE);
}
void ActiveXControlComponent::setControlVisible (const bool shouldBeVisible) const
{
HWND hwnd = ((ActiveXControlData*) control)->controlHWND;
if (hwnd != 0)
ShowWindow (hwnd, shouldBeVisible ? SW_SHOWNA : SW_HIDE);
}
void ActiveXControlComponent::setMouseEventsAllowed (const bool eventsCanReachControl)
{
mouseEventsAllowed = eventsCanReachControl;
}
#endif

+ 3
- 34
build/win32/platform_specific_code/juce_win32_AudioCDReader.cpp View File

@@ -29,37 +29,10 @@
==============================================================================
*/
#ifdef _MSC_VER
#pragma warning (disable: 4514)
#pragma warning (push)
#endif
#include "win32_headers.h"
#include <stddef.h>
#include "../../../juce_Config.h"
#if JUCE_USE_CDBURNER
// you'll need the Platform SDK for these headers - if you don't have it and don't
// need to use CD-burning, then you might just want to disable the JUCE_USE_CDBURNER
// flag in juce_Config.h to avoid these includes.
#include <imapi.h>
#include <imapierror.h>
#endif
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_USE_CDBURNER
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/audio/audio_file_formats/juce_AudioCDReader.h"
#include "../../../src/juce_appframework/audio/audio_file_formats/juce_AudioCDBurner.h"
#include "../../../src/juce_appframework/events/juce_Timer.h"
#include "../../../src/juce_appframework/application/juce_DeletedAtShutdown.h"
#include "../../../src/juce_appframework/audio/dsp/juce_AudioDataConverters.h"
#ifdef _MSC_VER
#pragma warning (pop)
#endif
//***************************************************************************
// %%% TARGET STATUS VALUES %%%
@@ -2122,8 +2095,6 @@ void AudioCDReader::ejectDisk()
}
#if JUCE_USE_CDBURNER
//==============================================================================
static IDiscRecorder* enumCDBurners (StringArray* list, int indexToOpen, IDiscMaster** master)
{
@@ -2445,5 +2416,3 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamples)
}
#endif
END_JUCE_NAMESPACE

+ 10
- 31
build/win32/platform_specific_code/juce_win32_DirectSound.cpp View File

@@ -29,10 +29,13 @@
==============================================================================
*/
#include "win32_headers.h"
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
//==============================================================================
END_JUCE_NAMESPACE
extern "C"
{
@@ -524,7 +527,7 @@ public:
bytesPerBuffer,
(void**) &lpbuf1, &dwSize1,
(void**) &lpbuf2, &dwSize2, 0);
}
}
if (hr == S_OK)
{
@@ -1216,41 +1219,17 @@ private:
void resync()
{
int i;
for (i = outChans.size(); --i >= 0;)
outChans.getUnchecked(i)->close();
for (i = inChans.size(); --i >= 0;)
inChans.getUnchecked(i)->close();
if (threadShouldExit())
return;
// boost our priority while opening the devices to try to get better sync between them
const int oldThreadPri = GetThreadPriority (GetCurrentThread());
const int oldProcPri = GetPriorityClass (GetCurrentProcess());
SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
SetPriorityClass (GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
for (i = outChans.size(); --i >= 0;)
outChans.getUnchecked(i)->open();
for (i = inChans.size(); --i >= 0;)
inChans.getUnchecked(i)->open();
if (! threadShouldExit())
{
sleep (5);
int i;
for (i = 0; i < outChans.size(); ++i)
outChans.getUnchecked(i)->synchronisePosition();
for (i = 0; i < inChans.size(); ++i)
inChans.getUnchecked(i)->synchronisePosition();
}
SetThreadPriority (GetCurrentThread(), oldThreadPri);
SetPriorityClass (GetCurrentProcess(), oldProcPri);
}
public:
@@ -1435,8 +1414,8 @@ public:
const int inputIndex = inputDeviceNames.indexOf (inputDeviceName);
if (outputIndex >= 0 || inputIndex >= 0)
return new DSoundAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName
: inputDeviceName,
return new DSoundAudioIODevice (outputDeviceName.isNotEmpty() ? outputDeviceName
: inputDeviceName,
outputIndex, inputIndex);
return 0;
@@ -1676,4 +1655,4 @@ const String DSoundAudioIODevice::openDevice (const BitArray& inputChannels,
#undef log
END_JUCE_NAMESPACE
#endif

+ 5
- 6
build/win32/platform_specific_code/juce_win32_DynamicLibraryLoader.cpp View File

@@ -29,12 +29,10 @@
==============================================================================
*/
#include "win32_headers.h"
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/text/juce_String.h"
#include "juce_win32_DynamicLibraryLoader.h"
@@ -54,4 +52,5 @@ void* DynamicLibraryLoader::findProcAddress (const String& functionName)
return (void*) GetProcAddress ((HMODULE) libHandle, functionName);
}
END_JUCE_NAMESPACE
#endif

+ 4
- 19
build/win32/platform_specific_code/juce_win32_FileChooser.cpp View File

@@ -29,25 +29,10 @@
==============================================================================
*/
#ifdef _MSC_VER
#pragma warning (disable: 4514)
#pragma warning (push)
#endif
#include "win32_headers.h"
#include <shlobj.h>
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
#include "../../../src/juce_appframework/gui/components/filebrowser/juce_FileChooser.h"
#include "../../../src/juce_appframework/gui/components/juce_Desktop.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#ifdef _MSC_VER
#pragma warning (pop)
#endif
//==============================================================================
static const void* defaultDirPath = 0;
@@ -355,4 +340,4 @@ void FileChooser::showPlatformDialog (OwnedArray<File>& results,
}
}
END_JUCE_NAMESPACE
#endif

+ 40
- 50
build/win32/platform_specific_code/juce_win32_Files.cpp View File

@@ -29,21 +29,12 @@
==============================================================================
*/
#ifdef _MSC_VER
#pragma warning (disable: 4514)
#pragma warning (push)
#endif
#include "win32_headers.h"
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
#include <ctime>
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400
#endif
#include <shlobj.h>
//==============================================================================
#ifndef CSIDL_MYMUSIC
#define CSIDL_MYMUSIC 0x000d
#endif
@@ -52,19 +43,6 @@
#define CSIDL_MYVIDEO 0x000e
#endif
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/io/files/juce_File.h"
#include "../../../src/juce_core/io/network/juce_URL.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/io/files/juce_NamedPipe.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#ifdef _MSC_VER
#pragma warning (pop)
#endif
//==============================================================================
const tchar File::separator = T('\\');
const tchar* File::separatorString = T("\\");
@@ -711,7 +689,8 @@ bool NamedPipe::openInternal (const String& pipeName, const bool createPipe)
if (createPipe)
{
intern->pipeH = CreateNamedPipe (file, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, 0,
1, 64, 64, 0, NULL);
PIPE_UNLIMITED_INSTANCES,
4096, 4096, 0, NULL);
}
else
{
@@ -758,20 +737,24 @@ int NamedPipe::read (void* destBuffer, int maxBytesToRead, int timeOutMillisecon
else if (GetLastError() == ERROR_IO_PENDING)
{
HANDLE handles[] = { over.hEvent, intern->cancelEvent };
DWORD waitResult = WaitForMultipleObjects (2, handles, FALSE,
timeOutMilliseconds >= 0 ? timeOutMilliseconds
: INFINITE);
if (waitResult != WAIT_OBJECT_0)
{
// if the operation timed out, let's cancel it...
CancelIo (intern->pipeH);
WaitForSingleObject (over.hEvent, INFINITE); // makes sure cancel is complete
}
if (WaitForMultipleObjects (2, handles, FALSE,
timeOutMilliseconds >= 0 ? timeOutMilliseconds
: INFINITE) == WAIT_OBJECT_0)
if (GetOverlappedResult (intern->pipeH, &over, &numRead, FALSE))
{
if (GetOverlappedResult (intern->pipeH, &over, &numRead, FALSE))
{
bytesRead = (int) numRead;
}
else if (GetLastError() == ERROR_BROKEN_PIPE && intern->createdPipe)
{
intern->disconnect();
waitAgain = true;
}
bytesRead = (int) numRead;
}
else if (GetLastError() == ERROR_BROKEN_PIPE && intern->createdPipe)
{
intern->disconnect();
waitAgain = true;
}
}
else
@@ -810,18 +793,25 @@ int NamedPipe::write (const void* sourceBuffer, int numBytesToWrite, int timeOut
else if (GetLastError() == ERROR_IO_PENDING)
{
HANDLE handles[] = { over.hEvent, intern->cancelEvent };
DWORD waitResult;
waitResult = WaitForMultipleObjects (2, handles, FALSE,
timeOutMilliseconds >= 0 ? timeOutMilliseconds
: INFINITE);
if (WaitForMultipleObjects (2, handles, FALSE, timeOutMilliseconds >= 0 ? timeOutMilliseconds
: INFINITE) == WAIT_OBJECT_0)
if (waitResult != WAIT_OBJECT_0)
{
if (GetOverlappedResult (intern->pipeH, &over, &numWritten, FALSE))
{
bytesWritten = (int) numWritten;
}
else if (GetLastError() == ERROR_BROKEN_PIPE && intern->createdPipe)
{
intern->disconnect();
}
CancelIo (intern->pipeH);
WaitForSingleObject (over.hEvent, INFINITE);
}
if (GetOverlappedResult (intern->pipeH, &over, &numWritten, FALSE))
{
bytesWritten = (int) numWritten;
}
else if (GetLastError() == ERROR_BROKEN_PIPE && intern->createdPipe)
{
intern->disconnect();
}
}
@@ -840,4 +830,4 @@ void NamedPipe::cancelPendingReads()
}
END_JUCE_NAMESPACE
#endif

+ 4
- 11
build/win32/platform_specific_code/juce_win32_Fonts.cpp View File

@@ -29,16 +29,9 @@
==============================================================================
*/
#include "win32_headers.h"
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/gui/graphics/fonts/juce_Font.h"
#include "../../../src/juce_appframework/application/juce_DeletedAtShutdown.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/basics/juce_Singleton.h"
#include "../../../src/juce_appframework/gui/graphics/imaging/juce_Image.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
//==============================================================================
@@ -506,4 +499,4 @@ void Typeface::initialiseTypefaceCharacteristics (const String& fontName,
}
}
END_JUCE_NAMESPACE
#endif

+ 5
- 11
build/win32/platform_specific_code/juce_win32_Messaging.cpp View File

@@ -29,16 +29,9 @@
==============================================================================
*/
#include "win32_headers.h"
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/events/juce_MessageManager.h"
#include "../../../src/juce_appframework/application/juce_Application.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/basics/juce_Time.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
//==============================================================================
@@ -250,4 +243,5 @@ void MessageManager::doPlatformSpecificShutdown()
OleUninitialize();
}
END_JUCE_NAMESPACE
#endif

+ 6
- 17
build/win32/platform_specific_code/juce_win32_Midi.cpp View File

@@ -29,22 +29,9 @@
==============================================================================
*/
#include "win32_headers.h"
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/audio/devices/juce_MidiOutput.h"
#include "../../../src/juce_appframework/audio/devices/juce_MidiInput.h"
#include "../../../src/juce_core/basics/juce_Time.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_core/containers/juce_MemoryBlock.h"
#if JUCE_MSVC
#pragma warning (disable: 4312)
#endif
using ::free;
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
//==============================================================================
static const int midiBufferSize = 1024 * 10;
@@ -52,6 +39,8 @@ static const int numInHeaders = 32;
static const int inBufferSize = 256;
static Array <void*, CriticalSection> activeMidiThreads;
using ::free;
class MidiInThread : public Thread
{
public:
@@ -644,4 +633,4 @@ void MidiOutput::sendMessageNow (const MidiMessage& message)
}
}
END_JUCE_NAMESPACE
#endif

+ 4
- 37
build/win32/platform_specific_code/juce_win32_Misc.cpp View File

@@ -29,44 +29,12 @@
==============================================================================
*/
#include "win32_headers.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_appframework/application/juce_SystemClipboard.h"
#include "../../../src/juce_appframework/gui/components/windows/juce_AlertWindow.h"
//==============================================================================
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
bool AlertWindow::showNativeDialogBox (const String& title,
const String& bodyText,
bool isOkCancel)
{
return MessageBox (0, bodyText, title,
MB_SETFOREGROUND | (isOkCancel ? MB_OKCANCEL
: MB_OK)) == IDOK;
}
#endif
//==============================================================================
void PlatformUtilities::beep()
{
MessageBeep (MB_OK);
}
//==============================================================================
#if JUCE_MSVC
#pragma warning (disable : 4127) // "Conditional expression is constant" warning
#endif
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
void SystemClipboard::copyTextToClipboard (const String& text) throw()
{
if (OpenClipboard (0) != 0)
@@ -121,6 +89,5 @@ const String SystemClipboard::getTextFromClipboard() throw()
return result;
}
#endif
END_JUCE_NAMESPACE
#endif

+ 156
- 0
build/win32/platform_specific_code/juce_win32_NativeIncludes.h View File

@@ -0,0 +1,156 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
//==============================================================================
#ifndef __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__
#define __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__
#include "../../../juce_Config.h"
#ifndef STRICT
#define STRICT 1
#endif
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable : 4100 4201 4514 4312)
#endif
#define _WIN32_WINNT 0x0500
#define _UNICODE 1
#define UNICODE 1
#ifndef _WIN32_IE
#define _WIN32_IE 0x0400
#endif
#include <windows.h>
#include <windowsx.h>
#include <commdlg.h>
#include <shellapi.h>
#include <mmsystem.h>
#include <vfw.h>
#include <tchar.h>
#include <stddef.h>
#include <ctime>
#include <wininet.h>
#include <nb30.h>
#include <iphlpapi.h>
#include <mapi.h>
#include <float.h>
#include <crtdbg.h>
#include <process.h>
#include <comutil.h>
#include <Exdisp.h>
#include <exdispid.h>
#include <shlobj.h>
#if JUCE_OPENGL
#include <gl/gl.h>
#endif
#undef PACKED
//==============================================================================
#if JUCE_ASIO
/*
This is very frustrating - we only need to use a handful of definitions from
a couple of the header files in Steinberg's ASIO SDK, and it'd be easy to copy
about 30 lines of code into this cpp file to create a fully stand-alone ASIO
implementation...
..unfortunately that would break Steinberg's license agreement for use of
their SDK, so I'm not allowed to do this.
This means that anyone who wants to use JUCE's ASIO abilities will have to:
1) Agree to Steinberg's licensing terms and download the ASIO SDK
(see www.steinberg.net/Steinberg/Developers.asp).
2) Rebuild the whole of JUCE, setting the global definition JUCE_ASIO (you
can un-comment the "#define JUCE_ASIO" line in juce_Config.h
if you prefer). Make sure that your header search path will find the
iasiodrv.h file that comes with the SDK. (Only about 2-3 of the SDK header
files are actually needed - so to simplify things, you could just copy
these into your JUCE directory).
If you're compiling and you get an error here because you don't have the
ASIO SDK installed, you can disable ASIO support by commenting-out the
"#define JUCE_ASIO" line in juce_Config.h, and rebuild your Juce library.
*/
#include "iasiodrv.h"
#endif
//==============================================================================
#if JUCE_USE_CDBURNER
/* You'll need the Platform SDK for these headers - if you don't have it and don't
need to use CD-burning, then you might just want to disable the JUCE_USE_CDBURNER
flag in juce_Config.h to avoid these includes.
*/
#include <imapi.h>
#include <imapierror.h>
#endif
//==============================================================================
#if JUCE_QUICKTIME
/* If you've got an include error here, you probably need to install the QuickTime SDK and
add its header directory to your include path.
Alternatively, if you don't need any QuickTime services, just turn off the JUCE_QUICKTIME
flag in juce_Config.h
*/
#include <Movies.h>
#include <QTML.h>
#include <QuickTimeComponents.h>
#include <MediaHandlers.h>
#include <ImageCodec.h>
/* If you've got QuickTime 7 installed, then these COM objects should be found in
the "\Program Files\Quicktime" directory. You'll need to add this directory to
your include search path to make these import statements work.
*/
#import <QTOLibrary.dll>
#import <QTOControl.dll>
#endif
//==============================================================================
#ifdef _MSC_VER
#pragma warning (pop)
#endif
#endif // __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__

+ 4
- 24
build/win32/platform_specific_code/juce_win32_Network.cpp View File

@@ -29,35 +29,15 @@
==============================================================================
*/
#ifdef _MSC_VER
#pragma warning (disable: 4514)
#pragma warning (push)
#endif
#include "win32_headers.h"
#include <wininet.h>
#include <nb30.h>
#include <iphlpapi.h>
#include <mapi.h>
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
#include "../../../src/juce_core/text/juce_String.h"
#include "juce_win32_DynamicLibraryLoader.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#include "../../../src/juce_core/containers/juce_MemoryBlock.h"
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/io/network/juce_URL.h"
#ifndef INTERNET_FLAG_NEED_FILE
#define INTERNET_FLAG_NEED_FILE 0x00000010
#endif
#ifdef _MSC_VER
#pragma warning (pop)
#endif
//==============================================================================
bool juce_isOnLine()
{
@@ -417,4 +397,4 @@ bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAdd
}
END_JUCE_NAMESPACE
#endif

+ 11
- 18
build/win32/platform_specific_code/juce_win32_PlatformUtils.cpp View File

@@ -29,23 +29,9 @@
==============================================================================
*/
#ifdef _MSC_VER
#pragma warning (disable: 4514)
#pragma warning (push)
#endif
#include "win32_headers.h"
#include <float.h>
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/misc/juce_PlatformUtilities.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
#ifdef _MSC_VER
#pragma warning (pop)
#endif
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
//==============================================================================
@@ -219,4 +205,11 @@ void PlatformUtilities::fpuReset()
#endif
}
END_JUCE_NAMESPACE
//==============================================================================
void PlatformUtilities::beep()
{
MessageBeep (MB_OK);
}
#endif

+ 517
- 0
build/win32/platform_specific_code/juce_win32_QuickTimeMovieComponent.cpp View File

@@ -0,0 +1,517 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_QUICKTIME
using namespace QTOLibrary;
using namespace QTOControlLib;
bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle);
static bool hasLoadedQT = false;
static bool isQTAvailable = false;
//==============================================================================
struct QTMovieCompInternal
{
QTMovieCompInternal()
: dataHandle (0)
{
}
~QTMovieCompInternal()
{
clearHandle();
}
IQTControlPtr qtControlInternal;
IQTMoviePtr qtMovieInternal;
Handle dataHandle;
void clearHandle()
{
if (dataHandle != 0)
{
DisposeHandle (dataHandle);
dataHandle = 0;
}
}
};
#define qtControl (((QTMovieCompInternal*) internal)->qtControlInternal)
#define qtMovie (((QTMovieCompInternal*) internal)->qtMovieInternal)
//==============================================================================
QuickTimeMovieComponent::QuickTimeMovieComponent()
: movieLoaded (false),
controllerVisible (true)
{
internal = new QTMovieCompInternal();
setMouseEventsAllowed (false);
}
QuickTimeMovieComponent::~QuickTimeMovieComponent()
{
closeMovie();
qtControl = 0;
deleteControl();
delete internal;
internal = 0;
}
bool QuickTimeMovieComponent::isQuickTimeAvailable() throw()
{
if (! hasLoadedQT)
{
hasLoadedQT = true;
isQTAvailable = (InitializeQTML (0) == noErr)
&& (EnterMovies() == noErr);
}
return isQTAvailable;
}
//==============================================================================
void QuickTimeMovieComponent::createControlIfNeeded()
{
if (isShowing() && ! isControlCreated())
{
const IID qtIID = __uuidof (QTControl);
if (createControl (&qtIID))
{
const IID qtInterfaceIID = __uuidof (IQTControl);
qtControl = (IQTControl*) queryInterface (&qtInterfaceIID);
if (qtControl != 0)
{
qtControl->Release(); // it has one ref too many at this point
qtControl->QuickTimeInitialize();
qtControl->PutSizing (qtMovieFitsControl);
if (movieFile != File::nonexistent)
loadMovie (movieFile, controllerVisible);
}
}
}
}
bool QuickTimeMovieComponent::isControlCreated() const
{
return isControlOpen();
}
bool QuickTimeMovieComponent::loadMovie (InputStream* movieStream,
const bool isControllerVisible)
{
movieFile = File::nonexistent;
movieLoaded = false;
qtMovie = 0;
controllerVisible = isControllerVisible;
createControlIfNeeded();
if (isControlCreated())
{
if (qtControl != 0)
{
qtControl->Put_MovieHandle (0);
((QTMovieCompInternal*) internal)->clearHandle();
Movie movie;
if (juce_OpenQuickTimeMovieFromStream (movieStream, movie, ((QTMovieCompInternal*) internal)->dataHandle))
{
qtControl->Put_MovieHandle ((long) (pointer_sized_int) movie);
qtMovie = qtControl->GetMovie();
if (qtMovie != 0)
qtMovie->PutMovieControllerType (isControllerVisible ? qtMovieControllerTypeStandard
: qtMovieControllerTypeNone);
}
if (movie == 0)
((QTMovieCompInternal*) internal)->clearHandle();
}
movieLoaded = (qtMovie != 0);
}
else
{
// You're trying to open a movie when the control hasn't yet been created, probably because
// you've not yet added this component to a Window and made the whole component hierarchy visible.
jassertfalse
}
delete movieStream;
return movieLoaded;
}
void QuickTimeMovieComponent::closeMovie()
{
stop();
movieFile = File::nonexistent;
movieLoaded = false;
qtMovie = 0;
if (qtControl != 0)
qtControl->Put_MovieHandle (0);
((QTMovieCompInternal*) internal)->clearHandle();
}
const File QuickTimeMovieComponent::getCurrentMovieFile() const
{
return movieFile;
}
bool QuickTimeMovieComponent::isMovieOpen() const
{
return movieLoaded;
}
double QuickTimeMovieComponent::getMovieDuration() const
{
if (qtMovie != 0)
return qtMovie->GetDuration() / (double) qtMovie->GetTimeScale();
return 0.0;
}
void QuickTimeMovieComponent::getMovieNormalSize (int& width, int& height) const
{
if (qtMovie != 0)
{
struct QTRECT r = qtMovie->GetNaturalRect();
width = r.right - r.left;
height = r.bottom - r.top;
}
else
{
width = height = 0;
}
}
void QuickTimeMovieComponent::play()
{
if (qtMovie != 0)
qtMovie->Play();
}
void QuickTimeMovieComponent::stop()
{
if (qtMovie != 0)
qtMovie->Stop();
}
bool QuickTimeMovieComponent::isPlaying() const
{
return qtMovie != 0 && qtMovie->GetRate() != 0.0f;
}
void QuickTimeMovieComponent::setPosition (const double seconds)
{
if (qtMovie != 0)
qtMovie->PutTime ((long) (seconds * qtMovie->GetTimeScale()));
}
double QuickTimeMovieComponent::getPosition() const
{
if (qtMovie != 0)
return qtMovie->GetTime() / (double) qtMovie->GetTimeScale();
return 0.0;
}
void QuickTimeMovieComponent::setSpeed (const float newSpeed)
{
if (qtMovie != 0)
qtMovie->PutRate (newSpeed);
}
void QuickTimeMovieComponent::setMovieVolume (const float newVolume)
{
if (qtMovie != 0)
{
qtMovie->PutAudioVolume (newVolume);
qtMovie->PutAudioMute (newVolume <= 0);
}
}
float QuickTimeMovieComponent::getMovieVolume() const
{
if (qtMovie != 0)
return qtMovie->GetAudioVolume();
return 0.0f;
}
void QuickTimeMovieComponent::setLooping (const bool shouldLoop)
{
if (qtMovie != 0)
qtMovie->PutLoop (shouldLoop);
}
bool QuickTimeMovieComponent::isLooping() const
{
return qtMovie != 0 && qtMovie->GetLoop();
}
bool QuickTimeMovieComponent::isControllerVisible() const
{
return controllerVisible;
}
void QuickTimeMovieComponent::parentHierarchyChanged()
{
createControlIfNeeded();
QTCompBaseClass::parentHierarchyChanged();
}
void QuickTimeMovieComponent::visibilityChanged()
{
createControlIfNeeded();
QTCompBaseClass::visibilityChanged();
}
void QuickTimeMovieComponent::paint (Graphics& g)
{
if (! isControlCreated())
g.fillAll (Colours::black);
}
//==============================================================================
static Handle createHandleDataRef (Handle dataHandle, const char* fileName)
{
Handle dataRef = 0;
OSStatus err = PtrToHand (&dataHandle, &dataRef, sizeof (Handle));
if (err == noErr)
{
Str255 suffix;
CharacterFunctions::copy ((char*) suffix, fileName, 128);
StringPtr name = suffix;
err = PtrAndHand (name, dataRef, name[0] + 1);
if (err == noErr)
{
long atoms[3];
atoms[0] = EndianU32_NtoB (3 * sizeof (long));
atoms[1] = EndianU32_NtoB (kDataRefExtensionMacOSFileType);
atoms[2] = EndianU32_NtoB (MovieFileType);
err = PtrAndHand (atoms, dataRef, 3 * sizeof (long));
if (err == noErr)
return dataRef;
}
DisposeHandle (dataRef);
}
return 0;
}
static CFStringRef juceStringToCFString (const String& s)
{
const int len = s.length();
const juce_wchar* const t = (const juce_wchar*) s;
UniChar* temp = (UniChar*) juce_malloc (sizeof (UniChar) * len + 4);
for (int i = 0; i <= len; ++i)
temp[i] = t[i];
CFStringRef result = CFStringCreateWithCharacters (kCFAllocatorDefault, temp, len);
juce_free (temp);
return result;
}
static bool openMovie (QTNewMoviePropertyElement* props, int prop, Movie& movie)
{
Boolean trueBool = true;
props[prop].propClass = kQTPropertyClass_MovieInstantiation;
props[prop].propID = kQTMovieInstantiationPropertyID_DontResolveDataRefs;
props[prop].propValueSize = sizeof (trueBool);
props[prop].propValueAddress = &trueBool;
++prop;
props[prop].propClass = kQTPropertyClass_MovieInstantiation;
props[prop].propID = kQTMovieInstantiationPropertyID_AsyncOK;
props[prop].propValueSize = sizeof (trueBool);
props[prop].propValueAddress = &trueBool;
++prop;
Boolean isActive = true;
props[prop].propClass = kQTPropertyClass_NewMovieProperty;
props[prop].propID = kQTNewMoviePropertyID_Active;
props[prop].propValueSize = sizeof (isActive);
props[prop].propValueAddress = &isActive;
++prop;
MacSetPort (0);
jassert (prop <= 5);
OSStatus err = NewMovieFromProperties (prop, props, 0, 0, &movie);
return err == noErr;
}
bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle)
{
if (input == 0)
return false;
dataHandle = 0;
bool ok = false;
QTNewMoviePropertyElement props[5];
zeromem (props, sizeof (props));
int prop = 0;
DataReferenceRecord dr;
props[prop].propClass = kQTPropertyClass_DataLocation;
props[prop].propID = kQTDataLocationPropertyID_DataReference;
props[prop].propValueSize = sizeof (dr);
props[prop].propValueAddress = (void*) &dr;
++prop;
FileInputStream* const fin = dynamic_cast <FileInputStream*> (input);
if (fin != 0)
{
CFStringRef filePath = juceStringToCFString (fin->getFile().getFullPathName());
QTNewDataReferenceFromFullPathCFString (filePath, (QTPathStyle) kQTNativeDefaultPathStyle, 0,
&dr.dataRef, &dr.dataRefType);
ok = openMovie (props, prop, movie);
DisposeHandle (dr.dataRef);
CFRelease (filePath);
}
else
{
// sanity-check because this currently needs to load the whole stream into memory..
jassert (input->getTotalLength() < 50 * 1024 * 1024);
dataHandle = NewHandle ((Size) input->getTotalLength());
HLock (dataHandle);
// read the entire stream into memory - this is a pain, but can't get it to work
// properly using a custom callback to supply the data.
input->read (*dataHandle, (int) input->getTotalLength());
HUnlock (dataHandle);
// different types to get QT to try. (We should really be a bit smarter here by
// working out in advance which one the stream contains, rather than just trying
// each one)
const char* const suffixesToTry[] = { "\04.mov", "\04.mp3",
"\04.avi", "\04.m4a" };
for (int i = 0; i < numElementsInArray (suffixesToTry) && ! ok; ++i)
{
/* // this fails for some bizarre reason - it can be bodged to work with
// movies, but can't seem to do it for other file types..
QTNewMovieUserProcRecord procInfo;
procInfo.getMovieUserProc = NewGetMovieUPP (readMovieStreamProc);
procInfo.getMovieUserProcRefcon = this;
procInfo.defaultDataRef.dataRef = dataRef;
procInfo.defaultDataRef.dataRefType = HandleDataHandlerSubType;
props[prop].propClass = kQTPropertyClass_DataLocation;
props[prop].propID = kQTDataLocationPropertyID_MovieUserProc;
props[prop].propValueSize = sizeof (procInfo);
props[prop].propValueAddress = (void*) &procInfo;
++prop; */
dr.dataRef = createHandleDataRef (dataHandle, suffixesToTry [i]);
dr.dataRefType = HandleDataHandlerSubType;
ok = openMovie (props, prop, movie);
DisposeHandle (dr.dataRef);
}
}
return ok;
}
bool QuickTimeMovieComponent::loadMovie (const File& movieFile_,
const bool isControllerVisible)
{
const bool ok = loadMovie ((InputStream*) movieFile_.createInputStream(), isControllerVisible);
movieFile = movieFile_;
return ok;
}
void QuickTimeMovieComponent::goToStart()
{
setPosition (0.0);
}
void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle& spaceToFitWithin,
const RectanglePlacement& placement)
{
int normalWidth, normalHeight;
getMovieNormalSize (normalWidth, normalHeight);
if (normalWidth > 0 && normalHeight > 0 && ! spaceToFitWithin.isEmpty())
{
double x = 0.0, y = 0.0, w = normalWidth, h = normalHeight;
placement.applyTo (x, y, w, h,
spaceToFitWithin.getX(), spaceToFitWithin.getY(),
spaceToFitWithin.getWidth(), spaceToFitWithin.getHeight());
if (w > 0 && h > 0)
{
setBounds (roundDoubleToInt (x), roundDoubleToInt (y),
roundDoubleToInt (w), roundDoubleToInt (h));
}
}
else
{
setBounds (spaceToFitWithin);
}
}
#endif

+ 4
- 17
build/win32/platform_specific_code/juce_win32_SystemStats.cpp View File

@@ -29,22 +29,9 @@
==============================================================================
*/
#include "win32_headers.h"
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
//==============================================================================
// Auto-link the other win32 libs that are needed by library calls..
#if defined (JUCE_DLL_BUILD) && JUCE_MSVC
#include "juce_win32_AutoLinkLibraries.h"
#endif
//==============================================================================
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/io/files/juce_File.h"
#include "../../../src/juce_core/basics/juce_SystemStats.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
extern void juce_updateMultiMonitorInfo() throw();
extern void juce_initialiseThreadEvents() throw();
@@ -487,4 +474,4 @@ int SystemStats::getPageSize() throw()
return systemInfo.dwPageSize;
}
END_JUCE_NAMESPACE
#endif

+ 10
- 30
build/win32/platform_specific_code/juce_win32_Threads.cpp View File

@@ -29,34 +29,14 @@
==============================================================================
*/
#include "win32_headers.h"
#ifdef _MSC_VER
#pragma warning (disable: 4514)
#pragma warning (push)
#include <crtdbg.h>
#endif
#include <process.h>
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_core/text/juce_String.h"
#include "../../../src/juce_core/threads/juce_CriticalSection.h"
#include "../../../src/juce_core/threads/juce_WaitableEvent.h"
#include "../../../src/juce_core/threads/juce_Thread.h"
#include "../../../src/juce_core/threads/juce_Process.h"
#include "../../../src/juce_core/threads/juce_InterProcessLock.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
extern HWND juce_messageWindowHandle;
#endif
#ifdef _MSC_VER
#pragma warning (pop)
#endif
//==============================================================================
CriticalSection::CriticalSection() throw()
@@ -129,7 +109,7 @@ static unsigned int __stdcall threadEntryProc (void* userData) throw()
juce_threadEntryPoint (userData);
_endthreadex(0);
_endthreadex (0);
return 0;
}
@@ -188,7 +168,7 @@ void juce_setCurrentThreadName (const String& name) throw()
#endif
}
int Thread::getCurrentThreadId() throw()
int64 Thread::getCurrentThreadId() throw()
{
return (int) GetCurrentThreadId();
}
@@ -335,7 +315,8 @@ void Process::terminate()
ExitProcess (0);
}
void* Process::loadDynamicLibrary (const String& name)
//==============================================================================
void* PlatformUtilities::loadDynamicLibrary (const String& name)
{
void* result = 0;
@@ -348,7 +329,7 @@ void* Process::loadDynamicLibrary (const String& name)
return result;
}
void Process::freeDynamicLibrary (void* h)
void PlatformUtilities::freeDynamicLibrary (void* h)
{
JUCE_TRY
{
@@ -358,7 +339,7 @@ void Process::freeDynamicLibrary (void* h)
JUCE_CATCH_ALL
}
void* Process::getProcedureEntryPoint (void* h, const String& name)
void* PlatformUtilities::getProcedureEntryPoint (void* h, const String& name)
{
return (h != 0) ? (void*) GetProcAddress ((HMODULE) h, name)
: 0;
@@ -411,5 +392,4 @@ void InterProcessLock::exit() throw()
}
END_JUCE_NAMESPACE
#endif

+ 4
- 28
build/win32/platform_specific_code/juce_win32_WebBrowserComponent.cpp View File

@@ -29,29 +29,9 @@
==============================================================================
*/
//==============================================================================
#ifdef _MSC_VER
#pragma warning (disable: 4514)
#pragma warning (push)
#endif
#include "win32_headers.h"
#include <comutil.h>
#include <Exdisp.h>
#include <exdispid.h>
#ifdef _MSC_VER
#pragma warning (pop)
#pragma warning (disable: 4312 4244)
#endif
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
BEGIN_JUCE_NAMESPACE
#include "../../../src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h"
#include "../../../src/juce_appframework/gui/components/special/juce_ActiveXControlComponent.h"
// (This file gets included by juce_win32_NativeCode.cpp, rather than being
// compiled on its own).
#if JUCE_INCLUDED_FILE && JUCE_WEB_BROWSER
//==============================================================================
@@ -342,10 +322,6 @@ void WebBrowserComponent::parentHierarchyChanged()
checkWindowAssociation();
}
void WebBrowserComponent::moved()
{
}
void WebBrowserComponent::resized()
{
browser->setSize (getWidth(), getHeight());
@@ -361,4 +337,4 @@ bool WebBrowserComponent::pageAboutToLoad (const String&)
return true;
}
END_JUCE_NAMESPACE
#endif

+ 21
- 1067
build/win32/platform_specific_code/juce_win32_Windowing.cpp
File diff suppressed because it is too large
View File


+ 20
- 4
build/win32/vc8/JUCE.vcproj View File

@@ -3638,10 +3638,6 @@
RelativePath="..\..\..\src\juce_appframework\gui\components\special\juce_PreferencesPanel.h"
>
</File>
<File
RelativePath="..\..\..\src\juce_appframework\gui\components\special\juce_QuickTimeMovieComponent.cpp"
>
</File>
<File
RelativePath="..\..\..\src\juce_appframework\gui\components\special\juce_QuickTimeMovieComponent.h"
>
@@ -5673,6 +5669,10 @@
<Filter
Name="win32_code"
>
<File
RelativePath="..\platform_specific_code\juce_win32_ActiveXComponent.cpp"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_ASIO.cpp"
>
@@ -5717,14 +5717,30 @@
RelativePath="..\platform_specific_code\juce_win32_Misc.cpp"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_NativeCode.cpp"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_NativeIncludes.h"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_Network.cpp"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_OpenGLComponent.cpp"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_PlatformUtils.cpp"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_QuickTimeMovieComponent.cpp"
>
</File>
<File
RelativePath="..\platform_specific_code\juce_win32_SystemStats.cpp"
>


+ 15
- 21
extras/audio plugin host/build/mac/PluginHost.xcodeproj/project.pbxproj View File

@@ -8,20 +8,18 @@

/* Begin PBXBuildFile section */
84B59D6D0DE34F530041FA3D /* juce_LibrarySource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84B59D6C0DE34F530041FA3D /* juce_LibrarySource.mm */; };
84C0A38F0DE2D5C700606895 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3810DE2D5C700606895 /* AGL.framework */; };
84C0A3900DE2D5C700606895 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3820DE2D5C700606895 /* ApplicationServices.framework */; };
84C0A3910DE2D5C700606895 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3830DE2D5C700606895 /* AudioUnit.framework */; };
84C0A3920DE2D5C700606895 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3840DE2D5C700606895 /* Carbon.framework */; };
84C0A3930DE2D5C700606895 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3850DE2D5C700606895 /* Cocoa.framework */; };
84C0A3940DE2D5C700606895 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3860DE2D5C700606895 /* CoreAudio.framework */; };
84C0A3950DE2D5C700606895 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3870DE2D5C700606895 /* CoreFoundation.framework */; };
84C0A3960DE2D5C700606895 /* CoreMIDI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3880DE2D5C700606895 /* CoreMIDI.framework */; };
84C0A3970DE2D5C700606895 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3890DE2D5C700606895 /* CoreServices.framework */; };
84C0A3980DE2D5C700606895 /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A38A0DE2D5C700606895 /* DiscRecording.framework */; };
84C0A3990DE2D5C700606895 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A38B0DE2D5C700606895 /* IOKit.framework */; };
84C0A39A0DE2D5C700606895 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A38C0DE2D5C700606895 /* OpenGL.framework */; };
84C0A39B0DE2D5C700606895 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A38D0DE2D5C700606895 /* QuickTime.framework */; };
84C0A39C0DE2D5C700606895 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A38E0DE2D5C700606895 /* WebKit.framework */; };
84D16CFE0E9A58CA00CB8B94 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D16CFD0E9A58CA00CB8B94 /* QTKit.framework */; };
84F6F6160E8EDA7100AA911A /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F6F6150E8EDA7100AA911A /* Carbon.framework */; };
84F8B6D70EB5FEF70020D98D /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F8B6D60EB5FEF70020D98D /* QuickTime.framework */; };
84FC4CD90CD8894600850651 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 84FC4CD80CD8894600850651 /* juce.xcconfig */; };
84FFAEAC0C6C8A6F009F6E72 /* FilterGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84FFAE920C6C8A6F009F6E72 /* FilterGraph.cpp */; };
84FFAEAD0C6C8A6F009F6E72 /* GraphEditorPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84FFAE940C6C8A6F009F6E72 /* GraphEditorPanel.cpp */; };
@@ -35,20 +33,18 @@
84B59D6A0DE34F530041FA3D /* includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = includes.h; path = ../../src/includes.h; sourceTree = SOURCE_ROOT; };
84B59D6B0DE34F530041FA3D /* juce_AppConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = juce_AppConfig.h; path = ../../src/juce_AppConfig.h; sourceTree = SOURCE_ROOT; };
84B59D6C0DE34F530041FA3D /* juce_LibrarySource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_LibrarySource.mm; path = ../../src/juce_LibrarySource.mm; sourceTree = SOURCE_ROOT; };
84C0A3810DE2D5C700606895 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
84C0A3820DE2D5C700606895 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
84C0A3830DE2D5C700606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
84C0A3840DE2D5C700606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
84C0A3850DE2D5C700606895 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
84C0A3860DE2D5C700606895 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
84C0A3870DE2D5C700606895 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
84C0A3880DE2D5C700606895 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = "<absolute>"; };
84C0A3890DE2D5C700606895 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
84C0A38A0DE2D5C700606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
84C0A38B0DE2D5C700606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
84C0A38C0DE2D5C700606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
84C0A38D0DE2D5C700606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
84C0A38E0DE2D5C700606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
84D16CFD0E9A58CA00CB8B94 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
84F6F6150E8EDA7100AA911A /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
84F8B6D60EB5FEF70020D98D /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
84FC4CD80CD8894600850651 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
84FFAE920C6C8A6F009F6E72 /* FilterGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = FilterGraph.cpp; path = ../../src/host/FilterGraph.cpp; sourceTree = SOURCE_ROOT; };
84FFAE930C6C8A6F009F6E72 /* FilterGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FilterGraph.h; path = ../../src/host/FilterGraph.h; sourceTree = SOURCE_ROOT; };
@@ -59,7 +55,7 @@
84FFAE980C6C8A6F009F6E72 /* MainHostWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MainHostWindow.cpp; path = ../../src/host/MainHostWindow.cpp; sourceTree = SOURCE_ROOT; };
84FFAE990C6C8A6F009F6E72 /* MainHostWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MainHostWindow.h; path = ../../src/host/MainHostWindow.h; sourceTree = SOURCE_ROOT; };
84FFAE9A0C6C8A6F009F6E72 /* HostStartup.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HostStartup.cpp; path = ../../src/HostStartup.cpp; sourceTree = SOURCE_ROOT; };
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -67,20 +63,18 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
84C0A38F0DE2D5C700606895 /* AGL.framework in Frameworks */,
84C0A3900DE2D5C700606895 /* ApplicationServices.framework in Frameworks */,
84C0A3910DE2D5C700606895 /* AudioUnit.framework in Frameworks */,
84C0A3920DE2D5C700606895 /* Carbon.framework in Frameworks */,
84C0A3930DE2D5C700606895 /* Cocoa.framework in Frameworks */,
84C0A3940DE2D5C700606895 /* CoreAudio.framework in Frameworks */,
84C0A3950DE2D5C700606895 /* CoreFoundation.framework in Frameworks */,
84C0A3960DE2D5C700606895 /* CoreMIDI.framework in Frameworks */,
84C0A3970DE2D5C700606895 /* CoreServices.framework in Frameworks */,
84C0A3980DE2D5C700606895 /* DiscRecording.framework in Frameworks */,
84C0A3990DE2D5C700606895 /* IOKit.framework in Frameworks */,
84C0A39A0DE2D5C700606895 /* OpenGL.framework in Frameworks */,
84C0A39B0DE2D5C700606895 /* QuickTime.framework in Frameworks */,
84C0A39C0DE2D5C700606895 /* WebKit.framework in Frameworks */,
84F6F6160E8EDA7100AA911A /* Carbon.framework in Frameworks */,
84D16CFE0E9A58CA00CB8B94 /* QTKit.framework in Frameworks */,
84F8B6D70EB5FEF70020D98D /* QuickTime.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -137,19 +131,17 @@
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
84C0A3810DE2D5C700606895 /* AGL.framework */,
84C0A3820DE2D5C700606895 /* ApplicationServices.framework */,
84F6F6150E8EDA7100AA911A /* Carbon.framework */,
84C0A3830DE2D5C700606895 /* AudioUnit.framework */,
84C0A3840DE2D5C700606895 /* Carbon.framework */,
84C0A3850DE2D5C700606895 /* Cocoa.framework */,
84C0A3860DE2D5C700606895 /* CoreAudio.framework */,
84C0A3870DE2D5C700606895 /* CoreFoundation.framework */,
84C0A3880DE2D5C700606895 /* CoreMIDI.framework */,
84C0A3890DE2D5C700606895 /* CoreServices.framework */,
84C0A38A0DE2D5C700606895 /* DiscRecording.framework */,
84C0A38B0DE2D5C700606895 /* IOKit.framework */,
84F8B6D60EB5FEF70020D98D /* QuickTime.framework */,
84C0A38C0DE2D5C700606895 /* OpenGL.framework */,
84C0A38D0DE2D5C700606895 /* QuickTime.framework */,
84D16CFD0E9A58CA00CB8B94 /* QTKit.framework */,
84C0A38E0DE2D5C700606895 /* WebKit.framework */,
);
name = "External Frameworks and Libraries";
@@ -225,6 +217,8 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
KEEP_PRIVATE_EXTERNS = YES;
STRIP_INSTALLED_PRODUCT = YES;
};
name = Debug;
};


+ 2
- 0
extras/audio plugin host/src/HostStartup.cpp View File

@@ -75,6 +75,8 @@ public:
commandManager->registerAllCommandsForTarget (this);
commandManager->registerAllCommandsForTarget (mainWindow);
mainWindow->menuItemsChanged();
}
void shutdown()


+ 7
- 7
extras/audio plugin host/src/host/MainHostWindow.cpp View File

@@ -100,12 +100,6 @@ MainHostWindow::MainHostWindow()
restoreWindowStateFromString (ApplicationProperties::getInstance()->getUserSettings()->getValue ("mainWindowPos"));
#if JUCE_MAC
setMacMainMenu (this);
#else
setMenuBar (this);
#endif
setVisible (true);
InternalPluginFormat internalFormat;
@@ -129,6 +123,12 @@ MainHostWindow::MainHostWindow()
addKeyListener (commandManager->getKeyMappings());
Process::setPriority (Process::HighPriority);
#if JUCE_MAC
setMacMainMenu (this);
#else
setMenuBar (this);
#endif
}
MainHostWindow::~MainHostWindow()
@@ -441,7 +441,7 @@ void MainHostWindow::showAudioSettings()
AudioDeviceSelectorComponent audioSettingsComp (deviceManager,
0, 256,
0, 256,
true, true, true);
true, true, true, false);
audioSettingsComp.setSize (500, 450);


+ 2
- 1
extras/audio plugin host/src/includes.h View File

@@ -1,5 +1,6 @@
#include "juce_AppConfig.h"
#include "../../../juce_amalgamated.h"
//#include "../../../juce_amalgamated.h"
#include "../../../juce.h"
using JUCE_NAMESPACE::uint32;

+ 8
- 9
extras/audio plugins/demo/build/AudioUnit/JuceAU.exp View File

@@ -1,9 +1,8 @@
#
# This file must contain entries for the two AU entry points.
#
# Your JucePluginCharacteristics.h file must define the prefix used for these function names - for
# more info, see the comments in JucePluginCharacteristics.h
#

_JuceDemoAUEntry
_JuceDemoAUViewEntry
#
# This file must contain the AU component's entry point.
#
# Your JucePluginCharacteristics.h file must define the prefix used for this
# function name - for more info, see the comments in JucePluginCharacteristics.h
#
_JuceDemoAUEntry

+ 13
- 43
extras/audio plugins/demo/build/AudioUnit/JuceDemoAU.xcodeproj/project.pbxproj View File

@@ -15,6 +15,7 @@
3E8BF11A079CA60300021B09 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19A0E03175E1E01CA2136 /* AUBuffer.cpp */; };
3E8BF11B079CA60300021B09 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7967EF8B04D70E7C00C625F7 /* CAAudioChannelLayout.cpp */; };
3E8BF11C079CA60300021B09 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7967EF8D04D70E7C00C625F7 /* CAStreamBasicDescription.cpp */; };
840BE1CD0EACFEC400824B1D /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840BE1CC0EACFEC400824B1D /* QTKit.framework */; };
84581F8F0D917FC700AE1A4C /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F820D917FC700AE1A4C /* AUBase.cpp */; };
84581F900D917FC700AE1A4C /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F830D917FC700AE1A4C /* AUBase.h */; };
84581F910D917FC700AE1A4C /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F840D917FC700AE1A4C /* AUDispatch.cpp */; };
@@ -27,11 +28,11 @@
84581F990D917FC700AE1A4C /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F8C0D917FC700AE1A4C /* AUScopeElement.h */; };
84581F9A0D917FC700AE1A4C /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F8D0D917FC700AE1A4C /* ComponentBase.cpp */; };
84581F9B0D917FC700AE1A4C /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F8E0D917FC700AE1A4C /* ComponentBase.h */; };
846EC62C0EB601D80080CCFF /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846EC62B0EB601D80080CCFF /* QuickTime.framework */; };
84B4CDD10C7DD23B0083122F /* MusicDeviceBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B4CDCF0C7DD23B0083122F /* MusicDeviceBase.cpp */; };
84B4CDD20C7DD23B0083122F /* MusicDeviceBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84B4CDD00C7DD23B0083122F /* MusicDeviceBase.h */; };
84C09D2A0DE2C52600606895 /* includes.h in Headers */ = {isa = PBXBuildFile; fileRef = 84C09D290DE2C52600606895 /* includes.h */; };
84C09D3F0DE2C57300606895 /* juce_amalgamated.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84C09D3E0DE2C57300606895 /* juce_amalgamated.mm */; };
84C0A2A10DE2C7BD00606895 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2930DE2C7BD00606895 /* AGL.framework */; };
84C0A2A20DE2C7BD00606895 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2940DE2C7BD00606895 /* ApplicationServices.framework */; };
84C0A2A30DE2C7BD00606895 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2950DE2C7BD00606895 /* AudioUnit.framework */; };
84C0A2A40DE2C7BD00606895 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2960DE2C7BD00606895 /* Carbon.framework */; };
@@ -43,16 +44,11 @@
84C0A2AA0DE2C7BD00606895 /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A29C0DE2C7BD00606895 /* DiscRecording.framework */; };
84C0A2AB0DE2C7BD00606895 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A29D0DE2C7BD00606895 /* IOKit.framework */; };
84C0A2AC0DE2C7BD00606895 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A29E0DE2C7BD00606895 /* OpenGL.framework */; };
84C0A2AD0DE2C7BD00606895 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A29F0DE2C7BD00606895 /* QuickTime.framework */; };
84C0A2AE0DE2C7BD00606895 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2A00DE2C7BD00606895 /* WebKit.framework */; };
84C0A2B30DE2C80200606895 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2B20DE2C80200606895 /* AudioToolbox.framework */; };
84CFAEFB090964560053C22C /* AUCarbonViewDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19AAB03175F3201CA2136 /* AUCarbonViewDispatch.cpp */; };
84CFAEFC090964560053C22C /* AUCarbonViewControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19AA903175F3201CA2136 /* AUCarbonViewControl.cpp */; };
84CFAEFD090964560053C22C /* AUCarbonViewBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19AA703175F3201CA2136 /* AUCarbonViewBase.cpp */; };
84CFAF0E090965080053C22C /* CarbonEventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19AB003175F3201CA2136 /* CarbonEventHandler.cpp */; };
84CFAF10090965080053C22C /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EF64FA42057BC39200D99563 /* CAAUParameter.cpp */; };
84CFB029090968590053C22C /* DemoJuceAudioUnit.component in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3E8BF126079CA60300021B09 /* DemoJuceAudioUnit.component */; };
84EB400B090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp */; };
84EB400B090A4A2C008FAC1B /* juce_AudioUnitWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.mm */; };
84EB400C090A4A2C008FAC1B /* juce_AudioUnitWrapper.r in Rez */ = {isa = PBXBuildFile; fileRef = 84EB400A090A4A2C008FAC1B /* juce_AudioUnitWrapper.r */; };
84EB4042090A4F5A008FAC1B /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F4E5DC280898301D00589A5A /* CAVectorUnit.cpp */; };
84EB404E090A5116008FAC1B /* JucePluginCharacteristics.h in Headers */ = {isa = PBXBuildFile; fileRef = 84EB404D090A5116008FAC1B /* JucePluginCharacteristics.h */; };
@@ -88,6 +84,7 @@
7967EF8B04D70E7C00C625F7 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
7967EF8C04D70E7C00C625F7 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
7967EF8D04D70E7C00C625F7 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
840BE1CC0EACFEC400824B1D /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
84581F820D917FC700AE1A4C /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp; sourceTree = "<absolute>"; };
84581F830D917FC700AE1A4C /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.h; sourceTree = "<absolute>"; };
84581F840D917FC700AE1A4C /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUDispatch.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp; sourceTree = "<absolute>"; };
@@ -101,11 +98,11 @@
84581F8D0D917FC700AE1A4C /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ComponentBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.cpp; sourceTree = "<absolute>"; };
84581F8E0D917FC700AE1A4C /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ComponentBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.h; sourceTree = "<absolute>"; };
845FAE5E0A5C0A6A008C94D8 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
846EC62B0EB601D80080CCFF /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
84B4CDCF0C7DD23B0083122F /* MusicDeviceBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MusicDeviceBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.cpp; sourceTree = "<absolute>"; };
84B4CDD00C7DD23B0083122F /* MusicDeviceBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MusicDeviceBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.h; sourceTree = "<absolute>"; };
84C09D290DE2C52600606895 /* includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = includes.h; path = ../../src/includes.h; sourceTree = SOURCE_ROOT; };
84C09D3E0DE2C57300606895 /* juce_amalgamated.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_amalgamated.mm; path = ../../../../../juce_amalgamated.mm; sourceTree = SOURCE_ROOT; };
84C0A2930DE2C7BD00606895 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
84C0A2940DE2C7BD00606895 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
84C0A2950DE2C7BD00606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
84C0A2960DE2C7BD00606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
@@ -117,13 +114,12 @@
84C0A29C0DE2C7BD00606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
84C0A29D0DE2C7BD00606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
84C0A29E0DE2C7BD00606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
84C0A29F0DE2C7BD00606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
84C0A2A00DE2C7BD00606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
84C0A2B20DE2C80200606895 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_AudioUnitWrapper.cpp; path = ../../../wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp; sourceTree = SOURCE_ROOT; };
84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 2; name = juce_AudioUnitWrapper.mm; path = ../../../wrapper/formats/AudioUnit/juce_AudioUnitWrapper.mm; sourceTree = SOURCE_ROOT; };
84EB400A090A4A2C008FAC1B /* juce_AudioUnitWrapper.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = juce_AudioUnitWrapper.r; path = ../../../wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r; sourceTree = SOURCE_ROOT; };
84EB404D090A5116008FAC1B /* JucePluginCharacteristics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JucePluginCharacteristics.h; path = ../../src/JucePluginCharacteristics.h; sourceTree = SOURCE_ROOT; };
84F05215090674BB00AEC8DB /* Info-JuceAU.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = "Info-JuceAU.plist"; sourceTree = "<group>"; };
84F05215090674BB00AEC8DB /* Info-JuceAU.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "Info-JuceAU.plist"; sourceTree = "<group>"; };
84F05217090674BB00AEC8DB /* JuceAU.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = JuceAU.exp; sourceTree = "<group>"; };
84F054E40906C8DD00AEC8DB /* AUMIDIBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AUMIDIBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.cpp; sourceTree = "<absolute>"; };
84F054E50906C8DD00AEC8DB /* AUMIDIBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AUMIDIBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.h; sourceTree = "<absolute>"; };
@@ -146,13 +142,6 @@
F5D19A0E03175E1E01CA2136 /* AUBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
F5D19A0F03175E1E01CA2136 /* AUBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = "<group>"; };
F5D19A6903175E8C01CA2136 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = "<group>"; };
F5D19AA703175F3201CA2136 /* AUCarbonViewBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUCarbonViewBase.cpp; sourceTree = "<group>"; };
F5D19AA803175F3201CA2136 /* AUCarbonViewBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUCarbonViewBase.h; sourceTree = "<group>"; };
F5D19AA903175F3201CA2136 /* AUCarbonViewControl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUCarbonViewControl.cpp; sourceTree = "<group>"; };
F5D19AAA03175F3201CA2136 /* AUCarbonViewControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUCarbonViewControl.h; sourceTree = "<group>"; };
F5D19AAB03175F3201CA2136 /* AUCarbonViewDispatch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUCarbonViewDispatch.cpp; sourceTree = "<group>"; };
F5D19AB003175F3201CA2136 /* CarbonEventHandler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CarbonEventHandler.cpp; sourceTree = "<group>"; };
F5D19AB103175F3201CA2136 /* CarbonEventHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CarbonEventHandler.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -160,7 +149,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
84C0A2A10DE2C7BD00606895 /* AGL.framework in Frameworks */,
84C0A2A20DE2C7BD00606895 /* ApplicationServices.framework in Frameworks */,
84C0A2A30DE2C7BD00606895 /* AudioUnit.framework in Frameworks */,
84C0A2A40DE2C7BD00606895 /* Carbon.framework in Frameworks */,
@@ -172,9 +160,10 @@
84C0A2AA0DE2C7BD00606895 /* DiscRecording.framework in Frameworks */,
84C0A2AB0DE2C7BD00606895 /* IOKit.framework in Frameworks */,
84C0A2AC0DE2C7BD00606895 /* OpenGL.framework in Frameworks */,
84C0A2AD0DE2C7BD00606895 /* QuickTime.framework in Frameworks */,
84C0A2AE0DE2C7BD00606895 /* WebKit.framework in Frameworks */,
84C0A2B30DE2C80200606895 /* AudioToolbox.framework in Frameworks */,
840BE1CD0EACFEC400824B1D /* QTKit.framework in Frameworks */,
846EC62C0EB601D80080CCFF /* QuickTime.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -184,7 +173,7 @@
84EB403B090A4ED3008FAC1B /* Juce AU Code */ = {
isa = PBXGroup;
children = (
84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp */,
84EB4009090A4A2C008FAC1B /* juce_AudioUnitWrapper.mm */,
84EB400A090A4A2C008FAC1B /* juce_AudioUnitWrapper.r */,
);
name = "Juce AU Code";
@@ -246,7 +235,6 @@
children = (
F5D199EB03175E1E01CA2136 /* AUBase */,
A3C2CC6005B4A4BE000F141E /* AUViewBase */,
F5D19AA603175F3201CA2136 /* AUCarbonViewBase */,
F5D199FD03175E1E01CA2136 /* OtherBases */,
F5D19A0C03175E1E01CA2136 /* Utility */,
F5D19A3603175E8C01CA2136 /* PublicUtility */,
@@ -259,7 +247,6 @@
isa = PBXGroup;
children = (
84C0A2B20DE2C80200606895 /* AudioToolbox.framework */,
84C0A2930DE2C7BD00606895 /* AGL.framework */,
84C0A2940DE2C7BD00606895 /* ApplicationServices.framework */,
84C0A2950DE2C7BD00606895 /* AudioUnit.framework */,
84C0A2960DE2C7BD00606895 /* Carbon.framework */,
@@ -269,9 +256,10 @@
84C0A29A0DE2C7BD00606895 /* CoreMIDI.framework */,
84C0A29B0DE2C7BD00606895 /* CoreServices.framework */,
84C0A29C0DE2C7BD00606895 /* DiscRecording.framework */,
840BE1CC0EACFEC400824B1D /* QTKit.framework */,
846EC62B0EB601D80080CCFF /* QuickTime.framework */,
84C0A29D0DE2C7BD00606895 /* IOKit.framework */,
84C0A29E0DE2C7BD00606895 /* OpenGL.framework */,
84C0A29F0DE2C7BD00606895 /* QuickTime.framework */,
84C0A2A00DE2C7BD00606895 /* WebKit.framework */,
);
name = Frameworks;
@@ -349,20 +337,6 @@
path = /Developer/Examples/CoreAudio/PublicUtility;
sourceTree = "<absolute>";
};
F5D19AA603175F3201CA2136 /* AUCarbonViewBase */ = {
isa = PBXGroup;
children = (
F5D19AA703175F3201CA2136 /* AUCarbonViewBase.cpp */,
F5D19AA803175F3201CA2136 /* AUCarbonViewBase.h */,
F5D19AA903175F3201CA2136 /* AUCarbonViewControl.cpp */,
F5D19AAA03175F3201CA2136 /* AUCarbonViewControl.h */,
F5D19AAB03175F3201CA2136 /* AUCarbonViewDispatch.cpp */,
F5D19AB003175F3201CA2136 /* CarbonEventHandler.cpp */,
F5D19AB103175F3201CA2136 /* CarbonEventHandler.h */,
);
path = AUCarbonViewBase;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
@@ -465,17 +439,13 @@
3E8BF119079CA60300021B09 /* AUEffectBase.cpp in Sources */,
3E8BF11C079CA60300021B09 /* CAStreamBasicDescription.cpp in Sources */,
3E8BF11B079CA60300021B09 /* CAAudioChannelLayout.cpp in Sources */,
84CFAF0E090965080053C22C /* CarbonEventHandler.cpp in Sources */,
84CFAEFB090964560053C22C /* AUCarbonViewDispatch.cpp in Sources */,
84CFAEFC090964560053C22C /* AUCarbonViewControl.cpp in Sources */,
84CFAEFD090964560053C22C /* AUCarbonViewBase.cpp in Sources */,
84CFAF10090965080053C22C /* CAAUParameter.cpp in Sources */,
3E8BF11A079CA60300021B09 /* AUBuffer.cpp in Sources */,
84F054E80906C8DD00AEC8DB /* AUMIDIBase.cpp in Sources */,
84F054EA0906C8DD00AEC8DB /* AUMIDIEffectBase.cpp in Sources */,
84F055010906E9EA00AEC8DB /* DemoEditorComponent.cpp in Sources */,
84F055030906E9EA00AEC8DB /* DemoJuceFilter.cpp in Sources */,
84EB400B090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp in Sources */,
84EB400B090A4A2C008FAC1B /* juce_AudioUnitWrapper.mm in Sources */,
84EB4042090A4F5A008FAC1B /* CAVectorUnit.cpp in Sources */,
84B4CDD10C7DD23B0083122F /* MusicDeviceBase.cpp in Sources */,
84581F8F0D917FC700AE1A4C /* AUBase.cpp in Sources */,


+ 30
- 34
extras/audio plugins/demo/build/RTAS_Mac/juce_RTASDemo.xcodeproj/project.pbxproj View File

@@ -7,9 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
84190D1A0EA5320900B939D0 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84190D190EA5320900B939D0 /* Carbon.framework */; };
841E07300AF9F015005E6FCC /* DemoEditorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E072B0AF9F015005E6FCC /* DemoEditorComponent.cpp */; };
841E07310AF9F015005E6FCC /* DemoJuceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E072D0AF9F015005E6FCC /* DemoJuceFilter.cpp */; };
841E073D0AF9F099005E6FCC /* juce_RTASUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E073B0AF9F099005E6FCC /* juce_RTASUtilities.cpp */; };
841E073E0AF9F099005E6FCC /* juce_RTASWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841E073C0AF9F099005E6FCC /* juce_RTASWrapper.cpp */; };
846444EF0AFA005B00E7B2BE /* juce_Wrapper_CEffectGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846444E20AFA005B00E7B2BE /* juce_Wrapper_CEffectGroup.cpp */; };
846444F00AFA005B00E7B2BE /* juce_Wrapper_CEffectGroupMIDI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846444E30AFA005B00E7B2BE /* juce_Wrapper_CEffectGroupMIDI.cpp */; };
@@ -21,23 +21,22 @@
846444F60AFA005B00E7B2BE /* juce_Wrapper_CEffectTypeRTAS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846444E90AFA005B00E7B2BE /* juce_Wrapper_CEffectTypeRTAS.cpp */; };
846444F70AFA005B00E7B2BE /* juce_Wrapper_ChunkDataParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846444EA0AFA005B00E7B2BE /* juce_Wrapper_ChunkDataParser.cpp */; };
846444FA0AFA005B00E7B2BE /* juce_Wrapper_PlugInUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846444EE0AFA005B00E7B2BE /* juce_Wrapper_PlugInUtils.cpp */; };
84C0A3020DE2CBE500606895 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2F40DE2CBE500606895 /* AGL.framework */; };
846EC6670EB602B90080CCFF /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846EC6660EB602B90080CCFF /* QuickTime.framework */; };
84C0A3030DE2CBE500606895 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2F50DE2CBE500606895 /* ApplicationServices.framework */; };
84C0A3040DE2CBE500606895 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2F60DE2CBE500606895 /* AudioUnit.framework */; };
84C0A3050DE2CBE500606895 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2F70DE2CBE500606895 /* Carbon.framework */; };
84C0A3060DE2CBE500606895 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2F80DE2CBE500606895 /* Cocoa.framework */; };
84C0A3070DE2CBE500606895 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2F90DE2CBE500606895 /* CoreAudio.framework */; };
84C0A3080DE2CBE500606895 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2FA0DE2CBE500606895 /* CoreFoundation.framework */; };
84C0A3090DE2CBE500606895 /* CoreMIDI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2FB0DE2CBE500606895 /* CoreMIDI.framework */; };
84C0A30A0DE2CBE500606895 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2FC0DE2CBE500606895 /* CoreServices.framework */; };
84C0A30B0DE2CBE500606895 /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2FD0DE2CBE500606895 /* DiscRecording.framework */; };
84C0A30C0DE2CBE500606895 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2FE0DE2CBE500606895 /* IOKit.framework */; };
84C0A30D0DE2CBE600606895 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A2FF0DE2CBE500606895 /* OpenGL.framework */; };
84C0A30E0DE2CBE600606895 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3000DE2CBE500606895 /* QuickTime.framework */; };
84C0A30F0DE2CBE600606895 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3010DE2CBE500606895 /* WebKit.framework */; };
84C0A3110DE2CC0600606895 /* juce_amalgamated.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84C0A3100DE2CC0600606895 /* juce_amalgamated.mm */; };
84C9D7FB0AFA3C9C00F1348E /* juce_Wrapper_Dispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C9D7F90AFA3C9C00F1348E /* juce_Wrapper_Dispatcher.cpp */; };
84C9D7FC0AFA3C9C00F1348E /* juce_Wrapper_PluginInitialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C9D7FA0AFA3C9C00F1348E /* juce_Wrapper_PluginInitialize.cpp */; };
84E903C00EA34FD70088E51C /* juce_RTASUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E903BF0EA34FD70088E51C /* juce_RTASUtilities.mm */; };
84E904D00EA351E40088E51C /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E904CF0EA351E40088E51C /* QTKit.framework */; };
84E907CB0EA396A50088E51C /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E907CA0EA396A50088E51C /* DiscRecording.framework */; };
84E90C250EA399090088E51C /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E90C240EA399090088E51C /* WebKit.framework */; };
84E90C2B0EA39A110088E51C /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E90C2A0EA39A110088E51C /* OpenGL.framework */; };
84EEB4180AFB6679009655FF /* DummyResourceFile.r in Rez */ = {isa = PBXBuildFile; fileRef = 84EEB4170AFB6679009655FF /* DummyResourceFile.r */; };
84FAD77B0C7C89E100AF3028 /* libPluginLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FAD7770C7C897000AF3028 /* libPluginLibrary.a */; };
/* End PBXBuildFile section */
@@ -54,14 +53,14 @@

/* Begin PBXFileReference section */
5B521CEB08916D36009C75FE /* PluginLibrary.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PluginLibrary.xcodeproj; path = /Users/jules/stuff/PT_73_SDK/AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild/PluginLibrary.xcodeproj; sourceTree = "<absolute>"; };
84190D190EA5320900B939D0 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
841E072B0AF9F015005E6FCC /* DemoEditorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DemoEditorComponent.cpp; path = ../../src/DemoEditorComponent.cpp; sourceTree = SOURCE_ROOT; };
841E072C0AF9F015005E6FCC /* DemoEditorComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DemoEditorComponent.h; path = ../../src/DemoEditorComponent.h; sourceTree = SOURCE_ROOT; };
841E072D0AF9F015005E6FCC /* DemoJuceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DemoJuceFilter.cpp; path = ../../src/DemoJuceFilter.cpp; sourceTree = SOURCE_ROOT; };
841E072E0AF9F015005E6FCC /* DemoJuceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DemoJuceFilter.h; path = ../../src/DemoJuceFilter.h; sourceTree = SOURCE_ROOT; };
841E072F0AF9F015005E6FCC /* JucePluginCharacteristics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JucePluginCharacteristics.h; path = ../../src/JucePluginCharacteristics.h; sourceTree = SOURCE_ROOT; };
841E073B0AF9F099005E6FCC /* juce_RTASUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_RTASUtilities.cpp; path = ../../../wrapper/formats/RTAS/juce_RTASUtilities.cpp; sourceTree = SOURCE_ROOT; };
841E073C0AF9F099005E6FCC /* juce_RTASWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_RTASWrapper.cpp; path = ../../../wrapper/formats/RTAS/juce_RTASWrapper.cpp; sourceTree = SOURCE_ROOT; };
841E07420AF9F126005E6FCC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
841E07420AF9F126005E6FCC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
846444E20AFA005B00E7B2BE /* juce_Wrapper_CEffectGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_CEffectGroup.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_CEffectGroup.cpp; sourceTree = SOURCE_ROOT; };
846444E30AFA005B00E7B2BE /* juce_Wrapper_CEffectGroupMIDI.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_CEffectGroupMIDI.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_CEffectGroupMIDI.cpp; sourceTree = SOURCE_ROOT; };
846444E40AFA005B00E7B2BE /* juce_Wrapper_CEffectMIDIUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_CEffectMIDIUtils.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_CEffectMIDIUtils.cpp; sourceTree = SOURCE_ROOT; };
@@ -73,26 +72,25 @@
846444EA0AFA005B00E7B2BE /* juce_Wrapper_ChunkDataParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_ChunkDataParser.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_ChunkDataParser.cpp; sourceTree = SOURCE_ROOT; };
846444ED0AFA005B00E7B2BE /* juce_Wrapper_Header.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_Wrapper_Header.h; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_Header.h; sourceTree = SOURCE_ROOT; };
846444EE0AFA005B00E7B2BE /* juce_Wrapper_PlugInUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_PlugInUtils.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_PlugInUtils.cpp; sourceTree = SOURCE_ROOT; };
846EC6660EB602B90080CCFF /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
8498C1430E06D7D200FC76A6 /* includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = includes.h; path = ../../src/includes.h; sourceTree = SOURCE_ROOT; };
84C0A2F40DE2CBE500606895 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
84C0A2F50DE2CBE500606895 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
84C0A2F60DE2CBE500606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
84C0A2F70DE2CBE500606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
84C0A2F80DE2CBE500606895 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
84C0A2F90DE2CBE500606895 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
84C0A2FA0DE2CBE500606895 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
84C0A2FB0DE2CBE500606895 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = "<absolute>"; };
84C0A2FC0DE2CBE500606895 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
84C0A2FD0DE2CBE500606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
84C0A2FE0DE2CBE500606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
84C0A2FF0DE2CBE500606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
84C0A3000DE2CBE500606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
84C0A3010DE2CBE500606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
84C0A3100DE2CC0600606895 /* juce_amalgamated.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_amalgamated.mm; path = ../../../../../juce_amalgamated.mm; sourceTree = SOURCE_ROOT; };
84C442690B306D39003FCBFF /* CommonReleaseSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = CommonReleaseSettings.xcconfig; path = /Users/jules/stuff/PT_73_SDK/AlturaPorts/TDMPlugIns/common/Mac/CommonReleaseSettings.xcconfig; sourceTree = "<absolute>"; };
84C4426A0B306D39003FCBFF /* CommonDebugSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = CommonDebugSettings.xcconfig; path = /Users/jules/stuff/PT_73_SDK/AlturaPorts/TDMPlugIns/common/Mac/CommonDebugSettings.xcconfig; sourceTree = "<absolute>"; };
84C9D7F90AFA3C9C00F1348E /* juce_Wrapper_Dispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_Dispatcher.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_Dispatcher.cpp; sourceTree = SOURCE_ROOT; };
84C9D7FA0AFA3C9C00F1348E /* juce_Wrapper_PluginInitialize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Wrapper_PluginInitialize.cpp; path = ../../../wrapper/formats/RTAS/wrappers/juce_Wrapper_PluginInitialize.cpp; sourceTree = SOURCE_ROOT; };
84E903BF0EA34FD70088E51C /* juce_RTASUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_RTASUtilities.mm; path = ../../../wrapper/formats/RTAS/juce_RTASUtilities.mm; sourceTree = SOURCE_ROOT; };
84E904CF0EA351E40088E51C /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
84E907CA0EA396A50088E51C /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
84E90C240EA399090088E51C /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
84E90C2A0EA39A110088E51C /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
84EEB4170AFB6679009655FF /* DummyResourceFile.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; name = DummyResourceFile.r; path = ../../../wrapper/formats/RTAS/DummyResourceFile.r; sourceTree = SOURCE_ROOT; };
84F5CF5F0B1B705E00A2E279 /* juce_RTASCompileFlags.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_RTASCompileFlags.h; path = ../../../wrapper/formats/RTAS/juce_RTASCompileFlags.h; sourceTree = SOURCE_ROOT; };
8D01CCD20486CAD60068D4B7 /* JuceRTASDemo.dpm */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JuceRTASDemo.dpm; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -104,20 +102,19 @@
buildActionMask = 2147483647;
files = (
84FAD77B0C7C89E100AF3028 /* libPluginLibrary.a in Frameworks */,
84C0A3020DE2CBE500606895 /* AGL.framework in Frameworks */,
84C0A3030DE2CBE500606895 /* ApplicationServices.framework in Frameworks */,
84C0A3040DE2CBE500606895 /* AudioUnit.framework in Frameworks */,
84C0A3050DE2CBE500606895 /* Carbon.framework in Frameworks */,
84C0A3060DE2CBE500606895 /* Cocoa.framework in Frameworks */,
84C0A3070DE2CBE500606895 /* CoreAudio.framework in Frameworks */,
84C0A3080DE2CBE500606895 /* CoreFoundation.framework in Frameworks */,
84C0A3090DE2CBE500606895 /* CoreMIDI.framework in Frameworks */,
84C0A30A0DE2CBE500606895 /* CoreServices.framework in Frameworks */,
84C0A30B0DE2CBE500606895 /* DiscRecording.framework in Frameworks */,
84C0A30C0DE2CBE500606895 /* IOKit.framework in Frameworks */,
84C0A30D0DE2CBE600606895 /* OpenGL.framework in Frameworks */,
84C0A30E0DE2CBE600606895 /* QuickTime.framework in Frameworks */,
84C0A30F0DE2CBE600606895 /* WebKit.framework in Frameworks */,
84E904D00EA351E40088E51C /* QTKit.framework in Frameworks */,
84E907CB0EA396A50088E51C /* DiscRecording.framework in Frameworks */,
84E90C250EA399090088E51C /* WebKit.framework in Frameworks */,
84E90C2B0EA39A110088E51C /* OpenGL.framework in Frameworks */,
84190D1A0EA5320900B939D0 /* Carbon.framework in Frameworks */,
846EC6670EB602B90080CCFF /* QuickTime.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -140,21 +137,20 @@
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
84C0A2F40DE2CBE500606895 /* AGL.framework */,
5B521CEB08916D36009C75FE /* PluginLibrary.xcodeproj */,
84C0A2F50DE2CBE500606895 /* ApplicationServices.framework */,
84C0A2F60DE2CBE500606895 /* AudioUnit.framework */,
84C0A2F70DE2CBE500606895 /* Carbon.framework */,
84C0A2F80DE2CBE500606895 /* Cocoa.framework */,
84190D190EA5320900B939D0 /* Carbon.framework */,
84C0A2F90DE2CBE500606895 /* CoreAudio.framework */,
84C0A2FA0DE2CBE500606895 /* CoreFoundation.framework */,
84C0A2FB0DE2CBE500606895 /* CoreMIDI.framework */,
84C0A2FC0DE2CBE500606895 /* CoreServices.framework */,
84C0A2FD0DE2CBE500606895 /* DiscRecording.framework */,
84E907CA0EA396A50088E51C /* DiscRecording.framework */,
84C0A2FE0DE2CBE500606895 /* IOKit.framework */,
84C0A2FF0DE2CBE500606895 /* OpenGL.framework */,
84C0A3000DE2CBE500606895 /* QuickTime.framework */,
84C0A3010DE2CBE500606895 /* WebKit.framework */,
5B521CEB08916D36009C75FE /* PluginLibrary.xcodeproj */,
84E904CF0EA351E40088E51C /* QTKit.framework */,
846EC6660EB602B90080CCFF /* QuickTime.framework */,
84E90C240EA399090088E51C /* WebKit.framework */,
84E90C2A0EA39A110088E51C /* OpenGL.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
@@ -211,7 +207,7 @@
isa = PBXGroup;
children = (
846444E10AFA003B00E7B2BE /* Digi code wrappers */,
841E073B0AF9F099005E6FCC /* juce_RTASUtilities.cpp */,
84E903BF0EA34FD70088E51C /* juce_RTASUtilities.mm */,
841E073C0AF9F099005E6FCC /* juce_RTASWrapper.cpp */,
84F5CF5F0B1B705E00A2E279 /* juce_RTASCompileFlags.h */,
);
@@ -318,7 +314,6 @@
files = (
841E07300AF9F015005E6FCC /* DemoEditorComponent.cpp in Sources */,
841E07310AF9F015005E6FCC /* DemoJuceFilter.cpp in Sources */,
841E073D0AF9F099005E6FCC /* juce_RTASUtilities.cpp in Sources */,
841E073E0AF9F099005E6FCC /* juce_RTASWrapper.cpp in Sources */,
846444EF0AFA005B00E7B2BE /* juce_Wrapper_CEffectGroup.cpp in Sources */,
846444F00AFA005B00E7B2BE /* juce_Wrapper_CEffectGroupMIDI.cpp in Sources */,
@@ -333,6 +328,7 @@
84C9D7FB0AFA3C9C00F1348E /* juce_Wrapper_Dispatcher.cpp in Sources */,
84C9D7FC0AFA3C9C00F1348E /* juce_Wrapper_PluginInitialize.cpp in Sources */,
84C0A3110DE2CC0600606895 /* juce_amalgamated.mm in Sources */,
84E903C00EA34FD70088E51C /* juce_RTASUtilities.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};


+ 21
- 13
extras/audio plugins/demo/build/VST_Mac/JuceVST.xcodeproj/project.pbxproj View File

@@ -7,9 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
845FAE4C0A5C09FA008C94D8 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 845FAE4B0A5C09FA008C94D8 /* juce.xcconfig */; };
846EC67F0EB603BE0080CCFF /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846EC67E0EB603BE0080CCFF /* QuickTime.framework */; };
84BACBD20987847C0073300C /* juce_VstWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84BACBD10987847C0073300C /* juce_VstWrapper.cpp */; };
84C0A3530DE2D1FD00606895 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3450DE2D1FD00606895 /* AGL.framework */; };
84C0A3540DE2D1FD00606895 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3460DE2D1FD00606895 /* ApplicationServices.framework */; };
84C0A3550DE2D1FD00606895 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3470DE2D1FD00606895 /* AudioUnit.framework */; };
84C0A3560DE2D1FD00606895 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3480DE2D1FD00606895 /* Carbon.framework */; };
@@ -21,20 +20,22 @@
84C0A35C0DE2D1FD00606895 /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A34E0DE2D1FD00606895 /* DiscRecording.framework */; };
84C0A35D0DE2D1FD00606895 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A34F0DE2D1FD00606895 /* IOKit.framework */; };
84C0A35E0DE2D1FD00606895 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3500DE2D1FD00606895 /* OpenGL.framework */; };
84C0A35F0DE2D1FD00606895 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3510DE2D1FD00606895 /* QuickTime.framework */; };
84C0A3600DE2D1FD00606895 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84C0A3520DE2D1FD00606895 /* WebKit.framework */; };
84C0A3620DE2D24B00606895 /* juce_amalgamated.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84C0A3610DE2D24B00606895 /* juce_amalgamated.mm */; };
84E01FC70E9136C6003E41AF /* juce_VstWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84E01FC60E9136C6003E41AF /* juce_VstWrapper.mm */; };
84E0200D0E923F75003E41AF /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E0200C0E923F75003E41AF /* QTKit.framework */; };
84E1AE51089EBAAA00E85E4F /* DemoEditorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E1AE4D089EBAAA00E85E4F /* DemoEditorComponent.cpp */; };
84E1AE52089EBAAA00E85E4F /* DemoJuceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84E1AE4F089EBAAA00E85E4F /* DemoJuceFilter.cpp */; };
84E1AF42089EBFD900E85E4F /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 84E1AF41089EBFD900E85E4F /* Info.plist */; };
84F5CF040B1B66B100A2E279 /* How to use this framework.txt in Resources */ = {isa = PBXBuildFile; fileRef = 84F5CF030B1B66B100A2E279 /* How to use this framework.txt */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
84551AA009BDB8F3009C9F3E /* JucePluginCharacteristics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JucePluginCharacteristics.h; path = ../../src/JucePluginCharacteristics.h; sourceTree = SOURCE_ROOT; };
845FAE4B0A5C09FA008C94D8 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
846EC67E0EB603BE0080CCFF /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
846EC6820EB603FF0080CCFF /* includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = includes.h; path = ../../src/includes.h; sourceTree = SOURCE_ROOT; };
84BACBD10987847C0073300C /* juce_VstWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_VstWrapper.cpp; path = ../../../wrapper/formats/VST/juce_VstWrapper.cpp; sourceTree = SOURCE_ROOT; };
84C0A3450DE2D1FD00606895 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
84BE92BB0EA61E590079073F /* MacExportedSymbols.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = MacExportedSymbols.txt; path = ../../../wrapper/formats/VST/MacExportedSymbols.txt; sourceTree = SOURCE_ROOT; };
84C0A3460DE2D1FD00606895 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
84C0A3470DE2D1FD00606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
84C0A3480DE2D1FD00606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
@@ -46,15 +47,16 @@
84C0A34E0DE2D1FD00606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
84C0A34F0DE2D1FD00606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
84C0A3500DE2D1FD00606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
84C0A3510DE2D1FD00606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
84C0A3520DE2D1FD00606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
84C0A3610DE2D24B00606895 /* juce_amalgamated.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_amalgamated.mm; path = ../../../../../juce_amalgamated.mm; sourceTree = SOURCE_ROOT; };
84E01FC60E9136C6003E41AF /* juce_VstWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 2; name = juce_VstWrapper.mm; path = ../../../wrapper/formats/VST/juce_VstWrapper.mm; sourceTree = SOURCE_ROOT; };
84E0200C0E923F75003E41AF /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
84E1AE47089EBA6A00E85E4F /* JuceVST.vst */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JuceVST.vst; sourceTree = BUILT_PRODUCTS_DIR; };
84E1AE4D089EBAAA00E85E4F /* DemoEditorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DemoEditorComponent.cpp; path = ../../src/DemoEditorComponent.cpp; sourceTree = SOURCE_ROOT; };
84E1AE4E089EBAAA00E85E4F /* DemoEditorComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DemoEditorComponent.h; path = ../../src/DemoEditorComponent.h; sourceTree = SOURCE_ROOT; };
84E1AE4F089EBAAA00E85E4F /* DemoJuceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = DemoJuceFilter.cpp; path = ../../src/DemoJuceFilter.cpp; sourceTree = SOURCE_ROOT; };
84E1AE50089EBAAA00E85E4F /* DemoJuceFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DemoJuceFilter.h; path = ../../src/DemoJuceFilter.h; sourceTree = SOURCE_ROOT; };
84E1AF41089EBFD900E85E4F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
84E1AF41089EBFD900E85E4F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
84F5CF030B1B66B100A2E279 /* How to use this framework.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = "How to use this framework.txt"; path = "../../../How to use this framework.txt"; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

@@ -63,7 +65,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
84C0A3530DE2D1FD00606895 /* AGL.framework in Frameworks */,
84C0A3540DE2D1FD00606895 /* ApplicationServices.framework in Frameworks */,
84C0A3550DE2D1FD00606895 /* AudioUnit.framework in Frameworks */,
84C0A3560DE2D1FD00606895 /* Carbon.framework in Frameworks */,
@@ -75,8 +76,9 @@
84C0A35C0DE2D1FD00606895 /* DiscRecording.framework in Frameworks */,
84C0A35D0DE2D1FD00606895 /* IOKit.framework in Frameworks */,
84C0A35E0DE2D1FD00606895 /* OpenGL.framework in Frameworks */,
84C0A35F0DE2D1FD00606895 /* QuickTime.framework in Frameworks */,
84C0A3600DE2D1FD00606895 /* WebKit.framework in Frameworks */,
84E0200D0E923F75003E41AF /* QTKit.framework in Frameworks */,
846EC67F0EB603BE0080CCFF /* QuickTime.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -98,7 +100,6 @@
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
84C0A3450DE2D1FD00606895 /* AGL.framework */,
84C0A3460DE2D1FD00606895 /* ApplicationServices.framework */,
84C0A3470DE2D1FD00606895 /* AudioUnit.framework */,
84C0A3480DE2D1FD00606895 /* Carbon.framework */,
@@ -109,8 +110,9 @@
84C0A34D0DE2D1FD00606895 /* CoreServices.framework */,
84C0A34E0DE2D1FD00606895 /* DiscRecording.framework */,
84C0A34F0DE2D1FD00606895 /* IOKit.framework */,
84E0200C0E923F75003E41AF /* QTKit.framework */,
846EC67E0EB603BE0080CCFF /* QuickTime.framework */,
84C0A3500DE2D1FD00606895 /* OpenGL.framework */,
84C0A3510DE2D1FD00606895 /* QuickTime.framework */,
84C0A3520DE2D1FD00606895 /* WebKit.framework */,
);
name = "External Frameworks and Libraries";
@@ -151,6 +153,7 @@
84E1AE50089EBAAA00E85E4F /* DemoJuceFilter.h */,
84551AA009BDB8F3009C9F3E /* JucePluginCharacteristics.h */,
84C0A3610DE2D24B00606895 /* juce_amalgamated.mm */,
846EC6820EB603FF0080CCFF /* includes.h */,
);
name = filter;
sourceTree = "<group>";
@@ -158,7 +161,9 @@
84E1AE53089EBACA00E85E4F /* wrapper code */ = {
isa = PBXGroup;
children = (
84E01FC60E9136C6003E41AF /* juce_VstWrapper.mm */,
84BACBD10987847C0073300C /* juce_VstWrapper.cpp */,
84BE92BB0EA61E590079073F /* MacExportedSymbols.txt */,
);
name = "wrapper code";
sourceTree = "<group>";
@@ -206,8 +211,6 @@
buildActionMask = 2147483647;
files = (
84E1AF42089EBFD900E85E4F /* Info.plist in Resources */,
845FAE4C0A5C09FA008C94D8 /* juce.xcconfig in Resources */,
84F5CF040B1B66B100A2E279 /* How to use this framework.txt in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -222,6 +225,7 @@
84E1AE52089EBAAA00E85E4F /* DemoJuceFilter.cpp in Sources */,
84BACBD20987847C0073300C /* juce_VstWrapper.cpp in Sources */,
84C0A3620DE2D24B00606895 /* juce_amalgamated.mm in Sources */,
84E01FC70E9136C6003E41AF /* juce_VstWrapper.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -257,12 +261,15 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
EXPORTED_SYMBOLS_FILE = ../../../wrapper/formats/VST/MacExportedSymbols.txt;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GENERATE_PKGINFO_FILE = YES;
INFOPLIST_FILE = info.plist;
INFOPLIST_PREPROCESS = YES;
PRELINK_LIBS = libjucedebug;
PRODUCT_NAME = JuceVST;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
SYMROOT = "$(HOME)/Library/Audio/Plug-Ins/VST";
WARNING_CFLAGS = (
"-Wmost",
@@ -277,6 +284,7 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
EXPORTED_SYMBOLS_FILE = ../../../wrapper/formats/VST/MacExportedSymbols.txt;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;


extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp → extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.mm View File

@@ -29,12 +29,15 @@
==============================================================================
*/
#include <Cocoa/Cocoa.h>
#include <AudioUnit/AUCocoaUIView.h>
#include <AudioUnit/AudioUnit.h>
#include <AudioToolbox/AudioUnitUtilities.h>
#include "AUMIDIEffectBase.h"
#include "MusicDeviceBase.h"
#include "AUCarbonViewBase.h"
#include "../../juce_IncludeCharacteristics.h"
#include "../../../../../juce_amalgamated.h"
//#include "../../../../../juce_amalgamated.h"
#include "../../../../../juce.h"
//==============================================================================
#define juceFilterObjectPropertyID 0x1a45ffe9
@@ -60,10 +63,28 @@ END_JUCE_NAMESPACE
extern AudioProcessor* JUCE_CALLTYPE createPluginFilter();
class JuceAUView;
//==============================================================================
#define CONCAT_MACRO(Part1, Part2) Part1 ## Part2
#define JuceUICreationClass CONCAT_MACRO (JucePlugin_AUExportPrefix, _UICreationClass)
@interface JuceUICreationClass : NSObject <AUCocoaUIBase>
{
}
- (JuceUICreationClass*) init;
- (void) dealloc;
- (unsigned) interfaceVersion;
- (NSString *) description;
- (NSView*) uiViewForAudioUnit: (AudioUnit) inAudioUnit
withSize: (NSSize) inPreferredSize;
@end
//==============================================================================
class JuceAU : public JuceAUBaseClass,
public AudioProcessorListener,
public AudioPlayHead
public AudioPlayHead,
public ComponentListener
{
public:
//==============================================================================
@@ -73,14 +94,11 @@ public:
#else
: AUMIDIEffectBase (component),
#endif
currentView (0),
juceFilter (0),
bufferSpace (2, 16),
channels (0),
prepared (false)
{
CreateElements();
if (activePlugins.size() == 0)
{
initialiseJuce_GUI();
@@ -88,8 +106,6 @@ public:
#ifdef JucePlugin_CFBundleIdentifier
juce_setCurrentExecutableFileNameFromBundleId (JucePlugin_CFBundleIdentifier);
#endif
MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (0);
}
juceFilter = createPluginFilter();
@@ -143,10 +159,16 @@ public:
outDataSize = sizeof (UInt32);
return noErr;
}
else if (inID == kMusicDeviceProperty_InstrumentCount)
else if (inID == kMusicDeviceProperty_InstrumentCount)
{
outDataSize = sizeof (UInt32);
outWritable = false;
return noErr;
}
else if (inID == kAudioUnitProperty_CocoaUI)
{
outDataSize = sizeof (UInt32);
outWritable = false;
outDataSize = sizeof (AudioUnitCocoaViewInfo);
outWritable = true;
return noErr;
}
}
@@ -172,11 +194,21 @@ public:
*(UInt32*) outData = (juceFilter != 0 && juceFilter->isNonRealtime()) ? 1 : 0;
return noErr;
}
else if (inID == kMusicDeviceProperty_InstrumentCount)
else if (inID == kMusicDeviceProperty_InstrumentCount)
{
*(UInt32*) outData = 1;
return noErr;
}
else if (inID == kAudioUnitProperty_CocoaUI)
{
AudioUnitCocoaViewInfo* info = (AudioUnitCocoaViewInfo*) outData;
NSBundle* b = [NSBundle bundleForClass: [JuceUICreationClass class]];
info->mCocoaAUViewClass[0] = (CFStringRef) [[[JuceUICreationClass class] className] retain];
info->mCocoaAUViewBundleLocation = (CFURLRef) [[NSURL fileURLWithPath: [b bundlePath]] retain];
return noErr;
}
}
return JuceAUBaseClass::GetProperty (inID, inScope, inElement, outData);
@@ -370,18 +402,6 @@ public:
return juceFilter->getLatencySamples() / GetSampleRate();
}
//==============================================================================
int GetNumCustomUIComponents() { return 1; }
void GetUIComponentDescs (ComponentDescription* inDescArray)
{
inDescArray[0].componentType = kAudioUnitCarbonViewComponentType;
inDescArray[0].componentSubType = JucePlugin_AUSubType;
inDescArray[0].componentManufacturer = JucePlugin_AUManufacturerCode;
inDescArray[0].componentFlags = 0;
inDescArray[0].componentFlagsMask = 0;
}
//==============================================================================
bool getCurrentPosition (AudioPlayHead::CurrentPositionInfo& info)
{
@@ -472,9 +492,6 @@ public:
}
}
// (can only be called immediately after sendAUEvent)
void sendOldFashionedGestureEvent (const AudioUnitCarbonViewEventID gestureType);
void audioProcessorParameterChanged (AudioProcessor*, int index, float newValue)
{
sendAUEvent (kAudioUnitEvent_ParameterValueChange, index);
@@ -483,13 +500,11 @@ public:
void audioProcessorParameterChangeGestureBegin (AudioProcessor*, int index)
{
sendAUEvent (kAudioUnitEvent_BeginParameterChangeGesture, index);
sendOldFashionedGestureEvent (kAudioUnitCarbonViewEvent_MouseDownInControl);
}
void audioProcessorParameterChangeGestureEnd (AudioProcessor*, int index)
{
sendAUEvent (kAudioUnitEvent_EndParameterChangeGesture, index);
sendOldFashionedGestureEvent (kAudioUnitCarbonViewEvent_MouseUpInControl);
}
void audioProcessorChanged (AudioProcessor*)
@@ -820,10 +835,18 @@ protected:
return noErr;
}
//==============================================================================
public:
JuceAUView* currentView;
void componentMovedOrResized (Component& component, bool wasMoved, bool wasResized)
{
if (wasResized)
{
NSView* view = (NSView*) component.getWindowHandle();
[[view superview] setFrameSize: NSMakeSize (component.getWidth(), component.getHeight())];
[view setFrame: NSMakeRect (0, 0, component.getWidth(), component.getHeight())];
[view setNeedsDisplay: YES];
}
}
//==============================================================================
private:
AudioProcessor* juceFilter;
AudioSampleBuffer bufferSpace;
@@ -836,221 +859,130 @@ private:
mutable MemoryBlock presetsArray;
};
//==============================================================================
class JuceAUComponentHolder : public Component
{
public:
JuceAUComponentHolder (Component* const editorComp)
{
addAndMakeVisible (editorComp);
setOpaque (true);
setVisible (true);
setBroughtToFrontOnMouseClick (true);
#if ! JucePlugin_EditorRequiresKeyboardFocus
setWantsKeyboardFocus (false);
#endif
}
~JuceAUComponentHolder()
{
}
void resized()
{
if (getNumChildComponents() > 0)
getChildComponent (0)->setBounds (0, 0, getWidth(), getHeight());
}
void paint (Graphics& g)
{
}
};
//==============================================================================
class JuceAUView : public AUCarbonViewBase,
public ComponentListener,
public MouseListener,
public Timer
@interface JuceUIViewClass : NSView
{
AudioProcessor* juceFilter;
AudioProcessor* filter;
JuceAU* au;
AudioProcessorEditor* editorComp;
Component* windowComp;
bool recursive;
int mx, my;
JuceAU* owner;
public:
JuceAUView (AudioUnitCarbonView auview)
: AUCarbonViewBase (auview),
juceFilter (0),
editorComp (0),
windowComp (0),
recursive (false),
mx (0),
my (0),
owner (0)
{
}
~JuceAUView()
{
if (owner->currentView == this)
owner->currentView = 0;
deleteUI();
}
ComponentResult CreateUI (Float32 inXOffset, Float32 inYOffset)
{
if (juceFilter == 0)
{
void* pointers[2];
UInt32 propertySize = sizeof (pointers);
AudioUnitGetProperty (GetEditAudioUnit(),
juceFilterObjectPropertyID,
kAudioUnitScope_Global,
0,
pointers,
&propertySize);
}
juceFilter = (AudioProcessor*) pointers[0];
- (JuceUIViewClass*) initWithFilter: (AudioProcessor*) filter
withAU: (JuceAU*) au
withComponent: (AudioProcessorEditor*) editorComp;
- (void) dealloc;
- (void) viewDidMoveToWindow;
- (BOOL) mouseDownCanMoveWindow;
owner = (JuceAU*) pointers[1];
owner->currentView = this;
}
@end
if (juceFilter != 0)
{
deleteUI();
@implementation JuceUIViewClass
editorComp = juceFilter->createEditorIfNeeded();
- (JuceUIViewClass*) initWithFilter: (AudioProcessor*) filter_
withAU: (JuceAU*) au_
withComponent: (AudioProcessorEditor*) editorComp_
{
filter = filter_;
au = au_;
editorComp = editorComp_;
const int w = editorComp->getWidth();
const int h = editorComp->getHeight();
[super initWithFrame: NSMakeRect (0, 0, editorComp_->getWidth(), editorComp_->getHeight())];
[self setHidden: NO];
[self setPostsFrameChangedNotifications: YES];
editorComp->setOpaque (true);
editorComp->setVisible (true);
editorComp->addToDesktop (0, (void*) self);
editorComp->setVisible (true);
editorComp->addComponentListener (au);
windowComp = new JuceAUComponentHolder (editorComp);
windowComp->setBounds ((int) inXOffset, (int) inYOffset, w, h);
return self;
}
windowComp->addToDesktop (0, (void*) mCarbonPane);
SizeControl (mCarbonPane, w, h);
- (void) dealloc
{
// there's some kind of component currently modal, but the host
// is trying to delete our plugin..
jassert (Component::getCurrentlyModalComponent() == 0);
editorComp->addComponentListener (this);
windowComp->addMouseListener (this, true);
if (editorComp != 0)
filter->editorBeingDeleted (editorComp);
startTimer (20);
}
else
{
jassertfalse // can't get a pointer to our effect
}
deleteAndZero (editorComp);
return noErr;
}
[super dealloc];
}
void componentMovedOrResized (Component& component,
bool wasMoved,
bool wasResized)
- (void) viewDidMoveToWindow
{
if ([self window] != 0)
{
if (! recursive)
{
recursive = true;
if (editorComp != 0 && wasResized)
{
const int w = jmax (32, editorComp->getWidth());
const int h = jmax (32, editorComp->getHeight());
SizeControl (mCarbonPane, w, h);
if (windowComp->getWidth() != w
|| windowComp->getHeight() != h)
{
windowComp->setSize (w, h);
}
editorComp->repaint();
}
recursive = false;
}
}
[[self window] setAcceptsMouseMovedEvents: YES];
void timerCallback()
{
// for some stupid Apple-related reason, mouse move events just don't seem to get sent
// to the windows in an AU, so we have to bodge it here and simulate them with a
// timer..
if (editorComp != 0)
{
int x, y;
Desktop::getInstance().getMousePosition (x, y);
if (x != mx || y != my)
{
mx = x;
my = y;
if (! ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown())
{
for (int i = ComponentPeer::getNumPeers(); --i >= 0;)
{
ComponentPeer* const peer = ComponentPeer::getPeer (i);
int rx = x, ry = y;
peer->getComponent()->globalPositionToRelative (rx, ry);
if (peer->contains (rx, ry, false) && peer->getComponent()->isShowing())
{
peer->handleMouseMove (rx, ry, Time::currentTimeMillis());
break;
}
}
}
}
}
[[self window] makeFirstResponder: (NSView*) editorComp->getWindowHandle()];
}
}
void mouseMove (const MouseEvent& e)
{
Desktop::getInstance().getMousePosition (mx, my);
startTimer (20);
}
- (BOOL) mouseDownCanMoveWindow
{
return NO;
}
AudioUnitCarbonViewEventListener getEventListener() const throw() { return mEventListener; }
void* getEventListenerUserData() const throw() { return mEventListenerUserData; }
@end
private:
void deleteUI()
{
PopupMenu::dismissAllActiveMenus();
@implementation JuceUICreationClass
// there's some kind of component currently modal, but the host
// is trying to delete our plugin..
jassert (Component::getCurrentlyModalComponent() == 0);
- (JuceUICreationClass*) init
{
return [super init];
}
if (editorComp != 0)
juceFilter->editorBeingDeleted (editorComp);
- (void) dealloc
{
[super dealloc];
}
deleteAndZero (editorComp);
deleteAndZero (windowComp);
}
};
- (unsigned) interfaceVersion
{
return 0;
}
void JuceAU::sendOldFashionedGestureEvent (const AudioUnitCarbonViewEventID gestureType)
- (NSString*) description
{
if (currentView != 0 && currentView->getEventListener() != 0)
{
(*currentView->getEventListener()) (currentView->getEventListenerUserData(), currentView->GetComponentInstance(),
&(auEvent.mArgument.mParameter), gestureType, 0);
}
return [NSString stringWithString: @JucePlugin_Name];
}
- (NSView*) uiViewForAudioUnit: (AudioUnit) inAudioUnit
withSize: (NSSize) inPreferredSize
{
void* pointers[2];
UInt32 propertySize = sizeof (pointers);
if (AudioUnitGetProperty (inAudioUnit,
juceFilterObjectPropertyID,
kAudioUnitScope_Global,
0,
pointers,
&propertySize) != noErr)
return 0;
AudioProcessor* filter = (AudioProcessor*) pointers[0];
JuceAU* au = (JuceAU*) pointers[1];
if (filter == 0)
return 0;
AudioProcessorEditor* editorComp = filter->createEditorIfNeeded();
if (editorComp == 0)
return 0;
DBG (String (inPreferredSize.width) + " " + String (inPreferredSize.height));
DBG (String (editorComp->getWidth()) + " " + String (editorComp->getHeight()));
return [[[JuceUIViewClass alloc] initWithFilter: filter
withAU: au
withComponent: editorComp] autorelease];
}
@end
//==============================================================================
#define JUCE_COMPONENT_ENTRYX(Class, Name, Suffix) \
@@ -1063,4 +995,4 @@ extern "C" __attribute__((visibility("default"))) ComponentResult Name ## Suffix
#define JUCE_COMPONENT_ENTRY(Class, Name, Suffix) JUCE_COMPONENT_ENTRYX(Class, Name, Suffix)
JUCE_COMPONENT_ENTRY (JuceAU, JucePlugin_AUExportPrefix, Entry)
JUCE_COMPONENT_ENTRY (JuceAUView, JucePlugin_AUExportPrefix, ViewEntry)
//JUCE_COMPONENT_ENTRY (JuceAUView, JucePlugin_AUExportPrefix, ViewEntry)

+ 0
- 13
extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r View File

@@ -30,7 +30,6 @@
*/
#include <AudioUnit/AudioUnit.r>
#include <AudioUnit/AudioUnitCarbonView.r>
//==============================================================================
/* The JucePluginCharacteristics.h file is supposed to live in your plugin-specific
@@ -56,15 +55,3 @@
#include "/Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUResources.r"
//==============================================================================
// component resources for Audio Unit Carbon View
#define RES_ID 2000
#define COMP_TYPE kAudioUnitCarbonViewComponentType
#define COMP_SUBTYPE JucePlugin_AUSubType
#define COMP_MANUF JucePlugin_AUManufacturerCode
#define VERSION JucePlugin_VersionCode
#define NAME JucePlugin_Manufacturer ": " JucePlugin_Name " View"
#define DESCRIPTION NAME
#define ENTRY_POINT JucePlugin_AUExportPrefixQuoted "ViewEntry"
#include "/Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUResources.r"

+ 82
- 0
extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.mm View File

@@ -0,0 +1,82 @@
/*
==============================================================================

This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.

------------------------------------------------------------------------------

JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

------------------------------------------------------------------------------

If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.

==============================================================================
*/

#include <Cocoa/Cocoa.h>
#include "../../../../../juce.h"

//==============================================================================
void* attachSubWindow (void* hostWindowRef, Component* comp)
{
const ScopedAutoReleasePool pool;

NSWindow* hostWindow = [[NSWindow alloc] initWithWindowRef: hostWindowRef];
[hostWindow retain];

NSView* content = [hostWindow contentView];
NSRect f = [content frame];
f.size.width = comp->getWidth();
f.size.height = comp->getHeight();
[content setFrame: f];

NSPoint windowPos = [hostWindow convertBaseToScreen: f.origin];
windowPos.y = [[NSScreen mainScreen] frame].size.height - (windowPos.y + f.size.height);

comp->setTopLeftPosition ((int) windowPos.x, (int) windowPos.y);

#if ! JucePlugin_EditorRequiresKeyboardFocus
comp->addToDesktop (ComponentPeer::windowIsTemporary | ComponentPeer::windowIgnoresKeyPresses);
#else
comp->addToDesktop (ComponentPeer::windowIsTemporary);
#endif

comp->setVisible (true);

NSView* pluginView = (NSView*) comp->getWindowHandle();
NSWindow* pluginWindow = [pluginView window];

[hostWindow addChildWindow: pluginWindow
ordered: NSWindowAbove];
[hostWindow orderFront: nil];
return hostWindow;
}

void removeSubWindow (void* nsWindow, Component* comp)
{
const ScopedAutoReleasePool pool;

NSView* pluginView = (NSView*) comp->getWindowHandle();
NSWindow* hostWindow = (NSWindow*) nsWindow;
NSWindow* pluginWindow = [pluginView window];

[hostWindow removeChildWindow: pluginWindow];
comp->removeFromDesktop();
[hostWindow release];
}

+ 34
- 186
extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp View File

@@ -93,7 +93,7 @@
#ifdef _MSC_VER
#include "../../../../../juce.h"
#else
#include "../../../../../juce_amalgamated.h"
#include "../../../../../juce.h"
#endif
#include "../../juce_IncludeCharacteristics.h"
@@ -112,6 +112,9 @@
#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);
#endif
const int midiBufferSize = 1024;
@@ -150,10 +153,10 @@ class JucePlugInProcess : public CEffectProcessMIDI,
public:
//==============================================================================
JucePlugInProcess()
: channels (0),
prepared (false),
midiBufferNode (0),
: midiBufferNode (0),
midiTransport (0),
channels (0),
prepared (false),
sampleRate (44100.0)
{
juceFilter = createPluginFilter();
@@ -192,8 +195,8 @@ public:
JucePlugInProcess* const process_)
: filter (filter_),
process (process_),
editorComp (0),
wrapper (0)
wrapper (0),
editorComp (0)
{
// setting the size in here crashes PT for some reason, so keep it simple..
}
@@ -261,35 +264,21 @@ public:
void DrawContents (Rect*)
{
#if JUCE_WIN32
if (wrapper != 0)
{
ComponentPeer* const peer = wrapper->getPeer();
if (peer != 0)
{
#if JUCE_WIN32
// (seems to be required in PT6.4, but not in 7.x)
peer->repaint (0, 0, wrapper->getWidth(), wrapper->getHeight());
#elif JUCE_PPC
// This crap is needed because if you resize a window, PT doesn't
// update its clip region, so only part of your new window gets drawn.
// This overrides the clipping region that's being passed into the Draw
// method.
Rect visible;
GetVisibleRect (&visible);
RestoreFocus();
Focus (&visible);
#endif
peer->performAnyPendingRepaintsNow();
}
}
#endif
}
void DrawBackground (Rect* r)
{
}
void DrawBackground (Rect*) {}
//==============================================================================
private:
@@ -300,8 +289,11 @@ public:
void deleteEditorComp()
{
if (editorComp != 0)
if (editorComp != 0 || wrapper != 0)
{
#if JUCE_MAC
const ScopedAutoReleasePool pool;
#endif
PopupMenu::dismissAllActiveMenus();
JUCE_NAMESPACE::Component* const modalComponent = JUCE_NAMESPACE::Component::getCurrentlyModalComponent();
@@ -309,6 +301,7 @@ public:
modalComponent->exitModalState (0);
filter->editorBeingDeleted (editorComp);
deleteAndZero (editorComp);
deleteAndZero (wrapper);
}
@@ -317,26 +310,23 @@ public:
//==============================================================================
// A component to hold the AudioProcessorEditor, and cope with some housekeeping
// chores when it changes or repaints.
class EditorCompWrapper : public JUCE_NAMESPACE::Component,
#if JUCE_MAC
public Timer
#else
public FocusChangeListener
class EditorCompWrapper : public JUCE_NAMESPACE::Component
#if ! JUCE_MAC
, public FocusChangeListener
#endif
{
public:
EditorCompWrapper (void* const hostWindow_,
AudioProcessorEditor* const editorComp,
Component* const editorComp,
JuceCustomUIView* const owner_)
: hostWindow (hostWindow_),
owner (owner_),
titleW (0),
titleH (0)
#if JUCE_MAC
, forcedRepaintTimer (0)
#endif
{
#if ! JucePlugin_EditorRequiresKeyboardFocus
#if JucePlugin_EditorRequiresKeyboardFocus
setWantsKeyboardFocus (true);
#else
setWantsKeyboardFocus (false);
#endif
setOpaque (true);
@@ -347,67 +337,10 @@ public:
#if JUCE_WIN32
attachSubWindow (hostWindow, titleW, titleH, this);
setVisible (true);
#else
SetAutomaticControlDragTrackingEnabledForWindow ((WindowRef) hostWindow_, true);
WindowAttributes attributes;
GetWindowAttributes ((WindowRef) hostWindow_, &attributes);
parentView = 0;
if ((attributes & kWindowCompositingAttribute) != 0)
{
HIViewRef root = HIViewGetRoot ((WindowRef) hostWindow_);
HIViewFindByID (root, kHIViewWindowContentID, &parentView);
if (parentView == 0)
parentView = root;
}
else
{
GetRootControl ((WindowRef) hostWindow_, (ControlRef*) &parentView);
if (parentView == 0)
CreateRootControl ((WindowRef) hostWindow_, (ControlRef*) &parentView);
}
jassert (parentView != 0);
Rect clientRect;
GetWindowBounds ((WindowRef) hostWindow, kWindowContentRgn, &clientRect);
titleW = clientRect.right - clientRect.left;
titleH = jmax (0, (clientRect.bottom - clientRect.top) - getHeight());
setTopLeftPosition (0, 0);
HIViewSetNeedsDisplay (parentView, true);
setVisible (true);
addToDesktop (ComponentPeer::windowRepaintedExplictly, (void*) parentView);
HIViewRef pluginView = HIViewGetFirstSubview (parentView);
#if ! JucePlugin_EditorRequiresKeyboardFocus
HIViewSetActivated (pluginView, false);
#endif
/* This is a convoluted and desperate workaround for a Digi (or maybe Apple)
layout bug. Until the parent control gets some kind of mouse-move
event, then our plugin's HIView remains stuck at (0, 0) in the
window (despite drawing correctly), which blocks mouse events from
getting to the widgets above it.
After days of frustration the only hack I can find that works
is to use this arcane function to redirect mouse events to
the parent, while running a timer to spot the moment when our
view mysteriously snaps back to its correct location.
If anyone at Digi or Apple is reading this and they realise that it's
their fault, could they please give me back the week of my life that
they made me waste on this rubbish. Thankyou.
*/
SetControlSupervisor (pluginView, parentView);
startTimer (150);
nsWindow = attachSubWindow (hostWindow, this);
#endif
setVisible (true);
#if JUCE_WIN32 && ! JucePlugin_EditorRequiresKeyboardFocus
Desktop::getInstance().addFocusChangeListener (this);
@@ -421,16 +354,12 @@ public:
#endif
#if JUCE_MAC
delete forcedRepaintTimer;
removeSubWindow (nsWindow, this);
#endif
}
void paint (Graphics&)
{
#if JUCE_MAC
if (forcedRepaintTimer != 0)
forcedRepaintTimer->stopTimer();
#endif
}
void resized()
@@ -443,38 +372,6 @@ public:
repaint();
}
#if JUCE_MAC
void timerCallback()
{
// Wait for the moment when PT deigns to allow our view to
// take up its actual location (see rant above)
HIViewRef content = 0;
HIViewFindByID (HIViewGetRoot ((WindowRef) hostWindow), kHIViewWindowContentID, &content);
HIPoint p = { 0.0f, 0.0f };
HIViewRef v = HIViewGetFirstSubview (parentView);
HIViewConvertPoint (&p, v, content);
if (p.y > 12)
{
if (p.x != titleW || p.y != titleH)
{
GrafPtr oldport;
GetPort (&oldport);
SetPort (owner->GetViewPort());
SetOrigin (-titleW, -titleH);
SetPort (oldport);
}
HIViewRef v = HIViewGetFirstSubview (parentView);
SetControlSupervisor (v, 0);
stopTimer();
forcedRepaintTimer = new RepaintCheckTimer (*this);
}
}
#endif
#if JUCE_WIN32
void globalFocusChanged (JUCE_NAMESPACE::Component*)
{
@@ -492,72 +389,22 @@ public:
#if JUCE_WIN32
resizeHostWindow (hostWindow, titleW, titleH, this);
owner->updateSize();
#else
Rect r;
GetWindowBounds ((WindowRef) hostWindow, kWindowContentRgn, &r);
HIRect p;
zerostruct (p);
HIViewConvertRect (&p, parentView, 0); // find the X position of our view in case there's space to the left of it
r.right = r.left + jmax (titleW, ((int) p.origin.x) + getWidth());
r.bottom = r.top + getHeight() + titleH;
SetWindowBounds ((WindowRef) hostWindow, kWindowContentRgn, &r);
owner->updateSize();
owner->Invalidate();
#endif
owner->updateSize();
}
//==============================================================================
juce_UseDebuggingNewOperator
#if JUCE_MAC
protected:
void internalRepaint (int x, int y, int w, int h)
void userTriedToCloseWindow()
{
Component::internalRepaint (x, y, w, h);
owner->Invalidate();
if (forcedRepaintTimer != 0 && ! forcedRepaintTimer->isTimerRunning())
forcedRepaintTimer->startTimer (1000 / 25);
}
HIViewRef parentView;
#endif
//==============================================================================
juce_UseDebuggingNewOperator
private:
void* const hostWindow;
void* nsWindow;
JuceCustomUIView* const owner;
int titleW, titleH;
#if JUCE_MAC
// if PT makes us wait too long for a redraw after we've
// asked for one, this should kick in and force one to happen
class RepaintCheckTimer : public Timer
{
public:
RepaintCheckTimer (EditorCompWrapper& owner_)
: owner (owner_)
{
}
void timerCallback()
{
stopTimer();
ComponentPeer* const peer = owner.getPeer();
if (peer != 0)
peer->performAnyPendingRepaintsNow();
}
EditorCompWrapper& owner;
};
RepaintCheckTimer* forcedRepaintTimer;
#endif
};
};
@@ -705,6 +552,7 @@ protected:
#if defined (JUCE_DEBUG) || JUCE_LOG_ASSERTIONS
const int numMidiEventsComingIn = midiEvents.getNumEvents();
(void) numMidiEventsComingIn;
#endif
{
@@ -744,7 +592,7 @@ protected:
if (! midiEvents.isEmpty())
{
#if JucePlugin_ProducesMidiOutput
const uint8* midiEventData;
const juce::uint8* midiEventData;
int midiEventSize, midiEventPosition;
MidiBuffer::Iterator i (midiEvents);


+ 12
- 0
extras/audio plugins/wrapper/formats/VST/MacExportedSymbols.txt View File

@@ -0,0 +1,12 @@
#
# This file contains a list of the symbols that your VST plugin needs to export.
#
# It's very important that you refer to this file in your linker settings, under
# the "Exported Symbols File" heading. If you don't specify that these are the
# only two symbols exported, the linker will also export all the Obj-C symbols in
# Juce, and this will create all sorts of dynamic link problems when you have
# more than one juce-linked module loaded at the same time.
#

_VSTPluginMain
_main_macho

+ 42
- 69
extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp View File

@@ -30,7 +30,7 @@
*/
/*
*** DON't EDIT THIS FILE!! ***
*** DON'T EDIT THIS FILE!! ***
The idea is that everyone's plugins should share this same wrapper
code, so if you start hacking around in here you're missing the point!
@@ -119,7 +119,8 @@
#pragma pack (push, 8)
#endif
#include "../../../../../juce_amalgamated.h"
//#include "../../../../../juce_amalgamated.h"
#include "../../../../../juce.h"
#ifdef _MSC_VER
#pragma pack (pop)
@@ -136,6 +137,10 @@ BEGIN_JUCE_NAMESPACE
#if JUCE_MAC
extern void juce_setCurrentExecutableFileNameFromBundleId (const String& bundleId) throw();
extern void* attachComponentToWindowRef (Component* component, void* windowRef);
extern void detachComponentFromWindowRef (Component* component, void* nsWindow);
extern void setNativeHostWindowSize (void* nsWindow, Component* editorComp, int newWidth, int newHeight);
extern void checkWindowVisibility (void* nsWindow, Component* component);
#endif
#if JUCE_LINUX
@@ -355,7 +360,6 @@ public:
outgoingEventSize = 0;
chunkMemoryTime = 0;
isProcessing = false;
firstResize = true;
hasShutdown = false;
firstProcessCallback = true;
shouldDeleteEditor = false;
@@ -438,6 +442,18 @@ public:
void open()
{
if (editorComp == 0)
{
AudioProcessorEditor* const ed = filter->createEditorIfNeeded();
if (ed != 0)
cEffect.flags |= effFlagsHasEditor;
else
cEffect.flags &= ~effFlagsHasEditor;
delete ed;
}
startTimer (1000 / 4);
}
@@ -654,7 +670,7 @@ public:
{
if (outputs[j] == chan)
{
chan = juce_malloc (sizeof (float) * blockSize * 2);
chan = (float*) juce_malloc (sizeof (float) * blockSize * 2);
tempChannels.set (i, chan);
break;
}
@@ -1062,6 +1078,11 @@ public:
chunkMemory.setSize (0);
}
#if JUCE_MAC
if (hostWindow != 0)
checkWindowVisibility (hostWindow, editorComp);
#endif
tryMasterIdle();
}
@@ -1117,13 +1138,18 @@ public:
if (ed != 0)
{
cEffect.flags |= effFlagsHasEditor;
ed->setOpaque (true);
ed->setVisible (true);
editorComp = new EditorCompWrapper (this, ed);
}
else
{
cEffect.flags &= ~effFlagsHasEditor;
}
}
shouldDeleteEditor = false;
}
@@ -1144,7 +1170,7 @@ public:
if (modalComponent != 0)
{
modalComponent->exitModalState (0);
if (canDeleteLaterIfModal)
{
shouldDeleteEditor = true;
@@ -1152,6 +1178,11 @@ public:
}
}
#if JUCE_MAC
detachComponentFromWindowRef (editorComp, hostWindow);
hostWindow = 0;
#endif
filter->editorBeingDeleted (editorComp->getEditorComp());
deleteAndZero (editorComp);
@@ -1161,7 +1192,7 @@ public:
jassert (Component::getCurrentlyModalComponent() == 0);
}
#if JUCE_MAC || JUCE_LINUX
#if JUCE_LINUX
hostWindow = 0;
#endif
@@ -1196,59 +1227,22 @@ public:
#if JUCE_WIN32
editorComp->addToDesktop (0);
hostWindow = (HWND) ptr;
HWND editorWnd = (HWND) editorComp->getWindowHandle();
SetParent (editorWnd, hostWindow);
DWORD val = GetWindowLong (editorWnd, GWL_STYLE);
val = (val & ~WS_POPUP) | WS_CHILD;
SetWindowLong (editorWnd, GWL_STYLE, val);
editorComp->setVisible (true);
#elif JUCE_LINUX
editorComp->addToDesktop (0);
hostWindow = (Window) ptr;
Window editorWnd = (Window) editorComp->getWindowHandle();
XReparentWindow (display, editorWnd, hostWindow, 0, 0);
editorComp->setVisible (true);
#else
hostWindow = (WindowRef) ptr;
firstResize = true;
SetAutomaticControlDragTrackingEnabledForWindow (hostWindow, true);
WindowAttributes attributes;
GetWindowAttributes (hostWindow, &attributes);
HIViewRef parentView = 0;
if ((attributes & kWindowCompositingAttribute) != 0)
{
HIViewRef root = HIViewGetRoot (hostWindow);
HIViewFindByID (root, kHIViewWindowContentID, &parentView);
if (parentView == 0)
parentView = root;
}
else
{
GetRootControl (hostWindow, (ControlRef*) &parentView);
if (parentView == 0)
CreateRootControl (hostWindow, (ControlRef*) &parentView);
}
jassert (parentView != 0); // agh - the host has to provide a compositing window..
editorComp->setVisible (true);
editorComp->addToDesktop (0, (void*) parentView);
hostWindow = attachComponentToWindowRef (editorComp, (WindowRef) ptr);
#endif
editorComp->setVisible (true);
return 1;
}
@@ -1292,25 +1286,7 @@ public:
{
// some hosts don't support the sizeWindow call, so do it manually..
#if JUCE_MAC
Rect r;
GetWindowBounds (hostWindow, kWindowContentRgn, &r);
if (firstResize)
{
diffW = (r.right - r.left) - editorComp->getWidth();
diffH = (r.bottom - r.top) - editorComp->getHeight();
firstResize = false;
}
r.right = r.left + newWidth + diffW;
r.bottom = r.top + newHeight + diffH;
SetWindowBounds (hostWindow, kWindowContentRgn, &r);
r.bottom -= r.top;
r.right -= r.left;
r.left = r.top = 0;
InvalWindowRect (hostWindow, &r);
setNativeHostWindowSize (hostWindow, editorComp, newWidth, newHeight);
#elif JUCE_LINUX
Window root;
int x, y;
@@ -1394,7 +1370,6 @@ private:
VstEvents* outgoingEvents;
int outgoingEventSize;
bool isProcessing;
bool firstResize;
bool hasShutdown;
bool firstProcessCallback;
int diffW, diffH;
@@ -1452,7 +1427,7 @@ private:
}
#if JUCE_MAC
WindowRef hostWindow;
void* hostWindow;
#elif JUCE_LINUX
Window hostWindow;
#else
@@ -1497,8 +1472,6 @@ static AEffect* pluginEntryPoint (audioMasterCallback audioMaster)
juce_setCurrentExecutableFileNameFromBundleId (JucePlugin_CFBundleIdentifier);
#endif
MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (0);
try
{
if (audioMaster (0, audioMasterVersion, 0, 0, 0, 0) != 0)


+ 111
- 0
extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.mm View File

@@ -0,0 +1,111 @@
/*
==============================================================================
This file is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-7 by Raw Material Software ltd.
------------------------------------------------------------------------------
JUCE can be redistributed and/or modified under the terms of the
GNU General Public License, as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
JUCE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JUCE; if not, visit www.gnu.org/licenses or write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
------------------------------------------------------------------------------
If you'd like to release a closed-source product which uses JUCE, commercial
licenses are also available: visit www.rawmaterialsoftware.com/juce for
more information.
==============================================================================
*/
//==============================================================================
#include <Cocoa/Cocoa.h>
#include "../../../../../juce.h"
BEGIN_JUCE_NAMESPACE
void* attachComponentToWindowRef (Component* comp, void* windowRef)
{
const ScopedAutoReleasePool pool;
NSWindow* hostWindow = [[NSWindow alloc] initWithWindowRef: windowRef];
[hostWindow retain];
[hostWindow setCanHide: YES];
[hostWindow setReleasedWhenClosed: YES];
NSView* content = [hostWindow contentView];
NSRect f = [content frame];
NSPoint windowPos = [hostWindow convertBaseToScreen: f.origin];
windowPos.y = [[NSScreen mainScreen] frame].size.height - (windowPos.y + f.size.height);
comp->setTopLeftPosition ((int) windowPos.x, (int) windowPos.y);
#if ! JucePlugin_EditorRequiresKeyboardFocus
comp->addToDesktop (ComponentPeer::windowIsTemporary | ComponentPeer::windowIgnoresKeyPresses);
#else
comp->addToDesktop (ComponentPeer::windowIsTemporary);
#endif
comp->setVisible (true);
comp->toFront (false);
NSView* pluginView = (NSView*) comp->getWindowHandle();
NSWindow* pluginWindow = [pluginView window];
[pluginWindow setExcludedFromWindowsMenu: YES];
[hostWindow addChildWindow: pluginWindow
ordered: NSWindowAbove];
[hostWindow orderFront: nil];
[pluginWindow orderFront: nil];
return hostWindow;
}
void detachComponentFromWindowRef (Component* comp, void* nsWindow)
{
NSWindow* hostWindow = (NSWindow*) nsWindow;
if (hostWindow != 0)
{
const ScopedAutoReleasePool pool;
NSView* pluginView = (NSView*) comp->getWindowHandle();
NSWindow* pluginWindow = [pluginView window];
[hostWindow removeChildWindow: pluginWindow];
comp->removeFromDesktop();
[hostWindow release];
}
}
void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth, int newHeight)
{
NSWindow* hostWindow = (NSWindow*) nsWindow;
if (hostWindow != 0)
{
ScopedAutoReleasePool pool;
NSRect f = [hostWindow frame];
f.size.width += newWidth - component->getWidth();
f.size.height += newHeight - component->getHeight();
[hostWindow setFrame: f display: YES];
}
}
void checkWindowVisibility (void* nsWindow, Component* comp)
{
NSWindow* hostWindow = (NSWindow*) nsWindow;
comp->setVisible ([hostWindow isVisible]);
}
END_JUCE_NAMESPACE

+ 4
- 8
extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj View File

@@ -7,11 +7,11 @@
objects = {

/* Begin PBXBuildFile section */
84078F3E09E6B42E004E7BCD /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84078F3D09E6B42E004E7BCD /* AGL.framework */; };
8407902B09E6B5BD004E7BCD /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8407902A09E6B5BD004E7BCD /* QuickTime.framework */; };
841083D50DB36EA400AB8583 /* MainComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841083D30DB36EA400AB8583 /* MainComponent.cpp */; };
841084880DB374E700AB8583 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 841084870DB374E700AB8583 /* juce.xcconfig */; };
841136A00D0480DE0054B790 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8411369F0D0480DE0054B790 /* OpenGL.framework */; };
846EC7870EB607050080CCFF /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846EC7860EB607050080CCFF /* QTKit.framework */; };
84F30CD108FEAAA20087E26C /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F30CD008FEAAA20087E26C /* Main.cpp */; };
84F30CED08FEAD7A0087E26C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */; };
84FAD61A0C7C3CCB00AF3028 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FAD6190C7C3CCB00AF3028 /* IOKit.framework */; };
@@ -22,21 +22,19 @@
84FBB8880E06CCE900B52196 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FBB8870E06CCE900B52196 /* AudioUnit.framework */; };
84FBB88D0E06CD0100B52196 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84FBB88C0E06CD0100B52196 /* WebKit.framework */; };
8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
84078F3D09E6B42E004E7BCD /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
8407902A09E6B5BD004E7BCD /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
841083D20DB36EA400AB8583 /* includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = includes.h; path = ../common/includes.h; sourceTree = SOURCE_ROOT; };
841083D30DB36EA400AB8583 /* MainComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainComponent.cpp; path = ../common/MainComponent.cpp; sourceTree = SOURCE_ROOT; };
841083D40DB36EA400AB8583 /* MainComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainComponent.h; path = ../common/MainComponent.h; sourceTree = SOURCE_ROOT; };
841084870DB374E700AB8583 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
8411369F0D0480DE0054B790 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
846EC7860EB607050080CCFF /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
84F30CD008FEAAA20087E26C /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../common/Main.cpp; sourceTree = SOURCE_ROOT; };
84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
84FAD6190C7C3CCB00AF3028 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
@@ -56,9 +54,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */,
84F30CED08FEAD7A0087E26C /* CoreAudio.framework in Frameworks */,
84078F3E09E6B42E004E7BCD /* AGL.framework in Frameworks */,
8407902B09E6B5BD004E7BCD /* QuickTime.framework in Frameworks */,
84FAD61A0C7C3CCB00AF3028 /* IOKit.framework in Frameworks */,
841136A00D0480DE0054B790 /* OpenGL.framework in Frameworks */,
@@ -67,6 +63,7 @@
84FBB87B0E06CCC600B52196 /* DiscRecording.framework in Frameworks */,
84FBB8880E06CCE900B52196 /* AudioUnit.framework in Frameworks */,
84FBB88D0E06CD0100B52196 /* WebKit.framework in Frameworks */,
846EC7870EB607050080CCFF /* QTKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -120,13 +117,12 @@
children = (
84FBB8870E06CCE900B52196 /* AudioUnit.framework */,
84FBB8720E06CC5D00B52196 /* Cocoa.framework */,
20286C33FDCF999611CA2CEA /* Carbon.framework */,
4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */,
84F30CEC08FEAD7A0087E26C /* CoreAudio.framework */,
84FBB8760E06CCB200B52196 /* CoreMIDI.framework */,
84FBB87A0E06CCC600B52196 /* DiscRecording.framework */,
4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */,
84078F3D09E6B42E004E7BCD /* AGL.framework */,
846EC7860EB607050080CCFF /* QTKit.framework */,
8407902A09E6B5BD004E7BCD /* QuickTime.framework */,
84FAD6190C7C3CCB00AF3028 /* IOKit.framework */,
8411369F0D0480DE0054B790 /* OpenGL.framework */,


+ 21
- 21
extras/juce demo/build/linux/JuceDemo.make View File

@@ -36,21 +36,21 @@ ifeq ($(CONFIG),Release)
endif

OBJECTS := \
$(OBJDIR)/MainDemoWindow.o \
$(OBJDIR)/ApplicationStartup.o \
$(OBJDIR)/BinaryData.o \
$(OBJDIR)/juce_LibrarySource.o \
$(OBJDIR)/MainDemoWindow.o \
$(OBJDIR)/AudioDemo.o \
$(OBJDIR)/BinaryData.o \
$(OBJDIR)/PathsAndTransformsDemo.o \
$(OBJDIR)/DragAndDropDemo.o \
$(OBJDIR)/FontsAndTextDemo.o \
$(OBJDIR)/InterprocessCommsDemo.o \
$(OBJDIR)/ThreadingDemo.o \
$(OBJDIR)/OpenGLDemo.o \
$(OBJDIR)/PathsAndTransformsDemo.o \
$(OBJDIR)/WidgetsDemo.o \
$(OBJDIR)/TreeViewDemo.o \
$(OBJDIR)/QuickTimeDemo.o \
$(OBJDIR)/InterprocessCommsDemo.o \
$(OBJDIR)/AudioDemo.o \
$(OBJDIR)/FontsAndTextDemo.o \
$(OBJDIR)/TableDemo.o \
$(OBJDIR)/ThreadingDemo.o \
$(OBJDIR)/TreeViewDemo.o \
$(OBJDIR)/WidgetsDemo.o \

MKDIR_TYPE := msdos
CMD := $(subst \,\\,$(ComSpec)$(COMSPEC))
@@ -91,12 +91,12 @@ else
-@if exist $(subst /,\,$(OBJDIR)) rmdir /s /q $(subst /,\,$(OBJDIR))
endif

$(OBJDIR)/ApplicationStartup.o: ../../src/ApplicationStartup.cpp
$(OBJDIR)/MainDemoWindow.o: ../../src/MainDemoWindow.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/BinaryData.o: ../../src/BinaryData.cpp
$(OBJDIR)/ApplicationStartup.o: ../../src/ApplicationStartup.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<
@@ -106,12 +106,12 @@ $(OBJDIR)/juce_LibrarySource.o: ../../src/juce_LibrarySource.cpp
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/MainDemoWindow.o: ../../src/MainDemoWindow.cpp
$(OBJDIR)/BinaryData.o: ../../src/BinaryData.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/AudioDemo.o: ../../src/demos/AudioDemo.cpp
$(OBJDIR)/PathsAndTransformsDemo.o: ../../src/demos/PathsAndTransformsDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<
@@ -121,22 +121,22 @@ $(OBJDIR)/DragAndDropDemo.o: ../../src/demos/DragAndDropDemo.cpp
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/FontsAndTextDemo.o: ../../src/demos/FontsAndTextDemo.cpp
$(OBJDIR)/ThreadingDemo.o: ../../src/demos/ThreadingDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/InterprocessCommsDemo.o: ../../src/demos/InterprocessCommsDemo.cpp
$(OBJDIR)/OpenGLDemo.o: ../../src/demos/OpenGLDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/OpenGLDemo.o: ../../src/demos/OpenGLDemo.cpp
$(OBJDIR)/WidgetsDemo.o: ../../src/demos/WidgetsDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/PathsAndTransformsDemo.o: ../../src/demos/PathsAndTransformsDemo.cpp
$(OBJDIR)/TreeViewDemo.o: ../../src/demos/TreeViewDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<
@@ -146,22 +146,22 @@ $(OBJDIR)/QuickTimeDemo.o: ../../src/demos/QuickTimeDemo.cpp
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/TableDemo.o: ../../src/demos/TableDemo.cpp
$(OBJDIR)/InterprocessCommsDemo.o: ../../src/demos/InterprocessCommsDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/ThreadingDemo.o: ../../src/demos/ThreadingDemo.cpp
$(OBJDIR)/AudioDemo.o: ../../src/demos/AudioDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/TreeViewDemo.o: ../../src/demos/TreeViewDemo.cpp
$(OBJDIR)/FontsAndTextDemo.o: ../../src/demos/FontsAndTextDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<

$(OBJDIR)/WidgetsDemo.o: ../../src/demos/WidgetsDemo.cpp
$(OBJDIR)/TableDemo.o: ../../src/demos/TableDemo.cpp
-@$(CMD_MKOBJDIR)
@echo $(notdir $<)
@$(CXX) $(CXXFLAGS) -o $@ -c $<


+ 11
- 7
extras/juce demo/build/macosx/Info.plist View File

@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>jucedemo</string>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.apple.myCarbonNibApp</string>
<key>CFBundleIdentifier</key>
<string>com.rawmaterialsoftware.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>CSResourcesFileMapped</key>
<true/>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

+ 180
- 251
extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj View File

@@ -3,231 +3,180 @@
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objectVersion = 45;
objects = {

/* Begin PBXBuildFile section */
8417EE7A0A6E7EB90058E04E /* TableDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8417EE790A6E7EB90058E04E /* TableDemo.cpp */; };
842A97B8081060FB0059DBCC /* DragAndDropDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 842A97B6081060FB0059DBCC /* DragAndDropDemo.cpp */; };
842A97B9081060FB0059DBCC /* OpenGLDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 842A97B7081060FB0059DBCC /* OpenGLDemo.cpp */; };
846929270A49DDE100314975 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 846929260A49DDE100314975 /* juce.xcconfig */; };
846C10970DE32E6E00E8CCE8 /* juce_AppConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 846C10960DE32E6D00E8CCE8 /* juce_AppConfig.h */; };
846C10B20DE32EB500E8CCE8 /* juce_LibrarySource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 846C10B10DE32EB500E8CCE8 /* juce_LibrarySource.mm */; };
8480BC1C0DE0BB8200478E44 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC0E0DE0BB8200478E44 /* AGL.framework */; };
8480BC1D0DE0BB8200478E44 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC0F0DE0BB8200478E44 /* AudioUnit.framework */; };
8480BC1E0DE0BB8200478E44 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC100DE0BB8200478E44 /* IOKit.framework */; };
8480BC1F0DE0BB8200478E44 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC110DE0BB8200478E44 /* Cocoa.framework */; };
8480BC200DE0BB8200478E44 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC120DE0BB8200478E44 /* CoreAudio.framework */; };
8480BC210DE0BB8200478E44 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC130DE0BB8200478E44 /* CoreFoundation.framework */; };
8480BC220DE0BB8200478E44 /* CoreMIDI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC140DE0BB8200478E44 /* CoreMIDI.framework */; };
8480BC230DE0BB8200478E44 /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC150DE0BB8200478E44 /* DiscRecording.framework */; };
8480BC240DE0BB8200478E44 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC160DE0BB8200478E44 /* OpenGL.framework */; };
8480BC250DE0BB8200478E44 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC170DE0BB8200478E44 /* QuickTime.framework */; };
8480BC260DE0BB8200478E44 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC180DE0BB8200478E44 /* WebKit.framework */; };
8480BC270DE0BB8200478E44 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC190DE0BB8200478E44 /* Carbon.framework */; };
8480BC280DE0BB8200478E44 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC1A0DE0BB8200478E44 /* CoreServices.framework */; };
8480BC290DE0BB8200478E44 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8480BC1B0DE0BB8200478E44 /* ApplicationServices.framework */; };
849E1BF706C15C330002E024 /* BinaryData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 849E1BF506C15C330002E024 /* BinaryData.cpp */; };
849E1BF806C15C330002E024 /* BinaryData.h in Headers */ = {isa = PBXBuildFile; fileRef = 849E1BF606C15C330002E024 /* BinaryData.h */; };
84A06BA809CAD661006A43BD /* InterprocessCommsDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A06BA709CAD661006A43BD /* InterprocessCommsDemo.cpp */; };
84C49E5506C0EE8C0066071B /* ApplicationStartup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E4A06C0EE8C0066071B /* ApplicationStartup.cpp */; };
84C49E5606C0EE8C0066071B /* AudioDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E4C06C0EE8C0066071B /* AudioDemo.cpp */; };
84C49E5706C0EE8C0066071B /* FontsAndTextDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E4D06C0EE8C0066071B /* FontsAndTextDemo.cpp */; };
84C49E5806C0EE8C0066071B /* PathsAndTransformsDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E4E06C0EE8C0066071B /* PathsAndTransformsDemo.cpp */; };
84C49E5906C0EE8C0066071B /* ThreadingDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E4F06C0EE8C0066071B /* ThreadingDemo.cpp */; };
84C49E5A06C0EE8C0066071B /* TreeViewDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E5006C0EE8C0066071B /* TreeViewDemo.cpp */; };
84C49E5B06C0EE8C0066071B /* WidgetsDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E5106C0EE8C0066071B /* WidgetsDemo.cpp */; };
84C49E5C06C0EE8C0066071B /* jucedemo_headers.h in Headers */ = {isa = PBXBuildFile; fileRef = 84C49E5206C0EE8C0066071B /* jucedemo_headers.h */; };
84C49E5D06C0EE8C0066071B /* MainDemoWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84C49E5306C0EE8C0066071B /* MainDemoWindow.cpp */; };
84C49E5E06C0EE8C0066071B /* MainDemoWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 84C49E5406C0EE8C0066071B /* MainDemoWindow.h */; };
84F8DB0B099CA8DD00E911ED /* QuickTimeDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F8DB0A099CA8DD00E911ED /* QuickTimeDemo.cpp */; };
8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
841FE43C0E8ABDD4003C3263 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FE4360E8ABDD4003C3263 /* CoreAudio.framework */; };
841FE43D0E8ABDD4003C3263 /* CoreMIDI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FE4370E8ABDD4003C3263 /* CoreMIDI.framework */; };
841FE43E0E8ABDD4003C3263 /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FE4380E8ABDD4003C3263 /* DiscRecording.framework */; };
841FE43F0E8ABDD4003C3263 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FE4390E8ABDD4003C3263 /* IOKit.framework */; };
841FE4400E8ABDD4003C3263 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FE43A0E8ABDD4003C3263 /* OpenGL.framework */; };
841FE4410E8ABDD4003C3263 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 841FE43B0E8ABDD4003C3263 /* WebKit.framework */; };
8450577A0EB52CE500029DFF /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845057790EB52CE500029DFF /* QuickTime.framework */; };
847F4D900E8AC35C00F64426 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 847F4D8F0E8AC35C00F64426 /* QTKit.framework */; };
847F4EA50E8BA9C300F64426 /* AudioDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4E9A0E8BA9C300F64426 /* AudioDemo.cpp */; };
847F4EA60E8BA9C300F64426 /* DragAndDropDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4E9B0E8BA9C300F64426 /* DragAndDropDemo.cpp */; };
847F4EA70E8BA9C300F64426 /* FontsAndTextDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4E9C0E8BA9C300F64426 /* FontsAndTextDemo.cpp */; };
847F4EA80E8BA9C300F64426 /* InterprocessCommsDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4E9D0E8BA9C300F64426 /* InterprocessCommsDemo.cpp */; };
847F4EA90E8BA9C300F64426 /* OpenGLDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4E9E0E8BA9C300F64426 /* OpenGLDemo.cpp */; };
847F4EAA0E8BA9C300F64426 /* PathsAndTransformsDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4E9F0E8BA9C300F64426 /* PathsAndTransformsDemo.cpp */; };
847F4EAB0E8BA9C300F64426 /* QuickTimeDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EA00E8BA9C300F64426 /* QuickTimeDemo.cpp */; };
847F4EAC0E8BA9C300F64426 /* TableDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EA10E8BA9C300F64426 /* TableDemo.cpp */; };
847F4EAD0E8BA9C300F64426 /* ThreadingDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EA20E8BA9C300F64426 /* ThreadingDemo.cpp */; };
847F4EAE0E8BA9C300F64426 /* TreeViewDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EA30E8BA9C300F64426 /* TreeViewDemo.cpp */; };
847F4EAF0E8BA9C300F64426 /* WidgetsDemo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EA40E8BA9C300F64426 /* WidgetsDemo.cpp */; };
847F4EB80E8BA9DD00F64426 /* ApplicationStartup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EB00E8BA9DD00F64426 /* ApplicationStartup.cpp */; };
847F4EB90E8BA9DD00F64426 /* BinaryData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EB10E8BA9DD00F64426 /* BinaryData.cpp */; };
847F4EBA0E8BA9DD00F64426 /* juce_LibrarySource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EB40E8BA9DD00F64426 /* juce_LibrarySource.mm */; };
847F4EBB0E8BA9DD00F64426 /* MainDemoWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847F4EB60E8BA9DD00F64426 /* MainDemoWindow.cpp */; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
8417EE790A6E7EB90058E04E /* TableDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TableDemo.cpp; sourceTree = "<group>"; };
842A97B6081060FB0059DBCC /* DragAndDropDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DragAndDropDemo.cpp; sourceTree = "<group>"; };
842A97B7081060FB0059DBCC /* OpenGLDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLDemo.cpp; sourceTree = "<group>"; };
846929260A49DDE100314975 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
846C10960DE32E6D00E8CCE8 /* juce_AppConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = juce_AppConfig.h; path = ../../src/juce_AppConfig.h; sourceTree = SOURCE_ROOT; };
846C10B10DE32EB500E8CCE8 /* juce_LibrarySource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_LibrarySource.mm; path = ../../src/juce_LibrarySource.mm; sourceTree = SOURCE_ROOT; };
8480BC0E0DE0BB8200478E44 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
8480BC0F0DE0BB8200478E44 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
8480BC100DE0BB8200478E44 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
8480BC110DE0BB8200478E44 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
8480BC120DE0BB8200478E44 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
8480BC130DE0BB8200478E44 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
8480BC140DE0BB8200478E44 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = "<absolute>"; };
8480BC150DE0BB8200478E44 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
8480BC160DE0BB8200478E44 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
8480BC170DE0BB8200478E44 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
8480BC180DE0BB8200478E44 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
8480BC190DE0BB8200478E44 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
8480BC1A0DE0BB8200478E44 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
8480BC1B0DE0BB8200478E44 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
849E1BF506C15C330002E024 /* BinaryData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../src/BinaryData.cpp; sourceTree = SOURCE_ROOT; };
849E1BF606C15C330002E024 /* BinaryData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../src/BinaryData.h; sourceTree = SOURCE_ROOT; };
84A06BA709CAD661006A43BD /* InterprocessCommsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InterprocessCommsDemo.cpp; sourceTree = "<group>"; };
84C49E4A06C0EE8C0066071B /* ApplicationStartup.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ApplicationStartup.cpp; path = ../../src/ApplicationStartup.cpp; sourceTree = SOURCE_ROOT; };
84C49E4C06C0EE8C0066071B /* AudioDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AudioDemo.cpp; sourceTree = "<group>"; };
84C49E4D06C0EE8C0066071B /* FontsAndTextDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontsAndTextDemo.cpp; sourceTree = "<group>"; };
84C49E4E06C0EE8C0066071B /* PathsAndTransformsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PathsAndTransformsDemo.cpp; sourceTree = "<group>"; };
84C49E4F06C0EE8C0066071B /* ThreadingDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadingDemo.cpp; sourceTree = "<group>"; };
84C49E5006C0EE8C0066071B /* TreeViewDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TreeViewDemo.cpp; sourceTree = "<group>"; };
84C49E5106C0EE8C0066071B /* WidgetsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = WidgetsDemo.cpp; sourceTree = "<group>"; };
84C49E5206C0EE8C0066071B /* jucedemo_headers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = jucedemo_headers.h; path = ../../src/jucedemo_headers.h; sourceTree = SOURCE_ROOT; };
84C49E5306C0EE8C0066071B /* MainDemoWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MainDemoWindow.cpp; path = ../../src/MainDemoWindow.cpp; sourceTree = SOURCE_ROOT; };
84C49E5406C0EE8C0066071B /* MainDemoWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MainDemoWindow.h; path = ../../src/MainDemoWindow.h; sourceTree = SOURCE_ROOT; };
84F8DB0A099CA8DD00E911ED /* QuickTimeDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = QuickTimeDemo.cpp; sourceTree = "<group>"; };
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D0C4E970486CD37000505A6 /* jucedemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = jucedemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
841FE4360E8ABDD4003C3263 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
841FE4370E8ABDD4003C3263 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = "<absolute>"; };
841FE4380E8ABDD4003C3263 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
841FE4390E8ABDD4003C3263 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
841FE43A0E8ABDD4003C3263 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
841FE43B0E8ABDD4003C3263 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
845057790EB52CE500029DFF /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
847F4D8F0E8AC35C00F64426 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
847F4E9A0E8BA9C300F64426 /* AudioDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioDemo.cpp; path = ../../src/demos/AudioDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4E9B0E8BA9C300F64426 /* DragAndDropDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DragAndDropDemo.cpp; path = ../../src/demos/DragAndDropDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4E9C0E8BA9C300F64426 /* FontsAndTextDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FontsAndTextDemo.cpp; path = ../../src/demos/FontsAndTextDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4E9D0E8BA9C300F64426 /* InterprocessCommsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InterprocessCommsDemo.cpp; path = ../../src/demos/InterprocessCommsDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4E9E0E8BA9C300F64426 /* OpenGLDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OpenGLDemo.cpp; path = ../../src/demos/OpenGLDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4E9F0E8BA9C300F64426 /* PathsAndTransformsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathsAndTransformsDemo.cpp; path = ../../src/demos/PathsAndTransformsDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4EA00E8BA9C300F64426 /* QuickTimeDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QuickTimeDemo.cpp; path = ../../src/demos/QuickTimeDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4EA10E8BA9C300F64426 /* TableDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TableDemo.cpp; path = ../../src/demos/TableDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4EA20E8BA9C300F64426 /* ThreadingDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadingDemo.cpp; path = ../../src/demos/ThreadingDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4EA30E8BA9C300F64426 /* TreeViewDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TreeViewDemo.cpp; path = ../../src/demos/TreeViewDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4EA40E8BA9C300F64426 /* WidgetsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WidgetsDemo.cpp; path = ../../src/demos/WidgetsDemo.cpp; sourceTree = SOURCE_ROOT; };
847F4EB00E8BA9DD00F64426 /* ApplicationStartup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ApplicationStartup.cpp; path = ../../src/ApplicationStartup.cpp; sourceTree = SOURCE_ROOT; };
847F4EB10E8BA9DD00F64426 /* BinaryData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BinaryData.cpp; path = ../../src/BinaryData.cpp; sourceTree = SOURCE_ROOT; };
847F4EB20E8BA9DD00F64426 /* BinaryData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BinaryData.h; path = ../../src/BinaryData.h; sourceTree = SOURCE_ROOT; };
847F4EB30E8BA9DD00F64426 /* juce_AppConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = juce_AppConfig.h; path = ../../src/juce_AppConfig.h; sourceTree = SOURCE_ROOT; };
847F4EB40E8BA9DD00F64426 /* juce_LibrarySource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_LibrarySource.mm; path = ../../src/juce_LibrarySource.mm; sourceTree = SOURCE_ROOT; };
847F4EB50E8BA9DD00F64426 /* jucedemo_headers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jucedemo_headers.h; path = ../../src/jucedemo_headers.h; sourceTree = SOURCE_ROOT; };
847F4EB60E8BA9DD00F64426 /* MainDemoWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainDemoWindow.cpp; path = ../../src/MainDemoWindow.cpp; sourceTree = SOURCE_ROOT; };
847F4EB70E8BA9DD00F64426 /* MainDemoWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainDemoWindow.h; path = ../../src/MainDemoWindow.h; sourceTree = SOURCE_ROOT; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* jucedemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = jucedemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
8D0C4E910486CD37000505A6 /* Frameworks */ = {
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8480BC1C0DE0BB8200478E44 /* AGL.framework in Frameworks */,
8480BC1D0DE0BB8200478E44 /* AudioUnit.framework in Frameworks */,
8480BC1E0DE0BB8200478E44 /* IOKit.framework in Frameworks */,
8480BC1F0DE0BB8200478E44 /* Cocoa.framework in Frameworks */,
8480BC200DE0BB8200478E44 /* CoreAudio.framework in Frameworks */,
8480BC210DE0BB8200478E44 /* CoreFoundation.framework in Frameworks */,
8480BC220DE0BB8200478E44 /* CoreMIDI.framework in Frameworks */,
8480BC230DE0BB8200478E44 /* DiscRecording.framework in Frameworks */,
8480BC240DE0BB8200478E44 /* OpenGL.framework in Frameworks */,
8480BC250DE0BB8200478E44 /* QuickTime.framework in Frameworks */,
8480BC260DE0BB8200478E44 /* WebKit.framework in Frameworks */,
8480BC270DE0BB8200478E44 /* Carbon.framework in Frameworks */,
8480BC280DE0BB8200478E44 /* CoreServices.framework in Frameworks */,
8480BC290DE0BB8200478E44 /* ApplicationServices.framework in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
841FE43C0E8ABDD4003C3263 /* CoreAudio.framework in Frameworks */,
841FE43D0E8ABDD4003C3263 /* CoreMIDI.framework in Frameworks */,
841FE43E0E8ABDD4003C3263 /* DiscRecording.framework in Frameworks */,
841FE43F0E8ABDD4003C3263 /* IOKit.framework in Frameworks */,
841FE4400E8ABDD4003C3263 /* OpenGL.framework in Frameworks */,
841FE4410E8ABDD4003C3263 /* WebKit.framework in Frameworks */,
847F4D900E8AC35C00F64426 /* QTKit.framework in Frameworks */,
8450577A0EB52CE500029DFF /* QuickTime.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
195DF8CFFE9D517E11CA2CBB /* Products */ = {
080E96DDFE201D6D7F000001 /* Source */ = {
isa = PBXGroup;
children = (
8D0C4E970486CD37000505A6 /* jucedemo.app */,
847F4EB00E8BA9DD00F64426 /* ApplicationStartup.cpp */,
847F4EB10E8BA9DD00F64426 /* BinaryData.cpp */,
847F4EB20E8BA9DD00F64426 /* BinaryData.h */,
847F4EB30E8BA9DD00F64426 /* juce_AppConfig.h */,
847F4EB40E8BA9DD00F64426 /* juce_LibrarySource.mm */,
847F4EB50E8BA9DD00F64426 /* jucedemo_headers.h */,
847F4EB60E8BA9DD00F64426 /* MainDemoWindow.cpp */,
847F4EB70E8BA9DD00F64426 /* MainDemoWindow.h */,
847F4D8A0E8AC27A00F64426 /* demos */,
);
name = Products;
name = Source;
sourceTree = "<group>";
};
20286C29FDCF999611CA2CEA /* jucedemo */ = {
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
20286C2AFDCF999611CA2CEA /* Sources */,
841084950DB3759400AB8583 /* Build settings */,
20286C2CFDCF999611CA2CEA /* Resources */,
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
195DF8CFFE9D517E11CA2CBB /* Products */,
8D1107320486CEB800E47090 /* jucedemo.app */,
);
name = jucedemo;
name = Products;
sourceTree = "<group>";
};
20286C2AFDCF999611CA2CEA /* Sources */ = {
29B97314FDCFA39411CA2CEA /* jucedemo */ = {
isa = PBXGroup;
children = (
84C49E4B06C0EE8C0066071B /* demos */,
84C49E4A06C0EE8C0066071B /* ApplicationStartup.cpp */,
84C49E5306C0EE8C0066071B /* MainDemoWindow.cpp */,
84C49E5406C0EE8C0066071B /* MainDemoWindow.h */,
849E1BF506C15C330002E024 /* BinaryData.cpp */,
849E1BF606C15C330002E024 /* BinaryData.h */,
84C49E5206C0EE8C0066071B /* jucedemo_headers.h */,
846C10960DE32E6D00E8CCE8 /* juce_AppConfig.h */,
846C10B10DE32EB500E8CCE8 /* juce_LibrarySource.mm */,
080E96DDFE201D6D7F000001 /* Source */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = Sources;
name = jucedemo;
sourceTree = "<group>";
};
20286C2CFDCF999611CA2CEA /* Resources */ = {
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
8D0C4E960486CD37000505A6 /* Info.plist */,
0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */,
8D1107310486CEB800E47090 /* Info.plist */,
);
name = Resources;
sourceTree = "<group>";
};
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
8480BC0E0DE0BB8200478E44 /* AGL.framework */,
8480BC1B0DE0BB8200478E44 /* ApplicationServices.framework */,
8480BC0F0DE0BB8200478E44 /* AudioUnit.framework */,
8480BC190DE0BB8200478E44 /* Carbon.framework */,
8480BC110DE0BB8200478E44 /* Cocoa.framework */,
8480BC120DE0BB8200478E44 /* CoreAudio.framework */,
8480BC130DE0BB8200478E44 /* CoreFoundation.framework */,
8480BC140DE0BB8200478E44 /* CoreMIDI.framework */,
8480BC1A0DE0BB8200478E44 /* CoreServices.framework */,
8480BC150DE0BB8200478E44 /* DiscRecording.framework */,
8480BC100DE0BB8200478E44 /* IOKit.framework */,
8480BC160DE0BB8200478E44 /* OpenGL.framework */,
8480BC170DE0BB8200478E44 /* QuickTime.framework */,
8480BC180DE0BB8200478E44 /* WebKit.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
841084950DB3759400AB8583 /* Build settings */ = {
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
846929260A49DDE100314975 /* juce.xcconfig */,
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
841FE4360E8ABDD4003C3263 /* CoreAudio.framework */,
841FE4370E8ABDD4003C3263 /* CoreMIDI.framework */,
841FE4380E8ABDD4003C3263 /* DiscRecording.framework */,
841FE4390E8ABDD4003C3263 /* IOKit.framework */,
841FE43A0E8ABDD4003C3263 /* OpenGL.framework */,
847F4D8F0E8AC35C00F64426 /* QTKit.framework */,
845057790EB52CE500029DFF /* QuickTime.framework */,
841FE43B0E8ABDD4003C3263 /* WebKit.framework */,
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
);
name = "Build settings";
name = Frameworks;
sourceTree = "<group>";
};
84C49E4B06C0EE8C0066071B /* demos */ = {
847F4D8A0E8AC27A00F64426 /* demos */ = {
isa = PBXGroup;
children = (
842A97B6081060FB0059DBCC /* DragAndDropDemo.cpp */,
842A97B7081060FB0059DBCC /* OpenGLDemo.cpp */,
84C49E4C06C0EE8C0066071B /* AudioDemo.cpp */,
84C49E4D06C0EE8C0066071B /* FontsAndTextDemo.cpp */,
84C49E4E06C0EE8C0066071B /* PathsAndTransformsDemo.cpp */,
84F8DB0A099CA8DD00E911ED /* QuickTimeDemo.cpp */,
8417EE790A6E7EB90058E04E /* TableDemo.cpp */,
84C49E4F06C0EE8C0066071B /* ThreadingDemo.cpp */,
84C49E5006C0EE8C0066071B /* TreeViewDemo.cpp */,
84C49E5106C0EE8C0066071B /* WidgetsDemo.cpp */,
84A06BA709CAD661006A43BD /* InterprocessCommsDemo.cpp */,
847F4E9A0E8BA9C300F64426 /* AudioDemo.cpp */,
847F4E9B0E8BA9C300F64426 /* DragAndDropDemo.cpp */,
847F4E9C0E8BA9C300F64426 /* FontsAndTextDemo.cpp */,
847F4E9D0E8BA9C300F64426 /* InterprocessCommsDemo.cpp */,
847F4E9E0E8BA9C300F64426 /* OpenGLDemo.cpp */,
847F4E9F0E8BA9C300F64426 /* PathsAndTransformsDemo.cpp */,
847F4EA00E8BA9C300F64426 /* QuickTimeDemo.cpp */,
847F4EA10E8BA9C300F64426 /* TableDemo.cpp */,
847F4EA20E8BA9C300F64426 /* ThreadingDemo.cpp */,
847F4EA30E8BA9C300F64426 /* TreeViewDemo.cpp */,
847F4EA40E8BA9C300F64426 /* WidgetsDemo.cpp */,
);
name = demos;
path = ../../src/demos;
sourceTree = SOURCE_ROOT;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
8D0C4E8A0486CD37000505A6 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
84C49E5C06C0EE8C0066071B /* jucedemo_headers.h in Headers */,
84C49E5E06C0EE8C0066071B /* MainDemoWindow.h in Headers */,
849E1BF806C15C330002E024 /* BinaryData.h in Headers */,
846C10970DE32E6E00E8CCE8 /* juce_AppConfig.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
8D0C4E890486CD37000505A6 /* jucedemo */ = {
8D1107260486CEB800E47090 /* jucedemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 84CFBCCB085F14F000C52F85 /* Build configuration list for PBXNativeTarget "jucedemo" */;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "jucedemo" */;
buildPhases = (
8D0C4E8A0486CD37000505A6 /* Headers */,
8D0C4E8C0486CD37000505A6 /* Resources */,
8D0C4E8F0486CD37000505A6 /* Sources */,
8D0C4E910486CD37000505A6 /* Frameworks */,
8D0C4E940486CD37000505A6 /* Rez */,
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
);
buildRules = (
);
@@ -236,157 +185,137 @@
name = jucedemo;
productInstallPath = "$(HOME)/Applications";
productName = jucedemo;
productReference = 8D0C4E970486CD37000505A6 /* jucedemo.app */;
productReference = 8D1107320486CEB800E47090 /* jucedemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
20286C28FDCF999611CA2CEA /* Project object */ = {
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 84CFBCCF085F14F000C52F85 /* Build configuration list for PBXProject "jucedemo" */;
compatibilityVersion = "Xcode 2.4";
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "jucedemo" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 20286C29FDCF999611CA2CEA /* jucedemo */;
mainGroup = 29B97314FDCFA39411CA2CEA /* jucedemo */;
projectDirPath = "";
projectRoot = "";
targets = (
8D0C4E890486CD37000505A6 /* jucedemo */,
8D1107260486CEB800E47090 /* jucedemo */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
8D0C4E8C0486CD37000505A6 /* Resources */ = {
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */,
846929270A49DDE100314975 /* juce.xcconfig in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXRezBuildPhase section */
8D0C4E940486CD37000505A6 /* Rez */ = {
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXRezBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
8D0C4E8F0486CD37000505A6 /* Sources */ = {
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
84C49E5506C0EE8C0066071B /* ApplicationStartup.cpp in Sources */,
84C49E5606C0EE8C0066071B /* AudioDemo.cpp in Sources */,
84C49E5706C0EE8C0066071B /* FontsAndTextDemo.cpp in Sources */,
84C49E5806C0EE8C0066071B /* PathsAndTransformsDemo.cpp in Sources */,
84C49E5906C0EE8C0066071B /* ThreadingDemo.cpp in Sources */,
84C49E5A06C0EE8C0066071B /* TreeViewDemo.cpp in Sources */,
84C49E5B06C0EE8C0066071B /* WidgetsDemo.cpp in Sources */,
84C49E5D06C0EE8C0066071B /* MainDemoWindow.cpp in Sources */,
849E1BF706C15C330002E024 /* BinaryData.cpp in Sources */,
842A97B8081060FB0059DBCC /* DragAndDropDemo.cpp in Sources */,
842A97B9081060FB0059DBCC /* OpenGLDemo.cpp in Sources */,
84F8DB0B099CA8DD00E911ED /* QuickTimeDemo.cpp in Sources */,
84A06BA809CAD661006A43BD /* InterprocessCommsDemo.cpp in Sources */,
8417EE7A0A6E7EB90058E04E /* TableDemo.cpp in Sources */,
846C10B20DE32EB500E8CCE8 /* juce_LibrarySource.mm in Sources */,
847F4EA50E8BA9C300F64426 /* AudioDemo.cpp in Sources */,
847F4EA60E8BA9C300F64426 /* DragAndDropDemo.cpp in Sources */,
847F4EA70E8BA9C300F64426 /* FontsAndTextDemo.cpp in Sources */,
847F4EA80E8BA9C300F64426 /* InterprocessCommsDemo.cpp in Sources */,
847F4EA90E8BA9C300F64426 /* OpenGLDemo.cpp in Sources */,
847F4EAA0E8BA9C300F64426 /* PathsAndTransformsDemo.cpp in Sources */,
847F4EAB0E8BA9C300F64426 /* QuickTimeDemo.cpp in Sources */,
847F4EAC0E8BA9C300F64426 /* TableDemo.cpp in Sources */,
847F4EAD0E8BA9C300F64426 /* ThreadingDemo.cpp in Sources */,
847F4EAE0E8BA9C300F64426 /* TreeViewDemo.cpp in Sources */,
847F4EAF0E8BA9C300F64426 /* WidgetsDemo.cpp in Sources */,
847F4EB80E8BA9DD00F64426 /* ApplicationStartup.cpp in Sources */,
847F4EB90E8BA9DD00F64426 /* BinaryData.cpp in Sources */,
847F4EBA0E8BA9DD00F64426 /* juce_LibrarySource.mm in Sources */,
847F4EBB0E8BA9DD00F64426 /* MainDemoWindow.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
0867D6ABFE840B52C02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
84CFBCCC085F14F000C52F85 /* Debug */ = {
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"_DEBUG=1",
"DEBUG=1",
);
HEADER_SEARCH_PATHS = "$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INFOPLIST_FILE = Info.plist;
LIBRARY_SEARCH_PATHS = ../../../../bin;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = jucedemo;
WRAPPER_EXTENSION = app;
};
name = Debug;
};
84CFBCCD085F14F000C52F85 /* Release */ = {
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
DEAD_CODE_STRIPPING = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"_NDEBUG=1",
"NDEBUG=1",
);
HEADER_SEARCH_PATHS = "$(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon";
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
INFOPLIST_FILE = Info.plist;
ONLY_LINK_ESSENTIAL_SYMBOLS = YES;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = jucedemo;
WRAPPER_EXTENSION = app;
ZERO_LINK = NO;
};
name = Release;
};
84CFBCD0085F14F000C52F85 /* Debug */ = {
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 846929260A49DDE100314975 /* juce.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.4;
};
name = Debug;
};
84CFBCD1085F14F000C52F85 /* Release */ = {
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 846929260A49DDE100314975 /* juce.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx10.4;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
84CFBCCB085F14F000C52F85 /* Build configuration list for PBXNativeTarget "jucedemo" */ = {
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "jucedemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
84CFBCCC085F14F000C52F85 /* Debug */,
84CFBCCD085F14F000C52F85 /* Release */,
C01FCF4B08A954540054247B /* Debug */,
C01FCF4C08A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
defaultConfigurationName = Release;
};
84CFBCCF085F14F000C52F85 /* Build configuration list for PBXProject "jucedemo" */ = {
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "jucedemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
84CFBCD0085F14F000C52F85 /* Debug */,
84CFBCD1085F14F000C52F85 /* Release */,
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 20286C28FDCF999611CA2CEA /* Project object */;
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

+ 3
- 0
extras/juce demo/build/win32_vc8/jucedemo.sln View File

@@ -2,6 +2,9 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jucedemo", "jucedemo.vcproj", "{050D65C2-17C4-4EE1-ABCE-BEA9DA83D77A}"
ProjectSection(ProjectDependencies) = postProject
{AE232C11-D91C-4CA1-B24E-8B11A52EFF26} = {AE232C11-D91C-4CA1-B24E-8B11A52EFF26}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JUCE", "..\..\..\..\build\win32\vc8\JUCE.vcproj", "{AE232C11-D91C-4CA1-B24E-8B11A52EFF26}"
EndProject


+ 7431
- 7434
extras/juce demo/src/BinaryData.cpp
File diff suppressed because it is too large
View File


+ 30
- 30
extras/juce demo/src/BinaryData.h View File

@@ -5,57 +5,57 @@
namespace BinaryData
{
extern const char* audiodemo_cpp;
const int audiodemo_cppSize = 23584;
extern const char* pathsandtransformsdemo_cpp;
const int pathsandtransformsdemo_cppSize = 14231;
extern const char* cello_wav;
const int cello_wavSize = 46348;
extern const char* opengldemo_cpp;
const int opengldemo_cppSize = 9575;
extern const char* demo_table_data_xml;
const int demo_table_data_xmlSize = 5239;
extern const char* draganddropdemo_cpp;
const int draganddropdemo_cppSize = 7937;
extern const char* fontsandtextdemo_cpp;
const int fontsandtextdemo_cppSize = 9064;
extern const char* tabledemo_cpp;
const int tabledemo_cppSize = 12381;
extern const char* icons_zip;
const int icons_zipSize = 83876;
extern const char* cello_wav;
const int cello_wavSize = 46348;
extern const char* interprocesscommsdemo_cpp;
const int interprocesscommsdemo_cppSize = 12631;
extern const char* draganddropdemo_cpp;
const int draganddropdemo_cppSize = 7937;
extern const char* juce_png;
const int juce_pngSize = 15290;
extern const char* readme__what_this_directory_is_for_txt;
const int readme__what_this_directory_is_for_txtSize = 259;
extern const char* opengldemo_cpp;
const int opengldemo_cppSize = 9667;
extern const char* treeviewdemo_cpp;
const int treeviewdemo_cppSize = 7715;
extern const char* pathsandtransformsdemo_cpp;
const int pathsandtransformsdemo_cppSize = 14231;
extern const char* treedemo_xml;
const int treedemo_xmlSize = 1126;
extern const char* quicktimedemo_cpp;
const int quicktimedemo_cppSize = 4576;
extern const char* readme__what_this_directory_is_for_txt;
const int readme__what_this_directory_is_for_txtSize = 259;
extern const char* tabledemo_cpp;
const int tabledemo_cppSize = 12381;
extern const char* audiodemo_cpp;
const int audiodemo_cppSize = 23584;
extern const char* threadingdemo_cpp;
const int threadingdemo_cppSize = 10047;
extern const char* treedemo_xml;
const int treedemo_xmlSize = 1126;
const int threadingdemo_cppSize = 10049;
extern const char* treeviewdemo_cpp;
const int treeviewdemo_cppSize = 7715;
extern const char* juce_png;
const int juce_pngSize = 15290;
extern const char* widgetsdemo_cpp;
const int widgetsdemo_cppSize = 53388;
extern const char* interprocesscommsdemo_cpp;
const int interprocesscommsdemo_cppSize = 12631;
extern const char* icons_zip;
const int icons_zipSize = 83876;
extern const char* fontsandtextdemo_cpp;
const int fontsandtextdemo_cppSize = 9064;
};
#endif

+ 0
- 4
extras/juce demo/src/binarydata/OpenGLDemo.cpp View File

@@ -31,9 +31,6 @@
#ifdef _WIN32
#include <windows.h>
#elif ! defined (LINUX)
#include <Carbon.h>
#include <Movies.h>
#endif
#include "../jucedemo_headers.h"
@@ -48,7 +45,6 @@
#include <GL/glut.h>
#undef KeyPress
#else
#include <AGL/agl.h>
#include <GLUT/glut.h>
#endif


+ 1
- 1
extras/juce demo/src/binarydata/ThreadingDemo.cpp View File

@@ -40,7 +40,7 @@ class BouncingBallComp : public Component,
float innerX, innerY;
Colour colour;
CriticalSection lock;
int threadId;
int64 threadId;
public:
BouncingBallComp()


+ 1
- 1
extras/juce demo/src/demos/ThreadingDemo.cpp View File

@@ -40,7 +40,7 @@ class BouncingBallComp : public Component,
float innerX, innerY;
Colour colour;
CriticalSection lock;
int threadId;
int64 threadId;
public:
BouncingBallComp()


+ 2
- 2
extras/juce demo/src/juce_AppConfig.h View File

@@ -50,8 +50,8 @@
//#define JUCE_ENABLE_REPAINT_DEBUGGING 1
//#define JUCE_USE_XINERAMA 1
//#define JUCE_USE_XSHM 1
//#define JUCE_PLUGINHOST_VST 1
//#define JUCE_PLUGINHOST_AU 1
#define JUCE_PLUGINHOST_VST 0
#define JUCE_PLUGINHOST_AU 0
//#define JUCE_BUILD_GUI_CLASSES 1
//#define JUCE_CHECK_MEMORY_LEAKS 1
//#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1


+ 10
- 18
extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj View File

@@ -9,10 +9,7 @@
/* Begin PBXBuildFile section */
846929140A49DB9C00314975 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 846929130A49DB9C00314975 /* juce.xcconfig */; };
846C10D40DE33F4D00E8CCE8 /* juce_LibrarySource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 846C10D30DE33F4D00E8CCE8 /* juce_LibrarySource.mm */; };
846C10E90DE33FA100E8CCE8 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10DB0DE33FA100E8CCE8 /* AGL.framework */; };
846C10EA0DE33FA100E8CCE8 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10DC0DE33FA100E8CCE8 /* ApplicationServices.framework */; };
846C10EB0DE33FA100E8CCE8 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10DD0DE33FA100E8CCE8 /* AudioUnit.framework */; };
846C10EC0DE33FA100E8CCE8 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10DE0DE33FA100E8CCE8 /* Carbon.framework */; };
846C10ED0DE33FA100E8CCE8 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10DF0DE33FA100E8CCE8 /* Cocoa.framework */; };
846C10EE0DE33FA100E8CCE8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E00DE33FA100E8CCE8 /* CoreAudio.framework */; };
846C10EF0DE33FA100E8CCE8 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E10DE33FA100E8CCE8 /* CoreFoundation.framework */; };
@@ -21,8 +18,8 @@
846C10F20DE33FA100E8CCE8 /* DiscRecording.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E40DE33FA100E8CCE8 /* DiscRecording.framework */; };
846C10F30DE33FA100E8CCE8 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E50DE33FA100E8CCE8 /* IOKit.framework */; };
846C10F40DE33FA100E8CCE8 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E60DE33FA100E8CCE8 /* OpenGL.framework */; };
846C10F50DE33FA100E8CCE8 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E70DE33FA100E8CCE8 /* QuickTime.framework */; };
846C10F60DE33FA100E8CCE8 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846C10E80DE33FA100E8CCE8 /* WebKit.framework */; };
84E01DD90E910B7B003E41AF /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E01DD80E910B7B003E41AF /* QTKit.framework */; };
84F1769F0A271BBD00908B2F /* jucer_StoredSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F1769B0A271BBD00908B2F /* jucer_StoredSettings.cpp */; };
84F176A00A271BBD00908B2F /* jucer_UtilityFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F1769D0A271BBD00908B2F /* jucer_UtilityFunctions.cpp */; };
84F176BA0A271BD000908B2F /* jucer_ComponentLayoutEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F176A20A271BD000908B2F /* jucer_ComponentLayoutEditor.cpp */; };
@@ -57,6 +54,7 @@
84F555CF0A22381100A8311C /* Jucer To Do list.txt in Resources */ = {isa = PBXBuildFile; fileRef = 84F5556A0A22381000A8311C /* Jucer To Do list.txt */; };
84F555D30A22381100A8311C /* BinaryData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F555700A22381000A8311C /* BinaryData.cpp */; };
84F555D40A22381100A8311C /* jucer_Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F555730A22381000A8311C /* jucer_Main.cpp */; };
84F8B68E0EB5FB290020D98D /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84F8B68D0EB5FB290020D98D /* QuickTime.framework */; };
8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
/* End PBXBuildFile section */

@@ -65,10 +63,7 @@
846929130A49DB9C00314975 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
846C10D20DE33F4D00E8CCE8 /* juce_AppConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = juce_AppConfig.h; path = ../../src/juce_AppConfig.h; sourceTree = SOURCE_ROOT; };
846C10D30DE33F4D00E8CCE8 /* juce_LibrarySource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_LibrarySource.mm; path = ../../src/juce_LibrarySource.mm; sourceTree = SOURCE_ROOT; };
846C10DB0DE33FA100E8CCE8 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
846C10DC0DE33FA100E8CCE8 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
846C10DD0DE33FA100E8CCE8 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
846C10DE0DE33FA100E8CCE8 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
846C10DF0DE33FA100E8CCE8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
846C10E00DE33FA100E8CCE8 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
846C10E10DE33FA100E8CCE8 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
@@ -77,8 +72,8 @@
846C10E40DE33FA100E8CCE8 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
846C10E50DE33FA100E8CCE8 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
846C10E60DE33FA100E8CCE8 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
846C10E70DE33FA100E8CCE8 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
846C10E80DE33FA100E8CCE8 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
84E01DD80E910B7B003E41AF /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
84F176990A271BBD00908B2F /* jucer_ColourEditorComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jucer_ColourEditorComponent.h; sourceTree = "<group>"; };
84F1769A0A271BBD00908B2F /* jucer_Colours.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jucer_Colours.h; sourceTree = "<group>"; };
84F1769B0A271BBD00908B2F /* jucer_StoredSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = jucer_StoredSettings.cpp; sourceTree = "<group>"; };
@@ -183,6 +178,7 @@
84F555720A22381000A8311C /* jucer_Headers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = jucer_Headers.h; path = ../../src/jucer_Headers.h; sourceTree = SOURCE_ROOT; };
84F555730A22381000A8311C /* jucer_Main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = jucer_Main.cpp; path = ../../src/jucer_Main.cpp; sourceTree = SOURCE_ROOT; };
84F555B00A22381000A8311C /* jucer_ComponentTemplate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = jucer_ComponentTemplate.h; path = ../../src/templates/jucer_ComponentTemplate.h; sourceTree = SOURCE_ROOT; };
84F8B68D0EB5FB290020D98D /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D0C4E970486CD37000505A6 /* Jucer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Jucer.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
@@ -192,10 +188,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
846C10E90DE33FA100E8CCE8 /* AGL.framework in Frameworks */,
846C10EA0DE33FA100E8CCE8 /* ApplicationServices.framework in Frameworks */,
846C10EB0DE33FA100E8CCE8 /* AudioUnit.framework in Frameworks */,
846C10EC0DE33FA100E8CCE8 /* Carbon.framework in Frameworks */,
846C10ED0DE33FA100E8CCE8 /* Cocoa.framework in Frameworks */,
846C10EE0DE33FA100E8CCE8 /* CoreAudio.framework in Frameworks */,
846C10EF0DE33FA100E8CCE8 /* CoreFoundation.framework in Frameworks */,
@@ -204,8 +197,9 @@
846C10F20DE33FA100E8CCE8 /* DiscRecording.framework in Frameworks */,
846C10F30DE33FA100E8CCE8 /* IOKit.framework in Frameworks */,
846C10F40DE33FA100E8CCE8 /* OpenGL.framework in Frameworks */,
846C10F50DE33FA100E8CCE8 /* QuickTime.framework in Frameworks */,
846C10F60DE33FA100E8CCE8 /* WebKit.framework in Frameworks */,
84E01DD90E910B7B003E41AF /* QTKit.framework in Frameworks */,
84F8B68E0EB5FB290020D98D /* QuickTime.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -264,19 +258,17 @@
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
846C10DB0DE33FA100E8CCE8 /* AGL.framework */,
846C10DC0DE33FA100E8CCE8 /* ApplicationServices.framework */,
846C10DD0DE33FA100E8CCE8 /* AudioUnit.framework */,
846C10DE0DE33FA100E8CCE8 /* Carbon.framework */,
846C10DF0DE33FA100E8CCE8 /* Cocoa.framework */,
846C10E00DE33FA100E8CCE8 /* CoreAudio.framework */,
846C10E10DE33FA100E8CCE8 /* CoreFoundation.framework */,
846C10E20DE33FA100E8CCE8 /* CoreMIDI.framework */,
846C10E30DE33FA100E8CCE8 /* CoreServices.framework */,
846C10E00DE33FA100E8CCE8 /* CoreAudio.framework */,
846C10E20DE33FA100E8CCE8 /* CoreMIDI.framework */,
846C10E40DE33FA100E8CCE8 /* DiscRecording.framework */,
846C10E50DE33FA100E8CCE8 /* IOKit.framework */,
846C10E60DE33FA100E8CCE8 /* OpenGL.framework */,
846C10E70DE33FA100E8CCE8 /* QuickTime.framework */,
84E01DD80E910B7B003E41AF /* QTKit.framework */,
84F8B68D0EB5FB290020D98D /* QuickTime.framework */,
846C10E80DE33FA100E8CCE8 /* WebKit.framework */,
);
name = "External Frameworks and Libraries";


+ 0
- 1
extras/the jucer/src/BinaryData.cpp View File

@@ -911,4 +911,3 @@ static const unsigned char temp4[] = {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68
0,98,28,9,155,95,0,2,104,68,236,11,1,8,160,17,225,73,128,0,3,0,120,52,172,151,198,78,252,63,0,0,0,0,73,69,78,68,174,66,
96,130,0,0};
const char* BinaryData::prefs_misc_png = (const char*) temp4;

+ 2
- 2
extras/the jucer/src/juce_AppConfig.h View File

@@ -50,8 +50,8 @@
//#define JUCE_ENABLE_REPAINT_DEBUGGING 1
//#define JUCE_USE_XINERAMA 1
//#define JUCE_USE_XSHM 1
//#define JUCE_PLUGINHOST_VST 1
//#define JUCE_PLUGINHOST_AU 1
#define JUCE_PLUGINHOST_VST 0
#define JUCE_PLUGINHOST_AU 0
//#define JUCE_BUILD_GUI_CLASSES 1
//#define JUCE_CHECK_MEMORY_LEAKS 1
//#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1


+ 1
- 1
extras/the jucer/src/jucer_Headers.h View File

@@ -43,7 +43,7 @@
//==============================================================================
#define JUCER_MAJOR_VERSION 1
#define JUCER_MINOR_VERSION 11
#define JUCER_MINOR_VERSION 12
//==============================================================================
#include "BinaryData.h"


+ 1
- 1
extras/the jucer/src/jucer_Main.cpp View File

@@ -83,7 +83,7 @@ public:
StoredSettings::deleteInstance();
quit (false);
quit();
}
}


+ 3
- 0
extras/the jucer/src/utility/jucer_UtilityFunctions.cpp View File

@@ -202,6 +202,9 @@ const String makeValidCppIdentifier (String s,
if (allowTemplates)
allowedChars += T("<>");
if (! removeColons)
allowedChars += T(":");
StringArray words;
words.addTokens (s.retainCharacters (allowedChars), false);
words.trim();


+ 7
- 3
juce_Config.h View File

@@ -30,7 +30,7 @@
*/

#ifndef __JUCE_CONFIG_JUCEHEADER__
#define __JUCE_CONFIG_JUCEHEADER__
#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file)

//==============================================================================
/*
@@ -159,12 +159,16 @@
/** Enabling this builds support for VST audio plugins.
@see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU
*/
//#define JUCE_PLUGINHOST_VST 1
#ifndef JUCE_PLUGINHOST_VST
// #define JUCE_PLUGINHOST_VST 1
#endif

/** Enabling this builds support for AudioUnit audio plugins.
@see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST
*/
#define JUCE_PLUGINHOST_AU 1
#ifndef JUCE_PLUGINHOST_AU
// #define JUCE_PLUGINHOST_AU 1
#endif

//=============================================================================
/** Disabling this will avoid linking to any UI code. This is handy for


+ 27425
- 18384
juce_amalgamated.cpp
File diff suppressed because it is too large
View File


+ 6926
- 6835
juce_amalgamated.h
File diff suppressed because it is too large
View File


+ 13
- 69
src/juce_amalgamated_template.cpp View File

@@ -37,44 +37,22 @@
*/
#ifdef __JUCE_JUCEHEADER__
/* When you add the amalgamated cpp file to your project, you mustn't include it in
a file where you've already included juce.h - just put it inside a file on its own,
possibly with your config flags preceding it, but don't include anything else. */
#error
#endif
#include "../juce_Config.h"
//==============================================================================
#ifdef _WIN32
#include "../build/win32/platform_specific_code/win32_headers.h"
#include <winsock2.h>
#include <mapi.h>
#include <ctime>
#if JUCE_QUICKTIME
#include <Movies.h>
#include <QTML.h>
#include <QuickTimeComponents.h>
#include <MediaHandlers.h>
#include <ImageCodec.h>
#undef TARGET_OS_MAC // quicktime sets these, but they confuse some of the 3rd party libs
#undef MACOS
#endif
#include "../build/win32/platform_specific_code/juce_win32_NativeIncludes.h"
#elif defined (LINUX)
//
#else
#include <Carbon/Carbon.h>
#include <CoreAudio/HostTime.h>
#define __Point__
#include <IOKit/IOKitLib.h>
#include <IOKit/graphics/IOGraphicsTypes.h>
#include <IOKit/network/IOEthernetInterface.h>
#include <IOKit/network/IONetworkInterface.h>
#include <IOKit/network/IOEthernetController.h>
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/hid/IOHIDLib.h>
#include <IOKit/hid/IOHIDKeys.h>
#include <sys/filedesc.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <Kernel/libkern/OSTypes.h>
#include "../build/macosx/platform_specific_code/juce_mac_NativeIncludes.h"
#endif
//==============================================================================
@@ -181,7 +159,7 @@
#include "juce_appframework/audio/plugins/juce_PluginDirectoryScanner.cpp"
#include "juce_appframework/audio/plugins/juce_PluginListComponent.cpp"
#include "juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.cpp"
#include "juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp"
#include "juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.mm"
#include "juce_appframework/audio/processors/juce_AudioProcessor.cpp"
#include "juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp"
#include "juce_appframework/audio/processors/juce_AudioProcessorGraph.cpp"
@@ -287,7 +265,6 @@
#include "juce_appframework/gui/components/special/juce_MidiKeyboardComponent.cpp"
#include "juce_appframework/gui/components/special/juce_OpenGLComponent.cpp"
#include "juce_appframework/gui/components/special/juce_PreferencesPanel.cpp"
#include "juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.cpp"
#include "juce_appframework/gui/components/special/juce_SystemTrayIconComponent.cpp"
#include "juce_appframework/gui/components/windows/juce_AlertWindow.cpp"
#include "juce_appframework/gui/components/windows/juce_ComponentPeer.cpp"
@@ -358,26 +335,7 @@
//==============================================================================
#if JUCE_WIN32
#include "../build/win32/platform_specific_code/juce_win32_Files.cpp"
#include "../build/win32/platform_specific_code/juce_win32_Network.cpp"
#include "../build/win32/platform_specific_code/juce_win32_Misc.cpp"
#include "../build/win32/platform_specific_code/juce_win32_PlatformUtils.cpp"
#include "../build/win32/platform_specific_code/juce_win32_SystemStats.cpp"
#include "../build/win32/platform_specific_code/juce_win32_Threads.cpp"
#include "../build/win32/platform_specific_code/juce_win32_DynamicLibraryLoader.cpp"
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
#include "../build/win32/platform_specific_code/juce_win32_ASIO.cpp"
#include "../build/win32/platform_specific_code/juce_win32_AudioCDReader.cpp"
#include "../build/win32/platform_specific_code/juce_win32_DirectSound.cpp"
#include "../build/win32/platform_specific_code/juce_win32_FileChooser.cpp"
#include "../build/win32/platform_specific_code/juce_win32_Fonts.cpp"
#include "../build/win32/platform_specific_code/juce_win32_Messaging.cpp"
#include "../build/win32/platform_specific_code/juce_win32_Midi.cpp"
#include "../build/win32/platform_specific_code/juce_win32_WebBrowserComponent.cpp"
#include "../build/win32/platform_specific_code/juce_win32_Windowing.cpp"
#endif
#include "../build/win32/platform_specific_code/juce_win32_NativeCode.cpp"
#include "../build/win32/platform_specific_code/juce_win32_AutoLinkLibraries.h"
#endif
@@ -407,21 +365,7 @@
//==============================================================================
#if JUCE_MAC
#include "../build/macosx/platform_specific_code/juce_mac_Files.cpp"
#include "../build/macosx/platform_specific_code/juce_mac_NativeCode.mm"
#include "../build/macosx/platform_specific_code/juce_mac_NamedPipe.cpp"
#include "../build/macosx/platform_specific_code/juce_mac_SystemStats.mm"
#include "../build/macosx/platform_specific_code/juce_mac_Threads.cpp"
#include "../build/macosx/platform_specific_code/juce_mac_Network.mm"
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
#include "../build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm"
#include "../build/macosx/platform_specific_code/juce_mac_CoreAudio.cpp"
#include "../build/macosx/platform_specific_code/juce_mac_CoreMidi.cpp"
#include "../build/macosx/platform_specific_code/juce_mac_FileChooser.mm"
#include "../build/macosx/platform_specific_code/juce_mac_Fonts.mm"
#include "../build/macosx/platform_specific_code/juce_mac_Messaging.mm"
#include "../build/macosx/platform_specific_code/juce_mac_WebBrowserComponent.mm"
#include "../build/macosx/platform_specific_code/juce_mac_Windowing.mm"
#endif
#endif

+ 3
- 3
src/juce_app_includes.h View File

@@ -29,8 +29,8 @@
==============================================================================
*/
#ifndef __JUCE_JUCE_APP_INCLUDES_INCLUDEFILES__
#define __JUCE_JUCE_APP_INCLUDES_INCLUDEFILES__
#ifndef __JUCE_APP_INCLUDES_JUCEHEADER__
#define __JUCE_APP_INCLUDES_JUCEHEADER__
#ifndef __JUCE_APPLICATION_JUCEHEADER__
#include "juce_appframework/application/juce_Application.h"
@@ -738,4 +738,4 @@
#include "juce_appframework/documents/juce_UndoManager.h"
#endif
#endif
#endif // __JUCE_APP_INCLUDES_JUCEHEADER__

+ 16
- 11
src/juce_appframework/application/juce_Application.cpp View File

@@ -51,6 +51,7 @@ BEGIN_JUCE_NAMESPACE
#include "../../juce_core/basics/juce_Initialisation.h"
#include "../../juce_core/threads/juce_Process.h"
#include "../../juce_core/threads/juce_InterProcessLock.h"
#include "../../juce_core/misc/juce_PlatformUtilities.h"
void juce_setCurrentExecutableFileName (const String& filename) throw();
void juce_setCurrentThreadName (const String& name) throw();
@@ -99,9 +100,9 @@ void JUCEApplication::systemRequestedQuit()
quit();
}
void JUCEApplication::quit (const bool useMaximumForce)
void JUCEApplication::quit()
{
MessageManager::getInstance()->postQuitMessage (useMaximumForce);
MessageManager::getInstance()->stopDispatchLoop();
}
void JUCEApplication::setApplicationReturnValue (const int newReturnValue) throw()
@@ -165,7 +166,6 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app)
{
jassert (appInstance == 0);
appInstance = app;
bool useForce = true;
initialiseJuce_GUI();
@@ -203,7 +203,7 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app)
app->stillInitialising = false;
// now loop until a quit message is received..
useForce = MessageManager::getInstance()->runDispatchLoop();
MessageManager::getInstance()->runDispatchLoop();
MessageManager::getInstance()->deregisterBroadcastListener (app);
@@ -224,10 +224,10 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app)
}
#endif
return shutdownAppAndClearUp (useForce);
return shutdownAppAndClearUp();
}
int JUCEApplication::shutdownAppAndClearUp (const bool useMaximumForce)
int JUCEApplication::shutdownAppAndClearUp()
{
jassert (appInstance != 0);
JUCEApplication* const app = appInstance;
@@ -266,11 +266,6 @@ int JUCEApplication::shutdownAppAndClearUp (const bool useMaximumForce)
}
JUCE_CATCH_ALL_ASSERT
if (useMaximumForce)
{
Process::terminate();
}
reentrancyCheck = false;
}
@@ -280,6 +275,10 @@ int JUCEApplication::shutdownAppAndClearUp (const bool useMaximumForce)
int JUCEApplication::main (int argc, char* argv[],
JUCEApplication* const newApp)
{
#if JUCE_MAC
const ScopedAutoReleasePool pool;
#endif
juce_setCurrentExecutableFileName (String::fromUTF8 ((const uint8*) argv[0]));
String cmd;
@@ -303,6 +302,9 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI()
{
if (! juceInitialisedGUI)
{
#if JUCE_MAC
const ScopedAutoReleasePool pool;
#endif
juceInitialisedGUI = true;
initialiseJuce_NonGUI();
@@ -336,6 +338,9 @@ void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI()
{
if (juceInitialisedGUI)
{
#if JUCE_MAC
const ScopedAutoReleasePool pool;
#endif
DeletedAtShutdown::deleteAll();
LookAndFeel::clearDefaultLookAndFeel();


+ 2
- 5
src/juce_appframework/application/juce_Application.h View File

@@ -241,12 +241,9 @@ public:
and maybe cancel the quit, you'll need to handle this in the systemRequestedQuit()
method - see that method's help for more info.
@param useMaximumForce if this is true, the process will be forcibly killed
before leaving the WinMain or main() function, which can
be useful if threads might have got stuck somehow.
@see MessageManager, DeletedAtShutdown
*/
static void quit (const bool useMaximumForce = false);
static void quit();
/** Sets the value that should be returned as the application's exit code when the
app quits.
@@ -293,7 +290,7 @@ private:
int appReturnValue;
bool stillInitialising;
static int shutdownAppAndClearUp (const bool useMaximumForce);
static int shutdownAppAndClearUp();
};


+ 3
- 1
src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp View File

@@ -64,6 +64,8 @@
#include "../../../juce_core/basics/juce_StandardHeader.h"
#if ! (JUCE_MAC && JUCE_64BIT)
BEGIN_JUCE_NAMESPACE
#include "juce_QuickTimeAudioFormat.h"
@@ -408,7 +410,7 @@ AudioFormatWriter* QuickTimeAudioFormat::createWriterFor (OutputStream* /*stream
return 0;
}
END_JUCE_NAMESPACE
#endif
#endif

+ 17
- 4
src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp View File

@@ -45,10 +45,11 @@ AudioSampleBuffer::AudioSampleBuffer (const int numChannels_,
size (numSamples)
{
jassert (numSamples >= 0);
jassert (numChannels_ > 0 && numChannels_ <= maxNumAudioSampleBufferChannels);
jassert (numChannels_ > 0);
allocatedBytes = numChannels * numSamples * sizeof (float) + 32;
allocatedData = (float*) juce_malloc (allocatedBytes);
channels = (float**) juce_malloc (numChannels_ * sizeof (float*));
float* chan = allocatedData;
for (int i = 0; i < numChannels_; ++i)
@@ -68,7 +69,9 @@ AudioSampleBuffer::AudioSampleBuffer (float** dataToReferTo,
allocatedBytes (0),
allocatedData (0)
{
jassert (((unsigned int) numChannels_) <= (unsigned int) maxNumAudioSampleBufferChannels);
jassert (numChannels_ > 0);
channels = (float**) juce_malloc (numChannels_ * sizeof (float*));
for (int i = 0; i < numChannels_; ++i)
{
@@ -85,12 +88,15 @@ void AudioSampleBuffer::setDataToReferTo (float** dataToReferTo,
const int numChannels_,
const int numSamples) throw()
{
jassert (((unsigned int) numChannels_) <= (unsigned int) maxNumAudioSampleBufferChannels);
jassert (numChannels_ > 0);
juce_free (allocatedData);
allocatedData = 0;
allocatedBytes = 0;
if (numChannels_ > numChannels)
channels = (float**) juce_realloc (channels, numChannels_ * sizeof (float*));
numChannels = numChannels_;
size = numSamples;
@@ -109,6 +115,8 @@ AudioSampleBuffer::AudioSampleBuffer (const AudioSampleBuffer& other) throw()
: numChannels (other.numChannels),
size (other.size)
{
channels = (float**) juce_malloc (other.numChannels * sizeof (float*));
if (other.allocatedData != 0)
{
allocatedBytes = numChannels * size * sizeof (float) + 32;
@@ -152,6 +160,7 @@ const AudioSampleBuffer& AudioSampleBuffer::operator= (const AudioSampleBuffer&
AudioSampleBuffer::~AudioSampleBuffer() throw()
{
juce_free (allocatedData);
juce_free (channels);
}
float* AudioSampleBuffer::getSampleData (const int channelNumber,
@@ -169,7 +178,7 @@ void AudioSampleBuffer::setSize (const int newNumChannels,
const bool clearExtraSpace,
const bool avoidReallocating) throw()
{
jassert (newNumChannels > 0 && newNumChannels <= maxNumAudioSampleBufferChannels);
jassert (newNumChannels > 0);
if (newNumSamples != size || newNumChannels != numChannels)
{
@@ -212,6 +221,10 @@ void AudioSampleBuffer::setSize (const int newNumChannels,
}
size = newNumSamples;
if (newNumChannels > numChannels)
channels = (float**) juce_realloc (channels, newNumChannels * sizeof (float*));
numChannels = newNumChannels;
float* chan = allocatedData;


+ 1
- 2
src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.h View File

@@ -34,7 +34,6 @@
class AudioFormatReader;
class AudioFormatWriter;
const int maxNumAudioSampleBufferChannels = 32;
//==============================================================================
@@ -371,7 +370,7 @@ public:
private:
int numChannels, size, allocatedBytes;
float* channels [maxNumAudioSampleBufferChannels + 1];
float** channels;
float* allocatedData;
};


+ 1332
- 0
src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.mm
File diff suppressed because it is too large
View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save