From 47cf2369e5fdac60ffd4161ca542faa7fc1c3a46 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 27 Oct 2008 17:51:24 +0000 Subject: [PATCH] --- build/linux/JUCE.make | 1300 +- .../juce_linux_Audio.cpp | 12 +- .../juce_linux_Messaging.cpp | 14 +- .../juce_linux_Network.cpp | 390 +- .../juce_linux_Threads.cpp | 11 +- .../juce_linux_WebBrowserComponent.cpp | 7 +- .../juce_linux_Windowing.cpp | 6 +- build/macosx/Juce.xcodeproj/project.pbxproj | 213 +- build/macosx/juce.xcconfig | 28 +- .../juce_mac_AppleRemote.mm | 278 + .../juce_mac_AudioCDBurner.mm | 880 +- .../juce_mac_CoreAudio.cpp | 2590 +- .../juce_mac_CoreMidi.cpp | 1175 +- .../juce_mac_Debugging.mm | 74 + .../juce_mac_FileChooser.mm | 306 +- .../platform_specific_code/juce_mac_Files.mm | 541 + .../platform_specific_code/juce_mac_Fonts.mm | 19 +- .../juce_mac_MainMenu.mm | 414 + .../juce_mac_MessageManager.mm | 275 + .../juce_mac_Messaging.mm | 503 - .../juce_mac_MiscUtilities.mm | 238 + .../juce_mac_MouseCursor.mm | 196 + .../juce_mac_NSViewComponent.mm | 149 + .../juce_mac_NSViewComponentPeer.mm | 1258 + .../juce_mac_NamedPipe.cpp | 472 +- .../juce_mac_NativeCode.mm | 111 + .../juce_mac_NativeHeaders.h | 2 +- .../juce_mac_NativeIncludes.h | 73 + .../juce_mac_Network.mm | 918 +- .../juce_mac_OpenGLComponent.mm | 235 + .../juce_mac_QuickTimeMovieComponent.mm | 294 + .../juce_mac_Strings.mm | 186 + .../juce_mac_SystemStats.mm | 148 +- .../juce_mac_Threads.cpp | 404 +- .../juce_mac_Threads.mm | 129 + .../juce_mac_WebBrowserComponent.mm | 701 +- .../juce_mac_Windowing.mm | 3551 -- .../juce_win32_ASIO.cpp | 59 +- .../juce_win32_ActiveXComponent.cpp | 552 + .../juce_win32_AudioCDReader.cpp | 37 +- .../juce_win32_DirectSound.cpp | 41 +- .../juce_win32_DynamicLibraryLoader.cpp | 11 +- .../juce_win32_FileChooser.cpp | 23 +- .../juce_win32_Files.cpp | 92 +- .../juce_win32_Fonts.cpp | 15 +- .../juce_win32_Messaging.cpp | 16 +- .../juce_win32_Midi.cpp | 23 +- .../juce_win32_Misc.cpp | 41 +- .../juce_win32_NativeIncludes.h | 156 + .../juce_win32_Network.cpp | 28 +- .../juce_win32_PlatformUtils.cpp | 29 +- .../juce_win32_QuickTimeMovieComponent.cpp | 517 + .../juce_win32_SystemStats.cpp | 21 +- .../juce_win32_Threads.cpp | 40 +- .../juce_win32_WebBrowserComponent.cpp | 32 +- .../juce_win32_Windowing.cpp | 1088 +- build/win32/vc8/JUCE.vcproj | 24 +- .../mac/PluginHost.xcodeproj/project.pbxproj | 36 +- extras/audio plugin host/src/HostStartup.cpp | 2 + .../src/host/MainHostWindow.cpp | 14 +- extras/audio plugin host/src/includes.h | 3 +- .../demo/build/AudioUnit/JuceAU.exp | 17 +- .../JuceDemoAU.xcodeproj/project.pbxproj | 56 +- .../juce_RTASDemo.xcodeproj/project.pbxproj | 64 +- .../VST_Mac/JuceVST.xcodeproj/project.pbxproj | 34 +- ...itWrapper.cpp => juce_AudioUnitWrapper.mm} | 404 +- .../formats/AudioUnit/juce_AudioUnitWrapper.r | 13 - .../formats/RTAS/juce_RTASUtilities.mm | 82 + .../wrapper/formats/RTAS/juce_RTASWrapper.cpp | 222 +- .../formats/VST/MacExportedSymbols.txt | 12 + .../wrapper/formats/VST/juce_VstWrapper.cpp | 111 +- .../wrapper/formats/VST/juce_VstWrapper.mm | 111 + .../project.pbxproj | 12 +- extras/juce demo/build/linux/JuceDemo.make | 92 +- extras/juce demo/build/macosx/Info.plist | 18 +- .../macosx/jucedemo.xcodeproj/project.pbxproj | 437 +- extras/juce demo/build/win32_vc8/jucedemo.sln | 3 + extras/juce demo/src/BinaryData.cpp | 8779 ++-- extras/juce demo/src/BinaryData.h | 64 +- .../juce demo/src/binarydata/OpenGLDemo.cpp | 4 - .../src/binarydata/ThreadingDemo.cpp | 2 +- extras/juce demo/src/demos/ThreadingDemo.cpp | 2 +- extras/juce demo/src/juce_AppConfig.h | 4 +- .../build/mac/Jucer.xcodeproj/project.pbxproj | 28 +- extras/the jucer/src/BinaryData.cpp | 1 - extras/the jucer/src/juce_AppConfig.h | 4 +- extras/the jucer/src/jucer_Headers.h | 2 +- extras/the jucer/src/jucer_Main.cpp | 2 +- .../src/utility/jucer_UtilityFunctions.cpp | 3 + juce_Config.h | 10 +- juce_amalgamated.cpp | 42563 ++++++++++------ juce_amalgamated.h | 6755 +-- src/juce_amalgamated_template.cpp | 82 +- src/juce_app_includes.h | 6 +- .../application/juce_Application.cpp | 27 +- .../application/juce_Application.h | 7 +- .../juce_QuickTimeAudioFormat.cpp | 4 +- .../audio/dsp/juce_AudioSampleBuffer.cpp | 21 +- .../audio/dsp/juce_AudioSampleBuffer.h | 3 +- .../formats/juce_AudioUnitPluginFormat.mm | 1332 + .../plugins/formats/juce_VSTPluginFormat.cpp | 349 +- .../plugins/formats/juce_VSTPluginFormat.mm | 35 + .../plugins/juce_PluginListComponent.cpp | 4 +- .../events/juce_MessageManager.cpp | 183 +- .../events/juce_MessageManager.h | 91 +- src/juce_appframework/events/juce_Timer.cpp | 13 - .../gui/components/controls/juce_Slider.cpp | 2784 +- .../gui/components/juce_Component.cpp | 2 +- .../juce_AudioDeviceSelectorComponent.cpp | 8 +- .../components/special/juce_NSViewComponent.h | 96 + .../components/special/juce_OpenGLComponent.h | 7 + .../special/juce_QuickTimeMovieComponent.cpp | 1115 - .../special/juce_QuickTimeMovieComponent.h | 47 +- .../special/juce_WebBrowserComponent.h | 13 +- .../components/windows/juce_ComponentPeer.h | 3 + .../components/windows/juce_SplashScreen.cpp | 2 +- .../components/windows/juce_TooltipWindow.cpp | 28 +- .../components/windows/juce_TooltipWindow.h | 1 + .../juce_LowLevelGraphicsSoftwareRenderer.cpp | 4 +- .../image_file_formats/juce_JPEGLoader.cpp | 2 +- .../image_file_formats/juce_PNGLoader.cpp | 6 +- .../image_file_formats/pnglib/pngrutil.c | 2 +- src/juce_core/basics/juce_SystemStats.cpp | 9 + src/juce_core/io/network/juce_Socket.cpp | 1 - src/juce_core/io/network/juce_URL.cpp | 10 +- src/juce_core/io/network/juce_URL.h | 7 +- .../juce_GZIPCompressorOutputStream.cpp | 2 +- src/juce_core/misc/juce_PlatformUtilities.h | 54 +- src/juce_core/text/juce_XmlElement.cpp | 19 +- src/juce_core/text/juce_XmlElement.h | 16 +- src/juce_core/threads/juce_Process.h | 28 - src/juce_core/threads/juce_ReadWriteLock.cpp | 10 +- src/juce_core/threads/juce_ReadWriteLock.h | 4 +- src/juce_core/threads/juce_Thread.cpp | 4 +- src/juce_core/threads/juce_Thread.h | 7 +- src/juce_core_includes.h | 240 +- 136 files changed, 48629 insertions(+), 38971 deletions(-) create mode 100644 build/macosx/platform_specific_code/juce_mac_AppleRemote.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_Debugging.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_Files.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_MainMenu.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_MessageManager.mm delete mode 100644 build/macosx/platform_specific_code/juce_mac_Messaging.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_MiscUtilities.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_MouseCursor.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_NSViewComponent.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_NativeCode.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_NativeIncludes.h create mode 100644 build/macosx/platform_specific_code/juce_mac_OpenGLComponent.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_QuickTimeMovieComponent.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_Strings.mm create mode 100644 build/macosx/platform_specific_code/juce_mac_Threads.mm delete mode 100644 build/macosx/platform_specific_code/juce_mac_Windowing.mm create mode 100644 build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp create mode 100644 build/win32/platform_specific_code/juce_win32_NativeIncludes.h create mode 100644 build/win32/platform_specific_code/juce_win32_QuickTimeMovieComponent.cpp rename extras/audio plugins/wrapper/formats/AudioUnit/{juce_AudioUnitWrapper.cpp => juce_AudioUnitWrapper.mm} (77%) create mode 100644 extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.mm create mode 100644 extras/audio plugins/wrapper/formats/VST/MacExportedSymbols.txt create mode 100644 extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.mm create mode 100644 src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.mm create mode 100644 src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.mm create mode 100644 src/juce_appframework/gui/components/special/juce_NSViewComponent.h delete mode 100644 src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.cpp diff --git a/build/linux/JUCE.make b/build/linux/JUCE.make index 768e260ef2..40f10985a5 100644 --- a/build/linux/JUCE.make +++ b/build/linux/JUCE.make @@ -36,272 +36,271 @@ ifeq ($(CONFIG),Release) endif OBJECTS := \ + $(OBJDIR)/juce_RelativeTime.o \ $(OBJDIR)/juce_FileLogger.o \ $(OBJDIR)/juce_Logger.o \ $(OBJDIR)/juce_Random.o \ - $(OBJDIR)/juce_RelativeTime.o \ - $(OBJDIR)/juce_SystemStats.o \ $(OBJDIR)/juce_Time.o \ + $(OBJDIR)/juce_SystemStats.o \ $(OBJDIR)/juce_BlowFish.o \ - $(OBJDIR)/juce_MD5.o \ - $(OBJDIR)/juce_Primes.o \ $(OBJDIR)/juce_RSAKey.o \ - $(OBJDIR)/juce_BitArray.o \ - $(OBJDIR)/juce_MemoryBlock.o \ + $(OBJDIR)/juce_Primes.o \ + $(OBJDIR)/juce_MD5.o \ $(OBJDIR)/juce_PropertySet.o \ + $(OBJDIR)/juce_MemoryBlock.o \ + $(OBJDIR)/juce_BitArray.o \ $(OBJDIR)/juce_InputStream.o \ $(OBJDIR)/juce_OutputStream.o \ - $(OBJDIR)/juce_DirectoryIterator.o \ - $(OBJDIR)/juce_File.o \ $(OBJDIR)/juce_FileInputStream.o \ $(OBJDIR)/juce_FileOutputStream.o \ + $(OBJDIR)/juce_DirectoryIterator.o \ $(OBJDIR)/juce_FileSearchPath.o \ $(OBJDIR)/juce_NamedPipe.o \ - $(OBJDIR)/juce_Socket.o \ + $(OBJDIR)/juce_File.o \ $(OBJDIR)/juce_URL.o \ - $(OBJDIR)/juce_BufferedInputStream.o \ - $(OBJDIR)/juce_FileInputSource.o \ - $(OBJDIR)/juce_GZIPCompressorOutputStream.o \ - $(OBJDIR)/juce_GZIPDecompressorInputStream.o \ + $(OBJDIR)/juce_Socket.o \ $(OBJDIR)/juce_MemoryInputStream.o \ $(OBJDIR)/juce_MemoryOutputStream.o \ $(OBJDIR)/juce_SubregionStream.o \ + $(OBJDIR)/juce_BufferedInputStream.o \ + $(OBJDIR)/juce_FileInputSource.o \ + $(OBJDIR)/juce_GZIPDecompressorInputStream.o \ + $(OBJDIR)/juce_GZIPCompressorOutputStream.o \ $(OBJDIR)/juce_PerformanceCounter.o \ - $(OBJDIR)/juce_Uuid.o \ $(OBJDIR)/juce_ZipFile.o \ - $(OBJDIR)/juce_CharacterFunctions.o \ - $(OBJDIR)/juce_LocalisedStrings.o \ - $(OBJDIR)/juce_String.o \ - $(OBJDIR)/juce_StringArray.o \ + $(OBJDIR)/juce_Uuid.o \ $(OBJDIR)/juce_StringPairArray.o \ - $(OBJDIR)/juce_XmlDocument.o \ + $(OBJDIR)/juce_CharacterFunctions.o \ + $(OBJDIR)/juce_StringArray.o \ + $(OBJDIR)/juce_String.o \ $(OBJDIR)/juce_XmlElement.o \ + $(OBJDIR)/juce_LocalisedStrings.o \ + $(OBJDIR)/juce_XmlDocument.o \ $(OBJDIR)/juce_InterProcessLock.o \ $(OBJDIR)/juce_ReadWriteLock.o \ - $(OBJDIR)/juce_Thread.o \ $(OBJDIR)/juce_ThreadPool.o \ $(OBJDIR)/juce_TimeSliceThread.o \ - $(OBJDIR)/juce_Application.o \ - $(OBJDIR)/juce_ApplicationCommandInfo.o \ + $(OBJDIR)/juce_Thread.o \ $(OBJDIR)/juce_ApplicationCommandManager.o \ + $(OBJDIR)/juce_PropertiesFile.o \ $(OBJDIR)/juce_ApplicationCommandTarget.o \ + $(OBJDIR)/juce_ApplicationCommandInfo.o \ $(OBJDIR)/juce_ApplicationProperties.o \ $(OBJDIR)/juce_DeletedAtShutdown.o \ - $(OBJDIR)/juce_PropertiesFile.o \ - $(OBJDIR)/juce_AudioDataConverters.o \ + $(OBJDIR)/juce_Application.o \ $(OBJDIR)/juce_AudioSampleBuffer.o \ + $(OBJDIR)/juce_AudioDataConverters.o \ $(OBJDIR)/juce_IIRFilter.o \ $(OBJDIR)/juce_MidiBuffer.o \ + $(OBJDIR)/juce_MidiMessageSequence.o \ $(OBJDIR)/juce_MidiFile.o \ $(OBJDIR)/juce_MidiKeyboardState.o \ $(OBJDIR)/juce_MidiMessage.o \ $(OBJDIR)/juce_MidiMessageCollector.o \ - $(OBJDIR)/juce_MidiMessageSequence.o \ - $(OBJDIR)/juce_AudioProcessor.o \ - $(OBJDIR)/juce_AudioProcessorEditor.o \ $(OBJDIR)/juce_AudioProcessorGraph.o \ - $(OBJDIR)/juce_AudioProcessorPlayer.o \ $(OBJDIR)/juce_GenericAudioProcessorEditor.o \ + $(OBJDIR)/juce_AudioProcessorEditor.o \ + $(OBJDIR)/juce_AudioProcessorPlayer.o \ + $(OBJDIR)/juce_AudioProcessor.o \ $(OBJDIR)/juce_AudioPluginFormat.o \ + $(OBJDIR)/juce_PluginDirectoryScanner.o \ + $(OBJDIR)/juce_PluginDescription.o \ $(OBJDIR)/juce_AudioPluginFormatManager.o \ $(OBJDIR)/juce_AudioPluginInstance.o \ $(OBJDIR)/juce_KnownPluginList.o \ - $(OBJDIR)/juce_PluginDescription.o \ - $(OBJDIR)/juce_PluginDirectoryScanner.o \ $(OBJDIR)/juce_PluginListComponent.o \ - $(OBJDIR)/juce_AudioUnitPluginFormat.o \ $(OBJDIR)/juce_VSTPluginFormat.o \ - $(OBJDIR)/juce_AiffAudioFormat.o \ - $(OBJDIR)/juce_AudioCDReader.o \ - $(OBJDIR)/juce_AudioFormat.o \ - $(OBJDIR)/juce_AudioFormatManager.o \ - $(OBJDIR)/juce_AudioSubsectionReader.o \ - $(OBJDIR)/juce_AudioThumbnail.o \ - $(OBJDIR)/juce_AudioThumbnailCache.o \ - $(OBJDIR)/juce_FlacAudioFormat.o \ - $(OBJDIR)/juce_OggVorbisAudioFormat.o \ - $(OBJDIR)/juce_QuickTimeAudioFormat.o \ + $(OBJDIR)/juce_AudioUnitPluginFormat.o \ $(OBJDIR)/juce_WavAudioFormat.o \ - $(OBJDIR)/juce_AudioFormatReaderSource.o \ - $(OBJDIR)/juce_AudioSourcePlayer.o \ + $(OBJDIR)/juce_AudioThumbnailCache.o \ + $(OBJDIR)/juce_AudioCDReader.o \ + $(OBJDIR)/juce_AiffAudioFormat.o \ + $(OBJDIR)/juce_AudioFormatManager.o \ + $(OBJDIR)/juce_AudioThumbnail.o \ + $(OBJDIR)/juce_AudioFormat.o \ + $(OBJDIR)/juce_AudioSubsectionReader.o \ + $(OBJDIR)/juce_OggVorbisAudioFormat.o \ + $(OBJDIR)/juce_FlacAudioFormat.o \ + $(OBJDIR)/juce_QuickTimeAudioFormat.o \ $(OBJDIR)/juce_AudioTransportSource.o \ - $(OBJDIR)/juce_BufferingAudioSource.o \ - $(OBJDIR)/juce_ChannelRemappingAudioSource.o \ - $(OBJDIR)/juce_IIRFilterAudioSource.o \ - $(OBJDIR)/juce_MixerAudioSource.o \ $(OBJDIR)/juce_ResamplingAudioSource.o \ + $(OBJDIR)/juce_BufferingAudioSource.o \ + $(OBJDIR)/juce_AudioFormatReaderSource.o \ + $(OBJDIR)/juce_ChannelRemappingAudioSource.o \ $(OBJDIR)/juce_ToneGeneratorAudioSource.o \ - $(OBJDIR)/juce_AudioDeviceManager.o \ + $(OBJDIR)/juce_MixerAudioSource.o \ + $(OBJDIR)/juce_IIRFilterAudioSource.o \ + $(OBJDIR)/juce_AudioSourcePlayer.o \ $(OBJDIR)/juce_AudioIODevice.o \ $(OBJDIR)/juce_AudioIODeviceType.o \ $(OBJDIR)/juce_MidiOutput.o \ + $(OBJDIR)/juce_AudioDeviceManager.o \ $(OBJDIR)/juce_Sampler.o \ $(OBJDIR)/juce_Synthesiser.o \ - $(OBJDIR)/juce_FileBasedDocument.o \ $(OBJDIR)/juce_RecentlyOpenedFilesList.o \ $(OBJDIR)/juce_UndoManager.o \ - $(OBJDIR)/juce_ActionBroadcaster.o \ - $(OBJDIR)/juce_ActionListenerList.o \ - $(OBJDIR)/juce_AsyncUpdater.o \ - $(OBJDIR)/juce_ChangeBroadcaster.o \ - $(OBJDIR)/juce_ChangeListenerList.o \ - $(OBJDIR)/juce_InterprocessConnection.o \ - $(OBJDIR)/juce_InterprocessConnectionServer.o \ - $(OBJDIR)/juce_Message.o \ + $(OBJDIR)/juce_FileBasedDocument.o \ $(OBJDIR)/juce_MessageListener.o \ - $(OBJDIR)/juce_MessageManager.o \ $(OBJDIR)/juce_MultiTimer.o \ + $(OBJDIR)/juce_ChangeBroadcaster.o \ + $(OBJDIR)/juce_InterprocessConnection.o \ + $(OBJDIR)/juce_AsyncUpdater.o \ + $(OBJDIR)/juce_ActionListenerList.o \ $(OBJDIR)/juce_Timer.o \ - $(OBJDIR)/juce_Brush.o \ + $(OBJDIR)/juce_Message.o \ + $(OBJDIR)/juce_InterprocessConnectionServer.o \ + $(OBJDIR)/juce_ChangeListenerList.o \ + $(OBJDIR)/juce_ActionBroadcaster.o \ + $(OBJDIR)/juce_MessageManager.o \ $(OBJDIR)/juce_GradientBrush.o \ - $(OBJDIR)/juce_ImageBrush.o \ $(OBJDIR)/juce_SolidColourBrush.o \ - $(OBJDIR)/juce_Colour.o \ + $(OBJDIR)/juce_Brush.o \ + $(OBJDIR)/juce_ImageBrush.o \ $(OBJDIR)/juce_ColourGradient.o \ + $(OBJDIR)/juce_Colour.o \ $(OBJDIR)/juce_Colours.o \ - $(OBJDIR)/juce_EdgeTable.o \ - $(OBJDIR)/juce_Graphics.o \ $(OBJDIR)/juce_Justification.o \ + $(OBJDIR)/juce_EdgeTable.o \ $(OBJDIR)/juce_LowLevelGraphicsPostScriptRenderer.o \ - $(OBJDIR)/juce_LowLevelGraphicsSoftwareRenderer.o \ $(OBJDIR)/juce_RectanglePlacement.o \ - $(OBJDIR)/juce_Drawable.o \ + $(OBJDIR)/juce_Graphics.o \ + $(OBJDIR)/juce_LowLevelGraphicsSoftwareRenderer.o \ $(OBJDIR)/juce_DrawableComposite.o \ $(OBJDIR)/juce_DrawableImage.o \ - $(OBJDIR)/juce_DrawablePath.o \ $(OBJDIR)/juce_DrawableText.o \ $(OBJDIR)/juce_SVGParser.o \ - $(OBJDIR)/juce_DropShadowEffect.o \ - $(OBJDIR)/juce_GlowEffect.o \ + $(OBJDIR)/juce_DrawablePath.o \ + $(OBJDIR)/juce_Drawable.o \ $(OBJDIR)/juce_ReduceOpacityEffect.o \ + $(OBJDIR)/juce_GlowEffect.o \ + $(OBJDIR)/juce_DropShadowEffect.o \ + $(OBJDIR)/juce_Typeface.o \ + $(OBJDIR)/juce_TextLayout.o \ $(OBJDIR)/juce_Font.o \ $(OBJDIR)/juce_GlyphArrangement.o \ - $(OBJDIR)/juce_TextLayout.o \ - $(OBJDIR)/juce_Typeface.o \ - $(OBJDIR)/juce_AffineTransform.o \ - $(OBJDIR)/juce_BorderSize.o \ - $(OBJDIR)/juce_Line.o \ - $(OBJDIR)/juce_Path.o \ - $(OBJDIR)/juce_PathIterator.o \ - $(OBJDIR)/juce_PathStrokeType.o \ $(OBJDIR)/juce_Point.o \ + $(OBJDIR)/juce_Path.o \ + $(OBJDIR)/juce_RectangleList.o \ $(OBJDIR)/juce_PositionedRectangle.o \ $(OBJDIR)/juce_Rectangle.o \ - $(OBJDIR)/juce_RectangleList.o \ - $(OBJDIR)/juce_Image.o \ - $(OBJDIR)/juce_ImageCache.o \ + $(OBJDIR)/juce_PathIterator.o \ + $(OBJDIR)/juce_BorderSize.o \ + $(OBJDIR)/juce_AffineTransform.o \ + $(OBJDIR)/juce_PathStrokeType.o \ + $(OBJDIR)/juce_Line.o \ $(OBJDIR)/juce_ImageConvolutionKernel.o \ $(OBJDIR)/juce_ImageFileFormat.o \ + $(OBJDIR)/juce_Image.o \ + $(OBJDIR)/juce_ImageCache.o \ $(OBJDIR)/juce_GIFLoader.o \ - $(OBJDIR)/juce_JPEGLoader.o \ $(OBJDIR)/juce_PNGLoader.o \ + $(OBJDIR)/juce_JPEGLoader.o \ $(OBJDIR)/juce_Component.o \ $(OBJDIR)/juce_ComponentListener.o \ $(OBJDIR)/juce_Desktop.o \ - $(OBJDIR)/juce_ArrowButton.o \ + $(OBJDIR)/juce_ShapeButton.o \ + $(OBJDIR)/juce_ToolbarButton.o \ + $(OBJDIR)/juce_HyperlinkButton.o \ $(OBJDIR)/juce_Button.o \ $(OBJDIR)/juce_DrawableButton.o \ - $(OBJDIR)/juce_HyperlinkButton.o \ - $(OBJDIR)/juce_ImageButton.o \ - $(OBJDIR)/juce_ShapeButton.o \ - $(OBJDIR)/juce_TextButton.o \ $(OBJDIR)/juce_ToggleButton.o \ - $(OBJDIR)/juce_ToolbarButton.o \ - $(OBJDIR)/juce_ComboBox.o \ - $(OBJDIR)/juce_Label.o \ - $(OBJDIR)/juce_ListBox.o \ + $(OBJDIR)/juce_ImageButton.o \ + $(OBJDIR)/juce_TextButton.o \ + $(OBJDIR)/juce_ArrowButton.o \ $(OBJDIR)/juce_ProgressBar.o \ - $(OBJDIR)/juce_Slider.o \ - $(OBJDIR)/juce_TableHeaderComponent.o \ + $(OBJDIR)/juce_TreeView.o \ $(OBJDIR)/juce_TableListBox.o \ - $(OBJDIR)/juce_TextEditor.o \ + $(OBJDIR)/juce_ToolbarItemPalette.o \ + $(OBJDIR)/juce_Label.o \ $(OBJDIR)/juce_Toolbar.o \ $(OBJDIR)/juce_ToolbarItemComponent.o \ - $(OBJDIR)/juce_ToolbarItemPalette.o \ - $(OBJDIR)/juce_TreeView.o \ + $(OBJDIR)/juce_ComboBox.o \ + $(OBJDIR)/juce_Slider.o \ + $(OBJDIR)/juce_TableHeaderComponent.o \ + $(OBJDIR)/juce_ListBox.o \ + $(OBJDIR)/juce_TextEditor.o \ $(OBJDIR)/juce_DirectoryContentsDisplayComponent.o \ - $(OBJDIR)/juce_DirectoryContentsList.o \ - $(OBJDIR)/juce_FileBrowserComponent.o \ - $(OBJDIR)/juce_FileChooser.o \ $(OBJDIR)/juce_FileChooserDialogBox.o \ - $(OBJDIR)/juce_FileFilter.o \ $(OBJDIR)/juce_FileListComponent.o \ - $(OBJDIR)/juce_FilenameComponent.o \ - $(OBJDIR)/juce_FileSearchPathListComponent.o \ - $(OBJDIR)/juce_FileTreeComponent.o \ - $(OBJDIR)/juce_ImagePreviewComponent.o \ $(OBJDIR)/juce_WildcardFileFilter.o \ - $(OBJDIR)/juce_KeyboardFocusTraverser.o \ + $(OBJDIR)/juce_FileSearchPathListComponent.o \ + $(OBJDIR)/juce_FileChooser.o \ + $(OBJDIR)/juce_FilenameComponent.o \ + $(OBJDIR)/juce_FileBrowserComponent.o \ + $(OBJDIR)/juce_ImagePreviewComponent.o \ + $(OBJDIR)/juce_DirectoryContentsList.o \ + $(OBJDIR)/juce_FileTreeComponent.o \ + $(OBJDIR)/juce_FileFilter.o \ + $(OBJDIR)/juce_ModifierKeys.o \ + $(OBJDIR)/juce_KeyPressMappingSet.o \ $(OBJDIR)/juce_KeyListener.o \ $(OBJDIR)/juce_KeyMappingEditorComponent.o \ + $(OBJDIR)/juce_KeyboardFocusTraverser.o \ $(OBJDIR)/juce_KeyPress.o \ - $(OBJDIR)/juce_KeyPressMappingSet.o \ - $(OBJDIR)/juce_ModifierKeys.o \ - $(OBJDIR)/juce_ComponentAnimator.o \ - $(OBJDIR)/juce_ComponentBoundsConstrainer.o \ - $(OBJDIR)/juce_ComponentMovementWatcher.o \ - $(OBJDIR)/juce_GroupComponent.o \ - $(OBJDIR)/juce_MultiDocumentPanel.o \ - $(OBJDIR)/juce_ResizableBorderComponent.o \ - $(OBJDIR)/juce_ResizableCornerComponent.o \ - $(OBJDIR)/juce_ScrollBar.o \ $(OBJDIR)/juce_StretchableLayoutManager.o \ - $(OBJDIR)/juce_StretchableLayoutResizerBar.o \ $(OBJDIR)/juce_StretchableObjectResizer.o \ + $(OBJDIR)/juce_ComponentAnimator.o \ + $(OBJDIR)/juce_ResizableBorderComponent.o \ $(OBJDIR)/juce_TabbedButtonBar.o \ $(OBJDIR)/juce_TabbedComponent.o \ + $(OBJDIR)/juce_MultiDocumentPanel.o \ + $(OBJDIR)/juce_ResizableCornerComponent.o \ + $(OBJDIR)/juce_GroupComponent.o \ $(OBJDIR)/juce_Viewport.o \ - $(OBJDIR)/juce_LookAndFeel.o \ + $(OBJDIR)/juce_ScrollBar.o \ + $(OBJDIR)/juce_ComponentBoundsConstrainer.o \ + $(OBJDIR)/juce_StretchableLayoutResizerBar.o \ + $(OBJDIR)/juce_ComponentMovementWatcher.o \ $(OBJDIR)/juce_OldSchoolLookAndFeel.o \ + $(OBJDIR)/juce_LookAndFeel.o \ $(OBJDIR)/juce_MenuBarComponent.o \ $(OBJDIR)/juce_MenuBarModel.o \ $(OBJDIR)/juce_PopupMenu.o \ - $(OBJDIR)/juce_ComponentDragger.o \ $(OBJDIR)/juce_DragAndDropContainer.o \ - $(OBJDIR)/juce_MouseCursor.o \ $(OBJDIR)/juce_MouseEvent.o \ - $(OBJDIR)/juce_MouseHoverDetector.o \ + $(OBJDIR)/juce_ComponentDragger.o \ $(OBJDIR)/juce_MouseListener.o \ - $(OBJDIR)/juce_BooleanPropertyComponent.o \ - $(OBJDIR)/juce_ButtonPropertyComponent.o \ - $(OBJDIR)/juce_ChoicePropertyComponent.o \ - $(OBJDIR)/juce_PropertyComponent.o \ - $(OBJDIR)/juce_PropertyPanel.o \ + $(OBJDIR)/juce_MouseCursor.o \ + $(OBJDIR)/juce_MouseHoverDetector.o \ $(OBJDIR)/juce_SliderPropertyComponent.o \ $(OBJDIR)/juce_TextPropertyComponent.o \ - $(OBJDIR)/juce_AudioDeviceSelectorComponent.o \ - $(OBJDIR)/juce_BubbleComponent.o \ - $(OBJDIR)/juce_BubbleMessageComponent.o \ - $(OBJDIR)/juce_ColourSelector.o \ + $(OBJDIR)/juce_ChoicePropertyComponent.o \ + $(OBJDIR)/juce_ButtonPropertyComponent.o \ + $(OBJDIR)/juce_BooleanPropertyComponent.o \ + $(OBJDIR)/juce_PropertyComponent.o \ + $(OBJDIR)/juce_PropertyPanel.o \ $(OBJDIR)/juce_DropShadower.o \ + $(OBJDIR)/juce_ColourSelector.o \ + $(OBJDIR)/juce_OpenGLComponent.o \ + $(OBJDIR)/juce_BubbleComponent.o \ + $(OBJDIR)/juce_SystemTrayIconComponent.o \ + $(OBJDIR)/juce_PreferencesPanel.o \ + $(OBJDIR)/juce_BubbleMessageComponent.o \ $(OBJDIR)/juce_MagnifierComponent.o \ $(OBJDIR)/juce_MidiKeyboardComponent.o \ - $(OBJDIR)/juce_OpenGLComponent.o \ - $(OBJDIR)/juce_PreferencesPanel.o \ - $(OBJDIR)/juce_QuickTimeMovieComponent.o \ - $(OBJDIR)/juce_SystemTrayIconComponent.o \ - $(OBJDIR)/juce_AlertWindow.o \ - $(OBJDIR)/juce_ComponentPeer.o \ - $(OBJDIR)/juce_DialogWindow.o \ - $(OBJDIR)/juce_DocumentWindow.o \ - $(OBJDIR)/juce_ResizableWindow.o \ - $(OBJDIR)/juce_SplashScreen.o \ - $(OBJDIR)/juce_ThreadWithProgressWindow.o \ - $(OBJDIR)/juce_TooltipWindow.o \ + $(OBJDIR)/juce_AudioDeviceSelectorComponent.o \ $(OBJDIR)/juce_TopLevelWindow.o \ + $(OBJDIR)/juce_AlertWindow.o \ + $(OBJDIR)/juce_DocumentWindow.o \ + $(OBJDIR)/juce_ThreadWithProgressWindow.o \ + $(OBJDIR)/juce_DialogWindow.o \ + $(OBJDIR)/juce_SplashScreen.o \ + $(OBJDIR)/juce_ResizableWindow.o \ + $(OBJDIR)/juce_ComponentPeer.o \ + $(OBJDIR)/juce_TooltipWindow.o \ $(OBJDIR)/juce_linux_Audio.o \ - $(OBJDIR)/juce_linux_AudioCDReader.o \ $(OBJDIR)/juce_linux_FileChooser.o \ $(OBJDIR)/juce_linux_Files.o \ - $(OBJDIR)/juce_linux_Fonts.o \ - $(OBJDIR)/juce_linux_Messaging.o \ $(OBJDIR)/juce_linux_Midi.o \ $(OBJDIR)/juce_linux_NamedPipe.o \ - $(OBJDIR)/juce_linux_Network.o \ $(OBJDIR)/juce_linux_SystemStats.o \ - $(OBJDIR)/juce_linux_Threads.o \ - $(OBJDIR)/juce_linux_WebBrowserComponent.o \ $(OBJDIR)/juce_linux_Windowing.o \ + $(OBJDIR)/juce_linux_WebBrowserComponent.o \ + $(OBJDIR)/juce_linux_Network.o \ + $(OBJDIR)/juce_linux_Fonts.o \ + $(OBJDIR)/juce_linux_Threads.o \ + $(OBJDIR)/juce_linux_AudioCDReader.o \ + $(OBJDIR)/juce_linux_Messaging.o \ MKDIR_TYPE := msdos CMD := $(subst \,\\,$(ComSpec)$(COMSPEC)) @@ -342,6 +341,11 @@ else -@if exist $(subst /,\,$(OBJDIR)) rmdir /s /q $(subst /,\,$(OBJDIR)) endif +$(OBJDIR)/juce_RelativeTime.o: ../../src/juce_core/basics/juce_RelativeTime.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_FileLogger.o: ../../src/juce_core/basics/juce_FileLogger.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -357,7 +361,7 @@ $(OBJDIR)/juce_Random.o: ../../src/juce_core/basics/juce_Random.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_RelativeTime.o: ../../src/juce_core/basics/juce_RelativeTime.cpp +$(OBJDIR)/juce_Time.o: ../../src/juce_core/basics/juce_Time.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -367,32 +371,27 @@ $(OBJDIR)/juce_SystemStats.o: ../../src/juce_core/basics/juce_SystemStats.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Time.o: ../../src/juce_core/basics/juce_Time.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_BlowFish.o: ../../src/juce_core/cryptography/juce_BlowFish.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_MD5.o: ../../src/juce_core/cryptography/juce_MD5.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_Primes.o: ../../src/juce_core/cryptography/juce_Primes.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_RSAKey.o: ../../src/juce_core/cryptography/juce_RSAKey.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_BitArray.o: ../../src/juce_core/containers/juce_BitArray.cpp +$(OBJDIR)/juce_Primes.o: ../../src/juce_core/cryptography/juce_Primes.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_MD5.o: ../../src/juce_core/cryptography/juce_MD5.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_PropertySet.o: ../../src/juce_core/containers/juce_PropertySet.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -402,7 +401,7 @@ $(OBJDIR)/juce_MemoryBlock.o: ../../src/juce_core/containers/juce_MemoryBlock.cp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_PropertySet.o: ../../src/juce_core/containers/juce_PropertySet.cpp +$(OBJDIR)/juce_BitArray.o: ../../src/juce_core/containers/juce_BitArray.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -417,16 +416,6 @@ $(OBJDIR)/juce_OutputStream.o: ../../src/juce_core/io/juce_OutputStream.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_DirectoryIterator.o: ../../src/juce_core/io/files/juce_DirectoryIterator.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_File.o: ../../src/juce_core/io/files/juce_File.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_FileInputStream.o: ../../src/juce_core/io/files/juce_FileInputStream.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -437,6 +426,11 @@ $(OBJDIR)/juce_FileOutputStream.o: ../../src/juce_core/io/files/juce_FileOutputS @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_DirectoryIterator.o: ../../src/juce_core/io/files/juce_DirectoryIterator.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_FileSearchPath.o: ../../src/juce_core/io/files/juce_FileSearchPath.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -447,7 +441,7 @@ $(OBJDIR)/juce_NamedPipe.o: ../../src/juce_core/io/files/juce_NamedPipe.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Socket.o: ../../src/juce_core/io/network/juce_Socket.cpp +$(OBJDIR)/juce_File.o: ../../src/juce_core/io/files/juce_File.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -457,22 +451,7 @@ $(OBJDIR)/juce_URL.o: ../../src/juce_core/io/network/juce_URL.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_BufferedInputStream.o: ../../src/juce_core/io/streams/juce_BufferedInputStream.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_FileInputSource.o: ../../src/juce_core/io/streams/juce_FileInputSource.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_GZIPCompressorOutputStream.o: ../../src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_GZIPDecompressorInputStream.o: ../../src/juce_core/io/streams/juce_GZIPDecompressorInputStream.cpp +$(OBJDIR)/juce_Socket.o: ../../src/juce_core/io/network/juce_Socket.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -492,12 +471,27 @@ $(OBJDIR)/juce_SubregionStream.o: ../../src/juce_core/io/streams/juce_SubregionS @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_PerformanceCounter.o: ../../src/juce_core/misc/juce_PerformanceCounter.cpp +$(OBJDIR)/juce_BufferedInputStream.o: ../../src/juce_core/io/streams/juce_BufferedInputStream.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Uuid.o: ../../src/juce_core/misc/juce_Uuid.cpp +$(OBJDIR)/juce_FileInputSource.o: ../../src/juce_core/io/streams/juce_FileInputSource.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_GZIPDecompressorInputStream.o: ../../src/juce_core/io/streams/juce_GZIPDecompressorInputStream.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_GZIPCompressorOutputStream.o: ../../src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_PerformanceCounter.o: ../../src/juce_core/misc/juce_PerformanceCounter.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -507,22 +501,7 @@ $(OBJDIR)/juce_ZipFile.o: ../../src/juce_core/misc/juce_ZipFile.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_CharacterFunctions.o: ../../src/juce_core/text/juce_CharacterFunctions.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_LocalisedStrings.o: ../../src/juce_core/text/juce_LocalisedStrings.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_String.o: ../../src/juce_core/text/juce_String.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_StringArray.o: ../../src/juce_core/text/juce_StringArray.cpp +$(OBJDIR)/juce_Uuid.o: ../../src/juce_core/misc/juce_Uuid.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -532,7 +511,17 @@ $(OBJDIR)/juce_StringPairArray.o: ../../src/juce_core/text/juce_StringPairArray. @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_XmlDocument.o: ../../src/juce_core/text/juce_XmlDocument.cpp +$(OBJDIR)/juce_CharacterFunctions.o: ../../src/juce_core/text/juce_CharacterFunctions.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_StringArray.o: ../../src/juce_core/text/juce_StringArray.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_String.o: ../../src/juce_core/text/juce_String.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -542,6 +531,16 @@ $(OBJDIR)/juce_XmlElement.o: ../../src/juce_core/text/juce_XmlElement.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_LocalisedStrings.o: ../../src/juce_core/text/juce_LocalisedStrings.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_XmlDocument.o: ../../src/juce_core/text/juce_XmlDocument.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_InterProcessLock.o: ../../src/juce_core/threads/juce_InterProcessLock.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -552,11 +551,6 @@ $(OBJDIR)/juce_ReadWriteLock.o: ../../src/juce_core/threads/juce_ReadWriteLock.c @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Thread.o: ../../src/juce_core/threads/juce_Thread.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_ThreadPool.o: ../../src/juce_core/threads/juce_ThreadPool.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -567,12 +561,7 @@ $(OBJDIR)/juce_TimeSliceThread.o: ../../src/juce_core/threads/juce_TimeSliceThre @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Application.o: ../../src/juce_appframework/application/juce_Application.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ApplicationCommandInfo.o: ../../src/juce_appframework/application/juce_ApplicationCommandInfo.cpp +$(OBJDIR)/juce_Thread.o: ../../src/juce_core/threads/juce_Thread.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -582,11 +571,21 @@ $(OBJDIR)/juce_ApplicationCommandManager.o: ../../src/juce_appframework/applicat @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_PropertiesFile.o: ../../src/juce_appframework/application/juce_PropertiesFile.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_ApplicationCommandTarget.o: ../../src/juce_appframework/application/juce_ApplicationCommandTarget.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_ApplicationCommandInfo.o: ../../src/juce_appframework/application/juce_ApplicationCommandInfo.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_ApplicationProperties.o: ../../src/juce_appframework/application/juce_ApplicationProperties.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -597,12 +596,7 @@ $(OBJDIR)/juce_DeletedAtShutdown.o: ../../src/juce_appframework/application/juce @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_PropertiesFile.o: ../../src/juce_appframework/application/juce_PropertiesFile.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioDataConverters.o: ../../src/juce_appframework/audio/dsp/juce_AudioDataConverters.cpp +$(OBJDIR)/juce_Application.o: ../../src/juce_appframework/application/juce_Application.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -612,6 +606,11 @@ $(OBJDIR)/juce_AudioSampleBuffer.o: ../../src/juce_appframework/audio/dsp/juce_A @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_AudioDataConverters.o: ../../src/juce_appframework/audio/dsp/juce_AudioDataConverters.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_IIRFilter.o: ../../src/juce_appframework/audio/dsp/juce_IIRFilter.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -622,6 +621,11 @@ $(OBJDIR)/juce_MidiBuffer.o: ../../src/juce_appframework/audio/midi/juce_MidiBuf @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_MidiMessageSequence.o: ../../src/juce_appframework/audio/midi/juce_MidiMessageSequence.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_MidiFile.o: ../../src/juce_appframework/audio/midi/juce_MidiFile.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -642,41 +646,46 @@ $(OBJDIR)/juce_MidiMessageCollector.o: ../../src/juce_appframework/audio/midi/ju @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_MidiMessageSequence.o: ../../src/juce_appframework/audio/midi/juce_MidiMessageSequence.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioProcessor.o: ../../src/juce_appframework/audio/processors/juce_AudioProcessor.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioProcessorEditor.o: ../../src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_AudioProcessorGraph.o: ../../src/juce_appframework/audio/processors/juce_AudioProcessorGraph.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_AudioProcessorPlayer.o: ../../src/juce_appframework/audio/processors/juce_AudioProcessorPlayer.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_GenericAudioProcessorEditor.o: ../../src/juce_appframework/audio/processors/juce_GenericAudioProcessorEditor.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_AudioProcessorEditor.o: ../../src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AudioProcessorPlayer.o: ../../src/juce_appframework/audio/processors/juce_AudioProcessorPlayer.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AudioProcessor.o: ../../src/juce_appframework/audio/processors/juce_AudioProcessor.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_AudioPluginFormat.o: ../../src/juce_appframework/audio/plugins/juce_AudioPluginFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_PluginDirectoryScanner.o: ../../src/juce_appframework/audio/plugins/juce_PluginDirectoryScanner.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_PluginDescription.o: ../../src/juce_appframework/audio/plugins/juce_PluginDescription.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_AudioPluginFormatManager.o: ../../src/juce_appframework/audio/plugins/juce_AudioPluginFormatManager.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -692,77 +701,17 @@ $(OBJDIR)/juce_KnownPluginList.o: ../../src/juce_appframework/audio/plugins/juce @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_PluginDescription.o: ../../src/juce_appframework/audio/plugins/juce_PluginDescription.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_PluginDirectoryScanner.o: ../../src/juce_appframework/audio/plugins/juce_PluginDirectoryScanner.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_PluginListComponent.o: ../../src/juce_appframework/audio/plugins/juce_PluginListComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_AudioUnitPluginFormat.o: ../../src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_VSTPluginFormat.o: ../../src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_AiffAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AiffAudioFormat.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioCDReader.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioCDReader.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioFormat.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioFormatManager.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioFormatManager.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioSubsectionReader.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioSubsectionReader.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioThumbnail.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnail.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioThumbnailCache.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnailCache.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_FlacAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_FlacAudioFormat.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_OggVorbisAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_OggVorbisAudioFormat.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_QuickTimeAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp +$(OBJDIR)/juce_AudioUnitPluginFormat.o: ../../src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -772,12 +721,52 @@ $(OBJDIR)/juce_WavAudioFormat.o: ../../src/juce_appframework/audio/audio_file_fo @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_AudioFormatReaderSource.o: ../../src/juce_appframework/audio/audio_sources/juce_AudioFormatReaderSource.cpp +$(OBJDIR)/juce_AudioThumbnailCache.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnailCache.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_AudioSourcePlayer.o: ../../src/juce_appframework/audio/audio_sources/juce_AudioSourcePlayer.cpp +$(OBJDIR)/juce_AudioCDReader.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioCDReader.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AiffAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AiffAudioFormat.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AudioFormatManager.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioFormatManager.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AudioThumbnail.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnail.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioFormat.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AudioSubsectionReader.o: ../../src/juce_appframework/audio/audio_file_formats/juce_AudioSubsectionReader.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_OggVorbisAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_OggVorbisAudioFormat.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_FlacAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_FlacAudioFormat.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_QuickTimeAudioFormat.o: ../../src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -787,17 +776,27 @@ $(OBJDIR)/juce_AudioTransportSource.o: ../../src/juce_appframework/audio/audio_s @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_ResamplingAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_ResamplingAudioSource.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_BufferingAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_BufferingAudioSource.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_AudioFormatReaderSource.o: ../../src/juce_appframework/audio/audio_sources/juce_AudioFormatReaderSource.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_ChannelRemappingAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_ChannelRemappingAudioSource.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_IIRFilterAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_IIRFilterAudioSource.cpp +$(OBJDIR)/juce_ToneGeneratorAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_ToneGeneratorAudioSource.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -807,17 +806,12 @@ $(OBJDIR)/juce_MixerAudioSource.o: ../../src/juce_appframework/audio/audio_sourc @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ResamplingAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_ResamplingAudioSource.cpp +$(OBJDIR)/juce_IIRFilterAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_IIRFilterAudioSource.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ToneGeneratorAudioSource.o: ../../src/juce_appframework/audio/audio_sources/juce_ToneGeneratorAudioSource.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AudioDeviceManager.o: ../../src/juce_appframework/audio/devices/juce_AudioDeviceManager.cpp +$(OBJDIR)/juce_AudioSourcePlayer.o: ../../src/juce_appframework/audio/audio_sources/juce_AudioSourcePlayer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -837,6 +831,11 @@ $(OBJDIR)/juce_MidiOutput.o: ../../src/juce_appframework/audio/devices/juce_Midi @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_AudioDeviceManager.o: ../../src/juce_appframework/audio/devices/juce_AudioDeviceManager.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_Sampler.o: ../../src/juce_appframework/audio/synthesisers/juce_Sampler.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -847,11 +846,6 @@ $(OBJDIR)/juce_Synthesiser.o: ../../src/juce_appframework/audio/synthesisers/juc @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_FileBasedDocument.o: ../../src/juce_appframework/documents/juce_FileBasedDocument.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_RecentlyOpenedFilesList.o: ../../src/juce_appframework/documents/juce_RecentlyOpenedFilesList.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -862,42 +856,7 @@ $(OBJDIR)/juce_UndoManager.o: ../../src/juce_appframework/documents/juce_UndoMan @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ActionBroadcaster.o: ../../src/juce_appframework/events/juce_ActionBroadcaster.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ActionListenerList.o: ../../src/juce_appframework/events/juce_ActionListenerList.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AsyncUpdater.o: ../../src/juce_appframework/events/juce_AsyncUpdater.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ChangeBroadcaster.o: ../../src/juce_appframework/events/juce_ChangeBroadcaster.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ChangeListenerList.o: ../../src/juce_appframework/events/juce_ChangeListenerList.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_InterprocessConnection.o: ../../src/juce_appframework/events/juce_InterprocessConnection.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_InterprocessConnectionServer.o: ../../src/juce_appframework/events/juce_InterprocessConnectionServer.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_Message.o: ../../src/juce_appframework/events/juce_Message.cpp +$(OBJDIR)/juce_FileBasedDocument.o: ../../src/juce_appframework/documents/juce_FileBasedDocument.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -907,12 +866,27 @@ $(OBJDIR)/juce_MessageListener.o: ../../src/juce_appframework/events/juce_Messag @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_MessageManager.o: ../../src/juce_appframework/events/juce_MessageManager.cpp +$(OBJDIR)/juce_MultiTimer.o: ../../src/juce_appframework/events/juce_MultiTimer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_MultiTimer.o: ../../src/juce_appframework/events/juce_MultiTimer.cpp +$(OBJDIR)/juce_ChangeBroadcaster.o: ../../src/juce_appframework/events/juce_ChangeBroadcaster.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_InterprocessConnection.o: ../../src/juce_appframework/events/juce_InterprocessConnection.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_AsyncUpdater.o: ../../src/juce_appframework/events/juce_AsyncUpdater.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ActionListenerList.o: ../../src/juce_appframework/events/juce_ActionListenerList.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -922,7 +896,27 @@ $(OBJDIR)/juce_Timer.o: ../../src/juce_appframework/events/juce_Timer.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Brush.o: ../../src/juce_appframework/gui/graphics/brushes/juce_Brush.cpp +$(OBJDIR)/juce_Message.o: ../../src/juce_appframework/events/juce_Message.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_InterprocessConnectionServer.o: ../../src/juce_appframework/events/juce_InterprocessConnectionServer.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ChangeListenerList.o: ../../src/juce_appframework/events/juce_ChangeListenerList.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ActionBroadcaster.o: ../../src/juce_appframework/events/juce_ActionBroadcaster.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_MessageManager.o: ../../src/juce_appframework/events/juce_MessageManager.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -932,17 +926,17 @@ $(OBJDIR)/juce_GradientBrush.o: ../../src/juce_appframework/gui/graphics/brushes @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ImageBrush.o: ../../src/juce_appframework/gui/graphics/brushes/juce_ImageBrush.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_SolidColourBrush.o: ../../src/juce_appframework/gui/graphics/brushes/juce_SolidColourBrush.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Colour.o: ../../src/juce_appframework/gui/graphics/colour/juce_Colour.cpp +$(OBJDIR)/juce_Brush.o: ../../src/juce_appframework/gui/graphics/brushes/juce_Brush.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ImageBrush.o: ../../src/juce_appframework/gui/graphics/brushes/juce_ImageBrush.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -952,32 +946,27 @@ $(OBJDIR)/juce_ColourGradient.o: ../../src/juce_appframework/gui/graphics/colour @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_Colour.o: ../../src/juce_appframework/gui/graphics/colour/juce_Colour.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_Colours.o: ../../src/juce_appframework/gui/graphics/colour/juce_Colours.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_EdgeTable.o: ../../src/juce_appframework/gui/graphics/contexts/juce_EdgeTable.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_Graphics.o: ../../src/juce_appframework/gui/graphics/contexts/juce_Graphics.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_Justification.o: ../../src/juce_appframework/gui/graphics/contexts/juce_Justification.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_LowLevelGraphicsPostScriptRenderer.o: ../../src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp +$(OBJDIR)/juce_EdgeTable.o: ../../src/juce_appframework/gui/graphics/contexts/juce_EdgeTable.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_LowLevelGraphicsSoftwareRenderer.o: ../../src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp +$(OBJDIR)/juce_LowLevelGraphicsPostScriptRenderer.o: ../../src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -987,7 +976,12 @@ $(OBJDIR)/juce_RectanglePlacement.o: ../../src/juce_appframework/gui/graphics/co @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Drawable.o: ../../src/juce_appframework/gui/graphics/drawables/juce_Drawable.cpp +$(OBJDIR)/juce_Graphics.o: ../../src/juce_appframework/gui/graphics/contexts/juce_Graphics.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_LowLevelGraphicsSoftwareRenderer.o: ../../src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1002,11 +996,6 @@ $(OBJDIR)/juce_DrawableImage.o: ../../src/juce_appframework/gui/graphics/drawabl @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_DrawablePath.o: ../../src/juce_appframework/gui/graphics/drawables/juce_DrawablePath.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_DrawableText.o: ../../src/juce_appframework/gui/graphics/drawables/juce_DrawableText.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -1017,7 +1006,17 @@ $(OBJDIR)/juce_SVGParser.o: ../../src/juce_appframework/gui/graphics/drawables/j @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_DropShadowEffect.o: ../../src/juce_appframework/gui/graphics/effects/juce_DropShadowEffect.cpp +$(OBJDIR)/juce_DrawablePath.o: ../../src/juce_appframework/gui/graphics/drawables/juce_DrawablePath.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_Drawable.o: ../../src/juce_appframework/gui/graphics/drawables/juce_Drawable.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ReduceOpacityEffect.o: ../../src/juce_appframework/gui/graphics/effects/juce_ReduceOpacityEffect.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1027,7 +1026,17 @@ $(OBJDIR)/juce_GlowEffect.o: ../../src/juce_appframework/gui/graphics/effects/ju @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ReduceOpacityEffect.o: ../../src/juce_appframework/gui/graphics/effects/juce_ReduceOpacityEffect.cpp +$(OBJDIR)/juce_DropShadowEffect.o: ../../src/juce_appframework/gui/graphics/effects/juce_DropShadowEffect.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_Typeface.o: ../../src/juce_appframework/gui/graphics/fonts/juce_Typeface.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_TextLayout.o: ../../src/juce_appframework/gui/graphics/fonts/juce_TextLayout.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1042,27 +1051,7 @@ $(OBJDIR)/juce_GlyphArrangement.o: ../../src/juce_appframework/gui/graphics/font @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_TextLayout.o: ../../src/juce_appframework/gui/graphics/fonts/juce_TextLayout.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_Typeface.o: ../../src/juce_appframework/gui/graphics/fonts/juce_Typeface.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AffineTransform.o: ../../src/juce_appframework/gui/graphics/geometry/juce_AffineTransform.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_BorderSize.o: ../../src/juce_appframework/gui/graphics/geometry/juce_BorderSize.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_Line.o: ../../src/juce_appframework/gui/graphics/geometry/juce_Line.cpp +$(OBJDIR)/juce_Point.o: ../../src/juce_appframework/gui/graphics/geometry/juce_Point.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1072,17 +1061,7 @@ $(OBJDIR)/juce_Path.o: ../../src/juce_appframework/gui/graphics/geometry/juce_Pa @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_PathIterator.o: ../../src/juce_appframework/gui/graphics/geometry/juce_PathIterator.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_PathStrokeType.o: ../../src/juce_appframework/gui/graphics/geometry/juce_PathStrokeType.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_Point.o: ../../src/juce_appframework/gui/graphics/geometry/juce_Point.cpp +$(OBJDIR)/juce_RectangleList.o: ../../src/juce_appframework/gui/graphics/geometry/juce_RectangleList.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1097,17 +1076,27 @@ $(OBJDIR)/juce_Rectangle.o: ../../src/juce_appframework/gui/graphics/geometry/ju @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_RectangleList.o: ../../src/juce_appframework/gui/graphics/geometry/juce_RectangleList.cpp +$(OBJDIR)/juce_PathIterator.o: ../../src/juce_appframework/gui/graphics/geometry/juce_PathIterator.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Image.o: ../../src/juce_appframework/gui/graphics/imaging/juce_Image.cpp +$(OBJDIR)/juce_BorderSize.o: ../../src/juce_appframework/gui/graphics/geometry/juce_BorderSize.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ImageCache.o: ../../src/juce_appframework/gui/graphics/imaging/juce_ImageCache.cpp +$(OBJDIR)/juce_AffineTransform.o: ../../src/juce_appframework/gui/graphics/geometry/juce_AffineTransform.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_PathStrokeType.o: ../../src/juce_appframework/gui/graphics/geometry/juce_PathStrokeType.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_Line.o: ../../src/juce_appframework/gui/graphics/geometry/juce_Line.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1122,17 +1111,27 @@ $(OBJDIR)/juce_ImageFileFormat.o: ../../src/juce_appframework/gui/graphics/imagi @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_Image.o: ../../src/juce_appframework/gui/graphics/imaging/juce_Image.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ImageCache.o: ../../src/juce_appframework/gui/graphics/imaging/juce_ImageCache.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_GIFLoader.o: ../../src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_GIFLoader.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_JPEGLoader.o: ../../src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp +$(OBJDIR)/juce_PNGLoader.o: ../../src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_PNGLoader.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_PNGLoader.o: ../../src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_PNGLoader.cpp +$(OBJDIR)/juce_JPEGLoader.o: ../../src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1152,7 +1151,17 @@ $(OBJDIR)/juce_Desktop.o: ../../src/juce_appframework/gui/components/juce_Deskto @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ArrowButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ArrowButton.cpp +$(OBJDIR)/juce_ShapeButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ShapeButton.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ToolbarButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ToolbarButton.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_HyperlinkButton.o: ../../src/juce_appframework/gui/components/buttons/juce_HyperlinkButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1167,7 +1176,7 @@ $(OBJDIR)/juce_DrawableButton.o: ../../src/juce_appframework/gui/components/butt @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_HyperlinkButton.o: ../../src/juce_appframework/gui/components/buttons/juce_HyperlinkButton.cpp +$(OBJDIR)/juce_ToggleButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ToggleButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1177,37 +1186,12 @@ $(OBJDIR)/juce_ImageButton.o: ../../src/juce_appframework/gui/components/buttons @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ShapeButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ShapeButton.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_TextButton.o: ../../src/juce_appframework/gui/components/buttons/juce_TextButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ToggleButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ToggleButton.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ToolbarButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ToolbarButton.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ComboBox.o: ../../src/juce_appframework/gui/components/controls/juce_ComboBox.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_Label.o: ../../src/juce_appframework/gui/components/controls/juce_Label.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ListBox.o: ../../src/juce_appframework/gui/components/controls/juce_ListBox.cpp +$(OBJDIR)/juce_ArrowButton.o: ../../src/juce_appframework/gui/components/buttons/juce_ArrowButton.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1217,12 +1201,7 @@ $(OBJDIR)/juce_ProgressBar.o: ../../src/juce_appframework/gui/components/control @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_Slider.o: ../../src/juce_appframework/gui/components/controls/juce_Slider.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_TableHeaderComponent.o: ../../src/juce_appframework/gui/components/controls/juce_TableHeaderComponent.cpp +$(OBJDIR)/juce_TreeView.o: ../../src/juce_appframework/gui/components/controls/juce_TreeView.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1232,7 +1211,12 @@ $(OBJDIR)/juce_TableListBox.o: ../../src/juce_appframework/gui/components/contro @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_TextEditor.o: ../../src/juce_appframework/gui/components/controls/juce_TextEditor.cpp +$(OBJDIR)/juce_ToolbarItemPalette.o: ../../src/juce_appframework/gui/components/controls/juce_ToolbarItemPalette.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_Label.o: ../../src/juce_appframework/gui/components/controls/juce_Label.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1247,12 +1231,27 @@ $(OBJDIR)/juce_ToolbarItemComponent.o: ../../src/juce_appframework/gui/component @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ToolbarItemPalette.o: ../../src/juce_appframework/gui/components/controls/juce_ToolbarItemPalette.cpp +$(OBJDIR)/juce_ComboBox.o: ../../src/juce_appframework/gui/components/controls/juce_ComboBox.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_TreeView.o: ../../src/juce_appframework/gui/components/controls/juce_TreeView.cpp +$(OBJDIR)/juce_Slider.o: ../../src/juce_appframework/gui/components/controls/juce_Slider.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_TableHeaderComponent.o: ../../src/juce_appframework/gui/components/controls/juce_TableHeaderComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ListBox.o: ../../src/juce_appframework/gui/components/controls/juce_ListBox.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_TextEditor.o: ../../src/juce_appframework/gui/components/controls/juce_TextEditor.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1262,37 +1261,17 @@ $(OBJDIR)/juce_DirectoryContentsDisplayComponent.o: ../../src/juce_appframework/ @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_DirectoryContentsList.o: ../../src/juce_appframework/gui/components/filebrowser/juce_DirectoryContentsList.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_FileBrowserComponent.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_FileChooser.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileChooser.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_FileChooserDialogBox.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileChooserDialogBox.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_FileFilter.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileFilter.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_FileListComponent.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileListComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_FilenameComponent.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FilenameComponent.cpp +$(OBJDIR)/juce_WildcardFileFilter.o: ../../src/juce_appframework/gui/components/filebrowser/juce_WildcardFileFilter.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1302,7 +1281,17 @@ $(OBJDIR)/juce_FileSearchPathListComponent.o: ../../src/juce_appframework/gui/co @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_FileTreeComponent.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileTreeComponent.cpp +$(OBJDIR)/juce_FileChooser.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileChooser.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_FilenameComponent.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FilenameComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_FileBrowserComponent.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileBrowserComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1312,12 +1301,27 @@ $(OBJDIR)/juce_ImagePreviewComponent.o: ../../src/juce_appframework/gui/componen @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_WildcardFileFilter.o: ../../src/juce_appframework/gui/components/filebrowser/juce_WildcardFileFilter.cpp +$(OBJDIR)/juce_DirectoryContentsList.o: ../../src/juce_appframework/gui/components/filebrowser/juce_DirectoryContentsList.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_KeyboardFocusTraverser.o: ../../src/juce_appframework/gui/components/keyboard/juce_KeyboardFocusTraverser.cpp +$(OBJDIR)/juce_FileTreeComponent.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileTreeComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_FileFilter.o: ../../src/juce_appframework/gui/components/filebrowser/juce_FileFilter.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ModifierKeys.o: ../../src/juce_appframework/gui/components/keyboard/juce_ModifierKeys.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_KeyPressMappingSet.o: ../../src/juce_appframework/gui/components/keyboard/juce_KeyPressMappingSet.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1332,72 +1336,32 @@ $(OBJDIR)/juce_KeyMappingEditorComponent.o: ../../src/juce_appframework/gui/comp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_KeyboardFocusTraverser.o: ../../src/juce_appframework/gui/components/keyboard/juce_KeyboardFocusTraverser.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_KeyPress.o: ../../src/juce_appframework/gui/components/keyboard/juce_KeyPress.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_KeyPressMappingSet.o: ../../src/juce_appframework/gui/components/keyboard/juce_KeyPressMappingSet.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ModifierKeys.o: ../../src/juce_appframework/gui/components/keyboard/juce_ModifierKeys.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ComponentAnimator.o: ../../src/juce_appframework/gui/components/layout/juce_ComponentAnimator.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ComponentBoundsConstrainer.o: ../../src/juce_appframework/gui/components/layout/juce_ComponentBoundsConstrainer.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ComponentMovementWatcher.o: ../../src/juce_appframework/gui/components/layout/juce_ComponentMovementWatcher.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_GroupComponent.o: ../../src/juce_appframework/gui/components/layout/juce_GroupComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_MultiDocumentPanel.o: ../../src/juce_appframework/gui/components/layout/juce_MultiDocumentPanel.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ResizableBorderComponent.o: ../../src/juce_appframework/gui/components/layout/juce_ResizableBorderComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ResizableCornerComponent.o: ../../src/juce_appframework/gui/components/layout/juce_ResizableCornerComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ScrollBar.o: ../../src/juce_appframework/gui/components/layout/juce_ScrollBar.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_StretchableLayoutManager.o: ../../src/juce_appframework/gui/components/layout/juce_StretchableLayoutManager.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_StretchableLayoutResizerBar.o: ../../src/juce_appframework/gui/components/layout/juce_StretchableLayoutResizerBar.cpp +$(OBJDIR)/juce_StretchableObjectResizer.o: ../../src/juce_appframework/gui/components/layout/juce_StretchableObjectResizer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_StretchableObjectResizer.o: ../../src/juce_appframework/gui/components/layout/juce_StretchableObjectResizer.cpp +$(OBJDIR)/juce_ComponentAnimator.o: ../../src/juce_appframework/gui/components/layout/juce_ComponentAnimator.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ResizableBorderComponent.o: ../../src/juce_appframework/gui/components/layout/juce_ResizableBorderComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1412,12 +1376,42 @@ $(OBJDIR)/juce_TabbedComponent.o: ../../src/juce_appframework/gui/components/lay @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_MultiDocumentPanel.o: ../../src/juce_appframework/gui/components/layout/juce_MultiDocumentPanel.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ResizableCornerComponent.o: ../../src/juce_appframework/gui/components/layout/juce_ResizableCornerComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_GroupComponent.o: ../../src/juce_appframework/gui/components/layout/juce_GroupComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_Viewport.o: ../../src/juce_appframework/gui/components/layout/juce_Viewport.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_LookAndFeel.o: ../../src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp +$(OBJDIR)/juce_ScrollBar.o: ../../src/juce_appframework/gui/components/layout/juce_ScrollBar.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ComponentBoundsConstrainer.o: ../../src/juce_appframework/gui/components/layout/juce_ComponentBoundsConstrainer.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_StretchableLayoutResizerBar.o: ../../src/juce_appframework/gui/components/layout/juce_StretchableLayoutResizerBar.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ComponentMovementWatcher.o: ../../src/juce_appframework/gui/components/layout/juce_ComponentMovementWatcher.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1427,6 +1421,11 @@ $(OBJDIR)/juce_OldSchoolLookAndFeel.o: ../../src/juce_appframework/gui/component @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_LookAndFeel.o: ../../src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + $(OBJDIR)/juce_MenuBarComponent.o: ../../src/juce_appframework/gui/components/menus/juce_MenuBarComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -1442,27 +1441,17 @@ $(OBJDIR)/juce_PopupMenu.o: ../../src/juce_appframework/gui/components/menus/juc @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ComponentDragger.o: ../../src/juce_appframework/gui/components/mouse/juce_ComponentDragger.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_DragAndDropContainer.o: ../../src/juce_appframework/gui/components/mouse/juce_DragAndDropContainer.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_MouseCursor.o: ../../src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_MouseEvent.o: ../../src/juce_appframework/gui/components/mouse/juce_MouseEvent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_MouseHoverDetector.o: ../../src/juce_appframework/gui/components/mouse/juce_MouseHoverDetector.cpp +$(OBJDIR)/juce_ComponentDragger.o: ../../src/juce_appframework/gui/components/mouse/juce_ComponentDragger.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1472,27 +1461,12 @@ $(OBJDIR)/juce_MouseListener.o: ../../src/juce_appframework/gui/components/mouse @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_BooleanPropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_BooleanPropertyComponent.cpp +$(OBJDIR)/juce_MouseCursor.o: ../../src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_ButtonPropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_ButtonPropertyComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ChoicePropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_ChoicePropertyComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_PropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_PropertyComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_PropertyPanel.o: ../../src/juce_appframework/gui/components/properties/juce_PropertyPanel.cpp +$(OBJDIR)/juce_MouseHoverDetector.o: ../../src/juce_appframework/gui/components/mouse/juce_MouseHoverDetector.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1507,17 +1481,32 @@ $(OBJDIR)/juce_TextPropertyComponent.o: ../../src/juce_appframework/gui/componen @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_AudioDeviceSelectorComponent.o: ../../src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp +$(OBJDIR)/juce_ChoicePropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_ChoicePropertyComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_BubbleComponent.o: ../../src/juce_appframework/gui/components/special/juce_BubbleComponent.cpp +$(OBJDIR)/juce_ButtonPropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_ButtonPropertyComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_BubbleMessageComponent.o: ../../src/juce_appframework/gui/components/special/juce_BubbleMessageComponent.cpp +$(OBJDIR)/juce_BooleanPropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_BooleanPropertyComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_PropertyComponent.o: ../../src/juce_appframework/gui/components/properties/juce_PropertyComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_PropertyPanel.o: ../../src/juce_appframework/gui/components/properties/juce_PropertyPanel.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_DropShadower.o: ../../src/juce_appframework/gui/components/special/juce_DropShadower.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1527,7 +1516,27 @@ $(OBJDIR)/juce_ColourSelector.o: ../../src/juce_appframework/gui/components/spec @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_DropShadower.o: ../../src/juce_appframework/gui/components/special/juce_DropShadower.cpp +$(OBJDIR)/juce_OpenGLComponent.o: ../../src/juce_appframework/gui/components/special/juce_OpenGLComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_BubbleComponent.o: ../../src/juce_appframework/gui/components/special/juce_BubbleComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_SystemTrayIconComponent.o: ../../src/juce_appframework/gui/components/special/juce_SystemTrayIconComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_PreferencesPanel.o: ../../src/juce_appframework/gui/components/special/juce_PreferencesPanel.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_BubbleMessageComponent.o: ../../src/juce_appframework/gui/components/special/juce_BubbleMessageComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1542,62 +1551,7 @@ $(OBJDIR)/juce_MidiKeyboardComponent.o: ../../src/juce_appframework/gui/componen @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_OpenGLComponent.o: ../../src/juce_appframework/gui/components/special/juce_OpenGLComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_PreferencesPanel.o: ../../src/juce_appframework/gui/components/special/juce_PreferencesPanel.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_QuickTimeMovieComponent.o: ../../src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_SystemTrayIconComponent.o: ../../src/juce_appframework/gui/components/special/juce_SystemTrayIconComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_AlertWindow.o: ../../src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ComponentPeer.o: ../../src/juce_appframework/gui/components/windows/juce_ComponentPeer.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_DialogWindow.o: ../../src/juce_appframework/gui/components/windows/juce_DialogWindow.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_DocumentWindow.o: ../../src/juce_appframework/gui/components/windows/juce_DocumentWindow.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ResizableWindow.o: ../../src/juce_appframework/gui/components/windows/juce_ResizableWindow.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_SplashScreen.o: ../../src/juce_appframework/gui/components/windows/juce_SplashScreen.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_ThreadWithProgressWindow.o: ../../src/juce_appframework/gui/components/windows/juce_ThreadWithProgressWindow.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_TooltipWindow.o: ../../src/juce_appframework/gui/components/windows/juce_TooltipWindow.cpp +$(OBJDIR)/juce_AudioDeviceSelectorComponent.o: ../../src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1607,12 +1561,47 @@ $(OBJDIR)/juce_TopLevelWindow.o: ../../src/juce_appframework/gui/components/wind @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_linux_Audio.o: platform_specific_code/juce_linux_Audio.cpp +$(OBJDIR)/juce_AlertWindow.o: ../../src/juce_appframework/gui/components/windows/juce_AlertWindow.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_linux_AudioCDReader.o: platform_specific_code/juce_linux_AudioCDReader.cpp +$(OBJDIR)/juce_DocumentWindow.o: ../../src/juce_appframework/gui/components/windows/juce_DocumentWindow.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ThreadWithProgressWindow.o: ../../src/juce_appframework/gui/components/windows/juce_ThreadWithProgressWindow.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_DialogWindow.o: ../../src/juce_appframework/gui/components/windows/juce_DialogWindow.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_SplashScreen.o: ../../src/juce_appframework/gui/components/windows/juce_SplashScreen.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ResizableWindow.o: ../../src/juce_appframework/gui/components/windows/juce_ResizableWindow.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_ComponentPeer.o: ../../src/juce_appframework/gui/components/windows/juce_ComponentPeer.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_TooltipWindow.o: ../../src/juce_appframework/gui/components/windows/juce_TooltipWindow.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_linux_Audio.o: platform_specific_code/juce_linux_Audio.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -1627,16 +1616,6 @@ $(OBJDIR)/juce_linux_Files.o: platform_specific_code/juce_linux_Files.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_linux_Fonts.o: platform_specific_code/juce_linux_Fonts.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_linux_Messaging.o: platform_specific_code/juce_linux_Messaging.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_linux_Midi.o: platform_specific_code/juce_linux_Midi.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @@ -1647,30 +1626,45 @@ $(OBJDIR)/juce_linux_NamedPipe.o: platform_specific_code/juce_linux_NamedPipe.cp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_linux_Network.o: platform_specific_code/juce_linux_Network.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_linux_SystemStats.o: platform_specific_code/juce_linux_SystemStats.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/juce_linux_Threads.o: platform_specific_code/juce_linux_Threads.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/juce_linux_WebBrowserComponent.o: platform_specific_code/juce_linux_WebBrowserComponent.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - $(OBJDIR)/juce_linux_Windowing.o: platform_specific_code/juce_linux_Windowing.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/juce_linux_WebBrowserComponent.o: platform_specific_code/juce_linux_WebBrowserComponent.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_linux_Network.o: platform_specific_code/juce_linux_Network.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_linux_Fonts.o: platform_specific_code/juce_linux_Fonts.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_linux_Threads.o: platform_specific_code/juce_linux_Threads.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_linux_AudioCDReader.o: platform_specific_code/juce_linux_AudioCDReader.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/juce_linux_Messaging.o: platform_specific_code/juce_linux_Messaging.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + -include $(OBJECTS:%.o=%.d) diff --git a/build/linux/platform_specific_code/juce_linux_Audio.cpp b/build/linux/platform_specific_code/juce_linux_Audio.cpp index 3a592f7d0d..3414176133 100644 --- a/build/linux/platform_specific_code/juce_linux_Audio.cpp +++ b/build/linux/platform_specific_code/juce_linux_Audio.cpp @@ -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; diff --git a/build/linux/platform_specific_code/juce_linux_Messaging.cpp b/build/linux/platform_specific_code/juce_linux_Messaging.cpp index 1215def31f..87a848e5c2 100644 --- a/build/linux/platform_specific_code/juce_linux_Messaging.cpp +++ b/build/linux/platform_specific_code/juce_linux_Messaging.cpp @@ -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; } diff --git a/build/linux/platform_specific_code/juce_linux_Network.cpp b/build/linux/platform_specific_code/juce_linux_Network.cpp index 1b1df98a7d..1fa968902b 100644 --- a/build/linux/platform_specific_code/juce_linux_Network.cpp +++ b/build/linux/platform_specific_code/juce_linux_Network.cpp @@ -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 diff --git a/build/linux/platform_specific_code/juce_linux_Threads.cpp b/build/linux/platform_specific_code/juce_linux_Threads.cpp index 24016fa10e..f09002c65b 100644 --- a/build/linux/platform_specific_code/juce_linux_Threads.cpp +++ b/build/linux/platform_specific_code/juce_linux_Threads.cpp @@ -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); } diff --git a/build/linux/platform_specific_code/juce_linux_WebBrowserComponent.cpp b/build/linux/platform_specific_code/juce_linux_WebBrowserComponent.cpp index d5c7acf9ca..e77bf2d905 100644 --- a/build/linux/platform_specific_code/juce_linux_WebBrowserComponent.cpp +++ b/build/linux/platform_specific_code/juce_linux_WebBrowserComponent.cpp @@ -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 diff --git a/build/linux/platform_specific_code/juce_linux_Windowing.cpp b/build/linux/platform_specific_code/juce_linux_Windowing.cpp index 58b0bfd6df..2e80f6743b 100644 --- a/build/linux/platform_specific_code/juce_linux_Windowing.cpp +++ b/build/linux/platform_specific_code/juce_linux_Windowing.cpp @@ -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; diff --git a/build/macosx/Juce.xcodeproj/project.pbxproj b/build/macosx/Juce.xcodeproj/project.pbxproj index fcb24f9d88..f8bd94fe0a 100644 --- a/build/macosx/Juce.xcodeproj/project.pbxproj +++ b/build/macosx/Juce.xcodeproj/project.pbxproj @@ -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 = ""; }; 84052DE208D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ToneGeneratorAudioSource.cpp; sourceTree = ""; }; 84052DE308D095D200BEC0F0 /* juce_ToneGeneratorAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ToneGeneratorAudioSource.h; sourceTree = ""; }; 8406AA590C4BDF90003A0D6A /* juce_MidiOutput.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_MidiOutput.cpp; sourceTree = ""; }; @@ -609,11 +618,10 @@ 84198B0E096D8E2B0022A439 /* juce_MidiOutput.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_MidiOutput.h; sourceTree = ""; }; 84198BB3096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioDeviceSelectorComponent.cpp; sourceTree = ""; }; 84198BB4096EB9E40022A439 /* juce_AudioDeviceSelectorComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioDeviceSelectorComponent.h; sourceTree = ""; }; - 841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioUnitPluginFormat.cpp; sourceTree = ""; }; + 841B22CE0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 2; path = juce_AudioUnitPluginFormat.mm; sourceTree = ""; }; 841B22CF0D2E7FE3009D01AA /* juce_AudioUnitPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioUnitPluginFormat.h; sourceTree = ""; }; 841B22D00D2E7FE3009D01AA /* juce_DirectXPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_DirectXPluginFormat.h; sourceTree = ""; }; 841B22D10D2E7FE3009D01AA /* juce_LADSPAPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_LADSPAPluginFormat.h; sourceTree = ""; }; - 841B22D20D2E7FE3009D01AA /* juce_VSTPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_VSTPluginFormat.cpp; sourceTree = ""; }; 841B22D30D2E7FE3009D01AA /* juce_VSTPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_VSTPluginFormat.h; sourceTree = ""; }; 841B22D40D2E7FE3009D01AA /* juce_AudioPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioPluginFormat.cpp; sourceTree = ""; }; 841B22D50D2E7FE3009D01AA /* juce_AudioPluginFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioPluginFormat.h; sourceTree = ""; }; @@ -639,7 +647,6 @@ 842B63B709D8508F00255DC7 /* juce_FlacAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_FlacAudioFormat.h; sourceTree = ""; }; 842B63B809D8508F00255DC7 /* juce_OggVorbisAudioFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_OggVorbisAudioFormat.cpp; sourceTree = ""; }; 842B63B909D8508F00255DC7 /* juce_OggVorbisAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_OggVorbisAudioFormat.h; sourceTree = ""; }; - 842B64EA09D87B7900255DC7 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = juce.xcconfig; sourceTree = ""; }; 842D3D0D0C0D7CF200E9FFE4 /* juce_MenuBarModel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_MenuBarModel.cpp; sourceTree = ""; }; 842F9D570A19C9AF00B1358D /* juce_ButtonPropertyComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ButtonPropertyComponent.cpp; sourceTree = ""; }; 842F9D580A19C9AF00B1358D /* juce_ButtonPropertyComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ButtonPropertyComponent.h; sourceTree = ""; }; @@ -655,20 +662,21 @@ 842F9D620A19C9AF00B1358D /* juce_TextPropertyComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_TextPropertyComponent.h; sourceTree = ""; }; 842F9DE00A19D2AF00B1358D /* juce_PositionedRectangle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_PositionedRectangle.cpp; sourceTree = ""; }; 842F9DE10A19D2AF00B1358D /* juce_PositionedRectangle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_PositionedRectangle.h; sourceTree = ""; }; + 8435D90C0E9406D2008FBD1C /* juce_mac_Strings.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Strings.mm; sourceTree = ""; }; + 8435D9640E940A3E008FBD1C /* juce_mac_MiscUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MiscUtilities.mm; sourceTree = ""; }; + 8435DA410E95527D008FBD1C /* juce_mac_Debugging.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Debugging.mm; sourceTree = ""; }; 8440CD3C0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ComponentMovementWatcher.cpp; sourceTree = ""; }; 8440CD3D0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ComponentMovementWatcher.h; sourceTree = ""; }; 8440CD610ACD112E0086FFD7 /* juce_SliderListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_SliderListener.h; sourceTree = ""; }; 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 = ""; }; 84581EE80D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_QuickTimeAudioFormat.cpp; sourceTree = ""; }; 84581EE90D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_QuickTimeAudioFormat.h; sourceTree = ""; }; 846034DA09CB374E00E255CF /* juce_InterprocessConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_InterprocessConnection.cpp; sourceTree = ""; }; 846034DB09CB374E00E255CF /* juce_InterprocessConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_InterprocessConnection.h; sourceTree = ""; }; 846034DC09CB374E00E255CF /* juce_InterprocessConnectionServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_InterprocessConnectionServer.cpp; sourceTree = ""; }; 846034DD09CB374E00E255CF /* juce_InterprocessConnectionServer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_InterprocessConnectionServer.h; sourceTree = ""; }; - 8463D31F0E1FC25A003B46B2 /* juce_mac_Fonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Fonts.mm; sourceTree = ""; }; - 8463D3200E1FC25A003B46B2 /* juce_mac_Messaging.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Messaging.mm; sourceTree = ""; }; - 8463D3210E1FC25A003B46B2 /* juce_mac_Windowing.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Windowing.mm; sourceTree = ""; }; 8463D5B5098BD2DD00F9AEC2 /* juce_MidiBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MidiBuffer.cpp; path = midi/juce_MidiBuffer.cpp; sourceTree = ""; }; 8463D5B6098BD2DD00F9AEC2 /* juce_MidiBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_MidiBuffer.h; path = midi/juce_MidiBuffer.h; sourceTree = ""; }; 8463D5B7098BD2DD00F9AEC2 /* juce_MidiFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_MidiFile.cpp; path = midi/juce_MidiFile.cpp; sourceTree = ""; }; @@ -693,12 +701,10 @@ 846927DD0A49ABE600314975 /* juce_RectanglePlacement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_RectanglePlacement.h; sourceTree = ""; }; 846927E00A49ABFD00314975 /* juce_SVGParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_SVGParser.cpp; sourceTree = ""; }; 8478247F0D7816A00082A5C5 /* juce_AudioCDBurner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioCDBurner.h; sourceTree = ""; }; - 847D06460DD88D1100DF6A61 /* juce_mac_Network.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Network.mm; sourceTree = ""; }; 847F72D70C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_DirectoryContentsDisplayComponent.cpp; path = filebrowser/juce_DirectoryContentsDisplayComponent.cpp; sourceTree = ""; }; 847F72D80C2702A000CBECEC /* juce_DirectoryContentsDisplayComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_DirectoryContentsDisplayComponent.h; path = filebrowser/juce_DirectoryContentsDisplayComponent.h; sourceTree = ""; }; 847F72D90C2702A000CBECEC /* juce_FileTreeComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_FileTreeComponent.cpp; path = filebrowser/juce_FileTreeComponent.cpp; sourceTree = ""; }; 847F72DA0C2702A000CBECEC /* juce_FileTreeComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_FileTreeComponent.h; path = filebrowser/juce_FileTreeComponent.h; sourceTree = ""; }; - 848A560A0DDDD3E40041C706 /* juce_mac_WebBrowserComponent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_WebBrowserComponent.mm; sourceTree = ""; }; 848A560D0DDDD3FB0041C706 /* juce_WebBrowserComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_WebBrowserComponent.h; sourceTree = ""; }; 8495BB880D8067B2001D9C0B /* juce_AudioThumbnail.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioThumbnail.cpp; sourceTree = ""; }; 8495BB890D8067B2001D9C0B /* juce_AudioThumbnail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_AudioThumbnail.h; sourceTree = ""; }; @@ -710,11 +716,6 @@ 84A06BAA09CAD6A3006A43BD /* juce_AudioIODevice.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioIODevice.cpp; sourceTree = ""; }; 84A06BAB09CAD6A3006A43BD /* juce_AudioIODeviceType.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioIODeviceType.cpp; sourceTree = ""; }; 84A06BAC09CAD6A3006A43BD /* juce_AudioIODeviceType.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioIODeviceType.h; sourceTree = ""; }; - 84A06BE209CADB06006A43BD /* juce_mac_NamedPipe.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_NamedPipe.cpp; sourceTree = ""; }; - 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 = ""; }; - 84BC4E220C8DD38C00FA249B /* juce_AudioProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioProcessor.cpp; sourceTree = ""; }; + 84BC4E220C8DD38C00FA249B /* juce_AudioProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 2; path = juce_AudioProcessor.cpp; sourceTree = ""; }; 84BC4E230C8DD38C00FA249B /* juce_AudioProcessor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessor.h; sourceTree = ""; }; 84BC4E240C8DD38C00FA249B /* juce_AudioProcessorEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioProcessorEditor.cpp; sourceTree = ""; }; 84BC4E250C8DD38C00FA249B /* juce_AudioProcessorEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessorEditor.h; sourceTree = ""; }; 84BC4E260C8DD38C00FA249B /* juce_AudioProcessorListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioProcessorListener.h; sourceTree = ""; }; 84BC4E270C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_GenericAudioProcessorEditor.cpp; sourceTree = ""; }; 84BC4E280C8DD38C00FA249B /* juce_GenericAudioProcessorEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_GenericAudioProcessorEditor.h; sourceTree = ""; }; - 84BE9E1B0DE56DEB00AB8F23 /* juce_mac_SystemStats.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_SystemStats.mm; sourceTree = ""; }; 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 = ""; }; + 84CA4AF30E9BF8B6004CCC0E /* juce_VSTPluginFormat.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_VSTPluginFormat.mm; sourceTree = ""; }; + 84CA4AFA0E9BF9EC004CCC0E /* juce_VSTPluginFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_VSTPluginFormat.cpp; sourceTree = ""; }; 84D296BB09B763190026C535 /* juce_PropertiesFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_PropertiesFile.cpp; sourceTree = ""; }; 84D296BC09B763190026C535 /* juce_PropertiesFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_PropertiesFile.h; sourceTree = ""; }; + 84E024DB0E94028C003E41AF /* juce_mac_AppleRemote.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_AppleRemote.mm; sourceTree = ""; }; + 84E024DC0E94028C003E41AF /* juce_mac_AudioCDBurner.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_AudioCDBurner.mm; sourceTree = ""; }; + 84E024DD0E94028C003E41AF /* juce_mac_CoreAudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_CoreAudio.cpp; sourceTree = ""; }; + 84E024DE0E94028C003E41AF /* juce_mac_CoreMidi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_CoreMidi.cpp; sourceTree = ""; }; + 84E024DF0E94028C003E41AF /* juce_mac_FileChooser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_FileChooser.mm; sourceTree = ""; }; + 84E024E00E94028C003E41AF /* juce_mac_Files.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Files.mm; sourceTree = ""; }; + 84E024E10E94028C003E41AF /* juce_mac_Fonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Fonts.mm; sourceTree = ""; }; + 84E024E20E94028C003E41AF /* juce_mac_MainMenu.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MainMenu.mm; sourceTree = ""; }; + 84E024E30E94028C003E41AF /* juce_mac_MessageManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MessageManager.mm; sourceTree = ""; }; + 84E024E40E94028C003E41AF /* juce_mac_MouseCursor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_MouseCursor.mm; sourceTree = ""; }; + 84E024E50E94028C003E41AF /* juce_mac_NamedPipe.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_mac_NamedPipe.cpp; sourceTree = ""; }; + 84E024E60E94028C003E41AF /* juce_mac_NativeCode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_NativeCode.mm; sourceTree = ""; }; + 84E024E80E94028C003E41AF /* juce_mac_Network.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Network.mm; sourceTree = ""; }; + 84E024E90E94028C003E41AF /* juce_mac_NSViewComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_NSViewComponent.mm; sourceTree = ""; }; + 84E024EA0E94028C003E41AF /* juce_mac_NSViewComponentPeer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_NSViewComponentPeer.mm; sourceTree = ""; }; + 84E024EB0E94028C003E41AF /* juce_mac_OpenGLComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_OpenGLComponent.mm; sourceTree = ""; }; + 84E024EC0E94028C003E41AF /* juce_mac_QuickTimeMovieComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_QuickTimeMovieComponent.mm; sourceTree = ""; }; + 84E024ED0E94028C003E41AF /* juce_mac_SystemStats.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_SystemStats.mm; sourceTree = ""; }; + 84E024EE0E94028C003E41AF /* juce_mac_Threads.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_Threads.mm; sourceTree = ""; }; + 84E024EF0E94028C003E41AF /* juce_mac_WebBrowserComponent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_WebBrowserComponent.mm; sourceTree = ""; }; + 84E024F00E94028C003E41AF /* juce_posix_SharedCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_posix_SharedCode.h; sourceTree = ""; }; 84E8209209729D2A0097675B /* juce_AudioFormatManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_AudioFormatManager.cpp; sourceTree = ""; }; 84E8209309729D2A0097675B /* juce_AudioFormatManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_AudioFormatManager.h; sourceTree = ""; }; 84F1B8D809499F1400AD8EDE /* juce_MidiKeyboardComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_MidiKeyboardComponent.cpp; sourceTree = ""; }; @@ -1107,10 +1128,8 @@ 84F593AC09855679008153BA /* juce_DocumentWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_DocumentWindow.cpp; sourceTree = ""; }; 84F593AD09855679008153BA /* juce_DocumentWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_DocumentWindow.h; sourceTree = ""; }; 84F593B009855693008153BA /* juce_LassoComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_LassoComponent.h; sourceTree = ""; }; - 84F596FF0E23DDBB00E92E85 /* juce_mac_NativeHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_mac_NativeHeaders.h; sourceTree = ""; }; 84F6B7520C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ChannelRemappingAudioSource.cpp; sourceTree = ""; }; 84F6B7530C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ChannelRemappingAudioSource.h; sourceTree = ""; }; - 84F703220E1E56FB00EB338A /* juce_mac_FileChooser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_FileChooser.mm; sourceTree = ""; }; 84F7A7AD0A8383A100D36246 /* juce_ToolbarButton.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ToolbarButton.cpp; sourceTree = ""; }; 84F7A7AE0A8383A100D36246 /* juce_ToolbarButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ToolbarButton.h; sourceTree = ""; }; 84F7A7B10A8383C200D36246 /* juce_Toolbar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_Toolbar.cpp; sourceTree = ""; }; @@ -1124,6 +1143,7 @@ 84F7A7C00A8383E000D36246 /* juce_MultiTimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_MultiTimer.h; sourceTree = ""; }; 84F7A7ED0A838CC900D36246 /* juce_ComponentAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ComponentAnimator.cpp; sourceTree = ""; }; 84F7A7EE0A838CC900D36246 /* juce_ComponentAnimator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ComponentAnimator.h; sourceTree = ""; }; + 84F8B60C0EB5B9230020D98D /* juce_mac_NativeIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_mac_NativeIncludes.h; sourceTree = ""; }; 84F8DACE099C963A00E911ED /* juce_ComponentPeer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ComponentPeer.cpp; sourceTree = ""; }; 84F8DACF099C963A00E911ED /* juce_ComponentPeer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ComponentPeer.h; sourceTree = ""; }; 84FC318709B749FD00B75141 /* juce_FileBasedDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_FileBasedDocument.cpp; path = documents/juce_FileBasedDocument.cpp; sourceTree = ""; }; @@ -1157,7 +1177,7 @@ 84FED3C80CAA96DA00003997 /* juce_FileDragAndDropTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_FileDragAndDropTarget.h; sourceTree = ""; }; 84FFAF290C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_FileSearchPathListComponent.cpp; path = filebrowser/juce_FileSearchPathListComponent.cpp; sourceTree = ""; }; 84FFAF2A0C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_FileSearchPathListComponent.h; path = filebrowser/juce_FileSearchPathListComponent.h; sourceTree = ""; }; - 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 = ""; @@ -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", diff --git a/build/macosx/juce.xcconfig b/build/macosx/juce.xcconfig index 8956b4872e..f1a05766fa 100644 --- a/build/macosx/juce.xcconfig +++ b/build/macosx/juce.xcconfig @@ -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 diff --git a/build/macosx/platform_specific_code/juce_mac_AppleRemote.mm b/build/macosx/platform_specific_code/juce_mac_AppleRemote.mm new file mode 100644 index 0000000000..8d6ae47359 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_AppleRemote.mm @@ -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 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 diff --git a/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm b/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm index a8752bf1f3..5b371ff47a 100644 --- a/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm +++ b/build/macosx/platform_specific_code/juce_mac_AudioCDBurner.mm @@ -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 - -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 diff --git a/build/macosx/platform_specific_code/juce_mac_CoreAudio.cpp b/build/macosx/platform_specific_code/juce_mac_CoreAudio.cpp index 196c69de2a..998a813dc1 100644 --- a/build/macosx/platform_specific_code/juce_mac_CoreAudio.cpp +++ b/build/macosx/platform_specific_code/juce_mac_CoreAudio.cpp @@ -1,1291 +1,1299 @@ -/* - ============================================================================== - - 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 - -BEGIN_JUCE_NAMESPACE - - -#include "../../../src/juce_appframework/audio/devices/juce_AudioIODeviceType.h" -#include "../../../src/juce_appframework/events/juce_Timer.h" -#include "../../../src/juce_core/threads/juce_ScopedLock.h" -#include "../../../src/juce_core/threads/juce_Thread.h" -#include "../../../src/juce_core/text/juce_LocalisedStrings.h" -#include "../../../src/juce_appframework/gui/components/buttons/juce_TextButton.h" -#include "../../../src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h" -#include "../../../src/juce_appframework/gui/components/controls/juce_ComboBox.h" -#include "../../../src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.h" -#include "../../../src/juce_appframework/gui/components/windows/juce_AlertWindow.h" - - -//============================================================================== -#ifndef JUCE_COREAUDIO_ERROR_LOGGING_ENABLED - #define JUCE_COREAUDIO_ERROR_LOGGING_ENABLED 1 -#endif - -//============================================================================== -#undef log -#if JUCE_COREAUDIO_LOGGING_ENABLED - #define log(a) Logger::writeToLog (a) -#else - #define log(a) -#endif - -#undef OK -#if JUCE_COREAUDIO_ERROR_LOGGING_ENABLED - static bool logAnyErrors_CoreAudio (const OSStatus err, const int lineNum) - { - if (err == noErr) - return true; - - Logger::writeToLog (T("CoreAudio error: ") + String (lineNum) + T(" - ") + String::toHexString ((int)err)); - jassertfalse - return false; - } - - #define OK(a) logAnyErrors_CoreAudio (a, __LINE__) -#else - #define OK(a) (a == noErr) -#endif - -//============================================================================== -static const int maxNumChans = 96; - - -//============================================================================== -class CoreAudioInternal : public Timer -{ -public: - //============================================================================== - CoreAudioInternal (AudioDeviceID id) - : deviceID (id), - started (false), - audioBuffer (0), - numInputChans (0), - numOutputChans (0), - callbacksAllowed (true), - numInputChannelInfos (0), - numOutputChannelInfos (0), - inputLatency (0), - outputLatency (0), - callback (0), - inputDevice (0), - isSlaveDevice (false) - { - sampleRate = 0; - bufferSize = 512; - - if (deviceID == 0) - { - error = TRANS("can't open device"); - } - else - { - updateDetailsFromDevice(); - - AudioDeviceAddPropertyListener (deviceID, - kAudioPropertyWildcardChannel, - kAudioPropertyWildcardSection, - kAudioPropertyWildcardPropertyID, - deviceListenerProc, this); - } - } - - ~CoreAudioInternal() - { - AudioDeviceRemovePropertyListener (deviceID, - kAudioPropertyWildcardChannel, - kAudioPropertyWildcardSection, - kAudioPropertyWildcardPropertyID, - deviceListenerProc); - - stop (false); - - juce_free (audioBuffer); - delete inputDevice; - } - - void setTempBufferSize (const int numChannels, const int numSamples) - { - juce_free (audioBuffer); - - audioBuffer = (float*) juce_calloc (32 + numChannels * numSamples * sizeof (float)); - - zeromem (tempInputBuffers, sizeof (tempInputBuffers)); - zeromem (tempOutputBuffers, sizeof (tempOutputBuffers)); - - int count = 0; - int i; - for (i = 0; i < numInputChans; ++i) - tempInputBuffers[i] = audioBuffer + count++ * numSamples; - - for (i = 0; i < numOutputChans; ++i) - tempOutputBuffers[i] = audioBuffer + count++ * numSamples; - } - - // returns the number of actual available channels - void fillInChannelInfo (bool input) - { - int chanNum = 0, activeChans = 0; - UInt32 size; - - if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, 0))) - { - AudioBufferList* const bufList = (AudioBufferList*) juce_calloc (size); - - if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, bufList))) - { - const int numStreams = bufList->mNumberBuffers; - - for (int i = 0; i < numStreams; ++i) - { - const AudioBuffer& b = bufList->mBuffers[i]; - - for (unsigned int j = 0; j < b.mNumberChannels; ++j) - { - if (input) - { - if (activeInputChans[chanNum]) - { - inputChannelInfo [activeChans].sourceChannelNum = chanNum; - inputChannelInfo [activeChans].streamNum = i; - inputChannelInfo [activeChans].dataOffsetSamples = j; - inputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels; - ++activeChans; - numInputChannelInfos = activeChans; - } - - inChanNames.add (T("input ") + String (chanNum + 1)); - } - else - { - if (activeOutputChans[chanNum]) - { - outputChannelInfo [activeChans].sourceChannelNum = chanNum; - outputChannelInfo [activeChans].streamNum = i; - outputChannelInfo [activeChans].dataOffsetSamples = j; - outputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels; - ++activeChans; - numOutputChannelInfos = activeChans; - } - - outChanNames.add (T("output ") + String (chanNum + 1)); - } - - ++chanNum; - } - } - } - - juce_free (bufList); - } - } - - void updateDetailsFromDevice() - { - stopTimer(); - - if (deviceID == 0) - return; - - const ScopedLock sl (callbackLock); - - Float64 sr; - UInt32 size = sizeof (Float64); - if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyNominalSampleRate, &size, &sr))) - sampleRate = sr; - - UInt32 framesPerBuf; - size = sizeof (framesPerBuf); - - if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyBufferFrameSize, &size, &framesPerBuf))) - { - bufferSize = framesPerBuf; - - if (bufferSize > 0) - setTempBufferSize (numInputChans + numOutputChans, bufferSize); - } - - bufferSizes.clear(); - - if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, false, kAudioDevicePropertyBufferFrameSizeRange, &size, 0))) - { - AudioValueRange* ranges = (AudioValueRange*) juce_calloc (size); - - if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyBufferFrameSizeRange, &size, ranges))) - { - bufferSizes.add ((int) ranges[0].mMinimum); - - for (int i = 32; i < 8192; i += 32) - { - for (int j = size / sizeof (AudioValueRange); --j >= 0;) - { - if (i >= ranges[j].mMinimum && i <= ranges[j].mMaximum) - { - bufferSizes.addIfNotAlreadyThere (i); - break; - } - } - } - - if (bufferSize > 0) - bufferSizes.addIfNotAlreadyThere (bufferSize); - } - - juce_free (ranges); - } - - if (bufferSizes.size() == 0 && bufferSize > 0) - bufferSizes.add (bufferSize); - - sampleRates.clear(); - const double possibleRates[] = { 44100.0, 48000.0, 88200.0, 96000.0, 176400.0, 192000.0 }; - String rates; - - if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, false, kAudioDevicePropertyAvailableNominalSampleRates, &size, 0))) - { - AudioValueRange* ranges = (AudioValueRange*) juce_calloc (size); - - if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyAvailableNominalSampleRates, &size, ranges))) - { - for (int i = 0; i < numElementsInArray (possibleRates); ++i) - { - bool ok = false; - - for (int j = size / sizeof (AudioValueRange); --j >= 0;) - if (possibleRates[i] >= ranges[j].mMinimum - 2 && possibleRates[i] <= ranges[j].mMaximum + 2) - ok = true; - - if (ok) - { - sampleRates.add (possibleRates[i]); - rates << possibleRates[i] << T(" "); - } - } - } - - juce_free (ranges); - } - - if (sampleRates.size() == 0 && sampleRate > 0) - { - sampleRates.add (sampleRate); - rates << sampleRate; - } - - log (T("sr: ") + rates); - - inputLatency = 0; - outputLatency = 0; - UInt32 lat; - size = sizeof (UInt32); - if (AudioDeviceGetProperty (deviceID, 0, true, kAudioDevicePropertyLatency, &size, &lat) == noErr) - inputLatency = (int) lat; - - if (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyLatency, &size, &lat) == noErr) - outputLatency = (int) lat; - - log (T("lat: ") + String (inputLatency) + T(" ") + String (outputLatency)); - - inChanNames.clear(); - outChanNames.clear(); - - zeromem (inputChannelInfo, sizeof (inputChannelInfo)); - zeromem (outputChannelInfo, sizeof (outputChannelInfo)); - - fillInChannelInfo (true); - fillInChannelInfo (false); - } - - //============================================================================== - const StringArray getSources (bool input) - { - StringArray s; - int num = 0; - OSType* types = getAllDataSourcesForDevice (deviceID, input, num); - - if (types != 0) - { - for (int i = 0; i < num; ++i) - { - AudioValueTranslation avt; - char buffer[256]; - - avt.mInputData = (void*) &(types[i]); - avt.mInputDataSize = sizeof (UInt32); - avt.mOutputData = buffer; - avt.mOutputDataSize = 256; - - UInt32 transSize = sizeof (avt); - if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyDataSourceNameForID, &transSize, &avt))) - { - DBG (buffer); - s.add (buffer); - } - } - - juce_free (types); - } - - return s; - } - - int getCurrentSourceIndex (bool input) const - { - OSType currentSourceID = 0; - UInt32 size = 0; - int result = -1; - - if (deviceID != 0 - && OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyDataSource, &size, 0))) - { - if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyDataSource, &size, ¤tSourceID))) - { - int num = 0; - OSType* const types = getAllDataSourcesForDevice (deviceID, input, num); - - if (types != 0) - { - for (int i = 0; i < num; ++i) - { - if (types[num] == currentSourceID) - { - result = i; - break; - } - } - - juce_free (types); - } - } - } - - return result; - } - - void setCurrentSourceIndex (int index, bool input) - { - if (deviceID != 0) - { - int num = 0; - OSType* types = getAllDataSourcesForDevice (deviceID, input, num); - - if (types != 0) - { - if (((unsigned int) index) < num) - { - OSType typeId = types[index]; - AudioDeviceSetProperty (deviceID, 0, 0, input, kAudioDevicePropertyDataSource, sizeof (typeId), &typeId); - } - - juce_free (types); - } - } - } - - //============================================================================== - const String reopen (const BitArray& inputChannels, - const BitArray& outputChannels, - double newSampleRate, - int bufferSizeSamples) - { - error = String::empty; - log ("CoreAudio reopen"); - callbacksAllowed = false; - stopTimer(); - - stop (false); - - activeInputChans = inputChannels; - activeOutputChans = outputChannels; - - activeInputChans.setRange (inChanNames.size(), - activeInputChans.getHighestBit() + 1 - inChanNames.size(), - false); - - activeOutputChans.setRange (outChanNames.size(), - activeOutputChans.getHighestBit() + 1 - outChanNames.size(), - false); - - numInputChans = activeInputChans.countNumberOfSetBits(); - numOutputChans = activeOutputChans.countNumberOfSetBits(); - - // set sample rate - Float64 sr = newSampleRate; - UInt32 size = sizeof (sr); - OK (AudioDeviceSetProperty (deviceID, 0, 0, false, kAudioDevicePropertyNominalSampleRate, size, &sr)); - OK (AudioDeviceSetProperty (deviceID, 0, 0, true, kAudioDevicePropertyNominalSampleRate, size, &sr)); - - // change buffer size - UInt32 framesPerBuf = bufferSizeSamples; - size = sizeof (framesPerBuf); - - OK (AudioDeviceSetProperty (deviceID, 0, 0, false, kAudioDevicePropertyBufferFrameSize, size, &framesPerBuf)); - OK (AudioDeviceSetProperty (deviceID, 0, 0, true, kAudioDevicePropertyBufferFrameSize, size, &framesPerBuf)); - - // wait for the changes to happen (on some devices) - int i = 30; - while (--i >= 0) - { - updateDetailsFromDevice(); - - if (sampleRate == newSampleRate && bufferSizeSamples == bufferSize) - break; - - Thread::sleep (100); - } - - if (i < 0) - error = "Couldn't change sample rate/buffer size"; - - if (sampleRates.size() == 0) - error = "Device has no available sample-rates"; - - if (bufferSizes.size() == 0) - error = "Device has no available buffer-sizes"; - - if (inputDevice != 0 && error.isEmpty()) - error = inputDevice->reopen (inputChannels, - outputChannels, - newSampleRate, - bufferSizeSamples); - - callbacksAllowed = true; - - return error; - } - - bool start (AudioIODeviceCallback* cb) - { - if (! started) - { - callback = 0; - - if (deviceID != 0) - { - if (OK (AudioDeviceAddIOProc (deviceID, audioIOProc, (void*) this))) - { - if (OK (AudioDeviceStart (deviceID, audioIOProc))) - { - started = true; - } - else - { - OK (AudioDeviceRemoveIOProc (deviceID, audioIOProc)); - } - } - } - } - - if (started) - { - const ScopedLock sl (callbackLock); - callback = cb; - } - - if (inputDevice != 0) - return started && inputDevice->start (cb); - else - return started; - } - - void stop (bool leaveInterruptRunning) - { - callbackLock.enter(); - callback = 0; - callbackLock.exit(); - - if (started - && (deviceID != 0) - && ! leaveInterruptRunning) - { - OK (AudioDeviceStop (deviceID, audioIOProc)); - OK (AudioDeviceRemoveIOProc (deviceID, audioIOProc)); - started = false; - - callbackLock.enter(); - callbackLock.exit(); - - // wait until it's definately stopped calling back.. - for (int i = 40; --i >= 0;) - { - Thread::sleep (50); - - UInt32 running = 0; - UInt32 size = sizeof (running); - OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyDeviceIsRunning, &size, &running)); - if (running == 0) - break; - } - - callbackLock.enter(); - callbackLock.exit(); - } - - if (inputDevice != 0) - inputDevice->stop (leaveInterruptRunning); - } - - double getSampleRate() const - { - return sampleRate; - } - - int getBufferSize() const - { - return bufferSize; - } - - void audioCallback (const AudioBufferList* inInputData, - AudioBufferList* outOutputData) - { - int i; - const ScopedLock sl (callbackLock); - - if (callback != 0) - { - if (inputDevice == 0) - { - for (i = numInputChans; --i >= 0;) - { - const CallbackDetailsForChannel& info = inputChannelInfo[i]; - float* dest = tempInputBuffers [info.sourceChannelNum]; - const float* src = ((const float*) inInputData->mBuffers[info.streamNum].mData) - + info.dataOffsetSamples; - const int stride = info.dataStrideSamples; - - if (stride != 0) // if this is zero, info is invalid - { - for (int j = bufferSize; --j >= 0;) - { - *dest++ = *src; - src += stride; - } - } - } - } - - if (! isSlaveDevice) - { - if (inputDevice == 0) - { - callback->audioDeviceIOCallback ((const float**) tempInputBuffers, - numInputChans, - tempOutputBuffers, - numOutputChans, - bufferSize); - } - else - { - jassert (inputDevice->bufferSize == bufferSize); - - callback->audioDeviceIOCallback ((const float**) inputDevice->tempInputBuffers, - inputDevice->numInputChans, - tempOutputBuffers, - numOutputChans, - bufferSize); - } - - for (i = numOutputChans; --i >= 0;) - { - const CallbackDetailsForChannel& info = outputChannelInfo[i]; - const float* src = tempOutputBuffers [i]; - float* dest = ((float*) outOutputData->mBuffers[info.streamNum].mData) - + info.dataOffsetSamples; - const int stride = info.dataStrideSamples; - - if (stride != 0) // if this is zero, info is invalid - { - for (int j = bufferSize; --j >= 0;) - { - *dest = *src++; - dest += stride; - } - } - } - } - } - else - { - for (i = jmin (numOutputChans, numOutputChannelInfos); --i >= 0;) - { - const CallbackDetailsForChannel& info = outputChannelInfo[i]; - float* dest = ((float*) outOutputData->mBuffers[info.streamNum].mData) - + info.dataOffsetSamples; - const int stride = info.dataStrideSamples; - - if (stride != 0) // if this is zero, info is invalid - { - for (int j = bufferSize; --j >= 0;) - { - *dest = 0.0f; - dest += stride; - } - } - } - } - } - - // called by callbacks - void deviceDetailsChanged() - { - if (callbacksAllowed) - startTimer (100); - } - - void timerCallback() - { - stopTimer(); - log ("CoreAudio device changed callback"); - - const double oldSampleRate = sampleRate; - const int oldBufferSize = bufferSize; - updateDetailsFromDevice(); - - if (oldBufferSize != bufferSize || oldSampleRate != sampleRate) - { - callbacksAllowed = false; - stop (false); - updateDetailsFromDevice(); - callbacksAllowed = true; - } - } - - CoreAudioInternal* getRelatedDevice() const - { - UInt32 size = 0; - CoreAudioInternal* result = 0; - - if (deviceID != 0 - && AudioDeviceGetPropertyInfo (deviceID, 0, false, kAudioDevicePropertyRelatedDevices, &size, 0) == noErr - && size > 0) - { - AudioDeviceID* devs = (AudioDeviceID*) juce_calloc (size); - - if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyRelatedDevices, &size, devs))) - { - for (unsigned int i = 0; i < size / sizeof (AudioDeviceID); ++i) - { - if (devs[i] != deviceID && devs[i] != 0) - { - result = new CoreAudioInternal (devs[i]); - - if (result->error.isEmpty()) - { - const bool thisIsInput = inChanNames.size() > 0 && outChanNames.size() == 0; - const bool otherIsInput = result->inChanNames.size() > 0 && result->outChanNames.size() == 0; - - if (thisIsInput != otherIsInput - || (inChanNames.size() + outChanNames.size() == 0) - || (result->inChanNames.size() + result->outChanNames.size()) == 0) - break; - } - - deleteAndZero (result); - } - } - } - - juce_free (devs); - } - - return result; - } - - //============================================================================== - juce_UseDebuggingNewOperator - - String error; - int inputLatency, outputLatency; - BitArray activeInputChans, activeOutputChans; - StringArray inChanNames, outChanNames; - Array sampleRates; - Array bufferSizes; - AudioIODeviceCallback* callback; - - CoreAudioInternal* inputDevice; - bool isSlaveDevice; - -private: - CriticalSection callbackLock; - AudioDeviceID deviceID; - bool started; - double sampleRate; - int bufferSize; - float* audioBuffer; - int numInputChans, numOutputChans; - bool callbacksAllowed; - - struct CallbackDetailsForChannel - { - int sourceChannelNum; - int streamNum; - int dataOffsetSamples; - int dataStrideSamples; - }; - - int numInputChannelInfos, numOutputChannelInfos; - CallbackDetailsForChannel inputChannelInfo [maxNumChans]; - CallbackDetailsForChannel outputChannelInfo [maxNumChans]; - float* tempInputBuffers [maxNumChans]; - float* tempOutputBuffers [maxNumChans]; - - CoreAudioInternal (const CoreAudioInternal&); - const CoreAudioInternal& operator= (const CoreAudioInternal&); - - //============================================================================== - static OSStatus audioIOProc (AudioDeviceID inDevice, - const AudioTimeStamp* inNow, - const AudioBufferList* inInputData, - const AudioTimeStamp* inInputTime, - AudioBufferList* outOutputData, - const AudioTimeStamp* inOutputTime, - void* device) - { - ((CoreAudioInternal*) device)->audioCallback (inInputData, outOutputData); - return noErr; - } - - static OSStatus deviceListenerProc (AudioDeviceID inDevice, - UInt32 inLine, - Boolean isInput, - AudioDevicePropertyID inPropertyID, - void* inClientData) - { - CoreAudioInternal* const intern = (CoreAudioInternal*) inClientData; - - switch (inPropertyID) - { - case kAudioDevicePropertyBufferSize: - case kAudioDevicePropertyBufferFrameSize: - case kAudioDevicePropertyNominalSampleRate: - case kAudioDevicePropertyStreamFormat: - case kAudioDevicePropertyDeviceIsAlive: - intern->deviceDetailsChanged(); - break; - - case kAudioDevicePropertyBufferSizeRange: - case kAudioDevicePropertyVolumeScalar: - case kAudioDevicePropertyMute: - case kAudioDevicePropertyPlayThru: - case kAudioDevicePropertyDataSource: - case kAudioDevicePropertyDeviceIsRunning: - break; - } - - return noErr; - } - - //============================================================================== - static OSType* getAllDataSourcesForDevice (AudioDeviceID deviceID, const bool input, int& num) - { - OSType* types = 0; - UInt32 size = 0; - num = 0; - - if (deviceID != 0 - && OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyDataSources, &size, 0))) - { - types = (OSType*) juce_calloc (size); - - if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyDataSources, &size, types))) - { - num = size / sizeof (OSType); - } - else - { - juce_free (types); - types = 0; - } - } - - return types; - } -}; - - -//============================================================================== -class CoreAudioIODevice : public AudioIODevice -{ -public: - CoreAudioIODevice (const String& deviceName, - AudioDeviceID inputDeviceId, - const int inputIndex_, - AudioDeviceID outputDeviceId, - const int outputIndex_) - : AudioIODevice (deviceName, "CoreAudio"), - inputIndex (inputIndex_), - outputIndex (outputIndex_), - isOpen_ (false), - isStarted (false) - { - internal = 0; - CoreAudioInternal* device = 0; - - if (outputDeviceId == 0 || outputDeviceId == inputDeviceId) - { - jassert (inputDeviceId != 0); - - device = new CoreAudioInternal (inputDeviceId); - lastError = device->error; - - if (lastError.isNotEmpty()) - deleteAndZero (device); - } - else - { - device = new CoreAudioInternal (outputDeviceId); - lastError = device->error; - - if (lastError.isNotEmpty()) - { - deleteAndZero (device); - } - else if (inputDeviceId != 0) - { - CoreAudioInternal* secondDevice = new CoreAudioInternal (inputDeviceId); - lastError = device->error; - - if (lastError.isNotEmpty()) - { - delete secondDevice; - } - else - { - device->inputDevice = secondDevice; - secondDevice->isSlaveDevice = true; - } - } - } - - internal = device; - - AudioHardwareAddPropertyListener (kAudioPropertyWildcardPropertyID, - hardwareListenerProc, internal); - } - - ~CoreAudioIODevice() - { - AudioHardwareRemovePropertyListener (kAudioPropertyWildcardPropertyID, - hardwareListenerProc); - - delete internal; - } - - const StringArray getOutputChannelNames() - { - return internal->outChanNames; - } - - const StringArray getInputChannelNames() - { - if (internal->inputDevice != 0) - return internal->inputDevice->inChanNames; - else - return internal->inChanNames; - } - - int getNumSampleRates() - { - return internal->sampleRates.size(); - } - - double getSampleRate (int index) - { - return internal->sampleRates [index]; - } - - int getNumBufferSizesAvailable() - { - return internal->bufferSizes.size(); - } - - int getBufferSizeSamples (int index) - { - return internal->bufferSizes [index]; - } - - int getDefaultBufferSize() - { - for (int i = 0; i < getNumBufferSizesAvailable(); ++i) - if (getBufferSizeSamples(i) >= 512) - return getBufferSizeSamples(i); - - return 512; - } - - const String open (const BitArray& inputChannels, - const BitArray& outputChannels, - double sampleRate, - int bufferSizeSamples) - { - isOpen_ = true; - - if (bufferSizeSamples <= 0) - bufferSizeSamples = getDefaultBufferSize(); - - internal->reopen (inputChannels, outputChannels, sampleRate, bufferSizeSamples); - lastError = internal->error; - return lastError; - } - - void close() - { - isOpen_ = false; - } - - bool isOpen() - { - return isOpen_; - } - - int getCurrentBufferSizeSamples() - { - return internal != 0 ? internal->getBufferSize() : 512; - } - - double getCurrentSampleRate() - { - return internal != 0 ? internal->getSampleRate() : 0; - } - - int getCurrentBitDepth() - { - return 32; // no way to find out, so just assume it's high.. - } - - const BitArray getActiveOutputChannels() const - { - return internal != 0 ? internal->activeOutputChans : BitArray(); - } - - const BitArray getActiveInputChannels() const - { - BitArray chans; - - if (internal != 0) - { - chans = internal->activeInputChans; - - if (internal->inputDevice != 0) - chans.orWith (internal->inputDevice->activeInputChans); - } - - return chans; - } - - int getOutputLatencyInSamples() - { - if (internal == 0) - return 0; - - // this seems like a good guess at getting the latency right - comparing - // this with a round-trip measurement, it gets it to within a few millisecs - // for the built-in mac soundcard - return internal->outputLatency + internal->getBufferSize() * 2; - } - - int getInputLatencyInSamples() - { - if (internal == 0) - return 0; - - return internal->inputLatency + internal->getBufferSize() * 2; - } - - void start (AudioIODeviceCallback* callback) - { - if (internal != 0 && ! isStarted) - { - if (callback != 0) - callback->audioDeviceAboutToStart (this); - - isStarted = true; - internal->start (callback); - } - } - - void stop() - { - if (isStarted && internal != 0) - { - AudioIODeviceCallback* const lastCallback = internal->callback; - - isStarted = false; - internal->stop (true); - - if (lastCallback != 0) - lastCallback->audioDeviceStopped(); - } - } - - bool isPlaying() - { - if (internal->callback == 0) - isStarted = false; - - return isStarted; - } - - const String getLastError() - { - return lastError; - } - - int inputIndex, outputIndex; - - juce_UseDebuggingNewOperator - -private: - CoreAudioInternal* internal; - bool isOpen_, isStarted; - String lastError; - - static OSStatus hardwareListenerProc (AudioHardwarePropertyID inPropertyID, void* inClientData) - { - CoreAudioInternal* const intern = (CoreAudioInternal*) inClientData; - - switch (inPropertyID) - { - case kAudioHardwarePropertyDevices: - intern->deviceDetailsChanged(); - break; - - case kAudioHardwarePropertyDefaultOutputDevice: - case kAudioHardwarePropertyDefaultInputDevice: - case kAudioHardwarePropertyDefaultSystemOutputDevice: - break; - } - - return noErr; - } - - CoreAudioIODevice (const CoreAudioIODevice&); - const CoreAudioIODevice& operator= (const CoreAudioIODevice&); -}; - -//============================================================================== -class CoreAudioIODeviceType : public AudioIODeviceType -{ -public: - //============================================================================== - CoreAudioIODeviceType() - : AudioIODeviceType (T("CoreAudio")), - hasScanned (false) - { - } - - ~CoreAudioIODeviceType() - { - } - - //============================================================================== - void scanForDevices() - { - hasScanned = true; - - inputDeviceNames.clear(); - outputDeviceNames.clear(); - inputIds.clear(); - outputIds.clear(); - - UInt32 size; - if (OK (AudioHardwareGetPropertyInfo (kAudioHardwarePropertyDevices, &size, 0))) - { - AudioDeviceID* const devs = (AudioDeviceID*) juce_calloc (size); - - if (OK (AudioHardwareGetProperty (kAudioHardwarePropertyDevices, &size, devs))) - { - static bool alreadyLogged = false; - const int num = size / sizeof (AudioDeviceID); - for (int i = 0; i < num; ++i) - { - char name[1024]; - size = sizeof (name); - if (OK (AudioDeviceGetProperty (devs[i], 0, false, kAudioDevicePropertyDeviceName, &size, name))) - { - const String nameString (String::fromUTF8 ((const uint8*) name, strlen (name))); - - if (! alreadyLogged) - log (T("CoreAudio device: ") + nameString); - - const int numIns = getNumChannels (devs[i], true); - const int numOuts = getNumChannels (devs[i], false); - - if (numIns > 0) - { - inputDeviceNames.add (nameString); - inputIds.add (devs[i]); - } - - if (numOuts > 0) - { - outputDeviceNames.add (nameString); - outputIds.add (devs[i]); - } - } - } - - alreadyLogged = true; - } - - juce_free (devs); - } - - inputDeviceNames.appendNumbersToDuplicates (false, true); - outputDeviceNames.appendNumbersToDuplicates (false, true); - } - - const StringArray getDeviceNames (const bool wantInputNames) const - { - jassert (hasScanned); // need to call scanForDevices() before doing this - - if (wantInputNames) - return inputDeviceNames; - else - return outputDeviceNames; - } - - int getDefaultDeviceIndex (const bool forInput) const - { - jassert (hasScanned); // need to call scanForDevices() before doing this - - AudioDeviceID deviceID; - UInt32 size = sizeof (deviceID); - - // if they're asking for any input channels at all, use the default input, so we - // get the built-in mic rather than the built-in output with no inputs.. - if (AudioHardwareGetProperty (forInput ? kAudioHardwarePropertyDefaultInputDevice - : kAudioHardwarePropertyDefaultOutputDevice, - &size, &deviceID) == noErr) - { - if (forInput) - { - for (int i = inputIds.size(); --i >= 0;) - if (inputIds[i] == deviceID) - return i; - } - else - { - for (int i = outputIds.size(); --i >= 0;) - if (outputIds[i] == deviceID) - return i; - } - } - - return 0; - } - - int getIndexOfDevice (AudioIODevice* device, const bool asInput) const - { - jassert (hasScanned); // need to call scanForDevices() before doing this - - CoreAudioIODevice* const d = dynamic_cast (device); - if (d == 0) - return -1; - - return asInput ? d->inputIndex - : d->outputIndex; - } - - bool hasSeparateInputsAndOutputs() const { return true; } - - AudioIODevice* createDevice (const String& outputDeviceName, - const String& inputDeviceName) - { - jassert (hasScanned); // need to call scanForDevices() before doing this - - const int inputIndex = inputDeviceNames.indexOf (inputDeviceName); - const int outputIndex = outputDeviceNames.indexOf (outputDeviceName); - - String deviceName (outputDeviceName); - if (deviceName.isEmpty()) - deviceName = inputDeviceName; - - if (index >= 0) - return new CoreAudioIODevice (deviceName, - inputIds [inputIndex], - inputIndex, - outputIds [outputIndex], - outputIndex); - - return 0; - } - - //============================================================================== - juce_UseDebuggingNewOperator - -private: - StringArray inputDeviceNames, outputDeviceNames; - Array inputIds, outputIds; - - bool hasScanned; - - static int getNumChannels (AudioDeviceID deviceID, bool input) - { - int total = 0; - UInt32 size; - - if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, 0))) - { - AudioBufferList* const bufList = (AudioBufferList*) juce_calloc (size); - - if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, bufList))) - { - const int numStreams = bufList->mNumberBuffers; - - for (int i = 0; i < numStreams; ++i) - { - const AudioBuffer& b = bufList->mBuffers[i]; - total += b.mNumberChannels; - } - } - - juce_free (bufList); - } - - return total; - } - - CoreAudioIODeviceType (const CoreAudioIODeviceType&); - const CoreAudioIODeviceType& operator= (const CoreAudioIODeviceType&); -}; - -//============================================================================== -AudioIODeviceType* juce_createDefaultAudioIODeviceType() -{ - return new CoreAudioIODeviceType(); -} - -#undef log - -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 + + +//============================================================================== +#ifndef JUCE_COREAUDIO_ERROR_LOGGING_ENABLED + #define JUCE_COREAUDIO_ERROR_LOGGING_ENABLED 1 +#endif + +//============================================================================== +#undef log +#if JUCE_COREAUDIO_LOGGING_ENABLED + #define log(a) Logger::writeToLog (a) +#else + #define log(a) +#endif + +#undef OK +#if JUCE_COREAUDIO_ERROR_LOGGING_ENABLED + static bool logAnyErrors_CoreAudio (const OSStatus err, const int lineNum) + { + if (err == noErr) + return true; + + Logger::writeToLog (T("CoreAudio error: ") + String (lineNum) + T(" - ") + String::toHexString ((int)err)); + jassertfalse + return false; + } + + #define OK(a) logAnyErrors_CoreAudio (a, __LINE__) +#else + #define OK(a) (a == noErr) +#endif + +//============================================================================== +static const int maxNumChans = 96; + + +//============================================================================== +class CoreAudioInternal : public Timer +{ +public: + //============================================================================== + CoreAudioInternal (AudioDeviceID id) + : deviceID (id), + started (false), + audioBuffer (0), + numInputChans (0), + numOutputChans (0), + callbacksAllowed (true), + numInputChannelInfos (0), + numOutputChannelInfos (0), + inputLatency (0), + outputLatency (0), + callback (0), +#if ! MACOS_10_4_OR_EARLIER + audioProcID (0), +#endif + inputDevice (0), + isSlaveDevice (false) + { + sampleRate = 0; + bufferSize = 512; + + if (deviceID == 0) + { + error = TRANS("can't open device"); + } + else + { + updateDetailsFromDevice(); + + AudioDeviceAddPropertyListener (deviceID, + kAudioPropertyWildcardChannel, + kAudioPropertyWildcardSection, + kAudioPropertyWildcardPropertyID, + deviceListenerProc, this); + } + } + + ~CoreAudioInternal() + { + AudioDeviceRemovePropertyListener (deviceID, + kAudioPropertyWildcardChannel, + kAudioPropertyWildcardSection, + kAudioPropertyWildcardPropertyID, + deviceListenerProc); + + stop (false); + + juce_free (audioBuffer); + delete inputDevice; + } + + void setTempBufferSize (const int numChannels, const int numSamples) + { + juce_free (audioBuffer); + + audioBuffer = (float*) juce_calloc (32 + numChannels * numSamples * sizeof (float)); + + zeromem (tempInputBuffers, sizeof (tempInputBuffers)); + zeromem (tempOutputBuffers, sizeof (tempOutputBuffers)); + + int count = 0; + int i; + for (i = 0; i < numInputChans; ++i) + tempInputBuffers[i] = audioBuffer + count++ * numSamples; + + for (i = 0; i < numOutputChans; ++i) + tempOutputBuffers[i] = audioBuffer + count++ * numSamples; + } + + // returns the number of actual available channels + void fillInChannelInfo (bool input) + { + int chanNum = 0, activeChans = 0; + UInt32 size; + + if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, 0))) + { + AudioBufferList* const bufList = (AudioBufferList*) juce_calloc (size); + + if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, bufList))) + { + const int numStreams = bufList->mNumberBuffers; + + for (int i = 0; i < numStreams; ++i) + { + const AudioBuffer& b = bufList->mBuffers[i]; + + for (unsigned int j = 0; j < b.mNumberChannels; ++j) + { + if (input) + { + if (activeInputChans[chanNum]) + { + inputChannelInfo [activeChans].sourceChannelNum = chanNum; + inputChannelInfo [activeChans].streamNum = i; + inputChannelInfo [activeChans].dataOffsetSamples = j; + inputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels; + ++activeChans; + numInputChannelInfos = activeChans; + } + + inChanNames.add (T("input ") + String (chanNum + 1)); + } + else + { + if (activeOutputChans[chanNum]) + { + outputChannelInfo [activeChans].sourceChannelNum = chanNum; + outputChannelInfo [activeChans].streamNum = i; + outputChannelInfo [activeChans].dataOffsetSamples = j; + outputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels; + ++activeChans; + numOutputChannelInfos = activeChans; + } + + outChanNames.add (T("output ") + String (chanNum + 1)); + } + + ++chanNum; + } + } + } + + juce_free (bufList); + } + } + + void updateDetailsFromDevice() + { + stopTimer(); + + if (deviceID == 0) + return; + + const ScopedLock sl (callbackLock); + + Float64 sr; + UInt32 size = sizeof (Float64); + if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyNominalSampleRate, &size, &sr))) + sampleRate = sr; + + UInt32 framesPerBuf; + size = sizeof (framesPerBuf); + + if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyBufferFrameSize, &size, &framesPerBuf))) + { + bufferSize = framesPerBuf; + + if (bufferSize > 0) + setTempBufferSize (numInputChans + numOutputChans, bufferSize); + } + + bufferSizes.clear(); + + if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, false, kAudioDevicePropertyBufferFrameSizeRange, &size, 0))) + { + AudioValueRange* ranges = (AudioValueRange*) juce_calloc (size); + + if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyBufferFrameSizeRange, &size, ranges))) + { + bufferSizes.add ((int) ranges[0].mMinimum); + + for (int i = 32; i < 8192; i += 32) + { + for (int j = size / sizeof (AudioValueRange); --j >= 0;) + { + if (i >= ranges[j].mMinimum && i <= ranges[j].mMaximum) + { + bufferSizes.addIfNotAlreadyThere (i); + break; + } + } + } + + if (bufferSize > 0) + bufferSizes.addIfNotAlreadyThere (bufferSize); + } + + juce_free (ranges); + } + + if (bufferSizes.size() == 0 && bufferSize > 0) + bufferSizes.add (bufferSize); + + sampleRates.clear(); + const double possibleRates[] = { 44100.0, 48000.0, 88200.0, 96000.0, 176400.0, 192000.0 }; + String rates; + + if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, false, kAudioDevicePropertyAvailableNominalSampleRates, &size, 0))) + { + AudioValueRange* ranges = (AudioValueRange*) juce_calloc (size); + + if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyAvailableNominalSampleRates, &size, ranges))) + { + for (int i = 0; i < numElementsInArray (possibleRates); ++i) + { + bool ok = false; + + for (int j = size / sizeof (AudioValueRange); --j >= 0;) + if (possibleRates[i] >= ranges[j].mMinimum - 2 && possibleRates[i] <= ranges[j].mMaximum + 2) + ok = true; + + if (ok) + { + sampleRates.add (possibleRates[i]); + rates << possibleRates[i] << T(" "); + } + } + } + + juce_free (ranges); + } + + if (sampleRates.size() == 0 && sampleRate > 0) + { + sampleRates.add (sampleRate); + rates << sampleRate; + } + + log (T("sr: ") + rates); + + inputLatency = 0; + outputLatency = 0; + UInt32 lat; + size = sizeof (UInt32); + if (AudioDeviceGetProperty (deviceID, 0, true, kAudioDevicePropertyLatency, &size, &lat) == noErr) + inputLatency = (int) lat; + + if (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyLatency, &size, &lat) == noErr) + outputLatency = (int) lat; + + log (T("lat: ") + String (inputLatency) + T(" ") + String (outputLatency)); + + inChanNames.clear(); + outChanNames.clear(); + + zeromem (inputChannelInfo, sizeof (inputChannelInfo)); + zeromem (outputChannelInfo, sizeof (outputChannelInfo)); + + fillInChannelInfo (true); + fillInChannelInfo (false); + } + + //============================================================================== + const StringArray getSources (bool input) + { + StringArray s; + int num = 0; + OSType* types = getAllDataSourcesForDevice (deviceID, input, num); + + if (types != 0) + { + for (int i = 0; i < num; ++i) + { + AudioValueTranslation avt; + char buffer[256]; + + avt.mInputData = (void*) &(types[i]); + avt.mInputDataSize = sizeof (UInt32); + avt.mOutputData = buffer; + avt.mOutputDataSize = 256; + + UInt32 transSize = sizeof (avt); + if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyDataSourceNameForID, &transSize, &avt))) + { + DBG (buffer); + s.add (buffer); + } + } + + juce_free (types); + } + + return s; + } + + int getCurrentSourceIndex (bool input) const + { + OSType currentSourceID = 0; + UInt32 size = 0; + int result = -1; + + if (deviceID != 0 + && OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyDataSource, &size, 0))) + { + if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyDataSource, &size, ¤tSourceID))) + { + int num = 0; + OSType* const types = getAllDataSourcesForDevice (deviceID, input, num); + + if (types != 0) + { + for (int i = 0; i < num; ++i) + { + if (types[num] == currentSourceID) + { + result = i; + break; + } + } + + juce_free (types); + } + } + } + + return result; + } + + void setCurrentSourceIndex (int index, bool input) + { + if (deviceID != 0) + { + int num = 0; + OSType* types = getAllDataSourcesForDevice (deviceID, input, num); + + if (types != 0) + { + if (((unsigned int) index) < num) + { + OSType typeId = types[index]; + AudioDeviceSetProperty (deviceID, 0, 0, input, kAudioDevicePropertyDataSource, sizeof (typeId), &typeId); + } + + juce_free (types); + } + } + } + + //============================================================================== + const String reopen (const BitArray& inputChannels, + const BitArray& outputChannels, + double newSampleRate, + int bufferSizeSamples) + { + error = String::empty; + log ("CoreAudio reopen"); + callbacksAllowed = false; + stopTimer(); + + stop (false); + + activeInputChans = inputChannels; + activeOutputChans = outputChannels; + + activeInputChans.setRange (inChanNames.size(), + activeInputChans.getHighestBit() + 1 - inChanNames.size(), + false); + + activeOutputChans.setRange (outChanNames.size(), + activeOutputChans.getHighestBit() + 1 - outChanNames.size(), + false); + + numInputChans = activeInputChans.countNumberOfSetBits(); + numOutputChans = activeOutputChans.countNumberOfSetBits(); + + // set sample rate + Float64 sr = newSampleRate; + UInt32 size = sizeof (sr); + OK (AudioDeviceSetProperty (deviceID, 0, 0, false, kAudioDevicePropertyNominalSampleRate, size, &sr)); + OK (AudioDeviceSetProperty (deviceID, 0, 0, true, kAudioDevicePropertyNominalSampleRate, size, &sr)); + + // change buffer size + UInt32 framesPerBuf = bufferSizeSamples; + size = sizeof (framesPerBuf); + + OK (AudioDeviceSetProperty (deviceID, 0, 0, false, kAudioDevicePropertyBufferFrameSize, size, &framesPerBuf)); + OK (AudioDeviceSetProperty (deviceID, 0, 0, true, kAudioDevicePropertyBufferFrameSize, size, &framesPerBuf)); + + // wait for the changes to happen (on some devices) + int i = 30; + while (--i >= 0) + { + updateDetailsFromDevice(); + + if (sampleRate == newSampleRate && bufferSizeSamples == bufferSize) + break; + + Thread::sleep (100); + } + + if (i < 0) + error = "Couldn't change sample rate/buffer size"; + + if (sampleRates.size() == 0) + error = "Device has no available sample-rates"; + + if (bufferSizes.size() == 0) + error = "Device has no available buffer-sizes"; + + if (inputDevice != 0 && error.isEmpty()) + error = inputDevice->reopen (inputChannels, + outputChannels, + newSampleRate, + bufferSizeSamples); + + callbacksAllowed = true; + + return error; + } + + bool start (AudioIODeviceCallback* cb) + { + if (! started) + { + callback = 0; + + if (deviceID != 0) + { +#if MACOS_10_4_OR_EARLIER + if (OK (AudioDeviceAddIOProc (deviceID, audioIOProc, (void*) this))) +#else + if (OK (AudioDeviceCreateIOProcID (deviceID, audioIOProc, (void*) this, &audioProcID))) +#endif + { + if (OK (AudioDeviceStart (deviceID, audioIOProc))) + { + started = true; + } + else + { +#if MACOS_10_4_OR_EARLIER + OK (AudioDeviceRemoveIOProc (deviceID, audioIOProc)); +#else + OK (AudioDeviceDestroyIOProcID (deviceID, audioProcID)); + audioProcID = 0; +#endif + } + } + } + } + + if (started) + { + const ScopedLock sl (callbackLock); + callback = cb; + } + + if (inputDevice != 0) + return started && inputDevice->start (cb); + else + return started; + } + + void stop (bool leaveInterruptRunning) + { + callbackLock.enter(); + callback = 0; + callbackLock.exit(); + + if (started + && (deviceID != 0) + && ! leaveInterruptRunning) + { + OK (AudioDeviceStop (deviceID, audioIOProc)); + +#if MACOS_10_4_OR_EARLIER + OK (AudioDeviceRemoveIOProc (deviceID, audioIOProc)); +#else + OK (AudioDeviceDestroyIOProcID (deviceID, audioProcID)); + audioProcID = 0; +#endif + started = false; + + callbackLock.enter(); + callbackLock.exit(); + + // wait until it's definately stopped calling back.. + for (int i = 40; --i >= 0;) + { + Thread::sleep (50); + + UInt32 running = 0; + UInt32 size = sizeof (running); + OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyDeviceIsRunning, &size, &running)); + if (running == 0) + break; + } + + callbackLock.enter(); + callbackLock.exit(); + } + + if (inputDevice != 0) + inputDevice->stop (leaveInterruptRunning); + } + + double getSampleRate() const + { + return sampleRate; + } + + int getBufferSize() const + { + return bufferSize; + } + + void audioCallback (const AudioBufferList* inInputData, + AudioBufferList* outOutputData) + { + int i; + const ScopedLock sl (callbackLock); + + if (callback != 0) + { + if (inputDevice == 0) + { + for (i = numInputChans; --i >= 0;) + { + const CallbackDetailsForChannel& info = inputChannelInfo[i]; + float* dest = tempInputBuffers [info.sourceChannelNum]; + const float* src = ((const float*) inInputData->mBuffers[info.streamNum].mData) + + info.dataOffsetSamples; + const int stride = info.dataStrideSamples; + + if (stride != 0) // if this is zero, info is invalid + { + for (int j = bufferSize; --j >= 0;) + { + *dest++ = *src; + src += stride; + } + } + } + } + + if (! isSlaveDevice) + { + if (inputDevice == 0) + { + callback->audioDeviceIOCallback ((const float**) tempInputBuffers, + numInputChans, + tempOutputBuffers, + numOutputChans, + bufferSize); + } + else + { + jassert (inputDevice->bufferSize == bufferSize); + + callback->audioDeviceIOCallback ((const float**) inputDevice->tempInputBuffers, + inputDevice->numInputChans, + tempOutputBuffers, + numOutputChans, + bufferSize); + } + + for (i = numOutputChans; --i >= 0;) + { + const CallbackDetailsForChannel& info = outputChannelInfo[i]; + const float* src = tempOutputBuffers [i]; + float* dest = ((float*) outOutputData->mBuffers[info.streamNum].mData) + + info.dataOffsetSamples; + const int stride = info.dataStrideSamples; + + if (stride != 0) // if this is zero, info is invalid + { + for (int j = bufferSize; --j >= 0;) + { + *dest = *src++; + dest += stride; + } + } + } + } + } + else + { + for (i = jmin (numOutputChans, numOutputChannelInfos); --i >= 0;) + { + const CallbackDetailsForChannel& info = outputChannelInfo[i]; + float* dest = ((float*) outOutputData->mBuffers[info.streamNum].mData) + + info.dataOffsetSamples; + const int stride = info.dataStrideSamples; + + if (stride != 0) // if this is zero, info is invalid + { + for (int j = bufferSize; --j >= 0;) + { + *dest = 0.0f; + dest += stride; + } + } + } + } + } + + // called by callbacks + void deviceDetailsChanged() + { + if (callbacksAllowed) + startTimer (100); + } + + void timerCallback() + { + stopTimer(); + log ("CoreAudio device changed callback"); + + const double oldSampleRate = sampleRate; + const int oldBufferSize = bufferSize; + updateDetailsFromDevice(); + + if (oldBufferSize != bufferSize || oldSampleRate != sampleRate) + { + callbacksAllowed = false; + stop (false); + updateDetailsFromDevice(); + callbacksAllowed = true; + } + } + + CoreAudioInternal* getRelatedDevice() const + { + UInt32 size = 0; + CoreAudioInternal* result = 0; + + if (deviceID != 0 + && AudioDeviceGetPropertyInfo (deviceID, 0, false, kAudioDevicePropertyRelatedDevices, &size, 0) == noErr + && size > 0) + { + AudioDeviceID* devs = (AudioDeviceID*) juce_calloc (size); + + if (OK (AudioDeviceGetProperty (deviceID, 0, false, kAudioDevicePropertyRelatedDevices, &size, devs))) + { + for (unsigned int i = 0; i < size / sizeof (AudioDeviceID); ++i) + { + if (devs[i] != deviceID && devs[i] != 0) + { + result = new CoreAudioInternal (devs[i]); + + if (result->error.isEmpty()) + { + const bool thisIsInput = inChanNames.size() > 0 && outChanNames.size() == 0; + const bool otherIsInput = result->inChanNames.size() > 0 && result->outChanNames.size() == 0; + + if (thisIsInput != otherIsInput + || (inChanNames.size() + outChanNames.size() == 0) + || (result->inChanNames.size() + result->outChanNames.size()) == 0) + break; + } + + deleteAndZero (result); + } + } + } + + juce_free (devs); + } + + return result; + } + + //============================================================================== + juce_UseDebuggingNewOperator + + String error; + int inputLatency, outputLatency; + BitArray activeInputChans, activeOutputChans; + StringArray inChanNames, outChanNames; + Array sampleRates; + Array bufferSizes; + AudioIODeviceCallback* callback; +#if ! MACOS_10_4_OR_EARLIER + AudioDeviceIOProcID audioProcID; +#endif + + CoreAudioInternal* inputDevice; + bool isSlaveDevice; + +private: + CriticalSection callbackLock; + AudioDeviceID deviceID; + bool started; + double sampleRate; + int bufferSize; + float* audioBuffer; + int numInputChans, numOutputChans; + bool callbacksAllowed; + + struct CallbackDetailsForChannel + { + int sourceChannelNum; + int streamNum; + int dataOffsetSamples; + int dataStrideSamples; + }; + + int numInputChannelInfos, numOutputChannelInfos; + CallbackDetailsForChannel inputChannelInfo [maxNumChans]; + CallbackDetailsForChannel outputChannelInfo [maxNumChans]; + float* tempInputBuffers [maxNumChans]; + float* tempOutputBuffers [maxNumChans]; + + CoreAudioInternal (const CoreAudioInternal&); + const CoreAudioInternal& operator= (const CoreAudioInternal&); + + //============================================================================== + static OSStatus audioIOProc (AudioDeviceID inDevice, + const AudioTimeStamp* inNow, + const AudioBufferList* inInputData, + const AudioTimeStamp* inInputTime, + AudioBufferList* outOutputData, + const AudioTimeStamp* inOutputTime, + void* device) + { + ((CoreAudioInternal*) device)->audioCallback (inInputData, outOutputData); + return noErr; + } + + static OSStatus deviceListenerProc (AudioDeviceID inDevice, + UInt32 inLine, + Boolean isInput, + AudioDevicePropertyID inPropertyID, + void* inClientData) + { + CoreAudioInternal* const intern = (CoreAudioInternal*) inClientData; + + switch (inPropertyID) + { + case kAudioDevicePropertyBufferSize: + case kAudioDevicePropertyBufferFrameSize: + case kAudioDevicePropertyNominalSampleRate: + case kAudioDevicePropertyStreamFormat: + case kAudioDevicePropertyDeviceIsAlive: + intern->deviceDetailsChanged(); + break; + + case kAudioDevicePropertyBufferSizeRange: + case kAudioDevicePropertyVolumeScalar: + case kAudioDevicePropertyMute: + case kAudioDevicePropertyPlayThru: + case kAudioDevicePropertyDataSource: + case kAudioDevicePropertyDeviceIsRunning: + break; + } + + return noErr; + } + + //============================================================================== + static OSType* getAllDataSourcesForDevice (AudioDeviceID deviceID, const bool input, int& num) + { + OSType* types = 0; + UInt32 size = 0; + num = 0; + + if (deviceID != 0 + && OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyDataSources, &size, 0))) + { + types = (OSType*) juce_calloc (size); + + if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyDataSources, &size, types))) + { + num = size / sizeof (OSType); + } + else + { + juce_free (types); + types = 0; + } + } + + return types; + } +}; + + +//============================================================================== +class CoreAudioIODevice : public AudioIODevice +{ +public: + CoreAudioIODevice (const String& deviceName, + AudioDeviceID inputDeviceId, + const int inputIndex_, + AudioDeviceID outputDeviceId, + const int outputIndex_) + : AudioIODevice (deviceName, "CoreAudio"), + inputIndex (inputIndex_), + outputIndex (outputIndex_), + isOpen_ (false), + isStarted (false) + { + internal = 0; + CoreAudioInternal* device = 0; + + if (outputDeviceId == 0 || outputDeviceId == inputDeviceId) + { + jassert (inputDeviceId != 0); + + device = new CoreAudioInternal (inputDeviceId); + lastError = device->error; + + if (lastError.isNotEmpty()) + deleteAndZero (device); + } + else + { + device = new CoreAudioInternal (outputDeviceId); + lastError = device->error; + + if (lastError.isNotEmpty()) + { + deleteAndZero (device); + } + else if (inputDeviceId != 0) + { + CoreAudioInternal* secondDevice = new CoreAudioInternal (inputDeviceId); + lastError = device->error; + + if (lastError.isNotEmpty()) + { + delete secondDevice; + } + else + { + device->inputDevice = secondDevice; + secondDevice->isSlaveDevice = true; + } + } + } + + internal = device; + + AudioHardwareAddPropertyListener (kAudioPropertyWildcardPropertyID, + hardwareListenerProc, internal); + } + + ~CoreAudioIODevice() + { + AudioHardwareRemovePropertyListener (kAudioPropertyWildcardPropertyID, + hardwareListenerProc); + + delete internal; + } + + const StringArray getOutputChannelNames() + { + return internal->outChanNames; + } + + const StringArray getInputChannelNames() + { + if (internal->inputDevice != 0) + return internal->inputDevice->inChanNames; + else + return internal->inChanNames; + } + + int getNumSampleRates() + { + return internal->sampleRates.size(); + } + + double getSampleRate (int index) + { + return internal->sampleRates [index]; + } + + int getNumBufferSizesAvailable() + { + return internal->bufferSizes.size(); + } + + int getBufferSizeSamples (int index) + { + return internal->bufferSizes [index]; + } + + int getDefaultBufferSize() + { + for (int i = 0; i < getNumBufferSizesAvailable(); ++i) + if (getBufferSizeSamples(i) >= 512) + return getBufferSizeSamples(i); + + return 512; + } + + const String open (const BitArray& inputChannels, + const BitArray& outputChannels, + double sampleRate, + int bufferSizeSamples) + { + isOpen_ = true; + + if (bufferSizeSamples <= 0) + bufferSizeSamples = getDefaultBufferSize(); + + internal->reopen (inputChannels, outputChannels, sampleRate, bufferSizeSamples); + lastError = internal->error; + return lastError; + } + + void close() + { + isOpen_ = false; + } + + bool isOpen() + { + return isOpen_; + } + + int getCurrentBufferSizeSamples() + { + return internal != 0 ? internal->getBufferSize() : 512; + } + + double getCurrentSampleRate() + { + return internal != 0 ? internal->getSampleRate() : 0; + } + + int getCurrentBitDepth() + { + return 32; // no way to find out, so just assume it's high.. + } + + const BitArray getActiveOutputChannels() const + { + return internal != 0 ? internal->activeOutputChans : BitArray(); + } + + const BitArray getActiveInputChannels() const + { + BitArray chans; + + if (internal != 0) + { + chans = internal->activeInputChans; + + if (internal->inputDevice != 0) + chans.orWith (internal->inputDevice->activeInputChans); + } + + return chans; + } + + int getOutputLatencyInSamples() + { + if (internal == 0) + return 0; + + // this seems like a good guess at getting the latency right - comparing + // this with a round-trip measurement, it gets it to within a few millisecs + // for the built-in mac soundcard + return internal->outputLatency + internal->getBufferSize() * 2; + } + + int getInputLatencyInSamples() + { + if (internal == 0) + return 0; + + return internal->inputLatency + internal->getBufferSize() * 2; + } + + void start (AudioIODeviceCallback* callback) + { + if (internal != 0 && ! isStarted) + { + if (callback != 0) + callback->audioDeviceAboutToStart (this); + + isStarted = true; + internal->start (callback); + } + } + + void stop() + { + if (isStarted && internal != 0) + { + AudioIODeviceCallback* const lastCallback = internal->callback; + + isStarted = false; + internal->stop (true); + + if (lastCallback != 0) + lastCallback->audioDeviceStopped(); + } + } + + bool isPlaying() + { + if (internal->callback == 0) + isStarted = false; + + return isStarted; + } + + const String getLastError() + { + return lastError; + } + + int inputIndex, outputIndex; + + juce_UseDebuggingNewOperator + +private: + CoreAudioInternal* internal; + bool isOpen_, isStarted; + String lastError; + + static OSStatus hardwareListenerProc (AudioHardwarePropertyID inPropertyID, void* inClientData) + { + CoreAudioInternal* const intern = (CoreAudioInternal*) inClientData; + + switch (inPropertyID) + { + case kAudioHardwarePropertyDevices: + intern->deviceDetailsChanged(); + break; + + case kAudioHardwarePropertyDefaultOutputDevice: + case kAudioHardwarePropertyDefaultInputDevice: + case kAudioHardwarePropertyDefaultSystemOutputDevice: + break; + } + + return noErr; + } + + CoreAudioIODevice (const CoreAudioIODevice&); + const CoreAudioIODevice& operator= (const CoreAudioIODevice&); +}; + +//============================================================================== +class CoreAudioIODeviceType : public AudioIODeviceType +{ +public: + //============================================================================== + CoreAudioIODeviceType() + : AudioIODeviceType (T("CoreAudio")), + hasScanned (false) + { + } + + ~CoreAudioIODeviceType() + { + } + + //============================================================================== + void scanForDevices() + { + hasScanned = true; + + inputDeviceNames.clear(); + outputDeviceNames.clear(); + inputIds.clear(); + outputIds.clear(); + + UInt32 size; + if (OK (AudioHardwareGetPropertyInfo (kAudioHardwarePropertyDevices, &size, 0))) + { + AudioDeviceID* const devs = (AudioDeviceID*) juce_calloc (size); + + if (OK (AudioHardwareGetProperty (kAudioHardwarePropertyDevices, &size, devs))) + { + static bool alreadyLogged = false; + const int num = size / sizeof (AudioDeviceID); + for (int i = 0; i < num; ++i) + { + char name[1024]; + size = sizeof (name); + if (OK (AudioDeviceGetProperty (devs[i], 0, false, kAudioDevicePropertyDeviceName, &size, name))) + { + const String nameString (String::fromUTF8 ((const uint8*) name, strlen (name))); + + if (! alreadyLogged) + log (T("CoreAudio device: ") + nameString); + + const int numIns = getNumChannels (devs[i], true); + const int numOuts = getNumChannels (devs[i], false); + + if (numIns > 0) + { + inputDeviceNames.add (nameString); + inputIds.add (devs[i]); + } + + if (numOuts > 0) + { + outputDeviceNames.add (nameString); + outputIds.add (devs[i]); + } + } + } + + alreadyLogged = true; + } + + juce_free (devs); + } + + inputDeviceNames.appendNumbersToDuplicates (false, true); + outputDeviceNames.appendNumbersToDuplicates (false, true); + } + + const StringArray getDeviceNames (const bool wantInputNames) const + { + jassert (hasScanned); // need to call scanForDevices() before doing this + + if (wantInputNames) + return inputDeviceNames; + else + return outputDeviceNames; + } + + int getDefaultDeviceIndex (const bool forInput) const + { + jassert (hasScanned); // need to call scanForDevices() before doing this + + AudioDeviceID deviceID; + UInt32 size = sizeof (deviceID); + + // if they're asking for any input channels at all, use the default input, so we + // get the built-in mic rather than the built-in output with no inputs.. + if (AudioHardwareGetProperty (forInput ? kAudioHardwarePropertyDefaultInputDevice + : kAudioHardwarePropertyDefaultOutputDevice, + &size, &deviceID) == noErr) + { + if (forInput) + { + for (int i = inputIds.size(); --i >= 0;) + if (inputIds[i] == deviceID) + return i; + } + else + { + for (int i = outputIds.size(); --i >= 0;) + if (outputIds[i] == deviceID) + return i; + } + } + + return 0; + } + + int getIndexOfDevice (AudioIODevice* device, const bool asInput) const + { + jassert (hasScanned); // need to call scanForDevices() before doing this + + CoreAudioIODevice* const d = dynamic_cast (device); + if (d == 0) + return -1; + + return asInput ? d->inputIndex + : d->outputIndex; + } + + bool hasSeparateInputsAndOutputs() const { return true; } + + AudioIODevice* createDevice (const String& outputDeviceName, + const String& inputDeviceName) + { + jassert (hasScanned); // need to call scanForDevices() before doing this + + const int inputIndex = inputDeviceNames.indexOf (inputDeviceName); + const int outputIndex = outputDeviceNames.indexOf (outputDeviceName); + + String deviceName (outputDeviceName); + if (deviceName.isEmpty()) + deviceName = inputDeviceName; + + if (index >= 0) + return new CoreAudioIODevice (deviceName, + inputIds [inputIndex], + inputIndex, + outputIds [outputIndex], + outputIndex); + + return 0; + } + + //============================================================================== + juce_UseDebuggingNewOperator + +private: + StringArray inputDeviceNames, outputDeviceNames; + Array inputIds, outputIds; + + bool hasScanned; + + static int getNumChannels (AudioDeviceID deviceID, bool input) + { + int total = 0; + UInt32 size; + + if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, 0))) + { + AudioBufferList* const bufList = (AudioBufferList*) juce_calloc (size); + + if (OK (AudioDeviceGetProperty (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, bufList))) + { + const int numStreams = bufList->mNumberBuffers; + + for (int i = 0; i < numStreams; ++i) + { + const AudioBuffer& b = bufList->mBuffers[i]; + total += b.mNumberChannels; + } + } + + juce_free (bufList); + } + + return total; + } + + CoreAudioIODeviceType (const CoreAudioIODeviceType&); + const CoreAudioIODeviceType& operator= (const CoreAudioIODeviceType&); +}; + +//============================================================================== +AudioIODeviceType* juce_createDefaultAudioIODeviceType() +{ + return new CoreAudioIODeviceType(); +} + +#undef log + +#endif diff --git a/build/macosx/platform_specific_code/juce_mac_CoreMidi.cpp b/build/macosx/platform_specific_code/juce_mac_CoreMidi.cpp index d585d8bc02..8f8ee00d4c 100644 --- a/build/macosx/platform_specific_code/juce_mac_CoreMidi.cpp +++ b/build/macosx/platform_specific_code/juce_mac_CoreMidi.cpp @@ -1,592 +1,583 @@ -/* - ============================================================================== - - 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 -#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_appframework/application/juce_Application.h" -#include "../../../src/juce_core/basics/juce_Time.h" -#include "../../../src/juce_core/containers/juce_MemoryBlock.h" -#include "../../../src/juce_core/misc/juce_PlatformUtilities.h" -#include "../../../src/juce_core/threads/juce_ScopedLock.h" - -//============================================================================== -#undef log -#define log(a) Logger::writeToLog(a) - -static bool logAnyErrorsMidi (const OSStatus err, const int lineNum) -{ - if (err == noErr) - return true; - - log (T("CoreMidi error: ") + String (lineNum) + T(" - ") + String::toHexString ((int)err)); - jassertfalse - return false; -} - -#undef OK -#define OK(a) logAnyErrorsMidi(a, __LINE__) - - -//============================================================================== -static const String getEndpointName (MIDIEndpointRef endpoint, bool isExternal) -{ - String result; - CFStringRef str = 0; - - MIDIObjectGetStringProperty (endpoint, kMIDIPropertyName, &str); - - if (str != 0) - { - result = PlatformUtilities::cfStringToJuceString (str); - CFRelease (str); - str = 0; - } - - MIDIEntityRef entity = 0; - MIDIEndpointGetEntity (endpoint, &entity); - - if (entity == 0) - return result; // probably virtual - - if (result.isEmpty()) - { - // endpoint name has zero length - try the entity - MIDIObjectGetStringProperty (entity, kMIDIPropertyName, &str); - - if (str != 0) - { - result += PlatformUtilities::cfStringToJuceString (str); - CFRelease (str); - str = 0; - } - } - - // now consider the device's name - MIDIDeviceRef device = 0; - MIDIEntityGetDevice (entity, &device); - if (device == 0) - return result; - - MIDIObjectGetStringProperty (device, kMIDIPropertyName, &str); - - if (str != 0) - { - const String s (PlatformUtilities::cfStringToJuceString (str)); - CFRelease (str); - - // if an external device has only one entity, throw away - // the endpoint name and just use the device name - if (isExternal && MIDIDeviceGetNumberOfEntities (device) < 2) - { - result = s; - } - else if (! result.startsWithIgnoreCase (s)) - { - // prepend the device name to the entity name - result = (s + T(" ") + result).trimEnd(); - } - } - - return result; -} - -static const String getConnectedEndpointName (MIDIEndpointRef endpoint) -{ - String result; - - // Does the endpoint have connections? - CFDataRef connections = 0; - int numConnections = 0; - - MIDIObjectGetDataProperty (endpoint, kMIDIPropertyConnectionUniqueID, &connections); - - if (connections != 0) - { - numConnections = CFDataGetLength (connections) / sizeof (MIDIUniqueID); - - if (numConnections > 0) - { - const SInt32* pid = reinterpret_cast (CFDataGetBytePtr (connections)); - - for (int i = 0; i < numConnections; ++i, ++pid) - { - MIDIUniqueID uid = EndianS32_BtoN (*pid); - MIDIObjectRef connObject; - MIDIObjectType connObjectType; - OSStatus err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType); - - if (err == noErr) - { - String s; - - if (connObjectType == kMIDIObjectType_ExternalSource - || connObjectType == kMIDIObjectType_ExternalDestination) - { - // Connected to an external device's endpoint (10.3 and later). - s = getEndpointName (static_cast (connObject), true); - } - else - { - // Connected to an external device (10.2) (or something else, catch-all) - CFStringRef str = 0; - MIDIObjectGetStringProperty (connObject, kMIDIPropertyName, &str); - - if (str != 0) - { - s = PlatformUtilities::cfStringToJuceString (str); - CFRelease (str); - } - } - - if (s.isNotEmpty()) - { - if (result.isNotEmpty()) - result += (", "); - - result += s; - } - } - } - } - - CFRelease (connections); - } - - if (result.isNotEmpty()) - return result; - - // Here, either the endpoint had no connections, or we failed to obtain names for any of them. - return getEndpointName (endpoint, false); -} - -//============================================================================== -const StringArray MidiOutput::getDevices() -{ - StringArray s; - - const ItemCount num = MIDIGetNumberOfDestinations(); - for (ItemCount i = 0; i < num; ++i) - { - MIDIEndpointRef dest = MIDIGetDestination (i); - - if (dest != 0) - { - String name (getConnectedEndpointName (dest)); - - if (name.isEmpty()) - name = ""; - - s.add (name); - } - else - { - s.add (""); - } - } - - return s; -} - -int MidiOutput::getDefaultDeviceIndex() -{ - return 0; -} - -static MIDIClientRef globalMidiClient; -static bool hasGlobalClientBeenCreated = false; - -static bool makeSureClientExists() -{ - if (! hasGlobalClientBeenCreated) - { - String name (T("JUCE")); - - if (JUCEApplication::getInstance() != 0) - name = JUCEApplication::getInstance()->getApplicationName(); - - CFStringRef appName = PlatformUtilities::juceStringToCFString (name); - - hasGlobalClientBeenCreated = OK (MIDIClientCreate (appName, 0, 0, &globalMidiClient)); - CFRelease (appName); - } - - return hasGlobalClientBeenCreated; -} - -struct MidiPortAndEndpoint -{ - MIDIPortRef port; - MIDIEndpointRef endPoint; -}; - -MidiOutput* MidiOutput::openDevice (int index) -{ - MidiOutput* mo = 0; - - if (((unsigned int) index) < (unsigned int) MIDIGetNumberOfDestinations()) - { - MIDIEndpointRef endPoint = MIDIGetDestination (index); - - CFStringRef pname; - if (OK (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &pname))) - { - log (T("CoreMidi - opening out: ") + PlatformUtilities::cfStringToJuceString (pname)); - - if (makeSureClientExists()) - { - MIDIPortRef port; - - if (OK (MIDIOutputPortCreate (globalMidiClient, pname, &port))) - { - MidiPortAndEndpoint* mpe = new MidiPortAndEndpoint(); - mpe->port = port; - mpe->endPoint = endPoint; - - mo = new MidiOutput(); - mo->internal = (void*)mpe; - } - } - - CFRelease (pname); - } - } - - return mo; -} - -MidiOutput::~MidiOutput() -{ - MidiPortAndEndpoint* const mpe = (MidiPortAndEndpoint*)internal; - MIDIPortDispose (mpe->port); - delete mpe; -} - -void MidiOutput::reset() -{ -} - -bool MidiOutput::getVolume (float& leftVol, float& rightVol) -{ - return false; -} - -void MidiOutput::setVolume (float leftVol, float rightVol) -{ -} - -void MidiOutput::sendMessageNow (const MidiMessage& message) -{ - MidiPortAndEndpoint* const mpe = (MidiPortAndEndpoint*)internal; - - if (message.isSysEx()) - { - MIDIPacketList* const packets = (MIDIPacketList*) juce_malloc (32 + message.getRawDataSize()); - packets->numPackets = 1; - packets->packet[0].timeStamp = 0; - packets->packet[0].length = message.getRawDataSize(); - memcpy (packets->packet[0].data, message.getRawData(), message.getRawDataSize()); - - MIDISend (mpe->port, mpe->endPoint, packets); - juce_free (packets); - } - else - { - MIDIPacketList packets; - packets.numPackets = 1; - packets.packet[0].timeStamp = 0; - packets.packet[0].length = message.getRawDataSize(); - *(int*) (packets.packet[0].data) = *(const int*) message.getRawData(); - - MIDISend (mpe->port, mpe->endPoint, &packets); - } -} - -//============================================================================== -const StringArray MidiInput::getDevices() -{ - StringArray s; - - const ItemCount num = MIDIGetNumberOfSources(); - for (ItemCount i = 0; i < num; ++i) - { - MIDIEndpointRef source = MIDIGetSource (i); - - if (source != 0) - { - String name (getConnectedEndpointName (source)); - - if (name.isEmpty()) - name = ""; - - s.add (name); - } - else - { - s.add (""); - } - } - - return s; -} - -int MidiInput::getDefaultDeviceIndex() -{ - return 0; -} - -//============================================================================== -struct MidiPortAndCallback -{ - MidiInput* input; - MIDIPortRef port; - MIDIEndpointRef endPoint; - MidiInputCallback* callback; - MemoryBlock pendingData; - int pendingBytes; - double pendingDataTime; - bool active; -}; - -static CriticalSection callbackLock; -static VoidArray activeCallbacks; - -static void processSysex (MidiPortAndCallback* const mpe, const uint8*& d, int& size, const double time) -{ - if (*d == 0xf0) - { - mpe->pendingBytes = 0; - mpe->pendingDataTime = time; - } - - mpe->pendingData.ensureSize (mpe->pendingBytes + size, false); - uint8* totalMessage = (uint8*) mpe->pendingData.getData(); - - uint8* dest = totalMessage + mpe->pendingBytes; - - while (size > 0) - { - if (mpe->pendingBytes > 0 && *d >= 0x80) - { - if (*d >= 0xfa || *d == 0xf8) - { - mpe->callback->handleIncomingMidiMessage (mpe->input, MidiMessage (*d, time)); - ++d; - --size; - } - else - { - if (*d == 0xf7) - { - *dest++ = *d++; - mpe->pendingBytes++; - --size; - } - - break; - } - } - else - { - *dest++ = *d++; - mpe->pendingBytes++; - --size; - } - } - - if (totalMessage [mpe->pendingBytes - 1] == 0xf7) - { - mpe->callback->handleIncomingMidiMessage (mpe->input, MidiMessage (totalMessage, - mpe->pendingBytes, - mpe->pendingDataTime)); - mpe->pendingBytes = 0; - } - else - { - mpe->callback->handlePartialSysexMessage (mpe->input, - totalMessage, - mpe->pendingBytes, - mpe->pendingDataTime); - } -} - -static void midiInputProc (const MIDIPacketList* pktlist, - void* readProcRefCon, - void* srcConnRefCon) -{ - double time = Time::getMillisecondCounterHiRes() * 0.001; - const double originalTime = time; - - MidiPortAndCallback* const mpe = (MidiPortAndCallback*) readProcRefCon; - const ScopedLock sl (callbackLock); - - if (activeCallbacks.contains (mpe) && mpe->active) - { - const MIDIPacket* packet = &pktlist->packet[0]; - - for (unsigned int i = 0; i < pktlist->numPackets; ++i) - { - const uint8* d = (const uint8*) (packet->data); - int size = packet->length; - - while (size > 0) - { - time = originalTime; - - if (mpe->pendingBytes > 0 || d[0] == 0xf0) - { - processSysex (mpe, d, size, time); - } - else - { - int used = 0; - const MidiMessage m (d, size, used, 0, time); - - if (used <= 0) - { - jassertfalse // malformed midi message - break; - } - else - { - mpe->callback->handleIncomingMidiMessage (mpe->input, m); - } - - size -= used; - d += used; - } - } - - packet = MIDIPacketNext (packet); - } - } -} - -MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) -{ - MidiInput* mi = 0; - - if (((unsigned int) index) < (unsigned int) MIDIGetNumberOfSources()) - { - MIDIEndpointRef endPoint = MIDIGetSource (index); - - if (endPoint != 0) - { - CFStringRef pname; - - if (OK (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &pname))) - { - log (T("CoreMidi - opening inp: ") + PlatformUtilities::cfStringToJuceString (pname)); - - if (makeSureClientExists()) - { - MIDIPortRef port; - - MidiPortAndCallback* const mpe = new MidiPortAndCallback(); - mpe->active = false; - - if (OK (MIDIInputPortCreate (globalMidiClient, pname, midiInputProc, mpe, &port))) - { - if (OK (MIDIPortConnectSource (port, endPoint, 0))) - { - mpe->port = port; - mpe->endPoint = endPoint; - mpe->callback = callback; - mpe->pendingBytes = 0; - mpe->pendingData.ensureSize (128); - - mi = new MidiInput (getDevices() [index]); - mpe->input = mi; - mi->internal = (void*) mpe; - - const ScopedLock sl (callbackLock); - activeCallbacks.add (mpe); - } - else - { - OK (MIDIPortDispose (port)); - delete mpe; - } - } - else - { - delete mpe; - } - } - } - - CFRelease (pname); - } - } - - return mi; -} - -MidiInput::MidiInput (const String& name_) - : name (name_) -{ -} - -MidiInput::~MidiInput() -{ - MidiPortAndCallback* const mpe = (MidiPortAndCallback*) internal; - mpe->active = false; - - callbackLock.enter(); - activeCallbacks.removeValue (mpe); - callbackLock.exit(); - - OK (MIDIPortDisconnectSource (mpe->port, mpe->endPoint)); - OK (MIDIPortDispose (mpe->port)); - delete mpe; -} - -void MidiInput::start() -{ - MidiPortAndCallback* const mpe = (MidiPortAndCallback*) internal; - const ScopedLock sl (callbackLock); - mpe->active = true; -} - -void MidiInput::stop() -{ - MidiPortAndCallback* const mpe = (MidiPortAndCallback*) internal; - const ScopedLock sl (callbackLock); - mpe->active = false; -} - -#undef log - -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 + +//============================================================================== +#undef log +#define log(a) Logger::writeToLog(a) + +static bool logAnyErrorsMidi (const OSStatus err, const int lineNum) +{ + if (err == noErr) + return true; + + log (T("CoreMidi error: ") + String (lineNum) + T(" - ") + String::toHexString ((int)err)); + jassertfalse + return false; +} + +#undef OK +#define OK(a) logAnyErrorsMidi(a, __LINE__) + + +//============================================================================== +static const String getEndpointName (MIDIEndpointRef endpoint, bool isExternal) +{ + String result; + CFStringRef str = 0; + + MIDIObjectGetStringProperty (endpoint, kMIDIPropertyName, &str); + + if (str != 0) + { + result = PlatformUtilities::cfStringToJuceString (str); + CFRelease (str); + str = 0; + } + + MIDIEntityRef entity = 0; + MIDIEndpointGetEntity (endpoint, &entity); + + if (entity == 0) + return result; // probably virtual + + if (result.isEmpty()) + { + // endpoint name has zero length - try the entity + MIDIObjectGetStringProperty (entity, kMIDIPropertyName, &str); + + if (str != 0) + { + result += PlatformUtilities::cfStringToJuceString (str); + CFRelease (str); + str = 0; + } + } + + // now consider the device's name + MIDIDeviceRef device = 0; + MIDIEntityGetDevice (entity, &device); + if (device == 0) + return result; + + MIDIObjectGetStringProperty (device, kMIDIPropertyName, &str); + + if (str != 0) + { + const String s (PlatformUtilities::cfStringToJuceString (str)); + CFRelease (str); + + // if an external device has only one entity, throw away + // the endpoint name and just use the device name + if (isExternal && MIDIDeviceGetNumberOfEntities (device) < 2) + { + result = s; + } + else if (! result.startsWithIgnoreCase (s)) + { + // prepend the device name to the entity name + result = (s + T(" ") + result).trimEnd(); + } + } + + return result; +} + +static const String getConnectedEndpointName (MIDIEndpointRef endpoint) +{ + String result; + + // Does the endpoint have connections? + CFDataRef connections = 0; + int numConnections = 0; + + MIDIObjectGetDataProperty (endpoint, kMIDIPropertyConnectionUniqueID, &connections); + + if (connections != 0) + { + numConnections = CFDataGetLength (connections) / sizeof (MIDIUniqueID); + + if (numConnections > 0) + { + const SInt32* pid = reinterpret_cast (CFDataGetBytePtr (connections)); + + for (int i = 0; i < numConnections; ++i, ++pid) + { + MIDIUniqueID uid = EndianS32_BtoN (*pid); + MIDIObjectRef connObject; + MIDIObjectType connObjectType; + OSStatus err = MIDIObjectFindByUniqueID (uid, &connObject, &connObjectType); + + if (err == noErr) + { + String s; + + if (connObjectType == kMIDIObjectType_ExternalSource + || connObjectType == kMIDIObjectType_ExternalDestination) + { + // Connected to an external device's endpoint (10.3 and later). + s = getEndpointName (static_cast (connObject), true); + } + else + { + // Connected to an external device (10.2) (or something else, catch-all) + CFStringRef str = 0; + MIDIObjectGetStringProperty (connObject, kMIDIPropertyName, &str); + + if (str != 0) + { + s = PlatformUtilities::cfStringToJuceString (str); + CFRelease (str); + } + } + + if (s.isNotEmpty()) + { + if (result.isNotEmpty()) + result += (", "); + + result += s; + } + } + } + } + + CFRelease (connections); + } + + if (result.isNotEmpty()) + return result; + + // Here, either the endpoint had no connections, or we failed to obtain names for any of them. + return getEndpointName (endpoint, false); +} + +//============================================================================== +const StringArray MidiOutput::getDevices() +{ + StringArray s; + + const ItemCount num = MIDIGetNumberOfDestinations(); + for (ItemCount i = 0; i < num; ++i) + { + MIDIEndpointRef dest = MIDIGetDestination (i); + + if (dest != 0) + { + String name (getConnectedEndpointName (dest)); + + if (name.isEmpty()) + name = ""; + + s.add (name); + } + else + { + s.add (""); + } + } + + return s; +} + +int MidiOutput::getDefaultDeviceIndex() +{ + return 0; +} + +static MIDIClientRef globalMidiClient; +static bool hasGlobalClientBeenCreated = false; + +static bool makeSureClientExists() +{ + if (! hasGlobalClientBeenCreated) + { + String name (T("JUCE")); + + if (JUCEApplication::getInstance() != 0) + name = JUCEApplication::getInstance()->getApplicationName(); + + CFStringRef appName = PlatformUtilities::juceStringToCFString (name); + + hasGlobalClientBeenCreated = OK (MIDIClientCreate (appName, 0, 0, &globalMidiClient)); + CFRelease (appName); + } + + return hasGlobalClientBeenCreated; +} + +struct MidiPortAndEndpoint +{ + MIDIPortRef port; + MIDIEndpointRef endPoint; +}; + +MidiOutput* MidiOutput::openDevice (int index) +{ + MidiOutput* mo = 0; + + if (((unsigned int) index) < (unsigned int) MIDIGetNumberOfDestinations()) + { + MIDIEndpointRef endPoint = MIDIGetDestination (index); + + CFStringRef pname; + if (OK (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &pname))) + { + log (T("CoreMidi - opening out: ") + PlatformUtilities::cfStringToJuceString (pname)); + + if (makeSureClientExists()) + { + MIDIPortRef port; + + if (OK (MIDIOutputPortCreate (globalMidiClient, pname, &port))) + { + MidiPortAndEndpoint* mpe = new MidiPortAndEndpoint(); + mpe->port = port; + mpe->endPoint = endPoint; + + mo = new MidiOutput(); + mo->internal = (void*)mpe; + } + } + + CFRelease (pname); + } + } + + return mo; +} + +MidiOutput::~MidiOutput() +{ + MidiPortAndEndpoint* const mpe = (MidiPortAndEndpoint*)internal; + MIDIPortDispose (mpe->port); + delete mpe; +} + +void MidiOutput::reset() +{ +} + +bool MidiOutput::getVolume (float& leftVol, float& rightVol) +{ + return false; +} + +void MidiOutput::setVolume (float leftVol, float rightVol) +{ +} + +void MidiOutput::sendMessageNow (const MidiMessage& message) +{ + MidiPortAndEndpoint* const mpe = (MidiPortAndEndpoint*)internal; + + if (message.isSysEx()) + { + MIDIPacketList* const packets = (MIDIPacketList*) juce_malloc (32 + message.getRawDataSize()); + packets->numPackets = 1; + packets->packet[0].timeStamp = 0; + packets->packet[0].length = message.getRawDataSize(); + memcpy (packets->packet[0].data, message.getRawData(), message.getRawDataSize()); + + MIDISend (mpe->port, mpe->endPoint, packets); + juce_free (packets); + } + else + { + MIDIPacketList packets; + packets.numPackets = 1; + packets.packet[0].timeStamp = 0; + packets.packet[0].length = message.getRawDataSize(); + *(int*) (packets.packet[0].data) = *(const int*) message.getRawData(); + + MIDISend (mpe->port, mpe->endPoint, &packets); + } +} + +//============================================================================== +const StringArray MidiInput::getDevices() +{ + StringArray s; + + const ItemCount num = MIDIGetNumberOfSources(); + for (ItemCount i = 0; i < num; ++i) + { + MIDIEndpointRef source = MIDIGetSource (i); + + if (source != 0) + { + String name (getConnectedEndpointName (source)); + + if (name.isEmpty()) + name = ""; + + s.add (name); + } + else + { + s.add (""); + } + } + + return s; +} + +int MidiInput::getDefaultDeviceIndex() +{ + return 0; +} + +//============================================================================== +struct MidiPortAndCallback +{ + MidiInput* input; + MIDIPortRef port; + MIDIEndpointRef endPoint; + MidiInputCallback* callback; + MemoryBlock pendingData; + int pendingBytes; + double pendingDataTime; + bool active; +}; + +static CriticalSection callbackLock; +static VoidArray activeCallbacks; + +static void processSysex (MidiPortAndCallback* const mpe, const uint8*& d, int& size, const double time) +{ + if (*d == 0xf0) + { + mpe->pendingBytes = 0; + mpe->pendingDataTime = time; + } + + mpe->pendingData.ensureSize (mpe->pendingBytes + size, false); + uint8* totalMessage = (uint8*) mpe->pendingData.getData(); + + uint8* dest = totalMessage + mpe->pendingBytes; + + while (size > 0) + { + if (mpe->pendingBytes > 0 && *d >= 0x80) + { + if (*d >= 0xfa || *d == 0xf8) + { + mpe->callback->handleIncomingMidiMessage (mpe->input, MidiMessage (*d, time)); + ++d; + --size; + } + else + { + if (*d == 0xf7) + { + *dest++ = *d++; + mpe->pendingBytes++; + --size; + } + + break; + } + } + else + { + *dest++ = *d++; + mpe->pendingBytes++; + --size; + } + } + + if (totalMessage [mpe->pendingBytes - 1] == 0xf7) + { + mpe->callback->handleIncomingMidiMessage (mpe->input, MidiMessage (totalMessage, + mpe->pendingBytes, + mpe->pendingDataTime)); + mpe->pendingBytes = 0; + } + else + { + mpe->callback->handlePartialSysexMessage (mpe->input, + totalMessage, + mpe->pendingBytes, + mpe->pendingDataTime); + } +} + +static void midiInputProc (const MIDIPacketList* pktlist, + void* readProcRefCon, + void* srcConnRefCon) +{ + double time = Time::getMillisecondCounterHiRes() * 0.001; + const double originalTime = time; + + MidiPortAndCallback* const mpe = (MidiPortAndCallback*) readProcRefCon; + const ScopedLock sl (callbackLock); + + if (activeCallbacks.contains (mpe) && mpe->active) + { + const MIDIPacket* packet = &pktlist->packet[0]; + + for (unsigned int i = 0; i < pktlist->numPackets; ++i) + { + const uint8* d = (const uint8*) (packet->data); + int size = packet->length; + + while (size > 0) + { + time = originalTime; + + if (mpe->pendingBytes > 0 || d[0] == 0xf0) + { + processSysex (mpe, d, size, time); + } + else + { + int used = 0; + const MidiMessage m (d, size, used, 0, time); + + if (used <= 0) + { + jassertfalse // malformed midi message + break; + } + else + { + mpe->callback->handleIncomingMidiMessage (mpe->input, m); + } + + size -= used; + d += used; + } + } + + packet = MIDIPacketNext (packet); + } + } +} + +MidiInput* MidiInput::openDevice (int index, MidiInputCallback* callback) +{ + MidiInput* mi = 0; + + if (((unsigned int) index) < (unsigned int) MIDIGetNumberOfSources()) + { + MIDIEndpointRef endPoint = MIDIGetSource (index); + + if (endPoint != 0) + { + CFStringRef pname; + + if (OK (MIDIObjectGetStringProperty (endPoint, kMIDIPropertyName, &pname))) + { + log (T("CoreMidi - opening inp: ") + PlatformUtilities::cfStringToJuceString (pname)); + + if (makeSureClientExists()) + { + MIDIPortRef port; + + MidiPortAndCallback* const mpe = new MidiPortAndCallback(); + mpe->active = false; + + if (OK (MIDIInputPortCreate (globalMidiClient, pname, midiInputProc, mpe, &port))) + { + if (OK (MIDIPortConnectSource (port, endPoint, 0))) + { + mpe->port = port; + mpe->endPoint = endPoint; + mpe->callback = callback; + mpe->pendingBytes = 0; + mpe->pendingData.ensureSize (128); + + mi = new MidiInput (getDevices() [index]); + mpe->input = mi; + mi->internal = (void*) mpe; + + const ScopedLock sl (callbackLock); + activeCallbacks.add (mpe); + } + else + { + OK (MIDIPortDispose (port)); + delete mpe; + } + } + else + { + delete mpe; + } + } + } + + CFRelease (pname); + } + } + + return mi; +} + +MidiInput::MidiInput (const String& name_) + : name (name_) +{ +} + +MidiInput::~MidiInput() +{ + MidiPortAndCallback* const mpe = (MidiPortAndCallback*) internal; + mpe->active = false; + + callbackLock.enter(); + activeCallbacks.removeValue (mpe); + callbackLock.exit(); + + OK (MIDIPortDisconnectSource (mpe->port, mpe->endPoint)); + OK (MIDIPortDispose (mpe->port)); + delete mpe; +} + +void MidiInput::start() +{ + MidiPortAndCallback* const mpe = (MidiPortAndCallback*) internal; + const ScopedLock sl (callbackLock); + mpe->active = true; +} + +void MidiInput::stop() +{ + MidiPortAndCallback* const mpe = (MidiPortAndCallback*) internal; + const ScopedLock sl (callbackLock); + mpe->active = false; +} + +#undef log + +#endif diff --git a/build/macosx/platform_specific_code/juce_mac_Debugging.mm b/build/macosx/platform_specific_code/juce_mac_Debugging.mm new file mode 100644 index 0000000000..6a2e1184ef --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_Debugging.mm @@ -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 diff --git a/build/macosx/platform_specific_code/juce_mac_FileChooser.mm b/build/macosx/platform_specific_code/juce_mac_FileChooser.mm index 5d8739b241..94fafaed2e 100644 --- a/build/macosx/platform_specific_code/juce_mac_FileChooser.mm +++ b/build/macosx/platform_specific_code/juce_mac_FileChooser.mm @@ -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 - -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& 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& 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 diff --git a/build/macosx/platform_specific_code/juce_mac_Files.mm b/build/macosx/platform_specific_code/juce_mac_Files.mm new file mode 100644 index 0000000000..0c13ddcc52 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_Files.mm @@ -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 diff --git a/build/macosx/platform_specific_code/juce_mac_Fonts.mm b/build/macosx/platform_specific_code/juce_mac_Fonts.mm index 6be237db02..022ac32591 100644 --- a/build/macosx/platform_specific_code/juce_mac_Fonts.mm +++ b/build/macosx/platform_specific_code/juce_mac_Fonts.mm @@ -29,19 +29,9 @@ ============================================================================== */ -#include "../../../src/juce_core/basics/juce_StandardHeader.h" -#include - -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 diff --git a/build/macosx/platform_specific_code/juce_mac_MainMenu.mm b/build/macosx/platform_specific_code/juce_mac_MainMenu.mm new file mode 100644 index 0000000000..c5f5ee7459 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_MainMenu.mm @@ -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(""), 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 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 diff --git a/build/macosx/platform_specific_code/juce_mac_MessageManager.mm b/build/macosx/platform_specific_code/juce_mac_MessageManager.mm new file mode 100644 index 0000000000..850025fb11 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_MessageManager.mm @@ -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 diff --git a/build/macosx/platform_specific_code/juce_mac_Messaging.mm b/build/macosx/platform_specific_code/juce_mac_Messaging.mm deleted file mode 100644 index 18c5f2eb7d..0000000000 --- a/build/macosx/platform_specific_code/juce_mac_Messaging.mm +++ /dev/null @@ -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 - -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 diff --git a/build/macosx/platform_specific_code/juce_mac_MiscUtilities.mm b/build/macosx/platform_specific_code/juce_mac_MiscUtilities.mm new file mode 100644 index 0000000000..8eb3d3e9aa --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_MiscUtilities.mm @@ -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 & 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 \ No newline at end of file diff --git a/build/macosx/platform_specific_code/juce_mac_MouseCursor.mm b/build/macosx/platform_specific_code/juce_mac_MouseCursor.mm new file mode 100644 index 0000000000..3cc5aaf711 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_MouseCursor.mm @@ -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 diff --git a/build/macosx/platform_specific_code/juce_mac_NSViewComponent.mm b/build/macosx/platform_specific_code/juce_mac_NSViewComponent.mm new file mode 100644 index 0000000000..d1a24ed03b --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_NSViewComponent.mm @@ -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 (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 diff --git a/build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm b/build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm new file mode 100644 index 0000000000..c0b6c3d54a --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm @@ -0,0 +1,1258 @@ +/* + ============================================================================== + + 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 NSViewComponentPeer; + +static int currentModifiers = 0; + +//============================================================================== +END_JUCE_NAMESPACE + +static void updateModifiers (NSEvent* e); + +using namespace JUCE_NAMESPACE; + +@interface JuceNSView : NSView +{ +@public + NSViewComponentPeer* owner; +} + +- (JuceNSView*) initWithOwner: (NSViewComponentPeer*) owner withFrame: (NSRect) frame; +- (void) dealloc; + +- (BOOL) isOpaque; +- (void) drawRect: (NSRect) r; + +- (void) mouseDown: (NSEvent*) ev; +- (void) mouseUp: (NSEvent*) ev; +- (void) mouseDragged: (NSEvent*) ev; +- (void) mouseMoved: (NSEvent*) ev; +- (void) mouseEntered: (NSEvent*) ev; +- (void) mouseExited: (NSEvent*) ev; +- (void) rightMouseDown: (NSEvent*) ev; +- (void) rightMouseDragged: (NSEvent*) ev; +- (void) rightMouseUp: (NSEvent*) ev; +- (void) scrollWheel: (NSEvent*) ev; +- (BOOL) acceptsFirstMouse: (NSEvent*) ev; +- (void) frameChanged: (NSNotification*) n; + +- (void) keyDown: (NSEvent*) ev; +- (void) keyUp: (NSEvent*) ev; +- (void) flagsChanged: (NSEvent*) ev; +#if MACOS_10_4_OR_EARLIER +- (BOOL) performKeyEquivalent: (NSEvent*) ev; +#endif + +- (BOOL) becomeFirstResponder; +- (BOOL) resignFirstResponder; + +- (NSArray*) getSupportedDragTypes; +- (BOOL) sendDragCallback: (int) type sender: (id ) sender; +- (NSDragOperation) draggingEntered: (id ) sender; +- (NSDragOperation) draggingUpdated: (id ) sender; +- (void) draggingEnded: (id ) sender; +- (void) draggingExited: (id ) sender; +- (BOOL) prepareForDragOperation: (id ) sender; +- (BOOL) performDragOperation: (id ) sender; +- (void) concludeDragOperation: (id ) sender; + +@end + +//============================================================================== +@interface JuceNSWindow : NSWindow +{ + NSViewComponentPeer* owner; +} + +- (void) setOwner: (NSViewComponentPeer*) owner; +- (BOOL) canBecomeKeyWindow; +- (BOOL) windowShouldClose: (id) window; + +@end + +BEGIN_JUCE_NAMESPACE + +//============================================================================== +class NSViewComponentPeer : public ComponentPeer +{ +public: + NSViewComponentPeer (Component* const component, + const int windowStyleFlags, + NSView* viewToAttachTo); + + ~NSViewComponentPeer(); + + //============================================================================== + void* getNativeHandle() const; + void setVisible (bool shouldBeVisible); + void setTitle (const String& title); + void setPosition (int x, int y); + void setSize (int w, int h); + void setBounds (int x, int y, int w, int h, const bool isNowFullScreen); + void getBounds (int& x, int& y, int& w, int& h, const bool global) const; + void getBounds (int& x, int& y, int& w, int& h) const; + int getScreenX() const; + int getScreenY() const; + void relativePositionToGlobal (int& x, int& y); + void globalPositionToRelative (int& x, int& y); + void setMinimised (bool shouldBeMinimised); + bool isMinimised() const; + void setFullScreen (bool shouldBeFullScreen); + bool isFullScreen() const; + bool contains (int x, int y, bool trueIfInAChildWindow) const; + const BorderSize getFrameSize() const; + bool setAlwaysOnTop (bool alwaysOnTop); + void toFront (bool makeActiveWindow); + void toBehind (ComponentPeer* other); + void setIcon (const Image& newIcon); + bool handleKeyEvent (NSEvent* ev, bool isKeyDown); + + //============================================================================== + void viewFocusGain(); + void viewFocusLoss(); + bool isFocused() const; + void grabFocus(); + void textInputRequired (int x, int y); + + //============================================================================== + void repaint (int x, int y, int w, int h); + void performAnyPendingRepaintsNow(); + + //============================================================================== + juce_UseDebuggingNewOperator + + NSWindow* window; + JuceNSView* view; + bool isSharedWindow, fullScreen; +}; + +//============================================================================== +class JuceNSImage +{ +public: + JuceNSImage (const int width, const int height, const bool hasAlpha) + : juceImage (hasAlpha ? Image::ARGB : Image::RGB, + width, height, hasAlpha) + { + lineStride = 0; + pixelStride = 0; + imageData = juceImage.lockPixelDataReadWrite (0, 0, width, height, + lineStride, pixelStride); + + imageRep = [[NSBitmapImageRep alloc] + initWithBitmapDataPlanes: &imageData + pixelsWide: width + pixelsHigh: height + bitsPerSample: 8 + samplesPerPixel: pixelStride + hasAlpha: hasAlpha + isPlanar: NO + colorSpaceName: NSCalibratedRGBColorSpace + bitmapFormat: /*NSAlphaFirstBitmapFormat*/ (NSBitmapFormat) 0 + bytesPerRow: lineStride + bitsPerPixel: 8 * pixelStride ]; + + juceImage.releasePixelDataReadWrite (imageData); + } + + ~JuceNSImage() + { + [imageRep release]; + } + + Image& getJuceImage() throw() { return juceImage; } + + void draw (const float x, const float y, + const RectangleList& clip, + const int originX, const int originY) const + { + // Our data is BGRA and the damned image rep only takes RGBA, so + // we need to byte-swap the active areas if there's an alpha channel... + if (juceImage.hasAlphaChannel()) + { + RectangleList::Iterator iter (clip); + while (iter.next()) + { + const Rectangle* const r = iter.getRectangle(); + + swapRGBOrder (r->getX() + originX, + r->getY() + originY, + r->getWidth(), + r->getHeight()); + } + } + + NSPoint p; + p.x = x; + p.y = y; + [imageRep drawAtPoint: p]; + } + + void drawNSImage (NSImage* imageToDraw) + { + const ScopedAutoReleasePool pool; + + [NSGraphicsContext setCurrentContext: + [NSGraphicsContext graphicsContextWithBitmapImageRep: imageRep]]; + + [imageToDraw drawAtPoint: NSZeroPoint + fromRect: NSMakeRect (0, 0, [imageToDraw size].width, [imageToDraw size].height) + operation: NSCompositeSourceOver + fraction: 1.0f]; + + [[NSGraphicsContext currentContext] flushGraphics]; + + if (juceImage.hasAlphaChannel()) + swapRGBOrder (0, 0, juceImage.getWidth(), juceImage.getHeight()); + } + +private: + Image juceImage; + NSBitmapImageRep* imageRep; + uint8* imageData; + int pixelStride, lineStride; + + void swapRGBOrder (const int x, const int y, const int w, int h) const + { + jassert (Rectangle (0, 0, juceImage.getWidth(), juceImage.getHeight()) + .contains (Rectangle (x, y, w, h))); + + uint8* start = imageData + x * pixelStride + y * lineStride; + + while (--h >= 0) + { + uint8* p = start; + start += lineStride; + + for (int i = w; --i >= 0;) + { + const uint8 temp = p[0]; + p[0] = p[2]; + p[2] = temp; + + p += pixelStride; + } + } + } +}; + +//============================================================================== +static ComponentPeer* currentlyFocusedPeer = 0; +static VoidArray keysCurrentlyDown; + +bool KeyPress::isKeyCurrentlyDown (const int keyCode) throw() +{ + if (keysCurrentlyDown.contains ((void*) keyCode)) + return true; + + if (keyCode >= 'A' && keyCode <= 'Z' + && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toLowerCase ((tchar) keyCode))) + return true; + + if (keyCode >= 'a' && keyCode <= 'z' + && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toUpperCase ((tchar) keyCode))) + return true; + + return false; +} + +static int getKeyCodeFromEvent (NSEvent* ev) +{ + String unicode (nsStringToJuce ([ev characters])); + String unmodified (nsStringToJuce ([ev charactersIgnoringModifiers])); + int keyCode = unmodified[0]; + + if (keyCode == 0x19) // (backwards-tab) + keyCode = 9; + + return keyCode; +} + +static void updateKeysDown (NSEvent* ev, bool isKeyDown) +{ + updateModifiers (ev); + int keyCode = getKeyCodeFromEvent (ev); + + if (keyCode != 0) + { + if (isKeyDown) + keysCurrentlyDown.addIfNotAlreadyThere ((void*) keyCode); + else + keysCurrentlyDown.removeValue ((void*) keyCode); + } +} + +const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() throw() +{ + return ModifierKeys (currentModifiers); +} + +void ModifierKeys::updateCurrentModifiers() throw() +{ + currentModifierFlags = currentModifiers; +} + +//============================================================================== +END_JUCE_NAMESPACE + +@implementation JuceNSView + +- (JuceNSView*) initWithOwner: (NSViewComponentPeer*) owner_ + withFrame: (NSRect) frame +{ + [super initWithFrame: frame]; + owner = owner_; + + [[NSNotificationCenter defaultCenter] + addObserver: self + selector: @selector (frameChanged:) + name: NSViewFrameDidChangeNotification + object: self]; + + if (! owner_->isSharedWindow) + { + [[NSNotificationCenter defaultCenter] + addObserver: self + selector: @selector (frameChanged:) + name: NSWindowDidMoveNotification + object: owner_->window]; + } + + [self registerForDraggedTypes: [self getSupportedDragTypes]]; + + return self; +} + +- (void) dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver: self]; + [super dealloc]; +} + +//============================================================================== +- (void) drawRect: (NSRect) r +{ + if (r.size.width < 1.0f || r.size.height < 1.0f || owner == 0) + return; + + const float y = [self frame].size.height - (r.origin.y + r.size.height); + + JuceNSImage temp ((int) (r.size.width + 0.5f), + (int) (r.size.height + 0.5f), + ! owner->getComponent()->isOpaque()); + + LowLevelGraphicsSoftwareRenderer context (temp.getJuceImage()); + const int originX = -roundFloatToInt (r.origin.x); + const int originY = -roundFloatToInt (y); + context.setOrigin (originX, originY); + + const NSRect* rects = 0; + NSInteger numRects = 0; + [self getRectsBeingDrawn: &rects count: &numRects]; + + RectangleList clip; + for (int i = 0; i < numRects; ++i) + { + clip.addWithoutMerging (Rectangle (roundFloatToInt (rects[i].origin.x), + roundFloatToInt ([self frame].size.height - (rects[i].origin.y + rects[i].size.height)), + roundFloatToInt (rects[i].size.width), + roundFloatToInt (rects[i].size.height))); + } + + if (context.reduceClipRegion (clip)) + { + owner->handlePaint (context); + temp.draw (r.origin.x, r.origin.y, clip, originX, originY); + } +} + +- (BOOL) isOpaque +{ + if (owner == 0) + return true; + + if (! owner->getComponent()->isValidComponent()) + return false; + + return owner->getComponent()->isOpaque(); +} + +//============================================================================== +static int64 getMouseTime (NSEvent* e) { return (int64) [e timestamp] * 1000.0; } + +static void getMousePos (NSEvent* e, NSView* view, int& x, int& y) +{ + NSPoint p = [view convertPoint: [e locationInWindow] fromView: nil]; + x = roundFloatToInt (p.x); + y = roundFloatToInt ([view frame].size.height - p.y); +} + +static void updateModifiers (NSEvent* e) +{ + int m = currentModifiers & ~(ModifierKeys::shiftModifier | ModifierKeys::ctrlModifier + | ModifierKeys::altModifier | ModifierKeys::commandModifier); + + if ((e.modifierFlags & NSShiftKeyMask) != 0) + m |= ModifierKeys::shiftModifier; + + if ((e.modifierFlags & NSControlKeyMask) != 0) + m |= ModifierKeys::ctrlModifier; + + if ((e.modifierFlags & NSAlternateKeyMask) != 0) + m |= ModifierKeys::altModifier; + + if ((e.modifierFlags & NSCommandKeyMask) != 0) + m |= ModifierKeys::commandModifier; + + currentModifiers = m; +} + +static int getModifierForButtonNumber (const int num) throw() +{ + return num == 0 ? ModifierKeys::leftButtonModifier + : (num == 1 ? ModifierKeys::rightButtonModifier + : (num == 2 ? ModifierKeys::middleButtonModifier : 0)); +} + +- (void) mouseDown: (NSEvent*) ev +{ + updateModifiers (ev); + currentModifiers |= getModifierForButtonNumber ([ev buttonNumber]); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseDown (x, y, getMouseTime (ev)); +} + +- (void) mouseUp: (NSEvent*) ev +{ + const int oldMods = currentModifiers; + updateModifiers (ev); + currentModifiers &= ~getModifierForButtonNumber ([ev buttonNumber]); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseUp (oldMods, x, y, getMouseTime (ev)); +} + +- (void) mouseDragged: (NSEvent*) ev +{ + updateModifiers (ev); + currentModifiers |= getModifierForButtonNumber ([ev buttonNumber]); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseDrag (x, y, getMouseTime (ev)); +} + +- (void) mouseMoved: (NSEvent*) ev +{ + updateModifiers (ev); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseMove (x, y, getMouseTime (ev)); +} + +- (void) mouseEntered: (NSEvent*) ev +{ + updateModifiers (ev); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseEnter (x, y, getMouseTime (ev)); +} + +- (void) mouseExited: (NSEvent*) ev +{ + updateModifiers (ev); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseExit (x, y, getMouseTime (ev)); +} + +- (void) rightMouseDown: (NSEvent*) ev +{ + [self mouseDown: ev]; +} + +- (void) rightMouseDragged: (NSEvent*) ev +{ + [self mouseDragged: ev]; +} + +- (void) rightMouseUp: (NSEvent*) ev +{ + [self mouseUp: ev]; +} + +- (void) scrollWheel: (NSEvent*) ev +{ + updateModifiers (ev); + + if (owner != 0) + owner->handleMouseWheel (roundFloatToInt ([ev deltaX] * 10.0f), + roundFloatToInt ([ev deltaY] * 10.0f), + getMouseTime (ev)); +} + +- (BOOL) acceptsFirstMouse: (NSEvent*) ev +{ + return YES; +} + +- (void) frameChanged: (NSNotification*) n +{ + if (owner != 0) + owner->handleMovedOrResized(); +} + +//============================================================================== +- (void) keyDown: (NSEvent*) ev +{ + bool used = false; + + if (owner != 0) + { + updateKeysDown (ev, true); + used = owner->handleKeyEvent (ev, true); + + if ((ev.modifierFlags & NSCommandKeyMask) != 0) + { + // for command keys, the key-up event is thrown away, so simulate one.. + updateKeysDown (ev, false); + used = owner->handleKeyEvent (ev, false) || used; + } + } + + if (! used) + [super keyDown: ev]; +} + +- (void) keyUp: (NSEvent*) ev +{ + updateKeysDown (ev, false); + + if (owner == 0 || ! owner->handleKeyEvent (ev, false)) + [super keyUp: ev]; +} + +- (void) flagsChanged: (NSEvent*) ev +{ + updateModifiers (ev); + + if (owner != 0) + owner->handleModifierKeysChange(); +} + +#if MACOS_10_4_OR_EARLIER +- (BOOL) performKeyEquivalent: (NSEvent*) ev +{ + if (owner != 0) + { + updateKeysDown (ev, true); + const bool used1 = owner->handleKeyEvent (ev, true); + updateKeysDown (ev, false); + const bool used2 = owner->handleKeyEvent (ev, false); + + if (used1 || used2) + return true; + } + + return [super performKeyEquivalent: ev]; +} +#endif + +- (BOOL) becomeFirstResponder +{ + if (owner != 0) + owner->viewFocusGain(); + + return true; +} + +- (BOOL) resignFirstResponder +{ + if (owner != 0) + owner->viewFocusLoss(); + + return true; +} + +//============================================================================== +- (NSArray*) getSupportedDragTypes +{ + return [NSArray arrayWithObjects: NSFilenamesPboardType, /*NSFilesPromisePboardType, NSStringPboardType,*/ nil]; +} + +- (BOOL) sendDragCallback: (int) type sender: (id ) sender +{ + NSString* bestType + = [[sender draggingPasteboard] availableTypeFromArray: [self getSupportedDragTypes]]; + + if (bestType == nil) + return false; + + NSPoint p = [self convertPoint: [sender draggingLocation] fromView: nil]; + int x = (int) p.x; + int y = (int) ([self frame].size.height - p.y); + + StringArray files; + + id list = [[sender draggingPasteboard] propertyListForType: bestType]; + if (list == nil) + return false; + + if ([list isKindOfClass: [NSArray class]]) + { + NSArray* items = (NSArray*) list; + + for (int i = 0; i < [items count]; ++i) + files.add (nsStringToJuce ((NSString*) [items objectAtIndex: i])); + } + + if (files.size() == 0) + return false; + + if (type == 0) + owner->handleFileDragMove (files, x, y); + else if (type == 1) + owner->handleFileDragExit (files); + else if (type == 2) + owner->handleFileDragDrop (files, x, y); + + return true; +} + +- (NSDragOperation) draggingEntered: (id ) sender +{ + if ([self sendDragCallback: 0 sender: sender]) + return NSDragOperationCopy | NSDragOperationMove | NSDragOperationGeneric; + else + return NSDragOperationNone; +} + +- (NSDragOperation) draggingUpdated: (id ) sender +{ + if ([self sendDragCallback: 0 sender: sender]) + return NSDragOperationCopy | NSDragOperationMove | NSDragOperationGeneric; + else + return NSDragOperationNone; +} + +- (void) draggingEnded: (id ) sender +{ + [self sendDragCallback: 1 sender: sender]; +} + +- (void) draggingExited: (id ) sender +{ + [self sendDragCallback: 1 sender: sender]; +} + +- (BOOL) prepareForDragOperation: (id ) sender +{ + return YES; +} + +- (BOOL) performDragOperation: (id ) sender +{ + return [self sendDragCallback: 2 sender: sender]; +} + +- (void) concludeDragOperation: (id ) sender +{ +} + +@end + +//============================================================================== +@implementation JuceNSWindow + +- (void) setOwner: (NSViewComponentPeer*) owner_ +{ + owner = owner_; +} + +- (BOOL) canBecomeKeyWindow +{ + // If runnin as a plugin, let the component decide whether it's + // going to allow the window to get focused. + return JUCEApplication::getInstance() != 0 + || (ComponentPeer::isValidPeer (owner) + && owner->getComponent()->getWantsKeyboardFocus()); +} + +- (BOOL) windowShouldClose: (id) window +{ + if (! ComponentPeer::isValidPeer (owner)) + return YES; + + owner->handleUserClosingWindow(); + return NO; +} + +@end + +//============================================================================== +BEGIN_JUCE_NAMESPACE + +//============================================================================== +NSViewComponentPeer::NSViewComponentPeer (Component* const component, + const int windowStyleFlags, + NSView* viewToAttachTo) + : ComponentPeer (component, windowStyleFlags), + view (0), + window (0) +{ + NSRect r; + r.origin.x = 0; + r.origin.y = 0; + r.size.width = (float) component->getWidth(); + r.size.height = (float) component->getHeight(); + + view = [[JuceNSView alloc] initWithOwner: this withFrame: r]; + [view setPostsFrameChangedNotifications: YES]; + + if (viewToAttachTo != 0) + { + window = [viewToAttachTo window]; + [viewToAttachTo addSubview: view]; + isSharedWindow = true; + } + else + { + isSharedWindow = false; + r.origin.x = (float) component->getX(); + r.origin.y = (float) component->getY(); + + unsigned int style = 0; + if ((windowStyleFlags & windowHasTitleBar) == 0) + style = NSBorderlessWindowMask; + else + style = NSTitledWindowMask; + + if ((windowStyleFlags & windowHasMinimiseButton) != 0) + style |= NSMiniaturizableWindowMask; + + if ((windowStyleFlags & windowHasCloseButton) != 0) + style |= NSClosableWindowMask; + + if ((windowStyleFlags & windowIsResizable) != 0) + style |= NSResizableWindowMask; + + window = [[JuceNSWindow alloc] initWithContentRect: r + styleMask: style + backing: NSBackingStoreBuffered + defer: YES ]; + + [((JuceNSWindow*) window) setOwner: this]; + [window setDelegate: window]; + [window setOpaque: component->isOpaque()]; + [window setHasShadow: ((windowStyleFlags & windowHasDropShadow) != 0)]; + + if (component->isAlwaysOnTop()) + [window setLevel: NSFloatingWindowLevel]; + + [window setContentView: view]; + [window setAutodisplay: YES]; + [window setAcceptsMouseMovedEvents: YES]; + [window setReleasedWhenClosed: YES]; + [window setExcludedFromWindowsMenu: (windowStyleFlags & windowIsTemporary) != 0]; + [window setIgnoresMouseEvents: (windowStyleFlags & windowIgnoresMouseClicks) != 0]; + } + + setVisible (component->isVisible()); +} + +NSViewComponentPeer::~NSViewComponentPeer() +{ + view->owner = 0; + [view removeFromSuperview]; + [view release]; + + if (! isSharedWindow) + [window close]; +} + +//============================================================================== +void* NSViewComponentPeer::getNativeHandle() const +{ + return view; +} + +void NSViewComponentPeer::setVisible (bool shouldBeVisible) +{ + if (isSharedWindow) + { + [view setHidden: ! shouldBeVisible]; + } + else + { + if (shouldBeVisible) + [window orderFront: nil]; + else + [window orderOut: nil]; + } +} + +void NSViewComponentPeer::setTitle (const String& title) +{ + const ScopedAutoReleasePool pool; + + if (! isSharedWindow) + [window setTitle: juceStringToNS (title)]; +} + +void NSViewComponentPeer::setPosition (int x, int y) +{ + setBounds (x, y, component->getWidth(), component->getHeight(), false); +} + +void NSViewComponentPeer::setSize (int w, int h) +{ + setBounds (component->getX(), component->getY(), w, h, false); +} + +void NSViewComponentPeer::setBounds (int x, int y, int w, int h, const bool isNowFullScreen) +{ + fullScreen = isNowFullScreen; + w = jmax (0, w); + h = jmax (0, h); + + NSRect r; + r.origin.x = (float) x; + r.origin.y = (float) y; + r.size.width = (float) w; + r.size.height = (float) h; + + if (isSharedWindow) + { + r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height); + + if ([view frame].size.width != r.size.width + || [view frame].size.height != r.size.height) + [view setNeedsDisplay: true]; + + [view setFrame: r]; + } + else + { + r.origin.y = [[NSScreen mainScreen] frame].size.height - (r.origin.y + r.size.height); + [window setFrame: r + display: true]; + } +} + +void NSViewComponentPeer::getBounds (int& x, int& y, int& w, int& h, const bool global) const +{ + NSRect r = [view frame]; + + if (global && [view window] != 0) + { + r = [view convertRect: r toView: nil]; + + NSRect wr = [[view window] frame]; + r.origin.x += wr.origin.x; + r.origin.y += wr.origin.y; + y = (int) ([[NSScreen mainScreen] frame].size.height - r.origin.y - r.size.height); + } + else + { + y = (int) ([[view superview] frame].size.height - r.origin.y - r.size.height); + } + + x = (int) r.origin.x; + w = (int) r.size.width; + h = (int) r.size.height; +} + +void NSViewComponentPeer::getBounds (int& x, int& y, int& w, int& h) const +{ + getBounds (x, y, w, h, ! isSharedWindow); +} + +int NSViewComponentPeer::getScreenX() const +{ + int x, y, w, h; + getBounds (x, y, w, h, true); + return x; +} + +int NSViewComponentPeer::getScreenY() const +{ + int x, y, w, h; + getBounds (x, y, w, h, true); + return y; +} + +void NSViewComponentPeer::relativePositionToGlobal (int& x, int& y) +{ + int wx, wy, ww, wh; + getBounds (wx, wy, ww, wh, true); + x += wx; + y += wy; +} + +void NSViewComponentPeer::globalPositionToRelative (int& x, int& y) +{ + int wx, wy, ww, wh; + getBounds (wx, wy, ww, wh, true); + x -= wx; + y -= wy; +} + +void NSViewComponentPeer::setMinimised (bool shouldBeMinimised) +{ + if (! isSharedWindow) + { + if (shouldBeMinimised) + [window miniaturize: nil]; + else + [window deminiaturize: nil]; + } +} + +bool NSViewComponentPeer::isMinimised() const +{ + return window != 0 && [window isMiniaturized]; +} + +void NSViewComponentPeer::setFullScreen (bool shouldBeFullScreen) +{ + if (! isSharedWindow) + { + Rectangle r (lastNonFullscreenBounds); + + setMinimised (false); + + if (fullScreen != shouldBeFullScreen) + { + if (shouldBeFullScreen) + r = Desktop::getInstance().getMainMonitorArea(); + + // (can't call the component's setBounds method because that'll reset our fullscreen flag) + if (r != getComponent()->getBounds() && ! r.isEmpty()) + setBounds (r.getX(), r.getY(), r.getWidth(), r.getHeight(), shouldBeFullScreen); + } + } +} + +bool NSViewComponentPeer::isFullScreen() const +{ + return fullScreen; +} + +bool NSViewComponentPeer::contains (int x, int y, bool trueIfInAChildWindow) const +{ + if (((unsigned int) x) >= (unsigned int) component->getWidth() + || ((unsigned int) y) >= (unsigned int) component->getHeight()) + return false; + + NSPoint p; + p.x = (float) x; + p.y = (float) y; + + NSView* v = [view hitTest: p]; + + if (trueIfInAChildWindow) + return v != nil; + + return v == view; +} + +const BorderSize NSViewComponentPeer::getFrameSize() const +{ + BorderSize b; + + if (! isSharedWindow) + { + NSRect v = [view convertRect: [view frame] toView: nil]; + NSRect w = [window frame]; + + b.setTop ((int) (w.size.height - (v.origin.y + v.size.height))); + b.setBottom ((int) v.origin.y); + b.setLeft ((int) v.origin.x); + b.setRight ((int) (w.size.width - (v.origin.x + v.size.width))); + } + + return b; +} + +bool NSViewComponentPeer::setAlwaysOnTop (bool alwaysOnTop) +{ + if (! isSharedWindow) + { + [window setLevel: alwaysOnTop ? NSFloatingWindowLevel + : NSNormalWindowLevel]; + } + + return true; +} + +void NSViewComponentPeer::toFront (bool makeActiveWindow) +{ + if (isSharedWindow) + { + [[view superview] addSubview: view + positioned: NSWindowAbove + relativeTo: nil]; + } + + if (window != 0) + { + if (makeActiveWindow) + [window makeKeyAndOrderFront: nil]; + else + [window orderFront: nil]; + } +} + +void NSViewComponentPeer::toBehind (ComponentPeer* other) +{ + NSViewComponentPeer* o = (NSViewComponentPeer*) other; + + if (isSharedWindow) + { + [[view superview] addSubview: view + positioned: NSWindowBelow + relativeTo: o->view]; + } + else + { + [window orderWindow: NSWindowBelow + relativeTo: o->window != 0 ? [o->window windowNumber] + : nil ]; + } +} + +void NSViewComponentPeer::setIcon (const Image& /*newIcon*/) +{ + // to do.. +} + +//============================================================================== +void NSViewComponentPeer::viewFocusGain() +{ + const MessageManagerLock messLock; + + if (currentlyFocusedPeer != this) + { + if (ComponentPeer::isValidPeer (currentlyFocusedPeer)) + currentlyFocusedPeer->handleFocusLoss(); + + currentlyFocusedPeer = this; + + handleFocusGain(); + } +} + +void NSViewComponentPeer::viewFocusLoss() +{ + if (currentlyFocusedPeer == this) + { + currentlyFocusedPeer = 0; + handleFocusLoss(); + } +} + +void juce_HandleProcessFocusChange() +{ + keysCurrentlyDown.clear(); + + if (NSViewComponentPeer::isValidPeer (currentlyFocusedPeer)) + { + if (Process::isForegroundProcess()) + currentlyFocusedPeer->handleFocusGain(); + else + currentlyFocusedPeer->handleFocusLoss(); + } +} + +bool NSViewComponentPeer::isFocused() const +{ + return window != 0 && [window isKeyWindow]; +} + +void NSViewComponentPeer::grabFocus() +{ + if (window != 0) + { + [window makeKeyWindow]; + [window makeFirstResponder: view]; + } +} + +void NSViewComponentPeer::textInputRequired (int /*x*/, int /*y*/) +{ +} + +bool NSViewComponentPeer::handleKeyEvent (NSEvent* ev, bool isKeyDown) +{ + String unicode (nsStringToJuce ([ev characters])); + String unmodified (nsStringToJuce ([ev charactersIgnoringModifiers])); + int keyCode = getKeyCodeFromEvent (ev); + + //DBG ("unicode: " + unicode + " " + String::toHexString ((int) unicode[0])); + //DBG ("unmodified: " + unmodified + " " + String::toHexString ((int) unmodified[0])); + + if (unicode.isNotEmpty() || keyCode != 0) + { + if (isKeyDown) + { + bool used = false; + + while (unicode.length() > 0) + { + juce_wchar textCharacter = unicode[0]; + unicode = unicode.substring (1); + + used = handleKeyUpOrDown() || used; + used = handleKeyPress (keyCode, textCharacter) || used; + } + + return used; + } + else + { + if (handleKeyUpOrDown()) + return true; + } + } + + return false; +} + +//============================================================================== +void NSViewComponentPeer::repaint (int x, int y, int w, int h) +{ + [view setNeedsDisplayInRect: + NSMakeRect ((float) x, (float) ([view frame].size.height - (y + h)), + (float) w, (float) h)]; +} + +void NSViewComponentPeer::performAnyPendingRepaintsNow() +{ + [view displayIfNeeded]; +} + +ComponentPeer* Component::createNewPeer (int styleFlags, void* windowToAttachTo) +{ + return new NSViewComponentPeer (this, styleFlags, (NSView*) windowToAttachTo); +} + +//============================================================================== +static Image* NSImageToJuceImage (NSImage* image) +{ + JuceNSImage juceIm ((int) [image size].width, + (int) [image size].height, + true); + + juceIm.drawNSImage (image); + return juceIm.getJuceImage().createCopy(); +} + +Image* juce_createIconForFile (const File& file) +{ + const ScopedAutoReleasePool pool; + + NSImage* im = [[NSWorkspace sharedWorkspace] iconForFile: juceStringToNS (file.getFullPathName())]; + return NSImageToJuceImage (im); +} + +//============================================================================== +const int KeyPress::spaceKey = ' '; +const int KeyPress::returnKey = 0x0d; +const int KeyPress::escapeKey = 0x1b; +const int KeyPress::backspaceKey = 0x7f; +const int KeyPress::leftKey = NSLeftArrowFunctionKey; +const int KeyPress::rightKey = NSRightArrowFunctionKey; +const int KeyPress::upKey = NSUpArrowFunctionKey; +const int KeyPress::downKey = NSDownArrowFunctionKey; +const int KeyPress::pageUpKey = NSPageUpFunctionKey; +const int KeyPress::pageDownKey = NSPageDownFunctionKey; +const int KeyPress::endKey = NSEndFunctionKey; +const int KeyPress::homeKey = NSHomeFunctionKey; +const int KeyPress::deleteKey = NSDeleteFunctionKey; +const int KeyPress::insertKey = -1; +const int KeyPress::tabKey = 9; +const int KeyPress::F1Key = NSF1FunctionKey; +const int KeyPress::F2Key = NSF2FunctionKey; +const int KeyPress::F3Key = NSF3FunctionKey; +const int KeyPress::F4Key = NSF4FunctionKey; +const int KeyPress::F5Key = NSF5FunctionKey; +const int KeyPress::F6Key = NSF6FunctionKey; +const int KeyPress::F7Key = NSF7FunctionKey; +const int KeyPress::F8Key = NSF8FunctionKey; +const int KeyPress::F9Key = NSF9FunctionKey; +const int KeyPress::F10Key = NSF10FunctionKey; +const int KeyPress::F11Key = NSF1FunctionKey; +const int KeyPress::F12Key = NSF12FunctionKey; +const int KeyPress::F13Key = NSF13FunctionKey; +const int KeyPress::F14Key = NSF14FunctionKey; +const int KeyPress::F15Key = NSF15FunctionKey; +const int KeyPress::F16Key = NSF16FunctionKey; +const int KeyPress::numberPad0 = 0x30020; +const int KeyPress::numberPad1 = 0x30021; +const int KeyPress::numberPad2 = 0x30022; +const int KeyPress::numberPad3 = 0x30023; +const int KeyPress::numberPad4 = 0x30024; +const int KeyPress::numberPad5 = 0x30025; +const int KeyPress::numberPad6 = 0x30026; +const int KeyPress::numberPad7 = 0x30027; +const int KeyPress::numberPad8 = 0x30028; +const int KeyPress::numberPad9 = 0x30029; +const int KeyPress::numberPadAdd = 0x3002a; +const int KeyPress::numberPadSubtract = 0x3002b; +const int KeyPress::numberPadMultiply = 0x3002c; +const int KeyPress::numberPadDivide = 0x3002d; +const int KeyPress::numberPadSeparator = 0x3002e; +const int KeyPress::numberPadDecimalPoint = 0x3002f; +const int KeyPress::numberPadEquals = 0x30030; +const int KeyPress::numberPadDelete = 0x30031; +const int KeyPress::playKey = 0x30000; +const int KeyPress::stopKey = 0x30001; +const int KeyPress::fastForwardKey = 0x30002; +const int KeyPress::rewindKey = 0x30003; + +#endif \ No newline at end of file diff --git a/build/macosx/platform_specific_code/juce_mac_NamedPipe.cpp b/build/macosx/platform_specific_code/juce_mac_NamedPipe.cpp index bfe5bc1aa1..56dd468787 100644 --- a/build/macosx/platform_specific_code/juce_mac_NamedPipe.cpp +++ b/build/macosx/platform_specific_code/juce_mac_NamedPipe.cpp @@ -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 -#include -#include - -// As well as being for the mac, this file is included by the linux build. - -#if ! JUCE_MAC - #include - #include - #include -#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 +#include +#include + +// As well as being for the mac, this file is included by the linux build. + +#if ! JUCE_MAC + #include + #include + #include +#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 diff --git a/build/macosx/platform_specific_code/juce_mac_NativeCode.mm b/build/macosx/platform_specific_code/juce_mac_NativeCode.mm new file mode 100644 index 0000000000..62201da71e --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_NativeCode.mm @@ -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 diff --git a/build/macosx/platform_specific_code/juce_mac_NativeHeaders.h b/build/macosx/platform_specific_code/juce_mac_NativeHeaders.h index 21923aa8ae..f9a9f97cbe 100644 --- a/build/macosx/platform_specific_code/juce_mac_NativeHeaders.h +++ b/build/macosx/platform_specific_code/juce_mac_NativeHeaders.h @@ -64,4 +64,4 @@ static NSString* juceStringToNS (const JUCE_NAMESPACE::String& s) } -#endif +#endif // __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__ diff --git a/build/macosx/platform_specific_code/juce_mac_NativeIncludes.h b/build/macosx/platform_specific_code/juce_mac_NativeIncludes.h new file mode 100644 index 0000000000..304d122b10 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_NativeIncludes.h @@ -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 +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#include +#include +#include +#include +#include +#include +#include + +#if MACOS_10_4_OR_EARLIER + #include +#endif + +#endif // __JUCE_MAC_NATIVEINCLUDES_JUCEHEADER__ diff --git a/build/macosx/platform_specific_code/juce_mac_Network.mm b/build/macosx/platform_specific_code/juce_mac_Network.mm index 15eefcda5e..d21ecc32e3 100644 --- a/build/macosx/platform_specific_code/juce_mac_Network.mm +++ b/build/macosx/platform_specific_code/juce_mac_Network.mm @@ -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 -#include -#include -#include - -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 diff --git a/build/macosx/platform_specific_code/juce_mac_OpenGLComponent.mm b/build/macosx/platform_specific_code/juce_mac_OpenGLComponent.mm new file mode 100644 index 0000000000..7d8221566d --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_OpenGLComponent.mm @@ -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 & 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 diff --git a/build/macosx/platform_specific_code/juce_mac_QuickTimeMovieComponent.mm b/build/macosx/platform_specific_code/juce_mac_QuickTimeMovieComponent.mm new file mode 100644 index 0000000000..6c12dfa46f --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_QuickTimeMovieComponent.mm @@ -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 (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 (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 diff --git a/build/macosx/platform_specific_code/juce_mac_Strings.mm b/build/macosx/platform_specific_code/juce_mac_Strings.mm new file mode 100644 index 0000000000..132f214af3 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_Strings.mm @@ -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 ((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 diff --git a/build/macosx/platform_specific_code/juce_mac_SystemStats.mm b/build/macosx/platform_specific_code/juce_mac_SystemStats.mm index 075e66619f..c7e2bbff1b 100644 --- a/build/macosx/platform_specific_code/juce_mac_SystemStats.mm +++ b/build/macosx/platform_specific_code/juce_mac_SystemStats.mm @@ -29,18 +29,9 @@ ============================================================================== */ -#include "juce_mac_NativeHeaders.h" -#include -#include -#include -#include - -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; + + 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); + } } -void Logger::outputDebugPrintf (const tchar* format, ...) throw() +static const String getCpuInfo (const char* key, bool lastOne = false) throw() { - String text; - va_list args; - va_start (args, format); - text.vprintf(format, args); - outputDebugString (text); -} + String info; + char buf [256]; -int SystemStats::getMemorySizeInMegabytes() throw() -{ - long bytes; - if (Gestalt (gestaltPhysicalRAMSize, &bytes) == noErr) - return (int) (((unsigned long) bytes) / (1024 * 1024)); + FILE* f = fopen ("/proc/cpuinfo", "r"); - return 0; + 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 diff --git a/build/macosx/platform_specific_code/juce_mac_Threads.cpp b/build/macosx/platform_specific_code/juce_mac_Threads.cpp index 6bc35cb236..9e5c282d6b 100644 --- a/build/macosx/platform_specific_code/juce_mac_Threads.cpp +++ b/build/macosx/platform_specific_code/juce_mac_Threads.cpp @@ -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 -#include -#include -#include -#include - -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, ¶m); - param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11); - pthread_setschedparam ((pthread_t) handle, policy, ¶m); -} - -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 +#include +#include +#include +#include + +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, ¶m); + param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11); + pthread_setschedparam ((pthread_t) handle, policy, ¶m); +} + +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 diff --git a/build/macosx/platform_specific_code/juce_mac_Threads.mm b/build/macosx/platform_specific_code/juce_mac_Threads.mm new file mode 100644 index 0000000000..595d190663 --- /dev/null +++ b/build/macosx/platform_specific_code/juce_mac_Threads.mm @@ -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, ¶m); + param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11); + pthread_setschedparam ((pthread_t) handle, policy, ¶m); +} + +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 diff --git a/build/macosx/platform_specific_code/juce_mac_WebBrowserComponent.mm b/build/macosx/platform_specific_code/juce_mac_WebBrowserComponent.mm index 508de302ab..fe05bf578c 100644 --- a/build/macosx/platform_specific_code/juce_mac_WebBrowserComponent.mm +++ b/build/macosx/platform_specific_code/juce_mac_WebBrowserComponent.mm @@ -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 -#include -#include -#include -#include - -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) 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) 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 diff --git a/build/macosx/platform_specific_code/juce_mac_Windowing.mm b/build/macosx/platform_specific_code/juce_mac_Windowing.mm deleted file mode 100644 index 16c9ea718d..0000000000 --- a/build/macosx/platform_specific_code/juce_mac_Windowing.mm +++ /dev/null @@ -1,3551 +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 -#include -#include -#include -#include -#include - -#if JUCE_OPENGL -#include -#endif - -BEGIN_JUCE_NAMESPACE - -#include "../../../src/juce_appframework/events/juce_Timer.h" -#include "../../../src/juce_appframework/application/juce_DeletedAtShutdown.h" -#include "../../../src/juce_appframework/events/juce_AsyncUpdater.h" -#include "../../../src/juce_appframework/events/juce_MessageManager.h" -#include "../../../src/juce_core/basics/juce_Singleton.h" -#include "../../../src/juce_core/basics/juce_Random.h" -#include "../../../src/juce_core/threads/juce_Process.h" -#include "../../../src/juce_appframework/application/juce_SystemClipboard.h" -#include "../../../src/juce_appframework/gui/components/keyboard/juce_KeyPress.h" -#include "../../../src/juce_appframework/gui/components/windows/juce_AlertWindow.h" -#include "../../../src/juce_appframework/gui/graphics/geometry/juce_RectangleList.h" -#include "../../../src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h" -#include "../../../src/juce_appframework/gui/components/juce_Desktop.h" -#include "../../../src/juce_appframework/gui/components/menus/juce_MenuBarModel.h" -#include "../../../src/juce_core/misc/juce_PlatformUtilities.h" -#include "../../../src/juce_appframework/application/juce_Application.h" -#include "../../../src/juce_appframework/gui/components/special/juce_OpenGLComponent.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/graphics/imaging/juce_ImageFileFormat.h" -#include "../../../src/juce_core/containers/juce_MemoryBlock.h" - -#undef Point - -const WindowRegionCode windowRegionToUse = kWindowContentRgn; - -static HIObjectClassRef viewClassRef = 0; -static CFStringRef juceHiViewClassNameCFString = 0; -static ComponentPeer* juce_currentMouseTrackingPeer = 0; - - -//============================================================================== -static VoidArray keysCurrentlyDown; - -bool KeyPress::isKeyCurrentlyDown (const int keyCode) throw() -{ - if (keysCurrentlyDown.contains ((void*) keyCode)) - return true; - - if (keyCode >= 'A' && keyCode <= 'Z' - && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toLowerCase ((tchar) keyCode))) - return true; - - if (keyCode >= 'a' && keyCode <= 'z' - && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toUpperCase ((tchar) keyCode))) - return true; - - return false; -} - -//============================================================================== -static VoidArray minimisedWindows; - -static void setWindowMinimised (WindowRef ref, const bool isMinimised) -{ - if (isMinimised != minimisedWindows.contains (ref)) - CollapseWindow (ref, isMinimised); -} - -void juce_maximiseAllMinimisedWindows() -{ - const VoidArray minWin (minimisedWindows); - - for (int i = minWin.size(); --i >= 0;) - setWindowMinimised ((WindowRef) (minWin[i]), false); -} - -//============================================================================== -class HIViewComponentPeer; -static HIViewComponentPeer* currentlyFocusedPeer = 0; - - -//============================================================================== -static int currentModifiers = 0; - -static void updateModifiers (EventRef theEvent) -{ - currentModifiers &= ~ (ModifierKeys::shiftModifier | ModifierKeys::ctrlModifier - | ModifierKeys::altModifier | ModifierKeys::commandModifier); - - UInt32 m; - - if (theEvent != 0) - GetEventParameter (theEvent, kEventParamKeyModifiers, typeUInt32, 0, sizeof(m), 0, &m); - else - m = GetCurrentEventKeyModifiers(); - - if ((m & (shiftKey | rightShiftKey)) != 0) - currentModifiers |= ModifierKeys::shiftModifier; - - if ((m & (controlKey | rightControlKey)) != 0) - currentModifiers |= ModifierKeys::ctrlModifier; - - if ((m & (optionKey | rightOptionKey)) != 0) - currentModifiers |= ModifierKeys::altModifier; - - if ((m & cmdKey) != 0) - currentModifiers |= ModifierKeys::commandModifier; -} - -void ModifierKeys::updateCurrentModifiers() throw() -{ - currentModifierFlags = currentModifiers; -} - -static int64 getEventTime (EventRef event) -{ - const int64 millis = (int64) (1000.0 * (event != 0 ? GetEventTime (event) - : GetCurrentEventTime())); - - static int64 offset = 0; - if (offset == 0) - offset = Time::currentTimeMillis() - millis; - - return offset + millis; -} - - -//============================================================================== -class MacBitmapImage : public Image -{ -public: - //============================================================================== - CGColorSpaceRef colourspace; - CGDataProviderRef provider; - - //============================================================================== - MacBitmapImage (const PixelFormat format_, - const int w, const int h, const bool clearImage) - : Image (format_, w, h) - { - jassert (format_ == RGB || format_ == ARGB); - - pixelStride = (format_ == RGB) ? 3 : 4; - - lineStride = (w * pixelStride + 3) & ~3; - const int imageSize = lineStride * h; - - if (clearImage) - imageData = (uint8*) juce_calloc (imageSize); - else - imageData = (uint8*) juce_malloc (imageSize); - - //colourspace = CGColorSpaceCreateWithName (kCGColorSpaceUserRGB); - - CMProfileRef prof; - CMGetSystemProfile (&prof); - colourspace = CGColorSpaceCreateWithPlatformColorSpace (prof); - provider = CGDataProviderCreateWithData (0, imageData, h * lineStride, 0); - CMCloseProfile (prof); - } - - MacBitmapImage::~MacBitmapImage() - { - CGDataProviderRelease (provider); - CGColorSpaceRelease (colourspace); - - juce_free (imageData); - imageData = 0; // to stop the base class freeing this - } - - void blitToContext (CGContextRef context, const float dx, const float dy) - { - CGImageRef tempImage = CGImageCreate (getWidth(), getHeight(), - 8, pixelStride << 3, lineStride, colourspace, -#if MACOS_10_3_OR_EARLIER || JUCE_BIG_ENDIAN - hasAlphaChannel() ? kCGImageAlphaPremultipliedFirst - : kCGImageAlphaNone, -#else - hasAlphaChannel() ? kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst - : kCGImageAlphaNone, -#endif - provider, 0, false, - kCGRenderingIntentDefault); - - HIRect r; - r.origin.x = dx; - r.origin.y = dy; - r.size.width = (float) getWidth(); - r.size.height = (float) getHeight(); - - HIViewDrawCGImage (context, &r, tempImage); - - CGImageRelease (tempImage); - } - - juce_UseDebuggingNewOperator -}; - - -//============================================================================== -class MouseCheckTimer : private Timer, - private DeletedAtShutdown -{ -public: - MouseCheckTimer() - : lastX (0), - lastY (0) - { - lastPeerUnderMouse = 0; - resetMouseMoveChecker(); - -#if ! MACOS_10_2_OR_EARLIER - // Just putting this in here because it's a convenient object that'll get deleted at shutdown - CGDisplayRegisterReconfigurationCallback (&displayChangeCallback, 0); -#endif - } - - ~MouseCheckTimer() - { -#if ! MACOS_10_2_OR_EARLIER - CGDisplayRemoveReconfigurationCallback (&displayChangeCallback, 0); -#endif - - clearSingletonInstance(); - } - - juce_DeclareSingleton_SingleThreaded_Minimal (MouseCheckTimer) - - bool hasEverHadAMouseMove; - - void moved (HIViewComponentPeer* const peer) - { - if (hasEverHadAMouseMove) - startTimer (200); - - lastPeerUnderMouse = peer; - } - - void resetMouseMoveChecker() - { - hasEverHadAMouseMove = false; - startTimer (1000 / 16); - } - - void timerCallback(); - -private: - HIViewComponentPeer* lastPeerUnderMouse; - int lastX, lastY; - -#if ! MACOS_10_2_OR_EARLIER - static void displayChangeCallback (CGDirectDisplayID, CGDisplayChangeSummaryFlags flags, void*) - { - Desktop::getInstance().refreshMonitorSizes(); - } -#endif -}; - -juce_ImplementSingleton_SingleThreaded (MouseCheckTimer) - -//============================================================================== -#if JUCE_QUICKTIME -extern void OfferMouseClickToQuickTime (WindowRef window, ::Point where, long when, long modifiers, - Component* topLevelComp); -#endif - - -//============================================================================== -class HIViewComponentPeer : public ComponentPeer, - private Timer -{ -public: - //============================================================================== - HIViewComponentPeer (Component* const component, - const int windowStyleFlags, - HIViewRef viewToAttachTo) - : ComponentPeer (component, windowStyleFlags), - fullScreen (false), - isCompositingWindow (false), - windowRef (0), - viewRef (0) - { - repainter = new RepaintManager (this); - - eventHandlerRef = 0; - - if (viewToAttachTo != 0) - { - isSharedWindow = true; - } - else - { - isSharedWindow = false; - - WindowRef newWindow = createNewWindow (windowStyleFlags); - - GetRootControl (newWindow, (ControlRef*) &viewToAttachTo); - jassert (viewToAttachTo != 0); - - HIViewRef growBox = 0; - HIViewFindByID (HIViewGetRoot (newWindow), kHIViewWindowGrowBoxID, &growBox); - - if (growBox != 0) - HIGrowBoxViewSetTransparent (growBox, true); - } - - createNewHIView(); - - HIViewAddSubview (viewToAttachTo, viewRef); - HIViewSetVisible (viewRef, component->isVisible()); - - setTitle (component->getName()); - - if (component->isVisible() && ! isSharedWindow) - { - ShowWindow (windowRef); - ActivateWindow (windowRef, component->getWantsKeyboardFocus()); - } - } - - ~HIViewComponentPeer() - { - minimisedWindows.removeValue (windowRef); - - if (IsValidWindowPtr (windowRef)) - { - if (! isSharedWindow) - { - CFRelease (viewRef); - viewRef = 0; - - DisposeWindow (windowRef); - } - else - { - if (eventHandlerRef != 0) - RemoveEventHandler (eventHandlerRef); - - CFRelease (viewRef); - viewRef = 0; - } - - windowRef = 0; - } - - if (currentlyFocusedPeer == this) - currentlyFocusedPeer = 0; - - delete repainter; - } - - //============================================================================== - void* getNativeHandle() const - { - return windowRef; - } - - void setVisible (bool shouldBeVisible) - { - HIViewSetVisible (viewRef, shouldBeVisible); - - if ((! isSharedWindow) && IsValidWindowPtr (windowRef)) - { - if (shouldBeVisible) - ShowWindow (windowRef); - else - HideWindow (windowRef); - - resizeViewToFitWindow(); - - // If nothing else is focused, then grab the focus too - if (shouldBeVisible - && Component::getCurrentlyFocusedComponent() == 0 - && Process::isForegroundProcess()) - { - component->toFront (true); - } - } - } - - void setTitle (const String& title) - { - if ((! isSharedWindow) && IsValidWindowPtr (windowRef)) - { - CFStringRef t = PlatformUtilities::juceStringToCFString (title); - SetWindowTitleWithCFString (windowRef, t); - CFRelease (t); - } - } - - void setPosition (int x, int y) - { - if (isSharedWindow) - { - HIViewPlaceInSuperviewAt (viewRef, x, y); - } - else if (IsValidWindowPtr (windowRef)) - { - Rect r; - GetWindowBounds (windowRef, windowRegionToUse, &r); - r.right += x - r.left; - r.bottom += y - r.top; - r.left = x; - r.top = y; - SetWindowBounds (windowRef, windowRegionToUse, &r); - } - } - - void setSize (int w, int h) - { - w = jmax (0, w); - h = jmax (0, h); - - if (w != getComponent()->getWidth() - || h != getComponent()->getHeight()) - { - repainter->repaint (0, 0, w, h); - } - - if (isSharedWindow) - { - HIRect r; - HIViewGetFrame (viewRef, &r); - r.size.width = (float) w; - r.size.height = (float) h; - HIViewSetFrame (viewRef, &r); - } - else if (IsValidWindowPtr (windowRef)) - { - Rect r; - GetWindowBounds (windowRef, windowRegionToUse, &r); - r.right = r.left + w; - r.bottom = r.top + h; - SetWindowBounds (windowRef, windowRegionToUse, &r); - } - } - - void setBounds (int x, int y, int w, int h, const bool isNowFullScreen) - { - fullScreen = isNowFullScreen; - w = jmax (0, w); - h = jmax (0, h); - - if (w != getComponent()->getWidth() - || h != getComponent()->getHeight()) - { - repainter->repaint (0, 0, w, h); - } - - if (isSharedWindow) - { - HIRect r; - r.origin.x = (float) x; - r.origin.y = (float) y; - r.size.width = (float) w; - r.size.height = (float) h; - HIViewSetFrame (viewRef, &r); - } - else if (IsValidWindowPtr (windowRef)) - { - Rect r; - r.left = x; - r.top = y; - r.right = x + w; - r.bottom = y + h; - SetWindowBounds (windowRef, windowRegionToUse, &r); - } - } - - void getBounds (int& x, int& y, int& w, int& h, const bool global) const - { - HIRect hiViewPos; - HIViewGetFrame (viewRef, &hiViewPos); - - if (global) - { - HIViewRef content = 0; - HIViewFindByID (HIViewGetRoot (windowRef), kHIViewWindowContentID, &content); - HIPoint p = { 0.0f, 0.0f }; - HIViewConvertPoint (&p, viewRef, content); - - x = (int) p.x; - y = (int) p.y; - - if (IsValidWindowPtr (windowRef)) - { - Rect windowPos; - GetWindowBounds (windowRef, kWindowContentRgn, &windowPos); - - x += windowPos.left; - y += windowPos.top; - } - } - else - { - x = (int) hiViewPos.origin.x; - y = (int) hiViewPos.origin.y; - } - - w = (int) hiViewPos.size.width; - h = (int) hiViewPos.size.height; - } - - void getBounds (int& x, int& y, int& w, int& h) const - { - getBounds (x, y, w, h, ! isSharedWindow); - } - - int getScreenX() const - { - int x, y, w, h; - getBounds (x, y, w, h, true); - return x; - } - - int getScreenY() const - { - int x, y, w, h; - getBounds (x, y, w, h, true); - return y; - } - - void relativePositionToGlobal (int& x, int& y) - { - int wx, wy, ww, wh; - getBounds (wx, wy, ww, wh, true); - - x += wx; - y += wy; - } - - void globalPositionToRelative (int& x, int& y) - { - int wx, wy, ww, wh; - getBounds (wx, wy, ww, wh, true); - - x -= wx; - y -= wy; - } - - void setMinimised (bool shouldBeMinimised) - { - if (! isSharedWindow) - setWindowMinimised (windowRef, shouldBeMinimised); - } - - bool isMinimised() const - { - return minimisedWindows.contains (windowRef); - } - - void setFullScreen (bool shouldBeFullScreen) - { - if (! isSharedWindow) - { - Rectangle r (lastNonFullscreenBounds); - - setMinimised (false); - - if (fullScreen != shouldBeFullScreen) - { - if (shouldBeFullScreen) - r = Desktop::getInstance().getMainMonitorArea(); - - // (can't call the component's setBounds method because that'll reset our fullscreen flag) - if (r != getComponent()->getBounds() && ! r.isEmpty()) - setBounds (r.getX(), r.getY(), r.getWidth(), r.getHeight(), shouldBeFullScreen); - } - } - } - - bool isFullScreen() const - { - return fullScreen; - } - - bool contains (int x, int y, bool trueIfInAChildWindow) const - { - if (((unsigned int) x) >= (unsigned int) component->getWidth() - || ((unsigned int) y) >= (unsigned int) component->getHeight() - || ! IsValidWindowPtr (windowRef)) - return false; - - Rect r; - GetWindowBounds (windowRef, windowRegionToUse, &r); - - ::Point p; - p.h = r.left + x; - p.v = r.top + y; - - WindowRef ref2 = 0; - FindWindow (p, &ref2); - - if (windowRef != ref2) - return false; - - if (trueIfInAChildWindow) - return true; - - HIPoint p2; - p2.x = (float) x; - p2.y = (float) y; - HIViewRef hit; - - HIViewGetSubviewHit (viewRef, &p2, true, &hit); - return hit == 0 || hit == viewRef; - } - - const BorderSize getFrameSize() const - { - return BorderSize(); - } - - bool setAlwaysOnTop (bool alwaysOnTop) - { - // can't do this so return false and let the component create a new window - return false; - } - - void toFront (bool makeActiveWindow) - { - makeActiveWindow = makeActiveWindow - && component->isValidComponent() - && (component->getWantsKeyboardFocus() - || component->isCurrentlyModal()); - - if (windowRef != FrontWindow() - || (makeActiveWindow && ! IsWindowActive (windowRef)) - || ! Process::isForegroundProcess()) - { - if (! Process::isForegroundProcess()) - { - ProcessSerialNumber psn; - GetCurrentProcess (&psn); - SetFrontProcessWithOptions (&psn, kSetFrontProcessFrontWindowOnly); - } - - if (IsValidWindowPtr (windowRef)) - { - if (makeActiveWindow) - { - SelectWindow (windowRef); - SetUserFocusWindow (windowRef); - HIViewAdvanceFocus (viewRef, 0); - } - else - { - BringToFront (windowRef); - } - - handleBroughtToFront(); - } - } - } - - void toBehind (ComponentPeer* other) - { - HIViewComponentPeer* const otherWindow = dynamic_cast (other); - - if (other != 0 && windowRef != 0 && otherWindow->windowRef != 0) - { - if (windowRef == otherWindow->windowRef) - { - HIViewSetZOrder (viewRef, kHIViewZOrderBelow, otherWindow->viewRef); - } - else - { - SendBehind (windowRef, otherWindow->windowRef); - } - } - } - - void setIcon (const Image& /*newIcon*/) - { - // to do.. - } - - //============================================================================== - void viewFocusGain() - { - const MessageManagerLock messLock; - - if (currentlyFocusedPeer != this) - { - if (ComponentPeer::isValidPeer (currentlyFocusedPeer)) - currentlyFocusedPeer->handleFocusLoss(); - - currentlyFocusedPeer = this; - - handleFocusGain(); - } - } - - void viewFocusLoss() - { - if (currentlyFocusedPeer == this) - { - currentlyFocusedPeer = 0; - handleFocusLoss(); - } - } - - bool isFocused() const - { - return windowRef == GetUserFocusWindow() - && HIViewSubtreeContainsFocus (viewRef); - } - - void grabFocus() - { - if ((! isFocused()) && IsValidWindowPtr (windowRef)) - { - SetUserFocusWindow (windowRef); - HIViewAdvanceFocus (viewRef, 0); - } - } - - void textInputRequired (int /*x*/, int /*y*/) - { - } - - //============================================================================== - void repaint (int x, int y, int w, int h) - { - if (Rectangle::intersectRectangles (x, y, w, h, - 0, 0, - getComponent()->getWidth(), - getComponent()->getHeight())) - { - if ((getStyleFlags() & windowRepaintedExplictly) == 0) - { - if (isCompositingWindow) - { -#if MACOS_10_3_OR_EARLIER - RgnHandle rgn = NewRgn(); - SetRectRgn (rgn, x, y, x + w, y + h); - HIViewSetNeedsDisplayInRegion (viewRef, rgn, true); - DisposeRgn (rgn); -#else - HIRect r; - r.origin.x = x; - r.origin.y = y; - r.size.width = w; - r.size.height = h; - - HIViewSetNeedsDisplayInRect (viewRef, &r, true); -#endif - } - else - { - if (! isTimerRunning()) - startTimer (20); - } - } - - repainter->repaint (x, y, w, h); - } - } - - void timerCallback() - { - performAnyPendingRepaintsNow(); - } - - void performAnyPendingRepaintsNow() - { - stopTimer(); - - if (component->isVisible()) - { -#if MACOS_10_2_OR_EARLIER - if (! isCompositingWindow) - { - Rect w; - GetWindowBounds (windowRef, windowRegionToUse, &w); - - const int offsetInWindowX = component->getScreenX() - getScreenX(); - const int offsetInWindowY = component->getScreenY() - getScreenY(); - - for (RectangleList::Iterator i (repainter->getRegionsNeedingRepaint()); i.next();) - { - const Rectangle& r = *i.getRectangle(); - w.left = offsetInWindowX + r.getX(); - w.top = offsetInWindowY + r.getY(); - w.right = offsetInWindowX + r.getRight(); - w.bottom = offsetInWindowY + r.getBottom(); - InvalWindowRect (windowRef, &w); - } - } - else - { - EventRef theEvent; - - EventTypeSpec eventTypes[1]; - eventTypes[0].eventClass = kEventClassControl; - eventTypes[0].eventKind = kEventControlDraw; - - int n = 3; - while (--n >= 0 - && ReceiveNextEvent (1, eventTypes, kEventDurationNoWait, true, &theEvent) == noErr) - { - if (GetEventClass (theEvent) == kEventClassAppleEvent) - { - EventRecord eventRec; - if (ConvertEventRefToEventRecord (theEvent, &eventRec)) - AEProcessAppleEvent (&eventRec); - } - else - { - EventTargetRef theTarget = GetEventDispatcherTarget(); - SendEventToEventTarget (theEvent, theTarget); - } - - ReleaseEvent (theEvent); - } - } -#else - if (HIViewGetNeedsDisplay (viewRef) || repainter->isRepaintNeeded()) - HIViewRender (viewRef); -#endif - } - } - - //============================================================================== - juce_UseDebuggingNewOperator - - WindowRef windowRef; - HIViewRef viewRef; - -private: - EventHandlerRef eventHandlerRef; - bool fullScreen, isSharedWindow, isCompositingWindow; - StringArray dragAndDropFiles; - - //============================================================================== - class RepaintManager : public Timer - { -public: - RepaintManager (HIViewComponentPeer* const peer_) - : peer (peer_), - image (0) - { - } - - ~RepaintManager() - { - delete image; - } - - void timerCallback() - { - stopTimer(); - deleteAndZero (image); - } - - void repaint (int x, int y, int w, int h) - { - regionsNeedingRepaint.add (x, y, w, h); - } - - bool isRepaintNeeded() const throw() - { - return ! regionsNeedingRepaint.isEmpty(); - } - - void repaintAnyRemainingRegions() - { - // if any regions have been invaldated during the paint callback, - // we need to repaint them explicitly because the mac throws this - // stuff away - for (RectangleList::Iterator i (regionsNeedingRepaint); i.next();) - { - const Rectangle& r = *i.getRectangle(); - peer->repaint (r.getX(), r.getY(), r.getWidth(), r.getHeight()); - } - } - - void paint (CGContextRef cgContext, int x, int y, int w, int h) - { - if (w > 0 && h > 0) - { - bool refresh = false; - int imW = image != 0 ? image->getWidth() : 0; - int imH = image != 0 ? image->getHeight() : 0; - - if (imW < w || imH < h) - { - imW = jmin (peer->getComponent()->getWidth(), (w + 31) & ~31); - imH = jmin (peer->getComponent()->getHeight(), (h + 31) & ~31); - - delete image; - image = new MacBitmapImage (peer->getComponent()->isOpaque() ? Image::RGB - : Image::ARGB, - imW, imH, false); - - refresh = true; - } - else if (imageX > x || imageY > y - || imageX + imW < x + w - || imageY + imH < y + h) - { - refresh = true; - } - - if (refresh) - { - regionsNeedingRepaint.clear(); - regionsNeedingRepaint.addWithoutMerging (Rectangle (x, y, imW, imH)); - imageX = x; - imageY = y; - } - - LowLevelGraphicsSoftwareRenderer context (*image); - context.setOrigin (-imageX, -imageY); - - if (context.reduceClipRegion (regionsNeedingRepaint)) - { - regionsNeedingRepaint.clear(); - - if (! peer->getComponent()->isOpaque()) - { - for (RectangleList::Iterator i (*context.getRawClipRegion()); i.next();) - { - const Rectangle& r = *i.getRectangle(); - image->clear (r.getX(), r.getY(), r.getWidth(), r.getHeight()); - } - } - - regionsNeedingRepaint.clear(); - peer->clearMaskedRegion(); - peer->handlePaint (context); - } - else - { - regionsNeedingRepaint.clear(); - } - - if (! peer->maskedRegion.isEmpty()) - { - RectangleList total (Rectangle (x, y, w, h)); - total.subtract (peer->maskedRegion); - - CGRect* rects = (CGRect*) juce_malloc (sizeof (CGRect) * total.getNumRectangles()); - int n = 0; - - for (RectangleList::Iterator i (total); i.next();) - { - const Rectangle& r = *i.getRectangle(); - rects[n].origin.x = (int) r.getX(); - rects[n].origin.y = (int) r.getY(); - rects[n].size.width = roundFloatToInt (r.getWidth()); - rects[n++].size.height = roundFloatToInt (r.getHeight()); - } - - CGContextClipToRects (cgContext, rects, n); - juce_free (rects); - } - - if (peer->isSharedWindow) - { - CGRect clip; - clip.origin.x = x; - clip.origin.y = y; - clip.size.width = jmin (w, peer->getComponent()->getWidth() - x); - clip.size.height = jmin (h, peer->getComponent()->getHeight() - y); - - CGContextClipToRect (cgContext, clip); - } - - image->blitToContext (cgContext, imageX, imageY); - } - - startTimer (3000); - } - - private: - HIViewComponentPeer* const peer; - MacBitmapImage* image; - int imageX, imageY; - RectangleList regionsNeedingRepaint; - - RepaintManager (const RepaintManager&); - const RepaintManager& operator= (const RepaintManager&); - }; - - RepaintManager* repainter; - - friend class RepaintManager; - - //============================================================================== - static OSStatus handleFrameRepaintEvent (EventHandlerCallRef myHandler, - EventRef theEvent, - void* userData) - { - // don't draw the frame.. - return noErr; - } - - //============================================================================== - OSStatus handleKeyEvent (EventRef theEvent, juce_wchar textCharacter) - { - updateModifiers (theEvent); - - UniChar unicodeChars [4]; - zeromem (unicodeChars, sizeof (unicodeChars)); - GetEventParameter (theEvent, kEventParamKeyUnicodes, typeUnicodeText, 0, sizeof (unicodeChars), 0, unicodeChars); - - int keyCode = (int) (unsigned int) unicodeChars[0]; - - UInt32 rawKey = 0; - GetEventParameter (theEvent, kEventParamKeyCode, typeUInt32, 0, sizeof (UInt32), 0, &rawKey); - - if ((currentModifiers & ModifierKeys::ctrlModifier) != 0 - && keyCode >= 1 && keyCode <= 26) - { - keyCode += ('A' - 1); - } - else - { - static const int keyTranslations[] = - { - 0, 's', 'd', 'f', 'h', 'g', 'z', 'x', 'c', 'v', 0xa7, 'b', - 'q', 'w', 'e', 'r', 'y', 't', '1', '2', '3', '4', '6', '5', - '=', '9', '7', '-', '8', '0', ']', 'o', 'u', '[', 'i', 'p', - KeyPress::returnKey, 'l', 'j', '\'', 'k', ';', '\\', ',', '/', - 'n', 'm', '.', 0, KeyPress::spaceKey, '`', KeyPress::backspaceKey, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, KeyPress::numberPadDecimalPoint, - 0, KeyPress::numberPadMultiply, 0, KeyPress::numberPadAdd, - 0, KeyPress::numberPadDelete, 0, 0, 0, KeyPress::numberPadDivide, KeyPress::returnKey, - 0, KeyPress::numberPadSubtract, 0, 0, KeyPress::numberPadEquals, KeyPress::numberPad0, - KeyPress::numberPad1, KeyPress::numberPad2, KeyPress::numberPad3, - KeyPress::numberPad4, KeyPress::numberPad5, KeyPress::numberPad6, - KeyPress::numberPad7, 0, KeyPress::numberPad8, KeyPress::numberPad9, - 0, 0, 0, KeyPress::F5Key, KeyPress::F6Key, KeyPress::F7Key, KeyPress::F3Key, - KeyPress::F8Key, KeyPress::F9Key, 0, KeyPress::F11Key, 0, KeyPress::F13Key, - KeyPress::F16Key, KeyPress::F14Key, 0, KeyPress::F10Key, 0, KeyPress::F12Key, - 0, KeyPress::F15Key, 0, KeyPress::homeKey, KeyPress::pageUpKey, 0, KeyPress::F4Key, - KeyPress::endKey, KeyPress::F2Key, KeyPress::pageDownKey, KeyPress::F1Key, - KeyPress::leftKey, KeyPress::rightKey, KeyPress::downKey, KeyPress::upKey, 0 - }; - - if (((unsigned int) rawKey) < (unsigned int) numElementsInArray (keyTranslations) - && keyTranslations [rawKey] != 0) - { - keyCode = keyTranslations [rawKey]; - } - - if ((rawKey == 0 && textCharacter != 0) - || (CharacterFunctions::isLetterOrDigit ((juce_wchar) keyCode) - && CharacterFunctions::isLetterOrDigit (textCharacter))) // correction for azerty-type layouts.. - { - keyCode = CharacterFunctions::toLowerCase (textCharacter); - } - } - - if ((currentModifiers & (ModifierKeys::commandModifier | ModifierKeys::ctrlModifier)) != 0) - textCharacter = 0; - - static juce_wchar lastTextCharacter = 0; - - switch (GetEventKind (theEvent)) - { - case kEventRawKeyDown: - { - keysCurrentlyDown.addIfNotAlreadyThere ((void*) keyCode); - lastTextCharacter = textCharacter; - - const bool used1 = handleKeyUpOrDown(); - const bool used2 = handleKeyPress (keyCode, textCharacter); - - if (used1 || used2) - return noErr; - - break; - } - - case kEventRawKeyUp: - keysCurrentlyDown.removeValue ((void*) keyCode); - lastTextCharacter = 0; - if (handleKeyUpOrDown()) - return noErr; - - break; - - case kEventRawKeyRepeat: - if (handleKeyPress (keyCode, lastTextCharacter)) - return noErr; - - break; - - case kEventRawKeyModifiersChanged: - handleModifierKeysChange(); - break; - - default: - jassertfalse - break; - } - - return eventNotHandledErr; - } - - OSStatus handleTextInputEvent (EventRef theEvent) - { - UInt32 numBytesRequired = 0; - GetEventParameter (theEvent, kEventParamTextInputSendText, typeUnicodeText, 0, 0, &numBytesRequired, 0); - - MemoryBlock buffer (numBytesRequired, true); - UniChar* const uc = (UniChar*) buffer.getData(); - GetEventParameter (theEvent, kEventParamTextInputSendText, typeUnicodeText, 0, numBytesRequired, &numBytesRequired, uc); - - EventRef originalEvent; - GetEventParameter (theEvent, kEventParamTextInputSendKeyboardEvent, typeEventRef, 0, sizeof (originalEvent), 0, &originalEvent); - - OSStatus res = noErr; - for (int i = 0; i < numBytesRequired / sizeof (UniChar); ++i) - res = handleKeyEvent (originalEvent, (juce_wchar) uc[i]); - - return res; - } - - //============================================================================== - OSStatus handleMouseEvent (EventHandlerCallRef callRef, EventRef theEvent) - { - MouseCheckTimer::getInstance()->moved (this); - - ::Point where; - GetEventParameter (theEvent, kEventParamMouseLocation, typeQDPoint, 0, sizeof (::Point), 0, &where); - int x = where.h; - int y = where.v; - globalPositionToRelative (x, y); - - int64 time = getEventTime (theEvent); - - switch (GetEventKind (theEvent)) - { - case kEventMouseMoved: - MouseCheckTimer::getInstance()->hasEverHadAMouseMove = true; - updateModifiers (theEvent); - handleMouseMove (x, y, time); - break; - - case kEventMouseDragged: - updateModifiers (theEvent); - handleMouseDrag (x, y, time); - break; - - case kEventMouseDown: - { - if (! Process::isForegroundProcess()) - { - ProcessSerialNumber psn; - GetCurrentProcess (&psn); - SetFrontProcessWithOptions (&psn, kSetFrontProcessFrontWindowOnly); - - toFront (true); - } - -#if JUCE_QUICKTIME - { - long mods; - GetEventParameter (theEvent, kEventParamKeyModifiers, typeUInt32, 0, sizeof (mods), 0, &mods); - - ::Point where; - GetEventParameter (theEvent, kEventParamMouseLocation, typeQDPoint, 0, sizeof (::Point), 0, &where); - - OfferMouseClickToQuickTime (windowRef, where, EventTimeToTicks (GetEventTime (theEvent)), mods, component); - } -#endif - - if (component->isBroughtToFrontOnMouseClick() - && ! component->isCurrentlyBlockedByAnotherModalComponent()) - { - //ActivateWindow (windowRef, true); - SelectWindow (windowRef); - } - - EventMouseButton button; - GetEventParameter (theEvent, kEventParamMouseButton, typeMouseButton, 0, sizeof (EventMouseButton), 0, &button); - - // need to clear all these flags because sometimes the mac can swallow (right) mouse-up events and - // this makes a button get stuck down. Since there's no other way to tell what buttons are down, - // this is all I can think of doing about it.. - currentModifiers &= ~(ModifierKeys::leftButtonModifier | ModifierKeys::rightButtonModifier | ModifierKeys::middleButtonModifier); - - if (button == kEventMouseButtonPrimary) - currentModifiers |= ModifierKeys::leftButtonModifier; - else if (button == kEventMouseButtonSecondary) - currentModifiers |= ModifierKeys::rightButtonModifier; - else if (button == kEventMouseButtonTertiary) - currentModifiers |= ModifierKeys::middleButtonModifier; - - updateModifiers (theEvent); - - juce_currentMouseTrackingPeer = this; // puts the message dispatcher into mouse-tracking mode.. - handleMouseDown (x, y, time); - break; - } - - case kEventMouseUp: - { - const int oldModifiers = currentModifiers; - - EventMouseButton button; - GetEventParameter (theEvent, kEventParamMouseButton, typeMouseButton, 0, sizeof (EventMouseButton), 0, &button); - - if (button == kEventMouseButtonPrimary) - currentModifiers &= ~ModifierKeys::leftButtonModifier; - else if (button == kEventMouseButtonSecondary) - currentModifiers &= ~ModifierKeys::rightButtonModifier; - - updateModifiers (theEvent); - - juce_currentMouseTrackingPeer = 0; - handleMouseUp (oldModifiers, x, y, time); - break; - } - - case kEventMouseWheelMoved: - { - EventMouseWheelAxis axis; - GetEventParameter (theEvent, kEventParamMouseWheelAxis, typeMouseWheelAxis, 0, sizeof (axis), 0, &axis); - - SInt32 delta; - GetEventParameter (theEvent, kEventParamMouseWheelDelta, - typeLongInteger, 0, sizeof (delta), 0, &delta); - - updateModifiers (theEvent); - - handleMouseWheel (axis == kEventMouseWheelAxisX ? delta * 10 : 0, - axis == kEventMouseWheelAxisX ? 0 : delta * 10, - time); - - break; - } - } - - return noErr; - } - - //============================================================================== - void doDragDropEnter (EventRef theEvent) - { - updateDragAndDropFileList (theEvent); - - if (dragAndDropFiles.size() > 0) - { - int x, y; - component->getMouseXYRelative (x, y); - handleFileDragMove (dragAndDropFiles, x, y); - } - } - - void doDragDropMove (EventRef theEvent) - { - if (dragAndDropFiles.size() > 0) - { - int x, y; - component->getMouseXYRelative (x, y); - handleFileDragMove (dragAndDropFiles, x, y); - } - } - - void doDragDropExit (EventRef theEvent) - { - if (dragAndDropFiles.size() > 0) - handleFileDragExit (dragAndDropFiles); - } - - void doDragDrop (EventRef theEvent) - { - updateDragAndDropFileList (theEvent); - - if (dragAndDropFiles.size() > 0) - { - int x, y; - component->getMouseXYRelative (x, y); - handleFileDragDrop (dragAndDropFiles, x, y); - } - } - - void updateDragAndDropFileList (EventRef theEvent) - { - dragAndDropFiles.clear(); - - DragRef dragRef; - if (GetEventParameter (theEvent, kEventParamDragRef, typeDragRef, 0, sizeof (dragRef), 0, &dragRef) == noErr) - { - UInt16 numItems = 0; - if (CountDragItems (dragRef, &numItems) == noErr) - { - for (int i = 0; i < (int) numItems; ++i) - { - DragItemRef ref; - - if (GetDragItemReferenceNumber (dragRef, i + 1, &ref) == noErr) - { - const FlavorType flavorType = kDragFlavorTypeHFS; - - Size size = 0; - if (GetFlavorDataSize (dragRef, ref, flavorType, &size) == noErr) - { - void* data = juce_calloc (size); - - if (GetFlavorData (dragRef, ref, flavorType, data, &size, 0) == noErr) - { - HFSFlavor* f = (HFSFlavor*) data; - FSRef fsref; - - if (FSpMakeFSRef (&f->fileSpec, &fsref) == noErr) - { - const String path (PlatformUtilities::makePathFromFSRef (&fsref)); - - if (path.isNotEmpty()) - dragAndDropFiles.add (path); - } - } - - juce_free (data); - } - } - } - - dragAndDropFiles.trim(); - dragAndDropFiles.removeEmptyStrings(); - } - } - } - - //============================================================================== - void resizeViewToFitWindow() - { - HIRect r; - - if (isSharedWindow) - { - HIViewGetFrame (viewRef, &r); - r.size.width = (float) component->getWidth(); - r.size.height = (float) component->getHeight(); - } - else - { - r.origin.x = 0; - r.origin.y = 0; - - Rect w; - GetWindowBounds (windowRef, windowRegionToUse, &w); - - r.size.width = (float) (w.right - w.left); - r.size.height = (float) (w.bottom - w.top); - } - - HIViewSetFrame (viewRef, &r); - -#if MACOS_10_3_OR_EARLIER - component->repaint(); -#endif - } - - //============================================================================== - OSStatus hiViewDraw (EventRef theEvent) - { - CGContextRef context = 0; - GetEventParameter (theEvent, kEventParamCGContextRef, typeCGContextRef, 0, sizeof (CGContextRef), 0, &context); - - CGrafPtr oldPort; - CGrafPtr port = 0; - - if (context == 0) - { - GetEventParameter (theEvent, kEventParamGrafPort, typeGrafPtr, 0, sizeof (CGrafPtr), 0, &port); - - GetPort (&oldPort); - SetPort (port); - - if (port != 0) - QDBeginCGContext (port, &context); - - if (! isCompositingWindow) - { - Rect bounds; - GetWindowBounds (windowRef, windowRegionToUse, &bounds); - CGContextTranslateCTM (context, 0, bounds.bottom - bounds.top); - CGContextScaleCTM (context, 1.0, -1.0); - } - - if (isSharedWindow) - { - // NB - Had terrible problems trying to correctly get the position - // of this view relative to the window, and this seems wrong, but - // works better than any other method I've tried.. - HIRect hiViewPos; - HIViewGetFrame (viewRef, &hiViewPos); - CGContextTranslateCTM (context, hiViewPos.origin.x, hiViewPos.origin.y); - } - } - -#if MACOS_10_2_OR_EARLIER - RgnHandle rgn = 0; - GetEventParameter (theEvent, kEventParamRgnHandle, typeQDRgnHandle, 0, sizeof (RgnHandle), 0, &rgn); - - CGRect clip; - - // (avoid doing this in plugins because of some strange redraw bugs..) - if (rgn != 0 && JUCEApplication::getInstance() != 0) - { - Rect bounds; - GetRegionBounds (rgn, &bounds); - clip.origin.x = bounds.left; - clip.origin.y = bounds.top; - clip.size.width = bounds.right - bounds.left; - clip.size.height = bounds.bottom - bounds.top; - } - else - { - HIViewGetBounds (viewRef, &clip); - clip.origin.x = 0; - clip.origin.y = 0; - } -#else - CGRect clip (CGContextGetClipBoundingBox (context)); -#endif - - clip = CGRectIntegral (clip); - - if (clip.origin.x < 0) - { - clip.size.width += clip.origin.x; - clip.origin.x = 0; - } - - if (clip.origin.y < 0) - { - clip.size.height += clip.origin.y; - clip.origin.y = 0; - } - - if (! component->isOpaque()) - CGContextClearRect (context, clip); - - repainter->paint (context, - (int) clip.origin.x, (int) clip.origin.y, - (int) clip.size.width, (int) clip.size.height); - - if (port != 0) - { - CGContextFlush (context); - QDEndCGContext (port, &context); - - SetPort (oldPort); - } - - repainter->repaintAnyRemainingRegions(); - - return noErr; - } - - //============================================================================== - OSStatus handleWindowClassEvent (EventRef theEvent) - { - switch (GetEventKind (theEvent)) - { - case kEventWindowBoundsChanged: - resizeViewToFitWindow(); - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowBoundsChanging: - if ((styleFlags & (windowIsResizable | windowHasTitleBar)) == (windowIsResizable | windowHasTitleBar)) - { - UInt32 atts = 0; - GetEventParameter (theEvent, kEventParamAttributes, typeUInt32, - 0, sizeof (UInt32), 0, &atts); - - if ((atts & (kWindowBoundsChangeUserDrag | kWindowBoundsChangeUserResize)) != 0) - { - if (component->isCurrentlyBlockedByAnotherModalComponent()) - { - Component* const modal = Component::getCurrentlyModalComponent(); - if (modal != 0) - { - static uint32 lastDragTime = 0; - const uint32 now = Time::currentTimeMillis(); - - if (now > lastDragTime + 1000) - { - lastDragTime = now; - modal->inputAttemptWhenModal(); - } - - const Rectangle currentRect (getComponent()->getBounds()); - Rect current; - current.left = currentRect.getX(); - current.top = currentRect.getY(); - current.right = currentRect.getRight(); - current.bottom = currentRect.getBottom(); - - // stop the window getting dragged.. - SetEventParameter (theEvent, kEventParamCurrentBounds, typeQDRectangle, - sizeof (Rect), ¤t); - - return noErr; - } - } - - if ((atts & kWindowBoundsChangeUserResize) != 0 - && constrainer != 0 && ! isSharedWindow) - { - Rect current; - GetEventParameter (theEvent, kEventParamCurrentBounds, typeQDRectangle, - 0, sizeof (Rect), 0, ¤t); - - int x = current.left; - int y = current.top; - int w = current.right - current.left; - int h = current.bottom - current.top; - - const Rectangle currentRect (getComponent()->getBounds()); - - constrainer->checkBounds (x, y, w, h, currentRect, - Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), - y != currentRect.getY() && y + h == currentRect.getBottom(), - x != currentRect.getX() && x + w == currentRect.getRight(), - y == currentRect.getY() && y + h != currentRect.getBottom(), - x == currentRect.getX() && x + w != currentRect.getRight()); - - current.left = x; - current.top = y; - current.right = x + w; - current.bottom = y + h; - - SetEventParameter (theEvent, kEventParamCurrentBounds, typeQDRectangle, - sizeof (Rect), ¤t); - - return noErr; - } - } - } - break; - - case kEventWindowFocusAcquired: - keysCurrentlyDown.clear(); - - if ((! isSharedWindow) || HIViewSubtreeContainsFocus (viewRef)) - viewFocusGain(); - - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowFocusRelinquish: - keysCurrentlyDown.clear(); - viewFocusLoss(); - - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowCollapsed: - minimisedWindows.addIfNotAlreadyThere (windowRef); - handleMovedOrResized(); - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowExpanded: - minimisedWindows.removeValue (windowRef); - handleMovedOrResized(); - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowShown: - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowClose: - if (isSharedWindow) - break; // break to let the OS delete the window - - handleUserClosingWindow(); - return noErr; // avoids letting the OS to delete the window, we'll do that ourselves. - - default: - break; - } - - return eventNotHandledErr; - } - - OSStatus handleWindowEventForPeer (EventHandlerCallRef callRef, EventRef theEvent) - { - switch (GetEventClass (theEvent)) - { - case kEventClassMouse: - { - static HIViewComponentPeer* lastMouseDownPeer = 0; - - const UInt32 eventKind = GetEventKind (theEvent); - HIViewRef view = 0; - - if (eventKind == kEventMouseDragged) - { - view = viewRef; - } - else - { - HIViewGetViewForMouseEvent (HIViewGetRoot (windowRef), theEvent, &view); - - if (view != viewRef) - { - if ((eventKind == kEventMouseUp - || eventKind == kEventMouseExited) - && ComponentPeer::isValidPeer (lastMouseDownPeer)) - { - return lastMouseDownPeer->handleMouseEvent (callRef, theEvent); - } - - return eventNotHandledErr; - } - } - - if (eventKind == kEventMouseDown - || eventKind == kEventMouseDragged - || eventKind == kEventMouseEntered) - { - lastMouseDownPeer = this; - } - - return handleMouseEvent (callRef, theEvent); - } - break; - - case kEventClassWindow: - return handleWindowClassEvent (theEvent); - - case kEventClassKeyboard: - if (isFocused()) - return handleKeyEvent (theEvent, 0); - - break; - - case kEventClassTextInput: - if (isFocused()) - return handleTextInputEvent (theEvent); - - break; - - default: - break; - } - - return eventNotHandledErr; - } - - static pascal OSStatus handleWindowEvent (EventHandlerCallRef callRef, EventRef theEvent, void* userData) - { - MessageManager::delayWaitCursor(); - - HIViewComponentPeer* const peer = (HIViewComponentPeer*) userData; - - const MessageManagerLock messLock; - - if (ComponentPeer::isValidPeer (peer)) - return peer->handleWindowEventForPeer (callRef, theEvent); - - return eventNotHandledErr; - } - - //============================================================================== - static pascal OSStatus hiViewEventHandler (EventHandlerCallRef myHandler, EventRef theEvent, void* userData) - { - MessageManager::delayWaitCursor(); - - const UInt32 eventKind = GetEventKind (theEvent); - const UInt32 eventClass = GetEventClass (theEvent); - - if (eventClass == kEventClassHIObject) - { - switch (eventKind) - { - case kEventHIObjectConstruct: - { - void* data = juce_calloc (sizeof (void*)); - SetEventParameter (theEvent, kEventParamHIObjectInstance, - typeVoidPtr, sizeof (void*), &data); - - return noErr; - } - - case kEventHIObjectInitialize: - GetEventParameter (theEvent, 'peer', typeVoidPtr, 0, sizeof (void*), 0, (void**) userData); - return noErr; - - case kEventHIObjectDestruct: - juce_free (userData); - return noErr; - - default: - break; - } - } - else if (eventClass == kEventClassControl) - { - HIViewComponentPeer* const peer = *(HIViewComponentPeer**) userData; - const MessageManagerLock messLock; - - if (! ComponentPeer::isValidPeer (peer)) - return eventNotHandledErr; - - switch (eventKind) - { - case kEventControlDraw: - return peer->hiViewDraw (theEvent); - - case kEventControlBoundsChanged: - { - HIRect bounds; - HIViewGetBounds (peer->viewRef, &bounds); - peer->repaint (0, 0, roundFloatToInt (bounds.size.width), roundFloatToInt (bounds.size.height)); - - peer->handleMovedOrResized(); - return noErr; - } - - case kEventControlHitTest: - { - HIPoint where; - GetEventParameter (theEvent, kEventParamMouseLocation, typeHIPoint, 0, sizeof (HIPoint), 0, &where); - - HIRect bounds; - HIViewGetBounds (peer->viewRef, &bounds); - - ControlPartCode part = kControlNoPart; - - if (CGRectContainsPoint (bounds, where)) - part = 1; - - SetEventParameter (theEvent, kEventParamControlPart, typeControlPartCode, sizeof (ControlPartCode), &part); - return noErr; - } - break; - - case kEventControlSetFocusPart: - { - ControlPartCode desiredFocus; - if (GetEventParameter (theEvent, kEventParamControlPart, typeControlPartCode, 0, sizeof (ControlPartCode), 0, &desiredFocus) != noErr) - break; - - if (desiredFocus == kControlNoPart) - peer->viewFocusLoss(); - else - peer->viewFocusGain(); - - return noErr; - } - break; - - case kEventControlDragEnter: - { -#if MACOS_10_2_OR_EARLIER - enum { kEventParamControlWouldAcceptDrop = 'cldg' }; -#endif - Boolean accept = true; - SetEventParameter (theEvent, kEventParamControlWouldAcceptDrop, typeBoolean, sizeof (accept), &accept); - - peer->doDragDropEnter (theEvent); - return noErr; - } - - case kEventControlDragWithin: - peer->doDragDropMove (theEvent); - return noErr; - - case kEventControlDragLeave: - peer->doDragDropExit (theEvent); - return noErr; - - case kEventControlDragReceive: - peer->doDragDrop (theEvent); - return noErr; - - case kEventControlOwningWindowChanged: - return peer->ownerWindowChanged (theEvent); - -#if ! MACOS_10_2_OR_EARLIER - case kEventControlGetFrameMetrics: - { - CallNextEventHandler (myHandler, theEvent); - HIViewFrameMetrics metrics; - GetEventParameter (theEvent, kEventParamControlFrameMetrics, typeControlFrameMetrics, 0, sizeof (metrics), 0, &metrics); - metrics.top = metrics.bottom = 0; - SetEventParameter (theEvent, kEventParamControlFrameMetrics, typeControlFrameMetrics, sizeof (metrics), &metrics); - return noErr; - } -#endif - - case kEventControlInitialize: - { - UInt32 features = kControlSupportsDragAndDrop - | kControlSupportsFocus - | kControlHandlesTracking - | kControlSupportsEmbedding - | (1 << 8) /*kHIViewFeatureGetsFocusOnClick*/; - - SetEventParameter (theEvent, kEventParamControlFeatures, typeUInt32, sizeof (UInt32), &features); - return noErr; - } - - default: - break; - } - } - - return eventNotHandledErr; - } - - //============================================================================== - WindowRef createNewWindow (const int windowStyleFlags) - { - jassert (windowRef == 0); - - static ToolboxObjectClassRef customWindowClass = 0; - - if (customWindowClass == 0) - { - // Register our window class - const EventTypeSpec customTypes[] = { { kEventClassWindow, kEventWindowDrawFrame } }; - - UnsignedWide t; - Microseconds (&t); - const String randomString ((int) (t.lo & 0x7ffffff)); - const String juceWindowClassName (T("JUCEWindowClass_") + randomString); - CFStringRef juceWindowClassNameCFString = PlatformUtilities::juceStringToCFString (juceWindowClassName); - - RegisterToolboxObjectClass (juceWindowClassNameCFString, - 0, 1, customTypes, - NewEventHandlerUPP (handleFrameRepaintEvent), - 0, &customWindowClass); - - CFRelease (juceWindowClassNameCFString); - } - - Rect pos; - pos.left = getComponent()->getX(); - pos.top = getComponent()->getY(); - pos.right = getComponent()->getRight(); - pos.bottom = getComponent()->getBottom(); - - int attributes = kWindowStandardHandlerAttribute | kWindowCompositingAttribute; - if ((windowStyleFlags & windowHasDropShadow) == 0) - attributes |= kWindowNoShadowAttribute; - - if ((windowStyleFlags & windowIgnoresMouseClicks) != 0) - attributes |= kWindowIgnoreClicksAttribute; - -#if ! MACOS_10_3_OR_EARLIER - if ((windowStyleFlags & windowIsTemporary) != 0) - attributes |= kWindowDoesNotCycleAttribute; -#endif - - WindowRef newWindow = 0; - - if ((windowStyleFlags & windowHasTitleBar) == 0) - { - attributes |= kWindowCollapseBoxAttribute; - - WindowDefSpec customWindowSpec; - customWindowSpec.defType = kWindowDefObjectClass; - customWindowSpec.u.classRef = customWindowClass; - - CreateCustomWindow (&customWindowSpec, - ((windowStyleFlags & windowIsTemporary) != 0) ? kUtilityWindowClass : - (getComponent()->isAlwaysOnTop() ? kUtilityWindowClass - : kDocumentWindowClass), - attributes, - &pos, - &newWindow); - } - else - { - if ((windowStyleFlags & windowHasCloseButton) != 0) - attributes |= kWindowCloseBoxAttribute; - - if ((windowStyleFlags & windowHasMinimiseButton) != 0) - attributes |= kWindowCollapseBoxAttribute; - - if ((windowStyleFlags & windowHasMaximiseButton) != 0) - attributes |= kWindowFullZoomAttribute; - - if ((windowStyleFlags & windowIsResizable) != 0) - attributes |= kWindowResizableAttribute | kWindowLiveResizeAttribute; - - CreateNewWindow (kDocumentWindowClass, attributes, &pos, &newWindow); - } - - jassert (newWindow != 0); - if (newWindow != 0) - { - HideWindow (newWindow); - - SetAutomaticControlDragTrackingEnabledForWindow (newWindow, true); - - if (! getComponent()->isOpaque()) - SetWindowAlpha (newWindow, 0.9999999f); // to fool it into giving the window an alpha-channel - } - - return newWindow; - } - - OSStatus ownerWindowChanged (EventRef theEvent) - { - WindowRef newWindow = 0; - GetEventParameter (theEvent, kEventParamControlCurrentOwningWindow, typeWindowRef, 0, sizeof (newWindow), 0, &newWindow); - - if (windowRef != newWindow) - { - if (eventHandlerRef != 0) - { - RemoveEventHandler (eventHandlerRef); - eventHandlerRef = 0; - } - - windowRef = newWindow; - - if (windowRef != 0) - { - const EventTypeSpec eventTypes[] = - { - { kEventClassWindow, kEventWindowBoundsChanged }, - { kEventClassWindow, kEventWindowBoundsChanging }, - { kEventClassWindow, kEventWindowFocusAcquired }, - { kEventClassWindow, kEventWindowFocusRelinquish }, - { kEventClassWindow, kEventWindowCollapsed }, - { kEventClassWindow, kEventWindowExpanded }, - { kEventClassWindow, kEventWindowShown }, - { kEventClassWindow, kEventWindowClose }, - { kEventClassMouse, kEventMouseDown }, - { kEventClassMouse, kEventMouseUp }, - { kEventClassMouse, kEventMouseMoved }, - { kEventClassMouse, kEventMouseDragged }, - { kEventClassMouse, kEventMouseEntered }, - { kEventClassMouse, kEventMouseExited }, - { kEventClassMouse, kEventMouseWheelMoved }, - { kEventClassKeyboard, kEventRawKeyUp }, - { kEventClassKeyboard, kEventRawKeyRepeat }, - { kEventClassKeyboard, kEventRawKeyModifiersChanged }, - { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } - }; - - static EventHandlerUPP handleWindowEventUPP = 0; - - if (handleWindowEventUPP == 0) - handleWindowEventUPP = NewEventHandlerUPP (handleWindowEvent); - - InstallWindowEventHandler (windowRef, handleWindowEventUPP, - GetEventTypeCount (eventTypes), eventTypes, - (void*) this, (EventHandlerRef*) &eventHandlerRef); - - WindowAttributes attributes; - GetWindowAttributes (windowRef, &attributes); - -#if MACOS_10_3_OR_EARLIER - isCompositingWindow = ((attributes & kWindowCompositingAttribute) != 0); -#else - isCompositingWindow = HIViewIsCompositingEnabled (viewRef); -#endif - - SetAutomaticControlDragTrackingEnabledForWindow (newWindow, true); - - MouseCheckTimer::getInstance()->resetMouseMoveChecker(); - } - } - - resizeViewToFitWindow(); - return noErr; - } - - void createNewHIView() - { - jassert (viewRef == 0); - - if (viewClassRef == 0) - { - // Register our HIView class - EventTypeSpec viewEvents[] = - { - { kEventClassHIObject, kEventHIObjectConstruct }, - { kEventClassHIObject, kEventHIObjectInitialize }, - { kEventClassHIObject, kEventHIObjectDestruct }, - { kEventClassControl, kEventControlInitialize }, - { kEventClassControl, kEventControlDraw }, - { kEventClassControl, kEventControlBoundsChanged }, - { kEventClassControl, kEventControlSetFocusPart }, - { kEventClassControl, kEventControlHitTest }, - { kEventClassControl, kEventControlDragEnter }, - { kEventClassControl, kEventControlDragLeave }, - { kEventClassControl, kEventControlDragWithin }, - { kEventClassControl, kEventControlDragReceive }, - { kEventClassControl, kEventControlOwningWindowChanged } - }; - - UnsignedWide t; - Microseconds (&t); - const String randomString ((int) (t.lo & 0x7ffffff)); - const String juceHiViewClassName (T("JUCEHIViewClass_") + randomString); - juceHiViewClassNameCFString = PlatformUtilities::juceStringToCFString (juceHiViewClassName); - - HIObjectRegisterSubclass (juceHiViewClassNameCFString, - kHIViewClassID, 0, - NewEventHandlerUPP (hiViewEventHandler), - GetEventTypeCount (viewEvents), - viewEvents, 0, - &viewClassRef); - } - - EventRef event; - CreateEvent (0, kEventClassHIObject, kEventHIObjectInitialize, GetCurrentEventTime(), kEventAttributeNone, &event); - - void* thisPointer = this; - SetEventParameter (event, 'peer', typeVoidPtr, sizeof (void*), &thisPointer); - - HIObjectCreate (juceHiViewClassNameCFString, event, (HIObjectRef*) &viewRef); - - SetControlDragTrackingEnabled (viewRef, true); - - if (isSharedWindow) - { - setBounds (component->getX(), component->getY(), - component->getWidth(), component->getHeight(), false); - } - } -}; - -//============================================================================== -bool juce_isHIViewCreatedByJuce (HIViewRef view) -{ - return juceHiViewClassNameCFString != 0 - && HIObjectIsOfClass ((HIObjectRef) view, juceHiViewClassNameCFString); -} - -bool juce_isWindowCreatedByJuce (WindowRef window) -{ - for (int i = ComponentPeer::getNumPeers(); --i >= 0;) - if (ComponentPeer::getPeer(i)->getNativeHandle() == window) - return true; - - return false; -} - -static void trackNextMouseEvent() -{ - UInt32 mods; - MouseTrackingResult result; - ::Point where; - - if (TrackMouseLocationWithOptions ((GrafPtr) -1, 0, 0.01, //kEventDurationForever, - &where, &mods, &result) != noErr - || ! ComponentPeer::isValidPeer (juce_currentMouseTrackingPeer)) - { - juce_currentMouseTrackingPeer = 0; - return; - } - - if (result == kMouseTrackingTimedOut) - return; - -#if MACOS_10_3_OR_EARLIER - const int x = where.h - juce_currentMouseTrackingPeer->getScreenX(); - const int y = where.v - juce_currentMouseTrackingPeer->getScreenY(); -#else - HIPoint p; - p.x = where.h; - p.y = where.v; - HIPointConvert (&p, kHICoordSpaceScreenPixel, 0, - kHICoordSpaceView, ((HIViewComponentPeer*) juce_currentMouseTrackingPeer)->viewRef); - const int x = p.x; - const int y = p.y; -#endif - - if (result == kMouseTrackingMouseDragged) - { - updateModifiers (0); - juce_currentMouseTrackingPeer->handleMouseDrag (x, y, getEventTime (0)); - - if (! ComponentPeer::isValidPeer (juce_currentMouseTrackingPeer)) - { - juce_currentMouseTrackingPeer = 0; - return; - } - } - else if (result == kMouseTrackingMouseUp - || result == kMouseTrackingUserCancelled - || result == kMouseTrackingMouseMoved) - { - ComponentPeer* const oldPeer = juce_currentMouseTrackingPeer; - juce_currentMouseTrackingPeer = 0; - - if (ComponentPeer::isValidPeer (oldPeer)) - { - const int oldModifiers = currentModifiers; - currentModifiers &= ~(ModifierKeys::leftButtonModifier | ModifierKeys::rightButtonModifier | ModifierKeys::middleButtonModifier); - updateModifiers (0); - - oldPeer->handleMouseUp (oldModifiers, x, y, getEventTime (0)); - } - } -} - -bool juce_dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages) -{ - if (juce_currentMouseTrackingPeer != 0) - trackNextMouseEvent(); - -/* [[NSRunLoop mainRunLoop] acceptInputForMode: NSDefaultRunLoopMode - beforeDate: returnIfNoPendingMessages - ? [[NSDate date] addTimeInterval: 0.01] - : [NSDate distantFuture]]; -*/ - EventRef theEvent; - - if (ReceiveNextEvent (0, 0, (returnIfNoPendingMessages) ? kEventDurationNoWait - : kEventDurationForever, - true, &theEvent) == noErr) - { - if (GetEventClass (theEvent) == kEventClassAppleEvent) - { - EventRecord eventRec; - if (ConvertEventRefToEventRecord (theEvent, &eventRec)) - AEProcessAppleEvent (&eventRec); - } - else - { - EventTargetRef theTarget = GetEventDispatcherTarget(); - SendEventToEventTarget (theEvent, theTarget); - } - - ReleaseEvent (theEvent); - return true; - } - - return false; -} - -//============================================================================== -ComponentPeer* Component::createNewPeer (int styleFlags, void* windowToAttachTo) -{ - return new HIViewComponentPeer (this, styleFlags, (HIViewRef) windowToAttachTo); -} - -//============================================================================== -void MouseCheckTimer::timerCallback() -{ - if (ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown()) - return; - - if (Process::isForegroundProcess()) - { - bool stillOver = false; - int x = 0, y = 0, w = 0, h = 0; - int mx = 0, my = 0; - const bool validWindow = ComponentPeer::isValidPeer (lastPeerUnderMouse); - - if (validWindow) - { - lastPeerUnderMouse->getBounds (x, y, w, h, true); - Desktop::getMousePosition (mx, my); - - stillOver = (mx >= x && my >= y && mx < x + w && my < y + h); - - if (stillOver) - { - // check if it's over an embedded HIView - int rx = mx, ry = my; - lastPeerUnderMouse->globalPositionToRelative (rx, ry); - HIPoint hipoint; - hipoint.x = rx; - hipoint.y = ry; - - HIViewRef root; - GetRootControl ((WindowRef) lastPeerUnderMouse->getNativeHandle(), &root); - - HIViewRef hitview; - if (HIViewGetSubviewHit (root, &hipoint, true, &hitview) == noErr && hitview != 0) - { - stillOver = HIObjectIsOfClass ((HIObjectRef) hitview, juceHiViewClassNameCFString); - } - } - } - - if (! stillOver) - { - // mouse is outside our windows so set a normal cursor (only - // if we're running as an app, not a plugin) - if (JUCEApplication::getInstance() != 0) - SetThemeCursor (kThemeArrowCursor); - - if (validWindow) - lastPeerUnderMouse->handleMouseExit (mx - x, my - y, Time::currentTimeMillis()); - - if (hasEverHadAMouseMove) - stopTimer(); - } - - if ((! hasEverHadAMouseMove) && validWindow - && (mx != lastX || my != lastY)) - { - lastX = mx; - lastY = my; - - if (stillOver) - lastPeerUnderMouse->handleMouseMove (mx - x, my - y, Time::currentTimeMillis()); - } - } -} - -//============================================================================== -// called from juce_Messaging.cpp -void juce_HandleProcessFocusChange() -{ - keysCurrentlyDown.clear(); - - if (HIViewComponentPeer::isValidPeer (currentlyFocusedPeer)) - { - if (Process::isForegroundProcess()) - currentlyFocusedPeer->handleFocusGain(); - else - currentlyFocusedPeer->handleFocusLoss(); - } -} - -static bool performDrag (DragRef drag) -{ - EventRecord event; - event.what = mouseDown; - event.message = 0; - event.when = TickCount(); - - int x, y; - Desktop::getMousePosition (x, y); - event.where.h = x; - event.where.v = y; - - event.modifiers = GetCurrentKeyModifiers(); - - RgnHandle rgn = NewRgn(); - RgnHandle rgn2 = NewRgn(); - SetRectRgn (rgn, - event.where.h - 8, event.where.v - 8, - event.where.h + 8, event.where.v + 8); - CopyRgn (rgn, rgn2); - InsetRgn (rgn2, 1, 1); - DiffRgn (rgn, rgn2, rgn); - DisposeRgn (rgn2); - - bool result = TrackDrag (drag, &event, rgn) == noErr; - - DisposeRgn (rgn); - return result; -} - -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles) -{ - for (int i = ComponentPeer::getNumPeers(); --i >= 0;) - ComponentPeer::getPeer (i)->performAnyPendingRepaintsNow(); - - DragRef drag; - bool result = false; - - if (NewDrag (&drag) == noErr) - { - for (int i = 0; i < files.size(); ++i) - { - HFSFlavor hfsData; - - if (PlatformUtilities::makeFSSpecFromPath (&hfsData.fileSpec, files[i])) - { - FInfo info; - if (FSpGetFInfo (&hfsData.fileSpec, &info) == noErr) - { - hfsData.fileType = info.fdType; - hfsData.fileCreator = info.fdCreator; - hfsData.fdFlags = info.fdFlags; - - AddDragItemFlavor (drag, i + 1, kDragFlavorTypeHFS, &hfsData, sizeof (hfsData), 0); - result = true; - } - } - } - - SetDragAllowableActions (drag, canMoveFiles ? kDragActionAll - : kDragActionCopy, false); - - if (result) - result = performDrag (drag); - - DisposeDrag (drag); - } - - return result; -} - -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) -{ - jassertfalse // not implemented! - return false; -} - - -//============================================================================== -bool Process::isForegroundProcess() throw() -{ - ProcessSerialNumber psn, front; - GetCurrentProcess (&psn); - GetFrontProcess (&front); - - Boolean b; - return (SameProcess (&psn, &front, &b) == noErr) && b; -} - -//============================================================================== -bool Desktop::canUseSemiTransparentWindows() throw() -{ - return true; -} - - -//============================================================================== -void Desktop::getMousePosition (int& x, int& y) throw() -{ - CGrafPtr currentPort; - GetPort (¤tPort); - - if (! IsValidPort (currentPort)) - { - WindowRef front = FrontWindow(); - - if (front != 0) - { - SetPortWindowPort (front); - } - else - { - x = y = 0; - return; - } - } - - ::Point p; - GetMouse (&p); - LocalToGlobal (&p); - x = p.h; - y = p.v; - - SetPort (currentPort); -} - -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); -} - -const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() throw() -{ - return ModifierKeys (currentModifiers); -} - -//============================================================================== -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; -} - -//============================================================================== -void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() -{ - int mainMonitorIndex = 0; - CGDirectDisplayID mainDisplayID = CGMainDisplayID(); - - CGDisplayCount count = 0; - CGDirectDisplayID disps [8]; - - if (CGGetOnlineDisplayList (numElementsInArray (disps), disps, &count) == noErr) - { - for (int i = 0; i < count; ++i) - { - if (mainDisplayID == disps[i]) - mainMonitorIndex = monitorCoords.size(); - - GDHandle hGDevice; - - if (clipToWorkArea - && DMGetGDeviceByDisplayID ((DisplayIDType) disps[i], &hGDevice, false) == noErr) - { - Rect rect; - GetAvailableWindowPositioningBounds (hGDevice, &rect); - - monitorCoords.add (Rectangle (rect.left, - rect.top, - rect.right - rect.left, - rect.bottom - rect.top)); - } - else - { - const CGRect r (CGDisplayBounds (disps[i])); - - monitorCoords.add (Rectangle ((int) r.origin.x, - (int) r.origin.y, - (int) r.size.width, - (int) r.size.height)); - } - } - } - - // make sure the first in the list is the main monitor - if (mainMonitorIndex > 0) - monitorCoords.swap (mainMonitorIndex, 0); - - jassert (monitorCoords.size() > 0); - - if (monitorCoords.size() == 0) - monitorCoords.add (Rectangle (0, 0, 1024, 768)); -} - -//============================================================================== -static NSImage* juceImageToNSImage (const Image& image) -{ - 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); - [im autorelease]; - - NSPoint hs; - hs.x = (int) hotspotX; - hs.y = (int) hotspotY; - - NSCursor* c = [[NSCursor alloc] initWithImage: im hotSpot: hs]; - 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() -{ - 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(); - - if (c != 0) - [c set]; -} - - -//============================================================================== -Image* juce_createIconForFile (const File& file) -{ - return 0; -} - - -//============================================================================== -class MainMenuHandler; -static MainMenuHandler* mainMenu = 0; - -class MainMenuHandler : private MenuBarModelListener, - private DeletedAtShutdown -{ -public: - MainMenuHandler() throw() - : currentModel (0) - { - } - - ~MainMenuHandler() throw() - { - setMenu (0); - - jassert (mainMenu == this); - mainMenu = 0; - } - - 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 menuBarItemsChanged (MenuBarModel*) - { - ClearMenuBar(); - - if (currentModel != 0) - { - int menuId = 1000; - const StringArray menuNames (currentModel->getMenuBarNames()); - - for (int i = 0; i < menuNames.size(); ++i) - { - const PopupMenu menu (currentModel->getMenuForIndex (i, menuNames [i])); - - MenuRef m = createMenu (menu, menuNames [i], menuId, i); - - InsertMenu (m, 0); - CFRelease (m); - } - } - } - - void menuCommandInvoked (MenuBarModel*, const ApplicationCommandTarget::InvocationInfo& info) - { - MenuRef menu = 0; - MenuItemIndex index = 0; - GetIndMenuItemWithCommandID (0, info.commandID, 1, &menu, &index); - - if (menu != 0) - { - FlashMenuBar (GetMenuID (menu)); - FlashMenuBar (GetMenuID (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: - static MenuRef createMenu (const PopupMenu menu, - const String& menuName, - int& id, - const int topLevelIndex) - { - MenuRef m = 0; - - if (CreateNewMenu (id++, kMenuAttrAutoDisable, &m) == noErr) - { - CFStringRef name = PlatformUtilities::juceStringToCFString (menuName); - SetMenuTitleWithCFString (m, name); - CFRelease (name); - - PopupMenu::MenuItemIterator iter (menu); - - while (iter.next()) - { - MenuItemIndex index = 0; - - int flags = kMenuAttrAutoDisable | kMenuItemAttrIgnoreMeta | kMenuItemAttrNotPreviousAlternate; - if (! iter.isEnabled) - flags |= kMenuItemAttrDisabled; - - CFStringRef text = PlatformUtilities::juceStringToCFString (iter.itemName.upToFirstOccurrenceOf (T(""), false, true)); - - if (iter.isSeparator) - { - AppendMenuItemTextWithCFString (m, text, kMenuItemAttrSeparator, 0, &index); - } - else if (iter.isSectionHeader) - { - AppendMenuItemTextWithCFString (m, text, kMenuItemAttrSectionHeader, 0, &index); - } - else if (iter.subMenu != 0) - { - AppendMenuItemTextWithCFString (m, text, flags, id++, &index); - - MenuRef sub = createMenu (*iter.subMenu, iter.itemName, id, topLevelIndex); - SetMenuItemHierarchicalMenu (m, index, sub); - CFRelease (sub); - } - else - { - AppendMenuItemTextWithCFString (m, text, flags, iter.itemId, &index); - - if (iter.isTicked) - CheckMenuItem (m, index, true); - - SetMenuItemProperty (m, index, 'juce', 'apcm', sizeof (void*), &iter.commandManager); - SetMenuItemProperty (m, index, 'juce', 'topi', sizeof (int), &topLevelIndex); - - if (iter.commandManager != 0) - { - const Array keyPresses (iter.commandManager->getKeyMappings() - ->getKeyPressesAssignedToCommand (iter.itemId)); - - if (keyPresses.size() > 0) - { - const KeyPress& kp = keyPresses.getReference(0); - int mods = 0; - - if (kp.getModifiers().isShiftDown()) - mods |= kMenuShiftModifier; - if (kp.getModifiers().isCtrlDown()) - mods |= kMenuControlModifier; - if (kp.getModifiers().isAltDown()) - mods |= kMenuOptionModifier; - if (! kp.getModifiers().isCommandDown()) - mods |= kMenuNoCommandModifier; - - tchar keyCode = (tchar) kp.getKeyCode(); - - if (kp.getKeyCode() >= KeyPress::numberPad0 - && kp.getKeyCode() <= KeyPress::numberPad9) - { - keyCode = (tchar) ((T('0') - KeyPress::numberPad0) + kp.getKeyCode()); - } - - SetMenuItemCommandKey (m, index, true, 255); - - if (CharacterFunctions::isLetterOrDigit (keyCode) - || CharacterFunctions::indexOfChar (T(",.;/\\'[]=-+_<>?{}\":"), keyCode, false) >= 0) - { - SetMenuItemModifiers (m, index, mods); - SetMenuItemCommandKey (m, index, false, CharacterFunctions::toUpperCase (keyCode)); - } - else - { - const SInt16 glyph = getGlyphForKeyCode (kp.getKeyCode()); - - if (glyph != 0) - { - SetMenuItemModifiers (m, index, mods); - SetMenuItemKeyGlyph (m, index, glyph); - } - } - - // if we set the key glyph to be a text char, and enable virtual - // key triggering, it stops the menu automatically triggering the callback - ChangeMenuItemAttributes (m, index, kMenuItemAttrUseVirtualKey, 0); - } - } - } - - CFRelease (text); - } - } - - return m; - } - - static SInt16 getGlyphForKeyCode (const int keyCode) throw() - { - if (keyCode == KeyPress::spaceKey) - return kMenuSpaceGlyph; - else if (keyCode == KeyPress::returnKey) - return kMenuReturnGlyph; - else if (keyCode == KeyPress::escapeKey) - return kMenuEscapeGlyph; - else if (keyCode == KeyPress::backspaceKey) - return kMenuDeleteLeftGlyph; - else if (keyCode == KeyPress::leftKey) - return kMenuLeftArrowGlyph; - else if (keyCode == KeyPress::rightKey) - return kMenuRightArrowGlyph; - else if (keyCode == KeyPress::upKey) - return kMenuUpArrowGlyph; - else if (keyCode == KeyPress::downKey) - return kMenuDownArrowGlyph; - else if (keyCode == KeyPress::pageUpKey) - return kMenuPageUpGlyph; - else if (keyCode == KeyPress::pageDownKey) - return kMenuPageDownGlyph; - else if (keyCode == KeyPress::endKey) - return kMenuSoutheastArrowGlyph; - else if (keyCode == KeyPress::homeKey) - return kMenuNorthwestArrowGlyph; - else if (keyCode == KeyPress::deleteKey) - return kMenuDeleteRightGlyph; - else if (keyCode == KeyPress::tabKey) - return kMenuTabRightGlyph; - else if (keyCode == KeyPress::F1Key) - return kMenuF1Glyph; - else if (keyCode == KeyPress::F2Key) - return kMenuF2Glyph; - else if (keyCode == KeyPress::F3Key) - return kMenuF3Glyph; - else if (keyCode == KeyPress::F4Key) - return kMenuF4Glyph; - else if (keyCode == KeyPress::F5Key) - return kMenuF5Glyph; - else if (keyCode == KeyPress::F6Key) - return kMenuF6Glyph; - else if (keyCode == KeyPress::F7Key) - return kMenuF7Glyph; - else if (keyCode == KeyPress::F8Key) - return kMenuF8Glyph; - else if (keyCode == KeyPress::F9Key) - return kMenuF9Glyph; - else if (keyCode == KeyPress::F10Key) - return kMenuF10Glyph; - else if (keyCode == KeyPress::F11Key) - return kMenuF11Glyph; - else if (keyCode == KeyPress::F12Key) - return kMenuF12Glyph; - else if (keyCode == KeyPress::F13Key) - return kMenuF13Glyph; - else if (keyCode == KeyPress::F14Key) - return kMenuF14Glyph; - else if (keyCode == KeyPress::F15Key) - return kMenuF15Glyph; - - return 0; - } -}; - -void MenuBarModel::setMacMainMenu (MenuBarModel* newMenuBarModel) throw() -{ - if (getMacMainMenu() != newMenuBarModel) - { - if (newMenuBarModel == 0) - { - delete mainMenu; - jassert (mainMenu == 0); // should be zeroed in the destructor - } - else - { - if (mainMenu == 0) - mainMenu = new MainMenuHandler(); - - mainMenu->setMenu (newMenuBarModel); - } - } -} - -MenuBarModel* MenuBarModel::getMacMainMenu() throw() -{ - return mainMenu != 0 ? mainMenu->currentModel : 0; -} - -// these functions are called externally from the message handling code -void juce_MainMenuAboutToBeUsed() -{ - // force an update of the items just before the menu appears.. - if (mainMenu != 0) - mainMenu->menuBarItemsChanged (0); -} - -void juce_InvokeMainMenuCommand (const HICommand& command) -{ - if (mainMenu != 0) - { - ApplicationCommandManager* commandManager = 0; - int topLevelIndex = 0; - - if (GetMenuItemProperty (command.menu.menuRef, command.menu.menuItemIndex, - 'juce', 'apcm', sizeof (commandManager), 0, &commandManager) == noErr - && GetMenuItemProperty (command.menu.menuRef, command.menu.menuItemIndex, - 'juce', 'topi', sizeof (topLevelIndex), 0, &topLevelIndex) == noErr) - { - mainMenu->invoke (command.commandID, commandManager, topLevelIndex); - } - } -} - -//============================================================================== -void PlatformUtilities::beep() -{ - SysBeep (30); -} - -//============================================================================== -void SystemClipboard::copyTextToClipboard (const String& text) throw() -{ - ClearCurrentScrap(); - ScrapRef ref; - GetCurrentScrap (&ref); - - const int len = text.length(); - const int numBytes = sizeof (UniChar) * len; - UniChar* const temp = (UniChar*) juce_calloc (numBytes); - - for (int i = 0; i < len; ++i) - temp[i] = (UniChar) text[i]; - - PutScrapFlavor (ref, - kScrapFlavorTypeUnicode, - kScrapFlavorMaskNone, - numBytes, - temp); - - juce_free (temp); -} - -const String SystemClipboard::getTextFromClipboard() throw() -{ - String result; - - ScrapRef ref; - GetCurrentScrap (&ref); - Size size = 0; - - if (GetScrapFlavorSize (ref, kScrapFlavorTypeUnicode, &size) == noErr - && size > 0) - { - void* const data = juce_calloc (size + 8); - - if (GetScrapFlavorData (ref, kScrapFlavorTypeUnicode, &size, data) == noErr) - { - result = PlatformUtilities::convertUTF16ToString ((UniChar*) data); - } - - juce_free (data); - } - - return result; -} - - -//============================================================================== -bool AlertWindow::showNativeDialogBox (const String& title, - const String& bodyText, - bool isOkCancel) -{ - Str255 tit, txt; - PlatformUtilities::copyToStr255 (tit, title); - PlatformUtilities::copyToStr255 (txt, bodyText); - - AlertStdAlertParamRec ar; - ar.movable = true; - ar.helpButton = false; - ar.filterProc = 0; - ar.defaultText = (const unsigned char*)-1; - ar.cancelText = (const unsigned char*)((isOkCancel) ? -1 : 0); - ar.otherText = 0; - ar.defaultButton = kAlertStdAlertOKButton; - ar.cancelButton = 0; - ar.position = kWindowDefaultPosition; - - SInt16 result; - StandardAlert (kAlertNoteAlert, tit, txt, &ar, &result); - return result == kAlertStdAlertOKButton; -} - -//============================================================================== -const int KeyPress::spaceKey = ' '; -const int KeyPress::returnKey = kReturnCharCode; -const int KeyPress::escapeKey = kEscapeCharCode; -const int KeyPress::backspaceKey = kBackspaceCharCode; -const int KeyPress::leftKey = kLeftArrowCharCode; -const int KeyPress::rightKey = kRightArrowCharCode; -const int KeyPress::upKey = kUpArrowCharCode; -const int KeyPress::downKey = kDownArrowCharCode; -const int KeyPress::pageUpKey = kPageUpCharCode; -const int KeyPress::pageDownKey = kPageDownCharCode; -const int KeyPress::endKey = kEndCharCode; -const int KeyPress::homeKey = kHomeCharCode; -const int KeyPress::deleteKey = kDeleteCharCode; -const int KeyPress::insertKey = -1; -const int KeyPress::tabKey = kTabCharCode; -const int KeyPress::F1Key = 0x10110; -const int KeyPress::F2Key = 0x10111; -const int KeyPress::F3Key = 0x10112; -const int KeyPress::F4Key = 0x10113; -const int KeyPress::F5Key = 0x10114; -const int KeyPress::F6Key = 0x10115; -const int KeyPress::F7Key = 0x10116; -const int KeyPress::F8Key = 0x10117; -const int KeyPress::F9Key = 0x10118; -const int KeyPress::F10Key = 0x10119; -const int KeyPress::F11Key = 0x1011a; -const int KeyPress::F12Key = 0x1011b; -const int KeyPress::F13Key = 0x1011c; -const int KeyPress::F14Key = 0x1011d; -const int KeyPress::F15Key = 0x1011e; -const int KeyPress::F16Key = 0x1011f; -const int KeyPress::numberPad0 = 0x30020; -const int KeyPress::numberPad1 = 0x30021; -const int KeyPress::numberPad2 = 0x30022; -const int KeyPress::numberPad3 = 0x30023; -const int KeyPress::numberPad4 = 0x30024; -const int KeyPress::numberPad5 = 0x30025; -const int KeyPress::numberPad6 = 0x30026; -const int KeyPress::numberPad7 = 0x30027; -const int KeyPress::numberPad8 = 0x30028; -const int KeyPress::numberPad9 = 0x30029; -const int KeyPress::numberPadAdd = 0x3002a; -const int KeyPress::numberPadSubtract = 0x3002b; -const int KeyPress::numberPadMultiply = 0x3002c; -const int KeyPress::numberPadDivide = 0x3002d; -const int KeyPress::numberPadSeparator = 0x3002e; -const int KeyPress::numberPadDecimalPoint = 0x3002f; -const int KeyPress::numberPadEquals = 0x30030; -const int KeyPress::numberPadDelete = 0x30031; -const int KeyPress::playKey = 0x30000; -const int KeyPress::stopKey = 0x30001; -const int KeyPress::fastForwardKey = 0x30002; -const int KeyPress::rewindKey = 0x30003; - - -//============================================================================== -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 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() -{ - 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; - - static const char buttonPatterns[] = - { - 14, 7, 6, 5, 14, 7, 6, 5, 0, - 14, 8, 6, 5, 14, 8, 6, 5, 0, - 14, 12, 11, 6, 5, 0, - 14, 13, 11, 6, 5, 0, - 14, 9, 6, 5, 14, 9, 6, 5, 0, - 14, 10, 6, 5, 14, 10, 6, 5, 0, - 14, 6, 5, 4, 2, 0, - 14, 6, 5, 3, 2, 0, - 14, 6, 5, 14, 6, 5, 0, - 18, 14, 6, 5, 18, 14, 6, 5, 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; - } -} - - -//============================================================================== -#if JUCE_OPENGL - -//============================================================================== -class WindowedGLContext : public OpenGLContext -{ -public: - WindowedGLContext (Component* const component, - const OpenGLPixelFormat& pixelFormat_, - AGLContext sharedContext) - : renderContext (0), - pixelFormat (pixelFormat_) - { - jassert (component != 0); - - HIViewComponentPeer* const peer = dynamic_cast (component->getTopLevelComponent()->getPeer()); - if (peer == 0) - return; - - GLint attribs [64]; - int n = 0; - attribs[n++] = AGL_RGBA; - attribs[n++] = AGL_DOUBLEBUFFER; - attribs[n++] = AGL_ACCELERATED; - attribs[n++] = AGL_RED_SIZE; - attribs[n++] = pixelFormat.redBits; - attribs[n++] = AGL_GREEN_SIZE; - attribs[n++] = pixelFormat.greenBits; - attribs[n++] = AGL_BLUE_SIZE; - attribs[n++] = pixelFormat.blueBits; - attribs[n++] = AGL_ALPHA_SIZE; - attribs[n++] = pixelFormat.alphaBits; - attribs[n++] = AGL_DEPTH_SIZE; - attribs[n++] = pixelFormat.depthBufferBits; - attribs[n++] = AGL_STENCIL_SIZE; - attribs[n++] = pixelFormat.stencilBufferBits; - attribs[n++] = AGL_ACCUM_RED_SIZE; - attribs[n++] = pixelFormat.accumulationBufferRedBits; - attribs[n++] = AGL_ACCUM_GREEN_SIZE; - attribs[n++] = pixelFormat.accumulationBufferGreenBits; - attribs[n++] = AGL_ACCUM_BLUE_SIZE; - attribs[n++] = pixelFormat.accumulationBufferBlueBits; - attribs[n++] = AGL_ACCUM_ALPHA_SIZE; - attribs[n++] = pixelFormat.accumulationBufferAlphaBits; - - // xxx not sure how to do fullSceneAntiAliasingNumSamples.. - - attribs[n++] = AGL_SAMPLE_BUFFERS_ARB; - attribs[n++] = 1; - attribs[n++] = AGL_SAMPLES_ARB; - attribs[n++] = 4; - attribs[n++] = AGL_CLOSEST_POLICY; - attribs[n++] = AGL_NO_RECOVERY; - attribs[n++] = AGL_NONE; - - renderContext = aglCreateContext (aglChoosePixelFormat (0, 0, attribs), - sharedContext); - - aglSetDrawable (renderContext, GetWindowPort (peer->windowRef)); - } - - ~WindowedGLContext() - { - makeInactive(); - aglSetDrawable (renderContext, 0); - aglDestroyContext (renderContext); - } - - bool makeActive() const throw() - { - jassert (renderContext != 0); - - return aglSetCurrentContext (renderContext); - } - - bool makeInactive() const throw() - { - return (! isActive()) || aglSetCurrentContext (0); - } - - bool isActive() const throw() - { - return aglGetCurrentContext() == 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) - { - GLint bufferRect[4]; - bufferRect[0] = x; - bufferRect[1] = outerWindowHeight - (y + h); - bufferRect[2] = w; - bufferRect[3] = h; - - aglSetInteger (renderContext, AGL_BUFFER_RECT, bufferRect); - aglEnable (renderContext, AGL_BUFFER_RECT); - } - - void swapBuffers() - { - aglSwapBuffers (renderContext); - } - - bool setSwapInterval (const int numFramesPerSwap) - { - return aglSetInteger (renderContext, AGL_SWAP_INTERVAL, (const GLint*) &numFramesPerSwap); - } - - int getSwapInterval() const - { - GLint numFrames = 0; - aglGetInteger (renderContext, AGL_SWAP_INTERVAL, &numFrames); - return numFrames; - } - - void repaint() - { - } - - //============================================================================== - juce_UseDebuggingNewOperator - - AGLContext renderContext; - -private: - OpenGLPixelFormat pixelFormat; - - //============================================================================== - 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 ? (AGLContext) contextToShareWith->getRawContext() : 0); - - if (c->renderContext == 0) - deleteAndZero (c); - - return c; -} - -void juce_glViewport (const int w, const int h) -{ - glViewport (0, 0, w, h); -} - -static int getAGLAttribute (AGLPixelFormat p, const GLint attrib) -{ - GLint result = 0; - aglDescribePixelFormat (p, attrib, &result); - return result; -} - -void OpenGLPixelFormat::getAvailablePixelFormats (Component* /*component*/, - OwnedArray & 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); - } -} - - -#endif - -END_JUCE_NAMESPACE diff --git a/build/win32/platform_specific_code/juce_win32_ASIO.cpp b/build/win32/platform_specific_code/juce_win32_ASIO.cpp index 81043ec29d..eee14d1fac 100644 --- a/build/win32/platform_specific_code/juce_win32_ASIO.cpp +++ b/build/win32/platform_specific_code/juce_win32_ASIO.cpp @@ -29,56 +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 && JUCE_ASIO + #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" - - //============================================================================== // #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 diff --git a/build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp b/build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp new file mode 100644 index 0000000000..51e757da1b --- /dev/null +++ b/build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp @@ -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 (peer) != 0); + + if (dynamic_cast (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 diff --git a/build/win32/platform_specific_code/juce_win32_AudioCDReader.cpp b/build/win32/platform_specific_code/juce_win32_AudioCDReader.cpp index 4dcdc17de3..d6ce635bfa 100644 --- a/build/win32/platform_specific_code/juce_win32_AudioCDReader.cpp +++ b/build/win32/platform_specific_code/juce_win32_AudioCDReader.cpp @@ -29,37 +29,10 @@ ============================================================================== */ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE && JUCE_USE_CDBURNER -#include "win32_headers.h" -#include - -#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 - #include -#endif - -#include "../../../src/juce_core/basics/juce_StandardHeader.h" - -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 diff --git a/build/win32/platform_specific_code/juce_win32_DirectSound.cpp b/build/win32/platform_specific_code/juce_win32_DirectSound.cpp index bf5158186c..31e52dd956 100644 --- a/build/win32/platform_specific_code/juce_win32_DirectSound.cpp +++ b/build/win32/platform_specific_code/juce_win32_DirectSound.cpp @@ -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 diff --git a/build/win32/platform_specific_code/juce_win32_DynamicLibraryLoader.cpp b/build/win32/platform_specific_code/juce_win32_DynamicLibraryLoader.cpp index f191fd5342..e244035e21 100644 --- a/build/win32/platform_specific_code/juce_win32_DynamicLibraryLoader.cpp +++ b/build/win32/platform_specific_code/juce_win32_DynamicLibraryLoader.cpp @@ -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 diff --git a/build/win32/platform_specific_code/juce_win32_FileChooser.cpp b/build/win32/platform_specific_code/juce_win32_FileChooser.cpp index 131f8102a1..8a77924918 100644 --- a/build/win32/platform_specific_code/juce_win32_FileChooser.cpp +++ b/build/win32/platform_specific_code/juce_win32_FileChooser.cpp @@ -29,25 +29,10 @@ ============================================================================== */ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE -#include "win32_headers.h" -#include - -#include "../../../src/juce_core/basics/juce_StandardHeader.h" - -BEGIN_JUCE_NAMESPACE - -#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& results, } } -END_JUCE_NAMESPACE +#endif diff --git a/build/win32/platform_specific_code/juce_win32_Files.cpp b/build/win32/platform_specific_code/juce_win32_Files.cpp index e730354be7..2c1314d47e 100644 --- a/build/win32/platform_specific_code/juce_win32_Files.cpp +++ b/build/win32/platform_specific_code/juce_win32_Files.cpp @@ -29,21 +29,12 @@ ============================================================================== */ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE -#include "win32_headers.h" -#include "../../../src/juce_core/basics/juce_StandardHeader.h" - -#include - -#ifndef _WIN32_IE - #define _WIN32_IE 0x0400 -#endif -#include +//============================================================================== #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 }; - - if (WaitForMultipleObjects (2, handles, FALSE, - timeOutMilliseconds >= 0 ? timeOutMilliseconds - : INFINITE) == WAIT_OBJECT_0) + DWORD waitResult = WaitForMultipleObjects (2, handles, FALSE, + timeOutMilliseconds >= 0 ? timeOutMilliseconds + : INFINITE); + if (waitResult != WAIT_OBJECT_0) { - if (GetOverlappedResult (intern->pipeH, &over, &numRead, FALSE)) - { - bytesRead = (int) numRead; - } - else if (GetLastError() == ERROR_BROKEN_PIPE && intern->createdPipe) - { - intern->disconnect(); - waitAgain = true; - } + // if the operation timed out, let's cancel it... + CancelIo (intern->pipeH); + WaitForSingleObject (over.hEvent, INFINITE); // makes sure cancel is complete + } + + if (GetOverlappedResult (intern->pipeH, &over, &numRead, FALSE)) + { + 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; - if (WaitForMultipleObjects (2, handles, FALSE, timeOutMilliseconds >= 0 ? timeOutMilliseconds - : INFINITE) == WAIT_OBJECT_0) + waitResult = WaitForMultipleObjects (2, handles, FALSE, + timeOutMilliseconds >= 0 ? timeOutMilliseconds + : INFINITE); + + 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 diff --git a/build/win32/platform_specific_code/juce_win32_Fonts.cpp b/build/win32/platform_specific_code/juce_win32_Fonts.cpp index 7c201903c8..2980bba299 100644 --- a/build/win32/platform_specific_code/juce_win32_Fonts.cpp +++ b/build/win32/platform_specific_code/juce_win32_Fonts.cpp @@ -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 diff --git a/build/win32/platform_specific_code/juce_win32_Messaging.cpp b/build/win32/platform_specific_code/juce_win32_Messaging.cpp index c953ed5088..6e7333b74c 100644 --- a/build/win32/platform_specific_code/juce_win32_Messaging.cpp +++ b/build/win32/platform_specific_code/juce_win32_Messaging.cpp @@ -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 diff --git a/build/win32/platform_specific_code/juce_win32_Midi.cpp b/build/win32/platform_specific_code/juce_win32_Midi.cpp index da89220d82..c0896629e3 100644 --- a/build/win32/platform_specific_code/juce_win32_Midi.cpp +++ b/build/win32/platform_specific_code/juce_win32_Midi.cpp @@ -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 activeMidiThreads; +using ::free; + class MidiInThread : public Thread { public: @@ -644,4 +633,4 @@ void MidiOutput::sendMessageNow (const MidiMessage& message) } } -END_JUCE_NAMESPACE +#endif diff --git a/build/win32/platform_specific_code/juce_win32_Misc.cpp b/build/win32/platform_specific_code/juce_win32_Misc.cpp index cabbe0e6f6..8bdb2c675e 100644 --- a/build/win32/platform_specific_code/juce_win32_Misc.cpp +++ b/build/win32/platform_specific_code/juce_win32_Misc.cpp @@ -29,44 +29,12 @@ ============================================================================== */ -#include "win32_headers.h" - -#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" +// (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 -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 diff --git a/build/win32/platform_specific_code/juce_win32_NativeIncludes.h b/build/win32/platform_specific_code/juce_win32_NativeIncludes.h new file mode 100644 index 0000000000..bb3a7c5895 --- /dev/null +++ b/build/win32/platform_specific_code/juce_win32_NativeIncludes.h @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if JUCE_OPENGL + #include +#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 + #include +#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 + #include + #include + #include + #include + + /* 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 + #import +#endif + +//============================================================================== +#ifdef _MSC_VER + #pragma warning (pop) +#endif + +#endif // __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__ diff --git a/build/win32/platform_specific_code/juce_win32_Network.cpp b/build/win32/platform_specific_code/juce_win32_Network.cpp index c281b551bb..d6e3853d1d 100644 --- a/build/win32/platform_specific_code/juce_win32_Network.cpp +++ b/build/win32/platform_specific_code/juce_win32_Network.cpp @@ -29,35 +29,15 @@ ============================================================================== */ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE -#include "win32_headers.h" -#include -#include -#include -#include -#include "../../../src/juce_core/basics/juce_StandardHeader.h" - -BEGIN_JUCE_NAMESPACE - -#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 diff --git a/build/win32/platform_specific_code/juce_win32_PlatformUtils.cpp b/build/win32/platform_specific_code/juce_win32_PlatformUtils.cpp index 2cf4a874d8..d84871b75f 100644 --- a/build/win32/platform_specific_code/juce_win32_PlatformUtils.cpp +++ b/build/win32/platform_specific_code/juce_win32_PlatformUtils.cpp @@ -29,23 +29,9 @@ ============================================================================== */ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include "win32_headers.h" -#include -#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 diff --git a/build/win32/platform_specific_code/juce_win32_QuickTimeMovieComponent.cpp b/build/win32/platform_specific_code/juce_win32_QuickTimeMovieComponent.cpp new file mode 100644 index 0000000000..8e8a981653 --- /dev/null +++ b/build/win32/platform_specific_code/juce_win32_QuickTimeMovieComponent.cpp @@ -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 (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 diff --git a/build/win32/platform_specific_code/juce_win32_SystemStats.cpp b/build/win32/platform_specific_code/juce_win32_SystemStats.cpp index 168b5ffe6f..fcb8fff880 100644 --- a/build/win32/platform_specific_code/juce_win32_SystemStats.cpp +++ b/build/win32/platform_specific_code/juce_win32_SystemStats.cpp @@ -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 diff --git a/build/win32/platform_specific_code/juce_win32_Threads.cpp b/build/win32/platform_specific_code/juce_win32_Threads.cpp index 56a79fbc16..edc78ccdc7 100644 --- a/build/win32/platform_specific_code/juce_win32_Threads.cpp +++ b/build/win32/platform_specific_code/juce_win32_Threads.cpp @@ -29,34 +29,14 @@ ============================================================================== */ -#include "win32_headers.h" - -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) - #include -#endif - -#include -#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 diff --git a/build/win32/platform_specific_code/juce_win32_WebBrowserComponent.cpp b/build/win32/platform_specific_code/juce_win32_WebBrowserComponent.cpp index 83202d8b83..d2af8556a7 100644 --- a/build/win32/platform_specific_code/juce_win32_WebBrowserComponent.cpp +++ b/build/win32/platform_specific_code/juce_win32_WebBrowserComponent.cpp @@ -29,29 +29,9 @@ ============================================================================== */ -//============================================================================== -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include "win32_headers.h" -#include -#include -#include - -#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 diff --git a/build/win32/platform_specific_code/juce_win32_Windowing.cpp b/build/win32/platform_specific_code/juce_win32_Windowing.cpp index 74f38c73d5..839f071d8d 100644 --- a/build/win32/platform_specific_code/juce_win32_Windowing.cpp +++ b/build/win32/platform_specific_code/juce_win32_Windowing.cpp @@ -29,25 +29,12 @@ ============================================================================== */ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE -#include "win32_headers.h" -#include -#include -#include - -#if JUCE_OPENGL - #include -#endif - -#ifdef _MSC_VER - #pragma warning (pop) - #pragma warning (disable: 4312 4244) -#endif +//============================================================================== #undef GetSystemMetrics // multimon overrides this for some reason and causes a mess.. // these are in the windows SDK, but need to be repeated here for GCC.. @@ -61,35 +48,6 @@ #define WM_APPCOMMAND 0x0319 #endif - -#include "../../../src/juce_core/basics/juce_StandardHeader.h" - -BEGIN_JUCE_NAMESPACE - -#include "../../../src/juce_core/text/juce_StringArray.h" -#include "../../../src/juce_core/basics/juce_SystemStats.h" -#include "../../../src/juce_core/basics/juce_Singleton.h" -#include "../../../src/juce_core/threads/juce_Process.h" -#include "../../../src/juce_core/misc/juce_PlatformUtilities.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_appframework/gui/components/keyboard/juce_KeyPress.h" -#include "../../../src/juce_appframework/gui/components/mouse/juce_DragAndDropContainer.h" -#include "../../../src/juce_appframework/gui/components/juce_Desktop.h" -#include "../../../src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.h" -#include "../../../src/juce_appframework/gui/components/special/juce_OpenGLComponent.h" -#include "../../../src/juce_appframework/gui/components/special/juce_DropShadower.h" -#include "../../../src/juce_appframework/gui/components/special/juce_ActiveXControlComponent.h" -#include "../../../src/juce_appframework/gui/components/special/juce_SystemTrayIconComponent.h" -#include "../../../src/juce_appframework/gui/components/juce_ComponentDeletionWatcher.h" -#include "../../../src/juce_appframework/gui/components/layout/juce_ComponentBoundsConstrainer.h" -#include "../../../src/juce_appframework/gui/graphics/imaging/juce_ImageFileFormat.h" -#include "../../../src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h" -#include "../../../src/juce_appframework/gui/graphics/geometry/juce_PathIterator.h" -#include "../../../src/juce_appframework/gui/components/layout/juce_ComponentMovementWatcher.h" -#include "../../../src/juce_appframework/application/juce_Application.h" - extern void juce_repeatLastProcessPriority() throw(); // in juce_win32_Threads.cpp extern void juce_CheckCurrentlyFocusedTopLevelWindow() throw(); // in juce_TopLevelWindow.cpp extern bool juce_IsRunningInWine() throw(); @@ -218,6 +176,7 @@ public: bitmapInfo.bV4Width = w; bitmapInfo.bV4Height = h; bitmapInfo.bV4Planes = 1; + bitmapInfo.bV4CSType = 1; bitmapInfo.bV4BitCount = (unsigned short) (pixelStride * 8); if (format_ == ARGB) @@ -1452,7 +1411,7 @@ private: doMouseUp (GET_X_LPARAM (mp) - wr.left - windowBorder.getLeft(), GET_Y_LPARAM (mp) - wr.top - windowBorder.getTop(), - getMouseEventTime()); + (WPARAM) getMouseEventTime()); } } @@ -2037,6 +1996,10 @@ private: } handleBroughtToFront(); + + if (component->isCurrentlyBlockedByAnotherModalComponent()) + Component::getCurrentlyModalComponent()->toFront (true); + return 0; } @@ -2300,6 +2263,17 @@ bool Process::isForegroundProcess() throw() return processId == GetCurrentProcessId(); } +//============================================================================== +bool AlertWindow::showNativeDialogBox (const String& title, + const String& bodyText, + bool isOkCancel) +{ + return MessageBox (0, bodyText, title, + MB_SETFOREGROUND | (isOkCancel ? MB_OKCANCEL + : MB_OK)) == IDOK; +} + + //============================================================================== void Desktop::getMousePosition (int& x, int& y) throw() { @@ -3013,1024 +2987,4 @@ bool DragAndDropContainer::performExternalDragDropOfText (const String& text) } -//============================================================================== -//============================================================================== -#if JUCE_OPENGL - -#define WGL_EXT_FUNCTION_INIT(extType, extFunc) \ - ((extFunc = (extType) wglGetProcAddress (#extFunc)) != 0) - -typedef const char* (WINAPI* PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); -typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); - -#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 -#define WGL_DRAW_TO_WINDOW_ARB 0x2001 -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_SWAP_METHOD_ARB 0x2007 -#define WGL_SUPPORT_OPENGL_ARB 0x2010 -#define WGL_PIXEL_TYPE_ARB 0x2013 -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_DEPTH_BITS_ARB 0x2022 -#define WGL_STENCIL_BITS_ARB 0x2023 -#define WGL_FULL_ACCELERATION_ARB 0x2027 -#define WGL_ACCUM_RED_BITS_ARB 0x201E -#define WGL_ACCUM_GREEN_BITS_ARB 0x201F -#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 -#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 -#define WGL_STEREO_ARB 0x2012 -#define WGL_SAMPLE_BUFFERS_ARB 0x2041 -#define WGL_SAMPLES_ARB 0x2042 -#define WGL_TYPE_RGBA_ARB 0x202B - -static void getWglExtensions (HDC dc, StringArray& result) throw() -{ - PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = 0; - - if (WGL_EXT_FUNCTION_INIT (PFNWGLGETEXTENSIONSSTRINGARBPROC, wglGetExtensionsStringARB)) - result.addTokens (String (wglGetExtensionsStringARB (dc)), false); - else - jassertfalse // If this fails, it may be because you didn't activate the openGL context -} - - -//============================================================================== -class WindowedGLContext : public OpenGLContext -{ -public: - WindowedGLContext (Component* const component_, - HGLRC contextToShareWith, - const OpenGLPixelFormat& pixelFormat) - : renderContext (0), - nativeWindow (0), - dc (0), - component (component_) - { - jassert (component != 0); - - createNativeWindow(); - - // Use a default pixel format that should be supported everywhere - PIXELFORMATDESCRIPTOR pfd; - zerostruct (pfd); - pfd.nSize = sizeof (pfd); - pfd.nVersion = 1; - pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; - pfd.iPixelType = PFD_TYPE_RGBA; - pfd.cColorBits = 24; - pfd.cDepthBits = 16; - - const int format = ChoosePixelFormat (dc, &pfd); - - if (format != 0) - SetPixelFormat (dc, format, &pfd); - - renderContext = wglCreateContext (dc); - makeActive(); - - setPixelFormat (pixelFormat); - - if (contextToShareWith != 0 && renderContext != 0) - wglShareLists (contextToShareWith, renderContext); - } - - ~WindowedGLContext() - { - makeInactive(); - - wglDeleteContext (renderContext); - - ReleaseDC ((HWND) nativeWindow->getNativeHandle(), dc); - delete nativeWindow; - } - - bool makeActive() const throw() - { - jassert (renderContext != 0); - return wglMakeCurrent (dc, renderContext) != 0; - } - - bool makeInactive() const throw() - { - return (! isActive()) || (wglMakeCurrent (0, 0) != 0); - } - - bool isActive() const throw() - { - return wglGetCurrentContext() == renderContext; - } - - const OpenGLPixelFormat getPixelFormat() const - { - OpenGLPixelFormat pf; - - makeActive(); - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - fillInPixelFormatDetails (GetPixelFormat (dc), pf, availableExtensions); - return pf; - } - - void* getRawContext() const throw() - { - return renderContext; - } - - bool setPixelFormat (const OpenGLPixelFormat& pixelFormat) - { - makeActive(); - - PIXELFORMATDESCRIPTOR pfd; - zerostruct (pfd); - pfd.nSize = sizeof (pfd); - pfd.nVersion = 1; - pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER; - pfd.iPixelType = PFD_TYPE_RGBA; - pfd.iLayerType = PFD_MAIN_PLANE; - pfd.cColorBits = pixelFormat.redBits + pixelFormat.greenBits + pixelFormat.blueBits; - pfd.cRedBits = pixelFormat.redBits; - pfd.cGreenBits = pixelFormat.greenBits; - pfd.cBlueBits = pixelFormat.blueBits; - pfd.cAlphaBits = pixelFormat.alphaBits; - pfd.cDepthBits = pixelFormat.depthBufferBits; - pfd.cStencilBits = pixelFormat.stencilBufferBits; - pfd.cAccumBits = pixelFormat.accumulationBufferRedBits + pixelFormat.accumulationBufferGreenBits - + pixelFormat.accumulationBufferBlueBits + pixelFormat.accumulationBufferAlphaBits; - pfd.cAccumRedBits = pixelFormat.accumulationBufferRedBits; - pfd.cAccumGreenBits = pixelFormat.accumulationBufferGreenBits; - pfd.cAccumBlueBits = pixelFormat.accumulationBufferBlueBits; - pfd.cAccumAlphaBits = pixelFormat.accumulationBufferAlphaBits; - - int format = 0; - - PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = 0; - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - if (availableExtensions.contains ("WGL_ARB_pixel_format") - && WGL_EXT_FUNCTION_INIT (PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB)) - { - int attributes[64]; - int n = 0; - - attributes[n++] = WGL_DRAW_TO_WINDOW_ARB; - attributes[n++] = GL_TRUE; - attributes[n++] = WGL_SUPPORT_OPENGL_ARB; - attributes[n++] = GL_TRUE; - attributes[n++] = WGL_ACCELERATION_ARB; - attributes[n++] = WGL_FULL_ACCELERATION_ARB; - attributes[n++] = WGL_DOUBLE_BUFFER_ARB; - attributes[n++] = GL_TRUE; - attributes[n++] = WGL_PIXEL_TYPE_ARB; - attributes[n++] = WGL_TYPE_RGBA_ARB; - - attributes[n++] = WGL_COLOR_BITS_ARB; - attributes[n++] = pfd.cColorBits; - attributes[n++] = WGL_RED_BITS_ARB; - attributes[n++] = pixelFormat.redBits; - attributes[n++] = WGL_GREEN_BITS_ARB; - attributes[n++] = pixelFormat.greenBits; - attributes[n++] = WGL_BLUE_BITS_ARB; - attributes[n++] = pixelFormat.blueBits; - attributes[n++] = WGL_ALPHA_BITS_ARB; - attributes[n++] = pixelFormat.alphaBits; - attributes[n++] = WGL_DEPTH_BITS_ARB; - attributes[n++] = pixelFormat.depthBufferBits; - - if (pixelFormat.stencilBufferBits > 0) - { - attributes[n++] = WGL_STENCIL_BITS_ARB; - attributes[n++] = pixelFormat.stencilBufferBits; - } - - attributes[n++] = WGL_ACCUM_RED_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferRedBits; - attributes[n++] = WGL_ACCUM_GREEN_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferGreenBits; - attributes[n++] = WGL_ACCUM_BLUE_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferBlueBits; - attributes[n++] = WGL_ACCUM_ALPHA_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferAlphaBits; - - if (availableExtensions.contains ("WGL_ARB_multisample") - && pixelFormat.fullSceneAntiAliasingNumSamples > 0) - { - attributes[n++] = WGL_SAMPLE_BUFFERS_ARB; - attributes[n++] = 1; - attributes[n++] = WGL_SAMPLES_ARB; - attributes[n++] = pixelFormat.fullSceneAntiAliasingNumSamples; - } - - attributes[n++] = 0; - - UINT formatsCount; - const BOOL ok = wglChoosePixelFormatARB (dc, attributes, 0, 1, &format, &formatsCount); - (void) ok; - jassert (ok); - } - else - { - format = ChoosePixelFormat (dc, &pfd); - } - - if (format != 0) - { - makeInactive(); - - // win32 can't change the pixel format of a window, so need to delete the - // old one and create a new one.. - jassert (nativeWindow != 0); - ReleaseDC ((HWND) nativeWindow->getNativeHandle(), dc); - delete nativeWindow; - - createNativeWindow(); - - if (SetPixelFormat (dc, format, &pfd)) - { - wglDeleteContext (renderContext); - renderContext = wglCreateContext (dc); - - jassert (renderContext != 0); - return renderContext != 0; - } - } - - return false; - } - - void updateWindowPosition (int x, int y, int w, int h, int) - { - SetWindowPos ((HWND) nativeWindow->getNativeHandle(), 0, - x, y, w, h, - SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); - } - - void repaint() - { - int x, y, w, h; - nativeWindow->getBounds (x, y, w, h); - nativeWindow->repaint (0, 0, w, h); - } - - void swapBuffers() - { - SwapBuffers (dc); - } - - bool setSwapInterval (const int numFramesPerSwap) - { - makeActive(); - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = 0; - - return availableExtensions.contains ("WGL_EXT_swap_control") - && WGL_EXT_FUNCTION_INIT (PFNWGLSWAPINTERVALEXTPROC, wglSwapIntervalEXT) - && wglSwapIntervalEXT (numFramesPerSwap) != FALSE; - } - - int getSwapInterval() const - { - makeActive(); - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = 0; - - if (availableExtensions.contains ("WGL_EXT_swap_control") - && WGL_EXT_FUNCTION_INIT (PFNWGLGETSWAPINTERVALEXTPROC, wglGetSwapIntervalEXT)) - return wglGetSwapIntervalEXT(); - - return 0; - } - - void findAlternativeOpenGLPixelFormats (OwnedArray & results) - { - jassert (isActive()); - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0; - int numTypes = 0; - - if (availableExtensions.contains("WGL_ARB_pixel_format") - && WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB)) - { - int attributes = WGL_NUMBER_PIXEL_FORMATS_ARB; - - if (! wglGetPixelFormatAttribivARB (dc, 1, 0, 1, &attributes, &numTypes)) - jassertfalse - } - else - { - numTypes = DescribePixelFormat (dc, 0, 0, 0); - } - - OpenGLPixelFormat pf; - - for (int i = 0; i < numTypes; ++i) - { - if (fillInPixelFormatDetails (i + 1, pf, availableExtensions)) - { - bool alreadyListed = false; - for (int j = results.size(); --j >= 0;) - if (pf == *results.getUnchecked(j)) - alreadyListed = true; - - if (! alreadyListed) - results.add (new OpenGLPixelFormat (pf)); - } - } - } - - //============================================================================== - juce_UseDebuggingNewOperator - - HGLRC renderContext; - -private: - Win32ComponentPeer* nativeWindow; - Component* const component; - HDC dc; - - //============================================================================== - void createNativeWindow() - { - nativeWindow = new Win32ComponentPeer (component, 0); - nativeWindow->dontRepaint = true; - nativeWindow->setVisible (true); - - HWND hwnd = (HWND) nativeWindow->getNativeHandle(); - - Win32ComponentPeer* const peer = dynamic_cast (component->getTopLevelComponent()->getPeer()); - - if (peer != 0) - { - SetParent (hwnd, (HWND) peer->getNativeHandle()); - juce_setWindowStyleBit (hwnd, GWL_STYLE, WS_CHILD, true); - juce_setWindowStyleBit (hwnd, GWL_STYLE, WS_POPUP, false); - } - - dc = GetDC (hwnd); - } - - bool fillInPixelFormatDetails (const int pixelFormatIndex, - OpenGLPixelFormat& result, - const StringArray& availableExtensions) const throw() - { - PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0; - - if (availableExtensions.contains ("WGL_ARB_pixel_format") - && WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB)) - { - int attributes[32]; - int numAttributes = 0; - - attributes[numAttributes++] = WGL_DRAW_TO_WINDOW_ARB; - attributes[numAttributes++] = WGL_SUPPORT_OPENGL_ARB; - attributes[numAttributes++] = WGL_ACCELERATION_ARB; - attributes[numAttributes++] = WGL_DOUBLE_BUFFER_ARB; - attributes[numAttributes++] = WGL_PIXEL_TYPE_ARB; - attributes[numAttributes++] = WGL_RED_BITS_ARB; - attributes[numAttributes++] = WGL_GREEN_BITS_ARB; - attributes[numAttributes++] = WGL_BLUE_BITS_ARB; - attributes[numAttributes++] = WGL_ALPHA_BITS_ARB; - attributes[numAttributes++] = WGL_DEPTH_BITS_ARB; - attributes[numAttributes++] = WGL_STENCIL_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_RED_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_GREEN_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_BLUE_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_ALPHA_BITS_ARB; - - if (availableExtensions.contains ("WGL_ARB_multisample")) - attributes[numAttributes++] = WGL_SAMPLES_ARB; - - int values[32]; - zeromem (values, sizeof (values)); - - if (wglGetPixelFormatAttribivARB (dc, pixelFormatIndex, 0, numAttributes, attributes, values)) - { - int n = 0; - bool isValidFormat = (values[n++] == GL_TRUE); // WGL_DRAW_TO_WINDOW_ARB - isValidFormat = (values[n++] == GL_TRUE) && isValidFormat; // WGL_SUPPORT_OPENGL_ARB - isValidFormat = (values[n++] == WGL_FULL_ACCELERATION_ARB) && isValidFormat; // WGL_ACCELERATION_ARB - isValidFormat = (values[n++] == GL_TRUE) && isValidFormat; // WGL_DOUBLE_BUFFER_ARB: - isValidFormat = (values[n++] == WGL_TYPE_RGBA_ARB) && isValidFormat; // WGL_PIXEL_TYPE_ARB - result.redBits = values[n++]; // WGL_RED_BITS_ARB - result.greenBits = values[n++]; // WGL_GREEN_BITS_ARB - result.blueBits = values[n++]; // WGL_BLUE_BITS_ARB - result.alphaBits = values[n++]; // WGL_ALPHA_BITS_ARB - result.depthBufferBits = values[n++]; // WGL_DEPTH_BITS_ARB - result.stencilBufferBits = values[n++]; // WGL_STENCIL_BITS_ARB - result.accumulationBufferRedBits = values[n++]; // WGL_ACCUM_RED_BITS_ARB - result.accumulationBufferGreenBits = values[n++]; // WGL_ACCUM_GREEN_BITS_ARB - result.accumulationBufferBlueBits = values[n++]; // WGL_ACCUM_BLUE_BITS_ARB - result.accumulationBufferAlphaBits = values[n++]; // WGL_ACCUM_ALPHA_BITS_ARB - result.fullSceneAntiAliasingNumSamples = values[n++]; // WGL_SAMPLES_ARB - - return isValidFormat; - } - else - { - jassertfalse - } - } - else - { - PIXELFORMATDESCRIPTOR pfd; - - if (DescribePixelFormat (dc, pixelFormatIndex, sizeof (pfd), &pfd)) - { - result.redBits = pfd.cRedBits; - result.greenBits = pfd.cGreenBits; - result.blueBits = pfd.cBlueBits; - result.alphaBits = pfd.cAlphaBits; - result.depthBufferBits = pfd.cDepthBits; - result.stencilBufferBits = pfd.cStencilBits; - result.accumulationBufferRedBits = pfd.cAccumRedBits; - result.accumulationBufferGreenBits = pfd.cAccumGreenBits; - result.accumulationBufferBlueBits = pfd.cAccumBlueBits; - result.accumulationBufferAlphaBits = pfd.cAccumAlphaBits; - result.fullSceneAntiAliasingNumSamples = 0; - - return true; - } - else - { - jassertfalse - } - } - - return false; - } - - 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, - contextToShareWith != 0 ? (HGLRC) contextToShareWith->getRawContext() : 0, - pixelFormat); - - if (c->renderContext == 0) - deleteAndZero (c); - - return c; -} - -void juce_glViewport (const int w, const int h) -{ - glViewport (0, 0, w, h); -} - -void OpenGLPixelFormat::getAvailablePixelFormats (Component* component, - OwnedArray & results) -{ - Component tempComp; - - { - WindowedGLContext wc (component, 0, OpenGLPixelFormat (8, 8, 16, 0)); - wc.makeActive(); - wc.findAlternativeOpenGLPixelFormats (results); - } -} - #endif - - -//============================================================================== -//============================================================================== -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 (peer) != 0); - - if (dynamic_cast (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; -} - - -END_JUCE_NAMESPACE diff --git a/build/win32/vc8/JUCE.vcproj b/build/win32/vc8/JUCE.vcproj index 8119180fd8..018bd901cf 100644 --- a/build/win32/vc8/JUCE.vcproj +++ b/build/win32/vc8/JUCE.vcproj @@ -3638,10 +3638,6 @@ RelativePath="..\..\..\src\juce_appframework\gui\components\special\juce_PreferencesPanel.h" > - - @@ -5673,6 +5669,10 @@ + + @@ -5717,14 +5717,30 @@ RelativePath="..\platform_specific_code\juce_win32_Misc.cpp" > + + + + + + + + diff --git a/extras/audio plugin host/build/mac/PluginHost.xcodeproj/project.pbxproj b/extras/audio plugin host/build/mac/PluginHost.xcodeproj/project.pbxproj index cf20302b8f..0bbabb651d 100644 --- a/extras/audio plugin host/build/mac/PluginHost.xcodeproj/project.pbxproj +++ b/extras/audio plugin host/build/mac/PluginHost.xcodeproj/project.pbxproj @@ -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 = ""; }; - 84C0A3820DE2D5C700606895 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; 84C0A3830DE2D5C700606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; - 84C0A3840DE2D5C700606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 84C0A3850DE2D5C700606895 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 84C0A3860DE2D5C700606895 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; - 84C0A3870DE2D5C700606895 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 84C0A3880DE2D5C700606895 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = ""; }; 84C0A3890DE2D5C700606895 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; 84C0A38A0DE2D5C700606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; 84C0A38B0DE2D5C700606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 84C0A38C0DE2D5C700606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 84C0A38D0DE2D5C700606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 84C0A38E0DE2D5C700606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 84D16CFD0E9A58CA00CB8B94 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; + 84F6F6150E8EDA7100AA911A /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 84F8B6D60EB5FEF70020D98D /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 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 = ""; }; + 8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* 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; }; diff --git a/extras/audio plugin host/src/HostStartup.cpp b/extras/audio plugin host/src/HostStartup.cpp index 7bcb493ff2..4ac0fe1032 100644 --- a/extras/audio plugin host/src/HostStartup.cpp +++ b/extras/audio plugin host/src/HostStartup.cpp @@ -75,6 +75,8 @@ public: commandManager->registerAllCommandsForTarget (this); commandManager->registerAllCommandsForTarget (mainWindow); + + mainWindow->menuItemsChanged(); } void shutdown() diff --git a/extras/audio plugin host/src/host/MainHostWindow.cpp b/extras/audio plugin host/src/host/MainHostWindow.cpp index 0fc3891af1..d30236f2fc 100644 --- a/extras/audio plugin host/src/host/MainHostWindow.cpp +++ b/extras/audio plugin host/src/host/MainHostWindow.cpp @@ -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); diff --git a/extras/audio plugin host/src/includes.h b/extras/audio plugin host/src/includes.h index f8cbcf733c..d16e4ab20c 100644 --- a/extras/audio plugin host/src/includes.h +++ b/extras/audio plugin host/src/includes.h @@ -1,5 +1,6 @@ #include "juce_AppConfig.h" -#include "../../../juce_amalgamated.h" +//#include "../../../juce_amalgamated.h" +#include "../../../juce.h" using JUCE_NAMESPACE::uint32; diff --git a/extras/audio plugins/demo/build/AudioUnit/JuceAU.exp b/extras/audio plugins/demo/build/AudioUnit/JuceAU.exp index 60e62a5185..dbc8e0c0e9 100644 --- a/extras/audio plugins/demo/build/AudioUnit/JuceAU.exp +++ b/extras/audio plugins/demo/build/AudioUnit/JuceAU.exp @@ -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 diff --git a/extras/audio plugins/demo/build/AudioUnit/JuceDemoAU.xcodeproj/project.pbxproj b/extras/audio plugins/demo/build/AudioUnit/JuceDemoAU.xcodeproj/project.pbxproj index a1f36f846c..f286beb687 100644 --- a/extras/audio plugins/demo/build/AudioUnit/JuceDemoAU.xcodeproj/project.pbxproj +++ b/extras/audio plugins/demo/build/AudioUnit/JuceDemoAU.xcodeproj/project.pbxproj @@ -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 = ""; }; 7967EF8C04D70E7C00C625F7 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = ""; }; 7967EF8D04D70E7C00C625F7 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = ""; }; + 840BE1CC0EACFEC400824B1D /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 84581F820D917FC700AE1A4C /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp; sourceTree = ""; }; 84581F830D917FC700AE1A4C /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.h; sourceTree = ""; }; 84581F840D917FC700AE1A4C /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUDispatch.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp; sourceTree = ""; }; @@ -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 = ""; }; 84581F8E0D917FC700AE1A4C /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ComponentBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.h; sourceTree = ""; }; 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 = ""; }; 84B4CDCF0C7DD23B0083122F /* MusicDeviceBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MusicDeviceBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.cpp; sourceTree = ""; }; 84B4CDD00C7DD23B0083122F /* MusicDeviceBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MusicDeviceBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.h; sourceTree = ""; }; 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 = ""; }; 84C0A2940DE2C7BD00606895 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; 84C0A2950DE2C7BD00606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; 84C0A2960DE2C7BD00606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; @@ -117,13 +114,12 @@ 84C0A29C0DE2C7BD00606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; 84C0A29D0DE2C7BD00606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 84C0A29E0DE2C7BD00606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 84C0A29F0DE2C7BD00606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 84C0A2A00DE2C7BD00606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; 84C0A2B20DE2C80200606895 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; - 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 = ""; }; + 84F05215090674BB00AEC8DB /* Info-JuceAU.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "Info-JuceAU.plist"; sourceTree = ""; }; 84F05217090674BB00AEC8DB /* JuceAU.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = JuceAU.exp; sourceTree = ""; }; 84F054E40906C8DD00AEC8DB /* AUMIDIBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AUMIDIBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.cpp; sourceTree = ""; }; 84F054E50906C8DD00AEC8DB /* AUMIDIBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AUMIDIBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.h; sourceTree = ""; }; @@ -146,13 +142,6 @@ F5D19A0E03175E1E01CA2136 /* AUBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = ""; }; F5D19A0F03175E1E01CA2136 /* AUBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = ""; }; F5D19A6903175E8C01CA2136 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = ""; }; - F5D19AA703175F3201CA2136 /* AUCarbonViewBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUCarbonViewBase.cpp; sourceTree = ""; }; - F5D19AA803175F3201CA2136 /* AUCarbonViewBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUCarbonViewBase.h; sourceTree = ""; }; - F5D19AA903175F3201CA2136 /* AUCarbonViewControl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUCarbonViewControl.cpp; sourceTree = ""; }; - F5D19AAA03175F3201CA2136 /* AUCarbonViewControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUCarbonViewControl.h; sourceTree = ""; }; - F5D19AAB03175F3201CA2136 /* AUCarbonViewDispatch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUCarbonViewDispatch.cpp; sourceTree = ""; }; - F5D19AB003175F3201CA2136 /* CarbonEventHandler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CarbonEventHandler.cpp; sourceTree = ""; }; - F5D19AB103175F3201CA2136 /* CarbonEventHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CarbonEventHandler.h; sourceTree = ""; }; /* 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 = ""; }; - 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 = ""; - }; /* 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 */, diff --git a/extras/audio plugins/demo/build/RTAS_Mac/juce_RTASDemo.xcodeproj/project.pbxproj b/extras/audio plugins/demo/build/RTAS_Mac/juce_RTASDemo.xcodeproj/project.pbxproj index 5093007a66..079faa5a35 100644 --- a/extras/audio plugins/demo/build/RTAS_Mac/juce_RTASDemo.xcodeproj/project.pbxproj +++ b/extras/audio plugins/demo/build/RTAS_Mac/juce_RTASDemo.xcodeproj/project.pbxproj @@ -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 = ""; }; + 84190D190EA5320900B939D0 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 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 = ""; }; + 841E07420AF9F126005E6FCC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 84C0A2F50DE2CBE500606895 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; 84C0A2F60DE2CBE500606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; - 84C0A2F70DE2CBE500606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 84C0A2F80DE2CBE500606895 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 84C0A2F90DE2CBE500606895 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; - 84C0A2FA0DE2CBE500606895 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 84C0A2FB0DE2CBE500606895 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = ""; }; 84C0A2FC0DE2CBE500606895 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; - 84C0A2FD0DE2CBE500606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; 84C0A2FE0DE2CBE500606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; - 84C0A2FF0DE2CBE500606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 84C0A3000DE2CBE500606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; - 84C0A3010DE2CBE500606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; 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 = ""; }; 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 = ""; }; 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 = ""; }; + 84E907CA0EA396A50088E51C /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; + 84E90C240EA399090088E51C /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 84E90C2A0EA39A110088E51C /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 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 = ""; @@ -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; }; diff --git a/extras/audio plugins/demo/build/VST_Mac/JuceVST.xcodeproj/project.pbxproj b/extras/audio plugins/demo/build/VST_Mac/JuceVST.xcodeproj/project.pbxproj index 41dc7b1698..6e828989d7 100644 --- a/extras/audio plugins/demo/build/VST_Mac/JuceVST.xcodeproj/project.pbxproj +++ b/extras/audio plugins/demo/build/VST_Mac/JuceVST.xcodeproj/project.pbxproj @@ -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 = ""; }; + 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 = ""; }; + 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 = ""; }; 84C0A3470DE2D1FD00606895 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; 84C0A3480DE2D1FD00606895 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; @@ -46,15 +47,16 @@ 84C0A34E0DE2D1FD00606895 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; 84C0A34F0DE2D1FD00606895 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 84C0A3500DE2D1FD00606895 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 84C0A3510DE2D1FD00606895 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 84C0A3520DE2D1FD00606895 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; 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 = ""; }; 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 = ""; @@ -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 = ""; @@ -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; diff --git a/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp b/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.mm similarity index 77% rename from extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp rename to extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.mm index 0f0fd51090..64565d7291 100644 --- a/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp +++ b/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.mm @@ -29,12 +29,15 @@ ============================================================================== */ +#include +#include #include +#include #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 +{ +} + +- (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; + outDataSize = sizeof (UInt32); + outWritable = false; + return noErr; + } + else if (inID == kAudioUnitProperty_CocoaUI) + { + 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 +@interface JuceUIViewClass : NSView { -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 -{ - 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) - { - } +- (JuceUIViewClass*) initWithFilter: (AudioProcessor*) filter + withAU: (JuceAU*) au + withComponent: (AudioProcessorEditor*) editorComp; +- (void) dealloc; +- (void) viewDidMoveToWindow; +- (BOOL) mouseDownCanMoveWindow; - ~JuceAUView() - { - if (owner->currentView == this) - owner->currentView = 0; +@end - deleteUI(); - } +@implementation JuceUIViewClass - 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]; - - owner = (JuceAU*) pointers[1]; - owner->currentView = this; - } - - if (juceFilter != 0) - { - deleteUI(); - - editorComp = juceFilter->createEditorIfNeeded(); - - const int w = editorComp->getWidth(); - const int h = editorComp->getHeight(); - - editorComp->setOpaque (true); - editorComp->setVisible (true); - - windowComp = new JuceAUComponentHolder (editorComp); - windowComp->setBounds ((int) inXOffset, (int) inYOffset, w, h); - - windowComp->addToDesktop (0, (void*) mCarbonPane); - SizeControl (mCarbonPane, w, h); - - editorComp->addComponentListener (this); - windowComp->addMouseListener (this, true); - - startTimer (20); - } - else - { - jassertfalse // can't get a pointer to our effect - } - - return noErr; - } - - void componentMovedOrResized (Component& component, - bool wasMoved, - bool wasResized) - { - 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; - } - } - - 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; - } - } - } - } - } - } - - void mouseMove (const MouseEvent& e) - { - Desktop::getInstance().getMousePosition (mx, my); - startTimer (20); - } - - AudioUnitCarbonViewEventListener getEventListener() const throw() { return mEventListener; } - void* getEventListenerUserData() const throw() { return mEventListenerUserData; } - -private: - void deleteUI() - { - PopupMenu::dismissAllActiveMenus(); - - // there's some kind of component currently modal, but the host - // is trying to delete our plugin.. - jassert (Component::getCurrentlyModalComponent() == 0); - - if (editorComp != 0) - juceFilter->editorBeingDeleted (editorComp); - - deleteAndZero (editorComp); - deleteAndZero (windowComp); - } -}; - -void JuceAU::sendOldFashionedGestureEvent (const AudioUnitCarbonViewEventID gestureType) +- (JuceUIViewClass*) initWithFilter: (AudioProcessor*) filter_ + withAU: (JuceAU*) au_ + withComponent: (AudioProcessorEditor*) editorComp_ { - if (currentView != 0 && currentView->getEventListener() != 0) + filter = filter_; + au = au_; + editorComp = editorComp_; + + [super initWithFrame: NSMakeRect (0, 0, editorComp_->getWidth(), editorComp_->getHeight())]; + [self setHidden: NO]; + [self setPostsFrameChangedNotifications: YES]; + + editorComp->addToDesktop (0, (void*) self); + editorComp->setVisible (true); + editorComp->addComponentListener (au); + + return self; +} + +- (void) dealloc +{ + // there's some kind of component currently modal, but the host + // is trying to delete our plugin.. + jassert (Component::getCurrentlyModalComponent() == 0); + + if (editorComp != 0) + filter->editorBeingDeleted (editorComp); + + deleteAndZero (editorComp); + + [super dealloc]; +} + +- (void) viewDidMoveToWindow +{ + if ([self window] != 0) { - (*currentView->getEventListener()) (currentView->getEventListenerUserData(), currentView->GetComponentInstance(), - &(auEvent.mArgument.mParameter), gestureType, 0); + [[self window] setAcceptsMouseMovedEvents: YES]; + + if (editorComp != 0) + [[self window] makeFirstResponder: (NSView*) editorComp->getWindowHandle()]; } } +- (BOOL) mouseDownCanMoveWindow +{ + return NO; +} + +@end + +@implementation JuceUICreationClass + +- (JuceUICreationClass*) init +{ + return [super init]; +} + +- (void) dealloc +{ + [super dealloc]; +} + +- (unsigned) interfaceVersion +{ + return 0; +} + +- (NSString*) description +{ + 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) diff --git a/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r b/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r index 5d32214260..ebc3783f78 100644 --- a/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r +++ b/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.r @@ -30,7 +30,6 @@ */ #include -#include //============================================================================== /* 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" diff --git a/extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.mm b/extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.mm new file mode 100644 index 0000000000..aa6c95466a --- /dev/null +++ b/extras/audio plugins/wrapper/formats/RTAS/juce_RTASUtilities.mm @@ -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 +#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]; +} diff --git a/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp b/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp index 38930d715d..d30ca72f0f 100644 --- a/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp +++ b/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp @@ -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(); + } + + void userTriedToCloseWindow() + { } //============================================================================== juce_UseDebuggingNewOperator -#if JUCE_MAC - protected: - void internalRepaint (int x, int y, int w, int h) - { - Component::internalRepaint (x, y, w, h); - owner->Invalidate(); - - if (forcedRepaintTimer != 0 && ! forcedRepaintTimer->isTimerRunning()) - forcedRepaintTimer->startTimer (1000 / 25); - } - - HIViewRef parentView; -#endif - 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); diff --git a/extras/audio plugins/wrapper/formats/VST/MacExportedSymbols.txt b/extras/audio plugins/wrapper/formats/VST/MacExportedSymbols.txt new file mode 100644 index 0000000000..a71eebdde5 --- /dev/null +++ b/extras/audio plugins/wrapper/formats/VST/MacExportedSymbols.txt @@ -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 diff --git a/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp b/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp index 3d0251a61e..dd90fa1793 100644 --- a/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp +++ b/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.cpp @@ -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) diff --git a/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.mm b/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.mm new file mode 100644 index 0000000000..2cc70ace50 --- /dev/null +++ b/extras/audio plugins/wrapper/formats/VST/juce_VstWrapper.mm @@ -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 +#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 diff --git a/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj b/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj index 95c4c02fd2..90d8b0f5b7 100644 --- a/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj +++ b/extras/example projects/example_project_for_Mac/juce_application.xcodeproj/project.pbxproj @@ -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 = ""; }; - 20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; 4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; - 84078F3D09E6B42E004E7BCD /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = ""; }; 8407902A09E6B5BD004E7BCD /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 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 = ""; }; + 846EC7860EB607050080CCFF /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 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 = ""; }; 84FAD6190C7C3CCB00AF3028 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; @@ -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 */, diff --git a/extras/juce demo/build/linux/JuceDemo.make b/extras/juce demo/build/linux/JuceDemo.make index 9a1a81d048..a47186570f 100644 --- a/extras/juce demo/build/linux/JuceDemo.make +++ b/extras/juce demo/build/linux/JuceDemo.make @@ -36,21 +36,21 @@ ifeq ($(CONFIG),Release) endif OBJECTS := \ - $(OBJDIR)/ApplicationStartup.o \ - $(OBJDIR)/BinaryData.o \ - $(OBJDIR)/juce_LibrarySource.o \ $(OBJDIR)/MainDemoWindow.o \ - $(OBJDIR)/AudioDemo.o \ - $(OBJDIR)/DragAndDropDemo.o \ - $(OBJDIR)/FontsAndTextDemo.o \ - $(OBJDIR)/InterprocessCommsDemo.o \ - $(OBJDIR)/OpenGLDemo.o \ + $(OBJDIR)/ApplicationStartup.o \ + $(OBJDIR)/juce_LibrarySource.o \ + $(OBJDIR)/BinaryData.o \ $(OBJDIR)/PathsAndTransformsDemo.o \ - $(OBJDIR)/QuickTimeDemo.o \ - $(OBJDIR)/TableDemo.o \ + $(OBJDIR)/DragAndDropDemo.o \ $(OBJDIR)/ThreadingDemo.o \ - $(OBJDIR)/TreeViewDemo.o \ + $(OBJDIR)/OpenGLDemo.o \ $(OBJDIR)/WidgetsDemo.o \ + $(OBJDIR)/TreeViewDemo.o \ + $(OBJDIR)/QuickTimeDemo.o \ + $(OBJDIR)/InterprocessCommsDemo.o \ + $(OBJDIR)/AudioDemo.o \ + $(OBJDIR)/FontsAndTextDemo.o \ + $(OBJDIR)/TableDemo.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,32 +106,7 @@ $(OBJDIR)/juce_LibrarySource.o: ../../src/juce_LibrarySource.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/MainDemoWindow.o: ../../src/MainDemoWindow.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/AudioDemo.o: ../../src/demos/AudioDemo.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/DragAndDropDemo.o: ../../src/demos/DragAndDropDemo.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/FontsAndTextDemo.o: ../../src/demos/FontsAndTextDemo.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/InterprocessCommsDemo.o: ../../src/demos/InterprocessCommsDemo.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/OpenGLDemo.o: ../../src/demos/OpenGLDemo.cpp +$(OBJDIR)/BinaryData.o: ../../src/BinaryData.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -141,12 +116,7 @@ $(OBJDIR)/PathsAndTransformsDemo.o: ../../src/demos/PathsAndTransformsDemo.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/QuickTimeDemo.o: ../../src/demos/QuickTimeDemo.cpp - -@$(CMD_MKOBJDIR) - @echo $(notdir $<) - @$(CXX) $(CXXFLAGS) -o $@ -c $< - -$(OBJDIR)/TableDemo.o: ../../src/demos/TableDemo.cpp +$(OBJDIR)/DragAndDropDemo.o: ../../src/demos/DragAndDropDemo.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -156,7 +126,7 @@ $(OBJDIR)/ThreadingDemo.o: ../../src/demos/ThreadingDemo.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< -$(OBJDIR)/TreeViewDemo.o: ../../src/demos/TreeViewDemo.cpp +$(OBJDIR)/OpenGLDemo.o: ../../src/demos/OpenGLDemo.cpp -@$(CMD_MKOBJDIR) @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< @@ -166,5 +136,35 @@ $(OBJDIR)/WidgetsDemo.o: ../../src/demos/WidgetsDemo.cpp @echo $(notdir $<) @$(CXX) $(CXXFLAGS) -o $@ -c $< +$(OBJDIR)/TreeViewDemo.o: ../../src/demos/TreeViewDemo.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/QuickTimeDemo.o: ../../src/demos/QuickTimeDemo.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/InterprocessCommsDemo.o: ../../src/demos/InterprocessCommsDemo.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/AudioDemo.o: ../../src/demos/AudioDemo.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/FontsAndTextDemo.o: ../../src/demos/FontsAndTextDemo.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + +$(OBJDIR)/TableDemo.o: ../../src/demos/TableDemo.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o $@ -c $< + -include $(OBJECTS:%.o=%.d) diff --git a/extras/juce demo/build/macosx/Info.plist b/extras/juce demo/build/macosx/Info.plist index f47341ab27..1e0ccac15a 100644 --- a/extras/juce demo/build/macosx/Info.plist +++ b/extras/juce demo/build/macosx/Info.plist @@ -1,24 +1,28 @@ - + CFBundleDevelopmentRegion English CFBundleExecutable - jucedemo + ${EXECUTABLE_NAME} CFBundleIconFile - CFBundleIdentifier - com.apple.myCarbonNibApp + CFBundleIdentifier + com.rawmaterialsoftware.${PRODUCT_NAME:identifier} CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleSignature ???? CFBundleVersion - 0.1 - CSResourcesFileMapped - + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication diff --git a/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj b/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj index c85c8cbbaa..1b1494c5be 100644 --- a/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj +++ b/extras/juce demo/build/macosx/jucedemo.xcodeproj/project.pbxproj @@ -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 = ""; }; - 8417EE790A6E7EB90058E04E /* TableDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TableDemo.cpp; sourceTree = ""; }; - 842A97B6081060FB0059DBCC /* DragAndDropDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DragAndDropDemo.cpp; sourceTree = ""; }; - 842A97B7081060FB0059DBCC /* OpenGLDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGLDemo.cpp; sourceTree = ""; }; - 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 = ""; }; - 8480BC0F0DE0BB8200478E44 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; - 8480BC100DE0BB8200478E44 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; - 8480BC110DE0BB8200478E44 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 8480BC120DE0BB8200478E44 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; - 8480BC130DE0BB8200478E44 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; - 8480BC140DE0BB8200478E44 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = ""; }; - 8480BC150DE0BB8200478E44 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; - 8480BC160DE0BB8200478E44 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 8480BC170DE0BB8200478E44 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; - 8480BC180DE0BB8200478E44 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; - 8480BC190DE0BB8200478E44 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; - 8480BC1A0DE0BB8200478E44 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; - 8480BC1B0DE0BB8200478E44 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; - 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 = ""; }; - 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 = ""; }; - 84C49E4D06C0EE8C0066071B /* FontsAndTextDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontsAndTextDemo.cpp; sourceTree = ""; }; - 84C49E4E06C0EE8C0066071B /* PathsAndTransformsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PathsAndTransformsDemo.cpp; sourceTree = ""; }; - 84C49E4F06C0EE8C0066071B /* ThreadingDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadingDemo.cpp; sourceTree = ""; }; - 84C49E5006C0EE8C0066071B /* TreeViewDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TreeViewDemo.cpp; sourceTree = ""; }; - 84C49E5106C0EE8C0066071B /* WidgetsDemo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = WidgetsDemo.cpp; sourceTree = ""; }; - 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 = ""; }; - 8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 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 = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 841FE4360E8ABDD4003C3263 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; + 841FE4370E8ABDD4003C3263 /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = /System/Library/Frameworks/CoreMIDI.framework; sourceTree = ""; }; + 841FE4380E8ABDD4003C3263 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; + 841FE4390E8ABDD4003C3263 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 841FE43A0E8ABDD4003C3263 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; + 841FE43B0E8ABDD4003C3263 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 845057790EB52CE500029DFF /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; + 847F4D8F0E8AC35C00F64426 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; + 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 = ""; }; + 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 = Source; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* jucedemo.app */, ); name = Products; sourceTree = ""; }; - 20286C29FDCF999611CA2CEA /* jucedemo */ = { + 29B97314FDCFA39411CA2CEA /* jucedemo */ = { isa = PBXGroup; children = ( - 20286C2AFDCF999611CA2CEA /* Sources */, - 841084950DB3759400AB8583 /* Build settings */, - 20286C2CFDCF999611CA2CEA /* Resources */, - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, - 195DF8CFFE9D517E11CA2CBB /* Products */, + 080E96DDFE201D6D7F000001 /* Source */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, ); name = jucedemo; sourceTree = ""; }; - 20286C2AFDCF999611CA2CEA /* Sources */ = { + 29B97317FDCFA39411CA2CEA /* Resources */ = { 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 */, - ); - name = Sources; - sourceTree = ""; - }; - 20286C2CFDCF999611CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 8D0C4E960486CD37000505A6 /* Info.plist */, - 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */, + 8D1107310486CEB800E47090 /* Info.plist */, ); name = Resources; sourceTree = ""; }; - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = { + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 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 */, + 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 = "External Frameworks and Libraries"; + name = Frameworks; sourceTree = ""; }; - 841084950DB3759400AB8583 /* Build settings */ = { + 847F4D8A0E8AC27A00F64426 /* demos */ = { isa = PBXGroup; children = ( - 846929260A49DDE100314975 /* juce.xcconfig */, - ); - name = "Build settings"; - sourceTree = ""; - }; - 84C49E4B06C0EE8C0066071B /* 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 = ""; }; /* 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 = ""; - }; -/* 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 */; } diff --git a/extras/juce demo/build/win32_vc8/jucedemo.sln b/extras/juce demo/build/win32_vc8/jucedemo.sln index a08814acc5..197f8550c5 100644 --- a/extras/juce demo/build/win32_vc8/jucedemo.sln +++ b/extras/juce demo/build/win32_vc8/jucedemo.sln @@ -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 diff --git a/extras/juce demo/src/BinaryData.cpp b/extras/juce demo/src/BinaryData.cpp index ac90d49d10..03f82d6219 100644 --- a/extras/juce demo/src/BinaryData.cpp +++ b/extras/juce demo/src/BinaryData.cpp @@ -39,562 +39,1015 @@ static const unsigned char temp1[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61, 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,47,42,42,32,79,117,114,32,100,101,109,111,32,115,121,110,116,104,32,111,110,108,121,32,104,97,115,32,111,110,101,32,116,121,112,101,32, - 111,102,32,115,111,117,110,100,44,32,97,110,100,32,105,116,39,115,32,118,101,114,121,32,98,97,115,105,99,46,46,13,10,42,47,13,10,99,108,97, - 115,115,32,83,105,110,101,87,97,118,101,83,111,117,110,100,32,58,32,112,117,98,108,105,99,32,83,121,110,116,104,101,115,105,115,101,114,83,111,117, - 110,100,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,83,105,110,101,87,97,118,101,83,111,117,110,100,32,40,99,111,110,115,116, - 32,66,105,116,65,114,114,97,121,38,32,109,105,100,105,78,111,116,101,115,95,41,13,10,32,32,32,32,32,32,32,32,58,32,109,105,100,105,78,111, - 116,101,115,32,40,109,105,100,105,78,111,116,101,115,95,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111, - 111,108,32,97,112,112,108,105,101,115,84,111,78,111,116,101,32,40,99,111,110,115,116,32,105,110,116,32,109,105,100,105,78,111,116,101,78,117,109,98, - 101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,109,105,100,105,78,111,116,101,115,32,91,109,105, - 100,105,78,111,116,101,78,117,109,98,101,114,93,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111,111,108,32,97,112,112,108,105,101, - 115,84,111,67,104,97,110,110,101,108,32,40,99,111,110,115,116,32,105,110,116,32,109,105,100,105,67,104,97,110,110,101,108,41,32,32,32,32,32,32, - 32,32,32,32,32,123,32,114,101,116,117,114,110,32,116,114,117,101,59,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,47, - 47,32,116,104,105,115,32,119,105,108,108,32,99,111,110,116,97,105,110,32,116,104,101,32,110,111,116,101,115,32,116,104,97,116,32,116,104,105,115,32, - 115,111,117,110,100,32,105,115,32,97,116,116,97,99,104,101,100,32,116,111,46,13,10,32,32,32,32,66,105,116,65,114,114,97,121,32,109,105,100,105, - 78,111,116,101,115,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,13,10,115,116,97,116,105,99,32,102,108,111,97,116,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,13,10,123,13,10,32,32,32,32,114, + 101,116,117,114,110,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97, + 116,40,41,32,42,32,51,48,48,46,48,102,32,45,32,49,53,48,46,48,102,59,13,10,125,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,79,117,114,32,100,101,109,111,32,115,121,110,116,104,32,118,111,105, - 99,101,32,106,117,115,116,32,112,108,97,121,115,32,97,32,115,105,110,101,32,119,97,118,101,46,46,13,10,42,47,13,10,99,108,97,115,115,32,83, - 105,110,101,87,97,118,101,86,111,105,99,101,32,32,58,32,112,117,98,108,105,99,32,83,121,110,116,104,101,115,105,115,101,114,86,111,105,99,101,13, - 10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,83,105,110,101,87,97,118,101,86,111,105,99,101,40,41,13,10,32,32,32,32,32,32, - 32,32,58,32,97,110,103,108,101,68,101,108,116,97,32,40,48,46,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,116,97,105,108,79,102,102, - 32,40,48,46,48,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111,111,108,32,99,97,110,80,108,97,121, - 83,111,117,110,100,32,40,83,121,110,116,104,101,115,105,115,101,114,83,111,117,110,100,42,32,115,111,117,110,100,41,13,10,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,100,121,110,97,109,105,99,95,99,97,115,116,32,60,83,105,110,101,87,97,118,101,83,111,117, - 110,100,42,62,32,40,115,111,117,110,100,41,32,33,61,32,48,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,116, - 97,114,116,78,111,116,101,32,40,99,111,110,115,116,32,105,110,116,32,109,105,100,105,78,111,116,101,78,117,109,98,101,114,44,32,99,111,110,115,116, - 32,102,108,111,97,116,32,118,101,108,111,99,105,116,121,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,83,121, - 110,116,104,101,115,105,115,101,114,83,111,117,110,100,42,32,115,111,117,110,100,44,32,99,111,110,115,116,32,105,110,116,32,99,117,114,114,101,110,116, - 80,105,116,99,104,87,104,101,101,108,80,111,115,105,116,105,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,117,114,114, - 101,110,116,65,110,103,108,101,32,61,32,48,46,48,59,13,10,32,32,32,32,32,32,32,32,108,101,118,101,108,32,61,32,118,101,108,111,99,105,116, - 121,32,42,32,48,46,49,53,59,13,10,32,32,32,32,32,32,32,32,116,97,105,108,79,102,102,32,61,32,48,46,48,59,13,10,13,10,32,32,32, - 32,32,32,32,32,100,111,117,98,108,101,32,99,121,99,108,101,115,80,101,114,83,101,99,111,110,100,32,61,32,77,105,100,105,77,101,115,115,97,103, - 101,58,58,103,101,116,77,105,100,105,78,111,116,101,73,110,72,101,114,116,122,32,40,109,105,100,105,78,111,116,101,78,117,109,98,101,114,41,59,13, - 10,32,32,32,32,32,32,32,32,100,111,117,98,108,101,32,99,121,99,108,101,115,80,101,114,83,97,109,112,108,101,32,61,32,99,121,99,108,101,115, - 80,101,114,83,101,99,111,110,100,32,47,32,103,101,116,83,97,109,112,108,101,82,97,116,101,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 97,110,103,108,101,68,101,108,116,97,32,61,32,99,121,99,108,101,115,80,101,114,83,97,109,112,108,101,32,42,32,50,46,48,32,42,32,100,111,117, - 98,108,101,95,80,105,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,116,111,112,78,111,116,101,32,40,99,111,110, - 115,116,32,98,111,111,108,32,97,108,108,111,119,84,97,105,108,79,102,102,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102, - 32,40,97,108,108,111,119,84,97,105,108,79,102,102,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 47,47,32,115,116,97,114,116,32,97,32,116,97,105,108,45,111,102,102,32,98,121,32,115,101,116,116,105,110,103,32,116,104,105,115,32,102,108,97,103, - 46,32,84,104,101,32,114,101,110,100,101,114,32,99,97,108,108,98,97,99,107,32,119,105,108,108,32,112,105,99,107,32,117,112,32,111,110,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,97,110,100,32,100,111,32,97,32,102,97,100,101,32,111,117,116,44,32,99,97, - 108,108,105,110,103,32,99,108,101,97,114,67,117,114,114,101,110,116,78,111,116,101,40,41,32,119,104,101,110,32,105,116,39,115,32,102,105,110,105,115, - 104,101,100,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,97,105,108,79,102,102,32,61,61,32,48,46,48,41,32, - 47,47,32,119,101,32,111,110,108,121,32,110,101,101,100,32,116,111,32,98,101,103,105,110,32,97,32,116,97,105,108,45,111,102,102,32,105,102,32,105, - 116,39,115,32,110,111,116,32,97,108,114,101,97,100,121,32,100,111,105,110,103,32,115,111,32,45,32,116,104,101,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,116,111,112,78,111,116,101,32,109,101,116,104, - 111,100,32,99,111,117,108,100,32,98,101,32,99,97,108,108,101,100,32,109,111,114,101,32,116,104,97,110,32,111,110,99,101,46,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,116,97,105,108,79,102,102,32,61,32,49,46,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32, - 32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,119, - 101,39,114,101,32,98,101,105,110,103,32,116,111,108,100,32,116,111,32,115,116,111,112,32,112,108,97,121,105,110,103,32,105,109,109,101,100,105,97,116, - 101,108,121,44,32,115,111,32,114,101,115,101,116,32,101,118,101,114,121,116,104,105,110,103,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,99,108,101,97,114,67,117,114,114,101,110,116,78,111,116,101,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,110,103,108,101, - 68,101,108,116,97,32,61,32,48,46,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111, - 105,100,32,112,105,116,99,104,87,104,101,101,108,77,111,118,101,100,32,40,99,111,110,115,116,32,105,110,116,32,110,101,119,86,97,108,117,101,41,13, - 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,110,39,116,32,98,101,32,98,111,116,104,101,114,101,100,32,105,109,112, - 108,101,109,101,110,116,105,110,103,32,116,104,105,115,32,102,111,114,32,116,104,101,32,100,101,109,111,33,13,10,32,32,32,32,125,13,10,13,10,32, - 32,32,32,118,111,105,100,32,99,111,110,116,114,111,108,108,101,114,77,111,118,101,100,32,40,99,111,110,115,116,32,105,110,116,32,99,111,110,116,114, - 111,108,108,101,114,78,117,109,98,101,114,44,32,99,111,110,115,116,32,105,110,116,32,110,101,119,86,97,108,117,101,41,13,10,32,32,32,32,123,13, - 10,32,32,32,32,32,32,32,32,47,47,32,110,111,116,32,105,110,116,101,114,101,115,116,101,100,32,105,110,32,99,111,110,116,114,111,108,108,101,114, - 115,32,105,110,32,116,104,105,115,32,99,97,115,101,46,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,110,100,101, - 114,78,101,120,116,66,108,111,99,107,32,40,65,117,100,105,111,83,97,109,112,108,101,66,117,102,102,101,114,38,32,111,117,116,112,117,116,66,117,102, - 102,101,114,44,32,105,110,116,32,115,116,97,114,116,83,97,109,112,108,101,44,32,105,110,116,32,110,117,109,83,97,109,112,108,101,115,41,13,10,32, - 32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,97,110,103,108,101,68,101,108,116,97,32,33,61,32,48,46,48,41,13,10,32,32, - 32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,97,105,108,79,102,102,32,62,32,48,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,45,45,110, - 117,109,83,97,109,112,108,101,115,32,62,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,99,117,114,114,101,110,116,83,97,109,112,108, - 101,32,61,32,40,102,108,111,97,116,41,32,40,115,105,110,32,40,99,117,114,114,101,110,116,65,110,103,108,101,41,32,42,32,108,101,118,101,108,32, - 42,32,116,97,105,108,79,102,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40, - 105,110,116,32,105,32,61,32,111,117,116,112,117,116,66,117,102,102,101,114,46,103,101,116,78,117,109,67,104,97,110,110,101,108,115,40,41,59,32,45, - 45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,111,117,116,112, - 117,116,66,117,102,102,101,114,46,103,101,116,83,97,109,112,108,101,68,97,116,97,32,40,105,44,32,115,116,97,114,116,83,97,109,112,108,101,41,32, - 43,61,32,99,117,114,114,101,110,116,83,97,109,112,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,99,117,114,114,101,110,116,65,110,103,108,101,32,43,61,32,97,110,103,108,101,68,101,108,116,97,59,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,43,43,115,116,97,114,116,83,97,109,112,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,116,97,105,108,79,102,102,32,42,61,32,48,46,57,57,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,105,102,32,40,116,97,105,108,79,102,102,32,60,61,32,48,46,48,48,53,41,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,108, - 101,97,114,67,117,114,114,101,110,116,78,111,116,101,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,97,110,103,108,101,68,101,108,116,97,32,61,32,48,46,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,119,104,105,108,101,32,40,45,45,110,117,109,83,97,109,112,108,101,115,32,62,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32, - 99,117,114,114,101,110,116,83,97,109,112,108,101,32,61,32,40,102,108,111,97,116,41,32,40,115,105,110,32,40,99,117,114,114,101,110,116,65,110,103, - 108,101,41,32,42,32,108,101,118,101,108,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114, - 32,40,105,110,116,32,105,32,61,32,111,117,116,112,117,116,66,117,102,102,101,114,46,103,101,116,78,117,109,67,104,97,110,110,101,108,115,40,41,59, - 32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,111,117, - 116,112,117,116,66,117,102,102,101,114,46,103,101,116,83,97,109,112,108,101,68,97,116,97,32,40,105,44,32,115,116,97,114,116,83,97,109,112,108,101, - 41,32,43,61,32,99,117,114,114,101,110,116,83,97,109,112,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,99,117,114,114,101,110,116,65,110,103,108,101,32,43,61,32,97,110,103,108,101,68,101,108,116,97,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,43,43,115,116,97,114,116,83,97,109,112,108,101,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10, - 13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,100,111,117,98,108,101,32,99,117,114,114,101,110,116,65,110,103,108,101,44,32,97,110,103, - 108,101,68,101,108,116,97,44,32,108,101,118,101,108,44,32,116,97,105,108,79,102,102,59,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,80, + 97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110, + 116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108, + 105,99,32,83,108,105,100,101,114,76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,111,109,98,111,66,111,120,76,105,115,116,101,110,101,114,13,10,123,13,10, + 112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,84,104, - 105,115,32,105,115,32,97,110,32,97,117,100,105,111,32,115,111,117,114,99,101,32,116,104,97,116,32,115,116,114,101,97,109,115,32,116,104,101,32,111, - 117,116,112,117,116,32,111,102,32,111,117,114,32,100,101,109,111,32,115,121,110,116,104,46,13,10,42,47,13,10,99,108,97,115,115,32,83,121,110,116, - 104,65,117,100,105,111,83,111,117,114,99,101,32,32,58,32,112,117,98,108,105,99,32,65,117,100,105,111,83,111,117,114,99,101,13,10,123,13,10,112, - 117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,116,104,105,115,32,99,111,108,108,101,99,116,115,32,114,101,97,108,45, - 116,105,109,101,32,109,105,100,105,32,109,101,115,115,97,103,101,115,32,102,114,111,109,32,116,104,101,32,109,105,100,105,32,105,110,112,117,116,32,100, - 101,118,105,99,101,44,32,97,110,100,13,10,32,32,32,32,47,47,32,116,117,114,110,115,32,116,104,101,109,32,105,110,116,111,32,98,108,111,99,107, - 115,32,116,104,97,116,32,119,101,32,99,97,110,32,112,114,111,99,101,115,115,32,105,110,32,111,117,114,32,97,117,100,105,111,32,99,97,108,108,98, - 97,99,107,13,10,32,32,32,32,77,105,100,105,77,101,115,115,97,103,101,67,111,108,108,101,99,116,111,114,32,109,105,100,105,67,111,108,108,101,99, - 116,111,114,59,13,10,13,10,32,32,32,32,47,47,32,116,104,105,115,32,114,101,112,114,101,115,101,110,116,115,32,116,104,101,32,115,116,97,116,101, - 32,111,102,32,119,104,105,99,104,32,107,101,121,115,32,111,110,32,111,117,114,32,111,110,45,115,99,114,101,101,110,32,107,101,121,98,111,97,114,100, - 32,97,114,101,32,104,101,108,100,13,10,32,32,32,32,47,47,32,100,111,119,110,46,32,87,104,101,110,32,116,104,101,32,109,111,117,115,101,32,105, - 115,32,99,108,105,99,107,101,100,32,111,110,32,116,104,101,32,107,101,121,98,111,97,114,100,32,99,111,109,112,111,110,101,110,116,44,32,116,104,105, - 115,32,111,98,106,101,99,116,32,97,108,115,111,13,10,32,32,32,32,47,47,32,103,101,110,101,114,97,116,101,115,32,109,105,100,105,32,109,101,115, - 115,97,103,101,115,32,102,111,114,32,116,104,105,115,44,32,119,104,105,99,104,32,119,101,32,99,97,110,32,112,97,115,115,32,111,110,32,116,111,32, - 111,117,114,32,115,121,110,116,104,46,13,10,32,32,32,32,77,105,100,105,75,101,121,98,111,97,114,100,83,116,97,116,101,32,107,101,121,98,111,97, - 114,100,83,116,97,116,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104,101,32,115,121,110,116,104,32,105,116,115,101,108,102,33,13,10,32,32, - 32,32,83,121,110,116,104,101,115,105,115,101,114,32,115,121,110,116,104,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,83,121,110,116,104,65, - 117,100,105,111,83,111,117,114,99,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,39,108,108,32,98,101, - 32,109,105,120,105,110,103,32,116,119,111,32,100,105,102,102,101,114,101,110,116,32,116,121,112,101,115,32,111,102,32,115,111,117,110,100,44,32,115,111, - 32,104,101,114,101,32,119,101,39,108,108,32,99,114,101,97,116,101,32,116,119,111,13,10,32,32,32,32,32,32,32,32,47,47,32,115,101,116,115,32, - 111,102,32,110,111,116,101,32,109,97,112,115,44,32,112,117,116,116,105,110,103,32,101,97,99,104,32,115,111,117,110,100,32,111,110,32,97,32,100,105, - 102,102,101,114,101,110,116,32,111,99,116,97,118,101,32,111,102,32,116,104,101,32,107,101,121,98,111,97,114,100,58,13,10,32,32,32,32,32,32,32, - 32,66,105,116,65,114,114,97,121,32,115,105,110,101,119,97,118,101,78,111,116,101,115,44,32,115,97,109,112,108,101,114,78,111,116,101,115,59,13,10, - 13,10,32,32,32,32,32,32,32,32,105,110,116,32,105,59,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32, - 60,32,49,50,56,59,32,43,43,105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40, - 40,40,105,32,47,32,49,50,41,32,38,32,49,41,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115,105, - 110,101,119,97,118,101,78,111,116,101,115,46,115,101,116,66,105,116,32,40,105,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115, - 101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115,97,109,112,108,101,114,78,111,116,101,115,46,115,101,116,66,105,116,32,40, - 105,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,97,32,119,97,118,101,32, - 115,111,117,110,100,44,32,119,104,105,99,104,32,119,105,108,108,32,103,101,116,32,97,112,112,108,105,101,100,32,116,111,32,115,111,109,101,32,111,102, - 32,116,104,101,32,110,111,116,101,115,46,46,13,10,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100,100,83,111,117,110,100,32,40,110,101, - 119,32,83,105,110,101,87,97,118,101,83,111,117,110,100,32,40,115,105,110,101,119,97,118,101,78,111,116,101,115,41,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,47,47,32,103,105,118,101,32,111,117,114,32,115,121,110,116,104,32,97,32,102,101,119,32,118,111,105,99,101,115,32,116,104,97,116, - 32,99,97,110,32,112,108,97,121,32,116,104,101,32,119,97,118,101,32,115,111,117,110,100,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,32, - 40,105,32,61,32,52,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100, - 100,86,111,105,99,101,32,40,110,101,119,32,83,105,110,101,87,97,118,101,86,111,105,99,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,87,97,118,65,117,100,105,111,70,111,114,109,97,116,32,119,97,118,70,111,114,109,97,116,59,13,10,32,32,32,32,32,32,32,32,65,117,100,105, - 111,70,111,114,109,97,116,82,101,97,100,101,114,42,32,97,117,100,105,111,82,101,97,100,101,114,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 61,32,119,97,118,70,111,114,109,97,116,46,99,114,101,97,116,101,82,101,97,100,101,114,70,111,114,32,40,110,101,119,32,77,101,109,111,114,121,73, - 110,112,117,116,83,116,114,101,97,109,32,40,66,105,110,97,114,121,68,97,116,97,58,58,99,101,108,108,111,95,119,97,118,44,13,10,32,32,32,32, + 61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,80,97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109, + 111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,80,97,116,104,115,34,41,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,78,111,32,112,97,114,116,115,32,111,102,32,116,104,105,115,32,99,111,109,112,111,110,101, + 110,116,32,97,114,101,32,115,101,109,105,45,116,114,97,110,115,112,97,114,101,110,116,44,32,115,111,32,99,97,108,108,105,110,103,32,115,101,116,79, + 112,97,113,117,101,40,41,13,10,32,32,32,32,32,32,32,32,47,47,32,97,108,108,111,119,115,32,116,104,101,32,114,101,100,114,97,119,32,115,121, + 115,116,101,109,32,116,111,32,101,120,112,108,111,105,116,32,116,104,105,115,32,102,97,99,116,32,97,110,100,32,111,112,116,105,109,105,115,101,32,114, + 101,112,97,105,110,116,105,110,103,46,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,13, + 10,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,82,97,110,100,111,109,83,104,97,112,101,40,41,59,13,10,32,32,32,32,32,32,32, + 32,103,101,110,101,114,97,116,101,73,109,97,103,101,40,41,59,13,10,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,68,114,97,119,97, + 98,108,101,40,41,59,13,10,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,83,86,71,68,114,97,119,97,98,108,101,40,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,121,112,101,67,104,111,111,115,101,114, + 32,32,32,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120,32,40,84,40,34,116,121,112,101,34,41,41,41,59,13,10,32,32,32,32,32,32, + 32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,99,97,108,101,83,108,105,100,101,114,32,32,32,32,61,32,110,101, + 119,32,83,108,105,100,101,114,32,40,84,40,34,115,99,97,108,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77, + 97,107,101,86,105,115,105,98,108,101,32,40,97,110,103,108,101,83,108,105,100,101,114,32,32,32,32,61,32,110,101,119,32,83,108,105,100,101,114,32, + 40,84,40,34,97,110,103,108,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108, + 101,32,40,120,83,108,105,100,101,114,32,32,32,32,32,32,32,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,120,34,41,41,41, + 59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,121,83,108,105,100,101,114,32,32,32, + 32,32,32,32,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,121,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100, + 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,111,112,97,99,105,116,121,83,108,105,100,101,114,32,32,61,32,110,101,119,32,83,108, + 105,100,101,114,32,40,84,40,34,111,112,97,99,105,116,121,34,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97, + 98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,116,121,112,101,58,34,41,41,41,32,32,32,32,32,45,62,97, + 116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,116,121,112,101,67,104,111,111,115,101,114,44,32,116,114,117,101,41,59,13,10,32, + 32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,115,99,97, + 108,101,58,34,41,41,41,32,32,32,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,115,99,97,108,101,83,108,105, + 100,101,114,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58, + 58,101,109,112,116,121,44,32,84,40,34,97,110,103,108,101,58,34,41,41,41,32,32,32,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111, + 110,101,110,116,32,40,97,110,103,108,101,83,108,105,100,101,114,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32, + 76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,120,32,111,102,102,115,101,116,58,34,41,41,41,32,45, + 62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,120,83,108,105,100,101,114,44,32,116,114,117,101,41,59,13,10,32,32,32, + 32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,121,32,111,102,102, + 115,101,116,58,34,41,41,41,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,121,83,108,105,100,101,114,44,32,116, + 114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121, + 44,32,84,40,34,111,112,97,99,105,116,121,58,34,41,41,41,32,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40, + 111,112,97,99,105,116,121,83,108,105,100,101,114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111, + 111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,115,111,108,105,100,32,99, + 111,108,111,117,114,34,41,44,32,49,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116, + 101,109,32,40,84,40,34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,108,105,110,101,97,114,32,103,114,97,100,105,101,110,116,32,102,105, + 108,108,34,41,44,32,50,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32, + 40,84,40,34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,114,97,100,105,97,108,32,103,114,97,100,105,101,110,116,32,102,105,108,108,34, + 41,44,32,51,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40, + 34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,116,105,108,101,100,32,105,109,97,103,101,32,102,105,108,108,34,41,44,32,56,41,59,13, + 10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32, + 45,32,108,111,119,32,113,117,97,108,105,116,121,34,41,44,32,52,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101, + 114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32,45,32,104,105,103,104,32,113,117,97,108,105,116,121,34,41,44,32,53, + 41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97, + 103,101,32,45,32,99,111,108,111,117,114,45,102,105,108,108,101,100,32,97,108,112,104,97,32,99,104,97,110,110,101,108,34,41,44,32,54,41,59,13, + 10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32, + 45,32,103,114,97,100,105,101,110,116,45,102,105,108,108,101,100,32,97,108,112,104,97,32,99,104,97,110,110,101,108,34,41,44,32,55,41,59,13,10, + 32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32,45, + 32,97,108,112,104,97,109,97,112,45,102,105,108,108,101,100,32,97,108,112,104,97,32,99,104,97,110,110,101,108,34,41,44,32,57,41,59,13,10,32, + 32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,100,114,97,119,97,98,108,101, + 32,111,98,106,101,99,116,34,41,44,32,49,48,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100, + 100,73,116,101,109,32,40,84,40,34,83,86,71,32,111,98,106,101,99,116,34,41,44,32,49,49,41,59,13,10,32,32,32,32,32,32,32,32,116,121, + 112,101,67,104,111,111,115,101,114,45,62,115,101,116,83,101,108,101,99,116,101,100,73,100,32,40,49,49,41,59,13,10,32,32,32,32,32,32,32,32, + 116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,115,99,97,108,101,83,108,105,100,101,114,32,32,32,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13, + 10,32,32,32,32,32,32,32,32,97,110,103,108,101,83,108,105,100,101,114,32,32,32,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104, + 105,115,41,59,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,32,32,32,32,32,32,32,45,62,97,100,100,76,105,115,116,101,110,101, + 114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,32,32,32,32,32,32,32,45,62,97,100,100,76,105, + 115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,111,112,97,99,105,116,121,83,108,105,100,101,114,32,45,62, + 97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,99,97,108,101,83,108,105,100, + 101,114,45,62,115,101,116,82,97,110,103,101,32,40,48,46,48,49,44,32,49,48,46,48,44,32,48,46,48,48,49,41,59,13,10,32,32,32,32,32, + 32,32,32,115,99,97,108,101,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,49,46,48,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,97,110,103,108,101,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,45,49,46,48,44,32,49,46,48,44,32,48,46,48, + 48,49,41,59,13,10,32,32,32,32,32,32,32,32,97,110,103,108,101,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,48,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,45,49,48,44,32,49,48,44,32, + 48,46,48,48,49,41,59,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,48,41,59,13, + 10,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,45,49,48,44,32,49,48,44,32,48, + 46,48,48,49,41,59,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,48,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,48,44,32,49,44, + 32,48,46,48,49,41,59,13,10,32,32,32,32,32,32,32,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101, + 32,40,49,46,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,80,97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109, + 115,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,105,109,97,103,101,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101, + 108,101,116,101,32,100,114,97,119,97,98,108,101,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,118,103,68,114,97,119,97,98, + 108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32, + 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32, + 123,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,67,104,101,99,107,101,114,66,111,97,114,100,32,40,48,44,32,48,44,32,103,101,116, + 87,105,100,116,104,40,41,44,32,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,53,48,44,32,53,48,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,67,111,108,111,117,114,32,40,48,120,102,102,101,48,101,48,101,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13,10,13,10,32,32, + 32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,116,121,112,101,32,61,32,116,121,112,101,67,104,111,111,115,101,114,45,62,103,101,116,83, + 101,108,101,99,116,101,100,73,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,121,112,101,32,61,61,32,49,41,13,10, + 32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111, + 117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100, + 101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,80,97,116, + 104,32,40,115,104,97,112,101,44,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32, + 32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,50,32,124,124,32,116,121,112,101,32,61,61,32,51,41,13, + 10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,71,114,97,100,105,101,110,116,66,114,117,115,104,32,103,98, + 32,40,67,111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105, + 116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,53,102,44,32,103,101,116,72,101,105,103, + 104,116,40,41,32,42,32,48,46,53,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,67,111,108,111,117,114,115,58,58,114,101,100,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99, + 105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,54,102,44,32,103,101,116,72,101,105, + 103,104,116,40,41,32,42,32,48,46,55,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,116,121,112,101,32,61,61,32,51,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,66,114,117, + 115,104,32,40,38,103,98,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,80,97,116,104,32,40,115,104,97,112,101, + 44,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101, + 108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,56,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,73,109,97,103,101,66,114,117,115,104,32,105,98,32,40,105,109,97,103,101,44,32,49,48,48,44,32,49,48,48,44,32,40,102,108,111,97, + 116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,103,46,115,101,116,66,114,117,115,104,32,40,38,105,98,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102, + 105,108,108,80,97,116,104,32,40,115,104,97,112,101,44,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,59,13,10,32,32,32,32,32,32, + 32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,52,32,124,124,32,116,121,112,101,32, + 61,61,32,53,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,121,112,101,32,61, + 61,32,52,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,73,109,97,103,101,82,101,115,97,109,112,108,105, + 110,103,81,117,97,108,105,116,121,32,40,71,114,97,112,104,105,99,115,58,58,108,111,119,82,101,115,97,109,112,108,105,110,103,81,117,97,108,105,116, + 121,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103, + 46,115,101,116,73,109,97,103,101,82,101,115,97,109,112,108,105,110,103,81,117,97,108,105,116,121,32,40,71,114,97,112,104,105,99,115,58,58,109,101, + 100,105,117,109,82,101,115,97,109,112,108,105,110,103,81,117,97,108,105,116,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103, + 46,115,101,116,79,112,97,99,105,116,121,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86, + 97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109, + 97,103,101,84,114,97,110,115,102,111,114,109,101,100,32,40,105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116, + 87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97,110, + 115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87,105, + 100,116,104,40,41,44,32,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,66,105,110,97,114,121,68,97,116,97,58,58,99,101,108,108,111,95,119,97, - 118,83,105,122,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,97,108,115,101,41,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100,100,83,111,117,110,100,32,40,110,101,119,32, - 83,97,109,112,108,101,114,83,111,117,110,100,32,40,84,40,34,100,101,109,111,32,115,111,117,110,100,34,41,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,97,117,100,105,111, - 82,101,97,100,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,115,97,109,112,108,101,114,78,111,116,101,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,55,52,44,32,32,32,47,47,32,114,111,111, - 116,32,109,105,100,105,32,110,111,116,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,46,49,44,32,32,47,47,32,97,116,116,97,99,107,32,116,105,109,101,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48, - 46,49,44,32,32,47,47,32,114,101,108,101,97,115,101,32,116,105,109,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,48,46,48,32,32,47,47,32,109,97,120,105,109,117,109, - 32,115,97,109,112,108,101,32,108,101,110,103,116,104,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32, - 97,117,100,105,111,82,101,97,100,101,114,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,103,105,118,101,32,116,104,101,32, - 115,121,110,116,104,32,115,111,109,101,32,115,97,109,112,108,101,114,32,118,111,105,99,101,115,32,116,111,32,112,108,97,121,32,116,104,101,32,115,97, - 109,112,108,101,100,32,115,111,117,110,100,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,32,61,32,52,59,32,45,45,105,32,62, - 61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100,100,86,111,105,99,101,32,40,110,101,119,32,83, - 97,109,112,108,101,114,86,111,105,99,101,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,114,101,112,97, - 114,101,84,111,80,108,97,121,32,40,105,110,116,32,115,97,109,112,108,101,115,80,101,114,66,108,111,99,107,69,120,112,101,99,116,101,100,44,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,111,117,98,108,101,32,115,97,109,112,108,101,82,97,116, - 101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,109,105,100,105,67,111,108,108,101,99,116,111,114,46,114,101,115,101,116,32,40, - 115,97,109,112,108,101,82,97,116,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,121,110,116,104,46,115,101,116,67,117,114,114,101,110,116, - 80,108,97,121,98,97,99,107,83,97,109,112,108,101,82,97,116,101,32,40,115,97,109,112,108,101,82,97,116,101,41,59,13,10,32,32,32,32,125,13, - 10,13,10,32,32,32,32,118,111,105,100,32,114,101,108,101,97,115,101,82,101,115,111,117,114,99,101,115,40,41,13,10,32,32,32,32,123,13,10,32, - 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,116,78,101,120,116,65,117,100,105,111,66,108,111,99,107,32,40,99,111,110,115, - 116,32,65,117,100,105,111,83,111,117,114,99,101,67,104,97,110,110,101,108,73,110,102,111,38,32,98,117,102,102,101,114,84,111,70,105,108,108,41,13, - 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,115,121,110,116,104,32,97,108,119,97,121,115,32,97,100,100,115, - 32,105,116,115,32,111,117,116,112,117,116,32,116,111,32,116,104,101,32,97,117,100,105,111,32,98,117,102,102,101,114,44,32,115,111,32,119,101,32,104, - 97,118,101,32,116,111,32,99,108,101,97,114,32,105,116,13,10,32,32,32,32,32,32,32,32,47,47,32,102,105,114,115,116,46,46,13,10,32,32,32, - 32,32,32,32,32,98,117,102,102,101,114,84,111,70,105,108,108,46,99,108,101,97,114,65,99,116,105,118,101,66,117,102,102,101,114,82,101,103,105,111, - 110,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,102,105,108,108,32,97,32,109,105,100,105,32,98,117,102,102,101,114,32,119,105, - 116,104,32,105,110,99,111,109,105,110,103,32,109,101,115,115,97,103,101,115,32,102,114,111,109,32,116,104,101,32,109,105,100,105,32,105,110,112,117,116, - 46,13,10,32,32,32,32,32,32,32,32,77,105,100,105,66,117,102,102,101,114,32,105,110,99,111,109,105,110,103,77,105,100,105,59,13,10,32,32,32, - 32,32,32,32,32,109,105,100,105,67,111,108,108,101,99,116,111,114,46,114,101,109,111,118,101,78,101,120,116,66,108,111,99,107,79,102,77,101,115,115, - 97,103,101,115,32,40,105,110,99,111,109,105,110,103,77,105,100,105,44,32,98,117,102,102,101,114,84,111,70,105,108,108,46,110,117,109,83,97,109,112, - 108,101,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,112,97,115,115,32,116,104,101,115,101,32,109,101,115,115,97,103,101,115,32, - 116,111,32,116,104,101,32,107,101,121,98,111,97,114,100,32,115,116,97,116,101,32,115,111,32,116,104,97,116,32,105,116,32,99,97,110,32,117,112,100, - 97,116,101,32,116,104,101,32,99,111,109,112,111,110,101,110,116,13,10,32,32,32,32,32,32,32,32,47,47,32,116,111,32,115,104,111,119,32,111,110, - 45,115,99,114,101,101,110,32,119,104,105,99,104,32,107,101,121,115,32,97,114,101,32,98,101,105,110,103,32,112,114,101,115,115,101,100,32,111,110,32, - 116,104,101,32,112,104,121,115,105,99,97,108,32,109,105,100,105,32,107,101,121,98,111,97,114,100,46,13,10,32,32,32,32,32,32,32,32,47,47,32, - 84,104,105,115,32,99,97,108,108,32,119,105,108,108,32,97,108,115,111,32,97,100,100,32,109,105,100,105,32,109,101,115,115,97,103,101,115,32,116,111, - 32,116,104,101,32,98,117,102,102,101,114,32,119,104,105,99,104,32,119,101,114,101,32,103,101,110,101,114,97,116,101,100,32,98,121,13,10,32,32,32, - 32,32,32,32,32,47,47,32,116,104,101,32,109,111,117,115,101,45,99,108,105,99,107,105,110,103,32,111,110,32,116,104,101,32,111,110,45,115,99,114, - 101,101,110,32,107,101,121,98,111,97,114,100,46,13,10,32,32,32,32,32,32,32,32,107,101,121,98,111,97,114,100,83,116,97,116,101,46,112,114,111, - 99,101,115,115,78,101,120,116,77,105,100,105,66,117,102,102,101,114,32,40,105,110,99,111,109,105,110,103,77,105,100,105,44,32,48,44,32,98,117,102, - 102,101,114,84,111,70,105,108,108,46,110,117,109,83,97,109,112,108,101,115,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 47,47,32,97,110,100,32,110,111,119,32,103,101,116,32,116,104,101,32,115,121,110,116,104,32,116,111,32,112,114,111,99,101,115,115,32,116,104,101,32, - 109,105,100,105,32,101,118,101,110,116,115,32,97,110,100,32,103,101,110,101,114,97,116,101,32,105,116,115,32,111,117,116,112,117,116,46,13,10,32,32, - 32,32,32,32,32,32,115,121,110,116,104,46,114,101,110,100,101,114,78,101,120,116,66,108,111,99,107,32,40,42,98,117,102,102,101,114,84,111,70,105, - 108,108,46,98,117,102,102,101,114,44,32,105,110,99,111,109,105,110,103,77,105,100,105,44,32,48,44,32,98,117,102,102,101,114,84,111,70,105,108,108, - 46,110,117,109,83,97,109,112,108,101,115,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,65,117,100,105, - 111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110, - 116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112, - 117,98,108,105,99,32,84,105,109,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,65,117,100,105,111,73,79,68,101,118,105,99,101,67,97,108,108,98,97,99,107,13,10,123, - 13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,65,117,100,105,111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121, - 40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,98,117,102,102,101,114,80,111,115,32,61,32,48,59,13,10,32,32,32,32,32, - 32,32,32,98,117,102,102,101,114,83,105,122,101,32,61,32,50,48,52,56,59,13,10,32,32,32,32,32,32,32,32,99,105,114,99,117,108,97,114,66, - 117,102,102,101,114,32,61,32,40,102,108,111,97,116,42,41,32,106,117,99,101,95,99,97,108,108,111,99,32,40,115,105,122,101,111,102,32,40,102,108, - 111,97,116,41,32,42,32,98,117,102,102,101,114,83,105,122,101,41,59,13,10,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,73,110,112,117, - 116,76,101,118,101,108,32,61,32,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,110,117,109,83,97,109,112,108,101,115,73,110,32,61,32,48, - 59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32, - 115,116,97,114,116,84,105,109,101,114,32,40,49,48,48,48,32,47,32,53,48,41,59,32,32,47,47,32,114,101,112,97,105,110,116,32,101,118,101,114, - 121,32,49,47,53,48,32,111,102,32,97,32,115,101,99,111,110,100,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,65,117,100,105,111,73, - 110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,106,117, - 99,101,95,102,114,101,101,32,40,99,105,114,99,117,108,97,114,66,117,102,102,101,114,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, - 118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46, - 115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116,103,114,101,101,110,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,104,97,108,102,72,101,105,103,104,116,32,61,32,103,101,116,72,101,105,103,104,116,40,41, - 32,42,32,48,46,53,102,59,13,10,13,10,32,32,32,32,32,32,32,32,105,110,116,32,98,112,32,61,32,98,117,102,102,101,114,80,111,115,59,13, - 10,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,120,32,61,32,103,101,116,87,105,100,116,104,40,41,59,32,45,45,120,32, - 62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116, - 32,115,97,109,112,108,101,115,65,103,111,32,61,32,103,101,116,87,105,100,116,104,40,41,32,45,32,120,59,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,108,101,118,101,108,32,61,32,99,105,114,99,117,108,97,114,66,117,102,102,101,114,32,91,40, - 98,112,32,43,32,98,117,102,102,101,114,83,105,122,101,32,45,32,115,97,109,112,108,101,115,65,103,111,41,32,37,32,98,117,102,102,101,114,83,105, - 122,101,93,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,108,101,118,101,108,32,62,32,48,46,48,49,102,41,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,76,105,110,101,32,40,40,102,108,111,97,116,41,32,120,44,32,104, - 97,108,102,72,101,105,103,104,116,32,45,32,104,97,108,102,72,101,105,103,104,116,32,42,32,108,101,118,101,108,44,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,102,108,111,97,116,41,32,120,44,32,104,97,108,102,72,101,105,103, - 104,116,32,43,32,104,97,108,102,72,101,105,103,104,116,32,42,32,108,101,118,101,108,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32, - 32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,100, - 100,83,97,109,112,108,101,32,40,99,111,110,115,116,32,102,108,111,97,116,32,115,97,109,112,108,101,41,13,10,32,32,32,32,123,13,10,32,32,32, - 32,32,32,32,32,99,117,114,114,101,110,116,73,110,112,117,116,76,101,118,101,108,32,43,61,32,102,97,98,115,102,32,40,115,97,109,112,108,101,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,115,97,109,112,108,101,115,84,111,65,118,101,114,97,103,101,32, - 61,32,49,50,56,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,43,43,110,117,109,83,97,109,112,108,101,115,73,110,32,62,32,115, - 97,109,112,108,101,115,84,111,65,118,101,114,97,103,101,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,99,105,114,99,117,108,97,114,66,117,102,102,101,114,32,91,98,117,102,102,101,114,80,111,115,43,43,32,37,32,98,117,102,102,101,114,83,105,122, - 101,93,32,61,32,99,117,114,114,101,110,116,73,110,112,117,116,76,101,118,101,108,32,47,32,115,97,109,112,108,101,115,84,111,65,118,101,114,97,103, - 101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,117,109,83,97,109,112,108,101,115,73,110,32,61,32,48,59,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,73,110,112,117,116,76,101,118,101,108,32,61,32,48,46,48,102,59,13,10,32,32,32,32, - 32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,73,79,67,97, - 108,108,98,97,99,107,32,40,99,111,110,115,116,32,102,108,111,97,116,42,42,32,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,116,111,116, - 97,108,78,117,109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,42,42,32,111,117,116,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,116,111,116, - 97,108,78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,110,117,109,83,97,109,112,108,101,115,41,13,10,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,48,59,32,105,32,60,32,116,111,116,97,108,78,117,109,73,110,112,117,116,67, - 104,97,110,110,101,108,115,59,32,43,43,105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102, - 32,40,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,32,91,105,93,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,106,32,61,32,48,59,32,106,32,60, - 32,110,117,109,83,97,109,112,108,101,115,59,32,43,43,106,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97, - 100,100,83,97,109,112,108,101,32,40,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,32,91,105,93,91,106,93,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32, - 32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,65,98, - 111,117,116,84,111,83,116,97,114,116,32,40,65,117,100,105,111,73,79,68,101,118,105,99,101,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,122,101,114,111,109,101,109,32,40,99,105,114,99,117,108,97,114,66,117,102,102,101,114,44,32,115,105,122,101,111,102,32,40,102,108,111, - 97,116,41,32,42,32,98,117,102,102,101,114,83,105,122,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,117, - 100,105,111,68,101,118,105,99,101,83,116,111,112,112,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,122,101,114,111,109, - 101,109,32,40,99,105,114,99,117,108,97,114,66,117,102,102,101,114,44,32,115,105,122,101,111,102,32,40,102,108,111,97,116,41,32,42,32,98,117,102, - 102,101,114,83,105,122,101,41,59,13,10,32,32,32,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,102,108,111,97,116,42, - 32,99,105,114,99,117,108,97,114,66,117,102,102,101,114,59,13,10,32,32,32,32,102,108,111,97,116,32,99,117,114,114,101,110,116,73,110,112,117,116, - 76,101,118,101,108,59,13,10,32,32,32,32,105,110,116,32,118,111,108,97,116,105,108,101,32,98,117,102,102,101,114,80,111,115,44,32,98,117,102,102, - 101,114,83,105,122,101,44,32,110,117,109,83,97,109,112,108,101,115,73,110,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,65, - 117,100,105,111,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,76,105,115,116,101,110, - 101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115, - 116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,104,97,110,103,101, - 76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,65,117,100, - 105,111,73,79,68,101,118,105,99,101,67,97,108,108,98,97,99,107,13,10,123,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,70,105,108,101,110,97,109, - 101,67,111,109,112,111,110,101,110,116,42,32,102,105,108,101,67,104,111,111,115,101,114,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110, - 42,32,112,108,97,121,66,117,116,116,111,110,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,115,116,111,112,66,117,116,116,111, - 110,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,97,117,100,105,111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,59, - 13,10,13,10,32,32,32,32,77,105,100,105,75,101,121,98,111,97,114,100,67,111,109,112,111,110,101,110,116,42,32,107,101,121,98,111,97,114,100,67, - 111,109,112,111,110,101,110,116,59,13,10,32,32,32,32,65,117,100,105,111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121, - 42,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,116,104,105, - 115,32,119,114,97,112,115,32,116,104,101,32,97,99,116,117,97,108,32,97,117,100,105,111,32,100,101,118,105,99,101,13,10,32,32,32,32,65,117,100, - 105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,59,13,10,13,10,32, - 32,32,32,47,47,32,116,104,105,115,32,97,108,108,111,119,115,32,97,110,32,97,117,100,105,111,32,115,111,117,114,99,101,32,116,111,32,98,101,32, - 115,116,114,101,97,109,101,100,32,116,111,32,116,104,101,32,73,79,32,100,101,118,105,99,101,13,10,32,32,32,32,65,117,100,105,111,83,111,117,114, - 99,101,80,108,97,121,101,114,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,59,13,10,13,10,32,32,32,32,47,47,32,116,104, - 105,115,32,99,111,110,116,114,111,108,115,32,116,104,101,32,112,108,97,121,98,97,99,107,32,111,102,32,97,32,112,111,115,105,116,105,111,110,97,98, - 108,101,32,97,117,100,105,111,32,115,116,114,101,97,109,44,32,104,97,110,100,108,105,110,103,32,116,104,101,13,10,32,32,32,32,47,47,32,115,116, - 97,114,116,105,110,103,47,115,116,111,112,112,105,110,103,32,97,110,100,32,115,97,109,112,108,101,45,114,97,116,101,32,99,111,110,118,101,114,115,105, - 111,110,13,10,32,32,32,32,65,117,100,105,111,84,114,97,110,115,112,111,114,116,83,111,117,114,99,101,32,116,114,97,110,115,112,111,114,116,83,111, - 117,114,99,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104,105,115,32,115,111,117,114,99,101,32,99,111,110,116,97,105,110,115,32,111,117,114, - 32,115,121,110,116,104,44,32,97,110,100,32,103,101,110,101,114,97,116,101,115,32,105,116,115,32,111,117,116,112,117,116,13,10,32,32,32,32,83,121, - 110,116,104,65,117,100,105,111,83,111,117,114,99,101,32,115,121,110,116,104,83,111,117,114,99,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104, - 105,115,32,115,111,117,114,99,101,32,105,115,32,117,115,101,100,32,116,111,32,109,105,120,32,116,111,103,101,116,104,101,114,32,116,104,101,32,111,117, - 116,112,117,116,32,102,114,111,109,32,111,117,114,32,115,121,110,116,104,32,115,111,117,114,99,101,13,10,32,32,32,32,47,47,32,97,110,100,32,119, - 97,118,101,32,112,108,97,121,101,114,32,115,111,117,114,99,101,13,10,32,32,32,32,77,105,120,101,114,65,117,100,105,111,83,111,117,114,99,101,32, - 109,105,120,101,114,83,111,117,114,99,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,116,104,101,32,97,99,116,117,97, - 108,32,115,116,114,101,97,109,32,116,104,97,116,39,115,32,103,111,105,110,103,32,116,111,32,114,101,97,100,32,102,114,111,109,32,116,104,101,32,97, - 117,100,105,111,32,102,105,108,101,46,13,10,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,82,101,97,100,101,114,83,111,117,114,99,101,42, - 32,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,59,13,10,13,10,32,32,32,32,70,105,108,101,32,99,117,114, - 114,101,110,116,70,105,108,101,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,65,117,100,105,111,68,101,109, - 111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,65,117,100,105,111,34,41,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,32,61,32,48,59, - 13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,77,97,110,97,103,101,114, - 32,102,111,114,109,97,116,77,97,110,97,103,101,114,59,13,10,32,32,32,32,32,32,32,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,114, - 101,103,105,115,116,101,114,66,97,115,105,99,70,111,114,109,97,116,115,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100, - 77,97,107,101,86,105,115,105,98,108,101,32,40,102,105,108,101,67,104,111,111,115,101,114,32,61,32,110,101,119,32,70,105,108,101,110,97,109,101,67, - 111,109,112,111,110,101,110,116,32,40,84,40,34,97,117,100,105,111,102,105,108,101,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 46,102,111,108,108,111,119,101,100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,97,108,115,101,41,59,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105, + 102,32,40,116,121,112,101,32,61,61,32,54,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46, + 115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111, + 97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109,97,103,101,84,114,97,110,115,102,111,114,109,101,100,32,40, + 105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62, + 103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105, + 111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44,32,45,48,46,53,102,32,42,32,105, + 109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101,100,66,121,32,40,103,101,116, + 84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32, + 32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,55,41,13,10,32,32, + 32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,71,114,97,100,105,101,110,116,66,114,117,115,104,32,103,98,32,40,67, + 111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83, + 108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,53,102,44,32,103,101,116,72,101,105,103,104,116,40, + 41,32,42,32,48,46,53,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,67,111,108,111,117,114,115,58,58,114,101,100,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121, + 83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,54,102,44,32,103,101,116,72,101,105,103,104,116, + 40,41,32,42,32,48,46,55,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,66,114,117,115,104,32,40,38,103,98, + 41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109,97,103,101,84,114,97, + 110,115,102,111,114,109,101,100,32,40,105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40, + 41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58, + 58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44, + 32,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111, + 119,101,100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101, + 32,61,61,32,57,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,73,109,97,103,101,66,114,117,115, + 104,32,105,98,32,40,105,109,97,103,101,44,32,49,48,48,44,32,49,48,48,44,32,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108, + 105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,66,114,117, + 115,104,32,40,38,105,98,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73, + 109,97,103,101,84,114,97,110,115,102,111,114,109,101,100,32,40,105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101, + 116,87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97, + 110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87, + 105,100,116,104,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,45, + 48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101, + 100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61, + 61,32,49,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,79,112,97,99,105, + 116,121,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13, + 10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,119,44,32,104,59,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,100,114,97,119,97,98,108,101,45,62,103,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,119,44,32,104,41,59,13, + 10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,114,97,119,97,98,108,101,45,62,100,114,97,119,32,40,103,44,32,65,102,102,105,110,101, + 84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,120,32,45,32,48,46,53,102,32,42,32,119,44,13,10, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,110,111,110,101,120,105,115,116,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,45,121,32,45,32,48,46,53,102,32,42,32,104,41,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101,100,66,121, + 32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32, + 101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,49,49,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,103,46,115,101,116,79,112,97,99,105,116,121,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114, + 45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,32,120,44,32,121, + 44,32,119,44,32,104,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119,97,98,108,101,45,62,103,101,116,66,111,117, + 110,100,115,32,40,120,44,32,121,44,32,119,44,32,104,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119, + 97,98,108,101,45,62,100,114,97,119,32,40,103,44,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116, + 105,111,110,32,40,45,120,32,45,32,48,46,53,102,32,42,32,119,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,32,102,97,108,115,101,44,32,102,97,108,115,101,44,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,103,101,116,87,105,108, - 100,99,97,114,100,70,111,114,65,108,108,70,111,114,109,97,116,115,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,83,116,114,105,110,103,58,58,101,109,112,116,121,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,84,40,34,40,99,104,111,111,115,101,32,97,32,87,65,86,32,111,114,32,65,73,70,70,32,102,105,108,101,32,116,111,32, - 112,108,97,121,41,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,97,100,100,76,105,115,116, - 101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,115,101,116,66,114, - 111,119,115,101,66,117,116,116,111,110,84,101,120,116,32,40,84,40,34,98,114,111,119,115,101,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,112,108,97,121,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120, - 116,66,117,116,116,111,110,32,40,84,40,34,112,108,97,121,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34, - 99,108,105,99,107,32,104,101,114,101,32,116,111,32,112,108,97,121,32,116,104,101,32,99,117,114,114,101,110,116,32,97,117,100,105,111,32,102,105,108, - 101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115, - 116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116,67,111, - 108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114, - 115,58,58,108,105,103,104,116,103,114,101,101,110,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116, - 67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,79,110,67,111,108,111,117,114,73,100,44,32,67,111, - 108,111,117,114,115,58,58,108,105,103,104,116,103,114,101,101,110,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45, - 62,115,101,116,67,111,110,110,101,99,116,101,100,69,100,103,101,115,32,40,66,117,116,116,111,110,58,58,67,111,110,110,101,99,116,101,100,79,110,82, - 105,103,104,116,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,116,111, - 112,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,115,116,111,112,34,41,44,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,99,108,105,99,107,32,104,101,114,101,32,116,111,32,112,108,97,121,32,116,104,101,32, - 99,117,114,114,101,110,116,32,97,117,100,105,111,32,102,105,108,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116, - 116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32, - 115,116,111,112,66,117,116,116,111,110,45,62,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111, - 110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,114,101,100,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66, - 117,116,116,111,110,45,62,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,79,110,67,111, - 108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,114,101,100,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116,116, - 111,110,45,62,115,101,116,67,111,110,110,101,99,116,101,100,69,100,103,101,115,32,40,66,117,116,116,111,110,58,58,67,111,110,110,101,99,116,101,100, - 79,110,76,101,102,116,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,97, - 117,100,105,111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34, - 115,104,111,119,32,97,117,100,105,111,32,115,101,116,116,105,110,103,115,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,99,108,105,99,107,32,104,101,114,101,32,116,111,32,99,104,97,110,103,101,32,116,104,101,32, - 97,117,100,105,111,32,100,101,118,105,99,101,32,115,101,116,116,105,110,103,115,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,117,100,105, - 111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,107,101,121,98,111,97,114, - 100,67,111,109,112,111,110,101,110,116,32,61,32,110,101,119,32,77,105,100,105,75,101,121,98,111,97,114,100,67,111,109,112,111,110,101,110,116,32,40, - 115,121,110,116,104,83,111,117,114,99,101,46,107,101,121,98,111,97,114,100,83,116,97,116,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,77,105,100,105,75,101,121,98,111,97,114,100,67,111,109,112,111,110, - 101,110,116,58,58,104,111,114,105,122,111,110,116,97,108,75,101,121,98,111,97,114,100,41,41,59,13,10,13,10,13,10,32,32,32,32,32,32,32,32, - 97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,32,61,32,110, - 101,119,32,65,117,100,105,111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121,40,41,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,114,101,103,105,115,116,101,114,32,102,111,114,32,115,116,97,114,116,47,115,116,111,112, - 32,109,101,115,115,97,103,101,115,32,102,114,111,109,32,116,104,101,32,116,114,97,110,115,112,111,114,116,32,115,111,117,114,99,101,46,46,13,10,32, - 32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,97,100,100,67,104,97,110,103,101,76,105,115,116,101,110,101,114, - 32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,105,110,105,116,105,97,108,105,115,101,32,116,104, - 101,32,100,101,118,105,99,101,32,109,97,110,97,103,101,114,32,119,105,116,104,32,110,111,32,115,101,116,116,105,110,103,115,32,115,111,32,116,104,97, - 116,32,105,116,32,112,105,99,107,115,32,97,13,10,32,32,32,32,32,32,32,32,47,47,32,100,101,102,97,117,108,116,32,100,101,118,105,99,101,32, - 116,111,32,117,115,101,46,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,101,114,114,111,114,32,40,97,117,100, - 105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,105,110,105,116,105,97,108,105,115,101,32,40,49,44,32,47,42,32,110,117,109,98,101,114, - 32,111,102,32,105,110,112,117,116,32,99,104,97,110,110,101,108,115,32,42,47,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,50,44,32,47,42,32,110,117,109,98,101,114,32,111,102,32,111,117,116,112,117,116,32,99,104,97,110,110,101,108,115,32,42,47,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,47,42,32,110,111,32,88,77,76,32,115,101,116,116,105,110,103,115,46,46, - 32,42,47,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,32,32,47,42,32,115,101,108,101,99,116,32, - 100,101,102,97,117,108,116,32,100,101,118,105,99,101,32,111,110,32,102,97,105,108,117,114,101,32,42,47,41,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,105,102,32,40,101,114,114,111,114,46,105,115,78,111,116,69,109,112,116,121,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40, - 65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,65,117,100,105,111,32,68,101,109, - 111,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,84,40,34,67,111,117,108,100,110,39,116,32,111,112,101,110,32,97,110,32,111,117,116,112,117,116,32,100,101,118,105,99,101, - 33,92,110,92,110,34,41,32,43,32,101,114,114,111,114,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108, - 115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,116,104,101,32,116,119, - 111,32,97,117,100,105,111,32,115,111,117,114,99,101,115,32,116,111,32,111,117,114,32,109,105,120,101,114,46,46,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,109,105,120,101,114,83,111,117,114,99,101,46,97,100,100,73,110,112,117,116,83,111,117,114,99,101,32,40,38,116,114,97,110,115,112,111, - 114,116,83,111,117,114,99,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,105,120,101,114,83,111,117,114, - 99,101,46,97,100,100,73,110,112,117,116,83,111,117,114,99,101,32,40,38,115,121,110,116,104,83,111,117,114,99,101,44,32,102,97,108,115,101,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,46,46,97,110,100,32,99,111,110,110,101,99,116,32,116,104,101,32,109,105,120, - 101,114,32,116,111,32,111,117,114,32,115,111,117,114,99,101,32,112,108,97,121,101,114,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,117, - 100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,46,115,101,116,83,111,117,114,99,101,32,40,38,109,105,120,101,114,83,111,117,114,99,101,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,116,97,114,116,32,116,104,101,32,73,79,32,100,101,118,105,99,101,32, - 112,117,108,108,105,110,103,32,105,116,115,32,100,97,116,97,32,102,114,111,109,32,111,117,114,32,99,97,108,108,98,97,99,107,46,46,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,115,101,116,65,117,100,105,111,67,97,108, - 108,98,97,99,107,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,119,101,32,110, - 101,101,100,32,116,111,32,115,101,110,100,32,109,105,100,105,32,105,110,112,117,116,32,116,111,32,111,117,114,32,115,121,110,116,104,32,102,111,114,32, - 112,114,111,99,101,115,115,105,110,103,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103, - 101,114,46,97,100,100,77,105,100,105,73,110,112,117,116,67,97,108,108,98,97,99,107,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32, - 38,115,121,110,116,104,83,111,117,114,99,101,46,109,105,100,105,67,111,108,108,101,99,116,111,114,41,59,13,10,32,32,32,32,32,32,32,32,125,13, - 10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,65,117,100,105,111,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,114,101,109,111,118,101,77,105,100,105,73,110,112,117,116,67,97,108, - 108,98,97,99,107,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,38,115,121,110,116,104,83,111,117,114,99,101,46,109,105,100,105,67, - 111,108,108,101,99,116,111,114,41,59,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,115, - 101,116,65,117,100,105,111,67,97,108,108,98,97,99,107,32,40,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114, - 116,83,111,117,114,99,101,46,114,101,109,111,118,101,67,104,97,110,103,101,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,101,116,83,111,117,114,99,101,32,40,48,41,59,13,10, - 32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111,32,40,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83, - 111,117,114,99,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,46,115,101,116, - 83,111,117,114,99,101,32,40,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110, - 40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101, - 73,79,67,97,108,108,98,97,99,107,32,40,99,111,110,115,116,32,102,108,111,97,116,42,42,32,105,110,112,117,116,67,104,97,110,110,101,108,68,97, - 116,97,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116, - 32,116,111,116,97,108,78,117,109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,42,42,32,111,117,116,112,117,116,67,104,97,110,110,101,108,68,97, - 116,97,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116, - 32,116,111,116,97,108,78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,110,117,109,83,97,109,112,108,101,115,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,47,47,32,112,97,115,115,32,116,104,101,32,97,117,100,105,111,32,99,97,108,108,98,97,99,107,32,111,110,32, - 116,111,32,111,117,114,32,112,108,97,121,101,114,32,115,111,117,114,99,101,44,32,97,110,100,32,97,108,115,111,32,116,104,101,32,119,97,118,101,102, - 111,114,109,32,100,105,115,112,108,97,121,32,99,111,109,112,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97, - 121,101,114,46,97,117,100,105,111,68,101,118,105,99,101,73,79,67,97,108,108,98,97,99,107,32,40,105,110,112,117,116,67,104,97,110,110,101,108,68, - 97,116,97,44,32,116,111,116,97,108,78,117,109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,32,111,117,116,112,117,116,67,104,97,110,110,101, - 108,68,97,116,97,44,32,116,111,116,97,108,78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,32,110,117,109,83,97,109,112,108,101, - 115,41,59,13,10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,97,117,100,105,111,68,101,118, - 105,99,101,73,79,67,97,108,108,98,97,99,107,32,40,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,32,116,111,116,97,108,78,117, - 109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,32,111,117,116,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,32,116,111,116,97,108, - 78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,32,110,117,109,83,97,109,112,108,101,115,41,59,13,10,32,32,32,32,125,13,10, - 13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,65,98,111,117,116,84,111,83,116,97,114,116,32,40,65,117,100,105, - 111,73,79,68,101,118,105,99,101,42,32,100,101,118,105,99,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111, - 83,111,117,114,99,101,80,108,97,121,101,114,46,97,117,100,105,111,68,101,118,105,99,101,65,98,111,117,116,84,111,83,116,97,114,116,32,40,100,101, - 118,105,99,101,41,59,13,10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,97,117,100,105,111, - 68,101,118,105,99,101,65,98,111,117,116,84,111,83,116,97,114,116,32,40,100,101,118,105,99,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32, - 32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,83,116,111,112,112,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32, - 32,32,32,32,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,46,97,117,100,105,111,68,101,118,105,99,101,83,116,111,112,112,101, - 100,40,41,59,13,10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,97,117,100,105,111,68,101, - 118,105,99,101,83,116,111,112,112,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,118,111,105,100,32, - 112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,112, - 114,105,110,116,32,115,111,109,101,32,116,101,120,116,32,116,111,32,101,120,112,108,97,105,110,32,119,104,97,116,32,115,116,97,116,101,32,119,101,39, - 114,101,32,105,110,46,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58, - 98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,49,52,46,48,102,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,83,116,114,105,110,103,32,115,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,114,97,110,115,112,111,114, - 116,83,111,117,114,99,101,46,105,115,80,108,97,121,105,110,103,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,32,61,32,84,40, - 34,112,108,97,121,105,110,103,34,41,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115, - 32,61,32,84,40,34,115,116,111,112,112,101,100,34,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,99,117,114,114,101,110,116,65, - 117,100,105,111,70,105,108,101,83,111,117,114,99,101,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,32,43,61,32,84, - 40,34,32,45,32,110,111,32,115,111,117,114,99,101,32,102,105,108,101,32,115,101,108,101,99,116,101,100,34,41,59,13,10,32,32,32,32,32,32,32, - 32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,32,43,61,32,84,40,34,32,45,32,102,105,108,101,58,32,92,34,34,41, - 32,43,32,99,117,114,114,101,110,116,70,105,108,101,46,103,101,116,70,117,108,108,80,97,116,104,78,97,109,101,40,41,32,43,32,84,40,34,92,34, - 34,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120,116,32,40,115,44,32,50,53,48,44,32,53,48,44,32,103, - 101,116,87,105,100,116,104,40,41,32,45,32,50,53,48,44,32,50,52,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116, - 114,101,100,76,101,102,116,44,32,116,114,117,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122, - 101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,115,101,116,66,111,117, - 110,100,115,32,40,49,48,44,32,49,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,48,44,32,50,52,41,59,13,10,32,32,32,32, - 32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,53,48,44,32,49,48,48,44,32, - 50,52,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,49,48, - 44,32,53,48,44,32,49,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,83,101,116,116,105,110,103,115,66,117, - 116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,49,50,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32, - 32,32,32,32,32,97,117,100,105,111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70, - 105,116,84,101,120,116,40,41,59,13,10,32,32,32,32,32,32,32,32,107,101,121,98,111,97,114,100,67,111,109,112,111,110,101,110,116,45,62,115,101, - 116,66,111,117,110,100,115,32,40,49,48,44,32,50,48,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,48,44,32,54,48,41,59,13, - 10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,115,101,116,66,111,117,110,100,115,32,40,49, - 48,44,32,51,48,48,44,32,52,48,48,44,32,56,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,66,117,116,116,111, - 110,115,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,117,112,100,97,116,101,66,117,116,116,111,110,115,40,41, - 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116,69,110,97,98,108,101,100,32, - 40,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,32,33,61,32,48,32,38,38,32,33,32,116,114,97,110,115,112, - 111,114,116,83,111,117,114,99,101,46,105,115,80,108,97,121,105,110,103,40,41,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116, - 116,111,110,45,62,115,101,116,69,110,97,98,108,101,100,32,40,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,105,115,80,108,97,121,105, - 110,103,40,41,41,59,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32, - 32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,112,108,97,121,66,117,116,116,111,110,41,13,10, - 32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115, - 101,116,80,111,115,105,116,105,111,110,32,40,48,46,48,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116, - 83,111,117,114,99,101,46,115,116,97,114,116,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101, - 32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,115,116,111,112,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,116,111,112,40,41,59,13,10,32,32,32,32, - 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,97,117,100,105,111,83, - 101,116,116,105,110,103,115,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47, - 47,32,67,114,101,97,116,101,32,97,110,32,65,117,100,105,111,68,101,118,105,99,101,83,101,108,101,99,116,111,114,67,111,109,112,111,110,101,110,116, - 32,119,104,105,99,104,32,99,111,110,116,97,105,110,115,32,116,104,101,32,97,117,100,105,111,32,99,104,111,105,99,101,32,119,105,100,103,101,116,115, - 46,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,65,117,100,105,111,68,101,118,105,99,101,83,101,108,101,99,116,111,114,67,111, - 109,112,111,110,101,110,116,32,97,117,100,105,111,83,101,116,116,105,110,103,115,67,111,109,112,32,40,97,117,100,105,111,68,101,118,105,99,101,77,97, - 110,97,103,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,49,44,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,50,44,32,50,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,116,114,117,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,97,108,115,101,44,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,46,46,46,97,110,100,32,115,104,111, - 119,32,105,116,32,105,110,32,97,32,68,105,97,108,111,103,87,105,110,100,111,119,46,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97, - 117,100,105,111,83,101,116,116,105,110,103,115,67,111,109,112,46,115,101,116,83,105,122,101,32,40,53,48,48,44,32,52,53,48,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,68,105,97,108,111,103,87,105,110,100,111,119,58,58,115,104,111,119,77,111,100,97,108,68,105,97,108,111, - 103,32,40,84,40,34,65,117,100,105,111,32,83,101,116,116,105,110,103,115,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,38,97,117,100,105,111,83,101,116,116,105,110, - 103,115,67,111,109,112,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,97,122,117,114,101,44,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,102, - 105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,67,104,97,110,103,101,100,32,40,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101, - 110,116,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,99,97,108,108,101,100,32,119, - 104,101,110,32,116,104,101,32,117,115,101,114,32,99,104,97,110,103,101,115,32,116,104,101,32,102,105,108,101,110,97,109,101,32,105,110,32,116,104,101, - 32,102,105,108,101,32,99,104,111,111,115,101,114,32,98,111,120,13,10,13,10,32,32,32,32,32,32,32,32,70,105,108,101,32,97,117,100,105,111,70, - 105,108,101,32,40,102,105,108,101,67,104,111,111,115,101,114,45,62,103,101,116,67,117,114,114,101,110,116,70,105,108,101,40,41,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,47,47,32,117,110,108,111,97,100,32,116,104,101,32,112,114,101,118,105,111,117,115,32,102,105,108,101,32,115,111,117,114, - 99,101,32,97,110,100,32,100,101,108,101,116,101,32,105,116,46,46,13,10,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117, - 114,99,101,46,115,116,111,112,40,41,59,13,10,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,101,116, - 83,111,117,114,99,101,32,40,48,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111,32,40,99,117,114,114, - 101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116, - 101,32,97,32,110,101,119,32,102,105,108,101,32,115,111,117,114,99,101,32,102,114,111,109,32,116,104,101,32,102,105,108,101,46,46,13,10,13,10,32, - 32,32,32,32,32,32,32,47,47,32,103,101,116,32,97,32,102,111,114,109,97,116,32,109,97,110,97,103,101,114,32,97,110,100,32,115,101,116,32,105, - 116,32,117,112,32,119,105,116,104,32,116,104,101,32,98,97,115,105,99,32,116,121,112,101,115,32,40,119,97,118,32,97,110,100,32,97,105,102,102,41, - 46,13,10,32,32,32,32,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,77,97,110,97,103,101,114,32,102,111,114,109,97,116,77,97,110,97, - 103,101,114,59,13,10,32,32,32,32,32,32,32,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,114,101,103,105,115,116,101,114,66,97,115,105, - 99,70,111,114,109,97,116,115,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,82,101,97,100,101,114, - 42,32,114,101,97,100,101,114,32,61,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,99,114,101,97,116,101,82,101,97,100,101,114,70,111,114, - 32,40,97,117,100,105,111,70,105,108,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,101,97,100,101,114,32,33,61,32,48, - 41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,70,105,108,101,32,61,32, - 97,117,100,105,111,70,105,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,65,117,100,105,111,70,105, - 108,101,83,111,117,114,99,101,32,61,32,110,101,119,32,65,117,100,105,111,70,111,114,109,97,116,82,101,97,100,101,114,83,111,117,114,99,101,32,40, - 114,101,97,100,101,114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,46,46,97,110,100,32,112, - 108,117,103,32,105,116,32,105,110,116,111,32,111,117,114,32,116,114,97,110,115,112,111,114,116,32,115,111,117,114,99,101,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,101,116,83,111,117,114,99,101,32,40,99,117,114,114,101,110,116, - 65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,51,50,55,54,56,44,32,47,47,32,116,101,108,108,115,32,105,116,32,116,111,32,98, - 117,102,102,101,114,32,116,104,105,115,32,109,97,110,121,32,115,97,109,112,108,101,115,32,97,104,101,97,100,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,101,114,45,62,115,97, - 109,112,108,101,82,97,116,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,66, - 117,116,116,111,110,115,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,104,97,110,103,101,76,105,115,116,101, - 110,101,114,67,97,108,108,98,97,99,107,32,40,118,111,105,100,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,99, - 97,108,108,98,97,99,107,32,102,114,111,109,32,116,104,101,32,116,114,97,110,115,112,111,114,116,32,115,111,117,114,99,101,32,116,111,32,116,101,108, - 108,32,117,115,32,116,104,97,116,32,112,108,97,121,32,104,97,115,13,10,32,32,32,32,32,32,32,32,47,47,32,115,116,97,114,116,101,100,32,111, - 114,32,115,116,111,112,112,101,100,44,32,115,111,32,117,112,100,97,116,101,32,111,117,114,32,98,117,116,116,111,110,115,46,46,13,10,32,32,32,32, - 32,32,32,32,117,112,100,97,116,101,66,117,116,116,111,110,115,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67, - 111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,65,117,100,105,111,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117, - 114,110,32,110,101,119,32,65,117,100,105,111,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::audiodemo_cpp = (const char*) temp1; + 32,32,32,32,32,45,121,32,45,32,48,46,53,102,32,42,32,104,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101,100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114, + 109,40,41,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115, + 105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,120,32,61,32,49,48,48, + 59,13,10,32,32,32,32,32,32,32,32,105,110,116,32,121,32,61,32,52,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115, + 101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32, + 121,32,43,61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,115,99,97,108,101,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115, + 32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,50,56,59,13,10,32,32,32, + 32,32,32,32,32,97,110,103,108,101,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32, + 50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,45, + 62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43, + 61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44, + 32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,111,112, + 97,99,105,116,121,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13, + 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,108,105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,32,40,83, + 108,105,100,101,114,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32, + 125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,111,109,98,111,66,111,120,67,104,97,110,103,101,100,32,40,67,111,109,98,111,66,111,120,42, + 41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,112, + 114,105,118,97,116,101,58,13,10,32,32,32,32,80,97,116,104,32,115,104,97,112,101,59,13,10,32,32,32,32,73,109,97,103,101,42,32,105,109,97, + 103,101,59,13,10,32,32,32,32,68,114,97,119,97,98,108,101,42,32,100,114,97,119,97,98,108,101,59,13,10,32,32,32,32,68,114,97,119,97,98, + 108,101,67,111,109,112,111,115,105,116,101,42,32,115,118,103,68,114,97,119,97,98,108,101,59,13,10,13,10,32,32,32,32,67,111,109,98,111,66,111, + 120,42,32,116,121,112,101,67,104,111,111,115,101,114,59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,115,99,97,108,101,83,108,105,100,101,114, + 59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,97,110,103,108,101,83,108,105,100,101,114,59,13,10,32,32,32,32,83,108,105,100,101,114,42, + 32,120,83,108,105,100,101,114,59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,121,83,108,105,100,101,114,59,13,10,32,32,32,32,83,108,105, + 100,101,114,42,32,111,112,97,99,105,116,121,83,108,105,100,101,114,59,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,110,101,114,97,116,101, + 82,97,110,100,111,109,83,104,97,112,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,104,97,112,101,46,115,116,97,114, + 116,78,101,119,83,117,98,80,97,116,104,32,40,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98,101, + 114,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,48,59,32,105,32,60,32,55,59,32, + 43,43,105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,104,97,112,101,46,108,105,110,101,84, + 111,32,40,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,115,104,97,112,101,46,113,117,97,100,114,97,116,105,99,84,111,32,40,114,97,110,100,111,109,78,117,109,98, + 101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98, + 101,114,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,115,104,97,112,101,46,99,108,111,115,101, + 83,117,98,80,97,116,104,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,110,101,114,97,116,101,73,109, + 97,103,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,32,61,32,73,109,97,103,101,70,105,108,101,70, + 111,114,109,97,116,58,58,108,111,97,100,70,114,111,109,32,40,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,44,32,66, + 105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, + 118,111,105,100,32,103,101,110,101,114,97,116,101,68,114,97,119,97,98,108,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, + 47,47,32,99,114,101,97,116,101,32,97,32,99,111,109,112,111,115,105,116,101,32,100,114,97,119,97,98,108,101,32,111,98,106,101,99,116,46,46,13, + 10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,67,111,109,112,111,115,105,116,101,42,32,100,99,32,61,32,110,101,119,32,68,114,97, + 119,97,98,108,101,67,111,109,112,111,115,105,116,101,40,41,59,13,10,32,32,32,32,32,32,32,32,100,114,97,119,97,98,108,101,32,61,32,100,99, + 59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,46,46,97,100,100,32,97,32,112,97,116,104,115,32,100,114,97,119,97,98,108,101,32,116, + 111,32,105,116,46,46,46,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,80,97,116,104,32,100,112,59,13,10,32,32,32,32,32, + 32,32,32,100,112,46,115,101,116,80,97,116,104,32,40,115,104,97,112,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,112,46,115,101,116, + 79,117,116,108,105,110,101,32,40,52,46,48,102,44,32,67,111,108,111,117,114,115,58,58,98,108,117,101,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,71,114,97,100,105,101,110,116,66,114,117,115,104,32,103,98,32,40,67,111,108,111,117,114,71,114,97,100,105,101,110,116,32,40,67,111,108,111, + 117,114,115,58,58,114,101,100,46,119,105,116,104,65,108,112,104,97,32,40,48,46,52,102,41,44,32,45,49,48,48,46,48,102,44,32,45,49,48,48, + 46,48,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,103,114,101,101,110,46,119,105,116,104,65,108,112,104,97,32,40,48,46,54,102,41,44, + 32,49,48,48,46,48,102,44,32,49,48,48,46,48,102,44,32,102,97,108,115,101,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,112,46, + 115,101,116,70,105,108,108,66,114,117,115,104,32,40,103,98,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,99,45,62,105,110,115,101,114,116, + 68,114,97,119,97,98,108,101,32,40,100,112,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,46,46,97,100,100,32,97,110,32,105,109, + 97,103,101,32,100,114,97,119,97,98,108,101,46,46,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,73,109,97,103,101,32,100,105, + 59,13,10,32,32,32,32,32,32,32,32,100,105,46,115,101,116,73,109,97,103,101,32,40,105,109,97,103,101,44,32,102,97,108,115,101,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,100,99,45,62,105,110,115,101,114,116,68,114,97,119,97,98,108,101,32,40,100,105,44,32,65,102,102,105,110,101, + 84,114,97,110,115,102,111,114,109,58,58,115,99,97,108,101,32,40,48,46,51,102,44,32,48,46,56,102,41,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,47,47,32,46,46,97,110,100,32,97,32,116,101,120,116,32,111,98,106,101,99,116,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97, + 98,108,101,84,101,120,116,32,100,116,59,13,10,32,32,32,32,32,32,32,32,100,116,46,115,101,116,84,101,120,116,32,40,84,40,34,74,85,67,69, + 32,68,114,97,119,97,98,108,101,115,34,41,44,32,70,111,110,116,32,40,51,48,46,48,102,44,32,70,111,110,116,58,58,98,111,108,100,41,41,59, + 13,10,32,32,32,32,32,32,32,32,100,116,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,103,114,101,101,110,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,100,99,45,62,105,110,115,101,114,116,68,114,97,119,97,98,108,101,32,40,100,116,44,32,65,102,102,105, + 110,101,84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,56,48,46,48,102,44,32,45,50,48,46,48,102, + 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46, + 115,99,97,108,101,100,32,40,50,46,48,102,44,32,48,46,56,102,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,114,111,116,97,116,101,100,32,40,45,49,46,51,102,41,41,59,13,10,32,32,32, + 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,110,101,114,97,116,101,83,86,71,68,114,97,119,97,98,108,101,40,41,13,10,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119,97,98,108,101,32,61,32,48,59,13,10,13,10,32,32,32,32,32,32,32, + 32,77,101,109,111,114,121,73,110,112,117,116,83,116,114,101,97,109,32,105,99,111,110,115,70,105,108,101,83,116,114,101,97,109,32,40,66,105,110,97, + 114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112,44,32,66,105,110,97,114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112, + 83,105,122,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,90,105,112,70,105,108,101,32,105,99,111,110,115,32,40,38,105, + 99,111,110,115,70,105,108,101,83,116,114,101,97,109,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,76,111, + 97,100,32,97,32,114,97,110,100,111,109,32,83,86,71,32,102,105,108,101,32,102,114,111,109,32,111,117,114,32,101,109,98,101,100,100,101,100,32,105, + 99,111,110,115,46,122,105,112,32,102,105,108,101,46,13,10,32,32,32,32,32,32,32,32,73,110,112,117,116,83,116,114,101,97,109,42,32,115,118,103, + 70,105,108,101,83,116,114,101,97,109,13,10,32,32,32,32,32,32,32,32,32,32,32,32,61,32,105,99,111,110,115,46,99,114,101,97,116,101,83,116, + 114,101,97,109,70,111,114,69,110,116,114,121,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46, + 110,101,120,116,73,110,116,32,40,105,99,111,110,115,46,103,101,116,78,117,109,69,110,116,114,105,101,115,40,41,41,41,59,13,10,13,10,32,32,32, + 32,32,32,32,32,105,102,32,40,115,118,103,70,105,108,101,83,116,114,101,97,109,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,42,32,108,111,97,100,101,100,83,86,71,32,61,32,68,114,97,119,97, + 98,108,101,58,58,99,114,101,97,116,101,70,114,111,109,73,109,97,103,101,68,97,116,97,83,116,114,101,97,109,32,40,42,115,118,103,70,105,108,101, + 83,116,114,101,97,109,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,108,111,97,100,101,100,83,86,71,32,33,61, + 32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116, + 111,32,109,97,107,101,32,111,117,114,32,105,99,111,110,32,116,104,101,32,114,105,103,104,116,32,115,105,122,101,44,32,119,101,39,108,108,32,112,117, + 116,32,105,116,32,105,110,115,105,100,101,32,97,32,68,114,97,119,97,98,108,101,67,111,109,112,111,115,105,116,101,44,32,97,110,100,32,97,112,112, + 108,121,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,116,114,97,110,115,102,111,114,109,32,116,111,32,103,101, + 116,32,105,116,32,116,111,32,116,104,101,32,115,105,122,101,32,119,101,32,119,97,110,116,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,119,44,32,104,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 108,111,97,100,101,100,83,86,71,45,62,103,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,119,44,32,104,41,59,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,115,99,97,108,101,70,97,99,116,111,114,32,61,32,51,48, + 48,46,48,102,32,47,32,106,109,97,120,32,40,119,44,32,104,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115, + 118,103,68,114,97,119,97,98,108,101,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,67,111,109,112,111,115,105,116,101,40,41,59,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119,97,98,108,101,45,62,105,110,115,101,114,116,68,114,97,119,97,98, + 108,101,32,40,108,111,97,100,101,100,83,86,71,44,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,115,99,97,108,101,32,40,115, + 99,97,108,101,70,97,99,116,111,114,44,32,115,99,97,108,101,70,97,99,116,111,114,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,118,103,70,105,108,101,83,116,114,101,97,109,59,13,10, + 32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,99,111,110,115,116,32,65,102,102,105,110,101,84,114,97,110, + 115,102,111,114,109,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,32,99,111,110,115,116,13,10,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,114,101,116,117,114,110,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,114,111,116,97,116,105,111,110,32,40,102,108,111, + 97,116,95,80,105,32,42,32,50,46,48,102,32,42,32,40,102,108,111,97,116,41,32,97,110,103,108,101,83,108,105,100,101,114,45,62,103,101,116,86, + 97,108,117,101,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,115,99,97,108,101,100,32,40,40,102,108,111,97,116, + 41,32,115,99,97,108,101,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,40,102,108,111,97,116,41,32,115,99,97,108,101,83,108,105,100,101,114,45,62,103,101,116,86,97,108, + 117,101,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,116,114,97,110,115,108,97,116,101,100,32,40,103,101,116,87, + 105,100,116,104,40,41,32,42,32,48,46,53,102,32,43,32,40,102,108,111,97,116,41,32,120,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117, + 101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,72,101, + 105,103,104,116,40,41,32,42,32,48,46,53,102,32,43,32,40,102,108,111,97,116,41,32,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117, + 101,40,41,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,80,97,116, + 104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119, + 32,80,97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::pathsandtransformsdemo_cpp = (const char*) temp1; -static const unsigned char temp2[] = {82,73,70,70,4,181,0,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,34,86,0,0,68,172,0,0,2,0,16,0,98,101,120,116, +static const unsigned char temp2[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, + 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, + 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, + 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, + 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, + 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, + 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, + 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, + 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, + 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, + 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, + 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, + 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, + 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, + 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, + 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, + 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, + 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, + 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, + 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, + 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, + 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, + 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, + 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, + 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, + 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, + 10,13,10,35,105,102,100,101,102,32,95,87,73,78,51,50,13,10,32,35,105,110,99,108,117,100,101,32,60,119,105,110,100,111,119,115,46,104,62,13, + 10,35,101,110,100,105,102,13,10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115, + 46,104,34,13,10,13,10,35,105,102,32,74,85,67,69,95,79,80,69,78,71,76,13,10,13,10,35,105,102,100,101,102,32,95,87,73,78,51,50,13, + 10,32,35,105,110,99,108,117,100,101,32,60,103,108,47,103,108,46,104,62,13,10,32,35,105,110,99,108,117,100,101,32,60,103,108,47,103,108,117,46, + 104,62,13,10,35,101,108,105,102,32,100,101,102,105,110,101,100,32,40,76,73,78,85,88,41,13,10,32,35,105,110,99,108,117,100,101,32,60,71,76, + 47,103,108,46,104,62,13,10,32,35,105,110,99,108,117,100,101,32,60,71,76,47,103,108,117,116,46,104,62,13,10,32,35,117,110,100,101,102,32,75, + 101,121,80,114,101,115,115,13,10,35,101,108,115,101,13,10,32,35,105,110,99,108,117,100,101,32,60,71,76,85,84,47,103,108,117,116,46,104,62,13, + 10,35,101,110,100,105,102,13,10,13,10,35,105,102,110,100,101,102,32,71,76,95,66,71,82,65,95,69,88,84,13,10,32,35,100,101,102,105,110,101, + 32,71,76,95,66,71,82,65,95,69,88,84,32,48,120,56,48,101,49,13,10,35,101,110,100,105,102,13,10,13,10,47,47,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68, + 101,109,111,79,112,101,110,71,76,67,97,110,118,97,115,32,32,58,32,112,117,98,108,105,99,32,79,112,101,110,71,76,67,111,109,112,111,110,101,110, + 116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,105,109, + 101,114,13,10,123,13,10,32,32,32,32,102,108,111,97,116,32,114,111,116,97,116,105,111,110,44,32,100,101,108,116,97,59,13,10,32,32,32,32,73, + 109,97,103,101,42,32,105,109,97,103,101,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,79,112,101,110,71,76,67, + 97,110,118,97,115,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,111,116,97,116,105,111,110,32,61,32,48,46,48,102,59, + 13,10,32,32,32,32,32,32,32,32,100,101,108,116,97,32,61,32,49,46,48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,73,109,97,103,101, + 42,32,105,109,32,61,32,73,109,97,103,101,70,105,108,101,70,111,114,109,97,116,58,58,108,111,97,100,70,114,111,109,32,40,66,105,110,97,114,121, + 68,97,116,97,58,58,106,117,99,101,95,112,110,103,44,32,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,83,105,122,101, + 41,59,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,32,61,32,110,101,119,32,73,109,97,103,101,32,40,73,109,97,103,101,58,58,82,71, + 66,44,32,53,49,50,44,32,53,49,50,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,71,114,97,112,104,105,99,115,32,103,32, + 40,42,105,109,97,103,101,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,119, + 104,105,116,101,41,59,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109,97,103,101,32,40,105,109,44,32,48,44,32,48,44,32,53, + 49,50,44,32,53,49,50,44,32,48,44,32,48,44,32,105,109,45,62,103,101,116,87,105,100,116,104,40,41,44,32,105,109,45,62,103,101,116,72,101, + 105,103,104,116,40,41,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,105,109,59,13,10,13,10,32,32,32,32,32,32,32,32, + 115,116,97,114,116,84,105,109,101,114,32,40,50,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,74,117,115,116,32,102,111,114,32, + 100,101,109,111,32,112,117,114,112,111,115,101,115,44,32,108,101,116,39,115,32,100,117,109,112,32,97,32,108,105,115,116,32,111,102,32,97,108,108,32, + 116,104,101,32,97,118,97,105,108,97,98,108,101,32,112,105,120,101,108,32,102,111,114,109,97,116,115,46,46,13,10,32,32,32,32,32,32,32,32,79, + 119,110,101,100,65,114,114,97,121,32,60,79,112,101,110,71,76,80,105,120,101,108,70,111,114,109,97,116,62,32,97,118,97,105,108,97,98,108,101,80, + 105,120,101,108,70,111,114,109,97,116,115,59,13,10,32,32,32,32,32,32,32,32,79,112,101,110,71,76,80,105,120,101,108,70,111,114,109,97,116,58, + 58,103,101,116,65,118,97,105,108,97,98,108,101,80,105,120,101,108,70,111,114,109,97,116,115,32,40,116,104,105,115,44,32,97,118,97,105,108,97,98, + 108,101,80,105,120,101,108,70,111,114,109,97,116,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61, + 32,48,59,32,105,32,60,32,97,118,97,105,108,97,98,108,101,80,105,120,101,108,70,111,114,109,97,116,115,46,115,105,122,101,40,41,59,32,43,43, + 105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,79,112,101,110,71,76,80, + 105,120,101,108,70,111,114,109,97,116,42,32,99,111,110,115,116,32,112,105,120,70,111,114,109,97,116,32,61,32,97,118,97,105,108,97,98,108,101,80, + 105,120,101,108,70,111,114,109,97,116,115,91,105,93,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,83,116,114,105,110,103,32,102,111, + 114,109,97,116,68,101,115,99,114,105,112,116,105,111,110,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,109,97,116,68,101,115,99, + 114,105,112,116,105,111,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,105,32,60,60,32,34,58,32,82,71,66,65,61,40, + 34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,114,101,100,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60, + 60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,103,114,101,101,110,66,105,116,115,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,98,108,117,101,66,105,116,115,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,97,108,112,104,97,66, + 105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,41,44,32,100,101,112,116,104,61,34,32,60,60,32,112,105,120, + 70,111,114,109,97,116,45,62,100,101,112,116,104,66,117,102,102,101,114,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60, + 60,32,34,44,32,115,116,101,110,99,105,108,61,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,115,116,101,110,99,105,108,66,117,102,102, + 101,114,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,97,99,99,117,109,32,82,71,66,65,61,40, + 34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,97,99,99,117,109,117,108,97,116,105,111,110,66,117,102,102,101,114,82,101,100,66,105,116, + 115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,97, + 99,99,117,109,117,108,97,116,105,111,110,66,117,102,102,101,114,71,114,101,101,110,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,97,99,99,117,109,117,108,97,116,105,111,110,66,117,102,102, + 101,114,66,108,117,101,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120, + 70,111,114,109,97,116,45,62,97,99,99,117,109,117,108,97,116,105,111,110,66,117,102,102,101,114,65,108,112,104,97,66,105,116,115,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,41,44,32,102,117,108,108,45,115,99,101,110,101,32,65,65,61,34,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,102,117,108,108,83,99,101,110,101,65,110,116,105,65,108,105,97, + 115,105,110,103,78,117,109,83,97,109,112,108,101,115,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,76,111,103,103,101,114,58,58,111, + 117,116,112,117,116,68,101,98,117,103,83,116,114,105,110,103,32,40,102,111,114,109,97,116,68,101,115,99,114,105,112,116,105,111,110,41,59,13,10,32, + 32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,79,112,101,110,71,76,67,97,110,118,97,115, + 40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,105,109,97,103,101,59,13,10,32,32,32,32,125,13, + 10,13,10,32,32,32,32,47,47,32,119,104,101,110,32,116,104,101,32,99,111,109,112,111,110,101,110,116,32,99,114,101,97,116,101,115,32,97,32,110, + 101,119,32,105,110,116,101,114,110,97,108,32,99,111,110,116,101,120,116,44,32,116,104,105,115,32,105,115,32,99,97,108,108,101,100,44,32,97,110,100, + 13,10,32,32,32,32,47,47,32,119,101,39,108,108,32,117,115,101,32,116,104,101,32,111,112,112,111,114,116,117,110,105,116,121,32,116,111,32,99,114, + 101,97,116,101,32,116,104,101,32,116,101,120,116,117,114,101,115,32,110,101,101,100,101,100,46,13,10,32,32,32,32,118,111,105,100,32,110,101,119,79, + 112,101,110,71,76,67,111,110,116,101,120,116,67,114,101,97,116,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47, + 32,40,110,111,32,110,101,101,100,32,116,111,32,99,97,108,108,32,109,97,107,101,67,117,114,114,101,110,116,67,111,110,116,101,120,116,65,99,116,105, + 118,101,40,41,44,32,97,115,32,116,104,97,116,32,119,105,108,108,32,104,97,118,101,13,10,32,32,32,32,32,32,32,32,47,47,32,98,101,101,110, + 32,100,111,110,101,32,102,111,114,32,117,115,32,98,101,102,111,114,101,32,116,104,101,32,109,101,116,104,111,100,32,99,97,108,108,41,46,13,10,32, + 32,32,32,32,32,32,32,103,108,67,108,101,97,114,67,111,108,111,114,32,40,48,46,48,102,44,32,48,46,48,102,44,32,48,46,48,102,44,32,48, + 46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,108,67,108,101,97,114,68,101,112,116,104,32,40,49,46,48,41,59,13,10,13,10,32,32, + 32,32,32,32,32,32,103,108,68,101,112,116,104,70,117,110,99,32,40,71,76,95,76,69,83,83,41,59,13,10,32,32,32,32,32,32,32,32,103,108, + 69,110,97,98,108,101,32,40,71,76,95,68,69,80,84,72,95,84,69,83,84,41,59,13,10,32,32,32,32,32,32,32,32,103,108,69,110,97,98,108, + 101,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,41,59,13,10,32,32,32,32,32,32,32,32,103,108,69,110,97,98,108,101,32,40,71,76, + 95,66,76,69,78,68,41,59,13,10,32,32,32,32,32,32,32,32,103,108,83,104,97,100,101,77,111,100,101,108,32,40,71,76,95,83,77,79,79,84, + 72,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,32,40,71,76,95,84,69,88,84,85, + 82,69,95,50,68,44,32,71,76,95,84,69,88,84,85,82,69,95,87,82,65,80,95,83,44,32,71,76,95,67,76,65,77,80,41,59,13,10,32,32, + 32,32,32,32,32,32,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,44,32,71,76, + 95,84,69,88,84,85,82,69,95,87,82,65,80,95,84,44,32,71,76,95,67,76,65,77,80,41,59,13,10,32,32,32,32,32,32,32,32,103,108,84, + 101,120,80,97,114,97,109,101,116,101,114,105,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,44,32,71,76,95,84,69,88,84,85,82,69,95, + 77,65,71,95,70,73,76,84,69,82,44,32,71,76,95,76,73,78,69,65,82,41,59,13,10,32,32,32,32,32,32,32,32,103,108,84,101,120,80,97, + 114,97,109,101,116,101,114,105,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,44,32,71,76,95,84,69,88,84,85,82,69,95,77,73,78,95, + 70,73,76,84,69,82,44,32,71,76,95,76,73,78,69,65,82,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,80,105,120,101,108,83,116, + 111,114,101,105,32,40,71,76,95,85,78,80,65,67,75,95,65,76,73,71,78,77,69,78,84,44,32,52,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,105,110,116,32,115,116,114,105,100,101,44,32,112,105,120,83,116,114,105,100,101,59,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32, + 118,111,105,100,42,32,112,105,120,101,108,115,32,61,32,105,109,97,103,101,45,62,108,111,99,107,80,105,120,101,108,68,97,116,97,82,101,97,100,79, + 110,108,121,32,40,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62,103,101,116, + 72,101,105,103,104,116,40,41,44,32,115,116,114,105,100,101,44,32,112,105,120,83,116,114,105,100,101,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,103,108,84,101,120,73,109,97,103,101,50,68,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,44,32,48,44,32,52,44,32,105,109,97,103, + 101,45,62,103,101,116,87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,71,76,95,82,71,66,44,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,71,76,95,85,78,83,73,71,78,69,68,95,66,89,84,69,44,32,112,105,120,101,108,115,41,59,13,10, + 32,32,32,32,32,32,32,32,105,109,97,103,101,45,62,114,101,108,101,97,115,101,80,105,120,101,108,68,97,116,97,82,101,97,100,79,110,108,121,32, + 40,112,105,120,101,108,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,72,105,110,116,32,40,71,76,95,76,73,78,69,95,83,77,79, + 79,84,72,95,72,73,78,84,44,32,71,76,95,78,73,67,69,83,84,41,59,13,10,32,32,32,32,32,32,32,32,103,108,72,105,110,116,32,40,71, + 76,95,80,79,73,78,84,95,83,77,79,79,84,72,95,72,73,78,84,44,32,71,76,95,78,73,67,69,83,84,41,59,13,10,32,32,32,32,32,32, + 32,32,103,108,66,108,101,110,100,70,117,110,99,32,40,71,76,95,83,82,67,95,65,76,80,72,65,44,32,71,76,95,79,78,69,95,77,73,78,85, + 83,95,83,82,67,95,65,76,80,72,65,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109,111,117,115,101,68,114, + 97,103,32,40,99,111,110,115,116,32,77,111,117,115,101,69,118,101,110,116,38,32,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,100,101,108,116,97,32,61,32,101,46,103,101,116,68,105,115,116,97,110,99,101,70,114,111,109,68,114,97,103,83,116,97,114,116,88,40,41,32,47, + 32,49,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32, + 32,32,32,118,111,105,100,32,114,101,110,100,101,114,79,112,101,110,71,76,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103, + 108,67,108,101,97,114,67,111,108,111,114,32,40,48,46,56,102,44,32,48,46,48,102,44,32,48,46,52,102,44,32,48,46,48,102,41,59,13,10,32, + 32,32,32,32,32,32,32,103,108,67,108,101,97,114,32,40,71,76,95,67,79,76,79,82,95,66,85,70,70,69,82,95,66,73,84,32,124,32,71,76, + 95,68,69,80,84,72,95,66,85,70,70,69,82,95,66,73,84,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,77,97,116,114,105,120,77, + 111,100,101,40,71,76,95,80,82,79,74,69,67,84,73,79,78,41,59,13,10,32,32,32,32,32,32,32,32,103,108,76,111,97,100,73,100,101,110,116, + 105,116,121,40,41,59,13,10,32,32,32,32,32,32,32,32,103,108,79,114,116,104,111,32,40,48,46,48,44,32,103,101,116,87,105,100,116,104,40,41, + 44,32,48,46,48,44,32,103,101,116,72,101,105,103,104,116,40,41,44,32,48,44,32,49,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108, + 67,111,108,111,114,52,102,32,40,49,46,48,102,44,32,49,46,48,102,44,32,49,46,48,102,44,32,102,97,98,115,102,32,40,58,58,115,105,110,102, + 32,40,114,111,116,97,116,105,111,110,32,47,32,49,48,48,46,48,102,41,41,41,59,13,10,32,32,32,32,32,32,32,32,103,108,66,101,103,105,110, + 40,71,76,95,81,85,65,68,83,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,105,32,40,48, + 44,32,48,41,59,32,103,108,86,101,114,116,101,120,50,102,32,40,53,48,46,48,102,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,53, + 48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,105,32,40,49,44,32,48,41,59, + 32,103,108,86,101,114,116,101,120,50,102,32,40,103,101,116,87,105,100,116,104,40,41,32,45,32,53,48,46,48,102,44,32,103,101,116,72,101,105,103, + 104,116,40,41,32,45,32,53,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,105, + 32,40,49,44,32,49,41,59,32,103,108,86,101,114,116,101,120,50,102,32,40,103,101,116,87,105,100,116,104,40,41,32,45,32,53,48,46,48,102,44, + 32,53,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,105,32,40,48,44,32,49, + 41,59,32,103,108,86,101,114,116,101,120,50,102,32,40,53,48,46,48,102,44,32,53,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103, + 108,69,110,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,77,97,116,114,105,120,77,111,100,101,32,40,71,76,95,80,82,79,74, + 69,67,84,73,79,78,41,59,13,10,32,32,32,32,32,32,32,32,103,108,76,111,97,100,73,100,101,110,116,105,116,121,40,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,103,108,67,108,101,97,114,32,40,71,76,95,68,69,80,84,72,95,66,85,70,70,69,82,95,66,73,84,41,59,13,10,32, + 32,32,32,32,32,32,32,103,108,117,80,101,114,115,112,101,99,116,105,118,101,32,40,52,53,46,48,102,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,47,32,40,71,76,102,108,111,97,116,41,32,103,101, + 116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,46,49,102, + 44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,48,48,46,48,102,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,103,108,77,97,116,114,105,120,77,111,100,101,32,40,71,76,95,77,79,68,69,76,86,73,69,87,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,103,108,76,111,97,100,73,100,101,110,116,105,116,121,40,41,59,13,10,32,32,32,32,32,32,32,32,103,108,80,117,115,104, + 77,97,116,114,105,120,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,114,97,110,115,108,97,116,101,102,32,40,48, + 46,48,102,44,32,48,46,48,102,44,32,45,53,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,82,111,116,97,116,101, + 102,32,40,114,111,116,97,116,105,111,110,44,32,48,46,53,102,44,32,49,46,48,102,44,32,48,46,48,102,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,103,108,66,101,103,105,110,32,40,71,76,95,81,85,65,68,83,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,103,108,67,111,108,111,114,51,102,32,40,48,46,48,102,44,32,49,46,48,102,44,32,48,46,48,102,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59, + 32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86, + 101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,45,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101, + 120,51,102,40,32,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40, + 45,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,103,108,67,111,108,111,114,51,102,32,40,49,46,48,102,44,32,48,46,48,102,44,32,48,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101, + 114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120, + 51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32, + 49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108, + 84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102, + 44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,67,111, + 108,111,114,51,102,32,40,48,46,48,102,44,32,48,46,48,102,44,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51, + 102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49, + 46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84, + 101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44, + 32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111, + 111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,32,49,46, + 48,102,44,32,45,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,67,111,108,111,114,51,102, + 32,40,49,46,48,102,44,32,49,46,48,102,44,32,48,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46, + 48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101, + 120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32, + 45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111, + 114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,45,49,46,48, + 102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102, + 40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44,32,32, + 49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,67,111,108,111,114,51,102,32,40,48,46,48, + 102,44,32,49,46,48,102,44,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120, + 67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,45, + 49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114, + 100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,32,49,46,48,102, + 44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40, + 49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49, + 46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102, + 44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,45,49,46,48,102,44,32,32,49,46,48,102,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,67,111,108,111,114,51,102,32,40,49,46,48,102,44,32,48,46, + 48,102,44,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100, + 50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44, + 32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48, + 46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44,32,32,49,46, + 48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44, + 32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48, + 102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,103,108,69,110,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,80,111,112,77,97,116, + 114,105,120,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40, + 41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,111,116,97,116,105,111,110,32,43,61,32,100,101,108,116,97,59,13,10,13,10, + 32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115, + 32,79,112,101,110,71,76,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,13,10,123,13,10,32,32,32,32, + 47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 13,10,32,32,32,32,68,101,109,111,79,112,101,110,71,76,67,97,110,118,97,115,42,32,99,97,110,118,97,115,59,13,10,13,10,112,117,98,108,105, + 99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,13,10,32,32,32,32,79,112,101,110,71,76,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,79,112,101,110,71,76,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,97,110, + 118,97,115,32,61,32,110,101,119,32,68,101,109,111,79,112,101,110,71,76,67,97,110,118,97,115,40,41,59,13,10,32,32,32,32,32,32,32,32,97, + 100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,97,110,118,97,115,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32, + 32,126,79,112,101,110,71,76,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108, + 67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41, + 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,97,110,118,97,115,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32, + 49,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,48,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,53,48,41,59,13, + 10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,79,112,101,110,71, + 76,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,79,112,101,110,71,76,68,101,109,111,40,41,59, + 13,10,125,13,10,13,10,35,101,110,100,105,102,13,10,0,0}; +const char* BinaryData::opengldemo_cpp = (const char*) temp2; + +static const unsigned char temp3[] = {60,68,69,77,79,95,84,65,66,76,69,95,68,65,84,65,62,13,10,32,32,32,32,60,67,79,76,85,77,78,83,62,13,10,32,32,32,32,32,32, + 32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,49,34,32,110,97,109,101,61,34,73,68,34,32,119,105,100,116,104,61,34, + 53,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,50,34,32,110,97,109,101, + 61,34,65,114,116,105,115,116,34,32,119,105,100,116,104,61,34,49,53,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78, + 32,99,111,108,117,109,110,73,100,61,34,51,34,32,110,97,109,101,61,34,83,111,110,103,34,32,119,105,100,116,104,61,34,50,48,48,34,47,62,13, + 10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,52,34,32,110,97,109,101,61,34,65,108,98,117, + 109,34,32,119,105,100,116,104,61,34,49,48,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110, + 73,100,61,34,53,34,32,110,97,109,101,61,34,82,97,116,105,110,103,34,32,119,105,100,116,104,61,34,49,50,48,34,47,62,13,10,32,32,32,32, + 32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,54,34,32,110,97,109,101,61,34,71,101,110,114,101,34,32,119,105, + 100,116,104,61,34,56,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,55,34, + 32,110,97,109,101,61,34,76,101,110,103,116,104,34,32,119,105,100,116,104,61,34,56,48,34,47,62,13,10,32,32,32,32,60,47,67,79,76,85,77, + 78,83,62,13,10,32,32,32,32,60,68,65,84,65,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,49,34,32,65, + 114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32,83,111,110, + 103,61,34,84,97,120,109,97,110,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,51,57,34,32,82,97, + 116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,50,34,32,65,114,116,105,115,116, + 61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32,83,111,110,103,61,34,69,108, + 101,97,110,111,114,32,82,105,103,98,121,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,48,55,34,32, + 82,97,116,105,110,103,61,34,50,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,51,34,32,65,114,116,105, + 115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32,83,111,110,103,61,34, + 73,39,109,32,111,110,108,121,32,83,108,101,101,112,105,110,103,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34, + 51,58,48,49,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,52, + 34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32, + 83,111,110,103,61,34,89,101,108,108,111,119,32,83,117,98,109,97,114,105,110,101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110, + 103,116,104,61,34,50,58,52,48,34,32,82,97,116,105,110,103,61,34,52,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73, + 68,61,34,48,53,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,117,98,98,101, + 114,32,83,111,117,108,34,32,83,111,110,103,61,34,68,114,105,118,101,32,77,121,32,67,97,114,34,32,71,101,110,114,101,61,34,82,111,99,107,34, + 32,76,101,110,103,116,104,61,34,50,58,51,48,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84, + 69,77,32,73,68,61,34,48,54,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82, + 117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,78,111,114,119,101,103,105,97,110,32,87,111,111,100,34,32,71,101,110,114,101,61, + 34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,48,53,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32, + 32,32,32,60,73,84,69,77,32,73,68,61,34,48,55,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108, + 98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,78,111,119,104,101,114,101,32,77,97,110,34,32,71,101,110, + 114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,52,52,34,32,82,97,116,105,110,103,61,34,53,34,47,62,13,10,32,32, + 32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,56,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34, + 32,65,108,98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,84,104,101,32,87,111,114,100,34,32,71,101,110, + 114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,52,51,34,32,82,97,116,105,110,103,61,34,50,34,47,62,13,10,32,32, + 32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,57,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34, + 32,65,108,98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,87,104,97,116,32,71,111,101,115,32,79,110,34, + 32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,53,48,34,32,82,97,116,105,110,103,61,34,51,34,47,62, + 13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,48,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116, + 108,101,115,34,32,65,108,98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,73,110,32,77,121,32,76,105,102, + 101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,50,55,34,32,82,97,116,105,110,103,61,34,49,34, + 47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,49,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97, + 117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,86,105,99,116,111,114,105,97,108,97,110,100,34,32,83,111,110,103,61,34,76,97,122,121, + 32,67,97,108,109,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,54,58,51,54,34,32,82,97, + 116,105,110,103,61,34,54,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,50,34,32,65,114,116,105,115,116, + 61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,86,105,99,116,111,114,105,97,108,97,110,100,34,32,83,111, + 110,103,61,34,70,108,117,102,102,121,32,84,117,102,116,115,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116, + 104,61,34,51,58,48,53,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61, + 34,49,51,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,86,105,99,116,111, + 114,105,97,108,97,110,100,34,32,83,111,110,103,61,34,79,111,109,105,110,103,109,97,107,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97, + 108,34,32,76,101,110,103,116,104,61,34,50,58,52,50,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10,32,32,32,32,32,32,32,32,60, + 73,84,69,77,32,73,68,61,34,49,52,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117, + 109,61,34,86,105,99,116,111,114,105,97,108,97,110,100,34,32,83,111,110,103,61,34,70,101,101,116,45,76,105,107,101,32,70,105,110,115,34,32,71, + 101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,50,54,34,32,82,97,116,105,110,103,61,34,49,34, + 47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,53,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97, + 117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,70,111,117,114,32,67,97,108,101,110,100,97,114,32,67,97,102,101,34,32,83,111,110,103, + 61,34,75,110,111,119,32,87,104,111,32,89,111,117,32,65,114,101,32,65,116,32,69,118,101,114,121,32,65,103,101,34,32,71,101,110,114,101,61,34, + 69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,52,50,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32, + 32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,54,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110, + 115,34,32,65,108,98,117,109,61,34,70,111,117,114,32,67,97,108,101,110,100,97,114,32,67,97,102,101,34,32,83,111,110,103,61,34,69,118,97,110, + 103,101,108,105,110,101,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,52,58,51,49,34,32,82, + 97,116,105,110,103,61,34,53,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,55,34,32,65,114,116,105,115, + 116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,70,111,117,114,32,67,97,108,101,110,100,97,114,32,67, + 97,102,101,34,32,83,111,110,103,61,34,66,108,117,101,98,101,97,114,100,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76, + 101,110,103,116,104,61,34,51,58,53,54,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77, + 32,73,68,61,34,49,56,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,70, + 111,117,114,32,67,97,108,101,110,100,97,114,32,67,97,102,101,34,32,83,111,110,103,61,34,83,113,117,101,101,122,101,45,87,97,120,34,32,71,101, + 110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,52,57,34,32,82,97,116,105,110,103,61,34,49,34,47, + 62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,57,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117, + 32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34,32,83,111,110,103, + 61,34,67,104,101,114,114,121,45,67,111,108,111,117,114,101,100,32,70,117,110,107,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34, + 32,76,101,110,103,116,104,61,34,51,58,49,51,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84, + 69,77,32,73,68,61,34,50,48,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61, + 34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34,32,83,111,110,103,61,34,73,99,101,98,108,105,110,107,32,76,117,99, + 107,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,49,56,34,32,82,97,116,105,110,103, + 61,34,55,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,49,34,32,65,114,116,105,115,116,61,34,67,111, + 99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34, + 32,83,111,110,103,61,34,70,105,102,116,121,45,70,105,102,116,121,32,67,108,111,119,110,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97, + 108,34,32,76,101,110,103,116,104,61,34,51,58,49,53,34,32,82,97,116,105,110,103,61,34,50,34,47,62,13,10,32,32,32,32,32,32,32,32,60, + 73,84,69,77,32,73,68,61,34,50,50,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117, + 109,61,34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34,32,83,111,110,103,61,34,70,111,116,122,101,112,111,108,105,116, + 105,99,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,51,48,34,32,82,97,116,105,110, + 103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,51,34,32,65,114,116,105,115,116,61,34,82, + 111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73,32,79,102,116,101,110,32,68,114,101,97,109,32,111,102,32, + 84,114,97,105,110,115,34,32,83,111,110,103,61,34,78,111,99,116,117,114,110,101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110, + 103,116,104,61,34,49,58,52,50,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73, + 68,61,34,50,52,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73, + 32,79,102,116,101,110,32,68,114,101,97,109,32,111,102,32,84,114,97,105,110,115,34,32,83,111,110,103,61,34,85,110,99,111,114,114,101,99,116,101, + 100,32,80,101,114,115,111,110,97,108,105,116,121,32,84,114,97,105,116,115,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116, + 104,61,34,49,58,52,53,34,32,82,97,116,105,110,103,61,34,53,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61, + 34,50,53,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73,32,79, + 102,116,101,110,32,68,114,101,97,109,32,111,102,32,84,114,97,105,110,115,34,32,83,111,110,103,61,34,77,121,32,70,97,118,111,117,114,105,116,101, + 32,66,117,105,108,100,105,110,103,115,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,52,57,34,32,82, + 97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,54,34,32,65,114,116,105,115, + 116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73,32,79,102,116,101,110,32,68,114,101,97,109, + 32,111,102,32,84,114,97,105,110,115,34,32,83,111,110,103,61,34,72,101,97,114,116,102,117,108,32,111,102,32,76,101,97,118,101,115,34,32,71,101, + 110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,51,48,34,32,82,97,116,105,110,103,61,34,55,34,47,62,13,10,32, + 32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,55,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104, + 99,111,99,107,34,32,65,108,98,117,109,61,34,76,117,120,111,114,34,32,83,111,110,103,61,34,80,101,110,101,108,111,112,101,39,115,32,65,110,103, + 108,101,115,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,51,58,49,56,34,32,82,97,116,105,110,103,61,34, + 49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,56,34,32,65,114,116,105,115,116,61,34,82,111,98,121, + 110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,76,117,120,111,114,34,32,83,111,110,103,61,34,89,111,117,32,82,101,109, + 105,110,100,32,77,101,32,79,102,32,89,111,117,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,49,53, + 34,32,82,97,116,105,110,103,61,34,52,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,57,34,32,65,114, + 116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,76,117,120,111,114,34,32,83,111,110, + 103,61,34,84,104,101,32,87,111,108,102,32,72,111,117,115,101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34, + 51,58,50,51,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,48, + 34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,74,101,119,101,108,115, + 32,70,111,114,32,83,111,112,104,105,97,34,32,83,111,110,103,61,34,77,101,120,105,99,97,110,32,71,111,100,34,32,71,101,110,114,101,61,34,82, + 111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,53,55,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10,32,32,32,32,32,32,32, + 32,60,73,84,69,77,32,73,68,61,34,51,49,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32, + 65,108,98,117,109,61,34,74,101,119,101,108,115,32,70,111,114,32,83,111,112,104,105,97,34,32,83,111,110,103,61,34,84,104,101,32,67,104,101,101, + 115,101,32,65,108,97,114,109,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,48,51,34,32,82,97,116, + 105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,50,34,32,65,114,116,105,115,116,61, + 34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,74,101,119,101,108,115,32,70,111,114,32,83,111,112,104, + 105,97,34,32,83,111,110,103,61,34,78,111,44,32,73,32,68,111,110,39,116,32,82,101,109,101,109,98,101,114,32,71,117,105,108,100,102,111,114,100, + 34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,52,53,34,32,82,97,116,105,110,103,61,34,54,34,47, + 62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,51,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97,114, + 114,101,116,116,34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,66,97,98,121,32,76,101,109,111,110,97,100, + 101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,49,48,34,32,82,97,116,105,110,103,61,34,50,34, + 47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,52,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97, + 114,114,101,116,116,34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,68,111,109,105,110,111,101,115,34,32,71, + 101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,48,56,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10, + 32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,53,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97,114,114,101,116, + 116,34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,71,105,103,111,108,111,32,65,117,110,116,34,32,71,101, + 110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,53,58,52,54,34,32,82,97,116,105,110,103,61,34,52,34,47,62,13,10,32, + 32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,54,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97,114,114,101,116,116, + 34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,69,102,102,101,114,118,101,115,99,105,110,103,32,69,108,101, + 112,104,97,110,116,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,49,58,53,50,34,32,82,97,116,105,110,103, + 61,34,53,34,47,62,13,10,32,32,32,32,60,47,68,65,84,65,62,13,10,60,47,68,69,77,79,95,84,65,66,76,69,95,68,65,84,65,62,0,0}; +const char* BinaryData::demo_table_data_xml = (const char*) temp3; + +static const unsigned char temp4[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, + 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, + 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, + 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, + 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, + 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, + 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, + 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, + 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, + 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, + 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, + 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, + 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, + 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, + 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, + 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, + 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, + 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, + 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, + 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, + 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, + 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, + 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, + 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, + 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, + 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, + 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, + 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,13,10,47,42,42,13,10,32,32,32,32,84,104,105,115,32,99,108,97,115,115,32,115,104,111,119,115,32,104,111,119,32,116,111,32,105,109,112,108, + 101,109,101,110,116,32,97,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100,101,108,32,116,111,32,115,104,111,119,32,105,110,32,97,32,84, + 97,98,108,101,76,105,115,116,66,111,120,46,13,10,42,47,13,10,99,108,97,115,115,32,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101, + 110,116,32,32,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100,101, + 108,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110, + 101,110,116,40,41,13,10,32,32,32,32,32,32,32,32,58,32,102,111,110,116,32,40,49,52,46,48,102,41,44,13,10,32,32,32,32,32,32,32,32, + 32,32,100,101,109,111,68,97,116,97,32,40,48,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,76,111,97,100,32,115, + 111,109,101,32,100,97,116,97,32,102,114,111,109,32,97,110,32,101,109,98,101,100,100,101,100,32,88,77,76,32,102,105,108,101,46,46,13,10,32,32, + 32,32,32,32,32,32,108,111,97,100,68,97,116,97,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,67,114,101,97,116,101,32,111, + 117,114,32,116,97,98,108,101,32,99,111,109,112,111,110,101,110,116,32,97,110,100,32,97,100,100,32,105,116,32,116,111,32,116,104,105,115,32,99,111, + 109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,97, + 98,108,101,32,61,32,110,101,119,32,84,97,98,108,101,76,105,115,116,66,111,120,32,40,84,40,34,100,101,109,111,32,116,97,98,108,101,34,41,44, + 32,116,104,105,115,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,103,105,118,101,32,105,116,32,97,32,98,111,114,100,101,114,13, + 10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,115,101,116,67,111,108,111,117,114,32,40,76,105,115,116,66,111,120,58,58,111,117,116,108, + 105,110,101,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,103,114,101,121,41,59,13,10,32,32,32,32,32,32,32,32,116,97, + 98,108,101,45,62,115,101,116,79,117,116,108,105,110,101,84,104,105,99,107,110,101,115,115,32,40,49,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,47,47,32,65,100,100,32,115,111,109,101,32,99,111,108,117,109,110,115,32,116,111,32,116,104,101,32,116,97,98,108,101,32,104,101,97,100,101,114, + 44,32,98,97,115,101,100,32,111,110,32,116,104,101,32,99,111,108,117,109,110,32,108,105,115,116,32,105,110,32,111,117,114,32,100,97,116,97,98,97, + 115,101,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,69,97,99,104,88,109,108,67,104,105,108,100,69,108,101,109,101,110,116,32,40,42,99, + 111,108,117,109,110,76,105,115,116,44,32,99,111,108,117,109,110,88,109,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,116,97,98,108,101,45,62,103,101,116,72,101,97,100,101,114,40,41,45,62,97,100,100,67,111,108,117,109,110,32,40,99,111,108, + 117,109,110,88,109,108,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,84,40,34,110,97,109,101,34,41,44,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,99,111,108,117,109,110,88,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,84,40,34,99,111,108,117,109,110,73,100, + 34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,99,111,108,117,109,110,88,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,84,40,34,119,105, + 100,116,104,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,53,48,44,32,52,48,48,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,97,98,108,101,72,101,97,100,101,114,67,111,109,112,111, + 110,101,110,116,58,58,100,101,102,97,117,108,116,70,108,97,103,115,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32, + 32,32,32,47,47,32,119,101,32,99,111,117,108,100,32,110,111,119,32,99,104,97,110,103,101,32,115,111,109,101,32,105,110,105,116,105,97,108,32,115, + 101,116,116,105,110,103,115,46,46,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,103,101,116,72,101,97,100,101,114,40,41,45,62,115, + 101,116,83,111,114,116,67,111,108,117,109,110,73,100,32,40,49,44,32,116,114,117,101,41,59,32,47,47,32,115,111,114,116,32,102,111,114,119,97,114, + 100,115,32,98,121,32,116,104,101,32,73,68,32,99,111,108,117,109,110,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,103,101,116,72, + 101,97,100,101,114,40,41,45,62,115,101,116,67,111,108,117,109,110,86,105,115,105,98,108,101,32,40,55,44,32,102,97,108,115,101,41,59,32,47,47, + 32,104,105,100,101,32,116,104,101,32,34,108,101,110,103,116,104,34,32,99,111,108,117,109,110,32,117,110,116,105,108,32,116,104,101,32,117,115,101,114, + 32,115,104,111,119,115,32,105,116,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,117,110,45,99,111,109,109,101,110,116,32,116,104,105,115,32, + 108,105,110,101,32,116,111,32,104,97,118,101,32,97,32,103,111,32,111,102,32,115,116,114,101,116,99,104,45,116,111,45,102,105,116,32,109,111,100,101, + 13,10,32,32,32,32,32,32,32,32,47,47,32,116,97,98,108,101,45,62,103,101,116,72,101,97,100,101,114,40,41,45,62,115,101,116,83,116,114,101, + 116,99,104,84,111,70,105,116,65,99,116,105,118,101,32,40,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45, + 62,115,101,116,77,117,108,116,105,112,108,101,83,101,108,101,99,116,105,111,110,69,110,97,98,108,101,100,32,40,116,114,117,101,41,59,13,10,32,32, + 32,32,125,13,10,13,10,32,32,32,32,126,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13, + 10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,100,101,108,101,116,101,32,100,101,109,111,68,97,116,97,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47, + 32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100, + 101,108,44,32,97,110,100,32,109,117,115,116,32,114,101,116,117,114,110,32,116,104,101,32,116,111,116,97,108,32,110,117,109,98,101,114,32,111,102,32, + 114,111,119,115,32,105,110,32,111,117,114,32,116,97,98,108,101,13,10,32,32,32,32,105,110,116,32,103,101,116,78,117,109,82,111,119,115,40,41,13, + 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,117,109,82,111,119,115,59,13,10,32,32,32,32,125,13,10, + 13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76,105, + 115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,115,104,111,117,108,100,32,102,105,108,108,32,105,110,32,116,104,101,32,98,97,99,107,103, + 114,111,117,110,100,32,111,102,32,116,104,101,32,119,104,111,108,101,32,114,111,119,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,82,111, + 119,66,97,99,107,103,114,111,117,110,100,32,40,71,114,97,112,104,105,99,115,38,32,103,44,32,105,110,116,32,114,111,119,78,117,109,98,101,114,44, + 32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104,116,44,32,98,111,111,108,32,114,111,119,73,115,83,101,108,101,99,116, + 101,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,111,119,73,115,83,101,108,101,99,116,101,100,41,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116,98,108,117, + 101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32, + 102,114,111,109,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,109,117,115,116,32,112,97,105,110,116,32,97, + 110,121,32,99,101,108,108,115,32,116,104,97,116,32,97,114,101,110,39,116,32,117,115,105,110,103,32,99,117,115,116,111,109,13,10,32,32,32,32,47, + 47,32,99,111,109,112,111,110,101,110,116,115,46,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,67,101,108,108,32,40,71,114,97,112,104, + 105,99,115,38,32,103,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,114,111,119,78,117,109,98, + 101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,99,111,108,117,109,110,73,100,44,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104, + 116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,111,108,32,114,111,119,73,115,83,101,108,101,99,116, + 101,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115, + 58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,102,111,110,116,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,99,111,110,115,116,32,88,109,108,69,108,101,109,101,110,116,42,32,114,111,119,69,108,101,109,101,110,116,32,61,32,100, + 97,116,97,76,105,115,116,45,62,103,101,116,67,104,105,108,100,69,108,101,109,101,110,116,32,40,114,111,119,78,117,109,98,101,114,41,59,13,10,13, + 10,32,32,32,32,32,32,32,32,105,102,32,40,114,111,119,69,108,101,109,101,110,116,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,101,120,116,32,40,114,111,119,69,108,101,109, + 101,110,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,103,101,116,65,116,116,114,105,98,117,116,101,78,97,109, + 101,70,111,114,67,111,108,117,109,110,73,100,32,40,99,111,108,117,109,110,73,100,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,103,46,100,114,97,119,84,101,120,116,32,40,116,101,120,116,44,32,50,44,32,48,44,32,119,105,100,116,104,32,45,32,52,44,32,104,101,105, + 103,104,116,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,76,101,102,116,44,32,116,114,117,101,41,59,13, + 10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117, + 114,115,58,58,98,108,97,99,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,50,102,41,41,59,13,10,32,32,32,32,32,32,32,32,103,46, + 102,105,108,108,82,101,99,116,32,40,119,105,100,116,104,32,45,32,49,44,32,48,44,32,49,44,32,104,101,105,103,104,116,41,59,13,10,32,32,32, + 32,125,13,10,13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98, + 108,101,76,105,115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,116,101,108,108,115,32,117,115,32,116,104,97,116,32,116,104,101,32,117,115, + 101,114,32,104,97,115,32,99,108,105,99,107,101,100,32,97,32,116,97,98,108,101,32,104,101,97,100,101,114,13,10,32,32,32,32,47,47,32,116,111, + 32,99,104,97,110,103,101,32,116,104,101,32,115,111,114,116,32,111,114,100,101,114,46,13,10,32,32,32,32,118,111,105,100,32,115,111,114,116,79,114, + 100,101,114,67,104,97,110,103,101,100,32,40,105,110,116,32,110,101,119,83,111,114,116,67,111,108,117,109,110,73,100,44,32,99,111,110,115,116,32,98, + 111,111,108,32,105,115,70,111,114,119,97,114,100,115,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,110,101,119,83, + 111,114,116,67,111,108,117,109,110,73,100,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,68,101,109,111,68,97,116,97,83,111,114,116,101,114,32,115,111,114,116,101,114,32,40,103,101,116,65,116,116,114,105,98,117,116,101,78,97,109, + 101,70,111,114,67,111,108,117,109,110,73,100,32,40,110,101,119,83,111,114,116,67,111,108,117,109,110,73,100,41,44,32,105,115,70,111,114,119,97,114, + 100,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,97,116,97,76,105,115,116,45,62,115,111,114,116,67,104,105,108,100,69,108,101, + 109,101,110,116,115,32,40,115,111,114,116,101,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,117,112, + 100,97,116,101,67,111,110,116,101,110,116,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, + 47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76,105,115,116,66,111,120,77, + 111,100,101,108,44,32,97,110,100,32,109,117,115,116,32,117,112,100,97,116,101,32,97,110,121,32,99,117,115,116,111,109,32,99,111,109,112,111,110,101, + 110,116,115,32,116,104,97,116,32,119,101,39,114,101,32,117,115,105,110,103,13,10,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,114,101,102, + 114,101,115,104,67,111,109,112,111,110,101,110,116,70,111,114,67,101,108,108,32,40,105,110,116,32,114,111,119,78,117,109,98,101,114,44,32,105,110,116, + 32,99,111,108,117,109,110,73,100,44,32,98,111,111,108,32,105,115,82,111,119,83,101,108,101,99,116,101,100,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,109,112,111,110,101,110, + 116,42,32,101,120,105,115,116,105,110,103,67,111,109,112,111,110,101,110,116,84,111,85,112,100,97,116,101,41,13,10,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,105,102,32,40,99,111,108,117,109,110,73,100,32,61,61,32,53,41,32,47,47,32,73,102,32,105,116,39,115,32,116,104,101,32, + 114,97,116,105,110,103,115,32,99,111,108,117,109,110,44,32,119,101,39,108,108,32,114,101,116,117,114,110,32,111,117,114,32,99,117,115,116,111,109,32, + 99,111,109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,82,97,116,105, + 110,103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,42,32,114,97,116,105,110,103,115,66,111,120,32,61,32,40,82, + 97,116,105,110,103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,42,41,32,101,120,105,115,116,105,110,103,67,111,109, + 112,111,110,101,110,116,84,111,85,112,100,97,116,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,73,102,32,97,110,32, + 101,120,105,115,116,105,110,103,32,99,111,109,112,111,110,101,110,116,32,105,115,32,98,101,105,110,103,32,112,97,115,115,101,100,45,105,110,32,102,111, + 114,32,117,112,100,97,116,105,110,103,44,32,119,101,39,108,108,32,114,101,45,117,115,101,32,105,116,44,32,98,117,116,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,47,47,32,105,102,32,110,111,116,44,32,119,101,39,108,108,32,104,97,118,101,32,116,111,32,99,114,101,97,116,101,32,111,110, + 101,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,97,116,105,110,103,115,66,111,120,32,61,61,32,48,41,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,97,116,105,110,103,115,66,111,120,32,61,32,110,101,119,32,82,97,116,105,110,103,67,111,108, + 117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,32,40,42,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,114,97,116,105,110,103,115,66,111,120,45,62,115,101,116,82,111,119,65,110,100,67,111,108,117,109,110,32,40,114,111,119,78,117,109,98,101, + 114,44,32,99,111,108,117,109,110,73,100,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,114,97,116,105, + 110,103,115,66,111,120,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,102,111,114,32,97,110,121,32,111,116,104,101,114,32,99,111,108,117,109,110, + 44,32,106,117,115,116,32,114,101,116,117,114,110,32,48,44,32,97,115,32,119,101,39,108,108,32,98,101,32,112,97,105,110,116,105,110,103,32,116,104, + 101,115,101,32,99,111,108,117,109,110,115,32,100,105,114,101,99,116,108,121,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,97,115, + 115,101,114,116,32,40,101,120,105,115,116,105,110,103,67,111,109,112,111,110,101,110,116,84,111,85,112,100,97,116,101,32,61,61,32,48,41,59,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13, + 10,13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76, + 105,115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,115,104,111,117,108,100,32,99,104,111,111,115,101,32,116,104,101,32,98,101,115,116,32, + 119,105,100,116,104,32,102,111,114,32,116,104,101,32,115,112,101,99,105,102,105,101,100,13,10,32,32,32,32,47,47,32,99,111,108,117,109,110,46,13, + 10,32,32,32,32,105,110,116,32,103,101,116,67,111,108,117,109,110,65,117,116,111,83,105,122,101,87,105,100,116,104,32,40,105,110,116,32,99,111,108, + 117,109,110,73,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,99,111,108,117,109,110,73,100,32,61,61,32,53, + 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,49,48,48,59,32,47,47,32,40,116,104,105,115,32,105,115,32,116, + 104,101,32,114,97,116,105,110,103,115,32,99,111,108,117,109,110,44,32,99,111,110,116,97,105,110,105,110,103,32,97,32,99,117,115,116,111,109,32,99, + 111,109,112,111,110,101,110,116,41,13,10,13,10,32,32,32,32,32,32,32,32,105,110,116,32,119,105,100,101,115,116,32,61,32,51,50,59,13,10,13, + 10,32,32,32,32,32,32,32,32,47,47,32,102,105,110,100,32,116,104,101,32,119,105,100,101,115,116,32,98,105,116,32,111,102,32,116,101,120,116,32, + 105,110,32,116,104,105,115,32,99,111,108,117,109,110,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,103, + 101,116,78,117,109,82,111,119,115,40,41,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,99,111,110,115,116,32,88,109,108,69,108,101,109,101,110,116,42,32,114,111,119,69,108,101,109,101,110,116,32,61,32,100, + 97,116,97,76,105,115,116,45,62,103,101,116,67,104,105,108,100,69,108,101,109,101,110,116,32,40,105,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,105,102,32,40,114,111,119,69,108,101,109,101,110,116,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,101,120,116,32,40,114,111,119, + 69,108,101,109,101,110,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,103,101,116,65,116,116,114,105,98,117,116, + 101,78,97,109,101,70,111,114,67,111,108,117,109,110,73,100,32,40,99,111,108,117,109,110,73,100,41,41,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,119,105,100,101,115,116,32,61,32,106,109,97,120,32,40,119,105,100,101,115,116,44,32,102,111,110,116,46,103,101, + 116,83,116,114,105,110,103,87,105,100,116,104,32,40,116,101,120,116,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32, + 32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,119,105,100,101,115,116,32,43,32,56,59,13,10,32, + 32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,65,32,99,111,117,112,108,101,32,111,102,32,113,117,105,99,107,32,109,101,116,104,111,100,115, + 32,116,111,32,115,101,116,32,97,110,100,32,103,101,116,32,116,104,101,32,34,114,97,116,105,110,103,34,32,118,97,108,117,101,32,119,104,101,110,32, + 116,104,101,32,117,115,101,114,13,10,32,32,32,32,47,47,32,99,104,97,110,103,101,115,32,116,104,101,32,99,111,109,98,111,32,98,111,120,13,10, + 32,32,32,32,105,110,116,32,103,101,116,82,97,116,105,110,103,32,40,99,111,110,115,116,32,105,110,116,32,114,111,119,78,117,109,98,101,114,44,32, + 99,111,110,115,116,32,105,110,116,32,99,111,108,117,109,110,73,100,41,32,99,111,110,115,116,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, + 32,32,114,101,116,117,114,110,32,100,97,116,97,76,105,115,116,45,62,103,101,116,67,104,105,108,100,69,108,101,109,101,110,116,32,40,114,111,119,78, + 117,109,98,101,114,41,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,40,84,40,34,82,97,116,105,110,103,34,41,41,59,13,10, + 32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,101,116,82,97,116,105,110,103,32,40,99,111,110,115,116,32,105,110,116,32,114, + 111,119,78,117,109,98,101,114,44,32,99,111,110,115,116,32,105,110,116,32,99,111,108,117,109,110,73,100,44,32,99,111,110,115,116,32,105,110,116,32, + 110,101,119,82,97,116,105,110,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,97,116,97,76,105,115,116,45,62,103,101,116, + 67,104,105,108,100,69,108,101,109,101,110,116,32,40,114,111,119,78,117,109,98,101,114,41,45,62,115,101,116,65,116,116,114,105,98,117,116,101,32,40, + 84,40,34,82,97,116,105,110,103,34,41,44,32,110,101,119,82,97,116,105,110,103,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47, + 47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13, + 10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,112, + 111,115,105,116,105,111,110,32,111,117,114,32,116,97,98,108,101,32,119,105,116,104,32,97,32,103,97,112,32,97,114,111,117,110,100,32,105,116,115,32, + 101,100,103,101,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,115,101,116,66,111,117,110,100,115,73,110,115,101,116,32,40,66,111,114, + 100,101,114,83,105,122,101,32,40,56,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,106,117,99,101,95,85, + 115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32, + 84,97,98,108,101,76,105,115,116,66,111,120,42,32,116,97,98,108,101,59,32,32,32,32,47,47,32,116,104,101,32,116,97,98,108,101,32,99,111,109, + 112,111,110,101,110,116,32,105,116,115,101,108,102,13,10,32,32,32,32,70,111,110,116,32,102,111,110,116,59,13,10,13,10,32,32,32,32,88,109,108, + 69,108,101,109,101,110,116,42,32,100,101,109,111,68,97,116,97,59,32,32,32,47,47,32,84,104,105,115,32,105,115,32,116,104,101,32,88,77,76,32, + 100,111,99,117,109,101,110,116,32,108,111,97,100,101,100,32,102,114,111,109,32,116,104,101,32,101,109,98,101,100,100,101,100,32,102,105,108,101,32,34, + 100,101,109,111,32,116,97,98,108,101,32,100,97,116,97,46,120,109,108,34,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,99,111, + 108,117,109,110,76,105,115,116,59,32,47,47,32,65,32,112,111,105,110,116,101,114,32,116,111,32,116,104,101,32,115,117,98,45,110,111,100,101,32,111, + 102,32,100,101,109,111,68,97,116,97,32,116,104,97,116,32,99,111,110,116,97,105,110,115,32,116,104,101,32,108,105,115,116,32,111,102,32,99,111,108, + 117,109,110,115,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,100,97,116,97,76,105,115,116,59,32,32,32,47,47,32,65,32,112, + 111,105,110,116,101,114,32,116,111,32,116,104,101,32,115,117,98,45,110,111,100,101,32,111,102,32,100,101,109,111,68,97,116,97,32,116,104,97,116,32, + 99,111,110,116,97,105,110,115,32,116,104,101,32,108,105,115,116,32,111,102,32,100,97,116,97,32,114,111,119,115,13,10,32,32,32,32,105,110,116,32, + 110,117,109,82,111,119,115,59,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,84,104,101,32,110,117,109,98,101,114,32,111,102,32,114,111,119, + 115,32,111,102,32,100,97,116,97,32,119,101,39,118,101,32,103,111,116,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,84,104,105,115, + 32,105,115,32,97,32,99,117,115,116,111,109,32,99,111,109,112,111,110,101,110,116,32,99,111,110,116,97,105,110,105,110,103,32,97,32,99,111,109,98, + 111,32,98,111,120,44,32,119,104,105,99,104,32,119,101,39,114,101,32,103,111,105,110,103,32,116,111,32,112,117,116,32,105,110,115,105,100,101,13,10, + 32,32,32,32,47,47,32,111,117,114,32,116,97,98,108,101,39,115,32,34,114,97,116,105,110,103,34,32,99,111,108,117,109,110,46,13,10,32,32,32, + 32,99,108,97,115,115,32,82,97,116,105,110,103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,32,32,32,32,58,32, + 112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,111,109,98,111,66,111,120,76,105,115, + 116,101,110,101,114,13,10,32,32,32,32,123,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,82,97,116,105,110, + 103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,32,40,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101, + 110,116,38,32,111,119,110,101,114,95,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,111,119,110,101,114,32,40,111,119,110,101,114,95, + 41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,106,117,115,116,32,112,117,116,32,97,32, + 99,111,109,98,111,32,98,111,120,32,105,110,115,105,100,101,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,109,98,111,66,111,120,32,61,32,110,101,119,32,67, + 111,109,98,111,66,111,120,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99, + 111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,102,97,98,34,41,44,32,49,41,59,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,103,114,111,111,118,121,34,41,44,32,50,41,59, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,104,101,112,34, + 41,44,32,51,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84, + 40,34,110,101,97,116,34,41,44,32,52,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100, + 73,116,101,109,32,40,84,40,34,119,105,108,100,34,41,44,32,53,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66, + 111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,115,119,105,110,103,105,110,34,41,44,32,54,41,59,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,109,97,100,32,102,111,114,32,105,116,34,41,44,32, + 55,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,119,104,101,110,32,116,104,101,32,99,111,109,98,111,32,105,115,32, + 99,104,97,110,103,101,100,44,32,119,101,39,108,108,32,103,101,116,32,97,32,99,97,108,108,98,97,99,107,46,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,87,97,110,116,115,75,101,121,98,111,97,114,100,70,111,99,117,115,32,40, + 102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,126,82,97,116,105,110,103,67,111,108, + 117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10, + 32,32,32,32,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,66,111,117,110,100,115,73,110,115,101,116,32,40,66,111,114,100,101,114,83, + 105,122,101,32,40,50,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,79,117,114,32,100, + 101,109,111,32,99,111,100,101,32,119,105,108,108,32,99,97,108,108,32,116,104,105,115,32,119,104,101,110,32,119,101,32,109,97,121,32,110,101,101,100, + 32,116,111,32,117,112,100,97,116,101,32,111,117,114,32,99,111,110,116,101,110,116,115,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,115,101, + 116,82,111,119,65,110,100,67,111,108,117,109,110,32,40,99,111,110,115,116,32,105,110,116,32,110,101,119,82,111,119,44,32,99,111,110,115,116,32,105, + 110,116,32,110,101,119,67,111,108,117,109,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,111, + 119,32,61,32,110,101,119,82,111,119,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,108,117,109,110,73,100,32,61,32,110,101,119,67, + 111,108,117,109,110,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,83,101,108,101,99,116,101, + 100,73,100,32,40,111,119,110,101,114,46,103,101,116,82,97,116,105,110,103,32,40,114,111,119,44,32,99,111,108,117,109,110,73,100,41,44,32,116,114, + 117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,109,98,111,66,111,120, + 67,104,97,110,103,101,100,32,40,67,111,109,98,111,66,111,120,42,32,99,111,109,98,111,66,111,120,84,104,97,116,72,97,115,67,104,97,110,103,101, + 100,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,115,101,116,82,97,116,105, + 110,103,32,40,114,111,119,44,32,99,111,108,117,109,110,73,100,44,32,99,111,109,98,111,66,111,120,45,62,103,101,116,83,101,108,101,99,116,101,100, + 73,100,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32, + 32,32,32,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101,110,116,38,32,111,119,110,101,114,59,13,10,32,32,32,32,32,32,32,32,67, + 111,109,98,111,66,111,120,42,32,99,111,109,98,111,66,111,120,59,13,10,32,32,32,32,32,32,32,32,105,110,116,32,114,111,119,44,32,99,111,108, + 117,109,110,73,100,59,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,65,32,99,111,109,112,97,114,97, + 116,111,114,32,117,115,101,100,32,116,111,32,115,111,114,116,32,111,117,114,32,100,97,116,97,32,119,104,101,110,32,116,104,101,32,117,115,101,114,32, + 99,108,105,99,107,115,32,97,32,99,111,108,117,109,110,32,104,101,97,100,101,114,13,10,32,32,32,32,99,108,97,115,115,32,68,101,109,111,68,97, + 116,97,83,111,114,116,101,114,13,10,32,32,32,32,123,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101, + 109,111,68,97,116,97,83,111,114,116,101,114,32,40,99,111,110,115,116,32,83,116,114,105,110,103,32,97,116,116,114,105,98,117,116,101,84,111,83,111, + 114,116,95,44,32,98,111,111,108,32,102,111,114,119,97,114,100,115,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,97,116,116,114,105, + 98,117,116,101,84,111,83,111,114,116,32,40,97,116,116,114,105,98,117,116,101,84,111,83,111,114,116,95,41,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,100,105,114,101,99,116,105,111,110,32,40,102,111,114,119,97,114,100,115,32,63,32,49,32,58,32,45,49,41,13,10,32,32,32, + 32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,105,110,116,32,99,111,109,112,97,114,101, + 69,108,101,109,101,110,116,115,32,40,88,109,108,69,108,101,109,101,110,116,42,32,102,105,114,115,116,44,32,88,109,108,69,108,101,109,101,110,116,42, + 32,115,101,99,111,110,100,41,32,99,111,110,115,116,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105, + 110,116,32,114,101,115,117,108,116,32,61,32,102,105,114,115,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,97, + 116,116,114,105,98,117,116,101,84,111,83,111,114,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,46,99,111,109,112,97,114,101,76,101,120,105,99,111,103,114,97,112,104,105,99,97,108,108,121,32,40,115,101,99,111,110,100,45,62,103, + 101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,97,116,116,114,105,98,117,116,101,84,111,83,111,114,116,41,41,59,13,10,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,114,101,115,117,108,116,32,61,32,102,105,114,115,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116, + 101,32,40,84,40,34,73,68,34,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 46,99,111,109,112,97,114,101,76,101,120,105,99,111,103,114,97,112,104,105,99,97,108,108,121,32,40,115,101,99,111,110,100,45,62,103,101,116,83,116, + 114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,84,40,34,73,68,34,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,114,101,116,117,114,110,32,100,105,114,101,99,116,105,111,110,32,42,32,114,101,115,117,108,116,59,13,10,32,32,32,32,32,32,32,32,125,13,10, + 13,10,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,97,116,116, + 114,105,98,117,116,101,84,111,83,111,114,116,59,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,100,105,114,101,99,116,105, + 111,110,59,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,116,104,105,115,32,108,111,97,100,115,32,116, + 104,101,32,101,109,98,101,100,100,101,100,32,100,97,116,97,98,97,115,101,32,88,77,76,32,102,105,108,101,32,105,110,116,111,32,109,101,109,111,114, + 121,13,10,32,32,32,32,118,111,105,100,32,108,111,97,100,68,97,116,97,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,88, + 109,108,68,111,99,117,109,101,110,116,32,100,97,116,97,68,111,99,32,40,83,116,114,105,110,103,32,40,40,99,111,110,115,116,32,99,104,97,114,42, + 41,32,66,105,110,97,114,121,68,97,116,97,58,58,100,101,109,111,95,116,97,98,108,101,95,100,97,116,97,95,120,109,108,41,41,59,13,10,32,32, + 32,32,32,32,32,32,100,101,109,111,68,97,116,97,32,61,32,100,97,116,97,68,111,99,46,103,101,116,68,111,99,117,109,101,110,116,69,108,101,109, + 101,110,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,97,116,97,76,105,115,116,32,61,32,100,101,109,111,68,97,116,97,45,62,103, + 101,116,67,104,105,108,100,66,121,78,97,109,101,32,40,84,40,34,68,65,84,65,34,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,117, + 109,110,76,105,115,116,32,61,32,100,101,109,111,68,97,116,97,45,62,103,101,116,67,104,105,108,100,66,121,78,97,109,101,32,40,84,40,34,67,79, + 76,85,77,78,83,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,110,117,109,82,111,119,115,32,61,32,100,97,116,97,76,105,115,116,45, + 62,103,101,116,78,117,109,67,104,105,108,100,69,108,101,109,101,110,116,115,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47, + 32,40,97,32,117,116,105,108,105,116,121,32,109,101,116,104,111,100,32,116,111,32,115,101,97,114,99,104,32,111,117,114,32,88,77,76,32,102,111,114, + 32,116,104,101,32,97,116,116,114,105,98,117,116,101,32,116,104,97,116,32,109,97,116,99,104,101,115,32,97,32,99,111,108,117,109,110,32,73,68,41, + 13,10,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,103,101,116,65,116,116,114,105,98,117,116,101,78,97,109,101,70,111,114,67,111, + 108,117,109,110,73,100,32,40,99,111,110,115,116,32,105,110,116,32,99,111,108,117,109,110,73,100,41,32,99,111,110,115,116,13,10,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,102,111,114,69,97,99,104,88,109,108,67,104,105,108,100,69,108,101,109,101,110,116,32,40,42,99,111,108,117,109, + 110,76,105,115,116,44,32,99,111,108,117,109,110,88,109,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,105,102,32,40,99,111,108,117,109,110,88,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,84,40,34,99,111,108,117, + 109,110,73,100,34,41,32,61,61,32,99,111,108,117,109,110,73,100,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116, + 117,114,110,32,99,111,108,117,109,110,88,109,108,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,84,40,34,110,97,109, + 101,34,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,116,114,105,110,103, + 58,58,101,109,112,116,121,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114, + 101,97,116,101,84,97,98,108,101,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,97,98,108,101, + 68,101,109,111,67,111,109,112,111,110,101,110,116,40,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::tabledemo_cpp = (const char*) temp4; + +static const unsigned char temp5[] = {82,73,70,70,4,181,0,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,34,86,0,0,68,172,0,0,2,0,16,0,98,101,120,116, 92,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -1753,142 +2206,9 @@ static const unsigned char temp2[] = {82,73,70,70,4,181,0,0,87,65,86,69,102,109, 238,255,239,255,237,255,239,255,241,255,235,255,232,255,231,255,230,255,234,255,231,255,232,255,230,255,234,255,235,255,234,255,227,255,230,255,231,255,220,255, 217,255,210,255,213,255,217,255,217,255,219,255,220,255,219,255,226,255,223,255,212,255,220,255,220,255,220,255,210,255,223,255,230,255,224,255,227,255,231,255, 231,255,231,255,234,255,226,255,232,255,237,255,241,255,235,255,232,255,231,255,232,255,237,255,235,255,234,255,0,0}; -const char* BinaryData::cello_wav = (const char*) temp2; +const char* BinaryData::cello_wav = (const char*) temp5; -static const unsigned char temp3[] = {60,68,69,77,79,95,84,65,66,76,69,95,68,65,84,65,62,13,10,32,32,32,32,60,67,79,76,85,77,78,83,62,13,10,32,32,32,32,32,32, - 32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,49,34,32,110,97,109,101,61,34,73,68,34,32,119,105,100,116,104,61,34, - 53,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,50,34,32,110,97,109,101, - 61,34,65,114,116,105,115,116,34,32,119,105,100,116,104,61,34,49,53,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78, - 32,99,111,108,117,109,110,73,100,61,34,51,34,32,110,97,109,101,61,34,83,111,110,103,34,32,119,105,100,116,104,61,34,50,48,48,34,47,62,13, - 10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,52,34,32,110,97,109,101,61,34,65,108,98,117, - 109,34,32,119,105,100,116,104,61,34,49,48,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110, - 73,100,61,34,53,34,32,110,97,109,101,61,34,82,97,116,105,110,103,34,32,119,105,100,116,104,61,34,49,50,48,34,47,62,13,10,32,32,32,32, - 32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,54,34,32,110,97,109,101,61,34,71,101,110,114,101,34,32,119,105, - 100,116,104,61,34,56,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,67,79,76,85,77,78,32,99,111,108,117,109,110,73,100,61,34,55,34, - 32,110,97,109,101,61,34,76,101,110,103,116,104,34,32,119,105,100,116,104,61,34,56,48,34,47,62,13,10,32,32,32,32,60,47,67,79,76,85,77, - 78,83,62,13,10,32,32,32,32,60,68,65,84,65,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,49,34,32,65, - 114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32,83,111,110, - 103,61,34,84,97,120,109,97,110,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,51,57,34,32,82,97, - 116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,50,34,32,65,114,116,105,115,116, - 61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32,83,111,110,103,61,34,69,108, - 101,97,110,111,114,32,82,105,103,98,121,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,48,55,34,32, - 82,97,116,105,110,103,61,34,50,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,51,34,32,65,114,116,105, - 115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32,83,111,110,103,61,34, - 73,39,109,32,111,110,108,121,32,83,108,101,101,112,105,110,103,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34, - 51,58,48,49,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,52, - 34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,101,118,111,108,118,101,114,34,32, - 83,111,110,103,61,34,89,101,108,108,111,119,32,83,117,98,109,97,114,105,110,101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110, - 103,116,104,61,34,50,58,52,48,34,32,82,97,116,105,110,103,61,34,52,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73, - 68,61,34,48,53,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82,117,98,98,101, - 114,32,83,111,117,108,34,32,83,111,110,103,61,34,68,114,105,118,101,32,77,121,32,67,97,114,34,32,71,101,110,114,101,61,34,82,111,99,107,34, - 32,76,101,110,103,116,104,61,34,50,58,51,48,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84, - 69,77,32,73,68,61,34,48,54,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108,98,117,109,61,34,82, - 117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,78,111,114,119,101,103,105,97,110,32,87,111,111,100,34,32,71,101,110,114,101,61, - 34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,48,53,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32, - 32,32,32,60,73,84,69,77,32,73,68,61,34,48,55,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34,32,65,108, - 98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,78,111,119,104,101,114,101,32,77,97,110,34,32,71,101,110, - 114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,52,52,34,32,82,97,116,105,110,103,61,34,53,34,47,62,13,10,32,32, - 32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,56,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34, - 32,65,108,98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,84,104,101,32,87,111,114,100,34,32,71,101,110, - 114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,52,51,34,32,82,97,116,105,110,103,61,34,50,34,47,62,13,10,32,32, - 32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,48,57,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116,108,101,115,34, - 32,65,108,98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,87,104,97,116,32,71,111,101,115,32,79,110,34, - 32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,53,48,34,32,82,97,116,105,110,103,61,34,51,34,47,62, - 13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,48,34,32,65,114,116,105,115,116,61,34,84,104,101,32,66,101,97,116, - 108,101,115,34,32,65,108,98,117,109,61,34,82,117,98,98,101,114,32,83,111,117,108,34,32,83,111,110,103,61,34,73,110,32,77,121,32,76,105,102, - 101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,50,55,34,32,82,97,116,105,110,103,61,34,49,34, - 47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,49,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97, - 117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,86,105,99,116,111,114,105,97,108,97,110,100,34,32,83,111,110,103,61,34,76,97,122,121, - 32,67,97,108,109,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,54,58,51,54,34,32,82,97, - 116,105,110,103,61,34,54,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,50,34,32,65,114,116,105,115,116, - 61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,86,105,99,116,111,114,105,97,108,97,110,100,34,32,83,111, - 110,103,61,34,70,108,117,102,102,121,32,84,117,102,116,115,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116, - 104,61,34,51,58,48,53,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61, - 34,49,51,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,86,105,99,116,111, - 114,105,97,108,97,110,100,34,32,83,111,110,103,61,34,79,111,109,105,110,103,109,97,107,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97, - 108,34,32,76,101,110,103,116,104,61,34,50,58,52,50,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10,32,32,32,32,32,32,32,32,60, - 73,84,69,77,32,73,68,61,34,49,52,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117, - 109,61,34,86,105,99,116,111,114,105,97,108,97,110,100,34,32,83,111,110,103,61,34,70,101,101,116,45,76,105,107,101,32,70,105,110,115,34,32,71, - 101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,50,54,34,32,82,97,116,105,110,103,61,34,49,34, - 47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,53,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97, - 117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,70,111,117,114,32,67,97,108,101,110,100,97,114,32,67,97,102,101,34,32,83,111,110,103, - 61,34,75,110,111,119,32,87,104,111,32,89,111,117,32,65,114,101,32,65,116,32,69,118,101,114,121,32,65,103,101,34,32,71,101,110,114,101,61,34, - 69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,52,50,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32, - 32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,54,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110, - 115,34,32,65,108,98,117,109,61,34,70,111,117,114,32,67,97,108,101,110,100,97,114,32,67,97,102,101,34,32,83,111,110,103,61,34,69,118,97,110, - 103,101,108,105,110,101,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,52,58,51,49,34,32,82, - 97,116,105,110,103,61,34,53,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,55,34,32,65,114,116,105,115, - 116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,70,111,117,114,32,67,97,108,101,110,100,97,114,32,67, - 97,102,101,34,32,83,111,110,103,61,34,66,108,117,101,98,101,97,114,100,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76, - 101,110,103,116,104,61,34,51,58,53,54,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77, - 32,73,68,61,34,49,56,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,70, - 111,117,114,32,67,97,108,101,110,100,97,114,32,67,97,102,101,34,32,83,111,110,103,61,34,83,113,117,101,101,122,101,45,87,97,120,34,32,71,101, - 110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,52,57,34,32,82,97,116,105,110,103,61,34,49,34,47, - 62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,49,57,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117, - 32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34,32,83,111,110,103, - 61,34,67,104,101,114,114,121,45,67,111,108,111,117,114,101,100,32,70,117,110,107,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34, - 32,76,101,110,103,116,104,61,34,51,58,49,51,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84, - 69,77,32,73,68,61,34,50,48,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61, - 34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34,32,83,111,110,103,61,34,73,99,101,98,108,105,110,107,32,76,117,99, - 107,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,49,56,34,32,82,97,116,105,110,103, - 61,34,55,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,49,34,32,65,114,116,105,115,116,61,34,67,111, - 99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117,109,61,34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34, - 32,83,111,110,103,61,34,70,105,102,116,121,45,70,105,102,116,121,32,67,108,111,119,110,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97, - 108,34,32,76,101,110,103,116,104,61,34,51,58,49,53,34,32,82,97,116,105,110,103,61,34,50,34,47,62,13,10,32,32,32,32,32,32,32,32,60, - 73,84,69,77,32,73,68,61,34,50,50,34,32,65,114,116,105,115,116,61,34,67,111,99,116,101,97,117,32,84,119,105,110,115,34,32,65,108,98,117, - 109,61,34,72,101,97,118,101,110,32,79,114,32,76,97,115,32,86,101,103,97,115,34,32,83,111,110,103,61,34,70,111,116,122,101,112,111,108,105,116, - 105,99,34,32,71,101,110,114,101,61,34,69,116,104,101,114,105,97,108,34,32,76,101,110,103,116,104,61,34,51,58,51,48,34,32,82,97,116,105,110, - 103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,51,34,32,65,114,116,105,115,116,61,34,82, - 111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73,32,79,102,116,101,110,32,68,114,101,97,109,32,111,102,32, - 84,114,97,105,110,115,34,32,83,111,110,103,61,34,78,111,99,116,117,114,110,101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110, - 103,116,104,61,34,49,58,52,50,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73, - 68,61,34,50,52,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73, - 32,79,102,116,101,110,32,68,114,101,97,109,32,111,102,32,84,114,97,105,110,115,34,32,83,111,110,103,61,34,85,110,99,111,114,114,101,99,116,101, - 100,32,80,101,114,115,111,110,97,108,105,116,121,32,84,114,97,105,116,115,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116, - 104,61,34,49,58,52,53,34,32,82,97,116,105,110,103,61,34,53,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61, - 34,50,53,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73,32,79, - 102,116,101,110,32,68,114,101,97,109,32,111,102,32,84,114,97,105,110,115,34,32,83,111,110,103,61,34,77,121,32,70,97,118,111,117,114,105,116,101, - 32,66,117,105,108,100,105,110,103,115,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,52,57,34,32,82, - 97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,54,34,32,65,114,116,105,115, - 116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,73,32,79,102,116,101,110,32,68,114,101,97,109, - 32,111,102,32,84,114,97,105,110,115,34,32,83,111,110,103,61,34,72,101,97,114,116,102,117,108,32,111,102,32,76,101,97,118,101,115,34,32,71,101, - 110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,51,48,34,32,82,97,116,105,110,103,61,34,55,34,47,62,13,10,32, - 32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,55,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104, - 99,111,99,107,34,32,65,108,98,117,109,61,34,76,117,120,111,114,34,32,83,111,110,103,61,34,80,101,110,101,108,111,112,101,39,115,32,65,110,103, - 108,101,115,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,51,58,49,56,34,32,82,97,116,105,110,103,61,34, - 49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,56,34,32,65,114,116,105,115,116,61,34,82,111,98,121, - 110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,76,117,120,111,114,34,32,83,111,110,103,61,34,89,111,117,32,82,101,109, - 105,110,100,32,77,101,32,79,102,32,89,111,117,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,49,53, - 34,32,82,97,116,105,110,103,61,34,52,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,50,57,34,32,65,114, - 116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,76,117,120,111,114,34,32,83,111,110, - 103,61,34,84,104,101,32,87,111,108,102,32,72,111,117,115,101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34, - 51,58,50,51,34,32,82,97,116,105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,48, - 34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,74,101,119,101,108,115, - 32,70,111,114,32,83,111,112,104,105,97,34,32,83,111,110,103,61,34,77,101,120,105,99,97,110,32,71,111,100,34,32,71,101,110,114,101,61,34,82, - 111,99,107,34,32,76,101,110,103,116,104,61,34,50,58,53,55,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10,32,32,32,32,32,32,32, - 32,60,73,84,69,77,32,73,68,61,34,51,49,34,32,65,114,116,105,115,116,61,34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32, - 65,108,98,117,109,61,34,74,101,119,101,108,115,32,70,111,114,32,83,111,112,104,105,97,34,32,83,111,110,103,61,34,84,104,101,32,67,104,101,101, - 115,101,32,65,108,97,114,109,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,48,51,34,32,82,97,116, - 105,110,103,61,34,49,34,47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,50,34,32,65,114,116,105,115,116,61, - 34,82,111,98,121,110,32,72,105,116,99,104,99,111,99,107,34,32,65,108,98,117,109,61,34,74,101,119,101,108,115,32,70,111,114,32,83,111,112,104, - 105,97,34,32,83,111,110,103,61,34,78,111,44,32,73,32,68,111,110,39,116,32,82,101,109,101,109,98,101,114,32,71,117,105,108,100,102,111,114,100, - 34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,52,53,34,32,82,97,116,105,110,103,61,34,54,34,47, - 62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,51,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97,114, - 114,101,116,116,34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,66,97,98,121,32,76,101,109,111,110,97,100, - 101,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,49,48,34,32,82,97,116,105,110,103,61,34,50,34, - 47,62,13,10,32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,52,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97, - 114,114,101,116,116,34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,68,111,109,105,110,111,101,115,34,32,71, - 101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,52,58,48,56,34,32,82,97,116,105,110,103,61,34,51,34,47,62,13,10, - 32,32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,53,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97,114,114,101,116, - 116,34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,71,105,103,111,108,111,32,65,117,110,116,34,32,71,101, - 110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,53,58,52,54,34,32,82,97,116,105,110,103,61,34,52,34,47,62,13,10,32, - 32,32,32,32,32,32,32,60,73,84,69,77,32,73,68,61,34,51,54,34,32,65,114,116,105,115,116,61,34,83,121,100,32,66,97,114,114,101,116,116, - 34,32,65,108,98,117,109,61,34,66,97,114,114,101,116,116,34,32,83,111,110,103,61,34,69,102,102,101,114,118,101,115,99,105,110,103,32,69,108,101, - 112,104,97,110,116,34,32,71,101,110,114,101,61,34,82,111,99,107,34,32,76,101,110,103,116,104,61,34,49,58,53,50,34,32,82,97,116,105,110,103, - 61,34,53,34,47,62,13,10,32,32,32,32,60,47,68,65,84,65,62,13,10,60,47,68,69,77,79,95,84,65,66,76,69,95,68,65,84,65,62,0,0}; -const char* BinaryData::demo_table_data_xml = (const char*) temp3; - -static const unsigned char temp4[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, +static const unsigned char temp6[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, @@ -2087,9 +2407,18 @@ static const unsigned char temp4[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,68,114,97, 103,65,110,100,68,114,111,112,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,68,114,97,103,65,110, 100,68,114,111,112,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::draganddropdemo_cpp = (const char*) temp4; +const char* BinaryData::draganddropdemo_cpp = (const char*) temp6; -static const unsigned char temp5[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, +static const unsigned char temp7[] = {13,10,70,89,73,46,46,13,10,13,10,84,111,32,101,109,98,101,100,32,116,104,101,32,102,105,108,101,115,32,97,110,100,32,116,104,105,110,103,115, + 32,116,104,97,116,32,116,104,101,32,100,101,109,111,32,110,101,101,100,115,32,105,110,116,111,32,105,116,115,32,101,120,101,99,117,116,97,98,108,101, + 44,32,13,10,73,39,118,101,32,117,115,101,100,32,109,121,32,66,105,110,97,114,121,66,117,105,108,100,101,114,32,117,116,105,108,105,116,121,32,45, + 32,116,104,101,32,102,105,108,101,115,32,105,110,32,116,104,105,115,32,100,105,114,101,99,116,111,114,121,32,97,114,101,32,116,104,101,13,10,111,110, + 101,115,32,116,104,97,116,32,103,101,116,32,101,110,99,111,100,101,100,32,105,110,116,111,32,66,105,110,97,114,121,68,97,116,97,46,99,112,112,32, + 97,110,100,32,66,105,110,97,114,121,68,97,116,97,46,104,44,32,119,104,105,99,104,32,103,101,116,32,98,117,105,108,116,32,13,10,105,110,116,111, + 32,116,104,101,32,97,112,112,108,105,99,97,116,105,111,110,46,13,10,0,0}; +const char* BinaryData::readme__what_this_directory_is_for_txt = (const char*) temp7; + +static const unsigned char temp8[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, @@ -2126,199 +2455,3199 @@ static const unsigned char temp5[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61, 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,99,108,97,115,115,32,70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112, - 111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99, - 32,76,105,115,116,66,111,120,77,111,100,101,108,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,83,108,105,100,101,114,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32, - 32,32,79,119,110,101,100,65,114,114,97,121,32,60,70,111,110,116,62,32,102,111,110,116,115,59,13,10,32,32,32,32,76,105,115,116,66,111,120,42, - 32,108,105,115,116,66,111,120,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,116,101,120,116,66,111,120,59,13,10,32,32,32, - 32,84,111,103,103,108,101,66,117,116,116,111,110,42,32,98,111,108,100,66,117,116,116,111,110,59,13,10,32,32,32,32,84,111,103,103,108,101,66,117, - 116,116,111,110,42,32,105,116,97,108,105,99,66,117,116,116,111,110,59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,115,105,122,101,83,108,105, - 100,101,114,59,13,10,13,10,32,32,32,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,77,97,110,97,103,101,114,32,118,101,114, - 116,105,99,97,108,76,97,121,111,117,116,59,13,10,32,32,32,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,77,97,110,97,103, - 101,114,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,59,13,10,13,10,32,32,32,32,83,116,114,101,116,99,104,97,98,108,101,76, - 97,121,111,117,116,82,101,115,105,122,101,114,66,97,114,42,32,118,101,114,116,105,99,97,108,68,105,118,105,100,101,114,66,97,114,59,13,10,32,32, - 32,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,82,101,115,105,122,101,114,66,97,114,42,32,104,111,114,105,122,111,110,116,97, - 108,68,105,118,105,100,101,114,66,97,114,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61, + 61,13,10,99,108,97,115,115,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,32,58,32,112,117,98,108,105,99,32,84,114,101,101, + 86,105,101,119,73,116,101,109,13,10,123,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,120,109,108,59,13,10,13,10,112,117,98, + 108,105,99,58,13,10,32,32,32,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,40,88,109,108,69,108,101,109,101,110,116,42,32, + 99,111,110,115,116,32,120,109,108,95,41,13,10,32,32,32,32,32,32,32,32,58,32,120,109,108,32,40,120,109,108,95,41,13,10,32,32,32,32,123, + 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,40,41,13,10,32,32,32,32, + 123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,105,110,116,32,103,101,116,73,116,101,109,87,105,100,116,104,40,41,32,99,111,110,115,116, + 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,120,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105, + 98,117,116,101,32,40,84,40,34,119,105,100,116,104,34,41,44,32,45,49,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,99,111,110, + 115,116,32,83,116,114,105,110,103,32,103,101,116,85,110,105,113,117,101,78,97,109,101,40,41,32,99,111,110,115,116,13,10,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,105,102,32,40,120,109,108,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114, + 110,32,120,109,108,45,62,103,101,116,84,97,103,78,97,109,101,40,41,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,116,114,105,110,103,58,58,101,109,112,116,121,59,13,10,32,32,32,32,125,13,10,13,10, + 32,32,32,32,98,111,111,108,32,109,105,103,104,116,67,111,110,116,97,105,110,83,117,98,73,116,101,109,115,40,41,13,10,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,120,109,108,32,33,61,32,48,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,38,38,32,120,109,108,45,62,103,101,116,70,105,114,115,116,67,104,105,108,100,69,108,101,109,101,110,116,40,41,32,33,61,32,48,59,13,10,32, + 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,73,116,101,109,32,40,71,114,97,112,104,105,99,115,38,32,103,44, + 32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104,116,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, + 105,102,32,40,120,109,108,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47, + 32,105,102,32,116,104,105,115,32,105,116,101,109,32,105,115,32,115,101,108,101,99,116,101,100,44,32,102,105,108,108,32,105,116,32,119,105,116,104,32, + 97,32,98,97,99,107,103,114,111,117,110,100,32,99,111,108,111,117,114,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105, + 115,83,101,108,101,99,116,101,100,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32, + 40,67,111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,48,46,51,102,41,41,59,13,10,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,47,47,32,117,115,101,32,97,32,34,99,111,108,111,117,114,34,32,97,116,116,114,105,98,117,116,101,32,105,110,32, + 116,104,101,32,120,109,108,32,116,97,103,32,102,111,114,32,116,104,105,115,32,110,111,100,101,32,116,111,32,115,101,116,32,116,104,101,32,116,101,120, + 116,32,99,111,108,111,117,114,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108, + 111,117,114,32,40,120,109,108,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,84,40,34,99,111,108,111,117,114,34, + 41,44,32,84,40,34,102,102,48,48,48,48,48,48,34,41,41,46,103,101,116,72,101,120,86,97,108,117,101,51,50,40,41,41,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,104,101,105,103,104,116,32,42,32,48,46,55,102,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,100,114,97,119,32,116,104,101,32,120,109,108,32,101,108,101,109,101,110,116,39,115,32, + 116,97,103,32,110,97,109,101,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120,116,32,40,120,109,108,45, + 62,103,101,116,84,97,103,78,97,109,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 52,44,32,48,44,32,119,105,100,116,104,32,45,32,52,44,32,104,101,105,103,104,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,76,101,102,116,44,32,116,114, + 117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,105,116,101,109,79, + 112,101,110,110,101,115,115,67,104,97,110,103,101,100,32,40,98,111,111,108,32,105,115,78,111,119,79,112,101,110,41,13,10,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,105,102,32,40,105,115,78,111,119,79,112,101,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,47,47,32,105,102,32,119,101,39,118,101,32,110,111,116,32,97,108,114,101,97,100,121,32,100,111,110,101,32,115,111,44,32, + 119,101,39,108,108,32,110,111,119,32,97,100,100,32,116,104,101,32,116,114,101,101,39,115,32,115,117,98,45,105,116,101,109,115,46,32,89,111,117,32, + 99,111,117,108,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,108,115,111,32,99,104,111,111,115,101,32,116,111,32,100,101,108, + 101,116,101,32,116,104,101,32,101,120,105,115,116,105,110,103,32,111,110,101,115,32,97,110,100,32,114,101,102,114,101,115,104,32,116,104,101,109,32,105, + 102,32,116,104,97,116,39,115,32,109,111,114,101,32,115,117,105,116,97,98,108,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105, + 110,32,121,111,117,114,32,97,112,112,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109,83,117,98,73,116, + 101,109,115,40,41,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,110,100,32,97,100,100,32,115,117,98,45,105,116,101,109,115,32,116,111,32,116,104,105,115,32, + 110,111,100,101,32,111,102,32,116,104,101,32,116,114,101,101,44,32,99,111,114,114,101,115,112,111,110,100,105,110,103,32,116,111,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,101,97,99,104,32,115,117,98,45,101,108,101,109,101,110,116,32,105,110,32,116,104,101,32,88, + 77,76,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,120,109,108,32,33,61,32,48,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111, + 114,69,97,99,104,88,109,108,67,104,105,108,100,69,108,101,109,101,110,116,32,40,42,120,109,108,44,32,99,104,105,108,100,41,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,97,100,100,83,117,98,73,116,101,109,32,40,110,101,119,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,40,99,104,105, + 108,100,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32, + 32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105,110,32,116,104, + 105,115,32,99,97,115,101,44,32,119,101,39,108,108,32,108,101,97,118,101,32,97,110,121,32,115,117,98,45,105,116,101,109,115,32,105,110,32,116,104, + 101,32,116,114,101,101,32,119,104,101,110,32,116,104,101,32,110,111,100,101,32,103,101,116,115,32,99,108,111,115,101,100,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,47,47,32,116,104,111,117,103,104,32,121,111,117,32,99,111,117,108,100,32,99,104,111,111,115,101,32,116,111,32,100,101,108, + 101,116,101,32,116,104,101,109,32,105,102,32,116,104,97,116,39,115,32,109,111,114,101,32,97,112,112,114,111,112,114,105,97,116,101,32,102,111,114,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,121,111,117,114,32,97,112,112,108,105,99,97,116,105,111,110,46,13,10,32,32,32,32,32, + 32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,103,101,116,68,114,97,103,83, + 111,117,114,99,101,68,101,115,99,114,105,112,116,105,111,110,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114, + 110,32,84,40,34,84,114,101,101,86,105,101,119,32,73,116,101,109,115,34,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,70,111,110,116,115, - 65,110,100,84,101,120,116,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84, - 40,34,70,111,110,116,115,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,70,111,110,116,58,58,102,105,110,100,70,111,110,116,115,32,40, - 102,111,110,116,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,108,105, - 115,116,66,111,120,32,61,32,110,101,119,32,76,105,115,116,66,111,120,32,40,84,40,34,102,111,110,116,115,34,41,44,32,116,104,105,115,41,41,59, - 13,10,32,32,32,32,32,32,32,32,108,105,115,116,66,111,120,45,62,115,101,116,82,111,119,72,101,105,103,104,116,32,40,50,56,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,101,120,116,66,111,120,32,61,32,110,101, - 119,32,84,101,120,116,69,100,105,116,111,114,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116, - 67,111,108,111,117,114,32,40,84,101,120,116,69,100,105,116,111,114,58,58,98,97,99,107,103,114,111,117,110,100,67,111,108,111,117,114,73,100,44,32, - 67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13,10,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116,67,111, - 108,111,117,114,32,40,84,101,120,116,69,100,105,116,111,114,58,58,111,117,116,108,105,110,101,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117, - 114,115,58,58,98,108,97,99,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 116,101,120,116,66,111,120,45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32, - 32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116,82,101,116,117,114,110,75,101,121,83,116,97,114,116,115,78,101,119,76,105,110,101,32, - 40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116,84,101,120,116,32,40,84,40,34,84,104, - 101,32,81,117,105,99,107,32,66,114,111,119,110,32,70,111,120,32,74,117,109,112,101,100,32,79,118,101,114,32,84,104,101,32,76,97,122,121,32,68, - 111,103,92,110,92,110,65,97,32,66,98,32,67,99,32,68,100,32,69,101,32,70,102,32,71,103,32,72,104,32,73,105,32,74,106,32,75,107,32,76, - 108,32,77,109,32,78,110,32,79,111,32,80,112,32,81,113,32,82,114,32,83,115,32,84,116,32,85,117,32,86,118,32,87,119,32,88,120,32,89,121, - 32,90,122,32,48,49,50,51,52,53,54,55,56,57,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101, - 86,105,115,105,98,108,101,32,40,98,111,108,100,66,117,116,116,111,110,32,61,32,110,101,119,32,84,111,103,103,108,101,66,117,116,116,111,110,32,40, - 84,40,34,98,111,108,100,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,98,111,108,100,66,117,116,116,111,110,45,62,97,100,100,66,117,116, - 116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107, - 101,86,105,115,105,98,108,101,32,40,105,116,97,108,105,99,66,117,116,116,111,110,32,61,32,110,101,119,32,84,111,103,103,108,101,66,117,116,116,111, - 110,32,40,84,40,34,105,116,97,108,105,99,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,105,116,97,108,105,99,66,117,116,116,111,110,45, - 62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100, - 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,105,122,101,83,108,105,100,101,114,32,61,32,110,101,119,32,83,108,105,100,101,114, - 32,40,84,40,34,115,105,122,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,105,122,101,83,108,105,100,101,114,45,62,115,101,116,82, - 97,110,103,101,32,40,51,46,48,44,32,49,53,48,46,48,44,32,48,46,49,41,59,13,10,32,32,32,32,32,32,32,32,115,105,122,101,83,108,105, - 100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,50,48,46,48,41,59,13,10,32,32,32,32,32,32,32,32,115,105,122,101,83,108,105,100,101, - 114,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,108,105,115,116,66,111, - 120,45,62,115,101,108,101,99,116,82,111,119,32,40,48,41,59,13,10,32,32,32,32,32,32,32,32,108,105,115,116,66,111,120,45,62,115,101,116,67, - 111,108,111,117,114,32,40,76,105,115,116,66,111,120,58,58,111,117,116,108,105,110,101,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115, - 58,58,98,108,97,99,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,41,59,13,10,32,32,32,32,32,32,32,32,108,105,115,116, - 66,111,120,45,62,115,101,116,79,117,116,108,105,110,101,84,104,105,99,107,110,101,115,115,32,40,49,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,47,47,32,115,101,116,32,117,112,32,116,104,101,32,108,97,121,111,117,116,32,97,110,100,32,114,101,115,105,122,101,114,32,98,97,114,115,46,46, - 13,10,13,10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116, - 32,40,48,44,32,45,48,46,50,44,32,45,48,46,56,44,32,45,48,46,53,41,59,32,32,47,47,32,119,105,100,116,104,32,111,102,32,116,104,101, - 32,102,111,110,116,32,108,105,115,116,32,109,117,115,116,32,98,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,47,47,32,98,101,116,119,101,101,110,32,50,48,37,32,97,110,100,32,56,48,37,44,32,112,114,101,102,101,114,97,98,108,121,32,53,48,37,13, - 10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,49, - 44,32,56,44,32,56,44,32,56,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,118,101,114,116,105,99,97,108,32,100,105, - 118,105,100,101,114,32,100,114,97,103,45,98,97,114,32,116,104,105,110,103,32,105,115,32,97,108,119,97,121,115,32,56,32,112,105,120,101,108,115,32, - 119,105,100,101,13,10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111, - 117,116,32,40,50,44,32,49,53,48,44,32,45,49,46,48,44,32,45,48,46,53,41,59,32,32,32,47,47,32,116,104,101,32,99,111,109,112,111,110, - 101,110,116,115,32,111,110,32,116,104,101,32,114,105,103,104,116,32,109,117,115,116,32,98,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,47,47,32,97,116,32,108,101,97,115,116,32,49,53,48,32,112,105,120,101,108,115,32,119,105,100,101,44,32,112,114,101, - 102,101,114,97,98,108,121,32,53,48,37,32,111,102,32,116,104,101,32,116,111,116,97,108,32,119,105,100,116,104,13,10,13,10,32,32,32,32,32,32, - 32,32,118,101,114,116,105,99,97,108,68,105,118,105,100,101,114,66,97,114,32,61,32,110,101,119,32,83,116,114,101,116,99,104,97,98,108,101,76,97, - 121,111,117,116,82,101,115,105,122,101,114,66,97,114,32,40,38,118,101,114,116,105,99,97,108,76,97,121,111,117,116,44,32,49,44,32,116,114,117,101, - 41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,118,101,114,116,105,99,97,108,68, - 105,118,105,100,101,114,66,97,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46, - 115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,48,44,32,45,48,46,50,44,32,45,49,46,48,44,32,45,48,46,52,41,59,32,32,47,47, - 32,104,101,105,103,104,116,32,111,102,32,116,104,101,32,102,111,110,116,32,116,101,120,116,32,98,111,120,32,109,117,115,116,32,98,101,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,98,101,116,119,101,101,110,32,50,48,37,32,97,110,100,32, - 49,48,48,37,44,32,112,114,101,102,101,114,97,98,108,121,32,52,48,37,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108, - 76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,49,44,32,56,44,32,56,44,32,56,41,59,32,32,32,32,32,32, - 32,32,32,32,32,47,47,32,116,104,101,32,104,111,114,105,122,111,110,116,97,108,32,100,105,118,105,100,101,114,32,100,114,97,103,45,98,97,114,32, - 116,104,105,110,103,32,105,115,32,97,108,119,97,121,115,32,56,32,112,105,120,101,108,115,32,104,105,103,104,13,10,32,32,32,32,32,32,32,32,104, - 111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,50,44,32,50,44,32,53,44,32, - 53,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,103,97,112,32,98,101,116,119,101,101,110,32,116,104,101,32,99,111,110,116,114, - 111,108,115,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121, - 111,117,116,32,40,51,44,32,49,53,44,32,50,48,44,32,50,48,41,59,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,105,116,97,108,105, - 99,32,98,117,116,116,111,110,32,119,111,117,108,100,32,108,105,107,101,32,116,111,32,98,101,32,50,48,32,112,105,120,101,108,115,32,104,105,103,104, - 13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116, - 32,40,52,44,32,50,44,32,53,44,32,53,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,103,97,112,32,98,101,116,119,101,101, - 110,32,116,104,101,32,99,111,110,116,114,111,108,115,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116, - 46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,53,44,32,49,53,44,32,50,48,44,32,50,48,41,59,32,32,32,32,32,32,32,32,47, - 47,32,116,104,101,32,98,111,108,100,32,98,117,116,116,111,110,32,119,111,117,108,100,32,108,105,107,101,32,116,111,32,98,101,32,50,48,32,112,105, - 120,101,108,115,32,104,105,103,104,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73, - 116,101,109,76,97,121,111,117,116,32,40,54,44,32,50,44,32,53,44,32,53,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,103, - 97,112,32,98,101,116,119,101,101,110,32,116,104,101,32,99,111,110,116,114,111,108,115,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110, - 116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,55,44,32,49,53,44,32,50,48,44,32,50,48,41,59, - 32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,105,116,97,108,105,99,32,98,117,116,116,111,110,32,119,111,117,108,100,32,108,105,107,101,32, - 116,111,32,98,101,32,50,48,32,112,105,120,101,108,115,32,104,105,103,104,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108, - 76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,56,44,32,50,44,32,53,44,32,53,41,59,32,32,32,32,32,32, - 32,32,32,32,32,47,47,32,97,32,103,97,112,32,98,101,116,119,101,101,110,32,116,104,101,32,99,111,110,116,114,111,108,115,13,10,32,32,32,32, - 32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,57,44,32,49, - 53,44,32,50,48,44,32,50,48,41,59,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,99,111,112,121,32,99,111,100,101,32,98,117,116,116, - 111,110,32,119,111,117,108,100,32,108,105,107,101,32,116,111,32,98,101,32,50,48,32,112,105,120,101,108,115,32,104,105,103,104,13,10,32,32,32,32, - 32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,49,48,44,32, - 53,44,32,45,49,46,48,44,32,53,41,59,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,97,32,103,97,112,32,97,116,32,116,104,101,32, - 98,111,116,116,111,109,32,116,104,97,116,32,119,105,108,108,32,102,105,108,108,32,117,112,32,97,110,121,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,112,97,99,101,32,108,101,102,116,32,111,118,101,114,32,45,32,116,104,105,115,32,119, - 105,108,108,32,115,116,111,112,32,116,104,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32, - 115,108,105,100,101,114,115,32,102,114,111,109,32,97,108,119,97,121,115,32,115,116,105,99,107,105,110,103,32,116,111,32,116,104,101,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,98,111,116,116,111,109,32,111,102,32,116,104,101,32,119,105,110, - 100,111,119,13,10,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,68,105,118,105,100,101,114,66,97,114,32,61,32,110,101, - 119,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,82,101,115,105,122,101,114,66,97,114,32,40,38,104,111,114,105,122,111,110,116, - 97,108,76,97,121,111,117,116,44,32,49,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101, - 86,105,115,105,98,108,101,32,40,104,111,114,105,122,111,110,116,97,108,68,105,118,105,100,101,114,66,97,114,41,59,13,10,32,32,32,32,125,13,10, - 13,10,32,32,32,32,126,70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, - 32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105, - 100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,108,97,121,32,111,117,116,32,116, - 104,101,32,108,105,115,116,32,98,111,120,32,97,110,100,32,118,101,114,116,105,99,97,108,32,100,105,118,105,100,101,114,46,46,13,10,32,32,32,32, - 32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,118,99,111,109,112,115,91,93,32,61,32,123,32,108,105,115,116,66,111,120,44,32,118,101,114, - 116,105,99,97,108,68,105,118,105,100,101,114,66,97,114,44,32,48,32,125,59,13,10,13,10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97, - 108,76,97,121,111,117,116,46,108,97,121,79,117,116,67,111,109,112,111,110,101,110,116,115,32,40,118,99,111,109,112,115,44,32,51,44,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,52, - 44,32,52,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,56,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,56,44,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 102,97,108,115,101,44,32,32,32,32,32,47,47,32,108,97,121,32,111,117,116,32,115,105,100,101,45,98,121,45,115,105,100,101,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117, - 101,41,59,32,32,32,32,32,47,47,32,114,101,115,105,122,101,32,116,104,101,32,99,111,109,112,111,110,101,110,116,115,39,32,104,101,105,103,104,116, - 115,32,97,115,32,119,101,108,108,32,97,115,32,119,105,100,116,104,115,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,110,111,119,32,108,97, - 121,32,111,117,116,32,116,104,101,32,116,101,120,116,32,98,111,120,32,97,110,100,32,116,104,101,32,99,111,110,116,114,111,108,115,32,98,101,108,111, - 119,32,105,116,46,46,13,10,32,32,32,32,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,104,99,111,109,112,115,91,93,32,61,32,123,32, - 116,101,120,116,66,111,120,44,32,104,111,114,105,122,111,110,116,97,108,68,105,118,105,100,101,114,66,97,114,44,32,48,44,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,108,100,66,117,116,116,111,110,44,32,48, - 44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,116,97,108,105, - 99,66,117,116,116,111,110,44,32,48,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,115,105,122,101,83,108,105,100,101,114,32,125,59,13,10,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108, - 76,97,121,111,117,116,46,108,97,121,79,117,116,67,111,109,112,111,110,101,110,116,115,32,40,104,99,111,109,112,115,44,32,56,44,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 52,32,43,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,103,101,116,73,116,101,109,67,117,114,114,101,110,116,80,111,115,105,116,105,111, - 110,32,40,50,41,44,32,47,47,32,102,111,114,32,116,104,101,105,114,32,119,105,100,116,104,115,44,32,114,101,102,101,114,32,116,111,32,116,104,101, - 32,118,101,114,116,105,99,97,108,32,108,97,121,111,117,116,32,115,116,97,116,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,52,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,101,114,116,105,99, - 97,108,76,97,121,111,117,116,46,103,101,116,73,116,101,109,67,117,114,114,101,110,116,65,98,115,111,108,117,116,101,83,105,122,101,32,40,50,41,44, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,56,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,32,32,32,32,47,47,32,108,97, - 121,32,111,117,116,32,97,98,111,118,101,32,101,97,99,104,32,111,116,104,101,114,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,32,32,32,47,47,32,114, - 101,115,105,122,101,32,116,104,101,32,99,111,109,112,111,110,101,110,116,115,39,32,119,105,100,116,104,115,32,97,115,32,119,101,108,108,32,97,115,32, - 104,101,105,103,104,116,115,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,105,109,112,108,101,109,101,110,116,115,32,116,104,101,32, - 76,105,115,116,66,111,120,77,111,100,101,108,32,109,101,116,104,111,100,13,10,32,32,32,32,105,110,116,32,103,101,116,78,117,109,82,111,119,115,40, - 41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,111,110,116,115,46,115,105,122,101,40,41,59,13,10, - 32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,105,109,112,108,101,109,101,110,116,115,32,116,104,101,32,76,105,115,116,66,111,120,77,111, - 100,101,108,32,109,101,116,104,111,100,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,76,105,115,116,66,111,120,73,116,101,109,32,40,105, - 110,116,32,114,111,119,78,117,109,98,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,71,114,97,112,104,105,99,115,38,32,103,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,111,108,32,114,111,119,73,115,83,101,108,101,99,116,101,100,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,111,119,73,115,83,101,108,101,99,116,101,100,41,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116,98,108,117,101,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,105,102,32,40,102,111,110,116,115,32,91,114,111,119,78,117,109,98,101,114,93,32,33,61,32,48,41,13,10,32,32,32,32,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,70,111,110,116,32,102,111,110,116,32,40,42,102,111,110,116,115,32,91,114,111,119,78, - 117,109,98,101,114,93,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,110,116,46,115,101,116,72,101,105,103,104,116,32,40,104,101, - 105,103,104,116,32,42,32,48,46,55,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40, - 102,111,110,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120,116,32,40,102,111,110,116,46,103,101,116, - 84,121,112,101,102,97,99,101,78,97,109,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,52,44,32,48,44,32,119,105,100,116,104,32,45,32,52,44,32,104,101,105,103,104,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,76,101,102,116,44,32,116, - 114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,117,112,100,97, - 116,101,80,114,101,118,105,101,119,66,111,120,84,101,120,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,70,111,110,116,42, - 32,102,32,61,32,102,111,110,116,115,32,91,108,105,115,116,66,111,120,45,62,103,101,116,83,101,108,101,99,116,101,100,82,111,119,40,41,93,59,13, - 10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,102,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,70,111,110,116,32,102,111,110,116,32,40,42,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111, - 110,116,46,115,101,116,72,101,105,103,104,116,32,40,40,102,108,111,97,116,41,32,115,105,122,101,83,108,105,100,101,114,45,62,103,101,116,86,97,108, - 117,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,110,116,46,115,101,116,66,111,108,100,32,40,98,111,108,100,66,117, - 116,116,111,110,45,62,103,101,116,84,111,103,103,108,101,83,116,97,116,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111, - 110,116,46,115,101,116,73,116,97,108,105,99,32,40,105,116,97,108,105,99,66,117,116,116,111,110,45,62,103,101,116,84,111,103,103,108,101,83,116,97, - 116,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,97,112,112,108,121,70,111,110,116, - 84,111,65,108,108,84,101,120,116,32,40,102,111,110,116,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32, - 32,32,32,118,111,105,100,32,115,101,108,101,99,116,101,100,82,111,119,115,67,104,97,110,103,101,100,32,40,105,110,116,32,108,97,115,116,82,111,119, - 115,101,108,101,99,116,101,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,80,114,101,118,105,101,119,66, - 111,120,84,101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107, - 101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,117,112,100,97, - 116,101,80,114,101,118,105,101,119,66,111,120,84,101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115, - 108,105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,32,40,83,108,105,100,101,114,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,47,47,32,40,116,104,105,115,32,105,115,32,99,97,108,108,101,100,32,119,104,101,110,32,116,104,101,32,115,105,122,101,32,115,108,105, - 100,101,114,32,105,115,32,109,111,118,101,100,41,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,80,114,101,118,105,101,119,66,111,120,84, - 101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99, + 108,97,115,115,32,84,114,101,101,86,105,101,119,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,68,114,97,103,65,110,100,68,114,111,112, + 67,111,110,116,97,105,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99, + 32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,116,114,101,101, + 88,109,108,59,13,10,13,10,32,32,32,32,84,114,101,101,86,105,101,119,73,116,101,109,42,32,114,111,111,116,73,116,101,109,59,13,10,32,32,32, + 32,84,114,101,101,86,105,101,119,42,32,116,114,101,101,86,105,101,119,59,13,10,13,10,32,32,32,32,70,105,108,101,84,114,101,101,67,111,109,112, + 111,110,101,110,116,42,32,102,105,108,101,84,114,101,101,67,111,109,112,59,13,10,32,32,32,32,68,105,114,101,99,116,111,114,121,67,111,110,116,101, + 110,116,115,76,105,115,116,42,32,100,105,114,101,99,116,111,114,121,76,105,115,116,59,13,10,32,32,32,32,84,105,109,101,83,108,105,99,101,84,104, + 114,101,97,100,32,116,104,114,101,97,100,59,13,10,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,116,121,112,101,66,117,116,116, + 111,110,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97, - 116,101,70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32, - 70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::fontsandtextdemo_cpp = (const char*) temp5; + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,84,114,101,101,86,105,101,119,68,101,109,111,40,41, + 13,10,32,32,32,32,32,32,32,32,58,32,116,114,101,101,86,105,101,119,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,114,111,111, + 116,73,116,101,109,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,102,105,108,101,84,114,101,101,67,111,109,112,32,40,48,41,44,13, + 10,32,32,32,32,32,32,32,32,32,32,100,105,114,101,99,116,111,114,121,76,105,115,116,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32, + 32,116,104,114,101,97,100,32,40,34,68,101,109,111,32,102,105,108,101,32,116,114,101,101,32,116,104,114,101,97,100,34,41,13,10,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,84,114,101,101,32,86,105,101,119,115,34,41,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,114,101,101,88,109,108,83,116,114,105,110,103,32,40,66,105,110,97, + 114,121,68,97,116,97,58,58,116,114,101,101,100,101,109,111,95,120,109,108,41,59,13,10,32,32,32,32,32,32,32,32,88,109,108,68,111,99,117,109, + 101,110,116,32,112,97,114,115,101,114,32,40,116,114,101,101,88,109,108,83,116,114,105,110,103,41,59,13,10,32,32,32,32,32,32,32,32,116,114,101, + 101,88,109,108,32,61,32,112,97,114,115,101,114,46,103,101,116,68,111,99,117,109,101,110,116,69,108,101,109,101,110,116,40,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,114,111,111,116,73,116,101,109,32,61,32,110,101,119,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,40, + 116,114,101,101,88,109,108,41,59,13,10,32,32,32,32,32,32,32,32,114,111,111,116,73,116,101,109,45,62,115,101,116,79,112,101,110,32,40,116,114, + 117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,102,105,110,100,32,116,104,101,32,114,111,111,116,32,111,102,32,116,104,101,32, + 117,115,101,114,39,115,32,104,111,109,101,32,100,114,105,118,101,44,32,97,110,100,32,115,101,116,32,116,104,97,116,32,97,115,32,111,117,114,32,114, + 111,111,116,46,46,13,10,32,32,32,32,32,32,32,32,70,105,108,101,32,102,111,108,100,101,114,32,40,70,105,108,101,58,58,103,101,116,83,112,101, + 99,105,97,108,76,111,99,97,116,105,111,110,32,40,70,105,108,101,58,58,117,115,101,114,72,111,109,101,68,105,114,101,99,116,111,114,121,41,41,59, + 13,10,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,102,111,108,100,101,114,46,103,101,116,80,97,114,101,110,116,68,105,114,101,99,116,111, + 114,121,40,41,32,33,61,32,102,111,108,100,101,114,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,108,100,101,114,32,61,32,102,111, + 108,100,101,114,46,103,101,116,80,97,114,101,110,116,68,105,114,101,99,116,111,114,121,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,105, + 114,101,99,116,111,114,121,76,105,115,116,32,61,32,110,101,119,32,68,105,114,101,99,116,111,114,121,67,111,110,116,101,110,116,115,76,105,115,116,32, + 40,48,44,32,116,104,114,101,97,100,41,59,13,10,32,32,32,32,32,32,32,32,100,105,114,101,99,116,111,114,121,76,105,115,116,45,62,115,101,116, + 68,105,114,101,99,116,111,114,121,32,40,102,111,108,100,101,114,44,32,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32, + 32,116,104,114,101,97,100,46,115,116,97,114,116,84,104,114,101,97,100,32,40,51,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65, + 110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,121,112,101,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116, + 111,110,32,40,84,40,34,84,121,112,101,32,111,102,32,116,114,101,101,118,105,101,119,46,46,46,34,41,41,41,59,13,10,32,32,32,32,32,32,32, + 32,116,121,112,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10, + 32,32,32,32,32,32,32,32,116,121,112,101,66,117,116,116,111,110,45,62,115,101,116,65,108,119,97,121,115,79,110,84,111,112,32,40,116,114,117,101, + 41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,66,117,116,116,111,110,45,62,115,101,116,84,114,105,103,103,101,114,101,100,79,110,77,111, + 117,115,101,68,111,119,110,32,40,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,104,111,119,67,117,115,116,111,109,84,114,101, + 101,86,105,101,119,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,84,114,101,101,86,105,101,119,68,101,109,111,40,41,13,10, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,100,101,108,101,116,101,32,114,111,111,116,73,116,101,109,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32, + 116,114,101,101,88,109,108,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,100,105,114,101,99,116,111,114,121,76,105,115,116,59,13, + 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,103,114,101, + 121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,114,101,101,86,105,101,119,32,33,61,32,48,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,103,46,100,114,97,119,82,101,99,116,32,40,116,114,101,101,86,105,101,119,45,62,103,101,116,88,40,41,44,32,116,114,101, + 101,86,105,101,119,45,62,103,101,116,89,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 116,114,101,101,86,105,101,119,45,62,103,101,116,87,105,100,116,104,40,41,44,32,116,114,101,101,86,105,101,119,45,62,103,101,116,72,101,105,103,104, + 116,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,102,105,108,101,84,114,101,101,67,111,109,112,32,33,61,32,48,41,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,82,101,99,116,32,40,102,105,108,101,84,114,101,101,67,111,109,112,45,62,103, + 101,116,88,40,41,44,32,102,105,108,101,84,114,101,101,67,111,109,112,45,62,103,101,116,89,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,84,114,101,101,67,111,109,112,45,62,103,101,116,87,105,100,116,104,40,41,44,32, + 102,105,108,101,84,114,101,101,67,111,109,112,45,62,103,101,116,72,101,105,103,104,116,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32, + 32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,114,101, + 101,86,105,101,119,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,114,101,101,86,105,101,119,45,62,115,101,116,66,111, + 117,110,100,115,82,101,108,97,116,105,118,101,32,40,48,46,48,53,102,44,32,48,46,48,55,102,44,32,48,46,57,102,44,32,48,46,57,102,41,59, + 13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,102,105,108,101,84,114,101,101,67,111,109,112,32,33,61,32,48,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,84,114,101,101,67,111,109,112,45,62,115,101,116,66,111,117,110,100,115,82,101,108,97,116,105, + 118,101,32,40,48,46,48,53,102,44,32,48,46,48,55,102,44,32,48,46,57,102,44,32,48,46,57,102,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,116,121,112,101,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,32,40,50,48,41,59, + 13,10,32,32,32,32,32,32,32,32,116,121,112,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110, + 32,40,52,48,44,32,49,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,104,111,119,67,117,115,116,111,109, + 84,114,101,101,86,105,101,119,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111, + 32,40,116,114,101,101,86,105,101,119,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111,32,40,102,105,108, + 101,84,114,101,101,67,111,109,112,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,116,114,101,101,86,105,101,119,32,61,32,110,101,119,32,84,114,101,101,86,105,101,119,40,41,41,59,13,10,32,32,32,32,32,32,32,32,116, + 114,101,101,86,105,101,119,45,62,115,101,116,82,111,111,116,73,116,101,109,32,40,114,111,111,116,73,116,101,109,41,59,13,10,32,32,32,32,32,32, + 32,32,116,114,101,101,86,105,101,119,45,62,115,101,116,77,117,108,116,105,83,101,108,101,99,116,69,110,97,98,108,101,100,32,40,116,114,117,101,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111, + 105,100,32,115,104,111,119,70,105,108,101,84,114,101,101,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101, + 108,101,116,101,65,110,100,90,101,114,111,32,40,116,114,101,101,86,105,101,119,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65, + 110,100,90,101,114,111,32,40,102,105,108,101,84,114,101,101,67,111,109,112,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100, + 77,97,107,101,86,105,115,105,98,108,101,32,40,102,105,108,101,84,114,101,101,67,111,109,112,32,61,32,110,101,119,32,70,105,108,101,84,114,101,101, + 67,111,109,112,111,110,101,110,116,32,40,42,100,105,114,101,99,116,111,114,121,76,105,115,116,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99, + 107,101,100,32,40,66,117,116,116,111,110,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32, + 109,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,49,44,32,84,40,34,67,117,115,116,111,109,32,116,114,101,101, + 118,105,101,119,32,115,104,111,119,105,110,103,32,97,110,32,88,77,76,32,116,114,101,101,34,41,41,59,13,10,32,32,32,32,32,32,32,32,109,46, + 97,100,100,73,116,101,109,32,40,50,44,32,84,40,34,70,105,108,101,84,114,101,101,67,111,109,112,111,110,101,110,116,32,115,104,111,119,105,110,103, + 32,116,104,101,32,102,105,108,101,32,115,121,115,116,101,109,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110, + 116,32,114,32,61,32,109,46,115,104,111,119,65,116,32,40,116,121,112,101,66,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 105,102,32,40,114,32,61,61,32,49,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,104,111,119, + 67,117,115,116,111,109,84,114,101,101,86,105,101,119,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108, + 115,101,32,105,102,32,40,114,32,61,61,32,50,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115, + 104,111,119,70,105,108,101,84,114,101,101,67,111,109,112,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10, + 32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10, + 13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,84,114,101,101,86,105,101,119,68,101,109,111,40,41,13,10,123,13,10, + 32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,114,101,101,86,105,101,119,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::treeviewdemo_cpp = (const char*) temp8; -static const unsigned char temp6[] = {80,75,3,4,20,0,2,0,8,0,128,122,250,52,23,17,234,255,206,13,0,0,219,67,0,0,16,0,0,0,100,111,99,117,109,101,110,116,45,110, +static const unsigned char temp9[] = {60,116,114,101,101,62,13,10,32,32,32,32,60,105,116,101,109,49,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,99,111, + 108,111,117,114,61,34,102,102,102,102,48,48,48,48,34,32,119,105,100,116,104,61,34,56,48,48,34,32,47,62,13,10,32,32,32,32,32,32,32,32, + 60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,102,102,51,51,98,98,48,48,34,32,119,105,100,116,104,61,34,53,48,34,32,47,62, + 13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,51,51,48,48,48,48,48,48,34,32,47,62,13, + 10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,119,105,100,116,104,61,34,49,48,48,34,32,47,62,13,10,32,32,32,32,32,32, + 32,32,60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,102,102,56,56,54,54,101,101,34,32,47,62,13,10,32,32,32,32,32,32,32, + 32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,51,51, + 48,48,48,48,48,48,34,32,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32, + 60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,60,47,105,116,101,109,49,62,13,10,13,10,32,32,32,32,60,105,116,101,109,50,32,99, + 111,108,111,117,114,61,34,102,102,55,55,55,55,55,55,34,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32, + 32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32, + 32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,119,105,100,116, + 104,61,34,56,48,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,119,105,100,116,104,61,34,56,48,48,34,47, + 62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47, + 62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,105,116,101,109,51,62,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60, + 115,117,98,110,111,100,101,32,119,105,100,116,104,61,34,53,48,34,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,47,115,117,98,110, + 111,100,101,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111, + 100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32, + 32,32,32,32,32,32,60,47,105,116,101,109,51,62,13,10,32,32,32,32,60,47,105,116,101,109,50,62,13,10,13,10,32,32,32,32,60,105,116,101, + 109,52,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, + 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, + 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, + 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, + 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,60,47,105,116,101,109,52,62,13,10,60, + 47,116,114,101,101,62,0,0}; +const char* BinaryData::treedemo_xml = (const char*) temp9; + +static const unsigned char temp10[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, + 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, + 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, + 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, + 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, + 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, + 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, + 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, + 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, + 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, + 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, + 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, + 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, + 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, + 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, + 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, + 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, + 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, + 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, + 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, + 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, + 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, + 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, + 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, + 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, + 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, + 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,35, + 105,102,32,74,85,67,69,95,81,85,73,67,75,84,73,77,69,32,38,38,32,33,32,74,85,67,69,95,76,73,78,85,88,13,10,13,10,47,47,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47, + 47,32,115,111,32,116,104,97,116,32,119,101,32,99,97,110,32,101,97,115,105,108,121,32,104,97,118,101,32,116,119,111,32,81,84,32,119,105,110,100, + 111,119,115,32,101,97,99,104,32,119,105,116,104,32,97,32,102,105,108,101,32,98,114,111,119,115,101,114,44,32,119,114,97,112,32,116,104,105,115,32, + 117,112,32,97,115,32,97,32,99,108,97,115,115,46,46,13,10,99,108,97,115,115,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105, + 116,104,70,105,108,101,66,114,111,119,115,101,114,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108, + 105,99,32,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58, + 13,10,32,32,32,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,40,41,13,10, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,113,116,67,111,109,112, + 32,61,32,110,101,119,32,81,117,105,99,107,84,105,109,101,77,111,118,105,101,67,111,109,112,111,110,101,110,116,40,41,41,59,13,10,13,10,32,32, + 32,32,32,32,32,32,47,47,32,97,110,100,32,97,32,102,105,108,101,45,99,104,111,111,115,101,114,46,46,13,10,32,32,32,32,32,32,32,32,97, + 100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,102,105,108,101,67,104,111,111,115,101,114,32,61,32,110,101,119,32,70,105,108,101, + 110,97,109,101,67,111,109,112,111,110,101,110,116,32,40,84,40,34,109,111,118,105,101,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,110,111,110,101,120,105,115,116,101,110,116,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,32,102,97,108,115,101,44,32,102,97,108,115,101,44,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,42,46,42,34,41,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,83,116,114,105,110,103,58,58,101,109,112,116,121,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,40,99,104,111,111,115,101,32,97,32,118,105,100,101,111,32,102,105,108,101,32, + 116,111,32,112,108,97,121,41,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,97,100,100,76, + 105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,115,101, + 116,66,114,111,119,115,101,66,117,116,116,111,110,84,101,120,116,32,40,84,40,34,98,114,111,119,115,101,34,41,41,59,13,10,32,32,32,32,125,13, + 10,13,10,32,32,32,32,126,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,40,41, + 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32, + 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,113,116,67,111,109,112,45,62,115,101,116,66,111,117,110,100,115,32,40,48,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,44,32, + 103,101,116,72,101,105,103,104,116,40,41,32,45,32,51,48,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45, + 62,115,101,116,66,111,117,110,100,115,32,40,48,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,50,52,44,32,103,101,116,87,105,100,116, + 104,40,41,44,32,50,52,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,102,105,108,101,110,97,109,101,67,111,109, + 112,111,110,101,110,116,67,104,97,110,103,101,100,32,40,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,42,41,13,10,32,32,32,32, + 123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,99,97,108,108,101,100,32,119,104,101,110,32,116,104,101,32,117,115, + 101,114,32,99,104,97,110,103,101,115,32,116,104,101,32,102,105,108,101,110,97,109,101,32,105,110,32,116,104,101,32,102,105,108,101,32,99,104,111,111, + 115,101,114,32,98,111,120,13,10,32,32,32,32,32,32,32,32,105,102,32,40,113,116,67,111,109,112,45,62,108,111,97,100,77,111,118,105,101,32,40, + 102,105,108,101,67,104,111,111,115,101,114,45,62,103,101,116,67,117,114,114,101,110,116,70,105,108,101,40,41,44,32,116,114,117,101,41,41,13,10,32, + 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,108,111,97,100,101,100,32,116,104,101,32,102,105,108,101, + 32,111,107,44,32,115,111,32,108,101,116,39,115,32,115,116,97,114,116,32,105,116,32,112,108,97,121,105,110,103,46,46,13,10,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,113,116,67,111,109,112,45,62,112,108,97,121,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32, + 32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105, + 110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105, + 110,103,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,84,40,34,67,111,117,108,100,110,39,116,32,108,111,97,100,32,116,104,101,32,102,105,108,101,33,34,41,44,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,84,40,34,83,111,114,114,121,44,32,81,117,105,99,107,84,105,109,101,32,100,105,100,110,39,116,32,109,97,110,97,103,101,32,116,111,32,108, + 111,97,100,32,116,104,97,116,32,102,105,108,101,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10, + 112,114,105,118,97,116,101,58,13,10,32,32,32,32,81,117,105,99,107,84,105,109,101,77,111,118,105,101,67,111,109,112,111,110,101,110,116,42,32,113, + 116,67,111,109,112,59,13,10,32,32,32,32,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,42,32,102,105,108,101,67,104,111,111,115, + 101,114,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,81,117,105,99,107,84,105,109,101,68,101,109,111,32,32,58,32,112,117, + 98,108,105,99,32,67,111,109,112,111,110,101,110,116,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,81,117, + 105,99,107,84,105,109,101,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84, + 40,34,81,117,105,99,107,84,105,109,101,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,97,32,109,111,118,105, + 101,32,99,111,109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,113,116,67,111,109,112,49,32,61,32,110,101,119,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66, + 114,111,119,115,101,114,40,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,113, + 116,67,111,109,112,50,32,61,32,110,101,119,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119, + 115,101,114,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,81,117,105,99,107,84,105,109,101,68,101,109,111,40,41,13,10, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32, + 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,113,116,67,111,109,112,49,45,62,115,101,116,66,111,117,110,100,115,82,101,108,97,116,105,118,101,32,40,48,46,48,53,102,44,32,48,46,48,53, + 102,44,32,48,46,52,50,53,102,44,32,48,46,57,102,41,59,13,10,32,32,32,32,32,32,32,32,113,116,67,111,109,112,50,45,62,115,101,116,66, + 111,117,110,100,115,82,101,108,97,116,105,118,101,32,40,48,46,53,50,53,102,44,32,48,46,48,53,102,44,32,48,46,52,50,53,102,44,32,48,46, + 57,102,41,59,13,10,32,32,32,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,81,117,105,99,107, + 84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,42,32,113,116,67,111,109,112,49,59,13,10,32,32,32, + 32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,42,32,113,116,67,111,109,112,50, + 59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,81,117,105,99,107,84,105,109,101,68, + 101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,81,117,105,99,107,84,105,109,101,68,101,109,111,40,41, + 59,13,10,125,13,10,13,10,35,101,110,100,105,102,13,10,0,0}; +const char* BinaryData::quicktimedemo_cpp = (const char*) temp10; + +static const unsigned char temp11[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, + 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, + 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, + 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, + 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, + 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, + 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, + 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, + 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, + 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, + 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, + 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, + 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, + 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, + 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, + 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, + 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, + 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, + 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, + 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, + 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, + 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, + 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, + 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, + 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, + 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, + 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, + 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,13,10,47,42,42,32,79,117,114,32,100,101,109,111,32,115,121,110,116,104,32,111,110,108,121,32,104,97,115,32,111,110,101,32,116,121,112,101,32, + 111,102,32,115,111,117,110,100,44,32,97,110,100,32,105,116,39,115,32,118,101,114,121,32,98,97,115,105,99,46,46,13,10,42,47,13,10,99,108,97, + 115,115,32,83,105,110,101,87,97,118,101,83,111,117,110,100,32,58,32,112,117,98,108,105,99,32,83,121,110,116,104,101,115,105,115,101,114,83,111,117, + 110,100,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,83,105,110,101,87,97,118,101,83,111,117,110,100,32,40,99,111,110,115,116, + 32,66,105,116,65,114,114,97,121,38,32,109,105,100,105,78,111,116,101,115,95,41,13,10,32,32,32,32,32,32,32,32,58,32,109,105,100,105,78,111, + 116,101,115,32,40,109,105,100,105,78,111,116,101,115,95,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111, + 111,108,32,97,112,112,108,105,101,115,84,111,78,111,116,101,32,40,99,111,110,115,116,32,105,110,116,32,109,105,100,105,78,111,116,101,78,117,109,98, + 101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,109,105,100,105,78,111,116,101,115,32,91,109,105, + 100,105,78,111,116,101,78,117,109,98,101,114,93,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111,111,108,32,97,112,112,108,105,101, + 115,84,111,67,104,97,110,110,101,108,32,40,99,111,110,115,116,32,105,110,116,32,109,105,100,105,67,104,97,110,110,101,108,41,32,32,32,32,32,32, + 32,32,32,32,32,123,32,114,101,116,117,114,110,32,116,114,117,101,59,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,47, + 47,32,116,104,105,115,32,119,105,108,108,32,99,111,110,116,97,105,110,32,116,104,101,32,110,111,116,101,115,32,116,104,97,116,32,116,104,105,115,32, + 115,111,117,110,100,32,105,115,32,97,116,116,97,99,104,101,100,32,116,111,46,13,10,32,32,32,32,66,105,116,65,114,114,97,121,32,109,105,100,105, + 78,111,116,101,115,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,79,117,114,32,100,101,109,111,32,115,121,110,116,104,32,118,111,105, + 99,101,32,106,117,115,116,32,112,108,97,121,115,32,97,32,115,105,110,101,32,119,97,118,101,46,46,13,10,42,47,13,10,99,108,97,115,115,32,83, + 105,110,101,87,97,118,101,86,111,105,99,101,32,32,58,32,112,117,98,108,105,99,32,83,121,110,116,104,101,115,105,115,101,114,86,111,105,99,101,13, + 10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,83,105,110,101,87,97,118,101,86,111,105,99,101,40,41,13,10,32,32,32,32,32,32, + 32,32,58,32,97,110,103,108,101,68,101,108,116,97,32,40,48,46,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,116,97,105,108,79,102,102, + 32,40,48,46,48,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111,111,108,32,99,97,110,80,108,97,121, + 83,111,117,110,100,32,40,83,121,110,116,104,101,115,105,115,101,114,83,111,117,110,100,42,32,115,111,117,110,100,41,13,10,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,100,121,110,97,109,105,99,95,99,97,115,116,32,60,83,105,110,101,87,97,118,101,83,111,117, + 110,100,42,62,32,40,115,111,117,110,100,41,32,33,61,32,48,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,116, + 97,114,116,78,111,116,101,32,40,99,111,110,115,116,32,105,110,116,32,109,105,100,105,78,111,116,101,78,117,109,98,101,114,44,32,99,111,110,115,116, + 32,102,108,111,97,116,32,118,101,108,111,99,105,116,121,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,83,121, + 110,116,104,101,115,105,115,101,114,83,111,117,110,100,42,32,115,111,117,110,100,44,32,99,111,110,115,116,32,105,110,116,32,99,117,114,114,101,110,116, + 80,105,116,99,104,87,104,101,101,108,80,111,115,105,116,105,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,117,114,114, + 101,110,116,65,110,103,108,101,32,61,32,48,46,48,59,13,10,32,32,32,32,32,32,32,32,108,101,118,101,108,32,61,32,118,101,108,111,99,105,116, + 121,32,42,32,48,46,49,53,59,13,10,32,32,32,32,32,32,32,32,116,97,105,108,79,102,102,32,61,32,48,46,48,59,13,10,13,10,32,32,32, + 32,32,32,32,32,100,111,117,98,108,101,32,99,121,99,108,101,115,80,101,114,83,101,99,111,110,100,32,61,32,77,105,100,105,77,101,115,115,97,103, + 101,58,58,103,101,116,77,105,100,105,78,111,116,101,73,110,72,101,114,116,122,32,40,109,105,100,105,78,111,116,101,78,117,109,98,101,114,41,59,13, + 10,32,32,32,32,32,32,32,32,100,111,117,98,108,101,32,99,121,99,108,101,115,80,101,114,83,97,109,112,108,101,32,61,32,99,121,99,108,101,115, + 80,101,114,83,101,99,111,110,100,32,47,32,103,101,116,83,97,109,112,108,101,82,97,116,101,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 97,110,103,108,101,68,101,108,116,97,32,61,32,99,121,99,108,101,115,80,101,114,83,97,109,112,108,101,32,42,32,50,46,48,32,42,32,100,111,117, + 98,108,101,95,80,105,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,116,111,112,78,111,116,101,32,40,99,111,110, + 115,116,32,98,111,111,108,32,97,108,108,111,119,84,97,105,108,79,102,102,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102, + 32,40,97,108,108,111,119,84,97,105,108,79,102,102,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 47,47,32,115,116,97,114,116,32,97,32,116,97,105,108,45,111,102,102,32,98,121,32,115,101,116,116,105,110,103,32,116,104,105,115,32,102,108,97,103, + 46,32,84,104,101,32,114,101,110,100,101,114,32,99,97,108,108,98,97,99,107,32,119,105,108,108,32,112,105,99,107,32,117,112,32,111,110,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,97,110,100,32,100,111,32,97,32,102,97,100,101,32,111,117,116,44,32,99,97, + 108,108,105,110,103,32,99,108,101,97,114,67,117,114,114,101,110,116,78,111,116,101,40,41,32,119,104,101,110,32,105,116,39,115,32,102,105,110,105,115, + 104,101,100,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,97,105,108,79,102,102,32,61,61,32,48,46,48,41,32, + 47,47,32,119,101,32,111,110,108,121,32,110,101,101,100,32,116,111,32,98,101,103,105,110,32,97,32,116,97,105,108,45,111,102,102,32,105,102,32,105, + 116,39,115,32,110,111,116,32,97,108,114,101,97,100,121,32,100,111,105,110,103,32,115,111,32,45,32,116,104,101,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,116,111,112,78,111,116,101,32,109,101,116,104, + 111,100,32,99,111,117,108,100,32,98,101,32,99,97,108,108,101,100,32,109,111,114,101,32,116,104,97,110,32,111,110,99,101,46,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,116,97,105,108,79,102,102,32,61,32,49,46,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32, + 32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,119, + 101,39,114,101,32,98,101,105,110,103,32,116,111,108,100,32,116,111,32,115,116,111,112,32,112,108,97,121,105,110,103,32,105,109,109,101,100,105,97,116, + 101,108,121,44,32,115,111,32,114,101,115,101,116,32,101,118,101,114,121,116,104,105,110,103,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,99,108,101,97,114,67,117,114,114,101,110,116,78,111,116,101,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,110,103,108,101, + 68,101,108,116,97,32,61,32,48,46,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111, + 105,100,32,112,105,116,99,104,87,104,101,101,108,77,111,118,101,100,32,40,99,111,110,115,116,32,105,110,116,32,110,101,119,86,97,108,117,101,41,13, + 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,110,39,116,32,98,101,32,98,111,116,104,101,114,101,100,32,105,109,112, + 108,101,109,101,110,116,105,110,103,32,116,104,105,115,32,102,111,114,32,116,104,101,32,100,101,109,111,33,13,10,32,32,32,32,125,13,10,13,10,32, + 32,32,32,118,111,105,100,32,99,111,110,116,114,111,108,108,101,114,77,111,118,101,100,32,40,99,111,110,115,116,32,105,110,116,32,99,111,110,116,114, + 111,108,108,101,114,78,117,109,98,101,114,44,32,99,111,110,115,116,32,105,110,116,32,110,101,119,86,97,108,117,101,41,13,10,32,32,32,32,123,13, + 10,32,32,32,32,32,32,32,32,47,47,32,110,111,116,32,105,110,116,101,114,101,115,116,101,100,32,105,110,32,99,111,110,116,114,111,108,108,101,114, + 115,32,105,110,32,116,104,105,115,32,99,97,115,101,46,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,110,100,101, + 114,78,101,120,116,66,108,111,99,107,32,40,65,117,100,105,111,83,97,109,112,108,101,66,117,102,102,101,114,38,32,111,117,116,112,117,116,66,117,102, + 102,101,114,44,32,105,110,116,32,115,116,97,114,116,83,97,109,112,108,101,44,32,105,110,116,32,110,117,109,83,97,109,112,108,101,115,41,13,10,32, + 32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,97,110,103,108,101,68,101,108,116,97,32,33,61,32,48,46,48,41,13,10,32,32, + 32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,97,105,108,79,102,102,32,62,32,48,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,45,45,110, + 117,109,83,97,109,112,108,101,115,32,62,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,99,117,114,114,101,110,116,83,97,109,112,108, + 101,32,61,32,40,102,108,111,97,116,41,32,40,115,105,110,32,40,99,117,114,114,101,110,116,65,110,103,108,101,41,32,42,32,108,101,118,101,108,32, + 42,32,116,97,105,108,79,102,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40, + 105,110,116,32,105,32,61,32,111,117,116,112,117,116,66,117,102,102,101,114,46,103,101,116,78,117,109,67,104,97,110,110,101,108,115,40,41,59,32,45, + 45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,111,117,116,112, + 117,116,66,117,102,102,101,114,46,103,101,116,83,97,109,112,108,101,68,97,116,97,32,40,105,44,32,115,116,97,114,116,83,97,109,112,108,101,41,32, + 43,61,32,99,117,114,114,101,110,116,83,97,109,112,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,99,117,114,114,101,110,116,65,110,103,108,101,32,43,61,32,97,110,103,108,101,68,101,108,116,97,59,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,43,43,115,116,97,114,116,83,97,109,112,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,116,97,105,108,79,102,102,32,42,61,32,48,46,57,57,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,105,102,32,40,116,97,105,108,79,102,102,32,60,61,32,48,46,48,48,53,41,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,108, + 101,97,114,67,117,114,114,101,110,116,78,111,116,101,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,97,110,103,108,101,68,101,108,116,97,32,61,32,48,46,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,119,104,105,108,101,32,40,45,45,110,117,109,83,97,109,112,108,101,115,32,62,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32, + 99,117,114,114,101,110,116,83,97,109,112,108,101,32,61,32,40,102,108,111,97,116,41,32,40,115,105,110,32,40,99,117,114,114,101,110,116,65,110,103, + 108,101,41,32,42,32,108,101,118,101,108,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114, + 32,40,105,110,116,32,105,32,61,32,111,117,116,112,117,116,66,117,102,102,101,114,46,103,101,116,78,117,109,67,104,97,110,110,101,108,115,40,41,59, + 32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,111,117, + 116,112,117,116,66,117,102,102,101,114,46,103,101,116,83,97,109,112,108,101,68,97,116,97,32,40,105,44,32,115,116,97,114,116,83,97,109,112,108,101, + 41,32,43,61,32,99,117,114,114,101,110,116,83,97,109,112,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,99,117,114,114,101,110,116,65,110,103,108,101,32,43,61,32,97,110,103,108,101,68,101,108,116,97,59,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,43,43,115,116,97,114,116,83,97,109,112,108,101,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10, + 13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,100,111,117,98,108,101,32,99,117,114,114,101,110,116,65,110,103,108,101,44,32,97,110,103, + 108,101,68,101,108,116,97,44,32,108,101,118,101,108,44,32,116,97,105,108,79,102,102,59,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,84,104, + 105,115,32,105,115,32,97,110,32,97,117,100,105,111,32,115,111,117,114,99,101,32,116,104,97,116,32,115,116,114,101,97,109,115,32,116,104,101,32,111, + 117,116,112,117,116,32,111,102,32,111,117,114,32,100,101,109,111,32,115,121,110,116,104,46,13,10,42,47,13,10,99,108,97,115,115,32,83,121,110,116, + 104,65,117,100,105,111,83,111,117,114,99,101,32,32,58,32,112,117,98,108,105,99,32,65,117,100,105,111,83,111,117,114,99,101,13,10,123,13,10,112, + 117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,116,104,105,115,32,99,111,108,108,101,99,116,115,32,114,101,97,108,45, + 116,105,109,101,32,109,105,100,105,32,109,101,115,115,97,103,101,115,32,102,114,111,109,32,116,104,101,32,109,105,100,105,32,105,110,112,117,116,32,100, + 101,118,105,99,101,44,32,97,110,100,13,10,32,32,32,32,47,47,32,116,117,114,110,115,32,116,104,101,109,32,105,110,116,111,32,98,108,111,99,107, + 115,32,116,104,97,116,32,119,101,32,99,97,110,32,112,114,111,99,101,115,115,32,105,110,32,111,117,114,32,97,117,100,105,111,32,99,97,108,108,98, + 97,99,107,13,10,32,32,32,32,77,105,100,105,77,101,115,115,97,103,101,67,111,108,108,101,99,116,111,114,32,109,105,100,105,67,111,108,108,101,99, + 116,111,114,59,13,10,13,10,32,32,32,32,47,47,32,116,104,105,115,32,114,101,112,114,101,115,101,110,116,115,32,116,104,101,32,115,116,97,116,101, + 32,111,102,32,119,104,105,99,104,32,107,101,121,115,32,111,110,32,111,117,114,32,111,110,45,115,99,114,101,101,110,32,107,101,121,98,111,97,114,100, + 32,97,114,101,32,104,101,108,100,13,10,32,32,32,32,47,47,32,100,111,119,110,46,32,87,104,101,110,32,116,104,101,32,109,111,117,115,101,32,105, + 115,32,99,108,105,99,107,101,100,32,111,110,32,116,104,101,32,107,101,121,98,111,97,114,100,32,99,111,109,112,111,110,101,110,116,44,32,116,104,105, + 115,32,111,98,106,101,99,116,32,97,108,115,111,13,10,32,32,32,32,47,47,32,103,101,110,101,114,97,116,101,115,32,109,105,100,105,32,109,101,115, + 115,97,103,101,115,32,102,111,114,32,116,104,105,115,44,32,119,104,105,99,104,32,119,101,32,99,97,110,32,112,97,115,115,32,111,110,32,116,111,32, + 111,117,114,32,115,121,110,116,104,46,13,10,32,32,32,32,77,105,100,105,75,101,121,98,111,97,114,100,83,116,97,116,101,32,107,101,121,98,111,97, + 114,100,83,116,97,116,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104,101,32,115,121,110,116,104,32,105,116,115,101,108,102,33,13,10,32,32, + 32,32,83,121,110,116,104,101,115,105,115,101,114,32,115,121,110,116,104,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,83,121,110,116,104,65, + 117,100,105,111,83,111,117,114,99,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,39,108,108,32,98,101, + 32,109,105,120,105,110,103,32,116,119,111,32,100,105,102,102,101,114,101,110,116,32,116,121,112,101,115,32,111,102,32,115,111,117,110,100,44,32,115,111, + 32,104,101,114,101,32,119,101,39,108,108,32,99,114,101,97,116,101,32,116,119,111,13,10,32,32,32,32,32,32,32,32,47,47,32,115,101,116,115,32, + 111,102,32,110,111,116,101,32,109,97,112,115,44,32,112,117,116,116,105,110,103,32,101,97,99,104,32,115,111,117,110,100,32,111,110,32,97,32,100,105, + 102,102,101,114,101,110,116,32,111,99,116,97,118,101,32,111,102,32,116,104,101,32,107,101,121,98,111,97,114,100,58,13,10,32,32,32,32,32,32,32, + 32,66,105,116,65,114,114,97,121,32,115,105,110,101,119,97,118,101,78,111,116,101,115,44,32,115,97,109,112,108,101,114,78,111,116,101,115,59,13,10, + 13,10,32,32,32,32,32,32,32,32,105,110,116,32,105,59,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32, + 60,32,49,50,56,59,32,43,43,105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40, + 40,40,105,32,47,32,49,50,41,32,38,32,49,41,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115,105, + 110,101,119,97,118,101,78,111,116,101,115,46,115,101,116,66,105,116,32,40,105,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115, + 101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115,97,109,112,108,101,114,78,111,116,101,115,46,115,101,116,66,105,116,32,40, + 105,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,97,32,119,97,118,101,32, + 115,111,117,110,100,44,32,119,104,105,99,104,32,119,105,108,108,32,103,101,116,32,97,112,112,108,105,101,100,32,116,111,32,115,111,109,101,32,111,102, + 32,116,104,101,32,110,111,116,101,115,46,46,13,10,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100,100,83,111,117,110,100,32,40,110,101, + 119,32,83,105,110,101,87,97,118,101,83,111,117,110,100,32,40,115,105,110,101,119,97,118,101,78,111,116,101,115,41,41,59,13,10,13,10,32,32,32, + 32,32,32,32,32,47,47,32,103,105,118,101,32,111,117,114,32,115,121,110,116,104,32,97,32,102,101,119,32,118,111,105,99,101,115,32,116,104,97,116, + 32,99,97,110,32,112,108,97,121,32,116,104,101,32,119,97,118,101,32,115,111,117,110,100,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,32, + 40,105,32,61,32,52,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100, + 100,86,111,105,99,101,32,40,110,101,119,32,83,105,110,101,87,97,118,101,86,111,105,99,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,87,97,118,65,117,100,105,111,70,111,114,109,97,116,32,119,97,118,70,111,114,109,97,116,59,13,10,32,32,32,32,32,32,32,32,65,117,100,105, + 111,70,111,114,109,97,116,82,101,97,100,101,114,42,32,97,117,100,105,111,82,101,97,100,101,114,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 61,32,119,97,118,70,111,114,109,97,116,46,99,114,101,97,116,101,82,101,97,100,101,114,70,111,114,32,40,110,101,119,32,77,101,109,111,114,121,73, + 110,112,117,116,83,116,114,101,97,109,32,40,66,105,110,97,114,121,68,97,116,97,58,58,99,101,108,108,111,95,119,97,118,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,66,105,110,97,114,121,68,97,116,97,58,58,99,101,108,108,111,95,119,97, + 118,83,105,122,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,97,108,115,101,41,44,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100,100,83,111,117,110,100,32,40,110,101,119,32, + 83,97,109,112,108,101,114,83,111,117,110,100,32,40,84,40,34,100,101,109,111,32,115,111,117,110,100,34,41,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,97,117,100,105,111, + 82,101,97,100,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,115,97,109,112,108,101,114,78,111,116,101,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,55,52,44,32,32,32,47,47,32,114,111,111, + 116,32,109,105,100,105,32,110,111,116,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,46,49,44,32,32,47,47,32,97,116,116,97,99,107,32,116,105,109,101,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48, + 46,49,44,32,32,47,47,32,114,101,108,101,97,115,101,32,116,105,109,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,48,46,48,32,32,47,47,32,109,97,120,105,109,117,109, + 32,115,97,109,112,108,101,32,108,101,110,103,116,104,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32, + 97,117,100,105,111,82,101,97,100,101,114,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,103,105,118,101,32,116,104,101,32, + 115,121,110,116,104,32,115,111,109,101,32,115,97,109,112,108,101,114,32,118,111,105,99,101,115,32,116,111,32,112,108,97,121,32,116,104,101,32,115,97, + 109,112,108,101,100,32,115,111,117,110,100,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,32,61,32,52,59,32,45,45,105,32,62, + 61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,121,110,116,104,46,97,100,100,86,111,105,99,101,32,40,110,101,119,32,83, + 97,109,112,108,101,114,86,111,105,99,101,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,114,101,112,97, + 114,101,84,111,80,108,97,121,32,40,105,110,116,32,115,97,109,112,108,101,115,80,101,114,66,108,111,99,107,69,120,112,101,99,116,101,100,44,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,111,117,98,108,101,32,115,97,109,112,108,101,82,97,116, + 101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,109,105,100,105,67,111,108,108,101,99,116,111,114,46,114,101,115,101,116,32,40, + 115,97,109,112,108,101,82,97,116,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,121,110,116,104,46,115,101,116,67,117,114,114,101,110,116, + 80,108,97,121,98,97,99,107,83,97,109,112,108,101,82,97,116,101,32,40,115,97,109,112,108,101,82,97,116,101,41,59,13,10,32,32,32,32,125,13, + 10,13,10,32,32,32,32,118,111,105,100,32,114,101,108,101,97,115,101,82,101,115,111,117,114,99,101,115,40,41,13,10,32,32,32,32,123,13,10,32, + 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,116,78,101,120,116,65,117,100,105,111,66,108,111,99,107,32,40,99,111,110,115, + 116,32,65,117,100,105,111,83,111,117,114,99,101,67,104,97,110,110,101,108,73,110,102,111,38,32,98,117,102,102,101,114,84,111,70,105,108,108,41,13, + 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,115,121,110,116,104,32,97,108,119,97,121,115,32,97,100,100,115, + 32,105,116,115,32,111,117,116,112,117,116,32,116,111,32,116,104,101,32,97,117,100,105,111,32,98,117,102,102,101,114,44,32,115,111,32,119,101,32,104, + 97,118,101,32,116,111,32,99,108,101,97,114,32,105,116,13,10,32,32,32,32,32,32,32,32,47,47,32,102,105,114,115,116,46,46,13,10,32,32,32, + 32,32,32,32,32,98,117,102,102,101,114,84,111,70,105,108,108,46,99,108,101,97,114,65,99,116,105,118,101,66,117,102,102,101,114,82,101,103,105,111, + 110,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,102,105,108,108,32,97,32,109,105,100,105,32,98,117,102,102,101,114,32,119,105, + 116,104,32,105,110,99,111,109,105,110,103,32,109,101,115,115,97,103,101,115,32,102,114,111,109,32,116,104,101,32,109,105,100,105,32,105,110,112,117,116, + 46,13,10,32,32,32,32,32,32,32,32,77,105,100,105,66,117,102,102,101,114,32,105,110,99,111,109,105,110,103,77,105,100,105,59,13,10,32,32,32, + 32,32,32,32,32,109,105,100,105,67,111,108,108,101,99,116,111,114,46,114,101,109,111,118,101,78,101,120,116,66,108,111,99,107,79,102,77,101,115,115, + 97,103,101,115,32,40,105,110,99,111,109,105,110,103,77,105,100,105,44,32,98,117,102,102,101,114,84,111,70,105,108,108,46,110,117,109,83,97,109,112, + 108,101,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,112,97,115,115,32,116,104,101,115,101,32,109,101,115,115,97,103,101,115,32, + 116,111,32,116,104,101,32,107,101,121,98,111,97,114,100,32,115,116,97,116,101,32,115,111,32,116,104,97,116,32,105,116,32,99,97,110,32,117,112,100, + 97,116,101,32,116,104,101,32,99,111,109,112,111,110,101,110,116,13,10,32,32,32,32,32,32,32,32,47,47,32,116,111,32,115,104,111,119,32,111,110, + 45,115,99,114,101,101,110,32,119,104,105,99,104,32,107,101,121,115,32,97,114,101,32,98,101,105,110,103,32,112,114,101,115,115,101,100,32,111,110,32, + 116,104,101,32,112,104,121,115,105,99,97,108,32,109,105,100,105,32,107,101,121,98,111,97,114,100,46,13,10,32,32,32,32,32,32,32,32,47,47,32, + 84,104,105,115,32,99,97,108,108,32,119,105,108,108,32,97,108,115,111,32,97,100,100,32,109,105,100,105,32,109,101,115,115,97,103,101,115,32,116,111, + 32,116,104,101,32,98,117,102,102,101,114,32,119,104,105,99,104,32,119,101,114,101,32,103,101,110,101,114,97,116,101,100,32,98,121,13,10,32,32,32, + 32,32,32,32,32,47,47,32,116,104,101,32,109,111,117,115,101,45,99,108,105,99,107,105,110,103,32,111,110,32,116,104,101,32,111,110,45,115,99,114, + 101,101,110,32,107,101,121,98,111,97,114,100,46,13,10,32,32,32,32,32,32,32,32,107,101,121,98,111,97,114,100,83,116,97,116,101,46,112,114,111, + 99,101,115,115,78,101,120,116,77,105,100,105,66,117,102,102,101,114,32,40,105,110,99,111,109,105,110,103,77,105,100,105,44,32,48,44,32,98,117,102, + 102,101,114,84,111,70,105,108,108,46,110,117,109,83,97,109,112,108,101,115,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 47,47,32,97,110,100,32,110,111,119,32,103,101,116,32,116,104,101,32,115,121,110,116,104,32,116,111,32,112,114,111,99,101,115,115,32,116,104,101,32, + 109,105,100,105,32,101,118,101,110,116,115,32,97,110,100,32,103,101,110,101,114,97,116,101,32,105,116,115,32,111,117,116,112,117,116,46,13,10,32,32, + 32,32,32,32,32,32,115,121,110,116,104,46,114,101,110,100,101,114,78,101,120,116,66,108,111,99,107,32,40,42,98,117,102,102,101,114,84,111,70,105, + 108,108,46,98,117,102,102,101,114,44,32,105,110,99,111,109,105,110,103,77,105,100,105,44,32,48,44,32,98,117,102,102,101,114,84,111,70,105,108,108, + 46,110,117,109,83,97,109,112,108,101,115,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,65,117,100,105, + 111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110, + 116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112, + 117,98,108,105,99,32,84,105,109,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,65,117,100,105,111,73,79,68,101,118,105,99,101,67,97,108,108,98,97,99,107,13,10,123, + 13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,65,117,100,105,111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121, + 40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,98,117,102,102,101,114,80,111,115,32,61,32,48,59,13,10,32,32,32,32,32, + 32,32,32,98,117,102,102,101,114,83,105,122,101,32,61,32,50,48,52,56,59,13,10,32,32,32,32,32,32,32,32,99,105,114,99,117,108,97,114,66, + 117,102,102,101,114,32,61,32,40,102,108,111,97,116,42,41,32,106,117,99,101,95,99,97,108,108,111,99,32,40,115,105,122,101,111,102,32,40,102,108, + 111,97,116,41,32,42,32,98,117,102,102,101,114,83,105,122,101,41,59,13,10,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,73,110,112,117, + 116,76,101,118,101,108,32,61,32,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,110,117,109,83,97,109,112,108,101,115,73,110,32,61,32,48, + 59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32, + 115,116,97,114,116,84,105,109,101,114,32,40,49,48,48,48,32,47,32,53,48,41,59,32,32,47,47,32,114,101,112,97,105,110,116,32,101,118,101,114, + 121,32,49,47,53,48,32,111,102,32,97,32,115,101,99,111,110,100,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,65,117,100,105,111,73, + 110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,106,117, + 99,101,95,102,114,101,101,32,40,99,105,114,99,117,108,97,114,66,117,102,102,101,114,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, + 118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46, + 115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116,103,114,101,101,110,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,104,97,108,102,72,101,105,103,104,116,32,61,32,103,101,116,72,101,105,103,104,116,40,41, + 32,42,32,48,46,53,102,59,13,10,13,10,32,32,32,32,32,32,32,32,105,110,116,32,98,112,32,61,32,98,117,102,102,101,114,80,111,115,59,13, + 10,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,120,32,61,32,103,101,116,87,105,100,116,104,40,41,59,32,45,45,120,32, + 62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116, + 32,115,97,109,112,108,101,115,65,103,111,32,61,32,103,101,116,87,105,100,116,104,40,41,32,45,32,120,59,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,108,101,118,101,108,32,61,32,99,105,114,99,117,108,97,114,66,117,102,102,101,114,32,91,40, + 98,112,32,43,32,98,117,102,102,101,114,83,105,122,101,32,45,32,115,97,109,112,108,101,115,65,103,111,41,32,37,32,98,117,102,102,101,114,83,105, + 122,101,93,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,108,101,118,101,108,32,62,32,48,46,48,49,102,41,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,76,105,110,101,32,40,40,102,108,111,97,116,41,32,120,44,32,104, + 97,108,102,72,101,105,103,104,116,32,45,32,104,97,108,102,72,101,105,103,104,116,32,42,32,108,101,118,101,108,44,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,102,108,111,97,116,41,32,120,44,32,104,97,108,102,72,101,105,103, + 104,116,32,43,32,104,97,108,102,72,101,105,103,104,116,32,42,32,108,101,118,101,108,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32, + 32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,100, + 100,83,97,109,112,108,101,32,40,99,111,110,115,116,32,102,108,111,97,116,32,115,97,109,112,108,101,41,13,10,32,32,32,32,123,13,10,32,32,32, + 32,32,32,32,32,99,117,114,114,101,110,116,73,110,112,117,116,76,101,118,101,108,32,43,61,32,102,97,98,115,102,32,40,115,97,109,112,108,101,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,115,97,109,112,108,101,115,84,111,65,118,101,114,97,103,101,32, + 61,32,49,50,56,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,43,43,110,117,109,83,97,109,112,108,101,115,73,110,32,62,32,115, + 97,109,112,108,101,115,84,111,65,118,101,114,97,103,101,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,99,105,114,99,117,108,97,114,66,117,102,102,101,114,32,91,98,117,102,102,101,114,80,111,115,43,43,32,37,32,98,117,102,102,101,114,83,105,122, + 101,93,32,61,32,99,117,114,114,101,110,116,73,110,112,117,116,76,101,118,101,108,32,47,32,115,97,109,112,108,101,115,84,111,65,118,101,114,97,103, + 101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,117,109,83,97,109,112,108,101,115,73,110,32,61,32,48,59,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,73,110,112,117,116,76,101,118,101,108,32,61,32,48,46,48,102,59,13,10,32,32,32,32, + 32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,73,79,67,97, + 108,108,98,97,99,107,32,40,99,111,110,115,116,32,102,108,111,97,116,42,42,32,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,116,111,116, + 97,108,78,117,109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,42,42,32,111,117,116,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,116,111,116, + 97,108,78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,110,117,109,83,97,109,112,108,101,115,41,13,10,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,48,59,32,105,32,60,32,116,111,116,97,108,78,117,109,73,110,112,117,116,67, + 104,97,110,110,101,108,115,59,32,43,43,105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102, + 32,40,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,32,91,105,93,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,106,32,61,32,48,59,32,106,32,60, + 32,110,117,109,83,97,109,112,108,101,115,59,32,43,43,106,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97, + 100,100,83,97,109,112,108,101,32,40,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,32,91,105,93,91,106,93,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32, + 32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,65,98, + 111,117,116,84,111,83,116,97,114,116,32,40,65,117,100,105,111,73,79,68,101,118,105,99,101,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,122,101,114,111,109,101,109,32,40,99,105,114,99,117,108,97,114,66,117,102,102,101,114,44,32,115,105,122,101,111,102,32,40,102,108,111, + 97,116,41,32,42,32,98,117,102,102,101,114,83,105,122,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,117, + 100,105,111,68,101,118,105,99,101,83,116,111,112,112,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,122,101,114,111,109, + 101,109,32,40,99,105,114,99,117,108,97,114,66,117,102,102,101,114,44,32,115,105,122,101,111,102,32,40,102,108,111,97,116,41,32,42,32,98,117,102, + 102,101,114,83,105,122,101,41,59,13,10,32,32,32,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,102,108,111,97,116,42, + 32,99,105,114,99,117,108,97,114,66,117,102,102,101,114,59,13,10,32,32,32,32,102,108,111,97,116,32,99,117,114,114,101,110,116,73,110,112,117,116, + 76,101,118,101,108,59,13,10,32,32,32,32,105,110,116,32,118,111,108,97,116,105,108,101,32,98,117,102,102,101,114,80,111,115,44,32,98,117,102,102, + 101,114,83,105,122,101,44,32,110,117,109,83,97,109,112,108,101,115,73,110,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,65, + 117,100,105,111,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,76,105,115,116,101,110, + 101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115, + 116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,104,97,110,103,101, + 76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,65,117,100, + 105,111,73,79,68,101,118,105,99,101,67,97,108,108,98,97,99,107,13,10,123,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,70,105,108,101,110,97,109, + 101,67,111,109,112,111,110,101,110,116,42,32,102,105,108,101,67,104,111,111,115,101,114,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110, + 42,32,112,108,97,121,66,117,116,116,111,110,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,115,116,111,112,66,117,116,116,111, + 110,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,97,117,100,105,111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,59, + 13,10,13,10,32,32,32,32,77,105,100,105,75,101,121,98,111,97,114,100,67,111,109,112,111,110,101,110,116,42,32,107,101,121,98,111,97,114,100,67, + 111,109,112,111,110,101,110,116,59,13,10,32,32,32,32,65,117,100,105,111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121, + 42,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,116,104,105, + 115,32,119,114,97,112,115,32,116,104,101,32,97,99,116,117,97,108,32,97,117,100,105,111,32,100,101,118,105,99,101,13,10,32,32,32,32,65,117,100, + 105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,59,13,10,13,10,32, + 32,32,32,47,47,32,116,104,105,115,32,97,108,108,111,119,115,32,97,110,32,97,117,100,105,111,32,115,111,117,114,99,101,32,116,111,32,98,101,32, + 115,116,114,101,97,109,101,100,32,116,111,32,116,104,101,32,73,79,32,100,101,118,105,99,101,13,10,32,32,32,32,65,117,100,105,111,83,111,117,114, + 99,101,80,108,97,121,101,114,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,59,13,10,13,10,32,32,32,32,47,47,32,116,104, + 105,115,32,99,111,110,116,114,111,108,115,32,116,104,101,32,112,108,97,121,98,97,99,107,32,111,102,32,97,32,112,111,115,105,116,105,111,110,97,98, + 108,101,32,97,117,100,105,111,32,115,116,114,101,97,109,44,32,104,97,110,100,108,105,110,103,32,116,104,101,13,10,32,32,32,32,47,47,32,115,116, + 97,114,116,105,110,103,47,115,116,111,112,112,105,110,103,32,97,110,100,32,115,97,109,112,108,101,45,114,97,116,101,32,99,111,110,118,101,114,115,105, + 111,110,13,10,32,32,32,32,65,117,100,105,111,84,114,97,110,115,112,111,114,116,83,111,117,114,99,101,32,116,114,97,110,115,112,111,114,116,83,111, + 117,114,99,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104,105,115,32,115,111,117,114,99,101,32,99,111,110,116,97,105,110,115,32,111,117,114, + 32,115,121,110,116,104,44,32,97,110,100,32,103,101,110,101,114,97,116,101,115,32,105,116,115,32,111,117,116,112,117,116,13,10,32,32,32,32,83,121, + 110,116,104,65,117,100,105,111,83,111,117,114,99,101,32,115,121,110,116,104,83,111,117,114,99,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104, + 105,115,32,115,111,117,114,99,101,32,105,115,32,117,115,101,100,32,116,111,32,109,105,120,32,116,111,103,101,116,104,101,114,32,116,104,101,32,111,117, + 116,112,117,116,32,102,114,111,109,32,111,117,114,32,115,121,110,116,104,32,115,111,117,114,99,101,13,10,32,32,32,32,47,47,32,97,110,100,32,119, + 97,118,101,32,112,108,97,121,101,114,32,115,111,117,114,99,101,13,10,32,32,32,32,77,105,120,101,114,65,117,100,105,111,83,111,117,114,99,101,32, + 109,105,120,101,114,83,111,117,114,99,101,59,13,10,13,10,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,116,104,101,32,97,99,116,117,97, + 108,32,115,116,114,101,97,109,32,116,104,97,116,39,115,32,103,111,105,110,103,32,116,111,32,114,101,97,100,32,102,114,111,109,32,116,104,101,32,97, + 117,100,105,111,32,102,105,108,101,46,13,10,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,82,101,97,100,101,114,83,111,117,114,99,101,42, + 32,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,59,13,10,13,10,32,32,32,32,70,105,108,101,32,99,117,114, + 114,101,110,116,70,105,108,101,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,65,117,100,105,111,68,101,109, + 111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,65,117,100,105,111,34,41,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,32,61,32,48,59, + 13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,77,97,110,97,103,101,114, + 32,102,111,114,109,97,116,77,97,110,97,103,101,114,59,13,10,32,32,32,32,32,32,32,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,114, + 101,103,105,115,116,101,114,66,97,115,105,99,70,111,114,109,97,116,115,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100, + 77,97,107,101,86,105,115,105,98,108,101,32,40,102,105,108,101,67,104,111,111,115,101,114,32,61,32,110,101,119,32,70,105,108,101,110,97,109,101,67, + 111,109,112,111,110,101,110,116,32,40,84,40,34,97,117,100,105,111,102,105,108,101,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,110,111,110,101,120,105,115,116,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,32,102,97,108,115,101,44,32,102,97,108,115,101,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,103,101,116,87,105,108, + 100,99,97,114,100,70,111,114,65,108,108,70,111,114,109,97,116,115,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,83,116,114,105,110,103,58,58,101,109,112,116,121,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,84,40,34,40,99,104,111,111,115,101,32,97,32,87,65,86,32,111,114,32,65,73,70,70,32,102,105,108,101,32,116,111,32, + 112,108,97,121,41,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,97,100,100,76,105,115,116, + 101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,115,101,116,66,114, + 111,119,115,101,66,117,116,116,111,110,84,101,120,116,32,40,84,40,34,98,114,111,119,115,101,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,112,108,97,121,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120, + 116,66,117,116,116,111,110,32,40,84,40,34,112,108,97,121,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34, + 99,108,105,99,107,32,104,101,114,101,32,116,111,32,112,108,97,121,32,116,104,101,32,99,117,114,114,101,110,116,32,97,117,100,105,111,32,102,105,108, + 101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115, + 116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116,67,111, + 108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114, + 115,58,58,108,105,103,104,116,103,114,101,101,110,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116, + 67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,79,110,67,111,108,111,117,114,73,100,44,32,67,111, + 108,111,117,114,115,58,58,108,105,103,104,116,103,114,101,101,110,41,59,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45, + 62,115,101,116,67,111,110,110,101,99,116,101,100,69,100,103,101,115,32,40,66,117,116,116,111,110,58,58,67,111,110,110,101,99,116,101,100,79,110,82, + 105,103,104,116,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,116,111, + 112,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,115,116,111,112,34,41,44,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,99,108,105,99,107,32,104,101,114,101,32,116,111,32,112,108,97,121,32,116,104,101,32, + 99,117,114,114,101,110,116,32,97,117,100,105,111,32,102,105,108,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116, + 116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32, + 115,116,111,112,66,117,116,116,111,110,45,62,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111, + 110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,114,101,100,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66, + 117,116,116,111,110,45,62,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,79,110,67,111, + 108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,114,101,100,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116,116, + 111,110,45,62,115,101,116,67,111,110,110,101,99,116,101,100,69,100,103,101,115,32,40,66,117,116,116,111,110,58,58,67,111,110,110,101,99,116,101,100, + 79,110,76,101,102,116,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,97, + 117,100,105,111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34, + 115,104,111,119,32,97,117,100,105,111,32,115,101,116,116,105,110,103,115,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,99,108,105,99,107,32,104,101,114,101,32,116,111,32,99,104,97,110,103,101,32,116,104,101,32, + 97,117,100,105,111,32,100,101,118,105,99,101,32,115,101,116,116,105,110,103,115,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,117,100,105, + 111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115, + 41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,107,101,121,98,111,97,114, + 100,67,111,109,112,111,110,101,110,116,32,61,32,110,101,119,32,77,105,100,105,75,101,121,98,111,97,114,100,67,111,109,112,111,110,101,110,116,32,40, + 115,121,110,116,104,83,111,117,114,99,101,46,107,101,121,98,111,97,114,100,83,116,97,116,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,77,105,100,105,75,101,121,98,111,97,114,100,67,111,109,112,111,110, + 101,110,116,58,58,104,111,114,105,122,111,110,116,97,108,75,101,121,98,111,97,114,100,41,41,59,13,10,13,10,13,10,32,32,32,32,32,32,32,32, + 97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,32,61,32,110, + 101,119,32,65,117,100,105,111,73,110,112,117,116,87,97,118,101,102,111,114,109,68,105,115,112,108,97,121,40,41,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,114,101,103,105,115,116,101,114,32,102,111,114,32,115,116,97,114,116,47,115,116,111,112, + 32,109,101,115,115,97,103,101,115,32,102,114,111,109,32,116,104,101,32,116,114,97,110,115,112,111,114,116,32,115,111,117,114,99,101,46,46,13,10,32, + 32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,97,100,100,67,104,97,110,103,101,76,105,115,116,101,110,101,114, + 32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,105,110,105,116,105,97,108,105,115,101,32,116,104, + 101,32,100,101,118,105,99,101,32,109,97,110,97,103,101,114,32,119,105,116,104,32,110,111,32,115,101,116,116,105,110,103,115,32,115,111,32,116,104,97, + 116,32,105,116,32,112,105,99,107,115,32,97,13,10,32,32,32,32,32,32,32,32,47,47,32,100,101,102,97,117,108,116,32,100,101,118,105,99,101,32, + 116,111,32,117,115,101,46,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,101,114,114,111,114,32,40,97,117,100, + 105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,105,110,105,116,105,97,108,105,115,101,32,40,49,44,32,47,42,32,110,117,109,98,101,114, + 32,111,102,32,105,110,112,117,116,32,99,104,97,110,110,101,108,115,32,42,47,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,50,44,32,47,42,32,110,117,109,98,101,114,32,111,102,32,111,117,116,112,117,116,32,99,104,97,110,110,101,108,115,32,42,47,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,47,42,32,110,111,32,88,77,76,32,115,101,116,116,105,110,103,115,46,46, + 32,42,47,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,32,32,47,42,32,115,101,108,101,99,116,32, + 100,101,102,97,117,108,116,32,100,101,118,105,99,101,32,111,110,32,102,97,105,108,117,114,101,32,42,47,41,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,105,102,32,40,101,114,114,111,114,46,105,115,78,111,116,69,109,112,116,121,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40, + 65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,65,117,100,105,111,32,68,101,109, + 111,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,84,40,34,67,111,117,108,100,110,39,116,32,111,112,101,110,32,97,110,32,111,117,116,112,117,116,32,100,101,118,105,99,101, + 33,92,110,92,110,34,41,32,43,32,101,114,114,111,114,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108, + 115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,116,104,101,32,116,119, + 111,32,97,117,100,105,111,32,115,111,117,114,99,101,115,32,116,111,32,111,117,114,32,109,105,120,101,114,46,46,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,109,105,120,101,114,83,111,117,114,99,101,46,97,100,100,73,110,112,117,116,83,111,117,114,99,101,32,40,38,116,114,97,110,115,112,111, + 114,116,83,111,117,114,99,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,105,120,101,114,83,111,117,114, + 99,101,46,97,100,100,73,110,112,117,116,83,111,117,114,99,101,32,40,38,115,121,110,116,104,83,111,117,114,99,101,44,32,102,97,108,115,101,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,46,46,97,110,100,32,99,111,110,110,101,99,116,32,116,104,101,32,109,105,120, + 101,114,32,116,111,32,111,117,114,32,115,111,117,114,99,101,32,112,108,97,121,101,114,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,117, + 100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,46,115,101,116,83,111,117,114,99,101,32,40,38,109,105,120,101,114,83,111,117,114,99,101,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,116,97,114,116,32,116,104,101,32,73,79,32,100,101,118,105,99,101,32, + 112,117,108,108,105,110,103,32,105,116,115,32,100,97,116,97,32,102,114,111,109,32,111,117,114,32,99,97,108,108,98,97,99,107,46,46,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,115,101,116,65,117,100,105,111,67,97,108, + 108,98,97,99,107,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,119,101,32,110, + 101,101,100,32,116,111,32,115,101,110,100,32,109,105,100,105,32,105,110,112,117,116,32,116,111,32,111,117,114,32,115,121,110,116,104,32,102,111,114,32, + 112,114,111,99,101,115,115,105,110,103,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103, + 101,114,46,97,100,100,77,105,100,105,73,110,112,117,116,67,97,108,108,98,97,99,107,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32, + 38,115,121,110,116,104,83,111,117,114,99,101,46,109,105,100,105,67,111,108,108,101,99,116,111,114,41,59,13,10,32,32,32,32,32,32,32,32,125,13, + 10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,65,117,100,105,111,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,114,101,109,111,118,101,77,105,100,105,73,110,112,117,116,67,97,108, + 108,98,97,99,107,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,38,115,121,110,116,104,83,111,117,114,99,101,46,109,105,100,105,67, + 111,108,108,101,99,116,111,114,41,59,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,68,101,118,105,99,101,77,97,110,97,103,101,114,46,115, + 101,116,65,117,100,105,111,67,97,108,108,98,97,99,107,32,40,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114, + 116,83,111,117,114,99,101,46,114,101,109,111,118,101,67,104,97,110,103,101,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,101,116,83,111,117,114,99,101,32,40,48,41,59,13,10, + 32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111,32,40,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83, + 111,117,114,99,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,46,115,101,116, + 83,111,117,114,99,101,32,40,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110, + 40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101, + 73,79,67,97,108,108,98,97,99,107,32,40,99,111,110,115,116,32,102,108,111,97,116,42,42,32,105,110,112,117,116,67,104,97,110,110,101,108,68,97, + 116,97,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116, + 32,116,111,116,97,108,78,117,109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,42,42,32,111,117,116,112,117,116,67,104,97,110,110,101,108,68,97, + 116,97,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116, + 32,116,111,116,97,108,78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,110,117,109,83,97,109,112,108,101,115,41,13,10,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,47,47,32,112,97,115,115,32,116,104,101,32,97,117,100,105,111,32,99,97,108,108,98,97,99,107,32,111,110,32, + 116,111,32,111,117,114,32,112,108,97,121,101,114,32,115,111,117,114,99,101,44,32,97,110,100,32,97,108,115,111,32,116,104,101,32,119,97,118,101,102, + 111,114,109,32,100,105,115,112,108,97,121,32,99,111,109,112,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97, + 121,101,114,46,97,117,100,105,111,68,101,118,105,99,101,73,79,67,97,108,108,98,97,99,107,32,40,105,110,112,117,116,67,104,97,110,110,101,108,68, + 97,116,97,44,32,116,111,116,97,108,78,117,109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,32,111,117,116,112,117,116,67,104,97,110,110,101, + 108,68,97,116,97,44,32,116,111,116,97,108,78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,32,110,117,109,83,97,109,112,108,101, + 115,41,59,13,10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,97,117,100,105,111,68,101,118, + 105,99,101,73,79,67,97,108,108,98,97,99,107,32,40,105,110,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,32,116,111,116,97,108,78,117, + 109,73,110,112,117,116,67,104,97,110,110,101,108,115,44,32,111,117,116,112,117,116,67,104,97,110,110,101,108,68,97,116,97,44,32,116,111,116,97,108, + 78,117,109,79,117,116,112,117,116,67,104,97,110,110,101,108,115,44,32,110,117,109,83,97,109,112,108,101,115,41,59,13,10,32,32,32,32,125,13,10, + 13,10,32,32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,65,98,111,117,116,84,111,83,116,97,114,116,32,40,65,117,100,105, + 111,73,79,68,101,118,105,99,101,42,32,100,101,118,105,99,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111, + 83,111,117,114,99,101,80,108,97,121,101,114,46,97,117,100,105,111,68,101,118,105,99,101,65,98,111,117,116,84,111,83,116,97,114,116,32,40,100,101, + 118,105,99,101,41,59,13,10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,97,117,100,105,111, + 68,101,118,105,99,101,65,98,111,117,116,84,111,83,116,97,114,116,32,40,100,101,118,105,99,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32, + 32,32,32,118,111,105,100,32,97,117,100,105,111,68,101,118,105,99,101,83,116,111,112,112,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32, + 32,32,32,32,32,97,117,100,105,111,83,111,117,114,99,101,80,108,97,121,101,114,46,97,117,100,105,111,68,101,118,105,99,101,83,116,111,112,112,101, + 100,40,41,59,13,10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,97,117,100,105,111,68,101, + 118,105,99,101,83,116,111,112,112,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,118,111,105,100,32, + 112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,112, + 114,105,110,116,32,115,111,109,101,32,116,101,120,116,32,116,111,32,101,120,112,108,97,105,110,32,119,104,97,116,32,115,116,97,116,101,32,119,101,39, + 114,101,32,105,110,46,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58, + 98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,49,52,46,48,102,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,83,116,114,105,110,103,32,115,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,114,97,110,115,112,111,114, + 116,83,111,117,114,99,101,46,105,115,80,108,97,121,105,110,103,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,32,61,32,84,40, + 34,112,108,97,121,105,110,103,34,41,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115, + 32,61,32,84,40,34,115,116,111,112,112,101,100,34,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,99,117,114,114,101,110,116,65, + 117,100,105,111,70,105,108,101,83,111,117,114,99,101,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,32,43,61,32,84, + 40,34,32,45,32,110,111,32,115,111,117,114,99,101,32,102,105,108,101,32,115,101,108,101,99,116,101,100,34,41,59,13,10,32,32,32,32,32,32,32, + 32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,32,43,61,32,84,40,34,32,45,32,102,105,108,101,58,32,92,34,34,41, + 32,43,32,99,117,114,114,101,110,116,70,105,108,101,46,103,101,116,70,117,108,108,80,97,116,104,78,97,109,101,40,41,32,43,32,84,40,34,92,34, + 34,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120,116,32,40,115,44,32,50,53,48,44,32,53,48,44,32,103, + 101,116,87,105,100,116,104,40,41,32,45,32,50,53,48,44,32,50,52,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116, + 114,101,100,76,101,102,116,44,32,116,114,117,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122, + 101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,115,101,116,66,111,117, + 110,100,115,32,40,49,48,44,32,49,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,48,44,32,50,52,41,59,13,10,32,32,32,32, + 32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,53,48,44,32,49,48,48,44,32, + 50,52,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,49,48, + 44,32,53,48,44,32,49,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,97,117,100,105,111,83,101,116,116,105,110,103,115,66,117, + 116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,49,50,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32, + 32,32,32,32,32,97,117,100,105,111,83,101,116,116,105,110,103,115,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70, + 105,116,84,101,120,116,40,41,59,13,10,32,32,32,32,32,32,32,32,107,101,121,98,111,97,114,100,67,111,109,112,111,110,101,110,116,45,62,115,101, + 116,66,111,117,110,100,115,32,40,49,48,44,32,50,48,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,48,44,32,54,48,41,59,13, + 10,32,32,32,32,32,32,32,32,119,97,118,101,102,111,114,109,67,111,109,112,111,110,101,110,116,45,62,115,101,116,66,111,117,110,100,115,32,40,49, + 48,44,32,51,48,48,44,32,52,48,48,44,32,56,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,66,117,116,116,111, + 110,115,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,117,112,100,97,116,101,66,117,116,116,111,110,115,40,41, + 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,112,108,97,121,66,117,116,116,111,110,45,62,115,101,116,69,110,97,98,108,101,100,32, + 40,99,117,114,114,101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,32,33,61,32,48,32,38,38,32,33,32,116,114,97,110,115,112, + 111,114,116,83,111,117,114,99,101,46,105,115,80,108,97,121,105,110,103,40,41,41,59,13,10,32,32,32,32,32,32,32,32,115,116,111,112,66,117,116, + 116,111,110,45,62,115,101,116,69,110,97,98,108,101,100,32,40,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,105,115,80,108,97,121,105, + 110,103,40,41,41,59,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32, + 32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,112,108,97,121,66,117,116,116,111,110,41,13,10, + 32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115, + 101,116,80,111,115,105,116,105,111,110,32,40,48,46,48,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116, + 83,111,117,114,99,101,46,115,116,97,114,116,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101, + 32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,115,116,111,112,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,116,111,112,40,41,59,13,10,32,32,32,32, + 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,97,117,100,105,111,83, + 101,116,116,105,110,103,115,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47, + 47,32,67,114,101,97,116,101,32,97,110,32,65,117,100,105,111,68,101,118,105,99,101,83,101,108,101,99,116,111,114,67,111,109,112,111,110,101,110,116, + 32,119,104,105,99,104,32,99,111,110,116,97,105,110,115,32,116,104,101,32,97,117,100,105,111,32,99,104,111,105,99,101,32,119,105,100,103,101,116,115, + 46,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,65,117,100,105,111,68,101,118,105,99,101,83,101,108,101,99,116,111,114,67,111, + 109,112,111,110,101,110,116,32,97,117,100,105,111,83,101,116,116,105,110,103,115,67,111,109,112,32,40,97,117,100,105,111,68,101,118,105,99,101,77,97, + 110,97,103,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,49,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,50,44,32,50,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,116,114,117,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,97,108,115,101,44,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,46,46,46,97,110,100,32,115,104,111, + 119,32,105,116,32,105,110,32,97,32,68,105,97,108,111,103,87,105,110,100,111,119,46,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97, + 117,100,105,111,83,101,116,116,105,110,103,115,67,111,109,112,46,115,101,116,83,105,122,101,32,40,53,48,48,44,32,52,53,48,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,68,105,97,108,111,103,87,105,110,100,111,119,58,58,115,104,111,119,77,111,100,97,108,68,105,97,108,111, + 103,32,40,84,40,34,65,117,100,105,111,32,83,101,116,116,105,110,103,115,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,38,97,117,100,105,111,83,101,116,116,105,110, + 103,115,67,111,109,112,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,97,122,117,114,101,44,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,102, + 105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,67,104,97,110,103,101,100,32,40,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101, + 110,116,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,99,97,108,108,101,100,32,119, + 104,101,110,32,116,104,101,32,117,115,101,114,32,99,104,97,110,103,101,115,32,116,104,101,32,102,105,108,101,110,97,109,101,32,105,110,32,116,104,101, + 32,102,105,108,101,32,99,104,111,111,115,101,114,32,98,111,120,13,10,13,10,32,32,32,32,32,32,32,32,70,105,108,101,32,97,117,100,105,111,70, + 105,108,101,32,40,102,105,108,101,67,104,111,111,115,101,114,45,62,103,101,116,67,117,114,114,101,110,116,70,105,108,101,40,41,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,47,47,32,117,110,108,111,97,100,32,116,104,101,32,112,114,101,118,105,111,117,115,32,102,105,108,101,32,115,111,117,114, + 99,101,32,97,110,100,32,100,101,108,101,116,101,32,105,116,46,46,13,10,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117, + 114,99,101,46,115,116,111,112,40,41,59,13,10,32,32,32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,101,116, + 83,111,117,114,99,101,32,40,48,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111,32,40,99,117,114,114, + 101,110,116,65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116, + 101,32,97,32,110,101,119,32,102,105,108,101,32,115,111,117,114,99,101,32,102,114,111,109,32,116,104,101,32,102,105,108,101,46,46,13,10,13,10,32, + 32,32,32,32,32,32,32,47,47,32,103,101,116,32,97,32,102,111,114,109,97,116,32,109,97,110,97,103,101,114,32,97,110,100,32,115,101,116,32,105, + 116,32,117,112,32,119,105,116,104,32,116,104,101,32,98,97,115,105,99,32,116,121,112,101,115,32,40,119,97,118,32,97,110,100,32,97,105,102,102,41, + 46,13,10,32,32,32,32,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,77,97,110,97,103,101,114,32,102,111,114,109,97,116,77,97,110,97, + 103,101,114,59,13,10,32,32,32,32,32,32,32,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,114,101,103,105,115,116,101,114,66,97,115,105, + 99,70,111,114,109,97,116,115,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,65,117,100,105,111,70,111,114,109,97,116,82,101,97,100,101,114, + 42,32,114,101,97,100,101,114,32,61,32,102,111,114,109,97,116,77,97,110,97,103,101,114,46,99,114,101,97,116,101,82,101,97,100,101,114,70,111,114, + 32,40,97,117,100,105,111,70,105,108,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,101,97,100,101,114,32,33,61,32,48, + 41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,70,105,108,101,32,61,32, + 97,117,100,105,111,70,105,108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,65,117,100,105,111,70,105, + 108,101,83,111,117,114,99,101,32,61,32,110,101,119,32,65,117,100,105,111,70,111,114,109,97,116,82,101,97,100,101,114,83,111,117,114,99,101,32,40, + 114,101,97,100,101,114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,46,46,97,110,100,32,112, + 108,117,103,32,105,116,32,105,110,116,111,32,111,117,114,32,116,114,97,110,115,112,111,114,116,32,115,111,117,114,99,101,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,116,114,97,110,115,112,111,114,116,83,111,117,114,99,101,46,115,101,116,83,111,117,114,99,101,32,40,99,117,114,114,101,110,116, + 65,117,100,105,111,70,105,108,101,83,111,117,114,99,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,51,50,55,54,56,44,32,47,47,32,116,101,108,108,115,32,105,116,32,116,111,32,98, + 117,102,102,101,114,32,116,104,105,115,32,109,97,110,121,32,115,97,109,112,108,101,115,32,97,104,101,97,100,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,101,114,45,62,115,97, + 109,112,108,101,82,97,116,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,66, + 117,116,116,111,110,115,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,104,97,110,103,101,76,105,115,116,101, + 110,101,114,67,97,108,108,98,97,99,107,32,40,118,111,105,100,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,99, + 97,108,108,98,97,99,107,32,102,114,111,109,32,116,104,101,32,116,114,97,110,115,112,111,114,116,32,115,111,117,114,99,101,32,116,111,32,116,101,108, + 108,32,117,115,32,116,104,97,116,32,112,108,97,121,32,104,97,115,13,10,32,32,32,32,32,32,32,32,47,47,32,115,116,97,114,116,101,100,32,111, + 114,32,115,116,111,112,112,101,100,44,32,115,111,32,117,112,100,97,116,101,32,111,117,114,32,98,117,116,116,111,110,115,46,46,13,10,32,32,32,32, + 32,32,32,32,117,112,100,97,116,101,66,117,116,116,111,110,115,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67, + 111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,65,117,100,105,111,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117, + 114,110,32,110,101,119,32,65,117,100,105,111,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::audiodemo_cpp = (const char*) temp11; + +static const unsigned char temp12[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, + 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, + 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, + 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, + 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, + 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, + 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, + 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, + 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, + 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, + 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, + 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, + 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, + 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, + 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, + 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, + 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, + 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, + 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, + 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, + 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, + 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, + 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, + 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, + 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, + 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, + 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, + 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,13,10,99,108,97,115,115,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112, + 111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99, + 32,65,115,121,110,99,85,112,100,97,116,101,114,13,10,123,13,10,32,32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,115,105,122,101,44,32, + 100,120,44,32,100,121,44,32,119,44,32,104,44,32,112,97,114,101,110,116,87,105,100,116,104,44,32,112,97,114,101,110,116,72,101,105,103,104,116,59, + 13,10,32,32,32,32,102,108,111,97,116,32,105,110,110,101,114,88,44,32,105,110,110,101,114,89,59,13,10,32,32,32,32,67,111,108,111,117,114,32, + 99,111,108,111,117,114,59,13,10,32,32,32,32,67,114,105,116,105,99,97,108,83,101,99,116,105,111,110,32,108,111,99,107,59,13,10,32,32,32,32, + 105,110,116,54,52,32,116,104,114,101,97,100,73,100,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,66,111,117,110,99,105,110,103, + 66,97,108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120,32,61,32,82,97,110,100,111,109,58,58,103, + 101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,50,48,48,46,48,102,59,13,10, + 32,32,32,32,32,32,32,32,121,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101, + 120,116,70,108,111,97,116,40,41,32,42,32,50,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,87,105,100,116,104, + 32,61,32,53,48,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,101,105,103,104,116,32,61,32,53,48,59,13,10,32,32,32,32, + 32,32,32,32,105,110,110,101,114,88,32,61,32,48,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114,89,32,61,32,48,59,13,10,32,32, + 32,32,32,32,32,32,116,104,114,101,97,100,73,100,32,61,32,48,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111, + 97,116,32,115,112,101,101,100,32,61,32,53,46,48,102,59,32,47,47,32,103,105,118,101,32,101,97,99,104,32,98,97,108,108,32,97,32,102,105,120, + 101,100,32,115,112,101,101,100,32,115,111,32,119,101,32,99,97,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,101,101,32,116,104,101,32,101,102,102,101,99,116,115,32,111,102,32,116,104,114,101, + 97,100,32,112,114,105,111,114,105,116,121,32,111,110,32,104,111,119,32,102,97,115,116,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,101,121,32,97,99,116,117,97,108,108,121,32,103,111,46,13, + 10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,97,110,103,108,101,32,61,32,82,97,110,100,111,109,58,58,103,101,116, + 83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,102,108,111,97,116,95,80,105,32,42,32, + 50,46,48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,100,120,32,61,32,115,105,110,102,32,40,97,110,103,108,101,41,32,42,32,115,112,101, + 101,100,59,13,10,32,32,32,32,32,32,32,32,100,121,32,61,32,99,111,115,102,32,40,97,110,103,108,101,41,32,42,32,115,112,101,101,100,59,13, + 10,13,10,32,32,32,32,32,32,32,32,115,105,122,101,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111, + 109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,51,48,46,48,102,32,43,32,51,48,46,48,102,59,13,10,13,10,32,32,32,32, + 32,32,32,32,99,111,108,111,117,114,32,61,32,67,111,108,111,117,114,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97, + 110,100,111,109,40,41,46,110,101,120,116,73,110,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46, + 119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,119, + 105,116,104,66,114,105,103,104,116,110,101,115,115,32,40,48,46,55,102,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,66,111,117, + 110,99,105,110,103,66,97,108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105, + 100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46, + 115,101,116,67,111,108,111,117,114,32,40,99,111,108,111,117,114,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,69,108,108,105,112, + 115,101,32,40,105,110,110,101,114,88,44,32,105,110,110,101,114,89,44,32,115,105,122,101,44,32,115,105,122,101,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32, + 32,32,32,103,46,115,101,116,70,111,110,116,32,40,49,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120, + 116,32,40,83,116,114,105,110,103,58,58,116,111,72,101,120,83,116,114,105,110,103,32,40,116,104,114,101,97,100,73,100,41,44,32,48,44,32,48,44, + 32,103,101,116,87,105,100,116,104,40,41,44,32,103,101,116,72,101,105,103,104,116,40,41,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58, + 58,99,101,110,116,114,101,100,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,114, + 101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,87, + 105,100,116,104,32,61,32,103,101,116,80,97,114,101,110,116,87,105,100,116,104,40,41,32,45,32,115,105,122,101,59,13,10,32,32,32,32,32,32,32, + 32,112,97,114,101,110,116,72,101,105,103,104,116,32,61,32,103,101,116,80,97,114,101,110,116,72,101,105,103,104,116,40,41,32,45,32,115,105,122,101, + 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,104,97,110,100,108,101,65,115,121,110,99,85,112,100,97,116,101,40,41, + 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,99,111,112,101,100,76,111,99,107,32,115,108,32,40,108,111, + 99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,66,111,117,110,100,115,32,40,40,40,105,110,116,41,32,120,41,32,45,32,50, + 44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,121,41,32,45,32,50,44,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,115,105,122,101,41,32,43,32,52,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,115,105,122,101,41,32,43,32,52,41,59,13,10,13,10,32,32,32, + 32,32,32,32,32,105,110,110,101,114,88,32,61,32,120,32,45,32,103,101,116,88,40,41,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114, + 89,32,61,32,121,32,45,32,103,101,116,89,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32, + 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109,111,118,101,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,99,111,110,115,116,32,83,99,111,112,101,100,76,111,99,107,32,115,108,32,40,108,111,99,107,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,116,104,114,101,97,100,73,100,32,61,32,84,104,114,101,97,100,58,58,103,101,116,67,117,114,114,101,110,116,84,104,114,101,97,100,73,100, + 40,41,59,32,47,47,32,116,104,105,115,32,105,115,32,115,111,32,116,104,101,32,99,111,109,112,111,110,101,110,116,32,99,97,110,32,112,114,105,110, + 116,32,116,104,101,32,116,104,114,101,97,100,32,73,68,32,105,110,115,105,100,101,32,116,104,101,32,98,97,108,108,13,10,13,10,32,32,32,32,32, + 32,32,32,120,32,43,61,32,100,120,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,100,121,59,13,10,13,10,32,32,32,32,32,32,32, + 32,105,102,32,40,120,32,60,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,120,32,61,32,102,97,98,115,102,32,40,100,120,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120,32,62,32,112,97,114,101,110,116,87,105,100,116,104,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,100,120,32,61,32,45,102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40, + 121,32,60,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,121,32,61,32,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,105,102,32,40,121,32,62,32,112,97,114,101,110,116,72,101,105,103,104,116,41,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,100,121,32,61,32,45,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32, + 105,115,32,99,97,108,108,101,100,32,111,110,32,97,32,98,97,99,107,103,114,111,117,110,100,32,116,104,114,101,97,100,44,32,115,111,32,119,101,32, + 100,111,110,39,116,32,119,97,110,116,32,116,111,32,99,97,108,108,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,121,32,85,73,32,99,111, + 100,101,32,102,114,111,109,32,104,101,114,101,32,45,32,105,110,115,116,101,97,100,32,119,101,39,108,108,32,116,114,105,103,103,101,114,32,97,110,32, + 101,118,101,110,116,32,116,104,97,116,32,119,105,108,108,32,117,112,100,97,116,101,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,99, + 111,109,112,111,110,101,110,116,39,115,32,112,111,115,105,116,105,111,110,32,108,97,116,101,114,46,32,84,104,105,115,32,105,115,32,97,32,115,97,102, + 101,32,119,97,121,32,116,111,32,97,118,111,105,100,32,100,101,97,100,108,111,99,107,115,13,10,32,32,32,32,32,32,32,32,116,114,105,103,103,101, + 114,65,115,121,110,99,85,112,100,97,116,101,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101, + 98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,101,109,111, + 84,104,114,101,97,100,32,32,32,32,58,32,112,117,98,108,105,99,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,44,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,104,114,101,97,100,13,10,123,13,10,32,32, + 32,32,105,110,116,32,105,110,116,101,114,118,97,108,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,84,104,114,101, + 97,100,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,104,114,101,97,100,32,40,84,40,34,74,117,99,101,32,68,101,109,111,32,84,104,114, + 101,97,100,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,110,116,101,114,118,97,108,32,61,32,82,97,110,100,111,109, + 58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,53,48,41,32,43,32,54,59,13,10,13, + 10,32,32,32,32,32,32,32,32,47,47,32,103,105,118,101,32,116,104,101,32,116,104,114,101,97,100,115,32,97,32,114,97,110,100,111,109,32,112,114, + 105,111,114,105,116,121,44,32,115,111,32,115,111,109,101,32,119,105,108,108,32,109,111,118,101,32,109,111,114,101,13,10,32,32,32,32,32,32,32,32, + 47,47,32,115,109,111,111,116,104,108,121,32,116,104,97,110,32,111,116,104,101,114,115,46,46,13,10,32,32,32,32,32,32,32,32,115,116,97,114,116, + 84,104,114,101,97,100,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110, + 116,32,40,51,41,32,43,32,51,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,104,114,101,97,100,40,41,13, + 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,97,108,108,111,119,32,116,104,101,32,116,104,114,101,97,100,32,50,32,115,101, + 99,111,110,100,115,32,116,111,32,115,116,111,112,32,99,108,101,97,110,108,121,32,45,32,115,104,111,117,108,100,32,98,101,32,112,108,101,110,116,121, + 32,111,102,32,116,105,109,101,46,13,10,32,32,32,32,32,32,32,32,115,116,111,112,84,104,114,101,97,100,32,40,50,48,48,48,41,59,13,10,32, + 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,117,110,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47, + 47,32,116,104,105,115,32,105,115,32,116,104,101,32,99,111,100,101,32,116,104,97,116,32,114,117,110,115,32,116,104,105,115,32,116,104,114,101,97,100, + 32,45,32,119,101,39,108,108,32,108,111,111,112,32,99,111,110,116,105,110,117,111,117,115,108,121,44,13,10,32,32,32,32,32,32,32,32,47,47,32, + 117,112,100,97,116,105,110,103,32,116,104,101,32,99,111,45,111,114,100,105,110,97,116,101,115,32,111,102,32,111,117,114,32,98,108,111,98,46,13,10, + 13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,114,101,97,100,83,104,111,117,108,100,69,120,105,116,40,41,32,114,101,116,117,114,110,115,32, + 116,114,117,101,32,119,104,101,110,32,116,104,101,32,115,116,111,112,84,104,114,101,97,100,40,41,32,109,101,116,104,111,100,32,104,97,115,32,98,101, + 101,110,13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,108,108,101,100,44,32,115,111,32,119,101,32,115,104,111,117,108,100,32,99,104,101,99, + 107,32,105,116,32,111,102,116,101,110,44,32,97,110,100,32,101,120,105,116,32,97,115,32,115,111,111,110,32,97,115,32,105,116,32,103,101,116,115,32, + 102,108,97,103,103,101,100,46,13,10,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,33,32,116,104,114,101,97,100,83,104,111,117,108,100,69, + 120,105,116,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,111,118,101,66,97,108,108,40, + 41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,108,101,101,112,32,97,32,98,105,116,32,115,111,32,116,104,101,32, + 116,104,114,101,97,100,115,32,100,111,110,39,116,32,97,108,108,32,103,114,105,110,100,32,116,104,101,32,67,80,85,32,116,111,32,97,32,104,97,108, + 116,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,97,105,116,32,40,105,110,116,101,114,118,97,108,41,59,13,10,32,32,32,32,32, + 32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79, + 112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74, + 111,98,32,32,58,32,112,117,98,108,105,99,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,104,114,101,97,100,80,111,111,108,74,111,98,13, + 10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,40,41,13,10,32,32, + 32,32,32,32,32,32,58,32,84,104,114,101,97,100,80,111,111,108,74,111,98,32,40,84,40,34,68,101,109,111,32,84,104,114,101,97,100,112,111,111, + 108,32,74,111,98,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,104,114,101,97, + 100,80,111,111,108,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,74,111,98,83,116,97,116,117, + 115,32,114,117,110,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,116,104, + 101,32,99,111,100,101,32,116,104,97,116,32,114,117,110,115,32,116,104,105,115,32,106,111,98,46,32,73,116,39,108,108,32,98,101,32,114,101,112,101, + 97,116,101,100,108,121,32,99,97,108,108,101,100,32,117,110,116,105,108,32,119,101,32,114,101,116,117,114,110,13,10,32,32,32,32,32,32,32,32,47, + 47,32,106,111,98,72,97,115,70,105,110,105,115,104,101,100,32,105,110,115,116,101,97,100,32,111,102,32,106,111,98,78,101,101,100,115,82,117,110,110, + 105,110,103,65,103,97,105,110,46,13,10,13,10,32,32,32,32,32,32,32,32,109,111,118,101,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32, + 32,32,84,104,114,101,97,100,58,58,115,108,101,101,112,32,40,51,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32, + 106,111,98,78,101,101,100,115,82,117,110,110,105,110,103,65,103,97,105,110,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100, + 32,114,101,109,111,118,101,100,70,114,111,109,81,117,101,117,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,84, + 104,105,115,32,105,115,32,99,97,108,108,101,100,32,116,111,32,116,101,108,108,32,117,115,32,116,104,97,116,32,111,117,114,32,106,111,98,32,104,97, + 115,32,98,101,101,110,32,114,101,109,111,118,101,100,32,102,114,111,109,32,116,104,101,32,112,111,111,108,46,13,10,32,32,32,32,32,32,32,32,47, + 47,32,73,110,32,116,104,105,115,32,99,97,115,101,32,116,104,101,114,101,39,115,32,110,111,32,110,101,101,100,32,116,111,32,100,111,32,97,110,121, + 116,104,105,110,103,32,104,101,114,101,46,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103, + 105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,84,104,114,101,97,100,105,110,103,68, + 101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,105,109,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,98,111,111, + 108,32,105,115,85,115,105,110,103,80,111,111,108,59,13,10,32,32,32,32,84,104,114,101,97,100,80,111,111,108,32,112,111,111,108,59,13,10,32,32, + 32,32,84,101,120,116,66,117,116,116,111,110,42,32,99,111,110,116,114,111,108,66,117,116,116,111,110,59,13,10,13,10,112,117,98,108,105,99,58,13, + 10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,13,10,32,32,32,32,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,13,10,32,32,32,32,32,32,32,32,58,32,112,111, + 111,108,32,40,51,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,115,85,115,105,110,103,80,111,111,108,32,61,32,102,97,108, + 115,101,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,77,117,108,116,105,116,104,114,101,97,100,105,110, + 103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32, + 125,13,10,13,10,32,32,32,32,126,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, + 32,32,112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115,32,40,116,114,117,101,44,32,50,48,48,48,41,59,13,10,13,10,32,32, + 32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32, + 32,47,47,32,116,104,105,115,32,103,101,116,115,32,99,97,108,108,101,100,32,119,104,101,110,32,97,32,99,111,109,112,111,110,101,110,116,32,105,115, + 32,97,100,100,101,100,32,111,114,32,114,101,109,111,118,101,100,32,102,114,111,109,32,97,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110, + 116,46,13,10,32,32,32,32,118,111,105,100,32,112,97,114,101,110,116,72,105,101,114,97,114,99,104,121,67,104,97,110,103,101,100,40,41,13,10,32, + 32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,39,108,108,32,117,115,101,32,116,104,105,115,32,97,115,32,97,110,32,111,112, + 112,111,114,116,117,110,105,116,121,32,116,111,32,115,116,97,114,116,32,97,110,100,32,115,116,111,112,32,116,104,101,32,116,104,114,101,97,100,115,44, + 32,115,111,32,116,104,97,116,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,32,100,111,110,39,116,32,108,101,97,118,101,32,116,104,101,109, + 32,103,111,105,110,103,32,119,104,101,110,32,116,104,101,32,99,111,109,112,111,110,101,110,116,39,115,32,110,111,116,32,97,99,116,117,97,108,108,121, + 32,118,105,115,105,98,108,101,46,13,10,32,32,32,32,32,32,32,32,115,116,111,112,84,105,109,101,114,40,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115,32,40,116,114,117,101,44,32,52,48,48,48,41,59,13,10,32,32,32, + 32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100, + 65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,110,116,114,111,108,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116, + 66,117,116,116,111,110,32,40,84,40,34,84,104,114,101,97,100,32,116,121,112,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110, + 116,114,111,108,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,32,40,50,48,41,59,13,10, + 32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111, + 110,32,40,50,48,44,32,50,48,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,84, + 114,105,103,103,101,114,101,100,79,110,77,111,117,115,101,68,111,119,110,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110, + 116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,65,108,119,97,121,115,79,110,84,111,112,32,40,116,114,117,101,41,59,13,10,32,32,32,32, + 32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104, + 105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,83,104,111,119,105,110,103,40,41,41,13,10,32,32,32,32,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111, + 110,101,110,116,115,40,41,32,60,32,53,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,116,97,114,116,84,105,109,101,114,32,40,50,48,48,48,41,59,13,10,32,32,32, + 32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99, + 115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115, + 58,58,119,104,105,116,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,101,116,85,115,105,110,103,80,111,111, + 108,32,40,98,111,111,108,32,117,115,101,80,111,111,108,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,115,85,115,105,110,103, + 80,111,111,108,32,61,32,117,115,101,80,111,111,108,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,105,101,114,97,114,99,104,121, + 67,104,97,110,103,101,100,40,41,59,32,47,47,32,114,101,115,101,116,115,32,101,118,101,114,121,116,104,105,110,103,13,10,32,32,32,32,125,13,10, + 13,10,32,32,32,32,118,111,105,100,32,97,100,100,65,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102, + 32,40,105,115,85,115,105,110,103,80,111,111,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68, + 101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,42,32,110,101,119,67,111,109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101, + 97,100,80,111,111,108,74,111,98,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105, + 98,108,101,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,101,119,67,111,109,112,45,62,112,97,114, + 101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,112,111,111,108,46,97,100, + 100,74,111,98,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101, + 13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,84,104,114,101,97,100,42,32,110,101,119, + 67,111,109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101,97,100,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100, + 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 110,101,119,67,111,109,112,45,62,112,97,114,101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,59,13,10,32,32,32,32,32,32,32,32,125, + 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,109,111,118,101,65,66,97,108,108,40,41,13,10,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,85,115,105,110,103,80,111,111,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,84,104,114,101,97,100,80,111,111,108,74,111,98,42,32,106,111,98,84,111,82,101,109,111,118,101,32,61,32, + 112,111,111,108,46,103,101,116,74,111,98,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110, + 101,120,116,73,110,116,32,40,112,111,111,108,46,103,101,116,78,117,109,74,111,98,115,40,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,105,102,32,40,106,111,98,84,111,82,101,109,111,118,101,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,111,111,108,46,114,101,109,111,118,101,74,111,98,32,40,106,111,98,84,111,82, + 101,109,111,118,101,44,32,116,114,117,101,44,32,52,48,48,48,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108, + 101,116,101,32,106,111,98,84,111,82,101,109,111,118,101,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, + 32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,105,102,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,62,32,49,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,98,97,108, + 108,32,61,32,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,49,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121, + 115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101, + 110,116,115,40,41,32,45,32,49,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,100,121,110,97, + 109,105,99,95,99,97,115,116,32,60,66,117,116,116,111,110,42,62,32,40,98,97,108,108,41,32,61,61,32,48,41,32,47,47,32,100,111,110,39,116, + 32,100,101,108,101,116,101,32,111,117,114,32,98,117,116,116,111,110,33,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,100,101,108,101,116,101,32,98,97,108,108,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13, + 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32, + 123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41, + 46,110,101,120,116,66,111,111,108,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32, + 40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,60,61,32,49,48,41,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, + 32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109, + 67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,62,32,51,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 114,101,109,111,118,101,65,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, + 118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,109,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73, + 116,101,109,32,40,49,44,32,84,40,34,85,115,101,32,111,110,101,32,116,104,114,101,97,100,32,112,101,114,32,98,97,108,108,34,41,44,32,116,114, + 117,101,44,32,33,32,105,115,85,115,105,110,103,80,111,111,108,41,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40, + 50,44,32,84,40,34,85,115,101,32,97,32,116,104,114,101,97,100,32,112,111,111,108,34,41,44,32,116,114,117,101,44,32,105,115,85,115,105,110,103, + 80,111,111,108,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,114,101,115,32,61,32,109,46,115,104,111,119, + 65,116,32,40,98,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,32,33,61,32,48,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,115,101,116,85,115,105,110,103,80,111,111,108,32,40,114,101,115,32,61,61,32,50,41,59,13,10,32,32,32, + 32,125,13,10,125,59,13,10,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,84,104,114,101,97,100,105, + 110,103,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,104,114,101,97,100,105,110,103,68,101,109, + 111,40,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::threadingdemo_cpp = (const char*) temp12; + +static const unsigned char temp13[] = {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,140,0,0,0,86,8,6,0,0,0,29,101,126,119,0,0,0,9,112,72,89, + 115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,4,103,65,77,65,0,0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0, + 122,37,0,0,128,131,0,0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95,197,70,0,0,59,48,73,68, + 65,84,120,218,98,100,160,30,96,68,195,76,72,24,89,140,17,77,223,63,32,254,143,70,255,67,226,195,212,12,58,160,163,163,192,112,252,248,20,6, + 38,38,102,134,55,111,62,50,240,240,112,50,176,178,178,48,252,249,243,7,136,255,49,48,2,125,202,206,206,6,246,198,143,31,191,24,254,3,125,35, + 38,38,204,240,244,233,75,6,102,102,38,134,159,63,127,51,60,124,248,146,129,139,139,157,97,235,214,19,12,143,30,189,98,48,53,85,103,200,204,156, + 128,213,190,89,179,138,24,230,205,219,193,16,23,231,6,182,251,247,239,191,12,2,2,60,12,191,126,253,102,48,48,80,97,248,242,229,59,208,158,159, + 12,188,188,220,96,243,65,118,130,0,19,19,35,3,27,27,43,208,77,127,25,62,124,248,204,32,44,204,15,118,203,185,115,183,24,56,57,217,193,248, + 196,137,171,12,147,39,111,96,40,43,139,96,72,75,235,133,235,69,7,0,1,196,66,165,132,2,75,8,204,72,152,9,137,141,45,65,49,64,19,4, + 58,254,11,197,127,160,9,229,47,84,253,255,193,154,112,70,18,0,8,32,22,10,18,9,3,82,9,194,12,53,11,134,33,137,132,145,145,153,135,139, + 139,131,135,137,129,79,130,157,89,76,137,147,133,239,195,31,166,223,172,204,76,204,223,127,253,248,7,148,254,247,135,145,241,247,163,207,95,223,255,98, + 102,251,244,241,231,207,47,63,126,254,250,5,53,31,148,80,126,67,19,14,114,226,249,135,148,184,70,1,157,1,64,0,177,80,80,162,48,33,37,16, + 54,36,54,147,58,31,187,132,190,176,128,150,40,195,31,25,35,17,110,77,101,182,223,42,66,172,255,20,152,153,126,113,178,75,112,252,102,98,97,96, + 249,245,150,241,223,159,95,255,254,254,253,199,244,251,219,23,158,119,31,24,217,95,221,254,202,117,235,236,135,159,87,175,252,102,60,127,237,237,167,103, + 223,127,255,253,137,84,218,252,134,98,228,210,103,52,209,208,25,0,4,16,11,137,9,133,17,169,186,97,5,98,118,104,98,97,226,224,226,226,209,226, + 100,81,12,22,102,117,52,227,254,229,166,166,240,95,147,75,150,139,157,149,7,168,64,138,143,129,153,135,141,129,137,157,153,129,153,139,133,129,145,153, + 145,225,239,247,191,12,255,254,254,99,248,247,243,47,195,159,15,191,36,255,190,255,161,109,242,138,193,209,255,41,243,159,167,175,254,61,188,41,37,113, + 250,228,95,174,131,203,110,63,62,249,229,231,175,55,64,181,32,123,126,65,49,35,82,105,51,154,112,232,8,0,2,136,133,196,82,133,25,169,68,1, + 37,22,14,102,96,43,207,94,90,66,39,77,150,63,90,155,227,131,163,160,224,55,17,97,123,25,6,118,5,30,6,70,78,86,104,139,4,24,159,255, + 128,248,47,144,243,23,88,56,252,254,207,192,12,52,129,25,212,42,4,38,36,118,9,110,80,203,12,28,239,255,127,252,101,17,123,246,69,89,245,234, + 71,101,187,187,31,195,35,4,101,206,46,121,243,103,225,154,59,207,246,125,248,241,235,27,52,193,124,135,210,191,209,26,206,163,128,198,0,32,128,136, + 73,48,200,13,90,88,66,1,151,44,138,226,226,146,9,50,66,193,190,252,31,35,100,245,222,74,243,26,9,51,176,137,202,48,48,130,34,31,216,90, + 103,120,253,17,90,123,252,7,165,14,160,14,94,6,6,110,49,96,146,99,135,152,252,27,24,255,191,190,48,48,124,254,4,140,114,160,58,22,62,6, + 70,22,38,6,14,121,126,6,14,21,1,6,190,247,223,24,249,206,189,51,41,59,249,85,219,138,85,116,235,212,231,223,231,157,125,241,238,38,212,45, + 63,160,9,231,55,82,21,197,48,154,112,104,11,0,2,136,133,200,146,133,5,90,5,113,2,49,23,63,63,63,119,172,170,180,71,24,251,151,4,5, + 241,215,58,226,126,226,12,108,192,72,102,248,241,15,92,122,48,124,127,3,140,82,160,114,41,29,160,106,41,96,41,34,15,212,41,7,76,48,146,192, + 4,194,198,240,255,205,107,160,90,96,98,145,6,38,30,30,110,6,70,182,175,12,12,183,22,51,48,60,61,4,180,13,152,168,190,255,1,39,7,54, + 96,119,79,196,89,154,65,64,239,59,39,255,158,231,33,58,87,24,172,151,243,139,77,157,245,240,253,134,175,63,126,195,170,198,239,80,119,254,129,86, + 83,116,3,90,90,10,12,255,128,37,39,184,112,28,33,0,32,128,88,8,148,44,76,72,85,16,40,177,112,178,178,177,113,149,104,43,36,68,178,63, + 43,16,117,227,97,225,53,82,97,96,4,69,211,7,104,124,253,1,70,190,146,7,3,131,124,48,195,255,23,192,4,116,15,88,32,252,249,195,240,255, + 246,78,6,134,199,64,246,219,151,12,255,63,188,4,138,1,227,153,79,132,129,129,87,152,129,81,223,137,129,41,174,10,82,56,60,61,2,76,154,60, + 208,18,8,168,255,215,63,96,193,195,193,32,22,169,194,192,113,246,149,100,230,182,23,77,50,236,34,178,181,55,223,206,248,246,243,23,44,65,35,131, + 191,244,42,101,242,243,131,193,99,27,44,44,44,35,38,193,0,4,16,11,129,6,46,72,158,3,86,178,136,10,9,10,149,42,11,39,4,138,60,73, + 148,13,145,100,97,147,1,150,42,159,127,67,218,39,160,56,250,11,76,4,134,165,64,182,37,195,191,169,93,12,255,15,111,0,202,1,171,37,198,255, + 144,10,3,220,10,2,22,12,160,0,102,7,26,255,245,57,3,195,167,39,12,255,175,93,96,248,247,250,57,3,83,94,50,3,195,51,96,130,249,15, + 29,114,249,243,13,82,85,129,74,46,160,62,62,19,80,149,199,201,20,188,252,65,58,219,127,33,158,170,59,239,39,124,254,254,243,3,90,87,255,63, + 189,218,52,223,190,253,28,113,85,18,64,0,177,224,72,44,176,198,45,59,44,177,136,9,241,11,53,107,201,20,120,138,60,137,146,142,87,96,96,226, + 2,166,163,143,191,160,73,11,72,252,250,12,172,98,172,24,254,179,0,19,75,158,31,3,195,155,59,12,12,130,64,53,140,220,144,4,192,200,136,105, + 19,27,11,68,156,253,55,195,255,203,59,128,49,144,199,192,32,160,12,108,251,92,1,138,241,49,48,200,58,48,48,136,153,1,93,2,44,224,94,28, + 7,150,80,251,25,56,36,88,25,164,146,85,24,252,22,221,143,254,253,95,248,87,221,189,247,83,191,124,251,142,62,248,55,218,237,166,17,0,8,32, + 38,60,189,33,88,53,196,205,203,203,45,80,161,44,150,234,204,254,40,82,60,88,134,129,137,19,152,16,190,253,65,77,4,255,129,241,195,175,192,192, + 112,227,2,48,177,220,5,70,52,176,45,194,8,77,143,216,18,11,92,223,127,136,181,255,25,33,205,215,255,64,66,64,150,129,193,102,6,208,230,88, + 96,41,245,138,225,255,238,251,12,255,185,162,24,24,236,129,98,127,249,129,53,214,47,6,241,112,89,6,95,137,111,177,69,178,124,49,192,210,7,152, + 42,25,120,160,238,101,67,234,250,51,210,42,224,128,205,56,6,54,96,130,255,63,194,146,36,64,0,177,224,40,93,88,161,85,17,15,19,11,11,119, + 153,186,116,156,47,223,171,100,153,24,25,70,54,49,96,188,124,3,54,19,254,1,91,165,127,128,152,137,25,146,153,255,1,171,143,47,207,128,9,197, + 6,168,147,3,210,149,38,182,199,254,15,168,159,157,139,225,63,211,79,6,70,94,25,6,6,245,2,134,255,139,150,50,252,91,213,3,52,255,55,164, + 156,88,197,205,192,20,211,194,192,232,63,143,129,225,88,38,3,187,200,11,6,133,20,5,150,132,149,79,50,31,255,19,123,62,255,246,243,237,12,152, + 243,80,52,27,17,238,237,205,97,208,212,148,103,248,253,251,15,120,46,102,164,0,128,0,98,193,147,88,64,185,150,35,68,73,194,201,159,227,117,146, + 84,144,4,19,187,172,0,48,81,0,235,237,63,192,174,176,152,46,176,202,240,4,170,146,135,36,150,251,235,192,189,28,70,147,16,6,70,73,29,134, + 255,207,207,1,147,27,23,180,125,67,160,31,246,239,47,3,35,23,23,48,177,0,19,163,92,37,195,255,249,115,24,254,173,104,103,96,16,226,2,13, + 9,66,27,192,191,25,254,77,47,100,96,124,255,26,216,64,238,101,96,56,152,192,192,2,116,142,180,175,4,123,214,179,39,37,143,165,4,222,237,121, + 246,225,40,3,98,46,138,198,137,102,100,78,107,1,4,16,19,150,4,3,42,210,185,64,197,187,190,140,152,122,150,48,115,150,140,13,23,15,151,134, + 16,48,177,0,115,251,79,96,91,69,209,157,129,65,165,137,225,223,241,79,12,255,102,0,75,130,13,192,106,72,22,216,203,49,169,6,182,107,142,48, + 48,166,86,2,195,147,25,220,59,34,10,0,115,41,131,28,176,237,34,105,204,240,127,239,65,134,127,203,58,161,237,31,102,72,149,5,194,172,192,116, + 44,192,201,240,127,69,27,195,255,237,251,25,24,76,27,129,13,230,79,12,108,178,188,12,138,86,92,162,133,82,156,105,124,156,236,18,48,183,35,85, + 77,84,175,150,216,217,89,25,20,20,196,193,165,203,72,3,0,1,196,132,165,116,97,7,7,58,19,19,79,12,247,255,64,21,217,207,42,2,118,192, + 106,226,43,48,211,254,124,207,192,32,101,196,240,95,36,150,225,95,77,18,195,255,137,192,170,99,239,60,134,255,11,107,25,254,101,185,48,252,191,5, + 212,42,99,207,192,104,164,206,192,232,16,6,140,208,239,68,68,215,127,112,19,149,81,223,158,129,225,253,51,134,127,139,90,129,46,248,15,25,199,65, + 46,24,64,137,6,212,195,18,224,96,248,55,179,24,216,77,7,230,112,195,92,160,29,239,24,248,109,36,25,84,133,191,153,186,138,240,152,193,186,255, + 12,136,249,45,170,183,101,108,109,117,25,156,157,45,192,203,9,70,26,0,8,32,38,36,26,185,161,203,105,38,204,167,225,40,198,226,33,236,34,6, + 108,187,2,165,126,3,219,43,124,192,12,172,10,76,36,125,13,12,255,175,3,123,45,226,192,42,132,31,216,184,21,229,97,248,255,229,33,195,191,150, + 56,134,127,135,111,49,48,240,170,50,48,70,151,48,48,8,11,3,245,253,196,223,232,5,149,66,108,192,210,68,207,142,225,223,166,89,12,12,207,129, + 13,102,78,104,207,10,75,218,2,39,36,150,191,12,255,250,243,129,250,156,24,24,68,12,25,88,184,255,50,136,90,8,49,68,11,50,70,137,241,241, + 136,34,37,26,86,90,148,50,30,30,230,12,191,126,125,3,175,51,25,105,0,32,128,152,144,122,70,136,210,5,72,251,10,176,122,41,104,51,8,115, + 40,10,66,70,94,65,3,114,250,69,12,255,246,159,102,248,127,122,11,48,162,184,161,173,131,255,16,154,7,216,13,230,252,203,240,191,63,135,225,255, + 242,201,12,140,42,250,192,68,3,172,162,190,253,6,183,81,112,130,31,63,24,24,21,13,129,145,207,198,240,127,7,176,65,203,197,70,184,87,5,74, + 80,175,238,51,252,219,186,26,152,128,129,189,167,47,63,24,4,204,69,25,76,181,152,116,2,196,184,29,145,134,3,216,105,81,202,128,26,185,255,255, + 143,204,30,59,64,0,161,207,19,129,90,152,172,186,194,124,170,206,18,140,118,124,230,66,144,17,141,31,159,128,173,75,75,96,196,235,48,48,44,239, + 2,150,32,160,72,69,235,145,131,186,213,172,64,113,54,70,134,127,211,202,24,254,111,158,201,192,20,146,207,192,104,237,205,192,240,249,27,246,68,0, + 18,2,117,165,173,128,141,231,179,187,24,24,94,60,134,152,65,40,50,64,242,92,64,251,79,108,6,38,5,57,160,171,129,133,10,11,35,131,152,147, + 8,147,63,239,55,15,17,14,86,113,104,98,225,128,102,4,170,37,24,97,97,190,17,89,178,192,0,64,0,33,15,255,195,74,24,78,123,94,54,11, + 69,69,22,73,86,41,96,149,3,90,170,199,2,84,162,153,1,108,220,46,102,248,255,234,17,48,26,216,113,84,25,255,33,114,192,200,252,55,173,156, + 225,255,165,195,12,76,249,83,24,24,37,20,128,37,205,87,204,68,3,170,142,4,128,85,158,186,62,195,255,125,171,33,19,148,196,2,96,194,250,255, + 226,26,195,255,71,192,68,198,13,44,5,191,253,98,96,1,186,87,85,146,89,83,157,141,73,141,1,177,244,130,21,234,63,138,99,89,80,144,135,97, + 193,130,10,6,62,62,174,17,91,194,0,4,16,19,218,168,46,7,31,7,7,176,217,194,102,206,165,12,12,103,102,160,240,175,143,224,17,215,255,31, + 248,24,254,111,155,14,108,199,176,224,47,1,64,221,104,208,56,204,143,143,12,255,38,229,0,35,83,0,216,107,106,3,38,142,255,144,82,8,150,176, + 64,209,247,21,88,29,153,186,2,35,251,35,195,255,59,231,129,250,56,137,119,57,168,132,251,7,44,158,126,124,129,118,205,255,49,48,177,50,51,240, + 136,179,178,121,72,241,25,1,5,57,145,74,24,170,12,228,153,152,168,51,168,171,203,128,215,226,142,84,0,16,64,76,72,237,23,240,210,5,101,110, + 118,25,57,222,255,42,236,114,188,144,238,46,104,88,94,41,138,225,255,198,249,192,46,243,107,160,10,14,194,163,26,160,68,195,3,44,157,110,93,1, + 246,164,114,129,61,166,96,6,70,39,96,91,227,227,87,200,186,23,208,92,18,168,199,195,196,204,192,104,235,203,240,255,216,14,200,200,9,177,211,190, + 224,169,8,96,15,69,72,5,216,107,3,54,196,191,189,134,183,109,5,244,5,24,116,4,88,13,57,217,217,249,145,74,25,88,9,67,81,130,81,86, + 150,2,207,31,49,50,142,220,42,9,32,128,152,208,186,211,108,214,50,162,26,130,252,127,248,89,69,56,33,75,16,68,13,128,61,32,96,233,114,112, + 5,48,17,176,146,22,230,252,92,12,255,118,47,97,248,183,115,49,3,83,124,21,3,179,148,28,3,179,0,176,113,44,46,193,240,143,23,72,91,184, + 49,48,74,43,50,48,221,60,2,44,137,136,72,136,32,187,65,137,234,55,176,154,252,242,159,129,209,47,3,216,131,123,0,100,191,1,138,131,74,195, + 63,12,156,138,252,12,138,66,127,228,204,101,196,229,25,80,151,143,82,212,91,146,145,17,101,72,76,244,24,145,93,105,100,0,16,64,24,171,232,228, + 153,254,40,242,74,178,48,48,129,86,203,253,249,13,78,48,12,55,46,51,48,188,121,6,84,193,206,64,210,228,9,176,4,249,207,193,198,240,111,58, + 176,11,252,249,37,195,67,159,28,134,162,83,239,24,12,215,61,98,16,93,246,152,65,115,213,117,134,234,186,122,134,39,160,201,104,113,113,134,255,184, + 74,24,80,35,19,132,65,83,17,239,128,13,240,111,76,12,76,105,61,12,76,46,192,154,231,194,36,160,102,46,72,159,27,52,29,193,193,204,32,40, + 194,204,41,201,193,42,5,205,8,172,212,232,94,255,253,251,15,88,186,252,26,209,165,11,8,0,4,16,11,82,131,151,149,133,141,157,75,136,233,143, + 40,155,40,43,98,132,21,216,3,249,127,249,20,98,86,154,148,4,3,82,11,76,100,44,108,204,12,87,167,214,50,68,157,254,201,112,233,198,55,184, + 244,199,123,15,24,218,128,120,181,0,59,195,2,55,25,6,43,126,126,134,63,239,63,0,173,129,218,13,234,142,131,150,117,254,6,141,48,3,53,136, + 74,48,48,26,88,50,48,121,69,3,171,73,96,252,31,205,132,148,54,156,66,208,210,9,226,54,14,118,70,22,177,255,191,164,144,252,198,204,128,186, + 71,138,164,22,171,142,142,34,3,43,176,125,244,23,228,22,6,150,17,157,96,0,2,136,5,169,132,97,21,226,229,225,230,103,102,228,7,151,46,255, + 161,93,101,240,114,107,38,72,247,26,148,203,97,99,47,132,27,26,160,21,186,12,255,129,237,149,247,252,98,12,89,155,47,48,92,122,250,21,171,202, + 219,31,126,50,228,28,124,206,176,219,67,156,129,239,215,15,240,216,13,35,43,208,78,80,181,197,39,204,192,32,167,206,192,104,236,196,192,232,24,201, + 192,40,10,76,7,223,143,3,75,61,96,21,41,1,44,253,64,203,97,222,223,3,186,9,180,206,134,7,156,168,57,68,216,24,164,25,255,74,48,113, + 112,112,254,251,241,227,51,165,85,18,104,115,217,203,151,239,193,139,165,70,58,0,8,32,22,164,110,53,51,31,7,59,23,31,203,31,94,54,208,36, + 32,168,87,3,154,203,121,115,137,129,209,45,144,225,255,110,96,163,247,45,48,114,184,217,32,189,39,144,28,56,248,255,65,26,185,176,68,4,79,76, + 255,193,187,2,152,57,217,25,118,63,254,204,112,8,71,98,129,129,243,47,191,49,172,122,202,202,144,105,23,196,240,91,92,133,129,73,89,139,129,145, + 31,152,88,152,217,24,24,5,128,165,220,47,96,17,115,249,24,144,254,4,196,192,4,245,93,153,225,191,128,41,3,147,148,40,3,131,42,80,238,218, + 20,6,134,15,192,46,54,151,16,48,229,51,51,40,113,51,72,137,11,240,241,62,127,241,227,45,3,98,67,29,89,9,6,212,43,2,85,73,163,128, + 129,1,32,128,88,144,138,106,230,255,255,255,51,179,241,48,49,177,10,177,65,218,3,108,192,132,243,112,47,3,163,149,43,3,83,235,6,134,255,75, + 187,25,254,63,185,2,236,14,191,7,134,226,23,200,178,4,80,187,131,157,5,210,155,98,99,101,96,100,231,102,248,15,234,93,49,178,51,252,231,6, + 150,16,242,10,12,219,182,93,33,202,49,135,88,101,25,50,67,114,129,118,0,27,178,15,174,49,252,59,119,128,129,225,245,19,6,198,223,63,25,254, + 127,7,54,54,191,1,219,47,44,144,46,249,127,112,175,138,133,225,47,176,219,206,96,31,201,192,20,94,199,192,120,165,14,232,238,207,12,140,192,42, + 144,129,249,31,200,15,172,12,168,59,49,241,86,73,220,192,134,247,215,175,63,70,83,5,30,0,16,64,200,221,77,38,54,38,70,86,102,22,96,75, + 149,25,22,166,76,144,241,142,147,192,200,208,78,102,96,108,234,100,248,255,238,51,164,1,252,230,45,164,20,226,3,182,31,68,36,64,43,182,193,51, + 202,140,192,72,252,15,140,216,255,64,189,140,28,60,12,255,217,217,25,62,95,200,99,96,56,123,159,160,99,222,92,63,203,240,191,55,158,225,207,157, + 251,12,140,224,113,21,144,11,129,13,103,112,239,8,24,231,124,156,136,248,6,181,167,64,37,27,104,156,104,213,100,134,255,34,114,12,140,150,1,192, + 174,252,44,96,161,196,194,240,129,225,247,215,47,191,126,255,37,118,12,70,65,65,130,97,225,194,10,6,103,231,226,209,170,7,15,0,8,32,22,164, + 65,250,255,34,172,76,188,220,191,127,112,253,7,70,6,35,100,52,12,148,140,32,244,153,118,96,162,152,196,192,168,234,207,192,96,148,10,140,6,121, + 134,255,79,239,50,48,220,187,8,44,13,174,67,22,119,63,186,206,240,255,213,83,134,255,63,190,3,75,128,191,12,127,64,123,144,120,217,24,100,158, + 61,33,202,49,226,156,140,12,191,129,250,254,113,115,65,218,75,56,219,166,140,136,222,19,104,92,136,27,216,40,126,114,13,200,118,3,175,31,254,7, + 76,200,140,191,126,48,51,254,253,131,126,24,0,214,177,24,49,49,1,134,141,27,155,25,68,69,5,71,19,11,1,0,16,64,40,11,168,190,254,103, + 252,245,243,15,243,223,127,191,129,109,15,14,88,33,3,12,223,31,239,33,221,107,45,96,175,228,45,7,195,255,233,211,25,254,159,223,193,240,255,205, + 99,200,158,34,216,234,58,164,188,12,42,21,64,109,230,63,124,252,12,142,226,124,12,147,136,232,97,57,203,242,50,252,248,14,108,159,0,75,142,255, + 196,110,221,128,141,30,203,169,50,64,214,73,252,101,248,245,238,47,168,243,244,255,47,68,14,57,145,96,36,22,121,121,113,134,29,59,186,24,20,21, + 37,192,167,39,140,2,252,0,32,128,144,19,12,211,227,247,31,63,189,20,227,126,255,231,253,47,65,102,65,96,241,15,202,160,160,53,48,226,38,12, + 12,6,221,12,255,22,207,102,248,191,121,26,176,13,243,22,50,249,7,154,40,4,173,170,99,68,138,15,120,227,23,50,226,251,27,152,248,76,133,89, + 25,34,53,133,24,150,95,123,139,211,33,118,146,156,12,14,18,236,12,63,222,190,102,224,98,36,161,117,10,181,143,81,76,22,152,176,95,128,221,242, + 231,235,31,96,149,196,242,229,199,239,63,255,208,218,44,40,41,86,86,86,140,97,215,174,110,6,53,53,25,134,215,175,63,142,232,73,69,98,1,64, + 0,177,32,5,228,255,215,31,191,124,127,243,139,227,227,95,208,110,0,112,23,26,88,212,179,113,51,48,232,86,51,252,155,221,195,240,127,229,36,6, + 6,33,96,195,66,152,23,181,123,13,143,134,255,104,227,109,192,138,13,88,197,176,124,249,194,80,162,193,195,240,230,63,15,195,238,123,47,129,137,16, + 181,97,105,98,106,198,208,98,38,196,192,113,247,16,176,128,98,34,45,226,254,2,75,36,94,81,6,70,69,13,96,47,233,8,3,168,225,243,231,235, + 23,134,215,63,255,124,248,251,235,215,31,44,245,26,152,47,41,41,196,176,115,103,55,131,146,146,52,195,167,79,95,25,24,71,211,10,81,0,32,128, + 152,24,16,107,94,65,253,227,191,47,152,121,94,254,249,249,31,210,251,1,173,129,145,182,6,246,90,62,48,252,223,58,25,88,217,115,65,218,12,200, + 221,104,60,173,12,80,188,179,2,99,226,223,251,55,12,194,192,58,102,202,148,73,12,253,254,38,12,94,242,220,12,150,210,60,12,110,10,124,12,157, + 230,194,12,11,188,213,25,228,99,75,129,213,144,0,3,235,159,159,144,132,70,172,15,126,0,19,181,146,62,48,17,179,51,48,188,187,10,238,157,125, + 123,247,155,225,29,3,203,103,6,212,61,74,240,181,189,114,114,226,12,123,247,246,49,104,106,202,50,124,251,246,125,196,143,222,146,2,0,2,176,114, + 245,42,17,196,64,120,50,73,60,214,221,205,33,200,117,250,26,130,149,173,141,118,190,193,21,247,22,182,231,139,248,8,87,249,28,214,119,219,184,90, + 136,39,194,178,183,201,248,101,179,224,54,130,11,22,97,32,132,252,205,144,249,230,99,38,241,133,241,163,22,170,214,214,95,187,15,114,61,219,138,174, + 226,28,192,118,155,74,96,99,154,67,248,27,73,26,117,192,210,7,57,52,107,60,201,213,29,249,247,87,186,221,63,211,245,197,41,125,122,166,66,11, + 205,96,32,135,167,71,226,124,78,217,242,158,204,195,10,6,211,66,239,246,119,208,43,244,195,60,99,139,234,242,6,110,18,161,123,243,70,190,203,105, + 255,210,180,213,65,215,35,131,241,24,234,181,214,178,88,156,200,102,179,134,27,58,27,94,22,53,120,54,153,92,50,18,134,187,96,214,170,40,50,118, + 46,83,198,88,213,117,29,130,188,132,173,172,61,146,200,92,91,107,4,238,57,164,165,228,95,178,35,18,44,4,200,199,180,81,26,163,85,89,230,218, + 185,99,28,139,99,25,140,74,227,20,214,183,18,153,106,31,63,88,97,14,144,146,184,165,105,27,249,22,64,44,12,136,131,122,192,248,232,227,103,15, + 159,242,51,127,21,121,253,157,155,149,157,9,178,157,4,212,86,97,98,32,121,161,60,35,176,136,97,254,254,157,129,77,70,133,129,211,59,138,225,223, + 220,42,134,239,160,29,40,172,140,12,2,108,144,54,14,51,11,43,3,187,172,36,3,211,190,5,12,12,170,189,12,172,197,64,188,8,216,141,23,230, + 135,110,97,193,2,128,61,153,191,159,190,48,48,124,255,6,158,46,96,176,112,98,96,120,212,5,172,62,153,25,126,60,252,194,240,244,11,199,235,43, + 239,62,191,128,249,13,88,162,48,197,197,185,114,185,185,153,50,105,107,43,114,8,9,9,1,195,23,114,180,23,35,120,30,130,233,63,43,235,119,80, + 59,6,182,185,31,47,0,245,164,128,181,29,19,63,63,55,208,44,62,150,23,47,222,242,156,63,127,71,233,235,215,31,18,63,127,254,18,252,249,243, + 183,0,208,2,112,243,159,153,153,233,15,59,59,235,91,14,14,246,247,124,124,220,207,140,141,85,239,139,136,240,255,4,170,253,249,237,219,143,159,160, + 200,38,167,128,3,37,2,144,59,128,102,51,11,8,112,115,112,114,114,49,61,123,246,88,232,226,197,59,234,223,190,253,20,253,241,227,151,40,80,30, + 214,117,1,29,89,246,137,147,147,253,13,55,55,251,43,11,11,237,155,192,140,243,21,216,59,252,243,253,251,207,31,255,192,41,159,56,71,0,4,16, + 114,130,1,159,130,240,224,231,239,215,247,190,242,61,82,191,245,94,147,213,68,144,129,225,205,101,96,163,215,154,129,129,147,7,50,183,131,43,18,113, + 213,121,95,254,48,176,199,37,51,236,60,113,146,225,192,166,195,12,44,156,28,64,11,191,65,124,1,244,52,51,180,41,164,199,203,197,16,180,162,139, + 129,181,110,41,195,57,183,92,134,117,179,39,49,176,114,112,161,164,127,240,142,123,160,223,100,121,89,25,162,164,248,24,184,223,1,27,228,118,1,12, + 140,124,192,68,253,234,12,176,11,207,195,240,237,238,99,134,91,63,152,30,188,248,244,245,19,200,95,192,92,247,215,203,203,156,239,217,179,183,145,19, + 38,172,149,102,103,103,249,13,140,76,70,164,128,255,15,12,52,246,152,24,151,35,42,42,50,43,112,37,24,72,9,244,31,116,30,29,179,181,181,54, + 251,207,159,63,133,118,236,56,173,177,111,223,57,247,107,215,30,152,0,19,140,44,48,199,10,1,149,242,162,117,38,96,59,49,223,3,19,205,59,51, + 51,141,251,250,250,74,7,34,34,156,118,169,168,72,61,83,82,146,122,255,242,229,251,63,164,148,57,80,149,76,202,202,82,108,194,194,252,194,91,182, + 28,215,171,173,157,239,125,229,202,3,147,203,151,239,129,230,208,132,25,32,107,129,144,251,154,160,56,254,4,244,239,123,43,43,173,39,42,42,210,71, + 226,227,61,182,233,233,41,221,253,253,251,207,59,160,245,191,129,238,255,15,74,59,248,18,48,64,0,193,18,12,252,132,167,47,255,24,62,159,252,203, + 115,199,249,213,87,77,96,140,1,219,5,55,24,24,149,128,246,170,152,49,48,220,216,199,192,192,205,67,92,41,6,178,21,88,186,48,73,43,51,48, + 57,6,50,236,204,201,100,152,114,21,20,135,159,176,42,143,209,18,98,8,22,5,182,153,166,150,49,156,85,242,98,104,187,8,106,130,124,198,170,214, + 66,146,155,33,72,82,152,129,135,95,136,225,191,127,10,3,195,227,141,96,231,255,251,246,143,225,253,195,191,127,119,188,248,118,9,216,221,6,181,172, + 127,113,115,115,252,5,118,157,57,167,77,219,232,245,248,241,43,19,92,206,85,86,150,6,150,68,18,171,176,141,4,131,138,114,96,143,138,81,94,94, + 130,19,88,245,240,239,218,117,198,177,167,103,101,200,237,219,79,220,128,129,204,77,112,82,13,50,1,42,246,227,199,79,177,67,135,46,106,0,177,231, + 188,121,219,243,156,156,12,87,149,150,70,172,85,87,151,185,46,37,37,242,25,88,50,252,198,55,14,4,58,4,17,88,162,129,26,236,108,170,170,210, + 252,23,46,220,53,8,9,105,204,184,114,229,190,59,48,210,9,185,3,148,55,5,129,9,67,240,232,209,171,74,64,108,183,114,229,129,116,59,59,189, + 77,85,85,49,11,61,61,205,175,8,11,243,125,126,247,238,211,175,127,120,154,29,0,1,196,194,128,122,28,216,47,96,15,230,231,209,87,111,111,62, + 187,205,224,36,252,237,55,55,195,127,208,2,240,135,12,76,206,17,12,255,46,2,19,12,215,127,226,166,100,64,99,32,192,210,229,95,114,22,100,228, + 247,206,5,252,161,10,234,130,243,240,48,48,190,188,201,240,247,238,107,252,165,22,208,236,63,159,191,50,252,11,44,100,96,18,3,58,251,208,6,96, + 190,22,98,248,117,245,3,195,229,167,127,31,28,255,252,235,46,212,95,191,128,57,234,47,40,194,89,88,152,240,142,200,1,171,8,166,23,47,222,193, + 166,18,224,39,64,128,78,198,116,118,54,102,1,150,64,60,192,8,82,203,204,236,207,62,120,240,98,24,52,7,147,13,128,246,73,111,222,124,188,16, + 152,248,130,83,82,188,167,53,55,39,46,251,240,225,203,251,53,107,14,126,193,217,33,252,251,143,177,169,41,129,83,92,92,80,180,172,108,86,210,210, + 165,123,178,128,98,34,228,186,1,88,109,9,3,237,79,220,189,251,172,87,118,118,192,132,210,210,176,149,95,190,252,120,109,98,162,254,245,232,209,43, + 88,83,13,64,0,49,33,85,71,160,5,4,160,92,249,247,228,203,183,247,118,62,101,187,244,241,216,43,96,2,1,134,203,221,181,12,140,118,142,12, + 140,114,234,64,85,223,25,8,86,186,160,30,214,7,96,105,97,228,192,240,223,39,137,225,231,190,149,12,127,191,227,159,124,4,21,115,191,254,252,99, + 248,201,193,206,240,251,35,254,4,243,15,216,45,255,107,21,206,240,207,59,140,225,223,217,22,96,218,4,205,27,49,50,188,61,245,158,97,221,139,95, + 167,63,252,248,245,158,1,114,66,213,15,96,23,29,124,10,231,255,255,12,120,135,2,129,213,18,211,219,183,159,80,86,230,129,246,78,183,183,167,176, + 2,171,15,209,222,222,213,1,126,126,213,75,129,137,37,142,210,196,130,12,128,237,29,185,169,83,55,180,5,7,55,244,190,122,245,65,53,40,200,142, + 223,211,211,12,35,128,99,99,221,152,252,253,173,248,126,252,248,173,25,30,222,212,182,104,209,174,90,74,18,11,90,117,43,62,101,202,250,182,240,240, + 230,150,47,95,190,171,206,157,91,202,99,110,174,137,53,146,1,2,136,9,169,74,250,5,77,48,63,128,38,252,88,251,238,207,241,123,71,62,253,252, + 5,58,76,227,243,45,200,146,2,183,84,32,251,31,254,2,6,212,151,254,10,76,28,98,138,12,140,37,253,12,255,128,9,229,207,165,195,12,255,64, + 59,23,241,37,130,255,144,142,24,232,72,152,63,172,248,247,42,255,151,80,5,38,150,40,134,255,215,187,24,254,191,189,201,192,200,207,199,240,237,202, + 91,134,51,55,254,62,217,243,254,215,101,168,127,64,13,216,159,192,18,230,15,49,221,102,96,196,49,127,253,250,29,190,12,2,52,17,217,221,157,193, + 22,22,230,32,90,87,55,47,164,182,118,222,212,55,111,62,170,208,106,120,99,255,254,243,161,65,65,117,83,174,94,125,96,208,209,145,202,239,232,104, + 0,119,180,156,156,24,67,122,186,15,231,147,39,111,212,146,146,58,187,143,29,187,26,197,64,253,29,157,140,39,78,92,139,138,137,105,237,2,150,116, + 74,157,157,233,60,160,1,77,116,0,16,64,176,18,230,15,82,41,3,62,63,238,196,139,183,15,246,190,103,63,247,229,40,168,148,1,182,91,46,207, + 96,96,114,7,150,50,198,46,192,102,200,103,236,165,12,51,19,100,119,192,95,30,6,166,220,54,6,70,41,96,151,239,202,49,134,127,111,159,50,252, + 99,97,37,88,194,128,11,138,255,12,132,87,228,115,179,51,252,187,61,153,225,255,211,195,12,140,188,194,12,127,191,253,97,120,190,231,37,195,214,55, + 127,78,190,250,254,243,45,3,226,56,179,159,192,46,228,111,96,79,5,100,36,35,254,46,242,63,70,96,162,129,171,41,44,12,97,13,15,119,20,236, + 233,89,21,0,108,44,55,49,64,246,107,209,20,0,27,230,86,101,101,51,171,128,93,98,185,204,76,63,46,72,162,96,100,0,86,23,236,192,106,72, + 172,180,116,102,222,173,91,79,28,105,233,134,219,183,159,186,148,151,207,202,149,146,18,18,139,143,119,103,67,151,7,8,32,88,9,243,27,41,144,65, + 75,226,128,13,132,191,95,150,190,248,122,242,238,177,143,95,127,222,3,10,255,1,150,242,143,231,48,48,149,79,102,96,20,146,7,170,248,12,169,122, + 96,9,7,52,171,253,13,168,245,47,59,80,205,108,6,70,96,94,252,255,244,28,195,255,27,151,24,254,253,254,78,176,119,5,63,181,249,63,225,54, + 245,255,207,15,129,248,9,195,127,118,96,167,4,216,245,127,187,227,17,195,233,231,92,119,86,191,253,121,22,154,232,191,66,241,119,96,149,244,27,216, + 83,250,71,168,144,1,245,156,128,13,78,112,117,4,236,246,50,6,4,88,115,3,123,65,86,253,253,107,90,128,98,2,36,134,251,95,164,118,33,73, + 3,29,55,111,62,118,171,171,155,159,47,35,35,198,165,169,41,199,0,116,7,11,176,65,42,92,85,53,39,227,216,177,43,49,68,118,185,63,243,241, + 113,221,7,246,132,206,233,232,40,156,86,83,147,61,11,236,210,223,7,138,127,34,70,63,176,218,77,156,52,105,125,88,96,160,173,128,139,139,49,74, + 196,1,4,16,11,3,226,244,109,88,162,129,5,54,247,133,15,223,238,207,121,43,180,167,98,215,75,127,197,116,96,10,120,178,155,129,65,200,128,129, + 177,114,33,195,255,154,64,96,71,17,152,136,56,160,171,240,64,163,195,194,82,12,76,133,115,24,24,117,128,61,203,131,233,12,12,198,157,12,255,30, + 109,99,160,194,130,125,180,100,206,2,94,199,203,196,251,157,225,243,185,103,12,119,47,252,251,60,237,19,235,174,15,223,64,179,164,224,4,255,5,169, + 132,1,214,134,44,127,9,57,0,188,34,244,31,164,187,29,17,225,200,6,108,252,169,2,171,161,74,96,34,18,36,198,73,28,28,108,239,36,37,133, + 47,1,139,241,187,192,200,122,7,140,156,31,80,59,57,128,109,35,145,107,215,30,106,189,126,253,65,7,104,30,222,146,10,216,19,59,174,171,171,116, + 6,88,53,113,128,70,223,92,92,140,216,129,93,101,227,213,171,15,198,17,114,3,176,26,125,14,236,38,239,5,118,183,175,1,253,253,18,88,178,62, + 7,250,11,212,240,103,249,245,235,55,232,160,2,41,96,207,206,224,194,133,59,174,191,126,253,193,231,47,166,25,51,54,229,0,123,80,103,188,189,45, + 142,31,56,112,225,43,208,221,224,132,15,16,64,44,72,153,27,86,37,193,2,156,11,24,130,156,179,30,190,63,36,197,194,43,156,185,230,129,141,168, + 159,12,3,227,149,73,12,140,166,77,12,76,253,123,25,254,45,239,96,96,184,127,9,60,127,195,168,227,192,192,20,2,108,227,176,1,219,59,7,74, + 32,37,15,171,8,3,227,199,15,144,118,13,85,107,92,96,11,150,139,153,225,235,189,79,12,143,182,188,253,219,251,154,123,235,225,7,207,111,64,19, + 201,23,104,130,7,31,209,10,26,253,100,103,103,35,234,200,15,208,212,19,63,63,55,147,141,141,46,47,176,7,226,3,236,134,155,18,28,200,98,97, + 254,102,100,164,186,222,192,64,121,255,207,159,127,94,191,126,253,241,221,139,23,239,129,221,227,63,255,65,109,39,144,253,252,252,60,28,126,126,150,66, + 192,110,177,204,225,195,151,131,129,145,102,141,54,86,3,90,98,113,3,24,65,43,140,140,212,246,191,123,247,249,30,176,219,254,17,88,42,176,25,27, + 171,75,166,164,116,103,0,149,72,224,11,16,96,73,178,19,232,238,213,31,62,124,125,112,243,230,147,79,111,222,124,248,3,108,68,255,1,118,213,255, + 179,179,179,50,1,187,204,47,164,164,132,175,1,75,157,51,134,134,170,123,129,189,163,248,251,247,159,91,225,25,156,148,154,54,109,67,100,79,79,230, + 13,13,13,185,159,192,174,59,120,124,10,32,128,144,19,204,31,164,54,204,23,6,216,217,118,255,255,178,78,125,241,115,191,210,49,86,9,79,230,167, + 42,34,33,114,12,12,39,170,129,85,78,56,3,115,126,5,80,7,27,195,127,208,80,254,47,96,124,61,233,101,96,120,113,26,178,124,147,133,3,58, + 194,68,214,186,107,252,69,46,43,51,195,175,23,192,196,178,254,229,223,233,175,185,247,172,189,247,252,12,208,252,159,208,129,155,79,72,37,204,47,96, + 149,196,12,236,82,19,156,252,2,201,130,46,149,0,70,62,7,48,146,229,129,57,58,156,144,59,184,184,56,158,250,250,90,206,228,229,229,58,117,228, + 200,149,119,192,4,246,253,243,103,208,86,209,255,200,7,51,130,70,123,89,128,165,206,91,77,77,249,151,94,94,230,247,110,221,146,186,176,103,207,185, + 248,223,191,255,8,0,205,120,98,105,169,181,93,67,67,118,23,176,36,122,56,111,222,246,55,247,238,61,255,14,108,83,253,171,173,141,229,62,117,234, + 186,62,176,116,114,193,231,14,99,99,181,117,192,196,54,23,216,24,126,7,44,61,62,2,219,98,63,25,144,142,109,3,118,159,25,159,62,125,195,4, + 196,172,151,46,221,251,108,97,161,245,209,199,199,242,221,182,109,199,255,220,189,251,220,14,151,185,199,143,95,243,62,123,246,246,202,132,4,143,119,37, + 37,211,193,9,6,32,128,88,144,219,156,72,213,210,55,104,224,131,119,14,190,254,242,253,85,195,115,150,245,252,71,24,163,237,120,158,73,241,187,73, + 51,48,222,91,14,44,93,54,130,215,208,50,254,1,186,239,251,59,72,87,7,116,2,38,168,189,242,247,43,164,221,3,58,151,8,52,105,204,200,76, + 76,229,11,77,91,248,231,32,254,127,251,197,240,114,223,199,255,171,95,242,28,154,115,239,209,97,96,108,127,135,38,148,143,80,119,127,131,38,254,223, + 192,4,3,140,48,230,127,132,183,107,255,3,117,163,153,92,93,77,184,54,109,58,234,9,236,41,168,19,40,254,95,132,134,58,244,3,75,145,83,27, + 54,28,126,247,230,205,167,175,12,136,51,131,255,34,53,205,152,128,221,95,230,247,239,191,48,3,35,244,43,48,81,125,118,116,52,90,229,231,103,245, + 30,200,86,54,51,211,216,11,76,40,119,119,239,62,251,17,152,80,62,3,115,54,200,237,191,129,9,236,191,137,137,58,251,228,201,235,125,128,237,43, + 54,92,238,0,150,26,231,29,29,13,23,238,218,117,250,41,48,49,128,252,255,19,152,224,65,13,125,80,239,240,31,82,27,13,228,14,22,96,98,98, + 61,116,232,210,143,239,223,127,254,246,247,183,158,184,100,201,94,145,87,175,222,107,225,232,57,138,29,63,126,213,43,40,200,230,12,208,158,31,192,70, + 249,95,128,0,98,65,107,168,193,186,215,95,25,144,182,159,128,216,247,222,127,126,82,207,196,179,182,113,199,199,16,139,79,191,37,69,131,129,221,102, + 208,84,193,151,183,144,6,47,11,15,106,19,22,52,177,245,230,16,3,163,71,40,3,195,66,96,169,243,253,51,161,153,60,160,11,191,129,71,135,25, + 254,225,223,50,251,237,227,255,255,235,190,243,157,92,240,232,209,209,191,191,127,127,129,38,150,15,208,4,3,47,93,32,254,97,100,33,102,242,27,52, + 184,7,44,41,88,129,129,204,117,250,244,77,15,2,202,127,3,75,138,121,156,156,236,199,86,175,222,255,6,152,88,190,48,32,78,38,255,139,101,214, + 13,190,127,253,241,227,215,63,215,175,63,252,13,88,170,108,84,84,148,100,219,191,255,194,183,59,119,158,126,7,70,206,15,104,34,7,31,143,15,172, + 94,88,129,137,76,242,234,213,251,166,120,242,215,79,79,79,179,37,188,188,156,239,128,213,204,111,103,103,35,70,9,9,33,38,65,65,94,102,160,24, + 176,93,197,14,95,127,242,237,219,15,166,79,159,190,3,19,238,103,230,23,47,222,49,126,252,248,245,151,136,136,192,43,15,15,211,133,139,22,237,106, + 129,198,51,6,216,189,251,140,129,143,143,133,44,176,84,250,178,110,221,225,127,0,1,196,130,165,117,255,139,1,117,131,62,108,161,56,243,133,183,95, + 238,22,255,231,91,94,127,228,71,160,235,183,219,138,34,129,10,12,204,66,60,144,147,169,64,9,4,214,21,1,31,254,3,140,244,123,91,25,24,77, + 108,24,152,51,39,51,48,148,23,227,28,234,135,116,201,217,129,213,156,53,3,163,154,41,3,227,205,103,12,12,199,38,226,84,250,244,55,195,251,99, + 239,63,95,255,247,231,207,103,104,34,121,15,77,48,159,160,137,253,7,172,135,2,46,180,192,19,140,132,18,204,127,6,33,33,94,96,145,125,95,27, + 216,117,149,195,167,22,212,14,80,80,144,216,183,106,213,129,183,192,196,242,9,106,31,52,129,98,189,166,135,9,169,215,244,251,243,231,111,191,128,37, + 202,87,80,163,246,31,100,90,251,47,122,130,3,54,124,57,158,63,127,171,241,252,249,59,113,92,238,16,16,224,189,5,108,167,112,1,221,96,199,205, + 205,249,11,148,8,128,213,207,223,39,79,94,255,3,173,41,2,54,124,255,35,15,27,128,252,8,44,193,152,128,13,96,102,96,2,101,3,102,12,214, + 175,95,127,112,1,19,215,195,207,159,191,99,29,99,2,86,99,90,192,182,157,44,48,108,110,131,220,7,16,64,44,88,122,182,176,82,230,27,82,3, + 4,182,54,150,225,206,187,79,143,170,255,114,175,126,203,204,225,238,249,242,150,142,180,135,36,51,151,46,176,90,2,237,11,250,254,23,177,209,158,17, + 186,88,255,76,35,3,131,86,30,3,163,62,176,157,119,238,1,238,102,185,186,33,3,99,72,8,80,27,176,196,186,126,19,127,246,254,243,247,55,176, + 246,248,14,44,118,65,137,229,29,20,127,64,43,93,254,146,210,120,2,86,73,160,198,49,243,151,47,223,228,129,69,183,40,62,165,192,134,233,150,135, + 15,95,190,1,226,143,176,222,24,3,254,147,200,97,43,255,224,99,94,160,29,26,72,227,77,200,55,180,128,79,52,6,70,16,168,20,0,37,92,156, + 163,185,192,106,83,123,243,230,227,205,148,246,32,8,100,40,145,39,79,94,137,75,75,139,176,3,171,246,31,0,1,196,130,99,56,228,55,3,234,197, + 89,76,200,51,159,143,62,126,125,94,246,245,251,250,67,111,121,111,199,188,122,110,101,97,252,73,74,212,74,152,129,69,158,23,162,236,215,95,72,137, + 3,58,45,10,116,210,193,213,105,12,12,111,223,224,119,246,247,59,192,146,101,34,208,178,31,12,140,95,191,19,154,121,248,207,193,206,246,25,152,131, + 222,65,75,23,228,182,11,114,78,39,126,224,228,47,104,150,150,137,25,152,227,196,24,240,108,111,4,182,93,222,105,106,202,94,1,150,46,159,144,18, + 203,111,34,22,127,160,223,58,199,136,69,238,31,100,24,5,88,47,114,113,176,2,75,24,65,2,99,71,212,56,180,158,17,121,246,30,27,56,118,236, + 154,60,176,123,207,201,207,207,245,25,32,128,88,240,120,236,23,218,140,43,3,210,82,136,63,191,254,252,251,179,238,249,199,83,59,95,49,223,246,127, + 205,160,19,124,233,135,161,153,54,135,148,168,1,31,19,139,44,55,3,51,31,59,176,124,1,54,30,64,91,79,64,51,254,255,158,19,152,124,252,201, + 192,196,199,203,240,239,39,104,46,233,43,161,233,253,63,28,28,108,31,129,141,59,88,233,242,17,169,161,11,75,44,68,206,146,34,192,199,143,95,184, + 46,95,190,47,133,79,13,176,157,243,136,149,149,245,203,151,47,160,147,10,224,165,10,177,137,243,63,82,137,130,75,14,84,229,49,177,178,50,11,30, + 60,120,81,158,97,16,128,55,111,62,138,242,240,112,113,0,195,156,9,32,128,112,37,24,88,32,252,198,145,11,224,235,103,190,2,203,239,101,207,63, + 31,219,254,150,229,170,253,147,223,234,62,103,190,106,25,203,176,203,73,200,48,115,114,200,114,50,252,19,226,96,248,47,202,202,192,128,127,238,143,225, + 215,251,95,12,111,15,61,103,248,250,234,223,159,71,215,254,252,194,55,20,15,90,59,4,204,233,159,129,189,26,88,35,247,27,52,183,255,197,209,232, + 36,170,100,6,213,237,192,18,134,147,64,239,232,13,27,27,243,119,96,21,134,220,192,37,165,52,35,164,150,145,131,131,149,9,88,221,178,2,219,14, + 204,131,33,193,0,195,4,52,210,205,6,106,115,1,4,16,11,1,143,253,65,227,255,71,155,221,6,69,18,168,30,226,126,255,235,207,175,13,47,255, + 124,216,246,154,233,138,206,211,191,146,14,119,57,149,52,184,190,202,9,179,126,224,19,145,251,205,247,225,254,103,54,124,169,230,233,171,191,95,150,156, + 103,187,121,235,195,247,103,215,191,253,3,229,114,99,124,53,8,176,161,246,25,180,138,12,154,96,126,160,181,1,200,152,177,5,23,205,76,4,83,54, + 3,104,30,149,229,15,176,58,36,39,177,16,5,126,255,254,11,74,188,12,12,52,60,201,156,164,58,11,216,198,1,246,34,65,203,78,25,1,2,136, + 80,130,249,143,214,30,248,143,212,40,254,137,52,255,196,3,197,156,191,254,253,251,117,238,227,183,175,64,252,128,137,145,145,93,74,144,87,192,140,147, + 67,250,198,151,47,160,197,75,56,123,31,247,127,253,127,245,237,237,167,115,192,134,220,103,1,62,110,22,2,195,53,127,248,249,121,190,1,115,251,55, + 180,54,4,217,27,160,129,213,219,71,80,219,129,157,157,21,239,141,19,192,94,8,63,55,55,23,51,180,203,138,115,4,57,46,206,21,124,227,43,176, + 43,203,240,246,237,39,240,13,174,160,109,184,192,98,157,193,220,92,147,65,67,67,14,60,246,3,90,48,181,98,197,126,208,196,35,162,57,247,253,23, + 8,255,7,117,162,6,67,130,249,253,27,86,210,49,50,0,4,16,11,145,69,40,172,219,247,15,109,118,27,121,194,242,11,100,148,142,1,118,84,24, + 251,191,255,255,57,158,126,248,252,243,206,183,95,127,62,252,253,167,78,160,33,251,135,131,133,249,11,211,191,255,239,249,121,57,241,46,136,249,254,253, + 55,31,104,209,53,176,39,241,139,80,98,97,132,2,80,175,4,159,153,204,204,140,223,128,213,192,15,21,21,169,87,87,174,224,222,214,251,225,195,87, + 101,14,14,22,54,89,89,81,150,91,183,30,99,77,44,229,229,17,12,29,29,105,224,0,126,246,236,53,3,176,171,206,48,101,202,122,240,145,103,155, + 55,31,99,200,200,8,96,240,240,240,0,7,229,159,63,95,192,247,22,212,215,47,132,59,249,197,139,183,255,191,125,251,241,89,79,79,241,197,149,43, + 247,112,198,139,163,163,193,34,25,25,209,251,160,1,57,38,42,95,218,4,218,236,1,44,193,65,85,255,31,9,9,161,251,192,4,255,229,211,167,175, + 255,0,2,136,216,4,195,128,212,174,65,94,210,9,171,150,190,66,19,10,236,20,110,216,145,167,156,44,204,76,156,60,156,108,172,31,153,153,126,19, + 40,246,126,1,115,247,59,96,99,239,53,48,247,138,227,159,243,249,205,205,197,197,14,26,160,34,120,213,13,176,171,204,4,154,75,1,230,88,124,99, + 43,255,152,153,89,126,126,253,250,19,88,213,113,189,132,250,149,25,123,125,254,93,4,216,107,208,243,244,52,187,125,242,228,117,148,19,169,164,164,68, + 24,146,146,60,24,170,171,99,128,165,202,71,112,130,121,255,254,11,176,148,129,156,137,3,76,100,192,18,234,55,195,55,208,172,62,184,157,254,23,200, + 254,204,32,46,46,196,160,165,37,207,112,237,218,67,216,8,235,255,87,175,62,254,1,102,136,215,248,123,55,12,191,4,5,121,142,29,59,118,253,51, + 40,130,169,185,17,15,100,30,104,196,24,24,126,63,206,158,189,245,21,232,182,207,192,18,242,31,64,0,17,123,58,14,250,245,50,255,24,48,23,94, + 193,18,14,7,3,226,108,57,78,160,39,184,129,197,48,43,144,254,129,191,132,97,250,9,236,74,190,5,210,175,120,120,56,94,1,213,127,251,247,239, + 63,174,134,47,31,176,52,224,16,21,229,255,143,150,232,192,155,224,144,142,230,96,212,210,146,99,126,246,236,13,223,247,239,63,241,149,48,63,64,118, + 191,121,243,225,47,27,27,219,83,96,64,189,5,86,21,98,184,194,242,228,201,107,94,190,190,22,219,129,57,156,117,243,230,227,240,30,143,159,159,37, + 248,162,240,247,239,63,131,170,56,80,169,133,220,5,102,128,236,171,131,76,67,32,142,172,249,15,84,199,194,16,24,104,3,75,48,224,48,6,86,205, + 255,128,57,251,5,116,216,0,107,247,26,88,18,90,25,25,169,174,123,252,248,229,167,151,47,223,147,115,150,218,127,44,61,97,6,180,30,241,111,164, + 17,232,127,0,1,196,68,134,5,200,35,147,63,144,170,35,216,136,43,168,50,6,13,186,128,54,42,191,96,102,102,126,201,199,199,245,26,152,16,190, + 19,74,48,124,124,220,239,128,17,254,6,88,68,191,1,54,44,241,174,221,216,189,251,140,158,141,141,46,143,148,148,48,220,163,81,81,206,12,89,89, + 254,112,53,160,91,234,237,236,244,153,175,94,125,104,0,44,9,120,241,148,110,127,88,88,152,190,220,188,249,248,167,128,0,247,117,69,69,201,71,248, + 236,62,127,254,142,237,222,189,231,189,242,242,130,248,92,93,141,153,65,119,15,76,158,156,11,190,157,254,213,171,247,88,55,198,65,182,133,252,1,150, + 38,130,12,34,34,2,172,175,95,63,87,184,126,253,166,42,43,43,27,55,48,225,51,163,95,214,117,227,198,163,191,192,112,187,1,77,52,184,186,187, + 218,192,132,165,21,30,238,244,7,216,99,252,130,52,159,70,8,131,87,227,43,43,75,125,141,140,116,254,174,175,175,252,13,24,254,232,106,62,67,11, + 0,228,129,201,127,0,1,196,68,102,170,68,222,203,132,60,97,249,21,105,94,7,132,223,3,75,130,119,192,6,234,7,32,253,11,127,130,97,252,3, + 140,172,79,192,156,248,1,24,1,207,129,109,148,23,248,212,159,62,125,211,13,152,32,196,99,99,221,56,69,68,32,37,77,69,69,4,3,176,170,96, + 0,205,163,128,34,49,61,221,155,93,86,86,76,4,88,34,184,224,27,140,3,173,150,151,147,19,187,123,233,210,221,31,192,72,248,12,12,200,67,4, + 194,128,103,210,164,117,165,55,110,60,182,236,234,74,231,207,204,244,3,39,26,80,59,2,219,36,39,104,244,31,52,87,5,204,60,140,189,189,89,28, + 234,234,50,210,161,161,13,53,86,86,57,75,22,45,218,225,105,103,167,43,230,230,102,10,114,43,44,103,255,7,150,30,191,128,37,229,107,96,227,248, + 12,62,135,108,219,118,34,94,71,71,94,42,55,55,232,31,48,195,125,131,198,3,94,12,244,239,215,130,130,224,63,211,167,23,114,3,75,40,243,222, + 222,76,161,41,83,242,152,130,131,237,126,138,137,9,194,226,17,166,254,7,82,59,241,63,64,0,81,218,207,255,143,111,140,6,132,129,17,255,207,194, + 66,139,235,254,253,231,214,175,95,127,84,195,101,16,176,190,190,107,106,170,190,247,212,169,27,111,180,181,21,191,1,91,230,134,143,31,191,214,192,221, + 240,5,111,214,250,9,244,248,89,91,91,221,223,47,94,188,255,107,108,172,6,26,182,103,184,124,249,62,99,90,154,15,71,104,168,163,240,162,69,59, + 163,118,236,56,29,135,47,193,200,201,137,95,3,186,113,205,166,77,199,62,1,219,24,255,93,93,77,190,157,57,115,211,1,232,6,94,220,115,165,255, + 249,247,238,61,103,1,76,172,31,50,50,252,158,3,19,217,239,87,175,62,48,72,75,139,252,7,149,108,160,196,3,42,85,64,37,199,187,119,159,89, + 162,163,157,89,129,145,207,247,249,243,55,157,196,196,174,186,163,71,175,196,0,221,47,189,125,251,41,175,179,103,111,243,2,115,250,157,212,84,239,111, + 64,45,255,79,156,184,254,31,52,231,195,195,195,197,174,161,33,251,15,232,22,47,96,66,196,26,87,95,190,252,16,191,118,237,145,28,208,191,23,98, + 99,93,223,0,219,96,127,94,190,124,247,11,88,242,254,1,38,12,48,6,186,17,216,120,229,4,225,191,160,197,221,211,167,23,176,3,195,73,14,152, + 232,51,38,78,92,219,126,236,216,85,99,96,41,243,35,38,198,245,123,124,188,219,23,160,59,129,102,188,255,13,218,113,1,204,200,255,64,109,42,88, + 85,9,16,64,52,233,182,35,77,37,176,1,3,80,160,185,57,201,72,91,91,97,3,150,182,16,28,3,3,124,87,123,123,170,37,208,131,82,192,46, + 169,50,208,241,173,12,152,251,162,209,241,15,95,95,203,217,219,182,181,155,127,254,188,85,252,245,235,245,98,175,94,173,19,251,250,117,135,232,233,211, + 211,245,195,195,29,219,161,185,4,159,25,192,4,98,60,161,168,40,84,27,88,10,138,2,75,10,137,236,236,0,3,111,111,243,73,132,244,65,241,87, + 96,36,172,1,230,210,200,59,119,150,40,125,253,186,77,236,203,151,173,98,223,190,109,23,249,250,117,187,40,144,22,187,119,111,153,252,130,5,21,238, + 137,137,158,221,192,158,199,61,108,230,104,104,200,239,93,186,180,58,224,229,203,181,226,192,94,22,39,48,114,185,197,196,4,196,106,106,98,205,117,117, + 149,54,18,114,7,176,116,58,14,44,49,194,128,254,151,121,255,126,19,255,143,31,59,57,128,246,179,0,195,133,5,68,63,124,184,130,227,195,135,205, + 252,175,94,173,151,92,176,160,220,91,65,65,226,0,186,25,64,251,78,2,237,46,59,121,114,170,206,223,191,123,4,110,221,90,4,90,4,143,18,185, + 0,1,68,139,35,33,145,83,226,95,78,78,118,80,215,140,152,225,243,255,192,122,248,15,48,210,126,3,219,8,76,65,65,118,71,128,189,160,135,192, + 6,164,2,30,61,236,192,70,103,10,48,135,56,232,233,41,93,4,86,125,119,65,250,63,126,252,162,124,235,214,83,253,71,143,94,170,18,242,35,176, + 52,120,109,106,170,121,252,232,209,203,159,129,85,0,104,247,223,159,35,71,46,189,11,8,176,217,113,225,194,61,203,167,79,95,155,16,112,55,23,176, + 183,20,12,196,46,51,102,108,126,10,236,9,93,1,54,218,159,128,38,234,64,126,2,246,144,148,158,63,127,167,114,243,230,35,57,160,217,56,123,127, + 55,110,60,116,138,137,105,51,2,230,240,105,21,21,209,203,129,37,211,147,201,147,215,255,60,123,246,230,107,39,39,195,77,183,110,61,49,255,249,243, + 23,78,253,143,31,191,178,200,201,153,56,103,238,220,173,7,76,77,53,118,133,134,58,92,1,150,50,159,64,235,148,129,97,2,108,91,125,224,89,185, + 114,191,46,176,180,114,189,112,225,174,53,176,167,41,140,110,6,80,141,89,103,231,10,163,133,11,119,197,3,237,92,223,218,154,188,88,84,84,224,46, + 242,0,46,64,0,209,26,49,171,168,72,243,244,247,103,235,1,75,152,117,4,74,152,157,147,38,229,154,74,74,10,131,102,103,69,128,85,141,174,143, + 143,101,47,145,185,156,108,12,172,206,22,148,150,134,27,10,11,243,138,192,6,32,129,165,128,72,112,176,173,78,122,186,111,38,144,253,138,214,110,64, + 47,53,59,58,82,179,102,207,46,230,3,207,68,112,115,136,231,228,4,26,132,134,218,183,163,205,147,17,194,255,128,153,245,62,16,223,5,246,82,31, + 129,14,35,32,197,29,192,166,196,141,29,59,186,236,59,59,211,80,246,252,0,4,208,160,186,162,27,84,95,2,123,43,224,217,242,253,251,47,124,52, + 49,81,219,15,204,37,23,104,101,159,128,0,207,29,43,43,157,45,39,78,92,123,255,246,237,103,216,44,247,31,96,238,251,181,115,231,153,247,192,54, + 198,73,96,181,54,9,88,242,189,167,87,24,88,90,106,175,215,212,148,223,191,113,227,49,112,164,131,54,237,239,219,119,238,19,80,108,39,80,110,13, + 41,77,3,96,59,79,1,136,149,128,254,144,37,180,145,15,173,71,247,33,63,63,168,251,227,199,207,183,230,205,219,134,50,137,11,16,64,131,44,193, + 48,1,123,18,224,4,243,23,216,173,252,122,229,202,131,59,129,129,54,51,64,167,14,80,189,232,99,102,250,232,231,103,53,11,216,13,190,13,44,166, + 191,194,18,11,108,108,9,216,13,255,182,99,199,169,183,192,42,107,59,176,120,239,101,101,101,166,117,162,249,7,108,180,175,4,182,25,38,207,154,181, + 229,205,214,173,39,96,61,147,223,192,176,248,4,116,203,115,7,7,131,249,102,102,26,43,105,28,7,31,226,227,221,219,216,217,217,142,84,86,206,249, + 118,243,230,19,148,4,3,16,64,131,42,193,64,22,242,128,215,161,254,5,182,204,127,239,217,115,246,51,11,11,203,89,96,119,111,42,48,130,63,81, + 203,30,208,188,81,80,144,45,176,228,96,221,15,236,25,189,253,254,29,116,8,48,124,230,25,54,245,241,19,216,83,248,186,101,203,241,247,64,245,123, + 128,37,77,15,176,122,120,66,163,72,250,14,236,153,205,240,244,52,155,181,124,249,190,231,192,196,242,11,122,154,3,56,193,0,123,100,63,79,159,190, + 249,97,215,174,211,143,237,237,13,22,185,184,24,207,103,64,93,126,66,21,192,199,199,245,56,38,198,165,147,155,155,125,15,176,253,244,233,222,189,231, + 127,209,7,248,0,2,136,214,211,231,76,66,66,124,172,192,92,33,120,238,220,109,135,215,175,63,104,226,235,86,219,216,232,238,61,118,236,202,219,247, + 239,191,128,151,87,2,139,210,255,160,33,118,93,93,229,231,192,54,208,125,96,215,92,25,40,38,68,97,53,244,24,216,54,154,10,12,156,157,235,214, + 29,122,9,236,242,126,101,64,44,186,194,152,102,0,13,135,63,121,242,250,15,176,49,251,28,232,190,171,64,251,89,129,141,67,57,42,117,24,254,1, + 123,145,23,129,137,119,178,140,140,200,206,109,219,78,190,184,112,225,206,39,6,212,197,228,240,161,139,231,207,223,254,249,246,237,199,47,43,43,237,59, + 138,138,146,15,95,188,120,43,5,108,28,83,99,127,245,31,96,87,250,0,48,99,78,2,154,127,106,221,186,195,111,222,190,5,207,103,252,70,115,3, + 3,64,0,81,45,193,4,4,88,51,168,171,203,129,118,238,145,157,96,172,173,117,246,30,61,10,79,48,224,241,253,119,239,190,252,125,240,224,197,95, + 96,119,251,53,48,194,46,1,187,189,127,64,235,92,255,253,35,120,204,6,106,87,134,139,253,185,153,153,230,86,47,47,243,41,192,72,63,179,101,203, + 177,87,64,123,190,32,13,123,163,247,228,224,13,64,96,59,224,31,48,183,253,2,22,128,31,128,126,185,4,108,160,223,5,29,137,241,241,227,87,94, + 160,59,200,217,66,251,93,78,78,236,146,189,189,254,42,160,159,231,61,124,248,242,218,246,237,39,95,62,122,244,234,51,116,100,245,55,142,6,46,195, + 203,151,239,126,223,185,243,244,151,152,152,224,51,11,11,205,179,130,130,60,31,128,238,224,6,186,81,136,129,196,229,16,192,146,237,179,178,178,228,41, + 71,71,131,197,90,90,10,43,47,93,186,119,103,223,190,11,111,63,127,6,237,119,134,175,2,64,89,236,5,16,64,84,235,86,7,6,58,48,196,197, + 249,50,120,120,228,48,0,27,140,212,234,154,255,1,237,55,2,182,51,62,109,221,122,252,175,174,174,210,79,61,61,229,199,90,90,242,123,129,185,94, + 19,152,56,13,128,221,86,5,232,32,30,11,108,231,34,104,62,9,148,176,128,85,200,75,80,195,22,152,27,111,42,42,74,92,2,150,22,55,65,141, + 233,91,183,30,129,6,232,96,139,197,113,37,22,6,228,238,36,208,252,127,199,142,93,251,123,253,250,227,239,70,70,170,239,77,77,213,79,219,219,235, + 41,62,125,250,70,21,216,229,213,2,70,26,200,29,160,19,168,216,127,253,250,203,140,212,144,255,15,26,90,0,246,84,94,241,242,114,62,150,145,17, + 189,5,236,57,222,4,118,187,239,2,75,136,103,192,220,252,13,216,117,255,12,116,251,55,164,196,251,27,173,180,131,205,219,253,0,157,107,4,44,225, + 254,1,195,227,151,130,130,196,87,125,125,229,167,33,33,118,251,129,213,170,18,176,205,167,3,12,43,245,175,95,191,203,0,221,203,243,243,39,98,1, + 22,51,51,227,127,160,27,126,129,118,104,242,242,114,63,80,82,146,184,6,76,248,55,126,255,254,123,23,24,150,175,14,29,186,252,5,152,161,97,107, + 139,144,195,5,101,21,0,64,0,86,174,93,5,97,32,8,166,240,93,136,17,67,64,11,187,20,246,130,31,225,239,248,27,254,141,32,136,118,22,54, + 134,8,98,19,11,69,66,26,73,206,83,99,188,92,116,150,168,4,81,43,171,107,151,153,217,205,110,118,238,254,38,24,206,147,27,1,195,97,95,233, + 118,123,202,96,48,251,135,104,94,132,69,81,28,155,166,45,86,171,237,169,217,212,61,8,96,137,12,29,161,114,228,0,98,17,253,134,46,165,204,211, + 223,85,218,13,233,186,234,226,60,163,100,135,32,134,77,38,230,1,25,28,0,200,75,10,20,161,124,183,88,166,69,243,90,135,120,30,23,227,241,60, + 32,3,23,200,119,241,73,89,116,58,173,17,68,81,192,52,149,129,128,85,223,231,85,114,236,147,41,11,83,159,168,215,107,59,33,34,65,211,23,200, + 62,90,150,205,17,203,229,241,68,218,147,156,235,27,73,183,207,9,148,196,34,101,44,215,107,39,220,108,220,51,170,13,3,38,182,97,52,102,237,182, + 81,66,195,154,69,211,94,70,172,26,225,65,158,93,52,239,129,166,85,104,19,127,133,168,133,227,236,217,116,186,228,116,237,133,177,99,58,142,240,23, + 46,119,1,88,185,130,20,132,97,32,136,180,13,169,6,91,74,63,231,19,250,209,222,122,20,138,120,243,172,32,181,138,155,180,56,19,68,66,91,15, + 130,47,200,50,179,187,217,100,50,249,243,197,157,243,98,117,85,237,62,9,227,81,91,205,148,209,57,59,243,223,21,166,85,238,165,7,16,110,41,18, + 162,170,123,144,116,214,58,81,198,172,147,162,48,199,52,213,49,1,18,17,94,167,15,32,143,224,8,186,137,96,235,8,85,87,9,102,132,241,71,149, + 222,75,31,93,247,120,34,121,239,109,123,186,33,134,139,194,4,205,132,41,203,109,156,101,38,122,63,195,161,31,104,192,54,59,32,110,135,138,167,13, + 196,34,177,37,80,250,237,194,204,178,132,213,244,207,97,63,156,163,144,72,62,77,102,125,211,28,174,232,32,138,9,147,231,155,136,254,164,152,182,79, + 128,139,174,227,234,122,63,34,30,203,3,5,141,108,232,106,225,250,18,196,241,245,125,209,75,0,81,49,193,192,54,220,131,102,100,217,65,219,72,65, + 129,245,15,116,161,38,144,205,249,233,211,87,65,2,221,220,223,192,92,248,239,207,159,127,184,18,13,242,44,249,79,96,32,176,2,205,103,6,97,96, + 195,149,233,209,163,151,200,247,9,32,71,46,250,162,175,191,104,237,3,98,75,187,191,12,168,107,129,192,215,6,1,221,193,2,172,14,152,129,24,60, + 29,2,44,214,209,151,121,34,207,179,33,187,5,157,102,96,32,110,231,193,127,180,196,14,43,21,88,126,253,250,3,194,160,99,52,152,161,238,96,196, + 18,38,200,75,83,144,39,144,255,50,16,177,106,17,32,128,168,150,96,64,235,61,129,110,7,93,88,196,102,98,162,255,117,201,146,202,223,155,54,29, + 103,6,237,85,6,230,114,49,96,149,161,141,79,63,176,136,127,15,12,116,240,38,118,92,141,79,44,145,15,187,81,142,17,75,224,160,7,208,63,180, + 226,254,63,153,237,42,6,6,196,102,191,63,12,136,173,56,204,72,9,133,9,139,190,127,120,48,169,110,249,135,68,195,220,193,140,230,14,38,164,156, + 76,200,29,127,137,76,176,12,0,1,68,181,4,3,172,67,153,183,110,61,97,222,216,184,192,55,45,205,231,180,177,177,250,189,148,20,175,127,87,175, + 62,144,234,235,91,147,8,76,249,98,248,244,3,219,28,239,65,117,233,151,47,63,254,19,81,61,252,69,242,36,242,254,41,108,106,145,3,130,26,51, + 174,255,208,74,29,38,180,34,150,17,135,91,24,112,12,195,83,218,206,67,46,69,25,25,240,95,196,129,173,138,69,47,205,241,2,128,0,162,90,130, + 1,21,135,63,127,126,227,57,125,250,102,4,16,231,1,235,210,107,192,58,253,43,176,103,162,2,108,160,17,60,99,69,79,79,233,209,139,23,239,190, + 3,171,46,66,251,137,176,237,237,97,36,160,150,22,128,20,119,208,195,45,255,177,180,17,168,238,22,128,0,162,86,130,97,2,182,214,89,120,121,185, + 224,199,63,3,27,119,90,63,126,16,55,24,9,76,88,79,128,221,224,199,192,22,251,95,10,170,139,193,0,6,211,237,231,52,113,11,64,0,81,35, + 193,128,139,62,96,195,19,212,51,32,241,158,98,8,208,208,144,3,141,75,220,132,30,90,51,50,175,156,31,34,0,32,128,168,53,151,4,218,56,206, + 12,44,81,72,190,87,17,52,71,100,103,167,183,238,206,157,39,159,159,62,125,243,135,129,70,155,195,70,1,117,0,64,0,81,109,242,17,116,2,37, + 104,171,41,137,9,230,151,171,171,241,66,96,123,231,212,190,125,23,190,48,144,182,79,121,20,12,0,0,8,32,170,37,152,183,111,63,253,3,157,222, + 200,195,195,249,150,24,245,236,236,108,111,65,147,128,192,234,104,205,218,181,135,94,3,75,151,31,12,228,237,85,30,5,116,4,0,1,68,141,201,71, + 112,183,246,237,219,143,204,10,10,18,191,221,220,76,46,8,10,242,222,228,224,96,125,207,201,201,254,19,116,100,216,191,127,12,160,35,180,126,2,19, + 211,39,208,46,58,29,29,197,77,62,62,22,115,89,89,153,15,109,217,114,226,249,163,71,175,96,147,128,196,28,155,49,10,6,16,0,4,16,35,149, + 204,0,37,60,54,62,62,110,78,57,57,113,62,57,57,81,65,96,194,16,0,109,96,3,118,183,65,43,229,133,65,231,154,241,240,112,188,227,228,100, + 123,247,234,213,135,239,87,175,62,252,112,255,254,243,207,223,190,253,128,237,125,65,94,98,48,10,6,41,0,8,32,106,237,173,132,29,113,6,218,237, + 8,218,249,200,193,194,194,194,14,44,65,216,5,5,121,88,4,4,120,152,128,189,32,208,249,43,255,222,188,249,8,154,219,1,221,19,4,219,204,143, + 60,183,67,179,173,12,163,128,58,0,32,128,24,169,104,14,108,152,30,148,104,96,183,130,192,206,199,67,62,144,8,54,143,129,124,139,202,223,209,196, + 50,52,0,64,0,49,82,217,44,88,245,132,126,19,61,174,9,48,228,33,254,209,196,50,4,0,64,128,1,0,102,20,176,16,7,130,12,56,0,0, + 0,0,73,69,78,68,174,66,96,130,0,0}; +const char* BinaryData::juce_png = (const char*) temp13; + +static const unsigned char temp14[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, + 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, + 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, + 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, + 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, + 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, + 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, + 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, + 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, + 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, + 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, + 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, + 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, + 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, + 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, + 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, + 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, + 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, + 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, + 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, + 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, + 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, + 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, + 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, + 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, + 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, + 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, + 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,13,10,99,108,97,115,115,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,32,58,32,112,117,98,108,105,99,32, + 67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,112,117,98,108,105,99,32,84,105,109,101,114,13,10,123,13,10,32,32,32,32,67,111,108,111,117,114,32,99,111,108,111,117,114,59,13,10,32, + 32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,100,120,44,32,100,121,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,66, + 111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120, + 32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41, + 32,42,32,49,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,121,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101, + 109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,49,48,48,46,48,102,59,13,10,13,10,32,32,32,32,32, + 32,32,32,100,120,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108, + 111,97,116,40,41,32,42,32,56,46,48,102,32,45,32,52,46,48,102,59,13,10,32,32,32,32,32,32,32,32,100,121,32,61,32,82,97,110,100,111, + 109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,56,46,48,102,32, + 45,32,52,46,48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,32,61,32,67,111,108,111,117,114,32,40,82,97,110,100, + 111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,40,41,41,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,46,119,105,116,104,66,114,105,103,104,116,110,101,115,115,32,40,48,46,55,102,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,105,110,116,32,115,105,122,101,32,61,32,49,48,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101, + 109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,51,48,41,59,13,10,32,32,32,32,32,32,32,32,115,101,116,83,105,122,101, + 32,40,115,105,122,101,44,32,115,105,122,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,116,97,114,116,84,105,109,101,114,32,40,54,48, + 41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,40, + 41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104, + 105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,99,111,108, + 111,117,114,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,69,108,108,105,112,115,101,32,40,120,32,45,32,103,101,116,88,40,41, + 44,32,121,32,45,32,103,101,116,89,40,41,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,46,48,102,44,32,103,101,116,72,101,105,103, + 104,116,40,41,32,45,32,50,46,48,102,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97, + 108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120,32,43,61,32,100,120,59,13,10,32,32,32,32,32, + 32,32,32,121,32,43,61,32,100,121,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120,32,60,32,48,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,100,120,32,61,32,102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120, + 32,62,32,103,101,116,80,97,114,101,110,116,87,105,100,116,104,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,120,32,61,32,45, + 102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,121,32,60,32,48,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,100,121,32,61,32,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,121, + 32,62,32,103,101,116,80,97,114,101,110,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,121,32,61,32, + 45,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105, + 111,110,32,40,40,105,110,116,41,32,120,44,32,40,105,110,116,41,32,121,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111,111, + 108,32,104,105,116,84,101,115,116,32,40,105,110,116,32,120,44,32,105,110,116,32,121,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,114,101,116,117,114,110,32,102,97,108,115,101,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,114,97, + 103,79,110,116,111,68,101,115,107,116,111,112,68,101,109,111,67,111,109,112,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,13, + 10,123,13,10,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,112,97,114,101,110,116,59,13,10,32,32,32,32,67,111,109,112,111,110,101,110, + 116,68,114,97,103,103,101,114,32,100,114,97,103,103,101,114,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,114,97,103,79,110, + 116,111,68,101,115,107,116,111,112,68,101,109,111,67,111,109,112,32,40,67,111,109,112,111,110,101,110,116,42,32,112,41,13,10,32,32,32,32,32,32, + 32,32,58,32,112,97,114,101,110,116,32,40,112,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,115,104,111,119,32,111, + 102,102,32,115,101,109,105,45,116,114,97,110,115,112,97,114,101,110,99,121,32,105,102,32,105,116,39,115,32,115,117,112,112,111,114,116,101,100,32,98, + 121,32,116,104,101,32,99,117,114,114,101,110,116,32,79,83,46,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,33,32, + 68,101,115,107,116,111,112,58,58,99,97,110,85,115,101,83,101,109,105,84,114,97,110,115,112,97,114,101,110,116,87,105,110,100,111,119,115,40,41,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,51,59,32,45,45,105,32,62,61,32,48,59,41,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,110,101,119,32,66,111,117,110, + 99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,114,97, + 103,79,110,116,111,68,101,115,107,116,111,112,68,101,109,111,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100, + 101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109, + 111,117,115,101,68,111,119,110,32,40,99,111,110,115,116,32,77,111,117,115,101,69,118,101,110,116,38,32,101,41,13,10,32,32,32,32,123,13,10,32, + 32,32,32,32,32,32,32,100,114,97,103,103,101,114,46,115,116,97,114,116,68,114,97,103,103,105,110,103,67,111,109,112,111,110,101,110,116,32,40,116, + 104,105,115,44,32,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109,111,117,115,101,68,114,97,103,32,40,99, + 111,110,115,116,32,77,111,117,115,101,69,118,101,110,116,38,32,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40, + 33,32,112,97,114,101,110,116,45,62,105,115,86,97,108,105,100,67,111,109,112,111,110,101,110,116,40,41,41,13,10,32,32,32,32,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,116,104,105,115,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32, + 32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,77,111,117,115, + 101,69,118,101,110,116,32,101,50,32,40,101,46,103,101,116,69,118,101,110,116,82,101,108,97,116,105,118,101,84,111,32,40,112,97,114,101,110,116,41, + 41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105,102,32,116,104,101,32,109,111,117,115,101,32,105,115,32,105,110,115, + 105,100,101,32,116,104,101,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,44,32,119,101,39,108,108,32,109,97,107,101,32,116,104,97, + 116,32,116,104,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,112,97,114,101,110,116,32,45,32,111,116,104,101,114,119,105,115,101, + 44,32,119,101,39,108,108,32,112,117,116,32,116,104,105,115,32,99,111,109,112,32,111,110,32,116,104,101,32,100,101,115,107,116,111,112,46,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,101,50,46,120,32,62,61,32,48,32,38,38,32,101,50,46,121,32,62,61,32,48,32,38,38, + 32,101,50,46,120,32,60,32,112,97,114,101,110,116,45,62,103,101,116,87,105,100,116,104,40,41,32,38,38,32,101,50,46,121,32,60,32,112,97,114, + 101,110,116,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,47,47,32,114,101,45,97,100,100,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,32,116,111,32,97,32, + 112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,44,32,119,104,105,99,104,32,119,105,108,108,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,47,47,32,114,101,109,111,118,101,32,105,116,32,102,114,111,109,32,116,104,101,32,100,101,115,107,116,111,112,46,46,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,97,114,101,110,116,45,62,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116, + 32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115, + 101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,100,100, + 32,116,104,101,32,99,111,109,112,111,110,101,110,116,32,116,111,32,116,104,101,32,100,101,115,107,116,111,112,44,32,119,104,105,99,104,32,119,105,108, + 108,32,114,101,109,111,118,101,32,105,116,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,102,114,111,109,32,105,116,115, + 32,99,117,114,114,101,110,116,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,97,100,100,84,111,68,101,115,107,116,111,112,32,40,67,111,109,112,111,110,101,110,116,80,101,101,114,58,58,119,105,110,100,111,119, + 73,115,84,101,109,112,111,114,97,114,121,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,100,114,97,103,103,101,114,46,100,114,97,103,67,111,109,112,111,110,101,110,116,32,40,116,104,105,115,44,32,101,41,59,13,10,32,32, + 32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105, + 99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,79,112,97,113,117,101,40,41,41,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13, + 10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111, + 108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,48,46,50,102,41,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,83,116,114,105,110,103,32,100,101,115,99,32,40,84,40,34,100,114,97,103,32,116,104,105,115,32,98,111,120,32,111,110,116,111,32,116,104,101, + 32,100,101,115,107,116,111,112,32,116,111,32,115,104,111,119,32,104,111,119,32,116,104,101,32,115,97,109,101,32,99,111,109,112,111,110,101,110,116,32, + 99,97,110,32,109,111,118,101,32,102,114,111,109,32,98,101,105,110,103,32,108,105,103,104,116,119,101,105,103,104,116,32,116,111,32,98,101,105,110,103, + 32,97,32,115,101,112,97,114,97,116,101,32,119,105,110,100,111,119,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,70, + 111,110,116,32,40,49,53,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117, + 114,115,58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,70,105,116,116,101,100,84,101,120,116,32,40,100, + 101,115,99,44,32,52,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,56,44,32,103,101,116,72,101,105,103,104,116,40,41,44,32, + 74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,104,111,114,105,122,111,110,116,97,108,108,121,74,117,115,116,105,102,105,101,100,44,32,53,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,82,101,99,116,32,40,48,44,32,48,44,32,103,101,116,87,105,100,116,104,40, + 41,44,32,103,101,116,72,101,105,103,104,116,40,41,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,67, + 117,115,116,111,109,77,101,110,117,67,111,109,112,111,110,101,110,116,32,32,58,32,112,117,98,108,105,99,32,80,111,112,117,112,77,101,110,117,67,117, + 115,116,111,109,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,112,117,98,108,105,99,32,84,105,109,101,114,13,10,123,13,10,32,32,32,32,105,110,116,32,98,108,111,98,88,44,32,98,108,111, + 98,89,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,67,117,115,116,111,109,77,101,110,117,67,111,109,112,111,110,101,110,116,40, + 41,13,10,32,32,32,32,32,32,32,32,58,32,98,108,111,98,88,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,98,108,111,98,89, + 32,40,48,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,115,101,116,32,111,102,102,32,97,32,116,105,109,101,114,32, + 116,111,32,109,111,118,101,32,97,32,98,108,111,98,32,97,114,111,117,110,100,32,111,110,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,32, + 101,118,101,114,121,13,10,32,32,32,32,32,32,32,32,47,47,32,51,48,48,32,109,105,108,108,105,115,101,99,111,110,100,115,32,45,32,115,101,101, + 32,116,104,101,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,32,109,101,116,104,111,100,46,13,10,32,32,32,32,32,32,32,32,115,116, + 97,114,116,84,105,109,101,114,32,40,51,48,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,67,117,115,116,111,109,77,101,110, + 117,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103, + 101,116,73,100,101,97,108,83,105,122,101,32,40,105,110,116,38,32,105,100,101,97,108,87,105,100,116,104,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,38,32,105,100,101,97,108,72,101,105,103,104,116,41,13,10,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,47,47,32,116,101,108,108,115,32,116,104,101,32,109,101,110,117,32,104,111,119,32,98,105,103,32,119,101,39,100,32,108, + 105,107,101,32,116,111,32,98,101,46,46,13,10,32,32,32,32,32,32,32,32,105,100,101,97,108,87,105,100,116,104,32,61,32,50,48,48,59,13,10, + 32,32,32,32,32,32,32,32,105,100,101,97,108,72,101,105,103,104,116,32,61,32,54,48,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, + 118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,121,101,108,108,111,119,46,119,105,116,104,65,108,112,104,97,32,40,48, + 46,51,102,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58, + 112,105,110,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,69,108,108,105,112,115,101,32,40,40,102,108,111,97,116,41,32,98, + 108,111,98,88,44,32,40,102,108,111,97,116,41,32,98,108,111,98,89,44,32,51,48,46,48,102,44,32,52,48,46,48,102,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,49,52,46,48,102,44,32,70,111,110,116,58,58,105,116,97,108,105,99,41,59,13, + 10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,70,105,116,116,101,100,84,101,120,116,32,40,84,40,34,116,104,105,115,32,105,115,32,97, + 32,99,117,115,116,111,109,105,115,101,100,32,109,101,110,117,32,105,116,101,109,32,40,97,108,115,111,32,100,101,109,111,110,115,116,114,97,116,105,110, + 103,32,116,104,101,32,84,105,109,101,114,32,99,108,97,115,115,41,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,52,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,56,44,32,103,101,116,72,101,105, + 103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,74,117,115,116,105,102, + 105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,44,32,51,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100, + 32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,98,108,111,98,88,32,61, + 32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,87, + 105,100,116,104,40,41,41,59,13,10,32,32,32,32,32,32,32,32,98,108,111,98,89,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115, + 116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,72,101,105,103,104,116,40,41,41,59,13,10,32,32,32,32, + 32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,84,111,32,100,101, + 109,111,110,115,116,114,97,116,101,32,104,111,119,32,115,108,105,100,101,114,115,32,99,97,110,32,104,97,118,101,32,99,117,115,116,111,109,32,115,110, + 97,112,112,105,110,103,32,97,112,112,108,105,101,100,32,116,111,32,116,104,101,105,114,32,118,97,108,117,101,115,44,13,10,32,32,32,32,116,104,105, + 115,32,115,105,109,112,108,101,32,99,108,97,115,115,32,115,110,97,112,115,32,116,104,101,32,118,97,108,117,101,32,116,111,32,53,48,32,105,102,32, + 105,116,32,99,111,109,101,115,32,110,101,97,114,46,13,10,42,47,13,10,99,108,97,115,115,32,83,110,97,112,112,105,110,103,83,108,105,100,101,114, + 32,32,58,32,112,117,98,108,105,99,32,83,108,105,100,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,83,110,97,112,112, + 105,110,103,83,108,105,100,101,114,32,40,99,111,110,115,116,32,83,116,114,105,110,103,38,32,110,97,109,101,41,13,10,32,32,32,32,32,32,32,32, + 58,32,83,108,105,100,101,114,32,40,110,97,109,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,100,111,117, + 98,108,101,32,115,110,97,112,86,97,108,117,101,32,40,100,111,117,98,108,101,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,44,32,99,111, + 110,115,116,32,98,111,111,108,32,117,115,101,114,73,115,68,114,97,103,103,105,110,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,105,102,32,40,33,32,117,115,101,114,73,115,68,114,97,103,103,105,110,103,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117, + 114,110,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,59,32,32,47,47,32,105,102,32,116,104,101,121,39,114,101,32,101,110,116,101,114,105, + 110,103,32,116,104,101,32,118,97,108,117,101,32,105,110,32,116,104,101,32,116,101,120,116,45,98,111,120,44,32,100,111,110,39,116,32,109,101,115,115, + 32,119,105,116,104,32,105,116,46,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,97,116,116,101,109,112,116,101,100,86,97,108,117,101,32, + 62,32,52,48,32,38,38,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,32,60,32,54,48,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,114,101,116,117,114,110,32,53,48,46,48,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,114,101,116,117,114,110,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47, + 42,42,32,65,32,84,101,120,116,66,117,116,116,111,110,32,116,104,97,116,32,112,111,112,115,32,117,112,32,97,32,99,111,108,111,117,114,32,99,104, + 111,111,115,101,114,32,116,111,32,99,104,97,110,103,101,32,105,116,115,32,99,111,108,111,117,114,115,46,32,42,47,13,10,99,108,97,115,115,32,67, + 111,108,111,117,114,67,104,97,110,103,101,66,117,116,116,111,110,32,32,58,32,112,117,98,108,105,99,32,84,101,120,116,66,117,116,116,111,110,44,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,104,97,110, + 103,101,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,67,111,108,111,117,114,67,104,97,110,103,101, + 66,117,116,116,111,110,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,99,108,105,99,107, + 32,116,111,32,99,104,97,110,103,101,32,99,111,108,111,117,114,46,46,46,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, + 115,101,116,83,105,122,101,32,40,49,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,99,104,97,110,103,101,87,105,100,116,104,84,111, + 70,105,116,84,101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,67,111,108,111,117,114,67,104,97,110,103,101,66,117, + 116,116,111,110,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,108,105,99,107,101,100, + 40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,116,119,111,32,99,111,108,111,117,114,32, + 115,101,108,101,99,116,111,114,32,99,111,109,112,111,110,101,110,116,115,32,102,111,114,32,111,117,114,32,98,97,99,107,103,114,111,117,110,100,32,97, + 110,100,13,10,32,32,32,32,32,32,32,32,47,47,32,116,101,120,116,32,99,111,108,111,117,114,46,46,13,10,32,32,32,32,32,32,32,32,67,111, + 108,111,117,114,83,101,108,101,99,116,111,114,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,59,13,10,32,32,32,32,32,32,32,32,99, + 111,108,111,117,114,83,101,108,101,99,116,111,114,49,46,115,101,116,78,97,109,101,32,40,84,40,34,98,97,99,107,103,114,111,117,110,100,34,41,41, + 59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,46,115,101,116,67,117,114,114,101,110,116,67,111,108, + 111,117,114,32,40,102,105,110,100,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117, + 114,73,100,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,46,97,100,100,67,104,97,110,103, + 101,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,67,111,108,111,117,114,83,101,108,101,99, + 116,111,114,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,50,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,83,101,108,101, + 99,116,111,114,50,46,115,101,116,78,97,109,101,32,40,84,40,34,116,101,120,116,34,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111, + 117,114,83,101,108,101,99,116,111,114,50,46,115,101,116,67,117,114,114,101,110,116,67,111,108,111,117,114,32,40,102,105,110,100,67,111,108,111,117,114, + 32,40,84,101,120,116,66,117,116,116,111,110,58,58,116,101,120,116,67,111,108,111,117,114,73,100,41,41,59,13,10,32,32,32,32,32,32,32,32,99, + 111,108,111,117,114,83,101,108,101,99,116,111,114,50,46,97,100,100,67,104,97,110,103,101,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,97,100,100,32,116,104,101,32,115,101,108,101,99,116,111,114,115,32,97,115,32, + 99,117,115,116,111,109,32,109,101,110,117,32,105,116,101,109,115,32,116,111,32,97,32,80,111,112,117,112,77,101,110,117,44,32,112,117,116,116,105,110, + 103,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,109,32,105,110,32,116,119,111,32,100,105,102,102,101,114,101,110,116,32,115,117,98,45, + 109,101,110,117,115,46,46,13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,109,44,32,115,117,98,49,44,32,115,117,98,50, + 59,13,10,13,10,32,32,32,32,32,32,32,32,115,117,98,49,46,97,100,100,67,117,115,116,111,109,73,116,101,109,32,40,49,50,51,52,44,32,38, + 99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,44,32,51,48,48,44,32,51,48,48,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32, + 32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,98,97,99,107,103,114,111,117,110,100,32,99,111,108,111,117,114,34,41, + 44,32,115,117,98,49,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,117,98,50,46,97,100,100,67,117,115,116,111,109,73,116,101,109,32,40, + 49,50,51,52,44,32,38,99,111,108,111,117,114,83,101,108,101,99,116,111,114,50,44,32,51,48,48,44,32,51,48,48,44,32,102,97,108,115,101,41, + 59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,116,101,120,116,32,99,111,108,111,117,114,34, + 41,44,32,115,117,98,50,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,115,104,111,119,32,116,104,101,32,109,101,110, + 117,32,40,109,111,100,97,108,108,121,41,46,46,13,10,32,32,32,32,32,32,32,32,109,46,115,104,111,119,65,116,32,40,116,104,105,115,41,59,13, + 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,104,97,110,103,101,76,105,115,116,101,110,101,114,67,97,108,108,98,97,99, + 107,32,40,118,111,105,100,42,32,115,111,117,114,99,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,67,111,108,111,117,114,83, + 101,108,101,99,116,111,114,42,32,99,115,32,61,32,40,67,111,108,111,117,114,83,101,108,101,99,116,111,114,42,41,32,115,111,117,114,99,101,59,13, + 10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,99,115,45,62,103,101,116,78,97,109,101,40,41,32,61,61,32,84,40,34,116,101,120,116,34, + 41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,116, + 101,120,116,67,111,108,111,117,114,73,100,44,32,99,115,45,62,103,101,116,67,117,114,114,101,110,116,67,111,108,111,117,114,40,41,41,59,13,10,32, + 32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116, + 66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117,114,73,100,44,32,99,115,45,62,103,101,116,67,117,114,114,101,110,116,67,111, + 108,111,117,114,40,41,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,47,32,106,117,115,116,32,97,32,99,111,109,112,111, + 110,101,110,116,32,116,104,97,116,32,100,101,108,101,116,101,115,32,97,108,108,32,105,116,115,32,99,104,105,108,100,114,101,110,44,32,116,111,32,117, + 115,101,32,102,111,114,32,116,104,101,32,116,97,98,98,101,100,32,112,97,103,101,115,32,116,111,32,97,118,111,105,100,13,10,47,47,32,109,101,109, + 111,114,121,32,108,101,97,107,115,32,119,104,101,110,32,116,104,101,121,39,114,101,32,100,101,108,101,116,101,100,13,10,99,108,97,115,115,32,68,101, + 109,111,80,97,103,101,67,111,109,112,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,13,10,123,13,10,112,117,98,108,105, + 99,58,13,10,32,32,32,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10, + 32,32,32,32,126,68,101,109,111,80,97,103,101,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101, + 116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,115,116,97,116,105,99,32, + 67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,83,108,105,100,101,114,115,80,97,103,101,40,41,13,10,123,13,10,32,32,32,32,68, + 101,109,111,80,97,103,101,67,111,109,112,42,32,112,97,103,101,32,61,32,110,101,119,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,59,13, + 10,13,10,32,32,32,32,99,111,110,115,116,32,105,110,116,32,110,117,109,83,108,105,100,101,114,115,32,61,32,49,49,59,13,10,32,32,32,32,83, + 108,105,100,101,114,42,32,115,108,105,100,101,114,115,32,91,110,117,109,83,108,105,100,101,114,115,93,59,13,10,13,10,32,32,32,32,105,110,116,32, + 105,59,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32,60,32,110,117,109,83,108,105,100,101,114,115,59,32,43,43,105,41, + 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61,61,32,50,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,108,105,100,101,114,115,91,105,93,32,61,32, + 110,101,119,32,83,110,97,112,112,105,110,103,83,108,105,100,101,114,32,40,84,40,34,115,108,105,100,101,114,34,41,41,41,59,13,10,32,32,32,32, + 32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105, + 115,105,98,108,101,32,40,115,108,105,100,101,114,115,91,105,93,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,115,108,105,100,101, + 114,34,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115,101,116,82,97,110,103,101,32,40, + 48,46,48,44,32,49,48,48,46,48,44,32,48,46,49,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115, + 101,116,80,111,112,117,112,77,101,110,117,69,110,97,98,108,101,100,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100, + 101,114,115,91,105,93,45,62,115,101,116,86,97,108,117,101,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111, + 109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,32,42,32,49,48,48,46,48,44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59, + 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,48,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108, + 101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,86,101,114,116,105,99,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115, + 91,48,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,66,101,108, + 111,119,44,32,102,97,108,115,101,44,32,49,48,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,48,93,45,62,115,101, + 116,66,111,117,110,100,115,32,40,49,48,44,32,50,53,44,32,55,48,44,32,50,48,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91, + 48,93,45,62,115,101,116,68,111,117,98,108,101,67,108,105,99,107,82,101,116,117,114,110,86,97,108,117,101,32,40,116,114,117,101,44,32,53,48,46, + 48,41,59,32,47,47,32,100,111,117,98,108,101,45,99,108,105,99,107,105,110,103,32,116,104,105,115,32,115,108,105,100,101,114,32,119,105,108,108,32, + 115,101,116,32,105,116,32,116,111,32,53,48,46,48,13,10,32,32,32,32,115,108,105,100,101,114,115,91,48,93,45,62,115,101,116,84,101,120,116,86, + 97,108,117,101,83,117,102,102,105,120,32,40,84,40,34,32,117,110,105,116,115,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115, + 91,49,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,86,101,114,116,105, + 99,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,86,101,108,111,99,105,116,121,66,97,115,101,100,77, + 111,100,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,83,107,101,119,70,97,99,116, + 111,114,32,40,48,46,53,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121, + 108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,65,98,111,118,101,44,32,116,114,117,101,44,32,49,48,48,44,32,50,48,41, + 59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,66,111,117,110,100,115,32,40,56,53,44,32,50,53,44,32,55,48, + 44,32,50,48,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,84,101,120,116,86,97,108,117,101,83,117,102, + 102,105,120,32,40,84,40,34,32,114,101,108,115,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,50,93,45,62,115,101,116, + 83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,72,111,114,105,122,111,110,116,97,108,41,59,13, + 10,32,32,32,32,115,108,105,100,101,114,115,91,50,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114, + 58,58,84,101,120,116,66,111,120,76,101,102,116,44,32,102,97,108,115,101,44,32,56,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100, + 101,114,115,91,50,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32,51,53,44,32,49,53,48,44,32,50,48,41,59,13,10,13, + 10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58, + 58,76,105,110,101,97,114,72,111,114,105,122,111,110,116,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116, + 84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,78,111,84,101,120,116,66,111,120,44,32,102,97,108,115,101,44,32, + 48,44,32,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32, + 54,53,44,32,49,53,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116,80,111,112,117,112,68, + 105,115,112,108,97,121,69,110,97,98,108,101,100,32,40,116,114,117,101,44,32,112,97,103,101,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115, + 91,51,93,45,62,115,101,116,84,101,120,116,86,97,108,117,101,83,117,102,102,105,120,32,40,84,40,34,32,110,117,110,115,32,114,101,113,117,105,114, + 101,100,32,116,111,32,99,104,97,110,103,101,32,97,32,108,105,103,104,116,98,117,108,98,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100, + 101,114,115,91,52,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,73,110,99,68,101,99,66,117, + 116,116,111,110,115,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,52,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101, + 32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,76,101,102,116,44,32,102,97,108,115,101,44,32,53,48,44,32,50,48,41,59,13,10, + 32,32,32,32,115,108,105,100,101,114,115,91,52,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32,49,48,53,44,32,49,48,48, + 44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,52,93,45,62,115,101,116,73,110,99,68,101,99,66,117,116,116,111,110,115, + 77,111,100,101,32,40,83,108,105,100,101,114,58,58,105,110,99,68,101,99,66,117,116,116,111,110,115,68,114,97,103,103,97,98,108,101,95,86,101,114, + 116,105,99,97,108,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108, + 101,32,40,83,108,105,100,101,114,58,58,82,111,116,97,114,121,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116, + 82,111,116,97,114,121,80,97,114,97,109,101,116,101,114,115,32,40,102,108,111,97,116,95,80,105,32,42,32,49,46,50,102,44,32,102,108,111,97,116, + 95,80,105,32,42,32,50,46,56,102,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116, + 84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,82,105,103,104,116,44,32,102,97,108,115, + 101,44,32,55,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116,66,111,117,110,100,115,32,40, + 49,57,48,44,32,49,52,53,44,32,49,50,48,44,32,52,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116, + 84,101,120,116,86,97,108,117,101,83,117,102,102,105,120,32,40,84,40,34,32,109,109,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101, + 114,115,91,54,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,66,97,114, + 41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,54,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32,49,57,53,44, + 32,49,48,48,44,32,51,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,54,93,45,62,115,101,116,84,101,120,116,86,97,108,117,101, + 83,117,102,102,105,120,32,40,84,40,34,32,103,97,108,108,111,110,115,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,55, + 93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,119,111,86,97,108,117,101,72,111,114,105,122, + 111,110,116,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,55,93,45,62,115,101,116,66,111,117,110,100,115,32,40,51,54,48,44, + 32,50,48,44,32,49,54,48,44,32,52,48,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,56,93,45,62,115,101,116,83,108,105, + 100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,119,111,86,97,108,117,101,86,101,114,116,105,99,97,108,41,59,13,10,32,32, + 32,32,115,108,105,100,101,114,115,91,56,93,45,62,115,101,116,66,111,117,110,100,115,32,40,51,54,48,44,32,49,49,48,44,32,52,48,44,32,49, + 54,48,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,57,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40, + 83,108,105,100,101,114,58,58,84,104,114,101,101,86,97,108,117,101,72,111,114,105,122,111,110,116,97,108,41,59,13,10,32,32,32,32,115,108,105,100, + 101,114,115,91,57,93,45,62,115,101,116,66,111,117,110,100,115,32,40,51,54,48,44,32,55,48,44,32,49,54,48,44,32,52,48,41,59,13,10,13, + 10,32,32,32,32,115,108,105,100,101,114,115,91,49,48,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114, + 58,58,84,104,114,101,101,86,97,108,117,101,86,101,114,116,105,99,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,48,93,45, + 62,115,101,116,66,111,117,110,100,115,32,40,52,52,48,44,32,49,49,48,44,32,52,48,44,32,49,54,48,41,59,13,10,13,10,32,32,32,32,102, + 111,114,32,40,105,32,61,32,55,59,32,105,32,60,61,32,49,48,59,32,43,43,105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,115,108,105,100,101,114,115,91,105,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,78,111, + 84,101,120,116,66,111,120,44,32,102,97,108,115,101,44,32,48,44,32,48,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91, + 105,93,45,62,115,101,116,77,105,110,86,97,108,117,101,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109, + 40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,32,42,32,49,48,48,46,48,44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59,13, + 10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115,101,116,77,97,120,86,97,108,117,101,32,40,82,97,110,100,111,109, + 58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,32,42,32,49,48,48,46,48, + 44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115,101, + 116,80,111,112,117,112,68,105,115,112,108,97,121,69,110,97,98,108,101,100,32,40,116,114,117,101,44,32,112,97,103,101,41,59,13,10,32,32,32,32, + 125,13,10,13,10,32,32,32,32,76,97,98,101,108,42,32,108,97,98,101,108,32,61,32,110,101,119,32,76,97,98,101,108,32,40,84,40,34,104,105, + 110,116,34,41,44,32,84,40,34,84,114,121,32,114,105,103,104,116,45,99,108,105,99,107,105,110,103,32,111,110,32,97,32,115,108,105,100,101,114,32, + 102,111,114,32,97,110,32,111,112,116,105,111,110,115,32,109,101,110,117,46,32,92,110,92,110,65,108,115,111,44,32,104,111,108,100,105,110,103,32,100, + 111,119,110,32,67,84,82,76,32,119,104,105,108,101,32,100,114,97,103,103,105,110,103,32,119,105,108,108,32,116,117,114,110,32,111,110,32,97,32,115, + 108,105,100,101,114,39,115,32,118,101,108,111,99,105,116,121,45,115,101,110,115,105,116,105,118,101,32,109,111,100,101,34,41,41,59,13,10,32,32,32, + 32,108,97,98,101,108,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,44,32,50,52,53,44,32,51,53,48,44,32,49,53,48,41,59,13,10, + 32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,108,97,98,101,108,41,59,13,10,13,10, + 32,32,32,32,114,101,116,117,114,110,32,112,97,103,101,59,13,10,125,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,115,116,97,116,105,99,32,67,111,109,112,111,110,101,110, + 116,42,32,99,114,101,97,116,101,82,97,100,105,111,66,117,116,116,111,110,80,97,103,101,40,41,13,10,123,13,10,32,32,32,32,68,101,109,111,80, + 97,103,101,67,111,109,112,42,32,112,97,103,101,32,61,32,110,101,119,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,59,13,10,13,10,32, + 32,32,32,71,114,111,117,112,67,111,109,112,111,110,101,110,116,42,32,103,114,111,117,112,32,61,32,110,101,119,32,71,114,111,117,112,67,111,109,112, + 111,110,101,110,116,32,40,84,40,34,103,114,111,117,112,34,41,44,32,84,40,34,114,97,100,105,111,32,98,117,116,116,111,110,115,34,41,41,59,13, + 10,32,32,32,32,103,114,111,117,112,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,44,32,50,48,44,32,50,50,48,44,32,49,52,48,41, + 59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,103,114,111,117,112,41,59,13, + 10,13,10,32,32,32,32,105,110,116,32,105,59,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32,60,32,52,59,32,43,43, + 105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,84,111,103,103,108,101,66,117,116,116,111,110,42,32,116,98,32,61,32,110,101, + 119,32,84,111,103,103,108,101,66,117,116,116,111,110,32,40,84,40,34,114,97,100,105,111,32,98,117,116,116,111,110,32,35,34,41,32,43,32,83,116, + 114,105,110,103,32,40,105,32,43,32,49,41,41,59,13,10,32,32,32,32,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101, + 86,105,115,105,98,108,101,32,40,116,98,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,82,97,100,105,111,71,114,111,117,112, + 73,100,32,40,49,50,51,52,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,66,111,117,110,100,115,32,40,52,53,44,32,52, + 54,32,43,32,105,32,42,32,50,50,44,32,49,56,48,44,32,50,50,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,84,111, + 111,108,116,105,112,32,40,84,40,34,97,32,115,101,116,32,111,102,32,109,117,116,117,97,108,108,121,45,101,120,99,108,117,115,105,118,101,32,114,97, + 100,105,111,32,98,117,116,116,111,110,115,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61,61,32,48,41,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114,117,101,44,32,102,97, + 108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32,60,32,52,59,32,43, + 43,105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,80,97,116,104,32,110,111,114,109,97,108,44, + 32,111,118,101,114,59,13,10,13,10,32,32,32,32,32,32,32,32,80,97,116,104,32,112,59,13,10,32,32,32,32,32,32,32,32,112,46,97,100,100, + 83,116,97,114,32,40,48,46,48,102,44,32,48,46,48,102,44,32,105,32,43,32,53,44,32,50,48,46,48,102,44,32,53,48,46,48,102,44,32,45, + 48,46,50,102,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,80,97,116,104,32,40,112,41,59,13,10,32,32,32, + 32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,83,111,108,105,100,70,105,108,108,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116, + 98,108,117,101,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,79,117,116,108,105,110,101,32,40,52,46,48,102,44, + 32,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,80,97,116, + 104,32,40,112,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,83,111,108,105,100,70,105,108,108,32,40,67,111,108,111,117, + 114,115,58,58,98,108,117,101,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,79,117,116,108,105,110,101,32,40,52,46,48, + 102,44,32,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,66, + 117,116,116,111,110,42,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,83,116,114,105,110,103,32,40, + 105,32,43,32,53,41,32,43,32,84,40,34,32,112,111,105,110,116,115,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73, + 109,97,103,101,65,98,111,118,101,84,101,120,116,76,97,98,101,108,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97, + 103,101,115,32,40,38,110,111,114,109,97,108,44,32,38,111,118,101,114,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,112,97,103,101, + 45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115, + 101,116,67,108,105,99,107,105,110,103,84,111,103,103,108,101,115,83,116,97,116,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32, + 100,98,45,62,115,101,116,82,97,100,105,111,71,114,111,117,112,73,100,32,40,50,51,52,53,54,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 99,111,110,115,116,32,105,110,116,32,98,117,116,116,111,110,83,105,122,101,32,61,32,53,48,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62, + 115,101,116,66,111,117,110,100,115,32,40,50,53,32,43,32,105,32,42,32,98,117,116,116,111,110,83,105,122,101,44,32,49,56,48,44,32,98,117,116, + 116,111,110,83,105,122,101,44,32,98,117,116,116,111,110,83,105,122,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61, + 61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114, + 117,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32, + 60,32,52,59,32,43,43,105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,116,98, + 32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,98,117,116,116,111,110,32,34,41,32,43,32,83,116,114,105,110,103, + 32,40,105,32,43,32,49,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105, + 115,105,98,108,101,32,40,116,98,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,67,108,105,99,107,105,110,103,84,111,103,103, + 108,101,115,83,116,97,116,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,82,97,100,105,111,71,114, + 111,117,112,73,100,32,40,51,52,53,54,55,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,67,111,108,111,117,114,32,40,84, + 101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,119,104,105,116, + 101,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58, + 98,117,116,116,111,110,79,110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,98,108,117,101,118,105,111,108,101,116,46,98,114, + 105,103,104,116,101,114,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,32, + 43,32,105,32,42,32,53,53,44,32,50,54,48,44,32,53,53,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116, + 67,111,110,110,101,99,116,101,100,69,100,103,101,115,32,40,40,40,105,32,33,61,32,48,41,32,63,32,66,117,116,116,111,110,58,58,67,111,110,110, + 101,99,116,101,100,79,110,76,101,102,116,32,58,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,124,32,40,40,105,32,33,61,32,51,41,32,63,32,66,117,116,116,111,110,58,58,67,111,110,110,101,99,116,101, + 100,79,110,82,105,103,104,116,32,58,32,48,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61,61,32,48,41,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114,117,101,44,32,102,97, + 108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,114,101,116,117,114,110,32,112,97,103,101,59,13,10,125,13,10,13,10,47, + 47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13, + 10,99,108,97,115,115,32,66,117,116,116,111,110,115,80,97,103,101,32,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115, + 116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,66,117,116,116,111,110,115,80,97,103,101,32,40,66,117,116,116, + 111,110,76,105,115,116,101,110,101,114,42,32,98,117,116,116,111,110,76,105,115,116,101,110,101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,115,111,109,101,32,100,114,97,119,97,98,108,101,115,32,116, + 111,32,117,115,101,32,102,111,114,32,111,117,114,32,100,114,97,119,97,98,108,101,32,98,117,116,116,111,110,115,46,46,46,13,10,32,32,32,32,32, + 32,32,32,68,114,97,119,97,98,108,101,80,97,116,104,32,110,111,114,109,97,108,44,32,111,118,101,114,59,13,10,13,10,32,32,32,32,32,32,32, + 32,80,97,116,104,32,112,59,13,10,32,32,32,32,32,32,32,32,112,46,97,100,100,83,116,97,114,32,40,48,46,48,102,44,32,48,46,48,102,44, + 32,53,44,32,50,48,46,48,102,44,32,53,48,46,48,102,44,32,48,46,50,102,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108, + 46,115,101,116,80,97,116,104,32,40,112,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,83,111,108,105,100,70,105, + 108,108,32,40,67,111,108,111,117,114,115,58,58,114,101,100,41,59,13,10,13,10,32,32,32,32,32,32,32,32,112,46,99,108,101,97,114,40,41,59, + 13,10,32,32,32,32,32,32,32,32,112,46,97,100,100,83,116,97,114,32,40,48,46,48,102,44,32,48,46,48,102,44,32,55,44,32,51,48,46,48, + 102,44,32,53,48,46,48,102,44,32,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,80,97,116,104,32,40, + 112,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,83,111,108,105,100,70,105,108,108,32,40,67,111,108,111,117,114,115,58, + 58,112,105,110,107,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,79,117,116,108,105,110,101,32,40,53,46,48,102,44,32, + 67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,73,109,97,103, + 101,32,100,111,119,110,59,13,10,32,32,32,32,32,32,32,32,100,111,119,110,46,115,101,116,73,109,97,103,101,32,40,73,109,97,103,101,67,97,99, + 104,101,58,58,103,101,116,70,114,111,109,77,101,109,111,114,121,32,40,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,44, + 32,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,44,32,116,114,117,101,41,59,13,10,32,32,32,32, + 32,32,32,32,100,111,119,110,46,115,101,116,79,118,101,114,108,97,121,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99, + 107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,51,102,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32, + 32,32,47,47,32,99,114,101,97,116,101,32,97,110,32,105,109,97,103,101,45,97,98,111,118,101,45,116,101,120,116,32,98,117,116,116,111,110,32,102, + 114,111,109,32,116,104,101,115,101,32,100,114,97,119,97,98,108,101,115,46,46,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,66, + 117,116,116,111,110,42,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,84,40,34,66,117,116,116,111, + 110,32,49,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,65,98,111,118,101,84,101,120,116,76,97,98, + 101,108,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97,103,101,115,32,40,38,110,111,114,109,97,108,44,32,38,111, + 118,101,114,44,32,38,100,111,119,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108, + 101,32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,51,48,44,32, + 56,48,44,32,56,48,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,104,105, + 115,32,105,115,32,97,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,119,105,116,104,32,97,32,108,97,98,101,108,34,41,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,110,32,105,109,97,103,101,45,111, + 110,108,121,32,98,117,116,116,111,110,32,102,114,111,109,32,116,104,101,115,101,32,100,114,97,119,97,98,108,101,115,46,46,13,10,32,32,32,32,32, + 32,32,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,84,40,34,66,117,116,116,111,110,32,50,34, + 41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,70,105,116,116,101,100,41,59,13,10,32,32,32,32,32,32, + 32,32,100,98,45,62,115,101,116,73,109,97,103,101,115,32,40,38,110,111,114,109,97,108,44,32,38,111,118,101,114,44,32,38,100,111,119,110,41,59, + 13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,67,108,105,99,107,105,110,103,84,111,103,103,108,101,115,83,116,97,116,101,32,40,116, + 114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,100,98,41,59, + 13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,57,48,44,32,51,48,44,32,56,48,44,32,56,48,41, + 59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,104,105,115,32,105,115,32,97,110, + 32,105,109,97,103,101,45,111,110,108,121,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,34,41,41,59,13,10,32,32,32,32,32,32,32,32, + 100,98,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,98,117,116,116,111,110,76,105,115,116,101,110,101,114,41,59,13, + 10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,110,32,105,109,97,103,101,45, + 111,110,45,98,117,116,116,111,110,45,115,104,97,112,101,32,98,117,116,116,111,110,32,102,114,111,109,32,116,104,101,32,115,97,109,101,32,100,114,97, + 119,97,98,108,101,115,46,46,13,10,32,32,32,32,32,32,32,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111, + 110,32,40,84,40,34,66,117,116,116,111,110,32,51,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,79, + 110,66,117,116,116,111,110,66,97,99,107,103,114,111,117,110,100,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97,103, + 101,115,32,40,38,110,111,114,109,97,108,44,32,48,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107, + 101,86,105,115,105,98,108,101,32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,50, + 48,48,44,32,51,48,44,32,49,49,48,44,32,50,53,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105, + 112,32,40,84,40,34,116,104,105,115,32,105,115,32,97,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,111,110,32,97,32,115,116,97,110, + 100,97,114,100,32,98,117,116,116,111,110,32,98,97,99,107,103,114,111,117,110,100,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10, + 32,32,32,32,32,32,32,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,84,40,34,66,117,116,116, + 111,110,32,52,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,79,110,66,117,116,116,111,110,66,97,99, + 107,103,114,111,117,110,100,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97,103,101,115,32,40,38,110,111,114,109,97, + 108,44,32,38,111,118,101,114,44,32,38,100,111,119,110,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,67,108,105,99,107,105, + 110,103,84,111,103,103,108,101,115,83,116,97,116,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66, + 97,99,107,103,114,111,117,110,100,67,111,108,111,117,114,115,32,40,67,111,108,111,117,114,115,58,58,119,104,105,116,101,44,32,67,111,108,111,117,114, + 115,58,58,121,101,108,108,111,119,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,48,44,32,55,48,44,32, + 53,48,44,32,53,48,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,104,105, + 115,32,105,115,32,97,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,111,110,32,97,32,115,116,97,110,100,97,114,100,32,98,117,116,116, + 111,110,32,98,97,99,107,103,114,111,117,110,100,34,41,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,97,100,100,66,117,116,116,111,110, + 76,105,115,116,101,110,101,114,32,40,98,117,116,116,111,110,76,105,115,116,101,110,101,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10, + 32,32,32,32,32,32,32,32,72,121,112,101,114,108,105,110,107,66,117,116,116,111,110,42,32,104,121,112,101,114,108,105,110,107,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,61,32,110,101,119,32,72,121,112,101,114,108,105,110,107,66,117,116,116,111,110,32,40,84,40,34,116,104,105,115,32,105, + 115,32,97,32,72,121,112,101,114,108,105,110,107,66,117,116,116,111,110,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,85,82,76,32,40,84,40,34,104,116,116,112,58,47,47,119,119,119,46,114, + 97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109,47,106,117,99,101,34,41,41,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,104,121,112,101,114,108,105,110,107,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,49,51,48,44,32,50,48,48,44,32, + 50,52,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,104,121,112,101,114,108,105, + 110,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,73,109,97,103,101,66,117,116,116,111,110,42,32,105, + 109,97,103,101,66,117,116,116,111,110,32,61,32,110,101,119,32,73,109,97,103,101,66,117,116,116,111,110,32,40,84,40,34,105,109,97,103,101,98,117, + 116,116,111,110,34,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,105,109,97, + 103,101,66,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,73,109,97,103,101,42,32,106,117,99,101,73,109,97,103,101,32,61, + 32,73,109,97,103,101,67,97,99,104,101,58,58,103,101,116,70,114,111,109,77,101,109,111,114,121,32,40,66,105,110,97,114,121,68,97,116,97,58,58, + 106,117,99,101,95,112,110,103,44,32,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,59,13,10,32,32, + 32,32,32,32,32,32,73,109,97,103,101,67,97,99,104,101,58,58,105,110,99,82,101,102,101,114,101,110,99,101,67,111,117,110,116,32,40,106,117,99, + 101,73,109,97,103,101,41,59,13,10,32,32,32,32,32,32,32,32,73,109,97,103,101,67,97,99,104,101,58,58,105,110,99,82,101,102,101,114,101,110, + 99,101,67,111,117,110,116,32,40,106,117,99,101,73,109,97,103,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,66,117,116, + 116,111,110,45,62,115,101,116,73,109,97,103,101,115,32,40,116,114,117,101,44,32,116,114,117,101,44,32,116,114,117,101,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,73,109,97,103,101,44,32,48,46, + 55,102,44,32,67,111,108,111,117,114,115,58,58,116,114,97,110,115,112,97,114,101,110,116,66,108,97,99,107,44,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,73,109,97,103,101,44,32,49,46,48,102,44, + 32,67,111,108,111,117,114,115,58,58,116,114,97,110,115,112,97,114,101,110,116,66,108,97,99,107,44,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,73,109,97,103,101,44,32,49,46,48,102,44,32,67,111, + 108,111,117,114,115,58,58,112,105,110,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,56,102,41,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,46,53,102,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,105,109,97,103,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,49,48,44,32,49,54, + 48,41,59,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,66,117,116,116,111,110,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40, + 34,105,109,97,103,101,32,98,117,116,116,111,110,32,45,32,115,104,111,119,105,110,103,32,97,108,112,104,97,45,99,104,97,110,110,101,108,32,104,105, + 116,45,116,101,115,116,105,110,103,32,97,110,100,32,99,111,108,111,117,114,32,111,118,101,114,108,97,121,32,119,104,101,110,32,99,108,105,99,107,101, + 100,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,67,111,108,111,117,114,67,104,97,110,103,101,66, + 117,116,116,111,110,42,32,99,111,108,111,117,114,67,104,97,110,103,101,66,117,116,116,111,110,32,61,32,110,101,119,32,67,111,108,111,117,114,67,104, + 97,110,103,101,66,117,116,116,111,110,40,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,99,111,108,111,117,114,67,104,97,110,103,101,66,117,116,116,111,110,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,67,104, + 97,110,103,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,51,53,48,44,32,51,48,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,97,110,105,109,97,116,101,66,117,116,116,111,110,32,61,32,110, + 101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,99,108,105,99,107,32,116,111,32,97,110,105,109,97,116,101,46,46,46,34,41,41, + 59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,97,110,105,109,97,116,101,66,117,116, + 116,111,110,41,59,13,10,32,32,32,32,32,32,32,32,97,110,105,109,97,116,101,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116, + 104,84,111,70,105,116,84,101,120,116,32,40,50,52,41,59,13,10,32,32,32,32,32,32,32,32,97,110,105,109,97,116,101,66,117,116,116,111,110,45, + 62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,51,53,48,44,32,55,48,41,59,13,10,32,32,32,32,32,32,32,32, + 97,110,105,109,97,116,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59, + 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,66,117,116,116,111,110,115,80,97,103,101,40,41,13,10,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32, + 32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,41,13,10,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115, + 40,41,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105, + 102,32,40,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,105,41,32,33,61,32,97,110,105,109,97,116,101,66,117,116,116,111, + 110,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,110,105,109,97, + 116,111,114,46,97,110,105,109,97,116,101,67,111,109,112,111,110,101,110,116,32,40,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32, + 40,105,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,82,101,99,116,97,110,103,108,101,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110, + 100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,87,105,100,116,104,40,41,32,47,32,50,41,44,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116, + 32,40,103,101,116,72,101,105,103,104,116,40,41,32,47,32,50,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,54,48,32,43,32, + 82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,87,105, + 100,116,104,40,41,32,47,32,51,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,54,32,43,32,82,97,110,100,111,109,58,58, + 103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,72,101,105,103,104,116,40,41,32,47, + 32,54,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,53,48,48,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40, + 41,46,110,101,120,116,73,110,116,32,40,50,48,48,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82, + 97,110,100,111,109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115, + 116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,84,101,120, + 116,66,117,116,116,111,110,42,32,97,110,105,109,97,116,101,66,117,116,116,111,110,59,13,10,32,32,32,32,67,111,109,112,111,110,101,110,116,65,110, + 105,109,97,116,111,114,32,97,110,105,109,97,116,111,114,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,115,116,97,116,105,99,32,67,111,109,112,111, + 110,101,110,116,42,32,99,114,101,97,116,101,77,105,115,99,80,97,103,101,40,41,13,10,123,13,10,32,32,32,32,68,101,109,111,80,97,103,101,67, + 111,109,112,42,32,112,97,103,101,32,61,32,110,101,119,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,59,13,10,13,10,32,32,32,32,84, + 101,120,116,69,100,105,116,111,114,42,32,116,101,120,116,69,100,105,116,111,114,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,40,41, + 59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,101,120,116,69,100,105,116, + 111,114,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,50,53,44, + 32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115,101,116,84,101,120,116,32,40,84,40,34, + 115,105,110,103,108,101,45,108,105,110,101,32,116,101,120,116,32,98,111,120,34,41,41,59,13,10,13,10,32,32,32,32,116,101,120,116,69,100,105,116, + 111,114,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,112,97,115,115,119,111,114,100,34,41,44,32,40,116,99,104, + 97,114,41,32,48,120,50,48,50,50,41,59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108, + 101,32,40,116,101,120,116,69,100,105,116,111,114,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115,101,116,66,111,117,110, + 100,115,32,40,49,48,44,32,53,53,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115, + 101,116,84,101,120,116,32,40,84,40,34,112,97,115,115,119,111,114,100,34,41,41,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,67,111,109, + 98,111,66,111,120,42,32,99,111,109,98,111,66,111,120,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120,32,40,84,40,34,99,111,109,98,111, + 34,41,41,59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,109,98,111, + 66,111,120,41,59,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,66,111,117,110,100,115,32,40,51,48,48,44,32,50,53,44, + 32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,69,100,105,116,97,98,108,101,84,101,120, + 116,32,40,116,114,117,101,41,59,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,74,117,115,116,105,102,105,99,97,116,105,111, + 110,84,121,112,101,32,40,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,41,59,13,10,13,10,32,32,32,32,105, + 110,116,32,105,59,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,49,59,32,105,32,60,32,49,48,48,59,32,43,43,105,41,13,10,32,32, + 32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,99,111,109,98,111,32,98,111,120,32,105,116, + 101,109,32,34,41,32,43,32,83,116,114,105,110,103,32,40,105,41,44,32,105,41,59,13,10,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45, + 62,115,101,116,83,101,108,101,99,116,101,100,73,100,32,40,49,41,59,13,10,13,10,32,32,32,32,68,114,97,103,79,110,116,111,68,101,115,107,116, + 111,112,68,101,109,111,67,111,109,112,42,32,100,32,61,32,110,101,119,32,68,114,97,103,79,110,116,111,68,101,115,107,116,111,112,68,101,109,111,67, + 111,109,112,32,40,112,97,103,101,41,59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,100,41,59,13,10,32,32,32,32,100,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,44,32,49,48,48,44,32,50,48,48,44,32,56, + 48,41,59,13,10,13,10,32,32,32,32,114,101,116,117,114,110,32,112,97,103,101,59,13,10,125,13,10,13,10,47,47,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,84,111, + 111,108,98,97,114,68,101,109,111,67,111,109,112,32,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,83,108,105,100,101,114,76,105,115,116, + 101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32, + 66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,84,111,111,108,98,97,114,68, + 101,109,111,67,111,109,112,32,40,65,112,112,108,105,99,97,116,105,111,110,67,111,109,109,97,110,100,77,97,110,97,103,101,114,42,32,99,111,109,109, + 97,110,100,77,97,110,97,103,101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,67,114,101,97,116,101,32,97,110, + 100,32,97,100,100,32,116,104,101,32,116,111,111,108,98,97,114,46,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101, + 86,105,115,105,98,108,101,32,40,116,111,111,108,98,97,114,32,61,32,110,101,119,32,84,111,111,108,98,97,114,40,41,41,59,13,10,13,10,32,32, + 32,32,32,32,32,32,47,47,32,65,110,100,32,117,115,101,32,111,117,114,32,105,116,101,109,32,102,97,99,116,111,114,121,32,116,111,32,97,100,100, + 32,97,32,115,101,116,32,111,102,32,100,101,102,97,117,108,116,32,105,99,111,110,115,32,116,111,32,105,116,46,46,46,13,10,32,32,32,32,32,32, + 32,32,116,111,111,108,98,97,114,45,62,97,100,100,68,101,102,97,117,108,116,73,116,101,109,115,32,40,102,97,99,116,111,114,121,41,59,13,10,13, + 10,32,32,32,32,32,32,32,32,47,47,32,78,111,119,32,119,101,39,108,108,32,106,117,115,116,32,99,114,101,97,116,101,32,116,104,101,32,111,116, + 104,101,114,32,115,108,105,100,101,114,115,32,97,110,100,32,98,117,116,116,111,110,115,32,111,110,32,116,104,101,32,100,101,109,111,32,112,97,103,101, + 44,32,119,104,105,99,104,32,97,100,106,117,115,116,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,116,111,111,108,98,97,114,39,115, + 32,112,114,111,112,101,114,116,105,101,115,46,46,46,13,10,32,32,32,32,32,32,32,32,76,97,98,101,108,42,32,105,110,102,111,32,61,32,110,101, + 119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,65,115, + 32,119,101,108,108,32,97,115,32,115,104,111,119,105,110,103,32,111,102,102,32,116,111,111,108,98,97,114,115,44,32,116,104,105,115,32,100,101,109,111, + 32,105,108,108,117,115,116,114,97,116,101,115,32,104,111,119,32,116,111,32,115,116,111,114,101,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,34,97,32,115,101,116,32,111,102,32,83,86,71,32,102,105,108,101,115,32,105,110,32,97,32,90,105,112,32,102,105,108,101,44,32,101,109,98,101, + 100,32,116,104,97,116,32,105,110,32,121,111,117,114,32,97,112,112,108,105,99,97,116,105,111,110,44,32,97,110,100,32,114,101,97,100,32,34,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,34,116,104,101,109,32,98,97,99,107,32,105,110,32,97,116,32,114,117,110,116,105,109,101,46,92,110,92, + 110,84,104,101,32,105,99,111,110,32,105,109,97,103,101,115,32,104,101,114,101,32,97,114,101,32,116,97,107,101,110,32,102,114,111,109,32,116,104,101, + 32,111,112,101,110,45,115,111,117,114,99,101,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,84,97,110,103,111,32,105,99,111,110,32, + 112,114,111,106,101,99,116,46,34,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,105,110,102,111,41,59,13,10,32,32,32,32,32,32,32,32,105,110,102,111,45,62,115,101,116,74,117,115,116,105,102,105,99,97,116,105,111,110, + 84,121,112,101,32,40,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,116,111,112,76,101,102,116,41,59,13,10,32,32,32,32,32,32,32,32, + 105,110,102,111,45,62,115,101,116,66,111,117,110,100,115,32,40,56,48,44,32,56,48,44,32,52,53,48,44,32,49,48,48,41,59,13,10,32,32,32, + 32,32,32,32,32,105,110,102,111,45,62,115,101,116,73,110,116,101,114,99,101,112,116,115,77,111,117,115,101,67,108,105,99,107,115,32,40,102,97,108, + 115,101,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,100,101,112,116,104,83,108,105,100,101,114,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,116,111,111,108,98,97,114,32,100, + 101,112,116,104,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103, + 101,32,40,49,48,46,48,44,32,50,48,48,46,48,44,32,49,46,48,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100, + 101,114,45,62,115,101,116,86,97,108,117,101,32,40,53,48,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104, + 83,108,105,100,101,114,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,72,111, + 114,105,122,111,110,116,97,108,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,115,101,116,84,101,120,116, + 66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,76,101,102,116,44,32,102,97,108,115,101,44,32,56,48, + 44,32,50,48,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,97,100,100,76,105,115,116,101,110,101,114, + 32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115, + 32,40,56,48,44,32,50,49,48,44,32,51,48,48,44,32,50,50,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108, + 32,40,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,78,97,109,101,40,41,44,32,100,101,112,116,104,83,108,105,100,101,114,45,62,103, + 101,116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,100,101,112,116,104,83,108,105,100, + 101,114,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, + 32,40,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40, + 34,118,101,114,116,105,99,97,108,47,104,111,114,105,122,111,110,116,97,108,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,111,114,105,101,110, + 116,97,116,105,111,110,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13, + 10,32,32,32,32,32,32,32,32,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84, + 111,70,105,116,84,101,120,116,32,40,50,50,41,59,13,10,32,32,32,32,32,32,32,32,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111, + 110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,88, + 40,41,44,32,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,66,111,116,116,111,109,40,41,32,43,32,50,48,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,117,115,116,111,109,105,115,101,66,117,116,116,111, + 110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,99,117,115,116,111,109,105,115,101,46,46,46,34,41,41,41,59, + 13,10,32,32,32,32,32,32,32,32,99,117,115,116,111,109,105,115,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116, + 101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,99,117,115,116,111,109,105,115,101,66,117,116,116,111,110,45,62,99, + 104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,32,40,50,50,41,59,13,10,32,32,32,32,32,32,32,32,99,117,115,116,111, + 109,105,115,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,111,114,105,101,110,116,97,116, + 105,111,110,66,117,116,116,111,110,45,62,103,101,116,82,105,103,104,116,40,41,32,43,32,50,48,44,32,111,114,105,101,110,116,97,116,105,111,110,66, + 117,116,116,111,110,45,62,103,101,116,89,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,84,111,111,108,98,97,114,68,101, + 109,111,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114, + 101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32, + 123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,111,111,108,98,97,114,45,62,105,115,86,101,114,116,105,99,97,108,40,41,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,101,116,66,111,117,110,100,115,32,40,48,44,32,48,44,32,40,105,110, + 116,41,32,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,44,32,103,101,116,72,101,105,103,104,116,40,41,41, + 59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,101, + 116,66,111,117,110,100,115,32,40,48,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,44,32,40,105,110,116,41,32,100,101,112,116,104,83,108, + 105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,108, + 105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,32,40,83,108,105,100,101,114,42,32,115,108,105,100,101,114,41,13,10,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32, + 98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32, + 32,32,32,32,32,32,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111,110,41,13, + 10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,101,116,86,101,114,116, + 105,99,97,108,32,40,33,32,116,111,111,108,98,97,114,45,62,105,115,86,101,114,116,105,99,97,108,40,41,41,59,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101, + 32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,99,117,115,116,111,109,105,115,101,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,104,111,119,67,117,115,116,111,109,105,115,97,116,105, + 111,110,68,105,97,108,111,103,32,40,102,97,99,116,111,114,121,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13, + 10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,84,111,111,108,98,97,114,42,32,116,111,111,108,98,97,114,59,13,10,32,32,32,32,83,108, + 105,100,101,114,42,32,100,101,112,116,104,83,108,105,100,101,114,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,111,114,105,101, + 110,116,97,116,105,111,110,66,117,116,116,111,110,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,99,117,115,116,111,109,105,115, + 101,66,117,116,116,111,110,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,99,108,97,115,115,32,68,101,109,111,84,111,111,108,98,97,114,73, + 116,101,109,70,97,99,116,111,114,121,32,32,32,58,32,112,117,98,108,105,99,32,84,111,111,108,98,97,114,73,116,101,109,70,97,99,116,111,114,121, + 13,10,32,32,32,32,123,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101,109,111,84,111,111,108,98,97, + 114,73,116,101,109,70,97,99,116,111,114,121,40,41,32,123,125,13,10,32,32,32,32,32,32,32,32,126,68,101,109,111,84,111,111,108,98,97,114,73, + 116,101,109,70,97,99,116,111,114,121,40,41,32,123,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32, + 69,97,99,104,32,116,121,112,101,32,111,102,32,105,116,101,109,32,97,32,116,111,111,108,98,97,114,32,99,97,110,32,99,111,110,116,97,105,110,32, + 109,117,115,116,32,98,101,32,103,105,118,101,110,32,97,32,117,110,105,113,117,101,32,73,68,46,32,84,104,101,115,101,13,10,32,32,32,32,32,32, + 32,32,47,47,32,97,114,101,32,116,104,101,32,111,110,101,115,32,119,101,39,108,108,32,117,115,101,32,105,110,32,116,104,105,115,32,100,101,109,111, + 46,13,10,32,32,32,32,32,32,32,32,101,110,117,109,32,68,101,109,111,84,111,111,108,98,97,114,73,116,101,109,73,100,115,13,10,32,32,32,32, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,111,99,95,110,101,119,32,32,32,32,32,32,32,32,32,61,32,49,44,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,100,111,99,95,111,112,101,110,32,32,32,32,32,32,32,32,61,32,50,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,100,111,99,95,115,97,118,101,32,32,32,32,32,32,32,32,61,32,51,44,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,100,111,99,95,115,97,118,101,65,115,32,32,32,32,32,32,61,32,52,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,100,105,116,95, + 99,111,112,121,32,32,32,32,32,32,32,61,32,53,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,100,105,116,95,99,117,116,32,32,32, + 32,32,32,32,32,61,32,54,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,100,105,116,95,112,97,115,116,101,32,32,32,32,32,32,61, + 32,55,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,76,111,103,111,66,117,116,116,111,110,32,32,61,32,56,44,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,99,117,115,116,111,109,67,111,109,98,111,66,111,120,32,32,61,32,57,13,10,32,32,32,32,32,32,32,32, + 125,59,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,103,101,116,65,108,108,84,111,111,108,98,97,114,73,116,101,109,73,100,115,32, + 40,65,114,114,97,121,32,60,105,110,116,62,38,32,105,100,115,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,47,47,32,84,104,105,115,32,114,101,116,117,114,110,115,32,116,104,101,32,99,111,109,112,108,101,116,101,32,108,105,115,116,32,111,102,32, + 97,108,108,32,105,116,101,109,32,73,68,115,32,116,104,97,116,32,97,114,101,32,97,108,108,111,119,101,100,32,116,111,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,47,47,32,103,111,32,105,110,32,111,117,114,32,116,111,111,108,98,97,114,46,32,65,110,121,32,105,116,101,109,115,32,121,111, + 117,32,109,105,103,104,116,32,119,97,110,116,32,116,111,32,97,100,100,32,109,117,115,116,32,98,101,32,108,105,115,116,101,100,32,104,101,114,101,46, + 32,84,104,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,111,114,100,101,114,32,105,110,32,119,104,105,99,104,32,116,104,101,121, + 32,97,114,101,32,108,105,115,116,101,100,32,119,105,108,108,32,98,101,32,117,115,101,100,32,98,121,32,116,104,101,32,116,111,111,108,98,97,114,32, + 99,117,115,116,111,109,105,115,97,116,105,111,110,32,112,97,110,101,108,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46, + 97,100,100,32,40,100,111,99,95,110,101,119,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99, + 95,111,112,101,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,41,59, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,65,115,41,59,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,99,111,112,121,41,59,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,99,117,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46, + 97,100,100,32,40,101,100,105,116,95,112,97,115,116,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40, + 106,117,99,101,76,111,103,111,66,117,116,116,111,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,99, + 117,115,116,111,109,67,111,109,98,111,66,111,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,73,102,32,121,111,117, + 39,114,101,32,103,111,105,110,103,32,116,111,32,117,115,101,32,115,101,112,97,114,97,116,111,114,115,44,32,116,104,101,110,32,116,104,101,121,32,109, + 117,115,116,32,97,108,115,111,32,98,101,32,97,100,100,101,100,32,101,120,112,108,105,99,105,116,108,121,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,47,47,32,116,111,32,116,104,101,32,108,105,115,116,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40, + 115,101,112,97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115, + 112,97,99,101,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,102,108,101,120,105,98,108,101, + 83,112,97,99,101,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,103,101, + 116,68,101,102,97,117,108,116,73,116,101,109,83,101,116,32,40,65,114,114,97,121,32,60,105,110,116,62,38,32,105,100,115,41,13,10,32,32,32,32, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,84,104,105,115,32,114,101,116,117,114,110,115,32,97,110,32,111,114, + 100,101,114,101,100,32,108,105,115,116,32,111,102,32,116,104,101,32,115,101,116,32,111,102,32,105,116,101,109,115,32,116,104,97,116,32,109,97,107,101, + 32,117,112,32,97,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,111,111,108,98,97,114,39,115,32,100,101,102,97,117,108,116,32, + 115,101,116,46,32,78,111,116,32,97,108,108,32,105,116,101,109,115,32,110,101,101,100,32,116,111,32,98,101,32,111,110,32,116,104,105,115,32,108,105, + 115,116,44,32,97,110,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105,116,101,109,115,32,99,97,110,32,97,112,112,101,97,114, + 32,109,117,108,116,105,112,108,101,32,116,105,109,101,115,32,40,101,46,103,46,32,116,104,101,32,115,101,112,97,114,97,116,111,114,115,32,117,115,101, + 100,32,104,101,114,101,41,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,110,101,119,41,59, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,111,112,101,110,41,59,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,65,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97, + 100,100,32,40,115,112,97,99,101,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115,101,112, + 97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116, + 95,99,111,112,121,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,99,117,116,41,59, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,112,97,115,116,101,41,59,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115,101,112,97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,102,108,101,120,105,98,108,101,83,112,97,99,101,114,73,100,41,59,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,99,117,115,116,111,109,67,111,109,98,111,66,111,120,41,59,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,102,108,101,120,105,98,108,101,83,112,97,99,101,114,73,100,41,59,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115,101,112,97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,106,117,99,101,76,111,103,111,66,117,116,116,111,110,41,59,13,10,32,32,32,32,32, + 32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,84,111,111,108,98,97,114,73,116,101,109,67,111,109,112,111,110,101,110,116,42,32,99,114, + 101,97,116,101,73,116,101,109,32,40,99,111,110,115,116,32,105,110,116,32,105,116,101,109,73,100,41,13,10,32,32,32,32,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,105,116,101,109,73,100,41,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95,110,101,119,58,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71, + 32,40,105,116,101,109,73,100,44,32,84,40,34,110,101,119,34,41,44,32,84,40,34,100,111,99,117,109,101,110,116,45,110,101,119,46,115,118,103,34, + 41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95,111,112,101,110,58,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108, + 101,83,86,71,32,40,105,116,101,109,73,100,44,32,84,40,34,111,112,101,110,34,41,44,32,84,40,34,100,111,99,117,109,101,110,116,45,111,112,101, + 110,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95,115,97,118,101,58,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109, + 90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73,100,44,32,84,40,34,115,97,118,101,34,41,44,32,84,40,34,100,111,99,117,109,101, + 110,116,45,115,97,118,101,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95, + 115,97,118,101,65,115,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117, + 116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73,100,44,32,84,40,34,115,97,118,101,32,97,115,34,41, + 44,32,84,40,34,100,111,99,117,109,101,110,116,45,115,97,118,101,45,97,115,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,99,97,115,101,32,101,100,105,116,95,99,111,112,121,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101, + 116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73,100,44, + 32,84,40,34,99,111,112,121,34,41,44,32,84,40,34,101,100,105,116,45,99,111,112,121,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,99,97,115,101,32,101,100,105,116,95,99,117,116,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73, + 100,44,32,84,40,34,99,117,116,34,41,44,32,84,40,34,101,100,105,116,45,99,117,116,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,99,97,115,101,32,101,100,105,116,95,112,97,115,116,101,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101, + 109,73,100,44,32,84,40,34,112,97,115,116,101,34,41,44,32,84,40,34,101,100,105,116,45,112,97,115,116,101,46,115,118,103,34,41,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,106,117,99,101,76,111,103,111,66,117,116,116,111,110,58,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,111,111,108,98,97,114,66,117,116,116,111,110,32,40,105,116, + 101,109,73,100,44,32,84,40,34,106,117,99,101,33,34,41,44,32,68,114,97,119,97,98,108,101,58,58,99,114,101,97,116,101,70,114,111,109,73,109, + 97,103,101,68,97,116,97,32,40,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,44,32,66,105,110,97,114,121,68,97,116, + 97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115, + 101,32,99,117,115,116,111,109,67,111,109,98,111,66,111,120,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114, + 110,32,110,101,119,32,67,117,115,116,111,109,84,111,111,108,98,97,114,67,111,109,98,111,66,111,120,32,40,105,116,101,109,73,100,41,59,13,10,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98, + 114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117, + 114,110,32,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32,32, + 32,32,83,116,114,105,110,103,65,114,114,97,121,32,105,99,111,110,78,97,109,101,115,59,13,10,32,32,32,32,32,32,32,32,79,119,110,101,100,65, + 114,114,97,121,32,60,68,114,97,119,97,98,108,101,62,32,105,99,111,110,115,70,114,111,109,90,105,112,70,105,108,101,59,13,10,13,10,32,32,32, + 32,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,97,32,108,105,116,116,108,101,32,117,116,105,108,105,116,121,32,116,111,32,99,114,101,97, + 116,101,32,97,32,98,117,116,116,111,110,32,119,105,116,104,32,111,110,101,32,111,102,32,116,104,101,32,83,86,71,32,105,109,97,103,101,115,32,105, + 110,13,10,32,32,32,32,32,32,32,32,47,47,32,111,117,114,32,101,109,98,101,100,100,101,100,32,90,73,80,32,102,105,108,101,32,34,105,99,111, + 110,115,46,122,105,112,34,13,10,32,32,32,32,32,32,32,32,84,111,111,108,98,97,114,66,117,116,116,111,110,42,32,99,114,101,97,116,101,66,117, + 116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,99,111,110,115,116,32,105,110,116,32,105,116,101,109,73,100,44,32,99,111, + 110,115,116,32,83,116,114,105,110,103,38,32,116,101,120,116,44,32,99,111,110,115,116,32,83,116,114,105,110,103,38,32,102,105,108,101,110,97,109,101, + 41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,99,111,110,115,70,114,111,109,90, + 105,112,70,105,108,101,46,115,105,122,101,40,41,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,73,102,32,119,101,39,118,101,32,110,111,116,32,97,108,114,101,97,100,121,32,100,111,110,101, + 32,115,111,44,32,108,111,97,100,32,97,108,108,32,116,104,101,32,105,109,97,103,101,115,32,102,114,111,109,32,116,104,101,32,122,105,112,32,102,105, + 108,101,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,77,101,109,111,114,121,73,110,112,117,116,83,116,114,101,97,109,32, + 105,99,111,110,115,70,105,108,101,83,116,114,101,97,109,32,40,66,105,110,97,114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112,44,32, + 66,105,110,97,114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112,83,105,122,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,90,105,112,70,105,108,101,32,105,99,111,110,115,32,40,38,105,99,111,110,115,70,105,108,101,83,116,114, + 101,97,109,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116, + 32,105,32,61,32,48,59,32,105,32,60,32,105,99,111,110,115,46,103,101,116,78,117,109,69,110,116,114,105,101,115,40,41,59,32,43,43,105,41,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 73,110,112,117,116,83,116,114,101,97,109,42,32,115,118,103,70,105,108,101,83,116,114,101,97,109,32,61,32,105,99,111,110,115,46,99,114,101,97,116, + 101,83,116,114,101,97,109,70,111,114,69,110,116,114,121,32,40,105,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,105,102,32,40,115,118,103,70,105,108,101,83,116,114,101,97,109,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110, + 78,97,109,101,115,46,97,100,100,32,40,105,99,111,110,115,46,103,101,116,69,110,116,114,121,40,105,41,45,62,102,105,108,101,110,97,109,101,41,59, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110,115,70,114,111,109,90,105,112,70,105, + 108,101,46,97,100,100,32,40,68,114,97,119,97,98,108,101,58,58,99,114,101,97,116,101,70,114,111,109,73,109,97,103,101,68,97,116,97,83,116,114, + 101,97,109,32,40,42,115,118,103,70,105,108,101,83,116,114,101,97,109,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,118,103,70,105,108,101,83,116,114,101,97,109,59,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,42,32,105,109,97,103,101,32, + 61,32,105,99,111,110,115,70,114,111,109,90,105,112,70,105,108,101,32,91,105,99,111,110,78,97,109,101,115,46,105,110,100,101,120,79,102,32,40,102, + 105,108,101,110,97,109,101,41,93,45,62,99,114,101,97,116,101,67,111,112,121,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101, + 116,117,114,110,32,110,101,119,32,84,111,111,108,98,97,114,66,117,116,116,111,110,32,40,105,116,101,109,73,100,44,32,116,101,120,116,44,32,105,109, + 97,103,101,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,13,10,32,32,32,32,32, + 32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,68,101,109,111,110,115,116,114,97,116,101,115,32,104,111,119,32,116,111,32,112, + 117,116,32,97,32,99,117,115,116,111,109,32,99,111,109,112,111,110,101,110,116,32,105,110,116,111,32,97,32,116,111,111,108,98,97,114,32,45,32,116, + 104,105,115,32,111,110,101,32,99,111,110,116,97,105,110,115,13,10,32,32,32,32,32,32,32,32,47,47,32,97,32,67,111,109,98,111,66,111,120,46, + 13,10,32,32,32,32,32,32,32,32,99,108,97,115,115,32,67,117,115,116,111,109,84,111,111,108,98,97,114,67,111,109,98,111,66,111,120,32,58,32, + 112,117,98,108,105,99,32,84,111,111,108,98,97,114,73,116,101,109,67,111,109,112,111,110,101,110,116,13,10,32,32,32,32,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,67,117,115,116,111,109,84,111,111,108,98, + 97,114,67,111,109,98,111,66,111,120,32,40,99,111,110,115,116,32,105,110,116,32,116,111,111,108,98,97,114,73,116,101,109,73,100,41,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,84,111,111,108,98,97,114,73,116,101,109,67,111,109,112,111,110,101,110,116,32,40,116,111, + 111,108,98,97,114,73,116,101,109,73,100,44,32,84,40,34,67,117,115,116,111,109,32,84,111,111,108,98,97,114,32,73,116,101,109,34,41,44,32,102, + 97,108,115,101,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,100, + 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,109,98,111,66,111,120,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120, + 32,40,84,40,34,100,101,109,111,32,116,111,111,108,98,97,114,32,99,111,109,98,111,32,98,111,120,34,41,41,41,59,13,10,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,49,59,32,105,32,60,32,50,48,59,32,43,43,105,41, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32, + 40,84,40,34,84,111,111,108,98,97,114,32,67,111,109,98,111,66,111,120,32,105,116,101,109,32,34,41,32,43,32,83,116,114,105,110,103,32,40,105, + 41,44,32,105,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,83, + 101,108,101,99,116,101,100,73,100,32,40,49,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120, + 45,62,115,101,116,69,100,105,116,97,98,108,101,84,101,120,116,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125, + 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,126,67,117,115,116,111,109,84,111,111,108,98,97,114,67,111,109,98,111,66,111,120,40,41, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32, + 99,111,109,98,111,66,111,120,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 98,111,111,108,32,103,101,116,84,111,111,108,98,97,114,73,116,101,109,83,105,122,101,115,32,40,105,110,116,32,116,111,111,108,98,97,114,68,101,112, + 116,104,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,98,111,111,108,32,105,115,84,111,111,108,98,97,114,86,101,114,116,105,99,97,108,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,38,32,112,114,101,102,101,114,114,101,100, + 83,105,122,101,44,32,105,110,116,38,32,109,105,110,83,105,122,101,44,32,105,110,116,38,32,109,97,120,83,105,122,101,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,115,84,111,111,108,98,97,114,86, + 101,114,116,105,99,97,108,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108, + 115,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,114,101,102,101,114,114,101,100,83,105,122,101,32,61,32,50, + 53,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,109,105,110,83,105,122,101,32,61,32,56,48,59,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,109,97,120,83,105,122,101,32,61,32,51,48,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,114,101,116,117,114,110,32,116,114,117,101,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,118,111,105,100,32,112,97,105,110,116,66,117,116,116,111,110,65,114,101,97,32,40,71,114,97,112,104,105,99,115,38,44,32, + 105,110,116,44,32,105,110,116,44,32,98,111,111,108,44,32,98,111,111,108,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,110,116,101,110,116,65, + 114,101,97,67,104,97,110,103,101,100,32,40,99,111,110,115,116,32,82,101,99,116,97,110,103,108,101,38,32,99,111,110,116,101,110,116,65,114,101,97, + 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66, + 111,120,45,62,115,101,116,83,105,122,101,32,40,99,111,110,116,101,110,116,65,114,101,97,46,103,101,116,87,105,100,116,104,40,41,32,45,32,50,44, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,109,105, + 110,32,40,99,111,110,116,101,110,116,65,114,101,97,46,103,101,116,72,101,105,103,104,116,40,41,32,45,32,50,44,32,50,50,41,41,59,13,10,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,67,101,110,116,114,101,80,111,115,105, + 116,105,111,110,32,40,99,111,110,116,101,110,116,65,114,101,97,46,103,101,116,67,101,110,116,114,101,88,40,41,44,32,99,111,110,116,101,110,116,65, + 114,101,97,46,103,101,116,67,101,110,116,114,101,89,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32, + 32,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,67,111,109,98,111,66,111,120,42,32,99,111,109, + 98,111,66,111,120,59,13,10,32,32,32,32,32,32,32,32,125,59,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,68,101,109,111,84,111, + 111,108,98,97,114,73,116,101,109,70,97,99,116,111,114,121,32,102,97,99,116,111,114,121,59,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115, + 32,68,101,109,111,84,97,98,98,101,100,67,111,109,112,111,110,101,110,116,32,32,58,32,112,117,98,108,105,99,32,84,97,98,98,101,100,67,111,109, + 112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117, + 98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109, + 111,84,97,98,98,101,100,67,111,109,112,111,110,101,110,116,32,40,65,112,112,108,105,99,97,116,105,111,110,67,111,109,109,97,110,100,77,97,110,97, + 103,101,114,42,32,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,32,32,32,32,32,32,32,32,58,32,84,97,98,98,101,100,67,111, + 109,112,111,110,101,110,116,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,84,111,112,41,13,10,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,115,108,105,100,101,114,115,34,41,44,32,32,32,32,32,32, + 32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44,32,99,114,101,97,116,101,83,108,105,100,101,114,115,80, + 97,103,101,40,41,44,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,116, + 111,111,108,98,97,114,115,34,41,44,32,32,32,32,32,32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44, + 32,110,101,119,32,84,111,111,108,98,97,114,68,101,109,111,67,111,109,112,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,44,32,32, + 32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,98,117,116,116,111,110,115,34,41,44,32, + 32,32,32,32,32,32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44,32,110,101,119,32,66,117,116,116,111, + 110,115,80,97,103,101,32,40,116,104,105,115,41,44,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32, + 40,84,40,34,114,97,100,105,111,32,98,117,116,116,111,110,115,34,41,44,32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111, + 117,114,40,41,44,32,99,114,101,97,116,101,82,97,100,105,111,66,117,116,116,111,110,80,97,103,101,40,41,44,32,32,116,114,117,101,41,59,13,10, + 32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,109,105,115,99,32,119,105,100,103,101,116,115,34,41,44,32,32,103,101,116,82, + 97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44,32,99,114,101,97,116,101,77,105,115,99,80,97,103,101,40,41,44,32,32, + 32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,97,98,98,101,100,67, + 111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116, + 116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,66,117,98,98,108,101,77,101,115,115,97,103,101,67,111,109,112,111,110,101,110,116,42,32,98,109,99,32,61,32,110,101,119,32,66,117, + 98,98,108,101,77,101,115,115,97,103,101,67,111,109,112,111,110,101,110,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,68, + 101,115,107,116,111,112,58,58,99,97,110,85,115,101,83,101,109,105,84,114,97,110,115,112,97,114,101,110,116,87,105,110,100,111,119,115,40,41,41,13, + 10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,109,99,45,62,115,101,116,65,108,119,97,121,115,79,110, + 84,111,112,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,109,99,45,62,97,100,100,84,111,68,101,115,107,116, + 111,112,32,40,48,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,98,109,99,41, + 59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,98,109,99,45,62,115,104,111,119,65,116,32,40,98,117,116, + 116,111,110,44,32,84,40,34,84,104,105,115,32,105,115,32,97,32,100,101,109,111,32,111,102,32,116,104,101,32,66,117,98,98,108,101,77,101,115,115, + 97,103,101,67,111,109,112,111,110,101,110,116,44,32,119,104,105,99,104,32,108,101,116,115,32,121,111,117,32,112,111,112,32,117,112,32,97,32,109,101, + 115,115,97,103,101,32,112,111,105,110,116,105,110,103,32,97,116,32,97,32,99,111,109,112,111,110,101,110,116,32,111,114,32,115,111,109,101,119,104,101, + 114,101,32,111,110,32,116,104,101,32,115,99,114,101,101,110,46,92,110,92,110,84,104,101,32,109,101,115,115,97,103,101,32,98,117,98,98,108,101,115, + 32,119,105,108,108,32,100,105,115,97,112,112,101,97,114,32,97,102,116,101,114,32,97,32,116,105,109,101,111,117,116,32,112,101,114,105,111,100,44,32, + 111,114,32,119,104,101,110,32,116,104,101,32,109,111,117,115,101,32,105,115,32,99,108,105,99,107,101,100,46,34,41,44,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,50,48,48,48,44,32,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32,32,125, + 13,10,13,10,32,32,32,32,115,116,97,116,105,99,32,99,111,110,115,116,32,67,111,108,111,117,114,32,103,101,116,82,97,110,100,111,109,66,114,105, + 103,104,116,67,111,108,111,117,114,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,67,111,108,111,117, + 114,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41, + 44,32,48,46,49,102,44,32,48,46,57,55,102,44,32,49,46,48,102,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10, + 99,108,97,115,115,32,68,101,109,111,66,97,99,107,103,114,111,117,110,100,84,104,114,101,97,100,32,32,58,32,112,117,98,108,105,99,32,84,104,114, + 101,97,100,87,105,116,104,80,114,111,103,114,101,115,115,87,105,110,100,111,119,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68, + 101,109,111,66,97,99,107,103,114,111,117,110,100,84,104,114,101,97,100,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,104,114,101,97,100,87, + 105,116,104,80,114,111,103,114,101,115,115,87,105,110,100,111,119,32,40,84,40,34,98,117,115,121,32,100,111,105,110,103,32,115,111,109,101,32,105,109, + 112,111,114,116,97,110,116,32,116,104,105,110,103,115,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,115,101,116,83,116,97,116,117,115,77,101,115,115,97,103,101,32,40,84,40,34,71,101,116,116,105,110,103,32,114,101,97,100,121,46,46,46, + 34,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,66,97,99,107,103,114,111,117,110,100,84,104,114,101,97,100, + 40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,117,110,40,41,13,10,32,32,32,32, + 123,13,10,32,32,32,32,32,32,32,32,115,101,116,80,114,111,103,114,101,115,115,32,40,45,49,46,48,41,59,32,47,47,32,115,101,116,116,105,110, + 103,32,97,32,118,97,108,117,101,32,98,101,121,111,110,100,32,116,104,101,32,114,97,110,103,101,32,48,32,45,62,32,49,32,119,105,108,108,32,115, + 104,111,119,32,97,32,115,112,105,110,110,105,110,103,32,98,97,114,46,46,13,10,32,32,32,32,32,32,32,32,115,101,116,83,116,97,116,117,115,77, + 101,115,115,97,103,101,32,40,84,40,34,80,114,101,112,97,114,105,110,103,32,116,111,32,100,111,32,115,111,109,101,32,115,116,117,102,102,46,46,46, + 34,41,41,59,13,10,32,32,32,32,32,32,32,32,119,97,105,116,32,40,50,48,48,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111, + 110,115,116,32,105,110,116,32,116,104,105,110,103,115,84,111,68,111,32,61,32,49,48,59,13,10,13,10,32,32,32,32,32,32,32,32,102,111,114,32, + 40,105,110,116,32,105,32,61,32,48,59,32,105,32,60,32,116,104,105,110,103,115,84,111,68,111,59,32,43,43,105,41,13,10,32,32,32,32,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,109,117,115,116,32,99,104,101,99,107,32,116,104,105,115,32,97,115,32,111, + 102,116,101,110,32,97,115,32,112,111,115,115,105,98,108,101,44,32,98,101,99,97,117,115,101,32,116,104,105,115,32,105,115,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,47,47,32,104,111,119,32,119,101,32,107,110,111,119,32,105,102,32,116,104,101,32,117,115,101,114,39,115,32,112,114,101,115, + 115,101,100,32,39,99,97,110,99,101,108,39,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,114,101,97,100,83,104,111,117, + 108,100,69,120,105,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,119,105,108,108,32,117,112,100,97,116,101,32,116,104,101,32,112,114,111,103,114,101,115, + 115,32,98,97,114,32,111,110,32,116,104,101,32,100,105,97,108,111,103,32,98,111,120,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116, + 80,114,111,103,114,101,115,115,32,40,105,32,47,32,40,100,111,117,98,108,101,41,32,116,104,105,110,103,115,84,111,68,111,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,115,101,116,83,116,97,116,117,115,77,101,115,115,97,103,101,32,40,83,116,114,105,110,103,32,40,116,104,105, + 110,103,115,84,111,68,111,32,45,32,105,41,32,43,32,84,40,34,32,116,104,105,110,103,115,32,108,101,102,116,32,116,111,32,100,111,46,46,46,34, + 41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,97,105,116,32,40,53,48,48,41,59,13,10,32,32,32,32,32,32,32,32, + 125,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,80,114,111,103,114,101,115,115,32,40,45,49,46,48,41,59,32,47,47,32,115,101,116,116, + 105,110,103,32,97,32,118,97,108,117,101,32,98,101,121,111,110,100,32,116,104,101,32,114,97,110,103,101,32,48,32,45,62,32,49,32,119,105,108,108, + 32,115,104,111,119,32,97,32,115,112,105,110,110,105,110,103,32,98,97,114,46,46,13,10,32,32,32,32,32,32,32,32,115,101,116,83,116,97,116,117, + 115,77,101,115,115,97,103,101,32,40,84,40,34,70,105,110,105,115,104,105,110,103,32,111,102,102,32,116,104,101,32,108,97,115,116,32,102,101,119,32, + 98,105,116,115,32,97,110,100,32,112,105,101,99,101,115,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32,119,97,105,116,32,40,51,48,48,48, + 41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,65,32,68,105,97,108,111,103,87,105,110,100,111,119,32,99,111, + 110,116,97,105,110,105,110,103,32,97,32,67,111,108,111,117,114,83,101,108,101,99,116,111,114,32,99,111,109,112,111,110,101,110,116,32,42,47,13,10, + 99,108,97,115,115,32,67,111,108,111,117,114,83,101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110,100,111,119,32,32,58,32,112,117,98,108, + 105,99,32,68,105,97,108,111,103,87,105,110,100,111,119,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,67,111,108,111,117,114,83, + 101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110,100,111,119,40,41,13,10,32,32,32,32,32,32,32,32,58,32,68,105,97,108,111,103,87, + 105,110,100,111,119,32,40,84,40,34,67,111,108,111,117,114,32,115,101,108,101,99,116,111,114,32,100,101,109,111,34,41,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,108,105,103,104,116,103,114,101,121,44,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,13,10,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,115,101,116,67,111,110,116,101,110,116,67,111,109,112,111,110,101,110,116,32,40,110,101,119,32,67,111,108,111,117,114,83,101,108, + 101,99,116,111,114,40,41,41,59,13,10,32,32,32,32,32,32,32,32,99,101,110,116,114,101,87,105,116,104,83,105,122,101,32,40,52,48,48,44,32, + 52,48,48,41,59,13,10,32,32,32,32,32,32,32,32,115,101,116,82,101,115,105,122,97,98,108,101,32,40,116,114,117,101,44,32,116,114,117,101,41, + 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,67,111,108,111,117,114,83,101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110, + 100,111,119,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,108,111,115,101,66,117,116, + 116,111,110,80,114,101,115,115,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,32,101,120,112,101,99, + 116,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,32,116,111,32,98,101,32,114,117,110,32,119,105,116,104,105,110,32,97,32,109,111,100,97, + 108,32,108,111,111,112,44,32,115,111,32,119,104,101,110,32,116,104,101,32,99,108,111,115,101,13,10,32,32,32,32,32,32,32,32,47,47,32,98,117, + 116,116,111,110,32,105,115,32,99,108,105,99,107,101,100,44,32,119,101,32,99,97,110,32,109,97,107,101,32,105,116,32,105,110,118,105,115,105,98,108, + 101,32,116,111,32,99,97,117,115,101,32,116,104,101,32,108,111,111,112,32,116,111,32,101,120,105,116,32,97,110,100,32,116,104,101,13,10,32,32,32, + 32,32,32,32,32,47,47,32,99,97,108,108,105,110,103,32,99,111,100,101,32,119,105,108,108,32,100,101,108,101,116,101,32,116,104,105,115,32,111,98, + 106,101,99,116,46,13,10,32,32,32,32,32,32,32,32,115,101,116,86,105,115,105,98,108,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32, + 125,13,10,125,59,13,10,13,10,35,105,102,32,74,85,67,69,95,77,65,67,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,84,104,105,115,32,112,111,112,115, + 32,111,112,101,110,32,97,32,100,105,97,108,111,103,32,98,111,120,32,97,110,100,32,119,97,105,116,115,32,102,111,114,32,121,111,117,32,116,111,32, + 112,114,101,115,115,32,107,101,121,115,32,111,110,32,121,111,117,114,32,65,112,112,108,101,32,82,101,109,111,116,101,44,13,10,32,32,32,32,119,104, + 105,99,104,32,105,116,32,100,101,115,99,114,105,98,101,115,32,105,110,32,116,104,101,32,98,111,120,46,13,10,42,47,13,10,99,108,97,115,115,32, + 65,112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,32,32,58,32,112,117,98,108,105,99,32,65,108,101,114,116,87,105,110, + 100,111,119,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98, + 108,105,99,32,65,112,112,108,101,82,101,109,111,116,101,68,101,118,105,99,101,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,65, + 112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,40,41,13,10,32,32,32,32,32,32,32,32,58,32,65,108,101,114,116,87, + 105,110,100,111,119,32,40,34,65,112,112,108,101,32,82,101,109,111,116,101,32,67,111,110,116,114,111,108,32,84,101,115,116,33,34,44,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34,73,102,32,121,111,117,39,118,101,32,103,111,116,32,97,110,32,65, + 112,112,108,101,32,82,101,109,111,116,101,44,32,112,114,101,115,115,32,115,111,109,101,32,98,117,116,116,111,110,115,32,110,111,119,46,46,46,34,44, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,78,111, + 73,99,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,97,100,100,66,117,116,116,111,110,32,40,84,40,34,100,111,110,101, + 34,41,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,40,84,111,32,111,112,101,110,32,116,104,101,32,100,101,118,105,99, + 101,32,105,110,32,110,111,110,45,101,120,99,108,117,115,105,118,101,32,109,111,100,101,44,32,112,97,115,115,32,39,102,97,108,115,101,39,32,105,110, + 32,104,101,114,101,41,46,46,13,10,32,32,32,32,32,32,32,32,105,102,32,40,33,32,115,116,97,114,116,32,40,116,114,117,101,41,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,115,101,116,77,101,115,115,97,103,101,32,40,34,67,111,117,108,100,110,39,116,32,111,112,101,110,32,116,104, + 101,32,114,101,109,111,116,101,32,99,111,110,116,114,111,108,32,100,101,118,105,99,101,33,34,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32, + 32,32,126,65,112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,115,116,111,112,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,80,114,101,115, + 115,101,100,32,40,99,111,110,115,116,32,66,117,116,116,111,110,84,121,112,101,32,98,117,116,116,111,110,73,100,44,32,99,111,110,115,116,32,98,111, + 111,108,32,105,115,68,111,119,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,83,116,114,105,110,103,32,100,101,115,99,59,13, + 10,13,10,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,98,117,116,116,111,110,73,100,41,13,10,32,32,32,32,32,32,32,32,123,13, + 10,32,32,32,32,32,32,32,32,99,97,115,101,32,109,101,110,117,66,117,116,116,111,110,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100, + 101,115,99,32,61,32,34,109,101,110,117,32,98,117,116,116,111,110,32,40,115,104,111,114,116,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,112,108,97,121,66,117,116,116,111,110,58,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,112,108,97,121,32,98,117,116,116,111,110,34,59,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,112,108,117,115,66,117,116,116,111,110,58,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,112,108,117,115,32,98,117,116,116,111,110,34,59,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,109,105,110,117,115,66,117,116,116,111,110,58,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,109,105,110,117,115,32,98,117,116,116,111,110,34,59,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,114,105,103,104,116,66,117,116,116,111,110,58, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,114,105,103,104,116,32,98,117,116,116,111,110,32,40,115,104,111,114, + 116,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,108, + 101,102,116,66,117,116,116,111,110,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,108,101,102,116,32,98,117,116, + 116,111,110,32,40,115,104,111,114,116,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32, + 32,32,32,99,97,115,101,32,114,105,103,104,116,66,117,116,116,111,110,95,76,111,110,103,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100, + 101,115,99,32,61,32,34,114,105,103,104,116,32,98,117,116,116,111,110,32,40,108,111,110,103,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,108,101,102,116,66,117,116,116,111,110,95,76,111,110,103,58,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,108,101,102,116,32,98,117,116,116,111,110,32,40,108,111,110,103,41,34, + 59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,109,101,110,117, + 66,117,116,116,111,110,95,76,111,110,103,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,109,101,110,117,32,98, + 117,116,116,111,110,32,40,108,111,110,103,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32, + 32,32,32,32,99,97,115,101,32,112,108,97,121,66,117,116,116,111,110,83,108,101,101,112,77,111,100,101,58,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,100,101,115,99,32,61,32,34,112,108,97,121,32,40,115,108,101,101,112,32,109,111,100,101,41,34,59,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,115,119,105,116,99,104,101,100,58,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,114,101,109,111,116,101,32,115,119,105,116,99,104,101,100,34,59,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40, + 105,115,68,111,119,110,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,60,60,32,34,32,45,45,32,91,100,111,119,110,93, + 34,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,60,60,32,34,32, + 45,45,32,91,117,112,93,34,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,77,101,115,115,97,103,101,32,40,100,101,115,99,41,59,13, + 10,32,32,32,32,125,13,10,125,59,13,10,13,10,35,101,110,100,105,102,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,111,110,115,116,32,105,110,116,32,110,117,109,71, + 114,111,117,112,115,32,61,32,52,59,13,10,13,10,99,108,97,115,115,32,87,105,100,103,101,116,115,68,101,109,111,32,32,58,32,112,117,98,108,105, + 99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105, + 99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,109,101,110, + 117,66,117,116,116,111,110,59,13,10,32,32,32,32,84,111,103,103,108,101,66,117,116,116,111,110,42,32,101,110,97,98,108,101,66,117,116,116,111,110, + 59,13,10,13,10,32,32,32,32,68,101,109,111,84,97,98,98,101,100,67,111,109,112,111,110,101,110,116,42,32,116,97,98,115,59,13,10,13,10,112, + 117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,87,105,100,103,101,116,115,68,101,109,111,32,40,65,112,112,108,105,99,97,116,105, + 111,110,67,111,109,109,97,110,100,77,97,110,97,103,101,114,42,32,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,87,105,100,103,101,116,115,34,41,41,59,13,10,13,10,32,32,32, + 32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,97,98,115,32,61,32,110,101,119,32,68,101,109,111,84, + 97,98,98,101,100,67,111,109,112,111,110,101,110,116,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,41,59,13,10,13,10,32,32,32, + 32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116, + 111,110,32,40,84,40,34,99,108,105,99,107,32,102,111,114,32,97,32,112,111,112,117,112,32,109,101,110,117,46,46,34,41,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,99,108,105,99, + 107,32,102,111,114,32,97,32,100,101,109,111,32,111,102,32,116,104,101,32,100,105,102,102,101,114,101,110,116,32,116,121,112,101,115,32,111,102,32,105, + 116,101,109,32,121,111,117,32,99,97,110,32,112,117,116,32,105,110,116,111,32,97,32,112,111,112,117,112,32,109,101,110,117,46,46,46,34,41,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,109,101,110,117,66,117,116,116,111, + 110,41,59,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32, + 49,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,45,62,97,100,100,66,117, + 116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110, + 45,62,115,101,116,84,114,105,103,103,101,114,101,100,79,110,77,111,117,115,101,68,111,119,110,32,40,116,114,117,101,41,59,32,47,47,32,98,101,99, + 97,117,115,101,32,116,104,105,115,32,98,117,116,116,111,110,32,112,111,112,115,32,117,112,32,97,32,109,101,110,117,44,32,116,104,105,115,32,108,101, + 116,115,32,117,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,104,111,108,100,32,100,111,119,110,32,116,104,101,32,98,117,116,116, + 111,110,32,97,110,100,32,100,114,97,103,32,115,116,114,97,105,103,104,116,32,111,110,116,111,32,116,104,101,32,109,101,110,117,13,10,13,10,32,32, + 32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,32,61,32,110,101,119,32,84,111,103,103,108, + 101,66,117,116,116,111,110,32,40,84,40,34,101,110,97,98,108,101,47,100,105,115,97,98,108,101,32,99,111,109,112,111,110,101,110,116,115,34,41,41, + 59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,101,110,97,98,108,101,66,117,116,116, + 111,110,41,59,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,50, + 51,48,44,32,49,48,44,32,49,56,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45, + 62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,111,103,103,108,101,32,98,117,116,116,111,110,34,41,41,59,13,10,32,32,32,32,32, + 32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114,117,101,44,32,102, + 97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76, + 105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,87,105,100,103,101,116,115,68,101, + 109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41, + 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32, + 32,32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,52,48,44,32,103,101,116,87,105,100,116,104, + 40,41,32,45,32,50,48,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,53,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32, + 32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116, + 111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,101,110,97,98,108,101, + 66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,98,111, + 111,108,32,101,110,97,98,108,101,100,32,61,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,103,101,116,84,111,103,103,108,101,83,116,97,116, + 101,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,45,62,115,101,116,69,110,97,98,108, + 101,100,32,40,101,110,97,98,108,101,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,69,110,97,98, + 108,101,100,32,40,101,110,97,98,108,101,100,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32, + 105,102,32,40,98,117,116,116,111,110,32,61,61,32,109,101,110,117,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,109,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100, + 100,73,116,101,109,32,40,49,44,32,84,40,34,78,111,114,109,97,108,32,105,116,101,109,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,109,46,97,100,100,73,116,101,109,32,40,50,44,32,84,40,34,68,105,115,97,98,108,101,100,32,105,116,101,109,34,41,44,32,102,97,108,115, + 101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,51,44,32,84,40,34,84,105,99,107,101,100, + 32,105,116,101,109,34,41,44,32,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100, + 67,111,108,111,117,114,101,100,73,116,101,109,32,40,52,44,32,84,40,34,67,111,108,111,117,114,101,100,32,105,116,101,109,34,41,44,32,67,111,108, + 111,117,114,115,58,58,103,114,101,101,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,101,112,97,114,97,116,111, + 114,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,67,117,115,116,111,109,73,116,101,109,32,40,53,44,32,110,101, + 119,32,67,117,115,116,111,109,77,101,110,117,67,111,109,112,111,110,101,110,116,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77, + 101,110,117,32,116,97,98,115,77,101,110,117,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,77,101,110,117,46,97,100,100,73, + 116,101,109,32,40,49,48,48,49,44,32,84,40,34,83,104,111,119,32,116,97,98,115,32,97,116,32,116,104,101,32,116,111,112,34,41,44,32,116,114, + 117,101,44,32,116,97,98,115,45,62,103,101,116,79,114,105,101,110,116,97,116,105,111,110,40,41,32,61,61,32,84,97,98,98,101,100,66,117,116,116, + 111,110,66,97,114,58,58,84,97,98,115,65,116,84,111,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,77,101,110,117, + 46,97,100,100,73,116,101,109,32,40,49,48,48,50,44,32,84,40,34,83,104,111,119,32,116,97,98,115,32,97,116,32,116,104,101,32,98,111,116,116, + 111,109,34,41,44,32,116,114,117,101,44,32,116,97,98,115,45,62,103,101,116,79,114,105,101,110,116,97,116,105,111,110,40,41,32,61,61,32,84,97, + 98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,66,111,116,116,111,109,41,59,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,116,97,98,115,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,48,48,51,44,32,84,40,34,83,104,111,119,32,116,97,98,115,32, + 97,116,32,116,104,101,32,108,101,102,116,34,41,44,32,116,114,117,101,44,32,116,97,98,115,45,62,103,101,116,79,114,105,101,110,116,97,116,105,111, + 110,40,41,32,61,61,32,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,76,101,102,116,41,59,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,116,97,98,115,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,48,48,52,44,32,84,40,34,83,104,111, + 119,32,116,97,98,115,32,97,116,32,116,104,101,32,114,105,103,104,116,34,41,44,32,116,114,117,101,44,32,116,97,98,115,45,62,103,101,116,79,114, + 105,101,110,116,97,116,105,111,110,40,41,32,61,61,32,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,82,105, + 103,104,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,84,97,98,32, + 112,111,115,105,116,105,111,110,34,41,44,32,116,97,98,115,77,101,110,117,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46, + 97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117, + 32,100,105,97,108,111,103,77,101,110,117,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100, + 73,116,101,109,32,40,49,48,48,44,32,84,40,34,83,104,111,119,32,97,32,112,108,97,105,110,32,97,108,101,114,116,45,119,105,110,100,111,119,46, + 46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40, + 49,48,49,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114,116,45,119,105,110,100,111,119,32,119,105,116,104,32,97,32,39,119,97,114, + 110,105,110,103,39,32,105,99,111,110,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110, + 117,46,97,100,100,73,116,101,109,32,40,49,48,50,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114,116,45,119,105,110,100,111,119,32, + 119,105,116,104,32,97,110,32,39,105,110,102,111,39,32,105,99,111,110,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,48,51,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114, + 116,45,119,105,110,100,111,119,32,119,105,116,104,32,97,32,39,113,117,101,115,116,105,111,110,39,32,105,99,111,110,46,46,46,34,41,41,59,13,10, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,49,48,44, + 32,84,40,34,83,104,111,119,32,97,110,32,111,107,47,99,97,110,99,101,108,32,97,108,101,114,116,45,119,105,110,100,111,119,46,46,46,34,41,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,83,101,112,97,114,97,116,111,114, + 40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49, + 49,49,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114,116,45,119,105,110,100,111,119,32,119,105,116,104,32,115,111,109,101,32,101,120, + 116,114,97,32,99,111,109,112,111,110,101,110,116,115,46,46,46,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97, + 108,111,103,77,101,110,117,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100, + 105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,49,50,44,32,84,40,34,83,104,111,119,32,97,32,84,104,114,101,97,100, + 87,105,116,104,80,114,111,103,114,101,115,115,87,105,110,100,111,119,32,100,101,109,111,46,46,46,34,41,41,59,13,10,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,65,108,101,114,116,87,105,110,100,111,119,32,100,101,109,111,110, + 115,116,114,97,116,105,111,110,115,34,41,44,32,100,105,97,108,111,103,77,101,110,117,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,73, + 116,101,109,32,40,49,50,48,44,32,84,40,34,83,104,111,119,32,97,32,99,111,108,111,117,114,32,115,101,108,101,99,116,111,114,32,100,101,109,111, + 46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10, + 13,10,35,105,102,32,74,85,67,69,95,77,65,67,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,49, + 52,48,44,32,84,40,34,82,117,110,32,116,104,101,32,65,112,112,108,101,32,82,101,109,111,116,101,32,67,111,110,116,114,111,108,32,116,101,115,116, + 46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10, + 35,101,110,100,105,102,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,110,97,116,105,118,101,70,105, + 108,101,67,104,111,111,115,101,114,115,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115, + 101,114,115,46,97,100,100,73,116,101,109,32,40,49,50,49,44,32,84,40,34,39,76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114, + 46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,46, + 97,100,100,73,116,101,109,32,40,49,50,52,44,32,84,40,34,39,76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114,32,119,105,116, + 104,32,97,110,32,105,109,97,103,101,32,102,105,108,101,32,112,114,101,118,105,101,119,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,50,50,44,32,84,40,34, + 39,83,97,118,101,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,50,51,44,32,84,40,34,39,67,104,111, + 111,115,101,32,100,105,114,101,99,116,111,114,121,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46,46,46,34,41,41,59,13,10,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,59,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,51,49, + 44,32,84,40,34,39,76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,51,52,44,32,84,40,34,39, + 76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114,32,119,105,116,104,32,97,110,32,105,109,97,103,101,32,102,105,108,101,32,112,114, + 101,118,105,101,119,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101, + 114,115,46,97,100,100,73,116,101,109,32,40,49,51,50,44,32,84,40,34,39,83,97,118,101,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46, + 46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100, + 73,116,101,109,32,40,49,51,51,44,32,84,40,34,39,67,104,111,111,115,101,32,100,105,114,101,99,116,111,114,121,39,32,102,105,108,101,32,98,114, + 111,119,115,101,114,46,46,46,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,102,105, + 108,101,67,104,111,111,115,101,114,115,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,115,46,97,100, + 100,83,117,98,77,101,110,117,32,40,84,40,34,79,112,101,114,97,116,105,110,103,32,115,121,115,116,101,109,32,100,105,97,108,111,103,115,34,41,44, + 32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,67, + 104,111,111,115,101,114,115,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,74,117,99,101,32,100,105,97,108,111,103,115,34,41,44,32,106, + 117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,117, + 98,77,101,110,117,32,40,84,40,34,70,105,108,101,32,99,104,111,111,115,101,114,32,100,105,97,108,111,103,115,34,41,44,32,102,105,108,101,67,104, + 111,111,115,101,114,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,114,101,115,117,108,116,32,61,32,109,46,115, + 104,111,119,65,116,32,40,109,101,110,117,66,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114, + 101,115,117,108,116,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,47,47,32,117,115,101,114,32,99,104,111,115,101,32,115,111,109,101,116,104,105,110,103,32,102,114,111,109,32,116,104,101,32,109,101,110, + 117,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,62,61,32,49,48,48, + 32,38,38,32,114,101,115,117,108,116,32,60,32,49,48,53,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,65,108,101,114,116,73,99,111,110, + 84,121,112,101,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111,119,58,58,78,111,73,99,111,110,59,13,10,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,49,41,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111,119,58,58, + 87,97,114,110,105,110,103,73,99,111,110,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105, + 102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,50,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,59,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,51,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111, + 119,58,58,81,117,101,115,116,105,111,110,73,99,111,110,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,105,99,111,110,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,84,40,34,84,104,105,115,32,105,115,32,97,110,32,65,108,101,114,116,87,105,110,100,111,119,34,41,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,84,40,34,65,110,100,32,116,104,105,115,32,105,115,32,116,104,101,32,65,108,101,114,116,87,105,110,100,111,119,39,115,32,109,101,115, + 115,97,103,101,46,32,66,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104, + 32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,46,34,41,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,84,40,34,111,107,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,49,48,41,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,111,108,32, + 117,115,101,114,80,105,99,107,101,100,79,107,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,61,32, + 65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,79,107,67,97,110,99,101,108,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111, + 119,58,58,81,117,101,115,116,105,111,110,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,84,104,105, + 115,32,105,115,32,97,110,32,111,107,47,99,97,110,99,101,108,32,65,108,101,114,116,87,105,110,100,111,119,34,41,44,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,84,40,34,65,110,100,32,116,104,105,115,32,105,115,32,116,104,101,32,65,108,101,114,116,87,105,110,100,111,119, + 39,115,32,109,101,115,115,97,103,101,46,32,66,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97, + 104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,46,34,41,41, + 59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108, + 115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,49,49,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,32,119,32,40,84,40,34, + 65,108,101,114,116,87,105,110,100,111,119,32,100,101,109,111,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,84,104,105,115,32,65,108,101,114,116,87,105,110,100,111,119,32,104,97, + 115,32,97,32,99,111,117,112,108,101,32,111,102,32,101,120,116,114,97,32,99,111,109,112,111,110,101,110,116,115,32,97,100,100,101,100,32,116,111,32, + 115,104,111,119,32,104,111,119,32,116,111,32,97,100,100,32,100,114,111,112,45,100,111,119,110,32,108,105,115,116,115,32,97,110,100,32,116,101,120,116, + 32,101,110,116,114,121,32,98,111,120,101,115,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,81,117,101,115,116,105,111,110,73,99,111,110,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,119,46,97,100,100,84,101,120,116,69,100,105,116,111,114,32, + 40,84,40,34,116,101,120,116,34,41,44,32,84,40,34,101,110,116,101,114,32,115,111,109,101,32,116,101,120,116,32,104,101,114,101,34,41,44,32,84, + 40,34,116,101,120,116,32,102,105,101,108,100,58,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,83,116,114,105,110,103,65,114,114,97,121,32,111,112,116,105,111,110,115,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,111,112,116,105,111,110,115,46,97,100,100,32,40,84,40,34,111,112,116,105,111,110,32,49,34,41,41,59,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,116,105,111,110,115,46,97,100,100,32,40,84,40,34,111,112,116,105,111,110,32,50,34,41,41, + 59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,116,105,111,110,115,46,97,100,100,32,40,84,40,34,111, + 112,116,105,111,110,32,51,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,116,105,111,110,115, + 46,97,100,100,32,40,84,40,34,111,112,116,105,111,110,32,52,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,119,46,97,100,100,67,111,109,98,111,66,111,120,32,40,84,40,34,111,112,116,105,111,110,34,41,44,32,111,112,116,105,111,110,115,44,32, + 84,40,34,115,111,109,101,32,111,112,116,105,111,110,115,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,119,46,97,100,100,66,117,116,116,111,110,32,40,84,40,34,111,107,34,41,44,32,49,44,32,75,101,121,80,114,101,115,115,32,40,75,101, + 121,80,114,101,115,115,58,58,114,101,116,117,114,110,75,101,121,44,32,48,44,32,48,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,119,46,97,100,100,66,117,116,116,111,110,32,40,84,40,34,99,97,110,99,101,108,34,41,44,32,48,44,32,75,101,121, + 80,114,101,115,115,32,40,75,101,121,80,114,101,115,115,58,58,101,115,99,97,112,101,75,101,121,44,32,48,44,32,48,41,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,119,46,114,117,110,77,111,100,97,108,76,111,111,112,40,41,32, + 33,61,32,48,41,32,47,47,32,105,115,32,116,104,101,121,32,112,105,99,107,101,100,32,39,111,107,39,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32, + 116,104,105,115,32,105,115,32,116,104,101,32,105,116,101,109,32,116,104,101,121,32,99,104,111,115,101,32,105,110,32,116,104,101,32,100,114,111,112,45, + 100,111,119,110,32,108,105,115,116,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110, + 115,116,32,105,110,116,32,111,112,116,105,111,110,73,110,100,101,120,67,104,111,115,101,110,32,61,32,119,46,103,101,116,67,111,109,98,111,66,111,120, + 67,111,109,112,111,110,101,110,116,32,40,84,40,34,111,112,116,105,111,110,34,41,41,45,62,103,101,116,83,101,108,101,99,116,101,100,73,116,101,109, + 73,110,100,101,120,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116, + 104,105,115,32,105,115,32,116,104,101,32,116,101,120,116,32,116,104,101,121,32,101,110,116,101,114,101,100,46,46,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,83,116,114,105,110,103,32,116,101,120,116,32,61,32,119,46,103,101,116,84,101,120,116,69, + 100,105,116,111,114,67,111,110,116,101,110,116,115,32,40,84,40,34,116,101,120,116,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,49,50,41,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,66,97,99,107, + 103,114,111,117,110,100,84,104,114,101,97,100,32,100,101,109,111,84,104,114,101,97,100,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,105,102,32,40,100,101,109,111,84,104,114,101,97,100,46,114,117,110,84,104,114,101,97,100,40,41,41,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,47,47,32,116,104,114,101,97,100,32,102,105,110,105,115,104,101,100,32,110,111,114,109,97,108,108,121,46,46,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115, + 97,103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99,111,110,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,84,40,34,80,114,111,103,114,101,115,115,32,119,105,110,100,111,119,34,41,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,84,40,34,84,104,114,101,97,100,32,102,105,110,105,115,104,101,100,32,111,107,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,47,47,32,117,115,101,114,32,112,114,101,115,115,101,100,32,116,104,101,32,99,97,110,99,101,108,32,98,117,116,116,111, + 110,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119, + 58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99, + 111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,80,114,111,103,114,101,115,115,32,119,105,110,100,111,119,34,41,44,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,89,111,117,32,112,114,101,115,115,101,100,32,99,97,110,99,101,108,33,34,41,41,59, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61, + 32,49,50,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,67,111,108,111,117,114,83,101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110,100,111,119,32,99,111,108,111,117,114,68, + 105,97,108,111,103,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,119,105, + 108,108,32,114,117,110,32,97,110,32,101,118,101,110,116,32,108,111,111,112,32,117,110,116,105,108,32,116,104,101,32,100,105,97,108,111,103,39,115,32, + 99,108,111,115,101,66,117,116,116,111,110,80,114,101,115,115,101,100,40,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,47,47,32,109,101,116,104,111,100,32,99,97,117,115,101,115,32,116,104,101,32,108,111,111,112,32,116,111,32,101,120,105,116,46,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,108,111,117,114,68,105,97,108,111,103,46,114,117,110,77,111,100,97,108,76, + 111,111,112,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,52,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,123,13,10,35,105,102,32,74,85,67,69,95,77,65,67,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,65,112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,32,116,101,115,116,59,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,116,101,115,116,46,114,117,110,77,111,100,97,108,76,111,111,112,40,41,59,13,10,35,101,110,100,105,102,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32, + 105,102,32,40,114,101,115,117,108,116,32,62,61,32,49,50,49,32,38,38,32,114,101,115,117,108,116,32,60,32,49,51,57,41,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116, + 32,98,111,111,108,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,32,61,32,114,101,115,117,108,116,32,60,32,49,51,48,59,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,62,32,49,51,48,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,115,117,108,116,32,45,61,32,49,48,59,13,10,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,49,41,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,70,105,108,101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,32,102,105,108,101,32, + 116,111,32,111,112,101,110,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105, + 114,101,99,116,111,114,121,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,42,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13, + 10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101, + 70,111,114,70,105,108,101,84,111,79,112,101,110,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104, + 111,115,101,110,70,105,108,101,32,61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97, + 103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,84,40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,84,40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,70,105,108,101,46,103, + 101,116,70,117,108,108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,52,41,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,73,109,97,103,101,80,114,101,118,105,101,119,67,111,109,112,111,110,101,110,116,32,105,109,97,103,101,80,114,101,118,105,101,119,59,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,109,97,103,101,80,114,101,118,105,101,119,46,115,101,116,83, + 105,122,101,32,40,50,48,48,44,32,50,48,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,70,105,108,101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,110,32,105,109,97,103,101,32,116,111, + 32,111,112,101,110,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105,114,101, + 99,116,111,114,121,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,84,40,34,42,46,106,112,103,59,42,46,106,112,101,103,59,42,46,112,110,103,59,42,46,103,105,102,34,41,44, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101,70,111,114,70,105,108,101,84,111,79,112,101,110,32,40,38,105,109,97, + 103,101,80,114,101,118,105,101,119,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104,111,115,101,110,70, + 105,108,101,32,61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120, + 32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,84,40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,84,40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,70,105,108,101,46,103,101,116,70,117,108, + 108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,50,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108, + 101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,32,102,105,108,101,32,116,111,32,115,97,118,101,46,46,46, + 34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105,114,101,99,116,111,114,121,40,41,44, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,84,40,34,42,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101,70,111,114,70,105,108,101,84,111,83, + 97,118,101,32,40,116,114,117,101,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104,111,115,101,110,70, + 105,108,101,32,61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120, + 32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,84,40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,84,40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,70,105,108,101,46,103,101,116,70,117,108, + 108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,51,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108, + 101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,32,100,105,114,101,99,116,111,114,121,46,46,46,34,41,44, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105,114,101,99,116,111,114,121,40,41,44,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84, + 40,34,42,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101,70,111,114,68,105,114,101,99,116,111,114,121,40, + 41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104,111,115,101,110,68,105,114,101,99,116,111,114,121,32, + 61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,65,108, + 101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84, + 40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84, + 40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,68,105,114,101,99,116,111,114,121,46,103,101,116,70,117, + 108,108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32, + 49,48,48,49,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,79,114,105,101,110,116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110, + 66,97,114,58,58,84,97,98,115,65,116,84,111,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,48,50,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97, + 98,115,45,62,115,101,116,79,114,105,101,110,116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98, + 115,65,116,66,111,116,116,111,109,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,48,51,41,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,45,62,115, + 101,116,79,114,105,101,110,116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,76,101, + 102,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,48,52,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,79,114,105,101,110, + 116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,82,105,103,104,116,41,59,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32, + 32,32,125,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,87, + 105,100,103,101,116,115,68,101,109,111,32,40,65,112,112,108,105,99,97,116,105,111,110,67,111,109,109,97,110,100,77,97,110,97,103,101,114,42,32,99, + 111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,87,105,100,103,101,116, + 115,68,101,109,111,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::widgetsdemo_cpp = (const char*) temp14; + +static const unsigned char temp15[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, + 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, + 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, + 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, + 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, + 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, + 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, + 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, + 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, + 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, + 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, + 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, + 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, + 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, + 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, + 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, + 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, + 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, + 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, + 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, + 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, + 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, + 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, + 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, + 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, + 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, + 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, + 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, + 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,13,10,99,108,97,115,115,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,32,32,58,32,112,117,98,108,105,99, + 32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,111,109,98,111,66,111,120,76,105,115,116,101,110, + 101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111, + 109,109,115,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,114,118,101,114,32,61,32,110,101,119,32,68, + 101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,32,40,42,116,104,105,115,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,73,110,116,101,114,112,114,111,99,101,115,115,32,67,111,109, + 109,117,110,105,99,97,116,105,111,110,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,108,108,32, + 111,117,114,32,85,73,32,98,105,116,115,32,97,110,100,32,112,105,101,99,101,115,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100, + 77,97,107,101,86,105,115,105,98,108,101,32,40,109,111,100,101,83,101,108,101,99,116,111,114,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120, + 32,40,84,40,34,109,111,100,101,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,115, + 101,116,66,111,117,110,100,115,32,40,49,48,48,44,32,50,53,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,40,110, + 101,119,32,76,97,98,101,108,32,40,109,111,100,101,83,101,108,101,99,116,111,114,45,62,103,101,116,78,97,109,101,40,41,44,32,109,111,100,101,83, + 101,108,101,99,116,111,114,45,62,103,101,116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32, + 40,109,111,100,101,83,101,108,101,99,116,111,114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108, + 101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,40,68,105,115,99,111,110,110,101,99,116,101,100,41,34,41,44,32,56,41,59, + 13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13, + 10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,78,97,109,101,100, + 32,112,105,112,101,32,40,108,105,115,116,101,110,105,110,103,41,34,41,44,32,49,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101, + 108,101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,78,97,109,101,100,32,112,105,112,101,32,40,99,111,110,110,101,99,116,32, + 116,111,32,101,120,105,115,116,105,110,103,32,112,105,112,101,41,34,41,44,32,53,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101, + 108,101,99,116,111,114,45,62,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108, + 101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,83,111,99,107,101,116,32,40,108,105,115,116,101,110,105,110,103,41,34,41,44, + 32,50,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34, + 83,111,99,107,101,116,32,40,99,111,110,110,101,99,116,32,116,111,32,101,120,105,115,116,105,110,103,32,115,111,99,107,101,116,41,34,41,44,32,54, + 41,59,13,10,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,115,101,116,83,101,108,101,99,116,101,100,73, + 100,32,40,56,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,76,105,115,116,101,110,101, + 114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40, + 112,105,112,101,78,97,109,101,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,112,105,112,101,32,110,97,109,101,58, + 34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,112,105,112,101,78,97,109,101,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,48,44, + 32,54,48,44,32,49,51,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,112,105,112,101,78,97,109,101,45,62,115,101,116,77,117,108, + 116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,112,105,112,101,78,97,109,101,45,62,115,101,116,84,101, + 120,116,32,40,84,40,34,106,117,99,101,32,100,101,109,111,32,112,105,112,101,34,41,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32, + 76,97,98,101,108,32,40,112,105,112,101,78,97,109,101,45,62,103,101,116,78,97,109,101,40,41,44,32,112,105,112,101,78,97,109,101,45,62,103,101, + 116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,112,105,112,101,78,97,109,101,44,32, + 116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,111,99, + 107,101,116,78,117,109,98,101,114,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,115,111,99,107,101,116,32,112,111, + 114,116,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,78,117,109,98,101,114,45,62,115,101,116,66,111,117,110,100, + 115,32,40,51,53,48,44,32,54,48,44,32,56,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,78,117,109,98, + 101,114,45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101, + 116,78,117,109,98,101,114,45,62,115,101,116,84,101,120,116,32,40,84,40,34,49,50,51,52,53,34,41,41,59,13,10,32,32,32,32,32,32,32,32, + 115,111,99,107,101,116,78,117,109,98,101,114,45,62,115,101,116,73,110,112,117,116,82,101,115,116,114,105,99,116,105,111,110,115,32,40,53,44,32,84, + 40,34,48,49,50,51,52,53,54,55,56,57,34,41,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,115,111, + 99,107,101,116,78,117,109,98,101,114,45,62,103,101,116,78,97,109,101,40,41,44,32,115,111,99,107,101,116,78,117,109,98,101,114,45,62,103,101,116, + 78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,115,111,99,107,101,116,78,117,109,98,101, + 114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40, + 115,111,99,107,101,116,72,111,115,116,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,115,111,99,107,101,116,32,104, + 111,115,116,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,72,111,115,116,45,62,115,101,116,66,111,117,110,100,115, + 32,40,53,51,48,44,32,54,48,44,32,49,51,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,72,111,115,116, + 45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,72, + 111,115,116,45,62,115,101,116,84,101,120,116,32,40,84,40,34,108,111,99,97,108,104,111,115,116,34,41,41,59,13,10,32,32,32,32,32,32,32,32, + 115,111,99,107,101,116,78,117,109,98,101,114,45,62,115,101,116,73,110,112,117,116,82,101,115,116,114,105,99,116,105,111,110,115,32,40,53,49,50,41, + 59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,115,111,99,107,101,116,72,111,115,116,45,62,103,101,116,78,97, + 109,101,40,41,44,32,115,111,99,107,101,116,72,111,115,116,45,62,103,101,116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67, + 111,109,112,111,110,101,110,116,32,40,115,111,99,107,101,116,72,111,115,116,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,115,101,110,100,84,101,120,116,32,61,32,110,101,119,32,84,101,120,116,69,100, + 105,116,111,114,32,40,84,40,34,115,101,110,100,116,101,120,116,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,84,101,120,116, + 45,62,115,101,116,66,111,117,110,100,115,32,40,51,48,44,32,49,50,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32, + 32,115,101,110,100,84,101,120,116,45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32, + 32,32,115,101,110,100,84,101,120,116,45,62,115,101,116,82,101,97,100,79,110,108,121,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32, + 32,32,115,101,110,100,84,101,120,116,45,62,115,101,116,84,101,120,116,32,40,84,40,34,116,101,115,116,105,110,103,32,49,50,51,52,34,41,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,115,101,110,100,66,117,116,116,111, + 110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,115,101,110,100,34,41,44,32,84,40,34,70,105,114,101,115,32, + 111,102,102,32,116,104,101,32,109,101,115,115,97,103,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110, + 45,62,115,101,116,66,111,117,110,100,115,32,40,50,52,48,44,32,49,50,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32, + 32,32,115,101,110,100,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,40,41,59,13,10,32, + 32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104, + 105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,105,110,99,111,109, + 105,110,103,77,101,115,115,97,103,101,115,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,109,101,115,115,97,103,101, + 115,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,82,101,97, + 100,79,110,108,121,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45, + 62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77, + 101,115,115,97,103,101,115,45,62,115,101,116,66,111,117,110,100,115,32,40,51,48,44,32,49,53,48,44,32,53,48,48,44,32,50,53,48,41,59,13, + 10,13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,108,108,32,116,104,105,115,32,116,111,32,115,101,116,32,117,112,32,101,118,101,114,121,116, + 104,105,110,103,39,115,32,115,116,97,116,101,32,99,111,114,114,101,99,116,108,121,46,13,10,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111, + 120,67,104,97,110,103,101,100,32,40,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,73,110,116,101,114,112,114,111,99,101,115, + 115,67,111,109,109,115,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,108,111,115,101,40,41,59,13,10,32, + 32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,101,114,118,101,114,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65, + 108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67, + 108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, + 105,102,32,40,98,117,116,116,111,110,32,61,61,32,115,101,110,100,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,47,47,32,84,104,101,32,115,101,110,100,32,98,117,116,116,111,110,32,104,97,115,32,98,101,101,110,32,112,114, + 101,115,115,101,100,44,32,115,111,32,119,114,105,116,101,32,111,117,116,32,116,104,101,32,99,111,110,116,101,110,116,115,32,111,102,32,116,104,101,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,101,120,116,32,98,111,120,32,116,111,32,116,104,101,32,115,111,99,107,101,116,32,111, + 114,32,112,105,112,101,44,32,100,101,112,101,110,100,105,110,103,32,111,110,32,119,104,105,99,104,32,105,115,32,97,99,116,105,118,101,46,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,101,120,116,32,40,115,101,110,100,84,101,120,116,45,62, + 103,101,116,84,101,120,116,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,77,101,109,111,114,121,66,108,111,99,107,32,109,101,115, + 115,97,103,101,68,97,116,97,32,40,40,99,111,110,115,116,32,99,104,97,114,42,41,32,116,101,120,116,44,32,116,101,120,116,46,108,101,110,103,116, + 104,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,97,99,116,105,118,101, + 67,111,110,110,101,99,116,105,111,110,115,46,115,105,122,101,40,41,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,32,97,99,116,105,118,101,67,111,110,110,101, + 99,116,105,111,110,115,91,105,93,45,62,115,101,110,100,77,101,115,115,97,103,101,32,40,109,101,115,115,97,103,101,68,97,116,97,41,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47, + 32,116,104,101,32,119,114,105,116,101,32,102,97,105,108,101,100,44,32,115,111,32,105,110,100,105,99,97,116,101,32,116,104,97,116,32,116,104,101,32, + 99,111,110,110,101,99,116,105,111,110,32,104,97,115,32,98,114,111,107,101,110,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,84,40,34,115,101,110,100,32,109,101,115,115,97,103,101,32,102,97,105,108, + 101,100,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32, + 125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,111,109,98,111,66,111,120, + 67,104,97,110,103,101,100,32,40,67,111,109,98,111,66,111,120,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,84, + 104,105,115,32,105,115,32,99,97,108,108,101,100,32,119,104,101,110,32,116,104,101,32,117,115,101,114,32,112,105,99,107,115,32,97,32,100,105,102,102, + 101,114,101,110,116,32,109,111,100,101,32,102,114,111,109,32,116,104,101,32,100,114,111,112,45,100,111,119,110,32,108,105,115,116,46,46,13,10,32,32, + 32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,109,111,100,101,73,100,32,61,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,103, + 101,116,83,101,108,101,99,116,101,100,73,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,108,111,115,101,40,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,105,102,32,40,109,111,100,101,73,100,32,60,32,56,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,111,112,101,110,32,40,40,109,111,100,101,73,100,32,38,32,50,41,32,33,61,32,48,44,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,40,109,111,100,101,73,100,32,38,32,52,41,32,33,61,32,48,41,59,13,10,32,32,32,32,32,32,32,32, + 125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,74,117,115,116,32,99,108,111,115,101,115,32,97,110,121, + 32,99,111,110,110,101,99,116,105,111,110,115,32,116,104,97,116,32,97,114,101,32,99,117,114,114,101,110,116,108,121,32,111,112,101,110,46,13,10,32, + 32,32,32,118,111,105,100,32,99,108,111,115,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,114,118,101,114,45,62, + 115,116,111,112,40,41,59,13,10,32,32,32,32,32,32,32,32,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,99,108,101,97,114, + 40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,82,101,115,101,116,32,116,104,101,32,85,73,32,115,116,117,102,102,32,116,111,32, + 97,32,100,105,115,97,98,108,101,100,32,115,116,97,116,101,46,13,10,32,32,32,32,32,32,32,32,115,101,110,100,84,101,120,116,45,62,115,101,116, + 86,105,115,105,98,108,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110,45,62,115,101, + 116,86,105,115,105,98,108,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97, + 103,101,115,45,62,115,101,116,84,101,120,116,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,102,97,108,115,101,41,59,13,10,32,32, + 32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,86,105,115,105,98,108,101,32,40,116,114,117,101, + 41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,34,84,111,32,100,101,109,111,110,115,116,114,97,116,101,32,110,97,109,101,100,32,112,105,112,101,115,44,32,121,111,117,39,108,108,32,110, + 101,101,100,32,116,111,32,114,117,110,32,116,119,111,32,105,110,115,116,97,110,99,101,115,32,111,102,32,116,104,101,32,74,117,99,101,68,101,109,111, + 32,97,112,112,108,105,99,97,116,105,111,110,32,111,110,32,116,104,105,115,32,109,97,99,104,105,110,101,46,32,79,110,32,34,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,34,111,110,101,32,111,102,32,116,104,101,109,44,32,115,101,108,101,99,116,32,92,34,110,97,109,101,100,32,112,105,112, + 101,32,40,108,105,115,116,101,110,105,110,103,41,92,34,44,32,97,110,100,32,116,104,101,110,32,111,110,32,116,104,101,32,111,116,104,101,114,44,32, + 115,101,108,101,99,116,32,92,34,110,97,109,101,100,32,112,105,112,101,32,40,99,111,110,110,101,99,116,32,116,111,32,101,120,105,115,116,105,110,103, + 32,112,105,112,101,41,92,34,46,32,84,104,101,110,32,109,101,115,115,97,103,101,115,32,116,104,97,116,32,121,111,117,32,34,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,34,115,101,110,100,32,102,114,111,109,32,116,104,101,32,39,115,101,110,100,101,114,39,32,97,112,112,32,115,104,111,117, + 108,100,32,97,112,112,101,97,114,32,111,110,32,116,104,101,32,108,105,115,116,101,110,101,114,32,97,112,112,46,32,84,104,101,32,92,34,112,105,112, + 101,32,110,97,109,101,92,34,32,102,105,101,108,100,32,108,101,116,115,32,121,111,117,32,99,104,111,111,115,101,32,97,32,110,97,109,101,32,102,111, + 114,32,116,104,101,32,112,105,112,101,92,110,92,110,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,84,111,32,100,101,109,111,110,115,116, + 114,97,116,101,32,115,111,99,107,101,116,115,44,32,121,111,117,32,99,97,110,32,101,105,116,104,101,114,32,114,117,110,32,116,119,111,32,105,110,115, + 116,97,110,99,101,115,32,111,102,32,116,104,101,32,97,112,112,32,111,110,32,116,104,101,32,115,97,109,101,32,109,97,99,104,105,110,101,44,32,111, + 114,32,111,110,32,100,105,102,102,101,114,101,110,116,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,109,97,99,104,105,110,101,115,32, + 111,110,32,121,111,117,114,32,110,101,116,119,111,114,107,46,32,73,110,32,101,97,99,104,32,111,110,101,32,101,110,116,101,114,32,97,32,115,111,99, + 107,101,116,32,110,117,109,98,101,114,44,32,116,104,101,110,32,111,110,32,111,110,101,32,111,102,32,116,104,101,32,97,112,112,115,44,32,115,101,108, + 101,99,116,32,116,104,101,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,92,34,83,111,99,107,101,116,32,40,108,105,115,116,101,110, + 105,110,103,41,92,34,32,109,111,100,101,46,32,79,110,32,116,104,101,32,111,116,104,101,114,44,32,101,110,116,101,114,32,116,104,101,32,104,111,115, + 116,32,97,100,100,114,101,115,115,32,111,102,32,116,104,101,32,108,105,115,116,101,110,105,110,103,32,97,112,112,44,32,97,110,100,32,115,101,108,101, + 99,116,32,92,34,83,111,99,107,101,116,32,40,99,111,110,110,101,99,116,32,116,111,32,101,120,105,115,116,105,110,103,32,115,111,99,107,101,116,41, + 92,34,46,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,77,101,115,115,97,103,101,115,32,115,104,111,117,108,100,32,116,104,101,110, + 32,98,101,32,98,101,32,115,101,110,116,32,98,101,116,119,101,101,110,32,116,104,101,32,97,112,112,115,32,105,110,32,116,104,101,32,115,97,109,101, + 32,119,97,121,32,97,115,32,116,104,114,111,117,103,104,32,116,104,101,32,110,97,109,101,100,32,112,105,112,101,115,46,34,41,59,13,10,32,32,32, + 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,111,112,101,110,32,40,98,111,111,108,32,97,115,83,111,99,107,101,116,44,32,98,111,111,108, + 32,97,115,83,101,110,100,101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,108,111,115,101,40,41,59,13,10,13,10,32, + 32,32,32,32,32,32,32,47,47,32,77,97,107,101,32,116,104,101,32,97,112,112,114,111,112,114,105,97,116,101,32,98,105,116,115,32,111,102,32,85, + 73,32,118,105,115,105,98,108,101,46,46,13,10,32,32,32,32,32,32,32,32,115,101,110,100,84,101,120,116,45,62,115,101,116,86,105,115,105,98,108, + 101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110,45,62,115,101,116,86,105,115,105,98,108, + 101,32,40,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115, + 101,116,84,101,120,116,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32, + 105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,86,105,115,105,98,108,101,32,40,116,114,117,101,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,116,114,121,32,116,111,32,111,112,101,110,32,116,104,101,32,115,111,99,107,101,116,32,111,114, + 32,112,105,112,101,46,46,46,13,10,32,32,32,32,32,32,32,32,98,111,111,108,32,111,112,101,110,101,100,79,107,32,61,32,102,97,108,115,101,59, + 13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,97,115,83,101,110,100,101,114,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,47,47,32,105,102,32,119,101,39,114,101,32,99,111,110,110,101,99,116,105,110,103,32,116,111,32,97,110,32,101, + 120,105,115,116,105,110,103,32,115,101,114,118,101,114,44,32,119,101,32,99,97,110,32,106,117,115,116,32,99,114,101,97,116,101,32,97,32,99,111,110, + 110,101,99,116,105,111,110,32,111,98,106,101,99,116,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,100,105,114,101,99,116,108,121,46, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110, + 42,32,110,101,119,67,111,110,110,101,99,116,105,111,110,32,61,32,110,101,119,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111, + 110,110,101,99,116,105,111,110,32,40,42,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,97,115,83, + 111,99,107,101,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111, + 112,101,110,101,100,79,107,32,61,32,110,101,119,67,111,110,110,101,99,116,105,111,110,45,62,99,111,110,110,101,99,116,84,111,83,111,99,107,101,116, + 32,40,115,111,99,107,101,116,72,111,115,116,45,62,103,101,116,84,101,120,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,115,111,99,107,101,116,78,117,109,98,101,114,45,62,103,101,116,84,101,120,116,40,41,46,103,101,116,73,110,116,86,97,108,117,101, + 40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,48,48,48,41,59,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,101,110,101,100,79,107,32,61,32,110,101,119,67,111,110,110,101,99,116,105,111,110, + 45,62,99,111,110,110,101,99,116,84,111,80,105,112,101,32,40,112,105,112,101,78,97,109,101,45,62,103,101,116,84,101,120,116,40,41,41,59,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,111,112,101,110,101,100,79, + 107,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,97,100, + 100,32,40,110,101,119,67,111,110,110,101,99,116,105,111,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,110,101,119,67,111,110,110,101,99,116,105,111,110,59,13,10,32,32,32, + 32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,47,47,32,105,102,32,119,101,39,114,101,32,115,116,97,114,116,105,110,103,32,117,112,32,97,32,115,101,114,118,101,114,44,32,119, + 101,32,110,101,101,100,32,116,111,32,116,101,108,108,32,116,104,101,32,115,101,114,118,101,114,32,116,111,32,115,116,97,114,116,32,119,97,105,116,105, + 110,103,32,102,111,114,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,99,108,105,101,110,116,115,32,116,111,32,99,111,110,110,101,99, + 116,46,32,73,116,39,108,108,32,116,104,101,110,32,99,114,101,97,116,101,32,99,111,110,110,101,99,116,105,111,110,32,111,98,106,101,99,116,115,32, + 102,111,114,32,117,115,32,119,104,101,110,32,99,108,105,101,110,116,115,32,97,114,114,105,118,101,46,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,105,102,32,40,97,115,83,111,99,107,101,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,111,112,101,110,101,100,79,107,32,61,32,115,101,114,118,101,114,45,62,98,101,103,105,110,87,97,105,116,105,110,103,70,111, + 114,83,111,99,107,101,116,32,40,115,111,99,107,101,116,78,117,109,98,101,114,45,62,103,101,116,84,101,120,116,40,41,46,103,101,116,73,110,116,86, + 97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,111,112,101,110,101,100,79,107, + 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,84,40, + 34,87,97,105,116,105,110,103,32,102,111,114,32,97,110,111,116,104,101,114,32,97,112,112,32,116,111,32,99,111,110,110,101,99,116,32,116,111,32,116, + 104,105,115,32,115,111,99,107,101,116,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,42,32,110,101,119,67,111,110,110,101,99,116, + 105,111,110,32,61,32,110,101,119,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,32,40,42,116, + 104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,101,110,101,100,79,107,32,61,32,110,101,119,67, + 111,110,110,101,99,116,105,111,110,45,62,99,114,101,97,116,101,80,105,112,101,32,40,112,105,112,101,78,97,109,101,45,62,103,101,116,84,101,120,116, + 40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,111,112,101,110,101,100,79,107,41,13,10,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,112, + 112,101,110,100,77,101,115,115,97,103,101,32,40,84,40,34,87,97,105,116,105,110,103,32,102,111,114,32,97,110,111,116,104,101,114,32,97,112,112,32, + 116,111,32,99,111,110,110,101,99,116,32,116,111,32,116,104,105,115,32,112,105,112,101,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,97,100,100,32,40,110,101,119,67,111,110, + 110,101,99,116,105,111,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,110,101,119,67,111,110,110,101,99,116,105,111,110,59,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,13, + 10,32,32,32,32,32,32,32,32,105,102,32,40,33,32,111,112,101,110,101,100,79,107,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,115,101,116,83,101,108,101,99,116,101,100,73,100,32,40,56,41, + 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103, + 101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99,111,110,44,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,73,110,116, + 101,114,112,114,111,99,101,115,115,32,67,111,109,109,115,32,68,101,109,111,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,70,97,105,108,101,100,32,116,111,32,111, + 112,101,110,32,116,104,101,32,115,111,99,107,101,116,32,111,114,32,112,105,112,101,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,125, + 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,99,111,110,115,116, + 32,83,116,114,105,110,103,38,32,109,101,115,115,97,103,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105, + 110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,67,97,114,101,116,80,111,115,105,116,105,111,110,32,40,73,78,84,95,77,65,88,41,59,13, + 10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,105,110,115,101,114,116,84,101,120,116,65,116,67, + 117,114,115,111,114,32,40,109,101,115,115,97,103,101,32,43,32,84,40,34,92,110,34,41,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111, + 109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,67,97,114,101,116,80,111,115,105,116,105,111,110,32,40,73,78,84,95,77,65,88,41, + 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,99,108,97,115,115,32,68,101,109,111,73,110,116,101,114,112,114,111, + 99,101,115,115,67,111,110,110,101,99,116,105,111,110,32,32,58,32,112,117,98,108,105,99,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110, + 110,101,99,116,105,111,110,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109, + 115,68,101,109,111,38,32,111,119,110,101,114,59,13,10,32,32,32,32,32,32,32,32,105,110,116,32,111,117,114,78,117,109,98,101,114,59,13,10,13, + 10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111, + 110,110,101,99,116,105,111,110,32,40,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,38,32,111,119,110,101,114,95,41, + 13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,32,40, + 116,114,117,101,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,32,40,111,119,110,101,114,95,41,13,10,32,32, + 32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,116,97,116,105,99,32,105,110,116,32,116,111,116,97,108,67,111,110, + 110,101,99,116,105,111,110,115,32,61,32,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,117,114,78,117,109,98,101,114,32,61,32,43, + 43,116,111,116,97,108,67,111,110,110,101,99,116,105,111,110,115,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32, + 32,126,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,40,41,13,10,32,32,32,32,32,32,32,32, + 123,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,110,110,101,99,116,105,111,110,77, + 97,100,101,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,97,112,112,101, + 110,100,77,101,115,115,97,103,101,32,40,84,40,34,67,111,110,110,101,99,116,105,111,110,32,35,34,41,32,43,32,83,116,114,105,110,103,32,40,111, + 117,114,78,117,109,98,101,114,41,32,43,32,84,40,34,32,45,32,99,111,110,110,101,99,116,105,111,110,32,115,116,97,114,116,101,100,34,41,41,59, + 13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,110,110,101,99,116,105,111,110,76,111, + 115,116,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,97,112,112,101,110, + 100,77,101,115,115,97,103,101,32,40,84,40,34,67,111,110,110,101,99,116,105,111,110,32,35,34,41,32,43,32,83,116,114,105,110,103,32,40,111,117, + 114,78,117,109,98,101,114,41,32,43,32,84,40,34,32,45,32,99,111,110,110,101,99,116,105,111,110,32,108,111,115,116,34,41,41,59,13,10,32,32, + 32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,109,101,115,115,97,103,101,82,101,99,101,105,118,101,100,32, + 40,99,111,110,115,116,32,77,101,109,111,114,121,66,108,111,99,107,38,32,109,101,115,115,97,103,101,41,13,10,32,32,32,32,32,32,32,32,123,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,84,40,34,67,111,110, + 110,101,99,116,105,111,110,32,35,34,41,32,43,32,83,116,114,105,110,103,32,40,111,117,114,78,117,109,98,101,114,41,32,43,32,84,40,34,32,45, + 32,109,101,115,115,97,103,101,32,114,101,99,101,105,118,101,100,58,32,34,41,32,43,32,109,101,115,115,97,103,101,46,116,111,83,116,114,105,110,103, + 40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,99,108,97, + 115,115,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,32,32,32,58,32, + 112,117,98,108,105,99,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,13,10,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,38,32,111,119,110,101,114, + 59,13,10,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101, + 115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,32,40,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109, + 111,38,32,111,119,110,101,114,95,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,111,119,110,101,114,32,40,111,119,110,101,114,95,41, + 13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,126,68,101,109,111,73, + 110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,40,41,13,10,32,32,32,32,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101, + 99,116,105,111,110,42,32,99,114,101,97,116,101,67,111,110,110,101,99,116,105,111,110,79,98,106,101,99,116,40,41,13,10,32,32,32,32,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105, + 111,110,42,32,110,101,119,67,111,110,110,101,99,116,105,111,110,32,61,32,110,101,119,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115, + 67,111,110,110,101,99,116,105,111,110,32,40,111,119,110,101,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114, + 46,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,97,100,100,32,40,110,101,119,67,111,110,110,101,99,116,105,111,110,41,59,13, + 10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,101,119,67,111,110,110,101,99,116,105,111,110,59,13,10,32,32,32,32, + 32,32,32,32,125,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,79,119,110,101,100,65,114,114,97,121,32,60,68,101,109,111,73,110,116, + 101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,44,32,67,114,105,116,105,99,97,108,83,101,99,116,105,111,110,62,32,97,99, + 116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,59,13,10,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,106,117,99,101,95,85,115,101, + 68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,67,111, + 109,98,111,66,111,120,42,32,109,111,100,101,83,101,108,101,99,116,111,114,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,115, + 101,110,100,84,101,120,116,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,115,101,110,100,66,117,116,116,111,110,59,13,10,32, + 32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,59,13,10,13,10,32,32,32,32, + 84,101,120,116,69,100,105,116,111,114,42,32,112,105,112,101,78,97,109,101,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,115, + 111,99,107,101,116,78,117,109,98,101,114,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,115,111,99,107,101,116,72,111,115,116, + 59,13,10,13,10,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101, + 114,42,32,115,101,114,118,101,114,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,73, + 110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101, + 119,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::interprocesscommsdemo_cpp = (const char*) temp15; + +static const unsigned char temp16[] = {80,75,3,4,20,0,2,0,8,0,128,122,250,52,23,17,234,255,206,13,0,0,219,67,0,0,16,0,0,0,100,111,99,117,109,101,110,116,45,110, 101,119,46,115,118,103,237,28,93,115,219,54,242,61,191,66,167,188,212,83,139,196,55,64,37,118,39,77,38,157,222,244,122,51,77,59,247,216,161,40, 72,102,77,145,58,146,178,236,252,250,91,144,20,9,82,144,45,217,106,210,155,169,213,142,169,197,114,23,216,47,236,46,16,191,253,238,126,149,140,238, 116,94,196,89,122,53,198,30,26,143,116,26,101,243,56,93,94,141,127,251,245,227,68,141,71,69,25,166,243,48,201,82,125,53,78,179,241,119,215,175, @@ -4415,2230 +7744,7 @@ static const unsigned char temp6[] = {80,75,3,4,20,0,2,0,8,0,128,122,250,52,23,1 32,0,0,0,236,35,1,0,112,114,101,102,101,114,101,110,99,101,115,45,115,121,115,116,101,109,46,115,118,103,80,75,1,2,20,0,20,0,2,0, 8,0,183,128,249,52,199,174,1,222,145,13,0,0,154,63,0,0,18,0,0,0,0,0,0,0,1,0,32,0,0,0,212,52,1,0,115,121,115,116, 101,109,45,108,111,103,45,111,117,116,46,115,118,103,80,75,5,6,0,0,0,0,20,0,20,0,249,4,0,0,149,66,1,0,0,0,0,0}; -const char* BinaryData::icons_zip = (const char*) temp6; - -static const unsigned char temp7[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, - 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, - 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, - 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, - 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, - 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, - 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, - 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, - 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, - 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, - 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, - 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, - 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, - 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, - 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, - 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, - 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, - 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, - 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, - 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, - 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, - 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, - 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, - 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, - 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, - 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, - 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, - 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,99,108,97,115,115,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,32,32,58,32,112,117,98,108,105,99, - 32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,111,109,98,111,66,111,120,76,105,115,116,101,110, - 101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111, - 109,109,115,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,114,118,101,114,32,61,32,110,101,119,32,68, - 101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,32,40,42,116,104,105,115,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,73,110,116,101,114,112,114,111,99,101,115,115,32,67,111,109, - 109,117,110,105,99,97,116,105,111,110,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,108,108,32, - 111,117,114,32,85,73,32,98,105,116,115,32,97,110,100,32,112,105,101,99,101,115,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100, - 77,97,107,101,86,105,115,105,98,108,101,32,40,109,111,100,101,83,101,108,101,99,116,111,114,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120, - 32,40,84,40,34,109,111,100,101,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,115, - 101,116,66,111,117,110,100,115,32,40,49,48,48,44,32,50,53,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,40,110, - 101,119,32,76,97,98,101,108,32,40,109,111,100,101,83,101,108,101,99,116,111,114,45,62,103,101,116,78,97,109,101,40,41,44,32,109,111,100,101,83, - 101,108,101,99,116,111,114,45,62,103,101,116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32, - 40,109,111,100,101,83,101,108,101,99,116,111,114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108, - 101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,40,68,105,115,99,111,110,110,101,99,116,101,100,41,34,41,44,32,56,41,59, - 13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13, - 10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,78,97,109,101,100, - 32,112,105,112,101,32,40,108,105,115,116,101,110,105,110,103,41,34,41,44,32,49,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101, - 108,101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,78,97,109,101,100,32,112,105,112,101,32,40,99,111,110,110,101,99,116,32, - 116,111,32,101,120,105,115,116,105,110,103,32,112,105,112,101,41,34,41,44,32,53,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101, - 108,101,99,116,111,114,45,62,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108, - 101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,83,111,99,107,101,116,32,40,108,105,115,116,101,110,105,110,103,41,34,41,44, - 32,50,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34, - 83,111,99,107,101,116,32,40,99,111,110,110,101,99,116,32,116,111,32,101,120,105,115,116,105,110,103,32,115,111,99,107,101,116,41,34,41,44,32,54, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,115,101,116,83,101,108,101,99,116,101,100,73, - 100,32,40,56,41,59,13,10,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,97,100,100,76,105,115,116,101,110,101, - 114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40, - 112,105,112,101,78,97,109,101,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,112,105,112,101,32,110,97,109,101,58, - 34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,112,105,112,101,78,97,109,101,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,48,44, - 32,54,48,44,32,49,51,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,112,105,112,101,78,97,109,101,45,62,115,101,116,77,117,108, - 116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,112,105,112,101,78,97,109,101,45,62,115,101,116,84,101, - 120,116,32,40,84,40,34,106,117,99,101,32,100,101,109,111,32,112,105,112,101,34,41,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32, - 76,97,98,101,108,32,40,112,105,112,101,78,97,109,101,45,62,103,101,116,78,97,109,101,40,41,44,32,112,105,112,101,78,97,109,101,45,62,103,101, - 116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,112,105,112,101,78,97,109,101,44,32, - 116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,111,99, - 107,101,116,78,117,109,98,101,114,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,115,111,99,107,101,116,32,112,111, - 114,116,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,78,117,109,98,101,114,45,62,115,101,116,66,111,117,110,100, - 115,32,40,51,53,48,44,32,54,48,44,32,56,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,78,117,109,98, - 101,114,45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101, - 116,78,117,109,98,101,114,45,62,115,101,116,84,101,120,116,32,40,84,40,34,49,50,51,52,53,34,41,41,59,13,10,32,32,32,32,32,32,32,32, - 115,111,99,107,101,116,78,117,109,98,101,114,45,62,115,101,116,73,110,112,117,116,82,101,115,116,114,105,99,116,105,111,110,115,32,40,53,44,32,84, - 40,34,48,49,50,51,52,53,54,55,56,57,34,41,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,115,111, - 99,107,101,116,78,117,109,98,101,114,45,62,103,101,116,78,97,109,101,40,41,44,32,115,111,99,107,101,116,78,117,109,98,101,114,45,62,103,101,116, - 78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,115,111,99,107,101,116,78,117,109,98,101, - 114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40, - 115,111,99,107,101,116,72,111,115,116,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,115,111,99,107,101,116,32,104, - 111,115,116,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,72,111,115,116,45,62,115,101,116,66,111,117,110,100,115, - 32,40,53,51,48,44,32,54,48,44,32,49,51,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,72,111,115,116, - 45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,111,99,107,101,116,72, - 111,115,116,45,62,115,101,116,84,101,120,116,32,40,84,40,34,108,111,99,97,108,104,111,115,116,34,41,41,59,13,10,32,32,32,32,32,32,32,32, - 115,111,99,107,101,116,78,117,109,98,101,114,45,62,115,101,116,73,110,112,117,116,82,101,115,116,114,105,99,116,105,111,110,115,32,40,53,49,50,41, - 59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,115,111,99,107,101,116,72,111,115,116,45,62,103,101,116,78,97, - 109,101,40,41,44,32,115,111,99,107,101,116,72,111,115,116,45,62,103,101,116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67, - 111,109,112,111,110,101,110,116,32,40,115,111,99,107,101,116,72,111,115,116,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,115,101,110,100,84,101,120,116,32,61,32,110,101,119,32,84,101,120,116,69,100, - 105,116,111,114,32,40,84,40,34,115,101,110,100,116,101,120,116,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,84,101,120,116, - 45,62,115,101,116,66,111,117,110,100,115,32,40,51,48,44,32,49,50,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32, - 32,115,101,110,100,84,101,120,116,45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32, - 32,32,115,101,110,100,84,101,120,116,45,62,115,101,116,82,101,97,100,79,110,108,121,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32, - 32,32,115,101,110,100,84,101,120,116,45,62,115,101,116,84,101,120,116,32,40,84,40,34,116,101,115,116,105,110,103,32,49,50,51,52,34,41,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,115,101,110,100,66,117,116,116,111, - 110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,115,101,110,100,34,41,44,32,84,40,34,70,105,114,101,115,32, - 111,102,102,32,116,104,101,32,109,101,115,115,97,103,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110, - 45,62,115,101,116,66,111,117,110,100,115,32,40,50,52,48,44,32,49,50,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32, - 32,32,115,101,110,100,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,40,41,59,13,10,32, - 32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104, - 105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,105,110,99,111,109, - 105,110,103,77,101,115,115,97,103,101,115,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,109,101,115,115,97,103,101, - 115,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,82,101,97, - 100,79,110,108,121,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45, - 62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77, - 101,115,115,97,103,101,115,45,62,115,101,116,66,111,117,110,100,115,32,40,51,48,44,32,49,53,48,44,32,53,48,48,44,32,50,53,48,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,108,108,32,116,104,105,115,32,116,111,32,115,101,116,32,117,112,32,101,118,101,114,121,116, - 104,105,110,103,39,115,32,115,116,97,116,101,32,99,111,114,114,101,99,116,108,121,46,13,10,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111, - 120,67,104,97,110,103,101,100,32,40,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,73,110,116,101,114,112,114,111,99,101,115, - 115,67,111,109,109,115,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,108,111,115,101,40,41,59,13,10,32, - 32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,101,114,118,101,114,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65, - 108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67, - 108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, - 105,102,32,40,98,117,116,116,111,110,32,61,61,32,115,101,110,100,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,47,47,32,84,104,101,32,115,101,110,100,32,98,117,116,116,111,110,32,104,97,115,32,98,101,101,110,32,112,114, - 101,115,115,101,100,44,32,115,111,32,119,114,105,116,101,32,111,117,116,32,116,104,101,32,99,111,110,116,101,110,116,115,32,111,102,32,116,104,101,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,101,120,116,32,98,111,120,32,116,111,32,116,104,101,32,115,111,99,107,101,116,32,111, - 114,32,112,105,112,101,44,32,100,101,112,101,110,100,105,110,103,32,111,110,32,119,104,105,99,104,32,105,115,32,97,99,116,105,118,101,46,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,101,120,116,32,40,115,101,110,100,84,101,120,116,45,62, - 103,101,116,84,101,120,116,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,77,101,109,111,114,121,66,108,111,99,107,32,109,101,115, - 115,97,103,101,68,97,116,97,32,40,40,99,111,110,115,116,32,99,104,97,114,42,41,32,116,101,120,116,44,32,116,101,120,116,46,108,101,110,103,116, - 104,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,97,99,116,105,118,101, - 67,111,110,110,101,99,116,105,111,110,115,46,115,105,122,101,40,41,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,32,97,99,116,105,118,101,67,111,110,110,101, - 99,116,105,111,110,115,91,105,93,45,62,115,101,110,100,77,101,115,115,97,103,101,32,40,109,101,115,115,97,103,101,68,97,116,97,41,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47, - 32,116,104,101,32,119,114,105,116,101,32,102,97,105,108,101,100,44,32,115,111,32,105,110,100,105,99,97,116,101,32,116,104,97,116,32,116,104,101,32, - 99,111,110,110,101,99,116,105,111,110,32,104,97,115,32,98,114,111,107,101,110,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,84,40,34,115,101,110,100,32,109,101,115,115,97,103,101,32,102,97,105,108, - 101,100,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,111,109,98,111,66,111,120, - 67,104,97,110,103,101,100,32,40,67,111,109,98,111,66,111,120,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,84, - 104,105,115,32,105,115,32,99,97,108,108,101,100,32,119,104,101,110,32,116,104,101,32,117,115,101,114,32,112,105,99,107,115,32,97,32,100,105,102,102, - 101,114,101,110,116,32,109,111,100,101,32,102,114,111,109,32,116,104,101,32,100,114,111,112,45,100,111,119,110,32,108,105,115,116,46,46,13,10,32,32, - 32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,109,111,100,101,73,100,32,61,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,103, - 101,116,83,101,108,101,99,116,101,100,73,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,108,111,115,101,40,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,105,102,32,40,109,111,100,101,73,100,32,60,32,56,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,111,112,101,110,32,40,40,109,111,100,101,73,100,32,38,32,50,41,32,33,61,32,48,44,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,40,109,111,100,101,73,100,32,38,32,52,41,32,33,61,32,48,41,59,13,10,32,32,32,32,32,32,32,32, - 125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,74,117,115,116,32,99,108,111,115,101,115,32,97,110,121, - 32,99,111,110,110,101,99,116,105,111,110,115,32,116,104,97,116,32,97,114,101,32,99,117,114,114,101,110,116,108,121,32,111,112,101,110,46,13,10,32, - 32,32,32,118,111,105,100,32,99,108,111,115,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,114,118,101,114,45,62, - 115,116,111,112,40,41,59,13,10,32,32,32,32,32,32,32,32,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,99,108,101,97,114, - 40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,82,101,115,101,116,32,116,104,101,32,85,73,32,115,116,117,102,102,32,116,111,32, - 97,32,100,105,115,97,98,108,101,100,32,115,116,97,116,101,46,13,10,32,32,32,32,32,32,32,32,115,101,110,100,84,101,120,116,45,62,115,101,116, - 86,105,115,105,98,108,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110,45,62,115,101, - 116,86,105,115,105,98,108,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97, - 103,101,115,45,62,115,101,116,84,101,120,116,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,102,97,108,115,101,41,59,13,10,32,32, - 32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,86,105,115,105,98,108,101,32,40,116,114,117,101, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,34,84,111,32,100,101,109,111,110,115,116,114,97,116,101,32,110,97,109,101,100,32,112,105,112,101,115,44,32,121,111,117,39,108,108,32,110, - 101,101,100,32,116,111,32,114,117,110,32,116,119,111,32,105,110,115,116,97,110,99,101,115,32,111,102,32,116,104,101,32,74,117,99,101,68,101,109,111, - 32,97,112,112,108,105,99,97,116,105,111,110,32,111,110,32,116,104,105,115,32,109,97,99,104,105,110,101,46,32,79,110,32,34,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,34,111,110,101,32,111,102,32,116,104,101,109,44,32,115,101,108,101,99,116,32,92,34,110,97,109,101,100,32,112,105,112, - 101,32,40,108,105,115,116,101,110,105,110,103,41,92,34,44,32,97,110,100,32,116,104,101,110,32,111,110,32,116,104,101,32,111,116,104,101,114,44,32, - 115,101,108,101,99,116,32,92,34,110,97,109,101,100,32,112,105,112,101,32,40,99,111,110,110,101,99,116,32,116,111,32,101,120,105,115,116,105,110,103, - 32,112,105,112,101,41,92,34,46,32,84,104,101,110,32,109,101,115,115,97,103,101,115,32,116,104,97,116,32,121,111,117,32,34,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,34,115,101,110,100,32,102,114,111,109,32,116,104,101,32,39,115,101,110,100,101,114,39,32,97,112,112,32,115,104,111,117, - 108,100,32,97,112,112,101,97,114,32,111,110,32,116,104,101,32,108,105,115,116,101,110,101,114,32,97,112,112,46,32,84,104,101,32,92,34,112,105,112, - 101,32,110,97,109,101,92,34,32,102,105,101,108,100,32,108,101,116,115,32,121,111,117,32,99,104,111,111,115,101,32,97,32,110,97,109,101,32,102,111, - 114,32,116,104,101,32,112,105,112,101,92,110,92,110,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,84,111,32,100,101,109,111,110,115,116, - 114,97,116,101,32,115,111,99,107,101,116,115,44,32,121,111,117,32,99,97,110,32,101,105,116,104,101,114,32,114,117,110,32,116,119,111,32,105,110,115, - 116,97,110,99,101,115,32,111,102,32,116,104,101,32,97,112,112,32,111,110,32,116,104,101,32,115,97,109,101,32,109,97,99,104,105,110,101,44,32,111, - 114,32,111,110,32,100,105,102,102,101,114,101,110,116,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,109,97,99,104,105,110,101,115,32, - 111,110,32,121,111,117,114,32,110,101,116,119,111,114,107,46,32,73,110,32,101,97,99,104,32,111,110,101,32,101,110,116,101,114,32,97,32,115,111,99, - 107,101,116,32,110,117,109,98,101,114,44,32,116,104,101,110,32,111,110,32,111,110,101,32,111,102,32,116,104,101,32,97,112,112,115,44,32,115,101,108, - 101,99,116,32,116,104,101,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,92,34,83,111,99,107,101,116,32,40,108,105,115,116,101,110, - 105,110,103,41,92,34,32,109,111,100,101,46,32,79,110,32,116,104,101,32,111,116,104,101,114,44,32,101,110,116,101,114,32,116,104,101,32,104,111,115, - 116,32,97,100,100,114,101,115,115,32,111,102,32,116,104,101,32,108,105,115,116,101,110,105,110,103,32,97,112,112,44,32,97,110,100,32,115,101,108,101, - 99,116,32,92,34,83,111,99,107,101,116,32,40,99,111,110,110,101,99,116,32,116,111,32,101,120,105,115,116,105,110,103,32,115,111,99,107,101,116,41, - 92,34,46,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,77,101,115,115,97,103,101,115,32,115,104,111,117,108,100,32,116,104,101,110, - 32,98,101,32,98,101,32,115,101,110,116,32,98,101,116,119,101,101,110,32,116,104,101,32,97,112,112,115,32,105,110,32,116,104,101,32,115,97,109,101, - 32,119,97,121,32,97,115,32,116,104,114,111,117,103,104,32,116,104,101,32,110,97,109,101,100,32,112,105,112,101,115,46,34,41,59,13,10,32,32,32, - 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,111,112,101,110,32,40,98,111,111,108,32,97,115,83,111,99,107,101,116,44,32,98,111,111,108, - 32,97,115,83,101,110,100,101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,108,111,115,101,40,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,47,47,32,77,97,107,101,32,116,104,101,32,97,112,112,114,111,112,114,105,97,116,101,32,98,105,116,115,32,111,102,32,85, - 73,32,118,105,115,105,98,108,101,46,46,13,10,32,32,32,32,32,32,32,32,115,101,110,100,84,101,120,116,45,62,115,101,116,86,105,115,105,98,108, - 101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,115,101,110,100,66,117,116,116,111,110,45,62,115,101,116,86,105,115,105,98,108, - 101,32,40,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115, - 101,116,84,101,120,116,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32, - 105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,86,105,115,105,98,108,101,32,40,116,114,117,101,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,116,114,121,32,116,111,32,111,112,101,110,32,116,104,101,32,115,111,99,107,101,116,32,111,114, - 32,112,105,112,101,46,46,46,13,10,32,32,32,32,32,32,32,32,98,111,111,108,32,111,112,101,110,101,100,79,107,32,61,32,102,97,108,115,101,59, - 13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,97,115,83,101,110,100,101,114,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,47,47,32,105,102,32,119,101,39,114,101,32,99,111,110,110,101,99,116,105,110,103,32,116,111,32,97,110,32,101, - 120,105,115,116,105,110,103,32,115,101,114,118,101,114,44,32,119,101,32,99,97,110,32,106,117,115,116,32,99,114,101,97,116,101,32,97,32,99,111,110, - 110,101,99,116,105,111,110,32,111,98,106,101,99,116,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,100,105,114,101,99,116,108,121,46, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110, - 42,32,110,101,119,67,111,110,110,101,99,116,105,111,110,32,61,32,110,101,119,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111, - 110,110,101,99,116,105,111,110,32,40,42,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,97,115,83, - 111,99,107,101,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111, - 112,101,110,101,100,79,107,32,61,32,110,101,119,67,111,110,110,101,99,116,105,111,110,45,62,99,111,110,110,101,99,116,84,111,83,111,99,107,101,116, - 32,40,115,111,99,107,101,116,72,111,115,116,45,62,103,101,116,84,101,120,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,115,111,99,107,101,116,78,117,109,98,101,114,45,62,103,101,116,84,101,120,116,40,41,46,103,101,116,73,110,116,86,97,108,117,101, - 40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,48,48,48,41,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,101,110,101,100,79,107,32,61,32,110,101,119,67,111,110,110,101,99,116,105,111,110, - 45,62,99,111,110,110,101,99,116,84,111,80,105,112,101,32,40,112,105,112,101,78,97,109,101,45,62,103,101,116,84,101,120,116,40,41,41,59,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,111,112,101,110,101,100,79, - 107,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,97,100, - 100,32,40,110,101,119,67,111,110,110,101,99,116,105,111,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,110,101,119,67,111,110,110,101,99,116,105,111,110,59,13,10,32,32,32, - 32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,47,47,32,105,102,32,119,101,39,114,101,32,115,116,97,114,116,105,110,103,32,117,112,32,97,32,115,101,114,118,101,114,44,32,119, - 101,32,110,101,101,100,32,116,111,32,116,101,108,108,32,116,104,101,32,115,101,114,118,101,114,32,116,111,32,115,116,97,114,116,32,119,97,105,116,105, - 110,103,32,102,111,114,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,99,108,105,101,110,116,115,32,116,111,32,99,111,110,110,101,99, - 116,46,32,73,116,39,108,108,32,116,104,101,110,32,99,114,101,97,116,101,32,99,111,110,110,101,99,116,105,111,110,32,111,98,106,101,99,116,115,32, - 102,111,114,32,117,115,32,119,104,101,110,32,99,108,105,101,110,116,115,32,97,114,114,105,118,101,46,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,105,102,32,40,97,115,83,111,99,107,101,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,111,112,101,110,101,100,79,107,32,61,32,115,101,114,118,101,114,45,62,98,101,103,105,110,87,97,105,116,105,110,103,70,111, - 114,83,111,99,107,101,116,32,40,115,111,99,107,101,116,78,117,109,98,101,114,45,62,103,101,116,84,101,120,116,40,41,46,103,101,116,73,110,116,86, - 97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,111,112,101,110,101,100,79,107, - 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,84,40, - 34,87,97,105,116,105,110,103,32,102,111,114,32,97,110,111,116,104,101,114,32,97,112,112,32,116,111,32,99,111,110,110,101,99,116,32,116,111,32,116, - 104,105,115,32,115,111,99,107,101,116,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,42,32,110,101,119,67,111,110,110,101,99,116, - 105,111,110,32,61,32,110,101,119,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,32,40,42,116, - 104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,101,110,101,100,79,107,32,61,32,110,101,119,67, - 111,110,110,101,99,116,105,111,110,45,62,99,114,101,97,116,101,80,105,112,101,32,40,112,105,112,101,78,97,109,101,45,62,103,101,116,84,101,120,116, - 40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,111,112,101,110,101,100,79,107,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,112, - 112,101,110,100,77,101,115,115,97,103,101,32,40,84,40,34,87,97,105,116,105,110,103,32,102,111,114,32,97,110,111,116,104,101,114,32,97,112,112,32, - 116,111,32,99,111,110,110,101,99,116,32,116,111,32,116,104,105,115,32,112,105,112,101,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,97,100,100,32,40,110,101,119,67,111,110, - 110,101,99,116,105,111,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,110,101,119,67,111,110,110,101,99,116,105,111,110,59,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,13, - 10,32,32,32,32,32,32,32,32,105,102,32,40,33,32,111,112,101,110,101,100,79,107,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,109,111,100,101,83,101,108,101,99,116,111,114,45,62,115,101,116,83,101,108,101,99,116,101,100,73,100,32,40,56,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103, - 101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99,111,110,44,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,73,110,116, - 101,114,112,114,111,99,101,115,115,32,67,111,109,109,115,32,68,101,109,111,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,70,97,105,108,101,100,32,116,111,32,111, - 112,101,110,32,116,104,101,32,115,111,99,107,101,116,32,111,114,32,112,105,112,101,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,125, - 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,99,111,110,115,116, - 32,83,116,114,105,110,103,38,32,109,101,115,115,97,103,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,110,99,111,109,105, - 110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,67,97,114,101,116,80,111,115,105,116,105,111,110,32,40,73,78,84,95,77,65,88,41,59,13, - 10,32,32,32,32,32,32,32,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,45,62,105,110,115,101,114,116,84,101,120,116,65,116,67, - 117,114,115,111,114,32,40,109,101,115,115,97,103,101,32,43,32,84,40,34,92,110,34,41,41,59,13,10,32,32,32,32,32,32,32,32,105,110,99,111, - 109,105,110,103,77,101,115,115,97,103,101,115,45,62,115,101,116,67,97,114,101,116,80,111,115,105,116,105,111,110,32,40,73,78,84,95,77,65,88,41, - 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,99,108,97,115,115,32,68,101,109,111,73,110,116,101,114,112,114,111, - 99,101,115,115,67,111,110,110,101,99,116,105,111,110,32,32,58,32,112,117,98,108,105,99,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110, - 110,101,99,116,105,111,110,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109, - 115,68,101,109,111,38,32,111,119,110,101,114,59,13,10,32,32,32,32,32,32,32,32,105,110,116,32,111,117,114,78,117,109,98,101,114,59,13,10,13, - 10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111, - 110,110,101,99,116,105,111,110,32,40,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,38,32,111,119,110,101,114,95,41, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,32,40, - 116,114,117,101,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,32,40,111,119,110,101,114,95,41,13,10,32,32, - 32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,116,97,116,105,99,32,105,110,116,32,116,111,116,97,108,67,111,110, - 110,101,99,116,105,111,110,115,32,61,32,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,117,114,78,117,109,98,101,114,32,61,32,43, - 43,116,111,116,97,108,67,111,110,110,101,99,116,105,111,110,115,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32, - 32,126,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,40,41,13,10,32,32,32,32,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,110,110,101,99,116,105,111,110,77, - 97,100,101,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,97,112,112,101, - 110,100,77,101,115,115,97,103,101,32,40,84,40,34,67,111,110,110,101,99,116,105,111,110,32,35,34,41,32,43,32,83,116,114,105,110,103,32,40,111, - 117,114,78,117,109,98,101,114,41,32,43,32,84,40,34,32,45,32,99,111,110,110,101,99,116,105,111,110,32,115,116,97,114,116,101,100,34,41,41,59, - 13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,110,110,101,99,116,105,111,110,76,111, - 115,116,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,97,112,112,101,110, - 100,77,101,115,115,97,103,101,32,40,84,40,34,67,111,110,110,101,99,116,105,111,110,32,35,34,41,32,43,32,83,116,114,105,110,103,32,40,111,117, - 114,78,117,109,98,101,114,41,32,43,32,84,40,34,32,45,32,99,111,110,110,101,99,116,105,111,110,32,108,111,115,116,34,41,41,59,13,10,32,32, - 32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,109,101,115,115,97,103,101,82,101,99,101,105,118,101,100,32, - 40,99,111,110,115,116,32,77,101,109,111,114,121,66,108,111,99,107,38,32,109,101,115,115,97,103,101,41,13,10,32,32,32,32,32,32,32,32,123,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,97,112,112,101,110,100,77,101,115,115,97,103,101,32,40,84,40,34,67,111,110, - 110,101,99,116,105,111,110,32,35,34,41,32,43,32,83,116,114,105,110,103,32,40,111,117,114,78,117,109,98,101,114,41,32,43,32,84,40,34,32,45, - 32,109,101,115,115,97,103,101,32,114,101,99,101,105,118,101,100,58,32,34,41,32,43,32,109,101,115,115,97,103,101,46,116,111,83,116,114,105,110,103, - 40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,99,108,97, - 115,115,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,32,32,32,58,32, - 112,117,98,108,105,99,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,13,10,32,32,32, - 32,123,13,10,32,32,32,32,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,38,32,111,119,110,101,114, - 59,13,10,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101, - 115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,32,40,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109, - 111,38,32,111,119,110,101,114,95,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,111,119,110,101,114,32,40,111,119,110,101,114,95,41, - 13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,126,68,101,109,111,73, - 110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101,114,40,41,13,10,32,32,32,32,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101, - 99,116,105,111,110,42,32,99,114,101,97,116,101,67,111,110,110,101,99,116,105,111,110,79,98,106,101,99,116,40,41,13,10,32,32,32,32,32,32,32, - 32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105, - 111,110,42,32,110,101,119,67,111,110,110,101,99,116,105,111,110,32,61,32,110,101,119,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115, - 67,111,110,110,101,99,116,105,111,110,32,40,111,119,110,101,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114, - 46,97,99,116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,46,97,100,100,32,40,110,101,119,67,111,110,110,101,99,116,105,111,110,41,59,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,101,119,67,111,110,110,101,99,116,105,111,110,59,13,10,32,32,32,32, - 32,32,32,32,125,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,79,119,110,101,100,65,114,114,97,121,32,60,68,101,109,111,73,110,116, - 101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,44,32,67,114,105,116,105,99,97,108,83,101,99,116,105,111,110,62,32,97,99, - 116,105,118,101,67,111,110,110,101,99,116,105,111,110,115,59,13,10,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,106,117,99,101,95,85,115,101, - 68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,67,111, - 109,98,111,66,111,120,42,32,109,111,100,101,83,101,108,101,99,116,111,114,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,115, - 101,110,100,84,101,120,116,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,115,101,110,100,66,117,116,116,111,110,59,13,10,32, - 32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,105,110,99,111,109,105,110,103,77,101,115,115,97,103,101,115,59,13,10,13,10,32,32,32,32, - 84,101,120,116,69,100,105,116,111,114,42,32,112,105,112,101,78,97,109,101,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,115, - 111,99,107,101,116,78,117,109,98,101,114,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,115,111,99,107,101,116,72,111,115,116, - 59,13,10,13,10,32,32,32,32,68,101,109,111,73,110,116,101,114,112,114,111,99,101,115,115,67,111,110,110,101,99,116,105,111,110,83,101,114,118,101, - 114,42,32,115,101,114,118,101,114,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,73, - 110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101, - 119,32,73,110,116,101,114,112,114,111,99,101,115,115,67,111,109,109,115,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::interprocesscommsdemo_cpp = (const char*) temp7; - -static const unsigned char temp8[] = {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,140,0,0,0,86,8,6,0,0,0,29,101,126,119,0,0,0,9,112,72,89, - 115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,4,103,65,77,65,0,0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0, - 122,37,0,0,128,131,0,0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95,197,70,0,0,59,48,73,68, - 65,84,120,218,98,100,160,30,96,68,195,76,72,24,89,140,17,77,223,63,32,254,143,70,255,67,226,195,212,12,58,160,163,163,192,112,252,248,20,6, - 38,38,102,134,55,111,62,50,240,240,112,50,176,178,178,48,252,249,243,7,136,255,49,48,2,125,202,206,206,6,246,198,143,31,191,24,254,3,125,35, - 38,38,204,240,244,233,75,6,102,102,38,134,159,63,127,51,60,124,248,146,129,139,139,157,97,235,214,19,12,143,30,189,98,48,53,85,103,200,204,156, - 128,213,190,89,179,138,24,230,205,219,193,16,23,231,6,182,251,247,239,191,12,2,2,60,12,191,126,253,102,48,48,80,97,248,242,229,59,208,158,159, - 12,188,188,220,96,243,65,118,130,0,19,19,35,3,27,27,43,208,77,127,25,62,124,248,204,32,44,204,15,118,203,185,115,183,24,56,57,217,193,248, - 196,137,171,12,147,39,111,96,40,43,139,96,72,75,235,133,235,69,7,0,1,196,66,165,132,2,75,8,204,72,152,9,137,141,45,65,49,64,19,4, - 58,254,11,197,127,160,9,229,47,84,253,255,193,154,112,70,18,0,8,32,22,10,18,9,3,82,9,194,12,53,11,134,33,137,132,145,145,153,135,139, - 139,131,135,137,129,79,130,157,89,76,137,147,133,239,195,31,166,223,172,204,76,204,223,127,253,248,7,148,254,247,135,145,241,247,163,207,95,223,255,98, - 102,251,244,241,231,207,47,63,126,254,250,5,53,31,148,80,126,67,19,14,114,226,249,135,148,184,70,1,157,1,64,0,177,80,80,162,48,33,37,16, - 54,36,54,147,58,31,187,132,190,176,128,150,40,195,31,25,35,17,110,77,101,182,223,42,66,172,255,20,152,153,126,113,178,75,112,252,102,98,97,96, - 249,245,150,241,223,159,95,255,254,254,253,199,244,251,219,23,158,119,31,24,217,95,221,254,202,117,235,236,135,159,87,175,252,102,60,127,237,237,167,103, - 223,127,255,253,137,84,218,252,134,98,228,210,103,52,209,208,25,0,4,16,11,137,9,133,17,169,186,97,5,98,118,104,98,97,226,224,226,226,209,226, - 100,81,12,22,102,117,52,227,254,229,166,166,240,95,147,75,150,139,157,149,7,168,64,138,143,129,153,135,141,129,137,157,153,129,153,139,133,129,145,153, - 145,225,239,247,191,12,255,254,254,99,248,247,243,47,195,159,15,191,36,255,190,255,161,109,242,138,193,209,255,41,243,159,167,175,254,61,188,41,37,113, - 250,228,95,174,131,203,110,63,62,249,229,231,175,55,64,181,32,123,126,65,49,35,82,105,51,154,112,232,8,0,2,136,133,196,82,133,25,169,68,1, - 37,22,14,102,96,43,207,94,90,66,39,77,150,63,90,155,227,131,163,160,224,55,17,97,123,25,6,118,5,30,6,70,78,86,104,139,4,24,159,255, - 128,248,47,144,243,23,88,56,252,254,207,192,12,52,129,25,212,42,4,38,36,118,9,110,80,203,12,28,239,255,127,252,101,17,123,246,69,89,245,234, - 71,101,187,187,31,195,35,4,101,206,46,121,243,103,225,154,59,207,246,125,248,241,235,27,52,193,124,135,210,191,209,26,206,163,128,198,0,32,128,136, - 73,48,200,13,90,88,66,1,151,44,138,226,226,146,9,50,66,193,190,252,31,35,100,245,222,74,243,26,9,51,176,137,202,48,48,130,34,31,216,90, - 103,120,253,17,90,123,252,7,165,14,160,14,94,6,6,110,49,96,146,99,135,152,252,27,24,255,191,190,48,48,124,254,4,140,114,160,58,22,62,6, - 70,22,38,6,14,121,126,6,14,21,1,6,190,247,223,24,249,206,189,51,41,59,249,85,219,138,85,116,235,212,231,223,231,157,125,241,238,38,212,45, - 63,160,9,231,55,82,21,197,48,154,112,104,11,0,2,136,133,200,146,133,5,90,5,113,2,49,23,63,63,63,119,172,170,180,71,24,251,151,4,5, - 241,215,58,226,126,226,12,108,192,72,102,248,241,15,92,122,48,124,127,3,140,82,160,114,41,29,160,106,41,96,41,34,15,212,41,7,76,48,146,192, - 4,194,198,240,255,205,107,160,90,96,98,145,6,38,30,30,110,6,70,182,175,12,12,183,22,51,48,60,61,4,180,13,152,168,190,255,1,39,7,54, - 96,119,79,196,89,154,65,64,239,59,39,255,158,231,33,58,87,24,172,151,243,139,77,157,245,240,253,134,175,63,126,195,170,198,239,80,119,254,129,86, - 83,116,3,90,90,10,12,255,128,37,39,184,112,28,33,0,32,128,88,8,148,44,76,72,85,16,40,177,112,178,178,177,113,149,104,43,36,68,178,63, - 43,16,117,227,97,225,53,82,97,96,4,69,211,7,104,124,253,1,70,190,146,7,3,131,124,48,195,255,23,192,4,116,15,88,32,252,249,195,240,255, - 246,78,6,134,199,64,246,219,151,12,255,63,188,4,138,1,227,153,79,132,129,129,87,152,129,81,223,137,129,41,174,10,82,56,60,61,2,76,154,60, - 208,18,8,168,255,215,63,96,193,195,193,32,22,169,194,192,113,246,149,100,230,182,23,77,50,236,34,178,181,55,223,206,248,246,243,23,44,65,35,131, - 191,244,42,101,242,243,131,193,99,27,44,44,44,35,38,193,0,4,16,11,129,6,46,72,158,3,86,178,136,10,9,10,149,42,11,39,4,138,60,73, - 148,13,145,100,97,147,1,150,42,159,127,67,218,39,160,56,250,11,76,4,134,165,64,182,37,195,191,169,93,12,255,15,111,0,202,1,171,37,198,255, - 144,10,3,220,10,2,22,12,160,0,102,7,26,255,245,57,3,195,167,39,12,255,175,93,96,248,247,250,57,3,83,94,50,3,195,51,96,130,249,15, - 29,114,249,243,13,82,85,129,74,46,160,62,62,19,80,149,199,201,20,188,252,65,58,219,127,33,158,170,59,239,39,124,254,254,243,3,90,87,255,63, - 189,218,52,223,190,253,28,113,85,18,64,0,177,224,72,44,176,198,45,59,44,177,136,9,241,11,53,107,201,20,120,138,60,137,146,142,87,96,96,226, - 2,166,163,143,191,160,73,11,72,252,250,12,172,98,172,24,254,179,0,19,75,158,31,3,195,155,59,12,12,130,64,53,140,220,144,4,192,200,136,105, - 19,27,11,68,156,253,55,195,255,203,59,128,49,144,199,192,32,160,12,108,251,92,1,138,241,49,48,200,58,48,48,136,153,1,93,2,44,224,94,28, - 7,150,80,251,25,56,36,88,25,164,146,85,24,252,22,221,143,254,253,95,248,87,221,189,247,83,191,124,251,142,62,248,55,218,237,166,17,0,8,32, - 38,60,189,33,88,53,196,205,203,203,45,80,161,44,150,234,204,254,40,82,60,88,134,129,137,19,152,16,190,253,65,77,4,255,129,241,195,175,192,192, - 112,227,2,48,177,220,5,70,52,176,45,194,8,77,143,216,18,11,92,223,127,136,181,255,25,33,205,215,255,64,66,64,150,129,193,102,6,208,230,88, - 96,41,245,138,225,255,238,251,12,255,185,162,24,24,236,129,98,127,249,129,53,214,47,6,241,112,89,6,95,137,111,177,69,178,124,49,192,210,7,152, - 42,25,120,160,238,101,67,234,250,51,210,42,224,128,205,56,6,54,96,130,255,63,194,146,36,64,0,177,224,40,93,88,161,85,17,15,19,11,11,119, - 153,186,116,156,47,223,171,100,153,24,25,70,54,49,96,188,124,3,54,19,254,1,91,165,127,128,152,137,25,146,153,255,1,171,143,47,207,128,9,197, - 6,168,147,3,210,149,38,182,199,254,15,168,159,157,139,225,63,211,79,6,70,94,25,6,6,245,2,134,255,139,150,50,252,91,213,3,52,255,55,164, - 156,88,197,205,192,20,211,194,192,232,63,143,129,225,88,38,3,187,200,11,6,133,20,5,150,132,149,79,50,31,255,19,123,62,255,246,243,237,12,152, - 243,80,52,27,17,238,237,205,97,208,212,148,103,248,253,251,15,120,46,102,164,0,128,0,98,193,147,88,64,185,150,35,68,73,194,201,159,227,117,146, - 84,144,4,19,187,172,0,48,81,0,235,237,63,192,174,176,152,46,176,202,240,4,170,146,135,36,150,251,235,192,189,28,70,147,16,6,70,73,29,134, - 255,207,207,1,147,27,23,180,125,67,160,31,246,239,47,3,35,23,23,48,177,0,19,163,92,37,195,255,249,115,24,254,173,104,103,96,16,226,2,13, - 9,66,27,192,191,25,254,77,47,100,96,124,255,26,216,64,238,101,96,56,152,192,192,2,116,142,180,175,4,123,214,179,39,37,143,165,4,222,237,121, - 246,225,40,3,98,46,138,198,137,102,100,78,107,1,4,16,19,150,4,3,42,210,185,64,197,187,190,140,152,122,150,48,115,150,140,13,23,15,151,134, - 16,48,177,0,115,251,79,96,91,69,209,157,129,65,165,137,225,223,241,79,12,255,102,0,75,130,13,192,106,72,22,216,203,49,169,6,182,107,142,48, - 48,166,86,2,195,147,25,220,59,34,10,0,115,41,131,28,176,237,34,105,204,240,127,239,65,134,127,203,58,161,237,31,102,72,149,5,194,172,192,116, - 44,192,201,240,127,69,27,195,255,237,251,25,24,76,27,129,13,230,79,12,108,178,188,12,138,86,92,162,133,82,156,105,124,156,236,18,48,183,35,85, - 77,84,175,150,216,217,89,25,20,20,196,193,165,203,72,3,0,1,196,132,165,116,97,7,7,58,19,19,79,12,247,255,64,21,217,207,42,2,118,192, - 106,226,43,48,211,254,124,207,192,32,101,196,240,95,36,150,225,95,77,18,195,255,137,192,170,99,239,60,134,255,11,107,25,254,101,185,48,252,191,5, - 212,42,99,207,192,104,164,206,192,232,16,6,140,208,239,68,68,215,127,112,19,149,81,223,158,129,225,253,51,134,127,139,90,129,46,248,15,25,199,65, - 46,24,64,137,6,212,195,18,224,96,248,55,179,24,216,77,7,230,112,195,92,160,29,239,24,248,109,36,25,84,133,191,153,186,138,240,152,193,186,255, - 12,136,249,45,170,183,101,108,109,117,25,156,157,45,192,203,9,70,26,0,8,32,38,36,26,185,161,203,105,38,204,167,225,40,198,226,33,236,34,6, - 108,187,2,165,126,3,219,43,124,192,12,172,10,76,36,125,13,12,255,175,3,123,45,226,192,42,132,31,216,184,21,229,97,248,255,229,33,195,191,150, - 56,134,127,135,111,49,48,240,170,50,48,70,151,48,48,8,11,3,245,253,196,223,232,5,149,66,108,192,210,68,207,142,225,223,166,89,12,12,207,129, - 13,102,78,104,207,10,75,218,2,39,36,150,191,12,255,250,243,129,250,156,24,24,68,12,25,88,184,255,50,136,90,8,49,68,11,50,70,137,241,241, - 136,34,37,26,86,90,148,50,30,30,230,12,191,126,125,3,175,51,25,105,0,32,128,152,144,122,70,136,210,5,72,251,10,176,122,41,104,51,8,115, - 40,10,66,70,94,65,3,114,250,69,12,255,246,159,102,248,127,122,11,48,162,184,161,173,131,255,16,154,7,216,13,230,252,203,240,191,63,135,225,255, - 242,201,12,140,42,250,192,68,3,172,162,190,253,6,183,81,112,130,31,63,24,24,21,13,129,145,207,198,240,127,7,176,65,203,197,70,184,87,5,74, - 80,175,238,51,252,219,186,26,152,128,129,189,167,47,63,24,4,204,69,25,76,181,152,116,2,196,184,29,145,134,3,216,105,81,202,128,26,185,255,255, - 143,204,30,59,64,0,161,207,19,129,90,152,172,186,194,124,170,206,18,140,118,124,230,66,144,17,141,31,159,128,173,75,75,96,196,235,48,48,44,239, - 2,150,32,160,72,69,235,145,131,186,213,172,64,113,54,70,134,127,211,202,24,254,111,158,201,192,20,146,207,192,104,237,205,192,240,249,27,246,68,0, - 18,2,117,165,173,128,141,231,179,187,24,24,94,60,134,152,65,40,50,64,242,92,64,251,79,108,6,38,5,57,160,171,129,133,10,11,35,131,152,147, - 8,147,63,239,55,15,17,14,86,113,104,98,225,128,102,4,170,37,24,97,97,190,17,89,178,192,0,64,0,33,15,255,195,74,24,78,123,94,54,11, - 69,69,22,73,86,41,96,149,3,90,170,199,2,84,162,153,1,108,220,46,102,248,255,234,17,48,26,216,113,84,25,255,33,114,192,200,252,55,173,156, - 225,255,165,195,12,76,249,83,24,24,37,20,128,37,205,87,204,68,3,170,142,4,128,85,158,186,62,195,255,125,171,33,19,148,196,2,96,194,250,255, - 226,26,195,255,71,192,68,198,13,44,5,191,253,98,96,1,186,87,85,146,89,83,157,141,73,141,1,177,244,130,21,234,63,138,99,89,80,144,135,97, - 193,130,10,6,62,62,174,17,91,194,0,4,16,19,218,168,46,7,31,7,7,176,217,194,102,206,165,12,12,103,102,160,240,175,143,224,17,215,255,31, - 248,24,254,111,155,14,108,199,176,224,47,1,64,221,104,208,56,204,143,143,12,255,38,229,0,35,83,0,216,107,106,3,38,142,255,144,82,8,150,176, - 64,209,247,21,88,29,153,186,2,35,251,35,195,255,59,231,129,250,56,137,119,57,168,132,251,7,44,158,126,124,129,118,205,255,49,48,177,50,51,240, - 136,179,178,121,72,241,25,1,5,57,145,74,24,170,12,228,153,152,168,51,168,171,203,128,215,226,142,84,0,16,64,76,72,237,23,240,210,5,101,110, - 118,25,57,222,255,42,236,114,188,144,238,46,104,88,94,41,138,225,255,198,249,192,46,243,107,160,10,14,194,163,26,160,68,195,3,44,157,110,93,1, - 246,164,114,129,61,166,96,6,70,39,96,91,227,227,87,200,186,23,208,92,18,168,199,195,196,204,192,104,235,203,240,255,216,14,200,200,9,177,211,190, - 224,169,8,96,15,69,72,5,216,107,3,54,196,191,189,134,183,109,5,244,5,24,116,4,88,13,57,217,217,249,145,74,25,88,9,67,81,130,81,86, - 150,2,207,31,49,50,142,220,42,9,32,128,152,208,186,211,108,214,50,162,26,130,252,127,248,89,69,56,33,75,16,68,13,128,61,32,96,233,114,112, - 5,48,17,176,146,22,230,252,92,12,255,118,47,97,248,183,115,49,3,83,124,21,3,179,148,28,3,179,0,176,113,44,46,193,240,143,23,72,91,184, - 49,48,74,43,50,48,221,60,2,44,137,136,72,136,32,187,65,137,234,55,176,154,252,242,159,129,209,47,3,216,131,123,0,100,191,1,138,131,74,195, - 63,12,156,138,252,12,138,66,127,228,204,101,196,229,25,80,151,143,82,212,91,146,145,17,101,72,76,244,24,145,93,105,100,0,16,64,24,171,232,228, - 153,254,40,242,74,178,48,48,129,86,203,253,249,13,78,48,12,55,46,51,48,188,121,6,84,193,206,64,210,228,9,176,4,249,207,193,198,240,111,58, - 176,11,252,249,37,195,67,159,28,134,162,83,239,24,12,215,61,98,16,93,246,152,65,115,213,117,134,234,186,122,134,39,160,201,104,113,113,134,255,184, - 74,24,80,35,19,132,65,83,17,239,128,13,240,111,76,12,76,105,61,12,76,46,192,154,231,194,36,160,102,46,72,159,27,52,29,193,193,204,32,40, - 194,204,41,201,193,42,5,205,8,172,212,232,94,255,253,251,15,88,186,252,26,209,165,11,8,0,4,16,11,82,131,151,149,133,141,157,75,136,233,143, - 40,155,40,43,98,132,21,216,3,249,127,249,20,98,86,154,148,4,3,82,11,76,100,44,108,204,12,87,167,214,50,68,157,254,201,112,233,198,55,184, - 244,199,123,15,24,218,128,120,181,0,59,195,2,55,25,6,43,126,126,134,63,239,63,0,173,129,218,13,234,142,131,150,117,254,6,141,48,3,53,136, - 74,48,48,26,88,50,48,121,69,3,171,73,96,252,31,205,132,148,54,156,66,208,210,9,226,54,14,118,70,22,177,255,191,164,144,252,198,204,128,186, - 71,138,164,22,171,142,142,34,3,43,176,125,244,23,228,22,6,150,17,157,96,0,2,136,5,169,132,97,21,226,229,225,230,103,102,228,7,151,46,255, - 161,93,101,240,114,107,38,72,247,26,148,203,97,99,47,132,27,26,160,21,186,12,255,129,237,149,247,252,98,12,89,155,47,48,92,122,250,21,171,202, - 219,31,126,50,228,28,124,206,176,219,67,156,129,239,215,15,240,216,13,35,43,208,78,80,181,197,39,204,192,32,167,206,192,104,236,196,192,232,24,201, - 192,40,10,76,7,223,143,3,75,61,96,21,41,1,44,253,64,203,97,222,223,3,186,9,180,206,134,7,156,168,57,68,216,24,164,25,255,74,48,113, - 112,112,254,251,241,227,51,165,85,18,104,115,217,203,151,239,193,139,165,70,58,0,8,32,22,164,110,53,51,31,7,59,23,31,203,31,94,54,208,36, - 32,168,87,3,154,203,121,115,137,129,209,45,144,225,255,110,96,163,247,45,48,114,184,217,32,189,39,144,28,56,248,255,65,26,185,176,68,4,79,76, - 255,193,187,2,152,57,217,25,118,63,254,204,112,8,71,98,129,129,243,47,191,49,172,122,202,202,144,105,23,196,240,91,92,133,129,73,89,139,129,145, - 31,152,88,152,217,24,24,5,128,165,220,47,96,17,115,249,24,144,254,4,196,192,4,245,93,153,225,191,128,41,3,147,148,40,3,131,42,80,238,218, - 20,6,134,15,192,46,54,151,16,48,229,51,51,40,113,51,72,137,11,240,241,62,127,241,227,45,3,98,67,29,89,9,6,212,43,2,85,73,163,128, - 129,1,32,128,88,144,138,106,230,255,255,255,51,179,241,48,49,177,10,177,65,218,3,108,192,132,243,112,47,3,163,149,43,3,83,235,6,134,255,75, - 187,25,254,63,185,2,236,14,191,7,134,226,23,200,178,4,80,187,131,157,5,210,155,98,99,101,96,100,231,102,248,15,234,93,49,178,51,252,231,6, - 150,16,242,10,12,219,182,93,33,202,49,135,88,101,25,50,67,114,129,118,0,27,178,15,174,49,252,59,119,128,129,225,245,19,6,198,223,63,25,254, - 127,7,54,54,191,1,219,47,44,144,46,249,127,112,175,138,133,225,47,176,219,206,96,31,201,192,20,94,199,192,120,165,14,232,238,207,12,140,192,42, - 144,129,249,31,200,15,172,12,168,59,49,241,86,73,220,192,134,247,215,175,63,70,83,5,30,0,16,64,200,221,77,38,54,38,70,86,102,22,96,75, - 149,25,22,166,76,144,241,142,147,192,200,208,78,102,96,108,234,100,248,255,238,51,164,1,252,230,45,164,20,226,3,182,31,68,36,64,43,182,193,51, - 202,140,192,72,252,15,140,216,255,64,189,140,28,60,12,255,217,217,25,62,95,200,99,96,56,123,159,160,99,222,92,63,203,240,191,55,158,225,207,157, - 251,12,140,224,113,21,144,11,129,13,103,112,239,8,24,231,124,156,136,248,6,181,167,64,37,27,104,156,104,213,100,134,255,34,114,12,140,150,1,192, - 174,252,44,96,161,196,194,240,129,225,247,215,47,191,126,255,37,118,12,70,65,65,130,97,225,194,10,6,103,231,226,209,170,7,15,0,8,32,22,164, - 65,250,255,34,172,76,188,220,191,127,112,253,7,70,6,35,100,52,12,148,140,32,244,153,118,96,162,152,196,192,168,234,207,192,96,148,10,140,6,121, - 134,255,79,239,50,48,220,187,8,44,13,174,67,22,119,63,186,206,240,255,213,83,134,255,63,190,3,75,128,191,12,127,64,123,144,120,217,24,100,158, - 61,33,202,49,226,156,140,12,191,129,250,254,113,115,65,218,75,56,219,166,140,136,222,19,104,92,136,27,216,40,126,114,13,200,118,3,175,31,254,7, - 76,200,140,191,126,48,51,254,253,131,126,24,0,214,177,24,49,49,1,134,141,27,155,25,68,69,5,71,19,11,1,0,16,64,40,11,168,190,254,103, - 252,245,243,15,243,223,127,191,129,109,15,14,88,33,3,12,223,31,239,33,221,107,45,96,175,228,45,7,195,255,233,211,25,254,159,223,193,240,255,205, - 99,200,158,34,216,234,58,164,188,12,42,21,64,109,230,63,124,252,12,142,226,124,12,147,136,232,97,57,203,242,50,252,248,14,108,159,0,75,142,255, - 196,110,221,128,141,30,203,169,50,64,214,73,252,101,248,245,238,47,168,243,244,255,47,68,14,57,145,96,36,22,121,121,113,134,29,59,186,24,20,21, - 37,192,167,39,140,2,252,0,32,128,144,19,12,211,227,247,31,63,189,20,227,126,255,231,253,47,65,102,65,96,241,15,202,160,160,53,48,226,38,12, - 12,6,221,12,255,22,207,102,248,191,121,26,176,13,243,22,50,249,7,154,40,4,173,170,99,68,138,15,120,227,23,50,226,251,27,152,248,76,133,89, - 25,34,53,133,24,150,95,123,139,211,33,118,146,156,12,14,18,236,12,63,222,190,102,224,98,36,161,117,10,181,143,81,76,22,152,176,95,128,221,242, - 231,235,31,96,149,196,242,229,199,239,63,255,208,218,44,40,41,86,86,86,140,97,215,174,110,6,53,53,25,134,215,175,63,142,232,73,69,98,1,64, - 0,177,32,5,228,255,215,31,191,124,127,243,139,227,227,95,208,110,0,112,23,26,88,212,179,113,51,48,232,86,51,252,155,221,195,240,127,229,36,6, - 6,33,96,195,66,152,23,181,123,13,143,134,255,104,227,109,192,138,13,88,197,176,124,249,194,80,162,193,195,240,230,63,15,195,238,123,47,129,137,16, - 181,97,105,98,106,198,208,98,38,196,192,113,247,16,176,128,98,34,45,226,254,2,75,36,94,81,6,70,69,13,96,47,233,8,3,168,225,243,231,235, - 23,134,215,63,255,124,248,251,235,215,31,44,245,26,152,47,41,41,196,176,115,103,55,131,146,146,52,195,167,79,95,25,24,71,211,10,81,0,32,128, - 152,24,16,107,94,65,253,227,191,47,152,121,94,254,249,249,31,210,251,1,173,129,145,182,6,246,90,62,48,252,223,58,25,88,217,115,65,218,12,200, - 221,104,60,173,12,80,188,179,2,99,226,223,251,55,12,194,192,58,102,202,148,73,12,253,254,38,12,94,242,220,12,150,210,60,12,110,10,124,12,157, - 230,194,12,11,188,213,25,228,99,75,129,213,144,0,3,235,159,159,144,132,70,172,15,126,0,19,181,146,62,48,17,179,51,48,188,187,10,238,157,125, - 123,247,155,225,29,3,203,103,6,212,61,74,240,181,189,114,114,226,12,123,247,246,49,104,106,202,50,124,251,246,125,196,143,222,146,2,0,2,176,114, - 245,42,17,196,64,120,50,73,60,214,221,205,33,200,117,250,26,130,149,173,141,118,190,193,21,247,22,182,231,139,248,8,87,249,28,214,119,219,184,90, - 136,39,194,178,183,201,248,101,179,224,54,130,11,22,97,32,132,252,205,144,249,230,99,38,241,133,241,163,22,170,214,214,95,187,15,114,61,219,138,174, - 226,28,192,118,155,74,96,99,154,67,248,27,73,26,117,192,210,7,57,52,107,60,201,213,29,249,247,87,186,221,63,211,245,197,41,125,122,166,66,11, - 205,96,32,135,167,71,226,124,78,217,242,158,204,195,10,6,211,66,239,246,119,208,43,244,195,60,99,139,234,242,6,110,18,161,123,243,70,190,203,105, - 255,210,180,213,65,215,35,131,241,24,234,181,214,178,88,156,200,102,179,134,27,58,27,94,22,53,120,54,153,92,50,18,134,187,96,214,170,40,50,118, - 46,83,198,88,213,117,29,130,188,132,173,172,61,146,200,92,91,107,4,238,57,164,165,228,95,178,35,18,44,4,200,199,180,81,26,163,85,89,230,218, - 185,99,28,139,99,25,140,74,227,20,214,183,18,153,106,31,63,88,97,14,144,146,184,165,105,27,249,22,64,44,12,136,131,122,192,248,232,227,103,15, - 159,242,51,127,21,121,253,157,155,149,157,9,178,157,4,212,86,97,98,32,121,161,60,35,176,136,97,254,254,157,129,77,70,133,129,211,59,138,225,223, - 220,42,134,239,160,29,40,172,140,12,2,108,144,54,14,51,11,43,3,187,172,36,3,211,190,5,12,12,170,189,12,172,197,64,188,8,216,141,23,230, - 135,110,97,193,2,128,61,153,191,159,190,48,48,124,255,6,158,46,96,176,112,98,96,120,212,5,172,62,153,25,126,60,252,194,240,244,11,199,235,43, - 239,62,191,128,249,13,88,162,48,197,197,185,114,185,185,153,50,105,107,43,114,8,9,9,1,195,23,114,180,23,35,120,30,130,233,63,43,235,119,80, - 59,6,182,185,31,47,0,245,164,128,181,29,19,63,63,55,208,44,62,150,23,47,222,242,156,63,127,71,233,235,215,31,18,63,127,254,18,252,249,243, - 183,0,208,2,112,243,159,153,153,233,15,59,59,235,91,14,14,246,247,124,124,220,207,140,141,85,239,139,136,240,255,4,170,253,249,237,219,143,159,160, - 200,38,167,128,3,37,2,144,59,128,102,51,11,8,112,115,112,114,114,49,61,123,246,88,232,226,197,59,234,223,190,253,20,253,241,227,151,40,80,30, - 214,117,1,29,89,246,137,147,147,253,13,55,55,251,43,11,11,237,155,192,140,243,21,216,59,252,243,253,251,207,31,255,192,41,159,56,71,0,4,16, - 114,130,1,159,130,240,224,231,239,215,247,190,242,61,82,191,245,94,147,213,68,144,129,225,205,101,96,163,215,154,129,129,147,7,50,183,131,43,18,113, - 213,121,95,254,48,176,199,37,51,236,60,113,146,225,192,166,195,12,44,156,28,64,11,191,65,124,1,244,52,51,180,41,164,199,203,197,16,180,162,139, - 129,181,110,41,195,57,183,92,134,117,179,39,49,176,114,112,161,164,127,240,142,123,160,223,100,121,89,25,162,164,248,24,184,223,1,27,228,118,1,12, - 140,124,192,68,253,234,12,176,11,207,195,240,237,238,99,134,91,63,152,30,188,248,244,245,19,200,95,192,92,247,215,203,203,156,239,217,179,183,145,19, - 38,172,149,102,103,103,249,13,140,76,70,164,128,255,15,12,52,246,152,24,151,35,42,42,50,43,112,37,24,72,9,244,31,116,30,29,179,181,181,54, - 251,207,159,63,133,118,236,56,173,177,111,223,57,247,107,215,30,152,0,19,140,44,48,199,10,1,149,242,162,117,38,96,59,49,223,3,19,205,59,51, - 51,141,251,250,250,74,7,34,34,156,118,169,168,72,61,83,82,146,122,255,242,229,251,63,164,148,57,80,149,76,202,202,82,108,194,194,252,194,91,182, - 28,215,171,173,157,239,125,229,202,3,147,203,151,239,129,230,208,132,25,32,107,129,144,251,154,160,56,254,4,244,239,123,43,43,173,39,42,42,210,71, - 226,227,61,182,233,233,41,221,253,253,251,207,59,160,245,191,129,238,255,15,74,59,248,18,48,64,0,193,18,12,252,132,167,47,255,24,62,159,252,203, - 115,199,249,213,87,77,96,140,1,219,5,55,24,24,149,128,246,170,152,49,48,220,216,199,192,192,205,67,92,41,6,178,21,88,186,48,73,43,51,48, - 57,6,50,236,204,201,100,152,114,21,20,135,159,176,42,143,209,18,98,8,22,5,182,153,166,150,49,156,85,242,98,104,187,8,106,130,124,198,170,214, - 66,146,155,33,72,82,152,129,135,95,136,225,191,127,10,3,195,227,141,96,231,255,251,246,143,225,253,195,191,127,119,188,248,118,9,216,221,6,181,172, - 127,113,115,115,252,5,118,157,57,167,77,219,232,245,248,241,43,19,92,206,85,86,150,6,150,68,18,171,176,141,4,131,138,114,96,143,138,81,94,94, - 130,19,88,245,240,239,218,117,198,177,167,103,101,200,237,219,79,220,128,129,204,77,112,82,13,50,1,42,246,227,199,79,177,67,135,46,106,0,177,231, - 188,121,219,243,156,156,12,87,149,150,70,172,85,87,151,185,46,37,37,242,25,88,50,252,198,55,14,4,58,4,17,88,162,129,26,236,108,170,170,210, - 252,23,46,220,53,8,9,105,204,184,114,229,190,59,48,210,9,185,3,148,55,5,129,9,67,240,232,209,171,74,64,108,183,114,229,129,116,59,59,189, - 77,85,85,49,11,61,61,205,175,8,11,243,125,126,247,238,211,175,127,120,154,29,0,1,196,194,128,122,28,216,47,96,15,230,231,209,87,111,111,62, - 187,205,224,36,252,237,55,55,195,127,208,2,240,135,12,76,206,17,12,255,46,2,19,12,215,127,226,166,100,64,99,32,192,210,229,95,114,22,100,228, - 247,206,5,252,161,10,234,130,243,240,48,48,190,188,201,240,247,238,107,252,165,22,208,236,63,159,191,50,252,11,44,100,96,18,3,58,251,208,6,96, - 190,22,98,248,117,245,3,195,229,167,127,31,28,255,252,235,46,212,95,191,128,57,234,47,40,194,89,88,152,240,142,200,1,171,8,166,23,47,222,193, - 166,18,224,39,64,128,78,198,116,118,54,102,1,150,64,60,192,8,82,203,204,236,207,62,120,240,98,24,52,7,147,13,128,246,73,111,222,124,188,16, - 152,248,130,83,82,188,167,53,55,39,46,251,240,225,203,251,53,107,14,126,193,217,33,252,251,143,177,169,41,129,83,92,92,80,180,172,108,86,210,210, - 165,123,178,128,98,34,228,186,1,88,109,9,3,237,79,220,189,251,172,87,118,118,192,132,210,210,176,149,95,190,252,120,109,98,162,254,245,232,209,43, - 88,83,13,64,0,49,33,85,71,160,5,4,160,92,249,247,228,203,183,247,118,62,101,187,244,241,216,43,96,2,1,134,203,221,181,12,140,118,142,12, - 140,114,234,64,85,223,25,8,86,186,160,30,214,7,96,105,97,228,192,240,223,39,137,225,231,190,149,12,127,191,227,159,124,4,21,115,191,254,252,99, - 248,201,193,206,240,251,35,254,4,243,15,216,45,255,107,21,206,240,207,59,140,225,223,217,22,96,218,4,205,27,49,50,188,61,245,158,97,221,139,95, - 167,63,252,248,245,158,1,114,66,213,15,96,23,29,124,10,231,255,255,12,120,135,2,129,213,18,211,219,183,159,80,86,230,129,246,78,183,183,167,176, - 2,171,15,209,222,222,213,1,126,126,213,75,129,137,37,142,210,196,130,12,128,237,29,185,169,83,55,180,5,7,55,244,190,122,245,65,53,40,200,142, - 223,211,211,12,35,128,99,99,221,152,252,253,173,248,126,252,248,173,25,30,222,212,182,104,209,174,90,74,18,11,90,117,43,62,101,202,250,182,240,240, - 230,150,47,95,190,171,206,157,91,202,99,110,174,137,53,146,1,2,136,9,169,74,250,5,77,48,63,128,38,252,88,251,238,207,241,123,71,62,253,252, - 5,58,76,227,243,45,200,146,2,183,84,32,251,31,254,2,6,212,151,254,10,76,28,98,138,12,140,37,253,12,255,128,9,229,207,165,195,12,255,64, - 59,23,241,37,130,255,144,142,24,232,72,152,63,172,248,247,42,255,151,80,5,38,150,40,134,255,215,187,24,254,191,189,201,192,200,207,199,240,237,202, - 91,134,51,55,254,62,217,243,254,215,101,168,127,64,13,216,159,192,18,230,15,49,221,102,96,196,49,127,253,250,29,190,12,2,52,17,217,221,157,193, - 22,22,230,32,90,87,55,47,164,182,118,222,212,55,111,62,170,208,106,120,99,255,254,243,161,65,65,117,83,174,94,125,96,208,209,145,202,239,232,104, - 0,119,180,156,156,24,67,122,186,15,231,147,39,111,212,146,146,58,187,143,29,187,26,197,64,253,29,157,140,39,78,92,139,138,137,105,237,2,150,116, - 74,157,157,233,60,160,1,77,116,0,16,64,176,18,230,15,82,41,3,62,63,238,196,139,183,15,246,190,103,63,247,229,40,168,148,1,182,91,46,207, - 96,96,114,7,150,50,198,46,192,102,200,103,236,165,12,51,19,100,119,192,95,30,6,166,220,54,6,70,41,96,151,239,202,49,134,127,111,159,50,252, - 99,97,37,88,194,128,11,138,255,12,132,87,228,115,179,51,252,187,61,153,225,255,211,195,12,140,188,194,12,127,191,253,97,120,190,231,37,195,214,55, - 127,78,190,250,254,243,45,3,226,56,179,159,192,46,228,111,96,79,5,100,36,35,254,46,242,63,70,96,162,129,171,41,44,12,97,13,15,119,20,236, - 233,89,21,0,108,44,55,49,64,246,107,209,20,0,27,230,86,101,101,51,171,128,93,98,185,204,76,63,46,72,162,96,100,0,86,23,236,192,106,72, - 172,180,116,102,222,173,91,79,28,105,233,134,219,183,159,186,148,151,207,202,149,146,18,18,139,143,119,103,67,151,7,8,32,88,9,243,27,41,144,65, - 75,226,128,13,132,191,95,150,190,248,122,242,238,177,143,95,127,222,3,10,255,1,150,242,143,231,48,48,149,79,102,96,20,146,7,170,248,12,169,122, - 96,9,7,52,171,253,13,168,245,47,59,80,205,108,6,70,96,94,252,255,244,28,195,255,27,151,24,254,253,254,78,176,119,5,63,181,249,63,225,54, - 245,255,207,15,129,248,9,195,127,118,96,167,4,216,245,127,187,227,17,195,233,231,92,119,86,191,253,121,22,154,232,191,66,241,119,96,149,244,27,216, - 83,250,71,168,144,1,245,156,128,13,78,112,117,4,236,246,50,6,4,88,115,3,123,65,86,253,253,107,90,128,98,2,36,134,251,95,164,118,33,73, - 3,29,55,111,62,118,171,171,155,159,47,35,35,198,165,169,41,199,0,116,7,11,176,65,42,92,85,53,39,227,216,177,43,49,68,118,185,63,243,241, - 113,221,7,246,132,206,233,232,40,156,86,83,147,61,11,236,210,223,7,138,127,34,70,63,176,218,77,156,52,105,125,88,96,160,173,128,139,139,49,74, - 196,1,4,16,11,3,226,244,109,88,162,129,5,54,247,133,15,223,238,207,121,43,180,167,98,215,75,127,197,116,96,10,120,178,155,129,65,200,128,129, - 177,114,33,195,255,154,64,96,71,17,152,136,56,160,171,240,64,163,195,194,82,12,76,133,115,24,24,117,128,61,203,131,233,12,12,198,157,12,255,30, - 109,99,160,194,130,125,180,100,206,2,94,199,203,196,251,157,225,243,185,103,12,119,47,252,251,60,237,19,235,174,15,223,64,179,164,224,4,255,5,169, - 132,1,214,134,44,127,9,57,0,188,34,244,31,164,187,29,17,225,200,6,108,252,169,2,171,161,74,96,34,18,36,198,73,28,28,108,239,36,37,133, - 47,1,139,241,187,192,200,122,7,140,156,31,80,59,57,128,109,35,145,107,215,30,106,189,126,253,65,7,104,30,222,146,10,216,19,59,174,171,171,116, - 6,88,53,113,128,70,223,92,92,140,216,129,93,101,227,213,171,15,198,17,114,3,176,26,125,14,236,38,239,5,118,183,175,1,253,253,18,88,178,62, - 7,250,11,212,240,103,249,245,235,55,232,160,2,41,96,207,206,224,194,133,59,174,191,126,253,193,231,47,166,25,51,54,229,0,123,80,103,188,189,45, - 142,31,56,112,225,43,208,221,224,132,15,16,64,44,72,153,27,86,37,193,2,156,11,24,130,156,179,30,190,63,36,197,194,43,156,185,230,129,141,168, - 159,12,3,227,149,73,12,140,166,77,12,76,253,123,25,254,45,239,96,96,184,127,9,60,127,195,168,227,192,192,20,2,108,227,176,1,219,59,7,74, - 32,37,15,171,8,3,227,199,15,144,118,13,85,107,92,96,11,150,139,153,225,235,189,79,12,143,182,188,253,219,251,154,123,235,225,7,207,111,64,19, - 201,23,104,130,7,31,209,10,26,253,100,103,103,35,234,200,15,208,212,19,63,63,55,147,141,141,46,47,176,7,226,3,236,134,155,18,28,200,98,97, - 254,102,100,164,186,222,192,64,121,255,207,159,127,94,191,126,253,241,221,139,23,239,129,221,227,63,255,65,109,39,144,253,252,252,60,28,126,126,150,66, - 192,110,177,204,225,195,151,131,129,145,102,141,54,86,3,90,98,113,3,24,65,43,140,140,212,246,191,123,247,249,30,176,219,254,17,88,42,176,25,27, - 171,75,166,164,116,103,0,149,72,224,11,16,96,73,178,19,232,238,213,31,62,124,125,112,243,230,147,79,111,222,124,248,3,108,68,255,1,118,213,255, - 179,179,179,50,1,187,204,47,164,164,132,175,1,75,157,51,134,134,170,123,129,189,163,248,251,247,159,91,225,25,156,148,154,54,109,67,100,79,79,230, - 13,13,13,185,159,192,174,59,120,124,10,32,128,144,19,204,31,164,54,204,23,6,216,217,118,255,255,178,78,125,241,115,191,210,49,86,9,79,230,167, - 42,34,33,114,12,12,39,170,129,85,78,56,3,115,126,5,80,7,27,195,127,208,80,254,47,96,124,61,233,101,96,120,113,26,178,124,147,133,3,58, - 194,68,214,186,107,252,69,46,43,51,195,175,23,192,196,178,254,229,223,233,175,185,247,172,189,247,252,12,208,252,159,208,129,155,79,72,37,204,47,96, - 149,196,12,236,82,19,156,252,2,201,130,46,149,0,70,62,7,48,146,229,129,57,58,156,144,59,184,184,56,158,250,250,90,206,228,229,229,58,117,228, - 200,149,119,192,4,246,253,243,103,208,86,209,255,200,7,51,130,70,123,89,128,165,206,91,77,77,249,151,94,94,230,247,110,221,146,186,176,103,207,185, - 248,223,191,255,8,0,205,120,98,105,169,181,93,67,67,118,23,176,36,122,56,111,222,246,55,247,238,61,255,14,108,83,253,171,173,141,229,62,117,234, - 186,62,176,116,114,193,231,14,99,99,181,117,192,196,54,23,216,24,126,7,44,61,62,2,219,98,63,25,144,142,109,3,118,159,25,159,62,125,195,4, - 196,172,151,46,221,251,108,97,161,245,209,199,199,242,221,182,109,199,255,220,189,251,220,14,151,185,199,143,95,243,62,123,246,246,202,132,4,143,119,37, - 37,211,193,9,6,32,128,88,144,219,156,72,213,210,55,104,224,131,119,14,190,254,242,253,85,195,115,150,245,252,71,24,163,237,120,158,73,241,187,73, - 51,48,222,91,14,44,93,54,130,215,208,50,254,1,186,239,251,59,72,87,7,116,2,38,168,189,242,247,43,164,221,3,58,151,8,52,105,204,200,76, - 76,229,11,77,91,248,231,32,254,127,251,197,240,114,223,199,255,171,95,242,28,154,115,239,209,97,96,108,127,135,38,148,143,80,119,127,131,38,254,223, - 192,4,3,140,48,230,127,132,183,107,255,3,117,163,153,92,93,77,184,54,109,58,234,9,236,41,168,19,40,254,95,132,134,58,244,3,75,145,83,27, - 54,28,126,247,230,205,167,175,12,136,51,131,255,34,53,205,152,128,221,95,230,247,239,191,48,3,35,244,43,48,81,125,118,116,52,90,229,231,103,245, - 30,200,86,54,51,211,216,11,76,40,119,119,239,62,251,17,152,80,62,3,115,54,200,237,191,129,9,236,191,137,137,58,251,228,201,235,125,128,237,43, - 54,92,238,0,150,26,231,29,29,13,23,238,218,117,250,41,48,49,128,252,255,19,152,224,65,13,125,80,239,240,31,82,27,13,228,14,22,96,98,98, - 61,116,232,210,143,239,223,127,254,246,247,183,158,184,100,201,94,145,87,175,222,107,225,232,57,138,29,63,126,213,43,40,200,230,12,208,158,31,192,70, - 249,95,128,0,98,65,107,168,193,186,215,95,25,144,182,159,128,216,247,222,127,126,82,207,196,179,182,113,199,199,16,139,79,191,37,69,131,129,221,102, - 208,84,193,151,183,144,6,47,11,15,106,19,22,52,177,245,230,16,3,163,71,40,3,195,66,96,169,243,253,51,161,153,60,160,11,191,129,71,135,25, - 254,225,223,50,251,237,227,255,255,235,190,243,157,92,240,232,209,209,191,191,127,127,129,38,150,15,208,4,3,47,93,32,254,97,100,33,102,242,27,52, - 184,7,44,41,88,129,129,204,117,250,244,77,15,2,202,127,3,75,138,121,156,156,236,199,86,175,222,255,6,152,88,190,48,32,78,38,255,139,101,214, - 13,190,127,253,241,227,215,63,215,175,63,252,13,88,170,108,84,84,148,100,219,191,255,194,183,59,119,158,126,7,70,206,15,104,34,7,31,143,15,172, - 94,88,129,137,76,242,234,213,251,166,120,242,215,79,79,79,179,37,188,188,156,239,128,213,204,111,103,103,35,70,9,9,33,38,65,65,94,102,160,24, - 176,93,197,14,95,127,242,237,219,15,166,79,159,190,3,19,238,103,230,23,47,222,49,126,252,248,245,151,136,136,192,43,15,15,211,133,139,22,237,106, - 129,198,51,6,216,189,251,140,129,143,143,133,44,176,84,250,178,110,221,225,127,0,1,196,130,165,117,255,139,1,117,131,62,108,161,56,243,133,183,95, - 238,22,255,231,91,94,127,228,71,160,235,183,219,138,34,129,10,12,204,66,60,144,147,169,64,9,4,214,21,1,31,254,3,140,244,123,91,25,24,77, - 108,24,152,51,39,51,48,148,23,227,28,234,135,116,201,217,129,213,156,53,3,163,154,41,3,227,205,103,12,12,199,38,226,84,250,244,55,195,251,99, - 239,63,95,255,247,231,207,103,104,34,121,15,77,48,159,160,137,253,7,172,135,2,46,180,192,19,140,132,18,204,127,6,33,33,94,96,145,125,95,27, - 216,117,149,195,167,22,212,14,80,80,144,216,183,106,213,129,183,192,196,242,9,106,31,52,129,98,189,166,135,9,169,215,244,251,243,231,111,191,128,37, - 202,87,80,163,246,31,100,90,251,47,122,130,3,54,124,57,158,63,127,171,241,252,249,59,113,92,238,16,16,224,189,5,108,167,112,1,221,96,199,205, - 205,249,11,148,8,128,213,207,223,39,79,94,255,3,173,41,2,54,124,255,35,15,27,128,252,8,44,193,152,128,13,96,102,96,2,101,3,102,12,214, - 175,95,127,112,1,19,215,195,207,159,191,99,29,99,2,86,99,90,192,182,157,44,48,108,110,131,220,7,16,64,44,88,122,182,176,82,230,27,82,3, - 4,182,54,150,225,206,187,79,143,170,255,114,175,126,203,204,225,238,249,242,150,142,180,135,36,51,151,46,176,90,2,237,11,250,254,23,177,209,158,17, - 186,88,255,76,35,3,131,86,30,3,163,62,176,157,119,238,1,238,102,185,186,33,3,99,72,8,80,27,176,196,186,126,19,127,246,254,243,247,55,176, - 246,248,14,44,118,65,137,229,29,20,127,64,43,93,254,146,210,120,2,86,73,160,198,49,243,151,47,223,228,129,69,183,40,62,165,192,134,233,150,135, - 15,95,190,1,226,143,176,222,24,3,254,147,200,97,43,255,224,99,94,160,29,26,72,227,77,200,55,180,128,79,52,6,70,16,168,20,0,37,92,156, - 163,185,192,106,83,123,243,230,227,205,148,246,32,8,100,40,145,39,79,94,137,75,75,139,176,3,171,246,31,0,1,196,130,99,56,228,55,3,234,197, - 89,76,200,51,159,143,62,126,125,94,246,245,251,250,67,111,121,111,199,188,122,110,101,97,252,73,74,212,74,152,129,69,158,23,162,236,215,95,72,137, - 3,58,45,10,116,210,193,213,105,12,12,111,223,224,119,246,247,59,192,146,101,34,208,178,31,12,140,95,191,19,154,121,248,207,193,206,246,25,152,131, - 222,65,75,23,228,182,11,114,78,39,126,224,228,47,104,150,150,137,25,152,227,196,24,240,108,111,4,182,93,222,105,106,202,94,1,150,46,159,144,18, - 203,111,34,22,127,160,223,58,199,136,69,238,31,100,24,5,88,47,114,113,176,2,75,24,65,2,99,71,212,56,180,158,17,121,246,30,27,56,118,236, - 154,60,176,123,207,201,207,207,245,25,32,128,88,240,120,236,23,218,140,43,3,210,82,136,63,191,254,252,251,179,238,249,199,83,59,95,49,223,246,127, - 205,160,19,124,233,135,161,153,54,135,148,168,1,31,19,139,44,55,3,51,31,59,176,124,1,54,30,64,91,79,64,51,254,255,158,19,152,124,252,201, - 192,196,199,203,240,239,39,104,46,233,43,161,233,253,63,28,28,108,31,129,141,59,88,233,242,17,169,161,11,75,44,68,206,146,34,192,199,143,95,184, - 46,95,190,47,133,79,13,176,157,243,136,149,149,245,203,151,47,160,147,10,224,165,10,177,137,243,63,82,137,130,75,14,84,229,49,177,178,50,11,30, - 60,120,81,158,97,16,128,55,111,62,138,242,240,112,113,0,195,156,9,32,128,112,37,24,88,32,252,198,145,11,224,235,103,190,2,203,239,101,207,63, - 31,219,254,150,229,170,253,147,223,234,62,103,190,106,25,203,176,203,73,200,48,115,114,200,114,50,252,19,226,96,248,47,202,202,192,128,127,238,143,225, - 215,251,95,12,111,15,61,103,248,250,234,223,159,71,215,254,252,194,55,20,15,90,59,4,204,233,159,129,189,26,88,35,247,27,52,183,255,197,209,232, - 36,170,100,6,213,237,192,18,134,147,64,239,232,13,27,27,243,119,96,21,134,220,192,37,165,52,35,164,150,145,131,131,149,9,88,221,178,2,219,14, - 204,131,33,193,0,195,4,52,210,205,6,106,115,1,4,16,11,1,143,253,65,227,255,71,155,221,6,69,18,168,30,226,126,255,235,207,175,13,47,255, - 124,216,246,154,233,138,206,211,191,146,14,119,57,149,52,184,190,202,9,179,126,224,19,145,251,205,247,225,254,103,54,124,169,230,233,171,191,95,150,156, - 103,187,121,235,195,247,103,215,191,253,3,229,114,99,124,53,8,176,161,246,25,180,138,12,154,96,126,160,181,1,200,152,177,5,23,205,76,4,83,54, - 3,104,30,149,229,15,176,58,36,39,177,16,5,126,255,254,11,74,188,12,12,52,60,201,156,164,58,11,216,198,1,246,34,65,203,78,25,1,2,136, - 80,130,249,143,214,30,248,143,212,40,254,137,52,255,196,3,197,156,191,254,253,251,117,238,227,183,175,64,252,128,137,145,145,93,74,144,87,192,140,147, - 67,250,198,151,47,160,197,75,56,123,31,247,127,253,127,245,237,237,167,115,192,134,220,103,1,62,110,22,2,195,53,127,248,249,121,190,1,115,251,55, - 180,54,4,217,27,160,129,213,219,71,80,219,129,157,157,21,239,141,19,192,94,8,63,55,55,23,51,180,203,138,115,4,57,46,206,21,124,227,43,176, - 43,203,240,246,237,39,240,13,174,160,109,184,192,98,157,193,220,92,147,65,67,67,14,60,246,3,90,48,181,98,197,126,208,196,35,162,57,247,253,23, - 8,255,7,117,162,6,67,130,249,253,27,86,210,49,50,0,4,16,11,145,69,40,172,219,247,15,109,118,27,121,194,242,11,100,148,142,1,118,84,24, - 251,191,255,255,57,158,126,248,252,243,206,183,95,127,62,252,253,167,78,160,33,251,135,131,133,249,11,211,191,255,239,249,121,57,241,46,136,249,254,253, - 55,31,104,209,53,176,39,241,139,80,98,97,132,2,80,175,4,159,153,204,204,140,223,128,213,192,15,21,21,169,87,87,174,224,222,214,251,225,195,87, - 101,14,14,22,54,89,89,81,150,91,183,30,99,77,44,229,229,17,12,29,29,105,224,0,126,246,236,53,3,176,171,206,48,101,202,122,240,145,103,155, - 55,31,99,200,200,8,96,240,240,240,0,7,229,159,63,95,192,247,22,212,215,47,132,59,249,197,139,183,255,191,125,251,241,89,79,79,241,197,149,43, - 247,112,198,139,163,163,193,34,25,25,209,251,160,1,57,38,42,95,218,4,218,236,1,44,193,65,85,255,31,9,9,161,251,192,4,255,229,211,167,175, - 255,0,2,136,216,4,195,128,212,174,65,94,210,9,171,150,190,66,19,10,236,20,110,216,145,167,156,44,204,76,156,60,156,108,172,31,153,153,126,19, - 40,246,126,1,115,247,59,96,99,239,53,48,247,138,227,159,243,249,205,205,197,197,14,26,160,34,120,213,13,176,171,204,4,154,75,1,230,88,124,99, - 43,255,152,153,89,126,126,253,250,19,88,213,113,189,132,250,149,25,123,125,254,93,4,216,107,208,243,244,52,187,125,242,228,117,148,19,169,164,164,68, - 24,146,146,60,24,170,171,99,128,165,202,71,112,130,121,255,254,11,176,148,129,156,137,3,76,100,192,18,234,55,195,55,208,172,62,184,157,254,23,200, - 254,204,32,46,46,196,160,165,37,207,112,237,218,67,216,8,235,255,87,175,62,254,1,102,136,215,248,123,55,12,191,4,5,121,142,29,59,118,253,51, - 40,130,169,185,17,15,100,30,104,196,24,24,126,63,206,158,189,245,21,232,182,207,192,18,242,31,64,0,17,123,58,14,250,245,50,255,24,48,23,94, - 193,18,14,7,3,226,108,57,78,160,39,184,129,197,48,43,144,254,129,191,132,97,250,9,236,74,190,5,210,175,120,120,56,94,1,213,127,251,247,239, - 63,174,134,47,31,176,52,224,16,21,229,255,143,150,232,192,155,224,144,142,230,96,212,210,146,99,126,246,236,13,223,247,239,63,241,149,48,63,64,118, - 191,121,243,225,47,27,27,219,83,96,64,189,5,86,21,98,184,194,242,228,201,107,94,190,190,22,219,129,57,156,117,243,230,227,240,30,143,159,159,37, - 248,162,240,247,239,63,131,170,56,80,169,133,220,5,102,128,236,171,131,76,67,32,142,172,249,15,84,199,194,16,24,104,3,75,48,224,48,6,86,205, - 255,128,57,251,5,116,216,0,107,247,26,88,18,90,25,25,169,174,123,252,248,229,167,151,47,223,147,115,150,218,127,44,61,97,6,180,30,241,111,164, - 17,232,127,0,1,196,68,134,5,200,35,147,63,144,170,35,216,136,43,168,50,6,13,186,128,54,42,191,96,102,102,126,201,199,199,245,26,152,16,190, - 19,74,48,124,124,220,239,128,17,254,6,88,68,191,1,54,44,241,174,221,216,189,251,140,158,141,141,46,143,148,148,48,220,163,81,81,206,12,89,89, - 254,112,53,160,91,234,237,236,244,153,175,94,125,104,0,44,9,120,241,148,110,127,88,88,152,190,220,188,249,248,167,128,0,247,117,69,69,201,71,248, - 236,62,127,254,142,237,222,189,231,189,242,242,130,248,92,93,141,153,65,119,15,76,158,156,11,190,157,254,213,171,247,88,55,198,65,182,133,252,1,150, - 38,130,12,34,34,2,172,175,95,63,87,184,126,253,166,42,43,43,27,55,48,225,51,163,95,214,117,227,198,163,191,192,112,187,1,77,52,184,186,187, - 218,192,132,165,21,30,238,244,7,216,99,252,130,52,159,70,8,131,87,227,43,43,75,125,141,140,116,254,174,175,175,252,13,24,254,232,106,62,67,11, - 0,228,129,201,127,0,1,196,68,102,170,68,222,203,132,60,97,249,21,105,94,7,132,223,3,75,130,119,192,6,234,7,32,253,11,127,130,97,252,3, - 140,172,79,192,156,248,1,24,1,207,129,109,148,23,248,212,159,62,125,211,13,152,32,196,99,99,221,56,69,68,32,37,77,69,69,4,3,176,170,96, - 0,205,163,128,34,49,61,221,155,93,86,86,76,4,88,34,184,224,27,140,3,173,150,151,147,19,187,123,233,210,221,31,192,72,248,12,12,200,67,4, - 194,128,103,210,164,117,165,55,110,60,182,236,234,74,231,207,204,244,3,39,26,80,59,2,219,36,39,104,244,31,52,87,5,204,60,140,189,189,89,28, - 234,234,50,210,161,161,13,53,86,86,57,75,22,45,218,225,105,103,167,43,230,230,102,10,114,43,44,103,255,7,150,30,191,128,37,229,107,96,227,248, - 12,62,135,108,219,118,34,94,71,71,94,42,55,55,232,31,48,195,125,131,198,3,94,12,244,239,215,130,130,224,63,211,167,23,114,3,75,40,243,222, - 222,76,161,41,83,242,152,130,131,237,126,138,137,9,194,226,17,166,254,7,82,59,241,63,64,0,81,218,207,255,143,111,140,6,132,129,17,255,207,194, - 66,139,235,254,253,231,214,175,95,127,84,195,101,16,176,190,190,107,106,170,190,247,212,169,27,111,180,181,21,191,1,91,230,134,143,31,191,214,192,221, - 240,5,111,214,250,9,244,248,89,91,91,221,223,47,94,188,255,107,108,172,6,26,182,103,184,124,249,62,99,90,154,15,71,104,168,163,240,162,69,59, - 163,118,236,56,29,135,47,193,200,201,137,95,3,186,113,205,166,77,199,62,1,219,24,255,93,93,77,190,157,57,115,211,1,232,6,94,220,115,165,255, - 249,247,238,61,103,1,76,172,31,50,50,252,158,3,19,217,239,87,175,62,48,72,75,139,252,7,149,108,160,196,3,42,85,64,37,199,187,119,159,89, - 162,163,157,89,129,145,207,247,249,243,55,157,196,196,174,186,163,71,175,196,0,221,47,189,125,251,41,175,179,103,111,243,2,115,250,157,212,84,239,111, - 64,45,255,79,156,184,254,31,52,231,195,195,195,197,174,161,33,251,15,232,22,47,96,66,196,26,87,95,190,252,16,191,118,237,145,28,208,191,23,98, - 99,93,223,0,219,96,127,94,190,124,247,11,88,242,254,1,38,12,48,6,186,17,216,120,229,4,225,191,160,197,221,211,167,23,176,3,195,73,14,152, - 232,51,38,78,92,219,126,236,216,85,99,96,41,243,35,38,198,245,123,124,188,219,23,160,59,129,102,188,255,13,218,113,1,204,200,255,64,109,42,88, - 85,9,16,64,52,233,182,35,77,37,176,1,3,80,160,185,57,201,72,91,91,97,3,150,182,16,28,3,3,124,87,123,123,170,37,208,131,82,192,46, - 169,50,208,241,173,12,152,251,162,209,241,15,95,95,203,217,219,182,181,155,127,254,188,85,252,245,235,245,98,175,94,173,19,251,250,117,135,232,233,211, - 211,245,195,195,29,219,161,185,4,159,25,192,4,98,60,161,168,40,84,27,88,10,138,2,75,10,137,236,236,0,3,111,111,243,73,132,244,65,241,87, - 96,36,172,1,230,210,200,59,119,150,40,125,253,186,77,236,203,151,173,98,223,190,109,23,249,250,117,187,40,144,22,187,119,111,153,252,130,5,21,238, - 137,137,158,221,192,158,199,61,108,230,104,104,200,239,93,186,180,58,224,229,203,181,226,192,94,22,39,48,114,185,197,196,4,196,106,106,98,205,117,117, - 149,54,18,114,7,176,116,58,14,44,49,194,128,254,151,121,255,126,19,255,143,31,59,57,128,246,179,0,195,133,5,68,63,124,184,130,227,195,135,205, - 252,175,94,173,151,92,176,160,220,91,65,65,226,0,186,25,64,251,78,2,237,46,59,121,114,170,206,223,191,123,4,110,221,90,4,90,4,143,18,185, - 0,1,68,139,35,33,145,83,226,95,78,78,118,80,215,140,152,225,243,255,192,122,248,15,48,210,126,3,219,8,76,65,65,118,71,128,189,160,135,192, - 6,164,2,30,61,236,192,70,103,10,48,135,56,232,233,41,93,4,86,125,119,65,250,63,126,252,162,124,235,214,83,253,71,143,94,170,18,242,35,176, - 52,120,109,106,170,121,252,232,209,203,159,129,85,0,104,247,223,159,35,71,46,189,11,8,176,217,113,225,194,61,203,167,79,95,155,16,112,55,23,176, - 183,20,12,196,46,51,102,108,126,10,236,9,93,1,54,218,159,128,38,234,64,126,2,246,144,148,158,63,127,167,114,243,230,35,57,160,217,56,123,127, - 55,110,60,116,138,137,105,51,2,230,240,105,21,21,209,203,129,37,211,147,201,147,215,255,60,123,246,230,107,39,39,195,77,183,110,61,49,255,249,243, - 23,78,253,143,31,191,178,200,201,153,56,103,238,220,173,7,76,77,53,118,133,134,58,92,1,150,50,159,64,235,148,129,97,2,108,91,125,224,89,185, - 114,191,46,176,180,114,189,112,225,174,53,176,167,41,140,110,6,80,141,89,103,231,10,163,133,11,119,197,3,237,92,223,218,154,188,88,84,84,224,46, - 242,0,46,64,0,209,26,49,171,168,72,243,244,247,103,235,1,75,152,117,4,74,152,157,147,38,229,154,74,74,10,131,102,103,69,128,85,141,174,143, - 143,101,47,145,185,156,108,12,172,206,22,148,150,134,27,10,11,243,138,192,6,32,129,165,128,72,112,176,173,78,122,186,111,38,144,253,138,214,110,64, - 47,53,59,58,82,179,102,207,46,230,3,207,68,112,115,136,231,228,4,26,132,134,218,183,163,205,147,17,194,255,128,153,245,62,16,223,5,246,82,31, - 129,14,35,32,197,29,192,166,196,141,29,59,186,236,59,59,211,80,246,252,0,4,208,160,186,162,27,84,95,2,123,43,224,217,242,253,251,47,124,52, - 49,81,219,15,204,37,23,104,101,159,128,0,207,29,43,43,157,45,39,78,92,123,255,246,237,103,216,44,247,31,96,238,251,181,115,231,153,247,192,54, - 198,73,96,181,54,9,88,242,189,167,87,24,88,90,106,175,215,212,148,223,191,113,227,49,112,164,131,54,237,239,219,119,238,19,80,108,39,80,110,13, - 41,77,3,96,59,79,1,136,149,128,254,144,37,180,145,15,173,71,247,33,63,63,168,251,227,199,207,183,230,205,219,134,50,137,11,16,64,131,44,193, - 48,1,123,18,224,4,243,23,216,173,252,122,229,202,131,59,129,129,54,51,64,167,14,80,189,232,99,102,250,232,231,103,53,11,216,13,190,13,44,166, - 191,194,18,11,108,108,9,216,13,255,182,99,199,169,183,192,42,107,59,176,120,239,101,101,101,166,117,162,249,7,108,180,175,4,182,25,38,207,154,181, - 229,205,214,173,39,96,61,147,223,192,176,248,4,116,203,115,7,7,131,249,102,102,26,43,105,28,7,31,226,227,221,219,216,217,217,142,84,86,206,249, - 118,243,230,19,148,4,3,16,64,131,42,193,64,22,242,128,215,161,254,5,182,204,127,239,217,115,246,51,11,11,203,89,96,119,111,42,48,130,63,81, - 203,30,208,188,81,80,144,45,176,228,96,221,15,236,25,189,253,254,29,116,8,48,124,230,25,54,245,241,19,216,83,248,186,101,203,241,247,64,245,123, - 128,37,77,15,176,122,120,66,163,72,250,14,236,153,205,240,244,52,155,181,124,249,190,231,192,196,242,11,122,154,3,56,193,0,123,100,63,79,159,190, - 249,97,215,174,211,143,237,237,13,22,185,184,24,207,103,64,93,126,66,21,192,199,199,245,56,38,198,165,147,155,155,125,15,176,253,244,233,222,189,231, - 127,209,7,248,0,2,136,214,211,231,76,66,66,124,172,192,92,33,120,238,220,109,135,215,175,63,104,226,235,86,219,216,232,238,61,118,236,202,219,247, - 239,191,128,151,87,2,139,210,255,160,33,118,93,93,229,231,192,54,208,125,96,215,92,25,40,38,68,97,53,244,24,216,54,154,10,12,156,157,235,214, - 29,122,9,236,242,126,101,64,44,186,194,152,102,0,13,135,63,121,242,250,15,176,49,251,28,232,190,171,64,251,89,129,141,67,57,42,117,24,254,1, - 123,145,23,129,137,119,178,140,140,200,206,109,219,78,190,184,112,225,206,39,6,212,197,228,240,161,139,231,207,223,254,249,246,237,199,47,43,43,237,59, - 138,138,146,15,95,188,120,43,5,108,28,83,99,127,245,31,96,87,250,0,48,99,78,2,154,127,106,221,186,195,111,222,190,5,207,103,252,70,115,3, - 3,64,0,81,45,193,4,4,88,51,168,171,203,129,118,238,145,157,96,172,173,117,246,30,61,10,79,48,224,241,253,119,239,190,252,125,240,224,197,95, - 96,119,251,53,48,194,46,1,187,189,127,64,235,92,255,253,35,120,204,6,106,87,134,139,253,185,153,153,230,86,47,47,243,41,192,72,63,179,101,203, - 177,87,64,123,190,32,13,123,163,247,228,224,13,64,96,59,224,31,48,183,253,2,22,128,31,128,126,185,4,108,160,223,5,29,137,241,241,227,87,94, - 160,59,200,217,66,251,93,78,78,236,146,189,189,254,42,160,159,231,61,124,248,242,218,246,237,39,95,62,122,244,234,51,116,100,245,55,142,6,46,195, - 203,151,239,126,223,185,243,244,151,152,152,224,51,11,11,205,179,130,130,60,31,128,238,224,6,186,81,136,129,196,229,16,192,146,237,179,178,178,228,41, - 71,71,131,197,90,90,10,43,47,93,186,119,103,223,190,11,111,63,127,6,237,119,134,175,2,64,89,236,5,16,64,84,235,86,7,6,58,48,196,197, - 249,50,120,120,228,48,0,27,140,212,234,154,255,1,237,55,2,182,51,62,109,221,122,252,175,174,174,210,79,61,61,229,199,90,90,242,123,129,185,94, - 19,152,56,13,128,221,86,5,232,32,30,11,108,231,34,104,62,9,148,176,128,85,200,75,80,195,22,152,27,111,42,42,74,92,2,150,22,55,65,141, - 233,91,183,30,129,6,232,96,139,197,113,37,22,6,228,238,36,208,252,127,199,142,93,251,123,253,250,227,239,70,70,170,239,77,77,213,79,219,219,235, - 41,62,125,250,70,21,216,229,213,2,70,26,200,29,160,19,168,216,127,253,250,203,140,212,144,255,15,26,90,0,246,84,94,241,242,114,62,150,145,17, - 189,5,236,57,222,4,118,187,239,2,75,136,103,192,220,252,13,216,117,255,12,116,251,55,164,196,251,27,173,180,131,205,219,253,0,157,107,4,44,225, - 254,1,195,227,151,130,130,196,87,125,125,229,167,33,33,118,251,129,213,170,18,176,205,167,3,12,43,245,175,95,191,203,0,221,203,243,243,39,98,1, - 22,51,51,227,127,160,27,126,129,118,104,242,242,114,63,80,82,146,184,6,76,248,55,126,255,254,123,23,24,150,175,14,29,186,252,5,152,161,97,107, - 139,144,195,5,101,21,0,64,0,86,174,93,5,97,32,8,166,240,93,136,17,67,64,11,187,20,246,130,31,225,239,248,27,254,141,32,136,118,22,54, - 134,8,98,19,11,69,66,26,73,206,83,99,188,92,116,150,168,4,81,43,171,107,151,153,217,205,110,118,238,254,38,24,206,147,27,1,195,97,95,233, - 118,123,202,96,48,251,135,104,94,132,69,81,28,155,166,45,86,171,237,169,217,212,61,8,96,137,12,29,161,114,228,0,98,17,253,134,46,165,204,211, - 223,85,218,13,233,186,234,226,60,163,100,135,32,134,77,38,230,1,25,28,0,200,75,10,20,161,124,183,88,166,69,243,90,135,120,30,23,227,241,60, - 32,3,23,200,119,241,73,89,116,58,173,17,68,81,192,52,149,129,128,85,223,231,85,114,236,147,41,11,83,159,168,215,107,59,33,34,65,211,23,200, - 62,90,150,205,17,203,229,241,68,218,147,156,235,27,73,183,207,9,148,196,34,101,44,215,107,39,220,108,220,51,170,13,3,38,182,97,52,102,237,182, - 81,66,195,154,69,211,94,70,172,26,225,65,158,93,52,239,129,166,85,104,19,127,133,168,133,227,236,217,116,186,228,116,237,133,177,99,58,142,240,23, - 46,119,1,88,185,130,20,132,97,32,136,180,13,169,6,91,74,63,231,19,250,209,222,122,20,138,120,243,172,32,181,138,155,180,56,19,68,66,91,15, - 130,47,200,50,179,187,217,100,50,249,243,197,157,243,98,117,85,237,62,9,227,81,91,205,148,209,57,59,243,223,21,166,85,238,165,7,16,110,41,18, - 162,170,123,144,116,214,58,81,198,172,147,162,48,199,52,213,49,1,18,17,94,167,15,32,143,224,8,186,137,96,235,8,85,87,9,102,132,241,71,149, - 222,75,31,93,247,120,34,121,239,109,123,186,33,134,139,194,4,205,132,41,203,109,156,101,38,122,63,195,161,31,104,192,54,59,32,110,135,138,167,13, - 196,34,177,37,80,250,237,194,204,178,132,213,244,207,97,63,156,163,144,72,62,77,102,125,211,28,174,232,32,138,9,147,231,155,136,254,164,152,182,79, - 128,139,174,227,234,122,63,34,30,203,3,5,141,108,232,106,225,250,18,196,241,245,125,209,75,0,81,49,193,192,54,220,131,102,100,217,65,219,72,65, - 129,245,15,116,161,38,144,205,249,233,211,87,65,2,221,220,223,192,92,248,239,207,159,127,184,18,13,242,44,249,79,96,32,176,2,205,103,6,97,96, - 195,149,233,209,163,151,200,247,9,32,71,46,250,162,175,191,104,237,3,98,75,187,191,12,168,107,129,192,215,6,1,221,193,2,172,14,152,129,24,60, - 29,2,44,214,209,151,121,34,207,179,33,187,5,157,102,96,32,110,231,193,127,180,196,14,43,21,88,126,253,250,3,194,160,99,52,152,161,238,96,196, - 18,38,200,75,83,144,39,144,255,50,16,177,106,17,32,128,168,150,96,64,235,61,129,110,7,93,88,196,102,98,162,255,117,201,146,202,223,155,54,29, - 103,6,237,85,6,230,114,49,96,149,161,141,79,63,176,136,127,15,12,116,240,38,118,92,141,79,44,145,15,187,81,142,17,75,224,160,7,208,63,180, - 226,254,63,153,237,42,6,6,196,102,191,63,12,136,173,56,204,72,9,133,9,139,190,127,120,48,169,110,249,135,68,195,220,193,140,230,14,38,164,156, - 76,200,29,127,137,76,176,12,0,1,68,181,4,3,172,67,153,183,110,61,97,222,216,184,192,55,45,205,231,180,177,177,250,189,148,20,175,127,87,175, - 62,144,234,235,91,147,8,76,249,98,248,244,3,219,28,239,65,117,233,151,47,63,254,19,81,61,252,69,242,36,242,254,41,108,106,145,3,130,26,51, - 174,255,208,74,29,38,180,34,150,17,135,91,24,112,12,195,83,218,206,67,46,69,25,25,240,95,196,129,173,138,69,47,205,241,2,128,0,162,90,130, - 1,21,135,63,127,126,227,57,125,250,102,4,16,231,1,235,210,107,192,58,253,43,176,103,162,2,108,160,17,60,99,69,79,79,233,209,139,23,239,190, - 3,171,46,66,251,137,176,237,237,97,36,160,150,22,128,20,119,208,195,45,255,177,180,17,168,238,22,128,0,162,86,130,97,2,182,214,89,120,121,185, - 224,199,63,3,27,119,90,63,126,16,55,24,9,76,88,79,128,221,224,199,192,22,251,95,10,170,139,193,0,6,211,237,231,52,113,11,64,0,81,35, - 193,128,139,62,96,195,19,212,51,32,241,158,98,8,208,208,144,3,141,75,220,132,30,90,51,50,175,156,31,34,0,32,128,168,53,151,4,218,56,206, - 12,44,81,72,190,87,17,52,71,100,103,167,183,238,206,157,39,159,159,62,125,243,135,129,70,155,195,70,1,117,0,64,0,81,109,242,17,116,2,37, - 104,171,41,137,9,230,151,171,171,241,66,96,123,231,212,190,125,23,190,48,144,182,79,121,20,12,0,0,8,32,170,37,152,183,111,63,253,3,157,222, - 200,195,195,249,150,24,245,236,236,108,111,65,147,128,192,234,104,205,218,181,135,94,3,75,151,31,12,228,237,85,30,5,116,4,0,1,68,141,201,71, - 112,183,246,237,219,143,204,10,10,18,191,221,220,76,46,8,10,242,222,228,224,96,125,207,201,201,254,19,116,100,216,191,127,12,160,35,180,126,2,19, - 211,39,208,46,58,29,29,197,77,62,62,22,115,89,89,153,15,109,217,114,226,249,163,71,175,96,147,128,196,28,155,49,10,6,16,0,4,16,35,149, - 204,0,37,60,54,62,62,110,78,57,57,113,62,57,57,81,65,96,194,16,0,109,96,3,118,183,65,43,229,133,65,231,154,241,240,112,188,227,228,100, - 123,247,234,213,135,239,87,175,62,252,112,255,254,243,207,223,190,253,128,237,125,65,94,98,48,10,6,41,0,8,32,106,237,173,132,29,113,6,218,237, - 8,218,249,200,193,194,194,194,14,44,65,216,5,5,121,88,4,4,120,152,128,189,32,208,249,43,255,222,188,249,8,154,219,1,221,19,4,219,204,143, - 60,183,67,179,173,12,163,128,58,0,32,128,24,169,104,14,108,152,30,148,104,96,183,130,192,206,199,67,62,144,8,54,143,129,124,139,202,223,209,196, - 50,52,0,64,0,49,82,217,44,88,245,132,126,19,61,174,9,48,228,33,254,209,196,50,4,0,64,128,1,0,102,20,176,16,7,130,12,56,0,0, - 0,0,73,69,78,68,174,66,96,130,0,0}; -const char* BinaryData::juce_png = (const char*) temp8; - -static const unsigned char temp9[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, - 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, - 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, - 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, - 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, - 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, - 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, - 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, - 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, - 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, - 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, - 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, - 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, - 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, - 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, - 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, - 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, - 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, - 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, - 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, - 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, - 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, - 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, - 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, - 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, - 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, - 10,13,10,35,105,102,100,101,102,32,95,87,73,78,51,50,13,10,32,35,105,110,99,108,117,100,101,32,60,119,105,110,100,111,119,115,46,104,62,13, - 10,35,101,108,105,102,32,33,32,100,101,102,105,110,101,100,32,40,76,73,78,85,88,41,13,10,32,35,105,110,99,108,117,100,101,32,60,67,97,114, - 98,111,110,46,104,62,13,10,32,35,105,110,99,108,117,100,101,32,60,77,111,118,105,101,115,46,104,62,13,10,35,101,110,100,105,102,13,10,13,10, - 35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,35,105,102,32, - 74,85,67,69,95,79,80,69,78,71,76,13,10,13,10,35,105,102,100,101,102,32,95,87,73,78,51,50,13,10,32,35,105,110,99,108,117,100,101,32, - 60,103,108,47,103,108,46,104,62,13,10,32,35,105,110,99,108,117,100,101,32,60,103,108,47,103,108,117,46,104,62,13,10,35,101,108,105,102,32,100, - 101,102,105,110,101,100,32,40,76,73,78,85,88,41,13,10,32,35,105,110,99,108,117,100,101,32,60,71,76,47,103,108,46,104,62,13,10,32,35,105, - 110,99,108,117,100,101,32,60,71,76,47,103,108,117,116,46,104,62,13,10,32,35,117,110,100,101,102,32,75,101,121,80,114,101,115,115,13,10,35,101, - 108,115,101,13,10,32,35,105,110,99,108,117,100,101,32,60,65,71,76,47,97,103,108,46,104,62,13,10,32,35,105,110,99,108,117,100,101,32,60,71, - 76,85,84,47,103,108,117,116,46,104,62,13,10,35,101,110,100,105,102,13,10,13,10,35,105,102,110,100,101,102,32,71,76,95,66,71,82,65,95,69, - 88,84,13,10,32,35,100,101,102,105,110,101,32,71,76,95,66,71,82,65,95,69,88,84,32,48,120,56,48,101,49,13,10,35,101,110,100,105,102,13, - 10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,13,10,99,108,97,115,115,32,68,101,109,111,79,112,101,110,71,76,67,97,110,118,97,115,32,32,58,32,112,117,98,108,105,99,32,79,112, - 101,110,71,76,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,112,117,98,108,105,99,32,84,105,109,101,114,13,10,123,13,10,32,32,32,32,102,108,111,97,116,32,114,111,116,97,116,105,111,110,44,32,100, - 101,108,116,97,59,13,10,32,32,32,32,73,109,97,103,101,42,32,105,109,97,103,101,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32, - 32,68,101,109,111,79,112,101,110,71,76,67,97,110,118,97,115,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,111,116,97, - 116,105,111,110,32,61,32,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,100,101,108,116,97,32,61,32,49,46,48,102,59,13,10,13,10,32, - 32,32,32,32,32,32,32,73,109,97,103,101,42,32,105,109,32,61,32,73,109,97,103,101,70,105,108,101,70,111,114,109,97,116,58,58,108,111,97,100, - 70,114,111,109,32,40,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,44,32,66,105,110,97,114,121,68,97,116,97,58,58, - 106,117,99,101,95,112,110,103,83,105,122,101,41,59,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,32,61,32,110,101,119,32,73,109,97,103, - 101,32,40,73,109,97,103,101,58,58,82,71,66,44,32,53,49,50,44,32,53,49,50,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32, - 32,71,114,97,112,104,105,99,115,32,103,32,40,42,105,109,97,103,101,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108, - 32,40,67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109,97,103,101,32, - 40,105,109,44,32,48,44,32,48,44,32,53,49,50,44,32,53,49,50,44,32,48,44,32,48,44,32,105,109,45,62,103,101,116,87,105,100,116,104,40, - 41,44,32,105,109,45,62,103,101,116,72,101,105,103,104,116,40,41,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,105,109,59, - 13,10,13,10,32,32,32,32,32,32,32,32,115,116,97,114,116,84,105,109,101,114,32,40,50,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 47,47,32,74,117,115,116,32,102,111,114,32,100,101,109,111,32,112,117,114,112,111,115,101,115,44,32,108,101,116,39,115,32,100,117,109,112,32,97,32, - 108,105,115,116,32,111,102,32,97,108,108,32,116,104,101,32,97,118,97,105,108,97,98,108,101,32,112,105,120,101,108,32,102,111,114,109,97,116,115,46, - 46,13,10,32,32,32,32,32,32,32,32,79,119,110,101,100,65,114,114,97,121,32,60,79,112,101,110,71,76,80,105,120,101,108,70,111,114,109,97,116, - 62,32,97,118,97,105,108,97,98,108,101,80,105,120,101,108,70,111,114,109,97,116,115,59,13,10,32,32,32,32,32,32,32,32,79,112,101,110,71,76, - 80,105,120,101,108,70,111,114,109,97,116,58,58,103,101,116,65,118,97,105,108,97,98,108,101,80,105,120,101,108,70,111,114,109,97,116,115,32,40,116, - 104,105,115,44,32,97,118,97,105,108,97,98,108,101,80,105,120,101,108,70,111,114,109,97,116,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 102,111,114,32,40,105,110,116,32,105,32,61,32,48,59,32,105,32,60,32,97,118,97,105,108,97,98,108,101,80,105,120,101,108,70,111,114,109,97,116, - 115,46,115,105,122,101,40,41,59,32,43,43,105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99, - 111,110,115,116,32,79,112,101,110,71,76,80,105,120,101,108,70,111,114,109,97,116,42,32,99,111,110,115,116,32,112,105,120,70,111,114,109,97,116,32, - 61,32,97,118,97,105,108,97,98,108,101,80,105,120,101,108,70,111,114,109,97,116,115,91,105,93,59,13,10,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,83,116,114,105,110,103,32,102,111,114,109,97,116,68,101,115,99,114,105,112,116,105,111,110,59,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,102,111,114,109,97,116,68,101,115,99,114,105,112,116,105,111,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,105,32, - 60,60,32,34,58,32,82,71,66,65,61,40,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,114,101,100,66,105,116,115,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,103,114,101,101,110,66,105, - 116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62, - 98,108,117,101,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111, - 114,109,97,116,45,62,97,108,112,104,97,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,41,44,32,100,101, - 112,116,104,61,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,100,101,112,116,104,66,117,102,102,101,114,66,105,116,115,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,115,116,101,110,99,105,108,61,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45, - 62,115,116,101,110,99,105,108,66,117,102,102,101,114,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32, - 97,99,99,117,109,32,82,71,66,65,61,40,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,97,99,99,117,109,117,108,97,116,105,111,110, - 66,117,102,102,101,114,82,101,100,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32, - 112,105,120,70,111,114,109,97,116,45,62,97,99,99,117,109,117,108,97,116,105,111,110,66,117,102,102,101,114,71,114,101,101,110,66,105,116,115,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,97,99,99,117, - 109,117,108,97,116,105,111,110,66,117,102,102,101,114,66,108,117,101,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60, - 32,34,44,32,34,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,97,99,99,117,109,117,108,97,116,105,111,110,66,117,102,102,101,114,65,108, - 112,104,97,66,105,116,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,34,41,44,32,102,117,108,108,45,115,99,101,110,101, - 32,65,65,61,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60,60,32,112,105,120,70,111,114,109,97,116,45,62,102,117,108,108,83, - 99,101,110,101,65,110,116,105,65,108,105,97,115,105,110,103,78,117,109,83,97,109,112,108,101,115,59,13,10,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,76,111,103,103,101,114,58,58,111,117,116,112,117,116,68,101,98,117,103,83,116,114,105,110,103,32,40,102,111,114,109,97,116,68,101,115,99, - 114,105,112,116,105,111,110,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111, - 79,112,101,110,71,76,67,97,110,118,97,115,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,105,109, - 97,103,101,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,119,104,101,110,32,116,104,101,32,99,111,109,112,111,110,101,110,116, - 32,99,114,101,97,116,101,115,32,97,32,110,101,119,32,105,110,116,101,114,110,97,108,32,99,111,110,116,101,120,116,44,32,116,104,105,115,32,105,115, - 32,99,97,108,108,101,100,44,32,97,110,100,13,10,32,32,32,32,47,47,32,119,101,39,108,108,32,117,115,101,32,116,104,101,32,111,112,112,111,114, - 116,117,110,105,116,121,32,116,111,32,99,114,101,97,116,101,32,116,104,101,32,116,101,120,116,117,114,101,115,32,110,101,101,100,101,100,46,13,10,32, - 32,32,32,118,111,105,100,32,110,101,119,79,112,101,110,71,76,67,111,110,116,101,120,116,67,114,101,97,116,101,100,40,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,47,47,32,40,110,111,32,110,101,101,100,32,116,111,32,99,97,108,108,32,109,97,107,101,67,117,114,114,101,110, - 116,67,111,110,116,101,120,116,65,99,116,105,118,101,40,41,44,32,97,115,32,116,104,97,116,32,119,105,108,108,32,104,97,118,101,13,10,32,32,32, - 32,32,32,32,32,47,47,32,98,101,101,110,32,100,111,110,101,32,102,111,114,32,117,115,32,98,101,102,111,114,101,32,116,104,101,32,109,101,116,104, - 111,100,32,99,97,108,108,41,46,13,10,32,32,32,32,32,32,32,32,103,108,67,108,101,97,114,67,111,108,111,114,32,40,48,46,48,102,44,32,48, - 46,48,102,44,32,48,46,48,102,44,32,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,108,67,108,101,97,114,68,101,112,116,104,32, - 40,49,46,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,68,101,112,116,104,70,117,110,99,32,40,71,76,95,76,69,83,83,41,59, - 13,10,32,32,32,32,32,32,32,32,103,108,69,110,97,98,108,101,32,40,71,76,95,68,69,80,84,72,95,84,69,83,84,41,59,13,10,32,32,32, - 32,32,32,32,32,103,108,69,110,97,98,108,101,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,41,59,13,10,32,32,32,32,32,32,32,32, - 103,108,69,110,97,98,108,101,32,40,71,76,95,66,76,69,78,68,41,59,13,10,32,32,32,32,32,32,32,32,103,108,83,104,97,100,101,77,111,100, - 101,108,32,40,71,76,95,83,77,79,79,84,72,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,84,101,120,80,97,114,97,109,101,116,101, - 114,105,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,44,32,71,76,95,84,69,88,84,85,82,69,95,87,82,65,80,95,83,44,32,71,76, - 95,67,76,65,77,80,41,59,13,10,32,32,32,32,32,32,32,32,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,32,40,71,76,95,84,69, - 88,84,85,82,69,95,50,68,44,32,71,76,95,84,69,88,84,85,82,69,95,87,82,65,80,95,84,44,32,71,76,95,67,76,65,77,80,41,59,13, - 10,32,32,32,32,32,32,32,32,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,44, - 32,71,76,95,84,69,88,84,85,82,69,95,77,65,71,95,70,73,76,84,69,82,44,32,71,76,95,76,73,78,69,65,82,41,59,13,10,32,32,32, - 32,32,32,32,32,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68,44,32,71,76,95, - 84,69,88,84,85,82,69,95,77,73,78,95,70,73,76,84,69,82,44,32,71,76,95,76,73,78,69,65,82,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,103,108,80,105,120,101,108,83,116,111,114,101,105,32,40,71,76,95,85,78,80,65,67,75,95,65,76,73,71,78,77,69,78,84,44,32,52, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,110,116,32,115,116,114,105,100,101,44,32,112,105,120,83,116,114,105,100,101,59,13,10,32,32, - 32,32,32,32,32,32,99,111,110,115,116,32,118,111,105,100,42,32,112,105,120,101,108,115,32,61,32,105,109,97,103,101,45,62,108,111,99,107,80,105, - 120,101,108,68,97,116,97,82,101,97,100,79,110,108,121,32,40,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41, - 44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,32,115,116,114,105,100,101,44,32,112,105,120,83,116,114,105,100,101,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,84,101,120,73,109,97,103,101,50,68,32,40,71,76,95,84,69,88,84,85,82,69,95,50,68, - 44,32,48,44,32,52,44,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105, - 103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,71,76,95,82,71,66,44, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,71,76,95,85,78,83,73,71,78,69,68,95,66,89,84,69, - 44,32,112,105,120,101,108,115,41,59,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,45,62,114,101,108,101,97,115,101,80,105,120,101,108,68, - 97,116,97,82,101,97,100,79,110,108,121,32,40,112,105,120,101,108,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,72,105,110,116,32, - 40,71,76,95,76,73,78,69,95,83,77,79,79,84,72,95,72,73,78,84,44,32,71,76,95,78,73,67,69,83,84,41,59,13,10,32,32,32,32,32, - 32,32,32,103,108,72,105,110,116,32,40,71,76,95,80,79,73,78,84,95,83,77,79,79,84,72,95,72,73,78,84,44,32,71,76,95,78,73,67,69, - 83,84,41,59,13,10,32,32,32,32,32,32,32,32,103,108,66,108,101,110,100,70,117,110,99,32,40,71,76,95,83,82,67,95,65,76,80,72,65,44, - 32,71,76,95,79,78,69,95,77,73,78,85,83,95,83,82,67,95,65,76,80,72,65,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, - 118,111,105,100,32,109,111,117,115,101,68,114,97,103,32,40,99,111,110,115,116,32,77,111,117,115,101,69,118,101,110,116,38,32,101,41,13,10,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,116,97,32,61,32,101,46,103,101,116,68,105,115,116,97,110,99,101,70,114,111,109,68,114, - 97,103,83,116,97,114,116,88,40,41,32,47,32,49,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59, - 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,110,100,101,114,79,112,101,110,71,76,40,41,13,10,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,103,108,67,108,101,97,114,67,111,108,111,114,32,40,48,46,56,102,44,32,48,46,48,102,44,32,48,46,52, - 102,44,32,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,108,67,108,101,97,114,32,40,71,76,95,67,79,76,79,82,95,66,85,70, - 70,69,82,95,66,73,84,32,124,32,71,76,95,68,69,80,84,72,95,66,85,70,70,69,82,95,66,73,84,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,103,108,77,97,116,114,105,120,77,111,100,101,40,71,76,95,80,82,79,74,69,67,84,73,79,78,41,59,13,10,32,32,32,32,32,32,32, - 32,103,108,76,111,97,100,73,100,101,110,116,105,116,121,40,41,59,13,10,32,32,32,32,32,32,32,32,103,108,79,114,116,104,111,32,40,48,46,48, - 44,32,103,101,116,87,105,100,116,104,40,41,44,32,48,46,48,44,32,103,101,116,72,101,105,103,104,116,40,41,44,32,48,44,32,49,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,103,108,67,111,108,111,114,52,102,32,40,49,46,48,102,44,32,49,46,48,102,44,32,49,46,48,102,44,32,102, - 97,98,115,102,32,40,58,58,115,105,110,102,32,40,114,111,116,97,116,105,111,110,32,47,32,49,48,48,46,48,102,41,41,41,59,13,10,32,32,32, - 32,32,32,32,32,103,108,66,101,103,105,110,40,71,76,95,81,85,65,68,83,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84, - 101,120,67,111,111,114,100,50,105,32,40,48,44,32,48,41,59,32,103,108,86,101,114,116,101,120,50,102,32,40,53,48,46,48,102,44,32,103,101,116, - 72,101,105,103,104,116,40,41,32,45,32,53,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111, - 114,100,50,105,32,40,49,44,32,48,41,59,32,103,108,86,101,114,116,101,120,50,102,32,40,103,101,116,87,105,100,116,104,40,41,32,45,32,53,48, - 46,48,102,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,53,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 103,108,84,101,120,67,111,111,114,100,50,105,32,40,49,44,32,49,41,59,32,103,108,86,101,114,116,101,120,50,102,32,40,103,101,116,87,105,100,116, - 104,40,41,32,45,32,53,48,46,48,102,44,32,53,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67, - 111,111,114,100,50,105,32,40,48,44,32,49,41,59,32,103,108,86,101,114,116,101,120,50,102,32,40,53,48,46,48,102,44,32,53,48,46,48,102,41, - 59,13,10,32,32,32,32,32,32,32,32,103,108,69,110,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,77,97,116,114,105,120,77, - 111,100,101,32,40,71,76,95,80,82,79,74,69,67,84,73,79,78,41,59,13,10,32,32,32,32,32,32,32,32,103,108,76,111,97,100,73,100,101,110, - 116,105,116,121,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,67,108,101,97,114,32,40,71,76,95,68,69,80,84,72,95,66,85,70, - 70,69,82,95,66,73,84,41,59,13,10,32,32,32,32,32,32,32,32,103,108,117,80,101,114,115,112,101,99,116,105,118,101,32,40,52,53,46,48,102, - 44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,47,32, - 40,71,76,102,108,111,97,116,41,32,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,48,46,49,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49, - 48,48,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,77,97,116,114,105,120,77,111,100,101,32,40,71,76,95,77,79,68,69, - 76,86,73,69,87,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,108,76,111,97,100,73,100,101,110,116,105,116,121,40,41,59,13,10,32,32, - 32,32,32,32,32,32,103,108,80,117,115,104,77,97,116,114,105,120,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84, - 114,97,110,115,108,97,116,101,102,32,40,48,46,48,102,44,32,48,46,48,102,44,32,45,53,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,103,108,82,111,116,97,116,101,102,32,40,114,111,116,97,116,105,111,110,44,32,48,46,53,102,44,32,49,46,48,102,44,32,48,46,48, - 102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,66,101,103,105,110,32,40,71,76,95,81,85,65,68,83,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,67,111,108,111,114,51,102,32,40,48,46,48,102,44,32,49,46,48,102,44, - 32,48,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40, - 48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44,32,32,49, - 46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102, - 44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,45,49,46,48,102,44,32,32,49,46,48,102,41, - 59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46, - 48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59, - 32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,67,111,108,111,114,51,102,32,40,49,46,48,102,44,32,48,46,48,102,44,32,48,46,48,102, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44, - 32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48, - 102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32, - 103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101, - 114,116,101,120,51,102,40,32,49,46,48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,103,108,67,111,108,111,114,51,102,32,40,48,46,48,102,44,32,48,46,48,102,44,32,49,46,48,102,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102, - 41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103, - 108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114, - 116,101,120,51,102,40,32,49,46,48,102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51, - 102,40,32,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,103,108,67,111,108,111,114,51,102,32,40,49,46,48,102,44,32,49,46,48,102,44,32,48,46,48,102,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108, - 86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116, - 101,120,51,102,40,32,49,46,48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102, - 40,32,49,46,48,102,44,32,45,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 103,108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46, - 48,102,44,32,45,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108, - 67,111,108,111,114,51,102,32,40,48,46,48,102,44,32,49,46,48,102,44,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101, - 120,51,102,40,32,49,46,48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40, - 32,49,46,48,102,44,32,32,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103, - 108,84,101,120,67,111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48, - 102,44,32,32,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120, - 67,111,111,114,100,50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,32,49,46,48,102,44,32,45, - 49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,67,111,108,111,114, - 51,102,32,40,49,46,48,102,44,32,48,46,48,102,44,32,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,103,108,84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45, - 49,46,48,102,44,32,45,49,46,48,102,44,32,45,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108, - 84,101,120,67,111,111,114,100,50,102,40,48,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102, - 44,32,45,49,46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67, - 111,111,114,100,50,102,40,49,46,48,102,44,32,49,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49, - 46,48,102,44,32,32,49,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,108,84,101,120,67,111,111,114,100, - 50,102,40,49,46,48,102,44,32,48,46,48,102,41,59,32,103,108,86,101,114,116,101,120,51,102,40,45,49,46,48,102,44,32,32,49,46,48,102,44, - 32,45,49,46,48,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,108,69,110,100,40,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,103,108,80,111,112,77,97,116,114,105,120,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105, - 109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,111,116,97,116,105,111,110,32,43, - 61,32,100,101,108,116,97,59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,125, - 59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,13,10,99,108,97,115,115,32,79,112,101,110,71,76,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110, - 101,110,116,13,10,123,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,68,101,109,111,79,112,101,110,71,76,67,97,110,118,97,115,42,32,99,97,110,118, - 97,115,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,79,112,101,110,71,76,68,101,109,111,40,41,13,10, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,79,112,101,110,71,76,34,41,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,99,97,110,118,97,115,32,61,32,110,101,119,32,68,101,109,111,79,112,101,110,71,76,67,97,110,118,97,115,40,41, - 59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,97,110,118,97,115,41,59,13,10, - 32,32,32,32,125,13,10,13,10,32,32,32,32,126,79,112,101,110,71,76,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111, - 105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,97,110,118,97,115,45,62,115,101,116, - 66,111,117,110,100,115,32,40,49,48,44,32,49,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,48,44,32,103,101,116,72,101,105,103, - 104,116,40,41,32,45,32,53,48,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42, - 32,99,114,101,97,116,101,79,112,101,110,71,76,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,79, - 112,101,110,71,76,68,101,109,111,40,41,59,13,10,125,13,10,13,10,35,101,110,100,105,102,13,10,0,0}; -const char* BinaryData::opengldemo_cpp = (const char*) temp9; - -static const unsigned char temp10[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, - 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, - 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, - 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, - 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, - 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, - 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, - 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, - 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, - 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, - 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, - 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, - 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, - 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, - 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, - 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, - 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, - 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, - 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, - 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, - 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, - 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, - 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, - 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, - 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, - 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, - 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, - 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,115,116,97,116,105,99,32,102,108,111,97,116,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,13,10,123,13,10,32,32,32,32,114, - 101,116,117,114,110,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97, - 116,40,41,32,42,32,51,48,48,46,48,102,32,45,32,49,53,48,46,48,102,59,13,10,125,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,80, - 97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110, - 116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108, - 105,99,32,83,108,105,100,101,114,76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,111,109,98,111,66,111,120,76,105,115,116,101,110,101,114,13,10,123,13,10, - 112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,80,97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109, - 111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,80,97,116,104,115,34,41,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,78,111,32,112,97,114,116,115,32,111,102,32,116,104,105,115,32,99,111,109,112,111,110,101, - 110,116,32,97,114,101,32,115,101,109,105,45,116,114,97,110,115,112,97,114,101,110,116,44,32,115,111,32,99,97,108,108,105,110,103,32,115,101,116,79, - 112,97,113,117,101,40,41,13,10,32,32,32,32,32,32,32,32,47,47,32,97,108,108,111,119,115,32,116,104,101,32,114,101,100,114,97,119,32,115,121, - 115,116,101,109,32,116,111,32,101,120,112,108,111,105,116,32,116,104,105,115,32,102,97,99,116,32,97,110,100,32,111,112,116,105,109,105,115,101,32,114, - 101,112,97,105,110,116,105,110,103,46,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,82,97,110,100,111,109,83,104,97,112,101,40,41,59,13,10,32,32,32,32,32,32,32, - 32,103,101,110,101,114,97,116,101,73,109,97,103,101,40,41,59,13,10,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,68,114,97,119,97, - 98,108,101,40,41,59,13,10,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,83,86,71,68,114,97,119,97,98,108,101,40,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,121,112,101,67,104,111,111,115,101,114, - 32,32,32,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120,32,40,84,40,34,116,121,112,101,34,41,41,41,59,13,10,32,32,32,32,32,32, - 32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,99,97,108,101,83,108,105,100,101,114,32,32,32,32,61,32,110,101, - 119,32,83,108,105,100,101,114,32,40,84,40,34,115,99,97,108,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77, - 97,107,101,86,105,115,105,98,108,101,32,40,97,110,103,108,101,83,108,105,100,101,114,32,32,32,32,61,32,110,101,119,32,83,108,105,100,101,114,32, - 40,84,40,34,97,110,103,108,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108, - 101,32,40,120,83,108,105,100,101,114,32,32,32,32,32,32,32,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,120,34,41,41,41, - 59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,121,83,108,105,100,101,114,32,32,32, - 32,32,32,32,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,121,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100, - 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,111,112,97,99,105,116,121,83,108,105,100,101,114,32,32,61,32,110,101,119,32,83,108, - 105,100,101,114,32,40,84,40,34,111,112,97,99,105,116,121,34,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97, - 98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,116,121,112,101,58,34,41,41,41,32,32,32,32,32,45,62,97, - 116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,116,121,112,101,67,104,111,111,115,101,114,44,32,116,114,117,101,41,59,13,10,32, - 32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,115,99,97, - 108,101,58,34,41,41,41,32,32,32,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,115,99,97,108,101,83,108,105, - 100,101,114,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58, - 58,101,109,112,116,121,44,32,84,40,34,97,110,103,108,101,58,34,41,41,41,32,32,32,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111, - 110,101,110,116,32,40,97,110,103,108,101,83,108,105,100,101,114,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32, - 76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,120,32,111,102,102,115,101,116,58,34,41,41,41,32,45, - 62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,120,83,108,105,100,101,114,44,32,116,114,117,101,41,59,13,10,32,32,32, - 32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,32,84,40,34,121,32,111,102,102, - 115,101,116,58,34,41,41,41,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,121,83,108,105,100,101,114,44,32,116, - 114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121, - 44,32,84,40,34,111,112,97,99,105,116,121,58,34,41,41,41,32,32,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40, - 111,112,97,99,105,116,121,83,108,105,100,101,114,44,32,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111, - 111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,115,111,108,105,100,32,99, - 111,108,111,117,114,34,41,44,32,49,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116, - 101,109,32,40,84,40,34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,108,105,110,101,97,114,32,103,114,97,100,105,101,110,116,32,102,105, - 108,108,34,41,44,32,50,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32, - 40,84,40,34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,114,97,100,105,97,108,32,103,114,97,100,105,101,110,116,32,102,105,108,108,34, - 41,44,32,51,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40, - 34,114,97,110,100,111,109,32,115,104,97,112,101,32,45,32,116,105,108,101,100,32,105,109,97,103,101,32,102,105,108,108,34,41,44,32,56,41,59,13, - 10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32, - 45,32,108,111,119,32,113,117,97,108,105,116,121,34,41,44,32,52,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101, - 114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32,45,32,104,105,103,104,32,113,117,97,108,105,116,121,34,41,44,32,53, - 41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97, - 103,101,32,45,32,99,111,108,111,117,114,45,102,105,108,108,101,100,32,97,108,112,104,97,32,99,104,97,110,110,101,108,34,41,44,32,54,41,59,13, - 10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32, - 45,32,103,114,97,100,105,101,110,116,45,102,105,108,108,101,100,32,97,108,112,104,97,32,99,104,97,110,110,101,108,34,41,44,32,55,41,59,13,10, - 32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,105,109,97,103,101,32,45, - 32,97,108,112,104,97,109,97,112,45,102,105,108,108,101,100,32,97,108,112,104,97,32,99,104,97,110,110,101,108,34,41,44,32,57,41,59,13,10,32, - 32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,73,116,101,109,32,40,84,40,34,100,114,97,119,97,98,108,101, - 32,111,98,106,101,99,116,34,41,44,32,49,48,41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115,101,114,45,62,97,100, - 100,73,116,101,109,32,40,84,40,34,83,86,71,32,111,98,106,101,99,116,34,41,44,32,49,49,41,59,13,10,32,32,32,32,32,32,32,32,116,121, - 112,101,67,104,111,111,115,101,114,45,62,115,101,116,83,101,108,101,99,116,101,100,73,100,32,40,49,49,41,59,13,10,32,32,32,32,32,32,32,32, - 116,121,112,101,67,104,111,111,115,101,114,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,115,99,97,108,101,83,108,105,100,101,114,32,32,32,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13, - 10,32,32,32,32,32,32,32,32,97,110,103,108,101,83,108,105,100,101,114,32,32,32,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104, - 105,115,41,59,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,32,32,32,32,32,32,32,45,62,97,100,100,76,105,115,116,101,110,101, - 114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,32,32,32,32,32,32,32,45,62,97,100,100,76,105, - 115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,111,112,97,99,105,116,121,83,108,105,100,101,114,32,45,62, - 97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,99,97,108,101,83,108,105,100, - 101,114,45,62,115,101,116,82,97,110,103,101,32,40,48,46,48,49,44,32,49,48,46,48,44,32,48,46,48,48,49,41,59,13,10,32,32,32,32,32, - 32,32,32,115,99,97,108,101,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,49,46,48,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,97,110,103,108,101,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,45,49,46,48,44,32,49,46,48,44,32,48,46,48, - 48,49,41,59,13,10,32,32,32,32,32,32,32,32,97,110,103,108,101,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,48,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,45,49,48,44,32,49,48,44,32, - 48,46,48,48,49,41,59,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,48,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,45,49,48,44,32,49,48,44,32,48, - 46,48,48,49,41,59,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,48,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103,101,32,40,48,44,32,49,44, - 32,48,46,48,49,41,59,13,10,32,32,32,32,32,32,32,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,115,101,116,86,97,108,117,101, - 32,40,49,46,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,80,97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109, - 115,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,105,109,97,103,101,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101, - 108,101,116,101,32,100,114,97,119,97,98,108,101,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,118,103,68,114,97,119,97,98, - 108,101,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32, - 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,67,104,101,99,107,101,114,66,111,97,114,100,32,40,48,44,32,48,44,32,103,101,116, - 87,105,100,116,104,40,41,44,32,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,53,48,44,32,53,48,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,67,111,108,111,117,114,32,40,48,120,102,102,101,48,101,48,101,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13,10,13,10,32,32, - 32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,116,121,112,101,32,61,32,116,121,112,101,67,104,111,111,115,101,114,45,62,103,101,116,83, - 101,108,101,99,116,101,100,73,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,121,112,101,32,61,61,32,49,41,13,10, - 32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111, - 117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100, - 101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,80,97,116, - 104,32,40,115,104,97,112,101,44,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32, - 32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,50,32,124,124,32,116,121,112,101,32,61,61,32,51,41,13, - 10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,71,114,97,100,105,101,110,116,66,114,117,115,104,32,103,98, - 32,40,67,111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105, - 116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,53,102,44,32,103,101,116,72,101,105,103, - 104,116,40,41,32,42,32,48,46,53,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,67,111,108,111,117,114,115,58,58,114,101,100,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99, - 105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,54,102,44,32,103,101,116,72,101,105, - 103,104,116,40,41,32,42,32,48,46,55,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,116,121,112,101,32,61,61,32,51,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,66,114,117, - 115,104,32,40,38,103,98,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,80,97,116,104,32,40,115,104,97,112,101, - 44,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101, - 108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,56,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,73,109,97,103,101,66,114,117,115,104,32,105,98,32,40,105,109,97,103,101,44,32,49,48,48,44,32,49,48,48,44,32,40,102,108,111,97, - 116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,103,46,115,101,116,66,114,117,115,104,32,40,38,105,98,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102, - 105,108,108,80,97,116,104,32,40,115,104,97,112,101,44,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,59,13,10,32,32,32,32,32,32, - 32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,52,32,124,124,32,116,121,112,101,32, - 61,61,32,53,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,121,112,101,32,61, - 61,32,52,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,73,109,97,103,101,82,101,115,97,109,112,108,105, - 110,103,81,117,97,108,105,116,121,32,40,71,114,97,112,104,105,99,115,58,58,108,111,119,82,101,115,97,109,112,108,105,110,103,81,117,97,108,105,116, - 121,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103, - 46,115,101,116,73,109,97,103,101,82,101,115,97,109,112,108,105,110,103,81,117,97,108,105,116,121,32,40,71,114,97,112,104,105,99,115,58,58,109,101, - 100,105,117,109,82,101,115,97,109,112,108,105,110,103,81,117,97,108,105,116,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103, - 46,115,101,116,79,112,97,99,105,116,121,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86, - 97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109, - 97,103,101,84,114,97,110,115,102,111,114,109,101,100,32,40,105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116, - 87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97,110, - 115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87,105, - 100,116,104,40,41,44,32,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 46,102,111,108,108,111,119,101,100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,97,108,115,101,41,59,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105, - 102,32,40,116,121,112,101,32,61,61,32,54,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46, - 115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111, - 97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109,97,103,101,84,114,97,110,115,102,111,114,109,101,100,32,40, - 105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62, - 103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105, - 111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44,32,45,48,46,53,102,32,42,32,105, - 109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101,100,66,121,32,40,103,101,116, - 84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32, - 32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,55,41,13,10,32,32, - 32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,71,114,97,100,105,101,110,116,66,114,117,115,104,32,103,98,32,40,67, - 111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83, - 108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,53,102,44,32,103,101,116,72,101,105,103,104,116,40, - 41,32,42,32,48,46,53,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,67,111,108,111,117,114,115,58,58,114,101,100,46,119,105,116,104,65,108,112,104,97,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121, - 83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,87,105,100,116,104,40,41,32,42,32,48,46,54,102,44,32,103,101,116,72,101,105,103,104,116, - 40,41,32,42,32,48,46,55,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,66,114,117,115,104,32,40,38,103,98, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73,109,97,103,101,84,114,97, - 110,115,102,111,114,109,101,100,32,40,105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40, - 41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58, - 58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87,105,100,116,104,40,41,44, - 32,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111, - 119,101,100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101, - 32,61,61,32,57,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,73,109,97,103,101,66,114,117,115, - 104,32,105,98,32,40,105,109,97,103,101,44,32,49,48,48,44,32,49,48,48,44,32,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108, - 105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,66,114,117, - 115,104,32,40,38,105,98,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,109,97,103,101,32,33,61,32,48,41, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,73, - 109,97,103,101,84,114,97,110,115,102,111,114,109,101,100,32,40,105,109,97,103,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,44,32,48,44,32,105,109,97,103,101,45,62,103,101, - 116,87,105,100,116,104,40,41,44,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,102,102,105,110,101,84,114,97, - 110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,87, - 105,100,116,104,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,45, - 48,46,53,102,32,42,32,105,109,97,103,101,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101, - 100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,116,121,112,101,32,61, - 61,32,49,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,79,112,97,99,105, - 116,121,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,119,44,32,104,59,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,100,114,97,119,97,98,108,101,45,62,103,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,119,44,32,104,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,114,97,119,97,98,108,101,45,62,100,114,97,119,32,40,103,44,32,65,102,102,105,110,101, - 84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,120,32,45,32,48,46,53,102,32,42,32,119,44,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,45,121,32,45,32,48,46,53,102,32,42,32,104,41,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101,100,66,121, - 32,40,103,101,116,84,114,97,110,115,102,111,114,109,40,41,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32, - 101,108,115,101,32,105,102,32,40,116,121,112,101,32,61,61,32,49,49,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,103,46,115,101,116,79,112,97,99,105,116,121,32,40,40,102,108,111,97,116,41,32,111,112,97,99,105,116,121,83,108,105,100,101,114, - 45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,108,111,97,116,32,120,44,32,121, - 44,32,119,44,32,104,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119,97,98,108,101,45,62,103,101,116,66,111,117, - 110,100,115,32,40,120,44,32,121,44,32,119,44,32,104,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119, - 97,98,108,101,45,62,100,114,97,119,32,40,103,44,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116, - 105,111,110,32,40,45,120,32,45,32,48,46,53,102,32,42,32,119,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,45,121,32,45,32,48,46,53,102,32,42,32,104,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,102,111,108,108,111,119,101,100,66,121,32,40,103,101,116,84,114,97,110,115,102,111,114, - 109,40,41,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115, - 105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,120,32,61,32,49,48,48, - 59,13,10,32,32,32,32,32,32,32,32,105,110,116,32,121,32,61,32,52,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,67,104,111,111,115, - 101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32, - 121,32,43,61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,115,99,97,108,101,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115, - 32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,50,56,59,13,10,32,32,32, - 32,32,32,32,32,97,110,103,108,101,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32, - 50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,120,83,108,105,100,101,114,45, - 62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43, - 61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,121,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44, - 32,51,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,50,56,59,13,10,32,32,32,32,32,32,32,32,111,112, - 97,99,105,116,121,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,51,48,48,44,32,50,52,41,59,13, - 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,108,105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,32,40,83, - 108,105,100,101,114,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32, - 125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,111,109,98,111,66,111,120,67,104,97,110,103,101,100,32,40,67,111,109,98,111,66,111,120,42, - 41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,112, - 114,105,118,97,116,101,58,13,10,32,32,32,32,80,97,116,104,32,115,104,97,112,101,59,13,10,32,32,32,32,73,109,97,103,101,42,32,105,109,97, - 103,101,59,13,10,32,32,32,32,68,114,97,119,97,98,108,101,42,32,100,114,97,119,97,98,108,101,59,13,10,32,32,32,32,68,114,97,119,97,98, - 108,101,67,111,109,112,111,115,105,116,101,42,32,115,118,103,68,114,97,119,97,98,108,101,59,13,10,13,10,32,32,32,32,67,111,109,98,111,66,111, - 120,42,32,116,121,112,101,67,104,111,111,115,101,114,59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,115,99,97,108,101,83,108,105,100,101,114, - 59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,97,110,103,108,101,83,108,105,100,101,114,59,13,10,32,32,32,32,83,108,105,100,101,114,42, - 32,120,83,108,105,100,101,114,59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,121,83,108,105,100,101,114,59,13,10,32,32,32,32,83,108,105, - 100,101,114,42,32,111,112,97,99,105,116,121,83,108,105,100,101,114,59,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,110,101,114,97,116,101, - 82,97,110,100,111,109,83,104,97,112,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,104,97,112,101,46,115,116,97,114, - 116,78,101,119,83,117,98,80,97,116,104,32,40,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98,101, - 114,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,48,59,32,105,32,60,32,55,59,32, - 43,43,105,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,104,97,112,101,46,108,105,110,101,84, - 111,32,40,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,115,104,97,112,101,46,113,117,97,100,114,97,116,105,99,84,111,32,40,114,97,110,100,111,109,78,117,109,98, - 101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,97,110,100,111,109,78,117,109,98,101,114,40,41,44,32,114,97,110,100,111,109,78,117,109,98, - 101,114,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,115,104,97,112,101,46,99,108,111,115,101, - 83,117,98,80,97,116,104,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,110,101,114,97,116,101,73,109, - 97,103,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,32,61,32,73,109,97,103,101,70,105,108,101,70, - 111,114,109,97,116,58,58,108,111,97,100,70,114,111,109,32,40,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,44,32,66, - 105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, - 118,111,105,100,32,103,101,110,101,114,97,116,101,68,114,97,119,97,98,108,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, - 47,47,32,99,114,101,97,116,101,32,97,32,99,111,109,112,111,115,105,116,101,32,100,114,97,119,97,98,108,101,32,111,98,106,101,99,116,46,46,13, - 10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,67,111,109,112,111,115,105,116,101,42,32,100,99,32,61,32,110,101,119,32,68,114,97, - 119,97,98,108,101,67,111,109,112,111,115,105,116,101,40,41,59,13,10,32,32,32,32,32,32,32,32,100,114,97,119,97,98,108,101,32,61,32,100,99, - 59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,46,46,97,100,100,32,97,32,112,97,116,104,115,32,100,114,97,119,97,98,108,101,32,116, - 111,32,105,116,46,46,46,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,80,97,116,104,32,100,112,59,13,10,32,32,32,32,32, - 32,32,32,100,112,46,115,101,116,80,97,116,104,32,40,115,104,97,112,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,112,46,115,101,116, - 79,117,116,108,105,110,101,32,40,52,46,48,102,44,32,67,111,108,111,117,114,115,58,58,98,108,117,101,41,59,13,10,13,10,32,32,32,32,32,32, - 32,32,71,114,97,100,105,101,110,116,66,114,117,115,104,32,103,98,32,40,67,111,108,111,117,114,71,114,97,100,105,101,110,116,32,40,67,111,108,111, - 117,114,115,58,58,114,101,100,46,119,105,116,104,65,108,112,104,97,32,40,48,46,52,102,41,44,32,45,49,48,48,46,48,102,44,32,45,49,48,48, - 46,48,102,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,103,114,101,101,110,46,119,105,116,104,65,108,112,104,97,32,40,48,46,54,102,41,44, - 32,49,48,48,46,48,102,44,32,49,48,48,46,48,102,44,32,102,97,108,115,101,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,112,46, - 115,101,116,70,105,108,108,66,114,117,115,104,32,40,103,98,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,99,45,62,105,110,115,101,114,116, - 68,114,97,119,97,98,108,101,32,40,100,112,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,46,46,97,100,100,32,97,110,32,105,109, - 97,103,101,32,100,114,97,119,97,98,108,101,46,46,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,73,109,97,103,101,32,100,105, - 59,13,10,32,32,32,32,32,32,32,32,100,105,46,115,101,116,73,109,97,103,101,32,40,105,109,97,103,101,44,32,102,97,108,115,101,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,100,99,45,62,105,110,115,101,114,116,68,114,97,119,97,98,108,101,32,40,100,105,44,32,65,102,102,105,110,101, - 84,114,97,110,115,102,111,114,109,58,58,115,99,97,108,101,32,40,48,46,51,102,44,32,48,46,56,102,41,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,47,47,32,46,46,97,110,100,32,97,32,116,101,120,116,32,111,98,106,101,99,116,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97, - 98,108,101,84,101,120,116,32,100,116,59,13,10,32,32,32,32,32,32,32,32,100,116,46,115,101,116,84,101,120,116,32,40,84,40,34,74,85,67,69, - 32,68,114,97,119,97,98,108,101,115,34,41,44,32,70,111,110,116,32,40,51,48,46,48,102,44,32,70,111,110,116,58,58,98,111,108,100,41,41,59, - 13,10,32,32,32,32,32,32,32,32,100,116,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,103,114,101,101,110,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,100,99,45,62,105,110,115,101,114,116,68,114,97,119,97,98,108,101,32,40,100,116,44,32,65,102,102,105, - 110,101,84,114,97,110,115,102,111,114,109,58,58,116,114,97,110,115,108,97,116,105,111,110,32,40,45,56,48,46,48,102,44,32,45,50,48,46,48,102, - 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46, - 115,99,97,108,101,100,32,40,50,46,48,102,44,32,48,46,56,102,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,114,111,116,97,116,101,100,32,40,45,49,46,51,102,41,41,59,13,10,32,32,32, - 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103,101,110,101,114,97,116,101,83,86,71,68,114,97,119,97,98,108,101,40,41,13,10,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119,97,98,108,101,32,61,32,48,59,13,10,13,10,32,32,32,32,32,32,32, - 32,77,101,109,111,114,121,73,110,112,117,116,83,116,114,101,97,109,32,105,99,111,110,115,70,105,108,101,83,116,114,101,97,109,32,40,66,105,110,97, - 114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112,44,32,66,105,110,97,114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112, - 83,105,122,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,90,105,112,70,105,108,101,32,105,99,111,110,115,32,40,38,105, - 99,111,110,115,70,105,108,101,83,116,114,101,97,109,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,76,111, - 97,100,32,97,32,114,97,110,100,111,109,32,83,86,71,32,102,105,108,101,32,102,114,111,109,32,111,117,114,32,101,109,98,101,100,100,101,100,32,105, - 99,111,110,115,46,122,105,112,32,102,105,108,101,46,13,10,32,32,32,32,32,32,32,32,73,110,112,117,116,83,116,114,101,97,109,42,32,115,118,103, - 70,105,108,101,83,116,114,101,97,109,13,10,32,32,32,32,32,32,32,32,32,32,32,32,61,32,105,99,111,110,115,46,99,114,101,97,116,101,83,116, - 114,101,97,109,70,111,114,69,110,116,114,121,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46, - 110,101,120,116,73,110,116,32,40,105,99,111,110,115,46,103,101,116,78,117,109,69,110,116,114,105,101,115,40,41,41,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,105,102,32,40,115,118,103,70,105,108,101,83,116,114,101,97,109,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,42,32,108,111,97,100,101,100,83,86,71,32,61,32,68,114,97,119,97, - 98,108,101,58,58,99,114,101,97,116,101,70,114,111,109,73,109,97,103,101,68,97,116,97,83,116,114,101,97,109,32,40,42,115,118,103,70,105,108,101, - 83,116,114,101,97,109,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,108,111,97,100,101,100,83,86,71,32,33,61, - 32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116, - 111,32,109,97,107,101,32,111,117,114,32,105,99,111,110,32,116,104,101,32,114,105,103,104,116,32,115,105,122,101,44,32,119,101,39,108,108,32,112,117, - 116,32,105,116,32,105,110,115,105,100,101,32,97,32,68,114,97,119,97,98,108,101,67,111,109,112,111,115,105,116,101,44,32,97,110,100,32,97,112,112, - 108,121,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,116,114,97,110,115,102,111,114,109,32,116,111,32,103,101, - 116,32,105,116,32,116,111,32,116,104,101,32,115,105,122,101,32,119,101,32,119,97,110,116,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,119,44,32,104,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 108,111,97,100,101,100,83,86,71,45,62,103,101,116,66,111,117,110,100,115,32,40,120,44,32,121,44,32,119,44,32,104,41,59,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,115,99,97,108,101,70,97,99,116,111,114,32,61,32,51,48, - 48,46,48,102,32,47,32,106,109,97,120,32,40,119,44,32,104,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115, - 118,103,68,114,97,119,97,98,108,101,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,67,111,109,112,111,115,105,116,101,40,41,59,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,115,118,103,68,114,97,119,97,98,108,101,45,62,105,110,115,101,114,116,68,114,97,119,97,98, - 108,101,32,40,108,111,97,100,101,100,83,86,71,44,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,115,99,97,108,101,32,40,115, - 99,97,108,101,70,97,99,116,111,114,44,32,115,99,97,108,101,70,97,99,116,111,114,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,118,103,70,105,108,101,83,116,114,101,97,109,59,13,10, - 32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,99,111,110,115,116,32,65,102,102,105,110,101,84,114,97,110, - 115,102,111,114,109,32,103,101,116,84,114,97,110,115,102,111,114,109,40,41,32,99,111,110,115,116,13,10,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,114,101,116,117,114,110,32,65,102,102,105,110,101,84,114,97,110,115,102,111,114,109,58,58,114,111,116,97,116,105,111,110,32,40,102,108,111, - 97,116,95,80,105,32,42,32,50,46,48,102,32,42,32,40,102,108,111,97,116,41,32,97,110,103,108,101,83,108,105,100,101,114,45,62,103,101,116,86, - 97,108,117,101,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,115,99,97,108,101,100,32,40,40,102,108,111,97,116, - 41,32,115,99,97,108,101,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,40,102,108,111,97,116,41,32,115,99,97,108,101,83,108,105,100,101,114,45,62,103,101,116,86,97,108, - 117,101,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,116,114,97,110,115,108,97,116,101,100,32,40,103,101,116,87, - 105,100,116,104,40,41,32,42,32,48,46,53,102,32,43,32,40,102,108,111,97,116,41,32,120,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117, - 101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,101,116,72,101, - 105,103,104,116,40,41,32,42,32,48,46,53,102,32,43,32,40,102,108,111,97,116,41,32,121,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117, - 101,40,41,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,80,97,116, - 104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119, - 32,80,97,116,104,115,65,110,100,84,114,97,110,115,102,111,114,109,115,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::pathsandtransformsdemo_cpp = (const char*) temp10; - -static const unsigned char temp11[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, - 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, - 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, - 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, - 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, - 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, - 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, - 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, - 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, - 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, - 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, - 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, - 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, - 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, - 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, - 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, - 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, - 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, - 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, - 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, - 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, - 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, - 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, - 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, - 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, - 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, - 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,35, - 105,102,32,74,85,67,69,95,81,85,73,67,75,84,73,77,69,32,38,38,32,33,32,74,85,67,69,95,76,73,78,85,88,13,10,13,10,47,47,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47, - 47,32,115,111,32,116,104,97,116,32,119,101,32,99,97,110,32,101,97,115,105,108,121,32,104,97,118,101,32,116,119,111,32,81,84,32,119,105,110,100, - 111,119,115,32,101,97,99,104,32,119,105,116,104,32,97,32,102,105,108,101,32,98,114,111,119,115,101,114,44,32,119,114,97,112,32,116,104,105,115,32, - 117,112,32,97,115,32,97,32,99,108,97,115,115,46,46,13,10,99,108,97,115,115,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105, - 116,104,70,105,108,101,66,114,111,119,115,101,114,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108, - 105,99,32,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58, - 13,10,32,32,32,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,40,41,13,10, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,113,116,67,111,109,112, - 32,61,32,110,101,119,32,81,117,105,99,107,84,105,109,101,77,111,118,105,101,67,111,109,112,111,110,101,110,116,40,41,41,59,13,10,13,10,32,32, - 32,32,32,32,32,32,47,47,32,97,110,100,32,97,32,102,105,108,101,45,99,104,111,111,115,101,114,46,46,13,10,32,32,32,32,32,32,32,32,97, - 100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,102,105,108,101,67,104,111,111,115,101,114,32,61,32,110,101,119,32,70,105,108,101, - 110,97,109,101,67,111,109,112,111,110,101,110,116,32,40,84,40,34,109,111,118,105,101,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,110,111,110,101,120,105,115,116,101,110,116,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,32,102,97,108,115,101,44,32,102,97,108,115,101,44,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,42,46,42,34,41,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,83,116,114,105,110,103,58,58,101,109,112,116,121,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,40,99,104,111,111,115,101,32,97,32,118,105,100,101,111,32,102,105,108,101,32, - 116,111,32,112,108,97,121,41,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,97,100,100,76, - 105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45,62,115,101, - 116,66,114,111,119,115,101,66,117,116,116,111,110,84,101,120,116,32,40,84,40,34,98,114,111,119,115,101,34,41,41,59,13,10,32,32,32,32,125,13, - 10,13,10,32,32,32,32,126,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,40,41, - 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32, - 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,113,116,67,111,109,112,45,62,115,101,116,66,111,117,110,100,115,32,40,48,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,44,32, - 103,101,116,72,101,105,103,104,116,40,41,32,45,32,51,48,41,59,13,10,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,45, - 62,115,101,116,66,111,117,110,100,115,32,40,48,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,50,52,44,32,103,101,116,87,105,100,116, - 104,40,41,44,32,50,52,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,102,105,108,101,110,97,109,101,67,111,109, - 112,111,110,101,110,116,67,104,97,110,103,101,100,32,40,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,42,41,13,10,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,99,97,108,108,101,100,32,119,104,101,110,32,116,104,101,32,117,115, - 101,114,32,99,104,97,110,103,101,115,32,116,104,101,32,102,105,108,101,110,97,109,101,32,105,110,32,116,104,101,32,102,105,108,101,32,99,104,111,111, - 115,101,114,32,98,111,120,13,10,32,32,32,32,32,32,32,32,105,102,32,40,113,116,67,111,109,112,45,62,108,111,97,100,77,111,118,105,101,32,40, - 102,105,108,101,67,104,111,111,115,101,114,45,62,103,101,116,67,117,114,114,101,110,116,70,105,108,101,40,41,44,32,116,114,117,101,41,41,13,10,32, - 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,108,111,97,100,101,100,32,116,104,101,32,102,105,108,101, - 32,111,107,44,32,115,111,32,108,101,116,39,115,32,115,116,97,114,116,32,105,116,32,112,108,97,121,105,110,103,46,46,13,10,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,113,116,67,111,109,112,45,62,112,108,97,121,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32, - 32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105, - 110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105, - 110,103,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,84,40,34,67,111,117,108,100,110,39,116,32,108,111,97,100,32,116,104,101,32,102,105,108,101,33,34,41,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,84,40,34,83,111,114,114,121,44,32,81,117,105,99,107,84,105,109,101,32,100,105,100,110,39,116,32,109,97,110,97,103,101,32,116,111,32,108, - 111,97,100,32,116,104,97,116,32,102,105,108,101,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10, - 112,114,105,118,97,116,101,58,13,10,32,32,32,32,81,117,105,99,107,84,105,109,101,77,111,118,105,101,67,111,109,112,111,110,101,110,116,42,32,113, - 116,67,111,109,112,59,13,10,32,32,32,32,70,105,108,101,110,97,109,101,67,111,109,112,111,110,101,110,116,42,32,102,105,108,101,67,104,111,111,115, - 101,114,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,81,117,105,99,107,84,105,109,101,68,101,109,111,32,32,58,32,112,117, - 98,108,105,99,32,67,111,109,112,111,110,101,110,116,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,81,117, - 105,99,107,84,105,109,101,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84, - 40,34,81,117,105,99,107,84,105,109,101,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,97,32,109,111,118,105, - 101,32,99,111,109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,113,116,67,111,109,112,49,32,61,32,110,101,119,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66, - 114,111,119,115,101,114,40,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,113, - 116,67,111,109,112,50,32,61,32,110,101,119,32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119, - 115,101,114,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,81,117,105,99,107,84,105,109,101,68,101,109,111,40,41,13,10, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32, - 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,113,116,67,111,109,112,49,45,62,115,101,116,66,111,117,110,100,115,82,101,108,97,116,105,118,101,32,40,48,46,48,53,102,44,32,48,46,48,53, - 102,44,32,48,46,52,50,53,102,44,32,48,46,57,102,41,59,13,10,32,32,32,32,32,32,32,32,113,116,67,111,109,112,50,45,62,115,101,116,66, - 111,117,110,100,115,82,101,108,97,116,105,118,101,32,40,48,46,53,50,53,102,44,32,48,46,48,53,102,44,32,48,46,52,50,53,102,44,32,48,46, - 57,102,41,59,13,10,32,32,32,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,81,117,105,99,107, - 84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,42,32,113,116,67,111,109,112,49,59,13,10,32,32,32, - 32,81,117,105,99,107,84,105,109,101,87,105,110,100,111,119,87,105,116,104,70,105,108,101,66,114,111,119,115,101,114,42,32,113,116,67,111,109,112,50, - 59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,81,117,105,99,107,84,105,109,101,68, - 101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,81,117,105,99,107,84,105,109,101,68,101,109,111,40,41, - 59,13,10,125,13,10,13,10,35,101,110,100,105,102,13,10,0,0}; -const char* BinaryData::quicktimedemo_cpp = (const char*) temp11; - -static const unsigned char temp12[] = {13,10,70,89,73,46,46,13,10,13,10,84,111,32,101,109,98,101,100,32,116,104,101,32,102,105,108,101,115,32,97,110,100,32,116,104,105,110,103,115, - 32,116,104,97,116,32,116,104,101,32,100,101,109,111,32,110,101,101,100,115,32,105,110,116,111,32,105,116,115,32,101,120,101,99,117,116,97,98,108,101, - 44,32,13,10,73,39,118,101,32,117,115,101,100,32,109,121,32,66,105,110,97,114,121,66,117,105,108,100,101,114,32,117,116,105,108,105,116,121,32,45, - 32,116,104,101,32,102,105,108,101,115,32,105,110,32,116,104,105,115,32,100,105,114,101,99,116,111,114,121,32,97,114,101,32,116,104,101,13,10,111,110, - 101,115,32,116,104,97,116,32,103,101,116,32,101,110,99,111,100,101,100,32,105,110,116,111,32,66,105,110,97,114,121,68,97,116,97,46,99,112,112,32, - 97,110,100,32,66,105,110,97,114,121,68,97,116,97,46,104,44,32,119,104,105,99,104,32,103,101,116,32,98,117,105,108,116,32,13,10,105,110,116,111, - 32,116,104,101,32,97,112,112,108,105,99,97,116,105,111,110,46,13,10,0,0}; -const char* BinaryData::readme__what_this_directory_is_for_txt = (const char*) temp12; - -static const unsigned char temp13[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, - 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, - 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, - 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, - 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, - 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, - 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, - 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, - 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, - 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, - 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, - 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, - 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, - 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, - 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, - 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, - 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, - 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, - 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, - 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, - 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, - 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, - 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, - 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, - 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, - 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, - 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, - 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,47,42,42,13,10,32,32,32,32,84,104,105,115,32,99,108,97,115,115,32,115,104,111,119,115,32,104,111,119,32,116,111,32,105,109,112,108, - 101,109,101,110,116,32,97,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100,101,108,32,116,111,32,115,104,111,119,32,105,110,32,97,32,84, - 97,98,108,101,76,105,115,116,66,111,120,46,13,10,42,47,13,10,99,108,97,115,115,32,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101, - 110,116,32,32,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100,101, - 108,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110, - 101,110,116,40,41,13,10,32,32,32,32,32,32,32,32,58,32,102,111,110,116,32,40,49,52,46,48,102,41,44,13,10,32,32,32,32,32,32,32,32, - 32,32,100,101,109,111,68,97,116,97,32,40,48,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,76,111,97,100,32,115, - 111,109,101,32,100,97,116,97,32,102,114,111,109,32,97,110,32,101,109,98,101,100,100,101,100,32,88,77,76,32,102,105,108,101,46,46,13,10,32,32, - 32,32,32,32,32,32,108,111,97,100,68,97,116,97,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,67,114,101,97,116,101,32,111, - 117,114,32,116,97,98,108,101,32,99,111,109,112,111,110,101,110,116,32,97,110,100,32,97,100,100,32,105,116,32,116,111,32,116,104,105,115,32,99,111, - 109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,97, - 98,108,101,32,61,32,110,101,119,32,84,97,98,108,101,76,105,115,116,66,111,120,32,40,84,40,34,100,101,109,111,32,116,97,98,108,101,34,41,44, - 32,116,104,105,115,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,103,105,118,101,32,105,116,32,97,32,98,111,114,100,101,114,13, - 10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,115,101,116,67,111,108,111,117,114,32,40,76,105,115,116,66,111,120,58,58,111,117,116,108, - 105,110,101,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,103,114,101,121,41,59,13,10,32,32,32,32,32,32,32,32,116,97, - 98,108,101,45,62,115,101,116,79,117,116,108,105,110,101,84,104,105,99,107,110,101,115,115,32,40,49,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,47,47,32,65,100,100,32,115,111,109,101,32,99,111,108,117,109,110,115,32,116,111,32,116,104,101,32,116,97,98,108,101,32,104,101,97,100,101,114, - 44,32,98,97,115,101,100,32,111,110,32,116,104,101,32,99,111,108,117,109,110,32,108,105,115,116,32,105,110,32,111,117,114,32,100,97,116,97,98,97, - 115,101,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,69,97,99,104,88,109,108,67,104,105,108,100,69,108,101,109,101,110,116,32,40,42,99, - 111,108,117,109,110,76,105,115,116,44,32,99,111,108,117,109,110,88,109,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,116,97,98,108,101,45,62,103,101,116,72,101,97,100,101,114,40,41,45,62,97,100,100,67,111,108,117,109,110,32,40,99,111,108, - 117,109,110,88,109,108,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,84,40,34,110,97,109,101,34,41,44,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,99,111,108,117,109,110,88,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,84,40,34,99,111,108,117,109,110,73,100, - 34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,99,111,108,117,109,110,88,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,84,40,34,119,105, - 100,116,104,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,53,48,44,32,52,48,48,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,97,98,108,101,72,101,97,100,101,114,67,111,109,112,111, - 110,101,110,116,58,58,100,101,102,97,117,108,116,70,108,97,103,115,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32, - 32,32,32,47,47,32,119,101,32,99,111,117,108,100,32,110,111,119,32,99,104,97,110,103,101,32,115,111,109,101,32,105,110,105,116,105,97,108,32,115, - 101,116,116,105,110,103,115,46,46,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,103,101,116,72,101,97,100,101,114,40,41,45,62,115, - 101,116,83,111,114,116,67,111,108,117,109,110,73,100,32,40,49,44,32,116,114,117,101,41,59,32,47,47,32,115,111,114,116,32,102,111,114,119,97,114, - 100,115,32,98,121,32,116,104,101,32,73,68,32,99,111,108,117,109,110,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,103,101,116,72, - 101,97,100,101,114,40,41,45,62,115,101,116,67,111,108,117,109,110,86,105,115,105,98,108,101,32,40,55,44,32,102,97,108,115,101,41,59,32,47,47, - 32,104,105,100,101,32,116,104,101,32,34,108,101,110,103,116,104,34,32,99,111,108,117,109,110,32,117,110,116,105,108,32,116,104,101,32,117,115,101,114, - 32,115,104,111,119,115,32,105,116,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,117,110,45,99,111,109,109,101,110,116,32,116,104,105,115,32, - 108,105,110,101,32,116,111,32,104,97,118,101,32,97,32,103,111,32,111,102,32,115,116,114,101,116,99,104,45,116,111,45,102,105,116,32,109,111,100,101, - 13,10,32,32,32,32,32,32,32,32,47,47,32,116,97,98,108,101,45,62,103,101,116,72,101,97,100,101,114,40,41,45,62,115,101,116,83,116,114,101, - 116,99,104,84,111,70,105,116,65,99,116,105,118,101,32,40,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45, - 62,115,101,116,77,117,108,116,105,112,108,101,83,101,108,101,99,116,105,111,110,69,110,97,98,108,101,100,32,40,116,114,117,101,41,59,13,10,32,32, - 32,32,125,13,10,13,10,32,32,32,32,126,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13, - 10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,100,101,108,101,116,101,32,100,101,109,111,68,97,116,97,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47, - 32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100, - 101,108,44,32,97,110,100,32,109,117,115,116,32,114,101,116,117,114,110,32,116,104,101,32,116,111,116,97,108,32,110,117,109,98,101,114,32,111,102,32, - 114,111,119,115,32,105,110,32,111,117,114,32,116,97,98,108,101,13,10,32,32,32,32,105,110,116,32,103,101,116,78,117,109,82,111,119,115,40,41,13, - 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,117,109,82,111,119,115,59,13,10,32,32,32,32,125,13,10, - 13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76,105, - 115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,115,104,111,117,108,100,32,102,105,108,108,32,105,110,32,116,104,101,32,98,97,99,107,103, - 114,111,117,110,100,32,111,102,32,116,104,101,32,119,104,111,108,101,32,114,111,119,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,82,111, - 119,66,97,99,107,103,114,111,117,110,100,32,40,71,114,97,112,104,105,99,115,38,32,103,44,32,105,110,116,32,114,111,119,78,117,109,98,101,114,44, - 32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104,116,44,32,98,111,111,108,32,114,111,119,73,115,83,101,108,101,99,116, - 101,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,111,119,73,115,83,101,108,101,99,116,101,100,41,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116,98,108,117, - 101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32, - 102,114,111,109,32,84,97,98,108,101,76,105,115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,109,117,115,116,32,112,97,105,110,116,32,97, - 110,121,32,99,101,108,108,115,32,116,104,97,116,32,97,114,101,110,39,116,32,117,115,105,110,103,32,99,117,115,116,111,109,13,10,32,32,32,32,47, - 47,32,99,111,109,112,111,110,101,110,116,115,46,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,67,101,108,108,32,40,71,114,97,112,104, - 105,99,115,38,32,103,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,114,111,119,78,117,109,98, - 101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,99,111,108,117,109,110,73,100,44,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104, - 116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,111,108,32,114,111,119,73,115,83,101,108,101,99,116, - 101,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115, - 58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,102,111,110,116,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,99,111,110,115,116,32,88,109,108,69,108,101,109,101,110,116,42,32,114,111,119,69,108,101,109,101,110,116,32,61,32,100, - 97,116,97,76,105,115,116,45,62,103,101,116,67,104,105,108,100,69,108,101,109,101,110,116,32,40,114,111,119,78,117,109,98,101,114,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,105,102,32,40,114,111,119,69,108,101,109,101,110,116,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,101,120,116,32,40,114,111,119,69,108,101,109, - 101,110,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,103,101,116,65,116,116,114,105,98,117,116,101,78,97,109, - 101,70,111,114,67,111,108,117,109,110,73,100,32,40,99,111,108,117,109,110,73,100,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,103,46,100,114,97,119,84,101,120,116,32,40,116,101,120,116,44,32,50,44,32,48,44,32,119,105,100,116,104,32,45,32,52,44,32,104,101,105, - 103,104,116,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,76,101,102,116,44,32,116,114,117,101,41,59,13, - 10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117, - 114,115,58,58,98,108,97,99,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,50,102,41,41,59,13,10,32,32,32,32,32,32,32,32,103,46, - 102,105,108,108,82,101,99,116,32,40,119,105,100,116,104,32,45,32,49,44,32,48,44,32,49,44,32,104,101,105,103,104,116,41,59,13,10,32,32,32, - 32,125,13,10,13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98, - 108,101,76,105,115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,116,101,108,108,115,32,117,115,32,116,104,97,116,32,116,104,101,32,117,115, - 101,114,32,104,97,115,32,99,108,105,99,107,101,100,32,97,32,116,97,98,108,101,32,104,101,97,100,101,114,13,10,32,32,32,32,47,47,32,116,111, - 32,99,104,97,110,103,101,32,116,104,101,32,115,111,114,116,32,111,114,100,101,114,46,13,10,32,32,32,32,118,111,105,100,32,115,111,114,116,79,114, - 100,101,114,67,104,97,110,103,101,100,32,40,105,110,116,32,110,101,119,83,111,114,116,67,111,108,117,109,110,73,100,44,32,99,111,110,115,116,32,98, - 111,111,108,32,105,115,70,111,114,119,97,114,100,115,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,110,101,119,83, - 111,114,116,67,111,108,117,109,110,73,100,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,68,101,109,111,68,97,116,97,83,111,114,116,101,114,32,115,111,114,116,101,114,32,40,103,101,116,65,116,116,114,105,98,117,116,101,78,97,109, - 101,70,111,114,67,111,108,117,109,110,73,100,32,40,110,101,119,83,111,114,116,67,111,108,117,109,110,73,100,41,44,32,105,115,70,111,114,119,97,114, - 100,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,97,116,97,76,105,115,116,45,62,115,111,114,116,67,104,105,108,100,69,108,101, - 109,101,110,116,115,32,40,115,111,114,116,101,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,117,112, - 100,97,116,101,67,111,110,116,101,110,116,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, - 47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76,105,115,116,66,111,120,77, - 111,100,101,108,44,32,97,110,100,32,109,117,115,116,32,117,112,100,97,116,101,32,97,110,121,32,99,117,115,116,111,109,32,99,111,109,112,111,110,101, - 110,116,115,32,116,104,97,116,32,119,101,39,114,101,32,117,115,105,110,103,13,10,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,114,101,102, - 114,101,115,104,67,111,109,112,111,110,101,110,116,70,111,114,67,101,108,108,32,40,105,110,116,32,114,111,119,78,117,109,98,101,114,44,32,105,110,116, - 32,99,111,108,117,109,110,73,100,44,32,98,111,111,108,32,105,115,82,111,119,83,101,108,101,99,116,101,100,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,109,112,111,110,101,110, - 116,42,32,101,120,105,115,116,105,110,103,67,111,109,112,111,110,101,110,116,84,111,85,112,100,97,116,101,41,13,10,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,105,102,32,40,99,111,108,117,109,110,73,100,32,61,61,32,53,41,32,47,47,32,73,102,32,105,116,39,115,32,116,104,101,32, - 114,97,116,105,110,103,115,32,99,111,108,117,109,110,44,32,119,101,39,108,108,32,114,101,116,117,114,110,32,111,117,114,32,99,117,115,116,111,109,32, - 99,111,109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,82,97,116,105, - 110,103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,42,32,114,97,116,105,110,103,115,66,111,120,32,61,32,40,82, - 97,116,105,110,103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,42,41,32,101,120,105,115,116,105,110,103,67,111,109, - 112,111,110,101,110,116,84,111,85,112,100,97,116,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,73,102,32,97,110,32, - 101,120,105,115,116,105,110,103,32,99,111,109,112,111,110,101,110,116,32,105,115,32,98,101,105,110,103,32,112,97,115,115,101,100,45,105,110,32,102,111, - 114,32,117,112,100,97,116,105,110,103,44,32,119,101,39,108,108,32,114,101,45,117,115,101,32,105,116,44,32,98,117,116,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,47,47,32,105,102,32,110,111,116,44,32,119,101,39,108,108,32,104,97,118,101,32,116,111,32,99,114,101,97,116,101,32,111,110, - 101,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,97,116,105,110,103,115,66,111,120,32,61,61,32,48,41,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,97,116,105,110,103,115,66,111,120,32,61,32,110,101,119,32,82,97,116,105,110,103,67,111,108, - 117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,32,40,42,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,114,97,116,105,110,103,115,66,111,120,45,62,115,101,116,82,111,119,65,110,100,67,111,108,117,109,110,32,40,114,111,119,78,117,109,98,101, - 114,44,32,99,111,108,117,109,110,73,100,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,114,97,116,105, - 110,103,115,66,111,120,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,102,111,114,32,97,110,121,32,111,116,104,101,114,32,99,111,108,117,109,110, - 44,32,106,117,115,116,32,114,101,116,117,114,110,32,48,44,32,97,115,32,119,101,39,108,108,32,98,101,32,112,97,105,110,116,105,110,103,32,116,104, - 101,115,101,32,99,111,108,117,109,110,115,32,100,105,114,101,99,116,108,121,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,97,115, - 115,101,114,116,32,40,101,120,105,115,116,105,110,103,67,111,109,112,111,110,101,110,116,84,111,85,112,100,97,116,101,32,61,61,32,48,41,59,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13, - 10,13,10,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,111,118,101,114,108,111,97,100,101,100,32,102,114,111,109,32,84,97,98,108,101,76, - 105,115,116,66,111,120,77,111,100,101,108,44,32,97,110,100,32,115,104,111,117,108,100,32,99,104,111,111,115,101,32,116,104,101,32,98,101,115,116,32, - 119,105,100,116,104,32,102,111,114,32,116,104,101,32,115,112,101,99,105,102,105,101,100,13,10,32,32,32,32,47,47,32,99,111,108,117,109,110,46,13, - 10,32,32,32,32,105,110,116,32,103,101,116,67,111,108,117,109,110,65,117,116,111,83,105,122,101,87,105,100,116,104,32,40,105,110,116,32,99,111,108, - 117,109,110,73,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,99,111,108,117,109,110,73,100,32,61,61,32,53, - 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,49,48,48,59,32,47,47,32,40,116,104,105,115,32,105,115,32,116, - 104,101,32,114,97,116,105,110,103,115,32,99,111,108,117,109,110,44,32,99,111,110,116,97,105,110,105,110,103,32,97,32,99,117,115,116,111,109,32,99, - 111,109,112,111,110,101,110,116,41,13,10,13,10,32,32,32,32,32,32,32,32,105,110,116,32,119,105,100,101,115,116,32,61,32,51,50,59,13,10,13, - 10,32,32,32,32,32,32,32,32,47,47,32,102,105,110,100,32,116,104,101,32,119,105,100,101,115,116,32,98,105,116,32,111,102,32,116,101,120,116,32, - 105,110,32,116,104,105,115,32,99,111,108,117,109,110,46,46,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,103, - 101,116,78,117,109,82,111,119,115,40,41,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,99,111,110,115,116,32,88,109,108,69,108,101,109,101,110,116,42,32,114,111,119,69,108,101,109,101,110,116,32,61,32,100, - 97,116,97,76,105,115,116,45,62,103,101,116,67,104,105,108,100,69,108,101,109,101,110,116,32,40,105,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,105,102,32,40,114,111,119,69,108,101,109,101,110,116,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,101,120,116,32,40,114,111,119, - 69,108,101,109,101,110,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,103,101,116,65,116,116,114,105,98,117,116, - 101,78,97,109,101,70,111,114,67,111,108,117,109,110,73,100,32,40,99,111,108,117,109,110,73,100,41,41,41,59,13,10,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,119,105,100,101,115,116,32,61,32,106,109,97,120,32,40,119,105,100,101,115,116,44,32,102,111,110,116,46,103,101, - 116,83,116,114,105,110,103,87,105,100,116,104,32,40,116,101,120,116,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32, - 32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,119,105,100,101,115,116,32,43,32,56,59,13,10,32, - 32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,65,32,99,111,117,112,108,101,32,111,102,32,113,117,105,99,107,32,109,101,116,104,111,100,115, - 32,116,111,32,115,101,116,32,97,110,100,32,103,101,116,32,116,104,101,32,34,114,97,116,105,110,103,34,32,118,97,108,117,101,32,119,104,101,110,32, - 116,104,101,32,117,115,101,114,13,10,32,32,32,32,47,47,32,99,104,97,110,103,101,115,32,116,104,101,32,99,111,109,98,111,32,98,111,120,13,10, - 32,32,32,32,105,110,116,32,103,101,116,82,97,116,105,110,103,32,40,99,111,110,115,116,32,105,110,116,32,114,111,119,78,117,109,98,101,114,44,32, - 99,111,110,115,116,32,105,110,116,32,99,111,108,117,109,110,73,100,41,32,99,111,110,115,116,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, - 32,32,114,101,116,117,114,110,32,100,97,116,97,76,105,115,116,45,62,103,101,116,67,104,105,108,100,69,108,101,109,101,110,116,32,40,114,111,119,78, - 117,109,98,101,114,41,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,40,84,40,34,82,97,116,105,110,103,34,41,41,59,13,10, - 32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,101,116,82,97,116,105,110,103,32,40,99,111,110,115,116,32,105,110,116,32,114, - 111,119,78,117,109,98,101,114,44,32,99,111,110,115,116,32,105,110,116,32,99,111,108,117,109,110,73,100,44,32,99,111,110,115,116,32,105,110,116,32, - 110,101,119,82,97,116,105,110,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,97,116,97,76,105,115,116,45,62,103,101,116, - 67,104,105,108,100,69,108,101,109,101,110,116,32,40,114,111,119,78,117,109,98,101,114,41,45,62,115,101,116,65,116,116,114,105,98,117,116,101,32,40, - 84,40,34,82,97,116,105,110,103,34,41,44,32,110,101,119,82,97,116,105,110,103,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47, - 47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13, - 10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,112, - 111,115,105,116,105,111,110,32,111,117,114,32,116,97,98,108,101,32,119,105,116,104,32,97,32,103,97,112,32,97,114,111,117,110,100,32,105,116,115,32, - 101,100,103,101,13,10,32,32,32,32,32,32,32,32,116,97,98,108,101,45,62,115,101,116,66,111,117,110,100,115,73,110,115,101,116,32,40,66,111,114, - 100,101,114,83,105,122,101,32,40,56,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,106,117,99,101,95,85, - 115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32, - 84,97,98,108,101,76,105,115,116,66,111,120,42,32,116,97,98,108,101,59,32,32,32,32,47,47,32,116,104,101,32,116,97,98,108,101,32,99,111,109, - 112,111,110,101,110,116,32,105,116,115,101,108,102,13,10,32,32,32,32,70,111,110,116,32,102,111,110,116,59,13,10,13,10,32,32,32,32,88,109,108, - 69,108,101,109,101,110,116,42,32,100,101,109,111,68,97,116,97,59,32,32,32,47,47,32,84,104,105,115,32,105,115,32,116,104,101,32,88,77,76,32, - 100,111,99,117,109,101,110,116,32,108,111,97,100,101,100,32,102,114,111,109,32,116,104,101,32,101,109,98,101,100,100,101,100,32,102,105,108,101,32,34, - 100,101,109,111,32,116,97,98,108,101,32,100,97,116,97,46,120,109,108,34,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,99,111, - 108,117,109,110,76,105,115,116,59,32,47,47,32,65,32,112,111,105,110,116,101,114,32,116,111,32,116,104,101,32,115,117,98,45,110,111,100,101,32,111, - 102,32,100,101,109,111,68,97,116,97,32,116,104,97,116,32,99,111,110,116,97,105,110,115,32,116,104,101,32,108,105,115,116,32,111,102,32,99,111,108, - 117,109,110,115,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,100,97,116,97,76,105,115,116,59,32,32,32,47,47,32,65,32,112, - 111,105,110,116,101,114,32,116,111,32,116,104,101,32,115,117,98,45,110,111,100,101,32,111,102,32,100,101,109,111,68,97,116,97,32,116,104,97,116,32, - 99,111,110,116,97,105,110,115,32,116,104,101,32,108,105,115,116,32,111,102,32,100,97,116,97,32,114,111,119,115,13,10,32,32,32,32,105,110,116,32, - 110,117,109,82,111,119,115,59,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,84,104,101,32,110,117,109,98,101,114,32,111,102,32,114,111,119, - 115,32,111,102,32,100,97,116,97,32,119,101,39,118,101,32,103,111,116,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,84,104,105,115, - 32,105,115,32,97,32,99,117,115,116,111,109,32,99,111,109,112,111,110,101,110,116,32,99,111,110,116,97,105,110,105,110,103,32,97,32,99,111,109,98, - 111,32,98,111,120,44,32,119,104,105,99,104,32,119,101,39,114,101,32,103,111,105,110,103,32,116,111,32,112,117,116,32,105,110,115,105,100,101,13,10, - 32,32,32,32,47,47,32,111,117,114,32,116,97,98,108,101,39,115,32,34,114,97,116,105,110,103,34,32,99,111,108,117,109,110,46,13,10,32,32,32, - 32,99,108,97,115,115,32,82,97,116,105,110,103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,32,32,32,32,58,32, - 112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,111,109,98,111,66,111,120,76,105,115, - 116,101,110,101,114,13,10,32,32,32,32,123,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,82,97,116,105,110, - 103,67,111,108,117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,32,40,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101, - 110,116,38,32,111,119,110,101,114,95,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,111,119,110,101,114,32,40,111,119,110,101,114,95, - 41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,106,117,115,116,32,112,117,116,32,97,32, - 99,111,109,98,111,32,98,111,120,32,105,110,115,105,100,101,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,109,98,111,66,111,120,32,61,32,110,101,119,32,67, - 111,109,98,111,66,111,120,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99, - 111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,102,97,98,34,41,44,32,49,41,59,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,103,114,111,111,118,121,34,41,44,32,50,41,59, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,104,101,112,34, - 41,44,32,51,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84, - 40,34,110,101,97,116,34,41,44,32,52,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100, - 73,116,101,109,32,40,84,40,34,119,105,108,100,34,41,44,32,53,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66, - 111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,115,119,105,110,103,105,110,34,41,44,32,54,41,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,109,97,100,32,102,111,114,32,105,116,34,41,44,32, - 55,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,119,104,101,110,32,116,104,101,32,99,111,109,98,111,32,105,115,32, - 99,104,97,110,103,101,100,44,32,119,101,39,108,108,32,103,101,116,32,97,32,99,97,108,108,98,97,99,107,46,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,87,97,110,116,115,75,101,121,98,111,97,114,100,70,111,99,117,115,32,40, - 102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,126,82,97,116,105,110,103,67,111,108, - 117,109,110,67,117,115,116,111,109,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10, - 32,32,32,32,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,66,111,117,110,100,115,73,110,115,101,116,32,40,66,111,114,100,101,114,83, - 105,122,101,32,40,50,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,79,117,114,32,100, - 101,109,111,32,99,111,100,101,32,119,105,108,108,32,99,97,108,108,32,116,104,105,115,32,119,104,101,110,32,119,101,32,109,97,121,32,110,101,101,100, - 32,116,111,32,117,112,100,97,116,101,32,111,117,114,32,99,111,110,116,101,110,116,115,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,115,101, - 116,82,111,119,65,110,100,67,111,108,117,109,110,32,40,99,111,110,115,116,32,105,110,116,32,110,101,119,82,111,119,44,32,99,111,110,115,116,32,105, - 110,116,32,110,101,119,67,111,108,117,109,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,111, - 119,32,61,32,110,101,119,82,111,119,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,108,117,109,110,73,100,32,61,32,110,101,119,67, - 111,108,117,109,110,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,83,101,108,101,99,116,101, - 100,73,100,32,40,111,119,110,101,114,46,103,101,116,82,97,116,105,110,103,32,40,114,111,119,44,32,99,111,108,117,109,110,73,100,41,44,32,116,114, - 117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,109,98,111,66,111,120, - 67,104,97,110,103,101,100,32,40,67,111,109,98,111,66,111,120,42,32,99,111,109,98,111,66,111,120,84,104,97,116,72,97,115,67,104,97,110,103,101, - 100,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,111,119,110,101,114,46,115,101,116,82,97,116,105, - 110,103,32,40,114,111,119,44,32,99,111,108,117,109,110,73,100,44,32,99,111,109,98,111,66,111,120,45,62,103,101,116,83,101,108,101,99,116,101,100, - 73,100,40,41,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32, - 32,32,32,84,97,98,108,101,68,101,109,111,67,111,109,112,111,110,101,110,116,38,32,111,119,110,101,114,59,13,10,32,32,32,32,32,32,32,32,67, - 111,109,98,111,66,111,120,42,32,99,111,109,98,111,66,111,120,59,13,10,32,32,32,32,32,32,32,32,105,110,116,32,114,111,119,44,32,99,111,108, - 117,109,110,73,100,59,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,65,32,99,111,109,112,97,114,97, - 116,111,114,32,117,115,101,100,32,116,111,32,115,111,114,116,32,111,117,114,32,100,97,116,97,32,119,104,101,110,32,116,104,101,32,117,115,101,114,32, - 99,108,105,99,107,115,32,97,32,99,111,108,117,109,110,32,104,101,97,100,101,114,13,10,32,32,32,32,99,108,97,115,115,32,68,101,109,111,68,97, - 116,97,83,111,114,116,101,114,13,10,32,32,32,32,123,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101, - 109,111,68,97,116,97,83,111,114,116,101,114,32,40,99,111,110,115,116,32,83,116,114,105,110,103,32,97,116,116,114,105,98,117,116,101,84,111,83,111, - 114,116,95,44,32,98,111,111,108,32,102,111,114,119,97,114,100,115,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,58,32,97,116,116,114,105, - 98,117,116,101,84,111,83,111,114,116,32,40,97,116,116,114,105,98,117,116,101,84,111,83,111,114,116,95,41,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,100,105,114,101,99,116,105,111,110,32,40,102,111,114,119,97,114,100,115,32,63,32,49,32,58,32,45,49,41,13,10,32,32,32, - 32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,105,110,116,32,99,111,109,112,97,114,101, - 69,108,101,109,101,110,116,115,32,40,88,109,108,69,108,101,109,101,110,116,42,32,102,105,114,115,116,44,32,88,109,108,69,108,101,109,101,110,116,42, - 32,115,101,99,111,110,100,41,32,99,111,110,115,116,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105, - 110,116,32,114,101,115,117,108,116,32,61,32,102,105,114,115,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,97, - 116,116,114,105,98,117,116,101,84,111,83,111,114,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,46,99,111,109,112,97,114,101,76,101,120,105,99,111,103,114,97,112,104,105,99,97,108,108,121,32,40,115,101,99,111,110,100,45,62,103, - 101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,97,116,116,114,105,98,117,116,101,84,111,83,111,114,116,41,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,114,101,115,117,108,116,32,61,32,102,105,114,115,116,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116, - 101,32,40,84,40,34,73,68,34,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 46,99,111,109,112,97,114,101,76,101,120,105,99,111,103,114,97,112,104,105,99,97,108,108,121,32,40,115,101,99,111,110,100,45,62,103,101,116,83,116, - 114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,84,40,34,73,68,34,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,114,101,116,117,114,110,32,100,105,114,101,99,116,105,111,110,32,42,32,114,101,115,117,108,116,59,13,10,32,32,32,32,32,32,32,32,125,13,10, - 13,10,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,97,116,116, - 114,105,98,117,116,101,84,111,83,111,114,116,59,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,100,105,114,101,99,116,105, - 111,110,59,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,47,47,32,116,104,105,115,32,108,111,97,100,115,32,116, - 104,101,32,101,109,98,101,100,100,101,100,32,100,97,116,97,98,97,115,101,32,88,77,76,32,102,105,108,101,32,105,110,116,111,32,109,101,109,111,114, - 121,13,10,32,32,32,32,118,111,105,100,32,108,111,97,100,68,97,116,97,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,88, - 109,108,68,111,99,117,109,101,110,116,32,100,97,116,97,68,111,99,32,40,83,116,114,105,110,103,32,40,40,99,111,110,115,116,32,99,104,97,114,42, - 41,32,66,105,110,97,114,121,68,97,116,97,58,58,100,101,109,111,95,116,97,98,108,101,95,100,97,116,97,95,120,109,108,41,41,59,13,10,32,32, - 32,32,32,32,32,32,100,101,109,111,68,97,116,97,32,61,32,100,97,116,97,68,111,99,46,103,101,116,68,111,99,117,109,101,110,116,69,108,101,109, - 101,110,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,97,116,97,76,105,115,116,32,61,32,100,101,109,111,68,97,116,97,45,62,103, - 101,116,67,104,105,108,100,66,121,78,97,109,101,32,40,84,40,34,68,65,84,65,34,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,117, - 109,110,76,105,115,116,32,61,32,100,101,109,111,68,97,116,97,45,62,103,101,116,67,104,105,108,100,66,121,78,97,109,101,32,40,84,40,34,67,79, - 76,85,77,78,83,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,110,117,109,82,111,119,115,32,61,32,100,97,116,97,76,105,115,116,45, - 62,103,101,116,78,117,109,67,104,105,108,100,69,108,101,109,101,110,116,115,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47, - 32,40,97,32,117,116,105,108,105,116,121,32,109,101,116,104,111,100,32,116,111,32,115,101,97,114,99,104,32,111,117,114,32,88,77,76,32,102,111,114, - 32,116,104,101,32,97,116,116,114,105,98,117,116,101,32,116,104,97,116,32,109,97,116,99,104,101,115,32,97,32,99,111,108,117,109,110,32,73,68,41, - 13,10,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,103,101,116,65,116,116,114,105,98,117,116,101,78,97,109,101,70,111,114,67,111, - 108,117,109,110,73,100,32,40,99,111,110,115,116,32,105,110,116,32,99,111,108,117,109,110,73,100,41,32,99,111,110,115,116,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,102,111,114,69,97,99,104,88,109,108,67,104,105,108,100,69,108,101,109,101,110,116,32,40,42,99,111,108,117,109, - 110,76,105,115,116,44,32,99,111,108,117,109,110,88,109,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,105,102,32,40,99,111,108,117,109,110,88,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105,98,117,116,101,32,84,40,34,99,111,108,117, - 109,110,73,100,34,41,32,61,61,32,99,111,108,117,109,110,73,100,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116, - 117,114,110,32,99,111,108,117,109,110,88,109,108,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,84,40,34,110,97,109, - 101,34,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,116,114,105,110,103, - 58,58,101,109,112,116,121,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114, - 101,97,116,101,84,97,98,108,101,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,97,98,108,101, - 68,101,109,111,67,111,109,112,111,110,101,110,116,40,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::tabledemo_cpp = (const char*) temp13; - -static const unsigned char temp14[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, - 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, - 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, - 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, - 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, - 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, - 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, - 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, - 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, - 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, - 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, - 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, - 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, - 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, - 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, - 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, - 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, - 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, - 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, - 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, - 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, - 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, - 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, - 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, - 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, - 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, - 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, - 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,99,108,97,115,115,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112, - 111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99, - 32,65,115,121,110,99,85,112,100,97,116,101,114,13,10,123,13,10,32,32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,115,105,122,101,44,32, - 100,120,44,32,100,121,44,32,119,44,32,104,44,32,112,97,114,101,110,116,87,105,100,116,104,44,32,112,97,114,101,110,116,72,101,105,103,104,116,59, - 13,10,32,32,32,32,102,108,111,97,116,32,105,110,110,101,114,88,44,32,105,110,110,101,114,89,59,13,10,32,32,32,32,67,111,108,111,117,114,32, - 99,111,108,111,117,114,59,13,10,32,32,32,32,67,114,105,116,105,99,97,108,83,101,99,116,105,111,110,32,108,111,99,107,59,13,10,32,32,32,32, - 105,110,116,32,116,104,114,101,97,100,73,100,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,66,111,117,110,99,105,110,103,66,97, - 108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120,32,61,32,82,97,110,100,111,109,58,58,103,101,116, - 83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,50,48,48,46,48,102,59,13,10,32,32, - 32,32,32,32,32,32,121,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116, - 70,108,111,97,116,40,41,32,42,32,50,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,87,105,100,116,104,32,61, - 32,53,48,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,101,105,103,104,116,32,61,32,53,48,59,13,10,32,32,32,32,32,32, - 32,32,105,110,110,101,114,88,32,61,32,48,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114,89,32,61,32,48,59,13,10,32,32,32,32, - 32,32,32,32,116,104,114,101,97,100,73,100,32,61,32,48,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116, - 32,115,112,101,101,100,32,61,32,53,46,48,102,59,32,47,47,32,103,105,118,101,32,101,97,99,104,32,98,97,108,108,32,97,32,102,105,120,101,100, - 32,115,112,101,101,100,32,115,111,32,119,101,32,99,97,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,101,101,32,116,104,101,32,101,102,102,101,99,116,115,32,111,102,32,116,104,114,101,97,100, - 32,112,114,105,111,114,105,116,121,32,111,110,32,104,111,119,32,102,97,115,116,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,101,121,32,97,99,116,117,97,108,108,121,32,103,111,46,13,10,32, - 32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,97,110,103,108,101,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121, - 115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,102,108,111,97,116,95,80,105,32,42,32,50,46, - 48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,100,120,32,61,32,115,105,110,102,32,40,97,110,103,108,101,41,32,42,32,115,112,101,101,100, - 59,13,10,32,32,32,32,32,32,32,32,100,121,32,61,32,99,111,115,102,32,40,97,110,103,108,101,41,32,42,32,115,112,101,101,100,59,13,10,13, - 10,32,32,32,32,32,32,32,32,115,105,122,101,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40, - 41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,51,48,46,48,102,32,43,32,51,48,46,48,102,59,13,10,13,10,32,32,32,32,32,32, - 32,32,99,111,108,111,117,114,32,61,32,67,111,108,111,117,114,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100, - 111,109,40,41,46,110,101,120,116,73,110,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,119,105, - 116,104,65,108,112,104,97,32,40,48,46,53,102,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,119,105,116, - 104,66,114,105,103,104,116,110,101,115,115,32,40,48,46,55,102,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,66,111,117,110,99, - 105,110,103,66,97,108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32, - 112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,115,101, - 116,67,111,108,111,117,114,32,40,99,111,108,111,117,114,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,69,108,108,105,112,115,101, - 32,40,105,110,110,101,114,88,44,32,105,110,110,101,114,89,44,32,115,105,122,101,44,32,115,105,122,101,41,59,13,10,13,10,32,32,32,32,32,32, - 32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32, - 32,103,46,115,101,116,70,111,110,116,32,40,49,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120,116,32, - 40,83,116,114,105,110,103,58,58,116,111,72,101,120,83,116,114,105,110,103,32,40,116,104,114,101,97,100,73,100,41,44,32,48,44,32,48,44,32,103, - 101,116,87,105,100,116,104,40,41,44,32,103,101,116,72,101,105,103,104,116,40,41,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99, - 101,110,116,114,101,100,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,114,101,110, - 116,83,105,122,101,67,104,97,110,103,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,87,105,100, - 116,104,32,61,32,103,101,116,80,97,114,101,110,116,87,105,100,116,104,40,41,32,45,32,115,105,122,101,59,13,10,32,32,32,32,32,32,32,32,112, - 97,114,101,110,116,72,101,105,103,104,116,32,61,32,103,101,116,80,97,114,101,110,116,72,101,105,103,104,116,40,41,32,45,32,115,105,122,101,59,13, - 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,104,97,110,100,108,101,65,115,121,110,99,85,112,100,97,116,101,40,41,13,10, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,99,111,112,101,100,76,111,99,107,32,115,108,32,40,108,111,99,107, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,66,111,117,110,100,115,32,40,40,40,105,110,116,41,32,120,41,32,45,32,50,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,121,41,32,45,32,50,44,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,115,105,122,101,41,32,43,32,52,44,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,115,105,122,101,41,32,43,32,52,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,105,110,110,101,114,88,32,61,32,120,32,45,32,103,101,116,88,40,41,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114,89,32, - 61,32,121,32,45,32,103,101,116,89,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32, - 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109,111,118,101,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, - 32,32,99,111,110,115,116,32,83,99,111,112,101,100,76,111,99,107,32,115,108,32,40,108,111,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,116,104,114,101,97,100,73,100,32,61,32,84,104,114,101,97,100,58,58,103,101,116,67,117,114,114,101,110,116,84,104,114,101,97,100,73,100,40,41, - 59,32,47,47,32,116,104,105,115,32,105,115,32,115,111,32,116,104,101,32,99,111,109,112,111,110,101,110,116,32,99,97,110,32,112,114,105,110,116,32, - 116,104,101,32,116,104,114,101,97,100,32,73,68,32,105,110,115,105,100,101,32,116,104,101,32,98,97,108,108,13,10,13,10,32,32,32,32,32,32,32, - 32,120,32,43,61,32,100,120,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,100,121,59,13,10,13,10,32,32,32,32,32,32,32,32,105, - 102,32,40,120,32,60,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,120,32,61,32,102,97,98,115,102,32,40,100,120,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120,32,62,32,112,97,114,101,110,116,87,105,100,116,104,41,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,100,120,32,61,32,45,102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,121,32, - 60,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,121,32,61,32,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32, - 32,32,32,32,32,32,105,102,32,40,121,32,62,32,112,97,114,101,110,116,72,101,105,103,104,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,100,121,32,61,32,45,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115, - 32,99,97,108,108,101,100,32,111,110,32,97,32,98,97,99,107,103,114,111,117,110,100,32,116,104,114,101,97,100,44,32,115,111,32,119,101,32,100,111, - 110,39,116,32,119,97,110,116,32,116,111,32,99,97,108,108,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,121,32,85,73,32,99,111,100,101, - 32,102,114,111,109,32,104,101,114,101,32,45,32,105,110,115,116,101,97,100,32,119,101,39,108,108,32,116,114,105,103,103,101,114,32,97,110,32,101,118, - 101,110,116,32,116,104,97,116,32,119,105,108,108,32,117,112,100,97,116,101,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,99,111,109, - 112,111,110,101,110,116,39,115,32,112,111,115,105,116,105,111,110,32,108,97,116,101,114,46,32,84,104,105,115,32,105,115,32,97,32,115,97,102,101,32, - 119,97,121,32,116,111,32,97,118,111,105,100,32,100,101,97,100,108,111,99,107,115,13,10,32,32,32,32,32,32,32,32,116,114,105,103,103,101,114,65, - 115,121,110,99,85,112,100,97,116,101,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117, - 103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,101,109,111,84,104, - 114,101,97,100,32,32,32,32,58,32,112,117,98,108,105,99,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,44,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,104,114,101,97,100,13,10,123,13,10,32,32,32,32, - 105,110,116,32,105,110,116,101,114,118,97,108,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,84,104,114,101,97,100, - 40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,104,114,101,97,100,32,40,84,40,34,74,117,99,101,32,68,101,109,111,32,84,104,114,101,97, - 100,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,110,116,101,114,118,97,108,32,61,32,82,97,110,100,111,109,58,58, - 103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,53,48,41,32,43,32,54,59,13,10,13,10,32, - 32,32,32,32,32,32,32,47,47,32,103,105,118,101,32,116,104,101,32,116,104,114,101,97,100,115,32,97,32,114,97,110,100,111,109,32,112,114,105,111, - 114,105,116,121,44,32,115,111,32,115,111,109,101,32,119,105,108,108,32,109,111,118,101,32,109,111,114,101,13,10,32,32,32,32,32,32,32,32,47,47, - 32,115,109,111,111,116,104,108,121,32,116,104,97,110,32,111,116,104,101,114,115,46,46,13,10,32,32,32,32,32,32,32,32,115,116,97,114,116,84,104, - 114,101,97,100,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32, - 40,51,41,32,43,32,51,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,104,114,101,97,100,40,41,13,10,32, - 32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,97,108,108,111,119,32,116,104,101,32,116,104,114,101,97,100,32,50,32,115,101,99,111, - 110,100,115,32,116,111,32,115,116,111,112,32,99,108,101,97,110,108,121,32,45,32,115,104,111,117,108,100,32,98,101,32,112,108,101,110,116,121,32,111, - 102,32,116,105,109,101,46,13,10,32,32,32,32,32,32,32,32,115,116,111,112,84,104,114,101,97,100,32,40,50,48,48,48,41,59,13,10,32,32,32, - 32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,117,110,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32, - 116,104,105,115,32,105,115,32,116,104,101,32,99,111,100,101,32,116,104,97,116,32,114,117,110,115,32,116,104,105,115,32,116,104,114,101,97,100,32,45, - 32,119,101,39,108,108,32,108,111,111,112,32,99,111,110,116,105,110,117,111,117,115,108,121,44,13,10,32,32,32,32,32,32,32,32,47,47,32,117,112, - 100,97,116,105,110,103,32,116,104,101,32,99,111,45,111,114,100,105,110,97,116,101,115,32,111,102,32,111,117,114,32,98,108,111,98,46,13,10,13,10, - 32,32,32,32,32,32,32,32,47,47,32,116,104,114,101,97,100,83,104,111,117,108,100,69,120,105,116,40,41,32,114,101,116,117,114,110,115,32,116,114, - 117,101,32,119,104,101,110,32,116,104,101,32,115,116,111,112,84,104,114,101,97,100,40,41,32,109,101,116,104,111,100,32,104,97,115,32,98,101,101,110, - 13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,108,108,101,100,44,32,115,111,32,119,101,32,115,104,111,117,108,100,32,99,104,101,99,107,32, - 105,116,32,111,102,116,101,110,44,32,97,110,100,32,101,120,105,116,32,97,115,32,115,111,111,110,32,97,115,32,105,116,32,103,101,116,115,32,102,108, - 97,103,103,101,100,46,13,10,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,33,32,116,104,114,101,97,100,83,104,111,117,108,100,69,120,105, - 116,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,111,118,101,66,97,108,108,40,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,108,101,101,112,32,97,32,98,105,116,32,115,111,32,116,104,101,32,116,104, - 114,101,97,100,115,32,100,111,110,39,116,32,97,108,108,32,103,114,105,110,100,32,116,104,101,32,67,80,85,32,116,111,32,97,32,104,97,108,116,46, - 46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,97,105,116,32,40,105,110,116,101,114,118,97,108,41,59,13,10,32,32,32,32,32,32,32, - 32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101, - 114,97,116,111,114,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98, - 32,32,58,32,112,117,98,108,105,99,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,44,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,104,114,101,97,100,80,111,111,108,74,111,98,13,10,123, - 13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,40,41,13,10,32,32,32,32, - 32,32,32,32,58,32,84,104,114,101,97,100,80,111,111,108,74,111,98,32,40,84,40,34,68,101,109,111,32,84,104,114,101,97,100,112,111,111,108,32, - 74,111,98,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,104,114,101,97,100,80, - 111,111,108,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,74,111,98,83,116,97,116,117,115,32, - 114,117,110,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,116,104,101,32, - 99,111,100,101,32,116,104,97,116,32,114,117,110,115,32,116,104,105,115,32,106,111,98,46,32,73,116,39,108,108,32,98,101,32,114,101,112,101,97,116, - 101,100,108,121,32,99,97,108,108,101,100,32,117,110,116,105,108,32,119,101,32,114,101,116,117,114,110,13,10,32,32,32,32,32,32,32,32,47,47,32, - 106,111,98,72,97,115,70,105,110,105,115,104,101,100,32,105,110,115,116,101,97,100,32,111,102,32,106,111,98,78,101,101,100,115,82,117,110,110,105,110, - 103,65,103,97,105,110,46,13,10,13,10,32,32,32,32,32,32,32,32,109,111,118,101,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32, - 84,104,114,101,97,100,58,58,115,108,101,101,112,32,40,51,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,106,111, - 98,78,101,101,100,115,82,117,110,110,105,110,103,65,103,97,105,110,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114, - 101,109,111,118,101,100,70,114,111,109,81,117,101,117,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,84,104,105, - 115,32,105,115,32,99,97,108,108,101,100,32,116,111,32,116,101,108,108,32,117,115,32,116,104,97,116,32,111,117,114,32,106,111,98,32,104,97,115,32, - 98,101,101,110,32,114,101,109,111,118,101,100,32,102,114,111,109,32,116,104,101,32,112,111,111,108,46,13,10,32,32,32,32,32,32,32,32,47,47,32, - 73,110,32,116,104,105,115,32,99,97,115,101,32,116,104,101,114,101,39,115,32,110,111,32,110,101,101,100,32,116,111,32,100,111,32,97,110,121,116,104, - 105,110,103,32,104,101,114,101,46,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110, - 103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,84,104,114,101,97,100,105,110,103,68,101,109, - 111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,105,109,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,98,111,111,108,32, - 105,115,85,115,105,110,103,80,111,111,108,59,13,10,32,32,32,32,84,104,114,101,97,100,80,111,111,108,32,112,111,111,108,59,13,10,32,32,32,32, - 84,101,120,116,66,117,116,116,111,110,42,32,99,111,110,116,114,111,108,66,117,116,116,111,110,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32, - 32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,13,10,32,32,32,32,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,13,10,32,32,32,32,32,32,32,32,58,32,112,111,111,108, - 32,40,51,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,115,85,115,105,110,103,80,111,111,108,32,61,32,102,97,108,115,101, - 59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,77,117,108,116,105,116,104,114,101,97,100,105,110,103,34, - 41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,125,13, - 10,13,10,32,32,32,32,126,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, - 112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115,32,40,116,114,117,101,44,32,50,48,48,48,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47, - 47,32,116,104,105,115,32,103,101,116,115,32,99,97,108,108,101,100,32,119,104,101,110,32,97,32,99,111,109,112,111,110,101,110,116,32,105,115,32,97, - 100,100,101,100,32,111,114,32,114,101,109,111,118,101,100,32,102,114,111,109,32,97,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,46, - 13,10,32,32,32,32,118,111,105,100,32,112,97,114,101,110,116,72,105,101,114,97,114,99,104,121,67,104,97,110,103,101,100,40,41,13,10,32,32,32, - 32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,39,108,108,32,117,115,101,32,116,104,105,115,32,97,115,32,97,110,32,111,112,112,111, - 114,116,117,110,105,116,121,32,116,111,32,115,116,97,114,116,32,97,110,100,32,115,116,111,112,32,116,104,101,32,116,104,114,101,97,100,115,44,32,115, - 111,32,116,104,97,116,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,32,100,111,110,39,116,32,108,101,97,118,101,32,116,104,101,109,32,103, - 111,105,110,103,32,119,104,101,110,32,116,104,101,32,99,111,109,112,111,110,101,110,116,39,115,32,110,111,116,32,97,99,116,117,97,108,108,121,32,118, - 105,115,105,98,108,101,46,13,10,32,32,32,32,32,32,32,32,115,116,111,112,84,105,109,101,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115,32,40,116,114,117,101,44,32,52,48,48,48,41,59,13,10,32,32,32,32,32, - 32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110, - 100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,110,116,114,111,108,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117, - 116,116,111,110,32,40,84,40,34,84,104,114,101,97,100,32,116,121,112,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114, - 111,108,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,32,40,50,48,41,59,13,10,32,32, - 32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32, - 40,50,48,44,32,50,48,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,84,114,105, - 103,103,101,114,101,100,79,110,77,111,117,115,101,68,111,119,110,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114, - 111,108,66,117,116,116,111,110,45,62,115,101,116,65,108,119,97,121,115,79,110,84,111,112,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32, - 32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,83,104,111,119,105,110,103,40,41,41,13,10,32,32,32,32,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101, - 110,116,115,40,41,32,60,32,53,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,116,97,114,116,84,105,109,101,114,32,40,50,48,48,48,41,59,13,10,32,32,32,32,32, - 32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38, - 32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58, - 119,104,105,116,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,101,116,85,115,105,110,103,80,111,111,108,32, - 40,98,111,111,108,32,117,115,101,80,111,111,108,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,115,85,115,105,110,103,80,111, - 111,108,32,61,32,117,115,101,80,111,111,108,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,105,101,114,97,114,99,104,121,67,104, - 97,110,103,101,100,40,41,59,32,47,47,32,114,101,115,101,116,115,32,101,118,101,114,121,116,104,105,110,103,13,10,32,32,32,32,125,13,10,13,10, - 32,32,32,32,118,111,105,100,32,97,100,100,65,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40, - 105,115,85,115,105,110,103,80,111,111,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109, - 111,84,104,114,101,97,100,80,111,111,108,74,111,98,42,32,110,101,119,67,111,109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101,97,100, - 80,111,111,108,74,111,98,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108, - 101,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,101,119,67,111,109,112,45,62,112,97,114,101,110, - 116,83,105,122,101,67,104,97,110,103,101,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,112,111,111,108,46,97,100,100,74, - 111,98,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10, - 32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,84,104,114,101,97,100,42,32,110,101,119,67,111, - 109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101,97,100,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65, - 110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,101, - 119,67,111,109,112,45,62,112,97,114,101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10, - 32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,109,111,118,101,65,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,105,102,32,40,105,115,85,115,105,110,103,80,111,111,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,84,104,114,101,97,100,80,111,111,108,74,111,98,42,32,106,111,98,84,111,82,101,109,111,118,101,32,61,32,112,111, - 111,108,46,103,101,116,74,111,98,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120, - 116,73,110,116,32,40,112,111,111,108,46,103,101,116,78,117,109,74,111,98,115,40,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,105,102,32,40,106,111,98,84,111,82,101,109,111,118,101,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,111,111,108,46,114,101,109,111,118,101,74,111,98,32,40,106,111,98,84,111,82,101,109, - 111,118,101,44,32,116,114,117,101,44,32,52,48,48,48,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116, - 101,32,106,111,98,84,111,82,101,109,111,118,101,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125, - 13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105, - 102,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,62,32,49,41,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,98,97,108,108,32, - 61,32,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,49,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116, - 101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116, - 115,40,41,32,45,32,49,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,100,121,110,97,109,105, - 99,95,99,97,115,116,32,60,66,117,116,116,111,110,42,62,32,40,98,97,108,108,41,32,61,61,32,48,41,32,47,47,32,100,111,110,39,116,32,100, - 101,108,101,116,101,32,111,117,114,32,98,117,116,116,111,110,33,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100, - 101,108,101,116,101,32,98,97,108,108,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32, - 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13, - 10,32,32,32,32,32,32,32,32,105,102,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110, - 101,120,116,66,111,111,108,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103, - 101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,60,61,32,49,48,41,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101, - 108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109,67,104, - 105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,62,32,51,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101, - 109,111,118,101,65,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111, - 105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,109,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101, - 109,32,40,49,44,32,84,40,34,85,115,101,32,111,110,101,32,116,104,114,101,97,100,32,112,101,114,32,98,97,108,108,34,41,44,32,116,114,117,101, - 44,32,33,32,105,115,85,115,105,110,103,80,111,111,108,41,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,50,44, - 32,84,40,34,85,115,101,32,97,32,116,104,114,101,97,100,32,112,111,111,108,34,41,44,32,116,114,117,101,44,32,105,115,85,115,105,110,103,80,111, - 111,108,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,114,101,115,32,61,32,109,46,115,104,111,119,65,116, - 32,40,98,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,32,33,61,32,48,41,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,115,101,116,85,115,105,110,103,80,111,111,108,32,40,114,101,115,32,61,61,32,50,41,59,13,10,32,32,32,32,125, - 13,10,125,59,13,10,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,84,104,114,101,97,100,105,110,103, - 68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,104,114,101,97,100,105,110,103,68,101,109,111,40, - 41,59,13,10,125,13,10,0,0}; -const char* BinaryData::threadingdemo_cpp = (const char*) temp14; - -static const unsigned char temp15[] = {60,116,114,101,101,62,13,10,32,32,32,32,60,105,116,101,109,49,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,99,111, - 108,111,117,114,61,34,102,102,102,102,48,48,48,48,34,32,119,105,100,116,104,61,34,56,48,48,34,32,47,62,13,10,32,32,32,32,32,32,32,32, - 60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,102,102,51,51,98,98,48,48,34,32,119,105,100,116,104,61,34,53,48,34,32,47,62, - 13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,51,51,48,48,48,48,48,48,34,32,47,62,13, - 10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,119,105,100,116,104,61,34,49,48,48,34,32,47,62,13,10,32,32,32,32,32,32, - 32,32,60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,102,102,56,56,54,54,101,101,34,32,47,62,13,10,32,32,32,32,32,32,32, - 32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,99,111,108,111,117,114,61,34,51,51, - 48,48,48,48,48,48,34,32,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32, - 60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,60,47,105,116,101,109,49,62,13,10,13,10,32,32,32,32,60,105,116,101,109,50,32,99, - 111,108,111,117,114,61,34,102,102,55,55,55,55,55,55,34,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32, - 32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32, - 32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,119,105,100,116, - 104,61,34,56,48,48,34,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,119,105,100,116,104,61,34,56,48,48,34,47, - 62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47, - 62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,105,116,101,109,51,62,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,60, - 115,117,98,110,111,100,101,32,119,105,100,116,104,61,34,53,48,34,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,47,115,117,98,110, - 111,100,101,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111, - 100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32, - 32,32,32,32,32,32,60,47,105,116,101,109,51,62,13,10,32,32,32,32,60,47,105,116,101,109,50,62,13,10,13,10,32,32,32,32,60,105,116,101, - 109,52,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, - 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, - 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, - 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100, - 101,47,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,47,62,13,10,32,32,32,32,60,47,105,116,101,109,52,62,13,10,60, - 47,116,114,101,101,62,0,0}; -const char* BinaryData::treedemo_xml = (const char*) temp15; - -static const unsigned char temp16[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,13,10,32,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32,111,102,32,116,104,101,32,74,85,67,69, - 32,108,105,98,114,97,114,121,32,45,32,34,74,117,108,101,115,39,32,85,116,105,108,105,116,121,32,67,108,97,115,115,32,69,120,116,101,110,115,105, - 111,110,115,34,13,10,32,32,32,67,111,112,121,114,105,103,104,116,32,50,48,48,52,45,55,32,98,121,32,82,97,119,32,77,97,116,101,114,105,97, - 108,32,83,111,102,116,119,97,114,101,32,108,116,100,46,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,74,85,67,69,32,99,97,110,32,98,101,32,114,101, - 100,105,115,116,114,105,98,117,116,101,100,32,97,110,100,47,111,114,32,109,111,100,105,102,105,101,100,32,117,110,100,101,114,32,116,104,101,32,116,101, - 114,109,115,32,111,102,32,116,104,101,13,10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115, - 101,44,32,97,115,32,112,117,98,108,105,115,104,101,100,32,98,121,32,116,104,101,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117, - 110,100,97,116,105,111,110,59,13,10,32,32,32,101,105,116,104,101,114,32,118,101,114,115,105,111,110,32,50,32,111,102,32,116,104,101,32,76,105,99, - 101,110,115,101,44,32,111,114,32,40,97,116,32,121,111,117,114,32,111,112,116,105,111,110,41,32,97,110,121,32,108,97,116,101,114,32,118,101,114,115, - 105,111,110,46,13,10,13,10,32,32,32,74,85,67,69,32,105,115,32,100,105,115,116,114,105,98,117,116,101,100,32,105,110,32,116,104,101,32,104,111, - 112,101,32,116,104,97,116,32,105,116,32,119,105,108,108,32,98,101,32,117,115,101,102,117,108,44,13,10,32,32,32,98,117,116,32,87,73,84,72,79, - 85,84,32,65,78,89,32,87,65,82,82,65,78,84,89,59,32,119,105,116,104,111,117,116,32,101,118,101,110,32,116,104,101,32,105,109,112,108,105,101, - 100,32,119,97,114,114,97,110,116,121,32,111,102,13,10,32,32,32,77,69,82,67,72,65,78,84,65,66,73,76,73,84,89,32,111,114,32,70,73,84, - 78,69,83,83,32,70,79,82,32,65,32,80,65,82,84,73,67,85,76,65,82,32,80,85,82,80,79,83,69,46,32,32,83,101,101,32,116,104,101,13, - 10,32,32,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101,32,102,111,114,32,109,111,114,101,32, - 100,101,116,97,105,108,115,46,13,10,13,10,32,32,32,89,111,117,32,115,104,111,117,108,100,32,104,97,118,101,32,114,101,99,101,105,118,101,100,32, - 97,32,99,111,112,121,32,111,102,32,116,104,101,32,71,78,85,32,71,101,110,101,114,97,108,32,80,117,98,108,105,99,32,76,105,99,101,110,115,101, - 13,10,32,32,32,97,108,111,110,103,32,119,105,116,104,32,74,85,67,69,59,32,105,102,32,110,111,116,44,32,118,105,115,105,116,32,119,119,119,46, - 103,110,117,46,111,114,103,47,108,105,99,101,110,115,101,115,32,111,114,32,119,114,105,116,101,32,116,111,32,116,104,101,13,10,32,32,32,70,114,101, - 101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,44,32,53,57,32,84,101,109,112,108,101,32,80, - 108,97,99,101,44,32,83,117,105,116,101,32,51,51,48,44,13,10,32,32,32,66,111,115,116,111,110,44,32,77,65,32,48,50,49,49,49,45,49,51, - 48,55,32,85,83,65,13,10,13,10,32,32,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, - 45,45,45,45,45,45,45,45,45,45,13,10,13,10,32,32,32,73,102,32,121,111,117,39,100,32,108,105,107,101,32,116,111,32,114,101,108,101,97,115, - 101,32,97,32,99,108,111,115,101,100,45,115,111,117,114,99,101,32,112,114,111,100,117,99,116,32,119,104,105,99,104,32,117,115,101,115,32,74,85,67, - 69,44,32,99,111,109,109,101,114,99,105,97,108,13,10,32,32,32,108,105,99,101,110,115,101,115,32,97,114,101,32,97,108,115,111,32,97,118,97,105, - 108,97,98,108,101,58,32,118,105,115,105,116,32,119,119,119,46,114,97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109, - 47,106,117,99,101,32,102,111,114,13,10,32,32,32,109,111,114,101,32,105,110,102,111,114,109,97,116,105,111,110,46,13,10,13,10,32,32,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,42,47,13, - 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, - 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,99,108,97,115,115,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,32,58,32,112,117,98,108,105,99,32,84,114,101,101, - 86,105,101,119,73,116,101,109,13,10,123,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,120,109,108,59,13,10,13,10,112,117,98, - 108,105,99,58,13,10,32,32,32,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,40,88,109,108,69,108,101,109,101,110,116,42,32, - 99,111,110,115,116,32,120,109,108,95,41,13,10,32,32,32,32,32,32,32,32,58,32,120,109,108,32,40,120,109,108,95,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,40,41,13,10,32,32,32,32, - 123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,105,110,116,32,103,101,116,73,116,101,109,87,105,100,116,104,40,41,32,99,111,110,115,116, - 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,120,109,108,45,62,103,101,116,73,110,116,65,116,116,114,105, - 98,117,116,101,32,40,84,40,34,119,105,100,116,104,34,41,44,32,45,49,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,99,111,110, - 115,116,32,83,116,114,105,110,103,32,103,101,116,85,110,105,113,117,101,78,97,109,101,40,41,32,99,111,110,115,116,13,10,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,105,102,32,40,120,109,108,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114, - 110,32,120,109,108,45,62,103,101,116,84,97,103,78,97,109,101,40,41,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,116,114,105,110,103,58,58,101,109,112,116,121,59,13,10,32,32,32,32,125,13,10,13,10, - 32,32,32,32,98,111,111,108,32,109,105,103,104,116,67,111,110,116,97,105,110,83,117,98,73,116,101,109,115,40,41,13,10,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,120,109,108,32,33,61,32,48,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,38,38,32,120,109,108,45,62,103,101,116,70,105,114,115,116,67,104,105,108,100,69,108,101,109,101,110,116,40,41,32,33,61,32,48,59,13,10,32, - 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,73,116,101,109,32,40,71,114,97,112,104,105,99,115,38,32,103,44, - 32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104,116,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, - 105,102,32,40,120,109,108,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47, - 32,105,102,32,116,104,105,115,32,105,116,101,109,32,105,115,32,115,101,108,101,99,116,101,100,44,32,102,105,108,108,32,105,116,32,119,105,116,104,32, - 97,32,98,97,99,107,103,114,111,117,110,100,32,99,111,108,111,117,114,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105, - 115,83,101,108,101,99,116,101,100,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32, - 40,67,111,108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,48,46,51,102,41,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,47,47,32,117,115,101,32,97,32,34,99,111,108,111,117,114,34,32,97,116,116,114,105,98,117,116,101,32,105,110,32, - 116,104,101,32,120,109,108,32,116,97,103,32,102,111,114,32,116,104,105,115,32,110,111,100,101,32,116,111,32,115,101,116,32,116,104,101,32,116,101,120, - 116,32,99,111,108,111,117,114,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108, - 111,117,114,32,40,120,109,108,45,62,103,101,116,83,116,114,105,110,103,65,116,116,114,105,98,117,116,101,32,40,84,40,34,99,111,108,111,117,114,34, - 41,44,32,84,40,34,102,102,48,48,48,48,48,48,34,41,41,46,103,101,116,72,101,120,86,97,108,117,101,51,50,40,41,41,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,104,101,105,103,104,116,32,42,32,48,46,55,102,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,100,114,97,119,32,116,104,101,32,120,109,108,32,101,108,101,109,101,110,116,39,115,32, - 116,97,103,32,110,97,109,101,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120,116,32,40,120,109,108,45, - 62,103,101,116,84,97,103,78,97,109,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 52,44,32,48,44,32,119,105,100,116,104,32,45,32,52,44,32,104,101,105,103,104,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,76,101,102,116,44,32,116,114, - 117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,105,116,101,109,79, - 112,101,110,110,101,115,115,67,104,97,110,103,101,100,32,40,98,111,111,108,32,105,115,78,111,119,79,112,101,110,41,13,10,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,105,102,32,40,105,115,78,111,119,79,112,101,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,47,47,32,105,102,32,119,101,39,118,101,32,110,111,116,32,97,108,114,101,97,100,121,32,100,111,110,101,32,115,111,44,32, - 119,101,39,108,108,32,110,111,119,32,97,100,100,32,116,104,101,32,116,114,101,101,39,115,32,115,117,98,45,105,116,101,109,115,46,32,89,111,117,32, - 99,111,117,108,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,108,115,111,32,99,104,111,111,115,101,32,116,111,32,100,101,108, - 101,116,101,32,116,104,101,32,101,120,105,115,116,105,110,103,32,111,110,101,115,32,97,110,100,32,114,101,102,114,101,115,104,32,116,104,101,109,32,105, - 102,32,116,104,97,116,39,115,32,109,111,114,101,32,115,117,105,116,97,98,108,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105, - 110,32,121,111,117,114,32,97,112,112,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109,83,117,98,73,116, - 101,109,115,40,41,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,110,100,32,97,100,100,32,115,117,98,45,105,116,101,109,115,32,116,111,32,116,104,105,115,32, - 110,111,100,101,32,111,102,32,116,104,101,32,116,114,101,101,44,32,99,111,114,114,101,115,112,111,110,100,105,110,103,32,116,111,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,101,97,99,104,32,115,117,98,45,101,108,101,109,101,110,116,32,105,110,32,116,104,101,32,88, - 77,76,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,120,109,108,32,33,61,32,48,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111, - 114,69,97,99,104,88,109,108,67,104,105,108,100,69,108,101,109,101,110,116,32,40,42,120,109,108,44,32,99,104,105,108,100,41,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,97,100,100,83,117,98,73,116,101,109,32,40,110,101,119,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,40,99,104,105, - 108,100,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32, - 32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105,110,32,116,104, - 105,115,32,99,97,115,101,44,32,119,101,39,108,108,32,108,101,97,118,101,32,97,110,121,32,115,117,98,45,105,116,101,109,115,32,105,110,32,116,104, - 101,32,116,114,101,101,32,119,104,101,110,32,116,104,101,32,110,111,100,101,32,103,101,116,115,32,99,108,111,115,101,100,44,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,47,47,32,116,104,111,117,103,104,32,121,111,117,32,99,111,117,108,100,32,99,104,111,111,115,101,32,116,111,32,100,101,108, - 101,116,101,32,116,104,101,109,32,105,102,32,116,104,97,116,39,115,32,109,111,114,101,32,97,112,112,114,111,112,114,105,97,116,101,32,102,111,114,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,121,111,117,114,32,97,112,112,108,105,99,97,116,105,111,110,46,13,10,32,32,32,32,32, - 32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,103,101,116,68,114,97,103,83, - 111,117,114,99,101,68,101,115,99,114,105,112,116,105,111,110,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114, - 110,32,84,40,34,84,114,101,101,86,105,101,119,32,73,116,101,109,115,34,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99, - 108,97,115,115,32,84,114,101,101,86,105,101,119,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,68,114,97,103,65,110,100,68,114,111,112, - 67,111,110,116,97,105,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99, - 32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,88,109,108,69,108,101,109,101,110,116,42,32,116,114,101,101, - 88,109,108,59,13,10,13,10,32,32,32,32,84,114,101,101,86,105,101,119,73,116,101,109,42,32,114,111,111,116,73,116,101,109,59,13,10,32,32,32, - 32,84,114,101,101,86,105,101,119,42,32,116,114,101,101,86,105,101,119,59,13,10,13,10,32,32,32,32,70,105,108,101,84,114,101,101,67,111,109,112, - 111,110,101,110,116,42,32,102,105,108,101,84,114,101,101,67,111,109,112,59,13,10,32,32,32,32,68,105,114,101,99,116,111,114,121,67,111,110,116,101, - 110,116,115,76,105,115,116,42,32,100,105,114,101,99,116,111,114,121,76,105,115,116,59,13,10,32,32,32,32,84,105,109,101,83,108,105,99,101,84,104, - 114,101,97,100,32,116,104,114,101,97,100,59,13,10,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,116,121,112,101,66,117,116,116, - 111,110,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,84,114,101,101,86,105,101,119,68,101,109,111,40,41, - 13,10,32,32,32,32,32,32,32,32,58,32,116,114,101,101,86,105,101,119,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,114,111,111, - 116,73,116,101,109,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,102,105,108,101,84,114,101,101,67,111,109,112,32,40,48,41,44,13, - 10,32,32,32,32,32,32,32,32,32,32,100,105,114,101,99,116,111,114,121,76,105,115,116,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32, - 32,116,104,114,101,97,100,32,40,34,68,101,109,111,32,102,105,108,101,32,116,114,101,101,32,116,104,114,101,97,100,34,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,84,114,101,101,32,86,105,101,119,115,34,41,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,116,114,105,110,103,32,116,114,101,101,88,109,108,83,116,114,105,110,103,32,40,66,105,110,97, - 114,121,68,97,116,97,58,58,116,114,101,101,100,101,109,111,95,120,109,108,41,59,13,10,32,32,32,32,32,32,32,32,88,109,108,68,111,99,117,109, - 101,110,116,32,112,97,114,115,101,114,32,40,116,114,101,101,88,109,108,83,116,114,105,110,103,41,59,13,10,32,32,32,32,32,32,32,32,116,114,101, - 101,88,109,108,32,61,32,112,97,114,115,101,114,46,103,101,116,68,111,99,117,109,101,110,116,69,108,101,109,101,110,116,40,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,114,111,111,116,73,116,101,109,32,61,32,110,101,119,32,84,114,101,101,86,105,101,119,68,101,109,111,73,116,101,109,32,40, - 116,114,101,101,88,109,108,41,59,13,10,32,32,32,32,32,32,32,32,114,111,111,116,73,116,101,109,45,62,115,101,116,79,112,101,110,32,40,116,114, - 117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,102,105,110,100,32,116,104,101,32,114,111,111,116,32,111,102,32,116,104,101,32, - 117,115,101,114,39,115,32,104,111,109,101,32,100,114,105,118,101,44,32,97,110,100,32,115,101,116,32,116,104,97,116,32,97,115,32,111,117,114,32,114, - 111,111,116,46,46,13,10,32,32,32,32,32,32,32,32,70,105,108,101,32,102,111,108,100,101,114,32,40,70,105,108,101,58,58,103,101,116,83,112,101, - 99,105,97,108,76,111,99,97,116,105,111,110,32,40,70,105,108,101,58,58,117,115,101,114,72,111,109,101,68,105,114,101,99,116,111,114,121,41,41,59, - 13,10,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,102,111,108,100,101,114,46,103,101,116,80,97,114,101,110,116,68,105,114,101,99,116,111, - 114,121,40,41,32,33,61,32,102,111,108,100,101,114,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,108,100,101,114,32,61,32,102,111, - 108,100,101,114,46,103,101,116,80,97,114,101,110,116,68,105,114,101,99,116,111,114,121,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,105, - 114,101,99,116,111,114,121,76,105,115,116,32,61,32,110,101,119,32,68,105,114,101,99,116,111,114,121,67,111,110,116,101,110,116,115,76,105,115,116,32, - 40,48,44,32,116,104,114,101,97,100,41,59,13,10,32,32,32,32,32,32,32,32,100,105,114,101,99,116,111,114,121,76,105,115,116,45,62,115,101,116, - 68,105,114,101,99,116,111,114,121,32,40,102,111,108,100,101,114,44,32,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32, - 32,116,104,114,101,97,100,46,115,116,97,114,116,84,104,114,101,97,100,32,40,51,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65, - 110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,121,112,101,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116, - 111,110,32,40,84,40,34,84,121,112,101,32,111,102,32,116,114,101,101,118,105,101,119,46,46,46,34,41,41,41,59,13,10,32,32,32,32,32,32,32, - 32,116,121,112,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10, - 32,32,32,32,32,32,32,32,116,121,112,101,66,117,116,116,111,110,45,62,115,101,116,65,108,119,97,121,115,79,110,84,111,112,32,40,116,114,117,101, - 41,59,13,10,32,32,32,32,32,32,32,32,116,121,112,101,66,117,116,116,111,110,45,62,115,101,116,84,114,105,103,103,101,114,101,100,79,110,77,111, - 117,115,101,68,111,119,110,32,40,116,114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,104,111,119,67,117,115,116,111,109,84,114,101, - 101,86,105,101,119,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,84,114,101,101,86,105,101,119,68,101,109,111,40,41,13,10, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,100,101,108,101,116,101,32,114,111,111,116,73,116,101,109,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32, - 116,114,101,101,88,109,108,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,100,105,114,101,99,116,111,114,121,76,105,115,116,59,13, - 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,103,114,101, - 121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,114,101,101,86,105,101,119,32,33,61,32,48,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,103,46,100,114,97,119,82,101,99,116,32,40,116,114,101,101,86,105,101,119,45,62,103,101,116,88,40,41,44,32,116,114,101, - 101,86,105,101,119,45,62,103,101,116,89,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 116,114,101,101,86,105,101,119,45,62,103,101,116,87,105,100,116,104,40,41,44,32,116,114,101,101,86,105,101,119,45,62,103,101,116,72,101,105,103,104, - 116,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,102,105,108,101,84,114,101,101,67,111,109,112,32,33,61,32,48,41,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,82,101,99,116,32,40,102,105,108,101,84,114,101,101,67,111,109,112,45,62,103, - 101,116,88,40,41,44,32,102,105,108,101,84,114,101,101,67,111,109,112,45,62,103,101,116,89,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,84,114,101,101,67,111,109,112,45,62,103,101,116,87,105,100,116,104,40,41,44,32, - 102,105,108,101,84,114,101,101,67,111,109,112,45,62,103,101,116,72,101,105,103,104,116,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32, - 32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,114,101, - 101,86,105,101,119,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,114,101,101,86,105,101,119,45,62,115,101,116,66,111, - 117,110,100,115,82,101,108,97,116,105,118,101,32,40,48,46,48,53,102,44,32,48,46,48,55,102,44,32,48,46,57,102,44,32,48,46,57,102,41,59, - 13,10,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,102,105,108,101,84,114,101,101,67,111,109,112,32,33,61,32,48,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,84,114,101,101,67,111,109,112,45,62,115,101,116,66,111,117,110,100,115,82,101,108,97,116,105, - 118,101,32,40,48,46,48,53,102,44,32,48,46,48,55,102,44,32,48,46,57,102,44,32,48,46,57,102,41,59,13,10,13,10,32,32,32,32,32,32, - 32,32,116,121,112,101,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,32,40,50,48,41,59, - 13,10,32,32,32,32,32,32,32,32,116,121,112,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110, - 32,40,52,48,44,32,49,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,104,111,119,67,117,115,116,111,109, - 84,114,101,101,86,105,101,119,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111, - 32,40,116,114,101,101,86,105,101,119,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,110,100,90,101,114,111,32,40,102,105,108, - 101,84,114,101,101,67,111,109,112,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,116,114,101,101,86,105,101,119,32,61,32,110,101,119,32,84,114,101,101,86,105,101,119,40,41,41,59,13,10,32,32,32,32,32,32,32,32,116, - 114,101,101,86,105,101,119,45,62,115,101,116,82,111,111,116,73,116,101,109,32,40,114,111,111,116,73,116,101,109,41,59,13,10,32,32,32,32,32,32, - 32,32,116,114,101,101,86,105,101,119,45,62,115,101,116,77,117,108,116,105,83,101,108,101,99,116,69,110,97,98,108,101,100,32,40,116,114,117,101,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111, - 105,100,32,115,104,111,119,70,105,108,101,84,114,101,101,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101, - 108,101,116,101,65,110,100,90,101,114,111,32,40,116,114,101,101,86,105,101,119,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65, - 110,100,90,101,114,111,32,40,102,105,108,101,84,114,101,101,67,111,109,112,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100, - 77,97,107,101,86,105,115,105,98,108,101,32,40,102,105,108,101,84,114,101,101,67,111,109,112,32,61,32,110,101,119,32,70,105,108,101,84,114,101,101, - 67,111,109,112,111,110,101,110,116,32,40,42,100,105,114,101,99,116,111,114,121,76,105,115,116,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99, - 107,101,100,32,40,66,117,116,116,111,110,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32, - 109,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,49,44,32,84,40,34,67,117,115,116,111,109,32,116,114,101,101, - 118,105,101,119,32,115,104,111,119,105,110,103,32,97,110,32,88,77,76,32,116,114,101,101,34,41,41,59,13,10,32,32,32,32,32,32,32,32,109,46, - 97,100,100,73,116,101,109,32,40,50,44,32,84,40,34,70,105,108,101,84,114,101,101,67,111,109,112,111,110,101,110,116,32,115,104,111,119,105,110,103, - 32,116,104,101,32,102,105,108,101,32,115,121,115,116,101,109,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110, - 116,32,114,32,61,32,109,46,115,104,111,119,65,116,32,40,116,121,112,101,66,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 105,102,32,40,114,32,61,61,32,49,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,104,111,119, - 67,117,115,116,111,109,84,114,101,101,86,105,101,119,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108, - 115,101,32,105,102,32,40,114,32,61,61,32,50,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115, - 104,111,119,70,105,108,101,84,114,101,101,67,111,109,112,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10, - 32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10, - 13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,84,114,101,101,86,105,101,119,68,101,109,111,40,41,13,10,123,13,10, - 32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,114,101,101,86,105,101,119,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::treeviewdemo_cpp = (const char*) temp16; +const char* BinaryData::icons_zip = (const char*) temp16; static const unsigned char temp17[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, @@ -6677,1303 +7783,194 @@ static const unsigned char temp17[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61 10,13,10,35,105,110,99,108,117,100,101,32,34,46,46,47,106,117,99,101,100,101,109,111,95,104,101,97,100,101,114,115,46,104,34,13,10,13,10,13, 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,13,10,99,108,97,115,115,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,32,58,32,112,117,98,108,105,99,32, - 67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,112,117,98,108,105,99,32,84,105,109,101,114,13,10,123,13,10,32,32,32,32,67,111,108,111,117,114,32,99,111,108,111,117,114,59,13,10,32, - 32,32,32,102,108,111,97,116,32,120,44,32,121,44,32,100,120,44,32,100,121,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,66, - 111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120, - 32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41, - 32,42,32,49,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,121,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101, - 109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,49,48,48,46,48,102,59,13,10,13,10,32,32,32,32,32, - 32,32,32,100,120,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108, - 111,97,116,40,41,32,42,32,56,46,48,102,32,45,32,52,46,48,102,59,13,10,32,32,32,32,32,32,32,32,100,121,32,61,32,82,97,110,100,111, - 109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,56,46,48,102,32, - 45,32,52,46,48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,32,61,32,67,111,108,111,117,114,32,40,82,97,110,100, - 111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,40,41,41,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,46,119,105,116,104,66,114,105,103,104,116,110,101,115,115,32,40,48,46,55,102,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,105,110,116,32,115,105,122,101,32,61,32,49,48,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101, - 109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,51,48,41,59,13,10,32,32,32,32,32,32,32,32,115,101,116,83,105,122,101, - 32,40,115,105,122,101,44,32,115,105,122,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,116,97,114,116,84,105,109,101,114,32,40,54,48, - 41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,40, - 41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104, - 105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,99,111,108, - 111,117,114,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,69,108,108,105,112,115,101,32,40,120,32,45,32,103,101,116,88,40,41, - 44,32,121,32,45,32,103,101,116,89,40,41,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,50,46,48,102,44,32,103,101,116,72,101,105,103, - 104,116,40,41,32,45,32,50,46,48,102,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97, - 108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120,32,43,61,32,100,120,59,13,10,32,32,32,32,32, - 32,32,32,121,32,43,61,32,100,121,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120,32,60,32,48,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,100,120,32,61,32,102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120, - 32,62,32,103,101,116,80,97,114,101,110,116,87,105,100,116,104,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,120,32,61,32,45, - 102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,121,32,60,32,48,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,100,121,32,61,32,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,121, - 32,62,32,103,101,116,80,97,114,101,110,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,121,32,61,32, - 45,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105, - 111,110,32,40,40,105,110,116,41,32,120,44,32,40,105,110,116,41,32,121,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,98,111,111, - 108,32,104,105,116,84,101,115,116,32,40,105,110,116,32,120,44,32,105,110,116,32,121,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,114,101,116,117,114,110,32,102,97,108,115,101,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61, + 61,13,10,99,108,97,115,115,32,70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112, + 111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99, + 32,76,105,115,116,66,111,120,77,111,100,101,108,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,83,108,105,100,101,114,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32, + 32,32,79,119,110,101,100,65,114,114,97,121,32,60,70,111,110,116,62,32,102,111,110,116,115,59,13,10,32,32,32,32,76,105,115,116,66,111,120,42, + 32,108,105,115,116,66,111,120,59,13,10,32,32,32,32,84,101,120,116,69,100,105,116,111,114,42,32,116,101,120,116,66,111,120,59,13,10,32,32,32, + 32,84,111,103,103,108,101,66,117,116,116,111,110,42,32,98,111,108,100,66,117,116,116,111,110,59,13,10,32,32,32,32,84,111,103,103,108,101,66,117, + 116,116,111,110,42,32,105,116,97,108,105,99,66,117,116,116,111,110,59,13,10,32,32,32,32,83,108,105,100,101,114,42,32,115,105,122,101,83,108,105, + 100,101,114,59,13,10,13,10,32,32,32,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,77,97,110,97,103,101,114,32,118,101,114, + 116,105,99,97,108,76,97,121,111,117,116,59,13,10,32,32,32,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,77,97,110,97,103, + 101,114,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,59,13,10,13,10,32,32,32,32,83,116,114,101,116,99,104,97,98,108,101,76, + 97,121,111,117,116,82,101,115,105,122,101,114,66,97,114,42,32,118,101,114,116,105,99,97,108,68,105,118,105,100,101,114,66,97,114,59,13,10,32,32, + 32,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,82,101,115,105,122,101,114,66,97,114,42,32,104,111,114,105,122,111,110,116,97, + 108,68,105,118,105,100,101,114,66,97,114,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,114,97, - 103,79,110,116,111,68,101,115,107,116,111,112,68,101,109,111,67,111,109,112,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,13, - 10,123,13,10,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,112,97,114,101,110,116,59,13,10,32,32,32,32,67,111,109,112,111,110,101,110, - 116,68,114,97,103,103,101,114,32,100,114,97,103,103,101,114,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,114,97,103,79,110, - 116,111,68,101,115,107,116,111,112,68,101,109,111,67,111,109,112,32,40,67,111,109,112,111,110,101,110,116,42,32,112,41,13,10,32,32,32,32,32,32, - 32,32,58,32,112,97,114,101,110,116,32,40,112,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,115,104,111,119,32,111, - 102,102,32,115,101,109,105,45,116,114,97,110,115,112,97,114,101,110,99,121,32,105,102,32,105,116,39,115,32,115,117,112,112,111,114,116,101,100,32,98, - 121,32,116,104,101,32,99,117,114,114,101,110,116,32,79,83,46,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,33,32, - 68,101,115,107,116,111,112,58,58,99,97,110,85,115,101,83,101,109,105,84,114,97,110,115,112,97,114,101,110,116,87,105,110,100,111,119,115,40,41,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,51,59,32,45,45,105,32,62,61,32,48,59,41,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,110,101,119,32,66,111,117,110, - 99,105,110,103,66,97,108,108,67,111,109,112,111,110,101,110,116,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,114,97, - 103,79,110,116,111,68,101,115,107,116,111,112,68,101,109,111,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100, - 101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109, - 111,117,115,101,68,111,119,110,32,40,99,111,110,115,116,32,77,111,117,115,101,69,118,101,110,116,38,32,101,41,13,10,32,32,32,32,123,13,10,32, - 32,32,32,32,32,32,32,100,114,97,103,103,101,114,46,115,116,97,114,116,68,114,97,103,103,105,110,103,67,111,109,112,111,110,101,110,116,32,40,116, - 104,105,115,44,32,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109,111,117,115,101,68,114,97,103,32,40,99, - 111,110,115,116,32,77,111,117,115,101,69,118,101,110,116,38,32,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40, - 33,32,112,97,114,101,110,116,45,62,105,115,86,97,108,105,100,67,111,109,112,111,110,101,110,116,40,41,41,13,10,32,32,32,32,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,116,104,105,115,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32, - 32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,77,111,117,115, - 101,69,118,101,110,116,32,101,50,32,40,101,46,103,101,116,69,118,101,110,116,82,101,108,97,116,105,118,101,84,111,32,40,112,97,114,101,110,116,41, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105,102,32,116,104,101,32,109,111,117,115,101,32,105,115,32,105,110,115, - 105,100,101,32,116,104,101,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,44,32,119,101,39,108,108,32,109,97,107,101,32,116,104,97, - 116,32,116,104,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,112,97,114,101,110,116,32,45,32,111,116,104,101,114,119,105,115,101, - 44,32,119,101,39,108,108,32,112,117,116,32,116,104,105,115,32,99,111,109,112,32,111,110,32,116,104,101,32,100,101,115,107,116,111,112,46,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,101,50,46,120,32,62,61,32,48,32,38,38,32,101,50,46,121,32,62,61,32,48,32,38,38, - 32,101,50,46,120,32,60,32,112,97,114,101,110,116,45,62,103,101,116,87,105,100,116,104,40,41,32,38,38,32,101,50,46,121,32,60,32,112,97,114, - 101,110,116,45,62,103,101,116,72,101,105,103,104,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,47,47,32,114,101,45,97,100,100,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,32,116,111,32,97,32, - 112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,44,32,119,104,105,99,104,32,119,105,108,108,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,47,47,32,114,101,109,111,118,101,32,105,116,32,102,114,111,109,32,116,104,101,32,100,101,115,107,116,111,112,46,46,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,97,114,101,110,116,45,62,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116, - 32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115, - 101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,100,100, - 32,116,104,101,32,99,111,109,112,111,110,101,110,116,32,116,111,32,116,104,101,32,100,101,115,107,116,111,112,44,32,119,104,105,99,104,32,119,105,108, - 108,32,114,101,109,111,118,101,32,105,116,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,102,114,111,109,32,105,116,115, - 32,99,117,114,114,101,110,116,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,97,100,100,84,111,68,101,115,107,116,111,112,32,40,67,111,109,112,111,110,101,110,116,80,101,101,114,58,58,119,105,110,100,111,119, - 73,115,84,101,109,112,111,114,97,114,121,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,100,114,97,103,103,101,114,46,100,114,97,103,67,111,109,112,111,110,101,110,116,32,40,116,104,105,115,44,32,101,41,59,13,10,32,32, - 32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105, - 99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,79,112,97,113,117,101,40,41,41,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13, - 10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111, - 108,111,117,114,115,58,58,98,108,117,101,46,119,105,116,104,65,108,112,104,97,32,40,48,46,50,102,41,41,59,13,10,13,10,32,32,32,32,32,32, - 32,32,83,116,114,105,110,103,32,100,101,115,99,32,40,84,40,34,100,114,97,103,32,116,104,105,115,32,98,111,120,32,111,110,116,111,32,116,104,101, - 32,100,101,115,107,116,111,112,32,116,111,32,115,104,111,119,32,104,111,119,32,116,104,101,32,115,97,109,101,32,99,111,109,112,111,110,101,110,116,32, - 99,97,110,32,109,111,118,101,32,102,114,111,109,32,98,101,105,110,103,32,108,105,103,104,116,119,101,105,103,104,116,32,116,111,32,98,101,105,110,103, - 32,97,32,115,101,112,97,114,97,116,101,32,119,105,110,100,111,119,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,70, - 111,110,116,32,40,49,53,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117, - 114,115,58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,70,105,116,116,101,100,84,101,120,116,32,40,100, - 101,115,99,44,32,52,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,56,44,32,103,101,116,72,101,105,103,104,116,40,41,44,32, - 74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,104,111,114,105,122,111,110,116,97,108,108,121,74,117,115,116,105,102,105,101,100,44,32,53,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,82,101,99,116,32,40,48,44,32,48,44,32,103,101,116,87,105,100,116,104,40, - 41,44,32,103,101,116,72,101,105,103,104,116,40,41,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,67, - 117,115,116,111,109,77,101,110,117,67,111,109,112,111,110,101,110,116,32,32,58,32,112,117,98,108,105,99,32,80,111,112,117,112,77,101,110,117,67,117, - 115,116,111,109,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,112,117,98,108,105,99,32,84,105,109,101,114,13,10,123,13,10,32,32,32,32,105,110,116,32,98,108,111,98,88,44,32,98,108,111, - 98,89,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,67,117,115,116,111,109,77,101,110,117,67,111,109,112,111,110,101,110,116,40, - 41,13,10,32,32,32,32,32,32,32,32,58,32,98,108,111,98,88,32,40,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,98,108,111,98,89, - 32,40,48,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,115,101,116,32,111,102,102,32,97,32,116,105,109,101,114,32, - 116,111,32,109,111,118,101,32,97,32,98,108,111,98,32,97,114,111,117,110,100,32,111,110,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,32, - 101,118,101,114,121,13,10,32,32,32,32,32,32,32,32,47,47,32,51,48,48,32,109,105,108,108,105,115,101,99,111,110,100,115,32,45,32,115,101,101, - 32,116,104,101,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,32,109,101,116,104,111,100,46,13,10,32,32,32,32,32,32,32,32,115,116, - 97,114,116,84,105,109,101,114,32,40,51,48,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,67,117,115,116,111,109,77,101,110, - 117,67,111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,103, - 101,116,73,100,101,97,108,83,105,122,101,32,40,105,110,116,38,32,105,100,101,97,108,87,105,100,116,104,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,38,32,105,100,101,97,108,72,101,105,103,104,116,41,13,10,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,47,47,32,116,101,108,108,115,32,116,104,101,32,109,101,110,117,32,104,111,119,32,98,105,103,32,119,101,39,100,32,108, - 105,107,101,32,116,111,32,98,101,46,46,13,10,32,32,32,32,32,32,32,32,105,100,101,97,108,87,105,100,116,104,32,61,32,50,48,48,59,13,10, - 32,32,32,32,32,32,32,32,105,100,101,97,108,72,101,105,103,104,116,32,61,32,54,48,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, - 118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,121,101,108,108,111,119,46,119,105,116,104,65,108,112,104,97,32,40,48, - 46,51,102,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58, - 112,105,110,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,69,108,108,105,112,115,101,32,40,40,102,108,111,97,116,41,32,98, - 108,111,98,88,44,32,40,102,108,111,97,116,41,32,98,108,111,98,89,44,32,51,48,46,48,102,44,32,52,48,46,48,102,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,49,52,46,48,102,44,32,70,111,110,116,58,58,105,116,97,108,105,99,41,59,13, - 10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,70,105,116,116,101,100,84,101,120,116,32,40,84,40,34,116,104,105,115,32,105,115,32,97, - 32,99,117,115,116,111,109,105,115,101,100,32,109,101,110,117,32,105,116,101,109,32,40,97,108,115,111,32,100,101,109,111,110,115,116,114,97,116,105,110, - 103,32,116,104,101,32,84,105,109,101,114,32,99,108,97,115,115,41,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,52,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,56,44,32,103,101,116,72,101,105, - 103,104,116,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,74,117,115,116,105,102, - 105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,44,32,51,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100, - 32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,98,108,111,98,88,32,61, - 32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,87, - 105,100,116,104,40,41,41,59,13,10,32,32,32,32,32,32,32,32,98,108,111,98,89,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115, - 116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,72,101,105,103,104,116,40,41,41,59,13,10,32,32,32,32, - 32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,84,111,32,100,101, - 109,111,110,115,116,114,97,116,101,32,104,111,119,32,115,108,105,100,101,114,115,32,99,97,110,32,104,97,118,101,32,99,117,115,116,111,109,32,115,110, - 97,112,112,105,110,103,32,97,112,112,108,105,101,100,32,116,111,32,116,104,101,105,114,32,118,97,108,117,101,115,44,13,10,32,32,32,32,116,104,105, - 115,32,115,105,109,112,108,101,32,99,108,97,115,115,32,115,110,97,112,115,32,116,104,101,32,118,97,108,117,101,32,116,111,32,53,48,32,105,102,32, - 105,116,32,99,111,109,101,115,32,110,101,97,114,46,13,10,42,47,13,10,99,108,97,115,115,32,83,110,97,112,112,105,110,103,83,108,105,100,101,114, - 32,32,58,32,112,117,98,108,105,99,32,83,108,105,100,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,83,110,97,112,112, - 105,110,103,83,108,105,100,101,114,32,40,99,111,110,115,116,32,83,116,114,105,110,103,38,32,110,97,109,101,41,13,10,32,32,32,32,32,32,32,32, - 58,32,83,108,105,100,101,114,32,40,110,97,109,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,100,111,117, - 98,108,101,32,115,110,97,112,86,97,108,117,101,32,40,100,111,117,98,108,101,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,44,32,99,111, - 110,115,116,32,98,111,111,108,32,117,115,101,114,73,115,68,114,97,103,103,105,110,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,105,102,32,40,33,32,117,115,101,114,73,115,68,114,97,103,103,105,110,103,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117, - 114,110,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,59,32,32,47,47,32,105,102,32,116,104,101,121,39,114,101,32,101,110,116,101,114,105, - 110,103,32,116,104,101,32,118,97,108,117,101,32,105,110,32,116,104,101,32,116,101,120,116,45,98,111,120,44,32,100,111,110,39,116,32,109,101,115,115, - 32,119,105,116,104,32,105,116,46,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,97,116,116,101,109,112,116,101,100,86,97,108,117,101,32, - 62,32,52,48,32,38,38,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,32,60,32,54,48,41,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,114,101,116,117,114,110,32,53,48,46,48,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,114,101,116,117,114,110,32,97,116,116,101,109,112,116,101,100,86,97,108,117,101,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47, - 42,42,32,65,32,84,101,120,116,66,117,116,116,111,110,32,116,104,97,116,32,112,111,112,115,32,117,112,32,97,32,99,111,108,111,117,114,32,99,104, - 111,111,115,101,114,32,116,111,32,99,104,97,110,103,101,32,105,116,115,32,99,111,108,111,117,114,115,46,32,42,47,13,10,99,108,97,115,115,32,67, - 111,108,111,117,114,67,104,97,110,103,101,66,117,116,116,111,110,32,32,58,32,112,117,98,108,105,99,32,84,101,120,116,66,117,116,116,111,110,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,67,104,97,110, - 103,101,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,67,111,108,111,117,114,67,104,97,110,103,101, - 66,117,116,116,111,110,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,99,108,105,99,107, - 32,116,111,32,99,104,97,110,103,101,32,99,111,108,111,117,114,46,46,46,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, - 115,101,116,83,105,122,101,32,40,49,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,99,104,97,110,103,101,87,105,100,116,104,84,111, - 70,105,116,84,101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,67,111,108,111,117,114,67,104,97,110,103,101,66,117, - 116,116,111,110,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,108,105,99,107,101,100, - 40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,116,119,111,32,99,111,108,111,117,114,32, - 115,101,108,101,99,116,111,114,32,99,111,109,112,111,110,101,110,116,115,32,102,111,114,32,111,117,114,32,98,97,99,107,103,114,111,117,110,100,32,97, - 110,100,13,10,32,32,32,32,32,32,32,32,47,47,32,116,101,120,116,32,99,111,108,111,117,114,46,46,13,10,32,32,32,32,32,32,32,32,67,111, - 108,111,117,114,83,101,108,101,99,116,111,114,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,59,13,10,32,32,32,32,32,32,32,32,99, - 111,108,111,117,114,83,101,108,101,99,116,111,114,49,46,115,101,116,78,97,109,101,32,40,84,40,34,98,97,99,107,103,114,111,117,110,100,34,41,41, - 59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,46,115,101,116,67,117,114,114,101,110,116,67,111,108, - 111,117,114,32,40,102,105,110,100,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117, - 114,73,100,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,46,97,100,100,67,104,97,110,103, - 101,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,67,111,108,111,117,114,83,101,108,101,99, - 116,111,114,32,99,111,108,111,117,114,83,101,108,101,99,116,111,114,50,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,83,101,108,101, - 99,116,111,114,50,46,115,101,116,78,97,109,101,32,40,84,40,34,116,101,120,116,34,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111, - 117,114,83,101,108,101,99,116,111,114,50,46,115,101,116,67,117,114,114,101,110,116,67,111,108,111,117,114,32,40,102,105,110,100,67,111,108,111,117,114, - 32,40,84,101,120,116,66,117,116,116,111,110,58,58,116,101,120,116,67,111,108,111,117,114,73,100,41,41,59,13,10,32,32,32,32,32,32,32,32,99, - 111,108,111,117,114,83,101,108,101,99,116,111,114,50,46,97,100,100,67,104,97,110,103,101,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,97,100,100,32,116,104,101,32,115,101,108,101,99,116,111,114,115,32,97,115,32, - 99,117,115,116,111,109,32,109,101,110,117,32,105,116,101,109,115,32,116,111,32,97,32,80,111,112,117,112,77,101,110,117,44,32,112,117,116,116,105,110, - 103,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,109,32,105,110,32,116,119,111,32,100,105,102,102,101,114,101,110,116,32,115,117,98,45, - 109,101,110,117,115,46,46,13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,109,44,32,115,117,98,49,44,32,115,117,98,50, - 59,13,10,13,10,32,32,32,32,32,32,32,32,115,117,98,49,46,97,100,100,67,117,115,116,111,109,73,116,101,109,32,40,49,50,51,52,44,32,38, - 99,111,108,111,117,114,83,101,108,101,99,116,111,114,49,44,32,51,48,48,44,32,51,48,48,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32, - 32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,98,97,99,107,103,114,111,117,110,100,32,99,111,108,111,117,114,34,41, - 44,32,115,117,98,49,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,117,98,50,46,97,100,100,67,117,115,116,111,109,73,116,101,109,32,40, - 49,50,51,52,44,32,38,99,111,108,111,117,114,83,101,108,101,99,116,111,114,50,44,32,51,48,48,44,32,51,48,48,44,32,102,97,108,115,101,41, - 59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,116,101,120,116,32,99,111,108,111,117,114,34, - 41,44,32,115,117,98,50,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,100,32,115,104,111,119,32,116,104,101,32,109,101,110, - 117,32,40,109,111,100,97,108,108,121,41,46,46,13,10,32,32,32,32,32,32,32,32,109,46,115,104,111,119,65,116,32,40,116,104,105,115,41,59,13, - 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,104,97,110,103,101,76,105,115,116,101,110,101,114,67,97,108,108,98,97,99, - 107,32,40,118,111,105,100,42,32,115,111,117,114,99,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,67,111,108,111,117,114,83, - 101,108,101,99,116,111,114,42,32,99,115,32,61,32,40,67,111,108,111,117,114,83,101,108,101,99,116,111,114,42,41,32,115,111,117,114,99,101,59,13, - 10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,99,115,45,62,103,101,116,78,97,109,101,40,41,32,61,61,32,84,40,34,116,101,120,116,34, - 41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58,116, - 101,120,116,67,111,108,111,117,114,73,100,44,32,99,115,45,62,103,101,116,67,117,114,114,101,110,116,67,111,108,111,117,114,40,41,41,59,13,10,32, - 32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116, - 66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117,114,73,100,44,32,99,115,45,62,103,101,116,67,117,114,114,101,110,116,67,111, - 108,111,117,114,40,41,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,47,32,106,117,115,116,32,97,32,99,111,109,112,111, - 110,101,110,116,32,116,104,97,116,32,100,101,108,101,116,101,115,32,97,108,108,32,105,116,115,32,99,104,105,108,100,114,101,110,44,32,116,111,32,117, - 115,101,32,102,111,114,32,116,104,101,32,116,97,98,98,101,100,32,112,97,103,101,115,32,116,111,32,97,118,111,105,100,13,10,47,47,32,109,101,109, - 111,114,121,32,108,101,97,107,115,32,119,104,101,110,32,116,104,101,121,39,114,101,32,100,101,108,101,116,101,100,13,10,99,108,97,115,115,32,68,101, - 109,111,80,97,103,101,67,111,109,112,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,13,10,123,13,10,112,117,98,108,105, - 99,58,13,10,32,32,32,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10, - 32,32,32,32,126,68,101,109,111,80,97,103,101,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101, - 116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,115,116,97,116,105,99,32, - 67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,83,108,105,100,101,114,115,80,97,103,101,40,41,13,10,123,13,10,32,32,32,32,68, - 101,109,111,80,97,103,101,67,111,109,112,42,32,112,97,103,101,32,61,32,110,101,119,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,59,13, - 10,13,10,32,32,32,32,99,111,110,115,116,32,105,110,116,32,110,117,109,83,108,105,100,101,114,115,32,61,32,49,49,59,13,10,32,32,32,32,83, - 108,105,100,101,114,42,32,115,108,105,100,101,114,115,32,91,110,117,109,83,108,105,100,101,114,115,93,59,13,10,13,10,32,32,32,32,105,110,116,32, - 105,59,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32,60,32,110,117,109,83,108,105,100,101,114,115,59,32,43,43,105,41, - 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61,61,32,50,41,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,108,105,100,101,114,115,91,105,93,32,61,32, - 110,101,119,32,83,110,97,112,112,105,110,103,83,108,105,100,101,114,32,40,84,40,34,115,108,105,100,101,114,34,41,41,41,59,13,10,32,32,32,32, - 32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105, - 115,105,98,108,101,32,40,115,108,105,100,101,114,115,91,105,93,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,115,108,105,100,101, - 114,34,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115,101,116,82,97,110,103,101,32,40, - 48,46,48,44,32,49,48,48,46,48,44,32,48,46,49,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115, - 101,116,80,111,112,117,112,77,101,110,117,69,110,97,98,108,101,100,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100, - 101,114,115,91,105,93,45,62,115,101,116,86,97,108,117,101,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111, - 109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,32,42,32,49,48,48,46,48,44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59, - 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,48,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108, - 101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,86,101,114,116,105,99,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115, - 91,48,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,66,101,108, - 111,119,44,32,102,97,108,115,101,44,32,49,48,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,48,93,45,62,115,101, - 116,66,111,117,110,100,115,32,40,49,48,44,32,50,53,44,32,55,48,44,32,50,48,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91, - 48,93,45,62,115,101,116,68,111,117,98,108,101,67,108,105,99,107,82,101,116,117,114,110,86,97,108,117,101,32,40,116,114,117,101,44,32,53,48,46, - 48,41,59,32,47,47,32,100,111,117,98,108,101,45,99,108,105,99,107,105,110,103,32,116,104,105,115,32,115,108,105,100,101,114,32,119,105,108,108,32, - 115,101,116,32,105,116,32,116,111,32,53,48,46,48,13,10,32,32,32,32,115,108,105,100,101,114,115,91,48,93,45,62,115,101,116,84,101,120,116,86, - 97,108,117,101,83,117,102,102,105,120,32,40,84,40,34,32,117,110,105,116,115,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115, - 91,49,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,86,101,114,116,105, - 99,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,86,101,108,111,99,105,116,121,66,97,115,101,100,77, - 111,100,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,83,107,101,119,70,97,99,116, - 111,114,32,40,48,46,53,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121, - 108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,65,98,111,118,101,44,32,116,114,117,101,44,32,49,48,48,44,32,50,48,41, - 59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,66,111,117,110,100,115,32,40,56,53,44,32,50,53,44,32,55,48, - 44,32,50,48,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,93,45,62,115,101,116,84,101,120,116,86,97,108,117,101,83,117,102, - 102,105,120,32,40,84,40,34,32,114,101,108,115,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,50,93,45,62,115,101,116, - 83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,72,111,114,105,122,111,110,116,97,108,41,59,13, - 10,32,32,32,32,115,108,105,100,101,114,115,91,50,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114, - 58,58,84,101,120,116,66,111,120,76,101,102,116,44,32,102,97,108,115,101,44,32,56,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100, - 101,114,115,91,50,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32,51,53,44,32,49,53,48,44,32,50,48,41,59,13,10,13, - 10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58, - 58,76,105,110,101,97,114,72,111,114,105,122,111,110,116,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116, - 84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,78,111,84,101,120,116,66,111,120,44,32,102,97,108,115,101,44,32, - 48,44,32,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32, - 54,53,44,32,49,53,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,51,93,45,62,115,101,116,80,111,112,117,112,68, - 105,115,112,108,97,121,69,110,97,98,108,101,100,32,40,116,114,117,101,44,32,112,97,103,101,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115, - 91,51,93,45,62,115,101,116,84,101,120,116,86,97,108,117,101,83,117,102,102,105,120,32,40,84,40,34,32,110,117,110,115,32,114,101,113,117,105,114, - 101,100,32,116,111,32,99,104,97,110,103,101,32,97,32,108,105,103,104,116,98,117,108,98,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100, - 101,114,115,91,52,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,73,110,99,68,101,99,66,117, - 116,116,111,110,115,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,52,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101, - 32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,76,101,102,116,44,32,102,97,108,115,101,44,32,53,48,44,32,50,48,41,59,13,10, - 32,32,32,32,115,108,105,100,101,114,115,91,52,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32,49,48,53,44,32,49,48,48, - 44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,52,93,45,62,115,101,116,73,110,99,68,101,99,66,117,116,116,111,110,115, - 77,111,100,101,32,40,83,108,105,100,101,114,58,58,105,110,99,68,101,99,66,117,116,116,111,110,115,68,114,97,103,103,97,98,108,101,95,86,101,114, - 116,105,99,97,108,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108, - 101,32,40,83,108,105,100,101,114,58,58,82,111,116,97,114,121,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116, - 82,111,116,97,114,121,80,97,114,97,109,101,116,101,114,115,32,40,102,108,111,97,116,95,80,105,32,42,32,49,46,50,102,44,32,102,108,111,97,116, - 95,80,105,32,42,32,50,46,56,102,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116, - 84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,82,105,103,104,116,44,32,102,97,108,115, - 101,44,32,55,48,44,32,50,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116,66,111,117,110,100,115,32,40, - 49,57,48,44,32,49,52,53,44,32,49,50,48,44,32,52,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,53,93,45,62,115,101,116, - 84,101,120,116,86,97,108,117,101,83,117,102,102,105,120,32,40,84,40,34,32,109,109,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101, - 114,115,91,54,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,66,97,114, - 41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,54,93,45,62,115,101,116,66,111,117,110,100,115,32,40,49,56,48,44,32,49,57,53,44, - 32,49,48,48,44,32,51,48,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,54,93,45,62,115,101,116,84,101,120,116,86,97,108,117,101, - 83,117,102,102,105,120,32,40,84,40,34,32,103,97,108,108,111,110,115,34,41,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,55, - 93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,119,111,86,97,108,117,101,72,111,114,105,122, - 111,110,116,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,55,93,45,62,115,101,116,66,111,117,110,100,115,32,40,51,54,48,44, - 32,50,48,44,32,49,54,48,44,32,52,48,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,56,93,45,62,115,101,116,83,108,105, - 100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,119,111,86,97,108,117,101,86,101,114,116,105,99,97,108,41,59,13,10,32,32, - 32,32,115,108,105,100,101,114,115,91,56,93,45,62,115,101,116,66,111,117,110,100,115,32,40,51,54,48,44,32,49,49,48,44,32,52,48,44,32,49, - 54,48,41,59,13,10,13,10,32,32,32,32,115,108,105,100,101,114,115,91,57,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40, - 83,108,105,100,101,114,58,58,84,104,114,101,101,86,97,108,117,101,72,111,114,105,122,111,110,116,97,108,41,59,13,10,32,32,32,32,115,108,105,100, - 101,114,115,91,57,93,45,62,115,101,116,66,111,117,110,100,115,32,40,51,54,48,44,32,55,48,44,32,49,54,48,44,32,52,48,41,59,13,10,13, - 10,32,32,32,32,115,108,105,100,101,114,115,91,49,48,93,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114, - 58,58,84,104,114,101,101,86,97,108,117,101,86,101,114,116,105,99,97,108,41,59,13,10,32,32,32,32,115,108,105,100,101,114,115,91,49,48,93,45, - 62,115,101,116,66,111,117,110,100,115,32,40,52,52,48,44,32,49,49,48,44,32,52,48,44,32,49,54,48,41,59,13,10,13,10,32,32,32,32,102, - 111,114,32,40,105,32,61,32,55,59,32,105,32,60,61,32,49,48,59,32,43,43,105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, - 32,115,108,105,100,101,114,115,91,105,93,45,62,115,101,116,84,101,120,116,66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,78,111, - 84,101,120,116,66,111,120,44,32,102,97,108,115,101,44,32,48,44,32,48,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91, - 105,93,45,62,115,101,116,77,105,110,86,97,108,117,101,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109, - 40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,32,42,32,49,48,48,46,48,44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59,13, - 10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115,101,116,77,97,120,86,97,108,117,101,32,40,82,97,110,100,111,109, - 58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,32,42,32,49,48,48,46,48, - 44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,115,108,105,100,101,114,115,91,105,93,45,62,115,101, - 116,80,111,112,117,112,68,105,115,112,108,97,121,69,110,97,98,108,101,100,32,40,116,114,117,101,44,32,112,97,103,101,41,59,13,10,32,32,32,32, - 125,13,10,13,10,32,32,32,32,76,97,98,101,108,42,32,108,97,98,101,108,32,61,32,110,101,119,32,76,97,98,101,108,32,40,84,40,34,104,105, - 110,116,34,41,44,32,84,40,34,84,114,121,32,114,105,103,104,116,45,99,108,105,99,107,105,110,103,32,111,110,32,97,32,115,108,105,100,101,114,32, - 102,111,114,32,97,110,32,111,112,116,105,111,110,115,32,109,101,110,117,46,32,92,110,92,110,65,108,115,111,44,32,104,111,108,100,105,110,103,32,100, - 111,119,110,32,67,84,82,76,32,119,104,105,108,101,32,100,114,97,103,103,105,110,103,32,119,105,108,108,32,116,117,114,110,32,111,110,32,97,32,115, - 108,105,100,101,114,39,115,32,118,101,108,111,99,105,116,121,45,115,101,110,115,105,116,105,118,101,32,109,111,100,101,34,41,41,59,13,10,32,32,32, - 32,108,97,98,101,108,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,44,32,50,52,53,44,32,51,53,48,44,32,49,53,48,41,59,13,10, - 32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,108,97,98,101,108,41,59,13,10,13,10, - 32,32,32,32,114,101,116,117,114,110,32,112,97,103,101,59,13,10,125,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,115,116,97,116,105,99,32,67,111,109,112,111,110,101,110, - 116,42,32,99,114,101,97,116,101,82,97,100,105,111,66,117,116,116,111,110,80,97,103,101,40,41,13,10,123,13,10,32,32,32,32,68,101,109,111,80, - 97,103,101,67,111,109,112,42,32,112,97,103,101,32,61,32,110,101,119,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,59,13,10,13,10,32, - 32,32,32,71,114,111,117,112,67,111,109,112,111,110,101,110,116,42,32,103,114,111,117,112,32,61,32,110,101,119,32,71,114,111,117,112,67,111,109,112, - 111,110,101,110,116,32,40,84,40,34,103,114,111,117,112,34,41,44,32,84,40,34,114,97,100,105,111,32,98,117,116,116,111,110,115,34,41,41,59,13, - 10,32,32,32,32,103,114,111,117,112,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,44,32,50,48,44,32,50,50,48,44,32,49,52,48,41, - 59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,103,114,111,117,112,41,59,13, - 10,13,10,32,32,32,32,105,110,116,32,105,59,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32,60,32,52,59,32,43,43, - 105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,84,111,103,103,108,101,66,117,116,116,111,110,42,32,116,98,32,61,32,110,101, - 119,32,84,111,103,103,108,101,66,117,116,116,111,110,32,40,84,40,34,114,97,100,105,111,32,98,117,116,116,111,110,32,35,34,41,32,43,32,83,116, - 114,105,110,103,32,40,105,32,43,32,49,41,41,59,13,10,32,32,32,32,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101, - 86,105,115,105,98,108,101,32,40,116,98,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,82,97,100,105,111,71,114,111,117,112, - 73,100,32,40,49,50,51,52,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,66,111,117,110,100,115,32,40,52,53,44,32,52, - 54,32,43,32,105,32,42,32,50,50,44,32,49,56,48,44,32,50,50,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,84,111, - 111,108,116,105,112,32,40,84,40,34,97,32,115,101,116,32,111,102,32,109,117,116,117,97,108,108,121,45,101,120,99,108,117,115,105,118,101,32,114,97, - 100,105,111,32,98,117,116,116,111,110,115,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61,61,32,48,41,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114,117,101,44,32,102,97, - 108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32,60,32,52,59,32,43, - 43,105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,80,97,116,104,32,110,111,114,109,97,108,44, - 32,111,118,101,114,59,13,10,13,10,32,32,32,32,32,32,32,32,80,97,116,104,32,112,59,13,10,32,32,32,32,32,32,32,32,112,46,97,100,100, - 83,116,97,114,32,40,48,46,48,102,44,32,48,46,48,102,44,32,105,32,43,32,53,44,32,50,48,46,48,102,44,32,53,48,46,48,102,44,32,45, - 48,46,50,102,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,80,97,116,104,32,40,112,41,59,13,10,32,32,32, - 32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,83,111,108,105,100,70,105,108,108,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116, - 98,108,117,101,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,79,117,116,108,105,110,101,32,40,52,46,48,102,44, - 32,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,80,97,116, - 104,32,40,112,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,83,111,108,105,100,70,105,108,108,32,40,67,111,108,111,117, - 114,115,58,58,98,108,117,101,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,79,117,116,108,105,110,101,32,40,52,46,48, - 102,44,32,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,66, - 117,116,116,111,110,42,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,83,116,114,105,110,103,32,40, - 105,32,43,32,53,41,32,43,32,84,40,34,32,112,111,105,110,116,115,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73, - 109,97,103,101,65,98,111,118,101,84,101,120,116,76,97,98,101,108,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97, - 103,101,115,32,40,38,110,111,114,109,97,108,44,32,38,111,118,101,114,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,112,97,103,101, - 45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115, - 101,116,67,108,105,99,107,105,110,103,84,111,103,103,108,101,115,83,116,97,116,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32, - 100,98,45,62,115,101,116,82,97,100,105,111,71,114,111,117,112,73,100,32,40,50,51,52,53,54,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 99,111,110,115,116,32,105,110,116,32,98,117,116,116,111,110,83,105,122,101,32,61,32,53,48,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62, - 115,101,116,66,111,117,110,100,115,32,40,50,53,32,43,32,105,32,42,32,98,117,116,116,111,110,83,105,122,101,44,32,49,56,48,44,32,98,117,116, - 116,111,110,83,105,122,101,44,32,98,117,116,116,111,110,83,105,122,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61, - 61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114, - 117,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,48,59,32,105,32, - 60,32,52,59,32,43,43,105,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,116,98, - 32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,98,117,116,116,111,110,32,34,41,32,43,32,83,116,114,105,110,103, - 32,40,105,32,43,32,49,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105, - 115,105,98,108,101,32,40,116,98,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,67,108,105,99,107,105,110,103,84,111,103,103, - 108,101,115,83,116,97,116,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,82,97,100,105,111,71,114, - 111,117,112,73,100,32,40,51,52,53,54,55,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,67,111,108,111,117,114,32,40,84, - 101,120,116,66,117,116,116,111,110,58,58,98,117,116,116,111,110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,119,104,105,116, - 101,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,67,111,108,111,117,114,32,40,84,101,120,116,66,117,116,116,111,110,58,58, - 98,117,116,116,111,110,79,110,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115,58,58,98,108,117,101,118,105,111,108,101,116,46,98,114, - 105,103,104,116,101,114,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,32, - 43,32,105,32,42,32,53,53,44,32,50,54,48,44,32,53,53,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116, - 67,111,110,110,101,99,116,101,100,69,100,103,101,115,32,40,40,40,105,32,33,61,32,48,41,32,63,32,66,117,116,116,111,110,58,58,67,111,110,110, - 101,99,116,101,100,79,110,76,101,102,116,32,58,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,124,32,40,40,105,32,33,61,32,51,41,32,63,32,66,117,116,116,111,110,58,58,67,111,110,110,101,99,116,101, - 100,79,110,82,105,103,104,116,32,58,32,48,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,32,61,61,32,48,41,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,116,98,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114,117,101,44,32,102,97, - 108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,114,101,116,117,114,110,32,112,97,103,101,59,13,10,125,13,10,13,10,47, - 47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13, - 10,99,108,97,115,115,32,66,117,116,116,111,110,115,80,97,103,101,32,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115, - 116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,66,117,116,116,111,110,115,80,97,103,101,32,40,66,117,116,116, - 111,110,76,105,115,116,101,110,101,114,42,32,98,117,116,116,111,110,76,105,115,116,101,110,101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,115,111,109,101,32,100,114,97,119,97,98,108,101,115,32,116, - 111,32,117,115,101,32,102,111,114,32,111,117,114,32,100,114,97,119,97,98,108,101,32,98,117,116,116,111,110,115,46,46,46,13,10,32,32,32,32,32, - 32,32,32,68,114,97,119,97,98,108,101,80,97,116,104,32,110,111,114,109,97,108,44,32,111,118,101,114,59,13,10,13,10,32,32,32,32,32,32,32, - 32,80,97,116,104,32,112,59,13,10,32,32,32,32,32,32,32,32,112,46,97,100,100,83,116,97,114,32,40,48,46,48,102,44,32,48,46,48,102,44, - 32,53,44,32,50,48,46,48,102,44,32,53,48,46,48,102,44,32,48,46,50,102,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108, - 46,115,101,116,80,97,116,104,32,40,112,41,59,13,10,32,32,32,32,32,32,32,32,110,111,114,109,97,108,46,115,101,116,83,111,108,105,100,70,105, - 108,108,32,40,67,111,108,111,117,114,115,58,58,114,101,100,41,59,13,10,13,10,32,32,32,32,32,32,32,32,112,46,99,108,101,97,114,40,41,59, - 13,10,32,32,32,32,32,32,32,32,112,46,97,100,100,83,116,97,114,32,40,48,46,48,102,44,32,48,46,48,102,44,32,55,44,32,51,48,46,48, - 102,44,32,53,48,46,48,102,44,32,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,80,97,116,104,32,40, - 112,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,83,111,108,105,100,70,105,108,108,32,40,67,111,108,111,117,114,115,58, - 58,112,105,110,107,41,59,13,10,32,32,32,32,32,32,32,32,111,118,101,114,46,115,101,116,79,117,116,108,105,110,101,32,40,53,46,48,102,44,32, - 67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,73,109,97,103, - 101,32,100,111,119,110,59,13,10,32,32,32,32,32,32,32,32,100,111,119,110,46,115,101,116,73,109,97,103,101,32,40,73,109,97,103,101,67,97,99, - 104,101,58,58,103,101,116,70,114,111,109,77,101,109,111,114,121,32,40,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,44, - 32,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,44,32,116,114,117,101,41,59,13,10,32,32,32,32, - 32,32,32,32,100,111,119,110,46,115,101,116,79,118,101,114,108,97,121,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99, - 107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,51,102,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32, - 32,32,47,47,32,99,114,101,97,116,101,32,97,110,32,105,109,97,103,101,45,97,98,111,118,101,45,116,101,120,116,32,98,117,116,116,111,110,32,102, - 114,111,109,32,116,104,101,115,101,32,100,114,97,119,97,98,108,101,115,46,46,13,10,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,66, - 117,116,116,111,110,42,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,84,40,34,66,117,116,116,111, - 110,32,49,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,65,98,111,118,101,84,101,120,116,76,97,98, - 101,108,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97,103,101,115,32,40,38,110,111,114,109,97,108,44,32,38,111, - 118,101,114,44,32,38,100,111,119,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108, - 101,32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,51,48,44,32, - 56,48,44,32,56,48,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,104,105, - 115,32,105,115,32,97,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,119,105,116,104,32,97,32,108,97,98,101,108,34,41,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,110,32,105,109,97,103,101,45,111, - 110,108,121,32,98,117,116,116,111,110,32,102,114,111,109,32,116,104,101,115,101,32,100,114,97,119,97,98,108,101,115,46,46,13,10,32,32,32,32,32, - 32,32,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,84,40,34,66,117,116,116,111,110,32,50,34, - 41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,70,105,116,116,101,100,41,59,13,10,32,32,32,32,32,32, - 32,32,100,98,45,62,115,101,116,73,109,97,103,101,115,32,40,38,110,111,114,109,97,108,44,32,38,111,118,101,114,44,32,38,100,111,119,110,41,59, - 13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,67,108,105,99,107,105,110,103,84,111,103,103,108,101,115,83,116,97,116,101,32,40,116, - 114,117,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,100,98,41,59, - 13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,57,48,44,32,51,48,44,32,56,48,44,32,56,48,41, - 59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,104,105,115,32,105,115,32,97,110, - 32,105,109,97,103,101,45,111,110,108,121,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,34,41,41,59,13,10,32,32,32,32,32,32,32,32, - 100,98,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,98,117,116,116,111,110,76,105,115,116,101,110,101,114,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32,99,114,101,97,116,101,32,97,110,32,105,109,97,103,101,45, - 111,110,45,98,117,116,116,111,110,45,115,104,97,112,101,32,98,117,116,116,111,110,32,102,114,111,109,32,116,104,101,32,115,97,109,101,32,100,114,97, - 119,97,98,108,101,115,46,46,13,10,32,32,32,32,32,32,32,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111, - 110,32,40,84,40,34,66,117,116,116,111,110,32,51,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,79, - 110,66,117,116,116,111,110,66,97,99,107,103,114,111,117,110,100,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97,103, - 101,115,32,40,38,110,111,114,109,97,108,44,32,48,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107, - 101,86,105,115,105,98,108,101,32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,50, - 48,48,44,32,51,48,44,32,49,49,48,44,32,50,53,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105, - 112,32,40,84,40,34,116,104,105,115,32,105,115,32,97,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,111,110,32,97,32,115,116,97,110, - 100,97,114,100,32,98,117,116,116,111,110,32,98,97,99,107,103,114,111,117,110,100,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10, - 32,32,32,32,32,32,32,32,100,98,32,61,32,110,101,119,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,40,84,40,34,66,117,116,116, - 111,110,32,52,34,41,44,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,58,58,73,109,97,103,101,79,110,66,117,116,116,111,110,66,97,99, - 107,103,114,111,117,110,100,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,73,109,97,103,101,115,32,40,38,110,111,114,109,97, - 108,44,32,38,111,118,101,114,44,32,38,100,111,119,110,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,67,108,105,99,107,105, - 110,103,84,111,103,103,108,101,115,83,116,97,116,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66, - 97,99,107,103,114,111,117,110,100,67,111,108,111,117,114,115,32,40,67,111,108,111,117,114,115,58,58,119,104,105,116,101,44,32,67,111,108,111,117,114, - 115,58,58,121,101,108,108,111,119,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,100,98,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,48,44,32,55,48,44,32, - 53,48,44,32,53,48,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,104,105, - 115,32,105,115,32,97,32,68,114,97,119,97,98,108,101,66,117,116,116,111,110,32,111,110,32,97,32,115,116,97,110,100,97,114,100,32,98,117,116,116, - 111,110,32,98,97,99,107,103,114,111,117,110,100,34,41,41,59,13,10,32,32,32,32,32,32,32,32,100,98,45,62,97,100,100,66,117,116,116,111,110, - 76,105,115,116,101,110,101,114,32,40,98,117,116,116,111,110,76,105,115,116,101,110,101,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10, - 32,32,32,32,32,32,32,32,72,121,112,101,114,108,105,110,107,66,117,116,116,111,110,42,32,104,121,112,101,114,108,105,110,107,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,61,32,110,101,119,32,72,121,112,101,114,108,105,110,107,66,117,116,116,111,110,32,40,84,40,34,116,104,105,115,32,105, - 115,32,97,32,72,121,112,101,114,108,105,110,107,66,117,116,116,111,110,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,85,82,76,32,40,84,40,34,104,116,116,112,58,47,47,119,119,119,46,114, - 97,119,109,97,116,101,114,105,97,108,115,111,102,116,119,97,114,101,46,99,111,109,47,106,117,99,101,34,41,41,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,104,121,112,101,114,108,105,110,107,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,49,51,48,44,32,50,48,48,44,32, - 50,52,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,104,121,112,101,114,108,105, - 110,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,73,109,97,103,101,66,117,116,116,111,110,42,32,105, - 109,97,103,101,66,117,116,116,111,110,32,61,32,110,101,119,32,73,109,97,103,101,66,117,116,116,111,110,32,40,84,40,34,105,109,97,103,101,98,117, - 116,116,111,110,34,41,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,105,109,97, - 103,101,66,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,73,109,97,103,101,42,32,106,117,99,101,73,109,97,103,101,32,61, - 32,73,109,97,103,101,67,97,99,104,101,58,58,103,101,116,70,114,111,109,77,101,109,111,114,121,32,40,66,105,110,97,114,121,68,97,116,97,58,58, - 106,117,99,101,95,112,110,103,44,32,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,59,13,10,32,32, - 32,32,32,32,32,32,73,109,97,103,101,67,97,99,104,101,58,58,105,110,99,82,101,102,101,114,101,110,99,101,67,111,117,110,116,32,40,106,117,99, - 101,73,109,97,103,101,41,59,13,10,32,32,32,32,32,32,32,32,73,109,97,103,101,67,97,99,104,101,58,58,105,110,99,82,101,102,101,114,101,110, - 99,101,67,111,117,110,116,32,40,106,117,99,101,73,109,97,103,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,66,117,116, - 116,111,110,45,62,115,101,116,73,109,97,103,101,115,32,40,116,114,117,101,44,32,116,114,117,101,44,32,116,114,117,101,44,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,73,109,97,103,101,44,32,48,46, - 55,102,44,32,67,111,108,111,117,114,115,58,58,116,114,97,110,115,112,97,114,101,110,116,66,108,97,99,107,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,73,109,97,103,101,44,32,49,46,48,102,44, - 32,67,111,108,111,117,114,115,58,58,116,114,97,110,115,112,97,114,101,110,116,66,108,97,99,107,44,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,73,109,97,103,101,44,32,49,46,48,102,44,32,67,111, - 108,111,117,114,115,58,58,112,105,110,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,56,102,41,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,46,53,102,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,105,109,97,103,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,49,48,44,32,49,54, - 48,41,59,13,10,32,32,32,32,32,32,32,32,105,109,97,103,101,66,117,116,116,111,110,45,62,115,101,116,84,111,111,108,116,105,112,32,40,84,40, - 34,105,109,97,103,101,32,98,117,116,116,111,110,32,45,32,115,104,111,119,105,110,103,32,97,108,112,104,97,45,99,104,97,110,110,101,108,32,104,105, - 116,45,116,101,115,116,105,110,103,32,97,110,100,32,99,111,108,111,117,114,32,111,118,101,114,108,97,121,32,119,104,101,110,32,99,108,105,99,107,101, - 100,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,67,111,108,111,117,114,67,104,97,110,103,101,66, - 117,116,116,111,110,42,32,99,111,108,111,117,114,67,104,97,110,103,101,66,117,116,116,111,110,32,61,32,110,101,119,32,67,111,108,111,117,114,67,104, - 97,110,103,101,66,117,116,116,111,110,40,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,99,111,108,111,117,114,67,104,97,110,103,101,66,117,116,116,111,110,41,59,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,67,104, - 97,110,103,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,51,53,48,44,32,51,48,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,97,110,105,109,97,116,101,66,117,116,116,111,110,32,61,32,110, - 101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,99,108,105,99,107,32,116,111,32,97,110,105,109,97,116,101,46,46,46,34,41,41, - 59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,97,110,105,109,97,116,101,66,117,116, - 116,111,110,41,59,13,10,32,32,32,32,32,32,32,32,97,110,105,109,97,116,101,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116, - 104,84,111,70,105,116,84,101,120,116,32,40,50,52,41,59,13,10,32,32,32,32,32,32,32,32,97,110,105,109,97,116,101,66,117,116,116,111,110,45, - 62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,51,53,48,44,32,55,48,41,59,13,10,32,32,32,32,32,32,32,32, - 97,110,105,109,97,116,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59, - 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,66,117,116,116,111,110,115,80,97,103,101,40,41,13,10,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32, - 32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,41,13,10,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115, - 40,41,59,32,45,45,105,32,62,61,32,48,59,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105, - 102,32,40,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,105,41,32,33,61,32,97,110,105,109,97,116,101,66,117,116,116,111, - 110,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,110,105,109,97, - 116,111,114,46,97,110,105,109,97,116,101,67,111,109,112,111,110,101,110,116,32,40,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32, - 40,105,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,82,101,99,116,97,110,103,108,101,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110, - 100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,87,105,100,116,104,40,41,32,47,32,50,41,44,13,10,32,32,32,32,32,32,32, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,70,111,110,116,115, + 65,110,100,84,101,120,116,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84, + 40,34,70,111,110,116,115,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,70,111,110,116,58,58,102,105,110,100,70,111,110,116,115,32,40, + 102,111,110,116,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,108,105, + 115,116,66,111,120,32,61,32,110,101,119,32,76,105,115,116,66,111,120,32,40,84,40,34,102,111,110,116,115,34,41,44,32,116,104,105,115,41,41,59, + 13,10,32,32,32,32,32,32,32,32,108,105,115,116,66,111,120,45,62,115,101,116,82,111,119,72,101,105,103,104,116,32,40,50,56,41,59,13,10,13, + 10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,101,120,116,66,111,120,32,61,32,110,101, + 119,32,84,101,120,116,69,100,105,116,111,114,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116, + 67,111,108,111,117,114,32,40,84,101,120,116,69,100,105,116,111,114,58,58,98,97,99,107,103,114,111,117,110,100,67,111,108,111,117,114,73,100,44,32, + 67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13,10,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116,67,111, + 108,111,117,114,32,40,84,101,120,116,69,100,105,116,111,114,58,58,111,117,116,108,105,110,101,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117, + 114,115,58,58,98,108,97,99,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32, + 116,101,120,116,66,111,120,45,62,115,101,116,77,117,108,116,105,76,105,110,101,32,40,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32, + 32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116,82,101,116,117,114,110,75,101,121,83,116,97,114,116,115,78,101,119,76,105,110,101,32, + 40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,115,101,116,84,101,120,116,32,40,84,40,34,84,104, + 101,32,81,117,105,99,107,32,66,114,111,119,110,32,70,111,120,32,74,117,109,112,101,100,32,79,118,101,114,32,84,104,101,32,76,97,122,121,32,68, + 111,103,92,110,92,110,65,97,32,66,98,32,67,99,32,68,100,32,69,101,32,70,102,32,71,103,32,72,104,32,73,105,32,74,106,32,75,107,32,76, + 108,32,77,109,32,78,110,32,79,111,32,80,112,32,81,113,32,82,114,32,83,115,32,84,116,32,85,117,32,86,118,32,87,119,32,88,120,32,89,121, + 32,90,122,32,48,49,50,51,52,53,54,55,56,57,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101, + 86,105,115,105,98,108,101,32,40,98,111,108,100,66,117,116,116,111,110,32,61,32,110,101,119,32,84,111,103,103,108,101,66,117,116,116,111,110,32,40, + 84,40,34,98,111,108,100,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,98,111,108,100,66,117,116,116,111,110,45,62,97,100,100,66,117,116, + 116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107, + 101,86,105,115,105,98,108,101,32,40,105,116,97,108,105,99,66,117,116,116,111,110,32,61,32,110,101,119,32,84,111,103,103,108,101,66,117,116,116,111, + 110,32,40,84,40,34,105,116,97,108,105,99,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,105,116,97,108,105,99,66,117,116,116,111,110,45, + 62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100, + 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,115,105,122,101,83,108,105,100,101,114,32,61,32,110,101,119,32,83,108,105,100,101,114, + 32,40,84,40,34,115,105,122,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,115,105,122,101,83,108,105,100,101,114,45,62,115,101,116,82, + 97,110,103,101,32,40,51,46,48,44,32,49,53,48,46,48,44,32,48,46,49,41,59,13,10,32,32,32,32,32,32,32,32,115,105,122,101,83,108,105, + 100,101,114,45,62,115,101,116,86,97,108,117,101,32,40,50,48,46,48,41,59,13,10,32,32,32,32,32,32,32,32,115,105,122,101,83,108,105,100,101, + 114,45,62,97,100,100,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,108,105,115,116,66,111, + 120,45,62,115,101,108,101,99,116,82,111,119,32,40,48,41,59,13,10,32,32,32,32,32,32,32,32,108,105,115,116,66,111,120,45,62,115,101,116,67, + 111,108,111,117,114,32,40,76,105,115,116,66,111,120,58,58,111,117,116,108,105,110,101,67,111,108,111,117,114,73,100,44,32,67,111,108,111,117,114,115, + 58,58,98,108,97,99,107,46,119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,41,59,13,10,32,32,32,32,32,32,32,32,108,105,115,116, + 66,111,120,45,62,115,101,116,79,117,116,108,105,110,101,84,104,105,99,107,110,101,115,115,32,40,49,41,59,13,10,13,10,32,32,32,32,32,32,32, + 32,47,47,32,115,101,116,32,117,112,32,116,104,101,32,108,97,121,111,117,116,32,97,110,100,32,114,101,115,105,122,101,114,32,98,97,114,115,46,46, + 13,10,13,10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116, + 32,40,48,44,32,45,48,46,50,44,32,45,48,46,56,44,32,45,48,46,53,41,59,32,32,47,47,32,119,105,100,116,104,32,111,102,32,116,104,101, + 32,102,111,110,116,32,108,105,115,116,32,109,117,115,116,32,98,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116, - 32,40,103,101,116,72,101,105,103,104,116,40,41,32,47,32,50,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,54,48,32,43,32, - 82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,87,105, - 100,116,104,40,41,32,47,32,51,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,54,32,43,32,82,97,110,100,111,109,58,58, - 103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,72,101,105,103,104,116,40,41,32,47, - 32,54,41,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,53,48,48,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40, - 41,46,110,101,120,116,73,110,116,32,40,50,48,48,48,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82, - 97,110,100,111,109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115, - 116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,68,111,117,98,108,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,84,101,120, - 116,66,117,116,116,111,110,42,32,97,110,105,109,97,116,101,66,117,116,116,111,110,59,13,10,32,32,32,32,67,111,109,112,111,110,101,110,116,65,110, - 105,109,97,116,111,114,32,97,110,105,109,97,116,111,114,59,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,115,116,97,116,105,99,32,67,111,109,112,111, - 110,101,110,116,42,32,99,114,101,97,116,101,77,105,115,99,80,97,103,101,40,41,13,10,123,13,10,32,32,32,32,68,101,109,111,80,97,103,101,67, - 111,109,112,42,32,112,97,103,101,32,61,32,110,101,119,32,68,101,109,111,80,97,103,101,67,111,109,112,40,41,59,13,10,13,10,32,32,32,32,84, - 101,120,116,69,100,105,116,111,114,42,32,116,101,120,116,69,100,105,116,111,114,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,40,41, - 59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,101,120,116,69,100,105,116, - 111,114,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,50,53,44, - 32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115,101,116,84,101,120,116,32,40,84,40,34, - 115,105,110,103,108,101,45,108,105,110,101,32,116,101,120,116,32,98,111,120,34,41,41,59,13,10,13,10,32,32,32,32,116,101,120,116,69,100,105,116, - 111,114,32,61,32,110,101,119,32,84,101,120,116,69,100,105,116,111,114,32,40,84,40,34,112,97,115,115,119,111,114,100,34,41,44,32,40,116,99,104, - 97,114,41,32,48,120,50,48,50,50,41,59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108, - 101,32,40,116,101,120,116,69,100,105,116,111,114,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115,101,116,66,111,117,110, - 100,115,32,40,49,48,44,32,53,53,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,116,101,120,116,69,100,105,116,111,114,45,62,115, - 101,116,84,101,120,116,32,40,84,40,34,112,97,115,115,119,111,114,100,34,41,41,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,67,111,109, - 98,111,66,111,120,42,32,99,111,109,98,111,66,111,120,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120,32,40,84,40,34,99,111,109,98,111, - 34,41,41,59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,109,98,111, - 66,111,120,41,59,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,66,111,117,110,100,115,32,40,51,48,48,44,32,50,53,44, - 32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,69,100,105,116,97,98,108,101,84,101,120, - 116,32,40,116,114,117,101,41,59,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,74,117,115,116,105,102,105,99,97,116,105,111, - 110,84,121,112,101,32,40,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,41,59,13,10,13,10,32,32,32,32,105, - 110,116,32,105,59,13,10,32,32,32,32,102,111,114,32,40,105,32,61,32,49,59,32,105,32,60,32,49,48,48,59,32,43,43,105,41,13,10,32,32, - 32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32,40,84,40,34,99,111,109,98,111,32,98,111,120,32,105,116, - 101,109,32,34,41,32,43,32,83,116,114,105,110,103,32,40,105,41,44,32,105,41,59,13,10,13,10,32,32,32,32,99,111,109,98,111,66,111,120,45, - 62,115,101,116,83,101,108,101,99,116,101,100,73,100,32,40,49,41,59,13,10,13,10,32,32,32,32,68,114,97,103,79,110,116,111,68,101,115,107,116, - 111,112,68,101,109,111,67,111,109,112,42,32,100,32,61,32,110,101,119,32,68,114,97,103,79,110,116,111,68,101,115,107,116,111,112,68,101,109,111,67, - 111,109,112,32,40,112,97,103,101,41,59,13,10,32,32,32,32,112,97,103,101,45,62,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,100,41,59,13,10,32,32,32,32,100,45,62,115,101,116,66,111,117,110,100,115,32,40,50,48,44,32,49,48,48,44,32,50,48,48,44,32,56, - 48,41,59,13,10,13,10,32,32,32,32,114,101,116,117,114,110,32,112,97,103,101,59,13,10,125,13,10,13,10,47,47,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,84,111, - 111,108,98,97,114,68,101,109,111,67,111,109,112,32,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,83,108,105,100,101,114,76,105,115,116, - 101,110,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32, - 66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,84,111,111,108,98,97,114,68, - 101,109,111,67,111,109,112,32,40,65,112,112,108,105,99,97,116,105,111,110,67,111,109,109,97,110,100,77,97,110,97,103,101,114,42,32,99,111,109,109, - 97,110,100,77,97,110,97,103,101,114,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,67,114,101,97,116,101,32,97,110, - 100,32,97,100,100,32,116,104,101,32,116,111,111,108,98,97,114,46,46,46,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101, - 86,105,115,105,98,108,101,32,40,116,111,111,108,98,97,114,32,61,32,110,101,119,32,84,111,111,108,98,97,114,40,41,41,59,13,10,13,10,32,32, - 32,32,32,32,32,32,47,47,32,65,110,100,32,117,115,101,32,111,117,114,32,105,116,101,109,32,102,97,99,116,111,114,121,32,116,111,32,97,100,100, - 32,97,32,115,101,116,32,111,102,32,100,101,102,97,117,108,116,32,105,99,111,110,115,32,116,111,32,105,116,46,46,46,13,10,32,32,32,32,32,32, - 32,32,116,111,111,108,98,97,114,45,62,97,100,100,68,101,102,97,117,108,116,73,116,101,109,115,32,40,102,97,99,116,111,114,121,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,47,47,32,78,111,119,32,119,101,39,108,108,32,106,117,115,116,32,99,114,101,97,116,101,32,116,104,101,32,111,116, - 104,101,114,32,115,108,105,100,101,114,115,32,97,110,100,32,98,117,116,116,111,110,115,32,111,110,32,116,104,101,32,100,101,109,111,32,112,97,103,101, - 44,32,119,104,105,99,104,32,97,100,106,117,115,116,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,116,111,111,108,98,97,114,39,115, - 32,112,114,111,112,101,114,116,105,101,115,46,46,46,13,10,32,32,32,32,32,32,32,32,76,97,98,101,108,42,32,105,110,102,111,32,61,32,110,101, - 119,32,76,97,98,101,108,32,40,83,116,114,105,110,103,58,58,101,109,112,116,121,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,65,115, - 32,119,101,108,108,32,97,115,32,115,104,111,119,105,110,103,32,111,102,102,32,116,111,111,108,98,97,114,115,44,32,116,104,105,115,32,100,101,109,111, - 32,105,108,108,117,115,116,114,97,116,101,115,32,104,111,119,32,116,111,32,115,116,111,114,101,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,34,97,32,115,101,116,32,111,102,32,83,86,71,32,102,105,108,101,115,32,105,110,32,97,32,90,105,112,32,102,105,108,101,44,32,101,109,98,101, - 100,32,116,104,97,116,32,105,110,32,121,111,117,114,32,97,112,112,108,105,99,97,116,105,111,110,44,32,97,110,100,32,114,101,97,100,32,34,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,34,116,104,101,109,32,98,97,99,107,32,105,110,32,97,116,32,114,117,110,116,105,109,101,46,92,110,92, - 110,84,104,101,32,105,99,111,110,32,105,109,97,103,101,115,32,104,101,114,101,32,97,114,101,32,116,97,107,101,110,32,102,114,111,109,32,116,104,101, - 32,111,112,101,110,45,115,111,117,114,99,101,32,34,13,10,32,32,32,32,32,32,32,32,32,32,32,32,34,84,97,110,103,111,32,105,99,111,110,32, - 112,114,111,106,101,99,116,46,34,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,105,110,102,111,41,59,13,10,32,32,32,32,32,32,32,32,105,110,102,111,45,62,115,101,116,74,117,115,116,105,102,105,99,97,116,105,111,110, - 84,121,112,101,32,40,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,116,111,112,76,101,102,116,41,59,13,10,32,32,32,32,32,32,32,32, - 105,110,102,111,45,62,115,101,116,66,111,117,110,100,115,32,40,56,48,44,32,56,48,44,32,52,53,48,44,32,49,48,48,41,59,13,10,32,32,32, - 32,32,32,32,32,105,110,102,111,45,62,115,101,116,73,110,116,101,114,99,101,112,116,115,77,111,117,115,101,67,108,105,99,107,115,32,40,102,97,108, - 115,101,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,100,101,112,116,104,83,108,105,100,101,114,32,61,32,110,101,119,32,83,108,105,100,101,114,32,40,84,40,34,116,111,111,108,98,97,114,32,100, - 101,112,116,104,58,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,115,101,116,82,97,110,103, - 101,32,40,49,48,46,48,44,32,50,48,48,46,48,44,32,49,46,48,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100, - 101,114,45,62,115,101,116,86,97,108,117,101,32,40,53,48,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104, - 83,108,105,100,101,114,45,62,115,101,116,83,108,105,100,101,114,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,76,105,110,101,97,114,72,111, - 114,105,122,111,110,116,97,108,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,115,101,116,84,101,120,116, - 66,111,120,83,116,121,108,101,32,40,83,108,105,100,101,114,58,58,84,101,120,116,66,111,120,76,101,102,116,44,32,102,97,108,115,101,44,32,56,48, - 44,32,50,48,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,97,100,100,76,105,115,116,101,110,101,114, - 32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,100,101,112,116,104,83,108,105,100,101,114,45,62,115,101,116,66,111,117,110,100,115, - 32,40,56,48,44,32,50,49,48,44,32,51,48,48,44,32,50,50,41,59,13,10,32,32,32,32,32,32,32,32,40,110,101,119,32,76,97,98,101,108, - 32,40,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,78,97,109,101,40,41,44,32,100,101,112,116,104,83,108,105,100,101,114,45,62,103, - 101,116,78,97,109,101,40,41,41,41,45,62,97,116,116,97,99,104,84,111,67,111,109,112,111,110,101,110,116,32,40,100,101,112,116,104,83,108,105,100, - 101,114,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101, - 32,40,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40, - 34,118,101,114,116,105,99,97,108,47,104,111,114,105,122,111,110,116,97,108,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,111,114,105,101,110, - 116,97,116,105,111,110,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13, - 10,32,32,32,32,32,32,32,32,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84, - 111,70,105,116,84,101,120,116,32,40,50,50,41,59,13,10,32,32,32,32,32,32,32,32,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111, - 110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,88, - 40,41,44,32,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,66,111,116,116,111,109,40,41,32,43,32,50,48,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,117,115,116,111,109,105,115,101,66,117,116,116,111, - 110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,99,117,115,116,111,109,105,115,101,46,46,46,34,41,41,41,59, - 13,10,32,32,32,32,32,32,32,32,99,117,115,116,111,109,105,115,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116, - 101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,99,117,115,116,111,109,105,115,101,66,117,116,116,111,110,45,62,99, - 104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,32,40,50,50,41,59,13,10,32,32,32,32,32,32,32,32,99,117,115,116,111, - 109,105,115,101,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,111,114,105,101,110,116,97,116, - 105,111,110,66,117,116,116,111,110,45,62,103,101,116,82,105,103,104,116,40,41,32,43,32,50,48,44,32,111,114,105,101,110,116,97,116,105,111,110,66, - 117,116,116,111,110,45,62,103,101,116,89,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,84,111,111,108,98,97,114,68,101, - 109,111,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114, - 101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,116,111,111,108,98,97,114,45,62,105,115,86,101,114,116,105,99,97,108,40,41,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,101,116,66,111,117,110,100,115,32,40,48,44,32,48,44,32,40,105,110, - 116,41,32,100,101,112,116,104,83,108,105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,44,32,103,101,116,72,101,105,103,104,116,40,41,41, - 59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,101, - 116,66,111,117,110,100,115,32,40,48,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,44,32,40,105,110,116,41,32,100,101,112,116,104,83,108, - 105,100,101,114,45,62,103,101,116,86,97,108,117,101,40,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,108, - 105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,32,40,83,108,105,100,101,114,42,32,115,108,105,100,101,114,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32, - 98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32, - 32,32,32,32,32,32,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,111,114,105,101,110,116,97,116,105,111,110,66,117,116,116,111,110,41,13, - 10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,101,116,86,101,114,116, - 105,99,97,108,32,40,33,32,116,111,111,108,98,97,114,45,62,105,115,86,101,114,116,105,99,97,108,40,41,41,59,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,114,101,115,105,122,101,100,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101, - 32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,99,117,115,116,111,109,105,115,101,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32, - 32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,111,108,98,97,114,45,62,115,104,111,119,67,117,115,116,111,109,105,115,97,116,105, - 111,110,68,105,97,108,111,103,32,40,102,97,99,116,111,114,121,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13, - 10,112,114,105,118,97,116,101,58,13,10,32,32,32,32,84,111,111,108,98,97,114,42,32,116,111,111,108,98,97,114,59,13,10,32,32,32,32,83,108, - 105,100,101,114,42,32,100,101,112,116,104,83,108,105,100,101,114,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,111,114,105,101, - 110,116,97,116,105,111,110,66,117,116,116,111,110,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,99,117,115,116,111,109,105,115, - 101,66,117,116,116,111,110,59,13,10,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,99,108,97,115,115,32,68,101,109,111,84,111,111,108,98,97,114,73, - 116,101,109,70,97,99,116,111,114,121,32,32,32,58,32,112,117,98,108,105,99,32,84,111,111,108,98,97,114,73,116,101,109,70,97,99,116,111,114,121, - 13,10,32,32,32,32,123,13,10,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,68,101,109,111,84,111,111,108,98,97, - 114,73,116,101,109,70,97,99,116,111,114,121,40,41,32,123,125,13,10,32,32,32,32,32,32,32,32,126,68,101,109,111,84,111,111,108,98,97,114,73, - 116,101,109,70,97,99,116,111,114,121,40,41,32,123,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,47,47,32, - 69,97,99,104,32,116,121,112,101,32,111,102,32,105,116,101,109,32,97,32,116,111,111,108,98,97,114,32,99,97,110,32,99,111,110,116,97,105,110,32, - 109,117,115,116,32,98,101,32,103,105,118,101,110,32,97,32,117,110,105,113,117,101,32,73,68,46,32,84,104,101,115,101,13,10,32,32,32,32,32,32, - 32,32,47,47,32,97,114,101,32,116,104,101,32,111,110,101,115,32,119,101,39,108,108,32,117,115,101,32,105,110,32,116,104,105,115,32,100,101,109,111, - 46,13,10,32,32,32,32,32,32,32,32,101,110,117,109,32,68,101,109,111,84,111,111,108,98,97,114,73,116,101,109,73,100,115,13,10,32,32,32,32, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,111,99,95,110,101,119,32,32,32,32,32,32,32,32,32,61,32,49,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,100,111,99,95,111,112,101,110,32,32,32,32,32,32,32,32,61,32,50,44,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,100,111,99,95,115,97,118,101,32,32,32,32,32,32,32,32,61,32,51,44,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,100,111,99,95,115,97,118,101,65,115,32,32,32,32,32,32,61,32,52,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,100,105,116,95, - 99,111,112,121,32,32,32,32,32,32,32,61,32,53,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,100,105,116,95,99,117,116,32,32,32, - 32,32,32,32,32,61,32,54,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,101,100,105,116,95,112,97,115,116,101,32,32,32,32,32,32,61, - 32,55,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,76,111,103,111,66,117,116,116,111,110,32,32,61,32,56,44,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,99,117,115,116,111,109,67,111,109,98,111,66,111,120,32,32,61,32,57,13,10,32,32,32,32,32,32,32,32, - 125,59,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,103,101,116,65,108,108,84,111,111,108,98,97,114,73,116,101,109,73,100,115,32, - 40,65,114,114,97,121,32,60,105,110,116,62,38,32,105,100,115,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,47,47,32,84,104,105,115,32,114,101,116,117,114,110,115,32,116,104,101,32,99,111,109,112,108,101,116,101,32,108,105,115,116,32,111,102,32, - 97,108,108,32,105,116,101,109,32,73,68,115,32,116,104,97,116,32,97,114,101,32,97,108,108,111,119,101,100,32,116,111,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,47,47,32,103,111,32,105,110,32,111,117,114,32,116,111,111,108,98,97,114,46,32,65,110,121,32,105,116,101,109,115,32,121,111, - 117,32,109,105,103,104,116,32,119,97,110,116,32,116,111,32,97,100,100,32,109,117,115,116,32,98,101,32,108,105,115,116,101,100,32,104,101,114,101,46, - 32,84,104,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,111,114,100,101,114,32,105,110,32,119,104,105,99,104,32,116,104,101,121, - 32,97,114,101,32,108,105,115,116,101,100,32,119,105,108,108,32,98,101,32,117,115,101,100,32,98,121,32,116,104,101,32,116,111,111,108,98,97,114,32, - 99,117,115,116,111,109,105,115,97,116,105,111,110,32,112,97,110,101,108,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46, - 97,100,100,32,40,100,111,99,95,110,101,119,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99, - 95,111,112,101,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,41,59, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,65,115,41,59,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,99,111,112,121,41,59,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,99,117,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46, - 97,100,100,32,40,101,100,105,116,95,112,97,115,116,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40, - 106,117,99,101,76,111,103,111,66,117,116,116,111,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,99, - 117,115,116,111,109,67,111,109,98,111,66,111,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,73,102,32,121,111,117, - 39,114,101,32,103,111,105,110,103,32,116,111,32,117,115,101,32,115,101,112,97,114,97,116,111,114,115,44,32,116,104,101,110,32,116,104,101,121,32,109, - 117,115,116,32,97,108,115,111,32,98,101,32,97,100,100,101,100,32,101,120,112,108,105,99,105,116,108,121,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,47,47,32,116,111,32,116,104,101,32,108,105,115,116,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40, - 115,101,112,97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115, - 112,97,99,101,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,102,108,101,120,105,98,108,101, - 83,112,97,99,101,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,118,111,105,100,32,103,101, - 116,68,101,102,97,117,108,116,73,116,101,109,83,101,116,32,40,65,114,114,97,121,32,60,105,110,116,62,38,32,105,100,115,41,13,10,32,32,32,32, - 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,84,104,105,115,32,114,101,116,117,114,110,115,32,97,110,32,111,114, - 100,101,114,101,100,32,108,105,115,116,32,111,102,32,116,104,101,32,115,101,116,32,111,102,32,105,116,101,109,115,32,116,104,97,116,32,109,97,107,101, - 32,117,112,32,97,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,111,111,108,98,97,114,39,115,32,100,101,102,97,117,108,116,32, - 115,101,116,46,32,78,111,116,32,97,108,108,32,105,116,101,109,115,32,110,101,101,100,32,116,111,32,98,101,32,111,110,32,116,104,105,115,32,108,105, - 115,116,44,32,97,110,100,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,105,116,101,109,115,32,99,97,110,32,97,112,112,101,97,114, - 32,109,117,108,116,105,112,108,101,32,116,105,109,101,115,32,40,101,46,103,46,32,116,104,101,32,115,101,112,97,114,97,116,111,114,115,32,117,115,101, - 100,32,104,101,114,101,41,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,110,101,119,41,59, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,111,112,101,110,41,59,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 105,100,115,46,97,100,100,32,40,100,111,99,95,115,97,118,101,65,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97, - 100,100,32,40,115,112,97,99,101,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115,101,112, - 97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116, - 95,99,111,112,121,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,99,117,116,41,59, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,101,100,105,116,95,112,97,115,116,101,41,59,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115,101,112,97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,102,108,101,120,105,98,108,101,83,112,97,99,101,114,73,100,41,59,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,99,117,115,116,111,109,67,111,109,98,111,66,111,120,41,59,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,102,108,101,120,105,98,108,101,83,112,97,99,101,114,73,100,41,59,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,115,101,112,97,114,97,116,111,114,66,97,114,73,100,41,59,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,105,100,115,46,97,100,100,32,40,106,117,99,101,76,111,103,111,66,117,116,116,111,110,41,59,13,10,32,32,32,32,32, - 32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,84,111,111,108,98,97,114,73,116,101,109,67,111,109,112,111,110,101,110,116,42,32,99,114, - 101,97,116,101,73,116,101,109,32,40,99,111,110,115,116,32,105,110,116,32,105,116,101,109,73,100,41,13,10,32,32,32,32,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,105,116,101,109,73,100,41,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95,110,101,119,58,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71, - 32,40,105,116,101,109,73,100,44,32,84,40,34,110,101,119,34,41,44,32,84,40,34,100,111,99,117,109,101,110,116,45,110,101,119,46,115,118,103,34, - 41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95,111,112,101,110,58,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108, - 101,83,86,71,32,40,105,116,101,109,73,100,44,32,84,40,34,111,112,101,110,34,41,44,32,84,40,34,100,111,99,117,109,101,110,116,45,111,112,101, - 110,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95,115,97,118,101,58,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109, - 90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73,100,44,32,84,40,34,115,97,118,101,34,41,44,32,84,40,34,100,111,99,117,109,101, - 110,116,45,115,97,118,101,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,100,111,99,95, - 115,97,118,101,65,115,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117, - 116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73,100,44,32,84,40,34,115,97,118,101,32,97,115,34,41, - 44,32,84,40,34,100,111,99,117,109,101,110,116,45,115,97,118,101,45,97,115,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,99,97,115,101,32,101,100,105,116,95,99,111,112,121,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101, - 116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73,100,44, - 32,84,40,34,99,111,112,121,34,41,44,32,84,40,34,101,100,105,116,45,99,111,112,121,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,99,97,115,101,32,101,100,105,116,95,99,117,116,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101,109,73, - 100,44,32,84,40,34,99,117,116,34,41,44,32,84,40,34,101,100,105,116,45,99,117,116,46,115,118,103,34,41,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,99,97,115,101,32,101,100,105,116,95,112,97,115,116,101,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,114,101,116,117,114,110,32,99,114,101,97,116,101,66,117,116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,105,116,101, - 109,73,100,44,32,84,40,34,112,97,115,116,101,34,41,44,32,84,40,34,101,100,105,116,45,112,97,115,116,101,46,115,118,103,34,41,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,106,117,99,101,76,111,103,111,66,117,116,116,111,110,58,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,111,111,108,98,97,114,66,117,116,116,111,110,32,40,105,116, - 101,109,73,100,44,32,84,40,34,106,117,99,101,33,34,41,44,32,68,114,97,119,97,98,108,101,58,58,99,114,101,97,116,101,70,114,111,109,73,109, - 97,103,101,68,97,116,97,32,40,66,105,110,97,114,121,68,97,116,97,58,58,106,117,99,101,95,112,110,103,44,32,66,105,110,97,114,121,68,97,116, - 97,58,58,106,117,99,101,95,112,110,103,83,105,122,101,41,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115, - 101,32,99,117,115,116,111,109,67,111,109,98,111,66,111,120,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114, - 110,32,110,101,119,32,67,117,115,116,111,109,84,111,111,108,98,97,114,67,111,109,98,111,66,111,120,32,40,105,116,101,109,73,100,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98, - 114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117, - 114,110,32,48,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32,32, - 32,32,83,116,114,105,110,103,65,114,114,97,121,32,105,99,111,110,78,97,109,101,115,59,13,10,32,32,32,32,32,32,32,32,79,119,110,101,100,65, - 114,114,97,121,32,60,68,114,97,119,97,98,108,101,62,32,105,99,111,110,115,70,114,111,109,90,105,112,70,105,108,101,59,13,10,13,10,32,32,32, - 32,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,97,32,108,105,116,116,108,101,32,117,116,105,108,105,116,121,32,116,111,32,99,114,101,97, - 116,101,32,97,32,98,117,116,116,111,110,32,119,105,116,104,32,111,110,101,32,111,102,32,116,104,101,32,83,86,71,32,105,109,97,103,101,115,32,105, - 110,13,10,32,32,32,32,32,32,32,32,47,47,32,111,117,114,32,101,109,98,101,100,100,101,100,32,90,73,80,32,102,105,108,101,32,34,105,99,111, - 110,115,46,122,105,112,34,13,10,32,32,32,32,32,32,32,32,84,111,111,108,98,97,114,66,117,116,116,111,110,42,32,99,114,101,97,116,101,66,117, - 116,116,111,110,70,114,111,109,90,105,112,70,105,108,101,83,86,71,32,40,99,111,110,115,116,32,105,110,116,32,105,116,101,109,73,100,44,32,99,111, - 110,115,116,32,83,116,114,105,110,103,38,32,116,101,120,116,44,32,99,111,110,115,116,32,83,116,114,105,110,103,38,32,102,105,108,101,110,97,109,101, - 41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,99,111,110,115,70,114,111,109,90, - 105,112,70,105,108,101,46,115,105,122,101,40,41,32,61,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,73,102,32,119,101,39,118,101,32,110,111,116,32,97,108,114,101,97,100,121,32,100,111,110,101, - 32,115,111,44,32,108,111,97,100,32,97,108,108,32,116,104,101,32,105,109,97,103,101,115,32,102,114,111,109,32,116,104,101,32,122,105,112,32,102,105, - 108,101,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,77,101,109,111,114,121,73,110,112,117,116,83,116,114,101,97,109,32, - 105,99,111,110,115,70,105,108,101,83,116,114,101,97,109,32,40,66,105,110,97,114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112,44,32, - 66,105,110,97,114,121,68,97,116,97,58,58,105,99,111,110,115,95,122,105,112,83,105,122,101,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,90,105,112,70,105,108,101,32,105,99,111,110,115,32,40,38,105,99,111,110,115,70,105,108,101,83,116,114, - 101,97,109,44,32,102,97,108,115,101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116, - 32,105,32,61,32,48,59,32,105,32,60,32,105,99,111,110,115,46,103,101,116,78,117,109,69,110,116,114,105,101,115,40,41,59,32,43,43,105,41,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 73,110,112,117,116,83,116,114,101,97,109,42,32,115,118,103,70,105,108,101,83,116,114,101,97,109,32,61,32,105,99,111,110,115,46,99,114,101,97,116, - 101,83,116,114,101,97,109,70,111,114,69,110,116,114,121,32,40,105,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,105,102,32,40,115,118,103,70,105,108,101,83,116,114,101,97,109,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110, - 78,97,109,101,115,46,97,100,100,32,40,105,99,111,110,115,46,103,101,116,69,110,116,114,121,40,105,41,45,62,102,105,108,101,110,97,109,101,41,59, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110,115,70,114,111,109,90,105,112,70,105, - 108,101,46,97,100,100,32,40,68,114,97,119,97,98,108,101,58,58,99,114,101,97,116,101,70,114,111,109,73,109,97,103,101,68,97,116,97,83,116,114, - 101,97,109,32,40,42,115,118,103,70,105,108,101,83,116,114,101,97,109,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,115,118,103,70,105,108,101,83,116,114,101,97,109,59,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,114,97,119,97,98,108,101,42,32,105,109,97,103,101,32, - 61,32,105,99,111,110,115,70,114,111,109,90,105,112,70,105,108,101,32,91,105,99,111,110,78,97,109,101,115,46,105,110,100,101,120,79,102,32,40,102, - 105,108,101,110,97,109,101,41,93,45,62,99,114,101,97,116,101,67,111,112,121,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101, - 116,117,114,110,32,110,101,119,32,84,111,111,108,98,97,114,66,117,116,116,111,110,32,40,105,116,101,109,73,100,44,32,116,101,120,116,44,32,105,109, - 97,103,101,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,13,10,32,32,32,32,32, - 32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,68,101,109,111,110,115,116,114,97,116,101,115,32,104,111,119,32,116,111,32,112, - 117,116,32,97,32,99,117,115,116,111,109,32,99,111,109,112,111,110,101,110,116,32,105,110,116,111,32,97,32,116,111,111,108,98,97,114,32,45,32,116, - 104,105,115,32,111,110,101,32,99,111,110,116,97,105,110,115,13,10,32,32,32,32,32,32,32,32,47,47,32,97,32,67,111,109,98,111,66,111,120,46, - 13,10,32,32,32,32,32,32,32,32,99,108,97,115,115,32,67,117,115,116,111,109,84,111,111,108,98,97,114,67,111,109,98,111,66,111,120,32,58,32, - 112,117,98,108,105,99,32,84,111,111,108,98,97,114,73,116,101,109,67,111,109,112,111,110,101,110,116,13,10,32,32,32,32,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,112,117,98,108,105,99,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,67,117,115,116,111,109,84,111,111,108,98, - 97,114,67,111,109,98,111,66,111,120,32,40,99,111,110,115,116,32,105,110,116,32,116,111,111,108,98,97,114,73,116,101,109,73,100,41,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,58,32,84,111,111,108,98,97,114,73,116,101,109,67,111,109,112,111,110,101,110,116,32,40,116,111, - 111,108,98,97,114,73,116,101,109,73,100,44,32,84,40,34,67,117,115,116,111,109,32,84,111,111,108,98,97,114,32,73,116,101,109,34,41,44,32,102, - 97,108,115,101,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,100, - 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,109,98,111,66,111,120,32,61,32,110,101,119,32,67,111,109,98,111,66,111,120, - 32,40,84,40,34,100,101,109,111,32,116,111,111,108,98,97,114,32,99,111,109,98,111,32,98,111,120,34,41,41,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,105,110,116,32,105,32,61,32,49,59,32,105,32,60,32,50,48,59,32,43,43,105,41, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,97,100,100,73,116,101,109,32, - 40,84,40,34,84,111,111,108,98,97,114,32,67,111,109,98,111,66,111,120,32,105,116,101,109,32,34,41,32,43,32,83,116,114,105,110,103,32,40,105, - 41,44,32,105,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,83, - 101,108,101,99,116,101,100,73,100,32,40,49,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120, - 45,62,115,101,116,69,100,105,116,97,98,108,101,84,101,120,116,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125, - 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,126,67,117,115,116,111,109,84,111,111,108,98,97,114,67,111,109,98,111,66,111,120,40,41, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32, - 99,111,109,98,111,66,111,120,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 98,111,111,108,32,103,101,116,84,111,111,108,98,97,114,73,116,101,109,83,105,122,101,115,32,40,105,110,116,32,116,111,111,108,98,97,114,68,101,112, - 116,104,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,98,111,111,108,32,105,115,84,111,111,108,98,97,114,86,101,114,116,105,99,97,108,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,38,32,112,114,101,102,101,114,114,101,100, - 83,105,122,101,44,32,105,110,116,38,32,109,105,110,83,105,122,101,44,32,105,110,116,38,32,109,97,120,83,105,122,101,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,115,84,111,111,108,98,97,114,86, - 101,114,116,105,99,97,108,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108, - 115,101,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,114,101,102,101,114,114,101,100,83,105,122,101,32,61,32,50, - 53,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,109,105,110,83,105,122,101,32,61,32,56,48,59,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,109,97,120,83,105,122,101,32,61,32,51,48,48,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,114,101,116,117,114,110,32,116,114,117,101,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,118,111,105,100,32,112,97,105,110,116,66,117,116,116,111,110,65,114,101,97,32,40,71,114,97,112,104,105,99,115,38,44,32, - 105,110,116,44,32,105,110,116,44,32,98,111,111,108,44,32,98,111,111,108,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,118,111,105,100,32,99,111,110,116,101,110,116,65, - 114,101,97,67,104,97,110,103,101,100,32,40,99,111,110,115,116,32,82,101,99,116,97,110,103,108,101,38,32,99,111,110,116,101,110,116,65,114,101,97, - 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66, - 111,120,45,62,115,101,116,83,105,122,101,32,40,99,111,110,116,101,110,116,65,114,101,97,46,103,101,116,87,105,100,116,104,40,41,32,45,32,50,44, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,106,109,105, - 110,32,40,99,111,110,116,101,110,116,65,114,101,97,46,103,101,116,72,101,105,103,104,116,40,41,32,45,32,50,44,32,50,50,41,41,59,13,10,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,109,98,111,66,111,120,45,62,115,101,116,67,101,110,116,114,101,80,111,115,105, - 116,105,111,110,32,40,99,111,110,116,101,110,116,65,114,101,97,46,103,101,116,67,101,110,116,114,101,88,40,41,44,32,99,111,110,116,101,110,116,65, - 114,101,97,46,103,101,116,67,101,110,116,114,101,89,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32, - 32,32,32,32,32,112,114,105,118,97,116,101,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,67,111,109,98,111,66,111,120,42,32,99,111,109, - 98,111,66,111,120,59,13,10,32,32,32,32,32,32,32,32,125,59,13,10,32,32,32,32,125,59,13,10,13,10,32,32,32,32,68,101,109,111,84,111, - 111,108,98,97,114,73,116,101,109,70,97,99,116,111,114,121,32,102,97,99,116,111,114,121,59,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115, - 32,68,101,109,111,84,97,98,98,101,100,67,111,109,112,111,110,101,110,116,32,32,58,32,112,117,98,108,105,99,32,84,97,98,98,101,100,67,111,109, - 112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117, - 98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109, - 111,84,97,98,98,101,100,67,111,109,112,111,110,101,110,116,32,40,65,112,112,108,105,99,97,116,105,111,110,67,111,109,109,97,110,100,77,97,110,97, - 103,101,114,42,32,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,32,32,32,32,32,32,32,32,58,32,84,97,98,98,101,100,67,111, - 109,112,111,110,101,110,116,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,84,111,112,41,13,10,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,115,108,105,100,101,114,115,34,41,44,32,32,32,32,32,32, - 32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44,32,99,114,101,97,116,101,83,108,105,100,101,114,115,80, - 97,103,101,40,41,44,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,116, - 111,111,108,98,97,114,115,34,41,44,32,32,32,32,32,32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44, - 32,110,101,119,32,84,111,111,108,98,97,114,68,101,109,111,67,111,109,112,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,44,32,32, - 32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,98,117,116,116,111,110,115,34,41,44,32, - 32,32,32,32,32,32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44,32,110,101,119,32,66,117,116,116,111, - 110,115,80,97,103,101,32,40,116,104,105,115,41,44,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,84,97,98,32, - 40,84,40,34,114,97,100,105,111,32,98,117,116,116,111,110,115,34,41,44,32,103,101,116,82,97,110,100,111,109,66,114,105,103,104,116,67,111,108,111, - 117,114,40,41,44,32,99,114,101,97,116,101,82,97,100,105,111,66,117,116,116,111,110,80,97,103,101,40,41,44,32,32,116,114,117,101,41,59,13,10, - 32,32,32,32,32,32,32,32,97,100,100,84,97,98,32,40,84,40,34,109,105,115,99,32,119,105,100,103,101,116,115,34,41,44,32,32,103,101,116,82, - 97,110,100,111,109,66,114,105,103,104,116,67,111,108,111,117,114,40,41,44,32,99,114,101,97,116,101,77,105,115,99,80,97,103,101,40,41,44,32,32, - 32,32,32,32,32,32,32,116,114,117,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,97,98,98,101,100,67, - 111,109,112,111,110,101,110,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116, - 116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,66,117,98,98,108,101,77,101,115,115,97,103,101,67,111,109,112,111,110,101,110,116,42,32,98,109,99,32,61,32,110,101,119,32,66,117, - 98,98,108,101,77,101,115,115,97,103,101,67,111,109,112,111,110,101,110,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,68, - 101,115,107,116,111,112,58,58,99,97,110,85,115,101,83,101,109,105,84,114,97,110,115,112,97,114,101,110,116,87,105,110,100,111,119,115,40,41,41,13, - 10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,109,99,45,62,115,101,116,65,108,119,97,121,115,79,110, - 84,111,112,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,109,99,45,62,97,100,100,84,111,68,101,115,107,116, - 111,112,32,40,48,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,98,109,99,41, - 59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,98,109,99,45,62,115,104,111,119,65,116,32,40,98,117,116, - 116,111,110,44,32,84,40,34,84,104,105,115,32,105,115,32,97,32,100,101,109,111,32,111,102,32,116,104,101,32,66,117,98,98,108,101,77,101,115,115, - 97,103,101,67,111,109,112,111,110,101,110,116,44,32,119,104,105,99,104,32,108,101,116,115,32,121,111,117,32,112,111,112,32,117,112,32,97,32,109,101, - 115,115,97,103,101,32,112,111,105,110,116,105,110,103,32,97,116,32,97,32,99,111,109,112,111,110,101,110,116,32,111,114,32,115,111,109,101,119,104,101, - 114,101,32,111,110,32,116,104,101,32,115,99,114,101,101,110,46,92,110,92,110,84,104,101,32,109,101,115,115,97,103,101,32,98,117,98,98,108,101,115, - 32,119,105,108,108,32,100,105,115,97,112,112,101,97,114,32,97,102,116,101,114,32,97,32,116,105,109,101,111,117,116,32,112,101,114,105,111,100,44,32, - 111,114,32,119,104,101,110,32,116,104,101,32,109,111,117,115,101,32,105,115,32,99,108,105,99,107,101,100,46,34,41,44,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,50,48,48,48,44,32,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32,32,125, - 13,10,13,10,32,32,32,32,115,116,97,116,105,99,32,99,111,110,115,116,32,67,111,108,111,117,114,32,103,101,116,82,97,110,100,111,109,66,114,105, - 103,104,116,67,111,108,111,117,114,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,67,111,108,111,117, - 114,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41, - 44,32,48,46,49,102,44,32,48,46,57,55,102,44,32,49,46,48,102,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10, - 99,108,97,115,115,32,68,101,109,111,66,97,99,107,103,114,111,117,110,100,84,104,114,101,97,100,32,32,58,32,112,117,98,108,105,99,32,84,104,114, - 101,97,100,87,105,116,104,80,114,111,103,114,101,115,115,87,105,110,100,111,119,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68, - 101,109,111,66,97,99,107,103,114,111,117,110,100,84,104,114,101,97,100,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,104,114,101,97,100,87, - 105,116,104,80,114,111,103,114,101,115,115,87,105,110,100,111,119,32,40,84,40,34,98,117,115,121,32,100,111,105,110,103,32,115,111,109,101,32,105,109, - 112,111,114,116,97,110,116,32,116,104,105,110,103,115,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,115,101,116,83,116,97,116,117,115,77,101,115,115,97,103,101,32,40,84,40,34,71,101,116,116,105,110,103,32,114,101,97,100,121,46,46,46, - 34,41,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,66,97,99,107,103,114,111,117,110,100,84,104,114,101,97,100, - 40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,117,110,40,41,13,10,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,115,101,116,80,114,111,103,114,101,115,115,32,40,45,49,46,48,41,59,32,47,47,32,115,101,116,116,105,110, - 103,32,97,32,118,97,108,117,101,32,98,101,121,111,110,100,32,116,104,101,32,114,97,110,103,101,32,48,32,45,62,32,49,32,119,105,108,108,32,115, - 104,111,119,32,97,32,115,112,105,110,110,105,110,103,32,98,97,114,46,46,13,10,32,32,32,32,32,32,32,32,115,101,116,83,116,97,116,117,115,77, - 101,115,115,97,103,101,32,40,84,40,34,80,114,101,112,97,114,105,110,103,32,116,111,32,100,111,32,115,111,109,101,32,115,116,117,102,102,46,46,46, - 34,41,41,59,13,10,32,32,32,32,32,32,32,32,119,97,105,116,32,40,50,48,48,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111, - 110,115,116,32,105,110,116,32,116,104,105,110,103,115,84,111,68,111,32,61,32,49,48,59,13,10,13,10,32,32,32,32,32,32,32,32,102,111,114,32, - 40,105,110,116,32,105,32,61,32,48,59,32,105,32,60,32,116,104,105,110,103,115,84,111,68,111,59,32,43,43,105,41,13,10,32,32,32,32,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,109,117,115,116,32,99,104,101,99,107,32,116,104,105,115,32,97,115,32,111, - 102,116,101,110,32,97,115,32,112,111,115,115,105,98,108,101,44,32,98,101,99,97,117,115,101,32,116,104,105,115,32,105,115,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,47,47,32,104,111,119,32,119,101,32,107,110,111,119,32,105,102,32,116,104,101,32,117,115,101,114,39,115,32,112,114,101,115, - 115,101,100,32,39,99,97,110,99,101,108,39,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,114,101,97,100,83,104,111,117, - 108,100,69,120,105,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,119,105,108,108,32,117,112,100,97,116,101,32,116,104,101,32,112,114,111,103,114,101,115, - 115,32,98,97,114,32,111,110,32,116,104,101,32,100,105,97,108,111,103,32,98,111,120,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116, - 80,114,111,103,114,101,115,115,32,40,105,32,47,32,40,100,111,117,98,108,101,41,32,116,104,105,110,103,115,84,111,68,111,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,115,101,116,83,116,97,116,117,115,77,101,115,115,97,103,101,32,40,83,116,114,105,110,103,32,40,116,104,105, - 110,103,115,84,111,68,111,32,45,32,105,41,32,43,32,84,40,34,32,116,104,105,110,103,115,32,108,101,102,116,32,116,111,32,100,111,46,46,46,34, - 41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,97,105,116,32,40,53,48,48,41,59,13,10,32,32,32,32,32,32,32,32, - 125,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,80,114,111,103,114,101,115,115,32,40,45,49,46,48,41,59,32,47,47,32,115,101,116,116, - 105,110,103,32,97,32,118,97,108,117,101,32,98,101,121,111,110,100,32,116,104,101,32,114,97,110,103,101,32,48,32,45,62,32,49,32,119,105,108,108, - 32,115,104,111,119,32,97,32,115,112,105,110,110,105,110,103,32,98,97,114,46,46,13,10,32,32,32,32,32,32,32,32,115,101,116,83,116,97,116,117, - 115,77,101,115,115,97,103,101,32,40,84,40,34,70,105,110,105,115,104,105,110,103,32,111,102,102,32,116,104,101,32,108,97,115,116,32,102,101,119,32, - 98,105,116,115,32,97,110,100,32,112,105,101,99,101,115,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32,119,97,105,116,32,40,51,48,48,48, - 41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,65,32,68,105,97,108,111,103,87,105,110,100,111,119,32,99,111, - 110,116,97,105,110,105,110,103,32,97,32,67,111,108,111,117,114,83,101,108,101,99,116,111,114,32,99,111,109,112,111,110,101,110,116,32,42,47,13,10, - 99,108,97,115,115,32,67,111,108,111,117,114,83,101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110,100,111,119,32,32,58,32,112,117,98,108, - 105,99,32,68,105,97,108,111,103,87,105,110,100,111,119,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,67,111,108,111,117,114,83, - 101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110,100,111,119,40,41,13,10,32,32,32,32,32,32,32,32,58,32,68,105,97,108,111,103,87, - 105,110,100,111,119,32,40,84,40,34,67,111,108,111,117,114,32,115,101,108,101,99,116,111,114,32,100,101,109,111,34,41,44,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,108,111,117,114,115,58,58,108,105,103,104,116,103,114,101,121,44,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,13,10,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,115,101,116,67,111,110,116,101,110,116,67,111,109,112,111,110,101,110,116,32,40,110,101,119,32,67,111,108,111,117,114,83,101,108, - 101,99,116,111,114,40,41,41,59,13,10,32,32,32,32,32,32,32,32,99,101,110,116,114,101,87,105,116,104,83,105,122,101,32,40,52,48,48,44,32, - 52,48,48,41,59,13,10,32,32,32,32,32,32,32,32,115,101,116,82,101,115,105,122,97,98,108,101,32,40,116,114,117,101,44,32,116,114,117,101,41, - 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,67,111,108,111,117,114,83,101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110, - 100,111,119,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,99,108,111,115,101,66,117,116, - 116,111,110,80,114,101,115,115,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,32,101,120,112,101,99, - 116,32,116,104,105,115,32,99,111,109,112,111,110,101,110,116,32,116,111,32,98,101,32,114,117,110,32,119,105,116,104,105,110,32,97,32,109,111,100,97, - 108,32,108,111,111,112,44,32,115,111,32,119,104,101,110,32,116,104,101,32,99,108,111,115,101,13,10,32,32,32,32,32,32,32,32,47,47,32,98,117, - 116,116,111,110,32,105,115,32,99,108,105,99,107,101,100,44,32,119,101,32,99,97,110,32,109,97,107,101,32,105,116,32,105,110,118,105,115,105,98,108, - 101,32,116,111,32,99,97,117,115,101,32,116,104,101,32,108,111,111,112,32,116,111,32,101,120,105,116,32,97,110,100,32,116,104,101,13,10,32,32,32, - 32,32,32,32,32,47,47,32,99,97,108,108,105,110,103,32,99,111,100,101,32,119,105,108,108,32,100,101,108,101,116,101,32,116,104,105,115,32,111,98, - 106,101,99,116,46,13,10,32,32,32,32,32,32,32,32,115,101,116,86,105,115,105,98,108,101,32,40,102,97,108,115,101,41,59,13,10,32,32,32,32, - 125,13,10,125,59,13,10,13,10,35,105,102,32,74,85,67,69,95,77,65,67,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,47,42,42,32,84,104,105,115,32,112,111,112,115, - 32,111,112,101,110,32,97,32,100,105,97,108,111,103,32,98,111,120,32,97,110,100,32,119,97,105,116,115,32,102,111,114,32,121,111,117,32,116,111,32, - 112,114,101,115,115,32,107,101,121,115,32,111,110,32,121,111,117,114,32,65,112,112,108,101,32,82,101,109,111,116,101,44,13,10,32,32,32,32,119,104, - 105,99,104,32,105,116,32,100,101,115,99,114,105,98,101,115,32,105,110,32,116,104,101,32,98,111,120,46,13,10,42,47,13,10,99,108,97,115,115,32, - 65,112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,32,32,58,32,112,117,98,108,105,99,32,65,108,101,114,116,87,105,110, - 100,111,119,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98, - 108,105,99,32,65,112,112,108,101,82,101,109,111,116,101,68,101,118,105,99,101,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,65, - 112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,40,41,13,10,32,32,32,32,32,32,32,32,58,32,65,108,101,114,116,87, - 105,110,100,111,119,32,40,34,65,112,112,108,101,32,82,101,109,111,116,101,32,67,111,110,116,114,111,108,32,84,101,115,116,33,34,44,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34,73,102,32,121,111,117,39,118,101,32,103,111,116,32,97,110,32,65, - 112,112,108,101,32,82,101,109,111,116,101,44,32,112,114,101,115,115,32,115,111,109,101,32,98,117,116,116,111,110,115,32,110,111,119,46,46,46,34,44, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,78,111, - 73,99,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,97,100,100,66,117,116,116,111,110,32,40,84,40,34,100,111,110,101, - 34,41,44,32,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,40,84,111,32,111,112,101,110,32,116,104,101,32,100,101,118,105,99, - 101,32,105,110,32,110,111,110,45,101,120,99,108,117,115,105,118,101,32,109,111,100,101,44,32,112,97,115,115,32,39,102,97,108,115,101,39,32,105,110, - 32,104,101,114,101,41,46,46,13,10,32,32,32,32,32,32,32,32,105,102,32,40,33,32,115,116,97,114,116,32,40,116,114,117,101,41,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,115,101,116,77,101,115,115,97,103,101,32,40,34,67,111,117,108,100,110,39,116,32,111,112,101,110,32,116,104, - 101,32,114,101,109,111,116,101,32,99,111,110,116,114,111,108,32,100,101,118,105,99,101,33,34,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32, - 32,32,126,65,112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32, - 32,32,32,115,116,111,112,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,80,114,101,115, - 115,101,100,32,40,99,111,110,115,116,32,66,117,116,116,111,110,84,121,112,101,32,98,117,116,116,111,110,73,100,44,32,99,111,110,115,116,32,98,111, - 111,108,32,105,115,68,111,119,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,83,116,114,105,110,103,32,100,101,115,99,59,13, - 10,13,10,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,98,117,116,116,111,110,73,100,41,13,10,32,32,32,32,32,32,32,32,123,13, - 10,32,32,32,32,32,32,32,32,99,97,115,101,32,109,101,110,117,66,117,116,116,111,110,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100, - 101,115,99,32,61,32,34,109,101,110,117,32,98,117,116,116,111,110,32,40,115,104,111,114,116,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,112,108,97,121,66,117,116,116,111,110,58,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,112,108,97,121,32,98,117,116,116,111,110,34,59,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,112,108,117,115,66,117,116,116,111,110,58,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,112,108,117,115,32,98,117,116,116,111,110,34,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,109,105,110,117,115,66,117,116,116,111,110,58,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,109,105,110,117,115,32,98,117,116,116,111,110,34,59,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,114,105,103,104,116,66,117,116,116,111,110,58, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,114,105,103,104,116,32,98,117,116,116,111,110,32,40,115,104,111,114, - 116,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,108, - 101,102,116,66,117,116,116,111,110,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,108,101,102,116,32,98,117,116, - 116,111,110,32,40,115,104,111,114,116,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32, - 32,32,32,99,97,115,101,32,114,105,103,104,116,66,117,116,116,111,110,95,76,111,110,103,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100, - 101,115,99,32,61,32,34,114,105,103,104,116,32,98,117,116,116,111,110,32,40,108,111,110,103,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,108,101,102,116,66,117,116,116,111,110,95,76,111,110,103,58,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,108,101,102,116,32,98,117,116,116,111,110,32,40,108,111,110,103,41,34, - 59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,109,101,110,117, - 66,117,116,116,111,110,95,76,111,110,103,58,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,109,101,110,117,32,98, - 117,116,116,111,110,32,40,108,111,110,103,41,34,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32, - 32,32,32,32,99,97,115,101,32,112,108,97,121,66,117,116,116,111,110,83,108,101,101,112,77,111,100,101,58,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,100,101,115,99,32,61,32,34,112,108,97,121,32,40,115,108,101,101,112,32,109,111,100,101,41,34,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,99,97,115,101,32,115,119,105,116,99,104,101,100,58,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,100,101,115,99,32,61,32,34,114,101,109,111,116,101,32,115,119,105,116,99,104,101,100,34,59,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,98,114,101,97,107,59,13,10,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40, - 105,115,68,111,119,110,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,60,60,32,34,32,45,45,32,91,100,111,119,110,93, - 34,59,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,115,99,32,60,60,32,34,32, - 45,45,32,91,117,112,93,34,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,77,101,115,115,97,103,101,32,40,100,101,115,99,41,59,13, - 10,32,32,32,32,125,13,10,125,59,13,10,13,10,35,101,110,100,105,102,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,111,110,115,116,32,105,110,116,32,110,117,109,71, - 114,111,117,112,115,32,61,32,52,59,13,10,13,10,99,108,97,115,115,32,87,105,100,103,101,116,115,68,101,109,111,32,32,58,32,112,117,98,108,105, - 99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105, - 99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,109,101,110, - 117,66,117,116,116,111,110,59,13,10,32,32,32,32,84,111,103,103,108,101,66,117,116,116,111,110,42,32,101,110,97,98,108,101,66,117,116,116,111,110, - 59,13,10,13,10,32,32,32,32,68,101,109,111,84,97,98,98,101,100,67,111,109,112,111,110,101,110,116,42,32,116,97,98,115,59,13,10,13,10,112, - 117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,87,105,100,103,101,116,115,68,101,109,111,32,40,65,112,112,108,105,99,97,116,105, - 111,110,67,111,109,109,97,110,100,77,97,110,97,103,101,114,42,32,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,87,105,100,103,101,116,115,34,41,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,116,97,98,115,32,61,32,110,101,119,32,68,101,109,111,84, - 97,98,98,101,100,67,111,109,112,111,110,101,110,116,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116, - 111,110,32,40,84,40,34,99,108,105,99,107,32,102,111,114,32,97,32,112,111,112,117,112,32,109,101,110,117,46,46,34,41,44,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,99,108,105,99, - 107,32,102,111,114,32,97,32,100,101,109,111,32,111,102,32,116,104,101,32,100,105,102,102,101,114,101,110,116,32,116,121,112,101,115,32,111,102,32,105, - 116,101,109,32,121,111,117,32,99,97,110,32,112,117,116,32,105,110,116,111,32,97,32,112,111,112,117,112,32,109,101,110,117,46,46,46,34,41,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,109,101,110,117,66,117,116,116,111, - 110,41,59,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32, - 49,48,44,32,50,48,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,45,62,97,100,100,66,117, - 116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110, - 45,62,115,101,116,84,114,105,103,103,101,114,101,100,79,110,77,111,117,115,101,68,111,119,110,32,40,116,114,117,101,41,59,32,47,47,32,98,101,99, - 97,117,115,101,32,116,104,105,115,32,98,117,116,116,111,110,32,112,111,112,115,32,117,112,32,97,32,109,101,110,117,44,32,116,104,105,115,32,108,101, - 116,115,32,117,115,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,104,111,108,100,32,100,111,119,110,32,116,104,101,32,98,117,116,116, - 111,110,32,97,110,100,32,100,114,97,103,32,115,116,114,97,105,103,104,116,32,111,110,116,111,32,116,104,101,32,109,101,110,117,13,10,13,10,32,32, - 32,32,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,32,61,32,110,101,119,32,84,111,103,103,108, - 101,66,117,116,116,111,110,32,40,84,40,34,101,110,97,98,108,101,47,100,105,115,97,98,108,101,32,99,111,109,112,111,110,101,110,116,115,34,41,41, - 59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,101,110,97,98,108,101,66,117,116,116, - 111,110,41,59,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,115,101,116,66,111,117,110,100,115,32,40,50, - 51,48,44,32,49,48,44,32,49,56,48,44,32,50,52,41,59,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45, - 62,115,101,116,84,111,111,108,116,105,112,32,40,84,40,34,116,111,103,103,108,101,32,98,117,116,116,111,110,34,41,41,59,13,10,32,32,32,32,32, - 32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,115,101,116,84,111,103,103,108,101,83,116,97,116,101,32,40,116,114,117,101,44,32,102, - 97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76, - 105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,87,105,100,103,101,116,115,68,101, - 109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41, - 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32, - 32,32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,66,111,117,110,100,115,32,40,49,48,44,32,52,48,44,32,103,101,116,87,105,100,116,104, - 40,41,32,45,32,50,48,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,53,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32, - 32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116, - 111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,98,117,116,116,111,110,32,61,61,32,101,110,97,98,108,101, - 66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,98,111, - 111,108,32,101,110,97,98,108,101,100,32,61,32,101,110,97,98,108,101,66,117,116,116,111,110,45,62,103,101,116,84,111,103,103,108,101,83,116,97,116, - 101,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,101,110,117,66,117,116,116,111,110,45,62,115,101,116,69,110,97,98,108, - 101,100,32,40,101,110,97,98,108,101,100,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,69,110,97,98, - 108,101,100,32,40,101,110,97,98,108,101,100,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,32, - 105,102,32,40,98,117,116,116,111,110,32,61,61,32,109,101,110,117,66,117,116,116,111,110,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,109,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100, - 100,73,116,101,109,32,40,49,44,32,84,40,34,78,111,114,109,97,108,32,105,116,101,109,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,109,46,97,100,100,73,116,101,109,32,40,50,44,32,84,40,34,68,105,115,97,98,108,101,100,32,105,116,101,109,34,41,44,32,102,97,108,115, - 101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,51,44,32,84,40,34,84,105,99,107,101,100, - 32,105,116,101,109,34,41,44,32,116,114,117,101,44,32,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100, - 67,111,108,111,117,114,101,100,73,116,101,109,32,40,52,44,32,84,40,34,67,111,108,111,117,114,101,100,32,105,116,101,109,34,41,44,32,67,111,108, - 111,117,114,115,58,58,103,114,101,101,110,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,101,112,97,114,97,116,111, - 114,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,67,117,115,116,111,109,73,116,101,109,32,40,53,44,32,110,101, - 119,32,67,117,115,116,111,109,77,101,110,117,67,111,109,112,111,110,101,110,116,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77, - 101,110,117,32,116,97,98,115,77,101,110,117,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,77,101,110,117,46,97,100,100,73, - 116,101,109,32,40,49,48,48,49,44,32,84,40,34,83,104,111,119,32,116,97,98,115,32,97,116,32,116,104,101,32,116,111,112,34,41,44,32,116,114, - 117,101,44,32,116,97,98,115,45,62,103,101,116,79,114,105,101,110,116,97,116,105,111,110,40,41,32,61,61,32,84,97,98,98,101,100,66,117,116,116, - 111,110,66,97,114,58,58,84,97,98,115,65,116,84,111,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,77,101,110,117, - 46,97,100,100,73,116,101,109,32,40,49,48,48,50,44,32,84,40,34,83,104,111,119,32,116,97,98,115,32,97,116,32,116,104,101,32,98,111,116,116, - 111,109,34,41,44,32,116,114,117,101,44,32,116,97,98,115,45,62,103,101,116,79,114,105,101,110,116,97,116,105,111,110,40,41,32,61,61,32,84,97, - 98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,66,111,116,116,111,109,41,59,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,116,97,98,115,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,48,48,51,44,32,84,40,34,83,104,111,119,32,116,97,98,115,32, - 97,116,32,116,104,101,32,108,101,102,116,34,41,44,32,116,114,117,101,44,32,116,97,98,115,45,62,103,101,116,79,114,105,101,110,116,97,116,105,111, - 110,40,41,32,61,61,32,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,76,101,102,116,41,59,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,116,97,98,115,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,48,48,52,44,32,84,40,34,83,104,111, - 119,32,116,97,98,115,32,97,116,32,116,104,101,32,114,105,103,104,116,34,41,44,32,116,114,117,101,44,32,116,97,98,115,45,62,103,101,116,79,114, - 105,101,110,116,97,116,105,111,110,40,41,32,61,61,32,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,82,105, - 103,104,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,84,97,98,32, - 112,111,115,105,116,105,111,110,34,41,44,32,116,97,98,115,77,101,110,117,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46, - 97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117, - 32,100,105,97,108,111,103,77,101,110,117,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100, - 73,116,101,109,32,40,49,48,48,44,32,84,40,34,83,104,111,119,32,97,32,112,108,97,105,110,32,97,108,101,114,116,45,119,105,110,100,111,119,46, - 46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40, - 49,48,49,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114,116,45,119,105,110,100,111,119,32,119,105,116,104,32,97,32,39,119,97,114, - 110,105,110,103,39,32,105,99,111,110,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110, - 117,46,97,100,100,73,116,101,109,32,40,49,48,50,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114,116,45,119,105,110,100,111,119,32, - 119,105,116,104,32,97,110,32,39,105,110,102,111,39,32,105,99,111,110,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,48,51,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114, - 116,45,119,105,110,100,111,119,32,119,105,116,104,32,97,32,39,113,117,101,115,116,105,111,110,39,32,105,99,111,110,46,46,46,34,41,41,59,13,10, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,49,48,44, - 32,84,40,34,83,104,111,119,32,97,110,32,111,107,47,99,97,110,99,101,108,32,97,108,101,114,116,45,119,105,110,100,111,119,46,46,46,34,41,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,83,101,112,97,114,97,116,111,114, - 40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49, - 49,49,44,32,84,40,34,83,104,111,119,32,97,110,32,97,108,101,114,116,45,119,105,110,100,111,119,32,119,105,116,104,32,115,111,109,101,32,101,120, - 116,114,97,32,99,111,109,112,111,110,101,110,116,115,46,46,46,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,105,97, - 108,111,103,77,101,110,117,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100, - 105,97,108,111,103,77,101,110,117,46,97,100,100,73,116,101,109,32,40,49,49,50,44,32,84,40,34,83,104,111,119,32,97,32,84,104,114,101,97,100, - 87,105,116,104,80,114,111,103,114,101,115,115,87,105,110,100,111,119,32,100,101,109,111,46,46,46,34,41,41,59,13,10,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,109,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,65,108,101,114,116,87,105,110,100,111,119,32,100,101,109,111,110, - 115,116,114,97,116,105,111,110,115,34,41,44,32,100,105,97,108,111,103,77,101,110,117,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,73, - 116,101,109,32,40,49,50,48,44,32,84,40,34,83,104,111,119,32,97,32,99,111,108,111,117,114,32,115,101,108,101,99,116,111,114,32,100,101,109,111, - 46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10, - 13,10,35,105,102,32,74,85,67,69,95,77,65,67,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,49, - 52,48,44,32,84,40,34,82,117,110,32,116,104,101,32,65,112,112,108,101,32,82,101,109,111,116,101,32,67,111,110,116,114,111,108,32,116,101,115,116, - 46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,101,112,97,114,97,116,111,114,40,41,59,13,10, - 35,101,110,100,105,102,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,110,97,116,105,118,101,70,105, - 108,101,67,104,111,111,115,101,114,115,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115, - 101,114,115,46,97,100,100,73,116,101,109,32,40,49,50,49,44,32,84,40,34,39,76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114, - 46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,46, - 97,100,100,73,116,101,109,32,40,49,50,52,44,32,84,40,34,39,76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114,32,119,105,116, - 104,32,97,110,32,105,109,97,103,101,32,102,105,108,101,32,112,114,101,118,105,101,119,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,50,50,44,32,84,40,34, - 39,83,97,118,101,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,50,51,44,32,84,40,34,39,67,104,111, - 111,115,101,32,100,105,114,101,99,116,111,114,121,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46,46,46,34,41,41,59,13,10,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,59,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,51,49, - 44,32,84,40,34,39,76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100,73,116,101,109,32,40,49,51,52,44,32,84,40,34,39, - 76,111,97,100,39,32,102,105,108,101,32,98,114,111,119,115,101,114,32,119,105,116,104,32,97,110,32,105,109,97,103,101,32,102,105,108,101,32,112,114, - 101,118,105,101,119,46,46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101, - 114,115,46,97,100,100,73,116,101,109,32,40,49,51,50,44,32,84,40,34,39,83,97,118,101,39,32,102,105,108,101,32,98,114,111,119,115,101,114,46, - 46,46,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,106,117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,46,97,100,100, - 73,116,101,109,32,40,49,51,51,44,32,84,40,34,39,67,104,111,111,115,101,32,100,105,114,101,99,116,111,114,121,39,32,102,105,108,101,32,98,114, - 111,119,115,101,114,46,46,46,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,102,105, - 108,101,67,104,111,111,115,101,114,115,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,67,104,111,111,115,101,114,115,46,97,100, - 100,83,117,98,77,101,110,117,32,40,84,40,34,79,112,101,114,97,116,105,110,103,32,115,121,115,116,101,109,32,100,105,97,108,111,103,115,34,41,44, - 32,110,97,116,105,118,101,70,105,108,101,67,104,111,111,115,101,114,115,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,105,108,101,67, - 104,111,111,115,101,114,115,46,97,100,100,83,117,98,77,101,110,117,32,40,84,40,34,74,117,99,101,32,100,105,97,108,111,103,115,34,41,44,32,106, - 117,99,101,70,105,108,101,67,104,111,111,115,101,114,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,46,97,100,100,83,117, - 98,77,101,110,117,32,40,84,40,34,70,105,108,101,32,99,104,111,111,115,101,114,32,100,105,97,108,111,103,115,34,41,44,32,102,105,108,101,67,104, - 111,111,115,101,114,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,110,116,32,114,101,115,117,108,116,32,61,32,109,46,115, - 104,111,119,65,116,32,40,109,101,110,117,66,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114, - 101,115,117,108,116,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,47,47,32,117,115,101,114,32,99,104,111,115,101,32,115,111,109,101,116,104,105,110,103,32,102,114,111,109,32,116,104,101,32,109,101,110, - 117,46,46,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,62,61,32,49,48,48, - 32,38,38,32,114,101,115,117,108,116,32,60,32,49,48,53,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,65,108,101,114,116,73,99,111,110, - 84,121,112,101,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111,119,58,58,78,111,73,99,111,110,59,13,10,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,49,41,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111,119,58,58, - 87,97,114,110,105,110,103,73,99,111,110,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105, - 102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,50,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,59,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,51,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,99,111,110,32,61,32,65,108,101,114,116,87,105,110,100,111, - 119,58,58,81,117,101,115,116,105,111,110,73,99,111,110,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,105,99,111,110,44,13,10,32,32,32,32, + 32,47,47,32,98,101,116,119,101,101,110,32,50,48,37,32,97,110,100,32,56,48,37,44,32,112,114,101,102,101,114,97,98,108,121,32,53,48,37,13, + 10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,49, + 44,32,56,44,32,56,44,32,56,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,118,101,114,116,105,99,97,108,32,100,105, + 118,105,100,101,114,32,100,114,97,103,45,98,97,114,32,116,104,105,110,103,32,105,115,32,97,108,119,97,121,115,32,56,32,112,105,120,101,108,115,32, + 119,105,100,101,13,10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111, + 117,116,32,40,50,44,32,49,53,48,44,32,45,49,46,48,44,32,45,48,46,53,41,59,32,32,32,47,47,32,116,104,101,32,99,111,109,112,111,110, + 101,110,116,115,32,111,110,32,116,104,101,32,114,105,103,104,116,32,109,117,115,116,32,98,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,84,40,34,84,104,105,115,32,105,115,32,97,110,32,65,108,101,114,116,87,105,110,100,111,119,34,41,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,47,47,32,97,116,32,108,101,97,115,116,32,49,53,48,32,112,105,120,101,108,115,32,119,105,100,101,44,32,112,114,101, + 102,101,114,97,98,108,121,32,53,48,37,32,111,102,32,116,104,101,32,116,111,116,97,108,32,119,105,100,116,104,13,10,13,10,32,32,32,32,32,32, + 32,32,118,101,114,116,105,99,97,108,68,105,118,105,100,101,114,66,97,114,32,61,32,110,101,119,32,83,116,114,101,116,99,104,97,98,108,101,76,97, + 121,111,117,116,82,101,115,105,122,101,114,66,97,114,32,40,38,118,101,114,116,105,99,97,108,76,97,121,111,117,116,44,32,49,44,32,116,114,117,101, + 41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,118,101,114,116,105,99,97,108,68, + 105,118,105,100,101,114,66,97,114,41,59,13,10,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46, + 115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,48,44,32,45,48,46,50,44,32,45,49,46,48,44,32,45,48,46,52,41,59,32,32,47,47, + 32,104,101,105,103,104,116,32,111,102,32,116,104,101,32,102,111,110,116,32,116,101,120,116,32,98,111,120,32,109,117,115,116,32,98,101,13,10,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,84,40,34,65,110,100,32,116,104,105,115,32,105,115,32,116,104,101,32,65,108,101,114,116,87,105,110,100,111,119,39,115,32,109,101,115, - 115,97,103,101,46,32,66,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104, - 32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,46,34,41,44,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,98,101,116,119,101,101,110,32,50,48,37,32,97,110,100,32, + 49,48,48,37,44,32,112,114,101,102,101,114,97,98,108,121,32,52,48,37,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108, + 76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,49,44,32,56,44,32,56,44,32,56,41,59,32,32,32,32,32,32, + 32,32,32,32,32,47,47,32,116,104,101,32,104,111,114,105,122,111,110,116,97,108,32,100,105,118,105,100,101,114,32,100,114,97,103,45,98,97,114,32, + 116,104,105,110,103,32,105,115,32,97,108,119,97,121,115,32,56,32,112,105,120,101,108,115,32,104,105,103,104,13,10,32,32,32,32,32,32,32,32,104, + 111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,50,44,32,50,44,32,53,44,32, + 53,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,103,97,112,32,98,101,116,119,101,101,110,32,116,104,101,32,99,111,110,116,114, + 111,108,115,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121, + 111,117,116,32,40,51,44,32,49,53,44,32,50,48,44,32,50,48,41,59,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,105,116,97,108,105, + 99,32,98,117,116,116,111,110,32,119,111,117,108,100,32,108,105,107,101,32,116,111,32,98,101,32,50,48,32,112,105,120,101,108,115,32,104,105,103,104, + 13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116, + 32,40,52,44,32,50,44,32,53,44,32,53,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,103,97,112,32,98,101,116,119,101,101, + 110,32,116,104,101,32,99,111,110,116,114,111,108,115,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116, + 46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,53,44,32,49,53,44,32,50,48,44,32,50,48,41,59,32,32,32,32,32,32,32,32,47, + 47,32,116,104,101,32,98,111,108,100,32,98,117,116,116,111,110,32,119,111,117,108,100,32,108,105,107,101,32,116,111,32,98,101,32,50,48,32,112,105, + 120,101,108,115,32,104,105,103,104,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73, + 116,101,109,76,97,121,111,117,116,32,40,54,44,32,50,44,32,53,44,32,53,41,59,32,32,32,32,32,32,32,32,32,32,32,47,47,32,97,32,103, + 97,112,32,98,101,116,119,101,101,110,32,116,104,101,32,99,111,110,116,114,111,108,115,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110, + 116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,55,44,32,49,53,44,32,50,48,44,32,50,48,41,59, + 32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,105,116,97,108,105,99,32,98,117,116,116,111,110,32,119,111,117,108,100,32,108,105,107,101,32, + 116,111,32,98,101,32,50,48,32,112,105,120,101,108,115,32,104,105,103,104,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108, + 76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,56,44,32,50,44,32,53,44,32,53,41,59,32,32,32,32,32,32, + 32,32,32,32,32,47,47,32,97,32,103,97,112,32,98,101,116,119,101,101,110,32,116,104,101,32,99,111,110,116,114,111,108,115,13,10,32,32,32,32, + 32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,57,44,32,49, + 53,44,32,50,48,44,32,50,48,41,59,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,99,111,112,121,32,99,111,100,101,32,98,117,116,116, + 111,110,32,119,111,117,108,100,32,108,105,107,101,32,116,111,32,98,101,32,50,48,32,112,105,120,101,108,115,32,104,105,103,104,13,10,32,32,32,32, + 32,32,32,32,104,111,114,105,122,111,110,116,97,108,76,97,121,111,117,116,46,115,101,116,73,116,101,109,76,97,121,111,117,116,32,40,49,48,44,32, + 53,44,32,45,49,46,48,44,32,53,41,59,32,32,32,32,32,32,32,32,47,47,32,97,100,100,32,97,32,103,97,112,32,97,116,32,116,104,101,32, + 98,111,116,116,111,109,32,116,104,97,116,32,119,105,108,108,32,102,105,108,108,32,117,112,32,97,110,121,13,10,32,32,32,32,32,32,32,32,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,84,40,34,111,107,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,49,48,41,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,111,108,32, - 117,115,101,114,80,105,99,107,101,100,79,107,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,61,32, - 65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,79,107,67,97,110,99,101,108,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111, - 119,58,58,81,117,101,115,116,105,111,110,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,84,104,105, - 115,32,105,115,32,97,110,32,111,107,47,99,97,110,99,101,108,32,65,108,101,114,116,87,105,110,100,111,119,34,41,44,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,112,97,99,101,32,108,101,102,116,32,111,118,101,114,32,45,32,116,104,105,115,32,119, + 105,108,108,32,115,116,111,112,32,116,104,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32, + 115,108,105,100,101,114,115,32,102,114,111,109,32,97,108,119,97,121,115,32,115,116,105,99,107,105,110,103,32,116,111,32,116,104,101,13,10,32,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,84,40,34,65,110,100,32,116,104,105,115,32,105,115,32,116,104,101,32,65,108,101,114,116,87,105,110,100,111,119, - 39,115,32,109,101,115,115,97,103,101,46,32,66,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97, - 104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,32,98,108,97,104,46,34,41,41, - 59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108, - 115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,49,49,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,32,119,32,40,84,40,34, - 65,108,101,114,116,87,105,110,100,111,119,32,100,101,109,111,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,84,104,105,115,32,65,108,101,114,116,87,105,110,100,111,119,32,104,97, - 115,32,97,32,99,111,117,112,108,101,32,111,102,32,101,120,116,114,97,32,99,111,109,112,111,110,101,110,116,115,32,97,100,100,101,100,32,116,111,32, - 115,104,111,119,32,104,111,119,32,116,111,32,97,100,100,32,100,114,111,112,45,100,111,119,110,32,108,105,115,116,115,32,97,110,100,32,116,101,120,116, - 32,101,110,116,114,121,32,98,111,120,101,115,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,81,117,101,115,116,105,111,110,73,99,111,110,41,59, - 13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,119,46,97,100,100,84,101,120,116,69,100,105,116,111,114,32, - 40,84,40,34,116,101,120,116,34,41,44,32,84,40,34,101,110,116,101,114,32,115,111,109,101,32,116,101,120,116,32,104,101,114,101,34,41,44,32,84, - 40,34,116,101,120,116,32,102,105,101,108,100,58,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,83,116,114,105,110,103,65,114,114,97,121,32,111,112,116,105,111,110,115,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,111,112,116,105,111,110,115,46,97,100,100,32,40,84,40,34,111,112,116,105,111,110,32,49,34,41,41,59,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,116,105,111,110,115,46,97,100,100,32,40,84,40,34,111,112,116,105,111,110,32,50,34,41,41, - 59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,116,105,111,110,115,46,97,100,100,32,40,84,40,34,111, - 112,116,105,111,110,32,51,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,112,116,105,111,110,115, - 46,97,100,100,32,40,84,40,34,111,112,116,105,111,110,32,52,34,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,119,46,97,100,100,67,111,109,98,111,66,111,120,32,40,84,40,34,111,112,116,105,111,110,34,41,44,32,111,112,116,105,111,110,115,44,32, - 84,40,34,115,111,109,101,32,111,112,116,105,111,110,115,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,119,46,97,100,100,66,117,116,116,111,110,32,40,84,40,34,111,107,34,41,44,32,49,44,32,75,101,121,80,114,101,115,115,32,40,75,101, - 121,80,114,101,115,115,58,58,114,101,116,117,114,110,75,101,121,44,32,48,44,32,48,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,119,46,97,100,100,66,117,116,116,111,110,32,40,84,40,34,99,97,110,99,101,108,34,41,44,32,48,44,32,75,101,121, - 80,114,101,115,115,32,40,75,101,121,80,114,101,115,115,58,58,101,115,99,97,112,101,75,101,121,44,32,48,44,32,48,41,41,59,13,10,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,119,46,114,117,110,77,111,100,97,108,76,111,111,112,40,41,32, - 33,61,32,48,41,32,47,47,32,105,115,32,116,104,101,121,32,112,105,99,107,101,100,32,39,111,107,39,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32, - 116,104,105,115,32,105,115,32,116,104,101,32,105,116,101,109,32,116,104,101,121,32,99,104,111,115,101,32,105,110,32,116,104,101,32,100,114,111,112,45, - 100,111,119,110,32,108,105,115,116,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110, - 115,116,32,105,110,116,32,111,112,116,105,111,110,73,110,100,101,120,67,104,111,115,101,110,32,61,32,119,46,103,101,116,67,111,109,98,111,66,111,120, - 67,111,109,112,111,110,101,110,116,32,40,84,40,34,111,112,116,105,111,110,34,41,41,45,62,103,101,116,83,101,108,101,99,116,101,100,73,116,101,109, - 73,110,100,101,120,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116, - 104,105,115,32,105,115,32,116,104,101,32,116,101,120,116,32,116,104,101,121,32,101,110,116,101,114,101,100,46,46,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,83,116,114,105,110,103,32,116,101,120,116,32,61,32,119,46,103,101,116,84,101,120,116,69, - 100,105,116,111,114,67,111,110,116,101,110,116,115,32,40,84,40,34,116,101,120,116,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,49,50,41,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,66,97,99,107, - 103,114,111,117,110,100,84,104,114,101,97,100,32,100,101,109,111,84,104,114,101,97,100,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,105,102,32,40,100,101,109,111,84,104,114,101,97,100,46,114,117,110,84,104,114,101,97,100,40,41,41,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,47,47,32,116,104,114,101,97,100,32,102,105,110,105,115,104,101,100,32,110,111,114,109,97,108,108,121,46,46,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115, - 97,103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99,111,110,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,98,111,116,116,111,109,32,111,102,32,116,104,101,32,119,105,110, + 100,111,119,13,10,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108,68,105,118,105,100,101,114,66,97,114,32,61,32,110,101, + 119,32,83,116,114,101,116,99,104,97,98,108,101,76,97,121,111,117,116,82,101,115,105,122,101,114,66,97,114,32,40,38,104,111,114,105,122,111,110,116, + 97,108,76,97,121,111,117,116,44,32,49,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101, + 86,105,115,105,98,108,101,32,40,104,111,114,105,122,111,110,116,97,108,68,105,118,105,100,101,114,66,97,114,41,59,13,10,32,32,32,32,125,13,10, + 13,10,32,32,32,32,126,70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, + 32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105, + 100,32,114,101,115,105,122,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,108,97,121,32,111,117,116,32,116, + 104,101,32,108,105,115,116,32,98,111,120,32,97,110,100,32,118,101,114,116,105,99,97,108,32,100,105,118,105,100,101,114,46,46,13,10,32,32,32,32, + 32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,118,99,111,109,112,115,91,93,32,61,32,123,32,108,105,115,116,66,111,120,44,32,118,101,114, + 116,105,99,97,108,68,105,118,105,100,101,114,66,97,114,44,32,48,32,125,59,13,10,13,10,32,32,32,32,32,32,32,32,118,101,114,116,105,99,97, + 108,76,97,121,111,117,116,46,108,97,121,79,117,116,67,111,109,112,111,110,101,110,116,115,32,40,118,99,111,109,112,115,44,32,51,44,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,52, + 44,32,52,44,32,103,101,116,87,105,100,116,104,40,41,32,45,32,56,44,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,56,44,13,10,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,84,40,34,80,114,111,103,114,101,115,115,32,119,105,110,100,111,119,34,41,44,13,10,32,32,32,32,32,32,32,32,32, + 102,97,108,115,101,44,32,32,32,32,32,47,47,32,108,97,121,32,111,117,116,32,115,105,100,101,45,98,121,45,115,105,100,101,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117, + 101,41,59,32,32,32,32,32,47,47,32,114,101,115,105,122,101,32,116,104,101,32,99,111,109,112,111,110,101,110,116,115,39,32,104,101,105,103,104,116, + 115,32,97,115,32,119,101,108,108,32,97,115,32,119,105,100,116,104,115,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,110,111,119,32,108,97, + 121,32,111,117,116,32,116,104,101,32,116,101,120,116,32,98,111,120,32,97,110,100,32,116,104,101,32,99,111,110,116,114,111,108,115,32,98,101,108,111, + 119,32,105,116,46,46,13,10,32,32,32,32,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,104,99,111,109,112,115,91,93,32,61,32,123,32, + 116,101,120,116,66,111,120,44,32,104,111,114,105,122,111,110,116,97,108,68,105,118,105,100,101,114,66,97,114,44,32,48,44,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,108,100,66,117,116,116,111,110,44,32,48, + 44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,116,97,108,105, + 99,66,117,116,116,111,110,44,32,48,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,115,105,122,101,83,108,105,100,101,114,32,125,59,13,10,13,10,32,32,32,32,32,32,32,32,104,111,114,105,122,111,110,116,97,108, + 76,97,121,111,117,116,46,108,97,121,79,117,116,67,111,109,112,111,110,101,110,116,115,32,40,104,99,111,109,112,115,44,32,56,44,13,10,32,32,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,84,40,34,84,104,114,101,97,100,32,102,105,110,105,115,104,101,100,32,111,107,33,34,41,41,59,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,47,47,32,117,115,101,114,32,112,114,101,115,115,101,100,32,116,104,101,32,99,97,110,99,101,108,32,98,117,116,116,111, - 110,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119, - 58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,87,97,114,110,105,110,103,73,99, - 111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,80,114,111,103,114,101,115,115,32,119,105,110,100,111,119,34,41,44,13, - 10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,89,111,117,32,112,114,101,115,115,101,100,32,99,97,110,99,101,108,33,34,41,41,59, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61, - 32,49,50,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,67,111,108,111,117,114,83,101,108,101,99,116,111,114,68,105,97,108,111,103,87,105,110,100,111,119,32,99,111,108,111,117,114,68, - 105,97,108,111,103,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,119,105, - 108,108,32,114,117,110,32,97,110,32,101,118,101,110,116,32,108,111,111,112,32,117,110,116,105,108,32,116,104,101,32,100,105,97,108,111,103,39,115,32, - 99,108,111,115,101,66,117,116,116,111,110,80,114,101,115,115,101,100,40,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,47,47,32,109,101,116,104,111,100,32,99,97,117,115,101,115,32,116,104,101,32,108,111,111,112,32,116,111,32,101,120,105,116,46,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,108,111,117,114,68,105,97,108,111,103,46,114,117,110,77,111,100,97,108,76, - 111,111,112,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,52,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,123,13,10,35,105,102,32,74,85,67,69,95,77,65,67,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,65,112,112,108,101,82,101,109,111,116,101,84,101,115,116,87,105,110,100,111,119,32,116,101,115,116,59,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,116,101,115,116,46,114,117,110,77,111,100,97,108,76,111,111,112,40,41,59,13,10,35,101,110,100,105,102,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32, - 105,102,32,40,114,101,115,117,108,116,32,62,61,32,49,50,49,32,38,38,32,114,101,115,117,108,116,32,60,32,49,51,57,41,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116, - 32,98,111,111,108,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,32,61,32,114,101,115,117,108,116,32,60,32,49,51,48,59,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,62,32,49,51,48,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,115,117,108,116,32,45,61,32,49,48,59,13,10,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,49,41,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,70,105,108,101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,32,102,105,108,101,32, - 116,111,32,111,112,101,110,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105, - 114,101,99,116,111,114,121,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,84,40,34,42,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13, - 10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101, - 70,111,114,70,105,108,101,84,111,79,112,101,110,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104, - 111,115,101,110,70,105,108,101,32,61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97, - 103,101,66,111,120,32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,84,40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,84,40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,70,105,108,101,46,103, - 101,116,70,117,108,108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,52,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,73,109,97,103,101,80,114,101,118,105,101,119,67,111,109,112,111,110,101,110,116,32,105,109,97,103,101,80,114,101,118,105,101,119,59,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,109,97,103,101,80,114,101,118,105,101,119,46,115,101,116,83, - 105,122,101,32,40,50,48,48,44,32,50,48,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,70,105,108,101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,110,32,105,109,97,103,101,32,116,111, - 32,111,112,101,110,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105,114,101, - 99,116,111,114,121,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,84,40,34,42,46,106,112,103,59,42,46,106,112,101,103,59,42,46,112,110,103,59,42,46,103,105,102,34,41,44, + 52,32,43,32,118,101,114,116,105,99,97,108,76,97,121,111,117,116,46,103,101,116,73,116,101,109,67,117,114,114,101,110,116,80,111,115,105,116,105,111, + 110,32,40,50,41,44,32,47,47,32,102,111,114,32,116,104,101,105,114,32,119,105,100,116,104,115,44,32,114,101,102,101,114,32,116,111,32,116,104,101, + 32,118,101,114,116,105,99,97,108,32,108,97,121,111,117,116,32,115,116,97,116,101,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,52,44,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,101,114,116,105,99, + 97,108,76,97,121,111,117,116,46,103,101,116,73,116,101,109,67,117,114,114,101,110,116,65,98,115,111,108,117,116,101,83,105,122,101,32,40,50,41,44, 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101,70,111,114,70,105,108,101,84,111,79,112,101,110,32,40,38,105,109,97, - 103,101,80,114,101,118,105,101,119,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104,111,115,101,110,70, - 105,108,101,32,61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120, - 32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,84,40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,84,40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,70,105,108,101,46,103,101,116,70,117,108, - 108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,50,41,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108, - 101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,32,102,105,108,101,32,116,111,32,115,97,118,101,46,46,46, - 34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105,114,101,99,116,111,114,121,40,41,44, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,84,40,34,42,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101,70,111,114,70,105,108,101,84,111,83, - 97,118,101,32,40,116,114,117,101,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104,111,115,101,110,70, - 105,108,101,32,61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120, - 32,40,65,108,101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,84,40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,84,40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,70,105,108,101,46,103,101,116,70,117,108, - 108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,50,51,41,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108, - 101,67,104,111,111,115,101,114,32,102,99,32,40,84,40,34,67,104,111,111,115,101,32,97,32,100,105,114,101,99,116,111,114,121,46,46,46,34,41,44, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,70,105,108,101,58,58,103,101,116,67,117,114,114,101,110,116,87,111,114,107,105,110,103,68,105,114,101,99,116,111,114,121,40,41,44,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84, - 40,34,42,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,117,115,101,78,97,116,105,118,101,86,101,114,115,105,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,99,46,98,114,111,119,115,101,70,111,114,68,105,114,101,99,116,111,114,121,40, - 41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,70,105,108,101,32,99,104,111,115,101,110,68,105,114,101,99,116,111,114,121,32, - 61,32,102,99,46,103,101,116,82,101,115,117,108,116,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,65,108,101,114,116,87,105,110,100,111,119,58,58,115,104,111,119,77,101,115,115,97,103,101,66,111,120,32,40,65,108, - 101,114,116,87,105,110,100,111,119,58,58,73,110,102,111,73,99,111,110,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84, - 40,34,70,105,108,101,32,67,104,111,111,115,101,114,46,46,46,34,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,84, - 40,34,89,111,117,32,112,105,99,107,101,100,58,32,34,41,32,43,32,99,104,111,115,101,110,68,105,114,101,99,116,111,114,121,46,103,101,116,70,117, - 108,108,80,97,116,104,78,97,109,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32, - 49,48,48,49,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,79,114,105,101,110,116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110, - 66,97,114,58,58,84,97,98,115,65,116,84,111,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,48,50,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97, - 98,115,45,62,115,101,116,79,114,105,101,110,116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98, - 115,65,116,66,111,116,116,111,109,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,48,51,41,13,10,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,45,62,115, - 101,116,79,114,105,101,110,116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,76,101, - 102,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,101,108,115,101,32,105,102,32,40,114,101,115,117,108,116,32,61,61,32,49,48,48,52,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97,98,115,45,62,115,101,116,79,114,105,101,110, - 116,97,116,105,111,110,32,40,84,97,98,98,101,100,66,117,116,116,111,110,66,97,114,58,58,84,97,98,115,65,116,82,105,103,104,116,41,59,13,10, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32, - 32,32,125,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 32,32,32,32,32,103,101,116,72,101,105,103,104,116,40,41,32,45,32,56,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,44,32,32,32,32,47,47,32,108,97, + 121,32,111,117,116,32,97,98,111,118,101,32,101,97,99,104,32,111,116,104,101,114,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,117,101,41,59,32,32,32,47,47,32,114, + 101,115,105,122,101,32,116,104,101,32,99,111,109,112,111,110,101,110,116,115,39,32,119,105,100,116,104,115,32,97,115,32,119,101,108,108,32,97,115,32, + 104,101,105,103,104,116,115,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,105,109,112,108,101,109,101,110,116,115,32,116,104,101,32, + 76,105,115,116,66,111,120,77,111,100,101,108,32,109,101,116,104,111,100,13,10,32,32,32,32,105,110,116,32,103,101,116,78,117,109,82,111,119,115,40, + 41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,111,110,116,115,46,115,105,122,101,40,41,59,13,10, + 32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,105,109,112,108,101,109,101,110,116,115,32,116,104,101,32,76,105,115,116,66,111,120,77,111, + 100,101,108,32,109,101,116,104,111,100,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,76,105,115,116,66,111,120,73,116,101,109,32,40,105, + 110,116,32,114,111,119,78,117,109,98,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,71,114,97,112,104,105,99,115,38,32,103,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,105,110,116,32,119,105,100,116,104,44,32,105,110,116,32,104,101,105,103,104,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,111,111,108,32,114,111,119,73,115,83,101,108,101,99,116,101,100,41,13,10,32,32,32,32,123, + 13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,111,119,73,115,83,101,108,101,99,116,101,100,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,108,105,103,104,116,98,108,117,101,41,59,13,10,13,10,32,32,32, + 32,32,32,32,32,105,102,32,40,102,111,110,116,115,32,91,114,111,119,78,117,109,98,101,114,93,32,33,61,32,48,41,13,10,32,32,32,32,32,32, + 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,70,111,110,116,32,102,111,110,116,32,40,42,102,111,110,116,115,32,91,114,111,119,78, + 117,109,98,101,114,93,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,110,116,46,115,101,116,72,101,105,103,104,116,32,40,104,101, + 105,103,104,116,32,42,32,48,46,55,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40, + 102,111,110,116,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120,116,32,40,102,111,110,116,46,103,101,116, + 84,121,112,101,102,97,99,101,78,97,109,101,40,41,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,52,44,32,48,44,32,119,105,100,116,104,32,45,32,52,44,32,104,101,105,103,104,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,76,101,102,116,44,32,116, + 114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,117,112,100,97, + 116,101,80,114,101,118,105,101,119,66,111,120,84,101,120,116,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,70,111,110,116,42, + 32,102,32,61,32,102,111,110,116,115,32,91,108,105,115,116,66,111,120,45,62,103,101,116,83,101,108,101,99,116,101,100,82,111,119,40,41,93,59,13, + 10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,102,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,70,111,110,116,32,102,111,110,116,32,40,42,102,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111, + 110,116,46,115,101,116,72,101,105,103,104,116,32,40,40,102,108,111,97,116,41,32,115,105,122,101,83,108,105,100,101,114,45,62,103,101,116,86,97,108, + 117,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,110,116,46,115,101,116,66,111,108,100,32,40,98,111,108,100,66,117, + 116,116,111,110,45,62,103,101,116,84,111,103,103,108,101,83,116,97,116,101,40,41,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111, + 110,116,46,115,101,116,73,116,97,108,105,99,32,40,105,116,97,108,105,99,66,117,116,116,111,110,45,62,103,101,116,84,111,103,103,108,101,83,116,97, + 116,101,40,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,116,101,120,116,66,111,120,45,62,97,112,112,108,121,70,111,110,116, + 84,111,65,108,108,84,101,120,116,32,40,102,111,110,116,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32, + 32,32,32,118,111,105,100,32,115,101,108,101,99,116,101,100,82,111,119,115,67,104,97,110,103,101,100,32,40,105,110,116,32,108,97,115,116,82,111,119, + 115,101,108,101,99,116,101,100,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,80,114,101,118,105,101,119,66, + 111,120,84,101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107, + 101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,117,112,100,97, + 116,101,80,114,101,118,105,101,119,66,111,120,84,101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115, + 108,105,100,101,114,86,97,108,117,101,67,104,97,110,103,101,100,32,40,83,108,105,100,101,114,42,41,13,10,32,32,32,32,123,13,10,32,32,32,32, + 32,32,32,32,47,47,32,40,116,104,105,115,32,105,115,32,99,97,108,108,101,100,32,119,104,101,110,32,116,104,101,32,115,105,122,101,32,115,108,105, + 100,101,114,32,105,115,32,109,111,118,101,100,41,13,10,32,32,32,32,32,32,32,32,117,112,100,97,116,101,80,114,101,118,105,101,119,66,111,120,84, + 101,120,116,40,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,87, - 105,100,103,101,116,115,68,101,109,111,32,40,65,112,112,108,105,99,97,116,105,111,110,67,111,109,109,97,110,100,77,97,110,97,103,101,114,42,32,99, - 111,109,109,97,110,100,77,97,110,97,103,101,114,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,87,105,100,103,101,116, - 115,68,101,109,111,32,40,99,111,109,109,97,110,100,77,97,110,97,103,101,114,41,59,13,10,125,13,10,0,0}; -const char* BinaryData::widgetsdemo_cpp = (const char*) temp17; - + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97, + 116,101,70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32, + 70,111,110,116,115,65,110,100,84,101,120,116,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; +const char* BinaryData::fontsandtextdemo_cpp = (const char*) temp17; diff --git a/extras/juce demo/src/BinaryData.h b/extras/juce demo/src/BinaryData.h index d0b5d813ca..a98338d6d2 100644 --- a/extras/juce demo/src/BinaryData.h +++ b/extras/juce demo/src/BinaryData.h @@ -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* tabledemo_cpp; + const int tabledemo_cppSize = 12381; + + extern const char* cello_wav; + const int cello_wavSize = 46348; + extern const char* draganddropdemo_cpp; const int draganddropdemo_cppSize = 7937; - extern const char* fontsandtextdemo_cpp; - const int fontsandtextdemo_cppSize = 9064; - - extern const char* icons_zip; - const int icons_zipSize = 83876; - - extern const char* interprocesscommsdemo_cpp; - const int interprocesscommsdemo_cppSize = 12631; - - extern const char* juce_png; - const int juce_pngSize = 15290; - - extern const char* opengldemo_cpp; - const int opengldemo_cppSize = 9667; - - extern const char* pathsandtransformsdemo_cpp; - const int pathsandtransformsdemo_cppSize = 14231; - - 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* threadingdemo_cpp; - const int threadingdemo_cppSize = 10047; + extern const char* treeviewdemo_cpp; + const int treeviewdemo_cppSize = 7715; extern const char* treedemo_xml; const int treedemo_xmlSize = 1126; - extern const char* treeviewdemo_cpp; - const int treeviewdemo_cppSize = 7715; + extern const char* quicktimedemo_cpp; + const int quicktimedemo_cppSize = 4576; + + extern const char* audiodemo_cpp; + const int audiodemo_cppSize = 23584; + + extern const char* threadingdemo_cpp; + const int threadingdemo_cppSize = 10049; + + 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 diff --git a/extras/juce demo/src/binarydata/OpenGLDemo.cpp b/extras/juce demo/src/binarydata/OpenGLDemo.cpp index dde289c785..ece0bf0165 100644 --- a/extras/juce demo/src/binarydata/OpenGLDemo.cpp +++ b/extras/juce demo/src/binarydata/OpenGLDemo.cpp @@ -31,9 +31,6 @@ #ifdef _WIN32 #include -#elif ! defined (LINUX) - #include - #include #endif #include "../jucedemo_headers.h" @@ -48,7 +45,6 @@ #include #undef KeyPress #else - #include #include #endif diff --git a/extras/juce demo/src/binarydata/ThreadingDemo.cpp b/extras/juce demo/src/binarydata/ThreadingDemo.cpp index d77d1edeee..02b832937b 100644 --- a/extras/juce demo/src/binarydata/ThreadingDemo.cpp +++ b/extras/juce demo/src/binarydata/ThreadingDemo.cpp @@ -40,7 +40,7 @@ class BouncingBallComp : public Component, float innerX, innerY; Colour colour; CriticalSection lock; - int threadId; + int64 threadId; public: BouncingBallComp() diff --git a/extras/juce demo/src/demos/ThreadingDemo.cpp b/extras/juce demo/src/demos/ThreadingDemo.cpp index d77d1edeee..02b832937b 100644 --- a/extras/juce demo/src/demos/ThreadingDemo.cpp +++ b/extras/juce demo/src/demos/ThreadingDemo.cpp @@ -40,7 +40,7 @@ class BouncingBallComp : public Component, float innerX, innerY; Colour colour; CriticalSection lock; - int threadId; + int64 threadId; public: BouncingBallComp() diff --git a/extras/juce demo/src/juce_AppConfig.h b/extras/juce demo/src/juce_AppConfig.h index 00ed78cd97..8fce15e0ba 100644 --- a/extras/juce demo/src/juce_AppConfig.h +++ b/extras/juce demo/src/juce_AppConfig.h @@ -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 diff --git a/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj b/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj index 54033f37b8..bb925e5917 100644 --- a/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj +++ b/extras/the jucer/build/mac/Jucer.xcodeproj/project.pbxproj @@ -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 = ""; }; 846C10DC0DE33FA100E8CCE8 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; - 846C10DD0DE33FA100E8CCE8 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; }; - 846C10DE0DE33FA100E8CCE8 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 846C10DF0DE33FA100E8CCE8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 846C10E00DE33FA100E8CCE8 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; 846C10E10DE33FA100E8CCE8 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; @@ -77,8 +72,8 @@ 846C10E40DE33FA100E8CCE8 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = ""; }; 846C10E50DE33FA100E8CCE8 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 846C10E60DE33FA100E8CCE8 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; - 846C10E70DE33FA100E8CCE8 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 846C10E80DE33FA100E8CCE8 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; + 84E01DD80E910B7B003E41AF /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 84F176990A271BBD00908B2F /* jucer_ColourEditorComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jucer_ColourEditorComponent.h; sourceTree = ""; }; 84F1769A0A271BBD00908B2F /* jucer_Colours.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jucer_Colours.h; sourceTree = ""; }; 84F1769B0A271BBD00908B2F /* jucer_StoredSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = jucer_StoredSettings.cpp; sourceTree = ""; }; @@ -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 = ""; }; 8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 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"; diff --git a/extras/the jucer/src/BinaryData.cpp b/extras/the jucer/src/BinaryData.cpp index c08fddd03e..1279f531a8 100644 --- a/extras/the jucer/src/BinaryData.cpp +++ b/extras/the jucer/src/BinaryData.cpp @@ -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; - diff --git a/extras/the jucer/src/juce_AppConfig.h b/extras/the jucer/src/juce_AppConfig.h index 00ed78cd97..8fce15e0ba 100644 --- a/extras/the jucer/src/juce_AppConfig.h +++ b/extras/the jucer/src/juce_AppConfig.h @@ -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 diff --git a/extras/the jucer/src/jucer_Headers.h b/extras/the jucer/src/jucer_Headers.h index 718cb8a93a..484d8f0218 100644 --- a/extras/the jucer/src/jucer_Headers.h +++ b/extras/the jucer/src/jucer_Headers.h @@ -43,7 +43,7 @@ //============================================================================== #define JUCER_MAJOR_VERSION 1 -#define JUCER_MINOR_VERSION 11 +#define JUCER_MINOR_VERSION 12 //============================================================================== #include "BinaryData.h" diff --git a/extras/the jucer/src/jucer_Main.cpp b/extras/the jucer/src/jucer_Main.cpp index fa37717eb9..655f301126 100644 --- a/extras/the jucer/src/jucer_Main.cpp +++ b/extras/the jucer/src/jucer_Main.cpp @@ -83,7 +83,7 @@ public: StoredSettings::deleteInstance(); - quit (false); + quit(); } } diff --git a/extras/the jucer/src/utility/jucer_UtilityFunctions.cpp b/extras/the jucer/src/utility/jucer_UtilityFunctions.cpp index 1170eedfff..c14f28883c 100644 --- a/extras/the jucer/src/utility/jucer_UtilityFunctions.cpp +++ b/extras/the jucer/src/utility/jucer_UtilityFunctions.cpp @@ -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(); diff --git a/juce_Config.h b/juce_Config.h index 83fd150064..57c67807b8 100644 --- a/juce_Config.h +++ b/juce_Config.h @@ -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 diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 8cf2e13ab8..1b043163de 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -37,81 +37,575 @@ */ +#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 + +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + //============================================================================== #ifdef _WIN32 -/********* Start of inlined file: win32_headers.h *********/ -#ifndef __WIN32_HEADERS_JUCEHEADER__ -#define __WIN32_HEADERS_JUCEHEADER__ +/********* Start of inlined file: juce_win32_NativeIncludes.h *********/ + +#ifndef __JUCE_WIN32_NATIVE_INCLUDES_H__ +#define __JUCE_WIN32_NATIVE_INCLUDES_H__ + +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ #ifndef STRICT #define STRICT 1 #endif -#define WIN32_LEAN_AND_MEAN -// don't want to get told about microsoft's mistakes.. +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 + #ifdef _MSC_VER #pragma warning (push) - #pragma warning (disable : 4100 4201) -#endif - -// use Platform SDK as win2000 unless this is disabled -#ifndef DISABLE_TRANSPARENT_WINDOWS - #define _WIN32_WINNT 0x0500 + #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 +#include #include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if JUCE_OPENGL + #include +#endif #undef PACKED -#ifdef _MSC_VER - #pragma warning (pop) +#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 -#endif // __WIN32_HEADERS_JUCEHEADER__ -/********* End of inlined file: win32_headers.h *********/ +#if JUCE_USE_CDBURNER - #include - #include - #include + /* 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 + #include +#endif - #if JUCE_QUICKTIME - #include - #include - #include - #include - #include - #undef TARGET_OS_MAC // quicktime sets these, but they confuse some of the 3rd party libs - #undef MACOS - #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 + #include + #include + #include + #include + + /* 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 + #import +#endif + +#ifdef _MSC_VER + #pragma warning (pop) +#endif + +#endif +/********* End of inlined file: juce_win32_NativeIncludes.h *********/ #elif defined (LINUX) - + // #else - #include - #include - #define __Point__ - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include +/********* Start of inlined file: juce_mac_NativeIncludes.h *********/ +#ifndef _JUCE_MAC_NATIVEINCLUDES_H_ +#define _JUCE_MAC_NATIVEINCLUDES_H_ + +/* + 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. +*/ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#include +#include +#include +#include +#include +#include +#include + +#if MACOS_10_4_OR_EARLIER + #include +#endif + +#endif +/********* End of inlined file: juce_mac_NativeIncludes.h *********/ + #endif //============================================================================== @@ -596,6 +1090,10 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI() { if (! juceInitialisedNonGUI) { +#if JUCE_MAC + const ScopedAutoReleasePool pool; +#endif + #ifdef JUCE_DEBUG // Some simple test code to keep an eye on things and make sure these functions // work ok on all platforms. Let me know if any of these assertions fail! @@ -638,6 +1136,10 @@ void JUCE_PUBLIC_FUNCTION shutdownJuce_NonGUI() { if (juceInitialisedNonGUI) { +#if JUCE_MAC + const ScopedAutoReleasePool pool; +#endif + #if JUCE_WIN32 // need to shut down sockets if they were used.. if (juce_CloseWin32SocketLib != 0) @@ -1086,7 +1588,9 @@ static int extendedModulo (const int64 value, const int modulo) throw() int Time::getMinutes() const throw() { - return extendedModulo (millisSinceEpoch / 60000, 60); + struct tm t; + millisToLocal (millisSinceEpoch, t); + return t.tm_min; } int Time::getSeconds() const throw() @@ -5966,7 +6470,6 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_Socket.cpp *********/ #ifdef _WIN32 - #include #ifdef _MSC_VER @@ -5974,19 +6477,20 @@ END_JUCE_NAMESPACE #endif #else - #ifndef LINUX - #include + #ifdef LINUX + #include + #include + #include + #include + #include + #include + #else + #include #endif - #include #include - #include #include - #include #include - #include - #include - #include #endif BEGIN_JUCE_NAMESPACE @@ -6626,9 +7130,9 @@ static const String getMangledParameters (const StringPairArray& parameters) if (i > 0) p += T("&"); - p << URL::addEscapeChars (parameters.getAllKeys() [i]) + p << URL::addEscapeChars (parameters.getAllKeys() [i], true) << T("=") - << URL::addEscapeChars (parameters.getAllValues() [i]); + << URL::addEscapeChars (parameters.getAllValues() [i], true); } return p; @@ -7003,11 +7507,13 @@ const String URL::removeEscapeChars (const String& s) return stringResult; } -const String URL::addEscapeChars (const String& s) +const String URL::addEscapeChars (const String& s, const bool isParameter) { String result; result.preallocateStorage (s.length() + 8); const char* utf8 = s.toUTF8(); + const char* legalChars = isParameter ? "_-.*!'()" + : "_-$.*!'(),"; while (*utf8 != 0) { @@ -7018,7 +7524,7 @@ const String URL::addEscapeChars (const String& s) result += T('+'); } else if (CharacterFunctions::isLetterOrDigit (c) - || CharacterFunctions::indexOfChar ("_-$.*!'(),", c, false) >= 0) + || CharacterFunctions::indexOfChar (legalChars, c, false) >= 0) { result << c; } @@ -12812,7 +13318,8 @@ static void writeSpaces (OutputStream& out, int numSpaces) throw() } void XmlElement::writeElementAsText (OutputStream& outputStream, - const int indentationLevel) const throw() + const int indentationLevel, + const int lineWrapLength) const throw() { writeSpaces (outputStream, indentationLevel); @@ -12828,7 +13335,7 @@ void XmlElement::writeElementAsText (OutputStream& outputStream, const XmlAttributeNode* att = attributes; while (att != 0) { - if (lineLen > 60 && indentationLevel >= 0) + if (lineLen > lineWrapLength && indentationLevel >= 0) { outputStream.write ("\r\n", 2); writeSpaces (outputStream, attIndent); @@ -12881,11 +13388,11 @@ void XmlElement::writeElementAsText (OutputStream& outputStream, if (lastWasTextNode) outputStream.write ("\r\n", 2); - child->writeElementAsText (outputStream, indentationLevel + 2); + child->writeElementAsText (outputStream, indentationLevel + 2, lineWrapLength); } else { - child->writeElementAsText (outputStream, indentationLevel); + child->writeElementAsText (outputStream, indentationLevel, lineWrapLength); } lastWasTextNode = false; @@ -12931,7 +13438,8 @@ void XmlElement::writeElementAsText (OutputStream& outputStream, const String XmlElement::createDocument (const String& dtd, const bool allOnOneLine, const bool includeXmlHeader, - const tchar* const encoding) const throw() + const tchar* const encoding, + const int lineWrapLength) const throw() { String doc; doc.preallocateStorage (1024); @@ -12956,7 +13464,7 @@ const String XmlElement::createDocument (const String& dtd, } MemoryOutputStream mem (2048, 4096); - writeElementAsText (mem, allOnOneLine ? -1 : 0); + writeElementAsText (mem, allOnOneLine ? -1 : 0, lineWrapLength); return doc + String (mem.getData(), mem.getDataSize()); @@ -12964,7 +13472,8 @@ const String XmlElement::createDocument (const String& dtd, bool XmlElement::writeToFile (const File& f, const String& dtd, - const tchar* const encoding) const throw() + const tchar* const encoding, + const int lineWrapLength) const throw() { if (f.hasWriteAccess()) { @@ -12977,7 +13486,7 @@ bool XmlElement::writeToFile (const File& f, *out << "\r\n\r\n" << dtd << "\r\n"; - writeElementAsText (*out, 0); + writeElementAsText (*out, 0, lineWrapLength); delete out; @@ -13738,7 +14247,7 @@ ReadWriteLock::~ReadWriteLock() throw() void ReadWriteLock::enterRead() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); for (;;) @@ -13774,14 +14283,14 @@ void ReadWriteLock::enterRead() const throw() void ReadWriteLock::exitRead() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); for (int i = 0; i < readerThreads.size(); i += 2) { if (readerThreads.getUnchecked(i) == threadId) { - const int newCount = readerThreads.getUnchecked (i + 1) - 1; + const int newCount = ((int) readerThreads.getUnchecked (i + 1)) - 1; if (newCount == 0) { @@ -13802,7 +14311,7 @@ void ReadWriteLock::exitRead() const throw() void ReadWriteLock::enterWrite() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); for (;;) @@ -13827,7 +14336,7 @@ void ReadWriteLock::enterWrite() const throw() bool ReadWriteLock::tryEnterWrite() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); if (readerThreads.size() + numWriters == 0 @@ -14043,7 +14552,7 @@ void Thread::setAffinityMask (const uint32 affinityMask) throw() affinityMask_ = affinityMask; } -int Thread::getThreadId() const throw() +int64 Thread::getThreadId() const throw() { return threadId_; } @@ -14065,7 +14574,7 @@ int Thread::getNumRunningThreads() throw() Thread* Thread::getCurrentThread() throw() { - const int thisId = getCurrentThreadId(); + const int64 thisId = getCurrentThreadId(); Thread* result = 0; runningThreadsLock.enter(); @@ -14655,9 +15164,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() @@ -14718,7 +15227,6 @@ int JUCEApplication::main (String& commandLine, JUCEApplication* const app) { jassert (appInstance == 0); appInstance = app; - bool useForce = true; initialiseJuce_GUI(); @@ -14756,7 +15264,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); @@ -14777,10 +15285,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; @@ -14819,11 +15327,6 @@ int JUCEApplication::shutdownAppAndClearUp (const bool useMaximumForce) } JUCE_CATCH_ALL_ASSERT - if (useMaximumForce) - { - Process::terminate(); - } - reentrancyCheck = false; } @@ -14833,6 +15336,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; @@ -14854,6 +15361,9 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI() { if (! juceInitialisedGUI) { +#if JUCE_MAC + const ScopedAutoReleasePool pool; +#endif juceInitialisedGUI = true; initialiseJuce_NonGUI(); @@ -14887,6 +15397,9 @@ void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI() { if (juceInitialisedGUI) { +#if JUCE_MAC + const ScopedAutoReleasePool pool; +#endif DeletedAtShutdown::deleteAll(); LookAndFeel::clearDefaultLookAndFeel(); @@ -15174,7 +15687,7 @@ ApplicationCommandTarget* ApplicationCommandManager::findDefaultComponentTarget( } } - if (c == 0) + if (c == 0 && Process::isForegroundProcess()) { // getting a bit desperate now - try all desktop comps.. for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;) @@ -18232,6 +18745,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_QuickTimeAudioFormat.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_QUICKTIME #if ! defined (_WIN32) @@ -18263,6 +18972,8 @@ END_JUCE_NAMESPACE #endif #endif +#if ! (JUCE_MAC && JUCE_64BIT) + BEGIN_JUCE_NAMESPACE bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle); @@ -18599,6 +19310,7 @@ AudioFormatWriter* QuickTimeAudioFormat::createWriterFor (OutputStream* /*stream END_JUCE_NAMESPACE +#endif #endif /********* End of inlined file: juce_QuickTimeAudioFormat.cpp *********/ @@ -21173,7 +21885,7 @@ const String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& ne newSetup.inputDeviceName); if (currentAudioDevice == 0) - error = "Can't open device"; + error = "Can't open the audio device!\n\nThis may be because another application is currently using the same device - if so, you should close any other applications and try again!"; else error = currentAudioDevice->getLastError(); @@ -21194,6 +21906,12 @@ const String AudioDeviceManager::setAudioDeviceSetup (const AudioDeviceSetup& ne outputChannels.clear(); outputChannels.setRange (0, numOutputChansNeeded, true); } + + if (newSetup.inputDeviceName.isEmpty()) + inputChannels.clear(); + + if (newSetup.outputDeviceName.isEmpty()) + outputChannels.clear(); } if (! newSetup.useDefaultInputChannels) @@ -22224,10 +22942,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) @@ -22247,7 +22966,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) { @@ -22264,12 +22985,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; @@ -22288,6 +23012,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; @@ -22331,6 +23057,7 @@ const AudioSampleBuffer& AudioSampleBuffer::operator= (const AudioSampleBuffer& AudioSampleBuffer::~AudioSampleBuffer() throw() { juce_free (allocatedData); + juce_free (channels); } float* AudioSampleBuffer::getSampleData (const int channelNumber, @@ -22348,7 +23075,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) { @@ -22391,6 +23118,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; @@ -22859,6 +23590,27 @@ void IIRFilter::reset() throw() y2 = 0; } +float IIRFilter::processSingleSampleRaw (const float in) throw() +{ + float out = coefficients[0] * in + + coefficients[1] * x1 + + coefficients[2] * x2 + - coefficients[4] * y1 + - coefficients[5] * y2; + +#if JUCE_INTEL + if (! (out < -1.0e-8 || out > 1.0e-8)) + out = 0; +#endif + + x2 = x1; + x1 = in; + y2 = y1; + y1 = out; + + return out; +} + void IIRFilter::processSamples (float* const samples, const int numSamples) throw() { @@ -26421,7 +27173,7 @@ void PluginListComponent::scanFor (AudioPluginFormat* format) aw.enterModalState(); - MessageManager::getInstance()->dispatchPendingMessages(); + MessageManager::getInstance()->runDispatchLoopUntil (300); PluginDirectoryScanner scanner (list, *format, path, true, deadMansPedalFile); @@ -26430,7 +27182,7 @@ void PluginListComponent::scanFor (AudioPluginFormat* format) aw.setMessage (TRANS("Testing:\n\n") + scanner.getNextPluginFileThatWillBeScanned().getFileName()); - MessageManager::getInstance()->dispatchPendingMessages (500); + MessageManager::getInstance()->runDispatchLoopUntil (20); if (! scanner.scanNextFile (true)) break; @@ -26460,6 +27212,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_AudioUnitPluginFormat.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_PLUGINHOST_AU && (! (defined (LINUX) || defined (_WIN32))) #include @@ -27673,9 +28621,209 @@ END_JUCE_NAMESPACE #endif /********* End of inlined file: juce_AudioUnitPluginFormat.cpp *********/ +/********* Start of inlined file: juce_VSTPluginFormat.mm *********/ +// This file just wraps juce_VSTPluginFormat.cpp in an objective-C wrapper +#define JUCE_MAC_VST_INCLUDED 1 + /********* Start of inlined file: juce_VSTPluginFormat.cpp *********/ -#if JUCE_PLUGINHOST_VST +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + +#if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WIN32) #ifdef _WIN32 #undef _WIN32_WINNT @@ -27684,7 +28832,7 @@ END_JUCE_NAMESPACE #define STRICT #include #include - #pragma warning (disable : 4312) + #pragma warning (disable : 4312 4355) #elif defined (LINUX) #include #include @@ -27696,11 +28844,238 @@ END_JUCE_NAMESPACE #undef Drawable #undef Time #else + #ifndef JUCE_MAC_VST_INCLUDED + // On the mac, this file needs to be compiled indirectly, by using + // juce_VSTPluginFormat.mm instead - that wraps it as an objective-C file for cocoa + #error + #endif + #include #include #endif +#if ! (JUCE_MAC && JUCE_64BIT) + BEGIN_JUCE_NAMESPACE +#if JUCE_MAC + +/********* Start of inlined file: juce_mac_CarbonViewWrapperComponent.h *********/ +/** Creates a floating carbon window that can be used to hold a carbon UI. + + This is a handy class that's designed to be inlined where needed, e.g. + in the audio plugin hosting code. +*/ +class CarbonViewWrapperComponent : public Component, + public ComponentMovementWatcher, + public Timer +{ +public: + CarbonViewWrapperComponent() + : ComponentMovementWatcher (this), + wrapperWindow (0), + embeddedView (0), + recursiveResize (false) + { + } + + virtual ~CarbonViewWrapperComponent() + { + jassert (embeddedView == 0); // must call deleteWindow() in the subclass's destructor! + } + + virtual HIViewRef attachView (WindowRef windowRef, HIViewRef rootView) = 0; + virtual void removeView (HIViewRef embeddedView) = 0; + virtual void mouseDown (int x, int y) {} + virtual void paint() {} + + virtual bool getEmbeddedViewSize (int& w, int& h) + { + if (embeddedView == 0) + return false; + + HIRect bounds; + HIViewGetBounds (embeddedView, &bounds); + w = jmax (1, roundFloatToInt (bounds.size.width)); + h = jmax (1, roundFloatToInt (bounds.size.height)); + return true; + } + + void createWindow() + { + if (wrapperWindow == 0) + { + Rect r; + r.left = getScreenX(); + r.top = getScreenY(); + r.right = r.left + getWidth(); + r.bottom = r.top + getHeight(); + + CreateNewWindow (kDocumentWindowClass, + (WindowAttributes) (kWindowStandardHandlerAttribute | kWindowCompositingAttribute + | kWindowNoShadowAttribute | kWindowNoTitleBarAttribute), + &r, &wrapperWindow); + + jassert (wrapperWindow != 0); + if (wrapperWindow == 0) + return; + + NSWindow* carbonWindow = [[NSWindow alloc] initWithWindowRef: wrapperWindow]; + NSWindow* ownerWindow = [((NSView*) getWindowHandle()) window]; + + [ownerWindow addChildWindow: carbonWindow + ordered: NSWindowAbove]; + + embeddedView = attachView (wrapperWindow, HIViewGetRoot (wrapperWindow)); + + EventTypeSpec windowEventTypes[] = { { kEventClassWindow, kEventWindowGetClickActivation }, + { kEventClassWindow, kEventWindowHandleDeactivate } }; + + EventHandlerUPP upp = NewEventHandlerUPP (carbonEventCallback); + InstallWindowEventHandler (wrapperWindow, upp, + sizeof (windowEventTypes) / sizeof (EventTypeSpec), + windowEventTypes, this, &eventHandlerRef); + + setOurSizeToEmbeddedViewSize(); + setEmbeddedWindowToOurSize(); + } + } + + void deleteWindow() + { + removeView (embeddedView); + embeddedView = 0; + + if (wrapperWindow != 0) + { + RemoveEventHandler (eventHandlerRef); + DisposeWindow (wrapperWindow); + wrapperWindow = 0; + } + } + + void setOurSizeToEmbeddedViewSize() + { + int w, h; + if (getEmbeddedViewSize (w, h)) + { + if (w != getWidth() || h != getHeight()) + { + startTimer (50); + + setSize (w, h); + if (getParentComponent() != 0) + getParentComponent()->setSize (w, h); + } + else + { + startTimer (jlimit (50, 500, getTimerInterval() + 20)); + } + } + else + { + stopTimer(); + } + } + + void setEmbeddedWindowToOurSize() + { + if (! recursiveResize) + { + recursiveResize = true; + + if (embeddedView != 0) + { + HIRect r; + r.origin.x = 0; + r.origin.y = 0; + r.size.width = (float) getWidth(); + r.size.height = (float) getHeight(); + HIViewSetFrame (embeddedView, &r); + } + + if (wrapperWindow != 0) + { + Rect wr; + wr.left = getScreenX(); + wr.top = getScreenY(); + wr.right = wr.left + getWidth(); + wr.bottom = wr.top + getHeight(); + + SetWindowBounds (wrapperWindow, kWindowContentRgn, &wr); + ShowWindow (wrapperWindow); + } + + recursiveResize = false; + } + } + + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) + { + setEmbeddedWindowToOurSize(); + } + + void componentPeerChanged() + { + deleteWindow(); + createWindow(); + } + + void componentVisibilityChanged (Component&) + { + if (isShowing()) + createWindow(); + else + deleteWindow(); + + setEmbeddedWindowToOurSize(); + } + + void timerCallback() + { + setOurSizeToEmbeddedViewSize(); + } + + OSStatus carbonEventHandler (EventHandlerCallRef nextHandlerRef, + EventRef event) + { + switch (GetEventKind (event)) + { + case kEventWindowHandleDeactivate: + ActivateWindow (wrapperWindow, TRUE); + break; + + case kEventWindowGetClickActivation: + { + getTopLevelComponent()->toFront (false); + + ClickActivationResult howToHandleClick = kActivateAndHandleClick; + + SetEventParameter (event, kEventParamClickActivation, typeClickActivationResult, + sizeof (ClickActivationResult), &howToHandleClick); + } + break; + } + + return noErr; + } + + static pascal OSStatus carbonEventCallback (EventHandlerCallRef nextHandlerRef, + EventRef event, void* userData) + { + return ((CarbonViewWrapperComponent*) userData)->carbonEventHandler (nextHandlerRef, event); + } + +protected: + WindowRef wrapperWindow; + HIViewRef embeddedView; + bool recursiveResize; + + EventHandlerRef eventHandlerRef; +}; +/********* End of inlined file: juce_mac_CarbonViewWrapperComponent.h *********/ + +#endif + #undef PRAGMA_ALIGN_SUPPORTED #define VST_FORCE_DEPRECATED 0 @@ -27826,11 +29201,7 @@ class VSTPluginWindow; #define log(a) #endif -#if JUCE_MAC -extern bool juce_isHIViewCreatedByJuce (HIViewRef view); -extern bool juce_isWindowCreatedByJuce (WindowRef window); - -#if JUCE_PPC +#if JUCE_MAC && JUCE_PPC static void* NewCFMFromMachO (void* const machofp) throw() { void* result = juce_malloc (8); @@ -27841,7 +29212,6 @@ static void* NewCFMFromMachO (void* const machofp) throw() return result; } #endif -#endif #if JUCE_LINUX @@ -28005,7 +29375,9 @@ public: #if JUCE_WIN32 || JUCE_LINUX fullParentDirectoryPathName = file_.getParentDirectory().getFullPathName(); #elif JUCE_MAC - PlatformUtilities::makeFSSpecFromPath (&parentDirFSSpec, file_.getParentDirectory().getFullPathName()); + FSRef ref; + PlatformUtilities::makeFSRefFromPath (&ref, file_.getParentDirectory().getFullPathName()); + FSGetCatalogInfo (&ref, kFSCatInfoNone, 0, 0, &parentDirFSSpec, 0); #endif } @@ -28036,12 +29408,12 @@ public: pluginName = file.getFileNameWithoutExtension(); - hModule = Process::loadDynamicLibrary (file.getFullPathName()); + hModule = PlatformUtilities::loadDynamicLibrary (file.getFullPathName()); - moduleMain = (MainCall) Process::getProcedureEntryPoint (hModule, "VSTPluginMain"); + moduleMain = (MainCall) PlatformUtilities::getProcedureEntryPoint (hModule, "VSTPluginMain"); if (moduleMain == 0) - moduleMain = (MainCall) Process::getProcedureEntryPoint (hModule, "main"); + moduleMain = (MainCall) PlatformUtilities::getProcedureEntryPoint (hModule, "main"); return moduleMain != 0; } @@ -28050,7 +29422,7 @@ public: { _fpreset(); // (doesn't do any harm) - Process::freeDynamicLibrary (hModule); + PlatformUtilities::freeDynamicLibrary (hModule); } void closeEffect (AEffect* eff) @@ -28631,6 +30003,26 @@ void VSTPluginInstance::processBlock (AudioSampleBuffer& buffer, if (initialised) { + AudioPlayHead* playHead = getPlayHead(); + + if (playHead != 0) + { + AudioPlayHead::CurrentPositionInfo position; + playHead->getCurrentPosition (position); + + vstHostTime.tempo = position.bpm; + vstHostTime.timeSigNumerator = position.timeSigNumerator; + vstHostTime.timeSigDenominator = position.timeSigDenominator; + vstHostTime.ppqPos = position.ppqPosition; + vstHostTime.barStartPos = position.ppqPositionOfLastBarStart; + vstHostTime.flags |= kVstTempoValid | kVstTimeSigValid | kVstPpqPosValid | kVstBarsValid; + + if (position.isPlaying) + vstHostTime.flags |= kVstTransportPlaying; + else + vstHostTime.flags &= ~kVstTransportPlaying; + } + #if JUCE_WIN32 vstHostTime.nanoSeconds = timeGetTime() * 1000000.0; #elif JUCE_LINUX @@ -28806,12 +30198,18 @@ void VSTPluginInstance::handleMidiFromPlugin (const VstEvents* const events) static Array activeVSTWindows; class VSTPluginWindow : public AudioProcessorEditor, + #if ! JUCE_MAC + public ComponentMovementWatcher, + #endif public Timer { public: VSTPluginWindow (VSTPluginInstance& plugin_) : AudioProcessorEditor (&plugin_), +#if ! JUCE_MAC + ComponentMovementWatcher (this), +#endif plugin (plugin_), isOpen (false), wasShowing (false), @@ -28827,11 +30225,9 @@ public: pluginWindow = None; pluginProc = None; #else - pluginViewRef = 0; + addAndMakeVisible (innerWrapper = new InnerWrapperComponent (this)); #endif - movementWatcher = new CompMovementWatcher (this); - activeVSTWindows.add (this); setSize (1, 1); @@ -28841,15 +30237,17 @@ public: ~VSTPluginWindow() { - deleteAndZero (movementWatcher); - +#if JUCE_MAC + deleteAndZero (innerWrapper); +#else closePluginWindow(); - +#endif activeVSTWindows.removeValue (this); plugin.editorBeingDeleted (this); } - void componentMovedOrResized() +#if ! JUCE_MAC + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) { if (recursiveResize) return; @@ -28863,39 +30261,7 @@ public: recursiveResize = true; -#if JUCE_MAC - if (pluginViewRef != 0) - { - HIRect r; - r.origin.x = (float) x; - r.origin.y = (float) y; - r.size.width = (float) getWidth(); - r.size.height = (float) getHeight(); - HIViewSetFrame (pluginViewRef, &r); - } - else if (pluginWindowRef != 0) - { - Rect r; - r.left = getScreenX(); - r.top = getScreenY(); - r.right = r.left + getWidth(); - r.bottom = r.top + getHeight(); - - WindowGroupRef group = GetWindowGroup (pluginWindowRef); - WindowGroupAttributes atts; - GetWindowGroupAttributes (group, &atts); - ChangeWindowGroupAttributes (group, 0, kWindowGroupAttrMoveTogether); - - SetWindowBounds (pluginWindowRef, kWindowContentRgn, &r); - - if ((atts & kWindowGroupAttrMoveTogether) != 0) - ChangeWindowGroupAttributes (group, kWindowGroupAttrMoveTogether, 0); - } - else - { - repaint(); - } -#elif JUCE_WIN32 +#if JUCE_WIN32 if (pluginHWND != 0) MoveWindow (pluginHWND, x, y, getWidth(), getHeight(), TRUE); #elif JUCE_LINUX @@ -28911,7 +30277,7 @@ public: } } - void componentVisibilityChanged() + void componentVisibilityChanged (Component&) { const bool isShowingNow = isShowing(); @@ -28925,7 +30291,7 @@ public: closePluginWindow(); } - componentMovedOrResized(); + componentMovedOrResized (true, true); } void componentPeerChanged() @@ -28933,6 +30299,7 @@ public: closePluginWindow(); openPluginWindow(); } +#endif bool keyStateChanged() { @@ -28944,6 +30311,12 @@ public: return pluginWantsKeys; } +#if JUCE_MAC + void paint (Graphics& g) + { + g.fillAll (Colours::black); + } +#else void paint (Graphics& g) { if (isOpen) @@ -28956,18 +30329,7 @@ public: getScreenY() - peer->getScreenY(), getWidth(), getHeight()); -#if JUCE_MAC - if (pluginViewRef == 0) - { - ERect r; - r.left = getScreenX() - peer->getScreenX(); - r.right = r.left + getWidth(); - r.top = getScreenY() - peer->getScreenY(); - r.bottom = r.top + getHeight(); - - dispatch (effEditDraw, 0, 0, &r, 0); - } -#elif JUCE_LINUX +#if JUCE_LINUX if (pluginWindow != 0) { const Rectangle clip (g.getClipBounds()); @@ -28992,6 +30354,7 @@ public: g.fillAll (Colours::black); } } +#endif void timerCallback() { @@ -29021,20 +30384,7 @@ public: void mouseDown (const MouseEvent& e) { -#if JUCE_MAC - if (! alreadyInside) - { - alreadyInside = true; - toFront (true); - dispatch (effEditMouse, e.x, e.y, 0, 0); - alreadyInside = false; - } - else - { - PostEvent (::mouseDown, 0); - } -#elif JUCE_LINUX - +#if JUCE_LINUX if (pluginWindow == 0) return; @@ -29056,7 +30406,7 @@ public: sendEventToChild (&ev); -#else +#elif JUCE_WIN32 (void) e; toFront (true); @@ -29084,14 +30434,55 @@ private: HWND pluginHWND; void* originalWndProc; int sizeCheckCount; -#elif JUCE_MAC - HIViewRef pluginViewRef; - WindowRef pluginWindowRef; #elif JUCE_LINUX Window pluginWindow; EventProcPtr pluginProc; #endif +#if JUCE_MAC + void openPluginWindow (WindowRef parentWindow) + { + if (isOpen || parentWindow == 0) + return; + + isOpen = true; + + ERect* rect = 0; + dispatch (effEditGetRect, 0, 0, &rect, 0); + dispatch (effEditOpen, 0, 0, parentWindow, 0); + + // do this before and after like in the steinberg example + dispatch (effEditGetRect, 0, 0, &rect, 0); + dispatch (effGetProgram, 0, 0, 0, 0); // also in steinberg code + + // Install keyboard hooks + pluginWantsKeys = (dispatch (effKeysRequired, 0, 0, 0, 0) == 0); + + // double-check it's not too tiny + int w = 250, h = 150; + + if (rect != 0) + { + w = rect->right - rect->left; + h = rect->bottom - rect->top; + + if (w == 0 || h == 0) + { + w = 250; + h = 150; + } + } + + w = jmax (w, 32); + h = jmax (h, 32); + + setSize (w, h); + + startTimer (18 + JUCE_NAMESPACE::Random::getSystemRandom().nextInt (5)); + repaint(); + } + +#else void openPluginWindow() { if (isOpen || getWindowHandle() == 0) @@ -29165,44 +30556,6 @@ private: } } } -#elif JUCE_MAC - HIViewRef root = HIViewGetRoot ((WindowRef) getWindowHandle()); - HIViewFindByID (root, kHIViewWindowContentID, &root); - pluginViewRef = HIViewGetFirstSubview (root); - - while (pluginViewRef != 0 && juce_isHIViewCreatedByJuce (pluginViewRef)) - pluginViewRef = HIViewGetNextView (pluginViewRef); - - pluginWindowRef = 0; - - if (pluginViewRef == 0) - { - WindowGroupRef ourGroup = GetWindowGroup ((WindowRef) getWindowHandle()); - //DebugPrintWindowGroup (ourGroup); - //DebugPrintAllWindowGroups(); - - GetIndexedWindow (ourGroup, 1, - kWindowGroupContentsVisible, - &pluginWindowRef); - - if (pluginWindowRef == (WindowRef) getWindowHandle() - || juce_isWindowCreatedByJuce (pluginWindowRef)) - pluginWindowRef = 0; - } - - int w = 250, h = 150; - - if (rect != 0) - { - w = rect->right - rect->left; - h = rect->bottom - rect->top; - - if (w == 0 || h == 0) - { - w = 250; - h = 150; - } - } #elif JUCE_LINUX pluginWindow = getChildWindow ((Window) getWindowHandle()); @@ -29242,7 +30595,9 @@ private: startTimer (18 + JUCE_NAMESPACE::Random::getSystemRandom().nextInt (5)); repaint(); } +#endif +#if ! JUCE_MAC void closePluginWindow() { if (isOpen) @@ -29267,10 +30622,6 @@ private: DestroyWindow (pluginHWND); pluginHWND = 0; -#elif JUCE_MAC - dispatch (effEditSleep, 0, 0, 0, 0); - pluginViewRef = 0; - stopTimer(); #elif JUCE_LINUX stopTimer(); pluginWindow = 0; @@ -29278,6 +30629,12 @@ private: #endif } } +#endif + + int dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) + { + return plugin.dispatch (opcode, index, value, ptr, opt); + } #if JUCE_WIN32 void checkPluginWindowSize() throw() @@ -29295,45 +30652,8 @@ private: sizeCheckCount = 0; } } -#endif - - class CompMovementWatcher : public ComponentMovementWatcher - { - public: - CompMovementWatcher (VSTPluginWindow* const owner_) - : ComponentMovementWatcher (owner_), - owner (owner_) - { - } - - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) - { - owner->componentMovedOrResized(); - } - - void componentPeerChanged() - { - owner->componentPeerChanged(); - } - - void componentVisibilityChanged (Component&) - { - owner->componentVisibilityChanged(); - } - - private: - VSTPluginWindow* const owner; - }; - - CompMovementWatcher* movementWatcher; - - int dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) - { - return plugin.dispatch (opcode, index, value, ptr, opt); - } // hooks to get keyboard events from VST windows.. -#if JUCE_WIN32 static LRESULT CALLBACK vstHookWndProc (HWND hW, UINT message, WPARAM wParam, LPARAM lParam) { for (int i = activeVSTWindows.size(); --i >= 0;) @@ -29526,6 +30846,86 @@ private: } #endif +#if JUCE_MAC + class InnerWrapperComponent : public CarbonViewWrapperComponent + { + public: + InnerWrapperComponent (VSTPluginWindow* const owner_) + : owner (owner_), + alreadyInside (false) + { + } + + ~InnerWrapperComponent() + { + deleteWindow(); + } + + HIViewRef attachView (WindowRef windowRef, HIViewRef rootView) + { + owner->openPluginWindow (windowRef); + return 0; + } + + void removeView (HIViewRef) + { + owner->dispatch (effEditClose, 0, 0, 0, 0); + owner->dispatch (effEditSleep, 0, 0, 0, 0); + } + + bool getEmbeddedViewSize (int& w, int& h) + { + ERect* rect = 0; + owner->dispatch (effEditGetRect, 0, 0, &rect, 0); + w = rect->right - rect->left; + h = rect->bottom - rect->top; + return true; + } + + void mouseDown (int x, int y) + { + if (! alreadyInside) + { + alreadyInside = true; + getTopLevelComponent()->toFront (true); + owner->dispatch (effEditMouse, x, y, 0, 0); + alreadyInside = false; + } + else + { + PostEvent (::mouseDown, 0); + } + } + + void paint() + { + ComponentPeer* const peer = getPeer(); + + if (peer != 0) + { + ERect r; + r.left = getScreenX() - peer->getScreenX(); + r.right = r.left + getWidth(); + r.top = getScreenY() - peer->getScreenY(); + r.bottom = r.top + getHeight(); + + owner->dispatch (effEditDraw, 0, 0, &r, 0); + } + } + + private: + VSTPluginWindow* const owner; + bool alreadyInside; + }; + + friend class InnerWrapperComponent; + InnerWrapperComponent* innerWrapper; + + void resized() + { + innerWrapper->setSize (getWidth(), getHeight()); + } +#endif }; AudioProcessorEditor* VSTPluginInstance::createEditor() @@ -30587,11 +31987,15 @@ const FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() END_JUCE_NAMESPACE +#endif + #undef log #endif /********* End of inlined file: juce_VSTPluginFormat.cpp *********/ +/********* End of inlined file: juce_VSTPluginFormat.mm *********/ + /********* Start of inlined file: juce_AudioProcessor.cpp *********/ BEGIN_JUCE_NAMESPACE @@ -32724,7 +34128,8 @@ Synthesiser::Synthesiser() lastNoteOnCounter (0), shouldStealNotes (true) { - zeromem (lastPitchWheelValues, sizeof (lastPitchWheelValues)); + for (int i = 0; i < numElementsInArray (lastPitchWheelValues); ++i) + lastPitchWheelValues[i] = 0x2000; } Synthesiser::~Synthesiser() @@ -34416,14 +35821,7 @@ static const int quitMessageId = 0xfffff321; MessageManager::MessageManager() throw() : broadcastListeners (0), quitMessagePosted (false), - quitMessageReceived (false), - useMaximumForceWhenQuitting (true), - messageCounter (0), - lastMessageCounter (-1), - isInMessageDispatcher (0), - needToGetRidOfWaitCursor (false), - timeBeforeWaitCursor (0), - lastActivityCheckOkTime (0) + quitMessageReceived (false) { currentLockingThreadId = messageThreadId = Thread::getCurrentThreadId(); } @@ -34443,8 +35841,6 @@ MessageManager* MessageManager::getInstance() throw() { instance = new MessageManager(); doPlatformSpecificInitialisation(); - - instance->setTimeBeforeShowingWaitCursor (500); } return instance; @@ -34471,106 +35867,53 @@ void MessageManager::deliverMessage (void* message) recipient->handleMessage (*m); } JUCE_CATCH_EXCEPTION - - if (needToGetRidOfWaitCursor) - { - needToGetRidOfWaitCursor = false; - MouseCursor::hideWaitCursor(); - } - - ++messageCounter; } else if (recipient == 0 && m->intParameter1 == quitMessageId) { quitMessageReceived = true; - useMaximumForceWhenQuitting = (m->intParameter2 != 0); } delete m; } -bool MessageManager::dispatchNextMessage (const bool returnImmediatelyIfNoMessages, - bool* const wasAMessageDispatched) -{ - if (quitMessageReceived) - { - if (wasAMessageDispatched != 0) - *wasAMessageDispatched = false; - - return false; - } - - ++isInMessageDispatcher; - - bool result = false; - - JUCE_TRY - { - result = juce_dispatchNextMessageOnSystemQueue (returnImmediatelyIfNoMessages); - - if (wasAMessageDispatched != 0) - *wasAMessageDispatched = result; - - if (instance == 0) - return false; - } - JUCE_CATCH_EXCEPTION - - --isInMessageDispatcher; - ++messageCounter; - - return result || ! returnImmediatelyIfNoMessages; -} - -void MessageManager::dispatchPendingMessages (int maxNumberOfMessagesToDispatch) +#if ! JUCE_MAC +void MessageManager::runDispatchLoop() { jassert (isThisTheMessageThread()); // must only be called by the message thread - while (--maxNumberOfMessagesToDispatch >= 0 && ! quitMessageReceived) - { - ++isInMessageDispatcher; - - bool carryOn = false; - - JUCE_TRY - { - carryOn = juce_dispatchNextMessageOnSystemQueue (true); - } - JUCE_CATCH_EXCEPTION - - --isInMessageDispatcher; - ++messageCounter; - - if (! carryOn) - break; - } + runDispatchLoopUntil (-1); } -bool MessageManager::runDispatchLoop() +void MessageManager::stopDispatchLoop() { - jassert (isThisTheMessageThread()); // must only be called by the message thread - - while (dispatchNextMessage()) - { - } - - return useMaximumForceWhenQuitting; -} - -void MessageManager::postQuitMessage (const bool useMaximumForce) -{ - Message* const m = new Message (quitMessageId, (useMaximumForce) ? 1 : 0, 0, 0); + Message* const m = new Message (quitMessageId, 0, 0, 0); m->messageRecipient = 0; postMessageToQueue (m); quitMessagePosted = true; } -bool MessageManager::hasQuitMessageBeenPosted() const throw() +bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) { - return quitMessagePosted; + jassert (isThisTheMessageThread()); // must only be called by the message thread + + const int64 endTime = Time::currentTimeMillis() + millisecondsToRunFor; + + while ((millisecondsToRunFor < 0 || endTime > Time::currentTimeMillis()) + && ! quitMessageReceived) + { + JUCE_TRY + { + juce_dispatchNextMessageOnSystemQueue (millisecondsToRunFor >= 0); + } + JUCE_CATCH_EXCEPTION + } + + return ! quitMessageReceived; } +#endif + void MessageManager::deliverBroadcastMessage (const String& value) { if (broadcastListeners != 0) @@ -34591,78 +35934,6 @@ void MessageManager::deregisterBroadcastListener (ActionListener* const listener broadcastListeners->removeActionListener (listener); } -// This gets called occasionally by the timer thread (to save using an extra thread -// for it). -void MessageManager::inactivityCheckCallback() throw() -{ - if (instance != 0) - instance->inactivityCheckCallbackInt(); -} - -void MessageManager::inactivityCheckCallbackInt() throw() -{ - const unsigned int now = Time::getApproximateMillisecondCounter(); - - if (isInMessageDispatcher > 0 - && lastMessageCounter == messageCounter - && timeBeforeWaitCursor > 0 - && lastActivityCheckOkTime > 0 - && ! ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown()) - { - if (now >= lastActivityCheckOkTime + timeBeforeWaitCursor - && ! needToGetRidOfWaitCursor) - { - // been in the same message call too long.. - MouseCursor::showWaitCursor(); - needToGetRidOfWaitCursor = true; - } - } - else - { - lastActivityCheckOkTime = now; - lastMessageCounter = messageCounter; - } -} - -void MessageManager::delayWaitCursor() throw() -{ - if (instance != 0) - { - instance->messageCounter++; - - if (instance->needToGetRidOfWaitCursor) - { - instance->needToGetRidOfWaitCursor = false; - MouseCursor::hideWaitCursor(); - } - } -} - -void MessageManager::setTimeBeforeShowingWaitCursor (const int millisecs) throw() -{ - // if this is a bit too small you'll get a lot of unwanted hourglass cursors.. - jassert (millisecs <= 0 || millisecs > 200); - - timeBeforeWaitCursor = millisecs; - - if (millisecs > 0) - startTimer (millisecs / 2); // (see timerCallback() for explanation of this) - else - stopTimer(); -} - -void MessageManager::timerCallback() -{ - // dummy callback - the message manager is just a Timer to ensure that there are always - // some events coming in - otherwise it'll show the egg-timer/beachball-of-death. - ++messageCounter; -} - -int MessageManager::getTimeBeforeShowingWaitCursor() const throw() -{ - return timeBeforeWaitCursor; -} - bool MessageManager::isThisTheMessageThread() const throw() { return Thread::getCurrentThreadId() == messageThreadId; @@ -34979,7 +36250,6 @@ public: void run() { uint32 lastTime = Time::getMillisecondCounter(); - uint32 lastMessageManagerCallback = lastTime; while (! threadShouldExit()) { @@ -35018,12 +36288,6 @@ public: now = Time::getMillisecondCounter(); - if (now > lastMessageManagerCallback + 200) - { - lastMessageManagerCallback = now; - MessageManager::inactivityCheckCallback(); - } - if (now > messageDeliveryTimeout) break; } @@ -35034,12 +36298,6 @@ public: // Time::getApproximateMillisecondTimer value stay up-to-date wait (jlimit (1, 50, timeUntilFirstTimer)); } - - if (now > lastMessageManagerCallback + 200) - { - lastMessageManagerCallback = now; - MessageManager::inactivityCheckCallback(); - } } } @@ -36552,7 +37810,7 @@ int Component::runModalLoop() { while (flags.currentlyModalFlag && flags.visibleFlag) { - if (! MessageManager::getInstance()->dispatchNextMessage()) + if (! MessageManager::getInstance()->runDispatchLoopUntil (20)) break; // check whether this component was deleted during the last message @@ -38185,7 +39443,7 @@ void Component::internalBroughtToFront() if (cm != 0 && cm->getTopLevelComponent() != getTopLevelComponent()) { - cm->getTopLevelComponent()->toFront (false); + cm->getTopLevelComponent()->toFront (true); } } } @@ -41212,6 +42470,7 @@ Label::Label (const String& componentName, deletionWatcher (0), horizontalBorderSize (3), verticalBorderSize (1), + minimumHorizontalScale (0.7f), editSingleClick (false), editDoubleClick (false), lossOfFocusDiscardsChanges (false) @@ -41447,32 +42706,7 @@ TextEditor* Label::createEditorComponent() void Label::paint (Graphics& g) { - g.fillAll (findColour (backgroundColourId)); - - if (editor == 0) - { - const float alpha = isEnabled() ? 1.0f : 0.5f; - - g.setColour (findColour (textColourId).withMultipliedAlpha (alpha)); - g.setFont (font); - g.drawFittedText (text, - horizontalBorderSize, - verticalBorderSize, - getWidth() - 2 * horizontalBorderSize, - getHeight() - 2 * verticalBorderSize, - justification, - jmax (1, (int) (getHeight() / font.getHeight()))); - - g.setColour (findColour (outlineColourId).withMultipliedAlpha (alpha)); - g.drawRect (0, 0, getWidth(), getHeight()); - } - else if (isEnabled()) - { - g.setColour (editor->findColour (TextEditor::backgroundColourId) - .overlaidWith (findColour (outlineColourId))); - - g.drawRect (0, 0, getWidth(), getHeight()); - } + getLookAndFeel().drawLabel (g, *this); } void Label::mouseUp (const MouseEvent& e) @@ -43306,7 +44540,7 @@ float Slider::getLinearSliderPos (const double value) sliderPosProportional = 0.5; } - if (style == LinearVertical || style == IncDecButtons) + if (isVertical() || style == IncDecButtons) sliderPosProportional = 1.0 - sliderPosProportional; return (float) (sliderRegionStart + sliderPosProportional * sliderRegionSize); @@ -43677,13 +44911,37 @@ void Slider::restoreMouseIfHidden() : ((sliderBeingDragged == 1) ? getMinValue() : currentValue); - const int pixelPos = (int) getLinearSliderPos (pos); + if (style == RotaryHorizontalDrag || style == RotaryVerticalDrag) + { + int x, y, downX, downY; + Desktop::getMousePosition (x, y); + Desktop::getLastMouseDownPosition (downX, downY); - int x = isHorizontal() ? pixelPos : (getWidth() / 2); - int y = isVertical() ? pixelPos : (getHeight() / 2); + if (style == RotaryHorizontalDrag) + { + const double posDiff = valueToProportionOfLength (pos) - valueToProportionOfLength (valueOnMouseDown); + x = roundDoubleToInt (pixelsForFullDragExtent * posDiff + downX); + y = downY; + } + else + { + const double posDiff = valueToProportionOfLength (valueOnMouseDown) - valueToProportionOfLength (pos); + x = downX; + y = roundDoubleToInt (pixelsForFullDragExtent * posDiff + downY); + } - relativePositionToGlobal (x, y); - Desktop::setMousePosition (x, y); + Desktop::setMousePosition (x, y); + } + else + { + const int pixelPos = (int) getLinearSliderPos (pos); + + int x = isHorizontal() ? pixelPos : (getWidth() / 2); + int y = isVertical() ? pixelPos : (getHeight() / 2); + + relativePositionToGlobal (x, y); + Desktop::setMousePosition (x, y); + } } } @@ -43807,7 +45065,7 @@ void Slider::mouseDrag (const MouseEvent& e) } else { - if (style == LinearVertical) + if (isVertical()) scaledMousePos = 1.0 - scaledMousePos; valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, scaledMousePos)); @@ -43833,7 +45091,7 @@ void Slider::mouseDrag (const MouseEvent& e) if (mouseDiff < 0) speed = -speed; - if (style == LinearVertical || style == RotaryVerticalDrag + if (isVertical() || style == RotaryVerticalDrag || (style == IncDecButtons && ! incDecDragDirectionIsHorizontal())) speed = -speed; @@ -46974,10 +48232,13 @@ void TextEditor::setHighlightedRegion (int startPos, int numChars) throw() void TextEditor::copy() { - const String selection (getTextSubstring (selectionStart, selectionEnd)); + if (passwordCharacter == 0) + { + const String selection (getTextSubstring (selectionStart, selectionEnd)); - if (selection.isNotEmpty()) - SystemClipboard::copyTextToClipboard (selection); + if (selection.isNotEmpty()) + SystemClipboard::copyTextToClipboard (selection); + } } void TextEditor::paste() @@ -47398,9 +48659,13 @@ void TextEditor::addPopupMenuItems (PopupMenu& m, const MouseEvent*) { const bool writable = ! isReadOnly(); - m.addItem (baseMenuItemID + 1, TRANS("cut"), writable); - m.addItem (baseMenuItemID + 2, TRANS("copy"), selectionStart < selectionEnd); - m.addItem (baseMenuItemID + 3, TRANS("paste"), writable); + if (passwordCharacter == 0) + { + m.addItem (baseMenuItemID + 1, TRANS("cut"), writable); + m.addItem (baseMenuItemID + 2, TRANS("copy"), selectionStart < selectionEnd); + m.addItem (baseMenuItemID + 3, TRANS("paste"), writable); + } + m.addItem (baseMenuItemID + 4, TRANS("delete"), writable); m.addSeparator(); m.addItem (baseMenuItemID + 5, TRANS("select all")); @@ -58581,6 +59846,35 @@ void LookAndFeel::positionComboBoxText (ComboBox& box, Label& label) label.setFont (getComboBoxFont (box)); } +void LookAndFeel::drawLabel (Graphics& g, Label& label) +{ + g.fillAll (label.findColour (Label::backgroundColourId)); + + if (! label.isBeingEdited()) + { + const float alpha = label.isEnabled() ? 1.0f : 0.5f; + + g.setColour (label.findColour (Label::textColourId).withMultipliedAlpha (alpha)); + g.setFont (label.getFont()); + g.drawFittedText (label.getText(), + label.getHorizontalBorderSize(), + label.getVerticalBorderSize(), + label.getWidth() - 2 * label.getHorizontalBorderSize(), + label.getHeight() - 2 * label.getVerticalBorderSize(), + label.getJustificationType(), + jmax (1, (int) (label.getHeight() / label.getFont().getHeight())), + label.getMinimumHorizontalScale()); + + g.setColour (label.findColour (Label::outlineColourId).withMultipliedAlpha (alpha)); + g.drawRect (0, 0, label.getWidth(), label.getHeight()); + } + else if (label.isEnabled()) + { + g.setColour (label.findColour (Label::outlineColourId)); + g.drawRect (0, 0, label.getWidth(), label.getHeight()); + } +} + void LookAndFeel::drawLinearSliderBackground (Graphics& g, int x, int y, int width, int height, @@ -61579,6 +62873,7 @@ public: { menuCreationTime = lastFocused = lastScroll = Time::getMillisecondCounter(); setWantsKeyboardFocus (true); + setMouseClickGrabsKeyboardFocus (false); setOpaque (true); setAlwaysOnTop (true); @@ -61709,7 +63004,7 @@ public: int itemW = 80; int itemH = 16; mic->getIdealSize (itemW, itemH, standardItemHeight); - mic->setSize (itemW, jlimit (10, 600, itemH)); + mic->setSize (itemW, jlimit (2, 600, itemH)); mic->addMouseListener (this, false); } @@ -65670,15 +66965,15 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& const bool showChannelsAsStereoPairs_, const bool hideAdvancedOptionsWithButton_) : deviceManager (deviceManager_), + deviceTypeDropDown (0), + deviceTypeDropDownLabel (0), + audioDeviceSettingsComp (0), minOutputChannels (minOutputChannels_), maxOutputChannels (maxOutputChannels_), minInputChannels (minInputChannels_), maxInputChannels (maxInputChannels_), showChannelsAsStereoPairs (showChannelsAsStereoPairs_), - hideAdvancedOptionsWithButton (hideAdvancedOptionsWithButton_), - deviceTypeDropDown (0), - deviceTypeDropDownLabel (0), - audioDeviceSettingsComp (0) + hideAdvancedOptionsWithButton (hideAdvancedOptionsWithButton_) { jassert (minOutputChannels >= 0 && minOutputChannels <= maxOutputChannels); jassert (minInputChannels >= 0 && minInputChannels <= maxInputChannels); @@ -65766,7 +67061,7 @@ void AudioDeviceSelectorComponent::resized() if (midiInputsList != 0) { - const int bh = midiInputsList->getBestHeight (jmin (h * 8, getHeight() - y - space)); + const int bh = midiInputsList->getBestHeight (jmin (h * 8, getHeight() - y - space - h)); midiInputsList->setBounds (lx, y, w, bh); y += bh + space; } @@ -68631,1074 +69926,6 @@ void PreferencesPanel::buttonClicked (Button*) END_JUCE_NAMESPACE /********* End of inlined file: juce_PreferencesPanel.cpp *********/ -/********* Start of inlined file: juce_QuickTimeMovieComponent.cpp *********/ - -#if JUCE_QUICKTIME - -#ifdef _MSC_VER - #pragma warning (disable: 4514) -#endif - -#ifdef _WIN32 - #include - - #ifdef _MSC_VER - #pragma warning (push) - #pragma warning (disable : 4100) - #endif - - /* 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 - #include - #include - #include - #include - - #ifdef _MSC_VER - #pragma warning (pop) - #endif - - // 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 - #import - - using namespace QTOLibrary; - using namespace QTOControlLib; -#else - #include - #include - #include - #include -#endif - -BEGIN_JUCE_NAMESPACE - -bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle); - -static bool hasLoadedQT = false; -static bool isQTAvailable = false; - -struct QTMovieCompInternal -{ - QTMovieCompInternal() - : dataHandle (0) - { -#if JUCE_MAC - movie = 0; - controller = 0; -#endif - } - - ~QTMovieCompInternal() - { - clearHandle(); - } - -#if JUCE_MAC - Movie movie; - MovieController controller; -#else - IQTControlPtr qtControlInternal; - IQTMoviePtr qtMovieInternal; -#endif - - Handle dataHandle; - - void clearHandle() - { - if (dataHandle != 0) - { - DisposeHandle (dataHandle); - dataHandle = 0; - } - } -}; - -#if JUCE_WIN32 - -#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(); - QTWinBaseClass::parentHierarchyChanged(); -} - -void QuickTimeMovieComponent::visibilityChanged() -{ - createControlIfNeeded(); - QTWinBaseClass::visibilityChanged(); -} - -void QuickTimeMovieComponent::paint (Graphics& g) -{ - if (! isControlCreated()) - g.fillAll (Colours::black); -} - -#endif - -#if JUCE_MAC - -static VoidArray activeQTWindows (2); - -struct MacClickEventData -{ - ::Point where; - long when; - long modifiers; -}; - -void OfferMouseClickToQuickTime (WindowRef window, - ::Point where, long when, long modifiers, - Component* topLevelComp) -{ - if (hasLoadedQT) - { - for (int i = activeQTWindows.size(); --i >= 0;) - { - QuickTimeMovieComponent* const qtw = (QuickTimeMovieComponent*) activeQTWindows[i]; - - if (qtw->isVisible() && topLevelComp->isParentOf (qtw)) - { - MacClickEventData data; - data.where = where; - data.when = when; - data.modifiers = modifiers; - - qtw->handleMCEvent (&data); - } - } - } -} - -QuickTimeMovieComponent::QuickTimeMovieComponent() - : internal (new QTMovieCompInternal()), - associatedWindow (0), - controllerVisible (false), - controllerAssignedToWindow (false), - reentrant (false) -{ - if (! hasLoadedQT) - { - hasLoadedQT = true; - isQTAvailable = EnterMovies() == noErr; - } - - setOpaque (true); - setVisible (true); - - activeQTWindows.add (this); -} - -QuickTimeMovieComponent::~QuickTimeMovieComponent() -{ - closeMovie(); - - activeQTWindows.removeValue ((void*) this); - - QTMovieCompInternal* const i = (QTMovieCompInternal*) internal; - delete i; - - if (activeQTWindows.size() == 0 && isQTAvailable) - { - isQTAvailable = false; - hasLoadedQT = false; - - ExitMovies(); - } -} - -bool QuickTimeMovieComponent::isQuickTimeAvailable() throw() -{ - if (! hasLoadedQT) - { - hasLoadedQT = true; - isQTAvailable = EnterMovies() == noErr; - } - - return isQTAvailable; -} - -bool QuickTimeMovieComponent::loadMovie (InputStream* movieStream, - const bool controllerVisible_) -{ - if (! isQTAvailable) - return false; - - closeMovie(); - movieFile = File::nonexistent; - - 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; - } - - controllerVisible = controllerVisible_; - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - GrafPtr savedPort; - GetPort (&savedPort); - bool result = false; - - if (juce_OpenQuickTimeMovieFromStream (movieStream, qmci->movie, qmci->dataHandle)) - { - qmci->controller = 0; - - void* window = getWindowHandle(); - - if (window != associatedWindow && window != 0) - associatedWindow = window; - - assignMovieToWindow(); - - SetMovieActive (qmci->movie, true); - SetMovieProgressProc (qmci->movie, (MovieProgressUPP) -1, 0); - - startTimer (1000 / 50); // this needs to be quite a high frequency for smooth playback - result = true; - - repaint(); - } - - MacSetPort (savedPort); - - return result; -} - -void QuickTimeMovieComponent::closeMovie() -{ - stop(); - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0) - { - DisposeMovieController (qmci->controller); - qmci->controller = 0; - } - - if (qmci->movie != 0) - { - DisposeMovie (qmci->movie); - qmci->movie = 0; - } - - qmci->clearHandle(); - - stopTimer(); - movieFile = File::nonexistent; -} - -bool QuickTimeMovieComponent::isMovieOpen() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - return qmci->movie != 0 && qmci->controller != 0; -} - -const File QuickTimeMovieComponent::getCurrentMovieFile() const -{ - return movieFile; -} - -static GrafPtr getPortForWindow (void* window) -{ - if (window == 0) - return 0; - - return (GrafPtr) GetWindowPort ((WindowRef) window); -} - -void QuickTimeMovieComponent::assignMovieToWindow() -{ - if (reentrant) - return; - - reentrant = true; - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - if (qmci->controller != 0) - { - DisposeMovieController (qmci->controller); - qmci->controller = 0; - } - - controllerAssignedToWindow = false; - - void* window = getWindowHandle(); - GrafPtr port = getPortForWindow (window); - - if (port != 0) - { - GrafPtr savedPort; - GetPort (&savedPort); - - SetMovieGWorld (qmci->movie, (CGrafPtr) port, 0); - MacSetPort (port); - - Rect r; - r.top = 0; - r.left = 0; - r.right = (short) jmax (1, getWidth()); - r.bottom = (short) jmax (1, getHeight()); - SetMovieBox (qmci->movie, &r); - - // create the movie controller - qmci->controller = NewMovieController (qmci->movie, &r, - controllerVisible ? mcTopLeftMovie - : mcNotVisible); - - if (qmci->controller != 0) - { - MCEnableEditing (qmci->controller, true); - - MCDoAction (qmci->controller, mcActionSetUseBadge, (void*) false); - MCDoAction (qmci->controller, mcActionSetLoopIsPalindrome, (void*) false); - setLooping (looping); - - MCDoAction (qmci->controller, mcActionSetFlags, - (void*) (pointer_sized_int) (mcFlagSuppressMovieFrame | (controllerVisible ? 0 : (mcFlagSuppressStepButtons | mcFlagSuppressSpeakerButton)))); - - MCSetControllerBoundsRect (qmci->controller, &r); - - controllerAssignedToWindow = true; - - resized(); - } - - MacSetPort (savedPort); - } - else - { - SetMovieGWorld (qmci->movie, 0, 0); - } - - reentrant = false; -} - -void QuickTimeMovieComponent::play() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - StartMovie (qmci->movie); -} - -void QuickTimeMovieComponent::stop() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - StopMovie (qmci->movie); -} - -bool QuickTimeMovieComponent::isPlaying() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - return qmci->movie != 0 && GetMovieRate (qmci->movie) != 0; -} - -void QuickTimeMovieComponent::setPosition (const double seconds) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0) - { - TimeRecord time; - time.base = GetMovieTimeBase (qmci->movie); - time.scale = 100000; - const uint64 t = (uint64) (100000.0 * seconds); - time.value.lo = (UInt32) (t & 0xffffffff); - time.value.hi = (UInt32) (t >> 32); - - SetMovieTime (qmci->movie, &time); - timerCallback(); // to call MCIdle - } - else - { - jassertfalse // no movie is open, so can't set the position. - } -} - -double QuickTimeMovieComponent::getPosition() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - { - TimeRecord time; - GetMovieTime (qmci->movie, &time); - - return ((int64) (((uint64) time.value.hi << 32) | (uint64) time.value.lo)) - / (double) time.scale; - } - - return 0.0; -} - -void QuickTimeMovieComponent::setSpeed (const float newSpeed) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - SetMovieRate (qmci->movie, (Fixed) (newSpeed * (Fixed) 0x00010000L)); -} - -double QuickTimeMovieComponent::getMovieDuration() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - return GetMovieDuration (qmci->movie) / (double) GetMovieTimeScale (qmci->movie); - - return 0.0; -} - -void QuickTimeMovieComponent::setLooping (const bool shouldLoop) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - looping = shouldLoop; - - if (qmci->controller != 0) - MCDoAction (qmci->controller, mcActionSetLooping, (void*) shouldLoop); -} - -bool QuickTimeMovieComponent::isLooping() const -{ - return looping; -} - -void QuickTimeMovieComponent::setMovieVolume (const float newVolume) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - SetMovieVolume (qmci->movie, jlimit ((short) 0, (short) 0x100, (short) (newVolume * 0x0100))); -} - -float QuickTimeMovieComponent::getMovieVolume() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - return jmax (0.0f, GetMovieVolume (qmci->movie) / (float) 0x0100); - - return 0.0f; -} - -void QuickTimeMovieComponent::getMovieNormalSize (int& width, int& height) const -{ - width = 0; - height = 0; - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - { - Rect r; - GetMovieNaturalBoundsRect (qmci->movie, &r); - width = r.right - r.left; - height = r.bottom - r.top; - } -} - -void QuickTimeMovieComponent::paint (Graphics& g) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie == 0 || qmci->controller == 0) - { - g.fillAll (Colours::black); - return; - } - - GrafPtr savedPort; - GetPort (&savedPort); - - MacSetPort (getPortForWindow (getWindowHandle())); - MCDraw (qmci->controller, (WindowRef) getWindowHandle()); - - MacSetPort (savedPort); - - ComponentPeer* const peer = getPeer(); - - if (peer != 0) - { - peer->addMaskedRegion (getScreenX() - peer->getScreenX(), - getScreenY() - peer->getScreenY(), - getWidth(), getHeight()); - } - - timerCallback(); -} - -static const Rectangle getMoviePos (Component* const c) -{ - return Rectangle (c->getScreenX() - c->getTopLevelComponent()->getScreenX(), - c->getScreenY() - c->getTopLevelComponent()->getScreenY(), - jmax (1, c->getWidth()), - jmax (1, c->getHeight())); -} - -void QuickTimeMovieComponent::moved() -{ - resized(); -} - -void QuickTimeMovieComponent::resized() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0 && isShowing()) - { - checkWindowAssociation(); - - GrafPtr port = getPortForWindow (getWindowHandle()); - - if (port != 0) - { - GrafPtr savedPort; - GetPort (&savedPort); - - SetMovieGWorld (qmci->movie, (CGrafPtr) port, 0); - MacSetPort (port); - - lastPositionApplied = getMoviePos (this); - - Rect r; - r.left = (short) lastPositionApplied.getX(); - r.top = (short) lastPositionApplied.getY(); - r.right = (short) lastPositionApplied.getRight(); - r.bottom = (short) lastPositionApplied.getBottom(); - - if (MCGetVisible (qmci->controller)) - MCSetControllerBoundsRect (qmci->controller, &r); - else - SetMovieBox (qmci->movie, &r); - - if (! isPlaying()) - timerCallback(); - - MacSetPort (savedPort); - - repaint(); - } - } -} - -void QuickTimeMovieComponent::visibilityChanged() -{ - checkWindowAssociation(); - QTWinBaseClass::visibilityChanged(); -} - -void QuickTimeMovieComponent::timerCallback() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0) - { - if (isTimerRunning()) - startTimer (getTimerInterval()); - - MCIdle (qmci->controller); - - if (lastPositionApplied != getMoviePos (this)) - resized(); - } -} - -void QuickTimeMovieComponent::checkWindowAssociation() -{ - void* const window = getWindowHandle(); - - if (window != associatedWindow - || (window != 0 && ! controllerAssignedToWindow)) - { - associatedWindow = window; - assignMovieToWindow(); - } -} - -void QuickTimeMovieComponent::parentHierarchyChanged() -{ - checkWindowAssociation(); -} - -void QuickTimeMovieComponent::handleMCEvent (void* ev) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0 && isShowing()) - { - MacClickEventData* data = (MacClickEventData*) ev; - - data->where.h -= getTopLevelComponent()->getScreenX(); - data->where.v -= getTopLevelComponent()->getScreenY(); - - Boolean b = false; - MCPtInController (qmci->controller, data->where, &b); - - if (b) - { - const int oldTimeBeforeWaitCursor = MessageManager::getInstance()->getTimeBeforeShowingWaitCursor(); - MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (0); - - MCClick (qmci->controller, - (WindowRef) getWindowHandle(), - data->where, - data->when, - data->modifiers); - - MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (oldTimeBeforeWaitCursor); - } - } -} - -#endif - -// (methods common to both platforms..) - -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; - -#if JUCE_MAC - SetPort (0); -#else - MacSetPort (0); -#endif - - 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 (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); - } -} - -END_JUCE_NAMESPACE - -#endif -/********* End of inlined file: juce_QuickTimeMovieComponent.cpp *********/ - /********* Start of inlined file: juce_SystemTrayIconComponent.cpp *********/ #if JUCE_WIN32 || JUCE_LINUX @@ -70690,9 +70917,10 @@ void ComponentPeer::handleMessage (const Message& message) { if (message.intParameter1 == fakeMouseMoveMessage) { - handleMouseMove (message.intParameter2, - message.intParameter3, - Time::currentTimeMillis()); + if (! ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown()) + handleMouseMove (message.intParameter2, + message.intParameter3, + Time::currentTimeMillis()); } } @@ -72086,7 +72314,7 @@ void SplashScreen::show (const String& title, addToDesktop (useDropShadow ? ComponentPeer::windowHasDropShadow : 0); toFront (false); - MessageManager::getInstance()->dispatchPendingMessages(); + MessageManager::getInstance()->runDispatchLoopUntil (300); repaint(); @@ -72218,19 +72446,12 @@ TooltipWindow::TooltipWindow (Component* const parentComponent, setOpaque (true); if (parentComponent != 0) - { parentComponent->addChildComponent (this); - } - else - { - setSize (1, 1); // to keep the OS happy by not having zero-size windows - addToDesktop (ComponentPeer::windowHasDropShadow - | ComponentPeer::windowIsTemporary); - } } TooltipWindow::~TooltipWindow() { + hide(); } void TooltipWindow::paint (Graphics& g) @@ -72240,7 +72461,7 @@ void TooltipWindow::paint (Graphics& g) void TooltipWindow::mouseEnter (const MouseEvent&) { - setVisible (false); + hide(); } void TooltipWindow::showFor (Component* const c) @@ -72254,7 +72475,7 @@ void TooltipWindow::showFor (Component* const c) if (tip.isEmpty()) { - setVisible (false); + hide(); } else { @@ -72279,10 +72500,23 @@ void TooltipWindow::showFor (Component* const c) setBounds (x, y, w, h); setVisible (true); + + if (getParentComponent() == 0) + { + addToDesktop (ComponentPeer::windowHasDropShadow + | ComponentPeer::windowIsTemporary); + } + toFront (false); } } +void TooltipWindow::hide() +{ + removeFromDesktop(); + setVisible (false); +} + void TooltipWindow::timerCallback() { int mx, my; @@ -72303,7 +72537,7 @@ void TooltipWindow::timerCallback() if (isVisible()) { lastHideTime = now; - setVisible (false); + hide(); } changedCompsSinceShown = changedCompsSinceShown || changedComp; @@ -72359,7 +72593,8 @@ public: void timerCallback() { - startTimer (1731); + startTimer (jmin (1731, getTimerInterval() * 2)); + TopLevelWindow* active = 0; if (Process::isForegroundProcess()) @@ -76627,8 +76862,8 @@ static void transformedImageRender (Image& destImage, for (int y = 0; y < destClipH; ++y) { - double sx = srcX; - double sy = srcY; + double sx = srcX - (srcClipWidth == destClipW ? 0.0 : 0.5); + double sy = srcY - (srcClipHeight == destClipH ? 0.0 : 0.5); DestPixelType* dest = (DestPixelType*) (destPixels + destStride * y); for (int x = 0; x < destClipW; ++x) @@ -79656,7 +79891,7 @@ private: tokens.trim(); tokens.removeEmptyStrings(); - if (tokens[0].containsChar T('%')) + if (tokens[0].containsChar (T('%'))) return Colour ((uint8) roundDoubleToInt (2.55 * tokens[0].getDoubleValue()), (uint8) roundDoubleToInt (2.55 * tokens[1].getDoubleValue()), (uint8) roundDoubleToInt (2.55 * tokens[2].getDoubleValue())); @@ -88220,6 +88455,7 @@ END_JUCE_NAMESPACE namespace zlibNamespace { +#if JUCE_INCLUDE_ZLIB_CODE #undef OS_CODE #undef fdopen @@ -89881,6 +90117,9 @@ ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); /********* End of inlined file: zlib.h *********/ #undef OS_CODE +#else + #include +#endif } BEGIN_JUCE_NAMESPACE @@ -90074,6 +90313,7 @@ END_JUCE_NAMESPACE namespace zlibNamespace { +#if JUCE_INCLUDE_ZLIB_CODE extern "C" { #undef OS_CODE @@ -98044,6 +98284,9 @@ void zcfree (voidpf opaque, voidpf ptr) #undef Byte } +#else + #include +#endif } #if JUCE_MSVC @@ -98279,6 +98522,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_FlacAudioFormat.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #include #endif @@ -98292,13 +98731,14 @@ END_JUCE_NAMESPACE namespace FlacNamespace { -#define FLAC__NO_DLL 1 +#if JUCE_INCLUDE_FLAC_CODE + #define FLAC__NO_DLL 1 -#if ! defined (SIZE_MAX) + #if ! defined (SIZE_MAX) #define SIZE_MAX 0xffffffff -#endif + #endif -#define __STDC_LIMIT_MACROS 1 + #define __STDC_LIMIT_MACROS 1 /********* Start of inlined file: all.h *********/ #ifndef FLAC__ALL_H @@ -105296,6 +105736,202 @@ done1: // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -105448,6 +106084,202 @@ unsigned FLAC__bitmath_silog2_wide(FLAC__int64 v) // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -106945,6 +107777,202 @@ FLAC__bool FLAC__bitreader_read_utf8_uint64(FLAC__BitReader *br, FLAC__uint64 *v // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -108085,6 +109113,202 @@ FLAC__bool FLAC__bitwriter_zero_pad_to_byte_boundary(FLAC__BitWriter *bw) // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -108494,6 +109718,202 @@ void FLAC__cpu_info(FLAC__CPUInfo *info) // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -108627,6 +110047,202 @@ unsigned FLAC__crc16(const FLAC__byte *data, unsigned len) // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -109200,6 +110816,202 @@ void FLAC__fixed_restore_signal(const FLAC__int32 residual[], unsigned data_len, // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -109498,6 +111310,202 @@ FLAC__uint32 FLAC__fixedpoint_log2(FLAC__uint32 x, unsigned fracbits, unsigned p // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -110084,6 +112092,202 @@ FLAC__bool FLAC__format_entropy_coding_method_partitioned_rice_contents_ensure_s // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -111634,6 +113838,202 @@ unsigned FLAC__lpc_compute_best_order(const FLAC__double lpc_error[], unsigned m // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -112125,6 +114525,202 @@ FLAC__bool FLAC__MD5Accumulate(FLAC__MD5Context *ctx, const FLAC__int32 * const // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -112361,6 +114957,202 @@ FLAC__bool FLAC__memory_alloc_aligned_real_array(unsigned elements, FLAC__real * // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -115757,6 +118549,202 @@ FLAC__bool file_eof_callback_(const FLAC__StreamDecoder *decoder, void *client_d // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -120226,6 +123214,202 @@ FILE *get_binary_stdout_(void) // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -120770,6 +123954,202 @@ FLAC__bool add_residual_partitioned_rice_(FLAC__BitWriter *bw, const FLAC__int32 // This file is included at the start of each FLAC .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #define VERSION "1.2.1" #define FLAC__NO_DLL 1 @@ -120979,6 +124359,9 @@ void FLAC__window_welch(FLAC__real *window, const FLAC__int32 L) #endif /********* End of inlined file: window_flac.c *********/ +#else + #include +#endif } #ifdef _MSC_VER @@ -121479,6 +124862,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_OggVorbisAudioFormat.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_USE_OGGVORBIS #if JUCE_MAC @@ -121487,6 +125066,7 @@ END_JUCE_NAMESPACE namespace OggVorbisNamespace { +#if JUCE_INCLUDE_OGGVORBIS_CODE /********* Start of inlined file: vorbisenc.h *********/ #ifndef _OV_ENC_H_ @@ -122248,6 +125828,202 @@ extern int ov_halfrate_p(OggVorbis_File *vf); // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -123027,6 +126803,202 @@ int main(void){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -124808,6 +128780,202 @@ int main(void){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -125961,6 +130129,202 @@ void _analysis_output(char *base,int i,float *v,int n,int bark,int dB, // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -126206,6 +130570,202 @@ int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,ogg_packet *op){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -127192,6 +131752,202 @@ float *vorbis_window(vorbis_dsp_state *v,int W){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -127793,6 +132549,202 @@ int main(){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -128159,6 +133111,202 @@ void _ve_envelope_shift(envelope_lookup *e,long shift){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -128380,6 +133528,202 @@ vorbis_func_floor floor0_exportbundle={ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -129437,6 +134781,202 @@ vorbis_func_floor floor1_exportbundle={ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -130051,6 +135591,202 @@ Carsten Bormann // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -130171,6 +135907,202 @@ void vorbis_lpc_predict(float *coeff,float *prime,int m, // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -130222,6 +136154,202 @@ extern float vorbis_fromdBlook_i(long a); // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -130565,6 +136693,202 @@ void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -131187,6 +137511,202 @@ int vorbis_lpc_to_lsp(float *lpc,float *lsp,int m){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -132015,6 +138535,202 @@ vorbis_func_mapping mapping0_exportbundle={ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -132551,6 +139267,202 @@ void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -134529,6 +141441,202 @@ void hf_reduction(vorbis_info_psy_global *g, // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -134574,6 +141682,202 @@ vorbis_func_mapping *_mapping_P[]={ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -135454,6 +142758,202 @@ vorbis_func_residue residue2_exportbundle={ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -136185,6 +143685,202 @@ int main(){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -137423,6 +145119,202 @@ void drft_clear(drft_lookup *l){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -137585,6 +145477,202 @@ int vorbis_synthesis_halfrate_p(vorbis_info *vi){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -175938,6 +184026,202 @@ int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -177911,6 +186195,202 @@ int ov_time_seek_page_lap(OggVorbis_File *vf,double pos){ // This file is included at the start of each Ogg-Vorbis .c file, just to do a few housekeeping // tasks.. +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #ifdef _MSC_VER #pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706) #endif @@ -180038,6 +188518,11 @@ void _vorbis_apply_window(float *d,int *winno,long *blocksizes, #endif /********* End of inlined file: window.c *********/ +#else + #include + #include + #include +#endif } BEGIN_JUCE_NAMESPACE @@ -180481,6 +188966,7 @@ END_JUCE_NAMESPACE namespace jpeglibNamespace { +#if JUCE_INCLUDE_JPEGLIB_CODE extern "C" { #define JPEG_INTERNALS @@ -203796,6 +212282,11 @@ jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, /********* End of inlined file: transupp.c *********/ } +#else + #define JPEG_INTERNALS + #undef FAR + #include +#endif } #if JUCE_MSVC @@ -204058,15 +212549,21 @@ END_JUCE_NAMESPACE namespace zlibNamespace { +#if JUCE_INCLUDE_ZLIB_CODE #undef OS_CODE #undef fdopen #undef OS_CODE +#else + #include +#endif } namespace pnglibNamespace { using namespace zlibNamespace; + +#if JUCE_INCLUDE_PNGLIB_CODE using ::malloc; using ::free; @@ -222182,7 +230679,7 @@ png_read_finish_row(png_structp png_ptr) char extra; int ret; - png_ptr->zstream.next_out = (Byte *)&extra; + png_ptr->zstream.next_out = (Bytef *)&extra; png_ptr->zstream.avail_out = (uInt)1; for(;;) { @@ -229451,6 +237948,13 @@ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) /********* End of inlined file: pngwutil.c *********/ } +#else + #define PNG_INTERNAL + #define PNG_SETJMP_NOT_SUPPORTED + + #include + #include +#endif } #ifdef _MSC_VER @@ -229713,18 +238217,875 @@ END_JUCE_NAMESPACE //============================================================================== #if JUCE_WIN32 +/********* Start of inlined file: juce_win32_NativeCode.cpp *********/ + +/* + This file wraps together all the win32-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. +*/ + +BEGIN_JUCE_NAMESPACE + +#define JUCE_INCLUDED_FILE 1 + +// Now include the actual code files.. + +/********* Start of inlined file: juce_win32_DynamicLibraryLoader.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE + +/********* Start of inlined file: juce_win32_DynamicLibraryLoader.h *********/ +#ifndef __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__ +#define __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__ + +#ifndef DOXYGEN + +// use with DynamicLibraryLoader to simplify importing functions +// +// functionName: function to import +// localFunctionName: name you want to use to actually call it (must be different) +// returnType: the return type +// object: the DynamicLibraryLoader to use +// params: list of params (bracketed) +// +#define DynamicLibraryImport(functionName, localFunctionName, returnType, object, params) \ + typedef returnType (WINAPI *type##localFunctionName) params; \ + type##localFunctionName localFunctionName \ + = (type##localFunctionName)object.findProcAddress (#functionName); + +// loads and unloads a DLL automatically +class JUCE_API DynamicLibraryLoader +{ +public: + DynamicLibraryLoader (const String& name); + ~DynamicLibraryLoader(); + + void* findProcAddress (const String& functionName); + +private: + void* libHandle; +}; + +#endif +#endif // __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__ +/********* End of inlined file: juce_win32_DynamicLibraryLoader.h *********/ + +DynamicLibraryLoader::DynamicLibraryLoader (const String& name) +{ + libHandle = LoadLibrary (name); +} + +DynamicLibraryLoader::~DynamicLibraryLoader() +{ + FreeLibrary ((HMODULE) libHandle); +} + +void* DynamicLibraryLoader::findProcAddress (const String& functionName) +{ + return (void*) GetProcAddress ((HMODULE) libHandle, functionName); +} + +#endif +/********* End of inlined file: juce_win32_DynamicLibraryLoader.cpp *********/ + +/********* Start of inlined file: juce_win32_SystemStats.cpp *********/ +// (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(); + +void Logger::outputDebugString (const String& text) throw() +{ + OutputDebugString (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); +} + +static int64 hiResTicksPerSecond; +static double hiResTicksScaleFactor; + +#if JUCE_USE_INTRINSICS + +// CPU info functions using intrinsics... + +#pragma intrinsic (__cpuid) +#pragma intrinsic (__rdtsc) + +/*static unsigned int getCPUIDWord (int* familyModel = 0, int* extFeatures = 0) throw() +{ + int info [4]; + __cpuid (info, 1); + + if (familyModel != 0) + *familyModel = info [0]; + + if (extFeatures != 0) + *extFeatures = info[1]; + + return info[3]; +}*/ + +const String SystemStats::getCpuVendor() throw() +{ + int info [4]; + __cpuid (info, 0); + + char v [12]; + memcpy (v, info + 1, 4); + memcpy (v + 4, info + 3, 4); + memcpy (v + 8, info + 2, 4); + + return String (v, 12); +} + +#else + +// CPU info functions using old fashioned inline asm... + +/*static juce_noinline unsigned int getCPUIDWord (int* familyModel = 0, int* extFeatures = 0) +{ + unsigned int cpu = 0; + unsigned int ext = 0; + unsigned int family = 0; + + #if JUCE_GCC + unsigned int dummy = 0; + #endif + + #ifndef __MINGW32__ + __try + #endif + { + #if JUCE_GCC + __asm__ ("cpuid" : "=a" (family), "=b" (ext), "=c" (dummy),"=d" (cpu) : "a" (1)); + #else + __asm + { + mov eax, 1 + cpuid + mov cpu, edx + mov family, eax + mov ext, ebx + } + + #endif + } + #ifndef __MINGW32__ + __except (EXCEPTION_EXECUTE_HANDLER) + { + return 0; + } + #endif + + if (familyModel != 0) + *familyModel = family; + + if (extFeatures != 0) + *extFeatures = ext; + + return cpu; +}*/ + +static void juce_getCpuVendor (char* const v) +{ + int vendor[4]; + zeromem (vendor, 16); + +#ifdef JUCE_64BIT +#else + #ifndef __MINGW32__ + __try + #endif + { + #if JUCE_GCC + unsigned int dummy = 0; + __asm__ ("cpuid" : "=a" (dummy), "=b" (vendor[0]), "=c" (vendor[2]),"=d" (vendor[1]) : "a" (0)); + #else + __asm + { + mov eax, 0 + cpuid + mov [vendor], ebx + mov [vendor + 4], edx + mov [vendor + 8], ecx + } + #endif + } + #ifndef __MINGW32__ + __except (EXCEPTION_EXECUTE_HANDLER) + { + *v = 0; + } + #endif +#endif + + memcpy (v, vendor, 16); +} + +const String SystemStats::getCpuVendor() throw() +{ + char v [16]; + juce_getCpuVendor (v); + return String (v, 16); +} +#endif + +struct CPUFlags +{ + bool hasMMX : 1; + bool hasSSE : 1; + bool hasSSE2 : 1; + bool has3DNow : 1; +}; + +static CPUFlags cpuFlags; + +bool SystemStats::hasMMX() throw() +{ + return cpuFlags.hasMMX; +} + +bool SystemStats::hasSSE() throw() +{ + return cpuFlags.hasSSE; +} + +bool SystemStats::hasSSE2() throw() +{ + return cpuFlags.hasSSE2; +} + +bool SystemStats::has3DNow() throw() +{ + return cpuFlags.has3DNow; +} + +void SystemStats::initialiseStats() throw() +{ + juce_initialiseThreadEvents(); + + cpuFlags.hasMMX = IsProcessorFeaturePresent (PF_MMX_INSTRUCTIONS_AVAILABLE) != 0; + cpuFlags.hasSSE = IsProcessorFeaturePresent (PF_XMMI_INSTRUCTIONS_AVAILABLE) != 0; + cpuFlags.hasSSE2 = IsProcessorFeaturePresent (PF_XMMI64_INSTRUCTIONS_AVAILABLE) != 0; +#ifdef PF_AMD3D_INSTRUCTIONS_AVAILABLE + cpuFlags.has3DNow = IsProcessorFeaturePresent (PF_AMD3D_INSTRUCTIONS_AVAILABLE) != 0; +#else + cpuFlags.has3DNow = IsProcessorFeaturePresent (PF_3DNOW_INSTRUCTIONS_AVAILABLE) != 0; +#endif + + LARGE_INTEGER f; + QueryPerformanceFrequency (&f); + hiResTicksPerSecond = f.QuadPart; + hiResTicksScaleFactor = 1000.0 / hiResTicksPerSecond; + + String s (SystemStats::getJUCEVersion()); + +#ifdef JUCE_DEBUG + const MMRESULT res = timeBeginPeriod (1); + jassert (res == TIMERR_NOERROR); +#else + timeBeginPeriod (1); +#endif + +#if defined (JUCE_DEBUG) && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS + _CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +#endif +} + +SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() throw() +{ + OSVERSIONINFO info; + info.dwOSVersionInfoSize = sizeof (info); + GetVersionEx (&info); + + if (info.dwPlatformId == VER_PLATFORM_WIN32_NT) + { + switch (info.dwMajorVersion) + { + case 5: + return (info.dwMinorVersion == 0) ? Win2000 : WinXP; + + case 6: + return WinVista; + + default: + jassertfalse // !! not a supported OS! + break; + } + } + else if (info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) + { + jassert (info.dwMinorVersion != 0); // !! still running on Windows 95?? + + return Win98; + } + + return UnknownOS; +} + +const String SystemStats::getOperatingSystemName() throw() +{ + const char* name = "Unknown OS"; + + switch (getOperatingSystemType()) + { + case WinVista: + name = "Windows Vista"; + break; + + case WinXP: + name = "Windows XP"; + break; + + case Win2000: + name = "Windows 2000"; + break; + + case Win98: + name = "Windows 98"; + break; + + default: + jassertfalse // !! new type of OS? + break; + } + + return name; +} + +bool SystemStats::isOperatingSystem64Bit() throw() +{ +#ifdef _WIN64 + return true; +#else + typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); + + LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress (GetModuleHandle (L"kernel32"), "IsWow64Process"); + + BOOL isWow64 = FALSE; + + return (fnIsWow64Process != 0) + && fnIsWow64Process (GetCurrentProcess(), &isWow64) + && (isWow64 != FALSE); +#endif +} + +int SystemStats::getMemorySizeInMegabytes() throw() +{ + MEMORYSTATUS mem; + GlobalMemoryStatus (&mem); + return (int) (mem.dwTotalPhys / (1024 * 1024)) + 1; +} + +int SystemStats::getNumCpus() throw() +{ + SYSTEM_INFO systemInfo; + GetSystemInfo (&systemInfo); + + return systemInfo.dwNumberOfProcessors; +} + +uint32 juce_millisecondsSinceStartup() throw() +{ + return (uint32) GetTickCount(); +} + +int64 Time::getHighResolutionTicks() throw() +{ + LARGE_INTEGER ticks; + QueryPerformanceCounter (&ticks); + + const int64 mainCounterAsHiResTicks = (GetTickCount() * hiResTicksPerSecond) / 1000; + const int64 newOffset = mainCounterAsHiResTicks - ticks.QuadPart; + + // fix for a very obscure PCI hardware bug that can make the counter + // sometimes jump forwards by a few seconds.. + static int64 hiResTicksOffset = 0; + const int64 offsetDrift = abs64 (newOffset - hiResTicksOffset); + + if (offsetDrift > (hiResTicksPerSecond >> 1)) + hiResTicksOffset = newOffset; + + return ticks.QuadPart + hiResTicksOffset; +} + +double Time::getMillisecondCounterHiRes() throw() +{ + return getHighResolutionTicks() * hiResTicksScaleFactor; +} + +int64 Time::getHighResolutionTicksPerSecond() throw() +{ + return hiResTicksPerSecond; +} + +int64 SystemStats::getClockCycleCounter() throw() +{ +#if JUCE_USE_INTRINSICS + // MS intrinsics version... + return __rdtsc(); + +#elif JUCE_GCC + // GNU inline asm version... + unsigned int hi = 0, lo = 0; + + __asm__ __volatile__ ( + "xor %%eax, %%eax \n\ + xor %%edx, %%edx \n\ + rdtsc \n\ + movl %%eax, %[lo] \n\ + movl %%edx, %[hi]" + : + : [hi] "m" (hi), + [lo] "m" (lo) + : "cc", "eax", "ebx", "ecx", "edx", "memory"); + + return (int64) ((((uint64) hi) << 32) | lo); +#else + // MSVC inline asm version... + unsigned int hi = 0, lo = 0; + + __asm + { + xor eax, eax + xor edx, edx + rdtsc + mov lo, eax + mov hi, edx + } + + return (int64) ((((uint64) hi) << 32) | lo); +#endif +} + +int SystemStats::getCpuSpeedInMegaherz() throw() +{ + const int64 cycles = SystemStats::getClockCycleCounter(); + const uint32 millis = Time::getMillisecondCounter(); + int lastResult = 0; + + for (;;) + { + int n = 1000000; + while (--n > 0) {} + + const uint32 millisElapsed = Time::getMillisecondCounter() - millis; + const int64 cyclesNow = SystemStats::getClockCycleCounter(); + + if (millisElapsed > 80) + { + const int newResult = (int) (((cyclesNow - cycles) / millisElapsed) / 1000); + + if (millisElapsed > 500 || (lastResult == newResult && newResult > 100)) + return newResult; + + lastResult = newResult; + } + } +} + +bool Time::setSystemTimeToThisTime() const throw() +{ + SYSTEMTIME st; + + st.wDayOfWeek = 0; + st.wYear = (WORD) getYear(); + st.wMonth = (WORD) (getMonth() + 1); + st.wDay = (WORD) getDayOfMonth(); + st.wHour = (WORD) getHours(); + st.wMinute = (WORD) getMinutes(); + st.wSecond = (WORD) getSeconds(); + st.wMilliseconds = (WORD) (millisSinceEpoch % 1000); + + // do this twice because of daylight saving conversion problems - the + // first one sets it up, the second one kicks it in. + return SetLocalTime (&st) != 0 + && SetLocalTime (&st) != 0; +} + +int SystemStats::getPageSize() throw() +{ + SYSTEM_INFO systemInfo; + GetSystemInfo (&systemInfo); + + return systemInfo.dwPageSize; +} + +#endif +/********* End of inlined file: juce_win32_SystemStats.cpp *********/ + +/********* Start of inlined file: juce_win32_Threads.cpp *********/ +// (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 + +CriticalSection::CriticalSection() throw() +{ + // (just to check the MS haven't changed this structure and broken things...) +#if _MSC_VER >= 1400 + static_jassert (sizeof (CRITICAL_SECTION) <= sizeof (internal)); +#else + static_jassert (sizeof (CRITICAL_SECTION) <= 24); +#endif + + InitializeCriticalSection ((CRITICAL_SECTION*) internal); +} + +CriticalSection::~CriticalSection() throw() +{ + DeleteCriticalSection ((CRITICAL_SECTION*) internal); +} + +void CriticalSection::enter() const throw() +{ + EnterCriticalSection ((CRITICAL_SECTION*) internal); +} + +bool CriticalSection::tryEnter() const throw() +{ + return TryEnterCriticalSection ((CRITICAL_SECTION*) internal) != FALSE; +} + +void CriticalSection::exit() const throw() +{ + LeaveCriticalSection ((CRITICAL_SECTION*) internal); +} + +WaitableEvent::WaitableEvent() throw() + : internal (CreateEvent (0, FALSE, FALSE, 0)) +{ +} + +WaitableEvent::~WaitableEvent() throw() +{ + CloseHandle (internal); +} + +bool WaitableEvent::wait (const int timeOutMillisecs) const throw() +{ + return WaitForSingleObject (internal, timeOutMillisecs) == WAIT_OBJECT_0; +} + +void WaitableEvent::signal() const throw() +{ + SetEvent (internal); +} + +void WaitableEvent::reset() const throw() +{ + ResetEvent (internal); +} + +void JUCE_API juce_threadEntryPoint (void*); + +static unsigned int __stdcall threadEntryProc (void* userData) throw() +{ +#if ! JUCE_ONLY_BUILD_CORE_LIBRARY + AttachThreadInput (GetWindowThreadProcessId (juce_messageWindowHandle, 0), + GetCurrentThreadId(), TRUE); +#endif + + juce_threadEntryPoint (userData); + + _endthreadex (0); + return 0; +} + +void juce_CloseThreadHandle (void* handle) throw() +{ + CloseHandle ((HANDLE) handle); +} + +void* juce_createThread (void* userData) throw() +{ + unsigned int threadId; + + return (void*) _beginthreadex (0, 0, + &threadEntryProc, + userData, + 0, &threadId); +} + +void juce_killThread (void* handle) throw() +{ + if (handle != 0) + { +#ifdef JUCE_DEBUG + OutputDebugString (_T("** Warning - Forced thread termination **\n")); +#endif + TerminateThread (handle, 0); + } +} + +void juce_setCurrentThreadName (const String& name) throw() +{ +#if defined (JUCE_DEBUG) && JUCE_MSVC + struct + { + DWORD dwType; + LPCSTR szName; + DWORD dwThreadID; + DWORD dwFlags; + } info; + + info.dwType = 0x1000; + info.szName = name; + info.dwThreadID = GetCurrentThreadId(); + info.dwFlags = 0; + + #define MS_VC_EXCEPTION 0x406d1388 + + __try + { + RaiseException (MS_VC_EXCEPTION, 0, sizeof (info) / sizeof (ULONG_PTR), (ULONG_PTR*) &info); + } + __except (EXCEPTION_CONTINUE_EXECUTION) + {} +#else + (void) name; +#endif +} + +int64 Thread::getCurrentThreadId() throw() +{ + return (int) GetCurrentThreadId(); +} + +// priority 1 to 10 where 5=normal, 1=low +void juce_setThreadPriority (void* threadHandle, int priority) throw() +{ + int pri = THREAD_PRIORITY_TIME_CRITICAL; + + if (priority < 1) + pri = THREAD_PRIORITY_IDLE; + else if (priority < 2) + pri = THREAD_PRIORITY_LOWEST; + else if (priority < 5) + pri = THREAD_PRIORITY_BELOW_NORMAL; + else if (priority < 7) + pri = THREAD_PRIORITY_NORMAL; + else if (priority < 9) + pri = THREAD_PRIORITY_ABOVE_NORMAL; + else if (priority < 10) + pri = THREAD_PRIORITY_HIGHEST; + + if (threadHandle == 0) + threadHandle = GetCurrentThread(); + + SetThreadPriority (threadHandle, pri); +} + +void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) throw() +{ + SetThreadAffinityMask (GetCurrentThread(), affinityMask); +} + +static HANDLE sleepEvent = 0; + +void juce_initialiseThreadEvents() throw() +{ + if (sleepEvent == 0) +#ifdef JUCE_DEBUG + sleepEvent = CreateEvent (0, 0, 0, _T("Juce Sleep Event")); +#else + sleepEvent = CreateEvent (0, 0, 0, 0); +#endif +} + +void Thread::yield() throw() +{ + Sleep (0); +} + +void JUCE_CALLTYPE Thread::sleep (const int millisecs) throw() +{ + if (millisecs >= 10) + { + Sleep (millisecs); + } + else + { + jassert (sleepEvent != 0); + + // unlike Sleep() this is guaranteed to return to the current thread after + // the time expires, so we'll use this for short waits, which are more likely + // to need to be accurate + WaitForSingleObject (sleepEvent, millisecs); + } +} + +static int lastProcessPriority = -1; + +// called by WindowDriver because Windows does wierd things to process priority +// when you swap apps, and this forces an update when the app is brought to the front. +void juce_repeatLastProcessPriority() throw() +{ + if (lastProcessPriority >= 0) // (avoid changing this if it's not been explicitly set by the app..) + { + DWORD p; + + switch (lastProcessPriority) + { + case Process::LowPriority: + p = IDLE_PRIORITY_CLASS; + break; + + case Process::NormalPriority: + p = NORMAL_PRIORITY_CLASS; + break; + + case Process::HighPriority: + p = HIGH_PRIORITY_CLASS; + break; + + case Process::RealtimePriority: + p = REALTIME_PRIORITY_CLASS; + break; + + default: + jassertfalse // bad priority value + return; + } + + SetPriorityClass (GetCurrentProcess(), p); + } +} + +void Process::setPriority (ProcessPriority prior) +{ + if (lastProcessPriority != (int) prior) + { + lastProcessPriority = (int) prior; + juce_repeatLastProcessPriority(); + } +} + +bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw() +{ + return IsDebuggerPresent() != FALSE; +} + +bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw() +{ + return juce_isRunningUnderDebugger(); +} + +void Process::raisePrivilege() +{ + jassertfalse // xxx not implemented +} + +void Process::lowerPrivilege() +{ + jassertfalse // xxx not implemented +} + +void Process::terminate() +{ +#if defined (JUCE_DEBUG) && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS + _CrtDumpMemoryLeaks(); +#endif + + // bullet in the head in case there's a problem shutting down.. + ExitProcess (0); +} + +void* PlatformUtilities::loadDynamicLibrary (const String& name) +{ + void* result = 0; + + JUCE_TRY + { + result = (void*) LoadLibrary (name); + } + JUCE_CATCH_ALL + + return result; +} + +void PlatformUtilities::freeDynamicLibrary (void* h) +{ + JUCE_TRY + { + if (h != 0) + FreeLibrary ((HMODULE) h); + } + JUCE_CATCH_ALL +} + +void* PlatformUtilities::getProcedureEntryPoint (void* h, const String& name) +{ + return (h != 0) ? (void*) GetProcAddress ((HMODULE) h, name) + : 0; +} + +InterProcessLock::InterProcessLock (const String& name_) throw() + : internal (0), + name (name_), + reentrancyLevel (0) +{ +} + +InterProcessLock::~InterProcessLock() throw() +{ + exit(); +} + +bool InterProcessLock::enter (const int timeOutMillisecs) throw() +{ + if (reentrancyLevel++ == 0) + { + internal = CreateMutex (0, TRUE, name); + + if (internal != 0 && GetLastError() == ERROR_ALREADY_EXISTS) + { + if (timeOutMillisecs == 0 + || WaitForSingleObject (internal, (timeOutMillisecs < 0) ? INFINITE : timeOutMillisecs) + == WAIT_TIMEOUT) + { + ReleaseMutex (internal); + CloseHandle (internal); + internal = 0; + } + } + } + + return (internal != 0); +} + +void InterProcessLock::exit() throw() +{ + if (--reentrancyLevel == 0 && internal != 0) + { + ReleaseMutex (internal); + CloseHandle (internal); + internal = 0; + } +} + +#endif +/********* End of inlined file: juce_win32_Threads.cpp *********/ + /********* Start of inlined file: juce_win32_Files.cpp *********/ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include - -#ifndef _WIN32_IE - #define _WIN32_IE 0x0400 -#endif -#include +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE #ifndef CSIDL_MYMUSIC #define CSIDL_MYMUSIC 0x000d @@ -229734,12 +239095,6 @@ END_JUCE_NAMESPACE #define CSIDL_MYVIDEO 0x000e #endif -BEGIN_JUCE_NAMESPACE - -#ifdef _MSC_VER - #pragma warning (pop) -#endif - const tchar File::separator = T('\\'); const tchar* File::separatorString = T("\\"); @@ -230369,7 +239724,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 { @@ -230416,20 +239772,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 @@ -230468,18 +239828,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; - if (WaitForMultipleObjects (2, handles, FALSE, timeOutMilliseconds >= 0 ? timeOutMilliseconds - : INFINITE) == WAIT_OBJECT_0) + waitResult = WaitForMultipleObjects (2, handles, FALSE, + timeOutMilliseconds >= 0 ? timeOutMilliseconds + : INFINITE); + + if (waitResult != WAIT_OBJECT_0) + { + CancelIo (intern->pipeH); + WaitForSingleObject (over.hEvent, INFINITE); + } + + if (GetOverlappedResult (intern->pipeH, &over, &numWritten, FALSE)) { - if (GetOverlappedResult (intern->pipeH, &over, &numWritten, FALSE)) - { - bytesWritten = (int) numWritten; - } - else if (GetLastError() == ERROR_BROKEN_PIPE && intern->createdPipe) - { - intern->disconnect(); - } + bytesWritten = (int) numWritten; + } + else if (GetLastError() == ERROR_BROKEN_PIPE && intern->createdPipe) + { + intern->disconnect(); } } @@ -230497,66 +239864,18 @@ void NamedPipe::cancelPendingReads() SetEvent (intern->cancelEvent); } -END_JUCE_NAMESPACE +#endif /********* End of inlined file: juce_win32_Files.cpp *********/ /********* Start of inlined file: juce_win32_Network.cpp *********/ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include -#include -#include -#include - -BEGIN_JUCE_NAMESPACE - -/********* Start of inlined file: juce_win32_DynamicLibraryLoader.h *********/ -#ifndef __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__ -#define __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__ - -#ifndef DOXYGEN - -// use with DynamicLibraryLoader to simplify importing functions -// -// functionName: function to import -// localFunctionName: name you want to use to actually call it (must be different) -// returnType: the return type -// object: the DynamicLibraryLoader to use -// params: list of params (bracketed) -// -#define DynamicLibraryImport(functionName, localFunctionName, returnType, object, params) \ - typedef returnType (WINAPI *type##localFunctionName) params; \ - type##localFunctionName localFunctionName \ - = (type##localFunctionName)object.findProcAddress (#functionName); - -// loads and unloads a DLL automatically -class JUCE_API DynamicLibraryLoader -{ -public: - DynamicLibraryLoader (const String& name); - ~DynamicLibraryLoader(); - - void* findProcAddress (const String& functionName); - -private: - void* libHandle; -}; - -#endif -#endif // __JUCE_WIN32_DYNAMICLIBRARYLOADER_JUCEHEADER__ -/********* End of inlined file: juce_win32_DynamicLibraryLoader.h *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE #ifndef INTERNET_FLAG_NEED_FILE #define INTERNET_FLAG_NEED_FILE 0x00000010 #endif -#ifdef _MSC_VER - #pragma warning (pop) -#endif - bool juce_isOnLine() { DWORD connectionType; @@ -230637,13 +239956,17 @@ void* juce_openInternetFile (const String& url, { const TCHAR* mimeTypes[] = { _T("*/*"), 0 }; + DWORD flags = INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE; + + if (url.startsWithIgnoreCase (T("https:"))) + flags |= INTERNET_FLAG_SECURE; // (this flag only seems necessary if the OS is running IE6 - + // IE7 seems to automatically work out when it's https) + HINTERNET request = HttpOpenRequest (connection, isPost ? _T("POST") : _T("GET"), uc.lpszUrlPath, - 0, 0, mimeTypes, - INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE, - 0); + 0, 0, mimeTypes, flags, 0); if (request != 0) { @@ -230908,108 +240231,13 @@ bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAdd return ok; } -END_JUCE_NAMESPACE +#endif /********* End of inlined file: juce_win32_Network.cpp *********/ -/********* Start of inlined file: juce_win32_Misc.cpp *********/ - -BEGIN_JUCE_NAMESPACE - -#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) - { - if (EmptyClipboard() != 0) - { - const int len = text.length(); - - if (len > 0) - { - HGLOBAL bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, - (len + 1) * sizeof (wchar_t)); - - if (bufH != 0) - { - wchar_t* const data = (wchar_t*) GlobalLock (bufH); - text.copyToBuffer (data, len); - GlobalUnlock (bufH); - - SetClipboardData (CF_UNICODETEXT, bufH); - } - } - } - - CloseClipboard(); - } -} - -const String SystemClipboard::getTextFromClipboard() throw() -{ - String result; - - if (OpenClipboard (0) != 0) - { - HANDLE bufH = GetClipboardData (CF_UNICODETEXT); - - if (bufH != 0) - { - const wchar_t* const data = (const wchar_t*) GlobalLock (bufH); - - if (data != 0) - { - result = String (data, (int) (GlobalSize (bufH) / sizeof (tchar))); - - GlobalUnlock (bufH); - } - } - - CloseClipboard(); - } - - return result; -} - -#endif - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_Misc.cpp *********/ - /********* Start of inlined file: juce_win32_PlatformUtils.cpp *********/ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include - -BEGIN_JUCE_NAMESPACE - -#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 static HKEY findKeyForPath (String name, const bool createForWriting, @@ -231179,2812 +240407,5785 @@ void PlatformUtilities::fpuReset() #endif } -END_JUCE_NAMESPACE +void PlatformUtilities::beep() +{ + MessageBeep (MB_OK); +} + +#endif /********* End of inlined file: juce_win32_PlatformUtils.cpp *********/ -/********* Start of inlined file: juce_win32_SystemStats.cpp *********/ +#if ! JUCE_ONLY_BUILD_CORE_LIBRARY -// Auto-link the other win32 libs that are needed by library calls.. -#if defined (JUCE_DLL_BUILD) && JUCE_MSVC +/********* Start of inlined file: juce_win32_Messaging.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE -/********* Start of inlined file: juce_win32_AutoLinkLibraries.h *********/ -// Auto-links to various win32 libs that are needed by library calls.. -#pragma comment(lib, "kernel32.lib") -#pragma comment(lib, "user32.lib") -#pragma comment(lib, "shell32.lib") -#pragma comment(lib, "gdi32.lib") -#pragma comment(lib, "vfw32.lib") -#pragma comment(lib, "comdlg32.lib") -#pragma comment(lib, "winmm.lib") -#pragma comment(lib, "wininet.lib") -#pragma comment(lib, "ole32.lib") -#pragma comment(lib, "advapi32.lib") -#pragma comment(lib, "ws2_32.lib") -#pragma comment(lib, "comsupp.lib") +static const unsigned int specialId = WM_APP + 0x4400; +static const unsigned int broadcastId = WM_APP + 0x4403; +static const unsigned int specialCallbackId = WM_APP + 0x4402; -#if JUCE_OPENGL - #pragma comment(lib, "OpenGL32.Lib") - #pragma comment(lib, "GlU32.Lib") -#endif +static const TCHAR* const messageWindowName = _T("JUCEWindow"); -#if JUCE_QUICKTIME - #pragma comment (lib, "QTMLClient.lib") -#endif -/********* End of inlined file: juce_win32_AutoLinkLibraries.h *********/ +HWND juce_messageWindowHandle = 0; -#endif +extern long improbableWindowNumber; // defined in windowing.cpp -BEGIN_JUCE_NAMESPACE - -extern void juce_updateMultiMonitorInfo() throw(); -extern void juce_initialiseThreadEvents() throw(); - -void Logger::outputDebugString (const String& text) throw() +static LRESULT CALLBACK juce_MessageWndProc (HWND h, + const UINT message, + const WPARAM wParam, + const LPARAM lParam) throw() { - OutputDebugString (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); -} - -static int64 hiResTicksPerSecond; -static double hiResTicksScaleFactor; - -#if JUCE_USE_INTRINSICS - -// CPU info functions using intrinsics... - -#pragma intrinsic (__cpuid) -#pragma intrinsic (__rdtsc) - -/*static unsigned int getCPUIDWord (int* familyModel = 0, int* extFeatures = 0) throw() -{ - int info [4]; - __cpuid (info, 1); - - if (familyModel != 0) - *familyModel = info [0]; - - if (extFeatures != 0) - *extFeatures = info[1]; - - return info[3]; -}*/ - -const String SystemStats::getCpuVendor() throw() -{ - int info [4]; - __cpuid (info, 0); - - char v [12]; - memcpy (v, info + 1, 4); - memcpy (v + 4, info + 3, 4); - memcpy (v + 8, info + 2, 4); - - return String (v, 12); -} - -#else - -// CPU info functions using old fashioned inline asm... - -/*static juce_noinline unsigned int getCPUIDWord (int* familyModel = 0, int* extFeatures = 0) -{ - unsigned int cpu = 0; - unsigned int ext = 0; - unsigned int family = 0; - - #if JUCE_GCC - unsigned int dummy = 0; - #endif - - #ifndef __MINGW32__ - __try - #endif + JUCE_TRY { - #if JUCE_GCC - __asm__ ("cpuid" : "=a" (family), "=b" (ext), "=c" (dummy),"=d" (cpu) : "a" (1)); - #else - __asm + if (h == juce_messageWindowHandle) { - mov eax, 1 - cpuid - mov cpu, edx - mov family, eax - mov ext, ebx - } + if (message == specialCallbackId) + { + MessageCallbackFunction* const func = (MessageCallbackFunction*) wParam; + return (LRESULT) (*func) ((void*) lParam); + } + else if (message == specialId) + { + // these are trapped early in the dispatch call, but must also be checked + // here in case there are windows modal dialog boxes doing their own + // dispatch loop and not calling our version - #endif - } - #ifndef __MINGW32__ - __except (EXCEPTION_EXECUTE_HANDLER) - { - return 0; - } - #endif + MessageManager::getInstance()->deliverMessage ((void*) lParam); + return 0; + } + else if (message == broadcastId) + { + String* const messageString = (String*) lParam; + MessageManager::getInstance()->deliverBroadcastMessage (*messageString); + delete messageString; + return 0; + } + else if (message == WM_COPYDATA && ((const COPYDATASTRUCT*) lParam)->dwData == broadcastId) + { + const String messageString ((const juce_wchar*) ((const COPYDATASTRUCT*) lParam)->lpData, + ((const COPYDATASTRUCT*) lParam)->cbData / sizeof (juce_wchar)); - if (familyModel != 0) - *familyModel = family; - - if (extFeatures != 0) - *extFeatures = ext; - - return cpu; -}*/ - -static void juce_getCpuVendor (char* const v) -{ - int vendor[4]; - zeromem (vendor, 16); - -#ifdef JUCE_64BIT -#else - #ifndef __MINGW32__ - __try - #endif - { - #if JUCE_GCC - unsigned int dummy = 0; - __asm__ ("cpuid" : "=a" (dummy), "=b" (vendor[0]), "=c" (vendor[2]),"=d" (vendor[1]) : "a" (0)); - #else - __asm - { - mov eax, 0 - cpuid - mov [vendor], ebx - mov [vendor + 4], edx - mov [vendor + 8], ecx - } - #endif - } - #ifndef __MINGW32__ - __except (EXCEPTION_EXECUTE_HANDLER) - { - *v = 0; - } - #endif -#endif - - memcpy (v, vendor, 16); -} - -const String SystemStats::getCpuVendor() throw() -{ - char v [16]; - juce_getCpuVendor (v); - return String (v, 16); -} -#endif - -struct CPUFlags -{ - bool hasMMX : 1; - bool hasSSE : 1; - bool hasSSE2 : 1; - bool has3DNow : 1; -}; - -static CPUFlags cpuFlags; - -bool SystemStats::hasMMX() throw() -{ - return cpuFlags.hasMMX; -} - -bool SystemStats::hasSSE() throw() -{ - return cpuFlags.hasSSE; -} - -bool SystemStats::hasSSE2() throw() -{ - return cpuFlags.hasSSE2; -} - -bool SystemStats::has3DNow() throw() -{ - return cpuFlags.has3DNow; -} - -void SystemStats::initialiseStats() throw() -{ - juce_initialiseThreadEvents(); - - cpuFlags.hasMMX = IsProcessorFeaturePresent (PF_MMX_INSTRUCTIONS_AVAILABLE) != 0; - cpuFlags.hasSSE = IsProcessorFeaturePresent (PF_XMMI_INSTRUCTIONS_AVAILABLE) != 0; - cpuFlags.hasSSE2 = IsProcessorFeaturePresent (PF_XMMI64_INSTRUCTIONS_AVAILABLE) != 0; -#ifdef PF_AMD3D_INSTRUCTIONS_AVAILABLE - cpuFlags.has3DNow = IsProcessorFeaturePresent (PF_AMD3D_INSTRUCTIONS_AVAILABLE) != 0; -#else - cpuFlags.has3DNow = IsProcessorFeaturePresent (PF_3DNOW_INSTRUCTIONS_AVAILABLE) != 0; -#endif - - LARGE_INTEGER f; - QueryPerformanceFrequency (&f); - hiResTicksPerSecond = f.QuadPart; - hiResTicksScaleFactor = 1000.0 / hiResTicksPerSecond; - - String s (SystemStats::getJUCEVersion()); - -#ifdef JUCE_DEBUG - const MMRESULT res = timeBeginPeriod (1); - jassert (res == TIMERR_NOERROR); -#else - timeBeginPeriod (1); -#endif - -#if defined (JUCE_DEBUG) && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS - _CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); -#endif -} - -SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() throw() -{ - OSVERSIONINFO info; - info.dwOSVersionInfoSize = sizeof (info); - GetVersionEx (&info); - - if (info.dwPlatformId == VER_PLATFORM_WIN32_NT) - { - switch (info.dwMajorVersion) - { - case 5: - return (info.dwMinorVersion == 0) ? Win2000 : WinXP; - - case 6: - return WinVista; - - default: - jassertfalse // !! not a supported OS! - break; + PostMessage (juce_messageWindowHandle, broadcastId, 0, (LPARAM) new String (messageString)); + return 0; + } } } - else if (info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) - { - jassert (info.dwMinorVersion != 0); // !! still running on Windows 95?? + JUCE_CATCH_EXCEPTION - return Win98; - } - - return UnknownOS; + return DefWindowProc (h, message, wParam, lParam); } -const String SystemStats::getOperatingSystemName() throw() +bool juce_dispatchNextMessageOnSystemQueue (const bool returnIfNoPendingMessages) { - const char* name = "Unknown OS"; + MSG m; - switch (getOperatingSystemType()) + if (returnIfNoPendingMessages && ! PeekMessage (&m, (HWND) 0, 0, 0, 0)) + return false; + + if (GetMessage (&m, (HWND) 0, 0, 0) > 0) { - case WinVista: - name = "Windows Vista"; - break; + if (m.message == specialId + && m.hwnd == juce_messageWindowHandle) + { + MessageManager::getInstance()->deliverMessage ((void*) m.lParam); + } + else + { + if (GetWindowLong (m.hwnd, GWLP_USERDATA) != improbableWindowNumber + && (m.message == WM_LBUTTONDOWN || m.message == WM_RBUTTONDOWN)) + { + // if it's someone else's window being clicked on, and the focus is + // currently on a juce window, pass the kb focus over.. + HWND currentFocus = GetFocus(); - case WinXP: - name = "Windows XP"; - break; + if (currentFocus == 0 || GetWindowLong (currentFocus, GWLP_USERDATA) == improbableWindowNumber) + SetFocus (m.hwnd); + } - case Win2000: - name = "Windows 2000"; - break; - - case Win98: - name = "Windows 98"; - break; - - default: - jassertfalse // !! new type of OS? - break; + TranslateMessage (&m); + DispatchMessage (&m); + } } - return name; -} - -bool SystemStats::isOperatingSystem64Bit() throw() -{ -#ifdef _WIN64 return true; -#else - typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); - - LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress (GetModuleHandle (L"kernel32"), "IsWow64Process"); - - BOOL isWow64 = FALSE; - - return (fnIsWow64Process != 0) - && fnIsWow64Process (GetCurrentProcess(), &isWow64) - && (isWow64 != FALSE); -#endif } -int SystemStats::getMemorySizeInMegabytes() throw() +bool juce_postMessageToSystemQueue (void* message) { - MEMORYSTATUS mem; - GlobalMemoryStatus (&mem); - return (int) (mem.dwTotalPhys / (1024 * 1024)) + 1; + return PostMessage (juce_messageWindowHandle, specialId, 0, (LPARAM) message) != 0; } -int SystemStats::getNumCpus() throw() +void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback, + void* userData) { - SYSTEM_INFO systemInfo; - GetSystemInfo (&systemInfo); - - return systemInfo.dwNumberOfProcessors; -} - -uint32 juce_millisecondsSinceStartup() throw() -{ - return (uint32) GetTickCount(); -} - -int64 Time::getHighResolutionTicks() throw() -{ - LARGE_INTEGER ticks; - QueryPerformanceCounter (&ticks); - - const int64 mainCounterAsHiResTicks = (GetTickCount() * hiResTicksPerSecond) / 1000; - const int64 newOffset = mainCounterAsHiResTicks - ticks.QuadPart; - - // fix for a very obscure PCI hardware bug that can make the counter - // sometimes jump forwards by a few seconds.. - static int64 hiResTicksOffset = 0; - const int64 offsetDrift = abs64 (newOffset - hiResTicksOffset); - - if (offsetDrift > (hiResTicksPerSecond >> 1)) - hiResTicksOffset = newOffset; - - return ticks.QuadPart + hiResTicksOffset; -} - -double Time::getMillisecondCounterHiRes() throw() -{ - return getHighResolutionTicks() * hiResTicksScaleFactor; -} - -int64 Time::getHighResolutionTicksPerSecond() throw() -{ - return hiResTicksPerSecond; -} - -int64 SystemStats::getClockCycleCounter() throw() -{ -#if JUCE_USE_INTRINSICS - // MS intrinsics version... - return __rdtsc(); - -#elif JUCE_GCC - // GNU inline asm version... - unsigned int hi = 0, lo = 0; - - __asm__ __volatile__ ( - "xor %%eax, %%eax \n\ - xor %%edx, %%edx \n\ - rdtsc \n\ - movl %%eax, %[lo] \n\ - movl %%edx, %[hi]" - : - : [hi] "m" (hi), - [lo] "m" (lo) - : "cc", "eax", "ebx", "ecx", "edx", "memory"); - - return (int64) ((((uint64) hi) << 32) | lo); -#else - // MSVC inline asm version... - unsigned int hi = 0, lo = 0; - - __asm + if (MessageManager::getInstance()->isThisTheMessageThread()) { - xor eax, eax - xor edx, edx - rdtsc - mov lo, eax - mov hi, edx - } - - return (int64) ((((uint64) hi) << 32) | lo); -#endif -} - -int SystemStats::getCpuSpeedInMegaherz() throw() -{ - const int64 cycles = SystemStats::getClockCycleCounter(); - const uint32 millis = Time::getMillisecondCounter(); - int lastResult = 0; - - for (;;) - { - int n = 1000000; - while (--n > 0) {} - - const uint32 millisElapsed = Time::getMillisecondCounter() - millis; - const int64 cyclesNow = SystemStats::getClockCycleCounter(); - - if (millisElapsed > 80) - { - const int newResult = (int) (((cyclesNow - cycles) / millisElapsed) / 1000); - - if (millisElapsed > 500 || (lastResult == newResult && newResult > 100)) - return newResult; - - lastResult = newResult; - } - } -} - -bool Time::setSystemTimeToThisTime() const throw() -{ - SYSTEMTIME st; - - st.wDayOfWeek = 0; - st.wYear = (WORD) getYear(); - st.wMonth = (WORD) (getMonth() + 1); - st.wDay = (WORD) getDayOfMonth(); - st.wHour = (WORD) getHours(); - st.wMinute = (WORD) getMinutes(); - st.wSecond = (WORD) getSeconds(); - st.wMilliseconds = (WORD) (millisSinceEpoch % 1000); - - // do this twice because of daylight saving conversion problems - the - // first one sets it up, the second one kicks it in. - return SetLocalTime (&st) != 0 - && SetLocalTime (&st) != 0; -} - -int SystemStats::getPageSize() throw() -{ - SYSTEM_INFO systemInfo; - GetSystemInfo (&systemInfo); - - return systemInfo.dwPageSize; -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_SystemStats.cpp *********/ - -/********* Start of inlined file: juce_win32_Threads.cpp *********/ - -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) - #include -#endif - -#include - -BEGIN_JUCE_NAMESPACE - -#if ! JUCE_ONLY_BUILD_CORE_LIBRARY - extern HWND juce_messageWindowHandle; -#endif - -#ifdef _MSC_VER - #pragma warning (pop) -#endif - -CriticalSection::CriticalSection() throw() -{ - // (just to check the MS haven't changed this structure and broken things...) -#if _MSC_VER >= 1400 - static_jassert (sizeof (CRITICAL_SECTION) <= sizeof (internal)); -#else - static_jassert (sizeof (CRITICAL_SECTION) <= 24); -#endif - - InitializeCriticalSection ((CRITICAL_SECTION*) internal); -} - -CriticalSection::~CriticalSection() throw() -{ - DeleteCriticalSection ((CRITICAL_SECTION*) internal); -} - -void CriticalSection::enter() const throw() -{ - EnterCriticalSection ((CRITICAL_SECTION*) internal); -} - -bool CriticalSection::tryEnter() const throw() -{ - return TryEnterCriticalSection ((CRITICAL_SECTION*) internal) != FALSE; -} - -void CriticalSection::exit() const throw() -{ - LeaveCriticalSection ((CRITICAL_SECTION*) internal); -} - -WaitableEvent::WaitableEvent() throw() - : internal (CreateEvent (0, FALSE, FALSE, 0)) -{ -} - -WaitableEvent::~WaitableEvent() throw() -{ - CloseHandle (internal); -} - -bool WaitableEvent::wait (const int timeOutMillisecs) const throw() -{ - return WaitForSingleObject (internal, timeOutMillisecs) == WAIT_OBJECT_0; -} - -void WaitableEvent::signal() const throw() -{ - SetEvent (internal); -} - -void WaitableEvent::reset() const throw() -{ - ResetEvent (internal); -} - -void JUCE_API juce_threadEntryPoint (void*); - -static unsigned int __stdcall threadEntryProc (void* userData) throw() -{ -#if ! JUCE_ONLY_BUILD_CORE_LIBRARY - AttachThreadInput (GetWindowThreadProcessId (juce_messageWindowHandle, 0), - GetCurrentThreadId(), TRUE); -#endif - - juce_threadEntryPoint (userData); - - _endthreadex(0); - return 0; -} - -void juce_CloseThreadHandle (void* handle) throw() -{ - CloseHandle ((HANDLE) handle); -} - -void* juce_createThread (void* userData) throw() -{ - unsigned int threadId; - - return (void*) _beginthreadex (0, 0, - &threadEntryProc, - userData, - 0, &threadId); -} - -void juce_killThread (void* handle) throw() -{ - if (handle != 0) - { -#ifdef JUCE_DEBUG - OutputDebugString (_T("** Warning - Forced thread termination **\n")); -#endif - TerminateThread (handle, 0); - } -} - -void juce_setCurrentThreadName (const String& name) throw() -{ -#if defined (JUCE_DEBUG) && JUCE_MSVC - struct - { - DWORD dwType; - LPCSTR szName; - DWORD dwThreadID; - DWORD dwFlags; - } info; - - info.dwType = 0x1000; - info.szName = name; - info.dwThreadID = GetCurrentThreadId(); - info.dwFlags = 0; - - #define MS_VC_EXCEPTION 0x406d1388 - - __try - { - RaiseException (MS_VC_EXCEPTION, 0, sizeof (info) / sizeof (ULONG_PTR), (ULONG_PTR*) &info); - } - __except (EXCEPTION_CONTINUE_EXECUTION) - {} -#else - (void) name; -#endif -} - -int Thread::getCurrentThreadId() throw() -{ - return (int) GetCurrentThreadId(); -} - -// priority 1 to 10 where 5=normal, 1=low -void juce_setThreadPriority (void* threadHandle, int priority) throw() -{ - int pri = THREAD_PRIORITY_TIME_CRITICAL; - - if (priority < 1) - pri = THREAD_PRIORITY_IDLE; - else if (priority < 2) - pri = THREAD_PRIORITY_LOWEST; - else if (priority < 5) - pri = THREAD_PRIORITY_BELOW_NORMAL; - else if (priority < 7) - pri = THREAD_PRIORITY_NORMAL; - else if (priority < 9) - pri = THREAD_PRIORITY_ABOVE_NORMAL; - else if (priority < 10) - pri = THREAD_PRIORITY_HIGHEST; - - if (threadHandle == 0) - threadHandle = GetCurrentThread(); - - SetThreadPriority (threadHandle, pri); -} - -void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask) throw() -{ - SetThreadAffinityMask (GetCurrentThread(), affinityMask); -} - -static HANDLE sleepEvent = 0; - -void juce_initialiseThreadEvents() throw() -{ - if (sleepEvent == 0) -#ifdef JUCE_DEBUG - sleepEvent = CreateEvent (0, 0, 0, _T("Juce Sleep Event")); -#else - sleepEvent = CreateEvent (0, 0, 0, 0); -#endif -} - -void Thread::yield() throw() -{ - Sleep (0); -} - -void JUCE_CALLTYPE Thread::sleep (const int millisecs) throw() -{ - if (millisecs >= 10) - { - Sleep (millisecs); + return (*callback) (userData); } else { - jassert (sleepEvent != 0); + // If a thread has a MessageManagerLock and then tries to call this method, it'll + // deadlock because the message manager is blocked from running, and can't + // call your function.. + jassert (! MessageManager::getInstance()->currentThreadHasLockedMessageManager()); - // unlike Sleep() this is guaranteed to return to the current thread after - // the time expires, so we'll use this for short waits, which are more likely - // to need to be accurate - WaitForSingleObject (sleepEvent, millisecs); + return (void*) SendMessage (juce_messageWindowHandle, + specialCallbackId, + (WPARAM) callback, + (LPARAM) userData); } } -static int lastProcessPriority = -1; - -// called by WindowDriver because Windows does wierd things to process priority -// when you swap apps, and this forces an update when the app is brought to the front. -void juce_repeatLastProcessPriority() throw() +static BOOL CALLBACK BroadcastEnumWindowProc (HWND hwnd, LPARAM lParam) { - if (lastProcessPriority >= 0) // (avoid changing this if it's not been explicitly set by the app..) - { - DWORD p; + if (hwnd != juce_messageWindowHandle) + (reinterpret_cast (lParam))->add ((void*) hwnd); - switch (lastProcessPriority) + return TRUE; +} + +void MessageManager::broadcastMessage (const String& value) throw() +{ + VoidArray windows; + EnumWindows (&BroadcastEnumWindowProc, (LPARAM) &windows); + + const String localCopy (value); + + COPYDATASTRUCT data; + data.dwData = broadcastId; + data.cbData = (localCopy.length() + 1) * sizeof (juce_wchar); + data.lpData = (void*) (const juce_wchar*) localCopy; + + for (int i = windows.size(); --i >= 0;) + { + HWND hwnd = (HWND) windows.getUnchecked(i); + + TCHAR windowName [64]; // no need to read longer strings than this + GetWindowText (hwnd, windowName, 64); + windowName [63] = 0; + + if (String (windowName) == String (messageWindowName)) { - case Process::LowPriority: - p = IDLE_PRIORITY_CLASS; - break; - - case Process::NormalPriority: - p = NORMAL_PRIORITY_CLASS; - break; - - case Process::HighPriority: - p = HIGH_PRIORITY_CLASS; - break; - - case Process::RealtimePriority: - p = REALTIME_PRIORITY_CLASS; - break; - - default: - jassertfalse // bad priority value - return; + DWORD_PTR result; + SendMessageTimeout (hwnd, WM_COPYDATA, + (WPARAM) juce_messageWindowHandle, + (LPARAM) &data, + SMTO_BLOCK | SMTO_ABORTIFHUNG, + 8000, + &result); } - - SetPriorityClass (GetCurrentProcess(), p); } } -void Process::setPriority (ProcessPriority prior) +static const String getMessageWindowClassName() { - if (lastProcessPriority != (int) prior) - { - lastProcessPriority = (int) prior; - juce_repeatLastProcessPriority(); - } + // this name has to be different for each app/dll instance because otherwise + // poor old Win32 can get a bit confused (even despite it not being a process-global + // window class). + + static int number = 0; + if (number == 0) + number = 0x7fffffff & (int) Time::getHighResolutionTicks(); + + return T("JUCEcs_") + String (number); } -bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw() +void MessageManager::doPlatformSpecificInitialisation() { - return IsDebuggerPresent() != FALSE; + OleInitialize (0); + + const String className (getMessageWindowClassName()); + + HMODULE hmod = (HMODULE) PlatformUtilities::getCurrentModuleInstanceHandle(); + + WNDCLASSEX wc; + zerostruct (wc); + + wc.cbSize = sizeof (wc); + wc.lpfnWndProc = (WNDPROC) juce_MessageWndProc; + wc.cbWndExtra = 4; + wc.hInstance = hmod; + wc.lpszClassName = className; + + RegisterClassEx (&wc); + + juce_messageWindowHandle = CreateWindow (wc.lpszClassName, + messageWindowName, + 0, 0, 0, 0, 0, 0, 0, + hmod, 0); } -bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw() +void MessageManager::doPlatformSpecificShutdown() { - return juce_isRunningUnderDebugger(); + DestroyWindow (juce_messageWindowHandle); + UnregisterClass (getMessageWindowClassName(), 0); + OleUninitialize(); } -void Process::raisePrivilege() -{ - jassertfalse // xxx not implemented -} +#endif +/********* End of inlined file: juce_win32_Messaging.cpp *********/ -void Process::lowerPrivilege() -{ - jassertfalse // xxx not implemented -} +/********* Start of inlined file: juce_win32_Windowing.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE -void Process::terminate() -{ -#if defined (JUCE_DEBUG) && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS - _CrtDumpMemoryLeaks(); +#undef GetSystemMetrics // multimon overrides this for some reason and causes a mess.. + +// these are in the windows SDK, but need to be repeated here for GCC.. +#ifndef GET_APPCOMMAND_LPARAM + #define FAPPCOMMAND_MASK 0xF000 + #define GET_APPCOMMAND_LPARAM(lParam) ((short) (HIWORD (lParam) & ~FAPPCOMMAND_MASK)) + #define APPCOMMAND_MEDIA_NEXTTRACK 11 + #define APPCOMMAND_MEDIA_PREVIOUSTRACK 12 + #define APPCOMMAND_MEDIA_STOP 13 + #define APPCOMMAND_MEDIA_PLAY_PAUSE 14 + #define WM_APPCOMMAND 0x0319 #endif - // bullet in the head in case there's a problem shutting down.. - ExitProcess (0); -} +extern void juce_repeatLastProcessPriority() throw(); // in juce_win32_Threads.cpp +extern void juce_CheckCurrentlyFocusedTopLevelWindow() throw(); // in juce_TopLevelWindow.cpp +extern bool juce_IsRunningInWine() throw(); -void* Process::loadDynamicLibrary (const String& name) +#ifndef ULW_ALPHA + #define ULW_ALPHA 0x00000002 +#endif + +#ifndef AC_SRC_ALPHA + #define AC_SRC_ALPHA 0x01 +#endif + +#define DEBUG_REPAINT_TIMES 0 + +static HPALETTE palette = 0; +static bool createPaletteIfNeeded = true; +static bool shouldDeactivateTitleBar = true; +static bool screenSaverAllowed = true; + +static HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) throw(); +#define WM_TRAYNOTIFY WM_USER + 100 + +using ::abs; + +typedef BOOL (WINAPI* UpdateLayeredWinFunc) (HWND, HDC, POINT*, SIZE*, HDC, POINT*, COLORREF, BLENDFUNCTION*, DWORD); +static UpdateLayeredWinFunc updateLayeredWindow = 0; + +bool Desktop::canUseSemiTransparentWindows() throw() { - void* result = 0; - - JUCE_TRY + if (updateLayeredWindow == 0) { - result = (void*) LoadLibrary (name); - } - JUCE_CATCH_ALL - - return result; -} - -void Process::freeDynamicLibrary (void* h) -{ - JUCE_TRY - { - if (h != 0) - FreeLibrary ((HMODULE) h); - } - JUCE_CATCH_ALL -} - -void* Process::getProcedureEntryPoint (void* h, const String& name) -{ - return (h != 0) ? (void*) GetProcAddress ((HMODULE) h, name) - : 0; -} - -InterProcessLock::InterProcessLock (const String& name_) throw() - : internal (0), - name (name_), - reentrancyLevel (0) -{ -} - -InterProcessLock::~InterProcessLock() throw() -{ - exit(); -} - -bool InterProcessLock::enter (const int timeOutMillisecs) throw() -{ - if (reentrancyLevel++ == 0) - { - internal = CreateMutex (0, TRUE, name); - - if (internal != 0 && GetLastError() == ERROR_ALREADY_EXISTS) + if (! juce_IsRunningInWine()) { - if (timeOutMillisecs == 0 - || WaitForSingleObject (internal, (timeOutMillisecs < 0) ? INFINITE : timeOutMillisecs) - == WAIT_TIMEOUT) - { - ReleaseMutex (internal); - CloseHandle (internal); - internal = 0; - } + HMODULE user32Mod = GetModuleHandle (_T("user32.dll")); + updateLayeredWindow = (UpdateLayeredWinFunc) GetProcAddress (user32Mod, "UpdateLayeredWindow"); } } - return (internal != 0); + return updateLayeredWindow != 0; } -void InterProcessLock::exit() throw() -{ - if (--reentrancyLevel == 0 && internal != 0) - { - ReleaseMutex (internal); - CloseHandle (internal); - internal = 0; - } -} +#undef DefWindowProc +#define DefWindowProc DefWindowProcW -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_Threads.cpp *********/ +const int extendedKeyModifier = 0x10000; -/********* Start of inlined file: juce_win32_DynamicLibraryLoader.cpp *********/ +const int KeyPress::spaceKey = VK_SPACE; +const int KeyPress::returnKey = VK_RETURN; +const int KeyPress::escapeKey = VK_ESCAPE; +const int KeyPress::backspaceKey = VK_BACK; +const int KeyPress::deleteKey = VK_DELETE | extendedKeyModifier; +const int KeyPress::insertKey = VK_INSERT | extendedKeyModifier; +const int KeyPress::tabKey = VK_TAB; +const int KeyPress::leftKey = VK_LEFT | extendedKeyModifier; +const int KeyPress::rightKey = VK_RIGHT | extendedKeyModifier; +const int KeyPress::upKey = VK_UP | extendedKeyModifier; +const int KeyPress::downKey = VK_DOWN | extendedKeyModifier; +const int KeyPress::homeKey = VK_HOME | extendedKeyModifier; +const int KeyPress::endKey = VK_END | extendedKeyModifier; +const int KeyPress::pageUpKey = VK_PRIOR | extendedKeyModifier; +const int KeyPress::pageDownKey = VK_NEXT | extendedKeyModifier; +const int KeyPress::F1Key = VK_F1 | extendedKeyModifier; +const int KeyPress::F2Key = VK_F2 | extendedKeyModifier; +const int KeyPress::F3Key = VK_F3 | extendedKeyModifier; +const int KeyPress::F4Key = VK_F4 | extendedKeyModifier; +const int KeyPress::F5Key = VK_F5 | extendedKeyModifier; +const int KeyPress::F6Key = VK_F6 | extendedKeyModifier; +const int KeyPress::F7Key = VK_F7 | extendedKeyModifier; +const int KeyPress::F8Key = VK_F8 | extendedKeyModifier; +const int KeyPress::F9Key = VK_F9 | extendedKeyModifier; +const int KeyPress::F10Key = VK_F10 | extendedKeyModifier; +const int KeyPress::F11Key = VK_F11 | extendedKeyModifier; +const int KeyPress::F12Key = VK_F12 | extendedKeyModifier; +const int KeyPress::F13Key = VK_F13 | extendedKeyModifier; +const int KeyPress::F14Key = VK_F14 | extendedKeyModifier; +const int KeyPress::F15Key = VK_F15 | extendedKeyModifier; +const int KeyPress::F16Key = VK_F16 | extendedKeyModifier; +const int KeyPress::numberPad0 = VK_NUMPAD0 | extendedKeyModifier; +const int KeyPress::numberPad1 = VK_NUMPAD1 | extendedKeyModifier; +const int KeyPress::numberPad2 = VK_NUMPAD2 | extendedKeyModifier; +const int KeyPress::numberPad3 = VK_NUMPAD3 | extendedKeyModifier; +const int KeyPress::numberPad4 = VK_NUMPAD4 | extendedKeyModifier; +const int KeyPress::numberPad5 = VK_NUMPAD5 | extendedKeyModifier; +const int KeyPress::numberPad6 = VK_NUMPAD6 | extendedKeyModifier; +const int KeyPress::numberPad7 = VK_NUMPAD7 | extendedKeyModifier; +const int KeyPress::numberPad8 = VK_NUMPAD8 | extendedKeyModifier; +const int KeyPress::numberPad9 = VK_NUMPAD9 | extendedKeyModifier; +const int KeyPress::numberPadAdd = VK_ADD | extendedKeyModifier; +const int KeyPress::numberPadSubtract = VK_SUBTRACT | extendedKeyModifier; +const int KeyPress::numberPadMultiply = VK_MULTIPLY | extendedKeyModifier; +const int KeyPress::numberPadDivide = VK_DIVIDE | extendedKeyModifier; +const int KeyPress::numberPadSeparator = VK_SEPARATOR | extendedKeyModifier; +const int KeyPress::numberPadDecimalPoint = VK_DECIMAL | extendedKeyModifier; +const int KeyPress::numberPadEquals = 0x92 /*VK_OEM_NEC_EQUAL*/ | extendedKeyModifier; +const int KeyPress::numberPadDelete = VK_DELETE | extendedKeyModifier; +const int KeyPress::playKey = 0x30000; +const int KeyPress::stopKey = 0x30001; +const int KeyPress::fastForwardKey = 0x30002; +const int KeyPress::rewindKey = 0x30003; -BEGIN_JUCE_NAMESPACE - -DynamicLibraryLoader::DynamicLibraryLoader (const String& name) -{ - libHandle = LoadLibrary (name); -} - -DynamicLibraryLoader::~DynamicLibraryLoader() -{ - FreeLibrary ((HMODULE) libHandle); -} - -void* DynamicLibraryLoader::findProcAddress (const String& functionName) -{ - return (void*) GetProcAddress ((HMODULE) libHandle, functionName); -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_DynamicLibraryLoader.cpp *********/ - -#if ! JUCE_ONLY_BUILD_CORE_LIBRARY - -/********* Start of inlined file: juce_win32_ASIO.cpp *********/ - -#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 - -BEGIN_JUCE_NAMESPACE - -// #define ASIO_DEBUGGING - -#ifdef ASIO_DEBUGGING - #define log(a) { Logger::writeToLog (a); DBG (a) } -#else - #define log(a) {} -#endif - -#ifdef ASIO_DEBUGGING -static void logError (const String& context, long error) -{ - String err ("unknown error"); - - if (error == ASE_NotPresent) - err = "Not Present"; - else if (error == ASE_HWMalfunction) - err = "Hardware Malfunction"; - else if (error == ASE_InvalidParameter) - err = "Invalid Parameter"; - else if (error == ASE_InvalidMode) - err = "Invalid Mode"; - else if (error == ASE_SPNotAdvancing) - err = "Sample position not advancing"; - else if (error == ASE_NoClock) - err = "No Clock"; - else if (error == ASE_NoMemory) - err = "Out of memory"; - - log (T("!!error: ") + context + T(" - ") + err); -} -#else - #define logError(a, b) {} -#endif - -class ASIOAudioIODevice; -static ASIOAudioIODevice* volatile currentASIODev[3] = { 0, 0, 0 }; - -static const int maxASIOChannels = 160; - -class JUCE_API ASIOAudioIODevice : public AudioIODevice, - private Timer +class WindowsBitmapImage : public Image { public: - Component ourWindow; - ASIOAudioIODevice (const String& name_, const CLSID classId_, const int slotNumber) - : AudioIODevice (name_, T("ASIO")), - asioObject (0), - classId (classId_), - currentBitDepth (16), - currentSampleRate (0), - tempBuffer (0), - isOpen_ (false), - isStarted (false), - postOutput (true), - insideControlPanelModalLoop (false), - shouldUsePreferredSize (false) + HBITMAP hBitmap; + BITMAPV4HEADER bitmapInfo; + HDC hdc; + unsigned char* bitmapData; + + WindowsBitmapImage (const PixelFormat format_, + const int w, const int h, const bool clearImage) + : Image (format_, w, h) { - name = name_; + jassert (format_ == RGB || format_ == ARGB); - ourWindow.addToDesktop (0); - windowHandle = ourWindow.getWindowHandle(); + pixelStride = (format_ == RGB) ? 3 : 4; - jassert (currentASIODev [slotNumber] == 0); - currentASIODev [slotNumber] = this; + zerostruct (bitmapInfo); + bitmapInfo.bV4Size = sizeof (BITMAPV4HEADER); + bitmapInfo.bV4Width = w; + bitmapInfo.bV4Height = h; + bitmapInfo.bV4Planes = 1; + bitmapInfo.bV4CSType = 1; + bitmapInfo.bV4BitCount = (unsigned short) (pixelStride * 8); - openDevice(); - } - - ~ASIOAudioIODevice() - { - for (int i = 0; i < numElementsInArray (currentASIODev); ++i) - if (currentASIODev[i] == this) - currentASIODev[i] = 0; - - close(); - log ("ASIO - exiting"); - removeCurrentDriver(); - - juce_free (tempBuffer); - } - - void updateSampleRates() - { - // find a list of sample rates.. - const double possibleSampleRates[] = { 44100.0, 48000.0, 88200.0, 96000.0, 176400.0, 192000.0 }; - sampleRates.clear(); - - if (asioObject != 0) + if (format_ == ARGB) { - for (int index = 0; index < numElementsInArray (possibleSampleRates); ++index) - { - const long err = asioObject->canSampleRate (possibleSampleRates[index]); + bitmapInfo.bV4AlphaMask = 0xff000000; + bitmapInfo.bV4RedMask = 0xff0000; + bitmapInfo.bV4GreenMask = 0xff00; + bitmapInfo.bV4BlueMask = 0xff; + bitmapInfo.bV4V4Compression = BI_BITFIELDS; + } + else + { + bitmapInfo.bV4V4Compression = BI_RGB; + } - if (err == 0) + lineStride = -((w * pixelStride + 3) & ~3); + + HDC dc = GetDC (0); + hdc = CreateCompatibleDC (dc); + ReleaseDC (0, dc); + + SetMapMode (hdc, MM_TEXT); + + hBitmap = CreateDIBSection (hdc, + (BITMAPINFO*) &(bitmapInfo), + DIB_RGB_COLORS, + (void**) &bitmapData, + 0, 0); + + SelectObject (hdc, hBitmap); + + if (format_ == ARGB && clearImage) + zeromem (bitmapData, abs (h * lineStride)); + + imageData = bitmapData - (lineStride * (h - 1)); + } + + ~WindowsBitmapImage() + { + DeleteDC (hdc); + DeleteObject (hBitmap); + imageData = 0; // to stop the base class freeing this + } + + void blitToWindow (HWND hwnd, HDC dc, const bool transparent, + const int x, const int y, + const RectangleList& maskedRegion) throw() + { + static HDRAWDIB hdd = 0; + static bool needToCreateDrawDib = true; + + if (needToCreateDrawDib) + { + needToCreateDrawDib = false; + + HDC dc = GetDC (0); + const int n = GetDeviceCaps (dc, BITSPIXEL); + ReleaseDC (0, dc); + + // only open if we're not palettised + if (n > 8) + hdd = DrawDibOpen(); + } + + if (createPaletteIfNeeded) + { + HDC dc = GetDC (0); + const int n = GetDeviceCaps (dc, BITSPIXEL); + ReleaseDC (0, dc); + + if (n <= 8) + palette = CreateHalftonePalette (dc); + + createPaletteIfNeeded = false; + } + + if (palette != 0) + { + SelectPalette (dc, palette, FALSE); + RealizePalette (dc); + SetStretchBltMode (dc, HALFTONE); + } + + SetMapMode (dc, MM_TEXT); + + if (transparent) + { + POINT p, pos; + SIZE size; + + RECT windowBounds; + GetWindowRect (hwnd, &windowBounds); + + p.x = -x; + p.y = -y; + pos.x = windowBounds.left; + pos.y = windowBounds.top; + size.cx = windowBounds.right - windowBounds.left; + size.cy = windowBounds.bottom - windowBounds.top; + + BLENDFUNCTION bf; + bf.AlphaFormat = AC_SRC_ALPHA; + bf.BlendFlags = 0; + bf.BlendOp = AC_SRC_OVER; + bf.SourceConstantAlpha = 0xff; + + if (! maskedRegion.isEmpty()) + { + for (RectangleList::Iterator i (maskedRegion); i.next();) { - sampleRates.add ((int) possibleSampleRates[index]); - log (T("rate: ") + String ((int) possibleSampleRates[index])); - } - else if (err != ASE_NoClock) - { - logError (T("CanSampleRate"), err); + const Rectangle& r = *i.getRectangle(); + ExcludeClipRect (hdc, r.getX(), r.getY(), r.getRight(), r.getBottom()); } } - if (sampleRates.size() == 0) - { - double cr = 0; - const long err = asioObject->getSampleRate (&cr); - log (T("No sample rates supported - current rate: ") + String ((int) cr)); + updateLayeredWindow (hwnd, 0, &pos, &size, hdc, &p, 0, &bf, ULW_ALPHA); + } + else + { + int savedDC = 0; - if (err == 0) - sampleRates.add ((int) cr); + if (! maskedRegion.isEmpty()) + { + savedDC = SaveDC (dc); + + for (RectangleList::Iterator i (maskedRegion); i.next();) + { + const Rectangle& r = *i.getRectangle(); + ExcludeClipRect (dc, r.getX(), r.getY(), r.getRight(), r.getBottom()); + } } - } - } - const StringArray getOutputChannelNames() - { - return outputChannelNames; - } + const int w = getWidth(); + const int h = getHeight(); - const StringArray getInputChannelNames() - { - return inputChannelNames; - } - - int getNumSampleRates() - { - return sampleRates.size(); - } - - double getSampleRate (int index) - { - return sampleRates [index]; - } - - int getNumBufferSizesAvailable() - { - return bufferSizes.size(); - } - - int getBufferSizeSamples (int index) - { - return bufferSizes [index]; - } - - int getDefaultBufferSize() - { - return preferredSize; - } - - const String open (const BitArray& inputChannels, - const BitArray& outputChannels, - double sr, - int bufferSizeSamples) - { - close(); - currentCallback = 0; - - if (bufferSizeSamples <= 0) - shouldUsePreferredSize = true; - - if (asioObject == 0 || ! isASIOOpen) - { - log ("Warning: device not open"); - const String err (openDevice()); - - if (asioObject == 0 || ! isASIOOpen) - return err; - } - - isStarted = false; - bufferIndex = -1; - long err = 0; - - long newPreferredSize = 0; - - // if the preferred size has just changed, assume it's a control panel thing and use it as the new value. - minSize = 0; - maxSize = 0; - newPreferredSize = 0; - granularity = 0; - - if (asioObject->getBufferSize (&minSize, &maxSize, &newPreferredSize, &granularity) == 0) - { - if (preferredSize != 0 && newPreferredSize != 0 && newPreferredSize != preferredSize) - shouldUsePreferredSize = true; - - preferredSize = newPreferredSize; - } - - // unfortunate workaround for certain manufacturers whose drivers crash horribly if you make - // dynamic changes to the buffer size... - shouldUsePreferredSize = shouldUsePreferredSize - || getName().containsIgnoreCase (T("Digidesign")); - - if (shouldUsePreferredSize) - { - log ("Using preferred size for buffer.."); - - if ((err = asioObject->getBufferSize (&minSize, &maxSize, &preferredSize, &granularity)) == 0) + if (hdd == 0) { - bufferSizeSamples = preferredSize; + StretchDIBits (dc, + x, y, w, h, + 0, 0, w, h, + bitmapData, (const BITMAPINFO*) &bitmapInfo, + DIB_RGB_COLORS, SRCCOPY); } else { - bufferSizeSamples = 1024; - logError ("GetBufferSize1", err); + DrawDibDraw (hdd, dc, x, y, -1, -1, + (BITMAPINFOHEADER*) &bitmapInfo, bitmapData, + 0, 0, w, h, 0); } - shouldUsePreferredSize = false; + if (! maskedRegion.isEmpty()) + RestoreDC (dc, savedDC); } + } - int sampleRate = roundDoubleToInt (sr); - currentSampleRate = sampleRate; - currentBlockSizeSamples = bufferSizeSamples; - currentChansOut.clear(); - currentChansIn.clear(); - zeromem (inBuffers, sizeof (inBuffers)); - zeromem (outBuffers, sizeof (outBuffers)); + juce_UseDebuggingNewOperator - updateSampleRates(); +private: + WindowsBitmapImage (const WindowsBitmapImage&); + const WindowsBitmapImage& operator= (const WindowsBitmapImage&); +}; - if (sampleRate == 0 || (sampleRates.size() > 0 && ! sampleRates.contains (sampleRate))) - sampleRate = sampleRates[0]; +long improbableWindowNumber = 0xf965aa01; // also referenced by messaging.cpp - jassert (sampleRate != 0); - if (sampleRate == 0) - sampleRate = 44100; +static int currentModifiers = 0; +static int modifiersAtLastCallback = 0; - long numSources = 32; - ASIOClockSource clocks[32]; - zeromem (clocks, sizeof (clocks)); - asioObject->getClockSources (clocks, &numSources); - bool isSourceSet = false; +static void updateKeyModifiers() throw() +{ + currentModifiers &= ~(ModifierKeys::shiftModifier + | ModifierKeys::ctrlModifier + | ModifierKeys::altModifier); - // careful not to remove this loop because it does more than just logging! - int i; - for (i = 0; i < numSources; ++i) + if ((GetKeyState (VK_SHIFT) & 0x8000) != 0) + currentModifiers |= ModifierKeys::shiftModifier; + + if ((GetKeyState (VK_CONTROL) & 0x8000) != 0) + currentModifiers |= ModifierKeys::ctrlModifier; + + if ((GetKeyState (VK_MENU) & 0x8000) != 0) + currentModifiers |= ModifierKeys::altModifier; + + if ((GetKeyState (VK_RMENU) & 0x8000) != 0) + currentModifiers &= ~(ModifierKeys::ctrlModifier | ModifierKeys::altModifier); +} + +void ModifierKeys::updateCurrentModifiers() throw() +{ + currentModifierFlags = currentModifiers; +} + +bool KeyPress::isKeyCurrentlyDown (const int keyCode) throw() +{ + SHORT k = (SHORT) keyCode; + + if ((keyCode & extendedKeyModifier) == 0 + && (k >= (SHORT) T('a') && k <= (SHORT) T('z'))) + k += (SHORT) T('A') - (SHORT) T('a'); + + const SHORT translatedValues[] = { (SHORT) ',', VK_OEM_COMMA, + (SHORT) '+', VK_OEM_PLUS, + (SHORT) '-', VK_OEM_MINUS, + (SHORT) '.', VK_OEM_PERIOD, + (SHORT) ';', VK_OEM_1, + (SHORT) ':', VK_OEM_1, + (SHORT) '/', VK_OEM_2, + (SHORT) '?', VK_OEM_2, + (SHORT) '[', VK_OEM_4, + (SHORT) ']', VK_OEM_6 }; + + for (int i = 0; i < numElementsInArray (translatedValues); i += 2) + if (k == translatedValues [i]) + k = translatedValues [i + 1]; + + return (GetKeyState (k) & 0x8000) != 0; +} + +const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() throw() +{ + updateKeyModifiers(); + + currentModifiers &= ~ModifierKeys::allMouseButtonModifiers; + + if ((GetKeyState (VK_LBUTTON) & 0x8000) != 0) + currentModifiers |= ModifierKeys::leftButtonModifier; + + if ((GetKeyState (VK_RBUTTON) & 0x8000) != 0) + currentModifiers |= ModifierKeys::rightButtonModifier; + + if ((GetKeyState (VK_MBUTTON) & 0x8000) != 0) + currentModifiers |= ModifierKeys::middleButtonModifier; + + return ModifierKeys (currentModifiers); +} + +static int64 getMouseEventTime() throw() +{ + static int64 eventTimeOffset = 0; + static DWORD lastMessageTime = 0; + const DWORD thisMessageTime = GetMessageTime(); + + if (thisMessageTime < lastMessageTime || lastMessageTime == 0) + { + lastMessageTime = thisMessageTime; + eventTimeOffset = Time::currentTimeMillis() - thisMessageTime; + } + + return eventTimeOffset + thisMessageTime; +} + +class Win32ComponentPeer : public ComponentPeer +{ +public: + + Win32ComponentPeer (Component* const component, + const int windowStyleFlags) + : ComponentPeer (component, windowStyleFlags), + dontRepaint (false), + fullScreen (false), + isDragging (false), + isMouseOver (false), + hasCreatedCaret (false), + currentWindowIcon (0), + taskBarIcon (0), + dropTarget (0) + { + MessageManager::getInstance() + ->callFunctionOnMessageThread (&createWindowCallback, (void*) this); + + setTitle (component->getName()); + + if ((windowStyleFlags & windowHasDropShadow) != 0 + && Desktop::canUseSemiTransparentWindows()) { - String s ("clock: "); - s += clocks[i].name; + shadower = component->getLookAndFeel().createDropShadowerForComponent (component); - if (clocks[i].isCurrentSource) - { - isSourceSet = true; - s << " (cur)"; - } - - log (s); - } - - if (numSources > 1 && ! isSourceSet) - { - log ("setting clock source"); - asioObject->setClockSource (clocks[0].index); - Thread::sleep (20); + if (shadower != 0) + shadower->setOwner (component); } else { - if (numSources == 0) - { - log ("ASIO - no clock sources!"); - } + shadower = 0; + } + } + + ~Win32ComponentPeer() + { + setTaskBarIcon (0); + deleteAndZero (shadower); + + // do this before the next bit to avoid messages arriving for this window + // before it's destroyed + SetWindowLongPtr (hwnd, GWLP_USERDATA, 0); + + MessageManager::getInstance() + ->callFunctionOnMessageThread (&destroyWindowCallback, (void*) hwnd); + + if (currentWindowIcon != 0) + DestroyIcon (currentWindowIcon); + + if (dropTarget != 0) + { + dropTarget->Release(); + dropTarget = 0; + } + } + + void* getNativeHandle() const + { + return (void*) hwnd; + } + + void setVisible (bool shouldBeVisible) + { + ShowWindow (hwnd, shouldBeVisible ? SW_SHOWNA : SW_HIDE); + + if (shouldBeVisible) + InvalidateRect (hwnd, 0, 0); + else + lastPaintTime = 0; + } + + void setTitle (const String& title) + { + SetWindowText (hwnd, title); + } + + void setPosition (int x, int y) + { + offsetWithinParent (x, y); + SetWindowPos (hwnd, 0, + x - windowBorder.getLeft(), + y - windowBorder.getTop(), + 0, 0, + SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); + } + + void repaintNowIfTransparent() + { + if (isTransparent() && lastPaintTime > 0 && Time::getMillisecondCounter() > lastPaintTime + 30) + handlePaintMessage(); + } + + void updateBorderSize() + { + WINDOWINFO info; + info.cbSize = sizeof (info); + + if (GetWindowInfo (hwnd, &info)) + { + windowBorder = BorderSize (info.rcClient.top - info.rcWindow.top, + info.rcClient.left - info.rcWindow.left, + info.rcWindow.bottom - info.rcClient.bottom, + info.rcWindow.right - info.rcClient.right); + } + } + + void setSize (int w, int h) + { + SetWindowPos (hwnd, 0, 0, 0, + w + windowBorder.getLeftAndRight(), + h + windowBorder.getTopAndBottom(), + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER); + + updateBorderSize(); + + repaintNowIfTransparent(); + } + + void setBounds (int x, int y, int w, int h, const bool isNowFullScreen) + { + fullScreen = isNowFullScreen; + offsetWithinParent (x, y); + + SetWindowPos (hwnd, 0, + x - windowBorder.getLeft(), + y - windowBorder.getTop(), + w + windowBorder.getLeftAndRight(), + h + windowBorder.getTopAndBottom(), + SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); + + updateBorderSize(); + + repaintNowIfTransparent(); + } + + void getBounds (int& x, int& y, int& w, int& h) const + { + RECT r; + GetWindowRect (hwnd, &r); + + x = r.left; + y = r.top; + w = r.right - x; + h = r.bottom - y; + + HWND parentH = GetParent (hwnd); + if (parentH != 0) + { + GetWindowRect (parentH, &r); + x -= r.left; + y -= r.top; } - double cr = 0; - err = asioObject->getSampleRate (&cr); - if (err == 0) + x += windowBorder.getLeft(); + y += windowBorder.getTop(); + w -= windowBorder.getLeftAndRight(); + h -= windowBorder.getTopAndBottom(); + } + + int getScreenX() const + { + RECT r; + GetWindowRect (hwnd, &r); + return r.left + windowBorder.getLeft(); + } + + int getScreenY() const + { + RECT r; + GetWindowRect (hwnd, &r); + return r.top + windowBorder.getTop(); + } + + void relativePositionToGlobal (int& x, int& y) + { + RECT r; + GetWindowRect (hwnd, &r); + + x += r.left + windowBorder.getLeft(); + y += r.top + windowBorder.getTop(); + } + + void globalPositionToRelative (int& x, int& y) + { + RECT r; + GetWindowRect (hwnd, &r); + + x -= r.left + windowBorder.getLeft(); + y -= r.top + windowBorder.getTop(); + } + + void setMinimised (bool shouldBeMinimised) + { + if (shouldBeMinimised != isMinimised()) + ShowWindow (hwnd, shouldBeMinimised ? SW_MINIMIZE : SW_SHOWNORMAL); + } + + bool isMinimised() const + { + WINDOWPLACEMENT wp; + wp.length = sizeof (WINDOWPLACEMENT); + GetWindowPlacement (hwnd, &wp); + + return wp.showCmd == SW_SHOWMINIMIZED; + } + + void setFullScreen (bool shouldBeFullScreen) + { + setMinimised (false); + + if (fullScreen != shouldBeFullScreen) { - currentSampleRate = cr; + fullScreen = shouldBeFullScreen; + const ComponentDeletionWatcher deletionChecker (component); + + if (! fullScreen) + { + const Rectangle boundsCopy (lastNonFullscreenBounds); + + if (hasTitleBar()) + ShowWindow (hwnd, SW_SHOWNORMAL); + + if (! boundsCopy.isEmpty()) + { + setBounds (boundsCopy.getX(), + boundsCopy.getY(), + boundsCopy.getWidth(), + boundsCopy.getHeight(), + false); + } + } + else + { + if (hasTitleBar()) + ShowWindow (hwnd, SW_SHOWMAXIMIZED); + else + SendMessageW (hwnd, WM_SETTINGCHANGE, 0, 0); + } + + if (! deletionChecker.hasBeenDeleted()) + handleMovedOrResized(); + } + } + + bool isFullScreen() const + { + if (! hasTitleBar()) + return fullScreen; + + WINDOWPLACEMENT wp; + wp.length = sizeof (wp); + GetWindowPlacement (hwnd, &wp); + + return wp.showCmd == SW_SHOWMAXIMIZED; + } + + bool contains (int x, int y, bool trueIfInAChildWindow) const + { + RECT r; + GetWindowRect (hwnd, &r); + + POINT p; + p.x = x + r.left + windowBorder.getLeft(); + p.y = y + r.top + windowBorder.getTop(); + + HWND w = WindowFromPoint (p); + + return w == hwnd || (trueIfInAChildWindow && (IsChild (hwnd, w) != 0)); + } + + const BorderSize getFrameSize() const + { + return windowBorder; + } + + bool setAlwaysOnTop (bool alwaysOnTop) + { + const bool oldDeactivate = shouldDeactivateTitleBar; + shouldDeactivateTitleBar = ((styleFlags & windowIsTemporary) == 0); + + SetWindowPos (hwnd, alwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, + 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING); + + shouldDeactivateTitleBar = oldDeactivate; + + if (shadower != 0) + shadower->componentBroughtToFront (*component); + + return true; + } + + void toFront (bool makeActive) + { + setMinimised (false); + + const bool oldDeactivate = shouldDeactivateTitleBar; + shouldDeactivateTitleBar = ((styleFlags & windowIsTemporary) == 0); + + MessageManager::getInstance() + ->callFunctionOnMessageThread (makeActive ? &toFrontCallback1 + : &toFrontCallback2, + (void*) hwnd); + + shouldDeactivateTitleBar = oldDeactivate; + + if (! makeActive) + { + // in this case a broughttofront call won't have occured, so do it now.. + handleBroughtToFront(); + } + } + + void toBehind (ComponentPeer* other) + { + Win32ComponentPeer* const otherPeer = dynamic_cast (other); + + jassert (otherPeer != 0); // wrong type of window? + + if (otherPeer != 0) + { + setMinimised (false); + + SetWindowPos (hwnd, otherPeer->hwnd, 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING); + } + } + + bool isFocused() const + { + return MessageManager::getInstance() + ->callFunctionOnMessageThread (&getFocusCallback, 0) == (void*) hwnd; + } + + void grabFocus() + { + const bool oldDeactivate = shouldDeactivateTitleBar; + shouldDeactivateTitleBar = ((styleFlags & windowIsTemporary) == 0); + + MessageManager::getInstance() + ->callFunctionOnMessageThread (&setFocusCallback, (void*) hwnd); + + shouldDeactivateTitleBar = oldDeactivate; + } + + void textInputRequired (int /*x*/, int /*y*/) + { + if (! hasCreatedCaret) + { + hasCreatedCaret = true; + CreateCaret (hwnd, (HBITMAP) 1, 0, 0); + } + + ShowCaret (hwnd); + SetCaretPos (0, 0); + } + + void repaint (int x, int y, int w, int h) + { + const RECT r = { x, y, x + w, y + h }; + InvalidateRect (hwnd, &r, FALSE); + } + + void performAnyPendingRepaintsNow() + { + MSG m; + if (component->isVisible() && PeekMessage (&m, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)) + DispatchMessage (&m); + } + + static Win32ComponentPeer* getOwnerOfWindow (HWND h) throw() + { + if (h != 0 && GetWindowLongPtr (h, GWLP_USERDATA) == improbableWindowNumber) + return (Win32ComponentPeer*) GetWindowLongPtr (h, 8); + + return 0; + } + + void setTaskBarIcon (const Image* const image) + { + if (image != 0) + { + HICON hicon = createHICONFromImage (*image, TRUE, 0, 0); + + if (taskBarIcon == 0) + { + taskBarIcon = new NOTIFYICONDATA(); + taskBarIcon->cbSize = sizeof (NOTIFYICONDATA); + taskBarIcon->hWnd = (HWND) hwnd; + taskBarIcon->uID = (int) (pointer_sized_int) hwnd; + taskBarIcon->uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; + taskBarIcon->uCallbackMessage = WM_TRAYNOTIFY; + taskBarIcon->hIcon = hicon; + taskBarIcon->szTip[0] = 0; + + Shell_NotifyIcon (NIM_ADD, taskBarIcon); + } + else + { + HICON oldIcon = taskBarIcon->hIcon; + + taskBarIcon->hIcon = hicon; + taskBarIcon->uFlags = NIF_ICON; + Shell_NotifyIcon (NIM_MODIFY, taskBarIcon); + + DestroyIcon (oldIcon); + } + + DestroyIcon (hicon); + } + else if (taskBarIcon != 0) + { + taskBarIcon->uFlags = 0; + Shell_NotifyIcon (NIM_DELETE, taskBarIcon); + DestroyIcon (taskBarIcon->hIcon); + deleteAndZero (taskBarIcon); + } + } + + void setTaskBarIconToolTip (const String& toolTip) const + { + if (taskBarIcon != 0) + { + taskBarIcon->uFlags = NIF_TIP; + toolTip.copyToBuffer (taskBarIcon->szTip, sizeof (taskBarIcon->szTip) - 1); + Shell_NotifyIcon (NIM_MODIFY, taskBarIcon); + } + } + + juce_UseDebuggingNewOperator + + bool dontRepaint; + +private: + HWND hwnd; + DropShadower* shadower; + bool fullScreen, isDragging, isMouseOver, hasCreatedCaret; + BorderSize windowBorder; + HICON currentWindowIcon; + NOTIFYICONDATA* taskBarIcon; + IDropTarget* dropTarget; + + class TemporaryImage : public Timer + { + public: + + TemporaryImage() + : image (0) + { + } + + ~TemporaryImage() + { + delete image; + } + + WindowsBitmapImage* getImage (const bool transparent, const int w, const int h) throw() + { + const Image::PixelFormat format = transparent ? Image::ARGB : Image::RGB; + + if (image == 0 || image->getWidth() < w || image->getHeight() < h || image->getFormat() != format) + { + delete image; + image = new WindowsBitmapImage (format, (w + 31) & ~31, (h + 31) & ~31, false); + } + + startTimer (3000); + return image; + } + + void timerCallback() + { + stopTimer(); + deleteAndZero (image); + } + + private: + WindowsBitmapImage* image; + + TemporaryImage (const TemporaryImage&); + const TemporaryImage& operator= (const TemporaryImage&); + }; + + TemporaryImage offscreenImageGenerator; + + class WindowClassHolder : public DeletedAtShutdown + { + public: + WindowClassHolder() + : windowClassName ("JUCE_") + { + // this name has to be different for each app/dll instance because otherwise + // poor old Win32 can get a bit confused (even despite it not being a process-global + // window class). + windowClassName << (int) (Time::currentTimeMillis() & 0x7fffffff); + + HINSTANCE moduleHandle = (HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle(); + + TCHAR moduleFile [1024]; + moduleFile[0] = 0; + GetModuleFileName (moduleHandle, moduleFile, 1024); + WORD iconNum = 0; + + WNDCLASSEX wcex; + wcex.cbSize = sizeof (wcex); + wcex.style = CS_OWNDC; + wcex.lpfnWndProc = (WNDPROC) windowProc; + wcex.lpszClassName = windowClassName; + wcex.cbClsExtra = 0; + wcex.cbWndExtra = 32; + wcex.hInstance = moduleHandle; + wcex.hIcon = ExtractAssociatedIcon (moduleHandle, moduleFile, &iconNum); + iconNum = 1; + wcex.hIconSm = ExtractAssociatedIcon (moduleHandle, moduleFile, &iconNum); + wcex.hCursor = 0; + wcex.hbrBackground = 0; + wcex.lpszMenuName = 0; + + RegisterClassEx (&wcex); + } + + ~WindowClassHolder() + { + if (ComponentPeer::getNumPeers() == 0) + UnregisterClass (windowClassName, (HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle()); + + clearSingletonInstance(); + } + + String windowClassName; + + juce_DeclareSingleton_SingleThreaded_Minimal (WindowClassHolder); + }; + + static void* createWindowCallback (void* userData) + { + ((Win32ComponentPeer*) userData)->createWindow(); + return 0; + } + + void createWindow() + { + DWORD exstyle = WS_EX_ACCEPTFILES; + DWORD type = WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + + if (hasTitleBar()) + { + type |= WS_OVERLAPPED; + exstyle |= WS_EX_APPWINDOW; + + if ((styleFlags & windowHasCloseButton) != 0) + { + type |= WS_SYSMENU; + } + else + { + // annoyingly, windows won't let you have a min/max button without a close button + jassert ((styleFlags & (windowHasMinimiseButton | windowHasMaximiseButton)) == 0); + } + + if ((styleFlags & windowIsResizable) != 0) + type |= WS_THICKFRAME; } else { - logError ("GetSampleRate", err); - currentSampleRate = 0; + type |= WS_POPUP | WS_SYSMENU; + + if ((styleFlags & windowAppearsOnTaskbar) == 0) + exstyle |= WS_EX_TOOLWINDOW; + else + exstyle |= WS_EX_APPWINDOW; } - error = String::empty; - needToReset = false; - isReSync = false; - err = 0; - bool buffersCreated = false; + if ((styleFlags & windowHasMinimiseButton) != 0) + type |= WS_MINIMIZEBOX; - if (currentSampleRate != sampleRate) + if ((styleFlags & windowHasMaximiseButton) != 0) + type |= WS_MAXIMIZEBOX; + + if ((styleFlags & windowIgnoresMouseClicks) != 0) + exstyle |= WS_EX_TRANSPARENT; + + if ((styleFlags & windowIsSemiTransparent) != 0 + && Desktop::canUseSemiTransparentWindows()) + exstyle |= WS_EX_LAYERED; + + hwnd = CreateWindowEx (exstyle, WindowClassHolder::getInstance()->windowClassName, L"", type, 0, 0, 0, 0, 0, 0, 0, 0); + + if (hwnd != 0) { - log (T("ASIO samplerate: ") + String (currentSampleRate) + T(" to ") + String (sampleRate)); - err = asioObject->setSampleRate (sampleRate); + SetWindowLongPtr (hwnd, 0, 0); + SetWindowLongPtr (hwnd, 8, (LONG_PTR) this); + SetWindowLongPtr (hwnd, GWLP_USERDATA, improbableWindowNumber); - if (err == ASE_NoClock && numSources > 0) + if (dropTarget == 0) + dropTarget = new JuceDropTarget (this); + + RegisterDragDrop (hwnd, dropTarget); + + updateBorderSize(); + + // Calling this function here is (for some reason) necessary to make Windows + // correctly enable the menu items that we specify in the wm_initmenu message. + GetSystemMenu (hwnd, false); + } + else + { + jassertfalse + } + } + + static void* destroyWindowCallback (void* handle) + { + RevokeDragDrop ((HWND) handle); + DestroyWindow ((HWND) handle); + return 0; + } + + static void* toFrontCallback1 (void* h) + { + SetForegroundWindow ((HWND) h); + return 0; + } + + static void* toFrontCallback2 (void* h) + { + SetWindowPos ((HWND) h, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING); + return 0; + } + + static void* setFocusCallback (void* h) + { + SetFocus ((HWND) h); + return 0; + } + + static void* getFocusCallback (void*) + { + return (void*) GetFocus(); + } + + void offsetWithinParent (int& x, int& y) const + { + if (isTransparent()) + { + HWND parentHwnd = GetParent (hwnd); + + if (parentHwnd != 0) { - log ("trying to set a clock source.."); - Thread::sleep (10); - err = asioObject->setClockSource (clocks[0].index); - if (err != 0) + RECT parentRect; + GetWindowRect (parentHwnd, &parentRect); + x += parentRect.left; + y += parentRect.top; + } + } + } + + bool isTransparent() const + { + return (GetWindowLong (hwnd, GWL_EXSTYLE) & WS_EX_LAYERED) != 0; + } + + inline bool hasTitleBar() const throw() { return (styleFlags & windowHasTitleBar) != 0; } + + void setIcon (const Image& newIcon) + { + HICON hicon = createHICONFromImage (newIcon, TRUE, 0, 0); + + if (hicon != 0) + { + SendMessage (hwnd, WM_SETICON, ICON_BIG, (LPARAM) hicon); + SendMessage (hwnd, WM_SETICON, ICON_SMALL, (LPARAM) hicon); + + if (currentWindowIcon != 0) + DestroyIcon (currentWindowIcon); + + currentWindowIcon = hicon; + } + } + + void handlePaintMessage() + { +#if DEBUG_REPAINT_TIMES + const double paintStart = Time::getMillisecondCounterHiRes(); +#endif + HRGN rgn = CreateRectRgn (0, 0, 0, 0); + const int regionType = GetUpdateRgn (hwnd, rgn, false); + + PAINTSTRUCT paintStruct; + HDC dc = BeginPaint (hwnd, &paintStruct); // Note this can immediately generate a WM_NCPAINT + // message and become re-entrant, but that's OK + + // if something in a paint handler calls, e.g. a message box, this can become reentrant and + // corrupt the image it's using to paint into, so do a check here. + static bool reentrant = false; + if (reentrant) + { + DeleteObject (rgn); + EndPaint (hwnd, &paintStruct); + return; + } + + reentrant = true; + + // this is the rectangle to update.. + int x = paintStruct.rcPaint.left; + int y = paintStruct.rcPaint.top; + int w = paintStruct.rcPaint.right - x; + int h = paintStruct.rcPaint.bottom - y; + + const bool transparent = isTransparent(); + + if (transparent) + { + // it's not possible to have a transparent window with a title bar at the moment! + jassert (! hasTitleBar()); + + RECT r; + GetWindowRect (hwnd, &r); + x = y = 0; + w = r.right - r.left; + h = r.bottom - r.top; + } + + if (w > 0 && h > 0) + { + clearMaskedRegion(); + + WindowsBitmapImage* const offscreenImage = offscreenImageGenerator.getImage (transparent, w, h); + + LowLevelGraphicsSoftwareRenderer context (*offscreenImage); + + RectangleList* const contextClip = context.getRawClipRegion(); + contextClip->clear(); + + context.setOrigin (-x, -y); + + bool needToPaintAll = true; + + if (regionType == COMPLEXREGION && ! transparent) + { + HRGN clipRgn = CreateRectRgnIndirect (&paintStruct.rcPaint); + CombineRgn (rgn, rgn, clipRgn, RGN_AND); + DeleteObject (clipRgn); + + char rgnData [8192]; + const DWORD res = GetRegionData (rgn, sizeof (rgnData), (RGNDATA*) rgnData); + + if (res > 0 && res <= sizeof (rgnData)) { - logError ("SetClock", err); + const RGNDATAHEADER* const hdr = &(((const RGNDATA*) rgnData)->rdh); + + if (hdr->iType == RDH_RECTANGLES + && hdr->rcBound.right - hdr->rcBound.left >= w + && hdr->rcBound.bottom - hdr->rcBound.top >= h) + { + needToPaintAll = false; + + const RECT* rects = (const RECT*) (rgnData + sizeof (RGNDATAHEADER)); + int num = ((RGNDATA*) rgnData)->rdh.nCount; + + while (--num >= 0) + { + // (need to move this one pixel to the left because of a win32 bug) + const int cx = jmax (x, rects->left - 1); + const int cy = rects->top; + const int cw = rects->right - cx; + const int ch = rects->bottom - rects->top; + + if (cx + cw - x <= w && cy + ch - y <= h) + { + contextClip->addWithoutMerging (Rectangle (cx - x, cy - y, cw, ch)); + } + else + { + needToPaintAll = true; + break; + } + + ++rects; + } + } + } + } + + if (needToPaintAll) + { + contextClip->clear(); + contextClip->addWithoutMerging (Rectangle (0, 0, w, h)); + } + + if (transparent) + { + RectangleList::Iterator i (*contextClip); + + while (i.next()) + { + const Rectangle& r = *i.getRectangle(); + offscreenImage->clear (r.getX(), r.getY(), r.getWidth(), r.getHeight()); + } + } + + // if the component's not opaque, this won't draw properly unless the platform can support this + jassert (Desktop::canUseSemiTransparentWindows() || component->isOpaque()); + + updateCurrentModifiers(); + + handlePaint (context); + + if (! dontRepaint) + offscreenImage->blitToWindow (hwnd, dc, transparent, x, y, maskedRegion); + } + + DeleteObject (rgn); + EndPaint (hwnd, &paintStruct); + reentrant = false; + +#ifndef JUCE_GCC //xxx should add this fn for gcc.. + _fpreset(); // because some graphics cards can unmask FP exceptions +#endif + + lastPaintTime = Time::getMillisecondCounter(); + +#if DEBUG_REPAINT_TIMES + const double elapsed = Time::getMillisecondCounterHiRes() - paintStart; + Logger::outputDebugString (T("repaint time: ") + String (elapsed, 2)); +#endif + } + + void doMouseMove (const int x, const int y) + { + static uint32 lastMouseTime = 0; + // this can be set to throttle the mouse-messages to less than a + // certain number per second, as things can get unresponsive + // if each drag or move callback has to do a lot of work. + const int maxMouseMovesPerSecond = 60; + + const int64 mouseEventTime = getMouseEventTime(); + + if (! isMouseOver) + { + isMouseOver = true; + + TRACKMOUSEEVENT tme; + tme.cbSize = sizeof (tme); + tme.dwFlags = TME_LEAVE; + tme.hwndTrack = hwnd; + tme.dwHoverTime = 0; + + if (! TrackMouseEvent (&tme)) + { + jassertfalse; + } + + updateKeyModifiers(); + handleMouseEnter (x, y, mouseEventTime); + } + else if (! isDragging) + { + if (((unsigned int) x) < (unsigned int) component->getWidth() + && ((unsigned int) y) < (unsigned int) component->getHeight()) + { + RECT r; + GetWindowRect (hwnd, &r); + + POINT p; + p.x = x + r.left + windowBorder.getLeft(); + p.y = y + r.top + windowBorder.getTop(); + + if (WindowFromPoint (p) == hwnd) + { + const uint32 now = Time::getMillisecondCounter(); + + if (now > lastMouseTime + 1000 / maxMouseMovesPerSecond) + { + lastMouseTime = now; + handleMouseMove (x, y, mouseEventTime); + } + } + } + } + else + { + const uint32 now = Time::getMillisecondCounter(); + + if (now > lastMouseTime + 1000 / maxMouseMovesPerSecond) + { + lastMouseTime = now; + handleMouseDrag (x, y, mouseEventTime); + } + } + } + + void doMouseDown (const int x, const int y, const WPARAM wParam) + { + if (GetCapture() != hwnd) + SetCapture (hwnd); + + doMouseMove (x, y); + + currentModifiers &= ~ModifierKeys::allMouseButtonModifiers; + + if ((wParam & MK_LBUTTON) != 0) + currentModifiers |= ModifierKeys::leftButtonModifier; + + if ((wParam & MK_RBUTTON) != 0) + currentModifiers |= ModifierKeys::rightButtonModifier; + + if ((wParam & MK_MBUTTON) != 0) + currentModifiers |= ModifierKeys::middleButtonModifier; + + updateKeyModifiers(); + isDragging = true; + + handleMouseDown (x, y, getMouseEventTime()); + } + + void doMouseUp (const int x, const int y, const WPARAM wParam) + { + int numButtons = 0; + + if ((wParam & MK_LBUTTON) != 0) + ++numButtons; + + if ((wParam & MK_RBUTTON) != 0) + ++numButtons; + + if ((wParam & MK_MBUTTON) != 0) + ++numButtons; + + const int oldModifiers = currentModifiers; + + // update the currentmodifiers only after the callback, so the callback + // knows which button was released. + currentModifiers &= ~ModifierKeys::allMouseButtonModifiers; + + if ((wParam & MK_LBUTTON) != 0) + currentModifiers |= ModifierKeys::leftButtonModifier; + + if ((wParam & MK_RBUTTON) != 0) + currentModifiers |= ModifierKeys::rightButtonModifier; + + if ((wParam & MK_MBUTTON) != 0) + currentModifiers |= ModifierKeys::middleButtonModifier; + + updateKeyModifiers(); + isDragging = false; + + // release the mouse capture if the user's not still got a button down + if (numButtons == 0 && hwnd == GetCapture()) + ReleaseCapture(); + + handleMouseUp (oldModifiers, x, y, getMouseEventTime()); + } + + void doCaptureChanged() + { + if (isDragging) + { + RECT wr; + GetWindowRect (hwnd, &wr); + + const DWORD mp = GetMessagePos(); + + doMouseUp (GET_X_LPARAM (mp) - wr.left - windowBorder.getLeft(), + GET_Y_LPARAM (mp) - wr.top - windowBorder.getTop(), + (WPARAM) getMouseEventTime()); + } + } + + void doMouseExit() + { + if (isMouseOver) + { + isMouseOver = false; + RECT wr; + GetWindowRect (hwnd, &wr); + + const DWORD mp = GetMessagePos(); + + handleMouseExit (GET_X_LPARAM (mp) - wr.left - windowBorder.getLeft(), + GET_Y_LPARAM (mp) - wr.top - windowBorder.getTop(), + getMouseEventTime()); + } + } + + void doMouseWheel (const WPARAM wParam, const bool isVertical) + { + updateKeyModifiers(); + + const int amount = jlimit (-1000, 1000, (int) (0.75f * (short) HIWORD (wParam))); + + handleMouseWheel (isVertical ? 0 : amount, + isVertical ? amount : 0, + getMouseEventTime()); + } + + void sendModifierKeyChangeIfNeeded() + { + if (modifiersAtLastCallback != currentModifiers) + { + modifiersAtLastCallback = currentModifiers; + handleModifierKeysChange(); + } + } + + bool doKeyUp (const WPARAM key) + { + updateKeyModifiers(); + + switch (key) + { + case VK_SHIFT: + case VK_CONTROL: + case VK_MENU: + case VK_CAPITAL: + case VK_LWIN: + case VK_RWIN: + case VK_APPS: + case VK_NUMLOCK: + case VK_SCROLL: + case VK_LSHIFT: + case VK_RSHIFT: + case VK_LCONTROL: + case VK_LMENU: + case VK_RCONTROL: + case VK_RMENU: + sendModifierKeyChangeIfNeeded(); + } + + return handleKeyUpOrDown(); + } + + bool doKeyDown (const WPARAM key) + { + updateKeyModifiers(); + bool used = false; + + switch (key) + { + case VK_SHIFT: + case VK_LSHIFT: + case VK_RSHIFT: + case VK_CONTROL: + case VK_LCONTROL: + case VK_RCONTROL: + case VK_MENU: + case VK_LMENU: + case VK_RMENU: + case VK_LWIN: + case VK_RWIN: + case VK_CAPITAL: + case VK_NUMLOCK: + case VK_SCROLL: + case VK_APPS: + sendModifierKeyChangeIfNeeded(); + break; + + case VK_LEFT: + case VK_RIGHT: + case VK_UP: + case VK_DOWN: + case VK_PRIOR: + case VK_NEXT: + case VK_HOME: + case VK_END: + case VK_DELETE: + case VK_INSERT: + case VK_F1: + case VK_F2: + case VK_F3: + case VK_F4: + case VK_F5: + case VK_F6: + case VK_F7: + case VK_F8: + case VK_F9: + case VK_F10: + case VK_F11: + case VK_F12: + case VK_F13: + case VK_F14: + case VK_F15: + case VK_F16: + used = handleKeyUpOrDown(); + used = handleKeyPress (extendedKeyModifier | (int) key, 0) || used; + break; + + case VK_ADD: + case VK_SUBTRACT: + case VK_MULTIPLY: + case VK_DIVIDE: + case VK_SEPARATOR: + case VK_DECIMAL: + used = handleKeyUpOrDown(); + break; + + default: + used = handleKeyUpOrDown(); + + { + MSG msg; + + if (! PeekMessage (&msg, hwnd, WM_CHAR, WM_DEADCHAR, PM_NOREMOVE)) + { + // if there isn't a WM_CHAR or WM_DEADCHAR message pending, we need to + // manually generate the key-press event that matches this key-down. + + const UINT keyChar = MapVirtualKey (key, 2); + used = handleKeyPress ((int) LOWORD (keyChar), 0) || used; + } } - Thread::sleep (10); - err = asioObject->setSampleRate (sampleRate); + break; + } + + return used; + } + + bool doKeyChar (int key, const LPARAM flags) + { + updateKeyModifiers(); + + juce_wchar textChar = (juce_wchar) key; + + const int virtualScanCode = (flags >> 16) & 0xff; + + if (key >= '0' && key <= '9') + { + switch (virtualScanCode) // check for a numeric keypad scan-code + { + case 0x52: + case 0x4f: + case 0x50: + case 0x51: + case 0x4b: + case 0x4c: + case 0x4d: + case 0x47: + case 0x48: + case 0x49: + key = (key - '0') + KeyPress::numberPad0; + break; + default: + break; + } + } + else + { + // convert the scan code to an unmodified character code.. + const UINT virtualKey = MapVirtualKey (virtualScanCode, 1); + UINT keyChar = MapVirtualKey (virtualKey, 2); + + keyChar = LOWORD (keyChar); + + if (keyChar != 0) + key = (int) keyChar; + + // avoid sending junk text characters for some control-key combinations + if (textChar < ' ' && (currentModifiers & (ModifierKeys::ctrlModifier | ModifierKeys::altModifier)) != 0) + textChar = 0; + } + + return handleKeyPress (key, textChar); + } + + bool doAppCommand (const LPARAM lParam) + { + int key = 0; + + switch (GET_APPCOMMAND_LPARAM (lParam)) + { + case APPCOMMAND_MEDIA_PLAY_PAUSE: + key = KeyPress::playKey; + break; + + case APPCOMMAND_MEDIA_STOP: + key = KeyPress::stopKey; + break; + + case APPCOMMAND_MEDIA_NEXTTRACK: + key = KeyPress::fastForwardKey; + break; + + case APPCOMMAND_MEDIA_PREVIOUSTRACK: + key = KeyPress::rewindKey; + break; + } + + if (key != 0) + { + updateKeyModifiers(); + + if (hwnd == GetActiveWindow()) + { + handleKeyPress (key, 0); + return true; } } - if (err == 0) + return false; + } + + class JuceDropTarget : public IDropTarget + { + public: + JuceDropTarget (Win32ComponentPeer* const owner_) + : owner (owner_), + refCount (1) { - currentSampleRate = sampleRate; + } - if (needToReset) + virtual ~JuceDropTarget() + { + jassert (refCount == 0); + } + + HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) + { + if (id == IID_IUnknown || id == IID_IDropTarget) { - if (isReSync) - { - log ("Resync request"); - } - - log ("! Resetting ASIO after sample rate change"); - removeCurrentDriver(); - - loadDriver(); - const String error (initDriver()); - - if (error.isNotEmpty()) - { - log (T("ASIOInit: ") + error); - } - - needToReset = false; - isReSync = false; + AddRef(); + *result = this; + return S_OK; } - numActiveInputChans = 0; - numActiveOutputChans = 0; + *result = 0; + return E_NOINTERFACE; + } - ASIOBufferInfo* info = bufferInfos; - int i; - for (i = 0; i < totalNumInputChans; ++i) + ULONG __stdcall AddRef() { return ++refCount; } + ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } + + HRESULT __stdcall DragEnter (IDataObject* pDataObject, DWORD /*grfKeyState*/, POINTL mousePos, DWORD* pdwEffect) + { + updateFileList (pDataObject); + int x = mousePos.x, y = mousePos.y; + owner->globalPositionToRelative (x, y); + owner->handleFileDragMove (files, x, y); + *pdwEffect = DROPEFFECT_COPY; + return S_OK; + } + + HRESULT __stdcall DragLeave() + { + owner->handleFileDragExit (files); + return S_OK; + } + + HRESULT __stdcall DragOver (DWORD /*grfKeyState*/, POINTL mousePos, DWORD* pdwEffect) + { + int x = mousePos.x, y = mousePos.y; + owner->globalPositionToRelative (x, y); + owner->handleFileDragMove (files, x, y); + *pdwEffect = DROPEFFECT_COPY; + return S_OK; + } + + HRESULT __stdcall Drop (IDataObject* pDataObject, DWORD /*grfKeyState*/, POINTL mousePos, DWORD* pdwEffect) + { + updateFileList (pDataObject); + int x = mousePos.x, y = mousePos.y; + owner->globalPositionToRelative (x, y); + owner->handleFileDragDrop (files, x, y); + *pdwEffect = DROPEFFECT_COPY; + return S_OK; + } + + private: + Win32ComponentPeer* const owner; + int refCount; + StringArray files; + + void updateFileList (IDataObject* const pDataObject) + { + files.clear(); + + FORMATETC format = { CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; + STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; + + if (pDataObject->GetData (&format, &medium) == S_OK) { - if (inputChannels[i]) + const SIZE_T totalLen = GlobalSize (medium.hGlobal); + const LPDROPFILES pDropFiles = (const LPDROPFILES) GlobalLock (medium.hGlobal); + unsigned int i = 0; + + if (pDropFiles->fWide) { - currentChansIn.setBit (i); - info->isInput = 1; - info->channelNum = i; - info->buffers[0] = info->buffers[1] = 0; - ++info; - ++numActiveInputChans; + const WCHAR* const fname = (WCHAR*) (((const char*) pDropFiles) + sizeof (DROPFILES)); + + for (;;) + { + unsigned int len = 0; + while (i + len < totalLen && fname [i + len] != 0) + ++len; + + if (len == 0) + break; + + files.add (String (fname + i, len)); + i += len + 1; + } + } + else + { + const char* const fname = ((const char*) pDropFiles) + sizeof (DROPFILES); + + for (;;) + { + unsigned int len = 0; + while (i + len < totalLen && fname [i + len] != 0) + ++len; + + if (len == 0) + break; + + files.add (String (fname + i, len)); + i += len + 1; + } + } + + GlobalUnlock (medium.hGlobal); + } + } + + JuceDropTarget (const JuceDropTarget&); + const JuceDropTarget& operator= (const JuceDropTarget&); + }; + + void doSettingChange() + { + Desktop::getInstance().refreshMonitorSizes(); + + if (fullScreen && ! isMinimised()) + { + const Rectangle r (component->getParentMonitorArea()); + + SetWindowPos (hwnd, 0, + r.getX(), r.getY(), r.getWidth(), r.getHeight(), + SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOSENDCHANGING); + } + } + +public: + static LRESULT CALLBACK windowProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) + { + Win32ComponentPeer* const peer = getOwnerOfWindow (h); + + if (peer != 0) + return peer->peerWindowProc (h, message, wParam, lParam); + + return DefWindowProc (h, message, wParam, lParam); + } + +private: + LRESULT peerWindowProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) + { + { + const MessageManagerLock messLock; + + if (isValidPeer (this)) + { + switch (message) + { + case WM_NCHITTEST: + if (hasTitleBar()) + break; + + return HTCLIENT; + + case WM_PAINT: + handlePaintMessage(); + return 0; + + case WM_NCPAINT: + if (wParam != 1) + handlePaintMessage(); + + if (hasTitleBar()) + break; + + return 0; + + case WM_ERASEBKGND: + case WM_NCCALCSIZE: + if (hasTitleBar()) + break; + + return 1; + + case WM_MOUSEMOVE: + doMouseMove (GET_X_LPARAM (lParam), GET_Y_LPARAM (lParam)); + return 0; + + case WM_MOUSELEAVE: + doMouseExit(); + return 0; + + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + doMouseDown (GET_X_LPARAM (lParam), GET_Y_LPARAM (lParam), wParam); + return 0; + + case WM_LBUTTONUP: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + doMouseUp (GET_X_LPARAM (lParam), GET_Y_LPARAM (lParam), wParam); + return 0; + + case WM_CAPTURECHANGED: + doCaptureChanged(); + return 0; + + case WM_NCMOUSEMOVE: + if (hasTitleBar()) + break; + + return 0; + + case 0x020A: /* WM_MOUSEWHEEL */ + doMouseWheel (wParam, true); + return 0; + + case 0x020E: /* WM_MOUSEHWHEEL */ + doMouseWheel (wParam, false); + return 0; + + case WM_WINDOWPOSCHANGING: + if ((styleFlags & (windowHasTitleBar | windowIsResizable)) == (windowHasTitleBar | windowIsResizable)) + { + WINDOWPOS* const wp = (WINDOWPOS*) lParam; + + if ((wp->flags & (SWP_NOMOVE | SWP_NOSIZE)) != (SWP_NOMOVE | SWP_NOSIZE)) + { + if (constrainer != 0) + { + const Rectangle current (component->getX() - windowBorder.getLeft(), + component->getY() - windowBorder.getTop(), + component->getWidth() + windowBorder.getLeftAndRight(), + component->getHeight() + windowBorder.getTopAndBottom()); + + constrainer->checkBounds (wp->x, wp->y, wp->cx, wp->cy, + current, + Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), + wp->y != current.getY() && wp->y + wp->cy == current.getBottom(), + wp->x != current.getX() && wp->x + wp->cx == current.getRight(), + wp->y == current.getY() && wp->y + wp->cy != current.getBottom(), + wp->x == current.getX() && wp->x + wp->cx != current.getRight()); + } + } + } + + return 0; + + case WM_WINDOWPOSCHANGED: + handleMovedOrResized(); + + if (dontRepaint) + break; // needed for non-accelerated openGL windows to draw themselves correctly.. + else + return 0; + + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + if (doKeyDown (wParam)) + return 0; + + break; + + case WM_KEYUP: + case WM_SYSKEYUP: + if (doKeyUp (wParam)) + return 0; + + break; + + case WM_CHAR: + if (doKeyChar ((int) wParam, lParam)) + return 0; + + break; + + case WM_APPCOMMAND: + if (doAppCommand (lParam)) + return TRUE; + + break; + + case WM_SETFOCUS: + updateKeyModifiers(); + handleFocusGain(); + break; + + case WM_KILLFOCUS: + if (hasCreatedCaret) + { + hasCreatedCaret = false; + DestroyCaret(); + } + + handleFocusLoss(); + break; + + case WM_ACTIVATEAPP: + // Windows does weird things to process priority when you swap apps, + // so this forces an update when the app is brought to the front + if (wParam != FALSE) + juce_repeatLastProcessPriority(); + + juce_CheckCurrentlyFocusedTopLevelWindow(); + modifiersAtLastCallback = -1; + return 0; + + case WM_ACTIVATE: + if (LOWORD (wParam) == WA_ACTIVE || LOWORD (wParam) == WA_CLICKACTIVE) + { + modifiersAtLastCallback = -1; + updateKeyModifiers(); + + if (isMinimised()) + { + component->repaint(); + handleMovedOrResized(); + + if (! isValidMessageListener()) + return 0; + } + + if (LOWORD (wParam) == WA_CLICKACTIVE + && component->isCurrentlyBlockedByAnotherModalComponent()) + { + int mx, my; + component->getMouseXYRelative (mx, my); + Component* const underMouse = component->getComponentAt (mx, my); + + if (underMouse != 0 && underMouse->isCurrentlyBlockedByAnotherModalComponent()) + Component::getCurrentlyModalComponent()->inputAttemptWhenModal(); + + return 0; + } + + handleBroughtToFront(); + + if (component->isCurrentlyBlockedByAnotherModalComponent()) + Component::getCurrentlyModalComponent()->toFront (true); + + return 0; + } + + break; + + case WM_NCACTIVATE: + // while a temporary window is being shown, prevent Windows from deactivating the + // title bars of our main windows. + if (wParam == 0 && ! shouldDeactivateTitleBar) + wParam = TRUE; // change this and let it get passed to the DefWindowProc. + + break; + + case WM_MOUSEACTIVATE: + if (! component->getMouseClickGrabsKeyboardFocus()) + return MA_NOACTIVATE; + + break; + + case WM_SHOWWINDOW: + if (wParam != 0) + handleBroughtToFront(); + + break; + + case WM_CLOSE: + handleUserClosingWindow(); + return 0; + + case WM_QUIT: + JUCEApplication::quit(); + return 0; + + case WM_TRAYNOTIFY: + if (component->isCurrentlyBlockedByAnotherModalComponent()) + { + if (lParam == WM_LBUTTONDOWN || lParam == WM_RBUTTONDOWN + || lParam == WM_LBUTTONDBLCLK || lParam == WM_LBUTTONDBLCLK) + { + Component* const current = Component::getCurrentlyModalComponent(); + + if (current != 0) + current->inputAttemptWhenModal(); + } + } + else + { + const int oldModifiers = currentModifiers; + + MouseEvent e (0, 0, ModifierKeys::getCurrentModifiersRealtime(), component, + getMouseEventTime(), 0, 0, getMouseEventTime(), 1, false); + + if (lParam == WM_LBUTTONDOWN || lParam == WM_LBUTTONDBLCLK) + e.mods = ModifierKeys (e.mods.getRawFlags() | ModifierKeys::leftButtonModifier); + else if (lParam == WM_RBUTTONDOWN || lParam == WM_RBUTTONDBLCLK) + e.mods = ModifierKeys (e.mods.getRawFlags() | ModifierKeys::rightButtonModifier); + + if (lParam == WM_LBUTTONDOWN || lParam == WM_RBUTTONDOWN) + { + SetFocus (hwnd); + SetForegroundWindow (hwnd); + + component->mouseDown (e); + } + else if (lParam == WM_LBUTTONUP || lParam == WM_RBUTTONUP) + { + e.mods = ModifierKeys (oldModifiers); + component->mouseUp (e); + } + else if (lParam == WM_LBUTTONDBLCLK || lParam == WM_LBUTTONDBLCLK) + { + e.mods = ModifierKeys (oldModifiers); + component->mouseDoubleClick (e); + } + else if (lParam == WM_MOUSEMOVE) + { + component->mouseMove (e); + } + } + + break; + + case WM_SYNCPAINT: + return 0; + + case WM_PALETTECHANGED: + InvalidateRect (h, 0, 0); + break; + + case WM_DISPLAYCHANGE: + InvalidateRect (h, 0, 0); + createPaletteIfNeeded = true; + // intentional fall-through... + case WM_SETTINGCHANGE: // note the fall-through in the previous case! + doSettingChange(); + break; + + case WM_INITMENU: + if (! hasTitleBar()) + { + if (isFullScreen()) + { + EnableMenuItem ((HMENU) wParam, SC_RESTORE, MF_BYCOMMAND | MF_ENABLED); + EnableMenuItem ((HMENU) wParam, SC_MOVE, MF_BYCOMMAND | MF_GRAYED); + } + else if (! isMinimised()) + { + EnableMenuItem ((HMENU) wParam, SC_MAXIMIZE, MF_BYCOMMAND | MF_GRAYED); + } + } + break; + + case WM_SYSCOMMAND: + switch (wParam & 0xfff0) + { + case SC_CLOSE: + if (hasTitleBar()) + { + PostMessage (h, WM_CLOSE, 0, 0); + return 0; + } + break; + + case SC_KEYMENU: + if (hasTitleBar() && h == GetCapture()) + ReleaseCapture(); + + break; + + case SC_MAXIMIZE: + setFullScreen (true); + return 0; + + case SC_MINIMIZE: + if (! hasTitleBar()) + { + setMinimised (true); + return 0; + } + break; + + case SC_RESTORE: + if (hasTitleBar()) + { + if (isFullScreen()) + { + setFullScreen (false); + return 0; + } + } + else + { + if (isMinimised()) + setMinimised (false); + else if (isFullScreen()) + setFullScreen (false); + + return 0; + } + + break; + + case SC_MONITORPOWER: + case SC_SCREENSAVE: + if (! screenSaverAllowed) + return 0; + + break; + } + + break; + + case WM_NCLBUTTONDOWN: + case WM_NCRBUTTONDOWN: + case WM_NCMBUTTONDOWN: + if (component->isCurrentlyBlockedByAnotherModalComponent()) + { + Component* const current = Component::getCurrentlyModalComponent(); + + if (current != 0) + current->inputAttemptWhenModal(); + } + + break; + + //case WM_IME_STARTCOMPOSITION; + // return 0; + + case WM_GETDLGCODE: + return DLGC_WANTALLKEYS; + + default: + break; + } + } + } + + // (the message manager lock exits before calling this, to avoid deadlocks if + // this calls into non-juce windows) + return DefWindowProc (h, message, wParam, lParam); + } + + Win32ComponentPeer (const Win32ComponentPeer&); + const Win32ComponentPeer& operator= (const Win32ComponentPeer&); +}; + +ComponentPeer* Component::createNewPeer (int styleFlags, void* /*nativeWindowToAttachTo*/) +{ + return new Win32ComponentPeer (this, styleFlags); +} + +juce_ImplementSingleton_SingleThreaded (Win32ComponentPeer::WindowClassHolder); + +void SystemTrayIconComponent::setIconImage (const Image& newImage) +{ + Win32ComponentPeer* const wp = dynamic_cast (getPeer()); + + if (wp != 0) + wp->setTaskBarIcon (&newImage); +} + +void SystemTrayIconComponent::setIconTooltip (const String& tooltip) +{ + Win32ComponentPeer* const wp = dynamic_cast (getPeer()); + + if (wp != 0) + wp->setTaskBarIconToolTip (tooltip); +} + +void juce_setWindowStyleBit (HWND h, const int styleType, const int feature, const bool bitIsSet) throw() +{ + DWORD val = GetWindowLong (h, styleType); + + if (bitIsSet) + val |= feature; + else + val &= ~feature; + + SetWindowLongPtr (h, styleType, val); + SetWindowPos (h, 0, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER + | SWP_NOOWNERZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING); +} + +bool Process::isForegroundProcess() throw() +{ + HWND fg = GetForegroundWindow(); + + if (fg == 0) + return true; + + DWORD processId = 0; + GetWindowThreadProcessId (fg, &processId); + + return processId == GetCurrentProcessId(); +} + +bool AlertWindow::showNativeDialogBox (const String& title, + const String& bodyText, + bool isOkCancel) +{ + return MessageBox (0, bodyText, title, + MB_SETFOREGROUND | (isOkCancel ? MB_OKCANCEL + : MB_OK)) == IDOK; +} + +void Desktop::getMousePosition (int& x, int& y) throw() +{ + POINT mousePos; + GetCursorPos (&mousePos); + x = mousePos.x; + y = mousePos.y; +} + +void Desktop::setMousePosition (int x, int y) throw() +{ + SetCursorPos (x, y); +} + +void Desktop::setScreenSaverEnabled (const bool isEnabled) throw() +{ + screenSaverAllowed = isEnabled; +} + +bool Desktop::isScreenSaverEnabled() throw() +{ + return screenSaverAllowed; +} + +static BOOL CALLBACK enumMonitorsProc (HMONITOR, HDC, LPRECT r, LPARAM userInfo) +{ + Array * const monitorCoords = (Array *) userInfo; + + monitorCoords->add (Rectangle (r->left, r->top, r->right - r->left, r->bottom - r->top)); + + return TRUE; +} + +void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() +{ + EnumDisplayMonitors (0, 0, &enumMonitorsProc, (LPARAM) &monitorCoords); + + // make sure the first in the list is the main monitor + for (int i = 1; i < monitorCoords.size(); ++i) + if (monitorCoords[i].getX() == 0 && monitorCoords[i].getY() == 0) + monitorCoords.swap (i, 0); + + if (monitorCoords.size() == 0) + { + RECT r; + GetWindowRect (GetDesktopWindow(), &r); + + monitorCoords.add (Rectangle (r.left, r.top, r.right - r.left, r.bottom - r.top)); + } + + if (clipToWorkArea) + { + // clip the main monitor to the active non-taskbar area + RECT r; + SystemParametersInfo (SPI_GETWORKAREA, 0, &r, 0); + + Rectangle& screen = monitorCoords.getReference (0); + + screen.setPosition (jmax (screen.getX(), r.left), + jmax (screen.getY(), r.top)); + + screen.setSize (jmin (screen.getRight(), r.right) - screen.getX(), + jmin (screen.getBottom(), r.bottom) - screen.getY()); + } +} + +static Image* createImageFromHBITMAP (HBITMAP bitmap) throw() +{ + Image* im = 0; + + if (bitmap != 0) + { + BITMAP bm; + + if (GetObject (bitmap, sizeof (BITMAP), &bm) + && bm.bmWidth > 0 && bm.bmHeight > 0) + { + HDC tempDC = GetDC (0); + HDC dc = CreateCompatibleDC (tempDC); + ReleaseDC (0, tempDC); + + SelectObject (dc, bitmap); + + im = new Image (Image::ARGB, bm.bmWidth, bm.bmHeight, true); + + for (int y = bm.bmHeight; --y >= 0;) + { + for (int x = bm.bmWidth; --x >= 0;) + { + COLORREF col = GetPixel (dc, x, y); + + im->setPixelAt (x, y, Colour ((uint8) GetRValue (col), + (uint8) GetGValue (col), + (uint8) GetBValue (col))); } } - for (i = 0; i < totalNumOutputChans; ++i) + DeleteDC (dc); + } + } + + return im; +} + +static Image* createImageFromHICON (HICON icon) throw() +{ + ICONINFO info; + + if (GetIconInfo (icon, &info)) + { + Image* const mask = createImageFromHBITMAP (info.hbmMask); + + if (mask == 0) + return 0; + + Image* const image = createImageFromHBITMAP (info.hbmColor); + + if (image == 0) + return mask; + + for (int y = image->getHeight(); --y >= 0;) + { + for (int x = image->getWidth(); --x >= 0;) { - if (outputChannels[i]) + const float brightness = mask->getPixelAt (x, y).getBrightness(); + + if (brightness > 0.0f) + image->multiplyAlphaAt (x, y, 1.0f - brightness); + } + } + + delete mask; + return image; + } + + return 0; +} + +static HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) throw() +{ + HBITMAP mask = CreateBitmap (image.getWidth(), image.getHeight(), 1, 1, 0); + + ICONINFO info; + info.fIcon = isIcon; + info.xHotspot = hotspotX; + info.yHotspot = hotspotY; + info.hbmMask = mask; + HICON hi = 0; + + if (SystemStats::getOperatingSystemType() >= SystemStats::WinXP) + { + WindowsBitmapImage bitmap (Image::ARGB, image.getWidth(), image.getHeight(), true); + Graphics g (bitmap); + g.drawImageAt (&image, 0, 0); + + info.hbmColor = bitmap.hBitmap; + hi = CreateIconIndirect (&info); + } + else + { + HBITMAP colour = CreateCompatibleBitmap (GetDC (0), image.getWidth(), image.getHeight()); + + HDC colDC = CreateCompatibleDC (GetDC (0)); + HDC alphaDC = CreateCompatibleDC (GetDC (0)); + SelectObject (colDC, colour); + SelectObject (alphaDC, mask); + + for (int y = image.getHeight(); --y >= 0;) + { + for (int x = image.getWidth(); --x >= 0;) + { + const Colour c (image.getPixelAt (x, y)); + + SetPixel (colDC, x, y, COLORREF (c.getRed() | (c.getGreen() << 8) | (c.getBlue() << 16))); + SetPixel (alphaDC, x, y, COLORREF (0xffffff - (c.getAlpha() | (c.getAlpha() << 8) | (c.getAlpha() << 16)))); + } + } + + DeleteDC (colDC); + DeleteDC (alphaDC); + + info.hbmColor = colour; + hi = CreateIconIndirect (&info); + DeleteObject (colour); + } + + DeleteObject (mask); + return hi; +} + +Image* juce_createIconForFile (const File& file) +{ + Image* image = 0; + + TCHAR filename [1024]; + file.getFullPathName().copyToBuffer (filename, 1023); + WORD iconNum = 0; + + HICON icon = ExtractAssociatedIcon ((HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle(), + filename, &iconNum); + + if (icon != 0) + { + image = createImageFromHICON (icon); + DestroyIcon (icon); + } + + return image; +} + +void* juce_createMouseCursorFromImage (const Image& image, int hotspotX, int hotspotY) throw() +{ + const int maxW = GetSystemMetrics (SM_CXCURSOR); + const int maxH = GetSystemMetrics (SM_CYCURSOR); + + const Image* im = ℑ + Image* newIm = 0; + + if (image.getWidth() > maxW || image.getHeight() > maxH) + { + im = newIm = image.createCopy (maxW, maxH); + + hotspotX = (hotspotX * maxW) / image.getWidth(); + hotspotY = (hotspotY * maxH) / image.getHeight(); + } + + void* cursorH = 0; + + const SystemStats::OperatingSystemType os = SystemStats::getOperatingSystemType(); + + if (os == SystemStats::WinXP) + { + cursorH = (void*) createHICONFromImage (*im, FALSE, hotspotX, hotspotY); + } + else + { + const int stride = (maxW + 7) >> 3; + uint8* const andPlane = (uint8*) juce_calloc (stride * maxH); + uint8* const xorPlane = (uint8*) juce_calloc (stride * maxH); + int index = 0; + + for (int y = 0; y < maxH; ++y) + { + for (int x = 0; x < maxW; ++x) + { + const unsigned char bit = (unsigned char) (1 << (7 - (x & 7))); + + const Colour pixelColour (im->getPixelAt (x, y)); + + if (pixelColour.getAlpha() < 127) + andPlane [index + (x >> 3)] |= bit; + else if (pixelColour.getBrightness() >= 0.5f) + xorPlane [index + (x >> 3)] |= bit; + } + + index += stride; + } + + cursorH = CreateCursor (0, hotspotX, hotspotY, maxW, maxH, andPlane, xorPlane); + + juce_free (andPlane); + juce_free (xorPlane); + } + + delete newIm; + return cursorH; +} + +void juce_deleteMouseCursor (void* const cursorHandle, const bool isStandard) throw() +{ + if (cursorHandle != 0 && ! isStandard) + DestroyCursor ((HCURSOR) cursorHandle); +} + +void* juce_createStandardMouseCursor (MouseCursor::StandardCursorType type) throw() +{ + LPCTSTR cursorName = IDC_ARROW; + + switch (type) + { + case MouseCursor::NormalCursor: + cursorName = IDC_ARROW; + break; + + case MouseCursor::NoCursor: + return 0; + + case MouseCursor::DraggingHandCursor: + { + static void* dragHandCursor = 0; + + if (dragHandCursor == 0) + { + static const unsigned char dragHandData[] = + { 71,73,70,56,57,97,16,0,16,0,145,2,0,0,0,0,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, + 16,0,0,2,52,148,47,0,200,185,16,130,90,12,74,139,107,84,123,39, 132,117,151,116,132,146,248,60,209,138, + 98,22,203,114,34,236,37,52,77,217,247,154,191,119,110,240,193,128,193,95,163,56,60,234,98,135,2,0,59 }; + + Image* const image = ImageFileFormat::loadFrom ((const char*) dragHandData, sizeof (dragHandData)); + dragHandCursor = juce_createMouseCursorFromImage (*image, 8, 7); + delete image; + } + + return dragHandCursor; + } + + case MouseCursor::WaitCursor: + cursorName = IDC_WAIT; + break; + + case MouseCursor::IBeamCursor: + cursorName = IDC_IBEAM; + break; + + case MouseCursor::PointingHandCursor: + cursorName = MAKEINTRESOURCE(32649); + break; + + case MouseCursor::LeftRightResizeCursor: + case MouseCursor::LeftEdgeResizeCursor: + case MouseCursor::RightEdgeResizeCursor: + cursorName = IDC_SIZEWE; + break; + + case MouseCursor::UpDownResizeCursor: + case MouseCursor::TopEdgeResizeCursor: + case MouseCursor::BottomEdgeResizeCursor: + cursorName = IDC_SIZENS; + break; + + case MouseCursor::TopLeftCornerResizeCursor: + case MouseCursor::BottomRightCornerResizeCursor: + cursorName = IDC_SIZENWSE; + break; + + case MouseCursor::TopRightCornerResizeCursor: + case MouseCursor::BottomLeftCornerResizeCursor: + cursorName = IDC_SIZENESW; + break; + + case MouseCursor::UpDownLeftRightResizeCursor: + cursorName = IDC_SIZEALL; + break; + + case MouseCursor::CrosshairCursor: + cursorName = IDC_CROSS; + break; + + case MouseCursor::CopyingCursor: + // can't seem to find one of these in the win32 list.. + break; + } + + HCURSOR cursorH = LoadCursor (0, cursorName); + + if (cursorH == 0) + cursorH = LoadCursor (0, IDC_ARROW); + + return (void*) cursorH; +} + +void MouseCursor::showInWindow (ComponentPeer*) const throw() +{ + SetCursor ((HCURSOR) getHandle()); +} + +void MouseCursor::showInAllWindows() const throw() +{ + showInWindow (0); +} + +class JuceDropSource : public IDropSource +{ + int refCount; + +public: + JuceDropSource() + : refCount (1) + { + } + + virtual ~JuceDropSource() + { + jassert (refCount == 0); + } + + HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) + { + if (id == IID_IUnknown || id == IID_IDropSource) + { + AddRef(); + *result = this; + return S_OK; + } + + *result = 0; + return E_NOINTERFACE; + } + + ULONG __stdcall AddRef() { return ++refCount; } + ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } + + HRESULT __stdcall QueryContinueDrag (BOOL escapePressed, DWORD keys) + { + if (escapePressed) + return DRAGDROP_S_CANCEL; + + if ((keys & (MK_LBUTTON | MK_RBUTTON)) == 0) + return DRAGDROP_S_DROP; + + return S_OK; + } + + HRESULT __stdcall GiveFeedback (DWORD) + { + return DRAGDROP_S_USEDEFAULTCURSORS; + } +}; + +class JuceEnumFormatEtc : public IEnumFORMATETC +{ +public: + JuceEnumFormatEtc (const FORMATETC* const format_) + : refCount (1), + format (format_), + index (0) + { + } + + virtual ~JuceEnumFormatEtc() + { + jassert (refCount == 0); + } + + HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) + { + if (id == IID_IUnknown || id == IID_IEnumFORMATETC) + { + AddRef(); + *result = this; + return S_OK; + } + + *result = 0; + return E_NOINTERFACE; + } + + ULONG __stdcall AddRef() { return ++refCount; } + ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } + + HRESULT __stdcall Clone (IEnumFORMATETC** result) + { + if (result == 0) + return E_POINTER; + + JuceEnumFormatEtc* const newOne = new JuceEnumFormatEtc (format); + newOne->index = index; + + *result = newOne; + return S_OK; + } + + HRESULT __stdcall Next (ULONG celt, LPFORMATETC lpFormatEtc, ULONG* pceltFetched) + { + if (pceltFetched != 0) + *pceltFetched = 0; + else if (celt != 1) + return S_FALSE; + + if (index == 0 && celt > 0 && lpFormatEtc != 0) + { + copyFormatEtc (lpFormatEtc [0], *format); + ++index; + + if (pceltFetched != 0) + *pceltFetched = 1; + + return S_OK; + } + + return S_FALSE; + } + + HRESULT __stdcall Skip (ULONG celt) + { + if (index + (int) celt >= 1) + return S_FALSE; + + index += celt; + return S_OK; + } + + HRESULT __stdcall Reset() + { + index = 0; + return S_OK; + } + +private: + int refCount; + const FORMATETC* const format; + int index; + + static void copyFormatEtc (FORMATETC& dest, const FORMATETC& source) + { + dest = source; + + if (source.ptd != 0) + { + dest.ptd = (DVTARGETDEVICE*) CoTaskMemAlloc (sizeof (DVTARGETDEVICE)); + *(dest.ptd) = *(source.ptd); + } + } + + JuceEnumFormatEtc (const JuceEnumFormatEtc&); + const JuceEnumFormatEtc& operator= (const JuceEnumFormatEtc&); +}; + +class JuceDataObject : public IDataObject +{ + JuceDropSource* const dropSource; + const FORMATETC* const format; + const STGMEDIUM* const medium; + int refCount; + + JuceDataObject (const JuceDataObject&); + const JuceDataObject& operator= (const JuceDataObject&); + +public: + JuceDataObject (JuceDropSource* const dropSource_, + const FORMATETC* const format_, + const STGMEDIUM* const medium_) + : dropSource (dropSource_), + format (format_), + medium (medium_), + refCount (1) + { + } + + virtual ~JuceDataObject() + { + jassert (refCount == 0); + } + + HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) + { + if (id == IID_IUnknown || id == IID_IDataObject) + { + AddRef(); + *result = this; + return S_OK; + } + + *result = 0; + return E_NOINTERFACE; + } + + ULONG __stdcall AddRef() { return ++refCount; } + ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } + + HRESULT __stdcall GetData (FORMATETC __RPC_FAR* pFormatEtc, STGMEDIUM __RPC_FAR* pMedium) + { + if (pFormatEtc->tymed == format->tymed + && pFormatEtc->cfFormat == format->cfFormat + && pFormatEtc->dwAspect == format->dwAspect) + { + pMedium->tymed = format->tymed; + pMedium->pUnkForRelease = 0; + + if (format->tymed == TYMED_HGLOBAL) + { + const SIZE_T len = GlobalSize (medium->hGlobal); + void* const src = GlobalLock (medium->hGlobal); + void* const dst = GlobalAlloc (GMEM_FIXED, len); + + memcpy (dst, src, len); + + GlobalUnlock (medium->hGlobal); + + pMedium->hGlobal = dst; + return S_OK; + } + } + + return DV_E_FORMATETC; + } + + HRESULT __stdcall QueryGetData (FORMATETC __RPC_FAR* f) + { + if (f == 0) + return E_INVALIDARG; + + if (f->tymed == format->tymed + && f->cfFormat == format->cfFormat + && f->dwAspect == format->dwAspect) + return S_OK; + + return DV_E_FORMATETC; + } + + HRESULT __stdcall GetCanonicalFormatEtc (FORMATETC __RPC_FAR*, FORMATETC __RPC_FAR* pFormatEtcOut) + { + pFormatEtcOut->ptd = 0; + return E_NOTIMPL; + } + + HRESULT __stdcall EnumFormatEtc (DWORD direction, IEnumFORMATETC __RPC_FAR *__RPC_FAR *result) + { + if (result == 0) + return E_POINTER; + + if (direction == DATADIR_GET) + { + *result = new JuceEnumFormatEtc (format); + return S_OK; + } + + *result = 0; + return E_NOTIMPL; + } + + HRESULT __stdcall GetDataHere (FORMATETC __RPC_FAR*, STGMEDIUM __RPC_FAR*) { return DATA_E_FORMATETC; } + HRESULT __stdcall SetData (FORMATETC __RPC_FAR*, STGMEDIUM __RPC_FAR*, BOOL) { return E_NOTIMPL; } + HRESULT __stdcall DAdvise (FORMATETC __RPC_FAR*, DWORD, IAdviseSink __RPC_FAR*, DWORD __RPC_FAR*) { return OLE_E_ADVISENOTSUPPORTED; } + HRESULT __stdcall DUnadvise (DWORD) { return E_NOTIMPL; } + HRESULT __stdcall EnumDAdvise (IEnumSTATDATA __RPC_FAR *__RPC_FAR *) { return OLE_E_ADVISENOTSUPPORTED; } +}; + +static HDROP createHDrop (const StringArray& fileNames) throw() +{ + int totalChars = 0; + for (int i = fileNames.size(); --i >= 0;) + totalChars += fileNames[i].length() + 1; + + HDROP hDrop = (HDROP) GlobalAlloc (GMEM_MOVEABLE | GMEM_ZEROINIT, + sizeof (DROPFILES) + + sizeof (WCHAR) * (totalChars + 2)); + + if (hDrop != 0) + { + LPDROPFILES pDropFiles = (LPDROPFILES) GlobalLock (hDrop); + pDropFiles->pFiles = sizeof (DROPFILES); + + pDropFiles->fWide = true; + + WCHAR* fname = (WCHAR*) (((char*) pDropFiles) + sizeof (DROPFILES)); + + for (int i = 0; i < fileNames.size(); ++i) + { + fileNames[i].copyToBuffer (fname, 2048); + fname += fileNames[i].length() + 1; + } + + *fname = 0; + + GlobalUnlock (hDrop); + } + + return hDrop; +} + +static bool performDragDrop (FORMATETC* const format, STGMEDIUM* const medium, const DWORD whatToDo) throw() +{ + JuceDropSource* const source = new JuceDropSource(); + JuceDataObject* const data = new JuceDataObject (source, format, medium); + + DWORD effect; + const HRESULT res = DoDragDrop (data, source, whatToDo, &effect); + + data->Release(); + source->Release(); + + return res == DRAGDROP_S_DROP; +} + +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMove) +{ + FORMATETC format = { CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; + STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; + + medium.hGlobal = createHDrop (files); + + return performDragDrop (&format, &medium, canMove ? (DROPEFFECT_COPY | DROPEFFECT_MOVE) + : DROPEFFECT_COPY); +} + +bool DragAndDropContainer::performExternalDragDropOfText (const String& text) +{ + FORMATETC format = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; + STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; + + const int numChars = text.length(); + + medium.hGlobal = GlobalAlloc (GMEM_MOVEABLE | GMEM_ZEROINIT, (numChars + 2) * sizeof (WCHAR)); + char* d = (char*) GlobalLock (medium.hGlobal); + + text.copyToBuffer ((WCHAR*) d, numChars + 1); + format.cfFormat = CF_UNICODETEXT; + + GlobalUnlock (medium.hGlobal); + + return performDragDrop (&format, &medium, DROPEFFECT_COPY | DROPEFFECT_MOVE); +} + +#endif +/********* End of inlined file: juce_win32_Windowing.cpp *********/ + +/********* Start of inlined file: juce_win32_Fonts.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE + +static int CALLBACK wfontEnum2 (ENUMLOGFONTEXW* lpelfe, + NEWTEXTMETRICEXW*, + int type, + LPARAM lParam) +{ + if (lpelfe != 0 && type == TRUETYPE_FONTTYPE) + { + const String fontName (lpelfe->elfLogFont.lfFaceName); + + ((StringArray*) lParam)->addIfNotAlreadyThere (fontName.removeCharacters (T("@"))); + } + + return 1; +} + +static int CALLBACK wfontEnum1 (ENUMLOGFONTEXW* lpelfe, + NEWTEXTMETRICEXW*, + int type, + LPARAM lParam) +{ + if (lpelfe != 0 + && ((type & (DEVICE_FONTTYPE | RASTER_FONTTYPE)) == 0)) + { + LOGFONTW lf; + zerostruct (lf); + + lf.lfWeight = FW_DONTCARE; + lf.lfOutPrecision = OUT_TT_ONLY_PRECIS; + lf.lfQuality = DEFAULT_QUALITY; + lf.lfCharSet = DEFAULT_CHARSET; + lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf.lfPitchAndFamily = FF_DONTCARE; + + const String fontName (lpelfe->elfLogFont.lfFaceName); + fontName.copyToBuffer (lf.lfFaceName, LF_FACESIZE - 1); + + HDC dc = CreateCompatibleDC (0); + EnumFontFamiliesEx (dc, &lf, + (FONTENUMPROCW) &wfontEnum2, + lParam, 0); + DeleteDC (dc); + } + + return 1; +} + +const StringArray Font::findAllTypefaceNames() throw() +{ + StringArray results; + HDC dc = CreateCompatibleDC (0); + + { + LOGFONTW lf; + zerostruct (lf); + + lf.lfWeight = FW_DONTCARE; + lf.lfOutPrecision = OUT_TT_ONLY_PRECIS; + lf.lfQuality = DEFAULT_QUALITY; + lf.lfCharSet = DEFAULT_CHARSET; + lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lf.lfPitchAndFamily = FF_DONTCARE; + lf.lfFaceName[0] = 0; + + EnumFontFamiliesEx (dc, &lf, + (FONTENUMPROCW) &wfontEnum1, + (LPARAM) &results, 0); + } + + DeleteDC (dc); + + results.sort (true); + return results; +} + +extern bool juce_IsRunningInWine() throw(); + +void Font::getDefaultFontNames (String& defaultSans, + String& defaultSerif, + String& defaultFixed) throw() +{ + if (juce_IsRunningInWine()) + { + // If we're running in Wine, then use fonts that might be available on Linux.. + defaultSans = "Bitstream Vera Sans"; + defaultSerif = "Bitstream Vera Serif"; + defaultFixed = "Bitstream Vera Sans Mono"; + } + else + { + defaultSans = "Verdana"; + defaultSerif = "Times"; + defaultFixed = "Lucida Console"; + } +} + +class FontDCHolder : private DeletedAtShutdown +{ + HDC dc; + String fontName; + KERNINGPAIR* kps; + int numKPs; + bool bold, italic; + int size; + + FontDCHolder (const FontDCHolder&); + const FontDCHolder& operator= (const FontDCHolder&); + +public: + HFONT fontH; + + FontDCHolder() throw() + : dc (0), + kps (0), + numKPs (0), + bold (false), + italic (false), + size (0) + { + } + + ~FontDCHolder() throw() + { + if (dc != 0) + { + DeleteDC (dc); + DeleteObject (fontH); + juce_free (kps); + } + + clearSingletonInstance(); + } + + juce_DeclareSingleton_SingleThreaded_Minimal (FontDCHolder); + + HDC loadFont (const String& fontName_, + const bool bold_, + const bool italic_, + const int size_) throw() + { + if (fontName != fontName_ || bold != bold_ || italic != italic_ || size != size_) + { + fontName = fontName_; + bold = bold_; + italic = italic_; + size = size_; + + if (dc != 0) + { + DeleteDC (dc); + DeleteObject (fontH); + + juce_free (kps); + kps = 0; + } + + fontH = 0; + + dc = CreateCompatibleDC (0); + SetMapperFlags (dc, 0); + SetMapMode (dc, MM_TEXT); + + LOGFONTW lfw; + zerostruct (lfw); + + lfw.lfCharSet = DEFAULT_CHARSET; + lfw.lfClipPrecision = CLIP_DEFAULT_PRECIS; + lfw.lfOutPrecision = OUT_OUTLINE_PRECIS; + lfw.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; + lfw.lfQuality = PROOF_QUALITY; + lfw.lfItalic = (BYTE) (italic ? TRUE : FALSE); + lfw.lfWeight = bold ? FW_BOLD : FW_NORMAL; + fontName.copyToBuffer (lfw.lfFaceName, LF_FACESIZE - 1); + + lfw.lfHeight = size > 0 ? size : -256; + HFONT standardSizedFont = CreateFontIndirect (&lfw); + + if (standardSizedFont != 0) + { + if (SelectObject (dc, standardSizedFont) != 0) { - currentChansOut.setBit (i); - info->isInput = 0; - info->channelNum = i; - info->buffers[0] = info->buffers[1] = 0; - ++info; - ++numActiveOutputChans; + fontH = standardSizedFont; + + if (size == 0) + { + OUTLINETEXTMETRIC otm; + if (GetOutlineTextMetrics (dc, sizeof (otm), &otm) != 0) + { + lfw.lfHeight = -(int) otm.otmEMSquare; + fontH = CreateFontIndirect (&lfw); + + SelectObject (dc, fontH); + DeleteObject (standardSizedFont); + } + } + } + else + { + jassertfalse } - } - - const int totalBuffers = numActiveInputChans + numActiveOutputChans; - - callbacks.sampleRateDidChange = &sampleRateChangedCallback; - - if (currentASIODev[0] == this) - { - callbacks.bufferSwitch = &bufferSwitchCallback0; - callbacks.asioMessage = &asioMessagesCallback0; - callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback0; - } - else if (currentASIODev[1] == this) - { - callbacks.bufferSwitch = &bufferSwitchCallback1; - callbacks.asioMessage = &asioMessagesCallback1; - callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback1; - } - else if (currentASIODev[2] == this) - { - callbacks.bufferSwitch = &bufferSwitchCallback2; - callbacks.asioMessage = &asioMessagesCallback2; - callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback2; } else { jassertfalse } - - log ("disposing buffers"); - err = asioObject->disposeBuffers(); - - log (T("creating buffers: ") + String (totalBuffers) + T(", ") + String (currentBlockSizeSamples)); - err = asioObject->createBuffers (bufferInfos, - totalBuffers, - currentBlockSizeSamples, - &callbacks); - - if (err != 0) - { - currentBlockSizeSamples = preferredSize; - logError ("create buffers 2", err); - - asioObject->disposeBuffers(); - err = asioObject->createBuffers (bufferInfos, - totalBuffers, - currentBlockSizeSamples, - &callbacks); - } - - if (err == 0) - { - buffersCreated = true; - - juce_free (tempBuffer); - - tempBuffer = (float*) juce_calloc (totalBuffers * currentBlockSizeSamples * sizeof (float) + 128); - - int n = 0; - Array types; - currentBitDepth = 16; - - for (i = 0; i < jmin (totalNumInputChans, maxASIOChannels); ++i) - { - if (inputChannels[i]) - { - inBuffers[n] = tempBuffer + (currentBlockSizeSamples * n); - - ASIOChannelInfo channelInfo; - zerostruct (channelInfo); - - channelInfo.channel = i; - channelInfo.isInput = 1; - asioObject->getChannelInfo (&channelInfo); - - types.addIfNotAlreadyThere (channelInfo.type); - typeToFormatParameters (channelInfo.type, - inputChannelBitDepths[n], - inputChannelBytesPerSample[n], - inputChannelIsFloat[n], - inputChannelLittleEndian[n]); - - currentBitDepth = jmax (currentBitDepth, inputChannelBitDepths[n]); - - ++n; - } - } - - jassert (numActiveInputChans == n); - n = 0; - - for (i = 0; i < jmin (totalNumOutputChans, maxASIOChannels); ++i) - { - if (outputChannels[i]) - { - outBuffers[n] = tempBuffer + (currentBlockSizeSamples * (numActiveInputChans + n)); - - ASIOChannelInfo channelInfo; - zerostruct (channelInfo); - - channelInfo.channel = i; - channelInfo.isInput = 0; - asioObject->getChannelInfo (&channelInfo); - - types.addIfNotAlreadyThere (channelInfo.type); - typeToFormatParameters (channelInfo.type, - outputChannelBitDepths[n], - outputChannelBytesPerSample[n], - outputChannelIsFloat[n], - outputChannelLittleEndian[n]); - - currentBitDepth = jmax (currentBitDepth, outputChannelBitDepths[n]); - - ++n; - } - } - - jassert (numActiveOutputChans == n); - - for (i = types.size(); --i >= 0;) - { - log (T("channel format: ") + String (types[i])); - } - - jassert (n <= totalBuffers); - - for (i = 0; i < numActiveOutputChans; ++i) - { - const int size = currentBlockSizeSamples * (outputChannelBitDepths[i] >> 3); - - if (bufferInfos [numActiveInputChans + i].buffers[0] == 0 - || bufferInfos [numActiveInputChans + i].buffers[1] == 0) - { - log ("!! Null buffers"); - } - else - { - zeromem (bufferInfos[numActiveInputChans + i].buffers[0], size); - zeromem (bufferInfos[numActiveInputChans + i].buffers[1], size); - } - } - - inputLatency = outputLatency = 0; - - if (asioObject->getLatencies (&inputLatency, &outputLatency) != 0) - { - log ("ASIO - no latencies"); - } - else - { - log (T("ASIO latencies: ") - + String ((int) outputLatency) - + T(", ") - + String ((int) inputLatency)); - } - - isOpen_ = true; - - log ("starting ASIO"); - calledback = false; - err = asioObject->start(); - - if (err != 0) - { - isOpen_ = false; - log ("ASIO - stop on failure"); - Thread::sleep (10); - asioObject->stop(); - error = "Can't start device"; - Thread::sleep (10); - } - else - { - int count = 300; - while (--count > 0 && ! calledback) - Thread::sleep (10); - - isStarted = true; - - if (! calledback) - { - error = "Device didn't start correctly"; - log ("ASIO didn't callback - stopping.."); - asioObject->stop(); - } - } - } - else - { - error = "Can't create i/o buffers"; - } } - else + + return dc; + } + + KERNINGPAIR* getKerningPairs (int& numKPs_) throw() + { + if (kps == 0) { - error = "Can't set sample rate: "; - error << sampleRate; + numKPs = GetKerningPairs (dc, 0, 0); + kps = (KERNINGPAIR*) juce_calloc (sizeof (KERNINGPAIR) * numKPs); + GetKerningPairs (dc, numKPs, kps); } - if (error.isNotEmpty()) + numKPs_ = numKPs; + return kps; + } +}; + +juce_ImplementSingleton_SingleThreaded (FontDCHolder); + +static bool addGlyphToTypeface (HDC dc, + juce_wchar character, + Typeface& dest, + bool addKerning) +{ + Path destShape; + GLYPHMETRICS gm; + + float height; + BOOL ok = false; + + { + const WCHAR charToTest[] = { (WCHAR) character, 0 }; + WORD index = 0; + + if (GetGlyphIndices (dc, charToTest, 1, &index, GGI_MARK_NONEXISTING_GLYPHS) != GDI_ERROR + && index == 0xffff) { - logError (error, err); - - if (asioObject != 0 && buffersCreated) - asioObject->disposeBuffers(); - - Thread::sleep (20); - isStarted = false; - isOpen_ = false; - close(); - } - - needToReset = false; - isReSync = false; - - return error; - } - - void close() - { - error = String::empty; - stopTimer(); - stop(); - - if (isASIOOpen && isOpen_) - { - const ScopedLock sl (callbackLock); - - isOpen_ = false; - isStarted = false; - needToReset = false; - isReSync = false; - - log ("ASIO - stopping"); - - if (asioObject != 0) - { - Thread::sleep (20); - asioObject->stop(); - Thread::sleep (10); - asioObject->disposeBuffers(); - } - - Thread::sleep (10); + return false; } } - bool isOpen() - { - return isOpen_ || insideControlPanelModalLoop; - } - - int getCurrentBufferSizeSamples() - { - return currentBlockSizeSamples; - } - - double getCurrentSampleRate() - { - return currentSampleRate; - } - - const BitArray getActiveOutputChannels() const - { - return currentChansOut; - } - - const BitArray getActiveInputChannels() const - { - return currentChansIn; - } - - int getCurrentBitDepth() - { - return currentBitDepth; - } - - int getOutputLatencyInSamples() - { - return outputLatency + currentBlockSizeSamples / 4; - } - - int getInputLatencyInSamples() - { - return inputLatency + currentBlockSizeSamples / 4; - } - - void start (AudioIODeviceCallback* callback) - { - if (callback != 0) - { - callback->audioDeviceAboutToStart (this); - - const ScopedLock sl (callbackLock); - currentCallback = callback; - } - } - - void stop() - { - AudioIODeviceCallback* const lastCallback = currentCallback; - - { - const ScopedLock sl (callbackLock); - currentCallback = 0; - } - - if (lastCallback != 0) - lastCallback->audioDeviceStopped(); - } - - bool isPlaying() - { - return isASIOOpen && (currentCallback != 0); - } - - const String getLastError() - { - return error; - } - - bool hasControlPanel() const + TEXTMETRIC tm; + ok = GetTextMetrics (dc, &tm); + + height = (float) tm.tmHeight; + + if (! ok) { + dest.addGlyph (character, destShape, 0); return true; } - bool showControlPanel() + const float scaleX = 1.0f / height; + const float scaleY = -1.0f / height; + static const MAT2 identityMatrix = { { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 1 } }; + + const int bufSize = GetGlyphOutline (dc, character, GGO_NATIVE, + &gm, 0, 0, &identityMatrix); + + if (bufSize > 0) { - log ("ASIO - showing control panel"); + char* const data = (char*) juce_malloc (bufSize); - Component modalWindow (String::empty); - modalWindow.setOpaque (true); - modalWindow.addToDesktop (0); - modalWindow.enterModalState(); - bool done = false; + GetGlyphOutline (dc, character, GGO_NATIVE, &gm, + bufSize, data, &identityMatrix); - JUCE_TRY + const TTPOLYGONHEADER* pheader = (TTPOLYGONHEADER*) data; + + while ((char*) pheader < data + bufSize) { - close(); - insideControlPanelModalLoop = true; + #define remapX(v) (scaleX * (v).x.value) + #define remapY(v) (scaleY * (v).y.value) - const uint32 started = Time::getMillisecondCounter(); + float x = remapX (pheader->pfxStart); + float y = remapY (pheader->pfxStart); - if (asioObject != 0) + destShape.startNewSubPath (x, y); + + const TTPOLYCURVE* curve = (const TTPOLYCURVE*) ((const char*) pheader + sizeof (TTPOLYGONHEADER)); + const char* const curveEnd = ((const char*) pheader) + pheader->cb; + + while ((const char*) curve < curveEnd) { - asioObject->controlPanel(); - - const int spent = (int) Time::getMillisecondCounter() - (int) started; - - log (T("spent: ") + String (spent)); - - if (spent > 300) + if (curve->wType == TT_PRIM_LINE) { - shouldUsePreferredSize = true; - done = true; + for (int i = 0; i < curve->cpfx; ++i) + { + x = remapX (curve->apfx [i]); + y = remapY (curve->apfx [i]); + + destShape.lineTo (x, y); + } + } + else if (curve->wType == TT_PRIM_QSPLINE) + { + for (int i = 0; i < curve->cpfx - 1; ++i) + { + const float x2 = remapX (curve->apfx [i]); + const float y2 = remapY (curve->apfx [i]); + float x3, y3; + + if (i < curve->cpfx - 2) + { + x3 = 0.5f * (x2 + remapX (curve->apfx [i + 1])); + y3 = 0.5f * (y2 + remapY (curve->apfx [i + 1])); + } + else + { + x3 = remapX (curve->apfx [i + 1]); + y3 = remapY (curve->apfx [i + 1]); + } + + destShape.quadraticTo (x2, y2, x3, y3); + + x = x3; + y = y3; + } + } + + curve = (const TTPOLYCURVE*) &(curve->apfx [curve->cpfx]); + } + + pheader = (const TTPOLYGONHEADER*) curve; + + destShape.closeSubPath(); + } + + juce_free (data); + } + + dest.addGlyph (character, destShape, gm.gmCellIncX / height); + + if (addKerning) + { + int numKPs; + const KERNINGPAIR* const kps = FontDCHolder::getInstance()->getKerningPairs (numKPs); + + for (int i = 0; i < numKPs; ++i) + { + if (kps[i].wFirst == character) + { + dest.addKerningPair (kps[i].wFirst, + kps[i].wSecond, + kps[i].iKernAmount / height); + } + } + } + + return true; +} + +bool Typeface::findAndAddSystemGlyph (juce_wchar character) throw() +{ + HDC dc = FontDCHolder::getInstance()->loadFont (getName(), isBold(), isItalic(), 0); + return addGlyphToTypeface (dc, character, *this, true); +} + +/*Image* Typeface::renderGlyphToImage (juce_wchar character, float& topLeftX, float& topLeftY) +{ + HDC dc = FontDCHolder::getInstance()->loadFont (getName(), isBold(), isItalic(), hintingSize); + + int bufSize; + GLYPHMETRICS gm; + + const UINT format = GGO_GRAY2_BITMAP; + const int shift = 6; + + if (wGetGlyphOutlineW != 0) + bufSize = wGetGlyphOutlineW (dc, character, format, &gm, 0, 0, &identityMatrix); + else + bufSize = GetGlyphOutline (dc, character, format, &gm, 0, 0, &identityMatrix); + + Image* im = new Image (Image::SingleChannel, jmax (1, gm.gmBlackBoxX), jmax (1, gm.gmBlackBoxY), true); + + if (bufSize > 0) + { + topLeftX = (float) gm.gmptGlyphOrigin.x; + topLeftY = (float) -gm.gmptGlyphOrigin.y; + + uint8* const data = (uint8*) juce_calloc (bufSize); + + if (wGetGlyphOutlineW != 0) + wGetGlyphOutlineW (dc, character, format, &gm, bufSize, data, &identityMatrix); + else + GetGlyphOutline (dc, character, format, &gm, bufSize, data, &identityMatrix); + + const int stride = ((gm.gmBlackBoxX + 3) & ~3); + + for (int y = gm.gmBlackBoxY; --y >= 0;) + { + for (int x = gm.gmBlackBoxX; --x >= 0;) + { + const int level = data [x + y * stride] << shift; + + if (level > 0) + im->setPixelAt (x, y, Colour ((uint8) 0xff, (uint8) 0xff, (uint8) 0xff, (uint8) jmin (0xff, level))); + } + } + + juce_free (data); + } + + return im; +}*/ + +void Typeface::initialiseTypefaceCharacteristics (const String& fontName, + bool bold, + bool italic, + bool addAllGlyphsToFont) throw() +{ + clear(); + + HDC dc = FontDCHolder::getInstance()->loadFont (fontName, bold, italic, 0); + + float height; + int firstChar, lastChar; + + { + TEXTMETRIC tm; + GetTextMetrics (dc, &tm); + + height = (float) tm.tmHeight; + firstChar = tm.tmFirstChar; + lastChar = tm.tmLastChar; + + setAscent (tm.tmAscent / height); + setDefaultCharacter (tm.tmDefaultChar); + } + + setName (fontName); + setBold (bold); + setItalic (italic); + + if (addAllGlyphsToFont) + { + for (int character = firstChar; character <= lastChar; ++character) + addGlyphToTypeface (dc, (juce_wchar) character, *this, false); + + int numKPs; + const KERNINGPAIR* const kps = FontDCHolder::getInstance()->getKerningPairs (numKPs); + + for (int i = 0; i < numKPs; ++i) + { + addKerningPair (kps[i].wFirst, + kps[i].wSecond, + kps[i].iKernAmount / height); + } + } +} + +#endif +/********* End of inlined file: juce_win32_Fonts.cpp *********/ + +/********* Start of inlined file: juce_win32_FileChooser.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE + +static const void* defaultDirPath = 0; +static String returnedString; // need this to get non-existent pathnames from the directory chooser +static Component* currentExtraFileWin = 0; + +static bool areThereAnyAlwaysOnTopWindows() +{ + for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;) + { + Component* c = Desktop::getInstance().getComponent (i); + + if (c != 0 && c->isAlwaysOnTop() && c->isShowing()) + return true; + } + + return false; +} + +static int CALLBACK browseCallbackProc (HWND hWnd, UINT msg, LPARAM lParam, LPARAM /*lpData*/) +{ + if (msg == BFFM_INITIALIZED) + { + SendMessage (hWnd, BFFM_SETSELECTIONW, TRUE, (LPARAM) defaultDirPath); + } + else if (msg == BFFM_VALIDATEFAILEDW) + { + returnedString = (LPCWSTR) lParam; + } + else if (msg == BFFM_VALIDATEFAILEDA) + { + returnedString = (const char*) lParam; + } + + return 0; +} + +void juce_setWindowStyleBit (HWND h, int styleType, int feature, bool bitIsSet); + +static UINT_PTR CALLBACK openCallback (HWND hdlg, UINT uiMsg, WPARAM /*wParam*/, LPARAM lParam) +{ + if (currentExtraFileWin != 0) + { + if (uiMsg == WM_INITDIALOG) + { + HWND dialogH = GetParent (hdlg); + jassert (dialogH != 0); + if (dialogH == 0) + dialogH = hdlg; + + RECT r, cr; + GetWindowRect (dialogH, &r); + GetClientRect (dialogH, &cr); + + SetWindowPos (dialogH, 0, + r.left, r.top, + currentExtraFileWin->getWidth() + jmax (150, r.right - r.left), + jmax (150, r.bottom - r.top), + SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); + + currentExtraFileWin->setBounds (cr.right, cr.top, currentExtraFileWin->getWidth(), cr.bottom - cr.top); + currentExtraFileWin->getChildComponent(0)->setBounds (0, 0, currentExtraFileWin->getWidth(), currentExtraFileWin->getHeight()); + + SetParent ((HWND) currentExtraFileWin->getWindowHandle(), (HWND) dialogH); + juce_setWindowStyleBit ((HWND)currentExtraFileWin->getWindowHandle(), GWL_STYLE, WS_CHILD, (dialogH != 0)); + juce_setWindowStyleBit ((HWND)currentExtraFileWin->getWindowHandle(), GWL_STYLE, WS_POPUP, (dialogH == 0)); + } + else if (uiMsg == WM_NOTIFY) + { + LPOFNOTIFY ofn = (LPOFNOTIFY) lParam; + + if (ofn->hdr.code == CDN_SELCHANGE) + { + FilePreviewComponent* comp = (FilePreviewComponent*) currentExtraFileWin->getChildComponent(0); + + if (comp != 0) + { + TCHAR path [MAX_PATH * 2]; + path[0] = 0; + CommDlg_OpenSave_GetFilePath (GetParent (hdlg), (LPARAM) &path, MAX_PATH); + + const String fn ((const WCHAR*) path); + + comp->selectedFileChanged (File (fn)); } } } - JUCE_CATCH_ALL - - insideControlPanelModalLoop = false; - return done; } - void resetRequest() throw() + return 0; +} + +class FPComponentHolder : public Component +{ +public: + FPComponentHolder() { - needToReset = true; + setVisible (true); + setOpaque (true); } - void resyncRequest() throw() + ~FPComponentHolder() { - needToReset = true; - isReSync = true; } - void timerCallback() + void paint (Graphics& g) { - if (! insideControlPanelModalLoop) + g.fillAll (Colours::lightgrey); + } + +private: + FPComponentHolder (const FPComponentHolder&); + const FPComponentHolder& operator= (const FPComponentHolder&); +}; + +void FileChooser::showPlatformDialog (OwnedArray& results, + const String& title, + const File& currentFileOrDirectory, + const String& filter, + bool selectsDirectory, + bool isSaveDialogue, + bool warnAboutOverwritingExistingFiles, + bool selectMultipleFiles, + FilePreviewComponent* extraInfoComponent) +{ + const int numCharsAvailable = 32768; + MemoryBlock filenameSpace ((numCharsAvailable + 1) * sizeof (WCHAR), true); + WCHAR* const fname = (WCHAR*) filenameSpace.getData(); + int fnameIdx = 0; + + JUCE_TRY + { + // use a modal window as the parent for this dialog box + // to block input from other app windows + const Rectangle mainMon (Desktop::getInstance().getMainMonitorArea()); + + Component w (String::empty); + w.setBounds (mainMon.getX() + mainMon.getWidth() / 4, + mainMon.getY() + mainMon.getHeight() / 4, + 0, 0); + w.setOpaque (true); + w.setAlwaysOnTop (areThereAnyAlwaysOnTopWindows()); + w.addToDesktop (0); + + if (extraInfoComponent == 0) + w.enterModalState(); + + String initialDir; + + if (currentFileOrDirectory.isDirectory()) { - stopTimer(); + initialDir = currentFileOrDirectory.getFullPathName(); + } + else + { + currentFileOrDirectory.getFileName().copyToBuffer (fname, numCharsAvailable); - // used to cause a reset - log ("! ASIO restart request!"); + initialDir = currentFileOrDirectory.getParentDirectory().getFullPathName(); + } + + if (currentExtraFileWin->isValidComponent()) + { + jassertfalse + return; + } + + if (selectsDirectory) + { + LPITEMIDLIST list = 0; + filenameSpace.fillWith (0); - if (isOpen_) { - AudioIODeviceCallback* const oldCallback = currentCallback; + BROWSEINFO bi; + zerostruct (bi); - close(); - open (BitArray (currentChansIn), BitArray (currentChansOut), - currentSampleRate, currentBlockSizeSamples); + bi.hwndOwner = (HWND) w.getWindowHandle(); + bi.pszDisplayName = fname; + bi.lpszTitle = title; + bi.lpfn = browseCallbackProc; +#ifdef BIF_USENEWUI + bi.ulFlags = BIF_USENEWUI | BIF_VALIDATE; +#else + bi.ulFlags = 0x50; +#endif + defaultDirPath = (const WCHAR*) initialDir; - if (oldCallback != 0) - start (oldCallback); + list = SHBrowseForFolder (&bi); + + if (! SHGetPathFromIDListW (list, fname)) + { + fname[0] = 0; + returnedString = String::empty; + } + } + + LPMALLOC al; + if (list != 0 && SUCCEEDED (SHGetMalloc (&al))) + al->Free (list); + + defaultDirPath = 0; + + if (returnedString.isNotEmpty()) + { + const String stringFName (fname); + + results.add (new File (File (stringFName).getSiblingFile (returnedString))); + returnedString = String::empty; + + return; } } else { - startTimer (100); + DWORD flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR | OFN_HIDEREADONLY; + + if (warnAboutOverwritingExistingFiles) + flags |= OFN_OVERWRITEPROMPT; + + if (selectMultipleFiles) + flags |= OFN_ALLOWMULTISELECT; + + if (extraInfoComponent != 0) + { + flags |= OFN_ENABLEHOOK; + + currentExtraFileWin = new FPComponentHolder(); + currentExtraFileWin->addAndMakeVisible (extraInfoComponent); + currentExtraFileWin->setSize (jlimit (20, 800, extraInfoComponent->getWidth()), + extraInfoComponent->getHeight()); + currentExtraFileWin->addToDesktop (0); + + currentExtraFileWin->enterModalState(); + } + + { + WCHAR filters [1024]; + zeromem (filters, sizeof (filters)); + filter.copyToBuffer (filters, 1024); + filter.copyToBuffer (filters + filter.length() + 1, + 1022 - filter.length()); + + OPENFILENAMEW of; + zerostruct (of); + +#ifdef OPENFILENAME_SIZE_VERSION_400W + of.lStructSize = OPENFILENAME_SIZE_VERSION_400W; +#else + of.lStructSize = sizeof (of); +#endif + of.hwndOwner = (HWND) w.getWindowHandle(); + of.lpstrFilter = filters; + of.nFilterIndex = 1; + of.lpstrFile = fname; + of.nMaxFile = numCharsAvailable; + of.lpstrInitialDir = initialDir; + of.lpstrTitle = title; + of.Flags = flags; + + if (extraInfoComponent != 0) + of.lpfnHook = &openCallback; + + if (isSaveDialogue) + { + if (! GetSaveFileName (&of)) + fname[0] = 0; + else + fnameIdx = of.nFileOffset; + } + else + { + if (! GetOpenFileName (&of)) + fname[0] = 0; + else + fnameIdx = of.nFileOffset; + } + } } } +#if JUCE_CATCH_UNHANDLED_EXCEPTIONS + catch (...) + { + fname[0] = 0; + } +#endif + + deleteAndZero (currentExtraFileWin); + + const WCHAR* const files = fname; + + if (selectMultipleFiles && fnameIdx > 0 && files [fnameIdx - 1] == 0) + { + const WCHAR* filename = files + fnameIdx; + + while (*filename != 0) + { + const String filepath (String (files) + T("\\") + String (filename)); + results.add (new File (filepath)); + filename += CharacterFunctions::length (filename) + 1; + } + } + else if (files[0] != 0) + { + results.add (new File (files)); + } +} + +#endif +/********* End of inlined file: juce_win32_FileChooser.cpp *********/ + +/********* Start of inlined file: juce_win32_Misc.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE + +void SystemClipboard::copyTextToClipboard (const String& text) throw() +{ + if (OpenClipboard (0) != 0) + { + if (EmptyClipboard() != 0) + { + const int len = text.length(); + + if (len > 0) + { + HGLOBAL bufH = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, + (len + 1) * sizeof (wchar_t)); + + if (bufH != 0) + { + wchar_t* const data = (wchar_t*) GlobalLock (bufH); + text.copyToBuffer (data, len); + GlobalUnlock (bufH); + + SetClipboardData (CF_UNICODETEXT, bufH); + } + } + } + + CloseClipboard(); + } +} + +const String SystemClipboard::getTextFromClipboard() throw() +{ + String result; + + if (OpenClipboard (0) != 0) + { + HANDLE bufH = GetClipboardData (CF_UNICODETEXT); + + if (bufH != 0) + { + const wchar_t* const data = (const wchar_t*) GlobalLock (bufH); + + if (data != 0) + { + result = String (data, (int) (GlobalSize (bufH) / sizeof (tchar))); + + GlobalUnlock (bufH); + } + } + + CloseClipboard(); + } + + return result; +} + +#endif +/********* End of inlined file: juce_win32_Misc.cpp *********/ + +/********* Start of inlined file: juce_win32_ActiveXComponent.cpp *********/ +// (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 (peer) != 0); + + if (dynamic_cast (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 +/********* End of inlined file: juce_win32_ActiveXComponent.cpp *********/ + +/********* Start of inlined file: juce_win32_QuickTimeMovieComponent.cpp *********/ +// (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 (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 +/********* End of inlined file: juce_win32_QuickTimeMovieComponent.cpp *********/ + +/********* Start of inlined file: juce_win32_WebBrowserComponent.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE && JUCE_WEB_BROWSER + +class WebBrowserComponentInternal : public ActiveXControlComponent +{ +public: + + WebBrowserComponentInternal() + : browser (0), + connectionPoint (0), + adviseCookie (0) + { + } + + ~WebBrowserComponentInternal() + { + if (connectionPoint != 0) + connectionPoint->Unadvise (adviseCookie); + + if (browser != 0) + browser->Release(); + } + + void createBrowser() + { + createControl (&CLSID_WebBrowser); + browser = (IWebBrowser2*) queryInterface (&IID_IWebBrowser2); + + IConnectionPointContainer* connectionPointContainer = (IConnectionPointContainer*) queryInterface (&IID_IConnectionPointContainer); + + if (connectionPointContainer != 0) + { + connectionPointContainer->FindConnectionPoint (DIID_DWebBrowserEvents2, + &connectionPoint); + + if (connectionPoint != 0) + { + WebBrowserComponent* const owner = dynamic_cast (getParentComponent()); + jassert (owner != 0); + + EventHandler* handler = new EventHandler (owner); + connectionPoint->Advise (handler, &adviseCookie); + } + } + } + + void goToURL (const String& url, + const StringArray* headers, + const MemoryBlock* postData) + { + if (browser != 0) + { + LPSAFEARRAY sa = 0; + _variant_t flags, frame, postDataVar, headersVar; + + if (headers != 0) + headersVar = (const tchar*) headers->joinIntoString ("\r\n"); + + if (postData != 0 && postData->getSize() > 0) + { + LPSAFEARRAY sa = SafeArrayCreateVector (VT_UI1, 0, postData->getSize()); + + if (sa != 0) + { + void* data = 0; + SafeArrayAccessData (sa, &data); + jassert (data != 0); + + if (data != 0) + { + postData->copyTo (data, 0, postData->getSize()); + SafeArrayUnaccessData (sa); + + VARIANT postDataVar2; + VariantInit (&postDataVar2); + V_VT (&postDataVar2) = VT_ARRAY | VT_UI1; + V_ARRAY (&postDataVar2) = sa; + + postDataVar = postDataVar2; + } + } + } + + browser->Navigate ((BSTR) (const OLECHAR*) url, + &flags, &frame, + &postDataVar, &headersVar); + + if (sa != 0) + SafeArrayDestroy (sa); + } + } + + IWebBrowser2* browser; juce_UseDebuggingNewOperator private: + IConnectionPoint* connectionPoint; + DWORD adviseCookie; - IASIO* volatile asioObject; - ASIOCallbacks callbacks; - - void* windowHandle; - CLSID classId; - String error; - - long totalNumInputChans, totalNumOutputChans; - StringArray inputChannelNames, outputChannelNames; - - Array sampleRates, bufferSizes; - long inputLatency, outputLatency; - long minSize, maxSize, preferredSize, granularity; - - int volatile currentBlockSizeSamples; - int volatile currentBitDepth; - double volatile currentSampleRate; - BitArray currentChansOut, currentChansIn; - AudioIODeviceCallback* volatile currentCallback; - CriticalSection callbackLock; - - ASIOBufferInfo bufferInfos [maxASIOChannels]; - float* inBuffers [maxASIOChannels]; - float* outBuffers [maxASIOChannels]; - - int inputChannelBitDepths [maxASIOChannels]; - int outputChannelBitDepths [maxASIOChannels]; - int inputChannelBytesPerSample [maxASIOChannels]; - int outputChannelBytesPerSample [maxASIOChannels]; - bool inputChannelIsFloat [maxASIOChannels]; - bool outputChannelIsFloat [maxASIOChannels]; - bool inputChannelLittleEndian [maxASIOChannels]; - bool outputChannelLittleEndian [maxASIOChannels]; - - WaitableEvent event1; - float* tempBuffer; - int volatile bufferIndex, numActiveInputChans, numActiveOutputChans; - - bool isOpen_, isStarted; - bool volatile isASIOOpen; - bool volatile calledback; - bool volatile littleEndian, postOutput, needToReset, isReSync; - bool volatile insideControlPanelModalLoop; - bool volatile shouldUsePreferredSize; - - void removeCurrentDriver() + class EventHandler : public IDispatch { - if (asioObject != 0) + public: + EventHandler (WebBrowserComponent* owner_) + : owner (owner_), + refCount (0) { - asioObject->Release(); - asioObject = 0; + } + + ~EventHandler() + { + } + + HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) + { + if (id == IID_IUnknown || id == IID_IDispatch || id == DIID_DWebBrowserEvents2) + { + AddRef(); + *result = this; + return S_OK; + } + + *result = 0; + return E_NOINTERFACE; + } + + ULONG __stdcall AddRef() { return ++refCount; } + ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } + + HRESULT __stdcall GetTypeInfoCount (UINT __RPC_FAR*) { return E_NOTIMPL; } + HRESULT __stdcall GetTypeInfo (UINT, LCID, ITypeInfo __RPC_FAR *__RPC_FAR*) { return E_NOTIMPL; } + HRESULT __stdcall GetIDsOfNames (REFIID, LPOLESTR __RPC_FAR*, UINT, LCID, DISPID __RPC_FAR*) { return E_NOTIMPL; } + + HRESULT __stdcall Invoke (DISPID dispIdMember, REFIID /*riid*/, LCID /*lcid*/, + WORD /*wFlags*/, DISPPARAMS __RPC_FAR* pDispParams, + VARIANT __RPC_FAR* /*pVarResult*/, EXCEPINFO __RPC_FAR* /*pExcepInfo*/, + UINT __RPC_FAR* /*puArgErr*/) + { + switch (dispIdMember) + { + case DISPID_BEFORENAVIGATE2: + { + VARIANT* const vurl = pDispParams->rgvarg[5].pvarVal; + + String url; + + if ((vurl->vt & VT_BYREF) != 0) + url = *vurl->pbstrVal; + else + url = vurl->bstrVal; + + *pDispParams->rgvarg->pboolVal + = owner->pageAboutToLoad (url) ? VARIANT_FALSE + : VARIANT_TRUE; + + return S_OK; + } + + default: + break; + } + + return E_NOTIMPL; + } + + juce_UseDebuggingNewOperator + + private: + WebBrowserComponent* const owner; + int refCount; + + EventHandler (const EventHandler&); + const EventHandler& operator= (const EventHandler&); + }; +}; + +WebBrowserComponent::WebBrowserComponent() + : browser (0), + blankPageShown (false) +{ + setOpaque (true); + addAndMakeVisible (browser = new WebBrowserComponentInternal()); +} + +WebBrowserComponent::~WebBrowserComponent() +{ + delete 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() +{ + if (browser->browser != 0) + browser->browser->Stop(); +} + +void WebBrowserComponent::goBack() +{ + lastURL = String::empty; + blankPageShown = false; + + if (browser->browser != 0) + browser->browser->GoBack(); +} + +void WebBrowserComponent::goForward() +{ + lastURL = String::empty; + + if (browser->browser != 0) + browser->browser->GoForward(); +} + +void WebBrowserComponent::paint (Graphics& g) +{ + if (browser->browser == 0) + g.fillAll (Colours::white); +} + +void WebBrowserComponent::checkWindowAssociation() +{ + if (isShowing()) + { + if (browser->browser == 0 && getPeer() != 0) + { + browser->createBrowser(); + reloadLastURL(); + } + else + { + if (blankPageShown) + goBack(); } } - - bool loadDriver() + else { - removeCurrentDriver(); - - JUCE_TRY + if (browser != 0 && ! blankPageShown) { - if (CoCreateInstance (classId, 0, CLSCTX_INPROC_SERVER, - classId, (void**) &asioObject) == S_OK) + // 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); + } + } +} + +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&) +{ + return true; +} + +#endif +/********* End of inlined file: juce_win32_WebBrowserComponent.cpp *********/ + +/********* Start of inlined file: juce_win32_OpenGLComponent.cpp *********/ +// (This file gets included by juce_win32_NativeCode.cpp, rather than being +// compiled on its own). +#if JUCE_INCLUDED_FILE && JUCE_OPENGL + +#define WGL_EXT_FUNCTION_INIT(extType, extFunc) \ + ((extFunc = (extType) wglGetProcAddress (#extFunc)) != 0) + +typedef const char* (WINAPI* PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); + +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_STEREO_ARB 0x2012 +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#define WGL_TYPE_RGBA_ARB 0x202B + +static void getWglExtensions (HDC dc, StringArray& result) throw() +{ + PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = 0; + + if (WGL_EXT_FUNCTION_INIT (PFNWGLGETEXTENSIONSSTRINGARBPROC, wglGetExtensionsStringARB)) + result.addTokens (String (wglGetExtensionsStringARB (dc)), false); + else + jassertfalse // If this fails, it may be because you didn't activate the openGL context +} + +class WindowedGLContext : public OpenGLContext +{ +public: + WindowedGLContext (Component* const component_, + HGLRC contextToShareWith, + const OpenGLPixelFormat& pixelFormat) + : renderContext (0), + nativeWindow (0), + dc (0), + component (component_) + { + jassert (component != 0); + + createNativeWindow(); + + // Use a default pixel format that should be supported everywhere + PIXELFORMATDESCRIPTOR pfd; + zerostruct (pfd); + pfd.nSize = sizeof (pfd); + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.cColorBits = 24; + pfd.cDepthBits = 16; + + const int format = ChoosePixelFormat (dc, &pfd); + + if (format != 0) + SetPixelFormat (dc, format, &pfd); + + renderContext = wglCreateContext (dc); + makeActive(); + + setPixelFormat (pixelFormat); + + if (contextToShareWith != 0 && renderContext != 0) + wglShareLists (contextToShareWith, renderContext); + } + + ~WindowedGLContext() + { + makeInactive(); + + wglDeleteContext (renderContext); + + ReleaseDC ((HWND) nativeWindow->getNativeHandle(), dc); + delete nativeWindow; + } + + bool makeActive() const throw() + { + jassert (renderContext != 0); + return wglMakeCurrent (dc, renderContext) != 0; + } + + bool makeInactive() const throw() + { + return (! isActive()) || (wglMakeCurrent (0, 0) != 0); + } + + bool isActive() const throw() + { + return wglGetCurrentContext() == renderContext; + } + + const OpenGLPixelFormat getPixelFormat() const + { + OpenGLPixelFormat pf; + + makeActive(); + StringArray availableExtensions; + getWglExtensions (dc, availableExtensions); + + fillInPixelFormatDetails (GetPixelFormat (dc), pf, availableExtensions); + return pf; + } + + void* getRawContext() const throw() + { + return renderContext; + } + + bool setPixelFormat (const OpenGLPixelFormat& pixelFormat) + { + makeActive(); + + PIXELFORMATDESCRIPTOR pfd; + zerostruct (pfd); + pfd.nSize = sizeof (pfd); + pfd.nVersion = 1; + pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER; + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.iLayerType = PFD_MAIN_PLANE; + pfd.cColorBits = (BYTE) (pixelFormat.redBits + pixelFormat.greenBits + pixelFormat.blueBits); + pfd.cRedBits = (BYTE) pixelFormat.redBits; + pfd.cGreenBits = (BYTE) pixelFormat.greenBits; + pfd.cBlueBits = (BYTE) pixelFormat.blueBits; + pfd.cAlphaBits = (BYTE) pixelFormat.alphaBits; + pfd.cDepthBits = (BYTE) pixelFormat.depthBufferBits; + pfd.cStencilBits = (BYTE) pixelFormat.stencilBufferBits; + pfd.cAccumBits = (BYTE) (pixelFormat.accumulationBufferRedBits + pixelFormat.accumulationBufferGreenBits + + pixelFormat.accumulationBufferBlueBits + pixelFormat.accumulationBufferAlphaBits); + pfd.cAccumRedBits = (BYTE) pixelFormat.accumulationBufferRedBits; + pfd.cAccumGreenBits = (BYTE) pixelFormat.accumulationBufferGreenBits; + pfd.cAccumBlueBits = (BYTE) pixelFormat.accumulationBufferBlueBits; + pfd.cAccumAlphaBits = (BYTE) pixelFormat.accumulationBufferAlphaBits; + + int format = 0; + + PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = 0; + + StringArray availableExtensions; + getWglExtensions (dc, availableExtensions); + + if (availableExtensions.contains ("WGL_ARB_pixel_format") + && WGL_EXT_FUNCTION_INIT (PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB)) + { + int attributes[64]; + int n = 0; + + attributes[n++] = WGL_DRAW_TO_WINDOW_ARB; + attributes[n++] = GL_TRUE; + attributes[n++] = WGL_SUPPORT_OPENGL_ARB; + attributes[n++] = GL_TRUE; + attributes[n++] = WGL_ACCELERATION_ARB; + attributes[n++] = WGL_FULL_ACCELERATION_ARB; + attributes[n++] = WGL_DOUBLE_BUFFER_ARB; + attributes[n++] = GL_TRUE; + attributes[n++] = WGL_PIXEL_TYPE_ARB; + attributes[n++] = WGL_TYPE_RGBA_ARB; + + attributes[n++] = WGL_COLOR_BITS_ARB; + attributes[n++] = pfd.cColorBits; + attributes[n++] = WGL_RED_BITS_ARB; + attributes[n++] = pixelFormat.redBits; + attributes[n++] = WGL_GREEN_BITS_ARB; + attributes[n++] = pixelFormat.greenBits; + attributes[n++] = WGL_BLUE_BITS_ARB; + attributes[n++] = pixelFormat.blueBits; + attributes[n++] = WGL_ALPHA_BITS_ARB; + attributes[n++] = pixelFormat.alphaBits; + attributes[n++] = WGL_DEPTH_BITS_ARB; + attributes[n++] = pixelFormat.depthBufferBits; + + if (pixelFormat.stencilBufferBits > 0) { - return true; + attributes[n++] = WGL_STENCIL_BITS_ARB; + attributes[n++] = pixelFormat.stencilBufferBits; + } + + attributes[n++] = WGL_ACCUM_RED_BITS_ARB; + attributes[n++] = pixelFormat.accumulationBufferRedBits; + attributes[n++] = WGL_ACCUM_GREEN_BITS_ARB; + attributes[n++] = pixelFormat.accumulationBufferGreenBits; + attributes[n++] = WGL_ACCUM_BLUE_BITS_ARB; + attributes[n++] = pixelFormat.accumulationBufferBlueBits; + attributes[n++] = WGL_ACCUM_ALPHA_BITS_ARB; + attributes[n++] = pixelFormat.accumulationBufferAlphaBits; + + if (availableExtensions.contains ("WGL_ARB_multisample") + && pixelFormat.fullSceneAntiAliasingNumSamples > 0) + { + attributes[n++] = WGL_SAMPLE_BUFFERS_ARB; + attributes[n++] = 1; + attributes[n++] = WGL_SAMPLES_ARB; + attributes[n++] = pixelFormat.fullSceneAntiAliasingNumSamples; + } + + attributes[n++] = 0; + + UINT formatsCount; + const BOOL ok = wglChoosePixelFormatARB (dc, attributes, 0, 1, &format, &formatsCount); + (void) ok; + jassert (ok); + } + else + { + format = ChoosePixelFormat (dc, &pfd); + } + + if (format != 0) + { + makeInactive(); + + // win32 can't change the pixel format of a window, so need to delete the + // old one and create a new one.. + jassert (nativeWindow != 0); + ReleaseDC ((HWND) nativeWindow->getNativeHandle(), dc); + delete nativeWindow; + + createNativeWindow(); + + if (SetPixelFormat (dc, format, &pfd)) + { + wglDeleteContext (renderContext); + renderContext = wglCreateContext (dc); + + jassert (renderContext != 0); + return renderContext != 0; } } - JUCE_CATCH_ALL - - asioObject = 0; return false; } - const String initDriver() + void updateWindowPosition (int x, int y, int w, int h, int) { - if (asioObject != 0) - { - char buffer [256]; - zeromem (buffer, sizeof (buffer)); - - if (! asioObject->init (windowHandle)) - { - asioObject->getErrorMessage (buffer); - return String (buffer, sizeof (buffer) - 1); - } - - // just in case any daft drivers expect this to be called.. - asioObject->getDriverName (buffer); - - return String::empty; - } - - return "No Driver"; + SetWindowPos ((HWND) nativeWindow->getNativeHandle(), 0, + x, y, w, h, + SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); } - const String openDevice() + void repaint() { - // use this in case the driver starts opening dialog boxes.. - Component modalWindow (String::empty); - modalWindow.setOpaque (true); - modalWindow.addToDesktop (0); - modalWindow.enterModalState(); - - // open the device and get its info.. - log (T("opening ASIO device: ") + getName()); - - needToReset = false; - isReSync = false; - outputChannelNames.clear(); - inputChannelNames.clear(); - bufferSizes.clear(); - sampleRates.clear(); - isASIOOpen = false; - isOpen_ = false; - totalNumInputChans = 0; - totalNumOutputChans = 0; - numActiveInputChans = 0; - numActiveOutputChans = 0; - currentCallback = 0; - - error = String::empty; - - if (getName().isEmpty()) - return error; - - long err = 0; - - if (loadDriver()) - { - if ((error = initDriver()).isEmpty()) - { - numActiveInputChans = 0; - numActiveOutputChans = 0; - totalNumInputChans = 0; - totalNumOutputChans = 0; - - if (asioObject != 0 - && (err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans)) == 0) - { - log (String ((int) totalNumInputChans) + T(" in, ") + String ((int) totalNumOutputChans) + T(" out")); - - if ((err = asioObject->getBufferSize (&minSize, &maxSize, &preferredSize, &granularity)) == 0) - { - // find a list of buffer sizes.. - log (String ((int) minSize) + T(" ") + String ((int) maxSize) + T(" ") + String ((int)preferredSize) + T(" ") + String ((int)granularity)); - - if (granularity >= 0) - { - granularity = jmax (1, (int) granularity); - - for (int i = jmax (minSize, (int) granularity); i < jmin (6400, maxSize); i += granularity) - bufferSizes.addIfNotAlreadyThere (granularity * (i / granularity)); - } - else if (granularity < 0) - { - for (int i = 0; i < 18; ++i) - { - const int s = (1 << i); - - if (s >= minSize && s <= maxSize) - bufferSizes.add (s); - } - } - - if (! bufferSizes.contains (preferredSize)) - bufferSizes.insert (0, preferredSize); - - double currentRate = 0; - asioObject->getSampleRate (¤tRate); - - if (currentRate <= 0.0 || currentRate > 192001.0) - { - log ("setting sample rate"); - err = asioObject->setSampleRate (44100.0); - if (err != 0) - { - logError ("setting sample rate", err); - } - - asioObject->getSampleRate (¤tRate); - } - - currentSampleRate = currentRate; - - postOutput = (asioObject->outputReady() == 0); - if (postOutput) - { - log ("ASIO outputReady = ok"); - } - - updateSampleRates(); - - // ..because cubase does it at this point - inputLatency = outputLatency = 0; - if (asioObject->getLatencies (&inputLatency, &outputLatency) != 0) - { - log ("ASIO - no latencies"); - } - - log (String ("latencies: ") - + String ((int) inputLatency) - + T(", ") + String ((int) outputLatency)); - - // create some dummy buffers now.. because cubase does.. - numActiveInputChans = 0; - numActiveOutputChans = 0; - - ASIOBufferInfo* info = bufferInfos; - int i, numChans = 0; - for (i = 0; i < jmin (2, totalNumInputChans); ++i) - { - info->isInput = 1; - info->channelNum = i; - info->buffers[0] = info->buffers[1] = 0; - ++info; - ++numChans; - } - - const int outputBufferIndex = numChans; - - for (i = 0; i < jmin (2, totalNumOutputChans); ++i) - { - info->isInput = 0; - info->channelNum = i; - info->buffers[0] = info->buffers[1] = 0; - ++info; - ++numChans; - } - - callbacks.sampleRateDidChange = &sampleRateChangedCallback; - - if (currentASIODev[0] == this) - { - callbacks.bufferSwitch = &bufferSwitchCallback0; - callbacks.asioMessage = &asioMessagesCallback0; - callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback0; - } - else if (currentASIODev[1] == this) - { - callbacks.bufferSwitch = &bufferSwitchCallback1; - callbacks.asioMessage = &asioMessagesCallback1; - callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback1; - } - else if (currentASIODev[2] == this) - { - callbacks.bufferSwitch = &bufferSwitchCallback2; - callbacks.asioMessage = &asioMessagesCallback2; - callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback2; - } - else - { - jassertfalse - } - - log (T("creating buffers (dummy): ") + String (numChans) - + T(", ") + String ((int) preferredSize)); - - if (preferredSize > 0) - { - err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks); - if (err != 0) - { - logError ("dummy buffers", err); - } - } - - long newInps = 0, newOuts = 0; - asioObject->getChannels (&newInps, &newOuts); - - if (totalNumInputChans != newInps || totalNumOutputChans != newOuts) - { - totalNumInputChans = newInps; - totalNumOutputChans = newOuts; - - log (String ((int) totalNumInputChans) + T(" in; ") - + String ((int) totalNumOutputChans) + T(" out")); - } - - updateSampleRates(); - - ASIOChannelInfo channelInfo; - channelInfo.type = 0; - - for (i = 0; i < totalNumInputChans; ++i) - { - zerostruct (channelInfo); - channelInfo.channel = i; - channelInfo.isInput = 1; - asioObject->getChannelInfo (&channelInfo); - - inputChannelNames.add (String (channelInfo.name)); - } - - for (i = 0; i < totalNumOutputChans; ++i) - { - zerostruct (channelInfo); - channelInfo.channel = i; - channelInfo.isInput = 0; - asioObject->getChannelInfo (&channelInfo); - - outputChannelNames.add (String (channelInfo.name)); - - typeToFormatParameters (channelInfo.type, - outputChannelBitDepths[i], - outputChannelBytesPerSample[i], - outputChannelIsFloat[i], - outputChannelLittleEndian[i]); - - if (i < 2) - { - // clear the channels that are used with the dummy stuff - const int bytesPerBuffer = preferredSize * (outputChannelBitDepths[i] >> 3); - zeromem (bufferInfos [outputBufferIndex + i].buffers[0], bytesPerBuffer); - zeromem (bufferInfos [outputBufferIndex + i].buffers[1], bytesPerBuffer); - } - } - - outputChannelNames.trim(); - inputChannelNames.trim(); - outputChannelNames.appendNumbersToDuplicates (false, true); - inputChannelNames.appendNumbersToDuplicates (false, true); - - // start and stop because cubase does it.. - asioObject->getLatencies (&inputLatency, &outputLatency); - - if ((err = asioObject->start()) != 0) - { - // ignore an error here, as it might start later after setting other stuff up - logError ("ASIO start", err); - } - - Thread::sleep (100); - asioObject->stop(); - } - else - { - error = "Can't detect buffer sizes"; - } - } - else - { - error = "Can't detect asio channels"; - } - } - } - else - { - error = "No such device"; - } - - if (error.isNotEmpty()) - { - logError (error, err); - - if (asioObject != 0) - asioObject->disposeBuffers(); - - removeCurrentDriver(); - isASIOOpen = false; - } - else - { - isASIOOpen = true; - log ("ASIO device open"); - } - - isOpen_ = false; - needToReset = false; - isReSync = false; - - return error; + int x, y, w, h; + nativeWindow->getBounds (x, y, w, h); + nativeWindow->repaint (0, 0, w, h); } - void callback (const long index) throw() + void swapBuffers() { - if (isStarted) - { - bufferIndex = index; - processBuffer(); - } - else - { - if (postOutput && (asioObject != 0)) - asioObject->outputReady(); - } - - calledback = true; + SwapBuffers (dc); } - void processBuffer() throw() + bool setSwapInterval (const int numFramesPerSwap) { - const ASIOBufferInfo* const infos = bufferInfos; - const int bi = bufferIndex; + makeActive(); - const ScopedLock sl (callbackLock); + StringArray availableExtensions; + getWglExtensions (dc, availableExtensions); - if (needToReset) - { - needToReset = false; + PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = 0; - if (isReSync) - { - log ("! ASIO resync"); - isReSync = false; - } - else - { - startTimer (20); - } - } - - if (bi >= 0) - { - const int samps = currentBlockSizeSamples; - - if (currentCallback != 0) - { - int i; - for (i = 0; i < numActiveInputChans; ++i) - { - float* const dst = inBuffers[i]; - - jassert (dst != 0); - - const char* const src = (const char*) (infos[i].buffers[bi]); - - if (inputChannelIsFloat[i]) - { - memcpy (dst, src, samps * sizeof (float)); - } - else - { - jassert (dst == tempBuffer + (samps * i)); - - switch (inputChannelBitDepths[i]) - { - case 16: - convertInt16ToFloat (src, dst, inputChannelBytesPerSample[i], - samps, inputChannelLittleEndian[i]); - break; - - case 24: - convertInt24ToFloat (src, dst, inputChannelBytesPerSample[i], - samps, inputChannelLittleEndian[i]); - break; - - case 32: - convertInt32ToFloat (src, dst, inputChannelBytesPerSample[i], - samps, inputChannelLittleEndian[i]); - break; - - case 64: - jassertfalse - break; - } - } - } - - currentCallback->audioDeviceIOCallback ((const float**) inBuffers, - numActiveInputChans, - outBuffers, - numActiveOutputChans, - samps); - - for (i = 0; i < numActiveOutputChans; ++i) - { - float* const src = outBuffers[i]; - - jassert (src != 0); - - char* const dst = (char*) (infos [numActiveInputChans + i].buffers[bi]); - - if (outputChannelIsFloat[i]) - { - memcpy (dst, src, samps * sizeof (float)); - } - else - { - jassert (src == tempBuffer + (samps * (numActiveInputChans + i))); - - switch (outputChannelBitDepths[i]) - { - case 16: - convertFloatToInt16 (src, dst, outputChannelBytesPerSample[i], - samps, outputChannelLittleEndian[i]); - break; - - case 24: - convertFloatToInt24 (src, dst, outputChannelBytesPerSample[i], - samps, outputChannelLittleEndian[i]); - break; - - case 32: - convertFloatToInt32 (src, dst, outputChannelBytesPerSample[i], - samps, outputChannelLittleEndian[i]); - break; - - case 64: - jassertfalse - break; - } - } - } - } - else - { - for (int i = 0; i < numActiveOutputChans; ++i) - { - const int bytesPerBuffer = samps * (outputChannelBitDepths[i] >> 3); - zeromem (infos[numActiveInputChans + i].buffers[bi], bytesPerBuffer); - } - } - } - - if (postOutput) - asioObject->outputReady(); + return availableExtensions.contains ("WGL_EXT_swap_control") + && WGL_EXT_FUNCTION_INIT (PFNWGLSWAPINTERVALEXTPROC, wglSwapIntervalEXT) + && wglSwapIntervalEXT (numFramesPerSwap) != FALSE; } - static ASIOTime* bufferSwitchTimeInfoCallback0 (ASIOTime*, long index, long) throw() + int getSwapInterval() const { - if (currentASIODev[0] != 0) - currentASIODev[0]->callback (index); + makeActive(); + + StringArray availableExtensions; + getWglExtensions (dc, availableExtensions); + + PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = 0; + + if (availableExtensions.contains ("WGL_EXT_swap_control") + && WGL_EXT_FUNCTION_INIT (PFNWGLGETSWAPINTERVALEXTPROC, wglGetSwapIntervalEXT)) + return wglGetSwapIntervalEXT(); return 0; } - static ASIOTime* bufferSwitchTimeInfoCallback1 (ASIOTime*, long index, long) throw() + void findAlternativeOpenGLPixelFormats (OwnedArray & results) { - if (currentASIODev[1] != 0) - currentASIODev[1]->callback (index); + jassert (isActive()); - return 0; - } + StringArray availableExtensions; + getWglExtensions (dc, availableExtensions); - static ASIOTime* bufferSwitchTimeInfoCallback2 (ASIOTime*, long index, long) throw() - { - if (currentASIODev[2] != 0) - currentASIODev[2]->callback (index); + PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0; + int numTypes = 0; - return 0; - } - - static void bufferSwitchCallback0 (long index, long) throw() - { - if (currentASIODev[0] != 0) - currentASIODev[0]->callback (index); - } - - static void bufferSwitchCallback1 (long index, long) throw() - { - if (currentASIODev[1] != 0) - currentASIODev[1]->callback (index); - } - - static void bufferSwitchCallback2 (long index, long) throw() - { - if (currentASIODev[2] != 0) - currentASIODev[2]->callback (index); - } - - static long asioMessagesCallback0 (long selector, long value, void*, double*) throw() - { - return asioMessagesCallback (selector, value, 0); - } - - static long asioMessagesCallback1 (long selector, long value, void*, double*) throw() - { - return asioMessagesCallback (selector, value, 1); - } - - static long asioMessagesCallback2 (long selector, long value, void*, double*) throw() - { - return asioMessagesCallback (selector, value, 2); - } - - static long asioMessagesCallback (long selector, long value, const int deviceIndex) throw() - { - switch (selector) + if (availableExtensions.contains("WGL_ARB_pixel_format") + && WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB)) { - case kAsioSelectorSupported: - if (value == kAsioResetRequest - || value == kAsioEngineVersion - || value == kAsioResyncRequest - || value == kAsioLatenciesChanged - || value == kAsioSupportsInputMonitor) - return 1; - break; + int attributes = WGL_NUMBER_PIXEL_FORMATS_ARB; - case kAsioBufferSizeChange: - break; - - case kAsioResetRequest: - if (currentASIODev[deviceIndex] != 0) - currentASIODev[deviceIndex]->resetRequest(); - - return 1; - - case kAsioResyncRequest: - if (currentASIODev[deviceIndex] != 0) - currentASIODev[deviceIndex]->resyncRequest(); - - return 1; - - case kAsioLatenciesChanged: - return 1; - - case kAsioEngineVersion: - return 2; - - case kAsioSupportsTimeInfo: - case kAsioSupportsTimeCode: - return 0; - } - - return 0; - } - - static void sampleRateChangedCallback (ASIOSampleRate) throw() - { - } - - static void convertInt16ToFloat (const char* src, - float* dest, - const int srcStrideBytes, - int numSamples, - const bool littleEndian) throw() - { - const double g = 1.0 / 32768.0; - - if (littleEndian) - { - while (--numSamples >= 0) - { - *dest++ = (float) (g * (short) littleEndianShort (src)); - src += srcStrideBytes; - } + if (! wglGetPixelFormatAttribivARB (dc, 1, 0, 1, &attributes, &numTypes)) + jassertfalse } else { - while (--numSamples >= 0) + numTypes = DescribePixelFormat (dc, 0, 0, 0); + } + + OpenGLPixelFormat pf; + + for (int i = 0; i < numTypes; ++i) + { + if (fillInPixelFormatDetails (i + 1, pf, availableExtensions)) { - *dest++ = (float) (g * (short) bigEndianShort (src)); - src += srcStrideBytes; + bool alreadyListed = false; + for (int j = results.size(); --j >= 0;) + if (pf == *results.getUnchecked(j)) + alreadyListed = true; + + if (! alreadyListed) + results.add (new OpenGLPixelFormat (pf)); } } } - static void convertFloatToInt16 (const float* src, - char* dest, - const int dstStrideBytes, - int numSamples, - const bool littleEndian) throw() + void* getNativeWindowHandle() const { - const double maxVal = (double) 0x7fff; - - if (littleEndian) - { - while (--numSamples >= 0) - { - *(uint16*) dest = swapIfBigEndian ((uint16) (short) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); - dest += dstStrideBytes; - } - } - else - { - while (--numSamples >= 0) - { - *(uint16*) dest = swapIfLittleEndian ((uint16) (short) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); - dest += dstStrideBytes; - } - } - } - - static void convertInt24ToFloat (const char* src, - float* dest, - const int srcStrideBytes, - int numSamples, - const bool littleEndian) throw() - { - const double g = 1.0 / 0x7fffff; - - if (littleEndian) - { - while (--numSamples >= 0) - { - *dest++ = (float) (g * littleEndian24Bit (src)); - src += srcStrideBytes; - } - } - else - { - while (--numSamples >= 0) - { - *dest++ = (float) (g * bigEndian24Bit (src)); - src += srcStrideBytes; - } - } - } - - static void convertFloatToInt24 (const float* src, - char* dest, - const int dstStrideBytes, - int numSamples, - const bool littleEndian) throw() - { - const double maxVal = (double) 0x7fffff; - - if (littleEndian) - { - while (--numSamples >= 0) - { - littleEndian24BitToChars ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++)), dest); - dest += dstStrideBytes; - } - } - else - { - while (--numSamples >= 0) - { - bigEndian24BitToChars ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++)), dest); - dest += dstStrideBytes; - } - } - } - - static void convertInt32ToFloat (const char* src, - float* dest, - const int srcStrideBytes, - int numSamples, - const bool littleEndian) throw() - { - const double g = 1.0 / 0x7fffffff; - - if (littleEndian) - { - while (--numSamples >= 0) - { - *dest++ = (float) (g * (int) littleEndianInt (src)); - src += srcStrideBytes; - } - } - else - { - while (--numSamples >= 0) - { - *dest++ = (float) (g * (int) bigEndianInt (src)); - src += srcStrideBytes; - } - } - } - - static void convertFloatToInt32 (const float* src, - char* dest, - const int dstStrideBytes, - int numSamples, - const bool littleEndian) throw() - { - const double maxVal = (double) 0x7fffffff; - - if (littleEndian) - { - while (--numSamples >= 0) - { - *(uint32*) dest = swapIfBigEndian ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); - dest += dstStrideBytes; - } - } - else - { - while (--numSamples >= 0) - { - *(uint32*) dest = swapIfLittleEndian ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); - dest += dstStrideBytes; - } - } - } - - static void typeToFormatParameters (const long type, - int& bitDepth, - int& byteStride, - bool& formatIsFloat, - bool& littleEndian) throw() - { - bitDepth = 0; - littleEndian = false; - formatIsFloat = false; - - switch (type) - { - case ASIOSTInt16MSB: - case ASIOSTInt16LSB: - case ASIOSTInt32MSB16: - case ASIOSTInt32LSB16: - bitDepth = 16; break; - - case ASIOSTFloat32MSB: - case ASIOSTFloat32LSB: - formatIsFloat = true; - bitDepth = 32; break; - - case ASIOSTInt32MSB: - case ASIOSTInt32LSB: - bitDepth = 32; break; - - case ASIOSTInt24MSB: - case ASIOSTInt24LSB: - case ASIOSTInt32MSB24: - case ASIOSTInt32LSB24: - case ASIOSTInt32MSB18: - case ASIOSTInt32MSB20: - case ASIOSTInt32LSB18: - case ASIOSTInt32LSB20: - bitDepth = 24; break; - - case ASIOSTFloat64MSB: - case ASIOSTFloat64LSB: - default: - bitDepth = 64; - break; - } - - switch (type) - { - case ASIOSTInt16MSB: - case ASIOSTInt32MSB16: - case ASIOSTFloat32MSB: - case ASIOSTFloat64MSB: - case ASIOSTInt32MSB: - case ASIOSTInt32MSB18: - case ASIOSTInt32MSB20: - case ASIOSTInt32MSB24: - case ASIOSTInt24MSB: - littleEndian = false; break; - - case ASIOSTInt16LSB: - case ASIOSTInt32LSB16: - case ASIOSTFloat32LSB: - case ASIOSTFloat64LSB: - case ASIOSTInt32LSB: - case ASIOSTInt32LSB18: - case ASIOSTInt32LSB20: - case ASIOSTInt32LSB24: - case ASIOSTInt24LSB: - littleEndian = true; break; - - default: - break; - } - - switch (type) - { - case ASIOSTInt16LSB: - case ASIOSTInt16MSB: - byteStride = 2; break; - - case ASIOSTInt24LSB: - case ASIOSTInt24MSB: - byteStride = 3; break; - - case ASIOSTInt32MSB16: - case ASIOSTInt32LSB16: - case ASIOSTInt32MSB: - case ASIOSTInt32MSB18: - case ASIOSTInt32MSB20: - case ASIOSTInt32MSB24: - case ASIOSTInt32LSB: - case ASIOSTInt32LSB18: - case ASIOSTInt32LSB20: - case ASIOSTInt32LSB24: - case ASIOSTFloat32LSB: - case ASIOSTFloat32MSB: - byteStride = 4; break; - - case ASIOSTFloat64MSB: - case ASIOSTFloat64LSB: - byteStride = 8; break; - - default: - break; - } - } -}; - -class ASIOAudioIODeviceType : public AudioIODeviceType -{ -public: - ASIOAudioIODeviceType() - : AudioIODeviceType (T("ASIO")), - classIds (2), - hasScanned (false) - { - CoInitialize (0); - } - - ~ASIOAudioIODeviceType() - { - } - - void scanForDevices() - { - hasScanned = true; - - deviceNames.clear(); - classIds.clear(); - - HKEY hk = 0; - int index = 0; - - if (RegOpenKeyA (HKEY_LOCAL_MACHINE, "software\\asio", &hk) == ERROR_SUCCESS) - { - for (;;) - { - char name [256]; - - if (RegEnumKeyA (hk, index++, name, 256) == ERROR_SUCCESS) - { - addDriverInfo (name, hk); - } - else - { - break; - } - } - - RegCloseKey (hk); - } - } - - const StringArray getDeviceNames (const bool /*wantInputNames*/) const - { - jassert (hasScanned); // need to call scanForDevices() before doing this - - return deviceNames; - } - - int getDefaultDeviceIndex (const bool) const - { - jassert (hasScanned); // need to call scanForDevices() before doing this - - for (int i = deviceNames.size(); --i >= 0;) - if (deviceNames[i].containsIgnoreCase (T("asio4all"))) - return i; // asio4all is a safe choice for a default.. - -#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 - // it in the debugger, which can be a bit annoying) -#endif - - return 0; - } - - static int findFreeSlot() - { - for (int i = 0; i < numElementsInArray (currentASIODev); ++i) - if (currentASIODev[i] == 0) - return i; - - jassertfalse; // unfortunately you can only have a finite number - // of ASIO devices open at the same time.. - return -1; - } - - int getIndexOfDevice (AudioIODevice* d, const bool /*asInput*/) const - { - jassert (hasScanned); // need to call scanForDevices() before doing this - - return d == 0 ? -1 : deviceNames.indexOf (d->getName()); - } - - bool hasSeparateInputsAndOutputs() const { return false; } - - AudioIODevice* createDevice (const String& outputDeviceName, - const String& inputDeviceName) - { - jassert (inputDeviceName == outputDeviceName); - (void) inputDeviceName; - jassert (hasScanned); // need to call scanForDevices() before doing this - - const int index = deviceNames.indexOf (outputDeviceName); - - if (index >= 0) - { - const int freeSlot = findFreeSlot(); - - if (freeSlot >= 0) - return new ASIOAudioIODevice (outputDeviceName, *(classIds [index]), freeSlot); - } - - return 0; + return nativeWindow != 0 ? nativeWindow->getNativeHandle() : 0; } juce_UseDebuggingNewOperator + HGLRC renderContext; + private: - StringArray deviceNames; - OwnedArray classIds; + Win32ComponentPeer* nativeWindow; + Component* const component; + HDC dc; - bool hasScanned; - - static bool checkClassIsOk (const String& classId) + void createNativeWindow() { - HKEY hk = 0; - bool ok = false; + nativeWindow = new Win32ComponentPeer (component, 0); + nativeWindow->dontRepaint = true; + nativeWindow->setVisible (true); - if (RegOpenKeyA (HKEY_CLASSES_ROOT, "clsid", &hk) == ERROR_SUCCESS) + HWND hwnd = (HWND) nativeWindow->getNativeHandle(); + + Win32ComponentPeer* const peer = dynamic_cast (component->getTopLevelComponent()->getPeer()); + + if (peer != 0) { - int index = 0; - - for (;;) - { - char buf [512]; - - if (RegEnumKeyA (hk, index++, buf, 512) == ERROR_SUCCESS) - { - if (classId.equalsIgnoreCase (buf)) - { - HKEY subKey, pathKey; - - if (RegOpenKeyExA (hk, buf, 0, KEY_READ, &subKey) == ERROR_SUCCESS) - { - if (RegOpenKeyExA (subKey, "InprocServer32", 0, KEY_READ, &pathKey) == ERROR_SUCCESS) - { - char pathName [600]; - DWORD dtype = REG_SZ; - DWORD dsize = sizeof (pathName); - - if (RegQueryValueExA (pathKey, 0, 0, &dtype, - (LPBYTE) pathName, &dsize) == ERROR_SUCCESS) - { - OFSTRUCT of; - zerostruct (of); - - of.cBytes = sizeof (of); - - ok = (OpenFile (String (pathName), &of, OF_EXIST) != 0); - } - - RegCloseKey (pathKey); - } - - RegCloseKey (subKey); - } - - break; - } - } - else - { - break; - } - } - - RegCloseKey (hk); + SetParent (hwnd, (HWND) peer->getNativeHandle()); + juce_setWindowStyleBit (hwnd, GWL_STYLE, WS_CHILD, true); + juce_setWindowStyleBit (hwnd, GWL_STYLE, WS_POPUP, false); } - return ok; + dc = GetDC (hwnd); } - void addDriverInfo (const String& keyName, HKEY hk) + bool fillInPixelFormatDetails (const int pixelFormatIndex, + OpenGLPixelFormat& result, + const StringArray& availableExtensions) const throw() { - HKEY subKey; + PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0; - if (RegOpenKeyExA (hk, keyName, 0, KEY_READ, &subKey) == ERROR_SUCCESS) + if (availableExtensions.contains ("WGL_ARB_pixel_format") + && WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB)) { - char buf [256]; - DWORD dtype = REG_SZ; - DWORD dsize = sizeof (buf); - zeromem (buf, dsize); + int attributes[32]; + int numAttributes = 0; - if (RegQueryValueExA (subKey, "clsid", 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) + attributes[numAttributes++] = WGL_DRAW_TO_WINDOW_ARB; + attributes[numAttributes++] = WGL_SUPPORT_OPENGL_ARB; + attributes[numAttributes++] = WGL_ACCELERATION_ARB; + attributes[numAttributes++] = WGL_DOUBLE_BUFFER_ARB; + attributes[numAttributes++] = WGL_PIXEL_TYPE_ARB; + attributes[numAttributes++] = WGL_RED_BITS_ARB; + attributes[numAttributes++] = WGL_GREEN_BITS_ARB; + attributes[numAttributes++] = WGL_BLUE_BITS_ARB; + attributes[numAttributes++] = WGL_ALPHA_BITS_ARB; + attributes[numAttributes++] = WGL_DEPTH_BITS_ARB; + attributes[numAttributes++] = WGL_STENCIL_BITS_ARB; + attributes[numAttributes++] = WGL_ACCUM_RED_BITS_ARB; + attributes[numAttributes++] = WGL_ACCUM_GREEN_BITS_ARB; + attributes[numAttributes++] = WGL_ACCUM_BLUE_BITS_ARB; + attributes[numAttributes++] = WGL_ACCUM_ALPHA_BITS_ARB; + + if (availableExtensions.contains ("WGL_ARB_multisample")) + attributes[numAttributes++] = WGL_SAMPLES_ARB; + + int values[32]; + zeromem (values, sizeof (values)); + + if (wglGetPixelFormatAttribivARB (dc, pixelFormatIndex, 0, numAttributes, attributes, values)) { - if (dsize > 0 && checkClassIsOk (buf)) - { - wchar_t classIdStr [130]; - MultiByteToWideChar (CP_ACP, 0, buf, -1, classIdStr, 128); + int n = 0; + bool isValidFormat = (values[n++] == GL_TRUE); // WGL_DRAW_TO_WINDOW_ARB + isValidFormat = (values[n++] == GL_TRUE) && isValidFormat; // WGL_SUPPORT_OPENGL_ARB + isValidFormat = (values[n++] == WGL_FULL_ACCELERATION_ARB) && isValidFormat; // WGL_ACCELERATION_ARB + isValidFormat = (values[n++] == GL_TRUE) && isValidFormat; // WGL_DOUBLE_BUFFER_ARB: + isValidFormat = (values[n++] == WGL_TYPE_RGBA_ARB) && isValidFormat; // WGL_PIXEL_TYPE_ARB + result.redBits = values[n++]; // WGL_RED_BITS_ARB + result.greenBits = values[n++]; // WGL_GREEN_BITS_ARB + result.blueBits = values[n++]; // WGL_BLUE_BITS_ARB + result.alphaBits = values[n++]; // WGL_ALPHA_BITS_ARB + result.depthBufferBits = values[n++]; // WGL_DEPTH_BITS_ARB + result.stencilBufferBits = values[n++]; // WGL_STENCIL_BITS_ARB + result.accumulationBufferRedBits = values[n++]; // WGL_ACCUM_RED_BITS_ARB + result.accumulationBufferGreenBits = values[n++]; // WGL_ACCUM_GREEN_BITS_ARB + result.accumulationBufferBlueBits = values[n++]; // WGL_ACCUM_BLUE_BITS_ARB + result.accumulationBufferAlphaBits = values[n++]; // WGL_ACCUM_ALPHA_BITS_ARB + result.fullSceneAntiAliasingNumSamples = (uint8) values[n++]; // WGL_SAMPLES_ARB - String deviceName; - CLSID classId; - - if (CLSIDFromString ((LPOLESTR) classIdStr, &classId) == S_OK) - { - dtype = REG_SZ; - dsize = sizeof (buf); - - if (RegQueryValueExA (subKey, "description", 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) - deviceName = buf; - else - deviceName = keyName; - - log (T("found ") + deviceName); - deviceNames.add (deviceName); - classIds.add (new CLSID (classId)); - } - } - - RegCloseKey (subKey); + return isValidFormat; + } + else + { + jassertfalse } } + else + { + PIXELFORMATDESCRIPTOR pfd; + + if (DescribePixelFormat (dc, pixelFormatIndex, sizeof (pfd), &pfd)) + { + result.redBits = pfd.cRedBits; + result.greenBits = pfd.cGreenBits; + result.blueBits = pfd.cBlueBits; + result.alphaBits = pfd.cAlphaBits; + result.depthBufferBits = pfd.cDepthBits; + result.stencilBufferBits = pfd.cStencilBits; + result.accumulationBufferRedBits = pfd.cAccumRedBits; + result.accumulationBufferGreenBits = pfd.cAccumGreenBits; + result.accumulationBufferBlueBits = pfd.cAccumBlueBits; + result.accumulationBufferAlphaBits = pfd.cAccumAlphaBits; + result.fullSceneAntiAliasingNumSamples = 0; + + return true; + } + else + { + jassertfalse + } + } + + return false; } - ASIOAudioIODeviceType (const ASIOAudioIODeviceType&); - const ASIOAudioIODeviceType& operator= (const ASIOAudioIODeviceType&); + WindowedGLContext (const WindowedGLContext&); + const WindowedGLContext& operator= (const WindowedGLContext&); }; -AudioIODeviceType* juce_createASIOAudioIODeviceType() +OpenGLContext* OpenGLContext::createContextForWindow (Component* const component, + const OpenGLPixelFormat& pixelFormat, + const OpenGLContext* const contextToShareWith) { - return new ASIOAudioIODeviceType(); + WindowedGLContext* c = new WindowedGLContext (component, + contextToShareWith != 0 ? (HGLRC) contextToShareWith->getRawContext() : 0, + pixelFormat); + + if (c->renderContext == 0) + deleteAndZero (c); + + return c; } -AudioIODevice* juce_createASIOAudioIODeviceForGUID (const String& name, - void* guid) +void* OpenGLComponent::getNativeWindowHandle() const { - const int freeSlot = ASIOAudioIODeviceType::findFreeSlot(); - - if (freeSlot < 0) - return 0; - - return new ASIOAudioIODevice (name, *(CLSID*) guid, freeSlot); + return context != 0 ? ((WindowedGLContext*) context)->getNativeWindowHandle() : 0; } -END_JUCE_NAMESPACE +void juce_glViewport (const int w, const int h) +{ + glViewport (0, 0, w, h); +} -#undef log +void OpenGLPixelFormat::getAvailablePixelFormats (Component* component, + OwnedArray & results) +{ + Component tempComp; + + { + WindowedGLContext wc (component, 0, OpenGLPixelFormat (8, 8, 16, 0)); + wc.makeActive(); + wc.findAlternativeOpenGLPixelFormats (results); + } +} #endif -/********* End of inlined file: juce_win32_ASIO.cpp *********/ +/********* End of inlined file: juce_win32_OpenGLComponent.cpp *********/ /********* Start of inlined file: juce_win32_AudioCDReader.cpp *********/ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include - -#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 - #include -#endif - -BEGIN_JUCE_NAMESPACE - -#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 && JUCE_USE_CDBURNER //*************************************************************************** // %%% TARGET STATUS VALUES %%% @@ -236006,8 +248207,6 @@ void AudioCDReader::ejectDisk() ((CDDeviceWrapper*) handle)->cdH->openDrawer (true); } -#if JUCE_USE_CDBURNER - static IDiscRecorder* enumCDBurners (StringArray* list, int indexToOpen, IDiscMaster** master) { CoInitialize (0); @@ -236328,11 +248527,2514 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamples) } #endif - -END_JUCE_NAMESPACE /********* End of inlined file: juce_win32_AudioCDReader.cpp *********/ +/********* Start of inlined file: juce_win32_Midi.cpp *********/ +// (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; +static const int numInHeaders = 32; +static const int inBufferSize = 256; +static Array activeMidiThreads; + +using ::free; + +class MidiInThread : public Thread +{ +public: + + MidiInThread (MidiInput* const input_, + MidiInputCallback* const callback_) + : Thread ("Juce Midi"), + hIn (0), + input (input_), + callback (callback_), + isStarted (false), + startTime (0), + pendingLength(0) + { + for (int i = numInHeaders; --i >= 0;) + { + zeromem (&hdr[i], sizeof (MIDIHDR)); + hdr[i].lpData = inData[i]; + hdr[i].dwBufferLength = inBufferSize; + } + }; + + ~MidiInThread() + { + stop(); + + if (hIn != 0) + { + int count = 5; + while (--count >= 0) + { + if (midiInClose (hIn) == MMSYSERR_NOERROR) + break; + + Sleep (20); + } + } + } + + void handle (const uint32 message, const uint32 timeStamp) throw() + { + const int byte = message & 0xff; + if (byte < 0x80) + return; + + const int numBytes = MidiMessage::getMessageLengthFromFirstByte ((uint8) byte); + + const double time = timeStampToTime (timeStamp); + + lock.enter(); + if (pendingLength < midiBufferSize - 12) + { + char* const p = pending + pendingLength; + *(double*) p = time; + *(uint32*) (p + 8) = numBytes; + *(uint32*) (p + 12) = message; + pendingLength += 12 + numBytes; + } + else + { + jassertfalse // midi buffer overflow! You might need to increase the size.. + } + + lock.exit(); + notify(); + } + + void handleSysEx (MIDIHDR* const hdr, const uint32 timeStamp) throw() + { + const int num = hdr->dwBytesRecorded; + + if (num > 0) + { + const double time = timeStampToTime (timeStamp); + + lock.enter(); + + if (pendingLength < midiBufferSize - (8 + num)) + { + char* const p = pending + pendingLength; + *(double*) p = time; + *(uint32*) (p + 8) = num; + memcpy (p + 12, hdr->lpData, num); + pendingLength += 12 + num; + } + else + { + jassertfalse // midi buffer overflow! You might need to increase the size.. + } + + lock.exit(); + notify(); + } + } + + void writeBlock (const int i) throw() + { + hdr[i].dwBytesRecorded = 0; + MMRESULT res = midiInPrepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)); + jassert (res == MMSYSERR_NOERROR); + res = midiInAddBuffer (hIn, &hdr[i], sizeof (MIDIHDR)); + jassert (res == MMSYSERR_NOERROR); + } + + void run() + { + MemoryBlock pendingCopy (64); + + while (! threadShouldExit()) + { + for (int i = 0; i < numInHeaders; ++i) + { + if ((hdr[i].dwFlags & WHDR_DONE) != 0) + { + MMRESULT res = midiInUnprepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)); + (void) res; + jassert (res == MMSYSERR_NOERROR); + writeBlock (i); + } + } + + lock.enter(); + + int len = pendingLength; + + if (len > 0) + { + pendingCopy.ensureSize (len); + pendingCopy.copyFrom (pending, 0, len); + pendingLength = 0; + } + + lock.exit(); + +//xxx needs to figure out if blocks are broken up or not + + if (len == 0) + { + wait (500); + } + else + { + const char* p = (const char*) pendingCopy.getData(); + + while (len > 0) + { + const double time = *(const double*) p; + const int messageLen = *(const int*) (p + 8); + + const MidiMessage message ((const uint8*) (p + 12), messageLen, time); + + callback->handleIncomingMidiMessage (input, message); + + p += 12 + messageLen; + len -= 12 + messageLen; + } + } + } + } + + void start() throw() + { + jassert (hIn != 0); + if (hIn != 0 && ! isStarted) + { + stop(); + + activeMidiThreads.addIfNotAlreadyThere (this); + + int i; + for (i = 0; i < numInHeaders; ++i) + writeBlock (i); + + startTime = Time::getMillisecondCounter(); + MMRESULT res = midiInStart (hIn); + + jassert (res == MMSYSERR_NOERROR); + + if (res == MMSYSERR_NOERROR) + { + isStarted = true; + pendingLength = 0; + startThread (6); + } + } + } + + void stop() throw() + { + if (isStarted) + { + stopThread (5000); + + midiInReset (hIn); + midiInStop (hIn); + + activeMidiThreads.removeValue (this); + + lock.enter(); + lock.exit(); + + for (int i = numInHeaders; --i >= 0;) + { + if ((hdr[i].dwFlags & WHDR_DONE) != 0) + { + int c = 10; + while (--c >= 0 && midiInUnprepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)) == MIDIERR_STILLPLAYING) + Sleep (20); + + jassert (c >= 0); + } + } + + isStarted = false; + pendingLength = 0; + } + } + + juce_UseDebuggingNewOperator + + HMIDIIN hIn; + +private: + MidiInput* input; + MidiInputCallback* callback; + bool isStarted; + uint32 startTime; + CriticalSection lock; + + MIDIHDR hdr [numInHeaders]; + char inData [numInHeaders] [inBufferSize]; + + int pendingLength; + char pending [midiBufferSize]; + + double timeStampToTime (uint32 timeStamp) throw() + { + timeStamp += startTime; + + const uint32 now = Time::getMillisecondCounter(); + if (timeStamp > now) + { + if (timeStamp > now + 2) + --startTime; + + timeStamp = now; + } + + return 0.001 * timeStamp; + } + + MidiInThread (const MidiInThread&); + const MidiInThread& operator= (const MidiInThread&); +}; + +static void CALLBACK midiInCallback (HMIDIIN, + UINT uMsg, + DWORD_PTR dwInstance, + DWORD_PTR midiMessage, + DWORD_PTR timeStamp) +{ + MidiInThread* const thread = (MidiInThread*) dwInstance; + + if (thread != 0 && activeMidiThreads.contains (thread)) + { + if (uMsg == MIM_DATA) + thread->handle ((uint32) midiMessage, (uint32) timeStamp); + else if (uMsg == MIM_LONGDATA) + thread->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp); + } +} + +const StringArray MidiInput::getDevices() +{ + StringArray s; + const int num = midiInGetNumDevs(); + + for (int i = 0; i < num; ++i) + { + MIDIINCAPS mc; + zerostruct (mc); + + if (midiInGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) + s.add (String (mc.szPname, sizeof (mc.szPname))); + } + + return s; +} + +int MidiInput::getDefaultDeviceIndex() +{ + return 0; +} + +MidiInput* MidiInput::openDevice (const int index, MidiInputCallback* const callback) +{ + if (callback == 0) + return 0; + + UINT deviceId = MIDI_MAPPER; + int n = 0; + String name; + + const int num = midiInGetNumDevs(); + + for (int i = 0; i < num; ++i) + { + MIDIINCAPS mc; + zerostruct (mc); + + if (midiInGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) + { + if (index == n) + { + deviceId = i; + name = String (mc.szPname, sizeof (mc.szPname)); + break; + } + + ++n; + } + } + + MidiInput* const in = new MidiInput (name); + MidiInThread* const thread = new MidiInThread (in, callback); + + HMIDIIN h; + HRESULT err = midiInOpen (&h, deviceId, + (DWORD_PTR) &midiInCallback, + (DWORD_PTR) thread, + CALLBACK_FUNCTION); + + if (err == MMSYSERR_NOERROR) + { + thread->hIn = h; + in->internal = (void*) thread; + return in; + } + else + { + delete in; + delete thread; + return 0; + } +} + +MidiInput::MidiInput (const String& name_) + : name (name_), + internal (0) +{ +} + +MidiInput::~MidiInput() +{ + if (internal != 0) + { + MidiInThread* const thread = (MidiInThread*) internal; + delete thread; + } +} + +void MidiInput::start() +{ + ((MidiInThread*) internal)->start(); +} + +void MidiInput::stop() +{ + ((MidiInThread*) internal)->stop(); +} + +struct MidiOutHandle +{ + int refCount; + UINT deviceId; + HMIDIOUT handle; + + juce_UseDebuggingNewOperator +}; + +static VoidArray handles (4); + +const StringArray MidiOutput::getDevices() +{ + StringArray s; + const int num = midiOutGetNumDevs(); + + for (int i = 0; i < num; ++i) + { + MIDIOUTCAPS mc; + zerostruct (mc); + + if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) + s.add (String (mc.szPname, sizeof (mc.szPname))); + } + + return s; +} + +int MidiOutput::getDefaultDeviceIndex() +{ + const int num = midiOutGetNumDevs(); + int n = 0; + + for (int i = 0; i < num; ++i) + { + MIDIOUTCAPS mc; + zerostruct (mc); + + if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) + { + if ((mc.wTechnology & MOD_MAPPER) != 0) + return n; + + ++n; + } + } + + return 0; +} + +MidiOutput* MidiOutput::openDevice (int index) +{ + UINT deviceId = MIDI_MAPPER; + const int num = midiOutGetNumDevs(); + int i, n = 0; + + for (i = 0; i < num; ++i) + { + MIDIOUTCAPS mc; + zerostruct (mc); + + if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) + { + // use the microsoft sw synth as a default - best not to allow deviceId + // to be MIDI_MAPPER, or else device sharing breaks + if (String (mc.szPname, sizeof (mc.szPname)).containsIgnoreCase (T("microsoft"))) + deviceId = i; + + if (index == n) + { + deviceId = i; + break; + } + + ++n; + } + } + + for (i = handles.size(); --i >= 0;) + { + MidiOutHandle* const han = (MidiOutHandle*) handles.getUnchecked(i); + + if (han != 0 && han->deviceId == deviceId) + { + han->refCount++; + + MidiOutput* const out = new MidiOutput(); + out->internal = (void*) han; + return out; + } + } + + for (i = 4; --i >= 0;) + { + HMIDIOUT h = 0; + MMRESULT res = midiOutOpen (&h, deviceId, 0, 0, CALLBACK_NULL); + + if (res == MMSYSERR_NOERROR) + { + MidiOutHandle* const han = new MidiOutHandle(); + han->deviceId = deviceId; + han->refCount = 1; + han->handle = h; + handles.add (han); + + MidiOutput* const out = new MidiOutput(); + out->internal = (void*) han; + return out; + } + else if (res == MMSYSERR_ALLOCATED) + { + Sleep (100); + } + else + { + break; + } + } + + return 0; +} + +MidiOutput::~MidiOutput() +{ + MidiOutHandle* const h = (MidiOutHandle*) internal; + + if (handles.contains ((void*) h) && --(h->refCount) == 0) + { + midiOutClose (h->handle); + handles.removeValue ((void*) h); + delete h; + } +} + +void MidiOutput::reset() +{ + const MidiOutHandle* const h = (MidiOutHandle*) internal; + midiOutReset (h->handle); +} + +bool MidiOutput::getVolume (float& leftVol, + float& rightVol) +{ + const MidiOutHandle* const handle = (const MidiOutHandle*) internal; + + DWORD n; + if (midiOutGetVolume (handle->handle, &n) == MMSYSERR_NOERROR) + { + const unsigned short* const nn = (const unsigned short*) &n; + rightVol = nn[0] / (float) 0xffff; + leftVol = nn[1] / (float) 0xffff; + return true; + } + else + { + rightVol = leftVol = 1.0f; + return false; + } +} + +void MidiOutput::setVolume (float leftVol, + float rightVol) +{ + const MidiOutHandle* const handle = (MidiOutHandle*) internal; + + DWORD n; + unsigned short* const nn = (unsigned short*) &n; + nn[0] = (unsigned short) jlimit (0, 0xffff, (int)(rightVol * 0xffff)); + nn[1] = (unsigned short) jlimit (0, 0xffff, (int)(leftVol * 0xffff)); + midiOutSetVolume (handle->handle, n); +} + +void MidiOutput::sendMessageNow (const MidiMessage& message) +{ + const MidiOutHandle* const handle = (const MidiOutHandle*) internal; + + if (message.getRawDataSize() > 3 + || message.isSysEx()) + { + MIDIHDR h; + zerostruct (h); + + h.lpData = (char*) message.getRawData(); + h.dwBufferLength = message.getRawDataSize(); + h.dwBytesRecorded = message.getRawDataSize(); + + if (midiOutPrepareHeader (handle->handle, &h, sizeof (MIDIHDR)) == MMSYSERR_NOERROR) + { + MMRESULT res = midiOutLongMsg (handle->handle, &h, sizeof (MIDIHDR)); + + if (res == MMSYSERR_NOERROR) + { + while ((h.dwFlags & MHDR_DONE) == 0) + Sleep (1); + + int count = 500; // 1 sec timeout + + while (--count >= 0) + { + res = midiOutUnprepareHeader (handle->handle, &h, sizeof (MIDIHDR)); + + if (res == MIDIERR_STILLPLAYING) + Sleep (2); + else + break; + } + } + } + } + else + { + midiOutShortMsg (handle->handle, + *(unsigned int*) message.getRawData()); + } +} + +#endif +/********* End of inlined file: juce_win32_Midi.cpp *********/ + +/********* Start of inlined file: juce_win32_ASIO.cpp *********/ +// (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 + +#ifdef ASIO_DEBUGGING + #define log(a) { Logger::writeToLog (a); DBG (a) } +#else + #define log(a) {} +#endif + +#ifdef ASIO_DEBUGGING +static void logError (const String& context, long error) +{ + String err ("unknown error"); + + if (error == ASE_NotPresent) + err = "Not Present"; + else if (error == ASE_HWMalfunction) + err = "Hardware Malfunction"; + else if (error == ASE_InvalidParameter) + err = "Invalid Parameter"; + else if (error == ASE_InvalidMode) + err = "Invalid Mode"; + else if (error == ASE_SPNotAdvancing) + err = "Sample position not advancing"; + else if (error == ASE_NoClock) + err = "No Clock"; + else if (error == ASE_NoMemory) + err = "Out of memory"; + + log (T("!!error: ") + context + T(" - ") + err); +} +#else + #define logError(a, b) {} +#endif + +class ASIOAudioIODevice; +static ASIOAudioIODevice* volatile currentASIODev[3] = { 0, 0, 0 }; + +static const int maxASIOChannels = 160; + +class JUCE_API ASIOAudioIODevice : public AudioIODevice, + private Timer +{ +public: + Component ourWindow; + + ASIOAudioIODevice (const String& name_, const CLSID classId_, const int slotNumber) + : AudioIODevice (name_, T("ASIO")), + asioObject (0), + classId (classId_), + currentBitDepth (16), + currentSampleRate (0), + tempBuffer (0), + isOpen_ (false), + isStarted (false), + postOutput (true), + insideControlPanelModalLoop (false), + shouldUsePreferredSize (false) + { + name = name_; + + ourWindow.addToDesktop (0); + windowHandle = ourWindow.getWindowHandle(); + + jassert (currentASIODev [slotNumber] == 0); + currentASIODev [slotNumber] = this; + + openDevice(); + } + + ~ASIOAudioIODevice() + { + for (int i = 0; i < numElementsInArray (currentASIODev); ++i) + if (currentASIODev[i] == this) + currentASIODev[i] = 0; + + close(); + log ("ASIO - exiting"); + removeCurrentDriver(); + + juce_free (tempBuffer); + } + + void updateSampleRates() + { + // find a list of sample rates.. + const double possibleSampleRates[] = { 44100.0, 48000.0, 88200.0, 96000.0, 176400.0, 192000.0 }; + sampleRates.clear(); + + if (asioObject != 0) + { + for (int index = 0; index < numElementsInArray (possibleSampleRates); ++index) + { + const long err = asioObject->canSampleRate (possibleSampleRates[index]); + + if (err == 0) + { + sampleRates.add ((int) possibleSampleRates[index]); + log (T("rate: ") + String ((int) possibleSampleRates[index])); + } + else if (err != ASE_NoClock) + { + logError (T("CanSampleRate"), err); + } + } + + if (sampleRates.size() == 0) + { + double cr = 0; + const long err = asioObject->getSampleRate (&cr); + log (T("No sample rates supported - current rate: ") + String ((int) cr)); + + if (err == 0) + sampleRates.add ((int) cr); + } + } + } + + const StringArray getOutputChannelNames() + { + return outputChannelNames; + } + + const StringArray getInputChannelNames() + { + return inputChannelNames; + } + + int getNumSampleRates() + { + return sampleRates.size(); + } + + double getSampleRate (int index) + { + return sampleRates [index]; + } + + int getNumBufferSizesAvailable() + { + return bufferSizes.size(); + } + + int getBufferSizeSamples (int index) + { + return bufferSizes [index]; + } + + int getDefaultBufferSize() + { + return preferredSize; + } + + const String open (const BitArray& inputChannels, + const BitArray& outputChannels, + double sr, + int bufferSizeSamples) + { + close(); + currentCallback = 0; + + if (bufferSizeSamples <= 0) + shouldUsePreferredSize = true; + + if (asioObject == 0 || ! isASIOOpen) + { + log ("Warning: device not open"); + const String err (openDevice()); + + if (asioObject == 0 || ! isASIOOpen) + return err; + } + + isStarted = false; + bufferIndex = -1; + long err = 0; + + long newPreferredSize = 0; + + // if the preferred size has just changed, assume it's a control panel thing and use it as the new value. + minSize = 0; + maxSize = 0; + newPreferredSize = 0; + granularity = 0; + + if (asioObject->getBufferSize (&minSize, &maxSize, &newPreferredSize, &granularity) == 0) + { + if (preferredSize != 0 && newPreferredSize != 0 && newPreferredSize != preferredSize) + shouldUsePreferredSize = true; + + preferredSize = newPreferredSize; + } + + // unfortunate workaround for certain manufacturers whose drivers crash horribly if you make + // dynamic changes to the buffer size... + shouldUsePreferredSize = shouldUsePreferredSize + || getName().containsIgnoreCase (T("Digidesign")); + + if (shouldUsePreferredSize) + { + log ("Using preferred size for buffer.."); + + if ((err = asioObject->getBufferSize (&minSize, &maxSize, &preferredSize, &granularity)) == 0) + { + bufferSizeSamples = preferredSize; + } + else + { + bufferSizeSamples = 1024; + logError ("GetBufferSize1", err); + } + + shouldUsePreferredSize = false; + } + + int sampleRate = roundDoubleToInt (sr); + currentSampleRate = sampleRate; + currentBlockSizeSamples = bufferSizeSamples; + currentChansOut.clear(); + currentChansIn.clear(); + zeromem (inBuffers, sizeof (inBuffers)); + zeromem (outBuffers, sizeof (outBuffers)); + + updateSampleRates(); + + if (sampleRate == 0 || (sampleRates.size() > 0 && ! sampleRates.contains (sampleRate))) + sampleRate = sampleRates[0]; + + jassert (sampleRate != 0); + if (sampleRate == 0) + sampleRate = 44100; + + long numSources = 32; + ASIOClockSource clocks[32]; + zeromem (clocks, sizeof (clocks)); + asioObject->getClockSources (clocks, &numSources); + bool isSourceSet = false; + + // careful not to remove this loop because it does more than just logging! + int i; + for (i = 0; i < numSources; ++i) + { + String s ("clock: "); + s += clocks[i].name; + + if (clocks[i].isCurrentSource) + { + isSourceSet = true; + s << " (cur)"; + } + + log (s); + } + + if (numSources > 1 && ! isSourceSet) + { + log ("setting clock source"); + asioObject->setClockSource (clocks[0].index); + Thread::sleep (20); + } + else + { + if (numSources == 0) + { + log ("ASIO - no clock sources!"); + } + } + + double cr = 0; + err = asioObject->getSampleRate (&cr); + if (err == 0) + { + currentSampleRate = cr; + } + else + { + logError ("GetSampleRate", err); + currentSampleRate = 0; + } + + error = String::empty; + needToReset = false; + isReSync = false; + err = 0; + bool buffersCreated = false; + + if (currentSampleRate != sampleRate) + { + log (T("ASIO samplerate: ") + String (currentSampleRate) + T(" to ") + String (sampleRate)); + err = asioObject->setSampleRate (sampleRate); + + if (err == ASE_NoClock && numSources > 0) + { + log ("trying to set a clock source.."); + Thread::sleep (10); + err = asioObject->setClockSource (clocks[0].index); + if (err != 0) + { + logError ("SetClock", err); + } + + Thread::sleep (10); + err = asioObject->setSampleRate (sampleRate); + } + } + + if (err == 0) + { + currentSampleRate = sampleRate; + + if (needToReset) + { + if (isReSync) + { + log ("Resync request"); + } + + log ("! Resetting ASIO after sample rate change"); + removeCurrentDriver(); + + loadDriver(); + const String error (initDriver()); + + if (error.isNotEmpty()) + { + log (T("ASIOInit: ") + error); + } + + needToReset = false; + isReSync = false; + } + + numActiveInputChans = 0; + numActiveOutputChans = 0; + + ASIOBufferInfo* info = bufferInfos; + int i; + for (i = 0; i < totalNumInputChans; ++i) + { + if (inputChannels[i]) + { + currentChansIn.setBit (i); + info->isInput = 1; + info->channelNum = i; + info->buffers[0] = info->buffers[1] = 0; + ++info; + ++numActiveInputChans; + } + } + + for (i = 0; i < totalNumOutputChans; ++i) + { + if (outputChannels[i]) + { + currentChansOut.setBit (i); + info->isInput = 0; + info->channelNum = i; + info->buffers[0] = info->buffers[1] = 0; + ++info; + ++numActiveOutputChans; + } + } + + const int totalBuffers = numActiveInputChans + numActiveOutputChans; + + callbacks.sampleRateDidChange = &sampleRateChangedCallback; + + if (currentASIODev[0] == this) + { + callbacks.bufferSwitch = &bufferSwitchCallback0; + callbacks.asioMessage = &asioMessagesCallback0; + callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback0; + } + else if (currentASIODev[1] == this) + { + callbacks.bufferSwitch = &bufferSwitchCallback1; + callbacks.asioMessage = &asioMessagesCallback1; + callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback1; + } + else if (currentASIODev[2] == this) + { + callbacks.bufferSwitch = &bufferSwitchCallback2; + callbacks.asioMessage = &asioMessagesCallback2; + callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback2; + } + else + { + jassertfalse + } + + log ("disposing buffers"); + err = asioObject->disposeBuffers(); + + log (T("creating buffers: ") + String (totalBuffers) + T(", ") + String (currentBlockSizeSamples)); + err = asioObject->createBuffers (bufferInfos, + totalBuffers, + currentBlockSizeSamples, + &callbacks); + + if (err != 0) + { + currentBlockSizeSamples = preferredSize; + logError ("create buffers 2", err); + + asioObject->disposeBuffers(); + err = asioObject->createBuffers (bufferInfos, + totalBuffers, + currentBlockSizeSamples, + &callbacks); + } + + if (err == 0) + { + buffersCreated = true; + + juce_free (tempBuffer); + + tempBuffer = (float*) juce_calloc (totalBuffers * currentBlockSizeSamples * sizeof (float) + 128); + + int n = 0; + Array types; + currentBitDepth = 16; + + for (i = 0; i < jmin (totalNumInputChans, maxASIOChannels); ++i) + { + if (inputChannels[i]) + { + inBuffers[n] = tempBuffer + (currentBlockSizeSamples * n); + + ASIOChannelInfo channelInfo; + zerostruct (channelInfo); + + channelInfo.channel = i; + channelInfo.isInput = 1; + asioObject->getChannelInfo (&channelInfo); + + types.addIfNotAlreadyThere (channelInfo.type); + typeToFormatParameters (channelInfo.type, + inputChannelBitDepths[n], + inputChannelBytesPerSample[n], + inputChannelIsFloat[n], + inputChannelLittleEndian[n]); + + currentBitDepth = jmax (currentBitDepth, inputChannelBitDepths[n]); + + ++n; + } + } + + jassert (numActiveInputChans == n); + n = 0; + + for (i = 0; i < jmin (totalNumOutputChans, maxASIOChannels); ++i) + { + if (outputChannels[i]) + { + outBuffers[n] = tempBuffer + (currentBlockSizeSamples * (numActiveInputChans + n)); + + ASIOChannelInfo channelInfo; + zerostruct (channelInfo); + + channelInfo.channel = i; + channelInfo.isInput = 0; + asioObject->getChannelInfo (&channelInfo); + + types.addIfNotAlreadyThere (channelInfo.type); + typeToFormatParameters (channelInfo.type, + outputChannelBitDepths[n], + outputChannelBytesPerSample[n], + outputChannelIsFloat[n], + outputChannelLittleEndian[n]); + + currentBitDepth = jmax (currentBitDepth, outputChannelBitDepths[n]); + + ++n; + } + } + + jassert (numActiveOutputChans == n); + + for (i = types.size(); --i >= 0;) + { + log (T("channel format: ") + String (types[i])); + } + + jassert (n <= totalBuffers); + + for (i = 0; i < numActiveOutputChans; ++i) + { + const int size = currentBlockSizeSamples * (outputChannelBitDepths[i] >> 3); + + if (bufferInfos [numActiveInputChans + i].buffers[0] == 0 + || bufferInfos [numActiveInputChans + i].buffers[1] == 0) + { + log ("!! Null buffers"); + } + else + { + zeromem (bufferInfos[numActiveInputChans + i].buffers[0], size); + zeromem (bufferInfos[numActiveInputChans + i].buffers[1], size); + } + } + + inputLatency = outputLatency = 0; + + if (asioObject->getLatencies (&inputLatency, &outputLatency) != 0) + { + log ("ASIO - no latencies"); + } + else + { + log (T("ASIO latencies: ") + + String ((int) outputLatency) + + T(", ") + + String ((int) inputLatency)); + } + + isOpen_ = true; + + log ("starting ASIO"); + calledback = false; + err = asioObject->start(); + + if (err != 0) + { + isOpen_ = false; + log ("ASIO - stop on failure"); + Thread::sleep (10); + asioObject->stop(); + error = "Can't start device"; + Thread::sleep (10); + } + else + { + int count = 300; + while (--count > 0 && ! calledback) + Thread::sleep (10); + + isStarted = true; + + if (! calledback) + { + error = "Device didn't start correctly"; + log ("ASIO didn't callback - stopping.."); + asioObject->stop(); + } + } + } + else + { + error = "Can't create i/o buffers"; + } + } + else + { + error = "Can't set sample rate: "; + error << sampleRate; + } + + if (error.isNotEmpty()) + { + logError (error, err); + + if (asioObject != 0 && buffersCreated) + asioObject->disposeBuffers(); + + Thread::sleep (20); + isStarted = false; + isOpen_ = false; + close(); + } + + needToReset = false; + isReSync = false; + + return error; + } + + void close() + { + error = String::empty; + stopTimer(); + stop(); + + if (isASIOOpen && isOpen_) + { + const ScopedLock sl (callbackLock); + + isOpen_ = false; + isStarted = false; + needToReset = false; + isReSync = false; + + log ("ASIO - stopping"); + + if (asioObject != 0) + { + Thread::sleep (20); + asioObject->stop(); + Thread::sleep (10); + asioObject->disposeBuffers(); + } + + Thread::sleep (10); + } + } + + bool isOpen() + { + return isOpen_ || insideControlPanelModalLoop; + } + + int getCurrentBufferSizeSamples() + { + return currentBlockSizeSamples; + } + + double getCurrentSampleRate() + { + return currentSampleRate; + } + + const BitArray getActiveOutputChannels() const + { + return currentChansOut; + } + + const BitArray getActiveInputChannels() const + { + return currentChansIn; + } + + int getCurrentBitDepth() + { + return currentBitDepth; + } + + int getOutputLatencyInSamples() + { + return outputLatency + currentBlockSizeSamples / 4; + } + + int getInputLatencyInSamples() + { + return inputLatency + currentBlockSizeSamples / 4; + } + + void start (AudioIODeviceCallback* callback) + { + if (callback != 0) + { + callback->audioDeviceAboutToStart (this); + + const ScopedLock sl (callbackLock); + currentCallback = callback; + } + } + + void stop() + { + AudioIODeviceCallback* const lastCallback = currentCallback; + + { + const ScopedLock sl (callbackLock); + currentCallback = 0; + } + + if (lastCallback != 0) + lastCallback->audioDeviceStopped(); + } + + bool isPlaying() + { + return isASIOOpen && (currentCallback != 0); + } + + const String getLastError() + { + return error; + } + + bool hasControlPanel() const + { + return true; + } + + bool showControlPanel() + { + log ("ASIO - showing control panel"); + + Component modalWindow (String::empty); + modalWindow.setOpaque (true); + modalWindow.addToDesktop (0); + modalWindow.enterModalState(); + bool done = false; + + JUCE_TRY + { + close(); + insideControlPanelModalLoop = true; + + const uint32 started = Time::getMillisecondCounter(); + + if (asioObject != 0) + { + asioObject->controlPanel(); + + const int spent = (int) Time::getMillisecondCounter() - (int) started; + + log (T("spent: ") + String (spent)); + + if (spent > 300) + { + shouldUsePreferredSize = true; + done = true; + } + } + } + JUCE_CATCH_ALL + + insideControlPanelModalLoop = false; + return done; + } + + void resetRequest() throw() + { + needToReset = true; + } + + void resyncRequest() throw() + { + needToReset = true; + isReSync = true; + } + + void timerCallback() + { + if (! insideControlPanelModalLoop) + { + stopTimer(); + + // used to cause a reset + log ("! ASIO restart request!"); + + if (isOpen_) + { + AudioIODeviceCallback* const oldCallback = currentCallback; + + close(); + open (BitArray (currentChansIn), BitArray (currentChansOut), + currentSampleRate, currentBlockSizeSamples); + + if (oldCallback != 0) + start (oldCallback); + } + } + else + { + startTimer (100); + } + } + + juce_UseDebuggingNewOperator + +private: + + IASIO* volatile asioObject; + ASIOCallbacks callbacks; + + void* windowHandle; + CLSID classId; + String error; + + long totalNumInputChans, totalNumOutputChans; + StringArray inputChannelNames, outputChannelNames; + + Array sampleRates, bufferSizes; + long inputLatency, outputLatency; + long minSize, maxSize, preferredSize, granularity; + + int volatile currentBlockSizeSamples; + int volatile currentBitDepth; + double volatile currentSampleRate; + BitArray currentChansOut, currentChansIn; + AudioIODeviceCallback* volatile currentCallback; + CriticalSection callbackLock; + + ASIOBufferInfo bufferInfos [maxASIOChannels]; + float* inBuffers [maxASIOChannels]; + float* outBuffers [maxASIOChannels]; + + int inputChannelBitDepths [maxASIOChannels]; + int outputChannelBitDepths [maxASIOChannels]; + int inputChannelBytesPerSample [maxASIOChannels]; + int outputChannelBytesPerSample [maxASIOChannels]; + bool inputChannelIsFloat [maxASIOChannels]; + bool outputChannelIsFloat [maxASIOChannels]; + bool inputChannelLittleEndian [maxASIOChannels]; + bool outputChannelLittleEndian [maxASIOChannels]; + + WaitableEvent event1; + float* tempBuffer; + int volatile bufferIndex, numActiveInputChans, numActiveOutputChans; + + bool isOpen_, isStarted; + bool volatile isASIOOpen; + bool volatile calledback; + bool volatile littleEndian, postOutput, needToReset, isReSync; + bool volatile insideControlPanelModalLoop; + bool volatile shouldUsePreferredSize; + + void removeCurrentDriver() + { + if (asioObject != 0) + { + asioObject->Release(); + asioObject = 0; + } + } + + bool loadDriver() + { + removeCurrentDriver(); + + JUCE_TRY + { + if (CoCreateInstance (classId, 0, CLSCTX_INPROC_SERVER, + classId, (void**) &asioObject) == S_OK) + { + return true; + } + } + JUCE_CATCH_ALL + + asioObject = 0; + + return false; + } + + const String initDriver() + { + if (asioObject != 0) + { + char buffer [256]; + zeromem (buffer, sizeof (buffer)); + + if (! asioObject->init (windowHandle)) + { + asioObject->getErrorMessage (buffer); + return String (buffer, sizeof (buffer) - 1); + } + + // just in case any daft drivers expect this to be called.. + asioObject->getDriverName (buffer); + + return String::empty; + } + + return "No Driver"; + } + + const String openDevice() + { + // use this in case the driver starts opening dialog boxes.. + Component modalWindow (String::empty); + modalWindow.setOpaque (true); + modalWindow.addToDesktop (0); + modalWindow.enterModalState(); + + // open the device and get its info.. + log (T("opening ASIO device: ") + getName()); + + needToReset = false; + isReSync = false; + outputChannelNames.clear(); + inputChannelNames.clear(); + bufferSizes.clear(); + sampleRates.clear(); + isASIOOpen = false; + isOpen_ = false; + totalNumInputChans = 0; + totalNumOutputChans = 0; + numActiveInputChans = 0; + numActiveOutputChans = 0; + currentCallback = 0; + + error = String::empty; + + if (getName().isEmpty()) + return error; + + long err = 0; + + if (loadDriver()) + { + if ((error = initDriver()).isEmpty()) + { + numActiveInputChans = 0; + numActiveOutputChans = 0; + totalNumInputChans = 0; + totalNumOutputChans = 0; + + if (asioObject != 0 + && (err = asioObject->getChannels (&totalNumInputChans, &totalNumOutputChans)) == 0) + { + log (String ((int) totalNumInputChans) + T(" in, ") + String ((int) totalNumOutputChans) + T(" out")); + + if ((err = asioObject->getBufferSize (&minSize, &maxSize, &preferredSize, &granularity)) == 0) + { + // find a list of buffer sizes.. + log (String ((int) minSize) + T(" ") + String ((int) maxSize) + T(" ") + String ((int)preferredSize) + T(" ") + String ((int)granularity)); + + if (granularity >= 0) + { + granularity = jmax (1, (int) granularity); + + for (int i = jmax (minSize, (int) granularity); i < jmin (6400, maxSize); i += granularity) + bufferSizes.addIfNotAlreadyThere (granularity * (i / granularity)); + } + else if (granularity < 0) + { + for (int i = 0; i < 18; ++i) + { + const int s = (1 << i); + + if (s >= minSize && s <= maxSize) + bufferSizes.add (s); + } + } + + if (! bufferSizes.contains (preferredSize)) + bufferSizes.insert (0, preferredSize); + + double currentRate = 0; + asioObject->getSampleRate (¤tRate); + + if (currentRate <= 0.0 || currentRate > 192001.0) + { + log ("setting sample rate"); + err = asioObject->setSampleRate (44100.0); + if (err != 0) + { + logError ("setting sample rate", err); + } + + asioObject->getSampleRate (¤tRate); + } + + currentSampleRate = currentRate; + + postOutput = (asioObject->outputReady() == 0); + if (postOutput) + { + log ("ASIO outputReady = ok"); + } + + updateSampleRates(); + + // ..because cubase does it at this point + inputLatency = outputLatency = 0; + if (asioObject->getLatencies (&inputLatency, &outputLatency) != 0) + { + log ("ASIO - no latencies"); + } + + log (String ("latencies: ") + + String ((int) inputLatency) + + T(", ") + String ((int) outputLatency)); + + // create some dummy buffers now.. because cubase does.. + numActiveInputChans = 0; + numActiveOutputChans = 0; + + ASIOBufferInfo* info = bufferInfos; + int i, numChans = 0; + for (i = 0; i < jmin (2, totalNumInputChans); ++i) + { + info->isInput = 1; + info->channelNum = i; + info->buffers[0] = info->buffers[1] = 0; + ++info; + ++numChans; + } + + const int outputBufferIndex = numChans; + + for (i = 0; i < jmin (2, totalNumOutputChans); ++i) + { + info->isInput = 0; + info->channelNum = i; + info->buffers[0] = info->buffers[1] = 0; + ++info; + ++numChans; + } + + callbacks.sampleRateDidChange = &sampleRateChangedCallback; + + if (currentASIODev[0] == this) + { + callbacks.bufferSwitch = &bufferSwitchCallback0; + callbacks.asioMessage = &asioMessagesCallback0; + callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback0; + } + else if (currentASIODev[1] == this) + { + callbacks.bufferSwitch = &bufferSwitchCallback1; + callbacks.asioMessage = &asioMessagesCallback1; + callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback1; + } + else if (currentASIODev[2] == this) + { + callbacks.bufferSwitch = &bufferSwitchCallback2; + callbacks.asioMessage = &asioMessagesCallback2; + callbacks.bufferSwitchTimeInfo = &bufferSwitchTimeInfoCallback2; + } + else + { + jassertfalse + } + + log (T("creating buffers (dummy): ") + String (numChans) + + T(", ") + String ((int) preferredSize)); + + if (preferredSize > 0) + { + err = asioObject->createBuffers (bufferInfos, numChans, preferredSize, &callbacks); + if (err != 0) + { + logError ("dummy buffers", err); + } + } + + long newInps = 0, newOuts = 0; + asioObject->getChannels (&newInps, &newOuts); + + if (totalNumInputChans != newInps || totalNumOutputChans != newOuts) + { + totalNumInputChans = newInps; + totalNumOutputChans = newOuts; + + log (String ((int) totalNumInputChans) + T(" in; ") + + String ((int) totalNumOutputChans) + T(" out")); + } + + updateSampleRates(); + + ASIOChannelInfo channelInfo; + channelInfo.type = 0; + + for (i = 0; i < totalNumInputChans; ++i) + { + zerostruct (channelInfo); + channelInfo.channel = i; + channelInfo.isInput = 1; + asioObject->getChannelInfo (&channelInfo); + + inputChannelNames.add (String (channelInfo.name)); + } + + for (i = 0; i < totalNumOutputChans; ++i) + { + zerostruct (channelInfo); + channelInfo.channel = i; + channelInfo.isInput = 0; + asioObject->getChannelInfo (&channelInfo); + + outputChannelNames.add (String (channelInfo.name)); + + typeToFormatParameters (channelInfo.type, + outputChannelBitDepths[i], + outputChannelBytesPerSample[i], + outputChannelIsFloat[i], + outputChannelLittleEndian[i]); + + if (i < 2) + { + // clear the channels that are used with the dummy stuff + const int bytesPerBuffer = preferredSize * (outputChannelBitDepths[i] >> 3); + zeromem (bufferInfos [outputBufferIndex + i].buffers[0], bytesPerBuffer); + zeromem (bufferInfos [outputBufferIndex + i].buffers[1], bytesPerBuffer); + } + } + + outputChannelNames.trim(); + inputChannelNames.trim(); + outputChannelNames.appendNumbersToDuplicates (false, true); + inputChannelNames.appendNumbersToDuplicates (false, true); + + // start and stop because cubase does it.. + asioObject->getLatencies (&inputLatency, &outputLatency); + + if ((err = asioObject->start()) != 0) + { + // ignore an error here, as it might start later after setting other stuff up + logError ("ASIO start", err); + } + + Thread::sleep (100); + asioObject->stop(); + } + else + { + error = "Can't detect buffer sizes"; + } + } + else + { + error = "Can't detect asio channels"; + } + } + } + else + { + error = "No such device"; + } + + if (error.isNotEmpty()) + { + logError (error, err); + + if (asioObject != 0) + asioObject->disposeBuffers(); + + removeCurrentDriver(); + isASIOOpen = false; + } + else + { + isASIOOpen = true; + log ("ASIO device open"); + } + + isOpen_ = false; + needToReset = false; + isReSync = false; + + return error; + } + + void callback (const long index) throw() + { + if (isStarted) + { + bufferIndex = index; + processBuffer(); + } + else + { + if (postOutput && (asioObject != 0)) + asioObject->outputReady(); + } + + calledback = true; + } + + void processBuffer() throw() + { + const ASIOBufferInfo* const infos = bufferInfos; + const int bi = bufferIndex; + + const ScopedLock sl (callbackLock); + + if (needToReset) + { + needToReset = false; + + if (isReSync) + { + log ("! ASIO resync"); + isReSync = false; + } + else + { + startTimer (20); + } + } + + if (bi >= 0) + { + const int samps = currentBlockSizeSamples; + + if (currentCallback != 0) + { + int i; + for (i = 0; i < numActiveInputChans; ++i) + { + float* const dst = inBuffers[i]; + + jassert (dst != 0); + + const char* const src = (const char*) (infos[i].buffers[bi]); + + if (inputChannelIsFloat[i]) + { + memcpy (dst, src, samps * sizeof (float)); + } + else + { + jassert (dst == tempBuffer + (samps * i)); + + switch (inputChannelBitDepths[i]) + { + case 16: + convertInt16ToFloat (src, dst, inputChannelBytesPerSample[i], + samps, inputChannelLittleEndian[i]); + break; + + case 24: + convertInt24ToFloat (src, dst, inputChannelBytesPerSample[i], + samps, inputChannelLittleEndian[i]); + break; + + case 32: + convertInt32ToFloat (src, dst, inputChannelBytesPerSample[i], + samps, inputChannelLittleEndian[i]); + break; + + case 64: + jassertfalse + break; + } + } + } + + currentCallback->audioDeviceIOCallback ((const float**) inBuffers, + numActiveInputChans, + outBuffers, + numActiveOutputChans, + samps); + + for (i = 0; i < numActiveOutputChans; ++i) + { + float* const src = outBuffers[i]; + + jassert (src != 0); + + char* const dst = (char*) (infos [numActiveInputChans + i].buffers[bi]); + + if (outputChannelIsFloat[i]) + { + memcpy (dst, src, samps * sizeof (float)); + } + else + { + jassert (src == tempBuffer + (samps * (numActiveInputChans + i))); + + switch (outputChannelBitDepths[i]) + { + case 16: + convertFloatToInt16 (src, dst, outputChannelBytesPerSample[i], + samps, outputChannelLittleEndian[i]); + break; + + case 24: + convertFloatToInt24 (src, dst, outputChannelBytesPerSample[i], + samps, outputChannelLittleEndian[i]); + break; + + case 32: + convertFloatToInt32 (src, dst, outputChannelBytesPerSample[i], + samps, outputChannelLittleEndian[i]); + break; + + case 64: + jassertfalse + break; + } + } + } + } + else + { + for (int i = 0; i < numActiveOutputChans; ++i) + { + const int bytesPerBuffer = samps * (outputChannelBitDepths[i] >> 3); + zeromem (infos[numActiveInputChans + i].buffers[bi], bytesPerBuffer); + } + } + } + + if (postOutput) + asioObject->outputReady(); + } + + static ASIOTime* bufferSwitchTimeInfoCallback0 (ASIOTime*, long index, long) throw() + { + if (currentASIODev[0] != 0) + currentASIODev[0]->callback (index); + + return 0; + } + + static ASIOTime* bufferSwitchTimeInfoCallback1 (ASIOTime*, long index, long) throw() + { + if (currentASIODev[1] != 0) + currentASIODev[1]->callback (index); + + return 0; + } + + static ASIOTime* bufferSwitchTimeInfoCallback2 (ASIOTime*, long index, long) throw() + { + if (currentASIODev[2] != 0) + currentASIODev[2]->callback (index); + + return 0; + } + + static void bufferSwitchCallback0 (long index, long) throw() + { + if (currentASIODev[0] != 0) + currentASIODev[0]->callback (index); + } + + static void bufferSwitchCallback1 (long index, long) throw() + { + if (currentASIODev[1] != 0) + currentASIODev[1]->callback (index); + } + + static void bufferSwitchCallback2 (long index, long) throw() + { + if (currentASIODev[2] != 0) + currentASIODev[2]->callback (index); + } + + static long asioMessagesCallback0 (long selector, long value, void*, double*) throw() + { + return asioMessagesCallback (selector, value, 0); + } + + static long asioMessagesCallback1 (long selector, long value, void*, double*) throw() + { + return asioMessagesCallback (selector, value, 1); + } + + static long asioMessagesCallback2 (long selector, long value, void*, double*) throw() + { + return asioMessagesCallback (selector, value, 2); + } + + static long asioMessagesCallback (long selector, long value, const int deviceIndex) throw() + { + switch (selector) + { + case kAsioSelectorSupported: + if (value == kAsioResetRequest + || value == kAsioEngineVersion + || value == kAsioResyncRequest + || value == kAsioLatenciesChanged + || value == kAsioSupportsInputMonitor) + return 1; + break; + + case kAsioBufferSizeChange: + break; + + case kAsioResetRequest: + if (currentASIODev[deviceIndex] != 0) + currentASIODev[deviceIndex]->resetRequest(); + + return 1; + + case kAsioResyncRequest: + if (currentASIODev[deviceIndex] != 0) + currentASIODev[deviceIndex]->resyncRequest(); + + return 1; + + case kAsioLatenciesChanged: + return 1; + + case kAsioEngineVersion: + return 2; + + case kAsioSupportsTimeInfo: + case kAsioSupportsTimeCode: + return 0; + } + + return 0; + } + + static void sampleRateChangedCallback (ASIOSampleRate) throw() + { + } + + static void convertInt16ToFloat (const char* src, + float* dest, + const int srcStrideBytes, + int numSamples, + const bool littleEndian) throw() + { + const double g = 1.0 / 32768.0; + + if (littleEndian) + { + while (--numSamples >= 0) + { + *dest++ = (float) (g * (short) littleEndianShort (src)); + src += srcStrideBytes; + } + } + else + { + while (--numSamples >= 0) + { + *dest++ = (float) (g * (short) bigEndianShort (src)); + src += srcStrideBytes; + } + } + } + + static void convertFloatToInt16 (const float* src, + char* dest, + const int dstStrideBytes, + int numSamples, + const bool littleEndian) throw() + { + const double maxVal = (double) 0x7fff; + + if (littleEndian) + { + while (--numSamples >= 0) + { + *(uint16*) dest = swapIfBigEndian ((uint16) (short) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); + dest += dstStrideBytes; + } + } + else + { + while (--numSamples >= 0) + { + *(uint16*) dest = swapIfLittleEndian ((uint16) (short) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); + dest += dstStrideBytes; + } + } + } + + static void convertInt24ToFloat (const char* src, + float* dest, + const int srcStrideBytes, + int numSamples, + const bool littleEndian) throw() + { + const double g = 1.0 / 0x7fffff; + + if (littleEndian) + { + while (--numSamples >= 0) + { + *dest++ = (float) (g * littleEndian24Bit (src)); + src += srcStrideBytes; + } + } + else + { + while (--numSamples >= 0) + { + *dest++ = (float) (g * bigEndian24Bit (src)); + src += srcStrideBytes; + } + } + } + + static void convertFloatToInt24 (const float* src, + char* dest, + const int dstStrideBytes, + int numSamples, + const bool littleEndian) throw() + { + const double maxVal = (double) 0x7fffff; + + if (littleEndian) + { + while (--numSamples >= 0) + { + littleEndian24BitToChars ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++)), dest); + dest += dstStrideBytes; + } + } + else + { + while (--numSamples >= 0) + { + bigEndian24BitToChars ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++)), dest); + dest += dstStrideBytes; + } + } + } + + static void convertInt32ToFloat (const char* src, + float* dest, + const int srcStrideBytes, + int numSamples, + const bool littleEndian) throw() + { + const double g = 1.0 / 0x7fffffff; + + if (littleEndian) + { + while (--numSamples >= 0) + { + *dest++ = (float) (g * (int) littleEndianInt (src)); + src += srcStrideBytes; + } + } + else + { + while (--numSamples >= 0) + { + *dest++ = (float) (g * (int) bigEndianInt (src)); + src += srcStrideBytes; + } + } + } + + static void convertFloatToInt32 (const float* src, + char* dest, + const int dstStrideBytes, + int numSamples, + const bool littleEndian) throw() + { + const double maxVal = (double) 0x7fffffff; + + if (littleEndian) + { + while (--numSamples >= 0) + { + *(uint32*) dest = swapIfBigEndian ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); + dest += dstStrideBytes; + } + } + else + { + while (--numSamples >= 0) + { + *(uint32*) dest = swapIfLittleEndian ((uint32) roundDoubleToInt (jlimit (-maxVal, maxVal, maxVal * *src++))); + dest += dstStrideBytes; + } + } + } + + static void typeToFormatParameters (const long type, + int& bitDepth, + int& byteStride, + bool& formatIsFloat, + bool& littleEndian) throw() + { + bitDepth = 0; + littleEndian = false; + formatIsFloat = false; + + switch (type) + { + case ASIOSTInt16MSB: + case ASIOSTInt16LSB: + case ASIOSTInt32MSB16: + case ASIOSTInt32LSB16: + bitDepth = 16; break; + + case ASIOSTFloat32MSB: + case ASIOSTFloat32LSB: + formatIsFloat = true; + bitDepth = 32; break; + + case ASIOSTInt32MSB: + case ASIOSTInt32LSB: + bitDepth = 32; break; + + case ASIOSTInt24MSB: + case ASIOSTInt24LSB: + case ASIOSTInt32MSB24: + case ASIOSTInt32LSB24: + case ASIOSTInt32MSB18: + case ASIOSTInt32MSB20: + case ASIOSTInt32LSB18: + case ASIOSTInt32LSB20: + bitDepth = 24; break; + + case ASIOSTFloat64MSB: + case ASIOSTFloat64LSB: + default: + bitDepth = 64; + break; + } + + switch (type) + { + case ASIOSTInt16MSB: + case ASIOSTInt32MSB16: + case ASIOSTFloat32MSB: + case ASIOSTFloat64MSB: + case ASIOSTInt32MSB: + case ASIOSTInt32MSB18: + case ASIOSTInt32MSB20: + case ASIOSTInt32MSB24: + case ASIOSTInt24MSB: + littleEndian = false; break; + + case ASIOSTInt16LSB: + case ASIOSTInt32LSB16: + case ASIOSTFloat32LSB: + case ASIOSTFloat64LSB: + case ASIOSTInt32LSB: + case ASIOSTInt32LSB18: + case ASIOSTInt32LSB20: + case ASIOSTInt32LSB24: + case ASIOSTInt24LSB: + littleEndian = true; break; + + default: + break; + } + + switch (type) + { + case ASIOSTInt16LSB: + case ASIOSTInt16MSB: + byteStride = 2; break; + + case ASIOSTInt24LSB: + case ASIOSTInt24MSB: + byteStride = 3; break; + + case ASIOSTInt32MSB16: + case ASIOSTInt32LSB16: + case ASIOSTInt32MSB: + case ASIOSTInt32MSB18: + case ASIOSTInt32MSB20: + case ASIOSTInt32MSB24: + case ASIOSTInt32LSB: + case ASIOSTInt32LSB18: + case ASIOSTInt32LSB20: + case ASIOSTInt32LSB24: + case ASIOSTFloat32LSB: + case ASIOSTFloat32MSB: + byteStride = 4; break; + + case ASIOSTFloat64MSB: + case ASIOSTFloat64LSB: + byteStride = 8; break; + + default: + break; + } + } +}; + +class ASIOAudioIODeviceType : public AudioIODeviceType +{ +public: + ASIOAudioIODeviceType() + : AudioIODeviceType (T("ASIO")), + classIds (2), + hasScanned (false) + { + CoInitialize (0); + } + + ~ASIOAudioIODeviceType() + { + } + + void scanForDevices() + { + hasScanned = true; + + deviceNames.clear(); + classIds.clear(); + + HKEY hk = 0; + int index = 0; + + if (RegOpenKeyA (HKEY_LOCAL_MACHINE, "software\\asio", &hk) == ERROR_SUCCESS) + { + for (;;) + { + char name [256]; + + if (RegEnumKeyA (hk, index++, name, 256) == ERROR_SUCCESS) + { + addDriverInfo (name, hk); + } + else + { + break; + } + } + + RegCloseKey (hk); + } + } + + const StringArray getDeviceNames (const bool /*wantInputNames*/) const + { + jassert (hasScanned); // need to call scanForDevices() before doing this + + return deviceNames; + } + + int getDefaultDeviceIndex (const bool) const + { + jassert (hasScanned); // need to call scanForDevices() before doing this + + for (int i = deviceNames.size(); --i >= 0;) + if (deviceNames[i].containsIgnoreCase (T("asio4all"))) + return i; // asio4all is a safe choice for a default.. + +#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 + // it in the debugger, which can be a bit annoying) +#endif + + return 0; + } + + static int findFreeSlot() + { + for (int i = 0; i < numElementsInArray (currentASIODev); ++i) + if (currentASIODev[i] == 0) + return i; + + jassertfalse; // unfortunately you can only have a finite number + // of ASIO devices open at the same time.. + return -1; + } + + int getIndexOfDevice (AudioIODevice* d, const bool /*asInput*/) const + { + jassert (hasScanned); // need to call scanForDevices() before doing this + + return d == 0 ? -1 : deviceNames.indexOf (d->getName()); + } + + bool hasSeparateInputsAndOutputs() const { return false; } + + AudioIODevice* createDevice (const String& outputDeviceName, + const String& inputDeviceName) + { + jassert (inputDeviceName == outputDeviceName); + (void) inputDeviceName; + jassert (hasScanned); // need to call scanForDevices() before doing this + + const int index = deviceNames.indexOf (outputDeviceName); + + if (index >= 0) + { + const int freeSlot = findFreeSlot(); + + if (freeSlot >= 0) + return new ASIOAudioIODevice (outputDeviceName, *(classIds [index]), freeSlot); + } + + return 0; + } + + juce_UseDebuggingNewOperator + +private: + StringArray deviceNames; + OwnedArray classIds; + + bool hasScanned; + + static bool checkClassIsOk (const String& classId) + { + HKEY hk = 0; + bool ok = false; + + if (RegOpenKeyA (HKEY_CLASSES_ROOT, "clsid", &hk) == ERROR_SUCCESS) + { + int index = 0; + + for (;;) + { + char buf [512]; + + if (RegEnumKeyA (hk, index++, buf, 512) == ERROR_SUCCESS) + { + if (classId.equalsIgnoreCase (buf)) + { + HKEY subKey, pathKey; + + if (RegOpenKeyExA (hk, buf, 0, KEY_READ, &subKey) == ERROR_SUCCESS) + { + if (RegOpenKeyExA (subKey, "InprocServer32", 0, KEY_READ, &pathKey) == ERROR_SUCCESS) + { + char pathName [600]; + DWORD dtype = REG_SZ; + DWORD dsize = sizeof (pathName); + + if (RegQueryValueExA (pathKey, 0, 0, &dtype, + (LPBYTE) pathName, &dsize) == ERROR_SUCCESS) + { + OFSTRUCT of; + zerostruct (of); + + of.cBytes = sizeof (of); + + ok = (OpenFile (String (pathName), &of, OF_EXIST) != 0); + } + + RegCloseKey (pathKey); + } + + RegCloseKey (subKey); + } + + break; + } + } + else + { + break; + } + } + + RegCloseKey (hk); + } + + return ok; + } + + void addDriverInfo (const String& keyName, HKEY hk) + { + HKEY subKey; + + if (RegOpenKeyExA (hk, keyName, 0, KEY_READ, &subKey) == ERROR_SUCCESS) + { + char buf [256]; + DWORD dtype = REG_SZ; + DWORD dsize = sizeof (buf); + zeromem (buf, dsize); + + if (RegQueryValueExA (subKey, "clsid", 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) + { + if (dsize > 0 && checkClassIsOk (buf)) + { + wchar_t classIdStr [130]; + MultiByteToWideChar (CP_ACP, 0, buf, -1, classIdStr, 128); + + String deviceName; + CLSID classId; + + if (CLSIDFromString ((LPOLESTR) classIdStr, &classId) == S_OK) + { + dtype = REG_SZ; + dsize = sizeof (buf); + + if (RegQueryValueExA (subKey, "description", 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) + deviceName = buf; + else + deviceName = keyName; + + log (T("found ") + deviceName); + deviceNames.add (deviceName); + classIds.add (new CLSID (classId)); + } + } + + RegCloseKey (subKey); + } + } + } + + ASIOAudioIODeviceType (const ASIOAudioIODeviceType&); + const ASIOAudioIODeviceType& operator= (const ASIOAudioIODeviceType&); +}; + +AudioIODeviceType* juce_createASIOAudioIODeviceType() +{ + return new ASIOAudioIODeviceType(); +} + +AudioIODevice* juce_createASIOAudioIODeviceForGUID (const String& name, + void* guid) +{ + const int freeSlot = ASIOAudioIODeviceType::findFreeSlot(); + + if (freeSlot < 0) + return 0; + + return new ASIOAudioIODevice (name, *(CLSID*) guid, freeSlot); +} + +#undef log + +#endif +/********* End of inlined file: juce_win32_ASIO.cpp *********/ + /********* Start of inlined file: juce_win32_DirectSound.cpp *********/ +// (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" { @@ -237495,41 +252197,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: @@ -237945,5840 +252623,43 @@ const String DSoundAudioIODevice::openDevice (const BitArray& inputChannels, #undef log -END_JUCE_NAMESPACE +#endif /********* End of inlined file: juce_win32_DirectSound.cpp *********/ -/********* Start of inlined file: juce_win32_FileChooser.cpp *********/ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) #endif -#include - -BEGIN_JUCE_NAMESPACE - -#ifdef _MSC_VER - #pragma warning (pop) -#endif - -static const void* defaultDirPath = 0; -static String returnedString; // need this to get non-existent pathnames from the directory chooser -static Component* currentExtraFileWin = 0; - -static bool areThereAnyAlwaysOnTopWindows() -{ - for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;) - { - Component* c = Desktop::getInstance().getComponent (i); - - if (c != 0 && c->isAlwaysOnTop() && c->isShowing()) - return true; - } - - return false; -} - -static int CALLBACK browseCallbackProc (HWND hWnd, UINT msg, LPARAM lParam, LPARAM /*lpData*/) -{ - if (msg == BFFM_INITIALIZED) - { - SendMessage (hWnd, BFFM_SETSELECTIONW, TRUE, (LPARAM) defaultDirPath); - } - else if (msg == BFFM_VALIDATEFAILEDW) - { - returnedString = (LPCWSTR) lParam; - } - else if (msg == BFFM_VALIDATEFAILEDA) - { - returnedString = (const char*) lParam; - } - - return 0; -} - -void juce_setWindowStyleBit (HWND h, int styleType, int feature, bool bitIsSet); - -static UINT_PTR CALLBACK openCallback (HWND hdlg, UINT uiMsg, WPARAM /*wParam*/, LPARAM lParam) -{ - if (currentExtraFileWin != 0) - { - if (uiMsg == WM_INITDIALOG) - { - HWND dialogH = GetParent (hdlg); - jassert (dialogH != 0); - if (dialogH == 0) - dialogH = hdlg; - - RECT r, cr; - GetWindowRect (dialogH, &r); - GetClientRect (dialogH, &cr); - - SetWindowPos (dialogH, 0, - r.left, r.top, - currentExtraFileWin->getWidth() + jmax (150, r.right - r.left), - jmax (150, r.bottom - r.top), - SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); - - currentExtraFileWin->setBounds (cr.right, cr.top, currentExtraFileWin->getWidth(), cr.bottom - cr.top); - currentExtraFileWin->getChildComponent(0)->setBounds (0, 0, currentExtraFileWin->getWidth(), currentExtraFileWin->getHeight()); - - SetParent ((HWND) currentExtraFileWin->getWindowHandle(), (HWND) dialogH); - juce_setWindowStyleBit ((HWND)currentExtraFileWin->getWindowHandle(), GWL_STYLE, WS_CHILD, (dialogH != 0)); - juce_setWindowStyleBit ((HWND)currentExtraFileWin->getWindowHandle(), GWL_STYLE, WS_POPUP, (dialogH == 0)); - } - else if (uiMsg == WM_NOTIFY) - { - LPOFNOTIFY ofn = (LPOFNOTIFY) lParam; - - if (ofn->hdr.code == CDN_SELCHANGE) - { - FilePreviewComponent* comp = (FilePreviewComponent*) currentExtraFileWin->getChildComponent(0); - - if (comp != 0) - { - TCHAR path [MAX_PATH * 2]; - path[0] = 0; - CommDlg_OpenSave_GetFilePath (GetParent (hdlg), (LPARAM) &path, MAX_PATH); - - const String fn ((const WCHAR*) path); - - comp->selectedFileChanged (File (fn)); - } - } - } - } - - return 0; -} - -class FPComponentHolder : public Component -{ -public: - FPComponentHolder() - { - setVisible (true); - setOpaque (true); - } - - ~FPComponentHolder() - { - } - - void paint (Graphics& g) - { - g.fillAll (Colours::lightgrey); - } - -private: - FPComponentHolder (const FPComponentHolder&); - const FPComponentHolder& operator= (const FPComponentHolder&); -}; - -void FileChooser::showPlatformDialog (OwnedArray& results, - const String& title, - const File& currentFileOrDirectory, - const String& filter, - bool selectsDirectory, - bool isSaveDialogue, - bool warnAboutOverwritingExistingFiles, - bool selectMultipleFiles, - FilePreviewComponent* extraInfoComponent) -{ - const int numCharsAvailable = 32768; - MemoryBlock filenameSpace ((numCharsAvailable + 1) * sizeof (WCHAR), true); - WCHAR* const fname = (WCHAR*) filenameSpace.getData(); - int fnameIdx = 0; - - JUCE_TRY - { - // use a modal window as the parent for this dialog box - // to block input from other app windows - const Rectangle mainMon (Desktop::getInstance().getMainMonitorArea()); - - Component w (String::empty); - w.setBounds (mainMon.getX() + mainMon.getWidth() / 4, - mainMon.getY() + mainMon.getHeight() / 4, - 0, 0); - w.setOpaque (true); - w.setAlwaysOnTop (areThereAnyAlwaysOnTopWindows()); - w.addToDesktop (0); - - if (extraInfoComponent == 0) - w.enterModalState(); - - String initialDir; - - if (currentFileOrDirectory.isDirectory()) - { - initialDir = currentFileOrDirectory.getFullPathName(); - } - else - { - currentFileOrDirectory.getFileName().copyToBuffer (fname, numCharsAvailable); - - initialDir = currentFileOrDirectory.getParentDirectory().getFullPathName(); - } - - if (currentExtraFileWin->isValidComponent()) - { - jassertfalse - return; - } - - if (selectsDirectory) - { - LPITEMIDLIST list = 0; - filenameSpace.fillWith (0); - - { - BROWSEINFO bi; - zerostruct (bi); - - bi.hwndOwner = (HWND) w.getWindowHandle(); - bi.pszDisplayName = fname; - bi.lpszTitle = title; - bi.lpfn = browseCallbackProc; -#ifdef BIF_USENEWUI - bi.ulFlags = BIF_USENEWUI | BIF_VALIDATE; -#else - bi.ulFlags = 0x50; -#endif - defaultDirPath = (const WCHAR*) initialDir; - - list = SHBrowseForFolder (&bi); - - if (! SHGetPathFromIDListW (list, fname)) - { - fname[0] = 0; - returnedString = String::empty; - } - } - - LPMALLOC al; - if (list != 0 && SUCCEEDED (SHGetMalloc (&al))) - al->Free (list); - - defaultDirPath = 0; - - if (returnedString.isNotEmpty()) - { - const String stringFName (fname); - - results.add (new File (File (stringFName).getSiblingFile (returnedString))); - returnedString = String::empty; - - return; - } - } - else - { - DWORD flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR | OFN_HIDEREADONLY; - - if (warnAboutOverwritingExistingFiles) - flags |= OFN_OVERWRITEPROMPT; - - if (selectMultipleFiles) - flags |= OFN_ALLOWMULTISELECT; - - if (extraInfoComponent != 0) - { - flags |= OFN_ENABLEHOOK; - - currentExtraFileWin = new FPComponentHolder(); - currentExtraFileWin->addAndMakeVisible (extraInfoComponent); - currentExtraFileWin->setSize (jlimit (20, 800, extraInfoComponent->getWidth()), - extraInfoComponent->getHeight()); - currentExtraFileWin->addToDesktop (0); - - currentExtraFileWin->enterModalState(); - } - - { - WCHAR filters [1024]; - zeromem (filters, sizeof (filters)); - filter.copyToBuffer (filters, 1024); - filter.copyToBuffer (filters + filter.length() + 1, - 1022 - filter.length()); - - OPENFILENAMEW of; - zerostruct (of); - -#ifdef OPENFILENAME_SIZE_VERSION_400W - of.lStructSize = OPENFILENAME_SIZE_VERSION_400W; -#else - of.lStructSize = sizeof (of); -#endif - of.hwndOwner = (HWND) w.getWindowHandle(); - of.lpstrFilter = filters; - of.nFilterIndex = 1; - of.lpstrFile = fname; - of.nMaxFile = numCharsAvailable; - of.lpstrInitialDir = initialDir; - of.lpstrTitle = title; - of.Flags = flags; - - if (extraInfoComponent != 0) - of.lpfnHook = &openCallback; - - if (isSaveDialogue) - { - if (! GetSaveFileName (&of)) - fname[0] = 0; - else - fnameIdx = of.nFileOffset; - } - else - { - if (! GetOpenFileName (&of)) - fname[0] = 0; - else - fnameIdx = of.nFileOffset; - } - } - } - } -#if JUCE_CATCH_UNHANDLED_EXCEPTIONS - catch (...) - { - fname[0] = 0; - } -#endif - - deleteAndZero (currentExtraFileWin); - - const WCHAR* const files = fname; - - if (selectMultipleFiles && fnameIdx > 0 && files [fnameIdx - 1] == 0) - { - const WCHAR* filename = files + fnameIdx; - - while (*filename != 0) - { - const String filepath (String (files) + T("\\") + String (filename)); - results.add (new File (filepath)); - filename += CharacterFunctions::length (filename) + 1; - } - } - else if (files[0] != 0) - { - results.add (new File (files)); - } -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_FileChooser.cpp *********/ - -/********* Start of inlined file: juce_win32_Fonts.cpp *********/ - -BEGIN_JUCE_NAMESPACE - -static int CALLBACK wfontEnum2 (ENUMLOGFONTEXW* lpelfe, - NEWTEXTMETRICEXW*, - int type, - LPARAM lParam) -{ - if (lpelfe != 0 && type == TRUETYPE_FONTTYPE) - { - const String fontName (lpelfe->elfLogFont.lfFaceName); - - ((StringArray*) lParam)->addIfNotAlreadyThere (fontName.removeCharacters (T("@"))); - } - - return 1; -} - -static int CALLBACK wfontEnum1 (ENUMLOGFONTEXW* lpelfe, - NEWTEXTMETRICEXW*, - int type, - LPARAM lParam) -{ - if (lpelfe != 0 - && ((type & (DEVICE_FONTTYPE | RASTER_FONTTYPE)) == 0)) - { - LOGFONTW lf; - zerostruct (lf); - - lf.lfWeight = FW_DONTCARE; - lf.lfOutPrecision = OUT_TT_ONLY_PRECIS; - lf.lfQuality = DEFAULT_QUALITY; - lf.lfCharSet = DEFAULT_CHARSET; - lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf.lfPitchAndFamily = FF_DONTCARE; - - const String fontName (lpelfe->elfLogFont.lfFaceName); - fontName.copyToBuffer (lf.lfFaceName, LF_FACESIZE - 1); - - HDC dc = CreateCompatibleDC (0); - EnumFontFamiliesEx (dc, &lf, - (FONTENUMPROCW) &wfontEnum2, - lParam, 0); - DeleteDC (dc); - } - - return 1; -} - -const StringArray Font::findAllTypefaceNames() throw() -{ - StringArray results; - HDC dc = CreateCompatibleDC (0); - - { - LOGFONTW lf; - zerostruct (lf); - - lf.lfWeight = FW_DONTCARE; - lf.lfOutPrecision = OUT_TT_ONLY_PRECIS; - lf.lfQuality = DEFAULT_QUALITY; - lf.lfCharSet = DEFAULT_CHARSET; - lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf.lfPitchAndFamily = FF_DONTCARE; - lf.lfFaceName[0] = 0; - - EnumFontFamiliesEx (dc, &lf, - (FONTENUMPROCW) &wfontEnum1, - (LPARAM) &results, 0); - } - - DeleteDC (dc); - - results.sort (true); - return results; -} - -extern bool juce_IsRunningInWine() throw(); - -void Font::getDefaultFontNames (String& defaultSans, - String& defaultSerif, - String& defaultFixed) throw() -{ - if (juce_IsRunningInWine()) - { - // If we're running in Wine, then use fonts that might be available on Linux.. - defaultSans = "Bitstream Vera Sans"; - defaultSerif = "Bitstream Vera Serif"; - defaultFixed = "Bitstream Vera Sans Mono"; - } - else - { - defaultSans = "Verdana"; - defaultSerif = "Times"; - defaultFixed = "Lucida Console"; - } -} - -class FontDCHolder : private DeletedAtShutdown -{ - HDC dc; - String fontName; - KERNINGPAIR* kps; - int numKPs; - bool bold, italic; - int size; - - FontDCHolder (const FontDCHolder&); - const FontDCHolder& operator= (const FontDCHolder&); - -public: - HFONT fontH; - - FontDCHolder() throw() - : dc (0), - kps (0), - numKPs (0), - bold (false), - italic (false), - size (0) - { - } - - ~FontDCHolder() throw() - { - if (dc != 0) - { - DeleteDC (dc); - DeleteObject (fontH); - juce_free (kps); - } - - clearSingletonInstance(); - } - - juce_DeclareSingleton_SingleThreaded_Minimal (FontDCHolder); - - HDC loadFont (const String& fontName_, - const bool bold_, - const bool italic_, - const int size_) throw() - { - if (fontName != fontName_ || bold != bold_ || italic != italic_ || size != size_) - { - fontName = fontName_; - bold = bold_; - italic = italic_; - size = size_; - - if (dc != 0) - { - DeleteDC (dc); - DeleteObject (fontH); - - juce_free (kps); - kps = 0; - } - - fontH = 0; - - dc = CreateCompatibleDC (0); - SetMapperFlags (dc, 0); - SetMapMode (dc, MM_TEXT); - - LOGFONTW lfw; - zerostruct (lfw); - - lfw.lfCharSet = DEFAULT_CHARSET; - lfw.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lfw.lfOutPrecision = OUT_OUTLINE_PRECIS; - lfw.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; - lfw.lfQuality = PROOF_QUALITY; - lfw.lfItalic = (BYTE) (italic ? TRUE : FALSE); - lfw.lfWeight = bold ? FW_BOLD : FW_NORMAL; - fontName.copyToBuffer (lfw.lfFaceName, LF_FACESIZE - 1); - - lfw.lfHeight = size > 0 ? size : -256; - HFONT standardSizedFont = CreateFontIndirect (&lfw); - - if (standardSizedFont != 0) - { - if (SelectObject (dc, standardSizedFont) != 0) - { - fontH = standardSizedFont; - - if (size == 0) - { - OUTLINETEXTMETRIC otm; - if (GetOutlineTextMetrics (dc, sizeof (otm), &otm) != 0) - { - lfw.lfHeight = -(int) otm.otmEMSquare; - fontH = CreateFontIndirect (&lfw); - - SelectObject (dc, fontH); - DeleteObject (standardSizedFont); - } - } - } - else - { - jassertfalse - } - } - else - { - jassertfalse - } - } - - return dc; - } - - KERNINGPAIR* getKerningPairs (int& numKPs_) throw() - { - if (kps == 0) - { - numKPs = GetKerningPairs (dc, 0, 0); - kps = (KERNINGPAIR*) juce_calloc (sizeof (KERNINGPAIR) * numKPs); - GetKerningPairs (dc, numKPs, kps); - } - - numKPs_ = numKPs; - return kps; - } -}; - -juce_ImplementSingleton_SingleThreaded (FontDCHolder); - -static bool addGlyphToTypeface (HDC dc, - juce_wchar character, - Typeface& dest, - bool addKerning) -{ - Path destShape; - GLYPHMETRICS gm; - - float height; - BOOL ok = false; - - { - const WCHAR charToTest[] = { (WCHAR) character, 0 }; - WORD index = 0; - - if (GetGlyphIndices (dc, charToTest, 1, &index, GGI_MARK_NONEXISTING_GLYPHS) != GDI_ERROR - && index == 0xffff) - { - return false; - } - } - - TEXTMETRIC tm; - ok = GetTextMetrics (dc, &tm); - - height = (float) tm.tmHeight; - - if (! ok) - { - dest.addGlyph (character, destShape, 0); - return true; - } - - const float scaleX = 1.0f / height; - const float scaleY = -1.0f / height; - static const MAT2 identityMatrix = { { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 1 } }; - - const int bufSize = GetGlyphOutline (dc, character, GGO_NATIVE, - &gm, 0, 0, &identityMatrix); - - if (bufSize > 0) - { - char* const data = (char*) juce_malloc (bufSize); - - GetGlyphOutline (dc, character, GGO_NATIVE, &gm, - bufSize, data, &identityMatrix); - - const TTPOLYGONHEADER* pheader = (TTPOLYGONHEADER*) data; - - while ((char*) pheader < data + bufSize) - { - #define remapX(v) (scaleX * (v).x.value) - #define remapY(v) (scaleY * (v).y.value) - - float x = remapX (pheader->pfxStart); - float y = remapY (pheader->pfxStart); - - destShape.startNewSubPath (x, y); - - const TTPOLYCURVE* curve = (const TTPOLYCURVE*) ((const char*) pheader + sizeof (TTPOLYGONHEADER)); - const char* const curveEnd = ((const char*) pheader) + pheader->cb; - - while ((const char*) curve < curveEnd) - { - if (curve->wType == TT_PRIM_LINE) - { - for (int i = 0; i < curve->cpfx; ++i) - { - x = remapX (curve->apfx [i]); - y = remapY (curve->apfx [i]); - - destShape.lineTo (x, y); - } - } - else if (curve->wType == TT_PRIM_QSPLINE) - { - for (int i = 0; i < curve->cpfx - 1; ++i) - { - const float x2 = remapX (curve->apfx [i]); - const float y2 = remapY (curve->apfx [i]); - float x3, y3; - - if (i < curve->cpfx - 2) - { - x3 = 0.5f * (x2 + remapX (curve->apfx [i + 1])); - y3 = 0.5f * (y2 + remapY (curve->apfx [i + 1])); - } - else - { - x3 = remapX (curve->apfx [i + 1]); - y3 = remapY (curve->apfx [i + 1]); - } - - destShape.quadraticTo (x2, y2, x3, y3); - - x = x3; - y = y3; - } - } - - curve = (const TTPOLYCURVE*) &(curve->apfx [curve->cpfx]); - } - - pheader = (const TTPOLYGONHEADER*) curve; - - destShape.closeSubPath(); - } - - juce_free (data); - } - - dest.addGlyph (character, destShape, gm.gmCellIncX / height); - - if (addKerning) - { - int numKPs; - const KERNINGPAIR* const kps = FontDCHolder::getInstance()->getKerningPairs (numKPs); - - for (int i = 0; i < numKPs; ++i) - { - if (kps[i].wFirst == character) - { - dest.addKerningPair (kps[i].wFirst, - kps[i].wSecond, - kps[i].iKernAmount / height); - } - } - } - - return true; -} - -bool Typeface::findAndAddSystemGlyph (juce_wchar character) throw() -{ - HDC dc = FontDCHolder::getInstance()->loadFont (getName(), isBold(), isItalic(), 0); - return addGlyphToTypeface (dc, character, *this, true); -} - -/*Image* Typeface::renderGlyphToImage (juce_wchar character, float& topLeftX, float& topLeftY) -{ - HDC dc = FontDCHolder::getInstance()->loadFont (getName(), isBold(), isItalic(), hintingSize); - - int bufSize; - GLYPHMETRICS gm; - - const UINT format = GGO_GRAY2_BITMAP; - const int shift = 6; - - if (wGetGlyphOutlineW != 0) - bufSize = wGetGlyphOutlineW (dc, character, format, &gm, 0, 0, &identityMatrix); - else - bufSize = GetGlyphOutline (dc, character, format, &gm, 0, 0, &identityMatrix); - - Image* im = new Image (Image::SingleChannel, jmax (1, gm.gmBlackBoxX), jmax (1, gm.gmBlackBoxY), true); - - if (bufSize > 0) - { - topLeftX = (float) gm.gmptGlyphOrigin.x; - topLeftY = (float) -gm.gmptGlyphOrigin.y; - - uint8* const data = (uint8*) juce_calloc (bufSize); - - if (wGetGlyphOutlineW != 0) - wGetGlyphOutlineW (dc, character, format, &gm, bufSize, data, &identityMatrix); - else - GetGlyphOutline (dc, character, format, &gm, bufSize, data, &identityMatrix); - - const int stride = ((gm.gmBlackBoxX + 3) & ~3); - - for (int y = gm.gmBlackBoxY; --y >= 0;) - { - for (int x = gm.gmBlackBoxX; --x >= 0;) - { - const int level = data [x + y * stride] << shift; - - if (level > 0) - im->setPixelAt (x, y, Colour ((uint8) 0xff, (uint8) 0xff, (uint8) 0xff, (uint8) jmin (0xff, level))); - } - } - - juce_free (data); - } - - return im; -}*/ - -void Typeface::initialiseTypefaceCharacteristics (const String& fontName, - bool bold, - bool italic, - bool addAllGlyphsToFont) throw() -{ - clear(); - - HDC dc = FontDCHolder::getInstance()->loadFont (fontName, bold, italic, 0); - - float height; - int firstChar, lastChar; - - { - TEXTMETRIC tm; - GetTextMetrics (dc, &tm); - - height = (float) tm.tmHeight; - firstChar = tm.tmFirstChar; - lastChar = tm.tmLastChar; - - setAscent (tm.tmAscent / height); - setDefaultCharacter (tm.tmDefaultChar); - } - - setName (fontName); - setBold (bold); - setItalic (italic); - - if (addAllGlyphsToFont) - { - for (int character = firstChar; character <= lastChar; ++character) - addGlyphToTypeface (dc, (juce_wchar) character, *this, false); - - int numKPs; - const KERNINGPAIR* const kps = FontDCHolder::getInstance()->getKerningPairs (numKPs); - - for (int i = 0; i < numKPs; ++i) - { - addKerningPair (kps[i].wFirst, - kps[i].wSecond, - kps[i].iKernAmount / height); - } - } -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_Fonts.cpp *********/ - -/********* Start of inlined file: juce_win32_Messaging.cpp *********/ - -BEGIN_JUCE_NAMESPACE - -static const unsigned int specialId = WM_APP + 0x4400; -static const unsigned int broadcastId = WM_APP + 0x4403; -static const unsigned int specialCallbackId = WM_APP + 0x4402; - -static const TCHAR* const messageWindowName = _T("JUCEWindow"); - -HWND juce_messageWindowHandle = 0; - -extern long improbableWindowNumber; // defined in windowing.cpp - -static LRESULT CALLBACK juce_MessageWndProc (HWND h, - const UINT message, - const WPARAM wParam, - const LPARAM lParam) throw() -{ - JUCE_TRY - { - if (h == juce_messageWindowHandle) - { - if (message == specialCallbackId) - { - MessageCallbackFunction* const func = (MessageCallbackFunction*) wParam; - return (LRESULT) (*func) ((void*) lParam); - } - else if (message == specialId) - { - // these are trapped early in the dispatch call, but must also be checked - // here in case there are windows modal dialog boxes doing their own - // dispatch loop and not calling our version - - MessageManager::getInstance()->deliverMessage ((void*) lParam); - return 0; - } - else if (message == broadcastId) - { - String* const messageString = (String*) lParam; - MessageManager::getInstance()->deliverBroadcastMessage (*messageString); - delete messageString; - return 0; - } - else if (message == WM_COPYDATA && ((const COPYDATASTRUCT*) lParam)->dwData == broadcastId) - { - const String messageString ((const juce_wchar*) ((const COPYDATASTRUCT*) lParam)->lpData, - ((const COPYDATASTRUCT*) lParam)->cbData / sizeof (juce_wchar)); - - PostMessage (juce_messageWindowHandle, broadcastId, 0, (LPARAM) new String (messageString)); - return 0; - } - } - } - JUCE_CATCH_EXCEPTION - - return DefWindowProc (h, message, wParam, lParam); -} - -bool juce_dispatchNextMessageOnSystemQueue (const bool returnIfNoPendingMessages) -{ - MSG m; - - if (returnIfNoPendingMessages && ! PeekMessage (&m, (HWND) 0, 0, 0, 0)) - return false; - - if (GetMessage (&m, (HWND) 0, 0, 0) > 0) - { - if (m.message == specialId - && m.hwnd == juce_messageWindowHandle) - { - MessageManager::getInstance()->deliverMessage ((void*) m.lParam); - } - else - { - if (GetWindowLong (m.hwnd, GWLP_USERDATA) != improbableWindowNumber - && (m.message == WM_LBUTTONDOWN || m.message == WM_RBUTTONDOWN)) - { - // if it's someone else's window being clicked on, and the focus is - // currently on a juce window, pass the kb focus over.. - HWND currentFocus = GetFocus(); - - if (currentFocus == 0 || GetWindowLong (currentFocus, GWLP_USERDATA) == improbableWindowNumber) - SetFocus (m.hwnd); - } - - TranslateMessage (&m); - DispatchMessage (&m); - } - } - - return true; -} - -bool juce_postMessageToSystemQueue (void* message) -{ - return PostMessage (juce_messageWindowHandle, specialId, 0, (LPARAM) message) != 0; -} - -void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* callback, - void* userData) -{ - if (MessageManager::getInstance()->isThisTheMessageThread()) - { - return (*callback) (userData); - } - else - { - // If a thread has a MessageManagerLock and then tries to call this method, it'll - // deadlock because the message manager is blocked from running, and can't - // call your function.. - jassert (! MessageManager::getInstance()->currentThreadHasLockedMessageManager()); - - return (void*) SendMessage (juce_messageWindowHandle, - specialCallbackId, - (WPARAM) callback, - (LPARAM) userData); - } -} - -static BOOL CALLBACK BroadcastEnumWindowProc (HWND hwnd, LPARAM lParam) -{ - if (hwnd != juce_messageWindowHandle) - (reinterpret_cast (lParam))->add ((void*) hwnd); - - return TRUE; -} - -void MessageManager::broadcastMessage (const String& value) throw() -{ - VoidArray windows; - EnumWindows (&BroadcastEnumWindowProc, (LPARAM) &windows); - - const String localCopy (value); - - COPYDATASTRUCT data; - data.dwData = broadcastId; - data.cbData = (localCopy.length() + 1) * sizeof (juce_wchar); - data.lpData = (void*) (const juce_wchar*) localCopy; - - for (int i = windows.size(); --i >= 0;) - { - HWND hwnd = (HWND) windows.getUnchecked(i); - - TCHAR windowName [64]; // no need to read longer strings than this - GetWindowText (hwnd, windowName, 64); - windowName [63] = 0; - - if (String (windowName) == String (messageWindowName)) - { - DWORD_PTR result; - SendMessageTimeout (hwnd, WM_COPYDATA, - (WPARAM) juce_messageWindowHandle, - (LPARAM) &data, - SMTO_BLOCK | SMTO_ABORTIFHUNG, - 8000, - &result); - } - } -} - -static const String getMessageWindowClassName() -{ - // this name has to be different for each app/dll instance because otherwise - // poor old Win32 can get a bit confused (even despite it not being a process-global - // window class). - - static int number = 0; - if (number == 0) - number = 0x7fffffff & (int) Time::getHighResolutionTicks(); - - return T("JUCEcs_") + String (number); -} - -void MessageManager::doPlatformSpecificInitialisation() -{ - OleInitialize (0); - - const String className (getMessageWindowClassName()); - - HMODULE hmod = (HMODULE) PlatformUtilities::getCurrentModuleInstanceHandle(); - - WNDCLASSEX wc; - zerostruct (wc); - - wc.cbSize = sizeof (wc); - wc.lpfnWndProc = (WNDPROC) juce_MessageWndProc; - wc.cbWndExtra = 4; - wc.hInstance = hmod; - wc.lpszClassName = className; - - RegisterClassEx (&wc); - - juce_messageWindowHandle = CreateWindow (wc.lpszClassName, - messageWindowName, - 0, 0, 0, 0, 0, 0, 0, - hmod, 0); -} - -void MessageManager::doPlatformSpecificShutdown() -{ - DestroyWindow (juce_messageWindowHandle); - UnregisterClass (getMessageWindowClassName(), 0); - OleUninitialize(); -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_Messaging.cpp *********/ - -/********* Start of inlined file: juce_win32_Midi.cpp *********/ - -BEGIN_JUCE_NAMESPACE - -#if JUCE_MSVC - #pragma warning (disable: 4312) -#endif - -using ::free; - -static const int midiBufferSize = 1024 * 10; -static const int numInHeaders = 32; -static const int inBufferSize = 256; -static Array activeMidiThreads; - -class MidiInThread : public Thread -{ -public: - - MidiInThread (MidiInput* const input_, - MidiInputCallback* const callback_) - : Thread ("Juce Midi"), - hIn (0), - input (input_), - callback (callback_), - isStarted (false), - startTime (0), - pendingLength(0) - { - for (int i = numInHeaders; --i >= 0;) - { - zeromem (&hdr[i], sizeof (MIDIHDR)); - hdr[i].lpData = inData[i]; - hdr[i].dwBufferLength = inBufferSize; - } - }; - - ~MidiInThread() - { - stop(); - - if (hIn != 0) - { - int count = 5; - while (--count >= 0) - { - if (midiInClose (hIn) == MMSYSERR_NOERROR) - break; - - Sleep (20); - } - } - } - - void handle (const uint32 message, const uint32 timeStamp) throw() - { - const int byte = message & 0xff; - if (byte < 0x80) - return; - - const int numBytes = MidiMessage::getMessageLengthFromFirstByte ((uint8) byte); - - const double time = timeStampToTime (timeStamp); - - lock.enter(); - if (pendingLength < midiBufferSize - 12) - { - char* const p = pending + pendingLength; - *(double*) p = time; - *(uint32*) (p + 8) = numBytes; - *(uint32*) (p + 12) = message; - pendingLength += 12 + numBytes; - } - else - { - jassertfalse // midi buffer overflow! You might need to increase the size.. - } - - lock.exit(); - notify(); - } - - void handleSysEx (MIDIHDR* const hdr, const uint32 timeStamp) throw() - { - const int num = hdr->dwBytesRecorded; - - if (num > 0) - { - const double time = timeStampToTime (timeStamp); - - lock.enter(); - - if (pendingLength < midiBufferSize - (8 + num)) - { - char* const p = pending + pendingLength; - *(double*) p = time; - *(uint32*) (p + 8) = num; - memcpy (p + 12, hdr->lpData, num); - pendingLength += 12 + num; - } - else - { - jassertfalse // midi buffer overflow! You might need to increase the size.. - } - - lock.exit(); - notify(); - } - } - - void writeBlock (const int i) throw() - { - hdr[i].dwBytesRecorded = 0; - MMRESULT res = midiInPrepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)); - jassert (res == MMSYSERR_NOERROR); - res = midiInAddBuffer (hIn, &hdr[i], sizeof (MIDIHDR)); - jassert (res == MMSYSERR_NOERROR); - } - - void run() - { - MemoryBlock pendingCopy (64); - - while (! threadShouldExit()) - { - for (int i = 0; i < numInHeaders; ++i) - { - if ((hdr[i].dwFlags & WHDR_DONE) != 0) - { - MMRESULT res = midiInUnprepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)); - (void) res; - jassert (res == MMSYSERR_NOERROR); - writeBlock (i); - } - } - - lock.enter(); - - int len = pendingLength; - - if (len > 0) - { - pendingCopy.ensureSize (len); - pendingCopy.copyFrom (pending, 0, len); - pendingLength = 0; - } - - lock.exit(); - -//xxx needs to figure out if blocks are broken up or not - - if (len == 0) - { - wait (500); - } - else - { - const char* p = (const char*) pendingCopy.getData(); - - while (len > 0) - { - const double time = *(const double*) p; - const int messageLen = *(const int*) (p + 8); - - const MidiMessage message ((const uint8*) (p + 12), messageLen, time); - - callback->handleIncomingMidiMessage (input, message); - - p += 12 + messageLen; - len -= 12 + messageLen; - } - } - } - } - - void start() throw() - { - jassert (hIn != 0); - if (hIn != 0 && ! isStarted) - { - stop(); - - activeMidiThreads.addIfNotAlreadyThere (this); - - int i; - for (i = 0; i < numInHeaders; ++i) - writeBlock (i); - - startTime = Time::getMillisecondCounter(); - MMRESULT res = midiInStart (hIn); - - jassert (res == MMSYSERR_NOERROR); - - if (res == MMSYSERR_NOERROR) - { - isStarted = true; - pendingLength = 0; - startThread (6); - } - } - } - - void stop() throw() - { - if (isStarted) - { - stopThread (5000); - - midiInReset (hIn); - midiInStop (hIn); - - activeMidiThreads.removeValue (this); - - lock.enter(); - lock.exit(); - - for (int i = numInHeaders; --i >= 0;) - { - if ((hdr[i].dwFlags & WHDR_DONE) != 0) - { - int c = 10; - while (--c >= 0 && midiInUnprepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)) == MIDIERR_STILLPLAYING) - Sleep (20); - - jassert (c >= 0); - } - } - - isStarted = false; - pendingLength = 0; - } - } - - juce_UseDebuggingNewOperator - - HMIDIIN hIn; - -private: - MidiInput* input; - MidiInputCallback* callback; - bool isStarted; - uint32 startTime; - CriticalSection lock; - - MIDIHDR hdr [numInHeaders]; - char inData [numInHeaders] [inBufferSize]; - - int pendingLength; - char pending [midiBufferSize]; - - double timeStampToTime (uint32 timeStamp) throw() - { - timeStamp += startTime; - - const uint32 now = Time::getMillisecondCounter(); - if (timeStamp > now) - { - if (timeStamp > now + 2) - --startTime; - - timeStamp = now; - } - - return 0.001 * timeStamp; - } - - MidiInThread (const MidiInThread&); - const MidiInThread& operator= (const MidiInThread&); -}; - -static void CALLBACK midiInCallback (HMIDIIN, - UINT uMsg, - DWORD_PTR dwInstance, - DWORD_PTR midiMessage, - DWORD_PTR timeStamp) -{ - MidiInThread* const thread = (MidiInThread*) dwInstance; - - if (thread != 0 && activeMidiThreads.contains (thread)) - { - if (uMsg == MIM_DATA) - thread->handle ((uint32) midiMessage, (uint32) timeStamp); - else if (uMsg == MIM_LONGDATA) - thread->handleSysEx ((MIDIHDR*) midiMessage, (uint32) timeStamp); - } -} - -const StringArray MidiInput::getDevices() -{ - StringArray s; - const int num = midiInGetNumDevs(); - - for (int i = 0; i < num; ++i) - { - MIDIINCAPS mc; - zerostruct (mc); - - if (midiInGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) - s.add (String (mc.szPname, sizeof (mc.szPname))); - } - - return s; -} - -int MidiInput::getDefaultDeviceIndex() -{ - return 0; -} - -MidiInput* MidiInput::openDevice (const int index, MidiInputCallback* const callback) -{ - if (callback == 0) - return 0; - - UINT deviceId = MIDI_MAPPER; - int n = 0; - String name; - - const int num = midiInGetNumDevs(); - - for (int i = 0; i < num; ++i) - { - MIDIINCAPS mc; - zerostruct (mc); - - if (midiInGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) - { - if (index == n) - { - deviceId = i; - name = String (mc.szPname, sizeof (mc.szPname)); - break; - } - - ++n; - } - } - - MidiInput* const in = new MidiInput (name); - MidiInThread* const thread = new MidiInThread (in, callback); - - HMIDIIN h; - HRESULT err = midiInOpen (&h, deviceId, - (DWORD_PTR) &midiInCallback, - (DWORD_PTR) thread, - CALLBACK_FUNCTION); - - if (err == MMSYSERR_NOERROR) - { - thread->hIn = h; - in->internal = (void*) thread; - return in; - } - else - { - delete in; - delete thread; - return 0; - } -} - -MidiInput::MidiInput (const String& name_) - : name (name_), - internal (0) -{ -} - -MidiInput::~MidiInput() -{ - if (internal != 0) - { - MidiInThread* const thread = (MidiInThread*) internal; - delete thread; - } -} - -void MidiInput::start() -{ - ((MidiInThread*) internal)->start(); -} - -void MidiInput::stop() -{ - ((MidiInThread*) internal)->stop(); -} - -struct MidiOutHandle -{ - int refCount; - UINT deviceId; - HMIDIOUT handle; - - juce_UseDebuggingNewOperator -}; - -static VoidArray handles (4); - -const StringArray MidiOutput::getDevices() -{ - StringArray s; - const int num = midiOutGetNumDevs(); - - for (int i = 0; i < num; ++i) - { - MIDIOUTCAPS mc; - zerostruct (mc); - - if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) - s.add (String (mc.szPname, sizeof (mc.szPname))); - } - - return s; -} - -int MidiOutput::getDefaultDeviceIndex() -{ - const int num = midiOutGetNumDevs(); - int n = 0; - - for (int i = 0; i < num; ++i) - { - MIDIOUTCAPS mc; - zerostruct (mc); - - if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) - { - if ((mc.wTechnology & MOD_MAPPER) != 0) - return n; - - ++n; - } - } - - return 0; -} - -MidiOutput* MidiOutput::openDevice (int index) -{ - UINT deviceId = MIDI_MAPPER; - const int num = midiOutGetNumDevs(); - int i, n = 0; - - for (i = 0; i < num; ++i) - { - MIDIOUTCAPS mc; - zerostruct (mc); - - if (midiOutGetDevCaps (i, &mc, sizeof (mc)) == MMSYSERR_NOERROR) - { - // use the microsoft sw synth as a default - best not to allow deviceId - // to be MIDI_MAPPER, or else device sharing breaks - if (String (mc.szPname, sizeof (mc.szPname)).containsIgnoreCase (T("microsoft"))) - deviceId = i; - - if (index == n) - { - deviceId = i; - break; - } - - ++n; - } - } - - for (i = handles.size(); --i >= 0;) - { - MidiOutHandle* const han = (MidiOutHandle*) handles.getUnchecked(i); - - if (han != 0 && han->deviceId == deviceId) - { - han->refCount++; - - MidiOutput* const out = new MidiOutput(); - out->internal = (void*) han; - return out; - } - } - - for (i = 4; --i >= 0;) - { - HMIDIOUT h = 0; - MMRESULT res = midiOutOpen (&h, deviceId, 0, 0, CALLBACK_NULL); - - if (res == MMSYSERR_NOERROR) - { - MidiOutHandle* const han = new MidiOutHandle(); - han->deviceId = deviceId; - han->refCount = 1; - han->handle = h; - handles.add (han); - - MidiOutput* const out = new MidiOutput(); - out->internal = (void*) han; - return out; - } - else if (res == MMSYSERR_ALLOCATED) - { - Sleep (100); - } - else - { - break; - } - } - - return 0; -} - -MidiOutput::~MidiOutput() -{ - MidiOutHandle* const h = (MidiOutHandle*) internal; - - if (handles.contains ((void*) h) && --(h->refCount) == 0) - { - midiOutClose (h->handle); - handles.removeValue ((void*) h); - delete h; - } -} - -void MidiOutput::reset() -{ - const MidiOutHandle* const h = (MidiOutHandle*) internal; - midiOutReset (h->handle); -} - -bool MidiOutput::getVolume (float& leftVol, - float& rightVol) -{ - const MidiOutHandle* const handle = (const MidiOutHandle*) internal; - - DWORD n; - if (midiOutGetVolume (handle->handle, &n) == MMSYSERR_NOERROR) - { - const unsigned short* const nn = (const unsigned short*) &n; - rightVol = nn[0] / (float) 0xffff; - leftVol = nn[1] / (float) 0xffff; - return true; - } - else - { - rightVol = leftVol = 1.0f; - return false; - } -} - -void MidiOutput::setVolume (float leftVol, - float rightVol) -{ - const MidiOutHandle* const handle = (MidiOutHandle*) internal; - - DWORD n; - unsigned short* const nn = (unsigned short*) &n; - nn[0] = (unsigned short) jlimit (0, 0xffff, (int)(rightVol * 0xffff)); - nn[1] = (unsigned short) jlimit (0, 0xffff, (int)(leftVol * 0xffff)); - midiOutSetVolume (handle->handle, n); -} - -void MidiOutput::sendMessageNow (const MidiMessage& message) -{ - const MidiOutHandle* const handle = (const MidiOutHandle*) internal; - - if (message.getRawDataSize() > 3 - || message.isSysEx()) - { - MIDIHDR h; - zerostruct (h); - - h.lpData = (char*) message.getRawData(); - h.dwBufferLength = message.getRawDataSize(); - h.dwBytesRecorded = message.getRawDataSize(); - - if (midiOutPrepareHeader (handle->handle, &h, sizeof (MIDIHDR)) == MMSYSERR_NOERROR) - { - MMRESULT res = midiOutLongMsg (handle->handle, &h, sizeof (MIDIHDR)); - - if (res == MMSYSERR_NOERROR) - { - while ((h.dwFlags & MHDR_DONE) == 0) - Sleep (1); - - int count = 500; // 1 sec timeout - - while (--count >= 0) - { - res = midiOutUnprepareHeader (handle->handle, &h, sizeof (MIDIHDR)); - - if (res == MIDIERR_STILLPLAYING) - Sleep (2); - else - break; - } - } - } - } - else - { - midiOutShortMsg (handle->handle, - *(unsigned int*) message.getRawData()); - } -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_Midi.cpp *********/ - -/********* Start of inlined file: juce_win32_WebBrowserComponent.cpp *********/ - -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include -#include -#include - -#ifdef _MSC_VER - #pragma warning (pop) - #pragma warning (disable: 4312 4244) -#endif - -BEGIN_JUCE_NAMESPACE - -class WebBrowserComponentInternal : public ActiveXControlComponent -{ -public: - - WebBrowserComponentInternal() - : browser (0), - connectionPoint (0), - adviseCookie (0) - { - } - - ~WebBrowserComponentInternal() - { - if (connectionPoint != 0) - connectionPoint->Unadvise (adviseCookie); - - if (browser != 0) - browser->Release(); - } - - void createBrowser() - { - createControl (&CLSID_WebBrowser); - browser = (IWebBrowser2*) queryInterface (&IID_IWebBrowser2); - - IConnectionPointContainer* connectionPointContainer = (IConnectionPointContainer*) queryInterface (&IID_IConnectionPointContainer); - - if (connectionPointContainer != 0) - { - connectionPointContainer->FindConnectionPoint (DIID_DWebBrowserEvents2, - &connectionPoint); - - if (connectionPoint != 0) - { - WebBrowserComponent* const owner = dynamic_cast (getParentComponent()); - jassert (owner != 0); - - EventHandler* handler = new EventHandler (owner); - connectionPoint->Advise (handler, &adviseCookie); - } - } - } - - void goToURL (const String& url, - const StringArray* headers, - const MemoryBlock* postData) - { - if (browser != 0) - { - LPSAFEARRAY sa = 0; - _variant_t flags, frame, postDataVar, headersVar; - - if (headers != 0) - headersVar = (const tchar*) headers->joinIntoString ("\r\n"); - - if (postData != 0 && postData->getSize() > 0) - { - LPSAFEARRAY sa = SafeArrayCreateVector (VT_UI1, 0, postData->getSize()); - - if (sa != 0) - { - void* data = 0; - SafeArrayAccessData (sa, &data); - jassert (data != 0); - - if (data != 0) - { - postData->copyTo (data, 0, postData->getSize()); - SafeArrayUnaccessData (sa); - - VARIANT postDataVar2; - VariantInit (&postDataVar2); - V_VT (&postDataVar2) = VT_ARRAY | VT_UI1; - V_ARRAY (&postDataVar2) = sa; - - postDataVar = postDataVar2; - } - } - } - - browser->Navigate ((BSTR) (const OLECHAR*) url, - &flags, &frame, - &postDataVar, &headersVar); - - if (sa != 0) - SafeArrayDestroy (sa); - } - } - - IWebBrowser2* browser; - - juce_UseDebuggingNewOperator - -private: - IConnectionPoint* connectionPoint; - DWORD adviseCookie; - - class EventHandler : public IDispatch - { - public: - EventHandler (WebBrowserComponent* owner_) - : owner (owner_), - refCount (0) - { - } - - ~EventHandler() - { - } - - HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) - { - if (id == IID_IUnknown || id == IID_IDispatch || id == DIID_DWebBrowserEvents2) - { - AddRef(); - *result = this; - return S_OK; - } - - *result = 0; - return E_NOINTERFACE; - } - - ULONG __stdcall AddRef() { return ++refCount; } - ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } - - HRESULT __stdcall GetTypeInfoCount (UINT __RPC_FAR*) { return E_NOTIMPL; } - HRESULT __stdcall GetTypeInfo (UINT, LCID, ITypeInfo __RPC_FAR *__RPC_FAR*) { return E_NOTIMPL; } - HRESULT __stdcall GetIDsOfNames (REFIID, LPOLESTR __RPC_FAR*, UINT, LCID, DISPID __RPC_FAR*) { return E_NOTIMPL; } - - HRESULT __stdcall Invoke (DISPID dispIdMember, REFIID /*riid*/, LCID /*lcid*/, - WORD /*wFlags*/, DISPPARAMS __RPC_FAR* pDispParams, - VARIANT __RPC_FAR* /*pVarResult*/, EXCEPINFO __RPC_FAR* /*pExcepInfo*/, - UINT __RPC_FAR* /*puArgErr*/) - { - switch (dispIdMember) - { - case DISPID_BEFORENAVIGATE2: - { - VARIANT* const vurl = pDispParams->rgvarg[5].pvarVal; - - String url; - - if ((vurl->vt & VT_BYREF) != 0) - url = *vurl->pbstrVal; - else - url = vurl->bstrVal; - - *pDispParams->rgvarg->pboolVal - = owner->pageAboutToLoad (url) ? VARIANT_FALSE - : VARIANT_TRUE; - - return S_OK; - } - - default: - break; - } - - return E_NOTIMPL; - } - - juce_UseDebuggingNewOperator - - private: - WebBrowserComponent* const owner; - int refCount; - - EventHandler (const EventHandler&); - const EventHandler& operator= (const EventHandler&); - }; -}; - -WebBrowserComponent::WebBrowserComponent() - : browser (0), - blankPageShown (false) -{ - setOpaque (true); - addAndMakeVisible (browser = new WebBrowserComponentInternal()); -} - -WebBrowserComponent::~WebBrowserComponent() -{ - delete 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() -{ - if (browser->browser != 0) - browser->browser->Stop(); -} - -void WebBrowserComponent::goBack() -{ - lastURL = String::empty; - blankPageShown = false; - - if (browser->browser != 0) - browser->browser->GoBack(); -} - -void WebBrowserComponent::goForward() -{ - lastURL = String::empty; - - if (browser->browser != 0) - browser->browser->GoForward(); -} - -void WebBrowserComponent::paint (Graphics& g) -{ - if (browser->browser == 0) - g.fillAll (Colours::white); -} - -void WebBrowserComponent::checkWindowAssociation() -{ - if (isShowing()) - { - if (browser->browser == 0 && getPeer() != 0) - { - browser->createBrowser(); - reloadLastURL(); - } - else - { - if (blankPageShown) - goBack(); - } - } - else - { - if (browser != 0 && ! 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); - } - } -} - -void WebBrowserComponent::reloadLastURL() -{ - if (lastURL.isNotEmpty()) - { - goToURL (lastURL, &lastHeaders, &lastPostData); - lastURL = String::empty; - } -} - -void WebBrowserComponent::parentHierarchyChanged() -{ - checkWindowAssociation(); -} - -void WebBrowserComponent::moved() -{ -} - -void WebBrowserComponent::resized() -{ - browser->setSize (getWidth(), getHeight()); -} - -void WebBrowserComponent::visibilityChanged() -{ - checkWindowAssociation(); -} - -bool WebBrowserComponent::pageAboutToLoad (const String&) -{ - return true; -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_WebBrowserComponent.cpp *********/ - -/********* Start of inlined file: juce_win32_Windowing.cpp *********/ -#ifdef _MSC_VER - #pragma warning (disable: 4514) - #pragma warning (push) -#endif - -#include -#include -#include +// Auto-link the other win32 libs that are needed by library calls.. +#if defined (JUCE_DLL_BUILD) && JUCE_MSVC + +/********* Start of inlined file: juce_win32_AutoLinkLibraries.h *********/ +// Auto-links to various win32 libs that are needed by library calls.. +#pragma comment(lib, "kernel32.lib") +#pragma comment(lib, "user32.lib") +#pragma comment(lib, "shell32.lib") +#pragma comment(lib, "gdi32.lib") +#pragma comment(lib, "vfw32.lib") +#pragma comment(lib, "comdlg32.lib") +#pragma comment(lib, "winmm.lib") +#pragma comment(lib, "wininet.lib") +#pragma comment(lib, "ole32.lib") +#pragma comment(lib, "advapi32.lib") +#pragma comment(lib, "ws2_32.lib") +#pragma comment(lib, "comsupp.lib") #if JUCE_OPENGL - #include + #pragma comment(lib, "OpenGL32.Lib") + #pragma comment(lib, "GlU32.Lib") #endif -#ifdef _MSC_VER - #pragma warning (pop) - #pragma warning (disable: 4312 4244) +#if JUCE_QUICKTIME + #pragma comment (lib, "QTMLClient.lib") #endif - -#undef GetSystemMetrics // multimon overrides this for some reason and causes a mess.. - -// these are in the windows SDK, but need to be repeated here for GCC.. -#ifndef GET_APPCOMMAND_LPARAM - #define FAPPCOMMAND_MASK 0xF000 - #define GET_APPCOMMAND_LPARAM(lParam) ((short) (HIWORD (lParam) & ~FAPPCOMMAND_MASK)) - #define APPCOMMAND_MEDIA_NEXTTRACK 11 - #define APPCOMMAND_MEDIA_PREVIOUSTRACK 12 - #define APPCOMMAND_MEDIA_STOP 13 - #define APPCOMMAND_MEDIA_PLAY_PAUSE 14 - #define WM_APPCOMMAND 0x0319 -#endif - -BEGIN_JUCE_NAMESPACE - -extern void juce_repeatLastProcessPriority() throw(); // in juce_win32_Threads.cpp -extern void juce_CheckCurrentlyFocusedTopLevelWindow() throw(); // in juce_TopLevelWindow.cpp -extern bool juce_IsRunningInWine() throw(); - -#ifndef ULW_ALPHA - #define ULW_ALPHA 0x00000002 -#endif - -#ifndef AC_SRC_ALPHA - #define AC_SRC_ALPHA 0x01 -#endif - -#define DEBUG_REPAINT_TIMES 0 - -static HPALETTE palette = 0; -static bool createPaletteIfNeeded = true; -static bool shouldDeactivateTitleBar = true; -static bool screenSaverAllowed = true; - -static HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) throw(); -#define WM_TRAYNOTIFY WM_USER + 100 - -using ::abs; - -typedef BOOL (WINAPI* UpdateLayeredWinFunc) (HWND, HDC, POINT*, SIZE*, HDC, POINT*, COLORREF, BLENDFUNCTION*, DWORD); -static UpdateLayeredWinFunc updateLayeredWindow = 0; - -bool Desktop::canUseSemiTransparentWindows() throw() -{ - if (updateLayeredWindow == 0) - { - if (! juce_IsRunningInWine()) - { - HMODULE user32Mod = GetModuleHandle (_T("user32.dll")); - updateLayeredWindow = (UpdateLayeredWinFunc) GetProcAddress (user32Mod, "UpdateLayeredWindow"); - } - } - - return updateLayeredWindow != 0; -} - -#undef DefWindowProc -#define DefWindowProc DefWindowProcW - -const int extendedKeyModifier = 0x10000; - -const int KeyPress::spaceKey = VK_SPACE; -const int KeyPress::returnKey = VK_RETURN; -const int KeyPress::escapeKey = VK_ESCAPE; -const int KeyPress::backspaceKey = VK_BACK; -const int KeyPress::deleteKey = VK_DELETE | extendedKeyModifier; -const int KeyPress::insertKey = VK_INSERT | extendedKeyModifier; -const int KeyPress::tabKey = VK_TAB; -const int KeyPress::leftKey = VK_LEFT | extendedKeyModifier; -const int KeyPress::rightKey = VK_RIGHT | extendedKeyModifier; -const int KeyPress::upKey = VK_UP | extendedKeyModifier; -const int KeyPress::downKey = VK_DOWN | extendedKeyModifier; -const int KeyPress::homeKey = VK_HOME | extendedKeyModifier; -const int KeyPress::endKey = VK_END | extendedKeyModifier; -const int KeyPress::pageUpKey = VK_PRIOR | extendedKeyModifier; -const int KeyPress::pageDownKey = VK_NEXT | extendedKeyModifier; -const int KeyPress::F1Key = VK_F1 | extendedKeyModifier; -const int KeyPress::F2Key = VK_F2 | extendedKeyModifier; -const int KeyPress::F3Key = VK_F3 | extendedKeyModifier; -const int KeyPress::F4Key = VK_F4 | extendedKeyModifier; -const int KeyPress::F5Key = VK_F5 | extendedKeyModifier; -const int KeyPress::F6Key = VK_F6 | extendedKeyModifier; -const int KeyPress::F7Key = VK_F7 | extendedKeyModifier; -const int KeyPress::F8Key = VK_F8 | extendedKeyModifier; -const int KeyPress::F9Key = VK_F9 | extendedKeyModifier; -const int KeyPress::F10Key = VK_F10 | extendedKeyModifier; -const int KeyPress::F11Key = VK_F11 | extendedKeyModifier; -const int KeyPress::F12Key = VK_F12 | extendedKeyModifier; -const int KeyPress::F13Key = VK_F13 | extendedKeyModifier; -const int KeyPress::F14Key = VK_F14 | extendedKeyModifier; -const int KeyPress::F15Key = VK_F15 | extendedKeyModifier; -const int KeyPress::F16Key = VK_F16 | extendedKeyModifier; -const int KeyPress::numberPad0 = VK_NUMPAD0 | extendedKeyModifier; -const int KeyPress::numberPad1 = VK_NUMPAD1 | extendedKeyModifier; -const int KeyPress::numberPad2 = VK_NUMPAD2 | extendedKeyModifier; -const int KeyPress::numberPad3 = VK_NUMPAD3 | extendedKeyModifier; -const int KeyPress::numberPad4 = VK_NUMPAD4 | extendedKeyModifier; -const int KeyPress::numberPad5 = VK_NUMPAD5 | extendedKeyModifier; -const int KeyPress::numberPad6 = VK_NUMPAD6 | extendedKeyModifier; -const int KeyPress::numberPad7 = VK_NUMPAD7 | extendedKeyModifier; -const int KeyPress::numberPad8 = VK_NUMPAD8 | extendedKeyModifier; -const int KeyPress::numberPad9 = VK_NUMPAD9 | extendedKeyModifier; -const int KeyPress::numberPadAdd = VK_ADD | extendedKeyModifier; -const int KeyPress::numberPadSubtract = VK_SUBTRACT | extendedKeyModifier; -const int KeyPress::numberPadMultiply = VK_MULTIPLY | extendedKeyModifier; -const int KeyPress::numberPadDivide = VK_DIVIDE | extendedKeyModifier; -const int KeyPress::numberPadSeparator = VK_SEPARATOR | extendedKeyModifier; -const int KeyPress::numberPadDecimalPoint = VK_DECIMAL | extendedKeyModifier; -const int KeyPress::numberPadEquals = 0x92 /*VK_OEM_NEC_EQUAL*/ | extendedKeyModifier; -const int KeyPress::numberPadDelete = VK_DELETE | extendedKeyModifier; -const int KeyPress::playKey = 0x30000; -const int KeyPress::stopKey = 0x30001; -const int KeyPress::fastForwardKey = 0x30002; -const int KeyPress::rewindKey = 0x30003; - -class WindowsBitmapImage : public Image -{ -public: - - HBITMAP hBitmap; - BITMAPV4HEADER bitmapInfo; - HDC hdc; - unsigned char* bitmapData; - - WindowsBitmapImage (const PixelFormat format_, - const int w, const int h, const bool clearImage) - : Image (format_, w, h) - { - jassert (format_ == RGB || format_ == ARGB); - - pixelStride = (format_ == RGB) ? 3 : 4; - - zerostruct (bitmapInfo); - bitmapInfo.bV4Size = sizeof (BITMAPV4HEADER); - bitmapInfo.bV4Width = w; - bitmapInfo.bV4Height = h; - bitmapInfo.bV4Planes = 1; - bitmapInfo.bV4BitCount = (unsigned short) (pixelStride * 8); - - if (format_ == ARGB) - { - bitmapInfo.bV4AlphaMask = 0xff000000; - bitmapInfo.bV4RedMask = 0xff0000; - bitmapInfo.bV4GreenMask = 0xff00; - bitmapInfo.bV4BlueMask = 0xff; - bitmapInfo.bV4V4Compression = BI_BITFIELDS; - } - else - { - bitmapInfo.bV4V4Compression = BI_RGB; - } - - lineStride = -((w * pixelStride + 3) & ~3); - - HDC dc = GetDC (0); - hdc = CreateCompatibleDC (dc); - ReleaseDC (0, dc); - - SetMapMode (hdc, MM_TEXT); - - hBitmap = CreateDIBSection (hdc, - (BITMAPINFO*) &(bitmapInfo), - DIB_RGB_COLORS, - (void**) &bitmapData, - 0, 0); - - SelectObject (hdc, hBitmap); - - if (format_ == ARGB && clearImage) - zeromem (bitmapData, abs (h * lineStride)); - - imageData = bitmapData - (lineStride * (h - 1)); - } - - ~WindowsBitmapImage() - { - DeleteDC (hdc); - DeleteObject (hBitmap); - imageData = 0; // to stop the base class freeing this - } - - void blitToWindow (HWND hwnd, HDC dc, const bool transparent, - const int x, const int y, - const RectangleList& maskedRegion) throw() - { - static HDRAWDIB hdd = 0; - static bool needToCreateDrawDib = true; - - if (needToCreateDrawDib) - { - needToCreateDrawDib = false; - - HDC dc = GetDC (0); - const int n = GetDeviceCaps (dc, BITSPIXEL); - ReleaseDC (0, dc); - - // only open if we're not palettised - if (n > 8) - hdd = DrawDibOpen(); - } - - if (createPaletteIfNeeded) - { - HDC dc = GetDC (0); - const int n = GetDeviceCaps (dc, BITSPIXEL); - ReleaseDC (0, dc); - - if (n <= 8) - palette = CreateHalftonePalette (dc); - - createPaletteIfNeeded = false; - } - - if (palette != 0) - { - SelectPalette (dc, palette, FALSE); - RealizePalette (dc); - SetStretchBltMode (dc, HALFTONE); - } - - SetMapMode (dc, MM_TEXT); - - if (transparent) - { - POINT p, pos; - SIZE size; - - RECT windowBounds; - GetWindowRect (hwnd, &windowBounds); - - p.x = -x; - p.y = -y; - pos.x = windowBounds.left; - pos.y = windowBounds.top; - size.cx = windowBounds.right - windowBounds.left; - size.cy = windowBounds.bottom - windowBounds.top; - - BLENDFUNCTION bf; - bf.AlphaFormat = AC_SRC_ALPHA; - bf.BlendFlags = 0; - bf.BlendOp = AC_SRC_OVER; - bf.SourceConstantAlpha = 0xff; - - if (! maskedRegion.isEmpty()) - { - for (RectangleList::Iterator i (maskedRegion); i.next();) - { - const Rectangle& r = *i.getRectangle(); - ExcludeClipRect (hdc, r.getX(), r.getY(), r.getRight(), r.getBottom()); - } - } - - updateLayeredWindow (hwnd, 0, &pos, &size, hdc, &p, 0, &bf, ULW_ALPHA); - } - else - { - int savedDC = 0; - - if (! maskedRegion.isEmpty()) - { - savedDC = SaveDC (dc); - - for (RectangleList::Iterator i (maskedRegion); i.next();) - { - const Rectangle& r = *i.getRectangle(); - ExcludeClipRect (dc, r.getX(), r.getY(), r.getRight(), r.getBottom()); - } - } - - const int w = getWidth(); - const int h = getHeight(); - - if (hdd == 0) - { - StretchDIBits (dc, - x, y, w, h, - 0, 0, w, h, - bitmapData, (const BITMAPINFO*) &bitmapInfo, - DIB_RGB_COLORS, SRCCOPY); - } - else - { - DrawDibDraw (hdd, dc, x, y, -1, -1, - (BITMAPINFOHEADER*) &bitmapInfo, bitmapData, - 0, 0, w, h, 0); - } - - if (! maskedRegion.isEmpty()) - RestoreDC (dc, savedDC); - } - } - - juce_UseDebuggingNewOperator - -private: - WindowsBitmapImage (const WindowsBitmapImage&); - const WindowsBitmapImage& operator= (const WindowsBitmapImage&); -}; - -long improbableWindowNumber = 0xf965aa01; // also referenced by messaging.cpp - -static int currentModifiers = 0; -static int modifiersAtLastCallback = 0; - -static void updateKeyModifiers() throw() -{ - currentModifiers &= ~(ModifierKeys::shiftModifier - | ModifierKeys::ctrlModifier - | ModifierKeys::altModifier); - - if ((GetKeyState (VK_SHIFT) & 0x8000) != 0) - currentModifiers |= ModifierKeys::shiftModifier; - - if ((GetKeyState (VK_CONTROL) & 0x8000) != 0) - currentModifiers |= ModifierKeys::ctrlModifier; - - if ((GetKeyState (VK_MENU) & 0x8000) != 0) - currentModifiers |= ModifierKeys::altModifier; - - if ((GetKeyState (VK_RMENU) & 0x8000) != 0) - currentModifiers &= ~(ModifierKeys::ctrlModifier | ModifierKeys::altModifier); -} - -void ModifierKeys::updateCurrentModifiers() throw() -{ - currentModifierFlags = currentModifiers; -} - -bool KeyPress::isKeyCurrentlyDown (const int keyCode) throw() -{ - SHORT k = (SHORT) keyCode; - - if ((keyCode & extendedKeyModifier) == 0 - && (k >= (SHORT) T('a') && k <= (SHORT) T('z'))) - k += (SHORT) T('A') - (SHORT) T('a'); - - const SHORT translatedValues[] = { (SHORT) ',', VK_OEM_COMMA, - (SHORT) '+', VK_OEM_PLUS, - (SHORT) '-', VK_OEM_MINUS, - (SHORT) '.', VK_OEM_PERIOD, - (SHORT) ';', VK_OEM_1, - (SHORT) ':', VK_OEM_1, - (SHORT) '/', VK_OEM_2, - (SHORT) '?', VK_OEM_2, - (SHORT) '[', VK_OEM_4, - (SHORT) ']', VK_OEM_6 }; - - for (int i = 0; i < numElementsInArray (translatedValues); i += 2) - if (k == translatedValues [i]) - k = translatedValues [i + 1]; - - return (GetKeyState (k) & 0x8000) != 0; -} - -const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() throw() -{ - updateKeyModifiers(); - - currentModifiers &= ~ModifierKeys::allMouseButtonModifiers; - - if ((GetKeyState (VK_LBUTTON) & 0x8000) != 0) - currentModifiers |= ModifierKeys::leftButtonModifier; - - if ((GetKeyState (VK_RBUTTON) & 0x8000) != 0) - currentModifiers |= ModifierKeys::rightButtonModifier; - - if ((GetKeyState (VK_MBUTTON) & 0x8000) != 0) - currentModifiers |= ModifierKeys::middleButtonModifier; - - return ModifierKeys (currentModifiers); -} - -static int64 getMouseEventTime() throw() -{ - static int64 eventTimeOffset = 0; - static DWORD lastMessageTime = 0; - const DWORD thisMessageTime = GetMessageTime(); - - if (thisMessageTime < lastMessageTime || lastMessageTime == 0) - { - lastMessageTime = thisMessageTime; - eventTimeOffset = Time::currentTimeMillis() - thisMessageTime; - } - - return eventTimeOffset + thisMessageTime; -} - -class Win32ComponentPeer : public ComponentPeer -{ -public: - - Win32ComponentPeer (Component* const component, - const int windowStyleFlags) - : ComponentPeer (component, windowStyleFlags), - dontRepaint (false), - fullScreen (false), - isDragging (false), - isMouseOver (false), - hasCreatedCaret (false), - currentWindowIcon (0), - taskBarIcon (0), - dropTarget (0) - { - MessageManager::getInstance() - ->callFunctionOnMessageThread (&createWindowCallback, (void*) this); - - setTitle (component->getName()); - - if ((windowStyleFlags & windowHasDropShadow) != 0 - && Desktop::canUseSemiTransparentWindows()) - { - shadower = component->getLookAndFeel().createDropShadowerForComponent (component); - - if (shadower != 0) - shadower->setOwner (component); - } - else - { - shadower = 0; - } - } - - ~Win32ComponentPeer() - { - setTaskBarIcon (0); - deleteAndZero (shadower); - - // do this before the next bit to avoid messages arriving for this window - // before it's destroyed - SetWindowLongPtr (hwnd, GWLP_USERDATA, 0); - - MessageManager::getInstance() - ->callFunctionOnMessageThread (&destroyWindowCallback, (void*) hwnd); - - if (currentWindowIcon != 0) - DestroyIcon (currentWindowIcon); - - if (dropTarget != 0) - { - dropTarget->Release(); - dropTarget = 0; - } - } - - void* getNativeHandle() const - { - return (void*) hwnd; - } - - void setVisible (bool shouldBeVisible) - { - ShowWindow (hwnd, shouldBeVisible ? SW_SHOWNA : SW_HIDE); - - if (shouldBeVisible) - InvalidateRect (hwnd, 0, 0); - else - lastPaintTime = 0; - } - - void setTitle (const String& title) - { - SetWindowText (hwnd, title); - } - - void setPosition (int x, int y) - { - offsetWithinParent (x, y); - SetWindowPos (hwnd, 0, - x - windowBorder.getLeft(), - y - windowBorder.getTop(), - 0, 0, - SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); - } - - void repaintNowIfTransparent() - { - if (isTransparent() && lastPaintTime > 0 && Time::getMillisecondCounter() > lastPaintTime + 30) - handlePaintMessage(); - } - - void updateBorderSize() - { - WINDOWINFO info; - info.cbSize = sizeof (info); - - if (GetWindowInfo (hwnd, &info)) - { - windowBorder = BorderSize (info.rcClient.top - info.rcWindow.top, - info.rcClient.left - info.rcWindow.left, - info.rcWindow.bottom - info.rcClient.bottom, - info.rcWindow.right - info.rcClient.right); - } - } - - void setSize (int w, int h) - { - SetWindowPos (hwnd, 0, 0, 0, - w + windowBorder.getLeftAndRight(), - h + windowBorder.getTopAndBottom(), - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER); - - updateBorderSize(); - - repaintNowIfTransparent(); - } - - void setBounds (int x, int y, int w, int h, const bool isNowFullScreen) - { - fullScreen = isNowFullScreen; - offsetWithinParent (x, y); - - SetWindowPos (hwnd, 0, - x - windowBorder.getLeft(), - y - windowBorder.getTop(), - w + windowBorder.getLeftAndRight(), - h + windowBorder.getTopAndBottom(), - SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); - - updateBorderSize(); - - repaintNowIfTransparent(); - } - - void getBounds (int& x, int& y, int& w, int& h) const - { - RECT r; - GetWindowRect (hwnd, &r); - - x = r.left; - y = r.top; - w = r.right - x; - h = r.bottom - y; - - HWND parentH = GetParent (hwnd); - if (parentH != 0) - { - GetWindowRect (parentH, &r); - x -= r.left; - y -= r.top; - } - - x += windowBorder.getLeft(); - y += windowBorder.getTop(); - w -= windowBorder.getLeftAndRight(); - h -= windowBorder.getTopAndBottom(); - } - - int getScreenX() const - { - RECT r; - GetWindowRect (hwnd, &r); - return r.left + windowBorder.getLeft(); - } - - int getScreenY() const - { - RECT r; - GetWindowRect (hwnd, &r); - return r.top + windowBorder.getTop(); - } - - void relativePositionToGlobal (int& x, int& y) - { - RECT r; - GetWindowRect (hwnd, &r); - - x += r.left + windowBorder.getLeft(); - y += r.top + windowBorder.getTop(); - } - - void globalPositionToRelative (int& x, int& y) - { - RECT r; - GetWindowRect (hwnd, &r); - - x -= r.left + windowBorder.getLeft(); - y -= r.top + windowBorder.getTop(); - } - - void setMinimised (bool shouldBeMinimised) - { - if (shouldBeMinimised != isMinimised()) - ShowWindow (hwnd, shouldBeMinimised ? SW_MINIMIZE : SW_SHOWNORMAL); - } - - bool isMinimised() const - { - WINDOWPLACEMENT wp; - wp.length = sizeof (WINDOWPLACEMENT); - GetWindowPlacement (hwnd, &wp); - - return wp.showCmd == SW_SHOWMINIMIZED; - } - - void setFullScreen (bool shouldBeFullScreen) - { - setMinimised (false); - - if (fullScreen != shouldBeFullScreen) - { - fullScreen = shouldBeFullScreen; - const ComponentDeletionWatcher deletionChecker (component); - - if (! fullScreen) - { - const Rectangle boundsCopy (lastNonFullscreenBounds); - - if (hasTitleBar()) - ShowWindow (hwnd, SW_SHOWNORMAL); - - if (! boundsCopy.isEmpty()) - { - setBounds (boundsCopy.getX(), - boundsCopy.getY(), - boundsCopy.getWidth(), - boundsCopy.getHeight(), - false); - } - } - else - { - if (hasTitleBar()) - ShowWindow (hwnd, SW_SHOWMAXIMIZED); - else - SendMessageW (hwnd, WM_SETTINGCHANGE, 0, 0); - } - - if (! deletionChecker.hasBeenDeleted()) - handleMovedOrResized(); - } - } - - bool isFullScreen() const - { - if (! hasTitleBar()) - return fullScreen; - - WINDOWPLACEMENT wp; - wp.length = sizeof (wp); - GetWindowPlacement (hwnd, &wp); - - return wp.showCmd == SW_SHOWMAXIMIZED; - } - - bool contains (int x, int y, bool trueIfInAChildWindow) const - { - RECT r; - GetWindowRect (hwnd, &r); - - POINT p; - p.x = x + r.left + windowBorder.getLeft(); - p.y = y + r.top + windowBorder.getTop(); - - HWND w = WindowFromPoint (p); - - return w == hwnd || (trueIfInAChildWindow && (IsChild (hwnd, w) != 0)); - } - - const BorderSize getFrameSize() const - { - return windowBorder; - } - - bool setAlwaysOnTop (bool alwaysOnTop) - { - const bool oldDeactivate = shouldDeactivateTitleBar; - shouldDeactivateTitleBar = ((styleFlags & windowIsTemporary) == 0); - - SetWindowPos (hwnd, alwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, - 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING); - - shouldDeactivateTitleBar = oldDeactivate; - - if (shadower != 0) - shadower->componentBroughtToFront (*component); - - return true; - } - - void toFront (bool makeActive) - { - setMinimised (false); - - const bool oldDeactivate = shouldDeactivateTitleBar; - shouldDeactivateTitleBar = ((styleFlags & windowIsTemporary) == 0); - - MessageManager::getInstance() - ->callFunctionOnMessageThread (makeActive ? &toFrontCallback1 - : &toFrontCallback2, - (void*) hwnd); - - shouldDeactivateTitleBar = oldDeactivate; - - if (! makeActive) - { - // in this case a broughttofront call won't have occured, so do it now.. - handleBroughtToFront(); - } - } - - void toBehind (ComponentPeer* other) - { - Win32ComponentPeer* const otherPeer = dynamic_cast (other); - - jassert (otherPeer != 0); // wrong type of window? - - if (otherPeer != 0) - { - setMinimised (false); - - SetWindowPos (hwnd, otherPeer->hwnd, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING); - } - } - - bool isFocused() const - { - return MessageManager::getInstance() - ->callFunctionOnMessageThread (&getFocusCallback, 0) == (void*) hwnd; - } - - void grabFocus() - { - const bool oldDeactivate = shouldDeactivateTitleBar; - shouldDeactivateTitleBar = ((styleFlags & windowIsTemporary) == 0); - - MessageManager::getInstance() - ->callFunctionOnMessageThread (&setFocusCallback, (void*) hwnd); - - shouldDeactivateTitleBar = oldDeactivate; - } - - void textInputRequired (int /*x*/, int /*y*/) - { - if (! hasCreatedCaret) - { - hasCreatedCaret = true; - CreateCaret (hwnd, (HBITMAP) 1, 0, 0); - } - - ShowCaret (hwnd); - SetCaretPos (0, 0); - } - - void repaint (int x, int y, int w, int h) - { - const RECT r = { x, y, x + w, y + h }; - InvalidateRect (hwnd, &r, FALSE); - } - - void performAnyPendingRepaintsNow() - { - MSG m; - if (component->isVisible() && PeekMessage (&m, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE)) - DispatchMessage (&m); - } - - static Win32ComponentPeer* getOwnerOfWindow (HWND h) throw() - { - if (h != 0 && GetWindowLongPtr (h, GWLP_USERDATA) == improbableWindowNumber) - return (Win32ComponentPeer*) GetWindowLongPtr (h, 8); - - return 0; - } - - void setTaskBarIcon (const Image* const image) - { - if (image != 0) - { - HICON hicon = createHICONFromImage (*image, TRUE, 0, 0); - - if (taskBarIcon == 0) - { - taskBarIcon = new NOTIFYICONDATA(); - taskBarIcon->cbSize = sizeof (NOTIFYICONDATA); - taskBarIcon->hWnd = (HWND) hwnd; - taskBarIcon->uID = (int) (pointer_sized_int) hwnd; - taskBarIcon->uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; - taskBarIcon->uCallbackMessage = WM_TRAYNOTIFY; - taskBarIcon->hIcon = hicon; - taskBarIcon->szTip[0] = 0; - - Shell_NotifyIcon (NIM_ADD, taskBarIcon); - } - else - { - HICON oldIcon = taskBarIcon->hIcon; - - taskBarIcon->hIcon = hicon; - taskBarIcon->uFlags = NIF_ICON; - Shell_NotifyIcon (NIM_MODIFY, taskBarIcon); - - DestroyIcon (oldIcon); - } - - DestroyIcon (hicon); - } - else if (taskBarIcon != 0) - { - taskBarIcon->uFlags = 0; - Shell_NotifyIcon (NIM_DELETE, taskBarIcon); - DestroyIcon (taskBarIcon->hIcon); - deleteAndZero (taskBarIcon); - } - } - - void setTaskBarIconToolTip (const String& toolTip) const - { - if (taskBarIcon != 0) - { - taskBarIcon->uFlags = NIF_TIP; - toolTip.copyToBuffer (taskBarIcon->szTip, sizeof (taskBarIcon->szTip) - 1); - Shell_NotifyIcon (NIM_MODIFY, taskBarIcon); - } - } - - juce_UseDebuggingNewOperator - - bool dontRepaint; - -private: - HWND hwnd; - DropShadower* shadower; - bool fullScreen, isDragging, isMouseOver, hasCreatedCaret; - BorderSize windowBorder; - HICON currentWindowIcon; - NOTIFYICONDATA* taskBarIcon; - IDropTarget* dropTarget; - - class TemporaryImage : public Timer - { - public: - - TemporaryImage() - : image (0) - { - } - - ~TemporaryImage() - { - delete image; - } - - WindowsBitmapImage* getImage (const bool transparent, const int w, const int h) throw() - { - const Image::PixelFormat format = transparent ? Image::ARGB : Image::RGB; - - if (image == 0 || image->getWidth() < w || image->getHeight() < h || image->getFormat() != format) - { - delete image; - image = new WindowsBitmapImage (format, (w + 31) & ~31, (h + 31) & ~31, false); - } - - startTimer (3000); - return image; - } - - void timerCallback() - { - stopTimer(); - deleteAndZero (image); - } - - private: - WindowsBitmapImage* image; - - TemporaryImage (const TemporaryImage&); - const TemporaryImage& operator= (const TemporaryImage&); - }; - - TemporaryImage offscreenImageGenerator; - - class WindowClassHolder : public DeletedAtShutdown - { - public: - WindowClassHolder() - : windowClassName ("JUCE_") - { - // this name has to be different for each app/dll instance because otherwise - // poor old Win32 can get a bit confused (even despite it not being a process-global - // window class). - windowClassName << (int) (Time::currentTimeMillis() & 0x7fffffff); - - HINSTANCE moduleHandle = (HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle(); - - TCHAR moduleFile [1024]; - moduleFile[0] = 0; - GetModuleFileName (moduleHandle, moduleFile, 1024); - WORD iconNum = 0; - - WNDCLASSEX wcex; - wcex.cbSize = sizeof (wcex); - wcex.style = CS_OWNDC; - wcex.lpfnWndProc = (WNDPROC) windowProc; - wcex.lpszClassName = windowClassName; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 32; - wcex.hInstance = moduleHandle; - wcex.hIcon = ExtractAssociatedIcon (moduleHandle, moduleFile, &iconNum); - iconNum = 1; - wcex.hIconSm = ExtractAssociatedIcon (moduleHandle, moduleFile, &iconNum); - wcex.hCursor = 0; - wcex.hbrBackground = 0; - wcex.lpszMenuName = 0; - - RegisterClassEx (&wcex); - } - - ~WindowClassHolder() - { - if (ComponentPeer::getNumPeers() == 0) - UnregisterClass (windowClassName, (HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle()); - - clearSingletonInstance(); - } - - String windowClassName; - - juce_DeclareSingleton_SingleThreaded_Minimal (WindowClassHolder); - }; - - static void* createWindowCallback (void* userData) - { - ((Win32ComponentPeer*) userData)->createWindow(); - return 0; - } - - void createWindow() - { - DWORD exstyle = WS_EX_ACCEPTFILES; - DWORD type = WS_CLIPSIBLINGS | WS_CLIPCHILDREN; - - if (hasTitleBar()) - { - type |= WS_OVERLAPPED; - exstyle |= WS_EX_APPWINDOW; - - if ((styleFlags & windowHasCloseButton) != 0) - { - type |= WS_SYSMENU; - } - else - { - // annoyingly, windows won't let you have a min/max button without a close button - jassert ((styleFlags & (windowHasMinimiseButton | windowHasMaximiseButton)) == 0); - } - - if ((styleFlags & windowIsResizable) != 0) - type |= WS_THICKFRAME; - } - else - { - type |= WS_POPUP | WS_SYSMENU; - - if ((styleFlags & windowAppearsOnTaskbar) == 0) - exstyle |= WS_EX_TOOLWINDOW; - else - exstyle |= WS_EX_APPWINDOW; - } - - if ((styleFlags & windowHasMinimiseButton) != 0) - type |= WS_MINIMIZEBOX; - - if ((styleFlags & windowHasMaximiseButton) != 0) - type |= WS_MAXIMIZEBOX; - - if ((styleFlags & windowIgnoresMouseClicks) != 0) - exstyle |= WS_EX_TRANSPARENT; - - if ((styleFlags & windowIsSemiTransparent) != 0 - && Desktop::canUseSemiTransparentWindows()) - exstyle |= WS_EX_LAYERED; - - hwnd = CreateWindowEx (exstyle, WindowClassHolder::getInstance()->windowClassName, L"", type, 0, 0, 0, 0, 0, 0, 0, 0); - - if (hwnd != 0) - { - SetWindowLongPtr (hwnd, 0, 0); - SetWindowLongPtr (hwnd, 8, (LONG_PTR) this); - SetWindowLongPtr (hwnd, GWLP_USERDATA, improbableWindowNumber); - - if (dropTarget == 0) - dropTarget = new JuceDropTarget (this); - - RegisterDragDrop (hwnd, dropTarget); - - updateBorderSize(); - - // Calling this function here is (for some reason) necessary to make Windows - // correctly enable the menu items that we specify in the wm_initmenu message. - GetSystemMenu (hwnd, false); - } - else - { - jassertfalse - } - } - - static void* destroyWindowCallback (void* handle) - { - RevokeDragDrop ((HWND) handle); - DestroyWindow ((HWND) handle); - return 0; - } - - static void* toFrontCallback1 (void* h) - { - SetForegroundWindow ((HWND) h); - return 0; - } - - static void* toFrontCallback2 (void* h) - { - SetWindowPos ((HWND) h, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING); - return 0; - } - - static void* setFocusCallback (void* h) - { - SetFocus ((HWND) h); - return 0; - } - - static void* getFocusCallback (void*) - { - return (void*) GetFocus(); - } - - void offsetWithinParent (int& x, int& y) const - { - if (isTransparent()) - { - HWND parentHwnd = GetParent (hwnd); - - if (parentHwnd != 0) - { - RECT parentRect; - GetWindowRect (parentHwnd, &parentRect); - x += parentRect.left; - y += parentRect.top; - } - } - } - - bool isTransparent() const - { - return (GetWindowLong (hwnd, GWL_EXSTYLE) & WS_EX_LAYERED) != 0; - } - - inline bool hasTitleBar() const throw() { return (styleFlags & windowHasTitleBar) != 0; } - - void setIcon (const Image& newIcon) - { - HICON hicon = createHICONFromImage (newIcon, TRUE, 0, 0); - - if (hicon != 0) - { - SendMessage (hwnd, WM_SETICON, ICON_BIG, (LPARAM) hicon); - SendMessage (hwnd, WM_SETICON, ICON_SMALL, (LPARAM) hicon); - - if (currentWindowIcon != 0) - DestroyIcon (currentWindowIcon); - - currentWindowIcon = hicon; - } - } - - void handlePaintMessage() - { -#if DEBUG_REPAINT_TIMES - const double paintStart = Time::getMillisecondCounterHiRes(); -#endif - HRGN rgn = CreateRectRgn (0, 0, 0, 0); - const int regionType = GetUpdateRgn (hwnd, rgn, false); - - PAINTSTRUCT paintStruct; - HDC dc = BeginPaint (hwnd, &paintStruct); // Note this can immediately generate a WM_NCPAINT - // message and become re-entrant, but that's OK - - // if something in a paint handler calls, e.g. a message box, this can become reentrant and - // corrupt the image it's using to paint into, so do a check here. - static bool reentrant = false; - if (reentrant) - { - DeleteObject (rgn); - EndPaint (hwnd, &paintStruct); - return; - } - - reentrant = true; - - // this is the rectangle to update.. - int x = paintStruct.rcPaint.left; - int y = paintStruct.rcPaint.top; - int w = paintStruct.rcPaint.right - x; - int h = paintStruct.rcPaint.bottom - y; - - const bool transparent = isTransparent(); - - if (transparent) - { - // it's not possible to have a transparent window with a title bar at the moment! - jassert (! hasTitleBar()); - - RECT r; - GetWindowRect (hwnd, &r); - x = y = 0; - w = r.right - r.left; - h = r.bottom - r.top; - } - - if (w > 0 && h > 0) - { - clearMaskedRegion(); - - WindowsBitmapImage* const offscreenImage = offscreenImageGenerator.getImage (transparent, w, h); - - LowLevelGraphicsSoftwareRenderer context (*offscreenImage); - - RectangleList* const contextClip = context.getRawClipRegion(); - contextClip->clear(); - - context.setOrigin (-x, -y); - - bool needToPaintAll = true; - - if (regionType == COMPLEXREGION && ! transparent) - { - HRGN clipRgn = CreateRectRgnIndirect (&paintStruct.rcPaint); - CombineRgn (rgn, rgn, clipRgn, RGN_AND); - DeleteObject (clipRgn); - - char rgnData [8192]; - const DWORD res = GetRegionData (rgn, sizeof (rgnData), (RGNDATA*) rgnData); - - if (res > 0 && res <= sizeof (rgnData)) - { - const RGNDATAHEADER* const hdr = &(((const RGNDATA*) rgnData)->rdh); - - if (hdr->iType == RDH_RECTANGLES - && hdr->rcBound.right - hdr->rcBound.left >= w - && hdr->rcBound.bottom - hdr->rcBound.top >= h) - { - needToPaintAll = false; - - const RECT* rects = (const RECT*) (rgnData + sizeof (RGNDATAHEADER)); - int num = ((RGNDATA*) rgnData)->rdh.nCount; - - while (--num >= 0) - { - // (need to move this one pixel to the left because of a win32 bug) - const int cx = jmax (x, rects->left - 1); - const int cy = rects->top; - const int cw = rects->right - cx; - const int ch = rects->bottom - rects->top; - - if (cx + cw - x <= w && cy + ch - y <= h) - { - contextClip->addWithoutMerging (Rectangle (cx - x, cy - y, cw, ch)); - } - else - { - needToPaintAll = true; - break; - } - - ++rects; - } - } - } - } - - if (needToPaintAll) - { - contextClip->clear(); - contextClip->addWithoutMerging (Rectangle (0, 0, w, h)); - } - - if (transparent) - { - RectangleList::Iterator i (*contextClip); - - while (i.next()) - { - const Rectangle& r = *i.getRectangle(); - offscreenImage->clear (r.getX(), r.getY(), r.getWidth(), r.getHeight()); - } - } - - // if the component's not opaque, this won't draw properly unless the platform can support this - jassert (Desktop::canUseSemiTransparentWindows() || component->isOpaque()); - - updateCurrentModifiers(); - - handlePaint (context); - - if (! dontRepaint) - offscreenImage->blitToWindow (hwnd, dc, transparent, x, y, maskedRegion); - } - - DeleteObject (rgn); - EndPaint (hwnd, &paintStruct); - reentrant = false; - -#ifndef JUCE_GCC //xxx should add this fn for gcc.. - _fpreset(); // because some graphics cards can unmask FP exceptions -#endif - - lastPaintTime = Time::getMillisecondCounter(); - -#if DEBUG_REPAINT_TIMES - const double elapsed = Time::getMillisecondCounterHiRes() - paintStart; - Logger::outputDebugString (T("repaint time: ") + String (elapsed, 2)); -#endif - } - - void doMouseMove (const int x, const int y) - { - static uint32 lastMouseTime = 0; - // this can be set to throttle the mouse-messages to less than a - // certain number per second, as things can get unresponsive - // if each drag or move callback has to do a lot of work. - const int maxMouseMovesPerSecond = 60; - - const int64 mouseEventTime = getMouseEventTime(); - - if (! isMouseOver) - { - isMouseOver = true; - - TRACKMOUSEEVENT tme; - tme.cbSize = sizeof (tme); - tme.dwFlags = TME_LEAVE; - tme.hwndTrack = hwnd; - tme.dwHoverTime = 0; - - if (! TrackMouseEvent (&tme)) - { - jassertfalse; - } - - updateKeyModifiers(); - handleMouseEnter (x, y, mouseEventTime); - } - else if (! isDragging) - { - if (((unsigned int) x) < (unsigned int) component->getWidth() - && ((unsigned int) y) < (unsigned int) component->getHeight()) - { - RECT r; - GetWindowRect (hwnd, &r); - - POINT p; - p.x = x + r.left + windowBorder.getLeft(); - p.y = y + r.top + windowBorder.getTop(); - - if (WindowFromPoint (p) == hwnd) - { - const uint32 now = Time::getMillisecondCounter(); - - if (now > lastMouseTime + 1000 / maxMouseMovesPerSecond) - { - lastMouseTime = now; - handleMouseMove (x, y, mouseEventTime); - } - } - } - } - else - { - const uint32 now = Time::getMillisecondCounter(); - - if (now > lastMouseTime + 1000 / maxMouseMovesPerSecond) - { - lastMouseTime = now; - handleMouseDrag (x, y, mouseEventTime); - } - } - } - - void doMouseDown (const int x, const int y, const WPARAM wParam) - { - if (GetCapture() != hwnd) - SetCapture (hwnd); - - doMouseMove (x, y); - - currentModifiers &= ~ModifierKeys::allMouseButtonModifiers; - - if ((wParam & MK_LBUTTON) != 0) - currentModifiers |= ModifierKeys::leftButtonModifier; - - if ((wParam & MK_RBUTTON) != 0) - currentModifiers |= ModifierKeys::rightButtonModifier; - - if ((wParam & MK_MBUTTON) != 0) - currentModifiers |= ModifierKeys::middleButtonModifier; - - updateKeyModifiers(); - isDragging = true; - - handleMouseDown (x, y, getMouseEventTime()); - } - - void doMouseUp (const int x, const int y, const WPARAM wParam) - { - int numButtons = 0; - - if ((wParam & MK_LBUTTON) != 0) - ++numButtons; - - if ((wParam & MK_RBUTTON) != 0) - ++numButtons; - - if ((wParam & MK_MBUTTON) != 0) - ++numButtons; - - const int oldModifiers = currentModifiers; - - // update the currentmodifiers only after the callback, so the callback - // knows which button was released. - currentModifiers &= ~ModifierKeys::allMouseButtonModifiers; - - if ((wParam & MK_LBUTTON) != 0) - currentModifiers |= ModifierKeys::leftButtonModifier; - - if ((wParam & MK_RBUTTON) != 0) - currentModifiers |= ModifierKeys::rightButtonModifier; - - if ((wParam & MK_MBUTTON) != 0) - currentModifiers |= ModifierKeys::middleButtonModifier; - - updateKeyModifiers(); - isDragging = false; - - // release the mouse capture if the user's not still got a button down - if (numButtons == 0 && hwnd == GetCapture()) - ReleaseCapture(); - - handleMouseUp (oldModifiers, x, y, getMouseEventTime()); - } - - void doCaptureChanged() - { - if (isDragging) - { - RECT wr; - GetWindowRect (hwnd, &wr); - - const DWORD mp = GetMessagePos(); - - doMouseUp (GET_X_LPARAM (mp) - wr.left - windowBorder.getLeft(), - GET_Y_LPARAM (mp) - wr.top - windowBorder.getTop(), - getMouseEventTime()); - } - } - - void doMouseExit() - { - if (isMouseOver) - { - isMouseOver = false; - RECT wr; - GetWindowRect (hwnd, &wr); - - const DWORD mp = GetMessagePos(); - - handleMouseExit (GET_X_LPARAM (mp) - wr.left - windowBorder.getLeft(), - GET_Y_LPARAM (mp) - wr.top - windowBorder.getTop(), - getMouseEventTime()); - } - } - - void doMouseWheel (const WPARAM wParam, const bool isVertical) - { - updateKeyModifiers(); - - const int amount = jlimit (-1000, 1000, (int) (0.75f * (short) HIWORD (wParam))); - - handleMouseWheel (isVertical ? 0 : amount, - isVertical ? amount : 0, - getMouseEventTime()); - } - - void sendModifierKeyChangeIfNeeded() - { - if (modifiersAtLastCallback != currentModifiers) - { - modifiersAtLastCallback = currentModifiers; - handleModifierKeysChange(); - } - } - - bool doKeyUp (const WPARAM key) - { - updateKeyModifiers(); - - switch (key) - { - case VK_SHIFT: - case VK_CONTROL: - case VK_MENU: - case VK_CAPITAL: - case VK_LWIN: - case VK_RWIN: - case VK_APPS: - case VK_NUMLOCK: - case VK_SCROLL: - case VK_LSHIFT: - case VK_RSHIFT: - case VK_LCONTROL: - case VK_LMENU: - case VK_RCONTROL: - case VK_RMENU: - sendModifierKeyChangeIfNeeded(); - } - - return handleKeyUpOrDown(); - } - - bool doKeyDown (const WPARAM key) - { - updateKeyModifiers(); - bool used = false; - - switch (key) - { - case VK_SHIFT: - case VK_LSHIFT: - case VK_RSHIFT: - case VK_CONTROL: - case VK_LCONTROL: - case VK_RCONTROL: - case VK_MENU: - case VK_LMENU: - case VK_RMENU: - case VK_LWIN: - case VK_RWIN: - case VK_CAPITAL: - case VK_NUMLOCK: - case VK_SCROLL: - case VK_APPS: - sendModifierKeyChangeIfNeeded(); - break; - - case VK_LEFT: - case VK_RIGHT: - case VK_UP: - case VK_DOWN: - case VK_PRIOR: - case VK_NEXT: - case VK_HOME: - case VK_END: - case VK_DELETE: - case VK_INSERT: - case VK_F1: - case VK_F2: - case VK_F3: - case VK_F4: - case VK_F5: - case VK_F6: - case VK_F7: - case VK_F8: - case VK_F9: - case VK_F10: - case VK_F11: - case VK_F12: - case VK_F13: - case VK_F14: - case VK_F15: - case VK_F16: - used = handleKeyUpOrDown(); - used = handleKeyPress (extendedKeyModifier | (int) key, 0) || used; - break; - - case VK_ADD: - case VK_SUBTRACT: - case VK_MULTIPLY: - case VK_DIVIDE: - case VK_SEPARATOR: - case VK_DECIMAL: - used = handleKeyUpOrDown(); - break; - - default: - used = handleKeyUpOrDown(); - - { - MSG msg; - - if (! PeekMessage (&msg, hwnd, WM_CHAR, WM_DEADCHAR, PM_NOREMOVE)) - { - // if there isn't a WM_CHAR or WM_DEADCHAR message pending, we need to - // manually generate the key-press event that matches this key-down. - - const UINT keyChar = MapVirtualKey (key, 2); - used = handleKeyPress ((int) LOWORD (keyChar), 0) || used; - } - } - - break; - } - - return used; - } - - bool doKeyChar (int key, const LPARAM flags) - { - updateKeyModifiers(); - - juce_wchar textChar = (juce_wchar) key; - - const int virtualScanCode = (flags >> 16) & 0xff; - - if (key >= '0' && key <= '9') - { - switch (virtualScanCode) // check for a numeric keypad scan-code - { - case 0x52: - case 0x4f: - case 0x50: - case 0x51: - case 0x4b: - case 0x4c: - case 0x4d: - case 0x47: - case 0x48: - case 0x49: - key = (key - '0') + KeyPress::numberPad0; - break; - default: - break; - } - } - else - { - // convert the scan code to an unmodified character code.. - const UINT virtualKey = MapVirtualKey (virtualScanCode, 1); - UINT keyChar = MapVirtualKey (virtualKey, 2); - - keyChar = LOWORD (keyChar); - - if (keyChar != 0) - key = (int) keyChar; - - // avoid sending junk text characters for some control-key combinations - if (textChar < ' ' && (currentModifiers & (ModifierKeys::ctrlModifier | ModifierKeys::altModifier)) != 0) - textChar = 0; - } - - return handleKeyPress (key, textChar); - } - - bool doAppCommand (const LPARAM lParam) - { - int key = 0; - - switch (GET_APPCOMMAND_LPARAM (lParam)) - { - case APPCOMMAND_MEDIA_PLAY_PAUSE: - key = KeyPress::playKey; - break; - - case APPCOMMAND_MEDIA_STOP: - key = KeyPress::stopKey; - break; - - case APPCOMMAND_MEDIA_NEXTTRACK: - key = KeyPress::fastForwardKey; - break; - - case APPCOMMAND_MEDIA_PREVIOUSTRACK: - key = KeyPress::rewindKey; - break; - } - - if (key != 0) - { - updateKeyModifiers(); - - if (hwnd == GetActiveWindow()) - { - handleKeyPress (key, 0); - return true; - } - } - - return false; - } - - class JuceDropTarget : public IDropTarget - { - public: - JuceDropTarget (Win32ComponentPeer* const owner_) - : owner (owner_), - refCount (1) - { - } - - virtual ~JuceDropTarget() - { - jassert (refCount == 0); - } - - HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) - { - if (id == IID_IUnknown || id == IID_IDropTarget) - { - AddRef(); - *result = this; - return S_OK; - } - - *result = 0; - return E_NOINTERFACE; - } - - ULONG __stdcall AddRef() { return ++refCount; } - ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } - - HRESULT __stdcall DragEnter (IDataObject* pDataObject, DWORD /*grfKeyState*/, POINTL mousePos, DWORD* pdwEffect) - { - updateFileList (pDataObject); - int x = mousePos.x, y = mousePos.y; - owner->globalPositionToRelative (x, y); - owner->handleFileDragMove (files, x, y); - *pdwEffect = DROPEFFECT_COPY; - return S_OK; - } - - HRESULT __stdcall DragLeave() - { - owner->handleFileDragExit (files); - return S_OK; - } - - HRESULT __stdcall DragOver (DWORD /*grfKeyState*/, POINTL mousePos, DWORD* pdwEffect) - { - int x = mousePos.x, y = mousePos.y; - owner->globalPositionToRelative (x, y); - owner->handleFileDragMove (files, x, y); - *pdwEffect = DROPEFFECT_COPY; - return S_OK; - } - - HRESULT __stdcall Drop (IDataObject* pDataObject, DWORD /*grfKeyState*/, POINTL mousePos, DWORD* pdwEffect) - { - updateFileList (pDataObject); - int x = mousePos.x, y = mousePos.y; - owner->globalPositionToRelative (x, y); - owner->handleFileDragDrop (files, x, y); - *pdwEffect = DROPEFFECT_COPY; - return S_OK; - } - - private: - Win32ComponentPeer* const owner; - int refCount; - StringArray files; - - void updateFileList (IDataObject* const pDataObject) - { - files.clear(); - - FORMATETC format = { CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; - STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; - - if (pDataObject->GetData (&format, &medium) == S_OK) - { - const SIZE_T totalLen = GlobalSize (medium.hGlobal); - const LPDROPFILES pDropFiles = (const LPDROPFILES) GlobalLock (medium.hGlobal); - unsigned int i = 0; - - if (pDropFiles->fWide) - { - const WCHAR* const fname = (WCHAR*) (((const char*) pDropFiles) + sizeof (DROPFILES)); - - for (;;) - { - unsigned int len = 0; - while (i + len < totalLen && fname [i + len] != 0) - ++len; - - if (len == 0) - break; - - files.add (String (fname + i, len)); - i += len + 1; - } - } - else - { - const char* const fname = ((const char*) pDropFiles) + sizeof (DROPFILES); - - for (;;) - { - unsigned int len = 0; - while (i + len < totalLen && fname [i + len] != 0) - ++len; - - if (len == 0) - break; - - files.add (String (fname + i, len)); - i += len + 1; - } - } - - GlobalUnlock (medium.hGlobal); - } - } - - JuceDropTarget (const JuceDropTarget&); - const JuceDropTarget& operator= (const JuceDropTarget&); - }; - - void doSettingChange() - { - Desktop::getInstance().refreshMonitorSizes(); - - if (fullScreen && ! isMinimised()) - { - const Rectangle r (component->getParentMonitorArea()); - - SetWindowPos (hwnd, 0, - r.getX(), r.getY(), r.getWidth(), r.getHeight(), - SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOSENDCHANGING); - } - } - -public: - static LRESULT CALLBACK windowProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) - { - Win32ComponentPeer* const peer = getOwnerOfWindow (h); - - if (peer != 0) - return peer->peerWindowProc (h, message, wParam, lParam); - - return DefWindowProc (h, message, wParam, lParam); - } - -private: - LRESULT peerWindowProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) - { - { - const MessageManagerLock messLock; - - if (isValidPeer (this)) - { - switch (message) - { - case WM_NCHITTEST: - if (hasTitleBar()) - break; - - return HTCLIENT; - - case WM_PAINT: - handlePaintMessage(); - return 0; - - case WM_NCPAINT: - if (wParam != 1) - handlePaintMessage(); - - if (hasTitleBar()) - break; - - return 0; - - case WM_ERASEBKGND: - case WM_NCCALCSIZE: - if (hasTitleBar()) - break; - - return 1; - - case WM_MOUSEMOVE: - doMouseMove (GET_X_LPARAM (lParam), GET_Y_LPARAM (lParam)); - return 0; - - case WM_MOUSELEAVE: - doMouseExit(); - return 0; - - case WM_LBUTTONDOWN: - case WM_MBUTTONDOWN: - case WM_RBUTTONDOWN: - doMouseDown (GET_X_LPARAM (lParam), GET_Y_LPARAM (lParam), wParam); - return 0; - - case WM_LBUTTONUP: - case WM_MBUTTONUP: - case WM_RBUTTONUP: - doMouseUp (GET_X_LPARAM (lParam), GET_Y_LPARAM (lParam), wParam); - return 0; - - case WM_CAPTURECHANGED: - doCaptureChanged(); - return 0; - - case WM_NCMOUSEMOVE: - if (hasTitleBar()) - break; - - return 0; - - case 0x020A: /* WM_MOUSEWHEEL */ - doMouseWheel (wParam, true); - return 0; - - case 0x020E: /* WM_MOUSEHWHEEL */ - doMouseWheel (wParam, false); - return 0; - - case WM_WINDOWPOSCHANGING: - if ((styleFlags & (windowHasTitleBar | windowIsResizable)) == (windowHasTitleBar | windowIsResizable)) - { - WINDOWPOS* const wp = (WINDOWPOS*) lParam; - - if ((wp->flags & (SWP_NOMOVE | SWP_NOSIZE)) != (SWP_NOMOVE | SWP_NOSIZE)) - { - if (constrainer != 0) - { - const Rectangle current (component->getX() - windowBorder.getLeft(), - component->getY() - windowBorder.getTop(), - component->getWidth() + windowBorder.getLeftAndRight(), - component->getHeight() + windowBorder.getTopAndBottom()); - - constrainer->checkBounds (wp->x, wp->y, wp->cx, wp->cy, - current, - Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), - wp->y != current.getY() && wp->y + wp->cy == current.getBottom(), - wp->x != current.getX() && wp->x + wp->cx == current.getRight(), - wp->y == current.getY() && wp->y + wp->cy != current.getBottom(), - wp->x == current.getX() && wp->x + wp->cx != current.getRight()); - } - } - } - - return 0; - - case WM_WINDOWPOSCHANGED: - handleMovedOrResized(); - - if (dontRepaint) - break; // needed for non-accelerated openGL windows to draw themselves correctly.. - else - return 0; - - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - if (doKeyDown (wParam)) - return 0; - - break; - - case WM_KEYUP: - case WM_SYSKEYUP: - if (doKeyUp (wParam)) - return 0; - - break; - - case WM_CHAR: - if (doKeyChar ((int) wParam, lParam)) - return 0; - - break; - - case WM_APPCOMMAND: - if (doAppCommand (lParam)) - return TRUE; - - break; - - case WM_SETFOCUS: - updateKeyModifiers(); - handleFocusGain(); - break; - - case WM_KILLFOCUS: - if (hasCreatedCaret) - { - hasCreatedCaret = false; - DestroyCaret(); - } - - handleFocusLoss(); - break; - - case WM_ACTIVATEAPP: - // Windows does weird things to process priority when you swap apps, - // so this forces an update when the app is brought to the front - if (wParam != FALSE) - juce_repeatLastProcessPriority(); - - juce_CheckCurrentlyFocusedTopLevelWindow(); - modifiersAtLastCallback = -1; - return 0; - - case WM_ACTIVATE: - if (LOWORD (wParam) == WA_ACTIVE || LOWORD (wParam) == WA_CLICKACTIVE) - { - modifiersAtLastCallback = -1; - updateKeyModifiers(); - - if (isMinimised()) - { - component->repaint(); - handleMovedOrResized(); - - if (! isValidMessageListener()) - return 0; - } - - if (LOWORD (wParam) == WA_CLICKACTIVE - && component->isCurrentlyBlockedByAnotherModalComponent()) - { - int mx, my; - component->getMouseXYRelative (mx, my); - Component* const underMouse = component->getComponentAt (mx, my); - - if (underMouse != 0 && underMouse->isCurrentlyBlockedByAnotherModalComponent()) - Component::getCurrentlyModalComponent()->inputAttemptWhenModal(); - - return 0; - } - - handleBroughtToFront(); - return 0; - } - - break; - - case WM_NCACTIVATE: - // while a temporary window is being shown, prevent Windows from deactivating the - // title bars of our main windows. - if (wParam == 0 && ! shouldDeactivateTitleBar) - wParam = TRUE; // change this and let it get passed to the DefWindowProc. - - break; - - case WM_MOUSEACTIVATE: - if (! component->getMouseClickGrabsKeyboardFocus()) - return MA_NOACTIVATE; - - break; - - case WM_SHOWWINDOW: - if (wParam != 0) - handleBroughtToFront(); - - break; - - case WM_CLOSE: - handleUserClosingWindow(); - return 0; - - case WM_QUIT: - JUCEApplication::quit(); - return 0; - - case WM_TRAYNOTIFY: - if (component->isCurrentlyBlockedByAnotherModalComponent()) - { - if (lParam == WM_LBUTTONDOWN || lParam == WM_RBUTTONDOWN - || lParam == WM_LBUTTONDBLCLK || lParam == WM_LBUTTONDBLCLK) - { - Component* const current = Component::getCurrentlyModalComponent(); - - if (current != 0) - current->inputAttemptWhenModal(); - } - } - else - { - const int oldModifiers = currentModifiers; - - MouseEvent e (0, 0, ModifierKeys::getCurrentModifiersRealtime(), component, - getMouseEventTime(), 0, 0, getMouseEventTime(), 1, false); - - if (lParam == WM_LBUTTONDOWN || lParam == WM_LBUTTONDBLCLK) - e.mods = ModifierKeys (e.mods.getRawFlags() | ModifierKeys::leftButtonModifier); - else if (lParam == WM_RBUTTONDOWN || lParam == WM_RBUTTONDBLCLK) - e.mods = ModifierKeys (e.mods.getRawFlags() | ModifierKeys::rightButtonModifier); - - if (lParam == WM_LBUTTONDOWN || lParam == WM_RBUTTONDOWN) - { - SetFocus (hwnd); - SetForegroundWindow (hwnd); - - component->mouseDown (e); - } - else if (lParam == WM_LBUTTONUP || lParam == WM_RBUTTONUP) - { - e.mods = ModifierKeys (oldModifiers); - component->mouseUp (e); - } - else if (lParam == WM_LBUTTONDBLCLK || lParam == WM_LBUTTONDBLCLK) - { - e.mods = ModifierKeys (oldModifiers); - component->mouseDoubleClick (e); - } - else if (lParam == WM_MOUSEMOVE) - { - component->mouseMove (e); - } - } - - break; - - case WM_SYNCPAINT: - return 0; - - case WM_PALETTECHANGED: - InvalidateRect (h, 0, 0); - break; - - case WM_DISPLAYCHANGE: - InvalidateRect (h, 0, 0); - createPaletteIfNeeded = true; - // intentional fall-through... - case WM_SETTINGCHANGE: // note the fall-through in the previous case! - doSettingChange(); - break; - - case WM_INITMENU: - if (! hasTitleBar()) - { - if (isFullScreen()) - { - EnableMenuItem ((HMENU) wParam, SC_RESTORE, MF_BYCOMMAND | MF_ENABLED); - EnableMenuItem ((HMENU) wParam, SC_MOVE, MF_BYCOMMAND | MF_GRAYED); - } - else if (! isMinimised()) - { - EnableMenuItem ((HMENU) wParam, SC_MAXIMIZE, MF_BYCOMMAND | MF_GRAYED); - } - } - break; - - case WM_SYSCOMMAND: - switch (wParam & 0xfff0) - { - case SC_CLOSE: - if (hasTitleBar()) - { - PostMessage (h, WM_CLOSE, 0, 0); - return 0; - } - break; - - case SC_KEYMENU: - if (hasTitleBar() && h == GetCapture()) - ReleaseCapture(); - - break; - - case SC_MAXIMIZE: - setFullScreen (true); - return 0; - - case SC_MINIMIZE: - if (! hasTitleBar()) - { - setMinimised (true); - return 0; - } - break; - - case SC_RESTORE: - if (hasTitleBar()) - { - if (isFullScreen()) - { - setFullScreen (false); - return 0; - } - } - else - { - if (isMinimised()) - setMinimised (false); - else if (isFullScreen()) - setFullScreen (false); - - return 0; - } - - break; - - case SC_MONITORPOWER: - case SC_SCREENSAVE: - if (! screenSaverAllowed) - return 0; - - break; - } - - break; - - case WM_NCLBUTTONDOWN: - case WM_NCRBUTTONDOWN: - case WM_NCMBUTTONDOWN: - if (component->isCurrentlyBlockedByAnotherModalComponent()) - { - Component* const current = Component::getCurrentlyModalComponent(); - - if (current != 0) - current->inputAttemptWhenModal(); - } - - break; - - //case WM_IME_STARTCOMPOSITION; - // return 0; - - case WM_GETDLGCODE: - return DLGC_WANTALLKEYS; - - default: - break; - } - } - } - - // (the message manager lock exits before calling this, to avoid deadlocks if - // this calls into non-juce windows) - return DefWindowProc (h, message, wParam, lParam); - } - - Win32ComponentPeer (const Win32ComponentPeer&); - const Win32ComponentPeer& operator= (const Win32ComponentPeer&); -}; - -ComponentPeer* Component::createNewPeer (int styleFlags, void* /*nativeWindowToAttachTo*/) -{ - return new Win32ComponentPeer (this, styleFlags); -} - -juce_ImplementSingleton_SingleThreaded (Win32ComponentPeer::WindowClassHolder); - -void SystemTrayIconComponent::setIconImage (const Image& newImage) -{ - Win32ComponentPeer* const wp = dynamic_cast (getPeer()); - - if (wp != 0) - wp->setTaskBarIcon (&newImage); -} - -void SystemTrayIconComponent::setIconTooltip (const String& tooltip) -{ - Win32ComponentPeer* const wp = dynamic_cast (getPeer()); - - if (wp != 0) - wp->setTaskBarIconToolTip (tooltip); -} - -void juce_setWindowStyleBit (HWND h, const int styleType, const int feature, const bool bitIsSet) throw() -{ - DWORD val = GetWindowLong (h, styleType); - - if (bitIsSet) - val |= feature; - else - val &= ~feature; - - SetWindowLongPtr (h, styleType, val); - SetWindowPos (h, 0, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER - | SWP_NOOWNERZORDER | SWP_FRAMECHANGED | SWP_NOSENDCHANGING); -} - -bool Process::isForegroundProcess() throw() -{ - HWND fg = GetForegroundWindow(); - - if (fg == 0) - return true; - - DWORD processId = 0; - GetWindowThreadProcessId (fg, &processId); - - return processId == GetCurrentProcessId(); -} - -void Desktop::getMousePosition (int& x, int& y) throw() -{ - POINT mousePos; - GetCursorPos (&mousePos); - x = mousePos.x; - y = mousePos.y; -} - -void Desktop::setMousePosition (int x, int y) throw() -{ - SetCursorPos (x, y); -} - -void Desktop::setScreenSaverEnabled (const bool isEnabled) throw() -{ - screenSaverAllowed = isEnabled; -} - -bool Desktop::isScreenSaverEnabled() throw() -{ - return screenSaverAllowed; -} - -static BOOL CALLBACK enumMonitorsProc (HMONITOR, HDC, LPRECT r, LPARAM userInfo) -{ - Array * const monitorCoords = (Array *) userInfo; - - monitorCoords->add (Rectangle (r->left, r->top, r->right - r->left, r->bottom - r->top)); - - return TRUE; -} - -void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() -{ - EnumDisplayMonitors (0, 0, &enumMonitorsProc, (LPARAM) &monitorCoords); - - // make sure the first in the list is the main monitor - for (int i = 1; i < monitorCoords.size(); ++i) - if (monitorCoords[i].getX() == 0 && monitorCoords[i].getY() == 0) - monitorCoords.swap (i, 0); - - if (monitorCoords.size() == 0) - { - RECT r; - GetWindowRect (GetDesktopWindow(), &r); - - monitorCoords.add (Rectangle (r.left, r.top, r.right - r.left, r.bottom - r.top)); - } - - if (clipToWorkArea) - { - // clip the main monitor to the active non-taskbar area - RECT r; - SystemParametersInfo (SPI_GETWORKAREA, 0, &r, 0); - - Rectangle& screen = monitorCoords.getReference (0); - - screen.setPosition (jmax (screen.getX(), r.left), - jmax (screen.getY(), r.top)); - - screen.setSize (jmin (screen.getRight(), r.right) - screen.getX(), - jmin (screen.getBottom(), r.bottom) - screen.getY()); - } -} - -static Image* createImageFromHBITMAP (HBITMAP bitmap) throw() -{ - Image* im = 0; - - if (bitmap != 0) - { - BITMAP bm; - - if (GetObject (bitmap, sizeof (BITMAP), &bm) - && bm.bmWidth > 0 && bm.bmHeight > 0) - { - HDC tempDC = GetDC (0); - HDC dc = CreateCompatibleDC (tempDC); - ReleaseDC (0, tempDC); - - SelectObject (dc, bitmap); - - im = new Image (Image::ARGB, bm.bmWidth, bm.bmHeight, true); - - for (int y = bm.bmHeight; --y >= 0;) - { - for (int x = bm.bmWidth; --x >= 0;) - { - COLORREF col = GetPixel (dc, x, y); - - im->setPixelAt (x, y, Colour ((uint8) GetRValue (col), - (uint8) GetGValue (col), - (uint8) GetBValue (col))); - } - } - - DeleteDC (dc); - } - } - - return im; -} - -static Image* createImageFromHICON (HICON icon) throw() -{ - ICONINFO info; - - if (GetIconInfo (icon, &info)) - { - Image* const mask = createImageFromHBITMAP (info.hbmMask); - - if (mask == 0) - return 0; - - Image* const image = createImageFromHBITMAP (info.hbmColor); - - if (image == 0) - return mask; - - for (int y = image->getHeight(); --y >= 0;) - { - for (int x = image->getWidth(); --x >= 0;) - { - const float brightness = mask->getPixelAt (x, y).getBrightness(); - - if (brightness > 0.0f) - image->multiplyAlphaAt (x, y, 1.0f - brightness); - } - } - - delete mask; - return image; - } - - return 0; -} - -static HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) throw() -{ - HBITMAP mask = CreateBitmap (image.getWidth(), image.getHeight(), 1, 1, 0); - - ICONINFO info; - info.fIcon = isIcon; - info.xHotspot = hotspotX; - info.yHotspot = hotspotY; - info.hbmMask = mask; - HICON hi = 0; - - if (SystemStats::getOperatingSystemType() >= SystemStats::WinXP) - { - WindowsBitmapImage bitmap (Image::ARGB, image.getWidth(), image.getHeight(), true); - Graphics g (bitmap); - g.drawImageAt (&image, 0, 0); - - info.hbmColor = bitmap.hBitmap; - hi = CreateIconIndirect (&info); - } - else - { - HBITMAP colour = CreateCompatibleBitmap (GetDC (0), image.getWidth(), image.getHeight()); - - HDC colDC = CreateCompatibleDC (GetDC (0)); - HDC alphaDC = CreateCompatibleDC (GetDC (0)); - SelectObject (colDC, colour); - SelectObject (alphaDC, mask); - - for (int y = image.getHeight(); --y >= 0;) - { - for (int x = image.getWidth(); --x >= 0;) - { - const Colour c (image.getPixelAt (x, y)); - - SetPixel (colDC, x, y, COLORREF (c.getRed() | (c.getGreen() << 8) | (c.getBlue() << 16))); - SetPixel (alphaDC, x, y, COLORREF (0xffffff - (c.getAlpha() | (c.getAlpha() << 8) | (c.getAlpha() << 16)))); - } - } - - DeleteDC (colDC); - DeleteDC (alphaDC); - - info.hbmColor = colour; - hi = CreateIconIndirect (&info); - DeleteObject (colour); - } - - DeleteObject (mask); - return hi; -} - -Image* juce_createIconForFile (const File& file) -{ - Image* image = 0; - - TCHAR filename [1024]; - file.getFullPathName().copyToBuffer (filename, 1023); - WORD iconNum = 0; - - HICON icon = ExtractAssociatedIcon ((HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle(), - filename, &iconNum); - - if (icon != 0) - { - image = createImageFromHICON (icon); - DestroyIcon (icon); - } - - return image; -} - -void* juce_createMouseCursorFromImage (const Image& image, int hotspotX, int hotspotY) throw() -{ - const int maxW = GetSystemMetrics (SM_CXCURSOR); - const int maxH = GetSystemMetrics (SM_CYCURSOR); - - const Image* im = ℑ - Image* newIm = 0; - - if (image.getWidth() > maxW || image.getHeight() > maxH) - { - im = newIm = image.createCopy (maxW, maxH); - - hotspotX = (hotspotX * maxW) / image.getWidth(); - hotspotY = (hotspotY * maxH) / image.getHeight(); - } - - void* cursorH = 0; - - const SystemStats::OperatingSystemType os = SystemStats::getOperatingSystemType(); - - if (os == SystemStats::WinXP) - { - cursorH = (void*) createHICONFromImage (*im, FALSE, hotspotX, hotspotY); - } - else - { - const int stride = (maxW + 7) >> 3; - uint8* const andPlane = (uint8*) juce_calloc (stride * maxH); - uint8* const xorPlane = (uint8*) juce_calloc (stride * maxH); - int index = 0; - - for (int y = 0; y < maxH; ++y) - { - for (int x = 0; x < maxW; ++x) - { - const unsigned char bit = (unsigned char) (1 << (7 - (x & 7))); - - const Colour pixelColour (im->getPixelAt (x, y)); - - if (pixelColour.getAlpha() < 127) - andPlane [index + (x >> 3)] |= bit; - else if (pixelColour.getBrightness() >= 0.5f) - xorPlane [index + (x >> 3)] |= bit; - } - - index += stride; - } - - cursorH = CreateCursor (0, hotspotX, hotspotY, maxW, maxH, andPlane, xorPlane); - - juce_free (andPlane); - juce_free (xorPlane); - } - - delete newIm; - return cursorH; -} - -void juce_deleteMouseCursor (void* const cursorHandle, const bool isStandard) throw() -{ - if (cursorHandle != 0 && ! isStandard) - DestroyCursor ((HCURSOR) cursorHandle); -} - -void* juce_createStandardMouseCursor (MouseCursor::StandardCursorType type) throw() -{ - LPCTSTR cursorName = IDC_ARROW; - - switch (type) - { - case MouseCursor::NormalCursor: - cursorName = IDC_ARROW; - break; - - case MouseCursor::NoCursor: - return 0; - - case MouseCursor::DraggingHandCursor: - { - static void* dragHandCursor = 0; - - if (dragHandCursor == 0) - { - static const unsigned char dragHandData[] = - { 71,73,70,56,57,97,16,0,16,0,145,2,0,0,0,0,255,255,255,0,0,0,0,0,0,33,249,4,1,0,0,2,0,44,0,0,0,0,16,0, - 16,0,0,2,52,148,47,0,200,185,16,130,90,12,74,139,107,84,123,39, 132,117,151,116,132,146,248,60,209,138, - 98,22,203,114,34,236,37,52,77,217,247,154,191,119,110,240,193,128,193,95,163,56,60,234,98,135,2,0,59 }; - - Image* const image = ImageFileFormat::loadFrom ((const char*) dragHandData, sizeof (dragHandData)); - dragHandCursor = juce_createMouseCursorFromImage (*image, 8, 7); - delete image; - } - - return dragHandCursor; - } - - case MouseCursor::WaitCursor: - cursorName = IDC_WAIT; - break; - - case MouseCursor::IBeamCursor: - cursorName = IDC_IBEAM; - break; - - case MouseCursor::PointingHandCursor: - cursorName = MAKEINTRESOURCE(32649); - break; - - case MouseCursor::LeftRightResizeCursor: - case MouseCursor::LeftEdgeResizeCursor: - case MouseCursor::RightEdgeResizeCursor: - cursorName = IDC_SIZEWE; - break; - - case MouseCursor::UpDownResizeCursor: - case MouseCursor::TopEdgeResizeCursor: - case MouseCursor::BottomEdgeResizeCursor: - cursorName = IDC_SIZENS; - break; - - case MouseCursor::TopLeftCornerResizeCursor: - case MouseCursor::BottomRightCornerResizeCursor: - cursorName = IDC_SIZENWSE; - break; - - case MouseCursor::TopRightCornerResizeCursor: - case MouseCursor::BottomLeftCornerResizeCursor: - cursorName = IDC_SIZENESW; - break; - - case MouseCursor::UpDownLeftRightResizeCursor: - cursorName = IDC_SIZEALL; - break; - - case MouseCursor::CrosshairCursor: - cursorName = IDC_CROSS; - break; - - case MouseCursor::CopyingCursor: - // can't seem to find one of these in the win32 list.. - break; - } - - HCURSOR cursorH = LoadCursor (0, cursorName); - - if (cursorH == 0) - cursorH = LoadCursor (0, IDC_ARROW); - - return (void*) cursorH; -} - -void MouseCursor::showInWindow (ComponentPeer*) const throw() -{ - SetCursor ((HCURSOR) getHandle()); -} - -void MouseCursor::showInAllWindows() const throw() -{ - showInWindow (0); -} - -class JuceDropSource : public IDropSource -{ - int refCount; - -public: - JuceDropSource() - : refCount (1) - { - } - - virtual ~JuceDropSource() - { - jassert (refCount == 0); - } - - HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) - { - if (id == IID_IUnknown || id == IID_IDropSource) - { - AddRef(); - *result = this; - return S_OK; - } - - *result = 0; - return E_NOINTERFACE; - } - - ULONG __stdcall AddRef() { return ++refCount; } - ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } - - HRESULT __stdcall QueryContinueDrag (BOOL escapePressed, DWORD keys) - { - if (escapePressed) - return DRAGDROP_S_CANCEL; - - if ((keys & (MK_LBUTTON | MK_RBUTTON)) == 0) - return DRAGDROP_S_DROP; - - return S_OK; - } - - HRESULT __stdcall GiveFeedback (DWORD) - { - return DRAGDROP_S_USEDEFAULTCURSORS; - } -}; - -class JuceEnumFormatEtc : public IEnumFORMATETC -{ -public: - JuceEnumFormatEtc (const FORMATETC* const format_) - : refCount (1), - format (format_), - index (0) - { - } - - virtual ~JuceEnumFormatEtc() - { - jassert (refCount == 0); - } - - HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) - { - if (id == IID_IUnknown || id == IID_IEnumFORMATETC) - { - AddRef(); - *result = this; - return S_OK; - } - - *result = 0; - return E_NOINTERFACE; - } - - ULONG __stdcall AddRef() { return ++refCount; } - ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } - - HRESULT __stdcall Clone (IEnumFORMATETC** result) - { - if (result == 0) - return E_POINTER; - - JuceEnumFormatEtc* const newOne = new JuceEnumFormatEtc (format); - newOne->index = index; - - *result = newOne; - return S_OK; - } - - HRESULT __stdcall Next (ULONG celt, LPFORMATETC lpFormatEtc, ULONG* pceltFetched) - { - if (pceltFetched != 0) - *pceltFetched = 0; - else if (celt != 1) - return S_FALSE; - - if (index == 0 && celt > 0 && lpFormatEtc != 0) - { - copyFormatEtc (lpFormatEtc [0], *format); - ++index; - - if (pceltFetched != 0) - *pceltFetched = 1; - - return S_OK; - } - - return S_FALSE; - } - - HRESULT __stdcall Skip (ULONG celt) - { - if (index + (int) celt >= 1) - return S_FALSE; - - index += celt; - return S_OK; - } - - HRESULT __stdcall Reset() - { - index = 0; - return S_OK; - } - -private: - int refCount; - const FORMATETC* const format; - int index; - - static void copyFormatEtc (FORMATETC& dest, const FORMATETC& source) - { - dest = source; - - if (source.ptd != 0) - { - dest.ptd = (DVTARGETDEVICE*) CoTaskMemAlloc (sizeof (DVTARGETDEVICE)); - *(dest.ptd) = *(source.ptd); - } - } - - JuceEnumFormatEtc (const JuceEnumFormatEtc&); - const JuceEnumFormatEtc& operator= (const JuceEnumFormatEtc&); -}; - -class JuceDataObject : public IDataObject -{ - JuceDropSource* const dropSource; - const FORMATETC* const format; - const STGMEDIUM* const medium; - int refCount; - - JuceDataObject (const JuceDataObject&); - const JuceDataObject& operator= (const JuceDataObject&); - -public: - JuceDataObject (JuceDropSource* const dropSource_, - const FORMATETC* const format_, - const STGMEDIUM* const medium_) - : dropSource (dropSource_), - format (format_), - medium (medium_), - refCount (1) - { - } - - virtual ~JuceDataObject() - { - jassert (refCount == 0); - } - - HRESULT __stdcall QueryInterface (REFIID id, void __RPC_FAR* __RPC_FAR* result) - { - if (id == IID_IUnknown || id == IID_IDataObject) - { - AddRef(); - *result = this; - return S_OK; - } - - *result = 0; - return E_NOINTERFACE; - } - - ULONG __stdcall AddRef() { return ++refCount; } - ULONG __stdcall Release() { jassert (refCount > 0); const int r = --refCount; if (r == 0) delete this; return r; } - - HRESULT __stdcall GetData (FORMATETC __RPC_FAR* pFormatEtc, STGMEDIUM __RPC_FAR* pMedium) - { - if (pFormatEtc->tymed == format->tymed - && pFormatEtc->cfFormat == format->cfFormat - && pFormatEtc->dwAspect == format->dwAspect) - { - pMedium->tymed = format->tymed; - pMedium->pUnkForRelease = 0; - - if (format->tymed == TYMED_HGLOBAL) - { - const SIZE_T len = GlobalSize (medium->hGlobal); - void* const src = GlobalLock (medium->hGlobal); - void* const dst = GlobalAlloc (GMEM_FIXED, len); - - memcpy (dst, src, len); - - GlobalUnlock (medium->hGlobal); - - pMedium->hGlobal = dst; - return S_OK; - } - } - - return DV_E_FORMATETC; - } - - HRESULT __stdcall QueryGetData (FORMATETC __RPC_FAR* f) - { - if (f == 0) - return E_INVALIDARG; - - if (f->tymed == format->tymed - && f->cfFormat == format->cfFormat - && f->dwAspect == format->dwAspect) - return S_OK; - - return DV_E_FORMATETC; - } - - HRESULT __stdcall GetCanonicalFormatEtc (FORMATETC __RPC_FAR*, FORMATETC __RPC_FAR* pFormatEtcOut) - { - pFormatEtcOut->ptd = 0; - return E_NOTIMPL; - } - - HRESULT __stdcall EnumFormatEtc (DWORD direction, IEnumFORMATETC __RPC_FAR *__RPC_FAR *result) - { - if (result == 0) - return E_POINTER; - - if (direction == DATADIR_GET) - { - *result = new JuceEnumFormatEtc (format); - return S_OK; - } - - *result = 0; - return E_NOTIMPL; - } - - HRESULT __stdcall GetDataHere (FORMATETC __RPC_FAR*, STGMEDIUM __RPC_FAR*) { return DATA_E_FORMATETC; } - HRESULT __stdcall SetData (FORMATETC __RPC_FAR*, STGMEDIUM __RPC_FAR*, BOOL) { return E_NOTIMPL; } - HRESULT __stdcall DAdvise (FORMATETC __RPC_FAR*, DWORD, IAdviseSink __RPC_FAR*, DWORD __RPC_FAR*) { return OLE_E_ADVISENOTSUPPORTED; } - HRESULT __stdcall DUnadvise (DWORD) { return E_NOTIMPL; } - HRESULT __stdcall EnumDAdvise (IEnumSTATDATA __RPC_FAR *__RPC_FAR *) { return OLE_E_ADVISENOTSUPPORTED; } -}; - -static HDROP createHDrop (const StringArray& fileNames) throw() -{ - int totalChars = 0; - for (int i = fileNames.size(); --i >= 0;) - totalChars += fileNames[i].length() + 1; - - HDROP hDrop = (HDROP) GlobalAlloc (GMEM_MOVEABLE | GMEM_ZEROINIT, - sizeof (DROPFILES) - + sizeof (WCHAR) * (totalChars + 2)); - - if (hDrop != 0) - { - LPDROPFILES pDropFiles = (LPDROPFILES) GlobalLock (hDrop); - pDropFiles->pFiles = sizeof (DROPFILES); - - pDropFiles->fWide = true; - - WCHAR* fname = (WCHAR*) (((char*) pDropFiles) + sizeof (DROPFILES)); - - for (int i = 0; i < fileNames.size(); ++i) - { - fileNames[i].copyToBuffer (fname, 2048); - fname += fileNames[i].length() + 1; - } - - *fname = 0; - - GlobalUnlock (hDrop); - } - - return hDrop; -} - -static bool performDragDrop (FORMATETC* const format, STGMEDIUM* const medium, const DWORD whatToDo) throw() -{ - JuceDropSource* const source = new JuceDropSource(); - JuceDataObject* const data = new JuceDataObject (source, format, medium); - - DWORD effect; - const HRESULT res = DoDragDrop (data, source, whatToDo, &effect); - - data->Release(); - source->Release(); - - return res == DRAGDROP_S_DROP; -} - -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMove) -{ - FORMATETC format = { CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; - STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; - - medium.hGlobal = createHDrop (files); - - return performDragDrop (&format, &medium, canMove ? (DROPEFFECT_COPY | DROPEFFECT_MOVE) - : DROPEFFECT_COPY); -} - -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) -{ - FORMATETC format = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; - STGMEDIUM medium = { TYMED_HGLOBAL, { 0 }, 0 }; - - const int numChars = text.length(); - - medium.hGlobal = GlobalAlloc (GMEM_MOVEABLE | GMEM_ZEROINIT, (numChars + 2) * sizeof (WCHAR)); - char* d = (char*) GlobalLock (medium.hGlobal); - - text.copyToBuffer ((WCHAR*) d, numChars + 1); - format.cfFormat = CF_UNICODETEXT; - - GlobalUnlock (medium.hGlobal); - - return performDragDrop (&format, &medium, DROPEFFECT_COPY | DROPEFFECT_MOVE); -} - -#if JUCE_OPENGL - -#define WGL_EXT_FUNCTION_INIT(extType, extFunc) \ - ((extFunc = (extType) wglGetProcAddress (#extFunc)) != 0) - -typedef const char* (WINAPI* PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); -typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); - -#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 -#define WGL_DRAW_TO_WINDOW_ARB 0x2001 -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_SWAP_METHOD_ARB 0x2007 -#define WGL_SUPPORT_OPENGL_ARB 0x2010 -#define WGL_PIXEL_TYPE_ARB 0x2013 -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_DEPTH_BITS_ARB 0x2022 -#define WGL_STENCIL_BITS_ARB 0x2023 -#define WGL_FULL_ACCELERATION_ARB 0x2027 -#define WGL_ACCUM_RED_BITS_ARB 0x201E -#define WGL_ACCUM_GREEN_BITS_ARB 0x201F -#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 -#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 -#define WGL_STEREO_ARB 0x2012 -#define WGL_SAMPLE_BUFFERS_ARB 0x2041 -#define WGL_SAMPLES_ARB 0x2042 -#define WGL_TYPE_RGBA_ARB 0x202B - -static void getWglExtensions (HDC dc, StringArray& result) throw() -{ - PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = 0; - - if (WGL_EXT_FUNCTION_INIT (PFNWGLGETEXTENSIONSSTRINGARBPROC, wglGetExtensionsStringARB)) - result.addTokens (String (wglGetExtensionsStringARB (dc)), false); - else - jassertfalse // If this fails, it may be because you didn't activate the openGL context -} - -class WindowedGLContext : public OpenGLContext -{ -public: - WindowedGLContext (Component* const component_, - HGLRC contextToShareWith, - const OpenGLPixelFormat& pixelFormat) - : renderContext (0), - nativeWindow (0), - dc (0), - component (component_) - { - jassert (component != 0); - - createNativeWindow(); - - // Use a default pixel format that should be supported everywhere - PIXELFORMATDESCRIPTOR pfd; - zerostruct (pfd); - pfd.nSize = sizeof (pfd); - pfd.nVersion = 1; - pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; - pfd.iPixelType = PFD_TYPE_RGBA; - pfd.cColorBits = 24; - pfd.cDepthBits = 16; - - const int format = ChoosePixelFormat (dc, &pfd); - - if (format != 0) - SetPixelFormat (dc, format, &pfd); - - renderContext = wglCreateContext (dc); - makeActive(); - - setPixelFormat (pixelFormat); - - if (contextToShareWith != 0 && renderContext != 0) - wglShareLists (contextToShareWith, renderContext); - } - - ~WindowedGLContext() - { - makeInactive(); - - wglDeleteContext (renderContext); - - ReleaseDC ((HWND) nativeWindow->getNativeHandle(), dc); - delete nativeWindow; - } - - bool makeActive() const throw() - { - jassert (renderContext != 0); - return wglMakeCurrent (dc, renderContext) != 0; - } - - bool makeInactive() const throw() - { - return (! isActive()) || (wglMakeCurrent (0, 0) != 0); - } - - bool isActive() const throw() - { - return wglGetCurrentContext() == renderContext; - } - - const OpenGLPixelFormat getPixelFormat() const - { - OpenGLPixelFormat pf; - - makeActive(); - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - fillInPixelFormatDetails (GetPixelFormat (dc), pf, availableExtensions); - return pf; - } - - void* getRawContext() const throw() - { - return renderContext; - } - - bool setPixelFormat (const OpenGLPixelFormat& pixelFormat) - { - makeActive(); - - PIXELFORMATDESCRIPTOR pfd; - zerostruct (pfd); - pfd.nSize = sizeof (pfd); - pfd.nVersion = 1; - pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER; - pfd.iPixelType = PFD_TYPE_RGBA; - pfd.iLayerType = PFD_MAIN_PLANE; - pfd.cColorBits = pixelFormat.redBits + pixelFormat.greenBits + pixelFormat.blueBits; - pfd.cRedBits = pixelFormat.redBits; - pfd.cGreenBits = pixelFormat.greenBits; - pfd.cBlueBits = pixelFormat.blueBits; - pfd.cAlphaBits = pixelFormat.alphaBits; - pfd.cDepthBits = pixelFormat.depthBufferBits; - pfd.cStencilBits = pixelFormat.stencilBufferBits; - pfd.cAccumBits = pixelFormat.accumulationBufferRedBits + pixelFormat.accumulationBufferGreenBits - + pixelFormat.accumulationBufferBlueBits + pixelFormat.accumulationBufferAlphaBits; - pfd.cAccumRedBits = pixelFormat.accumulationBufferRedBits; - pfd.cAccumGreenBits = pixelFormat.accumulationBufferGreenBits; - pfd.cAccumBlueBits = pixelFormat.accumulationBufferBlueBits; - pfd.cAccumAlphaBits = pixelFormat.accumulationBufferAlphaBits; - - int format = 0; - - PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = 0; - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - if (availableExtensions.contains ("WGL_ARB_pixel_format") - && WGL_EXT_FUNCTION_INIT (PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB)) - { - int attributes[64]; - int n = 0; - - attributes[n++] = WGL_DRAW_TO_WINDOW_ARB; - attributes[n++] = GL_TRUE; - attributes[n++] = WGL_SUPPORT_OPENGL_ARB; - attributes[n++] = GL_TRUE; - attributes[n++] = WGL_ACCELERATION_ARB; - attributes[n++] = WGL_FULL_ACCELERATION_ARB; - attributes[n++] = WGL_DOUBLE_BUFFER_ARB; - attributes[n++] = GL_TRUE; - attributes[n++] = WGL_PIXEL_TYPE_ARB; - attributes[n++] = WGL_TYPE_RGBA_ARB; - - attributes[n++] = WGL_COLOR_BITS_ARB; - attributes[n++] = pfd.cColorBits; - attributes[n++] = WGL_RED_BITS_ARB; - attributes[n++] = pixelFormat.redBits; - attributes[n++] = WGL_GREEN_BITS_ARB; - attributes[n++] = pixelFormat.greenBits; - attributes[n++] = WGL_BLUE_BITS_ARB; - attributes[n++] = pixelFormat.blueBits; - attributes[n++] = WGL_ALPHA_BITS_ARB; - attributes[n++] = pixelFormat.alphaBits; - attributes[n++] = WGL_DEPTH_BITS_ARB; - attributes[n++] = pixelFormat.depthBufferBits; - - if (pixelFormat.stencilBufferBits > 0) - { - attributes[n++] = WGL_STENCIL_BITS_ARB; - attributes[n++] = pixelFormat.stencilBufferBits; - } - - attributes[n++] = WGL_ACCUM_RED_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferRedBits; - attributes[n++] = WGL_ACCUM_GREEN_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferGreenBits; - attributes[n++] = WGL_ACCUM_BLUE_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferBlueBits; - attributes[n++] = WGL_ACCUM_ALPHA_BITS_ARB; - attributes[n++] = pixelFormat.accumulationBufferAlphaBits; - - if (availableExtensions.contains ("WGL_ARB_multisample") - && pixelFormat.fullSceneAntiAliasingNumSamples > 0) - { - attributes[n++] = WGL_SAMPLE_BUFFERS_ARB; - attributes[n++] = 1; - attributes[n++] = WGL_SAMPLES_ARB; - attributes[n++] = pixelFormat.fullSceneAntiAliasingNumSamples; - } - - attributes[n++] = 0; - - UINT formatsCount; - const BOOL ok = wglChoosePixelFormatARB (dc, attributes, 0, 1, &format, &formatsCount); - (void) ok; - jassert (ok); - } - else - { - format = ChoosePixelFormat (dc, &pfd); - } - - if (format != 0) - { - makeInactive(); - - // win32 can't change the pixel format of a window, so need to delete the - // old one and create a new one.. - jassert (nativeWindow != 0); - ReleaseDC ((HWND) nativeWindow->getNativeHandle(), dc); - delete nativeWindow; - - createNativeWindow(); - - if (SetPixelFormat (dc, format, &pfd)) - { - wglDeleteContext (renderContext); - renderContext = wglCreateContext (dc); - - jassert (renderContext != 0); - return renderContext != 0; - } - } - - return false; - } - - void updateWindowPosition (int x, int y, int w, int h, int) - { - SetWindowPos ((HWND) nativeWindow->getNativeHandle(), 0, - x, y, w, h, - SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); - } - - void repaint() - { - int x, y, w, h; - nativeWindow->getBounds (x, y, w, h); - nativeWindow->repaint (0, 0, w, h); - } - - void swapBuffers() - { - SwapBuffers (dc); - } - - bool setSwapInterval (const int numFramesPerSwap) - { - makeActive(); - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = 0; - - return availableExtensions.contains ("WGL_EXT_swap_control") - && WGL_EXT_FUNCTION_INIT (PFNWGLSWAPINTERVALEXTPROC, wglSwapIntervalEXT) - && wglSwapIntervalEXT (numFramesPerSwap) != FALSE; - } - - int getSwapInterval() const - { - makeActive(); - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = 0; - - if (availableExtensions.contains ("WGL_EXT_swap_control") - && WGL_EXT_FUNCTION_INIT (PFNWGLGETSWAPINTERVALEXTPROC, wglGetSwapIntervalEXT)) - return wglGetSwapIntervalEXT(); - - return 0; - } - - void findAlternativeOpenGLPixelFormats (OwnedArray & results) - { - jassert (isActive()); - - StringArray availableExtensions; - getWglExtensions (dc, availableExtensions); - - PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0; - int numTypes = 0; - - if (availableExtensions.contains("WGL_ARB_pixel_format") - && WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB)) - { - int attributes = WGL_NUMBER_PIXEL_FORMATS_ARB; - - if (! wglGetPixelFormatAttribivARB (dc, 1, 0, 1, &attributes, &numTypes)) - jassertfalse - } - else - { - numTypes = DescribePixelFormat (dc, 0, 0, 0); - } - - OpenGLPixelFormat pf; - - for (int i = 0; i < numTypes; ++i) - { - if (fillInPixelFormatDetails (i + 1, pf, availableExtensions)) - { - bool alreadyListed = false; - for (int j = results.size(); --j >= 0;) - if (pf == *results.getUnchecked(j)) - alreadyListed = true; - - if (! alreadyListed) - results.add (new OpenGLPixelFormat (pf)); - } - } - } - - juce_UseDebuggingNewOperator - - HGLRC renderContext; - -private: - Win32ComponentPeer* nativeWindow; - Component* const component; - HDC dc; - - void createNativeWindow() - { - nativeWindow = new Win32ComponentPeer (component, 0); - nativeWindow->dontRepaint = true; - nativeWindow->setVisible (true); - - HWND hwnd = (HWND) nativeWindow->getNativeHandle(); - - Win32ComponentPeer* const peer = dynamic_cast (component->getTopLevelComponent()->getPeer()); - - if (peer != 0) - { - SetParent (hwnd, (HWND) peer->getNativeHandle()); - juce_setWindowStyleBit (hwnd, GWL_STYLE, WS_CHILD, true); - juce_setWindowStyleBit (hwnd, GWL_STYLE, WS_POPUP, false); - } - - dc = GetDC (hwnd); - } - - bool fillInPixelFormatDetails (const int pixelFormatIndex, - OpenGLPixelFormat& result, - const StringArray& availableExtensions) const throw() - { - PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0; - - if (availableExtensions.contains ("WGL_ARB_pixel_format") - && WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB)) - { - int attributes[32]; - int numAttributes = 0; - - attributes[numAttributes++] = WGL_DRAW_TO_WINDOW_ARB; - attributes[numAttributes++] = WGL_SUPPORT_OPENGL_ARB; - attributes[numAttributes++] = WGL_ACCELERATION_ARB; - attributes[numAttributes++] = WGL_DOUBLE_BUFFER_ARB; - attributes[numAttributes++] = WGL_PIXEL_TYPE_ARB; - attributes[numAttributes++] = WGL_RED_BITS_ARB; - attributes[numAttributes++] = WGL_GREEN_BITS_ARB; - attributes[numAttributes++] = WGL_BLUE_BITS_ARB; - attributes[numAttributes++] = WGL_ALPHA_BITS_ARB; - attributes[numAttributes++] = WGL_DEPTH_BITS_ARB; - attributes[numAttributes++] = WGL_STENCIL_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_RED_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_GREEN_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_BLUE_BITS_ARB; - attributes[numAttributes++] = WGL_ACCUM_ALPHA_BITS_ARB; - - if (availableExtensions.contains ("WGL_ARB_multisample")) - attributes[numAttributes++] = WGL_SAMPLES_ARB; - - int values[32]; - zeromem (values, sizeof (values)); - - if (wglGetPixelFormatAttribivARB (dc, pixelFormatIndex, 0, numAttributes, attributes, values)) - { - int n = 0; - bool isValidFormat = (values[n++] == GL_TRUE); // WGL_DRAW_TO_WINDOW_ARB - isValidFormat = (values[n++] == GL_TRUE) && isValidFormat; // WGL_SUPPORT_OPENGL_ARB - isValidFormat = (values[n++] == WGL_FULL_ACCELERATION_ARB) && isValidFormat; // WGL_ACCELERATION_ARB - isValidFormat = (values[n++] == GL_TRUE) && isValidFormat; // WGL_DOUBLE_BUFFER_ARB: - isValidFormat = (values[n++] == WGL_TYPE_RGBA_ARB) && isValidFormat; // WGL_PIXEL_TYPE_ARB - result.redBits = values[n++]; // WGL_RED_BITS_ARB - result.greenBits = values[n++]; // WGL_GREEN_BITS_ARB - result.blueBits = values[n++]; // WGL_BLUE_BITS_ARB - result.alphaBits = values[n++]; // WGL_ALPHA_BITS_ARB - result.depthBufferBits = values[n++]; // WGL_DEPTH_BITS_ARB - result.stencilBufferBits = values[n++]; // WGL_STENCIL_BITS_ARB - result.accumulationBufferRedBits = values[n++]; // WGL_ACCUM_RED_BITS_ARB - result.accumulationBufferGreenBits = values[n++]; // WGL_ACCUM_GREEN_BITS_ARB - result.accumulationBufferBlueBits = values[n++]; // WGL_ACCUM_BLUE_BITS_ARB - result.accumulationBufferAlphaBits = values[n++]; // WGL_ACCUM_ALPHA_BITS_ARB - result.fullSceneAntiAliasingNumSamples = values[n++]; // WGL_SAMPLES_ARB - - return isValidFormat; - } - else - { - jassertfalse - } - } - else - { - PIXELFORMATDESCRIPTOR pfd; - - if (DescribePixelFormat (dc, pixelFormatIndex, sizeof (pfd), &pfd)) - { - result.redBits = pfd.cRedBits; - result.greenBits = pfd.cGreenBits; - result.blueBits = pfd.cBlueBits; - result.alphaBits = pfd.cAlphaBits; - result.depthBufferBits = pfd.cDepthBits; - result.stencilBufferBits = pfd.cStencilBits; - result.accumulationBufferRedBits = pfd.cAccumRedBits; - result.accumulationBufferGreenBits = pfd.cAccumGreenBits; - result.accumulationBufferBlueBits = pfd.cAccumBlueBits; - result.accumulationBufferAlphaBits = pfd.cAccumAlphaBits; - result.fullSceneAntiAliasingNumSamples = 0; - - return true; - } - else - { - jassertfalse - } - } - - return false; - } - - 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, - contextToShareWith != 0 ? (HGLRC) contextToShareWith->getRawContext() : 0, - pixelFormat); - - if (c->renderContext == 0) - deleteAndZero (c); - - return c; -} - -void juce_glViewport (const int w, const int h) -{ - glViewport (0, 0, w, h); -} - -void OpenGLPixelFormat::getAvailablePixelFormats (Component* component, - OwnedArray & results) -{ - Component tempComp; - - { - WindowedGLContext wc (component, 0, OpenGLPixelFormat (8, 8, 16, 0)); - wc.makeActive(); - wc.findAlternativeOpenGLPixelFormats (results); - } -} +/********* End of inlined file: juce_win32_AutoLinkLibraries.h *********/ #endif -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 (peer) != 0); - - if (dynamic_cast (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; -} - END_JUCE_NAMESPACE -/********* End of inlined file: juce_win32_Windowing.cpp *********/ - -#endif +/********* End of inlined file: juce_win32_NativeCode.cpp *********/ /********* Start of inlined file: juce_win32_AutoLinkLibraries.h *********/ // Auto-links to various win32 libs that are needed by library calls.. @@ -243824,6 +252705,202 @@ END_JUCE_NAMESPACE #include #include +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + /* Remove this macro if you're having problems compiling the cpu affinity calls (the API for these has changed about quite a bit in various Linux versions, and a lot of distros seem to ship with obsolete versions) @@ -244865,256 +253942,223 @@ END_JUCE_NAMESPACE BEGIN_JUCE_NAMESPACE -// we'll borrow the mac's socket-based http streaming code.. +int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littleEndian) throw() +{ + int numResults = 0; -/********* Start of inlined file: juce_mac_HTTPStream.h *********/ -// (This file gets included by the mac + linux networking code) + const int s = socket (AF_INET, SOCK_DGRAM, 0); + if (s != -1) + { + char buf [1024]; + struct ifconf ifc; + ifc.ifc_len = sizeof (buf); + ifc.ifc_buf = buf; + ioctl (s, SIOCGIFCONF, &ifc); + + for (unsigned int i = 0; i < ifc.ifc_len / sizeof (struct ifreq); ++i) + { + struct ifreq ifr; + strcpy (ifr.ifr_name, ifc.ifc_req[i].ifr_name); + + if (ioctl (s, SIOCGIFFLAGS, &ifr) == 0 + && (ifr.ifr_flags & IFF_LOOPBACK) == 0 + && ioctl (s, SIOCGIFHWADDR, &ifr) == 0 + && numResults < maxNum) + { + int64 a = 0; + for (int j = 6; --j >= 0;) + a = (a << 8) | (uint8) ifr.ifr_hwaddr.sa_data[j]; + + *addresses++ = a; + ++numResults; + } + } + + close (s); + } + + return numResults; +} + +bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAddress, + const String& emailSubject, + const String& bodyText, + const StringArray& filesToAttach) +{ + jassertfalse // xxx todo + + return false; +} /** A HTTP input stream that uses sockets. -*/ + */ class JUCE_HTTPSocketStream -{ -public: + { + public: - JUCE_HTTPSocketStream() + 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://"))) + socketHandle (-1), + levelsOfRedirection (0), + timeoutSeconds (15) { - if (! decomposeURL (proxyURL, proxyName, proxyPath, proxyPort)) + } + + ~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; - host = gethostbyname ((const char*) proxyName.toUTF8()); - port = proxyPort; - } - else - { - host = gethostbyname ((const char*) hostName.toUTF8()); - port = hostPort; - } + const struct hostent* host = 0; + int port = 0; - if (host == 0) - return false; + String proxyName, proxyPath; + int proxyPort = 0; - 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); + String proxyURL (getenv ("http_proxy")); + if (proxyURL.startsWithIgnoreCase (T("http://"))) + { + if (! decomposeURL (proxyURL, proxyName, proxyPath, proxyPort)) + return false; - socketHandle = socket (host->h_addrtype, SOCK_STREAM, 0); + host = gethostbyname ((const char*) proxyName.toUTF8()); + port = proxyPort; + } + else + { + host = gethostbyname ((const char*) hostName.toUTF8()); + port = hostPort; + } - if (socketHandle == -1) - return false; + if (host == 0) + return false; - int receiveBufferSize = 16384; - setsockopt (socketHandle, SOL_SOCKET, SO_RCVBUF, (char*) &receiveBufferSize, sizeof (receiveBufferSize)); - setsockopt (socketHandle, SOL_SOCKET, SO_KEEPALIVE, 0, 0); + 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); + setsockopt (socketHandle, SOL_SOCKET, SO_NOSIGPIPE, 0, 0); #endif - if (connect (socketHandle, (struct sockaddr*) &address, sizeof (address)) == -1) - { + 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; } - 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) + int read (void* buffer, int bytesToRead) { fd_set readbits; FD_ZERO (&readbits); @@ -245125,78 +254169,154 @@ private: tv.tv_usec = 0; if (select (socketHandle + 1, &readbits, 0, 0, &tv) <= 0) - return String::empty; // (timeout) + return 0; // (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 int bytesRead = jmax (0, recv (socketHandle, buffer, bytesToRead, MSG_WAITALL)); + readPosition += bytesRead; + return bytesRead; } - const String header (String::fromUTF8 ((const uint8*) buffer.getData())); + int readPosition; - if (header.startsWithIgnoreCase (T("HTTP/"))) - return header.trimEnd(); + juce_UseDebuggingNewOperator - return String::empty; - } + private: + int socketHandle, levelsOfRedirection; + const int timeoutSeconds; - 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) + void closeSocket() { - host = url.substring (7, nextColon); + 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) - port = url.substring (nextColon + 1, nextSlash).getIntValue(); + path = url.substring (nextSlash); else - port = url.substring (nextColon + 1).getIntValue(); + path = T("/"); + + return true; } - else + + static const String findHeaderItem (const StringArray& lines, const String& itemName) { - port = 80; + for (int i = 0; i < lines.size(); ++i) + if (lines[i].startsWithIgnoreCase (itemName)) + return lines[i].substring (itemName.length()).trim(); - if (nextSlash >= 0) - host = url.substring (7, nextSlash); - else - host = url.substring (7); + return String::empty; } - - 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() { @@ -245248,55 +254368,6 @@ int juce_seekInInternetFile (void* handle, int newPosition) return 0; } -/********* End of inlined file: juce_mac_HTTPStream.h *********/ - -int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littleEndian) throw() -{ - int numResults = 0; - - const int s = socket (AF_INET, SOCK_DGRAM, 0); - if (s != -1) - { - char buf [1024]; - struct ifconf ifc; - ifc.ifc_len = sizeof (buf); - ifc.ifc_buf = buf; - ioctl (s, SIOCGIFCONF, &ifc); - - for (unsigned int i = 0; i < ifc.ifc_len / sizeof (struct ifreq); ++i) - { - struct ifreq ifr; - strcpy (ifr.ifr_name, ifc.ifc_req[i].ifr_name); - - if (ioctl (s, SIOCGIFFLAGS, &ifr) == 0 - && (ifr.ifr_flags & IFF_LOOPBACK) == 0 - && ioctl (s, SIOCGIFHWADDR, &ifr) == 0 - && numResults < maxNum) - { - int64 a = 0; - for (int j = 6; --j >= 0;) - a = (a << 8) | (uint8) ifr.ifr_hwaddr.sa_data[j]; - - *addresses++ = a; - ++numResults; - } - } - - close (s); - } - - return numResults; -} - -bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAddress, - const String& emailSubject, - const String& bodyText, - const StringArray& filesToAttach) -{ - jassertfalse // xxx todo - - return false; -} END_JUCE_NAMESPACE /********* End of inlined file: juce_linux_Network.cpp *********/ @@ -245589,9 +254660,9 @@ void juce_setCurrentThreadName (const String& /*name*/) throw() { } -int Thread::getCurrentThreadId() throw() +int64 Thread::getCurrentThreadId() throw() { - return (int) pthread_self(); + return pthread_self(); } /* @@ -245752,17 +254823,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); } @@ -245775,6 +254846,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_linux_Audio.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_BUILD_GUI_CLASSES #if JUCE_ALSA @@ -246830,6 +256097,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_linux_FileChooser.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_BUILD_GUI_CLASSES BEGIN_JUCE_NAMESPACE @@ -246855,6 +256318,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_linux_Fonts.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_BUILD_GUI_CLASSES /* Got a build error here? You'll need to install the freetype library... @@ -247452,6 +257111,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_linux_Messaging.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_BUILD_GUI_CLASSES #include @@ -247839,6 +257694,202 @@ END_JUCE_NAMESPACE /********* Start of inlined file: juce_linux_Midi.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_BUILD_GUI_CLASSES #if JUCE_ALSA @@ -248279,6 +258330,8 @@ END_JUCE_NAMESPACE BEGIN_JUCE_NAMESPACE +#if JUCE_WEB_BROWSER + /* Sorry.. This class isn't implemented on Linux! */ @@ -248352,10 +258405,6 @@ void WebBrowserComponent::parentHierarchyChanged() checkWindowAssociation(); } -void WebBrowserComponent::moved() -{ -} - void WebBrowserComponent::resized() { } @@ -248370,11 +258419,208 @@ bool WebBrowserComponent::pageAboutToLoad (const String& url) return true; } +#endif END_JUCE_NAMESPACE /********* End of inlined file: juce_linux_WebBrowserComponent.cpp *********/ /********* Start of inlined file: juce_linux_Windowing.cpp *********/ +/********* Start of inlined file: juce_Config.h *********/ +#ifndef __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) + +/* + This file contains macros that enable/disable various JUCE features. +*/ + +/** The name of the namespace that all Juce classes and functions will be + put inside. If this is not defined, no namespace will be used. +*/ +#ifndef JUCE_NAMESPACE + #define JUCE_NAMESPACE juce +#endif + +/** Normally, JUCE_DEBUG is set to 1 or 0 based on compiler and project settings, + but if you define this value, you can override this can force it to be true or + false. +*/ +#ifndef JUCE_FORCE_DEBUG + //#define JUCE_FORCE_DEBUG 1 +#endif + +/** If this flag is enabled, the the jassert and jassertfalse macros will + always use Logger::writeToLog() to write a message when an assertion happens. + + Enabling it will also leave this turned on in release builds. When it's disabled, + however, the jassert and jassertfalse macros will not be compiled in a + release build. + + @see jassert, jassertfalse, Logger +*/ +#ifndef JUCE_LOG_ASSERTIONS +// #define JUCE_LOG_ASSERTIONS 1 +#endif + +/** Comment out this macro if you haven't got the Steinberg ASIO SDK, without + which the ASIOAudioIODevice class can't be built. See the comments in the + ASIOAudioIODevice class's header file for more info about this. + + (This only affects a Win32 build) +*/ +#ifndef JUCE_ASIO + #define JUCE_ASIO 1 +#endif + +/** Comment out this macro to disable building of ALSA device support on Linux. +*/ +#ifndef JUCE_ALSA + #define JUCE_ALSA 1 +#endif + +/** Comment out this macro if you don't want to enable QuickTime or if you don't + have the SDK installed. + + If this flag is not enabled, the QuickTimeMovieComponent and QuickTimeAudioFormat + classes will be unavailable. + + On Windows, if you enable this, you'll need to have the QuickTime SDK + installed, and its header files will need to be on your include path. +*/ +#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER))) + #define JUCE_QUICKTIME 1 +#endif + +/** Comment out this macro if you don't want to enable OpenGL or if you don't + have the appropriate headers and libraries available. If it's not enabled, the + OpenGLComponent class will be unavailable. +*/ +#ifndef JUCE_OPENGL + #define JUCE_OPENGL 1 +#endif + +/** These flags enable the Ogg-Vorbis and Flac audio formats. + + If you're not going to need either of these formats, turn off the flags to + avoid bloating your codebase with them. +*/ +#ifndef JUCE_USE_FLAC + #define JUCE_USE_FLAC 1 +#endif + +#ifndef JUCE_USE_OGGVORBIS + #define JUCE_USE_OGGVORBIS 1 +#endif + +/** This flag lets you enable support for CD-burning. You might want to disable + it to build without the MS SDK under windows. +*/ +#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER)) + #define JUCE_USE_CDBURNER 1 +#endif + +/** Enabling this macro means that all regions that get repainted will have a coloured + line drawn around them. + + This is handy if you're trying to optimise drawing, because it lets you easily see + when anything is being repainted unnecessarily. +*/ +#ifndef JUCE_ENABLE_REPAINT_DEBUGGING +// #define JUCE_ENABLE_REPAINT_DEBUGGING 1 +#endif + +/** Enable this under Linux to use Xinerama for multi-monitor support. +*/ +#ifndef JUCE_USE_XINERAMA + #define JUCE_USE_XINERAMA 1 +#endif + +/** Enable this under Linux to use XShm for faster shared-memory rendering. +*/ +#ifndef JUCE_USE_XSHM + #define JUCE_USE_XSHM 1 +#endif + +/** Enabling this builds support for VST audio plugins. + @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU +*/ +#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 +*/ +#ifndef JUCE_PLUGINHOST_AU +// #define JUCE_PLUGINHOST_AU 1 +#endif + +/** Disabling this will avoid linking to any UI code. This is handy for + writing command-line utilities, e.g. on linux boxes which don't have some + of the UI libraries installed. + + (On mac and windows, this won't generally make much difference to the build). +*/ +#ifndef JUCE_BUILD_GUI_CLASSES + #define JUCE_BUILD_GUI_CLASSES 1 +#endif + +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + +/** Enable this to add extra memory-leak info to the new and delete operators. + + (Currently, this only affects Windows builds in debug mode). +*/ +#ifndef JUCE_CHECK_MEMORY_LEAKS + #define JUCE_CHECK_MEMORY_LEAKS 1 +#endif + +/** Enable this to turn on juce's internal catching of exceptions. + + Turning it off will avoid any exception catching. With it on, all exceptions + are passed to the JUCEApplication::unhandledException() callback for logging. +*/ +#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS + #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1 +#endif + +/** If this macro is set, the Juce String class will use unicode as its + internal representation. If it isn't set, it'll use ANSI. +*/ +#ifndef JUCE_STRINGS_ARE_UNICODE + #define JUCE_STRINGS_ARE_UNICODE 1 +#endif + +#endif +/********* End of inlined file: juce_Config.h *********/ + #if JUCE_BUILD_GUI_CLASSES #include @@ -248763,6 +259009,59 @@ static bool isShmAvailable() throw() } #endif +static Pixmap juce_createColourPixmapFromImage (Display* display, const Image& image) +{ + const int width = image.getWidth(); + const int height = image.getHeight(); + uint32* const colour = (uint32*) juce_malloc (width * height * sizeof (uint32)); + int index = 0; + + for (int y = 0; y < height; ++y) + for (int x = 0; x < width; ++x) + colour[index++] = image.getPixelAt (x, y).getARGB(); + + XImage* ximage = XCreateImage (display, CopyFromParent, 24, ZPixmap, + 0, (char*) colour, width, height, 32, 0); + + Pixmap pixmap = XCreatePixmap (display, DefaultRootWindow (display), + width, height, 24); + + GC gc = XCreateGC (display, pixmap, 0, 0); + XPutImage (display, pixmap, gc, ximage, 0, 0, 0, 0, width, height); + XFreeGC (display, gc); + juce_free (colour); + + return pixmap; +} + +static Pixmap juce_createMaskPixmapFromImage (Display* display, const Image& image) +{ + const int width = image.getWidth(); + const int height = image.getHeight(); + const int stride = (width + 7) >> 3; + uint8* const mask = (uint8*) juce_calloc (stride * height); + const bool msbfirst = (BitmapBitOrder (display) == MSBFirst); + + for (int y = 0; y < height; ++y) + { + for (int x = 0; x < width; ++x) + { + const uint8 bit = (uint8) (1 << (msbfirst ? (7 - (x & 7)) : (x & 7))); + const int offset = y * stride + (x >> 3); + + if (image.getPixelAt (x, y).getAlpha() >= 128) + mask[offset] |= bit; + } + } + + Pixmap pixmap = XCreatePixmapFromBitmapData (display, DefaultRootWindow (display), + (char*) mask, width, height, 1, 0, 1); + + juce_free (mask); + + return pixmap; +} + class XBitmapImage : public Image { public: @@ -249005,6 +259304,7 @@ public: checkMessageManagerIsLocked deleteTaskBarIcon(); + deleteIconPixmaps(); destroyWindow(); @@ -249406,7 +259706,7 @@ public: void setIcon (const Image& newIcon) { const int dataSize = newIcon.getWidth() * newIcon.getHeight() + 2; - uint32* const data = (uint32*) juce_malloc (dataSize); + uint32* const data = (uint32*) juce_malloc (dataSize * sizeof (uint32)); int index = 0; data[index++] = newIcon.getWidth(); @@ -249421,9 +259721,46 @@ public: XA_CARDINAL, 32, PropModeReplace, (unsigned char*) data, dataSize); - XSync (display, False); - juce_free (data); + + deleteIconPixmaps(); + + XWMHints* wmHints = XGetWMHints (display, windowH); + + if (wmHints == 0) + wmHints = XAllocWMHints(); + + wmHints->flags |= IconPixmapHint | IconMaskHint; + wmHints->icon_pixmap = juce_createColourPixmapFromImage (display, newIcon); + wmHints->icon_mask = juce_createMaskPixmapFromImage (display, newIcon); + + XSetWMHints (display, windowH, wmHints); + XFree (wmHints); + + XSync (display, False); + } + + void deleteIconPixmaps() + { + XWMHints* wmHints = XGetWMHints (display, windowH); + + if (wmHints != 0) + { + if ((wmHints->flags & IconPixmapHint) != 0) + { + wmHints->flags &= ~IconPixmapHint; + XFreePixmap (display, wmHints->icon_pixmap); + } + + if ((wmHints->flags & IconMaskHint) != 0) + { + wmHints->flags &= ~IconMaskHint; + XFreePixmap (display, wmHints->icon_mask); + } + + XSetWMHints (display, windowH, wmHints); + XFree (wmHints); + } } void handleWindowMessage (XEvent* event) @@ -249965,6 +260302,14 @@ public: // For more recent KDE's... 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 + XSizeHints* hints = XAllocSizeHints(); + hints->flags = PMinSize; + hints->min_width = 22; + hints->min_height = 22; + XSetWMNormalHints (display, windowH, hints); + XFree (hints); } void deleteTaskBarIcon() @@ -250963,7 +261308,7 @@ void* juce_createMouseCursorFromImage (const Image& image, int hotspotX, int hot uint8* const maskPlane = (uint8*) juce_calloc (stride * cursorH); uint8* const sourcePlane = (uint8*) juce_calloc (stride * cursorH); - bool msbfirst = (BitmapBitOrder (display) == MSBFirst); + const bool msbfirst = (BitmapBitOrder (display) == MSBFirst); for (int y = cursorH; --y >= 0;) { @@ -251439,7 +261784,11 @@ void SystemTrayIconComponent::paint (Graphics& g) const Image* const image = wp->getTaskbarIcon(); if (image != 0) - g.drawImageAt (image, 0, 0, false); + { + g.drawImageWithin (image, 0, 0, getWidth(), getHeight(), + RectanglePlacement::xLeft | RectanglePlacement::yTop | RectanglePlacement::onlyReduceInSize, + false); + } } } @@ -251536,26 +261885,960 @@ END_JUCE_NAMESPACE //============================================================================== #if JUCE_MAC -/********* Start of inlined file: juce_mac_Files.cpp *********/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +/********* Start of inlined file: juce_mac_NativeCode.mm *********/ +/* + 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. +*/ BEGIN_JUCE_NAMESPACE +#undef Point + +#define JUCE_INCLUDED_FILE 1 + +// Now include the actual code files.. + +/********* Start of inlined file: juce_mac_Strings.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +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 ((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 +/********* End of inlined file: juce_mac_Strings.mm *********/ + +/********* Start of inlined file: juce_mac_SystemStats.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +static int64 highResTimerFrequency; + +#if JUCE_INTEL + +static void juce_getCpuVendor (char* const v) throw() +{ + int vendor[4]; + zerostruct (vendor); + int dummy = 0; + + asm ("mov %%ebx, %%esi \n\t" + "cpuid \n\t" + "xchg %%esi, %%ebx" + : "=a" (dummy), "=S" (vendor[0]), "=c" (vendor[2]), "=d" (vendor[1]) : "a" (0)); + + memcpy (v, vendor, 16); +} + +static unsigned int getCPUIDWord (unsigned int& familyModel, unsigned int& extFeatures) throw() +{ + unsigned int cpu = 0; + unsigned int ext = 0; + unsigned int family = 0; + unsigned int dummy = 0; + + asm ("mov %%ebx, %%esi \n\t" + "cpuid \n\t" + "xchg %%esi, %%ebx" + : "=a" (family), "=S" (ext), "=c" (dummy), "=d" (cpu) : "a" (1)); + + familyModel = family; + extFeatures = ext; + return cpu; +} + +struct CPUFlags +{ + bool hasMMX : 1; + bool hasSSE : 1; + bool hasSSE2 : 1; + bool has3DNow : 1; +}; + +static CPUFlags cpuFlags; + +#endif + +void SystemStats::initialiseStats() throw() +{ + static bool initialised = false; + + 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); + } +} + +static const String getCpuInfo (const char* key, bool lastOne = false) throw() +{ + String info; + char buf [256]; + + 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; +} + +SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() throw() +{ + return MacOSX; +} + +const String SystemStats::getOperatingSystemName() throw() +{ + return T("Mac OS X"); +} + +bool SystemStats::isOperatingSystem64Bit() throw() +{ +#if JUCE_64BIT + return true; +#else + //xxx not sure how to find this out?.. + return false; +#endif +} + +int SystemStats::getMemorySizeInMegabytes() throw() +{ +#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 +} + +bool SystemStats::hasMMX() throw() +{ +#if JUCE_INTEL + return cpuFlags.hasMMX; +#else + return false; +#endif +} + +bool SystemStats::hasSSE() throw() +{ +#if JUCE_INTEL + return cpuFlags.hasSSE; +#else + return false; +#endif +} + +bool SystemStats::hasSSE2() throw() +{ +#if JUCE_INTEL + return cpuFlags.hasSSE2; +#else + return false; +#endif +} + +bool SystemStats::has3DNow() throw() +{ +#if JUCE_INTEL + return cpuFlags.has3DNow; +#else + return false; +#endif +} + +const String SystemStats::getCpuVendor() throw() +{ +#if JUCE_INTEL + char v [16]; + juce_getCpuVendor (v); + return String (v, 16); +#else + return String::empty; +#endif +} + +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 +} + +static int64 juce_getMicroseconds() throw() +{ + UnsignedWide t; + Microseconds (&t); + return (((int64) t.hi) << 32) | t.lo; +} + +uint32 juce_millisecondsSinceStartup() throw() +{ + return (uint32) (juce_getMicroseconds() / 1000); +} + +double Time::getMillisecondCounterHiRes() throw() +{ + // xxx might be more accurate to use a scaled AudioGetCurrentHostTime? + return juce_getMicroseconds() * 0.001; +} + +int64 Time::getHighResolutionTicks() throw() +{ + return (int64) AudioGetCurrentHostTime(); +} + +int64 Time::getHighResolutionTicksPerSecond() throw() +{ + return highResTimerFrequency; +} + +int64 SystemStats::getClockCycleCounter() throw() +{ + jassertfalse + return 0; +} + +bool Time::setSystemTimeToThisTime() const throw() +{ + jassertfalse + return false; +} + +int SystemStats::getPageSize() throw() +{ + return NSPageSize(); +} + +void PlatformUtilities::fpuReset() +{ +} + +#endif +/********* End of inlined file: juce_mac_SystemStats.mm *********/ + +/********* Start of inlined file: juce_mac_Network.mm *********/ +// (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 +/********* End of inlined file: juce_mac_Network.mm *********/ + +/********* Start of inlined file: juce_mac_Threads.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + /* 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, ¶m); + param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11); + pthread_setschedparam ((pthread_t) handle, policy, ¶m); +} + +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 +/********* End of inlined file: juce_mac_Threads.mm *********/ + /********* Start of inlined file: juce_posix_SharedCode.h *********/ /* This file contains posix routines that are common to both the Linux and Mac builds. @@ -251968,140 +263251,18 @@ void InterProcessLock::exit() throw() } /********* End of inlined file: juce_posix_SharedCode.h *********/ +/********* Start of inlined file: juce_mac_Files.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +/* + 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; -void PlatformUtilities::copyToStr255 (Str255& d, const String& s) -{ - unsigned char* t = (unsigned char*) d; - t[0] = jmin (254, s.length()); - s.copyToBuffer ((char*) t + 1, 254); -} - -void PlatformUtilities::copyToStr63 (Str63& d, const String& s) -{ - unsigned char* t = (unsigned char*) d; - t[0] = jmin (62, s.length()); - s.copyToBuffer ((char*) t + 1, 62); -} - -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::convertUTF16ToString (const UniChar* utf16) -{ - String s; - - while (*utf16 != 0) - s += (juce_wchar) *utf16++; - - return s; -} - -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 ((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; -} - const unsigned int macTimeToUnixTimeDiff = 0x7c25be90; static uint64 utcDateTimeToUnixTime (const UTCDateTime& d) throw() @@ -252216,80 +263377,13 @@ bool juce_setFileReadOnly (const String& fileName, bool isReadOnly) throw() bool juce_copyFile (const String& src, const String& dst) throw() { - const File destFile (dst); + const ScopedAutoReleasePool pool; + NSFileManager* fm = [NSFileManager defaultManager]; - if (! destFile.create()) - return false; - - FSRef srcRef, dstRef; - - if (! (PlatformUtilities::makeFSRefFromPath (&srcRef, src) - && PlatformUtilities::makeFSRefFromPath (&dstRef, dst))) - { - return false; - } - - int okForks = 0; - - CatPositionRec iter; - iter.initialize = 0; - HFSUniStr255 forkName; - - // can't just copy the data because this is a bloody Mac, so we need to copy each - // fork separately... - while (FSIterateForks (&srcRef, &iter, &forkName, 0, 0) == noErr) - { - SInt16 srcForkNum = 0, dstForkNum = 0; - OSErr err = FSOpenFork (&srcRef, forkName.length, forkName.unicode, fsRdPerm, &srcForkNum); - - if (err == noErr) - { - err = FSOpenFork (&dstRef, forkName.length, forkName.unicode, fsRdWrPerm, &dstForkNum); - - if (err == noErr) - { - MemoryBlock buf (32768); - SInt64 pos = 0; - - for (;;) - { - ByteCount bytesRead = 0; - err = FSReadFork (srcForkNum, fsFromStart, pos, buf.getSize(), (char*) buf, &bytesRead); - - if (bytesRead > 0) - { - err = FSWriteFork (dstForkNum, fsFromStart, pos, bytesRead, (const char*) buf, &bytesRead); - pos += bytesRead; - } - - if (err != noErr) - { - if (err == eofErr) - ++okForks; - - break; - } - } - - FSFlushFork (dstForkNum); - FSCloseFork (dstForkNum); - } - - FSCloseFork (srcForkNum); - } - } - - if (okForks > 0) // some files seem to be ok even if not all their forks get copied.. - { - // copy permissions.. - struct stat info; - if (juce_stat (src, info)) - chmod (dst.toUTF8(), info.st_mode & 0777); - - return true; - } - - return false; + return [fm fileExistsAtPath: juceStringToNS (src)] + && [fm copyPath: juceStringToNS (src) + toPath: juceStringToNS (dst) + handler: nil]; } const StringArray juce_getFileSystemRoots() throw() @@ -252362,15 +263456,7 @@ const File File::getSpecialLocation (const SpecialLocationType type) switch (type) { case userHomeDirectory: - resultPath = getenv ("HOME"); - - if (resultPath == 0) - { - struct passwd* const pw = getpwuid (getuid()); - if (pw != 0) - resultPath = pw->pw_dir; - } - + resultPath = nsStringToJuce (NSHomeDirectory()); break; case userDocumentsDirectory: @@ -252440,26 +263526,12 @@ void juce_setCurrentExecutableFileName (const String& filename) throw() void juce_setCurrentExecutableFileNameFromBundleId (const String& bundleId) throw() { - CFStringRef bundleIdStringRef = PlatformUtilities::juceStringToCFString (bundleId); - CFBundleRef bundleRef = CFBundleGetBundleWithIdentifier (bundleIdStringRef); - CFRelease (bundleIdStringRef); + const ScopedAutoReleasePool pool; - if (bundleRef != 0) - { - CFURLRef exeURLRef = CFBundleCopyExecutableURL (bundleRef); + NSBundle* b = [NSBundle bundleWithIdentifier: juceStringToNS (bundleId)]; - if (exeURLRef != 0) - { - CFStringRef pathStringRef = CFURLCopyFileSystemPath (exeURLRef, kCFURLPOSIXPathStyle); - CFRelease (exeURLRef); - - if (pathStringRef != 0) - { - juce_setCurrentExecutableFileName (PlatformUtilities::cfStringToJuceString (pathStringRef)); - CFRelease (pathStringRef); - } - } - } + if (b != nil) + executableFile = nsStringToJuce ([b executablePath]); } const File File::getCurrentWorkingDirectory() throw() @@ -252617,77 +263689,40 @@ bool juce_launchExecutable (const String& pathAndArguments) throw() 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; - if (fileName.startsWithIgnoreCase (T("http:")) - || fileName.startsWithIgnoreCase (T("https:")) - || fileName.startsWithIgnoreCase (T("ftp:")) - || fileName.startsWithIgnoreCase (T("file:"))) + FSRef ref; + if (PlatformUtilities::makeFSRefFromPath (&ref, fileName)) { - CFStringRef urlString = PlatformUtilities::juceStringToCFString (fileName); - - if (urlString != 0) + if (PlatformUtilities::isBundle (fileName)) { - CFURLRef url = CFURLCreateWithString (kCFAllocatorDefault, - urlString, 0); - CFRelease (urlString); + NSMutableArray* urls = [NSMutableArray array]; - if (url != 0) - { - ok = (LSOpenCFURLRef (url, 0) == noErr); - CFRelease (url); - } + 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 - { - FSRef ref; - if (PlatformUtilities::makeFSRefFromPath (&ref, fileName)) + else { - if (juce_isDirectory (fileName) && parameters.isNotEmpty()) - { - // if we're launching a bundled app with a document.. - StringArray docs; - docs.addTokens (parameters, true); - FSRef* docRefs = new FSRef [docs.size()]; - - for (int i = 0; i < docs.size(); ++i) - PlatformUtilities::makeFSRefFromPath (docRefs + i, docs[i]); - - LSLaunchFSRefSpec ors; - ors.appRef = &ref; - ors.numDocs = docs.size(); - ors.itemRefs = docRefs; - ors.passThruParams = 0; - ors.launchFlags = kLSLaunchDefaults; - ors.asyncRefCon = 0; - - FSRef actual; - ok = (LSOpenFromRefSpec (&ors, &actual) == noErr); - - delete docRefs; - } - else - { - if (parameters.isNotEmpty()) - ok = juce_launchExecutable (T("\"") + fileName + T("\" ") + parameters); - else - ok = (LSOpenFSRef (&ref, 0) == noErr); - } + ok = juce_launchExecutable (T("\"") + fileName + T("\" ") + parameters); } } return ok; } -bool PlatformUtilities::makeFSSpecFromPath (FSSpec* fs, const String& path) -{ - FSRef ref; - - return makeFSRefFromPath (&ref, path) - && FSGetCatalogInfo (&ref, kFSCatInfoNone, 0, 0, fs, 0) == noErr; -} - bool PlatformUtilities::makeFSRefFromPath (FSRef* destFSRef, const String& path) { return FSPathMakeRef ((const UInt8*) path.toUTF8(), destFSRef, 0) == noErr; @@ -252708,329 +263743,230 @@ const String PlatformUtilities::makePathFromFSRef (FSRef* file) OSType PlatformUtilities::getTypeOfFile (const String& filename) { - FSRef fs; - if (makeFSRefFromPath (&fs, filename)) - { - LSItemInfoRecord info; - - if (LSCopyItemInfoForRef (&fs, kLSRequestTypeCreator, &info) == noErr) - return info.filetype; - } - - return 0; + const ScopedAutoReleasePool pool; + return NSHFSTypeCodeFromFileType (NSHFSTypeOfFile (juceStringToNS (filename))); } bool PlatformUtilities::isBundle (const String& filename) { - FSRef fs; - if (makeFSRefFromPath (&fs, filename)) - { - LSItemInfoRecord info; - - if (LSCopyItemInfoForRef (&fs, kLSItemInfoIsPackage, &info) == noErr) - return (info.flags & kLSItemInfoIsPackage) != 0; - } - - return false; + const ScopedAutoReleasePool pool; + return [[NSWorkspace sharedWorkspace] isFilePackageAtPath: juceStringToNS (filename)]; } -END_JUCE_NAMESPACE -/********* End of inlined file: juce_mac_Files.cpp *********/ - -/********* Start of inlined file: juce_mac_NamedPipe.cpp *********/ - -#include -#include -#include - -// As well as being for the mac, this file is included by the linux build. - -#if ! JUCE_MAC - #include - #include - #include #endif +/********* End of inlined file: juce_mac_Files.mm *********/ -BEGIN_JUCE_NAMESPACE +/********* Start of inlined file: juce_mac_MiscUtilities.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE -struct NamedPipeInternal +ScopedAutoReleasePool::ScopedAutoReleasePool() { - 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; - } + pool = [[NSAutoreleasePool alloc] init]; } -void NamedPipe::close() +ScopedAutoReleasePool::~ScopedAutoReleasePool() { - 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; - } + [((NSAutoreleasePool*) pool) release]; } -bool NamedPipe::openInternal (const String& pipeName, const bool createPipe) +void PlatformUtilities::beep() { - close(); + NSBeep(); +} - NamedPipeInternal* const intern = new NamedPipeInternal(); - internal = intern; - intern->createdPipe = createPipe; - intern->blocked = false; - intern->stopReadOperation = false; +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; +} - signal (SIGPIPE, NamedPipeInternal::signalHandler); - siginterrupt (SIGPIPE, 1); +bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles) +{ + if (files.size() == 0) + return false; - const String pipePath (T("/tmp/") + File::createLegalFileName (pipeName)); + Component* sourceComp = Component::getComponentUnderMouse(); - intern->pipeInName = pipePath + T("_in"); - intern->pipeOutName = pipePath + T("_out"); - intern->pipeIn = -1; - intern->pipeOut = -1; - - if (createPipe) + if (sourceComp == 0) { - if ((mkfifo (intern->pipeInName, 0666) && errno != EEXIST) - || (mkfifo (intern->pipeOutName, 0666) && errno != EEXIST)) - { - delete intern; - internal = 0; - - return false; - } + 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; } -int NamedPipe::read (void* destBuffer, int maxBytesToRead, int /*timeOutMilliseconds*/) +bool DragAndDropContainer::performExternalDragDropOfText (const String& text) { - 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; + jassertfalse // not implemented! + return false; } -int NamedPipe::write (const void* sourceBuffer, int numBytesToWrite, int timeOutMilliseconds) +bool Desktop::canUseSemiTransparentWindows() throw() { - 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; + return true; } -END_JUCE_NAMESPACE -/********* End of inlined file: juce_mac_NamedPipe.cpp *********/ +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); +} -/********* Start of inlined file: juce_mac_SystemStats.mm *********/ +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); -/********* Start of inlined file: juce_mac_NativeHeaders.h *********/ -#ifndef __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__ -#define __JUCE_MAC_NATIVEHEADERS_JUCEHEADER__ + CGPoint pos = { x, y }; + CGWarpMouseCursorPosition (pos); -#include + CGAssociateMouseAndMouseCursorPosition (true); +} -BEGIN_JUCE_NAMESPACE - -class AutoPool +#if MACOS_10_4_OR_EARLIER +class ScreenSaverDefeater : public Timer, + public DeletedAtShutdown { public: - AutoPool() { pool = [[NSAutoreleasePool alloc] init]; } - ~AutoPool() { [pool release]; } + ScreenSaverDefeater() throw() + { + startTimer (10000); + timerCallback(); + } -private: - NSAutoreleasePool* pool; + ~ScreenSaverDefeater() {} + + void timerCallback() + { + if (Process::isForegroundProcess()) + UpdateSystemActivity (UsrActivity); + } }; -END_JUCE_NAMESPACE +static ScreenSaverDefeater* screenSaverDefeater = 0; -static const JUCE_NAMESPACE::String nsStringToJuce (NSString* s) +void Desktop::setScreenSaverEnabled (const bool isEnabled) throw() { - return JUCE_NAMESPACE::String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [s UTF8String]); + if (screenSaverDefeater == 0) + screenSaverDefeater = new ScreenSaverDefeater(); } -static NSString* juceStringToNS (const JUCE_NAMESPACE::String& s) +bool Desktop::isScreenSaverEnabled() throw() { - return [NSString stringWithUTF8String: (const char*) s.toUTF8()]; + 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 -/********* End of inlined file: juce_mac_NativeHeaders.h *********/ -#include -#include -#include -#include - -BEGIN_JUCE_NAMESPACE - -static int64 highResTimerFrequency; - -#if JUCE_INTEL - -static void juce_getCpuVendor (char* const v) throw() +void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() { - int vendor[4]; - zerostruct (vendor); - int dummy = 0; + const ScopedAutoReleasePool pool; + monitorCoords.clear(); + NSArray* screens = [NSScreen screens]; + const float mainScreenBottom = [[NSScreen mainScreen] frame].size.height; - asm ("mov %%ebx, %%esi \n\t" - "cpuid \n\t" - "xchg %%esi, %%ebx" - : "=a" (dummy), "=S" (vendor[0]), "=c" (vendor[2]), "=d" (vendor[1]) : "a" (0)); + for (int i = 0; i < [screens count]; ++i) + { + NSScreen* s = (NSScreen*) [screens objectAtIndex: i]; - memcpy (v, vendor, 16); + 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); } -static unsigned int getCPUIDWord (unsigned int& familyModel, unsigned int& extFeatures) throw() -{ - unsigned int cpu = 0; - unsigned int ext = 0; - unsigned int family = 0; - unsigned int dummy = 0; - - asm ("mov %%ebx, %%esi \n\t" - "cpuid \n\t" - "xchg %%esi, %%ebx" - : "=a" (family), "=S" (ext), "=c" (dummy), "=d" (cpu) : "a" (1)); - - familyModel = family; - extFeatures = ext; - return cpu; -} - -struct CPUFlags -{ - bool hasMMX : 1; - bool hasSSE : 1; - bool hasSSE2 : 1; - bool has3DNow : 1; -}; - -static CPUFlags cpuFlags; - #endif +/********* End of inlined file: juce_mac_MiscUtilities.mm *********/ + +/********* Start of inlined file: juce_mac_Debugging.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE void Logger::outputDebugString (const String& text) throw() { - String withLineFeed (text + T("\n")); - const char* const utf8 = withLineFeed.toUTF8(); - fwrite (utf8, strlen (utf8), 1, stdout); + const ScopedAutoReleasePool pool; + NSLog (juceStringToNS (text + T("\n"))); } void Logger::outputDebugPrintf (const tchar* format, ...) throw() @@ -253042,253 +263978,6 @@ void Logger::outputDebugPrintf (const tchar* format, ...) throw() outputDebugString (text); } -int SystemStats::getMemorySizeInMegabytes() throw() -{ - long bytes; - if (Gestalt (gestaltPhysicalRAMSize, &bytes) == noErr) - return (int) (((unsigned long) bytes) / (1024 * 1024)); - - return 0; -} - -SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() throw() -{ - return MacOSX; -} - -const String SystemStats::getOperatingSystemName() throw() -{ - return T("Mac OS X"); -} - -bool SystemStats::isOperatingSystem64Bit() throw() -{ -#if JUCE_64BIT - return true; -#else - //xxx not sure how to find this out?.. - return false; -#endif -} - -void SystemStats::initialiseStats() 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); - } -#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() -{ -#if JUCE_INTEL - return cpuFlags.hasMMX; -#else - return false; -#endif -} - -bool SystemStats::hasSSE() throw() -{ -#if JUCE_INTEL - return cpuFlags.hasSSE; -#else - return false; -#endif -} - -bool SystemStats::hasSSE2() throw() -{ -#if JUCE_INTEL - return cpuFlags.hasSSE2; -#else - return false; -#endif -} - -bool SystemStats::has3DNow() throw() -{ -#if JUCE_INTEL - return cpuFlags.has3DNow; -#else - return false; -#endif -} - -const String SystemStats::getCpuVendor() throw() -{ -#if JUCE_INTEL - char v [16]; - juce_getCpuVendor (v); - return String (v, 16); -#else - return String::empty; -#endif -} - -int SystemStats::getCpuSpeedInMegaherz() throw() -{ - return GetCPUSpeed(); -} - -int SystemStats::getNumCpus() throw() -{ - return MPProcessors(); -} - -static int64 juce_getMicroseconds() throw() -{ - UnsignedWide t; - Microseconds (&t); - return (((int64) t.hi) << 32) | t.lo; -} - -uint32 juce_millisecondsSinceStartup() throw() -{ - return (uint32) (juce_getMicroseconds() / 1000); -} - -double Time::getMillisecondCounterHiRes() throw() -{ - // xxx might be more accurate to use a scaled AudioGetCurrentHostTime? - return juce_getMicroseconds() * 0.001; -} - -int64 Time::getHighResolutionTicks() throw() -{ - return (int64) AudioGetCurrentHostTime(); -} - -int64 Time::getHighResolutionTicksPerSecond() throw() -{ - return highResTimerFrequency; -} - -int64 SystemStats::getClockCycleCounter() throw() -{ - jassertfalse - return 0; -} - -bool Time::setSystemTimeToThisTime() const throw() -{ - jassertfalse - return false; -} - -int SystemStats::getPageSize() throw() -{ - jassertfalse - return 512; //xxx -} - -void PlatformUtilities::fpuReset() -{ -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_mac_SystemStats.mm *********/ - -/********* Start of inlined file: juce_mac_Threads.cpp *********/ - -#include -#include -#include -#include -#include - -BEGIN_JUCE_NAMESPACE - -/* - 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, ¶m); - param.sched_priority = jlimit (1, 127, 1 + (priority * 126) / 11); - pthread_setschedparam ((pthread_t) handle, policy, ¶m); -} - -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; @@ -253310,610 +263999,2718 @@ bool JUCE_CALLTYPE Process::isRunningUnderDebugger() throw() return juce_isRunningUnderDebugger(); } -void Process::raisePrivilege() -{ - jassertfalse -} +#endif +/********* End of inlined file: juce_mac_Debugging.mm *********/ -void Process::lowerPrivilege() -{ - jassertfalse -} +#if ! JUCE_ONLY_BUILD_CORE_LIBRARY -void Process::terminate() -{ - exit (0); -} +/********* Start of inlined file: juce_mac_NSViewComponentPeer.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE -void Process::setPriority (ProcessPriority p) -{ - // xxx -} +class NSViewComponentPeer; -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; -} +static int currentModifiers = 0; END_JUCE_NAMESPACE -/********* End of inlined file: juce_mac_Threads.cpp *********/ -/********* Start of inlined file: juce_mac_Network.mm *********/ +static void updateModifiers (NSEvent* e); -#include -#include -#include -#include +using namespace JUCE_NAMESPACE; -#include -#include -#include -#include -#include -#include +@interface JuceNSView : NSView +{ +@public + NSViewComponentPeer* owner; +} + +- (JuceNSView*) initWithOwner: (NSViewComponentPeer*) owner withFrame: (NSRect) frame; +- (void) dealloc; + +- (BOOL) isOpaque; +- (void) drawRect: (NSRect) r; + +- (void) mouseDown: (NSEvent*) ev; +- (void) mouseUp: (NSEvent*) ev; +- (void) mouseDragged: (NSEvent*) ev; +- (void) mouseMoved: (NSEvent*) ev; +- (void) mouseEntered: (NSEvent*) ev; +- (void) mouseExited: (NSEvent*) ev; +- (void) rightMouseDown: (NSEvent*) ev; +- (void) rightMouseDragged: (NSEvent*) ev; +- (void) rightMouseUp: (NSEvent*) ev; +- (void) scrollWheel: (NSEvent*) ev; +- (BOOL) acceptsFirstMouse: (NSEvent*) ev; +- (void) frameChanged: (NSNotification*) n; + +- (void) keyDown: (NSEvent*) ev; +- (void) keyUp: (NSEvent*) ev; +- (void) flagsChanged: (NSEvent*) ev; +#if MACOS_10_4_OR_EARLIER +- (BOOL) performKeyEquivalent: (NSEvent*) ev; +#endif + +- (BOOL) becomeFirstResponder; +- (BOOL) resignFirstResponder; + +- (NSArray*) getSupportedDragTypes; +- (BOOL) sendDragCallback: (int) type sender: (id ) sender; +- (NSDragOperation) draggingEntered: (id ) sender; +- (NSDragOperation) draggingUpdated: (id ) sender; +- (void) draggingEnded: (id ) sender; +- (void) draggingExited: (id ) sender; +- (BOOL) prepareForDragOperation: (id ) sender; +- (BOOL) performDragOperation: (id ) sender; +- (void) concludeDragOperation: (id ) sender; + +@end + +@interface JuceNSWindow : NSWindow +{ + NSViewComponentPeer* owner; +} + +- (void) setOwner: (NSViewComponentPeer*) owner; +- (BOOL) canBecomeKeyWindow; +- (BOOL) windowShouldClose: (id) window; + +@end BEGIN_JUCE_NAMESPACE -/********* Start of inlined file: juce_mac_HTTPStream.h *********/ -// (This file gets included by the mac + linux networking code) - -/** A HTTP input stream that uses sockets. -*/ -class JUCE_HTTPSocketStream +class NSViewComponentPeer : public ComponentPeer { public: + NSViewComponentPeer (Component* const component, + const int windowStyleFlags, + NSView* viewToAttachTo); - JUCE_HTTPSocketStream() - : readPosition (0), - socketHandle (-1), - levelsOfRedirection (0), - timeoutSeconds (15) - { - } + ~NSViewComponentPeer(); - ~JUCE_HTTPSocketStream() - { - closeSocket(); - } + void* getNativeHandle() const; + void setVisible (bool shouldBeVisible); + void setTitle (const String& title); + void setPosition (int x, int y); + void setSize (int w, int h); + void setBounds (int x, int y, int w, int h, const bool isNowFullScreen); + void getBounds (int& x, int& y, int& w, int& h, const bool global) const; + void getBounds (int& x, int& y, int& w, int& h) const; + int getScreenX() const; + int getScreenY() const; + void relativePositionToGlobal (int& x, int& y); + void globalPositionToRelative (int& x, int& y); + void setMinimised (bool shouldBeMinimised); + bool isMinimised() const; + void setFullScreen (bool shouldBeFullScreen); + bool isFullScreen() const; + bool contains (int x, int y, bool trueIfInAChildWindow) const; + const BorderSize getFrameSize() const; + bool setAlwaysOnTop (bool alwaysOnTop); + void toFront (bool makeActiveWindow); + void toBehind (ComponentPeer* other); + void setIcon (const Image& newIcon); + bool handleKeyEvent (NSEvent* ev, bool isKeyDown); - bool open (const String& url, - const String& headers, - const MemoryBlock& postData, - const bool isPost, - URL::OpenStreamProgressCallback* callback, - void* callbackContext, - int timeOutMs) - { - closeSocket(); + void viewFocusGain(); + void viewFocusLoss(); + bool isFocused() const; + void grabFocus(); + void textInputRequired (int x, int y); - 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; + void repaint (int x, int y, int w, int h); + void performAnyPendingRepaintsNow(); 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; - } + NSWindow* window; + JuceNSView* view; + bool isSharedWindow, fullScreen; }; -bool juce_isOnLine() +class JuceNSImage { - 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 of inlined file: juce_mac_HTTPStream.h *********/ - -static bool GetEthernetIterator (io_iterator_t* matchingServices) throw() -{ - mach_port_t masterPort; - - if (IOMasterPort (MACH_PORT_NULL, &masterPort) == KERN_SUCCESS) +public: + JuceNSImage (const int width, const int height, const bool hasAlpha) + : juceImage (hasAlpha ? Image::ARGB : Image::RGB, + width, height, hasAlpha) { - CFMutableDictionaryRef dict = IOServiceMatching (kIOEthernetInterfaceClass); + lineStride = 0; + pixelStride = 0; + imageData = juceImage.lockPixelDataReadWrite (0, 0, width, height, + lineStride, pixelStride); - if (dict != 0) + imageRep = [[NSBitmapImageRep alloc] + initWithBitmapDataPlanes: &imageData + pixelsWide: width + pixelsHigh: height + bitsPerSample: 8 + samplesPerPixel: pixelStride + hasAlpha: hasAlpha + isPlanar: NO + colorSpaceName: NSCalibratedRGBColorSpace + bitmapFormat: /*NSAlphaFirstBitmapFormat*/ (NSBitmapFormat) 0 + bytesPerRow: lineStride + bitsPerPixel: 8 * pixelStride ]; + + juceImage.releasePixelDataReadWrite (imageData); + } + + ~JuceNSImage() + { + [imageRep release]; + } + + Image& getJuceImage() throw() { return juceImage; } + + void draw (const float x, const float y, + const RectangleList& clip, + const int originX, const int originY) const + { + // Our data is BGRA and the damned image rep only takes RGBA, so + // we need to byte-swap the active areas if there's an alpha channel... + if (juceImage.hasAlphaChannel()) { - CFMutableDictionaryRef propDict = CFDictionaryCreateMutable (kCFAllocatorDefault, - 0, - &kCFTypeDictionaryKeyCallBacks, - &kCFTypeDictionaryValueCallBacks); - - if (propDict != 0) + RectangleList::Iterator iter (clip); + while (iter.next()) { - CFDictionarySetValue (propDict, CFSTR (kIOPrimaryInterface), kCFBooleanTrue); + const Rectangle* const r = iter.getRectangle(); - CFDictionarySetValue (dict, CFSTR (kIOPropertyMatchKey), propDict); - CFRelease (propDict); + swapRGBOrder (r->getX() + originX, + r->getY() + originY, + r->getWidth(), + r->getHeight()); } } - return IOServiceGetMatchingServices (masterPort, dict, matchingServices) == KERN_SUCCESS; + NSPoint p; + p.x = x; + p.y = y; + [imageRep drawAtPoint: p]; + } + + void drawNSImage (NSImage* imageToDraw) + { + const ScopedAutoReleasePool pool; + + [NSGraphicsContext setCurrentContext: + [NSGraphicsContext graphicsContextWithBitmapImageRep: imageRep]]; + + [imageToDraw drawAtPoint: NSZeroPoint + fromRect: NSMakeRect (0, 0, [imageToDraw size].width, [imageToDraw size].height) + operation: NSCompositeSourceOver + fraction: 1.0f]; + + [[NSGraphicsContext currentContext] flushGraphics]; + + if (juceImage.hasAlphaChannel()) + swapRGBOrder (0, 0, juceImage.getWidth(), juceImage.getHeight()); + } + +private: + Image juceImage; + NSBitmapImageRep* imageRep; + uint8* imageData; + int pixelStride, lineStride; + + void swapRGBOrder (const int x, const int y, const int w, int h) const + { + jassert (Rectangle (0, 0, juceImage.getWidth(), juceImage.getHeight()) + .contains (Rectangle (x, y, w, h))); + + uint8* start = imageData + x * pixelStride + y * lineStride; + + while (--h >= 0) + { + uint8* p = start; + start += lineStride; + + for (int i = w; --i >= 0;) + { + const uint8 temp = p[0]; + p[0] = p[2]; + p[2] = temp; + + p += pixelStride; + } + } + } +}; + +static ComponentPeer* currentlyFocusedPeer = 0; +static VoidArray keysCurrentlyDown; + +bool KeyPress::isKeyCurrentlyDown (const int keyCode) throw() +{ + if (keysCurrentlyDown.contains ((void*) keyCode)) + return true; + + if (keyCode >= 'A' && keyCode <= 'Z' + && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toLowerCase ((tchar) keyCode))) + return true; + + if (keyCode >= 'a' && keyCode <= 'z' + && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toUpperCase ((tchar) keyCode))) + return true; + + return false; +} + +static int getKeyCodeFromEvent (NSEvent* ev) +{ + String unicode (nsStringToJuce ([ev characters])); + String unmodified (nsStringToJuce ([ev charactersIgnoringModifiers])); + int keyCode = unmodified[0]; + + if (keyCode == 0x19) // (backwards-tab) + keyCode = 9; + + return keyCode; +} + +static void updateKeysDown (NSEvent* ev, bool isKeyDown) +{ + updateModifiers (ev); + int keyCode = getKeyCodeFromEvent (ev); + + if (keyCode != 0) + { + if (isKeyDown) + keysCurrentlyDown.addIfNotAlreadyThere ((void*) keyCode); + else + keysCurrentlyDown.removeValue ((void*) keyCode); + } +} + +const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() throw() +{ + return ModifierKeys (currentModifiers); +} + +void ModifierKeys::updateCurrentModifiers() throw() +{ + currentModifierFlags = currentModifiers; +} + +END_JUCE_NAMESPACE + +@implementation JuceNSView + +- (JuceNSView*) initWithOwner: (NSViewComponentPeer*) owner_ + withFrame: (NSRect) frame +{ + [super initWithFrame: frame]; + owner = owner_; + + [[NSNotificationCenter defaultCenter] + addObserver: self + selector: @selector (frameChanged:) + name: NSViewFrameDidChangeNotification + object: self]; + + if (! owner_->isSharedWindow) + { + [[NSNotificationCenter defaultCenter] + addObserver: self + selector: @selector (frameChanged:) + name: NSWindowDidMoveNotification + object: owner_->window]; + } + + [self registerForDraggedTypes: [self getSupportedDragTypes]]; + + return self; +} + +- (void) dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver: self]; + [super dealloc]; +} + +- (void) drawRect: (NSRect) r +{ + if (r.size.width < 1.0f || r.size.height < 1.0f || owner == 0) + return; + + const float y = [self frame].size.height - (r.origin.y + r.size.height); + + JuceNSImage temp ((int) (r.size.width + 0.5f), + (int) (r.size.height + 0.5f), + ! owner->getComponent()->isOpaque()); + + LowLevelGraphicsSoftwareRenderer context (temp.getJuceImage()); + const int originX = -roundFloatToInt (r.origin.x); + const int originY = -roundFloatToInt (y); + context.setOrigin (originX, originY); + + const NSRect* rects = 0; + NSInteger numRects = 0; + [self getRectsBeingDrawn: &rects count: &numRects]; + + RectangleList clip; + for (int i = 0; i < numRects; ++i) + { + clip.addWithoutMerging (Rectangle (roundFloatToInt (rects[i].origin.x), + roundFloatToInt ([self frame].size.height - (rects[i].origin.y + rects[i].size.height)), + roundFloatToInt (rects[i].size.width), + roundFloatToInt (rects[i].size.height))); + } + + if (context.reduceClipRegion (clip)) + { + owner->handlePaint (context); + temp.draw (r.origin.x, r.origin.y, clip, originX, originY); + } +} + +- (BOOL) isOpaque +{ + if (owner == 0) + return true; + + if (! owner->getComponent()->isValidComponent()) + return false; + + return owner->getComponent()->isOpaque(); +} + +static int64 getMouseTime (NSEvent* e) { return (int64) [e timestamp] * 1000.0; } + +static void getMousePos (NSEvent* e, NSView* view, int& x, int& y) +{ + NSPoint p = [view convertPoint: [e locationInWindow] fromView: nil]; + x = roundFloatToInt (p.x); + y = roundFloatToInt ([view frame].size.height - p.y); +} + +static void updateModifiers (NSEvent* e) +{ + int m = currentModifiers & ~(ModifierKeys::shiftModifier | ModifierKeys::ctrlModifier + | ModifierKeys::altModifier | ModifierKeys::commandModifier); + + if ((e.modifierFlags & NSShiftKeyMask) != 0) + m |= ModifierKeys::shiftModifier; + + if ((e.modifierFlags & NSControlKeyMask) != 0) + m |= ModifierKeys::ctrlModifier; + + if ((e.modifierFlags & NSAlternateKeyMask) != 0) + m |= ModifierKeys::altModifier; + + if ((e.modifierFlags & NSCommandKeyMask) != 0) + m |= ModifierKeys::commandModifier; + + currentModifiers = m; +} + +static int getModifierForButtonNumber (const int num) throw() +{ + return num == 0 ? ModifierKeys::leftButtonModifier + : (num == 1 ? ModifierKeys::rightButtonModifier + : (num == 2 ? ModifierKeys::middleButtonModifier : 0)); +} + +- (void) mouseDown: (NSEvent*) ev +{ + updateModifiers (ev); + currentModifiers |= getModifierForButtonNumber ([ev buttonNumber]); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseDown (x, y, getMouseTime (ev)); +} + +- (void) mouseUp: (NSEvent*) ev +{ + const int oldMods = currentModifiers; + updateModifiers (ev); + currentModifiers &= ~getModifierForButtonNumber ([ev buttonNumber]); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseUp (oldMods, x, y, getMouseTime (ev)); +} + +- (void) mouseDragged: (NSEvent*) ev +{ + updateModifiers (ev); + currentModifiers |= getModifierForButtonNumber ([ev buttonNumber]); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseDrag (x, y, getMouseTime (ev)); +} + +- (void) mouseMoved: (NSEvent*) ev +{ + updateModifiers (ev); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseMove (x, y, getMouseTime (ev)); +} + +- (void) mouseEntered: (NSEvent*) ev +{ + updateModifiers (ev); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseEnter (x, y, getMouseTime (ev)); +} + +- (void) mouseExited: (NSEvent*) ev +{ + updateModifiers (ev); + int x, y; + getMousePos (ev, self, x, y); + + if (owner != 0) + owner->handleMouseExit (x, y, getMouseTime (ev)); +} + +- (void) rightMouseDown: (NSEvent*) ev +{ + [self mouseDown: ev]; +} + +- (void) rightMouseDragged: (NSEvent*) ev +{ + [self mouseDragged: ev]; +} + +- (void) rightMouseUp: (NSEvent*) ev +{ + [self mouseUp: ev]; +} + +- (void) scrollWheel: (NSEvent*) ev +{ + updateModifiers (ev); + + if (owner != 0) + owner->handleMouseWheel (roundFloatToInt ([ev deltaX] * 10.0f), + roundFloatToInt ([ev deltaY] * 10.0f), + getMouseTime (ev)); +} + +- (BOOL) acceptsFirstMouse: (NSEvent*) ev +{ + return YES; +} + +- (void) frameChanged: (NSNotification*) n +{ + if (owner != 0) + owner->handleMovedOrResized(); +} + +- (void) keyDown: (NSEvent*) ev +{ + bool used = false; + + if (owner != 0) + { + updateKeysDown (ev, true); + used = owner->handleKeyEvent (ev, true); + + if ((ev.modifierFlags & NSCommandKeyMask) != 0) + { + // for command keys, the key-up event is thrown away, so simulate one.. + updateKeysDown (ev, false); + used = owner->handleKeyEvent (ev, false) || used; + } + } + + if (! used) + [super keyDown: ev]; +} + +- (void) keyUp: (NSEvent*) ev +{ + updateKeysDown (ev, false); + + if (owner == 0 || ! owner->handleKeyEvent (ev, false)) + [super keyUp: ev]; +} + +- (void) flagsChanged: (NSEvent*) ev +{ + updateModifiers (ev); + + if (owner != 0) + owner->handleModifierKeysChange(); +} + +#if MACOS_10_4_OR_EARLIER +- (BOOL) performKeyEquivalent: (NSEvent*) ev +{ + if (owner != 0) + { + updateKeysDown (ev, true); + const bool used1 = owner->handleKeyEvent (ev, true); + updateKeysDown (ev, false); + const bool used2 = owner->handleKeyEvent (ev, false); + + if (used1 || used2) + return true; + } + + return [super performKeyEquivalent: ev]; +} +#endif + +- (BOOL) becomeFirstResponder +{ + if (owner != 0) + owner->viewFocusGain(); + + return true; +} + +- (BOOL) resignFirstResponder +{ + if (owner != 0) + owner->viewFocusLoss(); + + return true; +} + +- (NSArray*) getSupportedDragTypes +{ + return [NSArray arrayWithObjects: NSFilenamesPboardType, /*NSFilesPromisePboardType, NSStringPboardType,*/ nil]; +} + +- (BOOL) sendDragCallback: (int) type sender: (id ) sender +{ + NSString* bestType + = [[sender draggingPasteboard] availableTypeFromArray: [self getSupportedDragTypes]]; + + if (bestType == nil) + return false; + + NSPoint p = [self convertPoint: [sender draggingLocation] fromView: nil]; + int x = (int) p.x; + int y = (int) ([self frame].size.height - p.y); + + StringArray files; + + id list = [[sender draggingPasteboard] propertyListForType: bestType]; + if (list == nil) + return false; + + if ([list isKindOfClass: [NSArray class]]) + { + NSArray* items = (NSArray*) list; + + for (int i = 0; i < [items count]; ++i) + files.add (nsStringToJuce ((NSString*) [items objectAtIndex: i])); + } + + if (files.size() == 0) + return false; + + if (type == 0) + owner->handleFileDragMove (files, x, y); + else if (type == 1) + owner->handleFileDragExit (files); + else if (type == 2) + owner->handleFileDragDrop (files, x, y); + + return true; +} + +- (NSDragOperation) draggingEntered: (id ) sender +{ + if ([self sendDragCallback: 0 sender: sender]) + return NSDragOperationCopy | NSDragOperationMove | NSDragOperationGeneric; + else + return NSDragOperationNone; +} + +- (NSDragOperation) draggingUpdated: (id ) sender +{ + if ([self sendDragCallback: 0 sender: sender]) + return NSDragOperationCopy | NSDragOperationMove | NSDragOperationGeneric; + else + return NSDragOperationNone; +} + +- (void) draggingEnded: (id ) sender +{ + [self sendDragCallback: 1 sender: sender]; +} + +- (void) draggingExited: (id ) sender +{ + [self sendDragCallback: 1 sender: sender]; +} + +- (BOOL) prepareForDragOperation: (id ) sender +{ + return YES; +} + +- (BOOL) performDragOperation: (id ) sender +{ + return [self sendDragCallback: 2 sender: sender]; +} + +- (void) concludeDragOperation: (id ) sender +{ +} + +@end + +@implementation JuceNSWindow + +- (void) setOwner: (NSViewComponentPeer*) owner_ +{ + owner = owner_; +} + +- (BOOL) canBecomeKeyWindow +{ + // If runnin as a plugin, let the component decide whether it's + // going to allow the window to get focused. + return JUCEApplication::getInstance() != 0 + || (ComponentPeer::isValidPeer (owner) + && owner->getComponent()->getWantsKeyboardFocus()); +} + +- (BOOL) windowShouldClose: (id) window +{ + if (! ComponentPeer::isValidPeer (owner)) + return YES; + + owner->handleUserClosingWindow(); + return NO; +} + +@end + +BEGIN_JUCE_NAMESPACE + +NSViewComponentPeer::NSViewComponentPeer (Component* const component, + const int windowStyleFlags, + NSView* viewToAttachTo) + : ComponentPeer (component, windowStyleFlags), + view (0), + window (0) +{ + NSRect r; + r.origin.x = 0; + r.origin.y = 0; + r.size.width = (float) component->getWidth(); + r.size.height = (float) component->getHeight(); + + view = [[JuceNSView alloc] initWithOwner: this withFrame: r]; + [view setPostsFrameChangedNotifications: YES]; + + if (viewToAttachTo != 0) + { + window = [viewToAttachTo window]; + [viewToAttachTo addSubview: view]; + isSharedWindow = true; + } + else + { + isSharedWindow = false; + r.origin.x = (float) component->getX(); + r.origin.y = (float) component->getY(); + + unsigned int style = 0; + if ((windowStyleFlags & windowHasTitleBar) == 0) + style = NSBorderlessWindowMask; + else + style = NSTitledWindowMask; + + if ((windowStyleFlags & windowHasMinimiseButton) != 0) + style |= NSMiniaturizableWindowMask; + + if ((windowStyleFlags & windowHasCloseButton) != 0) + style |= NSClosableWindowMask; + + if ((windowStyleFlags & windowIsResizable) != 0) + style |= NSResizableWindowMask; + + window = [[JuceNSWindow alloc] initWithContentRect: r + styleMask: style + backing: NSBackingStoreBuffered + defer: YES ]; + + [((JuceNSWindow*) window) setOwner: this]; + [window setDelegate: window]; + [window setOpaque: component->isOpaque()]; + [window setHasShadow: ((windowStyleFlags & windowHasDropShadow) != 0)]; + + if (component->isAlwaysOnTop()) + [window setLevel: NSFloatingWindowLevel]; + + [window setContentView: view]; + [window setAutodisplay: YES]; + [window setAcceptsMouseMovedEvents: YES]; + [window setReleasedWhenClosed: YES]; + [window setExcludedFromWindowsMenu: (windowStyleFlags & windowIsTemporary) != 0]; + [window setIgnoresMouseEvents: (windowStyleFlags & windowIgnoresMouseClicks) != 0]; + } + + setVisible (component->isVisible()); +} + +NSViewComponentPeer::~NSViewComponentPeer() +{ + view->owner = 0; + [view removeFromSuperview]; + [view release]; + + if (! isSharedWindow) + [window close]; +} + +void* NSViewComponentPeer::getNativeHandle() const +{ + return view; +} + +void NSViewComponentPeer::setVisible (bool shouldBeVisible) +{ + if (isSharedWindow) + { + [view setHidden: ! shouldBeVisible]; + } + else + { + if (shouldBeVisible) + [window orderFront: nil]; + else + [window orderOut: nil]; + } +} + +void NSViewComponentPeer::setTitle (const String& title) +{ + const ScopedAutoReleasePool pool; + + if (! isSharedWindow) + [window setTitle: juceStringToNS (title)]; +} + +void NSViewComponentPeer::setPosition (int x, int y) +{ + setBounds (x, y, component->getWidth(), component->getHeight(), false); +} + +void NSViewComponentPeer::setSize (int w, int h) +{ + setBounds (component->getX(), component->getY(), w, h, false); +} + +void NSViewComponentPeer::setBounds (int x, int y, int w, int h, const bool isNowFullScreen) +{ + fullScreen = isNowFullScreen; + w = jmax (0, w); + h = jmax (0, h); + + NSRect r; + r.origin.x = (float) x; + r.origin.y = (float) y; + r.size.width = (float) w; + r.size.height = (float) h; + + if (isSharedWindow) + { + r.origin.y = [[view superview] frame].size.height - (r.origin.y + r.size.height); + + if ([view frame].size.width != r.size.width + || [view frame].size.height != r.size.height) + [view setNeedsDisplay: true]; + + [view setFrame: r]; + } + else + { + r.origin.y = [[NSScreen mainScreen] frame].size.height - (r.origin.y + r.size.height); + [window setFrame: r + display: true]; + } +} + +void NSViewComponentPeer::getBounds (int& x, int& y, int& w, int& h, const bool global) const +{ + NSRect r = [view frame]; + + if (global && [view window] != 0) + { + r = [view convertRect: r toView: nil]; + + NSRect wr = [[view window] frame]; + r.origin.x += wr.origin.x; + r.origin.y += wr.origin.y; + y = (int) ([[NSScreen mainScreen] frame].size.height - r.origin.y - r.size.height); + } + else + { + y = (int) ([[view superview] frame].size.height - r.origin.y - r.size.height); + } + + x = (int) r.origin.x; + w = (int) r.size.width; + h = (int) r.size.height; +} + +void NSViewComponentPeer::getBounds (int& x, int& y, int& w, int& h) const +{ + getBounds (x, y, w, h, ! isSharedWindow); +} + +int NSViewComponentPeer::getScreenX() const +{ + int x, y, w, h; + getBounds (x, y, w, h, true); + return x; +} + +int NSViewComponentPeer::getScreenY() const +{ + int x, y, w, h; + getBounds (x, y, w, h, true); + return y; +} + +void NSViewComponentPeer::relativePositionToGlobal (int& x, int& y) +{ + int wx, wy, ww, wh; + getBounds (wx, wy, ww, wh, true); + x += wx; + y += wy; +} + +void NSViewComponentPeer::globalPositionToRelative (int& x, int& y) +{ + int wx, wy, ww, wh; + getBounds (wx, wy, ww, wh, true); + x -= wx; + y -= wy; +} + +void NSViewComponentPeer::setMinimised (bool shouldBeMinimised) +{ + if (! isSharedWindow) + { + if (shouldBeMinimised) + [window miniaturize: nil]; + else + [window deminiaturize: nil]; + } +} + +bool NSViewComponentPeer::isMinimised() const +{ + return window != 0 && [window isMiniaturized]; +} + +void NSViewComponentPeer::setFullScreen (bool shouldBeFullScreen) +{ + if (! isSharedWindow) + { + Rectangle r (lastNonFullscreenBounds); + + setMinimised (false); + + if (fullScreen != shouldBeFullScreen) + { + if (shouldBeFullScreen) + r = Desktop::getInstance().getMainMonitorArea(); + + // (can't call the component's setBounds method because that'll reset our fullscreen flag) + if (r != getComponent()->getBounds() && ! r.isEmpty()) + setBounds (r.getX(), r.getY(), r.getWidth(), r.getHeight(), shouldBeFullScreen); + } + } +} + +bool NSViewComponentPeer::isFullScreen() const +{ + return fullScreen; +} + +bool NSViewComponentPeer::contains (int x, int y, bool trueIfInAChildWindow) const +{ + if (((unsigned int) x) >= (unsigned int) component->getWidth() + || ((unsigned int) y) >= (unsigned int) component->getHeight()) + return false; + + NSPoint p; + p.x = (float) x; + p.y = (float) y; + + NSView* v = [view hitTest: p]; + + if (trueIfInAChildWindow) + return v != nil; + + return v == view; +} + +const BorderSize NSViewComponentPeer::getFrameSize() const +{ + BorderSize b; + + if (! isSharedWindow) + { + NSRect v = [view convertRect: [view frame] toView: nil]; + NSRect w = [window frame]; + + b.setTop ((int) (w.size.height - (v.origin.y + v.size.height))); + b.setBottom ((int) v.origin.y); + b.setLeft ((int) v.origin.x); + b.setRight ((int) (w.size.width - (v.origin.x + v.size.width))); + } + + return b; +} + +bool NSViewComponentPeer::setAlwaysOnTop (bool alwaysOnTop) +{ + if (! isSharedWindow) + { + [window setLevel: alwaysOnTop ? NSFloatingWindowLevel + : NSNormalWindowLevel]; + } + + return true; +} + +void NSViewComponentPeer::toFront (bool makeActiveWindow) +{ + if (isSharedWindow) + { + [[view superview] addSubview: view + positioned: NSWindowAbove + relativeTo: nil]; + } + + if (window != 0) + { + if (makeActiveWindow) + [window makeKeyAndOrderFront: nil]; + else + [window orderFront: nil]; + } +} + +void NSViewComponentPeer::toBehind (ComponentPeer* other) +{ + NSViewComponentPeer* o = (NSViewComponentPeer*) other; + + if (isSharedWindow) + { + [[view superview] addSubview: view + positioned: NSWindowBelow + relativeTo: o->view]; + } + else + { + [window orderWindow: NSWindowBelow + relativeTo: o->window != 0 ? [o->window windowNumber] + : nil ]; + } +} + +void NSViewComponentPeer::setIcon (const Image& /*newIcon*/) +{ + // to do.. +} + +void NSViewComponentPeer::viewFocusGain() +{ + const MessageManagerLock messLock; + + if (currentlyFocusedPeer != this) + { + if (ComponentPeer::isValidPeer (currentlyFocusedPeer)) + currentlyFocusedPeer->handleFocusLoss(); + + currentlyFocusedPeer = this; + + handleFocusGain(); + } +} + +void NSViewComponentPeer::viewFocusLoss() +{ + if (currentlyFocusedPeer == this) + { + currentlyFocusedPeer = 0; + handleFocusLoss(); + } +} + +void juce_HandleProcessFocusChange() +{ + keysCurrentlyDown.clear(); + + if (NSViewComponentPeer::isValidPeer (currentlyFocusedPeer)) + { + if (Process::isForegroundProcess()) + currentlyFocusedPeer->handleFocusGain(); + else + currentlyFocusedPeer->handleFocusLoss(); + } +} + +bool NSViewComponentPeer::isFocused() const +{ + return window != 0 && [window isKeyWindow]; +} + +void NSViewComponentPeer::grabFocus() +{ + if (window != 0) + { + [window makeKeyWindow]; + [window makeFirstResponder: view]; + } +} + +void NSViewComponentPeer::textInputRequired (int /*x*/, int /*y*/) +{ +} + +bool NSViewComponentPeer::handleKeyEvent (NSEvent* ev, bool isKeyDown) +{ + String unicode (nsStringToJuce ([ev characters])); + String unmodified (nsStringToJuce ([ev charactersIgnoringModifiers])); + int keyCode = getKeyCodeFromEvent (ev); + + //DBG ("unicode: " + unicode + " " + String::toHexString ((int) unicode[0])); + //DBG ("unmodified: " + unmodified + " " + String::toHexString ((int) unmodified[0])); + + if (unicode.isNotEmpty() || keyCode != 0) + { + if (isKeyDown) + { + bool used = false; + + while (unicode.length() > 0) + { + juce_wchar textCharacter = unicode[0]; + unicode = unicode.substring (1); + + used = handleKeyUpOrDown() || used; + used = handleKeyPress (keyCode, textCharacter) || used; + } + + return used; + } + else + { + if (handleKeyUpOrDown()) + return true; + } } return false; } -int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littleEndian) throw() +void NSViewComponentPeer::repaint (int x, int y, int w, int h) { - 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; + [view setNeedsDisplayInRect: + NSMakeRect ((float) x, (float) ([view frame].size.height - (y + h)), + (float) w, (float) h)]; } -bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAddress, - const String& emailSubject, - const String& bodyText, - const StringArray& filesToAttach) +void NSViewComponentPeer::performAnyPendingRepaintsNow() { - const AutoPool pool; + [view displayIfNeeded]; +} - 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"; +ComponentPeer* Component::createNewPeer (int styleFlags, void* windowToAttachTo) +{ + return new NSViewComponentPeer (this, styleFlags, (NSView*) windowToAttachTo); +} - for (int i = 0; i < filesToAttach.size(); ++i) +static Image* NSImageToJuceImage (NSImage* image) +{ + JuceNSImage juceIm ((int) [image size].width, + (int) [image size].height, + true); + + juceIm.drawNSImage (image); + return juceIm.getJuceImage().createCopy(); +} + +Image* juce_createIconForFile (const File& file) +{ + const ScopedAutoReleasePool pool; + + NSImage* im = [[NSWorkspace sharedWorkspace] iconForFile: juceStringToNS (file.getFullPathName())]; + return NSImageToJuceImage (im); +} + +const int KeyPress::spaceKey = ' '; +const int KeyPress::returnKey = 0x0d; +const int KeyPress::escapeKey = 0x1b; +const int KeyPress::backspaceKey = 0x7f; +const int KeyPress::leftKey = NSLeftArrowFunctionKey; +const int KeyPress::rightKey = NSRightArrowFunctionKey; +const int KeyPress::upKey = NSUpArrowFunctionKey; +const int KeyPress::downKey = NSDownArrowFunctionKey; +const int KeyPress::pageUpKey = NSPageUpFunctionKey; +const int KeyPress::pageDownKey = NSPageDownFunctionKey; +const int KeyPress::endKey = NSEndFunctionKey; +const int KeyPress::homeKey = NSHomeFunctionKey; +const int KeyPress::deleteKey = NSDeleteFunctionKey; +const int KeyPress::insertKey = -1; +const int KeyPress::tabKey = 9; +const int KeyPress::F1Key = NSF1FunctionKey; +const int KeyPress::F2Key = NSF2FunctionKey; +const int KeyPress::F3Key = NSF3FunctionKey; +const int KeyPress::F4Key = NSF4FunctionKey; +const int KeyPress::F5Key = NSF5FunctionKey; +const int KeyPress::F6Key = NSF6FunctionKey; +const int KeyPress::F7Key = NSF7FunctionKey; +const int KeyPress::F8Key = NSF8FunctionKey; +const int KeyPress::F9Key = NSF9FunctionKey; +const int KeyPress::F10Key = NSF10FunctionKey; +const int KeyPress::F11Key = NSF1FunctionKey; +const int KeyPress::F12Key = NSF12FunctionKey; +const int KeyPress::F13Key = NSF13FunctionKey; +const int KeyPress::F14Key = NSF14FunctionKey; +const int KeyPress::F15Key = NSF15FunctionKey; +const int KeyPress::F16Key = NSF16FunctionKey; +const int KeyPress::numberPad0 = 0x30020; +const int KeyPress::numberPad1 = 0x30021; +const int KeyPress::numberPad2 = 0x30022; +const int KeyPress::numberPad3 = 0x30023; +const int KeyPress::numberPad4 = 0x30024; +const int KeyPress::numberPad5 = 0x30025; +const int KeyPress::numberPad6 = 0x30026; +const int KeyPress::numberPad7 = 0x30027; +const int KeyPress::numberPad8 = 0x30028; +const int KeyPress::numberPad9 = 0x30029; +const int KeyPress::numberPadAdd = 0x3002a; +const int KeyPress::numberPadSubtract = 0x3002b; +const int KeyPress::numberPadMultiply = 0x3002c; +const int KeyPress::numberPadDivide = 0x3002d; +const int KeyPress::numberPadSeparator = 0x3002e; +const int KeyPress::numberPadDecimalPoint = 0x3002f; +const int KeyPress::numberPadEquals = 0x30030; +const int KeyPress::numberPadDelete = 0x30031; +const int KeyPress::playKey = 0x30000; +const int KeyPress::stopKey = 0x30001; +const int KeyPress::fastForwardKey = 0x30002; +const int KeyPress::rewindKey = 0x30003; + +#endif +/********* End of inlined file: juce_mac_NSViewComponentPeer.mm *********/ + +/********* Start of inlined file: juce_mac_MouseCursor.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +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) { - 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"; + 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; } - script << "end tell\r\n" - "end tell\r\n"; + [c retain]; + return (void*) c; +} - NSAppleScript* s = [[NSAppleScript alloc] - initWithSource: [NSString stringWithUTF8String: (const char*) script.toUTF8()]]; - NSDictionary* error = 0; - const bool ok = [s executeAndReturnError: &error] != nil; - [s release]; +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 +/********* End of inlined file: juce_mac_MouseCursor.mm *********/ + +/********* Start of inlined file: juce_mac_NSViewComponent.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +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 (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 +/********* End of inlined file: juce_mac_NSViewComponent.mm *********/ + +/********* Start of inlined file: juce_mac_AppleRemote.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +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 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 +/********* End of inlined file: juce_mac_AppleRemote.mm *********/ + +/********* Start of inlined file: juce_mac_OpenGLComponent.mm *********/ +// (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 & 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 +/********* End of inlined file: juce_mac_OpenGLComponent.mm *********/ + +/********* Start of inlined file: juce_mac_MainMenu.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +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(""), 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 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 +/********* End of inlined file: juce_mac_MainMenu.mm *********/ + +/********* Start of inlined file: juce_mac_FileChooser.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +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& 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 +/********* End of inlined file: juce_mac_FileChooser.mm *********/ + +/********* Start of inlined file: juce_mac_QuickTimeMovieComponent.mm *********/ +// (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 (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; } -END_JUCE_NAMESPACE -/********* End of inlined file: juce_mac_Network.mm *********/ +void QuickTimeMovieComponent::goToStart() +{ + setPosition (0.0); +} -#if ! JUCE_ONLY_BUILD_CORE_LIBRARY +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 (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 +/********* End of inlined file: juce_mac_QuickTimeMovieComponent.mm *********/ /********* Start of inlined file: juce_mac_AudioCDBurner.mm *********/ - -#if JUCE_USE_CDBURNER - -#import - -BEGIN_JUCE_NAMESPACE +// (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 @@ -254118,18 +266915,18 @@ NSLog ([[burn status] description]); { } -- (BOOL) cleanupTrackAfterVerification:(DRTrack*)track +- (BOOL) cleanupTrackAfterVerification: (DRTrack*) track { return true; } -- (uint64_t) estimateLengthOfTrack:(DRTrack*)track +- (uint64_t) estimateLengthOfTrack: (DRTrack*) track { return lengthInFrames; } -- (BOOL) prepareTrack:(DRTrack*)track forBurn:(DRBurn*)burn - toMedia:(NSDictionary*)mediaInfo +- (BOOL) prepareTrack: (DRTrack*) track forBurn: (DRBurn*) burn + toMedia: (NSDictionary*) mediaInfo { if (source != 0) source->prepareToPlay (44100 / 75, 44100); @@ -254138,7 +266935,7 @@ NSLog ([[burn status] description]); return true; } -- (BOOL) prepareTrackForVerification:(DRTrack*)track +- (BOOL) prepareTrackForVerification: (DRTrack*) track { if (source != 0) source->prepareToPlay (44100 / 75, 44100); @@ -254146,9 +266943,9 @@ NSLog ([[burn status] description]); 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 +- (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) { @@ -254179,18 +266976,18 @@ NSLog ([[burn status] description]); 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 +- (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 +- (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; } @@ -254202,7 +266999,6 @@ 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; @@ -254210,7 +267006,6 @@ AudioCDBurner::AudioCDBurner (const int deviceIndex) AudioCDBurner::~AudioCDBurner() { - const AutoPool pool; OpenDiskDevice* dev = (OpenDiskDevice*) internal; if (dev != 0) @@ -254219,7 +267014,6 @@ AudioCDBurner::~AudioCDBurner() AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex) { - const AutoPool pool; AudioCDBurner* b = new AudioCDBurner (deviceIndex); if (b->internal == 0) @@ -254251,7 +267045,6 @@ static NSArray* findDiskBurnerDevices() const StringArray AudioCDBurner::findAvailableDevices() { - const AutoPool pool; NSArray* names = findDiskBurnerDevices(); StringArray s; @@ -254277,7 +267070,6 @@ int AudioCDBurner::getNumAvailableAudioBlocks() const bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps) { - const AutoPool pool; OpenDiskDevice* dev = (OpenDiskDevice*) internal; if (dev != 0) @@ -254293,14 +267085,13 @@ const String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressLis const bool ejectDiscAfterwards, const bool peformFakeBurnForTesting) { - const AutoPool pool; - JUCE_NAMESPACE::String error ("Couldn't open or write to the CD device"); + String error ("Couldn't open or write to the CD device"); OpenDiskDevice* dev = (OpenDiskDevice*) internal; if (dev != 0) { - error = JUCE_NAMESPACE::String::empty; + error = String::empty; [dev burn: listener errorString: &error ejectAfterwards: ejectDiscAfterwards @@ -254310,17 +267101,984 @@ const String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressLis return error; } -END_JUCE_NAMESPACE - #endif /********* End of inlined file: juce_mac_AudioCDBurner.mm *********/ -/********* Start of inlined file: juce_mac_CoreAudio.cpp *********/ +/********* Start of inlined file: juce_mac_Fonts.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE -#include +static OSStatus pascal CubicMoveTo (const Float32Point *pt, + void* callBackDataPtr) +{ + Path* const p = (Path*) callBackDataPtr; + p->startNewSubPath (pt->x, pt->y); + + return noErr; +} + +static OSStatus pascal CubicLineTo (const Float32Point *pt, + void* callBackDataPtr) +{ + Path* const p = (Path*) callBackDataPtr; + p->lineTo (pt->x, pt->y); + + return noErr; +} + +static OSStatus pascal CubicCurveTo (const Float32Point *pt1, + const Float32Point *pt2, + const Float32Point *pt3, + void* callBackDataPtr) +{ + Path* const p = (Path*) callBackDataPtr; + p->cubicTo (pt1->x, pt1->y, + pt2->x, pt2->y, + pt3->x, pt3->y); + + return noErr; +} + +static OSStatus pascal CubicClosePath (void* callBackDataPtr) +{ + Path* const p = (Path*) callBackDataPtr; + p->closeSubPath(); + + return noErr; +} + +class ATSFontHelper +{ + ATSUFontID fontId; + ATSUStyle style; + + ATSCubicMoveToUPP moveToProc; + ATSCubicLineToUPP lineToProc; + ATSCubicCurveToUPP curveToProc; + ATSCubicClosePathUPP closePathProc; + + float totalSize, ascent; + + TextToUnicodeInfo encodingInfo; + +public: + String name; + bool isBold, isItalic; + float fontSize; + int refCount; + + ATSFontHelper (const String& name_, + const bool bold_, + const bool italic_, + const float size_) + : fontId (0), + name (name_), + isBold (bold_), + isItalic (italic_), + fontSize (size_), + refCount (1) + { + const char* const nameUtf8 = name_.toUTF8(); + + ATSUFindFontFromName (const_cast (nameUtf8), + strlen (nameUtf8), + kFontFullName, + kFontNoPlatformCode, + kFontNoScriptCode, + kFontNoLanguageCode, + &fontId); + + ATSUCreateStyle (&style); + + ATSUAttributeTag attTypes[] = { kATSUFontTag, + kATSUQDBoldfaceTag, + kATSUQDItalicTag, + kATSUSizeTag }; + + ByteCount attSizes[] = { sizeof (ATSUFontID), + sizeof (Boolean), + sizeof (Boolean), + sizeof (Fixed) }; + + Boolean bold = bold_, italic = italic_; + Fixed size = X2Fix (size_); + + ATSUAttributeValuePtr attValues[] = { &fontId, + &bold, + &italic, + &size }; + + ATSUSetAttributes (style, 4, attTypes, attSizes, attValues); + + moveToProc = NewATSCubicMoveToUPP (CubicMoveTo); + lineToProc = NewATSCubicLineToUPP (CubicLineTo); + curveToProc = NewATSCubicCurveToUPP (CubicCurveTo); + closePathProc = NewATSCubicClosePathUPP (CubicClosePath); + + ascent = 0.0f; + float kern, descent = 0.0f; + getPathAndKerning (T('N'), T('O'), 0, kern, &ascent, &descent); + totalSize = ascent + descent; + } + + ~ATSFontHelper() + { + ATSUDisposeStyle (style); + + DisposeATSCubicMoveToUPP (moveToProc); + DisposeATSCubicLineToUPP (lineToProc); + DisposeATSCubicCurveToUPP (curveToProc); + DisposeATSCubicClosePathUPP (closePathProc); + } + + bool getPathAndKerning (const juce_wchar char1, + const juce_wchar char2, + Path* path, + float& kerning, + float* ascent, + float* descent) + { + bool ok = false; + + UniChar buffer[4]; + buffer[0] = T(' '); + buffer[1] = char1; + buffer[2] = char2; + buffer[3] = 0; + + UniCharCount count = kATSUToTextEnd; + ATSUTextLayout layout; + OSStatus err = ATSUCreateTextLayoutWithTextPtr (buffer, + 0, + 2, + 2, + 1, + &count, + &style, + &layout); + if (err == noErr) + { + ATSUSetTransientFontMatching (layout, true); + + ATSLayoutRecord* layoutRecords; + ItemCount numRecords; + Fixed* deltaYs; + ItemCount numDeltaYs; + + ATSUDirectGetLayoutDataArrayPtrFromTextLayout (layout, + 0, + kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, + (void**) &layoutRecords, + &numRecords); + + ATSUDirectGetLayoutDataArrayPtrFromTextLayout (layout, + 0, + kATSUDirectDataBaselineDeltaFixedArray, + (void**) &deltaYs, + &numDeltaYs); + + if (numRecords > 2) + { + kerning = (float) (Fix2X (layoutRecords[2].realPos) + - Fix2X (layoutRecords[1].realPos)); + + if (ascent != 0) + { + ATSUTextMeasurement asc; + ByteCount actualSize; + + ATSUGetLineControl (layout, + 0, + kATSULineAscentTag, + sizeof (ATSUTextMeasurement), + &asc, + &actualSize); + + *ascent = (float) Fix2X (asc); + } + + if (descent != 0) + { + ATSUTextMeasurement desc; + ByteCount actualSize; + + ATSUGetLineControl (layout, + 0, + kATSULineDescentTag, + sizeof (ATSUTextMeasurement), + &desc, + &actualSize); + + *descent = (float) Fix2X (desc); + } + + if (path != 0) + { + OSStatus callbackResult; + + ok = (ATSUGlyphGetCubicPaths (style, + layoutRecords[1].glyphID, + moveToProc, + lineToProc, + curveToProc, + closePathProc, + (void*) path, + &callbackResult) == noErr); + + if (numDeltaYs > 0 && ok) + { + const float dy = (float) Fix2X (deltaYs[1]); + + path->applyTransform (AffineTransform::translation (0.0f, dy)); + } + } + else + { + ok = true; + } + } + + if (deltaYs != 0) + ATSUDirectReleaseLayoutDataArrayPtr (0, kATSUDirectDataBaselineDeltaFixedArray, + (void**) &deltaYs); + + if (layoutRecords != 0) + ATSUDirectReleaseLayoutDataArrayPtr (0, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, + (void**) &layoutRecords); + + ATSUDisposeTextLayout (layout); + } + + return kerning; + } + + float getAscent() + { + return ascent; + } + + float getTotalHeight() + { + return totalSize; + } + + juce_wchar getDefaultChar() + { + return 0; + } +}; + +class ATSFontHelperCache : public Timer, + public DeletedAtShutdown +{ + VoidArray cache; + +public: + ATSFontHelperCache() + { + } + + ~ATSFontHelperCache() + { + for (int i = cache.size(); --i >= 0;) + { + ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i); + delete f; + } + + clearSingletonInstance(); + } + + ATSFontHelper* getFont (const String& name, + const bool bold, + const bool italic, + const float size = 1024) + { + for (int i = cache.size(); --i >= 0;) + { + ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i); + + if (f->name == name + && f->isBold == bold + && f->isItalic == italic + && f->fontSize == size) + { + f->refCount++; + return f; + } + } + + ATSFontHelper* const f = new ATSFontHelper (name, bold, italic, size); + cache.add (f); + return f; + } + + void releaseFont (ATSFontHelper* f) + { + for (int i = cache.size(); --i >= 0;) + { + ATSFontHelper* const f2 = (ATSFontHelper*) cache.getUnchecked(i); + + if (f == f2) + { + f->refCount--; + + if (f->refCount == 0) + startTimer (5000); + + break; + } + } + } + + void timerCallback() + { + stopTimer(); + + for (int i = cache.size(); --i >= 0;) + { + ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i); + + if (f->refCount == 0) + { + cache.remove (i); + delete f; + } + } + + if (cache.size() == 0) + delete this; + } + + juce_DeclareSingleton_SingleThreaded_Minimal (ATSFontHelperCache) +}; + +juce_ImplementSingleton_SingleThreaded (ATSFontHelperCache) + +void Typeface::initialiseTypefaceCharacteristics (const String& fontName, + bool bold, + bool italic, + bool addAllGlyphsToFont) throw() +{ + // This method is only safe to be called from the normal UI thread.. + jassert (MessageManager::getInstance()->isThisTheMessageThread()); + + ATSFontHelper* const helper = ATSFontHelperCache::getInstance() + ->getFont (fontName, bold, italic); + + clear(); + setAscent (helper->getAscent() / helper->getTotalHeight()); + setName (fontName); + setDefaultCharacter (helper->getDefaultChar()); + setBold (bold); + setItalic (italic); + + if (addAllGlyphsToFont) + { + //xxx + jassertfalse + } + + ATSFontHelperCache::getInstance()->releaseFont (helper); +} + +bool Typeface::findAndAddSystemGlyph (juce_wchar character) throw() +{ + // This method is only safe to be called from the normal UI thread.. + jassert (MessageManager::getInstance()->isThisTheMessageThread()); + + ATSFontHelper* const helper = ATSFontHelperCache::getInstance() + ->getFont (getName(), isBold(), isItalic()); + + Path path; + float width; + bool foundOne = false; + + if (helper->getPathAndKerning (character, T('I'), &path, width, 0, 0)) + { + path.applyTransform (AffineTransform::scale (1.0f / helper->getTotalHeight(), + 1.0f / helper->getTotalHeight())); + + addGlyph (character, path, width / helper->getTotalHeight()); + + for (int i = 0; i < glyphs.size(); ++i) + { + const TypefaceGlyphInfo* const g = (const TypefaceGlyphInfo*) glyphs.getUnchecked(i); + + float kerning; + if (helper->getPathAndKerning (character, g->getCharacter(), 0, kerning, 0, 0)) + { + kerning = (kerning - width) / helper->getTotalHeight(); + + if (kerning != 0) + addKerningPair (character, g->getCharacter(), kerning); + } + + if (helper->getPathAndKerning (g->getCharacter(), character, 0, kerning, 0, 0)) + { + kerning = kerning / helper->getTotalHeight() - g->width; + + if (kerning != 0) + addKerningPair (g->getCharacter(), character, kerning); + } + } + + foundOne = true; + } + + ATSFontHelperCache::getInstance()->releaseFont (helper); + return foundOne; +} + +const StringArray Font::findAllTypefaceNames() throw() +{ + StringArray names; + ATSFontIterator iter; + + if (ATSFontIteratorCreate (kATSFontContextGlobal, + 0, + 0, + kATSOptionFlagsRestrictedScope, + &iter) == noErr) + { + ATSFontRef font; + + while (ATSFontIteratorNext (iter, &font) == noErr) + { + CFStringRef name; + + if (ATSFontGetName (font, + kATSOptionFlagsDefault, + &name) == noErr) + { + const String nm (PlatformUtilities::cfStringToJuceString (name)); + + if (nm.isNotEmpty()) + names.add (nm); + + CFRelease (name); + } + } + + ATSFontIteratorRelease (&iter); + } + + // Use some totuous logic to eliminate bold/italic versions of fonts that we've already got + // a plain version of. This is only necessary because of Carbon's total lack of support + // for dealing with font families... + for (int j = names.size(); --j >= 0;) + { + const char* const endings[] = { " bold", " italic", " bold italic", " bolditalic", + " oblque", " bold oblique", " boldoblique" }; + + for (int i = 0; i < numElementsInArray (endings); ++i) + { + const String ending (endings[i]); + + if (names[j].endsWithIgnoreCase (ending)) + { + const String root (names[j].dropLastCharacters (ending.length()).trimEnd()); + + if (names.contains (root) + || names.contains (root + T(" plain"), true)) + { + names.remove (j); + break; + } + } + } + } + + names.sort (true); + return names; +} + +void Font::getDefaultFontNames (String& defaultSans, String& defaultSerif, String& defaultFixed) throw() +{ + defaultSans = "Lucida Grande"; + defaultSerif = "Times New Roman"; + defaultFixed = "Monaco"; +} + +#endif +/********* End of inlined file: juce_mac_Fonts.mm *********/ + +/********* Start of inlined file: juce_mac_MessageManager.mm *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + +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 +/********* End of inlined file: juce_mac_MessageManager.mm *********/ + +/********* Start of inlined file: juce_mac_WebBrowserComponent.mm *********/ +// (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) 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 +/********* End of inlined file: juce_mac_WebBrowserComponent.mm *********/ + +/********* Start of inlined file: juce_mac_CoreAudio.cpp *********/ +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE + #ifndef JUCE_COREAUDIO_ERROR_LOGGING_ENABLED #define JUCE_COREAUDIO_ERROR_LOGGING_ENABLED 1 #endif @@ -254367,6 +268125,9 @@ public: inputLatency (0), outputLatency (0), callback (0), +#if ! MACOS_10_4_OR_EARLIER + audioProcID (0), +#endif inputDevice (0), isSlaveDevice (false) { @@ -254759,7 +268520,11 @@ public: if (deviceID != 0) { +#if MACOS_10_4_OR_EARLIER if (OK (AudioDeviceAddIOProc (deviceID, audioIOProc, (void*) this))) +#else + if (OK (AudioDeviceCreateIOProcID (deviceID, audioIOProc, (void*) this, &audioProcID))) +#endif { if (OK (AudioDeviceStart (deviceID, audioIOProc))) { @@ -254767,7 +268532,12 @@ public: } else { +#if MACOS_10_4_OR_EARLIER OK (AudioDeviceRemoveIOProc (deviceID, audioIOProc)); +#else + OK (AudioDeviceDestroyIOProcID (deviceID, audioProcID)); + audioProcID = 0; +#endif } } } @@ -254796,7 +268566,13 @@ public: && ! leaveInterruptRunning) { OK (AudioDeviceStop (deviceID, audioIOProc)); + +#if MACOS_10_4_OR_EARLIER OK (AudioDeviceRemoveIOProc (deviceID, audioIOProc)); +#else + OK (AudioDeviceDestroyIOProcID (deviceID, audioProcID)); + audioProcID = 0; +#endif started = false; callbackLock.enter(); @@ -254997,6 +268773,9 @@ public: Array sampleRates; Array bufferSizes; AudioIODeviceCallback* callback; +#if ! MACOS_10_4_OR_EARLIER + AudioDeviceIOProcID audioProcID; +#endif CoreAudioInternal* inputDevice; bool isSlaveDevice; @@ -255546,13 +269325,13 @@ AudioIODeviceType* juce_createDefaultAudioIODeviceType() #undef log -END_JUCE_NAMESPACE +#endif /********* End of inlined file: juce_mac_CoreAudio.cpp *********/ /********* Start of inlined file: juce_mac_CoreMidi.cpp *********/ -#include - -BEGIN_JUCE_NAMESPACE +// (This file gets included by juce_mac_NativeCode.mm, rather than being +// compiled on its own). +#ifdef JUCE_INCLUDED_FILE #undef log #define log(a) Logger::writeToLog(a) @@ -256095,4950 +269874,212 @@ void MidiInput::stop() #undef log -END_JUCE_NAMESPACE +#endif /********* End of inlined file: juce_mac_CoreMidi.cpp *********/ -/********* Start of inlined file: juce_mac_FileChooser.mm *********/ - -#include - -BEGIN_JUCE_NAMESPACE +#endif END_JUCE_NAMESPACE +/********* End of inlined file: juce_mac_NativeCode.mm *********/ -@interface JuceFileChooserDelegate : NSObject -{ - JUCE_NAMESPACE::StringArray* filters; -} +/********* Start of inlined file: juce_mac_NamedPipe.cpp *********/ -- (JuceFileChooserDelegate*) initWithFilters: (JUCE_NAMESPACE::StringArray*) filters_; -- (void) dealloc; -- (BOOL) panel: (id) sender shouldShowFilename: (NSString*) filename; +#include +#include +#include -@end +// As well as being for the mac, this file is included by the linux build. -@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 +#if ! JUCE_MAC + #include + #include + #include +#endif BEGIN_JUCE_NAMESPACE -void FileChooser::showPlatformDialog (OwnedArray& results, - const String& title, - const File& currentFileOrDirectory, - const String& filter, - bool selectsDirectory, - bool isSaveDialogue, - bool warnAboutOverwritingExistingFiles, - bool selectMultipleFiles, - FilePreviewComponent* extraInfoComponent) +struct NamedPipeInternal { - const AutoPool pool; + String pipeInName, pipeOutName; + int pipeIn, pipeOut; - StringArray* filters = new StringArray(); - filters->addTokens (filter.replaceCharacters (T(",:"), T(";;")), T(";"), 0); - filters->trim(); - filters->removeEmptyStrings(); + bool volatile createdPipe, blocked, stopReadOperation; - 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 -/********* End of inlined file: juce_mac_FileChooser.mm *********/ - -/********* Start of inlined file: juce_mac_Fonts.mm *********/ - -#include - -BEGIN_JUCE_NAMESPACE - -static OSStatus pascal CubicMoveTo (const Float32Point *pt, - void* callBackDataPtr) -{ - Path* const p = (Path*) callBackDataPtr; - p->startNewSubPath (pt->x, pt->y); - - return noErr; -} - -static OSStatus pascal CubicLineTo (const Float32Point *pt, - void* callBackDataPtr) -{ - Path* const p = (Path*) callBackDataPtr; - p->lineTo (pt->x, pt->y); - - return noErr; -} - -static OSStatus pascal CubicCurveTo (const Float32Point *pt1, - const Float32Point *pt2, - const Float32Point *pt3, - void* callBackDataPtr) -{ - Path* const p = (Path*) callBackDataPtr; - p->cubicTo (pt1->x, pt1->y, - pt2->x, pt2->y, - pt3->x, pt3->y); - - return noErr; -} - -static OSStatus pascal CubicClosePath (void* callBackDataPtr) -{ - Path* const p = (Path*) callBackDataPtr; - p->closeSubPath(); - - return noErr; -} - -class ATSFontHelper -{ - ATSUFontID fontId; - ATSUStyle style; - - ATSCubicMoveToUPP moveToProc; - ATSCubicLineToUPP lineToProc; - ATSCubicCurveToUPP curveToProc; - ATSCubicClosePathUPP closePathProc; - - float totalSize, ascent; - - TextToUnicodeInfo encodingInfo; - -public: - String name; - bool isBold, isItalic; - float fontSize; - int refCount; - - ATSFontHelper (const String& name_, - const bool bold_, - const bool italic_, - const float size_) - : fontId (0), - name (name_), - isBold (bold_), - isItalic (italic_), - fontSize (size_), - refCount (1) - { - const char* const nameUtf8 = name_.toUTF8(); - - ATSUFindFontFromName (const_cast (nameUtf8), - strlen (nameUtf8), - kFontFullName, - kFontNoPlatformCode, - kFontNoScriptCode, - kFontNoLanguageCode, - &fontId); - - ATSUCreateStyle (&style); - - ATSUAttributeTag attTypes[] = { kATSUFontTag, - kATSUQDBoldfaceTag, - kATSUQDItalicTag, - kATSUSizeTag }; - - ByteCount attSizes[] = { sizeof (ATSUFontID), - sizeof (Boolean), - sizeof (Boolean), - sizeof (Fixed) }; - - Boolean bold = bold_, italic = italic_; - Fixed size = X2Fix (size_); - - ATSUAttributeValuePtr attValues[] = { &fontId, - &bold, - &italic, - &size }; - - ATSUSetAttributes (style, 4, attTypes, attSizes, attValues); - - moveToProc = NewATSCubicMoveToUPP (CubicMoveTo); - lineToProc = NewATSCubicLineToUPP (CubicLineTo); - curveToProc = NewATSCubicCurveToUPP (CubicCurveTo); - closePathProc = NewATSCubicClosePathUPP (CubicClosePath); - - ascent = 0.0f; - float kern, descent = 0.0f; - getPathAndKerning (T('N'), T('O'), 0, kern, &ascent, &descent); - totalSize = ascent + descent; - } - - ~ATSFontHelper() - { - ATSUDisposeStyle (style); - - DisposeATSCubicMoveToUPP (moveToProc); - DisposeATSCubicLineToUPP (lineToProc); - DisposeATSCubicCurveToUPP (curveToProc); - DisposeATSCubicClosePathUPP (closePathProc); - } - - bool getPathAndKerning (const juce_wchar char1, - const juce_wchar char2, - Path* path, - float& kerning, - float* ascent, - float* descent) - { - bool ok = false; - - UniChar buffer[4]; - buffer[0] = T(' '); - buffer[1] = char1; - buffer[2] = char2; - buffer[3] = 0; - - UniCharCount count = kATSUToTextEnd; - ATSUTextLayout layout; - OSStatus err = ATSUCreateTextLayoutWithTextPtr (buffer, - 0, - 2, - 2, - 1, - &count, - &style, - &layout); - if (err == noErr) - { - ATSUSetTransientFontMatching (layout, true); - - ATSLayoutRecord* layoutRecords; - ItemCount numRecords; - Fixed* deltaYs; - ItemCount numDeltaYs; - - ATSUDirectGetLayoutDataArrayPtrFromTextLayout (layout, - 0, - kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, - (void**) &layoutRecords, - &numRecords); - - ATSUDirectGetLayoutDataArrayPtrFromTextLayout (layout, - 0, - kATSUDirectDataBaselineDeltaFixedArray, - (void**) &deltaYs, - &numDeltaYs); - - if (numRecords > 2) - { - kerning = (float) (Fix2X (layoutRecords[2].realPos) - - Fix2X (layoutRecords[1].realPos)); - - if (ascent != 0) - { - ATSUTextMeasurement asc; - ByteCount actualSize; - - ATSUGetLineControl (layout, - 0, - kATSULineAscentTag, - sizeof (ATSUTextMeasurement), - &asc, - &actualSize); - - *ascent = (float) Fix2X (asc); - } - - if (descent != 0) - { - ATSUTextMeasurement desc; - ByteCount actualSize; - - ATSUGetLineControl (layout, - 0, - kATSULineDescentTag, - sizeof (ATSUTextMeasurement), - &desc, - &actualSize); - - *descent = (float) Fix2X (desc); - } - - if (path != 0) - { - OSStatus callbackResult; - - ok = (ATSUGlyphGetCubicPaths (style, - layoutRecords[1].glyphID, - moveToProc, - lineToProc, - curveToProc, - closePathProc, - (void*) path, - &callbackResult) == noErr); - - if (numDeltaYs > 0 && ok) - { - const float dy = (float) Fix2X (deltaYs[1]); - - path->applyTransform (AffineTransform::translation (0.0f, dy)); - } - } - else - { - ok = true; - } - } - - if (deltaYs != 0) - ATSUDirectReleaseLayoutDataArrayPtr (0, kATSUDirectDataBaselineDeltaFixedArray, - (void**) &deltaYs); - - if (layoutRecords != 0) - ATSUDirectReleaseLayoutDataArrayPtr (0, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, - (void**) &layoutRecords); - - ATSUDisposeTextLayout (layout); - } - - return kerning; - } - - float getAscent() - { - return ascent; - } - - float getTotalHeight() - { - return totalSize; - } - - juce_wchar getDefaultChar() - { - return 0; - } + static void signalHandler (int) {} }; -class ATSFontHelperCache : public Timer, - public DeletedAtShutdown +void NamedPipe::cancelPendingReads() { - VoidArray cache; - -public: - ATSFontHelperCache() + 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; } +} - ~ATSFontHelperCache() +void NamedPipe::close() +{ + NamedPipeInternal* const intern = (NamedPipeInternal*) internal; + + if (intern != 0) { - for (int i = cache.size(); --i >= 0;) + internal = 0; + + if (intern->pipeIn != -1) + ::close (intern->pipeIn); + + if (intern->pipeOut != -1) + ::close (intern->pipeOut); + + if (intern->createdPipe) { - ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i); - delete f; + unlink (intern->pipeInName); + unlink (intern->pipeOutName); } - clearSingletonInstance(); + delete intern; } +} - ATSFontHelper* getFont (const String& name, - const bool bold, - const bool italic, - const float size = 1024) +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) { - for (int i = cache.size(); --i >= 0;) + if ((mkfifo (intern->pipeInName, 0666) && errno != EEXIST) + || (mkfifo (intern->pipeOutName, 0666) && errno != EEXIST)) { - ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i); + delete intern; + internal = 0; - if (f->name == name - && f->isBold == bold - && f->isItalic == italic - && f->fontSize == size) - { - f->refCount++; - return f; - } - } - - ATSFontHelper* const f = new ATSFontHelper (name, bold, italic, size); - cache.add (f); - return f; - } - - void releaseFont (ATSFontHelper* f) - { - for (int i = cache.size(); --i >= 0;) - { - ATSFontHelper* const f2 = (ATSFontHelper*) cache.getUnchecked(i); - - if (f == f2) - { - f->refCount--; - - if (f->refCount == 0) - startTimer (5000); - - break; - } - } - } - - void timerCallback() - { - stopTimer(); - - for (int i = cache.size(); --i >= 0;) - { - ATSFontHelper* const f = (ATSFontHelper*) cache.getUnchecked(i); - - if (f->refCount == 0) - { - cache.remove (i); - delete f; - } - } - - if (cache.size() == 0) - delete this; - } - - juce_DeclareSingleton_SingleThreaded_Minimal (ATSFontHelperCache) -}; - -juce_ImplementSingleton_SingleThreaded (ATSFontHelperCache) - -void Typeface::initialiseTypefaceCharacteristics (const String& fontName, - bool bold, - bool italic, - bool addAllGlyphsToFont) throw() -{ - // This method is only safe to be called from the normal UI thread.. - jassert (MessageManager::getInstance()->isThisTheMessageThread()); - - ATSFontHelper* const helper = ATSFontHelperCache::getInstance() - ->getFont (fontName, bold, italic); - - clear(); - setAscent (helper->getAscent() / helper->getTotalHeight()); - setName (fontName); - setDefaultCharacter (helper->getDefaultChar()); - setBold (bold); - setItalic (italic); - - if (addAllGlyphsToFont) - { - //xxx - jassertfalse - } - - ATSFontHelperCache::getInstance()->releaseFont (helper); -} - -bool Typeface::findAndAddSystemGlyph (juce_wchar character) throw() -{ - // This method is only safe to be called from the normal UI thread.. - jassert (MessageManager::getInstance()->isThisTheMessageThread()); - - ATSFontHelper* const helper = ATSFontHelperCache::getInstance() - ->getFont (getName(), isBold(), isItalic()); - - Path path; - float width; - bool foundOne = false; - - if (helper->getPathAndKerning (character, T('I'), &path, width, 0, 0)) - { - path.applyTransform (AffineTransform::scale (1.0f / helper->getTotalHeight(), - 1.0f / helper->getTotalHeight())); - - addGlyph (character, path, width / helper->getTotalHeight()); - - for (int i = 0; i < glyphs.size(); ++i) - { - const TypefaceGlyphInfo* const g = (const TypefaceGlyphInfo*) glyphs.getUnchecked(i); - - float kerning; - if (helper->getPathAndKerning (character, g->getCharacter(), 0, kerning, 0, 0)) - { - kerning = (kerning - width) / helper->getTotalHeight(); - - if (kerning != 0) - addKerningPair (character, g->getCharacter(), kerning); - } - - if (helper->getPathAndKerning (g->getCharacter(), character, 0, kerning, 0, 0)) - { - kerning = kerning / helper->getTotalHeight() - g->width; - - if (kerning != 0) - addKerningPair (g->getCharacter(), character, kerning); - } - } - - foundOne = true; - } - - ATSFontHelperCache::getInstance()->releaseFont (helper); - return foundOne; -} - -const StringArray Font::findAllTypefaceNames() throw() -{ - StringArray names; - ATSFontIterator iter; - - if (ATSFontIteratorCreate (kATSFontContextGlobal, - 0, - 0, - kATSOptionFlagsRestrictedScope, - &iter) == noErr) - { - ATSFontRef font; - - while (ATSFontIteratorNext (iter, &font) == noErr) - { - CFStringRef name; - - if (ATSFontGetName (font, - kATSOptionFlagsDefault, - &name) == noErr) - { - const String nm (PlatformUtilities::cfStringToJuceString (name)); - - if (nm.isNotEmpty()) - names.add (nm); - - CFRelease (name); - } - } - - ATSFontIteratorRelease (&iter); - } - - // Use some totuous logic to eliminate bold/italic versions of fonts that we've already got - // a plain version of. This is only necessary because of Carbon's total lack of support - // for dealing with font families... - for (int j = names.size(); --j >= 0;) - { - const char* const endings[] = { " bold", " italic", " bold italic", " bolditalic", - " oblque", " bold oblique", " boldoblique" }; - - for (int i = 0; i < numElementsInArray (endings); ++i) - { - const String ending (endings[i]); - - if (names[j].endsWithIgnoreCase (ending)) - { - const String root (names[j].dropLastCharacters (ending.length()).trimEnd()); - - if (names.contains (root) - || names.contains (root + T(" plain"), true)) - { - names.remove (j); - break; - } - } - } - } - - names.sort (true); - return names; -} - -void Font::getDefaultFontNames (String& defaultSans, String& defaultSerif, String& defaultFixed) throw() -{ - defaultSans = "Lucida Grande"; - defaultSerif = "Times New Roman"; - defaultFixed = "Monaco"; -} - -END_JUCE_NAMESPACE -/********* End of inlined file: juce_mac_Fonts.mm *********/ - -/********* Start of inlined file: juce_mac_Messaging.mm *********/ - -#include - -BEGIN_JUCE_NAMESPACE - -#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 -/********* End of inlined file: juce_mac_Messaging.mm *********/ - -/********* Start of inlined file: juce_mac_WebBrowserComponent.mm *********/ - -#include -#include -#include -#include -#include - -BEGIN_JUCE_NAMESPACE - -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) 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 -/********* End of inlined file: juce_mac_WebBrowserComponent.mm *********/ - -/********* Start of inlined file: juce_mac_Windowing.mm *********/ - -#include -#include -#include -#include -#include -#include - -#if JUCE_OPENGL -#include -#endif - -BEGIN_JUCE_NAMESPACE - -#undef Point - -const WindowRegionCode windowRegionToUse = kWindowContentRgn; - -static HIObjectClassRef viewClassRef = 0; -static CFStringRef juceHiViewClassNameCFString = 0; -static ComponentPeer* juce_currentMouseTrackingPeer = 0; - -static VoidArray keysCurrentlyDown; - -bool KeyPress::isKeyCurrentlyDown (const int keyCode) throw() -{ - if (keysCurrentlyDown.contains ((void*) keyCode)) - return true; - - if (keyCode >= 'A' && keyCode <= 'Z' - && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toLowerCase ((tchar) keyCode))) - return true; - - if (keyCode >= 'a' && keyCode <= 'z' - && keysCurrentlyDown.contains ((void*) (int) CharacterFunctions::toUpperCase ((tchar) keyCode))) - return true; - - return false; -} - -static VoidArray minimisedWindows; - -static void setWindowMinimised (WindowRef ref, const bool isMinimised) -{ - if (isMinimised != minimisedWindows.contains (ref)) - CollapseWindow (ref, isMinimised); -} - -void juce_maximiseAllMinimisedWindows() -{ - const VoidArray minWin (minimisedWindows); - - for (int i = minWin.size(); --i >= 0;) - setWindowMinimised ((WindowRef) (minWin[i]), false); -} - -class HIViewComponentPeer; -static HIViewComponentPeer* currentlyFocusedPeer = 0; - -static int currentModifiers = 0; - -static void updateModifiers (EventRef theEvent) -{ - currentModifiers &= ~ (ModifierKeys::shiftModifier | ModifierKeys::ctrlModifier - | ModifierKeys::altModifier | ModifierKeys::commandModifier); - - UInt32 m; - - if (theEvent != 0) - GetEventParameter (theEvent, kEventParamKeyModifiers, typeUInt32, 0, sizeof(m), 0, &m); - else - m = GetCurrentEventKeyModifiers(); - - if ((m & (shiftKey | rightShiftKey)) != 0) - currentModifiers |= ModifierKeys::shiftModifier; - - if ((m & (controlKey | rightControlKey)) != 0) - currentModifiers |= ModifierKeys::ctrlModifier; - - if ((m & (optionKey | rightOptionKey)) != 0) - currentModifiers |= ModifierKeys::altModifier; - - if ((m & cmdKey) != 0) - currentModifiers |= ModifierKeys::commandModifier; -} - -void ModifierKeys::updateCurrentModifiers() throw() -{ - currentModifierFlags = currentModifiers; -} - -static int64 getEventTime (EventRef event) -{ - const int64 millis = (int64) (1000.0 * (event != 0 ? GetEventTime (event) - : GetCurrentEventTime())); - - static int64 offset = 0; - if (offset == 0) - offset = Time::currentTimeMillis() - millis; - - return offset + millis; -} - -class MacBitmapImage : public Image -{ -public: - - CGColorSpaceRef colourspace; - CGDataProviderRef provider; - - MacBitmapImage (const PixelFormat format_, - const int w, const int h, const bool clearImage) - : Image (format_, w, h) - { - jassert (format_ == RGB || format_ == ARGB); - - pixelStride = (format_ == RGB) ? 3 : 4; - - lineStride = (w * pixelStride + 3) & ~3; - const int imageSize = lineStride * h; - - if (clearImage) - imageData = (uint8*) juce_calloc (imageSize); - else - imageData = (uint8*) juce_malloc (imageSize); - - //colourspace = CGColorSpaceCreateWithName (kCGColorSpaceUserRGB); - - CMProfileRef prof; - CMGetSystemProfile (&prof); - colourspace = CGColorSpaceCreateWithPlatformColorSpace (prof); - provider = CGDataProviderCreateWithData (0, imageData, h * lineStride, 0); - CMCloseProfile (prof); - } - - MacBitmapImage::~MacBitmapImage() - { - CGDataProviderRelease (provider); - CGColorSpaceRelease (colourspace); - - juce_free (imageData); - imageData = 0; // to stop the base class freeing this - } - - void blitToContext (CGContextRef context, const float dx, const float dy) - { - CGImageRef tempImage = CGImageCreate (getWidth(), getHeight(), - 8, pixelStride << 3, lineStride, colourspace, -#if MACOS_10_3_OR_EARLIER || JUCE_BIG_ENDIAN - hasAlphaChannel() ? kCGImageAlphaPremultipliedFirst - : kCGImageAlphaNone, -#else - hasAlphaChannel() ? kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst - : kCGImageAlphaNone, -#endif - provider, 0, false, - kCGRenderingIntentDefault); - - HIRect r; - r.origin.x = dx; - r.origin.y = dy; - r.size.width = (float) getWidth(); - r.size.height = (float) getHeight(); - - HIViewDrawCGImage (context, &r, tempImage); - - CGImageRelease (tempImage); - } - - juce_UseDebuggingNewOperator -}; - -class MouseCheckTimer : private Timer, - private DeletedAtShutdown -{ -public: - MouseCheckTimer() - : lastX (0), - lastY (0) - { - lastPeerUnderMouse = 0; - resetMouseMoveChecker(); - -#if ! MACOS_10_2_OR_EARLIER - // Just putting this in here because it's a convenient object that'll get deleted at shutdown - CGDisplayRegisterReconfigurationCallback (&displayChangeCallback, 0); -#endif - } - - ~MouseCheckTimer() - { -#if ! MACOS_10_2_OR_EARLIER - CGDisplayRemoveReconfigurationCallback (&displayChangeCallback, 0); -#endif - - clearSingletonInstance(); - } - - juce_DeclareSingleton_SingleThreaded_Minimal (MouseCheckTimer) - - bool hasEverHadAMouseMove; - - void moved (HIViewComponentPeer* const peer) - { - if (hasEverHadAMouseMove) - startTimer (200); - - lastPeerUnderMouse = peer; - } - - void resetMouseMoveChecker() - { - hasEverHadAMouseMove = false; - startTimer (1000 / 16); - } - - void timerCallback(); - -private: - HIViewComponentPeer* lastPeerUnderMouse; - int lastX, lastY; - -#if ! MACOS_10_2_OR_EARLIER - static void displayChangeCallback (CGDirectDisplayID, CGDisplayChangeSummaryFlags flags, void*) - { - Desktop::getInstance().refreshMonitorSizes(); - } -#endif -}; - -juce_ImplementSingleton_SingleThreaded (MouseCheckTimer) - -#if JUCE_QUICKTIME -extern void OfferMouseClickToQuickTime (WindowRef window, ::Point where, long when, long modifiers, - Component* topLevelComp); -#endif - -class HIViewComponentPeer : public ComponentPeer, - private Timer -{ -public: - - HIViewComponentPeer (Component* const component, - const int windowStyleFlags, - HIViewRef viewToAttachTo) - : ComponentPeer (component, windowStyleFlags), - fullScreen (false), - isCompositingWindow (false), - windowRef (0), - viewRef (0) - { - repainter = new RepaintManager (this); - - eventHandlerRef = 0; - - if (viewToAttachTo != 0) - { - isSharedWindow = true; - } - else - { - isSharedWindow = false; - - WindowRef newWindow = createNewWindow (windowStyleFlags); - - GetRootControl (newWindow, (ControlRef*) &viewToAttachTo); - jassert (viewToAttachTo != 0); - - HIViewRef growBox = 0; - HIViewFindByID (HIViewGetRoot (newWindow), kHIViewWindowGrowBoxID, &growBox); - - if (growBox != 0) - HIGrowBoxViewSetTransparent (growBox, true); - } - - createNewHIView(); - - HIViewAddSubview (viewToAttachTo, viewRef); - HIViewSetVisible (viewRef, component->isVisible()); - - setTitle (component->getName()); - - if (component->isVisible() && ! isSharedWindow) - { - ShowWindow (windowRef); - ActivateWindow (windowRef, component->getWantsKeyboardFocus()); - } - } - - ~HIViewComponentPeer() - { - minimisedWindows.removeValue (windowRef); - - if (IsValidWindowPtr (windowRef)) - { - if (! isSharedWindow) - { - CFRelease (viewRef); - viewRef = 0; - - DisposeWindow (windowRef); - } - else - { - if (eventHandlerRef != 0) - RemoveEventHandler (eventHandlerRef); - - CFRelease (viewRef); - viewRef = 0; - } - - windowRef = 0; - } - - if (currentlyFocusedPeer == this) - currentlyFocusedPeer = 0; - - delete repainter; - } - - void* getNativeHandle() const - { - return windowRef; - } - - void setVisible (bool shouldBeVisible) - { - HIViewSetVisible (viewRef, shouldBeVisible); - - if ((! isSharedWindow) && IsValidWindowPtr (windowRef)) - { - if (shouldBeVisible) - ShowWindow (windowRef); - else - HideWindow (windowRef); - - resizeViewToFitWindow(); - - // If nothing else is focused, then grab the focus too - if (shouldBeVisible - && Component::getCurrentlyFocusedComponent() == 0 - && Process::isForegroundProcess()) - { - component->toFront (true); - } - } - } - - void setTitle (const String& title) - { - if ((! isSharedWindow) && IsValidWindowPtr (windowRef)) - { - CFStringRef t = PlatformUtilities::juceStringToCFString (title); - SetWindowTitleWithCFString (windowRef, t); - CFRelease (t); - } - } - - void setPosition (int x, int y) - { - if (isSharedWindow) - { - HIViewPlaceInSuperviewAt (viewRef, x, y); - } - else if (IsValidWindowPtr (windowRef)) - { - Rect r; - GetWindowBounds (windowRef, windowRegionToUse, &r); - r.right += x - r.left; - r.bottom += y - r.top; - r.left = x; - r.top = y; - SetWindowBounds (windowRef, windowRegionToUse, &r); - } - } - - void setSize (int w, int h) - { - w = jmax (0, w); - h = jmax (0, h); - - if (w != getComponent()->getWidth() - || h != getComponent()->getHeight()) - { - repainter->repaint (0, 0, w, h); - } - - if (isSharedWindow) - { - HIRect r; - HIViewGetFrame (viewRef, &r); - r.size.width = (float) w; - r.size.height = (float) h; - HIViewSetFrame (viewRef, &r); - } - else if (IsValidWindowPtr (windowRef)) - { - Rect r; - GetWindowBounds (windowRef, windowRegionToUse, &r); - r.right = r.left + w; - r.bottom = r.top + h; - SetWindowBounds (windowRef, windowRegionToUse, &r); - } - } - - void setBounds (int x, int y, int w, int h, const bool isNowFullScreen) - { - fullScreen = isNowFullScreen; - w = jmax (0, w); - h = jmax (0, h); - - if (w != getComponent()->getWidth() - || h != getComponent()->getHeight()) - { - repainter->repaint (0, 0, w, h); - } - - if (isSharedWindow) - { - HIRect r; - r.origin.x = (float) x; - r.origin.y = (float) y; - r.size.width = (float) w; - r.size.height = (float) h; - HIViewSetFrame (viewRef, &r); - } - else if (IsValidWindowPtr (windowRef)) - { - Rect r; - r.left = x; - r.top = y; - r.right = x + w; - r.bottom = y + h; - SetWindowBounds (windowRef, windowRegionToUse, &r); - } - } - - void getBounds (int& x, int& y, int& w, int& h, const bool global) const - { - HIRect hiViewPos; - HIViewGetFrame (viewRef, &hiViewPos); - - if (global) - { - HIViewRef content = 0; - HIViewFindByID (HIViewGetRoot (windowRef), kHIViewWindowContentID, &content); - HIPoint p = { 0.0f, 0.0f }; - HIViewConvertPoint (&p, viewRef, content); - - x = (int) p.x; - y = (int) p.y; - - if (IsValidWindowPtr (windowRef)) - { - Rect windowPos; - GetWindowBounds (windowRef, kWindowContentRgn, &windowPos); - - x += windowPos.left; - y += windowPos.top; - } - } - else - { - x = (int) hiViewPos.origin.x; - y = (int) hiViewPos.origin.y; - } - - w = (int) hiViewPos.size.width; - h = (int) hiViewPos.size.height; - } - - void getBounds (int& x, int& y, int& w, int& h) const - { - getBounds (x, y, w, h, ! isSharedWindow); - } - - int getScreenX() const - { - int x, y, w, h; - getBounds (x, y, w, h, true); - return x; - } - - int getScreenY() const - { - int x, y, w, h; - getBounds (x, y, w, h, true); - return y; - } - - void relativePositionToGlobal (int& x, int& y) - { - int wx, wy, ww, wh; - getBounds (wx, wy, ww, wh, true); - - x += wx; - y += wy; - } - - void globalPositionToRelative (int& x, int& y) - { - int wx, wy, ww, wh; - getBounds (wx, wy, ww, wh, true); - - x -= wx; - y -= wy; - } - - void setMinimised (bool shouldBeMinimised) - { - if (! isSharedWindow) - setWindowMinimised (windowRef, shouldBeMinimised); - } - - bool isMinimised() const - { - return minimisedWindows.contains (windowRef); - } - - void setFullScreen (bool shouldBeFullScreen) - { - if (! isSharedWindow) - { - Rectangle r (lastNonFullscreenBounds); - - setMinimised (false); - - if (fullScreen != shouldBeFullScreen) - { - if (shouldBeFullScreen) - r = Desktop::getInstance().getMainMonitorArea(); - - // (can't call the component's setBounds method because that'll reset our fullscreen flag) - if (r != getComponent()->getBounds() && ! r.isEmpty()) - setBounds (r.getX(), r.getY(), r.getWidth(), r.getHeight(), shouldBeFullScreen); - } - } - } - - bool isFullScreen() const - { - return fullScreen; - } - - bool contains (int x, int y, bool trueIfInAChildWindow) const - { - if (((unsigned int) x) >= (unsigned int) component->getWidth() - || ((unsigned int) y) >= (unsigned int) component->getHeight() - || ! IsValidWindowPtr (windowRef)) return false; - - Rect r; - GetWindowBounds (windowRef, windowRegionToUse, &r); - - ::Point p; - p.h = r.left + x; - p.v = r.top + y; - - WindowRef ref2 = 0; - FindWindow (p, &ref2); - - if (windowRef != ref2) - return false; - - if (trueIfInAChildWindow) - return true; - - HIPoint p2; - p2.x = (float) x; - p2.y = (float) y; - HIViewRef hit; - - HIViewGetSubviewHit (viewRef, &p2, true, &hit); - return hit == 0 || hit == viewRef; - } - - const BorderSize getFrameSize() const - { - return BorderSize(); - } - - bool setAlwaysOnTop (bool alwaysOnTop) - { - // can't do this so return false and let the component create a new window - return false; - } - - void toFront (bool makeActiveWindow) - { - makeActiveWindow = makeActiveWindow - && component->isValidComponent() - && (component->getWantsKeyboardFocus() - || component->isCurrentlyModal()); - - if (windowRef != FrontWindow() - || (makeActiveWindow && ! IsWindowActive (windowRef)) - || ! Process::isForegroundProcess()) - { - if (! Process::isForegroundProcess()) - { - ProcessSerialNumber psn; - GetCurrentProcess (&psn); - SetFrontProcessWithOptions (&psn, kSetFrontProcessFrontWindowOnly); - } - - if (IsValidWindowPtr (windowRef)) - { - if (makeActiveWindow) - { - SelectWindow (windowRef); - SetUserFocusWindow (windowRef); - HIViewAdvanceFocus (viewRef, 0); - } - else - { - BringToFront (windowRef); - } - - handleBroughtToFront(); - } } } - void toBehind (ComponentPeer* other) - { - HIViewComponentPeer* const otherWindow = dynamic_cast (other); - - if (other != 0 && windowRef != 0 && otherWindow->windowRef != 0) - { - if (windowRef == otherWindow->windowRef) - { - HIViewSetZOrder (viewRef, kHIViewZOrderBelow, otherWindow->viewRef); - } - else - { - SendBehind (windowRef, otherWindow->windowRef); - } - } - } - - void setIcon (const Image& /*newIcon*/) - { - // to do.. - } - - void viewFocusGain() - { - const MessageManagerLock messLock; - - if (currentlyFocusedPeer != this) - { - if (ComponentPeer::isValidPeer (currentlyFocusedPeer)) - currentlyFocusedPeer->handleFocusLoss(); - - currentlyFocusedPeer = this; - - handleFocusGain(); - } - } - - void viewFocusLoss() - { - if (currentlyFocusedPeer == this) - { - currentlyFocusedPeer = 0; - handleFocusLoss(); - } - } - - bool isFocused() const - { - return windowRef == GetUserFocusWindow() - && HIViewSubtreeContainsFocus (viewRef); - } - - void grabFocus() - { - if ((! isFocused()) && IsValidWindowPtr (windowRef)) - { - SetUserFocusWindow (windowRef); - HIViewAdvanceFocus (viewRef, 0); - } - } - - void textInputRequired (int /*x*/, int /*y*/) - { - } - - void repaint (int x, int y, int w, int h) - { - if (Rectangle::intersectRectangles (x, y, w, h, - 0, 0, - getComponent()->getWidth(), - getComponent()->getHeight())) - { - if ((getStyleFlags() & windowRepaintedExplictly) == 0) - { - if (isCompositingWindow) - { -#if MACOS_10_3_OR_EARLIER - RgnHandle rgn = NewRgn(); - SetRectRgn (rgn, x, y, x + w, y + h); - HIViewSetNeedsDisplayInRegion (viewRef, rgn, true); - DisposeRgn (rgn); -#else - HIRect r; - r.origin.x = x; - r.origin.y = y; - r.size.width = w; - r.size.height = h; - - HIViewSetNeedsDisplayInRect (viewRef, &r, true); -#endif - } - else - { - if (! isTimerRunning()) - startTimer (20); - } - } - - repainter->repaint (x, y, w, h); - } - } - - void timerCallback() - { - performAnyPendingRepaintsNow(); - } - - void performAnyPendingRepaintsNow() - { - stopTimer(); - - if (component->isVisible()) - { -#if MACOS_10_2_OR_EARLIER - if (! isCompositingWindow) - { - Rect w; - GetWindowBounds (windowRef, windowRegionToUse, &w); - - const int offsetInWindowX = component->getScreenX() - getScreenX(); - const int offsetInWindowY = component->getScreenY() - getScreenY(); - - for (RectangleList::Iterator i (repainter->getRegionsNeedingRepaint()); i.next();) - { - const Rectangle& r = *i.getRectangle(); - w.left = offsetInWindowX + r.getX(); - w.top = offsetInWindowY + r.getY(); - w.right = offsetInWindowX + r.getRight(); - w.bottom = offsetInWindowY + r.getBottom(); - InvalWindowRect (windowRef, &w); - } - } - else - { - EventRef theEvent; - - EventTypeSpec eventTypes[1]; - eventTypes[0].eventClass = kEventClassControl; - eventTypes[0].eventKind = kEventControlDraw; - - int n = 3; - while (--n >= 0 - && ReceiveNextEvent (1, eventTypes, kEventDurationNoWait, true, &theEvent) == noErr) - { - if (GetEventClass (theEvent) == kEventClassAppleEvent) - { - EventRecord eventRec; - if (ConvertEventRefToEventRecord (theEvent, &eventRec)) - AEProcessAppleEvent (&eventRec); - } - else - { - EventTargetRef theTarget = GetEventDispatcherTarget(); - SendEventToEventTarget (theEvent, theTarget); - } - - ReleaseEvent (theEvent); - } - } -#else - if (HIViewGetNeedsDisplay (viewRef) || repainter->isRepaintNeeded()) - HIViewRender (viewRef); -#endif - } - } - - juce_UseDebuggingNewOperator - - WindowRef windowRef; - HIViewRef viewRef; - -private: - EventHandlerRef eventHandlerRef; - bool fullScreen, isSharedWindow, isCompositingWindow; - StringArray dragAndDropFiles; - - class RepaintManager : public Timer - { -public: - RepaintManager (HIViewComponentPeer* const peer_) - : peer (peer_), - image (0) - { - } - - ~RepaintManager() - { - delete image; - } - - void timerCallback() - { - stopTimer(); - deleteAndZero (image); - } - - void repaint (int x, int y, int w, int h) - { - regionsNeedingRepaint.add (x, y, w, h); - } - - bool isRepaintNeeded() const throw() - { - return ! regionsNeedingRepaint.isEmpty(); - } - - void repaintAnyRemainingRegions() - { - // if any regions have been invaldated during the paint callback, - // we need to repaint them explicitly because the mac throws this - // stuff away - for (RectangleList::Iterator i (regionsNeedingRepaint); i.next();) - { - const Rectangle& r = *i.getRectangle(); - peer->repaint (r.getX(), r.getY(), r.getWidth(), r.getHeight()); - } - } - - void paint (CGContextRef cgContext, int x, int y, int w, int h) - { - if (w > 0 && h > 0) - { - bool refresh = false; - int imW = image != 0 ? image->getWidth() : 0; - int imH = image != 0 ? image->getHeight() : 0; - - if (imW < w || imH < h) - { - imW = jmin (peer->getComponent()->getWidth(), (w + 31) & ~31); - imH = jmin (peer->getComponent()->getHeight(), (h + 31) & ~31); - - delete image; - image = new MacBitmapImage (peer->getComponent()->isOpaque() ? Image::RGB - : Image::ARGB, - imW, imH, false); - - refresh = true; - } - else if (imageX > x || imageY > y - || imageX + imW < x + w - || imageY + imH < y + h) - { - refresh = true; - } - - if (refresh) - { - regionsNeedingRepaint.clear(); - regionsNeedingRepaint.addWithoutMerging (Rectangle (x, y, imW, imH)); - imageX = x; - imageY = y; - } - - LowLevelGraphicsSoftwareRenderer context (*image); - context.setOrigin (-imageX, -imageY); - - if (context.reduceClipRegion (regionsNeedingRepaint)) - { - regionsNeedingRepaint.clear(); - - if (! peer->getComponent()->isOpaque()) - { - for (RectangleList::Iterator i (*context.getRawClipRegion()); i.next();) - { - const Rectangle& r = *i.getRectangle(); - image->clear (r.getX(), r.getY(), r.getWidth(), r.getHeight()); - } - } - - regionsNeedingRepaint.clear(); - peer->clearMaskedRegion(); - peer->handlePaint (context); - } - else - { - regionsNeedingRepaint.clear(); - } - - if (! peer->maskedRegion.isEmpty()) - { - RectangleList total (Rectangle (x, y, w, h)); - total.subtract (peer->maskedRegion); - - CGRect* rects = (CGRect*) juce_malloc (sizeof (CGRect) * total.getNumRectangles()); - int n = 0; - - for (RectangleList::Iterator i (total); i.next();) - { - const Rectangle& r = *i.getRectangle(); - rects[n].origin.x = (int) r.getX(); - rects[n].origin.y = (int) r.getY(); - rects[n].size.width = roundFloatToInt (r.getWidth()); - rects[n++].size.height = roundFloatToInt (r.getHeight()); - } - - CGContextClipToRects (cgContext, rects, n); - juce_free (rects); - } - - if (peer->isSharedWindow) - { - CGRect clip; - clip.origin.x = x; - clip.origin.y = y; - clip.size.width = jmin (w, peer->getComponent()->getWidth() - x); - clip.size.height = jmin (h, peer->getComponent()->getHeight() - y); - - CGContextClipToRect (cgContext, clip); - } - - image->blitToContext (cgContext, imageX, imageY); - } - - startTimer (3000); - } - - private: - HIViewComponentPeer* const peer; - MacBitmapImage* image; - int imageX, imageY; - RectangleList regionsNeedingRepaint; - - RepaintManager (const RepaintManager&); - const RepaintManager& operator= (const RepaintManager&); - }; - - RepaintManager* repainter; - - friend class RepaintManager; - - static OSStatus handleFrameRepaintEvent (EventHandlerCallRef myHandler, - EventRef theEvent, - void* userData) - { - // don't draw the frame.. - return noErr; - } - - OSStatus handleKeyEvent (EventRef theEvent, juce_wchar textCharacter) - { - updateModifiers (theEvent); - - UniChar unicodeChars [4]; - zeromem (unicodeChars, sizeof (unicodeChars)); - GetEventParameter (theEvent, kEventParamKeyUnicodes, typeUnicodeText, 0, sizeof (unicodeChars), 0, unicodeChars); - - int keyCode = (int) (unsigned int) unicodeChars[0]; - - UInt32 rawKey = 0; - GetEventParameter (theEvent, kEventParamKeyCode, typeUInt32, 0, sizeof (UInt32), 0, &rawKey); - - if ((currentModifiers & ModifierKeys::ctrlModifier) != 0 - && keyCode >= 1 && keyCode <= 26) - { - keyCode += ('A' - 1); - } - else - { - static const int keyTranslations[] = - { - 0, 's', 'd', 'f', 'h', 'g', 'z', 'x', 'c', 'v', 0xa7, 'b', - 'q', 'w', 'e', 'r', 'y', 't', '1', '2', '3', '4', '6', '5', - '=', '9', '7', '-', '8', '0', ']', 'o', 'u', '[', 'i', 'p', - KeyPress::returnKey, 'l', 'j', '\'', 'k', ';', '\\', ',', '/', - 'n', 'm', '.', 0, KeyPress::spaceKey, '`', KeyPress::backspaceKey, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, KeyPress::numberPadDecimalPoint, - 0, KeyPress::numberPadMultiply, 0, KeyPress::numberPadAdd, - 0, KeyPress::numberPadDelete, 0, 0, 0, KeyPress::numberPadDivide, KeyPress::returnKey, - 0, KeyPress::numberPadSubtract, 0, 0, KeyPress::numberPadEquals, KeyPress::numberPad0, - KeyPress::numberPad1, KeyPress::numberPad2, KeyPress::numberPad3, - KeyPress::numberPad4, KeyPress::numberPad5, KeyPress::numberPad6, - KeyPress::numberPad7, 0, KeyPress::numberPad8, KeyPress::numberPad9, - 0, 0, 0, KeyPress::F5Key, KeyPress::F6Key, KeyPress::F7Key, KeyPress::F3Key, - KeyPress::F8Key, KeyPress::F9Key, 0, KeyPress::F11Key, 0, KeyPress::F13Key, - KeyPress::F16Key, KeyPress::F14Key, 0, KeyPress::F10Key, 0, KeyPress::F12Key, - 0, KeyPress::F15Key, 0, KeyPress::homeKey, KeyPress::pageUpKey, 0, KeyPress::F4Key, - KeyPress::endKey, KeyPress::F2Key, KeyPress::pageDownKey, KeyPress::F1Key, - KeyPress::leftKey, KeyPress::rightKey, KeyPress::downKey, KeyPress::upKey, 0 - }; - - if (((unsigned int) rawKey) < (unsigned int) numElementsInArray (keyTranslations) - && keyTranslations [rawKey] != 0) - { - keyCode = keyTranslations [rawKey]; - } - - if ((rawKey == 0 && textCharacter != 0) - || (CharacterFunctions::isLetterOrDigit ((juce_wchar) keyCode) - && CharacterFunctions::isLetterOrDigit (textCharacter))) // correction for azerty-type layouts.. - { - keyCode = CharacterFunctions::toLowerCase (textCharacter); - } - } - - if ((currentModifiers & (ModifierKeys::commandModifier | ModifierKeys::ctrlModifier)) != 0) - textCharacter = 0; - - static juce_wchar lastTextCharacter = 0; - - switch (GetEventKind (theEvent)) - { - case kEventRawKeyDown: - { - keysCurrentlyDown.addIfNotAlreadyThere ((void*) keyCode); - lastTextCharacter = textCharacter; - - const bool used1 = handleKeyUpOrDown(); - const bool used2 = handleKeyPress (keyCode, textCharacter); - - if (used1 || used2) - return noErr; - - break; - } - - case kEventRawKeyUp: - keysCurrentlyDown.removeValue ((void*) keyCode); - lastTextCharacter = 0; - if (handleKeyUpOrDown()) - return noErr; - - break; - - case kEventRawKeyRepeat: - if (handleKeyPress (keyCode, lastTextCharacter)) - return noErr; - - break; - - case kEventRawKeyModifiersChanged: - handleModifierKeysChange(); - break; - - default: - jassertfalse - break; - } - - return eventNotHandledErr; - } - - OSStatus handleTextInputEvent (EventRef theEvent) - { - UInt32 numBytesRequired = 0; - GetEventParameter (theEvent, kEventParamTextInputSendText, typeUnicodeText, 0, 0, &numBytesRequired, 0); - - MemoryBlock buffer (numBytesRequired, true); - UniChar* const uc = (UniChar*) buffer.getData(); - GetEventParameter (theEvent, kEventParamTextInputSendText, typeUnicodeText, 0, numBytesRequired, &numBytesRequired, uc); - - EventRef originalEvent; - GetEventParameter (theEvent, kEventParamTextInputSendKeyboardEvent, typeEventRef, 0, sizeof (originalEvent), 0, &originalEvent); - - OSStatus res = noErr; - for (int i = 0; i < numBytesRequired / sizeof (UniChar); ++i) - res = handleKeyEvent (originalEvent, (juce_wchar) uc[i]); - - return res; - } - - OSStatus handleMouseEvent (EventHandlerCallRef callRef, EventRef theEvent) - { - MouseCheckTimer::getInstance()->moved (this); - - ::Point where; - GetEventParameter (theEvent, kEventParamMouseLocation, typeQDPoint, 0, sizeof (::Point), 0, &where); - int x = where.h; - int y = where.v; - globalPositionToRelative (x, y); - - int64 time = getEventTime (theEvent); - - switch (GetEventKind (theEvent)) - { - case kEventMouseMoved: - MouseCheckTimer::getInstance()->hasEverHadAMouseMove = true; - updateModifiers (theEvent); - handleMouseMove (x, y, time); - break; - - case kEventMouseDragged: - updateModifiers (theEvent); - handleMouseDrag (x, y, time); - break; - - case kEventMouseDown: - { - if (! Process::isForegroundProcess()) - { - ProcessSerialNumber psn; - GetCurrentProcess (&psn); - SetFrontProcessWithOptions (&psn, kSetFrontProcessFrontWindowOnly); - - toFront (true); - } - -#if JUCE_QUICKTIME - { - long mods; - GetEventParameter (theEvent, kEventParamKeyModifiers, typeUInt32, 0, sizeof (mods), 0, &mods); - - ::Point where; - GetEventParameter (theEvent, kEventParamMouseLocation, typeQDPoint, 0, sizeof (::Point), 0, &where); - - OfferMouseClickToQuickTime (windowRef, where, EventTimeToTicks (GetEventTime (theEvent)), mods, component); - } -#endif - - if (component->isBroughtToFrontOnMouseClick() - && ! component->isCurrentlyBlockedByAnotherModalComponent()) - { - //ActivateWindow (windowRef, true); - SelectWindow (windowRef); - } - - EventMouseButton button; - GetEventParameter (theEvent, kEventParamMouseButton, typeMouseButton, 0, sizeof (EventMouseButton), 0, &button); - - // need to clear all these flags because sometimes the mac can swallow (right) mouse-up events and - // this makes a button get stuck down. Since there's no other way to tell what buttons are down, - // this is all I can think of doing about it.. - currentModifiers &= ~(ModifierKeys::leftButtonModifier | ModifierKeys::rightButtonModifier | ModifierKeys::middleButtonModifier); - - if (button == kEventMouseButtonPrimary) - currentModifiers |= ModifierKeys::leftButtonModifier; - else if (button == kEventMouseButtonSecondary) - currentModifiers |= ModifierKeys::rightButtonModifier; - else if (button == kEventMouseButtonTertiary) - currentModifiers |= ModifierKeys::middleButtonModifier; - - updateModifiers (theEvent); - - juce_currentMouseTrackingPeer = this; // puts the message dispatcher into mouse-tracking mode.. - handleMouseDown (x, y, time); - break; - } - - case kEventMouseUp: - { - const int oldModifiers = currentModifiers; - - EventMouseButton button; - GetEventParameter (theEvent, kEventParamMouseButton, typeMouseButton, 0, sizeof (EventMouseButton), 0, &button); - - if (button == kEventMouseButtonPrimary) - currentModifiers &= ~ModifierKeys::leftButtonModifier; - else if (button == kEventMouseButtonSecondary) - currentModifiers &= ~ModifierKeys::rightButtonModifier; - - updateModifiers (theEvent); - - juce_currentMouseTrackingPeer = 0; - handleMouseUp (oldModifiers, x, y, time); - break; - } - - case kEventMouseWheelMoved: - { - EventMouseWheelAxis axis; - GetEventParameter (theEvent, kEventParamMouseWheelAxis, typeMouseWheelAxis, 0, sizeof (axis), 0, &axis); - - SInt32 delta; - GetEventParameter (theEvent, kEventParamMouseWheelDelta, - typeLongInteger, 0, sizeof (delta), 0, &delta); - - updateModifiers (theEvent); - - handleMouseWheel (axis == kEventMouseWheelAxisX ? delta * 10 : 0, - axis == kEventMouseWheelAxisX ? 0 : delta * 10, - time); - - break; - } - } - - return noErr; - } - - void doDragDropEnter (EventRef theEvent) - { - updateDragAndDropFileList (theEvent); - - if (dragAndDropFiles.size() > 0) - { - int x, y; - component->getMouseXYRelative (x, y); - handleFileDragMove (dragAndDropFiles, x, y); - } - } - - void doDragDropMove (EventRef theEvent) - { - if (dragAndDropFiles.size() > 0) - { - int x, y; - component->getMouseXYRelative (x, y); - handleFileDragMove (dragAndDropFiles, x, y); - } - } - - void doDragDropExit (EventRef theEvent) - { - if (dragAndDropFiles.size() > 0) - handleFileDragExit (dragAndDropFiles); - } - - void doDragDrop (EventRef theEvent) - { - updateDragAndDropFileList (theEvent); - - if (dragAndDropFiles.size() > 0) - { - int x, y; - component->getMouseXYRelative (x, y); - handleFileDragDrop (dragAndDropFiles, x, y); - } - } - - void updateDragAndDropFileList (EventRef theEvent) - { - dragAndDropFiles.clear(); - - DragRef dragRef; - if (GetEventParameter (theEvent, kEventParamDragRef, typeDragRef, 0, sizeof (dragRef), 0, &dragRef) == noErr) - { - UInt16 numItems = 0; - if (CountDragItems (dragRef, &numItems) == noErr) - { - for (int i = 0; i < (int) numItems; ++i) - { - DragItemRef ref; - - if (GetDragItemReferenceNumber (dragRef, i + 1, &ref) == noErr) - { - const FlavorType flavorType = kDragFlavorTypeHFS; - - Size size = 0; - if (GetFlavorDataSize (dragRef, ref, flavorType, &size) == noErr) - { - void* data = juce_calloc (size); - - if (GetFlavorData (dragRef, ref, flavorType, data, &size, 0) == noErr) - { - HFSFlavor* f = (HFSFlavor*) data; - FSRef fsref; - - if (FSpMakeFSRef (&f->fileSpec, &fsref) == noErr) - { - const String path (PlatformUtilities::makePathFromFSRef (&fsref)); - - if (path.isNotEmpty()) - dragAndDropFiles.add (path); - } - } - - juce_free (data); - } - } - } - - dragAndDropFiles.trim(); - dragAndDropFiles.removeEmptyStrings(); - } - } - } - - void resizeViewToFitWindow() - { - HIRect r; - - if (isSharedWindow) - { - HIViewGetFrame (viewRef, &r); - r.size.width = (float) component->getWidth(); - r.size.height = (float) component->getHeight(); - } - else - { - r.origin.x = 0; - r.origin.y = 0; - - Rect w; - GetWindowBounds (windowRef, windowRegionToUse, &w); - - r.size.width = (float) (w.right - w.left); - r.size.height = (float) (w.bottom - w.top); - } - - HIViewSetFrame (viewRef, &r); - -#if MACOS_10_3_OR_EARLIER - component->repaint(); -#endif - } - - OSStatus hiViewDraw (EventRef theEvent) - { - CGContextRef context = 0; - GetEventParameter (theEvent, kEventParamCGContextRef, typeCGContextRef, 0, sizeof (CGContextRef), 0, &context); - - CGrafPtr oldPort; - CGrafPtr port = 0; - - if (context == 0) - { - GetEventParameter (theEvent, kEventParamGrafPort, typeGrafPtr, 0, sizeof (CGrafPtr), 0, &port); - - GetPort (&oldPort); - SetPort (port); - - if (port != 0) - QDBeginCGContext (port, &context); - - if (! isCompositingWindow) - { - Rect bounds; - GetWindowBounds (windowRef, windowRegionToUse, &bounds); - CGContextTranslateCTM (context, 0, bounds.bottom - bounds.top); - CGContextScaleCTM (context, 1.0, -1.0); - } - - if (isSharedWindow) - { - // NB - Had terrible problems trying to correctly get the position - // of this view relative to the window, and this seems wrong, but - // works better than any other method I've tried.. - HIRect hiViewPos; - HIViewGetFrame (viewRef, &hiViewPos); - CGContextTranslateCTM (context, hiViewPos.origin.x, hiViewPos.origin.y); - } - } - -#if MACOS_10_2_OR_EARLIER - RgnHandle rgn = 0; - GetEventParameter (theEvent, kEventParamRgnHandle, typeQDRgnHandle, 0, sizeof (RgnHandle), 0, &rgn); - - CGRect clip; - - // (avoid doing this in plugins because of some strange redraw bugs..) - if (rgn != 0 && JUCEApplication::getInstance() != 0) - { - Rect bounds; - GetRegionBounds (rgn, &bounds); - clip.origin.x = bounds.left; - clip.origin.y = bounds.top; - clip.size.width = bounds.right - bounds.left; - clip.size.height = bounds.bottom - bounds.top; - } - else - { - HIViewGetBounds (viewRef, &clip); - clip.origin.x = 0; - clip.origin.y = 0; - } -#else - CGRect clip (CGContextGetClipBoundingBox (context)); -#endif - - clip = CGRectIntegral (clip); - - if (clip.origin.x < 0) - { - clip.size.width += clip.origin.x; - clip.origin.x = 0; - } - - if (clip.origin.y < 0) - { - clip.size.height += clip.origin.y; - clip.origin.y = 0; - } - - if (! component->isOpaque()) - CGContextClearRect (context, clip); - - repainter->paint (context, - (int) clip.origin.x, (int) clip.origin.y, - (int) clip.size.width, (int) clip.size.height); - - if (port != 0) - { - CGContextFlush (context); - QDEndCGContext (port, &context); - - SetPort (oldPort); - } - - repainter->repaintAnyRemainingRegions(); - - return noErr; - } - - OSStatus handleWindowClassEvent (EventRef theEvent) - { - switch (GetEventKind (theEvent)) - { - case kEventWindowBoundsChanged: - resizeViewToFitWindow(); - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowBoundsChanging: - if ((styleFlags & (windowIsResizable | windowHasTitleBar)) == (windowIsResizable | windowHasTitleBar)) - { - UInt32 atts = 0; - GetEventParameter (theEvent, kEventParamAttributes, typeUInt32, - 0, sizeof (UInt32), 0, &atts); - - if ((atts & (kWindowBoundsChangeUserDrag | kWindowBoundsChangeUserResize)) != 0) - { - if (component->isCurrentlyBlockedByAnotherModalComponent()) - { - Component* const modal = Component::getCurrentlyModalComponent(); - if (modal != 0) - { - static uint32 lastDragTime = 0; - const uint32 now = Time::currentTimeMillis(); - - if (now > lastDragTime + 1000) - { - lastDragTime = now; - modal->inputAttemptWhenModal(); - } - - const Rectangle currentRect (getComponent()->getBounds()); - Rect current; - current.left = currentRect.getX(); - current.top = currentRect.getY(); - current.right = currentRect.getRight(); - current.bottom = currentRect.getBottom(); - - // stop the window getting dragged.. - SetEventParameter (theEvent, kEventParamCurrentBounds, typeQDRectangle, - sizeof (Rect), ¤t); - - return noErr; - } - } - - if ((atts & kWindowBoundsChangeUserResize) != 0 - && constrainer != 0 && ! isSharedWindow) - { - Rect current; - GetEventParameter (theEvent, kEventParamCurrentBounds, typeQDRectangle, - 0, sizeof (Rect), 0, ¤t); - - int x = current.left; - int y = current.top; - int w = current.right - current.left; - int h = current.bottom - current.top; - - const Rectangle currentRect (getComponent()->getBounds()); - - constrainer->checkBounds (x, y, w, h, currentRect, - Desktop::getInstance().getAllMonitorDisplayAreas().getBounds(), - y != currentRect.getY() && y + h == currentRect.getBottom(), - x != currentRect.getX() && x + w == currentRect.getRight(), - y == currentRect.getY() && y + h != currentRect.getBottom(), - x == currentRect.getX() && x + w != currentRect.getRight()); - - current.left = x; - current.top = y; - current.right = x + w; - current.bottom = y + h; - - SetEventParameter (theEvent, kEventParamCurrentBounds, typeQDRectangle, - sizeof (Rect), ¤t); - - return noErr; - } - } - } - break; - - case kEventWindowFocusAcquired: - keysCurrentlyDown.clear(); - - if ((! isSharedWindow) || HIViewSubtreeContainsFocus (viewRef)) - viewFocusGain(); - - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowFocusRelinquish: - keysCurrentlyDown.clear(); - viewFocusLoss(); - - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowCollapsed: - minimisedWindows.addIfNotAlreadyThere (windowRef); - handleMovedOrResized(); - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowExpanded: - minimisedWindows.removeValue (windowRef); - handleMovedOrResized(); - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowShown: - break; // allow other handlers in the event chain to also get a look at the events - - case kEventWindowClose: - if (isSharedWindow) - break; // break to let the OS delete the window - - handleUserClosingWindow(); - return noErr; // avoids letting the OS to delete the window, we'll do that ourselves. - - default: - break; - } - - return eventNotHandledErr; - } - - OSStatus handleWindowEventForPeer (EventHandlerCallRef callRef, EventRef theEvent) - { - switch (GetEventClass (theEvent)) - { - case kEventClassMouse: - { - static HIViewComponentPeer* lastMouseDownPeer = 0; - - const UInt32 eventKind = GetEventKind (theEvent); - HIViewRef view = 0; - - if (eventKind == kEventMouseDragged) - { - view = viewRef; - } - else - { - HIViewGetViewForMouseEvent (HIViewGetRoot (windowRef), theEvent, &view); - - if (view != viewRef) - { - if ((eventKind == kEventMouseUp - || eventKind == kEventMouseExited) - && ComponentPeer::isValidPeer (lastMouseDownPeer)) - { - return lastMouseDownPeer->handleMouseEvent (callRef, theEvent); - } - - return eventNotHandledErr; - } - } - - if (eventKind == kEventMouseDown - || eventKind == kEventMouseDragged - || eventKind == kEventMouseEntered) - { - lastMouseDownPeer = this; - } - - return handleMouseEvent (callRef, theEvent); - } - break; - - case kEventClassWindow: - return handleWindowClassEvent (theEvent); - - case kEventClassKeyboard: - if (isFocused()) - return handleKeyEvent (theEvent, 0); - - break; - - case kEventClassTextInput: - if (isFocused()) - return handleTextInputEvent (theEvent); - - break; - - default: - break; - } - - return eventNotHandledErr; - } - - static pascal OSStatus handleWindowEvent (EventHandlerCallRef callRef, EventRef theEvent, void* userData) - { - MessageManager::delayWaitCursor(); - - HIViewComponentPeer* const peer = (HIViewComponentPeer*) userData; - - const MessageManagerLock messLock; - - if (ComponentPeer::isValidPeer (peer)) - return peer->handleWindowEventForPeer (callRef, theEvent); - - return eventNotHandledErr; - } - - static pascal OSStatus hiViewEventHandler (EventHandlerCallRef myHandler, EventRef theEvent, void* userData) - { - MessageManager::delayWaitCursor(); - - const UInt32 eventKind = GetEventKind (theEvent); - const UInt32 eventClass = GetEventClass (theEvent); - - if (eventClass == kEventClassHIObject) - { - switch (eventKind) - { - case kEventHIObjectConstruct: - { - void* data = juce_calloc (sizeof (void*)); - SetEventParameter (theEvent, kEventParamHIObjectInstance, - typeVoidPtr, sizeof (void*), &data); - - return noErr; - } - - case kEventHIObjectInitialize: - GetEventParameter (theEvent, 'peer', typeVoidPtr, 0, sizeof (void*), 0, (void**) userData); - return noErr; - - case kEventHIObjectDestruct: - juce_free (userData); - return noErr; - - default: - break; - } - } - else if (eventClass == kEventClassControl) - { - HIViewComponentPeer* const peer = *(HIViewComponentPeer**) userData; - const MessageManagerLock messLock; - - if (! ComponentPeer::isValidPeer (peer)) - return eventNotHandledErr; - - switch (eventKind) - { - case kEventControlDraw: - return peer->hiViewDraw (theEvent); - - case kEventControlBoundsChanged: - { - HIRect bounds; - HIViewGetBounds (peer->viewRef, &bounds); - peer->repaint (0, 0, roundFloatToInt (bounds.size.width), roundFloatToInt (bounds.size.height)); - - peer->handleMovedOrResized(); - return noErr; - } - - case kEventControlHitTest: - { - HIPoint where; - GetEventParameter (theEvent, kEventParamMouseLocation, typeHIPoint, 0, sizeof (HIPoint), 0, &where); - - HIRect bounds; - HIViewGetBounds (peer->viewRef, &bounds); - - ControlPartCode part = kControlNoPart; - - if (CGRectContainsPoint (bounds, where)) - part = 1; - - SetEventParameter (theEvent, kEventParamControlPart, typeControlPartCode, sizeof (ControlPartCode), &part); - return noErr; - } - break; - - case kEventControlSetFocusPart: - { - ControlPartCode desiredFocus; - if (GetEventParameter (theEvent, kEventParamControlPart, typeControlPartCode, 0, sizeof (ControlPartCode), 0, &desiredFocus) != noErr) - break; - - if (desiredFocus == kControlNoPart) - peer->viewFocusLoss(); - else - peer->viewFocusGain(); - - return noErr; - } - break; - - case kEventControlDragEnter: - { -#if MACOS_10_2_OR_EARLIER - enum { kEventParamControlWouldAcceptDrop = 'cldg' }; -#endif - Boolean accept = true; - SetEventParameter (theEvent, kEventParamControlWouldAcceptDrop, typeBoolean, sizeof (accept), &accept); - - peer->doDragDropEnter (theEvent); - return noErr; - } - - case kEventControlDragWithin: - peer->doDragDropMove (theEvent); - return noErr; - - case kEventControlDragLeave: - peer->doDragDropExit (theEvent); - return noErr; - - case kEventControlDragReceive: - peer->doDragDrop (theEvent); - return noErr; - - case kEventControlOwningWindowChanged: - return peer->ownerWindowChanged (theEvent); - -#if ! MACOS_10_2_OR_EARLIER - case kEventControlGetFrameMetrics: - { - CallNextEventHandler (myHandler, theEvent); - HIViewFrameMetrics metrics; - GetEventParameter (theEvent, kEventParamControlFrameMetrics, typeControlFrameMetrics, 0, sizeof (metrics), 0, &metrics); - metrics.top = metrics.bottom = 0; - SetEventParameter (theEvent, kEventParamControlFrameMetrics, typeControlFrameMetrics, sizeof (metrics), &metrics); - return noErr; - } -#endif - - case kEventControlInitialize: - { - UInt32 features = kControlSupportsDragAndDrop - | kControlSupportsFocus - | kControlHandlesTracking - | kControlSupportsEmbedding - | (1 << 8) /*kHIViewFeatureGetsFocusOnClick*/; - - SetEventParameter (theEvent, kEventParamControlFeatures, typeUInt32, sizeof (UInt32), &features); - return noErr; - } - - default: - break; - } - } - - return eventNotHandledErr; - } - - WindowRef createNewWindow (const int windowStyleFlags) - { - jassert (windowRef == 0); - - static ToolboxObjectClassRef customWindowClass = 0; - - if (customWindowClass == 0) - { - // Register our window class - const EventTypeSpec customTypes[] = { { kEventClassWindow, kEventWindowDrawFrame } }; - - UnsignedWide t; - Microseconds (&t); - const String randomString ((int) (t.lo & 0x7ffffff)); - const String juceWindowClassName (T("JUCEWindowClass_") + randomString); - CFStringRef juceWindowClassNameCFString = PlatformUtilities::juceStringToCFString (juceWindowClassName); - - RegisterToolboxObjectClass (juceWindowClassNameCFString, - 0, 1, customTypes, - NewEventHandlerUPP (handleFrameRepaintEvent), - 0, &customWindowClass); - - CFRelease (juceWindowClassNameCFString); - } - - Rect pos; - pos.left = getComponent()->getX(); - pos.top = getComponent()->getY(); - pos.right = getComponent()->getRight(); - pos.bottom = getComponent()->getBottom(); - - int attributes = kWindowStandardHandlerAttribute | kWindowCompositingAttribute; - if ((windowStyleFlags & windowHasDropShadow) == 0) - attributes |= kWindowNoShadowAttribute; - - if ((windowStyleFlags & windowIgnoresMouseClicks) != 0) - attributes |= kWindowIgnoreClicksAttribute; - -#if ! MACOS_10_3_OR_EARLIER - if ((windowStyleFlags & windowIsTemporary) != 0) - attributes |= kWindowDoesNotCycleAttribute; -#endif - - WindowRef newWindow = 0; - - if ((windowStyleFlags & windowHasTitleBar) == 0) - { - attributes |= kWindowCollapseBoxAttribute; - - WindowDefSpec customWindowSpec; - customWindowSpec.defType = kWindowDefObjectClass; - customWindowSpec.u.classRef = customWindowClass; - - CreateCustomWindow (&customWindowSpec, - ((windowStyleFlags & windowIsTemporary) != 0) ? kUtilityWindowClass : - (getComponent()->isAlwaysOnTop() ? kUtilityWindowClass - : kDocumentWindowClass), - attributes, - &pos, - &newWindow); - } - else - { - if ((windowStyleFlags & windowHasCloseButton) != 0) - attributes |= kWindowCloseBoxAttribute; - - if ((windowStyleFlags & windowHasMinimiseButton) != 0) - attributes |= kWindowCollapseBoxAttribute; - - if ((windowStyleFlags & windowHasMaximiseButton) != 0) - attributes |= kWindowFullZoomAttribute; - - if ((windowStyleFlags & windowIsResizable) != 0) - attributes |= kWindowResizableAttribute | kWindowLiveResizeAttribute; - - CreateNewWindow (kDocumentWindowClass, attributes, &pos, &newWindow); - } - - jassert (newWindow != 0); - if (newWindow != 0) - { - HideWindow (newWindow); - - SetAutomaticControlDragTrackingEnabledForWindow (newWindow, true); - - if (! getComponent()->isOpaque()) - SetWindowAlpha (newWindow, 0.9999999f); // to fool it into giving the window an alpha-channel - } - - return newWindow; - } - - OSStatus ownerWindowChanged (EventRef theEvent) - { - WindowRef newWindow = 0; - GetEventParameter (theEvent, kEventParamControlCurrentOwningWindow, typeWindowRef, 0, sizeof (newWindow), 0, &newWindow); - - if (windowRef != newWindow) - { - if (eventHandlerRef != 0) - { - RemoveEventHandler (eventHandlerRef); - eventHandlerRef = 0; - } - - windowRef = newWindow; - - if (windowRef != 0) - { - const EventTypeSpec eventTypes[] = - { - { kEventClassWindow, kEventWindowBoundsChanged }, - { kEventClassWindow, kEventWindowBoundsChanging }, - { kEventClassWindow, kEventWindowFocusAcquired }, - { kEventClassWindow, kEventWindowFocusRelinquish }, - { kEventClassWindow, kEventWindowCollapsed }, - { kEventClassWindow, kEventWindowExpanded }, - { kEventClassWindow, kEventWindowShown }, - { kEventClassWindow, kEventWindowClose }, - { kEventClassMouse, kEventMouseDown }, - { kEventClassMouse, kEventMouseUp }, - { kEventClassMouse, kEventMouseMoved }, - { kEventClassMouse, kEventMouseDragged }, - { kEventClassMouse, kEventMouseEntered }, - { kEventClassMouse, kEventMouseExited }, - { kEventClassMouse, kEventMouseWheelMoved }, - { kEventClassKeyboard, kEventRawKeyUp }, - { kEventClassKeyboard, kEventRawKeyRepeat }, - { kEventClassKeyboard, kEventRawKeyModifiersChanged }, - { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } - }; - - static EventHandlerUPP handleWindowEventUPP = 0; - - if (handleWindowEventUPP == 0) - handleWindowEventUPP = NewEventHandlerUPP (handleWindowEvent); - - InstallWindowEventHandler (windowRef, handleWindowEventUPP, - GetEventTypeCount (eventTypes), eventTypes, - (void*) this, (EventHandlerRef*) &eventHandlerRef); - - WindowAttributes attributes; - GetWindowAttributes (windowRef, &attributes); - -#if MACOS_10_3_OR_EARLIER - isCompositingWindow = ((attributes & kWindowCompositingAttribute) != 0); -#else - isCompositingWindow = HIViewIsCompositingEnabled (viewRef); -#endif - - SetAutomaticControlDragTrackingEnabledForWindow (newWindow, true); - - MouseCheckTimer::getInstance()->resetMouseMoveChecker(); - } - } - - resizeViewToFitWindow(); - return noErr; - } - - void createNewHIView() - { - jassert (viewRef == 0); - - if (viewClassRef == 0) - { - // Register our HIView class - EventTypeSpec viewEvents[] = - { - { kEventClassHIObject, kEventHIObjectConstruct }, - { kEventClassHIObject, kEventHIObjectInitialize }, - { kEventClassHIObject, kEventHIObjectDestruct }, - { kEventClassControl, kEventControlInitialize }, - { kEventClassControl, kEventControlDraw }, - { kEventClassControl, kEventControlBoundsChanged }, - { kEventClassControl, kEventControlSetFocusPart }, - { kEventClassControl, kEventControlHitTest }, - { kEventClassControl, kEventControlDragEnter }, - { kEventClassControl, kEventControlDragLeave }, - { kEventClassControl, kEventControlDragWithin }, - { kEventClassControl, kEventControlDragReceive }, - { kEventClassControl, kEventControlOwningWindowChanged } - }; - - UnsignedWide t; - Microseconds (&t); - const String randomString ((int) (t.lo & 0x7ffffff)); - const String juceHiViewClassName (T("JUCEHIViewClass_") + randomString); - juceHiViewClassNameCFString = PlatformUtilities::juceStringToCFString (juceHiViewClassName); - - HIObjectRegisterSubclass (juceHiViewClassNameCFString, - kHIViewClassID, 0, - NewEventHandlerUPP (hiViewEventHandler), - GetEventTypeCount (viewEvents), - viewEvents, 0, - &viewClassRef); - } - - EventRef event; - CreateEvent (0, kEventClassHIObject, kEventHIObjectInitialize, GetCurrentEventTime(), kEventAttributeNone, &event); - - void* thisPointer = this; - SetEventParameter (event, 'peer', typeVoidPtr, sizeof (void*), &thisPointer); - - HIObjectCreate (juceHiViewClassNameCFString, event, (HIObjectRef*) &viewRef); - - SetControlDragTrackingEnabled (viewRef, true); - - if (isSharedWindow) - { - setBounds (component->getX(), component->getY(), - component->getWidth(), component->getHeight(), false); - } - } -}; - -bool juce_isHIViewCreatedByJuce (HIViewRef view) -{ - return juceHiViewClassNameCFString != 0 - && HIObjectIsOfClass ((HIObjectRef) view, juceHiViewClassNameCFString); -} - -bool juce_isWindowCreatedByJuce (WindowRef window) -{ - for (int i = ComponentPeer::getNumPeers(); --i >= 0;) - if (ComponentPeer::getPeer(i)->getNativeHandle() == window) - return true; - - return false; -} - -static void trackNextMouseEvent() -{ - UInt32 mods; - MouseTrackingResult result; - ::Point where; - - if (TrackMouseLocationWithOptions ((GrafPtr) -1, 0, 0.01, //kEventDurationForever, - &where, &mods, &result) != noErr - || ! ComponentPeer::isValidPeer (juce_currentMouseTrackingPeer)) - { - juce_currentMouseTrackingPeer = 0; - return; - } - - if (result == kMouseTrackingTimedOut) - return; - -#if MACOS_10_3_OR_EARLIER - const int x = where.h - juce_currentMouseTrackingPeer->getScreenX(); - const int y = where.v - juce_currentMouseTrackingPeer->getScreenY(); -#else - HIPoint p; - p.x = where.h; - p.y = where.v; - HIPointConvert (&p, kHICoordSpaceScreenPixel, 0, - kHICoordSpaceView, ((HIViewComponentPeer*) juce_currentMouseTrackingPeer)->viewRef); - const int x = p.x; - const int y = p.y; -#endif - - if (result == kMouseTrackingMouseDragged) - { - updateModifiers (0); - juce_currentMouseTrackingPeer->handleMouseDrag (x, y, getEventTime (0)); - - if (! ComponentPeer::isValidPeer (juce_currentMouseTrackingPeer)) - { - juce_currentMouseTrackingPeer = 0; - return; - } - } - else if (result == kMouseTrackingMouseUp - || result == kMouseTrackingUserCancelled - || result == kMouseTrackingMouseMoved) - { - ComponentPeer* const oldPeer = juce_currentMouseTrackingPeer; - juce_currentMouseTrackingPeer = 0; - - if (ComponentPeer::isValidPeer (oldPeer)) - { - const int oldModifiers = currentModifiers; - currentModifiers &= ~(ModifierKeys::leftButtonModifier | ModifierKeys::rightButtonModifier | ModifierKeys::middleButtonModifier); - updateModifiers (0); - - oldPeer->handleMouseUp (oldModifiers, x, y, getEventTime (0)); - } - } -} - -bool juce_dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages) -{ - if (juce_currentMouseTrackingPeer != 0) - trackNextMouseEvent(); - -/* [[NSRunLoop mainRunLoop] acceptInputForMode: NSDefaultRunLoopMode - beforeDate: returnIfNoPendingMessages - ? [[NSDate date] addTimeInterval: 0.01] - : [NSDate distantFuture]]; -*/ - EventRef theEvent; - - if (ReceiveNextEvent (0, 0, (returnIfNoPendingMessages) ? kEventDurationNoWait - : kEventDurationForever, - true, &theEvent) == noErr) - { - if (GetEventClass (theEvent) == kEventClassAppleEvent) - { - EventRecord eventRec; - if (ConvertEventRefToEventRecord (theEvent, &eventRec)) - AEProcessAppleEvent (&eventRec); - } - else - { - EventTargetRef theTarget = GetEventDispatcherTarget(); - SendEventToEventTarget (theEvent, theTarget); - } - - ReleaseEvent (theEvent); - return true; - } - - return false; -} - -ComponentPeer* Component::createNewPeer (int styleFlags, void* windowToAttachTo) -{ - return new HIViewComponentPeer (this, styleFlags, (HIViewRef) windowToAttachTo); -} - -void MouseCheckTimer::timerCallback() -{ - if (ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown()) - return; - - if (Process::isForegroundProcess()) - { - bool stillOver = false; - int x = 0, y = 0, w = 0, h = 0; - int mx = 0, my = 0; - const bool validWindow = ComponentPeer::isValidPeer (lastPeerUnderMouse); - - if (validWindow) - { - lastPeerUnderMouse->getBounds (x, y, w, h, true); - Desktop::getMousePosition (mx, my); - - stillOver = (mx >= x && my >= y && mx < x + w && my < y + h); - - if (stillOver) - { - // check if it's over an embedded HIView - int rx = mx, ry = my; - lastPeerUnderMouse->globalPositionToRelative (rx, ry); - HIPoint hipoint; - hipoint.x = rx; - hipoint.y = ry; - - HIViewRef root; - GetRootControl ((WindowRef) lastPeerUnderMouse->getNativeHandle(), &root); - - HIViewRef hitview; - if (HIViewGetSubviewHit (root, &hipoint, true, &hitview) == noErr && hitview != 0) - { - stillOver = HIObjectIsOfClass ((HIObjectRef) hitview, juceHiViewClassNameCFString); - } - } - } - - if (! stillOver) - { - // mouse is outside our windows so set a normal cursor (only - // if we're running as an app, not a plugin) - if (JUCEApplication::getInstance() != 0) - SetThemeCursor (kThemeArrowCursor); - - if (validWindow) - lastPeerUnderMouse->handleMouseExit (mx - x, my - y, Time::currentTimeMillis()); - - if (hasEverHadAMouseMove) - stopTimer(); - } - - if ((! hasEverHadAMouseMove) && validWindow - && (mx != lastX || my != lastY)) - { - lastX = mx; - lastY = my; - - if (stillOver) - lastPeerUnderMouse->handleMouseMove (mx - x, my - y, Time::currentTimeMillis()); - } - } -} - -// called from juce_Messaging.cpp -void juce_HandleProcessFocusChange() -{ - keysCurrentlyDown.clear(); - - if (HIViewComponentPeer::isValidPeer (currentlyFocusedPeer)) - { - if (Process::isForegroundProcess()) - currentlyFocusedPeer->handleFocusGain(); - else - currentlyFocusedPeer->handleFocusLoss(); - } -} - -static bool performDrag (DragRef drag) -{ - EventRecord event; - event.what = mouseDown; - event.message = 0; - event.when = TickCount(); - - int x, y; - Desktop::getMousePosition (x, y); - event.where.h = x; - event.where.v = y; - - event.modifiers = GetCurrentKeyModifiers(); - - RgnHandle rgn = NewRgn(); - RgnHandle rgn2 = NewRgn(); - SetRectRgn (rgn, - event.where.h - 8, event.where.v - 8, - event.where.h + 8, event.where.v + 8); - CopyRgn (rgn, rgn2); - InsetRgn (rgn2, 1, 1); - DiffRgn (rgn, rgn2, rgn); - DisposeRgn (rgn2); - - bool result = TrackDrag (drag, &event, rgn) == noErr; - - DisposeRgn (rgn); - return result; -} - -bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles) -{ - for (int i = ComponentPeer::getNumPeers(); --i >= 0;) - ComponentPeer::getPeer (i)->performAnyPendingRepaintsNow(); - - DragRef drag; - bool result = false; - - if (NewDrag (&drag) == noErr) - { - for (int i = 0; i < files.size(); ++i) - { - HFSFlavor hfsData; - - if (PlatformUtilities::makeFSSpecFromPath (&hfsData.fileSpec, files[i])) - { - FInfo info; - if (FSpGetFInfo (&hfsData.fileSpec, &info) == noErr) - { - hfsData.fileType = info.fdType; - hfsData.fileCreator = info.fdCreator; - hfsData.fdFlags = info.fdFlags; - - AddDragItemFlavor (drag, i + 1, kDragFlavorTypeHFS, &hfsData, sizeof (hfsData), 0); - result = true; - } - } - } - - SetDragAllowableActions (drag, canMoveFiles ? kDragActionAll - : kDragActionCopy, false); - - if (result) - result = performDrag (drag); - - DisposeDrag (drag); - } - - return result; -} - -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) -{ - jassertfalse // not implemented! - return false; -} - -bool Process::isForegroundProcess() throw() -{ - ProcessSerialNumber psn, front; - GetCurrentProcess (&psn); - GetFrontProcess (&front); - - Boolean b; - return (SameProcess (&psn, &front, &b) == noErr) && b; -} - -bool Desktop::canUseSemiTransparentWindows() throw() -{ return true; } -void Desktop::getMousePosition (int& x, int& y) throw() +int NamedPipe::read (void* destBuffer, int maxBytesToRead, int /*timeOutMilliseconds*/) { - CGrafPtr currentPort; - GetPort (¤tPort); + int bytesRead = -1; + NamedPipeInternal* const intern = (NamedPipeInternal*) internal; - if (! IsValidPort (currentPort)) + if (intern != 0) { - WindowRef front = FrontWindow(); + intern->blocked = true; - if (front != 0) + if (intern->pipeIn == -1) { - SetPortWindowPort (front); - } - else - { - x = y = 0; - return; - } - } - - ::Point p; - GetMouse (&p); - LocalToGlobal (&p); - x = p.h; - y = p.v; - - SetPort (currentPort); -} - -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); -} - -const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() throw() -{ - return ModifierKeys (currentModifiers); -} - -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; -} - -void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() -{ - int mainMonitorIndex = 0; - CGDirectDisplayID mainDisplayID = CGMainDisplayID(); - - CGDisplayCount count = 0; - CGDirectDisplayID disps [8]; - - if (CGGetOnlineDisplayList (numElementsInArray (disps), disps, &count) == noErr) - { - for (int i = 0; i < count; ++i) - { - if (mainDisplayID == disps[i]) - mainMonitorIndex = monitorCoords.size(); - - GDHandle hGDevice; - - if (clipToWorkArea - && DMGetGDeviceByDisplayID ((DisplayIDType) disps[i], &hGDevice, false) == noErr) - { - Rect rect; - GetAvailableWindowPositioningBounds (hGDevice, &rect); - - monitorCoords.add (Rectangle (rect.left, - rect.top, - rect.right - rect.left, - rect.bottom - rect.top)); - } + if (intern->createdPipe) + intern->pipeIn = ::open (intern->pipeInName, O_RDWR); else + intern->pipeIn = ::open (intern->pipeOutName, O_RDWR); + + if (intern->pipeIn == -1) { - const CGRect r (CGDisplayBounds (disps[i])); - - monitorCoords.add (Rectangle ((int) r.origin.x, - (int) r.origin.y, - (int) r.size.width, - (int) r.size.height)); - } - } - } - - // make sure the first in the list is the main monitor - if (mainMonitorIndex > 0) - monitorCoords.swap (mainMonitorIndex, 0); - - jassert (monitorCoords.size() > 0); - - if (monitorCoords.size() == 0) - monitorCoords.add (Rectangle (0, 0, 1024, 768)); -} - -static NSImage* juceImageToNSImage (const Image& image) -{ - 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); - [im autorelease]; - - NSPoint hs; - hs.x = (int) hotspotX; - hs.y = (int) hotspotY; - - NSCursor* c = [[NSCursor alloc] initWithImage: im hotSpot: hs]; - 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() -{ - 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(); - - if (c != 0) - [c set]; -} - -Image* juce_createIconForFile (const File& file) -{ - return 0; -} - -class MainMenuHandler; -static MainMenuHandler* mainMenu = 0; - -class MainMenuHandler : private MenuBarModelListener, - private DeletedAtShutdown -{ -public: - MainMenuHandler() throw() - : currentModel (0) - { - } - - ~MainMenuHandler() throw() - { - setMenu (0); - - jassert (mainMenu == this); - mainMenu = 0; - } - - 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 menuBarItemsChanged (MenuBarModel*) - { - ClearMenuBar(); - - if (currentModel != 0) - { - int menuId = 1000; - const StringArray menuNames (currentModel->getMenuBarNames()); - - for (int i = 0; i < menuNames.size(); ++i) - { - const PopupMenu menu (currentModel->getMenuForIndex (i, menuNames [i])); - - MenuRef m = createMenu (menu, menuNames [i], menuId, i); - - InsertMenu (m, 0); - CFRelease (m); - } - } - } - - void menuCommandInvoked (MenuBarModel*, const ApplicationCommandTarget::InvocationInfo& info) - { - MenuRef menu = 0; - MenuItemIndex index = 0; - GetIndMenuItemWithCommandID (0, info.commandID, 1, &menu, &index); - - if (menu != 0) - { - FlashMenuBar (GetMenuID (menu)); - FlashMenuBar (GetMenuID (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: - static MenuRef createMenu (const PopupMenu menu, - const String& menuName, - int& id, - const int topLevelIndex) - { - MenuRef m = 0; - - if (CreateNewMenu (id++, kMenuAttrAutoDisable, &m) == noErr) - { - CFStringRef name = PlatformUtilities::juceStringToCFString (menuName); - SetMenuTitleWithCFString (m, name); - CFRelease (name); - - PopupMenu::MenuItemIterator iter (menu); - - while (iter.next()) - { - MenuItemIndex index = 0; - - int flags = kMenuAttrAutoDisable | kMenuItemAttrIgnoreMeta | kMenuItemAttrNotPreviousAlternate; - if (! iter.isEnabled) - flags |= kMenuItemAttrDisabled; - - CFStringRef text = PlatformUtilities::juceStringToCFString (iter.itemName.upToFirstOccurrenceOf (T(""), false, true)); - - if (iter.isSeparator) - { - AppendMenuItemTextWithCFString (m, text, kMenuItemAttrSeparator, 0, &index); - } - else if (iter.isSectionHeader) - { - AppendMenuItemTextWithCFString (m, text, kMenuItemAttrSectionHeader, 0, &index); - } - else if (iter.subMenu != 0) - { - AppendMenuItemTextWithCFString (m, text, flags, id++, &index); - - MenuRef sub = createMenu (*iter.subMenu, iter.itemName, id, topLevelIndex); - SetMenuItemHierarchicalMenu (m, index, sub); - CFRelease (sub); - } - else - { - AppendMenuItemTextWithCFString (m, text, flags, iter.itemId, &index); - - if (iter.isTicked) - CheckMenuItem (m, index, true); - - SetMenuItemProperty (m, index, 'juce', 'apcm', sizeof (void*), &iter.commandManager); - SetMenuItemProperty (m, index, 'juce', 'topi', sizeof (int), &topLevelIndex); - - if (iter.commandManager != 0) - { - const Array keyPresses (iter.commandManager->getKeyMappings() - ->getKeyPressesAssignedToCommand (iter.itemId)); - - if (keyPresses.size() > 0) - { - const KeyPress& kp = keyPresses.getReference(0); - int mods = 0; - - if (kp.getModifiers().isShiftDown()) - mods |= kMenuShiftModifier; - if (kp.getModifiers().isCtrlDown()) - mods |= kMenuControlModifier; - if (kp.getModifiers().isAltDown()) - mods |= kMenuOptionModifier; - if (! kp.getModifiers().isCommandDown()) - mods |= kMenuNoCommandModifier; - - tchar keyCode = (tchar) kp.getKeyCode(); - - if (kp.getKeyCode() >= KeyPress::numberPad0 - && kp.getKeyCode() <= KeyPress::numberPad9) - { - keyCode = (tchar) ((T('0') - KeyPress::numberPad0) + kp.getKeyCode()); - } - - SetMenuItemCommandKey (m, index, true, 255); - - if (CharacterFunctions::isLetterOrDigit (keyCode) - || CharacterFunctions::indexOfChar (T(",.;/\\'[]=-+_<>?{}\":"), keyCode, false) >= 0) - { - SetMenuItemModifiers (m, index, mods); - SetMenuItemCommandKey (m, index, false, CharacterFunctions::toUpperCase (keyCode)); - } - else - { - const SInt16 glyph = getGlyphForKeyCode (kp.getKeyCode()); - - if (glyph != 0) - { - SetMenuItemModifiers (m, index, mods); - SetMenuItemKeyGlyph (m, index, glyph); - } - } - - // if we set the key glyph to be a text char, and enable virtual - // key triggering, it stops the menu automatically triggering the callback - ChangeMenuItemAttributes (m, index, kMenuItemAttrUseVirtualKey, 0); - } - } - } - - CFRelease (text); + intern->blocked = false; + return -1; } } - return m; - } + bytesRead = 0; - static SInt16 getGlyphForKeyCode (const int keyCode) throw() - { - if (keyCode == KeyPress::spaceKey) - return kMenuSpaceGlyph; - else if (keyCode == KeyPress::returnKey) - return kMenuReturnGlyph; - else if (keyCode == KeyPress::escapeKey) - return kMenuEscapeGlyph; - else if (keyCode == KeyPress::backspaceKey) - return kMenuDeleteLeftGlyph; - else if (keyCode == KeyPress::leftKey) - return kMenuLeftArrowGlyph; - else if (keyCode == KeyPress::rightKey) - return kMenuRightArrowGlyph; - else if (keyCode == KeyPress::upKey) - return kMenuUpArrowGlyph; - else if (keyCode == KeyPress::downKey) - return kMenuDownArrowGlyph; - else if (keyCode == KeyPress::pageUpKey) - return kMenuPageUpGlyph; - else if (keyCode == KeyPress::pageDownKey) - return kMenuPageDownGlyph; - else if (keyCode == KeyPress::endKey) - return kMenuSoutheastArrowGlyph; - else if (keyCode == KeyPress::homeKey) - return kMenuNorthwestArrowGlyph; - else if (keyCode == KeyPress::deleteKey) - return kMenuDeleteRightGlyph; - else if (keyCode == KeyPress::tabKey) - return kMenuTabRightGlyph; - else if (keyCode == KeyPress::F1Key) - return kMenuF1Glyph; - else if (keyCode == KeyPress::F2Key) - return kMenuF2Glyph; - else if (keyCode == KeyPress::F3Key) - return kMenuF3Glyph; - else if (keyCode == KeyPress::F4Key) - return kMenuF4Glyph; - else if (keyCode == KeyPress::F5Key) - return kMenuF5Glyph; - else if (keyCode == KeyPress::F6Key) - return kMenuF6Glyph; - else if (keyCode == KeyPress::F7Key) - return kMenuF7Glyph; - else if (keyCode == KeyPress::F8Key) - return kMenuF8Glyph; - else if (keyCode == KeyPress::F9Key) - return kMenuF9Glyph; - else if (keyCode == KeyPress::F10Key) - return kMenuF10Glyph; - else if (keyCode == KeyPress::F11Key) - return kMenuF11Glyph; - else if (keyCode == KeyPress::F12Key) - return kMenuF12Glyph; - else if (keyCode == KeyPress::F13Key) - return kMenuF13Glyph; - else if (keyCode == KeyPress::F14Key) - return kMenuF14Glyph; - else if (keyCode == KeyPress::F15Key) - return kMenuF15Glyph; + char* p = (char*) destBuffer; - return 0; - } -}; - -void MenuBarModel::setMacMainMenu (MenuBarModel* newMenuBarModel) throw() -{ - if (getMacMainMenu() != newMenuBarModel) - { - if (newMenuBarModel == 0) + while (bytesRead < maxBytesToRead) { - delete mainMenu; - jassert (mainMenu == 0); // should be zeroed in the destructor - } - else - { - if (mainMenu == 0) - mainMenu = new MainMenuHandler(); + const int bytesThisTime = maxBytesToRead - bytesRead; + const int numRead = ::read (intern->pipeIn, p, bytesThisTime); - mainMenu->setMenu (newMenuBarModel); - } - } -} - -MenuBarModel* MenuBarModel::getMacMainMenu() throw() -{ - return mainMenu != 0 ? mainMenu->currentModel : 0; -} - -// these functions are called externally from the message handling code -void juce_MainMenuAboutToBeUsed() -{ - // force an update of the items just before the menu appears.. - if (mainMenu != 0) - mainMenu->menuBarItemsChanged (0); -} - -void juce_InvokeMainMenuCommand (const HICommand& command) -{ - if (mainMenu != 0) - { - ApplicationCommandManager* commandManager = 0; - int topLevelIndex = 0; - - if (GetMenuItemProperty (command.menu.menuRef, command.menu.menuItemIndex, - 'juce', 'apcm', sizeof (commandManager), 0, &commandManager) == noErr - && GetMenuItemProperty (command.menu.menuRef, command.menu.menuItemIndex, - 'juce', 'topi', sizeof (topLevelIndex), 0, &topLevelIndex) == noErr) - { - mainMenu->invoke (command.commandID, commandManager, topLevelIndex); - } - } -} - -void PlatformUtilities::beep() -{ - SysBeep (30); -} - -void SystemClipboard::copyTextToClipboard (const String& text) throw() -{ - ClearCurrentScrap(); - ScrapRef ref; - GetCurrentScrap (&ref); - - const int len = text.length(); - const int numBytes = sizeof (UniChar) * len; - UniChar* const temp = (UniChar*) juce_calloc (numBytes); - - for (int i = 0; i < len; ++i) - temp[i] = (UniChar) text[i]; - - PutScrapFlavor (ref, - kScrapFlavorTypeUnicode, - kScrapFlavorMaskNone, - numBytes, - temp); - - juce_free (temp); -} - -const String SystemClipboard::getTextFromClipboard() throw() -{ - String result; - - ScrapRef ref; - GetCurrentScrap (&ref); - Size size = 0; - - if (GetScrapFlavorSize (ref, kScrapFlavorTypeUnicode, &size) == noErr - && size > 0) - { - void* const data = juce_calloc (size + 8); - - if (GetScrapFlavorData (ref, kScrapFlavorTypeUnicode, &size, data) == noErr) - { - result = PlatformUtilities::convertUTF16ToString ((UniChar*) data); - } - - juce_free (data); - } - - return result; -} - -bool AlertWindow::showNativeDialogBox (const String& title, - const String& bodyText, - bool isOkCancel) -{ - Str255 tit, txt; - PlatformUtilities::copyToStr255 (tit, title); - PlatformUtilities::copyToStr255 (txt, bodyText); - - AlertStdAlertParamRec ar; - ar.movable = true; - ar.helpButton = false; - ar.filterProc = 0; - ar.defaultText = (const unsigned char*)-1; - ar.cancelText = (const unsigned char*)((isOkCancel) ? -1 : 0); - ar.otherText = 0; - ar.defaultButton = kAlertStdAlertOKButton; - ar.cancelButton = 0; - ar.position = kWindowDefaultPosition; - - SInt16 result; - StandardAlert (kAlertNoteAlert, tit, txt, &ar, &result); - return result == kAlertStdAlertOKButton; -} - -const int KeyPress::spaceKey = ' '; -const int KeyPress::returnKey = kReturnCharCode; -const int KeyPress::escapeKey = kEscapeCharCode; -const int KeyPress::backspaceKey = kBackspaceCharCode; -const int KeyPress::leftKey = kLeftArrowCharCode; -const int KeyPress::rightKey = kRightArrowCharCode; -const int KeyPress::upKey = kUpArrowCharCode; -const int KeyPress::downKey = kDownArrowCharCode; -const int KeyPress::pageUpKey = kPageUpCharCode; -const int KeyPress::pageDownKey = kPageDownCharCode; -const int KeyPress::endKey = kEndCharCode; -const int KeyPress::homeKey = kHomeCharCode; -const int KeyPress::deleteKey = kDeleteCharCode; -const int KeyPress::insertKey = -1; -const int KeyPress::tabKey = kTabCharCode; -const int KeyPress::F1Key = 0x10110; -const int KeyPress::F2Key = 0x10111; -const int KeyPress::F3Key = 0x10112; -const int KeyPress::F4Key = 0x10113; -const int KeyPress::F5Key = 0x10114; -const int KeyPress::F6Key = 0x10115; -const int KeyPress::F7Key = 0x10116; -const int KeyPress::F8Key = 0x10117; -const int KeyPress::F9Key = 0x10118; -const int KeyPress::F10Key = 0x10119; -const int KeyPress::F11Key = 0x1011a; -const int KeyPress::F12Key = 0x1011b; -const int KeyPress::F13Key = 0x1011c; -const int KeyPress::F14Key = 0x1011d; -const int KeyPress::F15Key = 0x1011e; -const int KeyPress::F16Key = 0x1011f; -const int KeyPress::numberPad0 = 0x30020; -const int KeyPress::numberPad1 = 0x30021; -const int KeyPress::numberPad2 = 0x30022; -const int KeyPress::numberPad3 = 0x30023; -const int KeyPress::numberPad4 = 0x30024; -const int KeyPress::numberPad5 = 0x30025; -const int KeyPress::numberPad6 = 0x30026; -const int KeyPress::numberPad7 = 0x30027; -const int KeyPress::numberPad8 = 0x30028; -const int KeyPress::numberPad9 = 0x30029; -const int KeyPress::numberPadAdd = 0x3002a; -const int KeyPress::numberPadSubtract = 0x3002b; -const int KeyPress::numberPadMultiply = 0x3002c; -const int KeyPress::numberPadDivide = 0x3002d; -const int KeyPress::numberPadSeparator = 0x3002e; -const int KeyPress::numberPadDecimalPoint = 0x3002f; -const int KeyPress::numberPadEquals = 0x30030; -const int KeyPress::numberPadDelete = 0x30031; -const int KeyPress::playKey = 0x30000; -const int KeyPress::stopKey = 0x30001; -const int KeyPress::fastForwardKey = 0x30002; -const int KeyPress::rewindKey = 0x30003; - -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 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) + if (numRead <= 0 || intern->stopReadOperation) { - IOHIDElementCookie cookie = (IOHIDElementCookie) cookies.getUnchecked(i); - (*(IOHIDQueueInterface**) queue)->addElement ((IOHIDQueueInterface**) queue, cookie, 0); + bytesRead = -1; + break; } - CFRunLoopSourceRef eventSource; + bytesRead += numRead; + p += bytesRead; + } - if ((*(IOHIDQueueInterface**) queue) - ->createAsyncEventSource ((IOHIDQueueInterface**) queue, &eventSource) == KERN_SUCCESS) + 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) { - if ((*(IOHIDQueueInterface**) queue)->setEventCallout ((IOHIDQueueInterface**) queue, - appleRemoteQueueCallback, this, 0) == KERN_SUCCESS) - { - CFRunLoopAddSource (CFRunLoopGetCurrent(), eventSource, kCFRunLoopDefaultMode); - - (*(IOHIDQueueInterface**) queue)->start ((IOHIDQueueInterface**) queue); - - return true; - } + return -1; } } - } -#endif - return false; -} + const char* p = (const char*) sourceBuffer; + bytesWritten = 0; -void AppleRemoteDevice::handleCallbackInternal() -{ - int totalValues = 0; - AbsoluteTime nullTime = { 0, 0 }; - char cookies [12]; - int numCookies = 0; + const uint32 timeOutTime = Time::getMillisecondCounter() + timeOutMilliseconds; - while (numCookies < numElementsInArray (cookies)) - { - IOHIDEventStruct e; - - if ((*(IOHIDQueueInterface**) queue)->getNextEvent ((IOHIDQueueInterface**) queue, &e, nullTime, 0) != kIOReturnSuccess) - break; - - if ((int) e.elementCookie == 19) + while (bytesWritten < numBytesToWrite + && (timeOutMilliseconds < 0 || Time::getMillisecondCounter() < timeOutTime)) { - remoteId = e.value; - buttonPressed (switched, false); - } - else - { - totalValues += e.value; - cookies [numCookies++] = (char) (pointer_sized_int) e.elementCookie; + const int bytesThisTime = numBytesToWrite - bytesWritten; + const int numWritten = ::write (intern->pipeOut, p, bytesThisTime); + + if (numWritten <= 0) + { + bytesWritten = -1; + break; + } + + bytesWritten += numWritten; + p += bytesWritten; } } - cookies [numCookies++] = 0; - - static const char buttonPatterns[] = - { - 14, 7, 6, 5, 14, 7, 6, 5, 0, - 14, 8, 6, 5, 14, 8, 6, 5, 0, - 14, 12, 11, 6, 5, 0, - 14, 13, 11, 6, 5, 0, - 14, 9, 6, 5, 14, 9, 6, 5, 0, - 14, 10, 6, 5, 14, 10, 6, 5, 0, - 14, 6, 5, 4, 2, 0, - 14, 6, 5, 3, 2, 0, - 14, 6, 5, 14, 6, 5, 0, - 18, 14, 6, 5, 18, 14, 6, 5, 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; - } + return bytesWritten; } -#if JUCE_OPENGL - -class WindowedGLContext : public OpenGLContext -{ -public: - WindowedGLContext (Component* const component, - const OpenGLPixelFormat& pixelFormat_, - AGLContext sharedContext) - : renderContext (0), - pixelFormat (pixelFormat_) - { - jassert (component != 0); - - HIViewComponentPeer* const peer = dynamic_cast (component->getTopLevelComponent()->getPeer()); - if (peer == 0) - return; - - GLint attribs [64]; - int n = 0; - attribs[n++] = AGL_RGBA; - attribs[n++] = AGL_DOUBLEBUFFER; - attribs[n++] = AGL_ACCELERATED; - attribs[n++] = AGL_RED_SIZE; - attribs[n++] = pixelFormat.redBits; - attribs[n++] = AGL_GREEN_SIZE; - attribs[n++] = pixelFormat.greenBits; - attribs[n++] = AGL_BLUE_SIZE; - attribs[n++] = pixelFormat.blueBits; - attribs[n++] = AGL_ALPHA_SIZE; - attribs[n++] = pixelFormat.alphaBits; - attribs[n++] = AGL_DEPTH_SIZE; - attribs[n++] = pixelFormat.depthBufferBits; - attribs[n++] = AGL_STENCIL_SIZE; - attribs[n++] = pixelFormat.stencilBufferBits; - attribs[n++] = AGL_ACCUM_RED_SIZE; - attribs[n++] = pixelFormat.accumulationBufferRedBits; - attribs[n++] = AGL_ACCUM_GREEN_SIZE; - attribs[n++] = pixelFormat.accumulationBufferGreenBits; - attribs[n++] = AGL_ACCUM_BLUE_SIZE; - attribs[n++] = pixelFormat.accumulationBufferBlueBits; - attribs[n++] = AGL_ACCUM_ALPHA_SIZE; - attribs[n++] = pixelFormat.accumulationBufferAlphaBits; - - // xxx not sure how to do fullSceneAntiAliasingNumSamples.. - - attribs[n++] = AGL_SAMPLE_BUFFERS_ARB; - attribs[n++] = 1; - attribs[n++] = AGL_SAMPLES_ARB; - attribs[n++] = 4; - attribs[n++] = AGL_CLOSEST_POLICY; - attribs[n++] = AGL_NO_RECOVERY; - attribs[n++] = AGL_NONE; - - renderContext = aglCreateContext (aglChoosePixelFormat (0, 0, attribs), - sharedContext); - - aglSetDrawable (renderContext, GetWindowPort (peer->windowRef)); - } - - ~WindowedGLContext() - { - makeInactive(); - aglSetDrawable (renderContext, 0); - aglDestroyContext (renderContext); - } - - bool makeActive() const throw() - { - jassert (renderContext != 0); - - return aglSetCurrentContext (renderContext); - } - - bool makeInactive() const throw() - { - return (! isActive()) || aglSetCurrentContext (0); - } - - bool isActive() const throw() - { - return aglGetCurrentContext() == 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) - { - GLint bufferRect[4]; - bufferRect[0] = x; - bufferRect[1] = outerWindowHeight - (y + h); - bufferRect[2] = w; - bufferRect[3] = h; - - aglSetInteger (renderContext, AGL_BUFFER_RECT, bufferRect); - aglEnable (renderContext, AGL_BUFFER_RECT); - } - - void swapBuffers() - { - aglSwapBuffers (renderContext); - } - - bool setSwapInterval (const int numFramesPerSwap) - { - return aglSetInteger (renderContext, AGL_SWAP_INTERVAL, (const GLint*) &numFramesPerSwap); - } - - int getSwapInterval() const - { - GLint numFrames = 0; - aglGetInteger (renderContext, AGL_SWAP_INTERVAL, &numFrames); - return numFrames; - } - - void repaint() - { - } - - juce_UseDebuggingNewOperator - - AGLContext renderContext; - -private: - OpenGLPixelFormat pixelFormat; - - 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 ? (AGLContext) contextToShareWith->getRawContext() : 0); - - if (c->renderContext == 0) - deleteAndZero (c); - - return c; -} - -void juce_glViewport (const int w, const int h) -{ - glViewport (0, 0, w, h); -} - -static int getAGLAttribute (AGLPixelFormat p, const GLint attrib) -{ - GLint result = 0; - aglDescribePixelFormat (p, attrib, &result); - return result; -} - -void OpenGLPixelFormat::getAvailablePixelFormats (Component* /*component*/, - OwnedArray & 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); - } -} - -#endif - END_JUCE_NAMESPACE -/********* End of inlined file: juce_mac_Windowing.mm *********/ - -#endif +/********* End of inlined file: juce_mac_NamedPipe.cpp *********/ #endif diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 91be5ad365..d2d32d1689 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -80,7 +80,7 @@ /********* Start of inlined file: juce_Config.h *********/ #ifndef __JUCE_CONFIG_JUCEHEADER__ -#define __JUCE_CONFIG_JUCEHEADER__ +#define __JUCE_CONFIG_JUCEHEADER__ // (this comment is here to force the amalgamator to reinclude this file) /* This file contains macros that enable/disable various JUCE features. @@ -196,12 +196,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 writing command-line utilities, e.g. on linux boxes which don't have some @@ -213,6 +217,36 @@ #define JUCE_BUILD_GUI_CLASSES 1 #endif +/** This lets you disable building of the WebBrowserComponent, if it's not required. +*/ +#ifndef JUCE_WEB_BROWSER + #define JUCE_WEB_BROWSER 1 +#endif + +/* These flags let you avoid the direct inclusion of some 3rd-party libs in the + codebase - you might need to use this if you're linking to some of these libraries + yourself. +*/ +#ifndef JUCE_INCLUDE_ZLIB_CODE + #define JUCE_INCLUDE_ZLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_FLAC_CODE + #define JUCE_INCLUDE_FLAC_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_OGGVORBIS_CODE + #define JUCE_INCLUDE_OGGVORBIS_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_PNGLIB_CODE + #define JUCE_INCLUDE_PNGLIB_CODE 1 +#endif + +#ifndef JUCE_INCLUDE_JPEGLIB_CODE + #define JUCE_INCLUDE_JPEGLIB_CODE 1 +#endif + /** Enable this to add extra memory-leak info to the new and delete operators. (Currently, this only affects Windows builds in debug mode). @@ -334,6 +368,10 @@ #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4) #define MACOS_10_3_OR_EARLIER 1 #endif + + #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) + #define MACOS_10_4_OR_EARLIER 1 + #endif #endif #if JUCE_LINUX @@ -2471,6 +2509,639 @@ BEGIN_JUCE_NAMESPACE #ifndef __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__ #define __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__ +#ifndef __JUCE_SINGLETON_JUCEHEADER__ + +/********* Start of inlined file: juce_Singleton.h *********/ +#ifndef __JUCE_SINGLETON_JUCEHEADER__ +#define __JUCE_SINGLETON_JUCEHEADER__ + +/********* Start of inlined file: juce_ScopedLock.h *********/ +#ifndef __JUCE_SCOPEDLOCK_JUCEHEADER__ +#define __JUCE_SCOPEDLOCK_JUCEHEADER__ + +/********* Start of inlined file: juce_CriticalSection.h *********/ +#ifndef __JUCE_CRITICALSECTION_JUCEHEADER__ +#define __JUCE_CRITICALSECTION_JUCEHEADER__ + +/** + Prevents multiple threads from accessing shared objects at the same time. + + @see ScopedLock, Thread, InterProcessLock +*/ +class JUCE_API CriticalSection +{ +public: + + /** + Creates a CriticalSection object + */ + CriticalSection() throw(); + + /** Destroys a CriticalSection object. + + If the critical section is deleted whilst locked, its subsequent behaviour + is unpredictable. + */ + ~CriticalSection() throw(); + + /** Locks this critical section. + + If the lock is currently held by another thread, this will wait until it + becomes free. + + If the lock is already held by the caller thread, the method returns immediately. + + @see exit, ScopedLock + */ + void enter() const throw(); + + /** Attempts to lock this critical section without blocking. + + This method behaves identically to CriticalSection::enter, except that the caller thread + does not wait if the lock is currently held by another thread but returns false immediately. + + @returns false if the lock is currently held by another thread, true otherwise. + @see enter + */ + bool tryEnter() const throw(); + + /** Releases the lock. + + If the caller thread hasn't got the lock, this can have unpredictable results. + + If the enter() method has been called multiple times by the thread, each + call must be matched by a call to exit() before other threads will be allowed + to take over the lock. + + @see enter, ScopedLock + */ + void exit() const throw(); + + juce_UseDebuggingNewOperator + +private: + +#if JUCE_WIN32 + #if JUCE_64BIT + // To avoid including windows.h in the public Juce includes, we'll just allocate a + // block of memory here that's big enough to be used internally as a windows critical + // section object. + uint8 internal [44]; + #else + uint8 internal [24]; + #endif +#else + mutable pthread_mutex_t internal; +#endif + + CriticalSection (const CriticalSection&); + const CriticalSection& operator= (const CriticalSection&); +}; + +/** + A class that can be used in place of a real CriticalSection object. + + This is currently used by some templated array classes, and should get + optimised out by the compiler. + + @see Array, OwnedArray, ReferenceCountedArray +*/ +class JUCE_API DummyCriticalSection +{ +public: + forcedinline DummyCriticalSection() throw() {} + forcedinline ~DummyCriticalSection() throw() {} + + forcedinline void enter() const throw() {} + forcedinline void exit() const throw() {} +}; + +#endif // __JUCE_CRITICALSECTION_JUCEHEADER__ +/********* End of inlined file: juce_CriticalSection.h *********/ + +/** + Automatically locks and unlocks a CriticalSection object. + + Use one of these as a local variable to control access to a CriticalSection. + + e.g. @code + + CriticalSection myCriticalSection; + + for (;;) + { + const ScopedLock myScopedLock (myCriticalSection); + // myCriticalSection is now locked + + ...do some stuff... + + // myCriticalSection gets unlocked here. + } + @endcode + + @see CriticalSection, ScopedUnlock +*/ +class JUCE_API ScopedLock +{ +public: + + /** Creates a ScopedLock. + + As soon as it is created, this will lock the CriticalSection, and + when the ScopedLock object is deleted, the CriticalSection will + be unlocked. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! Best just to use it + as a local stack object, rather than creating one with the new() operator. + */ + inline ScopedLock (const CriticalSection& lock) throw() : lock_ (lock) { lock.enter(); } + + /** Destructor. + + The CriticalSection will be unlocked when the destructor is called. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! + */ + inline ~ScopedLock() throw() { lock_.exit(); } + +private: + + const CriticalSection& lock_; + + ScopedLock (const ScopedLock&); + const ScopedLock& operator= (const ScopedLock&); +}; + +/** + Automatically unlocks and re-locks a CriticalSection object. + + This is the reverse of a ScopedLock object - instead of locking the critical + section for the lifetime of this object, it unlocks it. + + Make sure you don't try to unlock critical sections that aren't actually locked! + + e.g. @code + + CriticalSection myCriticalSection; + + for (;;) + { + const ScopedLock myScopedLock (myCriticalSection); + // myCriticalSection is now locked + + ... do some stuff with it locked .. + + while (xyz) + { + ... do some stuff with it locked .. + + const ScopedUnlock unlocker (myCriticalSection); + + // myCriticalSection is now unlocked for the remainder of this block, + // and re-locked at the end. + + ...do some stuff with it unlocked ... + } + + // myCriticalSection gets unlocked here. + } + @endcode + + @see CriticalSection, ScopedLock +*/ +class ScopedUnlock +{ +public: + + /** Creates a ScopedUnlock. + + As soon as it is created, this will unlock the CriticalSection, and + when the ScopedLock object is deleted, the CriticalSection will + be re-locked. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! Best just to use it + as a local stack object, rather than creating one with the new() operator. + */ + inline ScopedUnlock (const CriticalSection& lock) throw() : lock_ (lock) { lock.exit(); } + + /** Destructor. + + The CriticalSection will be unlocked when the destructor is called. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! + */ + inline ~ScopedUnlock() throw() { lock_.enter(); } + +private: + + const CriticalSection& lock_; + + ScopedUnlock (const ScopedLock&); + const ScopedUnlock& operator= (const ScopedUnlock&); +}; + +#endif // __JUCE_SCOPEDLOCK_JUCEHEADER__ +/********* End of inlined file: juce_ScopedLock.h *********/ + +/** + Macro to declare member variables and methods for a singleton class. + + To use this, add the line juce_DeclareSingleton (MyClass, allowOnlyOneInstance) + to the class's definition. + + If allowOnlyOneInstance == true, it won't allow the object to be created + more than once in the process's lifetime. + + Then put a macro juce_ImplementSingleton (MyClass) along with the class's + implementation code. + + Clients can then call the static MyClass::getInstance() to get a pointer to the + singleton, or MyClass::getInstanceWithoutCreating() which may return 0 if no instance + is currently extant + + it's a very good idea to also add the call clearSingletonInstance() to the + destructor of the class, in case it is deleted by other means than deleteInstance() + + e.g. @code + + class MySingleton + { + public: + MySingleton() + { + } + + ~MySingleton() + { + // this ensures that no dangling pointers are left when the + // singleton is deleted. + clearSingletonInstance(); + } + + juce_DeclareSingleton (MySingleton, false) + }; + + juce_ImplementSingleton (MySingleton) + + // example of usage: + MySingleton* m = MySingleton::getInstance(); // creates the singleton if there isn't already one. + + ... + + MySingleton::deleteInstance(); // safely deletes the singleton (if it's been created). + + @endcode + + If you know that your object will only be created and deleted by a single thread, you + can use the slightly more efficient juce_DeclareSingleton_SingleThreaded() macro instead + of this one. + + @see juce_ImplementSingleton, juce_DeclareSingleton_SingleThreaded +*/ +#define juce_DeclareSingleton(classname, allowOnlyOneInstance) \ +\ + static classname* _singletonInstance; \ + static JUCE_NAMESPACE::CriticalSection _singletonLock; \ +\ + static classname* getInstance() \ + { \ + if (_singletonInstance == 0) \ + {\ + const JUCE_NAMESPACE::ScopedLock sl (_singletonLock); \ +\ + if (_singletonInstance == 0) \ + { \ + static bool alreadyInside = false; \ + static bool createdOnceAlready = false; \ +\ + const bool problem = alreadyInside || ((allowOnlyOneInstance) && createdOnceAlready); \ + jassert (! problem); \ + if (! problem) \ + { \ + createdOnceAlready = true; \ + alreadyInside = true; \ + classname* newObject = new classname(); /* (use a stack variable to avoid setting the newObject value before the class has finished its constructor) */ \ + alreadyInside = false; \ +\ + _singletonInstance = newObject; \ + } \ + } \ + } \ +\ + return _singletonInstance; \ + } \ +\ + static inline classname* getInstanceWithoutCreating() throw() \ + { \ + return _singletonInstance; \ + } \ +\ + static void deleteInstance() \ + { \ + const JUCE_NAMESPACE::ScopedLock sl (_singletonLock); \ + if (_singletonInstance != 0) \ + { \ + classname* const old = _singletonInstance; \ + _singletonInstance = 0; \ + delete old; \ + } \ + } \ +\ + void clearSingletonInstance() throw() \ + { \ + if (_singletonInstance == this) \ + _singletonInstance = 0; \ + } + +/** This is a counterpart to the juce_DeclareSingleton macro. + + After adding the juce_DeclareSingleton to the class definition, this macro has + to be used in the cpp file. +*/ +#define juce_ImplementSingleton(classname) \ +\ + classname* classname::_singletonInstance = 0; \ + JUCE_NAMESPACE::CriticalSection classname::_singletonLock; + +/** + Macro to declare member variables and methods for a singleton class. + + This is exactly the same as juce_DeclareSingleton, but doesn't use a critical + section to make access to it thread-safe. If you know that your object will + only ever be created or deleted by a single thread, then this is a + more efficient version to use. + + See the documentation for juce_DeclareSingleton for more information about + how to use it, the only difference being that you have to use + juce_ImplementSingleton_SingleThreaded instead of juce_ImplementSingleton. + + @see juce_ImplementSingleton_SingleThreaded, juce_DeclareSingleton, juce_DeclareSingleton_SingleThreaded_Minimal +*/ +#define juce_DeclareSingleton_SingleThreaded(classname, allowOnlyOneInstance) \ +\ + static classname* _singletonInstance; \ +\ + static classname* getInstance() \ + { \ + if (_singletonInstance == 0) \ + { \ + static bool alreadyInside = false; \ + static bool createdOnceAlready = false; \ +\ + const bool problem = alreadyInside || ((allowOnlyOneInstance) && createdOnceAlready); \ + jassert (! problem); \ + if (! problem) \ + { \ + createdOnceAlready = true; \ + alreadyInside = true; \ + classname* newObject = new classname(); /* (use a stack variable to avoid setting the newObject value before the class has finished its constructor) */ \ + alreadyInside = false; \ +\ + _singletonInstance = newObject; \ + } \ + } \ +\ + return _singletonInstance; \ + } \ +\ + static inline classname* getInstanceWithoutCreating() throw() \ + { \ + return _singletonInstance; \ + } \ +\ + static void deleteInstance() \ + { \ + if (_singletonInstance != 0) \ + { \ + classname* const old = _singletonInstance; \ + _singletonInstance = 0; \ + delete old; \ + } \ + } \ +\ + void clearSingletonInstance() throw() \ + { \ + if (_singletonInstance == this) \ + _singletonInstance = 0; \ + } + +/** + Macro to declare member variables and methods for a singleton class. + + This is like juce_DeclareSingleton_SingleThreaded, but doesn't do any checking + for recursion or repeated instantiation. It's intended for use as a lightweight + version of a singleton, where you're using it in very straightforward + circumstances and don't need the extra checking. + + Juce use the normal juce_ImplementSingleton_SingleThreaded as the counterpart + to this declaration, as you would with juce_DeclareSingleton_SingleThreaded. + + See the documentation for juce_DeclareSingleton for more information about + how to use it, the only difference being that you have to use + juce_ImplementSingleton_SingleThreaded instead of juce_ImplementSingleton. + + @see juce_ImplementSingleton_SingleThreaded, juce_DeclareSingleton +*/ +#define juce_DeclareSingleton_SingleThreaded_Minimal(classname) \ +\ + static classname* _singletonInstance; \ +\ + static classname* getInstance() \ + { \ + if (_singletonInstance == 0) \ + _singletonInstance = new classname(); \ +\ + return _singletonInstance; \ + } \ +\ + static inline classname* getInstanceWithoutCreating() throw() \ + { \ + return _singletonInstance; \ + } \ +\ + static void deleteInstance() \ + { \ + if (_singletonInstance != 0) \ + { \ + classname* const old = _singletonInstance; \ + _singletonInstance = 0; \ + delete old; \ + } \ + } \ +\ + void clearSingletonInstance() throw() \ + { \ + if (_singletonInstance == this) \ + _singletonInstance = 0; \ + } + +/** This is a counterpart to the juce_DeclareSingleton_SingleThreaded macro. + + After adding juce_DeclareSingleton_SingleThreaded or juce_DeclareSingleton_SingleThreaded_Minimal + to the class definition, this macro has to be used somewhere in the cpp file. +*/ +#define juce_ImplementSingleton_SingleThreaded(classname) \ +\ + classname* classname::_singletonInstance = 0; + +#endif // __JUCE_SINGLETON_JUCEHEADER__ +/********* End of inlined file: juce_Singleton.h *********/ + +#endif +#ifndef __JUCE_SYSTEMSTATS_JUCEHEADER__ + +/********* Start of inlined file: juce_SystemStats.h *********/ +#ifndef __JUCE_SYSTEMSTATS_JUCEHEADER__ +#define __JUCE_SYSTEMSTATS_JUCEHEADER__ + +/** + Contains methods for finding out about the current hardware and OS configuration. +*/ +class JUCE_API SystemStats +{ +public: + + /** Returns the current version of JUCE, + + (just in case you didn't already know at compile-time.) + + See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros. + */ + static const String getJUCEVersion() throw(); + + /** The set of possible results of the getOperatingSystemType() method. + */ + enum OperatingSystemType + { + UnknownOS = 0, + + MacOSX = 0x1000, + Linux = 0x2000, + + Win95 = 0x4001, + Win98 = 0x4002, + WinNT351 = 0x4103, + WinNT40 = 0x4104, + Win2000 = 0x4105, + WinXP = 0x4106, + WinVista = 0x4107, + + Windows = 0x4000, /**< To test whether any version of Windows is running, + you can use the expression ((getOperatingSystemType() & Windows) != 0). */ + WindowsNT = 0x0100, /**< To test whether the platform is Windows NT or later (i.e. not Win95 or 98), + you can use the expression ((getOperatingSystemType() & WindowsNT) != 0). */ + }; + + /** Returns the type of operating system we're running on. + + @returns one of the values from the OperatingSystemType enum. + @see getOperatingSystemName + */ + static OperatingSystemType getOperatingSystemType() throw(); + + /** Returns the name of the type of operating system we're running on. + + @returns a string describing the OS type. + @see getOperatingSystemType + */ + static const String getOperatingSystemName() throw(); + + /** Returns true if the OS is 64-bit, or false for a 32-bit OS. + */ + static bool isOperatingSystem64Bit() throw(); + + // CPU and memory information.. + + /** Returns the approximate CPU speed. + + @returns the speed in megahertz, e.g. 1500, 2500, 32000 (depending on + what year you're reading this...) + */ + static int getCpuSpeedInMegaherz() throw(); + + /** Returns a string to indicate the CPU vendor. + + Might not be known on some systems. + */ + static const String getCpuVendor() throw(); + + /** Checks whether Intel MMX instructions are available. */ + static bool hasMMX() throw(); + + /** Checks whether Intel SSE instructions are available. */ + static bool hasSSE() throw(); + + /** Checks whether Intel SSE2 instructions are available. */ + static bool hasSSE2() throw(); + + /** Checks whether AMD 3DNOW instructions are available. */ + static bool has3DNow() throw(); + + /** Returns the number of CPUs. + */ + static int getNumCpus() throw(); + + /** Returns a clock-cycle tick counter, if available. + + If the machine can do it, this will return a tick-count + where each tick is one cpu clock cycle - used for profiling + code. + + @returns the tick count, or zero if not available. + */ + static int64 getClockCycleCounter() throw(); + + /** Finds out how much RAM is in the machine. + + @returns the approximate number of megabytes of memory, or zero if + something goes wrong when finding out. + */ + static int getMemorySizeInMegabytes() throw(); + + /** Returns the system page-size. + + This is only used by programmers with beards. + */ + static int getPageSize() throw(); + + /** Returns a list of MAC addresses found on this machine. + + @param addresses an array into which the MAC addresses should be copied + @param maxNum the number of elements in this array + @param littleEndian the endianness of the numbers to return. Note that + the default values of this parameter are different on + Mac/PC to avoid breaking old software that was written + before this parameter was added (when the two systems + defaulted to using different endiannesses). In newer + software you probably want to specify an explicit value + for this. + @returns the number of MAC addresses that were found + */ + static int getMACAddresses (int64* addresses, int maxNum, +#if JUCE_MAC + const bool littleEndian = true) throw(); +#else + const bool littleEndian = false) throw(); +#endif + + // not-for-public-use platform-specific method gets called at startup to initialise things. + static void initialiseStats() throw(); +}; + +#endif // __JUCE_SYSTEMSTATS_JUCEHEADER__ +/********* End of inlined file: juce_SystemStats.h *********/ + +#endif +#ifndef __JUCE_MATHSFUNCTIONS_JUCEHEADER__ + +#endif +#ifndef __JUCE_PLATFORMDEFS_JUCEHEADER__ + +#endif #ifndef __JUCE_ATOMIC_JUCEHEADER__ /********* Start of inlined file: juce_Atomic.h *********/ @@ -2667,7 +3338,7 @@ BEGIN_JUCE_NAMESPACE /********* End of inlined file: juce_Atomic.h *********/ #endif -#ifndef __JUCE_DATACONVERSIONS_JUCEHEADER__ +#ifndef __JUCE_LOGGER_JUCEHEADER__ #endif #ifndef __JUCE_FILELOGGER_JUCEHEADER__ @@ -3083,106 +3754,6 @@ public: #endif // __JUCE_ELEMENTCOMPARATOR_JUCEHEADER__ /********* End of inlined file: juce_ElementComparator.h *********/ -/********* Start of inlined file: juce_CriticalSection.h *********/ -#ifndef __JUCE_CRITICALSECTION_JUCEHEADER__ -#define __JUCE_CRITICALSECTION_JUCEHEADER__ - -/** - Prevents multiple threads from accessing shared objects at the same time. - - @see ScopedLock, Thread, InterProcessLock -*/ -class JUCE_API CriticalSection -{ -public: - - /** - Creates a CriticalSection object - */ - CriticalSection() throw(); - - /** Destroys a CriticalSection object. - - If the critical section is deleted whilst locked, its subsequent behaviour - is unpredictable. - */ - ~CriticalSection() throw(); - - /** Locks this critical section. - - If the lock is currently held by another thread, this will wait until it - becomes free. - - If the lock is already held by the caller thread, the method returns immediately. - - @see exit, ScopedLock - */ - void enter() const throw(); - - /** Attempts to lock this critical section without blocking. - - This method behaves identically to CriticalSection::enter, except that the caller thread - does not wait if the lock is currently held by another thread but returns false immediately. - - @returns false if the lock is currently held by another thread, true otherwise. - @see enter - */ - bool tryEnter() const throw(); - - /** Releases the lock. - - If the caller thread hasn't got the lock, this can have unpredictable results. - - If the enter() method has been called multiple times by the thread, each - call must be matched by a call to exit() before other threads will be allowed - to take over the lock. - - @see enter, ScopedLock - */ - void exit() const throw(); - - juce_UseDebuggingNewOperator - -private: - -#if JUCE_WIN32 - #if JUCE_64BIT - // To avoid including windows.h in the public Juce includes, we'll just allocate a - // block of memory here that's big enough to be used internally as a windows critical - // section object. - uint8 internal [44]; - #else - uint8 internal [24]; - #endif -#else - mutable pthread_mutex_t internal; -#endif - - CriticalSection (const CriticalSection&); - const CriticalSection& operator= (const CriticalSection&); -}; - -/** - A class that can be used in place of a real CriticalSection object. - - This is currently used by some templated array classes, and should get - optimised out by the compiler. - - @see Array, OwnedArray, ReferenceCountedArray -*/ -class JUCE_API DummyCriticalSection -{ -public: - forcedinline DummyCriticalSection() throw() {} - forcedinline ~DummyCriticalSection() throw() {} - - forcedinline void enter() const throw() {} - forcedinline void exit() const throw() {} -}; - -#endif // __JUCE_CRITICALSECTION_JUCEHEADER__ -/********* End of inlined file: juce_CriticalSection.h *********/ - /** An array designed for holding objects. This holds a list of pointers to objects, and will automatically @@ -6881,73 +7452,6 @@ private: #endif // __JUCE_FILELOGGER_JUCEHEADER__ /********* End of inlined file: juce_FileLogger.h *********/ -#endif -#ifndef __JUCE_INITIALISATION_JUCEHEADER__ - -/********* Start of inlined file: juce_Initialisation.h *********/ -#ifndef __JUCE_INITIALISATION_JUCEHEADER__ -#define __JUCE_INITIALISATION_JUCEHEADER__ - -/** Initialises Juce's GUI classes. - - If you're embedding Juce into an application that uses its own event-loop rather - than using the START_JUCE_APPLICATION macro, call this function before making any - Juce calls, to make sure things are initialised correctly. - - Note that if you're creating a Juce DLL for Windows, you may also need to call the - PlatformUtilities::setCurrentModuleInstanceHandle() method. - - @see shutdownJuce_GUI(), initialiseJuce_NonGUI() -*/ -void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI(); - -/** Clears up any static data being used by Juce's GUI classes. - - If you're embedding Juce into an application that uses its own event-loop rather - than using the START_JUCE_APPLICATION macro, call this function in your shutdown - code to clean up any juce objects that might be lying around. - - @see initialiseJuce_GUI(), initialiseJuce_NonGUI() -*/ -void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI(); - -/** Initialises the core parts of Juce. - - If you're embedding Juce into either a command-line program, call this function - at the start of your main() function to make sure that Juce is initialised correctly. - - Note that if you're creating a Juce DLL for Windows, you may also need to call the - PlatformUtilities::setCurrentModuleInstanceHandle() method. - - @see shutdownJuce_NonGUI, initialiseJuce_GUI -*/ -void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI(); - -/** Clears up any static data being used by Juce's non-gui core classes. - - If you're embedding Juce into either a command-line program, call this function - at the end of your main() function if you want to make sure any Juce objects are - cleaned up correctly. - - @see initialiseJuce_NonGUI, initialiseJuce_GUI -*/ -void JUCE_PUBLIC_FUNCTION shutdownJuce_NonGUI(); - -#endif // __JUCE_INITIALISATION_JUCEHEADER__ -/********* End of inlined file: juce_Initialisation.h *********/ - -#endif -#ifndef __JUCE_LOGGER_JUCEHEADER__ - -#endif -#ifndef __JUCE_MATHSFUNCTIONS_JUCEHEADER__ - -#endif -#ifndef __JUCE_MEMORY_JUCEHEADER__ - -#endif -#ifndef __JUCE_PLATFORMDEFS_JUCEHEADER__ - #endif #ifndef __JUCE_RANDOM_JUCEHEADER__ @@ -7030,860 +7534,74 @@ private: /********* End of inlined file: juce_Random.h *********/ #endif -#ifndef __JUCE_RELATIVETIME_JUCEHEADER__ +#ifndef __JUCE_INITIALISATION_JUCEHEADER__ -#endif -#ifndef __JUCE_SINGLETON_JUCEHEADER__ +/********* Start of inlined file: juce_Initialisation.h *********/ +#ifndef __JUCE_INITIALISATION_JUCEHEADER__ +#define __JUCE_INITIALISATION_JUCEHEADER__ -/********* Start of inlined file: juce_Singleton.h *********/ -#ifndef __JUCE_SINGLETON_JUCEHEADER__ -#define __JUCE_SINGLETON_JUCEHEADER__ +/** Initialises Juce's GUI classes. -/********* Start of inlined file: juce_ScopedLock.h *********/ -#ifndef __JUCE_SCOPEDLOCK_JUCEHEADER__ -#define __JUCE_SCOPEDLOCK_JUCEHEADER__ + If you're embedding Juce into an application that uses its own event-loop rather + than using the START_JUCE_APPLICATION macro, call this function before making any + Juce calls, to make sure things are initialised correctly. -/** - Automatically locks and unlocks a CriticalSection object. + Note that if you're creating a Juce DLL for Windows, you may also need to call the + PlatformUtilities::setCurrentModuleInstanceHandle() method. - Use one of these as a local variable to control access to a CriticalSection. - - e.g. @code - - CriticalSection myCriticalSection; - - for (;;) - { - const ScopedLock myScopedLock (myCriticalSection); - // myCriticalSection is now locked - - ...do some stuff... - - // myCriticalSection gets unlocked here. - } - @endcode - - @see CriticalSection, ScopedUnlock + @see shutdownJuce_GUI(), initialiseJuce_NonGUI() */ -class JUCE_API ScopedLock -{ -public: +void JUCE_PUBLIC_FUNCTION initialiseJuce_GUI(); - /** Creates a ScopedLock. +/** Clears up any static data being used by Juce's GUI classes. - As soon as it is created, this will lock the CriticalSection, and - when the ScopedLock object is deleted, the CriticalSection will - be unlocked. + If you're embedding Juce into an application that uses its own event-loop rather + than using the START_JUCE_APPLICATION macro, call this function in your shutdown + code to clean up any juce objects that might be lying around. - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline ScopedLock (const CriticalSection& lock) throw() : lock_ (lock) { lock.enter(); } - - /** Destructor. - - The CriticalSection will be unlocked when the destructor is called. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! - */ - inline ~ScopedLock() throw() { lock_.exit(); } - -private: - - const CriticalSection& lock_; - - ScopedLock (const ScopedLock&); - const ScopedLock& operator= (const ScopedLock&); -}; - -/** - Automatically unlocks and re-locks a CriticalSection object. - - This is the reverse of a ScopedLock object - instead of locking the critical - section for the lifetime of this object, it unlocks it. - - Make sure you don't try to unlock critical sections that aren't actually locked! - - e.g. @code - - CriticalSection myCriticalSection; - - for (;;) - { - const ScopedLock myScopedLock (myCriticalSection); - // myCriticalSection is now locked - - ... do some stuff with it locked .. - - while (xyz) - { - ... do some stuff with it locked .. - - const ScopedUnlock unlocker (myCriticalSection); - - // myCriticalSection is now unlocked for the remainder of this block, - // and re-locked at the end. - - ...do some stuff with it unlocked ... - } - - // myCriticalSection gets unlocked here. - } - @endcode - - @see CriticalSection, ScopedLock + @see initialiseJuce_GUI(), initialiseJuce_NonGUI() */ -class ScopedUnlock -{ -public: +void JUCE_PUBLIC_FUNCTION shutdownJuce_GUI(); - /** Creates a ScopedUnlock. +/** Initialises the core parts of Juce. - As soon as it is created, this will unlock the CriticalSection, and - when the ScopedLock object is deleted, the CriticalSection will - be re-locked. + If you're embedding Juce into either a command-line program, call this function + at the start of your main() function to make sure that Juce is initialised correctly. - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline ScopedUnlock (const CriticalSection& lock) throw() : lock_ (lock) { lock.exit(); } + Note that if you're creating a Juce DLL for Windows, you may also need to call the + PlatformUtilities::setCurrentModuleInstanceHandle() method. - /** Destructor. - - The CriticalSection will be unlocked when the destructor is called. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! - */ - inline ~ScopedUnlock() throw() { lock_.enter(); } - -private: - - const CriticalSection& lock_; - - ScopedUnlock (const ScopedLock&); - const ScopedUnlock& operator= (const ScopedUnlock&); -}; - -#endif // __JUCE_SCOPEDLOCK_JUCEHEADER__ -/********* End of inlined file: juce_ScopedLock.h *********/ - -/** - Macro to declare member variables and methods for a singleton class. - - To use this, add the line juce_DeclareSingleton (MyClass, allowOnlyOneInstance) - to the class's definition. - - If allowOnlyOneInstance == true, it won't allow the object to be created - more than once in the process's lifetime. - - Then put a macro juce_ImplementSingleton (MyClass) along with the class's - implementation code. - - Clients can then call the static MyClass::getInstance() to get a pointer to the - singleton, or MyClass::getInstanceWithoutCreating() which may return 0 if no instance - is currently extant - - it's a very good idea to also add the call clearSingletonInstance() to the - destructor of the class, in case it is deleted by other means than deleteInstance() - - e.g. @code - - class MySingleton - { - public: - MySingleton() - { - } - - ~MySingleton() - { - // this ensures that no dangling pointers are left when the - // singleton is deleted. - clearSingletonInstance(); - } - - juce_DeclareSingleton (MySingleton, false) - }; - - juce_ImplementSingleton (MySingleton) - - // example of usage: - MySingleton* m = MySingleton::getInstance(); // creates the singleton if there isn't already one. - - ... - - MySingleton::deleteInstance(); // safely deletes the singleton (if it's been created). - - @endcode - - If you know that your object will only be created and deleted by a single thread, you - can use the slightly more efficient juce_DeclareSingleton_SingleThreaded() macro instead - of this one. - - @see juce_ImplementSingleton, juce_DeclareSingleton_SingleThreaded + @see shutdownJuce_NonGUI, initialiseJuce_GUI */ -#define juce_DeclareSingleton(classname, allowOnlyOneInstance) \ -\ - static classname* _singletonInstance; \ - static JUCE_NAMESPACE::CriticalSection _singletonLock; \ -\ - static classname* getInstance() \ - { \ - if (_singletonInstance == 0) \ - {\ - const JUCE_NAMESPACE::ScopedLock sl (_singletonLock); \ -\ - if (_singletonInstance == 0) \ - { \ - static bool alreadyInside = false; \ - static bool createdOnceAlready = false; \ -\ - const bool problem = alreadyInside || ((allowOnlyOneInstance) && createdOnceAlready); \ - jassert (! problem); \ - if (! problem) \ - { \ - createdOnceAlready = true; \ - alreadyInside = true; \ - classname* newObject = new classname(); /* (use a stack variable to avoid setting the newObject value before the class has finished its constructor) */ \ - alreadyInside = false; \ -\ - _singletonInstance = newObject; \ - } \ - } \ - } \ -\ - return _singletonInstance; \ - } \ -\ - static inline classname* getInstanceWithoutCreating() throw() \ - { \ - return _singletonInstance; \ - } \ -\ - static void deleteInstance() \ - { \ - const JUCE_NAMESPACE::ScopedLock sl (_singletonLock); \ - if (_singletonInstance != 0) \ - { \ - classname* const old = _singletonInstance; \ - _singletonInstance = 0; \ - delete old; \ - } \ - } \ -\ - void clearSingletonInstance() throw() \ - { \ - if (_singletonInstance == this) \ - _singletonInstance = 0; \ - } +void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI(); -/** This is a counterpart to the juce_DeclareSingleton macro. +/** Clears up any static data being used by Juce's non-gui core classes. - After adding the juce_DeclareSingleton to the class definition, this macro has - to be used in the cpp file. + If you're embedding Juce into either a command-line program, call this function + at the end of your main() function if you want to make sure any Juce objects are + cleaned up correctly. + + @see initialiseJuce_NonGUI, initialiseJuce_GUI */ -#define juce_ImplementSingleton(classname) \ -\ - classname* classname::_singletonInstance = 0; \ - JUCE_NAMESPACE::CriticalSection classname::_singletonLock; +void JUCE_PUBLIC_FUNCTION shutdownJuce_NonGUI(); -/** - Macro to declare member variables and methods for a singleton class. - - This is exactly the same as juce_DeclareSingleton, but doesn't use a critical - section to make access to it thread-safe. If you know that your object will - only ever be created or deleted by a single thread, then this is a - more efficient version to use. - - See the documentation for juce_DeclareSingleton for more information about - how to use it, the only difference being that you have to use - juce_ImplementSingleton_SingleThreaded instead of juce_ImplementSingleton. - - @see juce_ImplementSingleton_SingleThreaded, juce_DeclareSingleton, juce_DeclareSingleton_SingleThreaded_Minimal -*/ -#define juce_DeclareSingleton_SingleThreaded(classname, allowOnlyOneInstance) \ -\ - static classname* _singletonInstance; \ -\ - static classname* getInstance() \ - { \ - if (_singletonInstance == 0) \ - { \ - static bool alreadyInside = false; \ - static bool createdOnceAlready = false; \ -\ - const bool problem = alreadyInside || ((allowOnlyOneInstance) && createdOnceAlready); \ - jassert (! problem); \ - if (! problem) \ - { \ - createdOnceAlready = true; \ - alreadyInside = true; \ - classname* newObject = new classname(); /* (use a stack variable to avoid setting the newObject value before the class has finished its constructor) */ \ - alreadyInside = false; \ -\ - _singletonInstance = newObject; \ - } \ - } \ -\ - return _singletonInstance; \ - } \ -\ - static inline classname* getInstanceWithoutCreating() throw() \ - { \ - return _singletonInstance; \ - } \ -\ - static void deleteInstance() \ - { \ - if (_singletonInstance != 0) \ - { \ - classname* const old = _singletonInstance; \ - _singletonInstance = 0; \ - delete old; \ - } \ - } \ -\ - void clearSingletonInstance() throw() \ - { \ - if (_singletonInstance == this) \ - _singletonInstance = 0; \ - } - -/** - Macro to declare member variables and methods for a singleton class. - - This is like juce_DeclareSingleton_SingleThreaded, but doesn't do any checking - for recursion or repeated instantiation. It's intended for use as a lightweight - version of a singleton, where you're using it in very straightforward - circumstances and don't need the extra checking. - - Juce use the normal juce_ImplementSingleton_SingleThreaded as the counterpart - to this declaration, as you would with juce_DeclareSingleton_SingleThreaded. - - See the documentation for juce_DeclareSingleton for more information about - how to use it, the only difference being that you have to use - juce_ImplementSingleton_SingleThreaded instead of juce_ImplementSingleton. - - @see juce_ImplementSingleton_SingleThreaded, juce_DeclareSingleton -*/ -#define juce_DeclareSingleton_SingleThreaded_Minimal(classname) \ -\ - static classname* _singletonInstance; \ -\ - static classname* getInstance() \ - { \ - if (_singletonInstance == 0) \ - _singletonInstance = new classname(); \ -\ - return _singletonInstance; \ - } \ -\ - static inline classname* getInstanceWithoutCreating() throw() \ - { \ - return _singletonInstance; \ - } \ -\ - static void deleteInstance() \ - { \ - if (_singletonInstance != 0) \ - { \ - classname* const old = _singletonInstance; \ - _singletonInstance = 0; \ - delete old; \ - } \ - } \ -\ - void clearSingletonInstance() throw() \ - { \ - if (_singletonInstance == this) \ - _singletonInstance = 0; \ - } - -/** This is a counterpart to the juce_DeclareSingleton_SingleThreaded macro. - - After adding juce_DeclareSingleton_SingleThreaded or juce_DeclareSingleton_SingleThreaded_Minimal - to the class definition, this macro has to be used somewhere in the cpp file. -*/ -#define juce_ImplementSingleton_SingleThreaded(classname) \ -\ - classname* classname::_singletonInstance = 0; - -#endif // __JUCE_SINGLETON_JUCEHEADER__ -/********* End of inlined file: juce_Singleton.h *********/ +#endif // __JUCE_INITIALISATION_JUCEHEADER__ +/********* End of inlined file: juce_Initialisation.h *********/ #endif #ifndef __JUCE_STANDARDHEADER_JUCEHEADER__ #endif -#ifndef __JUCE_SYSTEMSTATS_JUCEHEADER__ - -/********* Start of inlined file: juce_SystemStats.h *********/ -#ifndef __JUCE_SYSTEMSTATS_JUCEHEADER__ -#define __JUCE_SYSTEMSTATS_JUCEHEADER__ - -/** - Contains methods for finding out about the current hardware and OS configuration. -*/ -class JUCE_API SystemStats -{ -public: - - /** Returns the current version of JUCE, - - (just in case you didn't already know at compile-time.) - - See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VERSION macros. - */ - static const String getJUCEVersion() throw(); - - /** The set of possible results of the getOperatingSystemType() method. - */ - enum OperatingSystemType - { - UnknownOS = 0, - - MacOSX = 0x1000, - Linux = 0x2000, - - Win95 = 0x4001, - Win98 = 0x4002, - WinNT351 = 0x4103, - WinNT40 = 0x4104, - Win2000 = 0x4105, - WinXP = 0x4106, - WinVista = 0x4107, - - Windows = 0x4000, /**< To test whether any version of Windows is running, - you can use the expression ((getOperatingSystemType() & Windows) != 0). */ - WindowsNT = 0x0100, /**< To test whether the platform is Windows NT or later (i.e. not Win95 or 98), - you can use the expression ((getOperatingSystemType() & WindowsNT) != 0). */ - }; - - /** Returns the type of operating system we're running on. - - @returns one of the values from the OperatingSystemType enum. - @see getOperatingSystemName - */ - static OperatingSystemType getOperatingSystemType() throw(); - - /** Returns the name of the type of operating system we're running on. - - @returns a string describing the OS type. - @see getOperatingSystemType - */ - static const String getOperatingSystemName() throw(); - - /** Returns true if the OS is 64-bit, or false for a 32-bit OS. - */ - static bool isOperatingSystem64Bit() throw(); - - // CPU and memory information.. - - /** Returns the approximate CPU speed. - - @returns the speed in megahertz, e.g. 1500, 2500, 32000 (depending on - what year you're reading this...) - */ - static int getCpuSpeedInMegaherz() throw(); - - /** Returns a string to indicate the CPU vendor. - - Might not be known on some systems. - */ - static const String getCpuVendor() throw(); - - /** Checks whether Intel MMX instructions are available. */ - static bool hasMMX() throw(); - - /** Checks whether Intel SSE instructions are available. */ - static bool hasSSE() throw(); - - /** Checks whether Intel SSE2 instructions are available. */ - static bool hasSSE2() throw(); - - /** Checks whether AMD 3DNOW instructions are available. */ - static bool has3DNow() throw(); - - /** Returns the number of CPUs. - */ - static int getNumCpus() throw(); - - /** Returns a clock-cycle tick counter, if available. - - If the machine can do it, this will return a tick-count - where each tick is one cpu clock cycle - used for profiling - code. - - @returns the tick count, or zero if not available. - */ - static int64 getClockCycleCounter() throw(); - - /** Finds out how much RAM is in the machine. - - @returns the approximate number of megabytes of memory, or zero if - something goes wrong when finding out. - */ - static int getMemorySizeInMegabytes() throw(); - - /** Returns the system page-size. - - This is only used by programmers with beards. - */ - static int getPageSize() throw(); - - /** Returns a list of MAC addresses found on this machine. - - @param addresses an array into which the MAC addresses should be copied - @param maxNum the number of elements in this array - @param littleEndian the endianness of the numbers to return. Note that - the default values of this parameter are different on - Mac/PC to avoid breaking old software that was written - before this parameter was added (when the two systems - defaulted to using different endiannesses). In newer - software you probably want to specify an explicit value - for this. - @returns the number of MAC addresses that were found - */ - static int getMACAddresses (int64* addresses, int maxNum, -#if JUCE_MAC - const bool littleEndian = true) throw(); -#else - const bool littleEndian = false) throw(); -#endif - - // not-for-public-use platform-specific method gets called at startup to initialise things. - static void initialiseStats() throw(); -}; - -#endif // __JUCE_SYSTEMSTATS_JUCEHEADER__ -/********* End of inlined file: juce_SystemStats.h *********/ +#ifndef __JUCE_RELATIVETIME_JUCEHEADER__ #endif #ifndef __JUCE_TIME_JUCEHEADER__ #endif -#ifndef __JUCE_ARRAY_JUCEHEADER__ +#ifndef __JUCE_DATACONVERSIONS_JUCEHEADER__ #endif -#ifndef __JUCE_ARRAYALLOCATIONBASE_JUCEHEADER__ - -#endif -#ifndef __JUCE_BITARRAY_JUCEHEADER__ - -/********* Start of inlined file: juce_BitArray.h *********/ -#ifndef __JUCE_BITARRAY_JUCEHEADER__ -#define __JUCE_BITARRAY_JUCEHEADER__ - -class MemoryBlock; - -/** - An array of on/off bits, also usable to store large binary integers. - - A BitArray acts like an arbitrarily large integer whose bits can be set or - cleared, and some basic mathematical operations can be done on the number as - a whole. -*/ -class JUCE_API BitArray -{ -public: - - /** Creates an empty BitArray */ - BitArray() throw(); - - /** Creates a BitArray containing an integer value in its low bits. - - The low 32 bits of the array are initialised with this value. - */ - BitArray (const unsigned int value) throw(); - - /** Creates a BitArray containing an integer value in its low bits. - - The low 32 bits of the array are initialised with the absolute value - passed in, and its sign is set to reflect the sign of the number. - */ - BitArray (const int value) throw(); - - /** Creates a BitArray containing an integer value in its low bits. - - The low 64 bits of the array are initialised with the absolute value - passed in, and its sign is set to reflect the sign of the number. - */ - BitArray (int64 value) throw(); - - /** Creates a copy of another BitArray. */ - BitArray (const BitArray& other) throw(); - - /** Destructor. */ - ~BitArray() throw(); - - /** Copies another BitArray onto this one. */ - const BitArray& operator= (const BitArray& other) throw(); - - /** Two arrays are the same if the same bits are set. */ - bool operator== (const BitArray& other) const throw(); - /** Two arrays are the same if the same bits are set. */ - bool operator!= (const BitArray& other) const throw(); - - /** Clears all bits in the BitArray to 0. */ - void clear() throw(); - - /** Clears a particular bit in the array. */ - void clearBit (const int bitNumber) throw(); - - /** Sets a specified bit to 1. - - If the bit number is high, this will grow the array to accomodate it. - */ - void setBit (const int bitNumber) throw(); - - /** Sets or clears a specified bit. */ - void setBit (const int bitNumber, - const bool shouldBeSet) throw(); - - /** Sets a range of bits to be either on or off. - - @param startBit the first bit to change - @param numBits the number of bits to change - @param shouldBeSet whether to turn these bits on or off - */ - void setRange (int startBit, - int numBits, - const bool shouldBeSet) throw(); - - /** Inserts a bit an a given position, shifting up any bits above it. */ - void insertBit (const int bitNumber, - const bool shouldBeSet) throw(); - - /** Returns the value of a specified bit in the array. - - If the index is out-of-range, the result will be false. - */ - bool operator[] (const int bit) const throw(); - - /** Returns true if no bits are set. */ - bool isEmpty() const throw(); - - /** Returns a range of bits in the array as an integer value. - - e.g. getBitRangeAsInt (0, 32) would return the lowest 32 bits. - - Asking for more than 32 bits isn't allowed (obviously). - */ - int getBitRangeAsInt (int startBit, int numBits) const throw(); - - /** Sets a range of bits in the array based on an integer value. - - Copies the given integer into the array, starting at startBit, - and only using up to numBits of the available bits. - */ - void setBitRangeAsInt (int startBit, int numBits, - unsigned int valueToSet) throw(); - - /** Performs a bitwise OR with another BitArray. - - The result ends up in this array. - */ - void orWith (const BitArray& other) throw(); - - /** Performs a bitwise AND with another BitArray. - - The result ends up in this array. - */ - void andWith (const BitArray& other) throw(); - - /** Performs a bitwise XOR with another BitArray. - - The result ends up in this array. - */ - void xorWith (const BitArray& other) throw(); - - /** Adds another BitArray's value to this one. - - Treating the two arrays as large positive integers, this - adds them up and puts the result in this array. - */ - void add (const BitArray& other) throw(); - - /** Subtracts another BitArray's value from this one. - - Treating the two arrays as large positive integers, this - subtracts them and puts the result in this array. - - Note that if the result should be negative, this won't be - handled correctly. - */ - void subtract (const BitArray& other) throw(); - - /** Multiplies another BitArray's value with this one. - - Treating the two arrays as large positive integers, this - multiplies them and puts the result in this array. - */ - void multiplyBy (const BitArray& other) throw(); - - /** Divides another BitArray's value into this one and also produces a remainder. - - Treating the two arrays as large positive integers, this - divides this value by the other, leaving the quotient in this - array, and the remainder is copied into the other BitArray passed in. - */ - void divideBy (const BitArray& divisor, BitArray& remainder) throw(); - - /** Returns the largest value that will divide both this value and the one - passed-in. - */ - const BitArray findGreatestCommonDivisor (BitArray other) const throw(); - - /** Performs a modulo operation on this value. - - The result is stored in this value. - */ - void modulo (const BitArray& divisor) throw(); - - /** Performs a combined exponent and modulo operation. - - This BitArray's value becomes (this ^ exponent) % modulus. - */ - void exponentModulo (const BitArray& exponent, const BitArray& modulus) throw(); - - /** Performs an inverse modulo on the value. - - i.e. the result is (this ^ -1) mod (modulus). - */ - void inverseModulo (const BitArray& modulus) throw(); - - /** Shifts a section of bits left or right. - - @param howManyBitsLeft how far to move the bits (+ve numbers shift it left, -ve numbers shift it right). - @param startBit the first bit to affect - if this is > 0, only bits above that index will be affected. - */ - void shiftBits (int howManyBitsLeft, - int startBit = 0) throw(); - - /** Does a signed comparison of two BitArrays. - - Return values are: - - 0 if the numbers are the same - - < 0 if this number is smaller than the other - - > 0 if this number is bigger than the other - */ - int compare (const BitArray& other) const throw(); - - /** Compares the magnitudes of two BitArrays, ignoring their signs. - - Return values are: - - 0 if the numbers are the same - - < 0 if this number is smaller than the other - - > 0 if this number is bigger than the other - */ - int compareAbsolute (const BitArray& other) const throw(); - - /** Returns true if the value is less than zero. - - @see setNegative, negate - */ - bool isNegative() const throw(); - - /** Changes the sign of the number to be positive or negative. - - @see isNegative, negate - */ - void setNegative (const bool shouldBeNegative) throw(); - - /** Inverts the sign of the number. - - @see isNegative, setNegative - */ - void negate() throw(); - - /** Counts the total number of set bits in the array. */ - int countNumberOfSetBits() const throw(); - - /** Looks for the index of the next set bit after a given starting point. - - searches from startIndex (inclusive) upwards for the first set bit, - and returns its index. - - If no set bits are found, it returns -1. - */ - int findNextSetBit (int startIndex = 0) const throw(); - - /** Looks for the index of the next clear bit after a given starting point. - - searches from startIndex (inclusive) upwards for the first clear bit, - and returns its index. - */ - int findNextClearBit (int startIndex = 0) const throw(); - - /** Returns the index of the highest set bit in the array. - - If the array is empty, this will return -1. - */ - int getHighestBit() const throw(); - - /** Sets a range of bits to random values. */ - void fillBitsRandomly (int startBit, int numBits) throw(); - - /** Turns this value into a random number less than the given value. */ - void createRandomNumber (const BitArray& maximumValue) throw(); - - /** Converts the array to a number string. - - Specify a base such as 2 (binary), 8 (octal), 10 (decimal), 16 (hex). - */ - const String toString (const int base) const throw(); - - /** Converts a number string to an array. - - Any non-valid characters will be ignored. - - Specify a base such as 2 (binary), 8 (octal), 10 (decimal), 16 (hex). - */ - void parseString (const String& text, - const int base) throw(); - - /** Turns the array into a block of binary data. - - The data is arranged as little-endian, so the first byte of data is the low 8 bits - of the array, and so on. - - @see loadFromMemoryBlock - */ - const MemoryBlock toMemoryBlock() const throw(); - - /** Copies a block of raw data onto this array. - - The data is arranged as little-endian, so the first byte of data is the low 8 bits - of the array, and so on. - - @see toMemoryBlock - */ - void loadFromMemoryBlock (const MemoryBlock& data) throw(); - - juce_UseDebuggingNewOperator - -private: - void ensureSize (const int numVals) throw(); - unsigned int* values; - int numValues, highestBit; - bool negative; -}; - -#endif // __JUCE_BITARRAY_JUCEHEADER__ -/********* End of inlined file: juce_BitArray.h *********/ - -#endif -#ifndef __JUCE_ELEMENTCOMPARATOR_JUCEHEADER__ - -#endif -#ifndef __JUCE_MEMORYBLOCK_JUCEHEADER__ - -#endif -#ifndef __JUCE_OWNEDARRAY_JUCEHEADER__ +#ifndef __JUCE_MEMORY_JUCEHEADER__ #endif #ifndef __JUCE_PROPERTYSET_JUCEHEADER__ @@ -8637,12 +8355,16 @@ public: document @param encodingType the character encoding format string to put into the xml header + @param lineWrapLength the line length that will be used before items get placed on + a new line. This isn't an absolute maximum length, it just + determines how lists of attributes get broken up @see writeToFile */ const String createDocument (const String& dtdToUse, const bool allOnOneLine = false, const bool includeXmlHeader = true, - const tchar* const encodingType = JUCE_T("UTF-8")) const throw(); + const tchar* const encodingType = JUCE_T("UTF-8"), + const int lineWrapLength = 60) const throw(); /** Writes the element to a file as an XML document. @@ -8656,13 +8378,17 @@ public: @param dtdToUse the DTD to add to the document @param encodingType the character encoding format string to put into the xml header + @param lineWrapLength the line length that will be used before items get placed on + a new line. This isn't an absolute maximum length, it just + determines how lists of attributes get broken up @returns true if the file is written successfully; false if something goes wrong in the process @see createDocument */ bool writeToFile (const File& destinationFile, const String& dtdToUse, - const tchar* const encodingType = JUCE_T("UTF-8")) const throw(); + const tchar* const encodingType = JUCE_T("UTF-8"), + const int lineWrapLength = 60) const throw(); /** Returns this element's tag type name. @@ -9113,7 +8839,9 @@ private: void copyChildrenAndAttributesFrom (const XmlElement& other) throw(); - void writeElementAsText (OutputStream& out, const int indentationLevel) const throw(); + void writeElementAsText (OutputStream& out, + const int indentationLevel, + const int lineWrapLength) const throw(); XmlElement** getChildElementsAsArray (const int) const throw(); void reorderChildElements (XmlElement** const, const int) throw(); @@ -9334,11 +9062,16 @@ private: /********* End of inlined file: juce_PropertySet.h *********/ #endif -#ifndef __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ +#ifndef __JUCE_VOIDARRAY_JUCEHEADER__ -/********* Start of inlined file: juce_ReferenceCountedArray.h *********/ -#ifndef __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ -#define __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ +#endif +#ifndef __JUCE_ELEMENTCOMPARATOR_JUCEHEADER__ + +#endif +#ifndef __JUCE_MEMORYBLOCK_JUCEHEADER__ + +#endif +#ifndef __JUCE_REFERENCECOUNTEDOBJECT_JUCEHEADER__ /********* Start of inlined file: juce_ReferenceCountedObject.h *********/ #ifndef __JUCE_REFERENCECOUNTEDOBJECT_JUCEHEADER__ @@ -9560,6 +9293,1260 @@ private: #endif // __JUCE_REFERENCECOUNTEDOBJECT_JUCEHEADER__ /********* End of inlined file: juce_ReferenceCountedObject.h *********/ +#endif +#ifndef __JUCE_SPARSESET_JUCEHEADER__ + +/********* Start of inlined file: juce_SparseSet.h *********/ +#ifndef __JUCE_SPARSESET_JUCEHEADER__ +#define __JUCE_SPARSESET_JUCEHEADER__ + +/** + Holds a set of primitive values, storing them as a set of ranges. + + This container acts like a simple BitArray, but can efficiently hold large + continguous ranges of values. It's quite a specialised class, mostly useful + for things like keeping the set of selected rows in a listbox. + + The type used as a template paramter must be an integer type, such as int, short, + int64, etc. +*/ +template +class SparseSet +{ +public: + + /** Creates a new empty set. */ + SparseSet() throw() + { + } + + /** Creates a copy of another SparseSet. */ + SparseSet (const SparseSet& other) throw() + : values (other.values) + { + } + + /** Destructor. */ + ~SparseSet() throw() + { + } + + /** Clears the set. */ + void clear() throw() + { + values.clear(); + } + + /** Checks whether the set is empty. + + This is much quicker than using (size() == 0). + */ + bool isEmpty() const throw() + { + return values.size() == 0; + } + + /** Returns the number of values in the set. + + Because of the way the data is stored, this method can take longer if there + are a lot of items in the set. Use isEmpty() for a quick test of whether there + are any items. + */ + Type size() const throw() + { + Type num = 0; + + for (int i = 0; i < values.size(); i += 2) + num += values[i + 1] - values[i]; + + return num; + } + + /** Returns one of the values in the set. + + @param index the index of the value to retrieve, in the range 0 to (size() - 1). + @returns the value at this index, or 0 if it's out-of-range + */ + Type operator[] (int index) const throw() + { + for (int i = 0; i < values.size(); i += 2) + { + const Type s = values.getUnchecked(i); + const Type e = values.getUnchecked(i + 1); + + if (index < e - s) + return s + index; + + index -= e - s; + } + + return (Type) 0; + } + + /** Checks whether a particular value is in the set. */ + bool contains (const Type valueToLookFor) const throw() + { + bool on = false; + + for (int i = 0; i < values.size(); ++i) + { + if (values.getUnchecked(i) > valueToLookFor) + return on; + + on = ! on; + } + + return false; + } + + /** Returns the number of contiguous blocks of values. + + @see getRange + */ + int getNumRanges() const throw() + { + return values.size() >> 1; + } + + /** Returns one of the contiguous ranges of values stored. + + @param rangeIndex the index of the range to look up, between 0 + and (getNumRanges() - 1) + @param startValue on return, the value at the start of the range + @param numValues on return, the number of values in the range + + @see getTotalRange + */ + bool getRange (const int rangeIndex, + Type& startValue, + Type& numValues) const throw() + { + if (((unsigned int) rangeIndex) < (unsigned int) getNumRanges()) + { + startValue = values [rangeIndex << 1]; + numValues = values [(rangeIndex << 1) + 1] - startValue; + + return true; + } + + return false; + } + + /** Returns the lowest and highest values in the set. + + @see getRange + */ + bool getTotalRange (Type& lowestValue, + Type& highestValue) const throw() + { + if (values.size() > 0) + { + lowestValue = values.getUnchecked (0); + highestValue = values.getUnchecked (values.size() - 1); + return true; + } + + return false; + } + + /** Adds a range of contiguous values to the set. + + e.g. addRange (10, 4) will add (10, 11, 12, 13) to the set. + + @param firstValue the start of the range of values to add + @param numValuesToAdd how many values to add + */ + void addRange (const Type firstValue, + const Type numValuesToAdd) throw() + { + jassert (numValuesToAdd >= 0); + + if (numValuesToAdd > 0) + { + removeRange (firstValue, numValuesToAdd); + + IntegerElementComparator sorter; + values.addSorted (sorter, firstValue); + values.addSorted (sorter, firstValue + numValuesToAdd); + + simplify(); + } + } + + /** Removes a range of values from the set. + + e.g. removeRange (10, 4) will remove (10, 11, 12, 13) from the set. + + @param firstValue the start of the range of values to remove + @param numValuesToRemove how many values to remove + */ + void removeRange (const Type firstValue, + const Type numValuesToRemove) throw() + { + jassert (numValuesToRemove >= 0); + + if (numValuesToRemove > 0 + && firstValue < values.getLast()) + { + const bool onAtStart = contains (firstValue - 1); + Type lastValue = firstValue + numValuesToRemove; + + if (lastValue < firstValue) // possible if the signed arithmetic wraps around + lastValue = values.getLast(); + + const bool onAtEnd = contains (lastValue); + + for (int i = values.size(); --i >= 0;) + { + if (values.getUnchecked(i) >= firstValue + && values.getUnchecked(i) <= lastValue) + { + values.remove (i); + } + } + + IntegerElementComparator sorter; + + if (onAtStart) + values.addSorted (sorter, firstValue); + + if (onAtEnd) + values.addSorted (sorter, lastValue); + + simplify(); + } + } + + /** Does an XOR of the values in a given range. */ + void invertRange (const Type firstValue, + const Type numValues) + { + SparseSet newItems; + newItems.addRange (firstValue, numValues); + + int i; + for (i = getNumRanges(); --i >= 0;) + { + const int start = values [i << 1]; + const int end = values [(i << 1) + 1]; + + newItems.removeRange (start, end); + } + + removeRange (firstValue, numValues); + + for (i = newItems.getNumRanges(); --i >= 0;) + { + const int start = newItems.values [i << 1]; + const int end = newItems.values [(i << 1) + 1]; + + addRange (start, end); + } + } + + /** Checks whether any part of a given range overlaps any part of this one. */ + bool overlapsRange (const Type firstValue, + const Type numValues) throw() + { + jassert (numValues >= 0); + + if (numValues > 0) + { + for (int i = getNumRanges(); --i >= 0;) + { + if (firstValue >= values.getUnchecked ((i << 1) + 1)) + return false; + + if (firstValue + numValues > values.getUnchecked (i << 1)) + return true; + } + } + + return false; + } + + /** Checks whether the whole of a given range is contained within this one. */ + bool containsRange (const Type firstValue, + const Type numValues) throw() + { + jassert (numValues >= 0); + + if (numValues > 0) + { + for (int i = getNumRanges(); --i >= 0;) + { + if (firstValue >= values.getUnchecked ((i << 1) + 1)) + return false; + + if (firstValue >= values.getUnchecked (i << 1) + && firstValue + numValues <= values.getUnchecked ((i << 1) + 1)) + return true; + } + } + + return false; + } + + bool operator== (const SparseSet& other) throw() + { + return values == other.values; + } + + bool operator!= (const SparseSet& other) throw() + { + return values != other.values; + } + + juce_UseDebuggingNewOperator + +private: + // alternating start/end values of ranges of values that are present. + Array values; + + void simplify() throw() + { + jassert ((values.size() & 1) == 0); + + for (int i = values.size(); --i > 0;) + if (values.getUnchecked(i) == values.getUnchecked (i - 1)) + values.removeRange (i - 1, 2); + } +}; + +#endif // __JUCE_SPARSESET_JUCEHEADER__ +/********* End of inlined file: juce_SparseSet.h *********/ + +#endif +#ifndef __JUCE_OWNEDARRAY_JUCEHEADER__ + +#endif +#ifndef __JUCE_SORTEDSET_JUCEHEADER__ + +/********* Start of inlined file: juce_SortedSet.h *********/ +#ifndef __JUCE_SORTEDSET_JUCEHEADER__ +#define __JUCE_SORTEDSET_JUCEHEADER__ + +#if JUCE_MSVC + #pragma warning (push) + #pragma warning (disable: 4512) +#endif + +/** + Holds a set of unique primitive objects, such as ints or doubles. + + A set can only hold one item with a given value, so if for example it's a + set of integers, attempting to add the same integer twice will do nothing + the second time. + + Internally, the list of items is kept sorted (which means that whatever + kind of primitive type is used must support the ==, <, >, <= and >= operators + to determine the order), and searching the set for known values is very fast + because it uses a binary-chop method. + + Note that if you're using a class or struct as the element type, it must be + capable of being copied or moved with a straightforward memcpy, rather than + needing construction and destruction code. + + To make all the set's methods thread-safe, pass in "CriticalSection" as the templated + TypeOfCriticalSectionToUse parameter, instead of the default DummyCriticalSection. + + @see Array, OwnedArray, ReferenceCountedArray, StringArray, CriticalSection +*/ +template +class SortedSet : private ArrayAllocationBase +{ +public: + + /** Creates an empty set. + + @param granularity this is the size of increment by which the internal storage + used by the array will grow. Only change it from the default if you know the + array is going to be very big and needs to be able to grow efficiently. + + @see ArrayAllocationBase + */ + SortedSet (const int granularity = juceDefaultArrayGranularity) throw() + : ArrayAllocationBase (granularity), + numUsed (0) + { + } + + /** Creates a copy of another set. + @param other the set to copy + */ + SortedSet (const SortedSet& other) throw() + : ArrayAllocationBase (other.granularity) + { + other.lockSet(); + numUsed = other.numUsed; + setAllocatedSize (other.numUsed); + memcpy (this->elements, other.elements, numUsed * sizeof (ElementType)); + other.unlockSet(); + } + + /** Destructor. */ + ~SortedSet() throw() + { + } + + /** Copies another set over this one. + @param other the set to copy + */ + const SortedSet & operator= (const SortedSet & other) throw() + { + if (this != &other) + { + other.lockSet(); + lock.enter(); + + this->granularity = other.granularity; + ensureAllocatedSize (other.size()); + numUsed = other.numUsed; + memcpy (this->elements, other.elements, numUsed * sizeof (ElementType)); + minimiseStorageOverheads(); + + lock.exit(); + other.unlockSet(); + } + + return *this; + } + + /** Compares this set to another one. + + Two sets are considered equal if they both contain the same set of + elements. + + @param other the other set to compare with + */ + bool operator== (const SortedSet& other) const throw() + { + lock.enter(); + + if (numUsed != other.numUsed) + { + lock.exit(); + return false; + } + + for (int i = numUsed; --i >= 0;) + { + if (this->elements [i] != other.elements [i]) + { + lock.exit(); + return false; + } + } + + lock.exit(); + return true; + } + + /** Compares this set to another one. + + Two sets are considered equal if they both contain the same set of + elements. + + @param other the other set to compare with + */ + bool operator!= (const SortedSet& other) const throw() + { + return ! operator== (other); + } + + /** Removes all elements from the set. + + This will remove all the elements, and free any storage that the set is + using. To clear it without freeing the storage, use the clearQuick() + method instead. + + @see clearQuick + */ + void clear() throw() + { + lock.enter(); + this->setAllocatedSize (0); + numUsed = 0; + lock.exit(); + } + + /** Removes all elements from the set without freeing the array's allocated storage. + + @see clear + */ + void clearQuick() throw() + { + lock.enter(); + numUsed = 0; + lock.exit(); + } + + /** Returns the current number of elements in the set. + */ + inline int size() const throw() + { + return numUsed; + } + + /** Returns one of the elements in the set. + + If the index passed in is beyond the range of valid elements, this + will return zero. + + If you're certain that the index will always be a valid element, you + can call getUnchecked() instead, which is faster. + + @param index the index of the element being requested (0 is the first element in the set) + @see getUnchecked, getFirst, getLast + */ + inline ElementType operator[] (const int index) const throw() + { + lock.enter(); + const ElementType result = (((unsigned int) index) < (unsigned int) numUsed) + ? this->elements [index] + : (ElementType) 0; + lock.exit(); + + return result; + } + + /** Returns one of the elements in the set, without checking the index passed in. + Unlike the operator[] method, this will try to return an element without + checking that the index is within the bounds of the set, so should only + be used when you're confident that it will always be a valid index. + + @param index the index of the element being requested (0 is the first element in the set) + @see operator[], getFirst, getLast + */ + inline ElementType getUnchecked (const int index) const throw() + { + lock.enter(); + jassert (((unsigned int) index) < (unsigned int) numUsed); + const ElementType result = this->elements [index]; + lock.exit(); + + return result; + } + + /** Returns the first element in the set, or 0 if the set is empty. + + @see operator[], getUnchecked, getLast + */ + inline ElementType getFirst() const throw() + { + lock.enter(); + const ElementType result = (numUsed > 0) ? this->elements [0] + : (ElementType) 0; + lock.exit(); + + return result; + } + + /** Returns the last element in the set, or 0 if the set is empty. + + @see operator[], getUnchecked, getFirst + */ + inline ElementType getLast() const throw() + { + lock.enter(); + const ElementType result = (numUsed > 0) ? this->elements [numUsed - 1] + : (ElementType) 0; + lock.exit(); + + return result; + } + + /** Finds the index of the first element which matches the value passed in. + + This will search the set for the given object, and return the index + of its first occurrence. If the object isn't found, the method will return -1. + + @param elementToLookFor the value or object to look for + @returns the index of the object, or -1 if it's not found + */ + int indexOf (const ElementType elementToLookFor) const throw() + { + lock.enter(); + + int start = 0; + int end = numUsed; + + for (;;) + { + if (start >= end) + { + lock.exit(); + return -1; + } + else if (elementToLookFor == this->elements [start]) + { + lock.exit(); + return start; + } + else + { + const int halfway = (start + end) >> 1; + + if (halfway == start) + { + lock.exit(); + return -1; + } + else if (elementToLookFor >= this->elements [halfway]) + start = halfway; + else + end = halfway; + } + } + } + + /** Returns true if the set contains at least one occurrence of an object. + + @param elementToLookFor the value or object to look for + @returns true if the item is found + */ + bool contains (const ElementType elementToLookFor) const throw() + { + lock.enter(); + + int start = 0; + int end = numUsed; + + for (;;) + { + if (start >= end) + { + lock.exit(); + return false; + } + else if (elementToLookFor == this->elements [start]) + { + lock.exit(); + return true; + } + else + { + const int halfway = (start + end) >> 1; + + if (halfway == start) + { + lock.exit(); + return false; + } + else if (elementToLookFor >= this->elements [halfway]) + start = halfway; + else + end = halfway; + } + } + } + + /** Adds a new element to the set, (as long as it's not already in there). + + @param newElement the new object to add to the set + @see set, insert, addIfNotAlreadyThere, addSorted, addSet, addArray + */ + void add (const ElementType newElement) throw() + { + lock.enter(); + + int start = 0; + int end = numUsed; + + for (;;) + { + if (start >= end) + { + jassert (start <= end); + insertInternal (start, newElement); + break; + } + else if (newElement == this->elements [start]) + { + break; + } + else + { + const int halfway = (start + end) >> 1; + + if (halfway == start) + { + if (newElement >= this->elements [halfway]) + insertInternal (start + 1, newElement); + else + insertInternal (start, newElement); + + break; + } + else if (newElement >= this->elements [halfway]) + start = halfway; + else + end = halfway; + } + } + + lock.exit(); + } + + /** Adds elements from an array to this set. + + @param elementsToAdd the array of elements to add + @param numElementsToAdd how many elements are in this other array + @see add + */ + void addArray (const ElementType* elementsToAdd, + int numElementsToAdd) throw() + { + lock.enter(); + + while (--numElementsToAdd >= 0) + add (*elementsToAdd++); + + lock.exit(); + } + + /** Adds elements from another set to this one. + + @param setToAddFrom the set from which to copy the elements + @param startIndex the first element of the other set to start copying from + @param numElementsToAdd how many elements to add from the other set. If this + value is negative or greater than the number of available elements, + all available elements will be copied. + @see add + */ + template + void addSet (const OtherSetType& setToAddFrom, + int startIndex = 0, + int numElementsToAdd = -1) throw() + { + setToAddFrom.lockSet(); + lock.enter(); + jassert (this != &setToAddFrom); + + if (this != &setToAddFrom) + { + if (startIndex < 0) + { + jassertfalse + startIndex = 0; + } + + if (numElementsToAdd < 0 || startIndex + numElementsToAdd > setToAddFrom.size()) + numElementsToAdd = setToAddFrom.size() - startIndex; + + addArray (setToAddFrom.elements + startIndex, numElementsToAdd); + } + + lock.exit(); + setToAddFrom.unlockSet(); + } + + /** Removes an element from the set. + + This will remove the element at a given index. + If the index passed in is out-of-range, nothing will happen. + + @param indexToRemove the index of the element to remove + @returns the element that has been removed + @see removeValue, removeRange + */ + ElementType remove (const int indexToRemove) throw() + { + lock.enter(); + + if (((unsigned int) indexToRemove) < (unsigned int) numUsed) + { + --numUsed; + + ElementType* const e = this->elements + indexToRemove; + ElementType const removed = *e; + const int numberToShift = numUsed - indexToRemove; + + if (numberToShift > 0) + memmove (e, e + 1, numberToShift * sizeof (ElementType)); + + if ((numUsed << 1) < this->numAllocated) + minimiseStorageOverheads(); + + lock.exit(); + return removed; + } + else + { + lock.exit(); + return 0; + } + } + + /** Removes an item from the set. + + This will remove the given element from the set, if it's there. + + @param valueToRemove the object to try to remove + @see remove, removeRange + */ + void removeValue (const ElementType valueToRemove) throw() + { + lock.enter(); + remove (indexOf (valueToRemove)); + lock.exit(); + } + + /** Removes any elements which are also in another set. + + @param otherSet the other set in which to look for elements to remove + @see removeValuesNotIn, remove, removeValue, removeRange + */ + template + void removeValuesIn (const OtherSetType& otherSet) throw() + { + otherSet.lockSet(); + lock.enter(); + + if (this == &otherSet) + { + clear(); + } + else + { + if (otherSet.size() > 0) + { + for (int i = numUsed; --i >= 0;) + if (otherSet.contains (this->elements [i])) + remove (i); + } + } + + lock.exit(); + otherSet.unlockSet(); + } + + /** Removes any elements which are not found in another set. + + Only elements which occur in this other set will be retained. + + @param otherSet the set in which to look for elements NOT to remove + @see removeValuesIn, remove, removeValue, removeRange + */ + template + void removeValuesNotIn (const OtherSetType& otherSet) throw() + { + otherSet.lockSet(); + lock.enter(); + + if (this != &otherSet) + { + if (otherSet.size() <= 0) + { + clear(); + } + else + { + for (int i = numUsed; --i >= 0;) + if (! otherSet.contains (this->elements [i])) + remove (i); + } + } + + lock.exit(); + otherSet.lockSet(); + } + + /** Reduces the amount of storage being used by the set. + + Sets typically allocate slightly more storage than they need, and after + removing elements, they may have quite a lot of unused space allocated. + This method will reduce the amount of allocated storage to a minimum. + */ + void minimiseStorageOverheads() throw() + { + lock.enter(); + + if (numUsed == 0) + { + this->setAllocatedSize (0); + } + else + { + const int newAllocation = this->granularity * (numUsed / this->granularity + 1); + + if (newAllocation < this->numAllocated) + this->setAllocatedSize (newAllocation); + } + + lock.exit(); + } + + /** Locks the set's CriticalSection. + + Of course if the type of section used is a DummyCriticalSection, this won't + have any effect. + + @see unlockSet + */ + void lockSet() const throw() + { + lock.enter(); + } + + /** Unlocks the set's CriticalSection. + + Of course if the type of section used is a DummyCriticalSection, this won't + have any effect. + + @see lockSet + */ + void unlockSet() const throw() + { + lock.exit(); + } + + juce_UseDebuggingNewOperator + +private: + int numUsed; + TypeOfCriticalSectionToUse lock; + + void insertInternal (const int indexToInsertAt, const ElementType newElement) throw() + { + this->ensureAllocatedSize (numUsed + 1); + + ElementType* const insertPos = this->elements + indexToInsertAt; + const int numberToMove = numUsed - indexToInsertAt; + + if (numberToMove > 0) + memmove (insertPos + 1, insertPos, numberToMove * sizeof (ElementType)); + + *insertPos = newElement; + ++numUsed; + } +}; + +#if JUCE_MSVC + #pragma warning (pop) +#endif + +#endif // __JUCE_SORTEDSET_JUCEHEADER__ +/********* End of inlined file: juce_SortedSet.h *********/ + +#endif +#ifndef __JUCE_BITARRAY_JUCEHEADER__ + +/********* Start of inlined file: juce_BitArray.h *********/ +#ifndef __JUCE_BITARRAY_JUCEHEADER__ +#define __JUCE_BITARRAY_JUCEHEADER__ + +class MemoryBlock; + +/** + An array of on/off bits, also usable to store large binary integers. + + A BitArray acts like an arbitrarily large integer whose bits can be set or + cleared, and some basic mathematical operations can be done on the number as + a whole. +*/ +class JUCE_API BitArray +{ +public: + + /** Creates an empty BitArray */ + BitArray() throw(); + + /** Creates a BitArray containing an integer value in its low bits. + + The low 32 bits of the array are initialised with this value. + */ + BitArray (const unsigned int value) throw(); + + /** Creates a BitArray containing an integer value in its low bits. + + The low 32 bits of the array are initialised with the absolute value + passed in, and its sign is set to reflect the sign of the number. + */ + BitArray (const int value) throw(); + + /** Creates a BitArray containing an integer value in its low bits. + + The low 64 bits of the array are initialised with the absolute value + passed in, and its sign is set to reflect the sign of the number. + */ + BitArray (int64 value) throw(); + + /** Creates a copy of another BitArray. */ + BitArray (const BitArray& other) throw(); + + /** Destructor. */ + ~BitArray() throw(); + + /** Copies another BitArray onto this one. */ + const BitArray& operator= (const BitArray& other) throw(); + + /** Two arrays are the same if the same bits are set. */ + bool operator== (const BitArray& other) const throw(); + /** Two arrays are the same if the same bits are set. */ + bool operator!= (const BitArray& other) const throw(); + + /** Clears all bits in the BitArray to 0. */ + void clear() throw(); + + /** Clears a particular bit in the array. */ + void clearBit (const int bitNumber) throw(); + + /** Sets a specified bit to 1. + + If the bit number is high, this will grow the array to accomodate it. + */ + void setBit (const int bitNumber) throw(); + + /** Sets or clears a specified bit. */ + void setBit (const int bitNumber, + const bool shouldBeSet) throw(); + + /** Sets a range of bits to be either on or off. + + @param startBit the first bit to change + @param numBits the number of bits to change + @param shouldBeSet whether to turn these bits on or off + */ + void setRange (int startBit, + int numBits, + const bool shouldBeSet) throw(); + + /** Inserts a bit an a given position, shifting up any bits above it. */ + void insertBit (const int bitNumber, + const bool shouldBeSet) throw(); + + /** Returns the value of a specified bit in the array. + + If the index is out-of-range, the result will be false. + */ + bool operator[] (const int bit) const throw(); + + /** Returns true if no bits are set. */ + bool isEmpty() const throw(); + + /** Returns a range of bits in the array as an integer value. + + e.g. getBitRangeAsInt (0, 32) would return the lowest 32 bits. + + Asking for more than 32 bits isn't allowed (obviously). + */ + int getBitRangeAsInt (int startBit, int numBits) const throw(); + + /** Sets a range of bits in the array based on an integer value. + + Copies the given integer into the array, starting at startBit, + and only using up to numBits of the available bits. + */ + void setBitRangeAsInt (int startBit, int numBits, + unsigned int valueToSet) throw(); + + /** Performs a bitwise OR with another BitArray. + + The result ends up in this array. + */ + void orWith (const BitArray& other) throw(); + + /** Performs a bitwise AND with another BitArray. + + The result ends up in this array. + */ + void andWith (const BitArray& other) throw(); + + /** Performs a bitwise XOR with another BitArray. + + The result ends up in this array. + */ + void xorWith (const BitArray& other) throw(); + + /** Adds another BitArray's value to this one. + + Treating the two arrays as large positive integers, this + adds them up and puts the result in this array. + */ + void add (const BitArray& other) throw(); + + /** Subtracts another BitArray's value from this one. + + Treating the two arrays as large positive integers, this + subtracts them and puts the result in this array. + + Note that if the result should be negative, this won't be + handled correctly. + */ + void subtract (const BitArray& other) throw(); + + /** Multiplies another BitArray's value with this one. + + Treating the two arrays as large positive integers, this + multiplies them and puts the result in this array. + */ + void multiplyBy (const BitArray& other) throw(); + + /** Divides another BitArray's value into this one and also produces a remainder. + + Treating the two arrays as large positive integers, this + divides this value by the other, leaving the quotient in this + array, and the remainder is copied into the other BitArray passed in. + */ + void divideBy (const BitArray& divisor, BitArray& remainder) throw(); + + /** Returns the largest value that will divide both this value and the one + passed-in. + */ + const BitArray findGreatestCommonDivisor (BitArray other) const throw(); + + /** Performs a modulo operation on this value. + + The result is stored in this value. + */ + void modulo (const BitArray& divisor) throw(); + + /** Performs a combined exponent and modulo operation. + + This BitArray's value becomes (this ^ exponent) % modulus. + */ + void exponentModulo (const BitArray& exponent, const BitArray& modulus) throw(); + + /** Performs an inverse modulo on the value. + + i.e. the result is (this ^ -1) mod (modulus). + */ + void inverseModulo (const BitArray& modulus) throw(); + + /** Shifts a section of bits left or right. + + @param howManyBitsLeft how far to move the bits (+ve numbers shift it left, -ve numbers shift it right). + @param startBit the first bit to affect - if this is > 0, only bits above that index will be affected. + */ + void shiftBits (int howManyBitsLeft, + int startBit = 0) throw(); + + /** Does a signed comparison of two BitArrays. + + Return values are: + - 0 if the numbers are the same + - < 0 if this number is smaller than the other + - > 0 if this number is bigger than the other + */ + int compare (const BitArray& other) const throw(); + + /** Compares the magnitudes of two BitArrays, ignoring their signs. + + Return values are: + - 0 if the numbers are the same + - < 0 if this number is smaller than the other + - > 0 if this number is bigger than the other + */ + int compareAbsolute (const BitArray& other) const throw(); + + /** Returns true if the value is less than zero. + + @see setNegative, negate + */ + bool isNegative() const throw(); + + /** Changes the sign of the number to be positive or negative. + + @see isNegative, negate + */ + void setNegative (const bool shouldBeNegative) throw(); + + /** Inverts the sign of the number. + + @see isNegative, setNegative + */ + void negate() throw(); + + /** Counts the total number of set bits in the array. */ + int countNumberOfSetBits() const throw(); + + /** Looks for the index of the next set bit after a given starting point. + + searches from startIndex (inclusive) upwards for the first set bit, + and returns its index. + + If no set bits are found, it returns -1. + */ + int findNextSetBit (int startIndex = 0) const throw(); + + /** Looks for the index of the next clear bit after a given starting point. + + searches from startIndex (inclusive) upwards for the first clear bit, + and returns its index. + */ + int findNextClearBit (int startIndex = 0) const throw(); + + /** Returns the index of the highest set bit in the array. + + If the array is empty, this will return -1. + */ + int getHighestBit() const throw(); + + /** Sets a range of bits to random values. */ + void fillBitsRandomly (int startBit, int numBits) throw(); + + /** Turns this value into a random number less than the given value. */ + void createRandomNumber (const BitArray& maximumValue) throw(); + + /** Converts the array to a number string. + + Specify a base such as 2 (binary), 8 (octal), 10 (decimal), 16 (hex). + */ + const String toString (const int base) const throw(); + + /** Converts a number string to an array. + + Any non-valid characters will be ignored. + + Specify a base such as 2 (binary), 8 (octal), 10 (decimal), 16 (hex). + */ + void parseString (const String& text, + const int base) throw(); + + /** Turns the array into a block of binary data. + + The data is arranged as little-endian, so the first byte of data is the low 8 bits + of the array, and so on. + + @see loadFromMemoryBlock + */ + const MemoryBlock toMemoryBlock() const throw(); + + /** Copies a block of raw data onto this array. + + The data is arranged as little-endian, so the first byte of data is the low 8 bits + of the array, and so on. + + @see toMemoryBlock + */ + void loadFromMemoryBlock (const MemoryBlock& data) throw(); + + juce_UseDebuggingNewOperator + +private: + void ensureSize (const int numVals) throw(); + unsigned int* values; + int numValues, highestBit; + bool negative; +}; + +#endif // __JUCE_BITARRAY_JUCEHEADER__ +/********* End of inlined file: juce_BitArray.h *********/ + +#endif +#ifndef __JUCE_ARRAY_JUCEHEADER__ + +#endif +#ifndef __JUCE_ARRAYALLOCATIONBASE_JUCEHEADER__ + +#endif +#ifndef __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ + +/********* Start of inlined file: juce_ReferenceCountedArray.h *********/ +#ifndef __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ +#define __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ + /** Holds a list of objects derived from ReferenceCountedObject. @@ -10289,1043 +11276,12 @@ private: #endif // __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ /********* End of inlined file: juce_ReferenceCountedArray.h *********/ -#endif -#ifndef __JUCE_REFERENCECOUNTEDOBJECT_JUCEHEADER__ - -#endif -#ifndef __JUCE_SORTEDSET_JUCEHEADER__ - -/********* Start of inlined file: juce_SortedSet.h *********/ -#ifndef __JUCE_SORTEDSET_JUCEHEADER__ -#define __JUCE_SORTEDSET_JUCEHEADER__ - -#if JUCE_MSVC - #pragma warning (push) - #pragma warning (disable: 4512) -#endif - -/** - Holds a set of unique primitive objects, such as ints or doubles. - - A set can only hold one item with a given value, so if for example it's a - set of integers, attempting to add the same integer twice will do nothing - the second time. - - Internally, the list of items is kept sorted (which means that whatever - kind of primitive type is used must support the ==, <, >, <= and >= operators - to determine the order), and searching the set for known values is very fast - because it uses a binary-chop method. - - Note that if you're using a class or struct as the element type, it must be - capable of being copied or moved with a straightforward memcpy, rather than - needing construction and destruction code. - - To make all the set's methods thread-safe, pass in "CriticalSection" as the templated - TypeOfCriticalSectionToUse parameter, instead of the default DummyCriticalSection. - - @see Array, OwnedArray, ReferenceCountedArray, StringArray, CriticalSection -*/ -template -class SortedSet : private ArrayAllocationBase -{ -public: - - /** Creates an empty set. - - @param granularity this is the size of increment by which the internal storage - used by the array will grow. Only change it from the default if you know the - array is going to be very big and needs to be able to grow efficiently. - - @see ArrayAllocationBase - */ - SortedSet (const int granularity = juceDefaultArrayGranularity) throw() - : ArrayAllocationBase (granularity), - numUsed (0) - { - } - - /** Creates a copy of another set. - @param other the set to copy - */ - SortedSet (const SortedSet& other) throw() - : ArrayAllocationBase (other.granularity) - { - other.lockSet(); - numUsed = other.numUsed; - setAllocatedSize (other.numUsed); - memcpy (this->elements, other.elements, numUsed * sizeof (ElementType)); - other.unlockSet(); - } - - /** Destructor. */ - ~SortedSet() throw() - { - } - - /** Copies another set over this one. - @param other the set to copy - */ - const SortedSet & operator= (const SortedSet & other) throw() - { - if (this != &other) - { - other.lockSet(); - lock.enter(); - - this->granularity = other.granularity; - ensureAllocatedSize (other.size()); - numUsed = other.numUsed; - memcpy (this->elements, other.elements, numUsed * sizeof (ElementType)); - minimiseStorageOverheads(); - - lock.exit(); - other.unlockSet(); - } - - return *this; - } - - /** Compares this set to another one. - - Two sets are considered equal if they both contain the same set of - elements. - - @param other the other set to compare with - */ - bool operator== (const SortedSet& other) const throw() - { - lock.enter(); - - if (numUsed != other.numUsed) - { - lock.exit(); - return false; - } - - for (int i = numUsed; --i >= 0;) - { - if (this->elements [i] != other.elements [i]) - { - lock.exit(); - return false; - } - } - - lock.exit(); - return true; - } - - /** Compares this set to another one. - - Two sets are considered equal if they both contain the same set of - elements. - - @param other the other set to compare with - */ - bool operator!= (const SortedSet& other) const throw() - { - return ! operator== (other); - } - - /** Removes all elements from the set. - - This will remove all the elements, and free any storage that the set is - using. To clear it without freeing the storage, use the clearQuick() - method instead. - - @see clearQuick - */ - void clear() throw() - { - lock.enter(); - this->setAllocatedSize (0); - numUsed = 0; - lock.exit(); - } - - /** Removes all elements from the set without freeing the array's allocated storage. - - @see clear - */ - void clearQuick() throw() - { - lock.enter(); - numUsed = 0; - lock.exit(); - } - - /** Returns the current number of elements in the set. - */ - inline int size() const throw() - { - return numUsed; - } - - /** Returns one of the elements in the set. - - If the index passed in is beyond the range of valid elements, this - will return zero. - - If you're certain that the index will always be a valid element, you - can call getUnchecked() instead, which is faster. - - @param index the index of the element being requested (0 is the first element in the set) - @see getUnchecked, getFirst, getLast - */ - inline ElementType operator[] (const int index) const throw() - { - lock.enter(); - const ElementType result = (((unsigned int) index) < (unsigned int) numUsed) - ? this->elements [index] - : (ElementType) 0; - lock.exit(); - - return result; - } - - /** Returns one of the elements in the set, without checking the index passed in. - Unlike the operator[] method, this will try to return an element without - checking that the index is within the bounds of the set, so should only - be used when you're confident that it will always be a valid index. - - @param index the index of the element being requested (0 is the first element in the set) - @see operator[], getFirst, getLast - */ - inline ElementType getUnchecked (const int index) const throw() - { - lock.enter(); - jassert (((unsigned int) index) < (unsigned int) numUsed); - const ElementType result = this->elements [index]; - lock.exit(); - - return result; - } - - /** Returns the first element in the set, or 0 if the set is empty. - - @see operator[], getUnchecked, getLast - */ - inline ElementType getFirst() const throw() - { - lock.enter(); - const ElementType result = (numUsed > 0) ? this->elements [0] - : (ElementType) 0; - lock.exit(); - - return result; - } - - /** Returns the last element in the set, or 0 if the set is empty. - - @see operator[], getUnchecked, getFirst - */ - inline ElementType getLast() const throw() - { - lock.enter(); - const ElementType result = (numUsed > 0) ? this->elements [numUsed - 1] - : (ElementType) 0; - lock.exit(); - - return result; - } - - /** Finds the index of the first element which matches the value passed in. - - This will search the set for the given object, and return the index - of its first occurrence. If the object isn't found, the method will return -1. - - @param elementToLookFor the value or object to look for - @returns the index of the object, or -1 if it's not found - */ - int indexOf (const ElementType elementToLookFor) const throw() - { - lock.enter(); - - int start = 0; - int end = numUsed; - - for (;;) - { - if (start >= end) - { - lock.exit(); - return -1; - } - else if (elementToLookFor == this->elements [start]) - { - lock.exit(); - return start; - } - else - { - const int halfway = (start + end) >> 1; - - if (halfway == start) - { - lock.exit(); - return -1; - } - else if (elementToLookFor >= this->elements [halfway]) - start = halfway; - else - end = halfway; - } - } - } - - /** Returns true if the set contains at least one occurrence of an object. - - @param elementToLookFor the value or object to look for - @returns true if the item is found - */ - bool contains (const ElementType elementToLookFor) const throw() - { - lock.enter(); - - int start = 0; - int end = numUsed; - - for (;;) - { - if (start >= end) - { - lock.exit(); - return false; - } - else if (elementToLookFor == this->elements [start]) - { - lock.exit(); - return true; - } - else - { - const int halfway = (start + end) >> 1; - - if (halfway == start) - { - lock.exit(); - return false; - } - else if (elementToLookFor >= this->elements [halfway]) - start = halfway; - else - end = halfway; - } - } - } - - /** Adds a new element to the set, (as long as it's not already in there). - - @param newElement the new object to add to the set - @see set, insert, addIfNotAlreadyThere, addSorted, addSet, addArray - */ - void add (const ElementType newElement) throw() - { - lock.enter(); - - int start = 0; - int end = numUsed; - - for (;;) - { - if (start >= end) - { - jassert (start <= end); - insertInternal (start, newElement); - break; - } - else if (newElement == this->elements [start]) - { - break; - } - else - { - const int halfway = (start + end) >> 1; - - if (halfway == start) - { - if (newElement >= this->elements [halfway]) - insertInternal (start + 1, newElement); - else - insertInternal (start, newElement); - - break; - } - else if (newElement >= this->elements [halfway]) - start = halfway; - else - end = halfway; - } - } - - lock.exit(); - } - - /** Adds elements from an array to this set. - - @param elementsToAdd the array of elements to add - @param numElementsToAdd how many elements are in this other array - @see add - */ - void addArray (const ElementType* elementsToAdd, - int numElementsToAdd) throw() - { - lock.enter(); - - while (--numElementsToAdd >= 0) - add (*elementsToAdd++); - - lock.exit(); - } - - /** Adds elements from another set to this one. - - @param setToAddFrom the set from which to copy the elements - @param startIndex the first element of the other set to start copying from - @param numElementsToAdd how many elements to add from the other set. If this - value is negative or greater than the number of available elements, - all available elements will be copied. - @see add - */ - template - void addSet (const OtherSetType& setToAddFrom, - int startIndex = 0, - int numElementsToAdd = -1) throw() - { - setToAddFrom.lockSet(); - lock.enter(); - jassert (this != &setToAddFrom); - - if (this != &setToAddFrom) - { - if (startIndex < 0) - { - jassertfalse - startIndex = 0; - } - - if (numElementsToAdd < 0 || startIndex + numElementsToAdd > setToAddFrom.size()) - numElementsToAdd = setToAddFrom.size() - startIndex; - - addArray (setToAddFrom.elements + startIndex, numElementsToAdd); - } - - lock.exit(); - setToAddFrom.unlockSet(); - } - - /** Removes an element from the set. - - This will remove the element at a given index. - If the index passed in is out-of-range, nothing will happen. - - @param indexToRemove the index of the element to remove - @returns the element that has been removed - @see removeValue, removeRange - */ - ElementType remove (const int indexToRemove) throw() - { - lock.enter(); - - if (((unsigned int) indexToRemove) < (unsigned int) numUsed) - { - --numUsed; - - ElementType* const e = this->elements + indexToRemove; - ElementType const removed = *e; - const int numberToShift = numUsed - indexToRemove; - - if (numberToShift > 0) - memmove (e, e + 1, numberToShift * sizeof (ElementType)); - - if ((numUsed << 1) < this->numAllocated) - minimiseStorageOverheads(); - - lock.exit(); - return removed; - } - else - { - lock.exit(); - return 0; - } - } - - /** Removes an item from the set. - - This will remove the given element from the set, if it's there. - - @param valueToRemove the object to try to remove - @see remove, removeRange - */ - void removeValue (const ElementType valueToRemove) throw() - { - lock.enter(); - remove (indexOf (valueToRemove)); - lock.exit(); - } - - /** Removes any elements which are also in another set. - - @param otherSet the other set in which to look for elements to remove - @see removeValuesNotIn, remove, removeValue, removeRange - */ - template - void removeValuesIn (const OtherSetType& otherSet) throw() - { - otherSet.lockSet(); - lock.enter(); - - if (this == &otherSet) - { - clear(); - } - else - { - if (otherSet.size() > 0) - { - for (int i = numUsed; --i >= 0;) - if (otherSet.contains (this->elements [i])) - remove (i); - } - } - - lock.exit(); - otherSet.unlockSet(); - } - - /** Removes any elements which are not found in another set. - - Only elements which occur in this other set will be retained. - - @param otherSet the set in which to look for elements NOT to remove - @see removeValuesIn, remove, removeValue, removeRange - */ - template - void removeValuesNotIn (const OtherSetType& otherSet) throw() - { - otherSet.lockSet(); - lock.enter(); - - if (this != &otherSet) - { - if (otherSet.size() <= 0) - { - clear(); - } - else - { - for (int i = numUsed; --i >= 0;) - if (! otherSet.contains (this->elements [i])) - remove (i); - } - } - - lock.exit(); - otherSet.lockSet(); - } - - /** Reduces the amount of storage being used by the set. - - Sets typically allocate slightly more storage than they need, and after - removing elements, they may have quite a lot of unused space allocated. - This method will reduce the amount of allocated storage to a minimum. - */ - void minimiseStorageOverheads() throw() - { - lock.enter(); - - if (numUsed == 0) - { - this->setAllocatedSize (0); - } - else - { - const int newAllocation = this->granularity * (numUsed / this->granularity + 1); - - if (newAllocation < this->numAllocated) - this->setAllocatedSize (newAllocation); - } - - lock.exit(); - } - - /** Locks the set's CriticalSection. - - Of course if the type of section used is a DummyCriticalSection, this won't - have any effect. - - @see unlockSet - */ - void lockSet() const throw() - { - lock.enter(); - } - - /** Unlocks the set's CriticalSection. - - Of course if the type of section used is a DummyCriticalSection, this won't - have any effect. - - @see lockSet - */ - void unlockSet() const throw() - { - lock.exit(); - } - - juce_UseDebuggingNewOperator - -private: - int numUsed; - TypeOfCriticalSectionToUse lock; - - void insertInternal (const int indexToInsertAt, const ElementType newElement) throw() - { - this->ensureAllocatedSize (numUsed + 1); - - ElementType* const insertPos = this->elements + indexToInsertAt; - const int numberToMove = numUsed - indexToInsertAt; - - if (numberToMove > 0) - memmove (insertPos + 1, insertPos, numberToMove * sizeof (ElementType)); - - *insertPos = newElement; - ++numUsed; - } -}; - -#if JUCE_MSVC - #pragma warning (pop) -#endif - -#endif // __JUCE_SORTEDSET_JUCEHEADER__ -/********* End of inlined file: juce_SortedSet.h *********/ - -#endif -#ifndef __JUCE_SPARSESET_JUCEHEADER__ - -/********* Start of inlined file: juce_SparseSet.h *********/ -#ifndef __JUCE_SPARSESET_JUCEHEADER__ -#define __JUCE_SPARSESET_JUCEHEADER__ - -/** - Holds a set of primitive values, storing them as a set of ranges. - - This container acts like a simple BitArray, but can efficiently hold large - continguous ranges of values. It's quite a specialised class, mostly useful - for things like keeping the set of selected rows in a listbox. - - The type used as a template paramter must be an integer type, such as int, short, - int64, etc. -*/ -template -class SparseSet -{ -public: - - /** Creates a new empty set. */ - SparseSet() throw() - { - } - - /** Creates a copy of another SparseSet. */ - SparseSet (const SparseSet& other) throw() - : values (other.values) - { - } - - /** Destructor. */ - ~SparseSet() throw() - { - } - - /** Clears the set. */ - void clear() throw() - { - values.clear(); - } - - /** Checks whether the set is empty. - - This is much quicker than using (size() == 0). - */ - bool isEmpty() const throw() - { - return values.size() == 0; - } - - /** Returns the number of values in the set. - - Because of the way the data is stored, this method can take longer if there - are a lot of items in the set. Use isEmpty() for a quick test of whether there - are any items. - */ - Type size() const throw() - { - Type num = 0; - - for (int i = 0; i < values.size(); i += 2) - num += values[i + 1] - values[i]; - - return num; - } - - /** Returns one of the values in the set. - - @param index the index of the value to retrieve, in the range 0 to (size() - 1). - @returns the value at this index, or 0 if it's out-of-range - */ - Type operator[] (int index) const throw() - { - for (int i = 0; i < values.size(); i += 2) - { - const Type s = values.getUnchecked(i); - const Type e = values.getUnchecked(i + 1); - - if (index < e - s) - return s + index; - - index -= e - s; - } - - return (Type) 0; - } - - /** Checks whether a particular value is in the set. */ - bool contains (const Type valueToLookFor) const throw() - { - bool on = false; - - for (int i = 0; i < values.size(); ++i) - { - if (values.getUnchecked(i) > valueToLookFor) - return on; - - on = ! on; - } - - return false; - } - - /** Returns the number of contiguous blocks of values. - - @see getRange - */ - int getNumRanges() const throw() - { - return values.size() >> 1; - } - - /** Returns one of the contiguous ranges of values stored. - - @param rangeIndex the index of the range to look up, between 0 - and (getNumRanges() - 1) - @param startValue on return, the value at the start of the range - @param numValues on return, the number of values in the range - - @see getTotalRange - */ - bool getRange (const int rangeIndex, - Type& startValue, - Type& numValues) const throw() - { - if (((unsigned int) rangeIndex) < (unsigned int) getNumRanges()) - { - startValue = values [rangeIndex << 1]; - numValues = values [(rangeIndex << 1) + 1] - startValue; - - return true; - } - - return false; - } - - /** Returns the lowest and highest values in the set. - - @see getRange - */ - bool getTotalRange (Type& lowestValue, - Type& highestValue) const throw() - { - if (values.size() > 0) - { - lowestValue = values.getUnchecked (0); - highestValue = values.getUnchecked (values.size() - 1); - return true; - } - - return false; - } - - /** Adds a range of contiguous values to the set. - - e.g. addRange (10, 4) will add (10, 11, 12, 13) to the set. - - @param firstValue the start of the range of values to add - @param numValuesToAdd how many values to add - */ - void addRange (const Type firstValue, - const Type numValuesToAdd) throw() - { - jassert (numValuesToAdd >= 0); - - if (numValuesToAdd > 0) - { - removeRange (firstValue, numValuesToAdd); - - IntegerElementComparator sorter; - values.addSorted (sorter, firstValue); - values.addSorted (sorter, firstValue + numValuesToAdd); - - simplify(); - } - } - - /** Removes a range of values from the set. - - e.g. removeRange (10, 4) will remove (10, 11, 12, 13) from the set. - - @param firstValue the start of the range of values to remove - @param numValuesToRemove how many values to remove - */ - void removeRange (const Type firstValue, - const Type numValuesToRemove) throw() - { - jassert (numValuesToRemove >= 0); - - if (numValuesToRemove > 0 - && firstValue < values.getLast()) - { - const bool onAtStart = contains (firstValue - 1); - Type lastValue = firstValue + numValuesToRemove; - - if (lastValue < firstValue) // possible if the signed arithmetic wraps around - lastValue = values.getLast(); - - const bool onAtEnd = contains (lastValue); - - for (int i = values.size(); --i >= 0;) - { - if (values.getUnchecked(i) >= firstValue - && values.getUnchecked(i) <= lastValue) - { - values.remove (i); - } - } - - IntegerElementComparator sorter; - - if (onAtStart) - values.addSorted (sorter, firstValue); - - if (onAtEnd) - values.addSorted (sorter, lastValue); - - simplify(); - } - } - - /** Does an XOR of the values in a given range. */ - void invertRange (const Type firstValue, - const Type numValues) - { - SparseSet newItems; - newItems.addRange (firstValue, numValues); - - int i; - for (i = getNumRanges(); --i >= 0;) - { - const int start = values [i << 1]; - const int end = values [(i << 1) + 1]; - - newItems.removeRange (start, end); - } - - removeRange (firstValue, numValues); - - for (i = newItems.getNumRanges(); --i >= 0;) - { - const int start = newItems.values [i << 1]; - const int end = newItems.values [(i << 1) + 1]; - - addRange (start, end); - } - } - - /** Checks whether any part of a given range overlaps any part of this one. */ - bool overlapsRange (const Type firstValue, - const Type numValues) throw() - { - jassert (numValues >= 0); - - if (numValues > 0) - { - for (int i = getNumRanges(); --i >= 0;) - { - if (firstValue >= values.getUnchecked ((i << 1) + 1)) - return false; - - if (firstValue + numValues > values.getUnchecked (i << 1)) - return true; - } - } - - return false; - } - - /** Checks whether the whole of a given range is contained within this one. */ - bool containsRange (const Type firstValue, - const Type numValues) throw() - { - jassert (numValues >= 0); - - if (numValues > 0) - { - for (int i = getNumRanges(); --i >= 0;) - { - if (firstValue >= values.getUnchecked ((i << 1) + 1)) - return false; - - if (firstValue >= values.getUnchecked (i << 1) - && firstValue + numValues <= values.getUnchecked ((i << 1) + 1)) - return true; - } - } - - return false; - } - - bool operator== (const SparseSet& other) throw() - { - return values == other.values; - } - - bool operator!= (const SparseSet& other) throw() - { - return values != other.values; - } - - juce_UseDebuggingNewOperator - -private: - // alternating start/end values of ranges of values that are present. - Array values; - - void simplify() throw() - { - jassert ((values.size() & 1) == 0); - - for (int i = values.size(); --i > 0;) - if (values.getUnchecked(i) == values.getUnchecked (i - 1)) - values.removeRange (i - 1, 2); - } -}; - -#endif // __JUCE_SPARSESET_JUCEHEADER__ -/********* End of inlined file: juce_SparseSet.h *********/ - -#endif -#ifndef __JUCE_VOIDARRAY_JUCEHEADER__ - #endif #ifndef __JUCE_INPUTSTREAM_JUCEHEADER__ #endif #ifndef __JUCE_OUTPUTSTREAM_JUCEHEADER__ -#endif -#ifndef __JUCE_DIRECTORYITERATOR_JUCEHEADER__ - -/********* Start of inlined file: juce_DirectoryIterator.h *********/ -#ifndef __JUCE_DIRECTORYITERATOR_JUCEHEADER__ -#define __JUCE_DIRECTORYITERATOR_JUCEHEADER__ - -/** - Searches through a the files in a directory, returning each file that is found. - - A DirectoryIterator will search through a directory and its subdirectories using - a wildcard filepattern match. - - If you may be finding a large number of files, this is better than - using File::findChildFiles() because it doesn't block while it finds them - all, and this is more memory-efficient. - - It can also guess how far it's got using a wildly inaccurate algorithm. -*/ -class JUCE_API DirectoryIterator -{ -public: - - /** Creates a DirectoryIterator for a given directory. - - After creating one of these, call its next() method to get the - first file - e.g. @code - - DirectoryIterator iter (File ("/animals/mooses"), true, "*.moose"); - - while (iter.next()) - { - File theFileItFound (iter.getFile()); - - ... etc - } - @endcode - - @param directory the directory to search in - @param isRecursive whether all the subdirectories should also be searched - @param wildCard the file pattern to match - @param whatToLookFor a value from the File::TypesOfFileToFind enum, specifying - whether to look for files, directories, or both. - */ - DirectoryIterator (const File& directory, - bool isRecursive, - const String& wildCard = JUCE_T("*"), - const int whatToLookFor = File::findFiles) throw(); - - /** Destructor. */ - ~DirectoryIterator() throw(); - - /** Call this to move the iterator along to the next file. - - @returns true if a file was found (you can then use getFile() to see what it was) - or - false if there are no more matching files. - */ - bool next() throw(); - - /** Returns the file that the iterator is currently pointing at. - - The result of this call is only valid after a call to next() has returned true. - */ - const File getFile() const throw(); - - /** Returns a guess of how far through the search the iterator has got. - - @returns a value 0.0 to 1.0 to show the progress, although this won't be - very accurate. - */ - float getEstimatedProgress() const throw(); - - juce_UseDebuggingNewOperator - -private: - OwnedArray filesFound; - OwnedArray dirsFound; - String wildCard; - int index; - const int whatToLookFor; - DirectoryIterator* subIterator; - - DirectoryIterator (const DirectoryIterator&); - const DirectoryIterator& operator= (const DirectoryIterator&); -}; - -#endif // __JUCE_DIRECTORYITERATOR_JUCEHEADER__ -/********* End of inlined file: juce_DirectoryIterator.h *********/ - -#endif -#ifndef __JUCE_FILE_JUCEHEADER__ - #endif #ifndef __JUCE_FILEINPUTSTREAM_JUCEHEADER__ @@ -11434,6 +11390,98 @@ private: #endif // __JUCE_FILEOUTPUTSTREAM_JUCEHEADER__ /********* End of inlined file: juce_FileOutputStream.h *********/ +#endif +#ifndef __JUCE_DIRECTORYITERATOR_JUCEHEADER__ + +/********* Start of inlined file: juce_DirectoryIterator.h *********/ +#ifndef __JUCE_DIRECTORYITERATOR_JUCEHEADER__ +#define __JUCE_DIRECTORYITERATOR_JUCEHEADER__ + +/** + Searches through a the files in a directory, returning each file that is found. + + A DirectoryIterator will search through a directory and its subdirectories using + a wildcard filepattern match. + + If you may be finding a large number of files, this is better than + using File::findChildFiles() because it doesn't block while it finds them + all, and this is more memory-efficient. + + It can also guess how far it's got using a wildly inaccurate algorithm. +*/ +class JUCE_API DirectoryIterator +{ +public: + + /** Creates a DirectoryIterator for a given directory. + + After creating one of these, call its next() method to get the + first file - e.g. @code + + DirectoryIterator iter (File ("/animals/mooses"), true, "*.moose"); + + while (iter.next()) + { + File theFileItFound (iter.getFile()); + + ... etc + } + @endcode + + @param directory the directory to search in + @param isRecursive whether all the subdirectories should also be searched + @param wildCard the file pattern to match + @param whatToLookFor a value from the File::TypesOfFileToFind enum, specifying + whether to look for files, directories, or both. + */ + DirectoryIterator (const File& directory, + bool isRecursive, + const String& wildCard = JUCE_T("*"), + const int whatToLookFor = File::findFiles) throw(); + + /** Destructor. */ + ~DirectoryIterator() throw(); + + /** Call this to move the iterator along to the next file. + + @returns true if a file was found (you can then use getFile() to see what it was) - or + false if there are no more matching files. + */ + bool next() throw(); + + /** Returns the file that the iterator is currently pointing at. + + The result of this call is only valid after a call to next() has returned true. + */ + const File getFile() const throw(); + + /** Returns a guess of how far through the search the iterator has got. + + @returns a value 0.0 to 1.0 to show the progress, although this won't be + very accurate. + */ + float getEstimatedProgress() const throw(); + + juce_UseDebuggingNewOperator + +private: + OwnedArray filesFound; + OwnedArray dirsFound; + String wildCard; + int index; + const int whatToLookFor; + DirectoryIterator* subIterator; + + DirectoryIterator (const DirectoryIterator&); + const DirectoryIterator& operator= (const DirectoryIterator&); +}; + +#endif // __JUCE_DIRECTORYITERATOR_JUCEHEADER__ +/********* End of inlined file: juce_DirectoryIterator.h *********/ + +#endif +#ifndef __JUCE_FILE_JUCEHEADER__ + #endif #ifndef __JUCE_FILESEARCHPATH_JUCEHEADER__ @@ -11657,54 +11705,6 @@ private: #endif // __JUCE_NAMEDPIPE_JUCEHEADER__ /********* End of inlined file: juce_NamedPipe.h *********/ -#endif -#ifndef __JUCE_BLOWFISH_JUCEHEADER__ - -/********* Start of inlined file: juce_BlowFish.h *********/ -#ifndef __JUCE_BLOWFISH_JUCEHEADER__ -#define __JUCE_BLOWFISH_JUCEHEADER__ - -/** - BlowFish encryption class. - -*/ -class JUCE_API BlowFish -{ -public: - - /** Creates an object that can encode/decode based on the specified key. - - The key data can be up to 72 bytes long. - */ - BlowFish (const uint8* keyData, int keyBytes); - - /** Creates a copy of another blowfish object. */ - BlowFish (const BlowFish& other); - - /** Copies another blowfish object. */ - const BlowFish& operator= (const BlowFish& other); - - /** Destructor. */ - ~BlowFish(); - - /** Encrypts a pair of 32-bit integers. */ - void encrypt (uint32& data1, uint32& data2) const; - - /** Decrypts a pair of 32-bit integers. */ - void decrypt (uint32& data1, uint32& data2) const; - - juce_UseDebuggingNewOperator - -private: - uint32 p[18]; - uint32* s[4]; - - uint32 F (uint32 x) const; -}; - -#endif // __JUCE_BLOWFISH_JUCEHEADER__ -/********* End of inlined file: juce_BlowFish.h *********/ - #endif #ifndef __JUCE_MD5_JUCEHEADER__ @@ -11793,45 +11793,52 @@ private: /********* End of inlined file: juce_MD5.h *********/ #endif -#ifndef __JUCE_PRIMES_JUCEHEADER__ +#ifndef __JUCE_BLOWFISH_JUCEHEADER__ -/********* Start of inlined file: juce_Primes.h *********/ -#ifndef __JUCE_PRIMES_JUCEHEADER__ -#define __JUCE_PRIMES_JUCEHEADER__ +/********* Start of inlined file: juce_BlowFish.h *********/ +#ifndef __JUCE_BLOWFISH_JUCEHEADER__ +#define __JUCE_BLOWFISH_JUCEHEADER__ /** - Prime number creation class. + BlowFish encryption class. - This class contains static methods for generating and testing prime numbers. - - @see BitArray */ -class JUCE_API Primes +class JUCE_API BlowFish { public: - /** Creates a random prime number with a given bit-length. + /** Creates an object that can encode/decode based on the specified key. - The certainty parameter specifies how many iterations to use when testing - for primality. A safe value might be anything over about 20-30. + The key data can be up to 72 bytes long. */ - static const BitArray createProbablePrime (int bitLength, - int certainty) throw(); + BlowFish (const uint8* keyData, int keyBytes); - /** Tests a number to see if it's prime. + /** Creates a copy of another blowfish object. */ + BlowFish (const BlowFish& other); - This isn't a bulletproof test, it uses a Miller-Rabin test to determine - whether the number is prime. + /** Copies another blowfish object. */ + const BlowFish& operator= (const BlowFish& other); - The certainty parameter specifies how many iterations to use when testing - a - safe value might be anything over about 20-30. - */ - static bool isProbablyPrime (const BitArray& number, - int certainty) throw(); + /** Destructor. */ + ~BlowFish(); + + /** Encrypts a pair of 32-bit integers. */ + void encrypt (uint32& data1, uint32& data2) const; + + /** Decrypts a pair of 32-bit integers. */ + void decrypt (uint32& data1, uint32& data2) const; + + juce_UseDebuggingNewOperator + +private: + uint32 p[18]; + uint32* s[4]; + + uint32 F (uint32 x) const; }; -#endif // __JUCE_PRIMES_JUCEHEADER__ -/********* End of inlined file: juce_Primes.h *********/ +#endif // __JUCE_BLOWFISH_JUCEHEADER__ +/********* End of inlined file: juce_BlowFish.h *********/ #endif #ifndef __JUCE_RSAKEY_JUCEHEADER__ @@ -11901,6 +11908,261 @@ protected: #endif // __JUCE_RSAKEY_JUCEHEADER__ /********* End of inlined file: juce_RSAKey.h *********/ +#endif +#ifndef __JUCE_PRIMES_JUCEHEADER__ + +/********* Start of inlined file: juce_Primes.h *********/ +#ifndef __JUCE_PRIMES_JUCEHEADER__ +#define __JUCE_PRIMES_JUCEHEADER__ + +/** + Prime number creation class. + + This class contains static methods for generating and testing prime numbers. + + @see BitArray +*/ +class JUCE_API Primes +{ +public: + + /** Creates a random prime number with a given bit-length. + + The certainty parameter specifies how many iterations to use when testing + for primality. A safe value might be anything over about 20-30. + */ + static const BitArray createProbablePrime (int bitLength, + int certainty) throw(); + + /** Tests a number to see if it's prime. + + This isn't a bulletproof test, it uses a Miller-Rabin test to determine + whether the number is prime. + + The certainty parameter specifies how many iterations to use when testing - a + safe value might be anything over about 20-30. + */ + static bool isProbablyPrime (const BitArray& number, + int certainty) throw(); +}; + +#endif // __JUCE_PRIMES_JUCEHEADER__ +/********* End of inlined file: juce_Primes.h *********/ + +#endif +#ifndef __JUCE_URL_JUCEHEADER__ + +/********* Start of inlined file: juce_URL.h *********/ +#ifndef __JUCE_URL_JUCEHEADER__ +#define __JUCE_URL_JUCEHEADER__ + +/** + Represents a URL and has a bunch of useful functions to manipulate it. + + This class can be used to launch URLs in browsers, and also to create + InputStreams that can read from remote http or ftp sources. +*/ +class JUCE_API URL +{ +public: + + /** Creates an empty URL. */ + URL() throw(); + + /** Creates a URL from a string. */ + URL (const String& url); + + /** Creates a copy of another URL. */ + URL (const URL& other); + + /** Destructor. */ + ~URL() throw(); + + /** Copies this URL from another one. */ + const URL& operator= (const URL& other); + + /** Returns a string version of the URL. + + If includeGetParameters is true and any parameters have been set with the + withParameter() method, then the string will have these appended on the + end and url-encoded. + */ + const String toString (const bool includeGetParameters) const; + + /** True if it seems to be valid. */ + bool isWellFormed() const; + + /** Returns a copy of this URL, with a GET parameter added to the end. + + Any control characters in the value will be encoded. + + e.g. calling "withParameter ("amount", "some fish") for the url "www.fish.com" + would produce a new url whose toString(true) method would return + "www.fish.com?amount=some+fish". + */ + const URL withParameter (const String& parameterName, + const String& parameterValue) const; + + /** Returns a copy of this URl, with a file-upload type parameter added to it. + + When performing a POST where one of your parameters is a binary file, this + lets you specify the file. + + Note that the filename is stored, but the file itself won't actually be read + until this URL is later used to create a network input stream. + */ + const URL withFileToUpload (const String& parameterName, + const File& fileToUpload, + const String& mimeType) const; + + /** Returns a set of all the parameters encoded into the url. + + E.g. for the url "www.fish.com?type=haddock&amount=some+fish", this array would + contain two pairs: "type" => "haddock" and "amount" => "some fish". + + The values returned will have been cleaned up to remove any escape characters. + + @see getNamedParameter, withParameter + */ + const StringPairArray& getParameters() const throw(); + + /** Returns the set of files that should be uploaded as part of a POST operation. + + This is the set of files that were added to the URL with the withFileToUpload() + method. + */ + const StringPairArray& getFilesToUpload() const throw(); + + /** Returns the set of mime types associated with each of the upload files. + */ + const StringPairArray& getMimeTypesOfUploadFiles() const throw(); + + /** Tries to launch the system's default browser to open the URL. + + Returns true if this seems to have worked. + */ + bool launchInDefaultBrowser() const; + + /** Takes a guess as to whether a string might be a valid website address. + + This isn't foolproof! + */ + static bool isProbablyAWebsiteURL (const String& possibleURL); + + /** Takes a guess as to whether a string might be a valid email address. + + This isn't foolproof! + */ + static bool isProbablyAnEmailAddress (const String& possibleEmailAddress); + + /** This callback function can be used by the createInputStream() method. + + It allows your app to receive progress updates during a lengthy POST operation. If you + want to continue the operation, this should return true, or false to abort. + */ + typedef bool (OpenStreamProgressCallback) (void* context, int bytesSent, int totalBytes); + + /** Attempts to open a stream that can read from this URL. + + @param usePostCommand if true, it will try to do use a http 'POST' to pass + the paramters, otherwise it'll encode them into the + URL and do a 'GET'. + @param progressCallback if this is non-zero, it lets you supply a callback function + to keep track of the operation's progress. This can be useful + for lengthy POST operations, so that you can provide user feedback. + @param progressCallbackContext if a callback is specified, this value will be passed to + the function + @param extraHeaders if not empty, this string is appended onto the headers that + are used for the request. It must therefore be a valid set of HTML + header directives, separated by newlines. + @param connectionTimeOutMs if 0, this will use whatever default setting the OS chooses. If + a negative number, it will be infinite. Otherwise it specifies a + time in milliseconds. + */ + InputStream* createInputStream (const bool usePostCommand, + OpenStreamProgressCallback* const progressCallback = 0, + void* const progressCallbackContext = 0, + const String& extraHeaders = String::empty, + const int connectionTimeOutMs = 0) const; + + /** Tries to download the entire contents of this URL into a binary data block. + + If it succeeds, this will return true and append the data it read onto the end + of the memory block. + + @param destData the memory block to append the new data to + @param usePostCommand whether to use a POST command to get the data (uses + a GET command if this is false) + @see readEntireTextStream, readEntireXmlStream + */ + bool readEntireBinaryStream (MemoryBlock& destData, + const bool usePostCommand = false) const; + + /** Tries to download the entire contents of this URL as a string. + + If it fails, this will return an empty string, otherwise it will return the + contents of the downloaded file. If you need to distinguish between a read + operation that fails and one that returns an empty string, you'll need to use + a different method, such as readEntireBinaryStream(). + + @param usePostCommand whether to use a POST command to get the data (uses + a GET command if this is false) + @see readEntireBinaryStream, readEntireXmlStream + */ + const String readEntireTextStream (const bool usePostCommand = false) const; + + /** Tries to download the entire contents of this URL and parse it as XML. + + If it fails, or if the text that it reads can't be parsed as XML, this will + return 0. + + When it returns a valid XmlElement object, the caller is responsibile for deleting + this object when no longer needed. + + @param usePostCommand whether to use a POST command to get the data (uses + a GET command if this is false) + + @see readEntireBinaryStream, readEntireTextStream + */ + XmlElement* readEntireXmlStream (const bool usePostCommand = false) const; + + /** Adds escape sequences to a string to encode any characters that aren't + legal in a URL. + + E.g. any spaces will be replaced with "%20". + + This is the opposite of removeEscapeChars(). + + If isParameter is true, it means that the string is going to be used + as a parameter, so it also encodes '$' and ',' (which would otherwise + be legal in a URL. + + @see removeEscapeChars + */ + static const String addEscapeChars (const String& stringToAddEscapeCharsTo, + const bool isParameter); + + /** Replaces any escape character sequences in a string with their original + character codes. + + E.g. any instances of "%20" will be replaced by a space. + + This is the opposite of addEscapeChars(). + + @see addEscapeChars + */ + static const String removeEscapeChars (const String& stringToRemoveEscapeCharsFrom); + + juce_UseDebuggingNewOperator + +private: + String url; + StringPairArray parameters, filesToUpload, mimeTypes; +}; + +#endif // __JUCE_URL_JUCEHEADER__ +/********* End of inlined file: juce_URL.h *********/ + #endif #ifndef __JUCE_SOCKET_JUCEHEADER__ @@ -12155,213 +12417,135 @@ private: /********* End of inlined file: juce_Socket.h *********/ #endif -#ifndef __JUCE_URL_JUCEHEADER__ +#ifndef __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ -/********* Start of inlined file: juce_URL.h *********/ -#ifndef __JUCE_URL_JUCEHEADER__ -#define __JUCE_URL_JUCEHEADER__ +/********* Start of inlined file: juce_MemoryOutputStream.h *********/ +#ifndef __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ +#define __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ -/** - Represents a URL and has a bunch of useful functions to manipulate it. +/** Writes data to an internal memory buffer, which grows as required. - This class can be used to launch URLs in browsers, and also to create - InputStreams that can read from remote http or ftp sources. + The data that was written into the stream can then be accessed later as + a contiguous block of memory. */ -class JUCE_API URL +class JUCE_API MemoryOutputStream : public OutputStream { public: - /** Creates an empty URL. */ - URL() throw(); + /** Creates a memory stream ready for writing into. - /** Creates a URL from a string. */ - URL (const String& url); - - /** Creates a copy of another URL. */ - URL (const URL& other); - - /** Destructor. */ - ~URL() throw(); - - /** Copies this URL from another one. */ - const URL& operator= (const URL& other); - - /** Returns a string version of the URL. - - If includeGetParameters is true and any parameters have been set with the - withParameter() method, then the string will have these appended on the - end and url-encoded. + @param initialSize the intial amount of space to allocate for writing into + @param granularity the increments by which the internal storage will be increased + @param memoryBlockToWriteTo if this is non-zero, then this block will be used as the + place that the data gets stored. If it's zero, the stream + will allocate its own storage internally, which you can + access using getData() and getDataSize() */ - const String toString (const bool includeGetParameters) const; + MemoryOutputStream (const int initialSize = 256, + const int granularity = 256, + MemoryBlock* const memoryBlockToWriteTo = 0) throw(); - /** True if it seems to be valid. */ - bool isWellFormed() const; + /** Destructor. - /** Returns a copy of this URL, with a GET parameter added to the end. - - Any control characters in the value will be encoded. - - e.g. calling "withParameter ("amount", "some fish") for the url "www.fish.com" - would produce a new url whose toString(true) method would return - "www.fish.com?amount=some+fish". + This will free any data that was written to it. */ - const URL withParameter (const String& parameterName, - const String& parameterValue) const; + ~MemoryOutputStream() throw(); - /** Returns a copy of this URl, with a file-upload type parameter added to it. + /** Returns a pointer to the data that has been written to the stream. - When performing a POST where one of your parameters is a binary file, this - lets you specify the file. - - Note that the filename is stored, but the file itself won't actually be read - until this URL is later used to create a network input stream. + @see getDataSize */ - const URL withFileToUpload (const String& parameterName, - const File& fileToUpload, - const String& mimeType) const; + const char* getData() throw(); - /** Returns a set of all the parameters encoded into the url. + /** Returns the number of bytes of data that have been written to the stream. - E.g. for the url "www.fish.com?type=haddock&amount=some+fish", this array would - contain two pairs: "type" => "haddock" and "amount" => "some fish". - - The values returned will have been cleaned up to remove any escape characters. - - @see getNamedParameter, withParameter + @see getData */ - const StringPairArray& getParameters() const throw(); + int getDataSize() const throw(); - /** Returns the set of files that should be uploaded as part of a POST operation. + /** Resets the stream, clearing any data that has been written to it so far. */ + void reset() throw(); - This is the set of files that were added to the URL with the withFileToUpload() - method. - */ - const StringPairArray& getFilesToUpload() const throw(); - - /** Returns the set of mime types associated with each of the upload files. - */ - const StringPairArray& getMimeTypesOfUploadFiles() const throw(); - - /** Tries to launch the system's default browser to open the URL. - - Returns true if this seems to have worked. - */ - bool launchInDefaultBrowser() const; - - /** Takes a guess as to whether a string might be a valid website address. - - This isn't foolproof! - */ - static bool isProbablyAWebsiteURL (const String& possibleURL); - - /** Takes a guess as to whether a string might be a valid email address. - - This isn't foolproof! - */ - static bool isProbablyAnEmailAddress (const String& possibleEmailAddress); - - /** This callback function can be used by the createInputStream() method. - - It allows your app to receive progress updates during a lengthy POST operation. If you - want to continue the operation, this should return true, or false to abort. - */ - typedef bool (OpenStreamProgressCallback) (void* context, int bytesSent, int totalBytes); - - /** Attempts to open a stream that can read from this URL. - - @param usePostCommand if true, it will try to do use a http 'POST' to pass - the paramters, otherwise it'll encode them into the - URL and do a 'GET'. - @param progressCallback if this is non-zero, it lets you supply a callback function - to keep track of the operation's progress. This can be useful - for lengthy POST operations, so that you can provide user feedback. - @param progressCallbackContext if a callback is specified, this value will be passed to - the function - @param extraHeaders if not empty, this string is appended onto the headers that - are used for the request. It must therefore be a valid set of HTML - header directives, separated by newlines. - @param connectionTimeOutMs if 0, this will use whatever default setting the OS chooses. If - a negative number, it will be infinite. Otherwise it specifies a - time in milliseconds. - */ - InputStream* createInputStream (const bool usePostCommand, - OpenStreamProgressCallback* const progressCallback = 0, - void* const progressCallbackContext = 0, - const String& extraHeaders = String::empty, - const int connectionTimeOutMs = 0) const; - - /** Tries to download the entire contents of this URL into a binary data block. - - If it succeeds, this will return true and append the data it read onto the end - of the memory block. - - @param destData the memory block to append the new data to - @param usePostCommand whether to use a POST command to get the data (uses - a GET command if this is false) - @see readEntireTextStream, readEntireXmlStream - */ - bool readEntireBinaryStream (MemoryBlock& destData, - const bool usePostCommand = false) const; - - /** Tries to download the entire contents of this URL as a string. - - If it fails, this will return an empty string, otherwise it will return the - contents of the downloaded file. If you need to distinguish between a read - operation that fails and one that returns an empty string, you'll need to use - a different method, such as readEntireBinaryStream(). - - @param usePostCommand whether to use a POST command to get the data (uses - a GET command if this is false) - @see readEntireBinaryStream, readEntireXmlStream - */ - const String readEntireTextStream (const bool usePostCommand = false) const; - - /** Tries to download the entire contents of this URL and parse it as XML. - - If it fails, or if the text that it reads can't be parsed as XML, this will - return 0. - - When it returns a valid XmlElement object, the caller is responsibile for deleting - this object when no longer needed. - - @param usePostCommand whether to use a POST command to get the data (uses - a GET command if this is false) - - @see readEntireBinaryStream, readEntireTextStream - */ - XmlElement* readEntireXmlStream (const bool usePostCommand = false) const; - - /** Adds escape sequences to a string to encode any characters that aren't - legal in a URL. - - E.g. any spaces will be replaced with "%20". - - This is the opposite of removeEscapeChars(). - - @see removeEscapeChars - */ - static const String addEscapeChars (const String& stringToAddEscapeCharsTo); - - /** Replaces any escape character sequences in a string with their original - character codes. - - E.g. any instances of "%20" will be replaced by a space. - - This is the opposite of addEscapeChars(). - - @see addEscapeChars - */ - static const String removeEscapeChars (const String& stringToRemoveEscapeCharsFrom); + void flush(); + bool write (const void* buffer, int howMany); + int64 getPosition(); + bool setPosition (int64 newPosition); juce_UseDebuggingNewOperator private: - String url; - StringPairArray parameters, filesToUpload, mimeTypes; + MemoryBlock* data; + int position, size, blockSize; + bool ownsMemoryBlock; }; -#endif // __JUCE_URL_JUCEHEADER__ -/********* End of inlined file: juce_URL.h *********/ +#endif // __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ +/********* End of inlined file: juce_MemoryOutputStream.h *********/ + +#endif +#ifndef __JUCE_SUBREGIONSTREAM_JUCEHEADER__ + +/********* Start of inlined file: juce_SubregionStream.h *********/ +#ifndef __JUCE_SUBREGIONSTREAM_JUCEHEADER__ +#define __JUCE_SUBREGIONSTREAM_JUCEHEADER__ + +/** Wraps another input stream, and reads from a specific part of it. + + This lets you take a subsection of a stream and present it as an entire + stream in its own right. +*/ +class JUCE_API SubregionStream : public InputStream +{ +public: + + /** Creates a SubregionStream from an input source. + + @param sourceStream the source stream to read from + @param startPositionInSourceStream this is the position in the source stream that + corresponds to position 0 in this stream + @param lengthOfSourceStream this specifies the maximum number of bytes + from the source stream that will be passed through + by this stream. When the position of this stream + exceeds lengthOfSourceStream, it will cause an end-of-stream. + If the length passed in here is greater than the length + of the source stream (as returned by getTotalLength()), + then the smaller value will be used. + Passing a negative value for this parameter means it + will keep reading until the source's end-of-stream. + @param deleteSourceWhenDestroyed whether the sourceStream that is passed in should be + deleted by this object when it is itself deleted. + */ + SubregionStream (InputStream* const sourceStream, + const int64 startPositionInSourceStream, + const int64 lengthOfSourceStream, + const bool deleteSourceWhenDestroyed) throw(); + + /** Destructor. + + This may also delete the source stream, if that option was chosen when the + buffered stream was created. + */ + ~SubregionStream() throw(); + + int64 getTotalLength(); + int64 getPosition(); + bool setPosition (int64 newPosition); + int read (void* destBuffer, int maxBytesToRead); + bool isExhausted(); + + juce_UseDebuggingNewOperator + +private: + InputStream* const source; + const bool deleteSourceWhenDestroyed; + const int64 startPositionInSourceStream, lengthOfSourceStream; + + SubregionStream (const SubregionStream&); + const SubregionStream& operator= (const SubregionStream&); +}; + +#endif // __JUCE_SUBREGIONSTREAM_JUCEHEADER__ +/********* End of inlined file: juce_SubregionStream.h *********/ #endif #ifndef __JUCE_BUFFEREDINPUTSTREAM_JUCEHEADER__ @@ -12504,6 +12688,9 @@ private: #endif // __JUCE_FILEINPUTSOURCE_JUCEHEADER__ /********* End of inlined file: juce_FileInputSource.h *********/ +#endif +#ifndef __JUCE_INPUTSOURCE_JUCEHEADER__ + #endif #ifndef __JUCE_GZIPCOMPRESSOROUTPUTSTREAM_JUCEHEADER__ @@ -12626,9 +12813,6 @@ private: #endif // __JUCE_GZIPDECOMPRESSORINPUTSTREAM_JUCEHEADER__ /********* End of inlined file: juce_GZIPDecompressorInputStream.h *********/ -#endif -#ifndef __JUCE_INPUTSOURCE_JUCEHEADER__ - #endif #ifndef __JUCE_MEMORYINPUTSTREAM_JUCEHEADER__ @@ -12680,431 +12864,6 @@ private: #endif // __JUCE_MEMORYINPUTSTREAM_JUCEHEADER__ /********* End of inlined file: juce_MemoryInputStream.h *********/ -#endif -#ifndef __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ - -/********* Start of inlined file: juce_MemoryOutputStream.h *********/ -#ifndef __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ -#define __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ - -/** Writes data to an internal memory buffer, which grows as required. - - The data that was written into the stream can then be accessed later as - a contiguous block of memory. -*/ -class JUCE_API MemoryOutputStream : public OutputStream -{ -public: - - /** Creates a memory stream ready for writing into. - - @param initialSize the intial amount of space to allocate for writing into - @param granularity the increments by which the internal storage will be increased - @param memoryBlockToWriteTo if this is non-zero, then this block will be used as the - place that the data gets stored. If it's zero, the stream - will allocate its own storage internally, which you can - access using getData() and getDataSize() - */ - MemoryOutputStream (const int initialSize = 256, - const int granularity = 256, - MemoryBlock* const memoryBlockToWriteTo = 0) throw(); - - /** Destructor. - - This will free any data that was written to it. - */ - ~MemoryOutputStream() throw(); - - /** Returns a pointer to the data that has been written to the stream. - - @see getDataSize - */ - const char* getData() throw(); - - /** Returns the number of bytes of data that have been written to the stream. - - @see getData - */ - int getDataSize() const throw(); - - /** Resets the stream, clearing any data that has been written to it so far. */ - void reset() throw(); - - void flush(); - bool write (const void* buffer, int howMany); - int64 getPosition(); - bool setPosition (int64 newPosition); - - juce_UseDebuggingNewOperator - -private: - MemoryBlock* data; - int position, size, blockSize; - bool ownsMemoryBlock; -}; - -#endif // __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ -/********* End of inlined file: juce_MemoryOutputStream.h *********/ - -#endif -#ifndef __JUCE_SUBREGIONSTREAM_JUCEHEADER__ - -/********* Start of inlined file: juce_SubregionStream.h *********/ -#ifndef __JUCE_SUBREGIONSTREAM_JUCEHEADER__ -#define __JUCE_SUBREGIONSTREAM_JUCEHEADER__ - -/** Wraps another input stream, and reads from a specific part of it. - - This lets you take a subsection of a stream and present it as an entire - stream in its own right. -*/ -class JUCE_API SubregionStream : public InputStream -{ -public: - - /** Creates a SubregionStream from an input source. - - @param sourceStream the source stream to read from - @param startPositionInSourceStream this is the position in the source stream that - corresponds to position 0 in this stream - @param lengthOfSourceStream this specifies the maximum number of bytes - from the source stream that will be passed through - by this stream. When the position of this stream - exceeds lengthOfSourceStream, it will cause an end-of-stream. - If the length passed in here is greater than the length - of the source stream (as returned by getTotalLength()), - then the smaller value will be used. - Passing a negative value for this parameter means it - will keep reading until the source's end-of-stream. - @param deleteSourceWhenDestroyed whether the sourceStream that is passed in should be - deleted by this object when it is itself deleted. - */ - SubregionStream (InputStream* const sourceStream, - const int64 startPositionInSourceStream, - const int64 lengthOfSourceStream, - const bool deleteSourceWhenDestroyed) throw(); - - /** Destructor. - - This may also delete the source stream, if that option was chosen when the - buffered stream was created. - */ - ~SubregionStream() throw(); - - int64 getTotalLength(); - int64 getPosition(); - bool setPosition (int64 newPosition); - int read (void* destBuffer, int maxBytesToRead); - bool isExhausted(); - - juce_UseDebuggingNewOperator - -private: - InputStream* const source; - const bool deleteSourceWhenDestroyed; - const int64 startPositionInSourceStream, lengthOfSourceStream; - - SubregionStream (const SubregionStream&); - const SubregionStream& operator= (const SubregionStream&); -}; - -#endif // __JUCE_SUBREGIONSTREAM_JUCEHEADER__ -/********* End of inlined file: juce_SubregionStream.h *********/ - -#endif -#ifndef __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ - -/********* Start of inlined file: juce_PerformanceCounter.h *********/ -#ifndef __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ -#define __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ - -/** A timer for measuring performance of code and dumping the results to a file. - - e.g. @code - - PerformanceCounter pc ("fish", 50, "/temp/myfishlog.txt"); - - for (;;) - { - pc.start(); - - doSomethingFishy(); - - pc.stop(); - } - @endcode - - In this example, the time of each period between calling start/stop will be - measured and averaged over 50 runs, and the results printed to a file - every 50 times round the loop. -*/ -class JUCE_API PerformanceCounter -{ -public: - - /** Creates a PerformanceCounter object. - - @param counterName the name used when printing out the statistics - @param runsPerPrintout the number of start/stop iterations before calling - printStatistics() - @param loggingFile a file to dump the results to - if this is File::nonexistent, - the results are just written to the debugger output - */ - PerformanceCounter (const String& counterName, - int runsPerPrintout = 100, - const File& loggingFile = File::nonexistent); - - /** Destructor. */ - ~PerformanceCounter(); - - /** Starts timing. - - @see stop - */ - void start(); - - /** Stops timing and prints out the results. - - The number of iterations before doing a printout of the - results is set in the constructor. - - @see start - */ - void stop(); - - /** Dumps the current metrics to the debugger output and to a file. - - As well as using Logger::outputDebugString to print the results, - this will write then to the file specified in the constructor (if - this was valid). - */ - void printStatistics(); - - juce_UseDebuggingNewOperator - -private: - - String name; - int numRuns, runsPerPrint; - double totalTime; - int64 started; - File outputFile; -}; - -#endif // __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ -/********* End of inlined file: juce_PerformanceCounter.h *********/ - -#endif -#ifndef __JUCE_PLATFORMUTILITIES_JUCEHEADER__ - -/********* Start of inlined file: juce_PlatformUtilities.h *********/ -#ifndef __JUCE_PLATFORMUTILITIES_JUCEHEADER__ -#define __JUCE_PLATFORMUTILITIES_JUCEHEADER__ - -/** - A collection of miscellaneous platform-specific utilities. - -*/ -class JUCE_API PlatformUtilities -{ -public: - - /** Plays the operating system's default alert 'beep' sound. */ - static void beep(); - - static bool launchEmailWithAttachments (const String& targetEmailAddress, - const String& emailSubject, - const String& bodyText, - const StringArray& filesToAttach); - -#if JUCE_MAC || DOXYGEN - - /** MAC ONLY - Turns a String into a pascal string. */ - static void copyToStr255 (Str255& d, const String& s); - /** MAC ONLY - Turns a String into a pascal string. */ - static void copyToStr63 (Str63& d, const String& s); - - /** MAC ONLY - Turns a Core CF String into a juce one. */ - static const String cfStringToJuceString (CFStringRef cfString); - - /** MAC ONLY - Turns a juce string into a Core CF one. */ - static CFStringRef juceStringToCFString (const String& s); - - /** MAC ONLY - Converts a UTF16 string to a Juce String. */ - static const String convertUTF16ToString (const UniChar* utf16); - - /** MAC ONLY - Turns a file path into an FSSpec, returning true if it succeeds. */ - static bool makeFSSpecFromPath (FSSpec* destFSSpec, const String& path); - - /** MAC ONLY - Turns a file path into an FSRef, returning true if it succeeds. */ - static bool makeFSRefFromPath (FSRef* destFSRef, const String& path); - - /** MAC ONLY - Turns an FSRef into a juce string path. */ - static const String makePathFromFSRef (FSRef* file); - - /** MAC ONLY - Converts any decomposed unicode characters in a string into - their precomposed equivalents. - */ - static const String convertToPrecomposedUnicode (const String& s); - - /** MAC ONLY - Gets the type of a file from the file's resources. */ - static OSType getTypeOfFile (const String& filename); - - /** MAC ONLY - Returns true if this file is actually a bundle. */ - static bool isBundle (const String& filename); - -#endif - -#if JUCE_WIN32 || DOXYGEN - - // Some registry helper functions: - - /** WIN32 ONLY - Returns a string from the registry. - - The path is a string for the entire path of a value in the registry, - e.g. "HKEY_CURRENT_USER\Software\foo\bar" - */ - static const String getRegistryValue (const String& regValuePath, - const String& defaultValue = String::empty); - - /** WIN32 ONLY - Sets a registry value as a string. - - This will take care of creating any groups needed to get to the given - registry value. - */ - static void setRegistryValue (const String& regValuePath, - const String& value); - - /** WIN32 ONLY - Returns true if the given value exists in the registry. */ - static bool registryValueExists (const String& regValuePath); - - /** WIN32 ONLY - Deletes a registry value. */ - static void deleteRegistryValue (const String& regValuePath); - - /** WIN32 ONLY - Deletes a registry key (which is registry-talk for 'folder'). */ - static void deleteRegistryKey (const String& regKeyPath); - - /** WIN32 ONLY - This returns the HINSTANCE of the current module. - - In a normal Juce application this will be set to the module handle - of the application executable. - - If you're writing a DLL using Juce and plan to use any Juce messaging or - windows, you'll need to make sure you use the setCurrentModuleInstanceHandle() - to set the correct module handle in your DllMain() function, because - the win32 system relies on the correct instance handle when opening windows. - */ - static void* JUCE_CALLTYPE getCurrentModuleInstanceHandle() throw(); - - /** WIN32 ONLY - Sets a new module handle to be used by the library. - - @see getCurrentModuleInstanceHandle() - */ - static void JUCE_CALLTYPE setCurrentModuleInstanceHandle (void* newHandle) throw(); - - /** WIN32 ONLY - Gets the command-line params as a string. - - This is needed to avoid unicode problems with the argc type params. - */ - static const String JUCE_CALLTYPE getCurrentCommandLineParams() throw(); -#endif - - /** Clears the floating point unit's flags. - - Only has an effect under win32, currently. - */ - static void fpuReset(); - -#if JUCE_LINUX || DOXYGEN - -#endif -}; - -#if JUCE_MAC - -/** - A wrapper class for picking up events from an Apple IR remote control device. - - To use it, just create a subclass of this class, implementing the buttonPressed() - callback, then call start() and stop() to start or stop receiving events. -*/ -class JUCE_API AppleRemoteDevice -{ -public: - - AppleRemoteDevice(); - virtual ~AppleRemoteDevice(); - - /** The set of buttons that may be pressed. - @see buttonPressed - */ - enum ButtonType - { - menuButton = 0, /**< The menu button (if it's held for a short time). */ - playButton, /**< The play button. */ - plusButton, /**< The plus or volume-up button. */ - minusButton, /**< The minus or volume-down button. */ - rightButton, /**< The right button (if it's held for a short time). */ - leftButton, /**< The left button (if it's held for a short time). */ - rightButton_Long, /**< The right button (if it's held for a long time). */ - leftButton_Long, /**< The menu button (if it's held for a long time). */ - menuButton_Long, /**< The menu button (if it's held for a long time). */ - playButtonSleepMode, - switched - }; - - /** Override this method to receive the callback about a button press. - - The callback will happen on the application's message thread. - - Some buttons trigger matching up and down events, in which the isDown parameter - will be true and then false. Others only send a single event when the - button is pressed. - */ - virtual void buttonPressed (const ButtonType buttonId, const bool isDown) = 0; - - /** Starts the device running and responding to events. - - Returns true if it managed to open the device. - - @param inExclusiveMode if true, the remote will be grabbed exclusively for this app, - and will not be available to any other part of the system. If - false, it will be shared with other apps. - @see stop - */ - bool start (const bool inExclusiveMode) throw(); - - /** Stops the device running. - @see start - */ - void stop() throw(); - - /** Returns true if the device has been started successfully. - */ - bool isActive() const throw(); - - /** Returns the ID number of the remote, if it has sent one. - */ - int getRemoteId() const throw() { return remoteId; } - - juce_UseDebuggingNewOperator - - /** @internal */ - void handleCallbackInternal(); - -private: - void* device; - void* queue; - int remoteId; - - bool open (const bool openInExclusiveMode) throw(); -}; - -#endif - -#endif // __JUCE_PLATFORMUTILITIES_JUCEHEADER__ -/********* End of inlined file: juce_PlatformUtilities.h *********/ - #endif #ifndef __JUCE_UUID_JUCEHEADER__ @@ -13198,6 +12957,89 @@ private: #endif // __JUCE_UUID_JUCEHEADER__ /********* End of inlined file: juce_Uuid.h *********/ +#endif +#ifndef __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ + +/********* Start of inlined file: juce_PerformanceCounter.h *********/ +#ifndef __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ +#define __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ + +/** A timer for measuring performance of code and dumping the results to a file. + + e.g. @code + + PerformanceCounter pc ("fish", 50, "/temp/myfishlog.txt"); + + for (;;) + { + pc.start(); + + doSomethingFishy(); + + pc.stop(); + } + @endcode + + In this example, the time of each period between calling start/stop will be + measured and averaged over 50 runs, and the results printed to a file + every 50 times round the loop. +*/ +class JUCE_API PerformanceCounter +{ +public: + + /** Creates a PerformanceCounter object. + + @param counterName the name used when printing out the statistics + @param runsPerPrintout the number of start/stop iterations before calling + printStatistics() + @param loggingFile a file to dump the results to - if this is File::nonexistent, + the results are just written to the debugger output + */ + PerformanceCounter (const String& counterName, + int runsPerPrintout = 100, + const File& loggingFile = File::nonexistent); + + /** Destructor. */ + ~PerformanceCounter(); + + /** Starts timing. + + @see stop + */ + void start(); + + /** Stops timing and prints out the results. + + The number of iterations before doing a printout of the + results is set in the constructor. + + @see start + */ + void stop(); + + /** Dumps the current metrics to the debugger output and to a file. + + As well as using Logger::outputDebugString to print the results, + this will write then to the file specified in the constructor (if + this was valid). + */ + void printStatistics(); + + juce_UseDebuggingNewOperator + +private: + + String name; + int numRuns, runsPerPrint; + double totalTime; + int64 started; + File outputFile; +}; + +#endif // __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ +/********* End of inlined file: juce_PerformanceCounter.h *********/ + #endif #ifndef __JUCE_ZIPFILE_JUCEHEADER__ @@ -13334,9 +13176,257 @@ private: #endif // __JUCE_ZIPFILE_JUCEHEADER__ /********* End of inlined file: juce_ZipFile.h *********/ +#endif +#ifndef __JUCE_PLATFORMUTILITIES_JUCEHEADER__ + +/********* Start of inlined file: juce_PlatformUtilities.h *********/ +#ifndef __JUCE_PLATFORMUTILITIES_JUCEHEADER__ +#define __JUCE_PLATFORMUTILITIES_JUCEHEADER__ + +/** + A collection of miscellaneous platform-specific utilities. + +*/ +class JUCE_API PlatformUtilities +{ +public: + + /** Plays the operating system's default alert 'beep' sound. */ + static void beep(); + + static bool launchEmailWithAttachments (const String& targetEmailAddress, + const String& emailSubject, + const String& bodyText, + const StringArray& filesToAttach); + +#if JUCE_MAC || DOXYGEN + + /** MAC ONLY - Turns a Core CF String into a juce one. */ + static const String cfStringToJuceString (CFStringRef cfString); + + /** MAC ONLY - Turns a juce string into a Core CF one. */ + static CFStringRef juceStringToCFString (const String& s); + + /** MAC ONLY - Turns a file path into an FSRef, returning true if it succeeds. */ + static bool makeFSRefFromPath (FSRef* destFSRef, const String& path); + + /** MAC ONLY - Turns an FSRef into a juce string path. */ + static const String makePathFromFSRef (FSRef* file); + + /** MAC ONLY - Converts any decomposed unicode characters in a string into + their precomposed equivalents. + */ + static const String convertToPrecomposedUnicode (const String& s); + + /** MAC ONLY - Gets the type of a file from the file's resources. */ + static OSType getTypeOfFile (const String& filename); + + /** MAC ONLY - Returns true if this file is actually a bundle. */ + static bool isBundle (const String& filename); + +#endif + +#if JUCE_WIN32 || DOXYGEN + + // Some registry helper functions: + + /** WIN32 ONLY - Returns a string from the registry. + + The path is a string for the entire path of a value in the registry, + e.g. "HKEY_CURRENT_USER\Software\foo\bar" + */ + static const String getRegistryValue (const String& regValuePath, + const String& defaultValue = String::empty); + + /** WIN32 ONLY - Sets a registry value as a string. + + This will take care of creating any groups needed to get to the given + registry value. + */ + static void setRegistryValue (const String& regValuePath, + const String& value); + + /** WIN32 ONLY - Returns true if the given value exists in the registry. */ + static bool registryValueExists (const String& regValuePath); + + /** WIN32 ONLY - Deletes a registry value. */ + static void deleteRegistryValue (const String& regValuePath); + + /** WIN32 ONLY - Deletes a registry key (which is registry-talk for 'folder'). */ + static void deleteRegistryKey (const String& regKeyPath); + + /** WIN32 ONLY - This returns the HINSTANCE of the current module. + + In a normal Juce application this will be set to the module handle + of the application executable. + + If you're writing a DLL using Juce and plan to use any Juce messaging or + windows, you'll need to make sure you use the setCurrentModuleInstanceHandle() + to set the correct module handle in your DllMain() function, because + the win32 system relies on the correct instance handle when opening windows. + */ + static void* JUCE_CALLTYPE getCurrentModuleInstanceHandle() throw(); + + /** WIN32 ONLY - Sets a new module handle to be used by the library. + + @see getCurrentModuleInstanceHandle() + */ + static void JUCE_CALLTYPE setCurrentModuleInstanceHandle (void* newHandle) throw(); + + /** WIN32 ONLY - Gets the command-line params as a string. + + This is needed to avoid unicode problems with the argc type params. + */ + static const String JUCE_CALLTYPE getCurrentCommandLineParams() throw(); +#endif + + /** Clears the floating point unit's flags. + + Only has an effect under win32, currently. + */ + static void fpuReset(); + +#if JUCE_LINUX || JUCE_WIN32 + + /** Loads a dynamically-linked library into the process's address space. + + @param pathOrFilename the platform-dependent name and search path + @returns a handle which can be used by getProcedureEntryPoint(), or + zero if it fails. + @see freeDynamicLibrary, getProcedureEntryPoint + */ + static void* loadDynamicLibrary (const String& pathOrFilename); + + /** Frees a dynamically-linked library. + + @param libraryHandle a handle created by loadDynamicLibrary + @see loadDynamicLibrary, getProcedureEntryPoint + */ + static void freeDynamicLibrary (void* libraryHandle); + + /** Finds a procedure call in a dynamically-linked library. + + @param libraryHandle a library handle returned by loadDynamicLibrary + @param procedureName the name of the procedure call to try to load + @returns a pointer to the function if found, or 0 if it fails + @see loadDynamicLibrary + */ + static void* getProcedureEntryPoint (void* libraryHandle, + const String& procedureName); +#endif + +#if JUCE_LINUX || DOXYGEN + +#endif +}; + +#if JUCE_MAC + +/** A handy C++ wrapper that creates and deletes an NSAutoreleasePool object + using RAII. +*/ +class ScopedAutoReleasePool +{ +public: + ScopedAutoReleasePool(); + ~ScopedAutoReleasePool(); + +private: + void* pool; +}; + +/** + A wrapper class for picking up events from an Apple IR remote control device. + + To use it, just create a subclass of this class, implementing the buttonPressed() + callback, then call start() and stop() to start or stop receiving events. +*/ +class JUCE_API AppleRemoteDevice +{ +public: + + AppleRemoteDevice(); + virtual ~AppleRemoteDevice(); + + /** The set of buttons that may be pressed. + @see buttonPressed + */ + enum ButtonType + { + menuButton = 0, /**< The menu button (if it's held for a short time). */ + playButton, /**< The play button. */ + plusButton, /**< The plus or volume-up button. */ + minusButton, /**< The minus or volume-down button. */ + rightButton, /**< The right button (if it's held for a short time). */ + leftButton, /**< The left button (if it's held for a short time). */ + rightButton_Long, /**< The right button (if it's held for a long time). */ + leftButton_Long, /**< The menu button (if it's held for a long time). */ + menuButton_Long, /**< The menu button (if it's held for a long time). */ + playButtonSleepMode, + switched + }; + + /** Override this method to receive the callback about a button press. + + The callback will happen on the application's message thread. + + Some buttons trigger matching up and down events, in which the isDown parameter + will be true and then false. Others only send a single event when the + button is pressed. + */ + virtual void buttonPressed (const ButtonType buttonId, const bool isDown) = 0; + + /** Starts the device running and responding to events. + + Returns true if it managed to open the device. + + @param inExclusiveMode if true, the remote will be grabbed exclusively for this app, + and will not be available to any other part of the system. If + false, it will be shared with other apps. + @see stop + */ + bool start (const bool inExclusiveMode) throw(); + + /** Stops the device running. + @see start + */ + void stop() throw(); + + /** Returns true if the device has been started successfully. + */ + bool isActive() const throw(); + + /** Returns the ID number of the remote, if it has sent one. + */ + int getRemoteId() const throw() { return remoteId; } + + juce_UseDebuggingNewOperator + + /** @internal */ + void handleCallbackInternal(); + +private: + void* device; + void* queue; + int remoteId; + + bool open (const bool openInExclusiveMode) throw(); +}; + +#endif + +#endif // __JUCE_PLATFORMUTILITIES_JUCEHEADER__ +/********* End of inlined file: juce_PlatformUtilities.h *********/ + +#endif +#ifndef __JUCE_XMLELEMENT_JUCEHEADER__ + #endif #ifndef __JUCE_CHARACTERFUNCTIONS_JUCEHEADER__ +#endif +#ifndef __JUCE_STRINGARRAY_JUCEHEADER__ + #endif #ifndef __JUCE_LOCALISEDSTRINGS_JUCEHEADER__ @@ -13495,15 +13585,6 @@ private: #endif // __JUCE_LOCALISEDSTRINGS_JUCEHEADER__ /********* End of inlined file: juce_LocalisedStrings.h *********/ -#endif -#ifndef __JUCE_STRING_JUCEHEADER__ - -#endif -#ifndef __JUCE_STRINGARRAY_JUCEHEADER__ - -#endif -#ifndef __JUCE_STRINGPAIRARRAY_JUCEHEADER__ - #endif #ifndef __JUCE_XMLDOCUMENT_JUCEHEADER__ @@ -13627,172 +13708,21 @@ private: /********* End of inlined file: juce_XmlDocument.h *********/ #endif -#ifndef __JUCE_XMLELEMENT_JUCEHEADER__ +#ifndef __JUCE_STRINGPAIRARRAY_JUCEHEADER__ #endif -#ifndef __JUCE_CRITICALSECTION_JUCEHEADER__ +#ifndef __JUCE_STRING_JUCEHEADER__ #endif -#ifndef __JUCE_INTERPROCESSLOCK_JUCEHEADER__ +#ifndef __JUCE_THREADPOOL_JUCEHEADER__ -/********* Start of inlined file: juce_InterProcessLock.h *********/ -#ifndef __JUCE_INTERPROCESSLOCK_JUCEHEADER__ -#define __JUCE_INTERPROCESSLOCK_JUCEHEADER__ +/********* Start of inlined file: juce_ThreadPool.h *********/ +#ifndef __JUCE_THREADPOOL_JUCEHEADER__ +#define __JUCE_THREADPOOL_JUCEHEADER__ -/** - Acts as a critical section which processes can use to block each other. - - @see CriticalSection -*/ -class JUCE_API InterProcessLock -{ -public: - - /** Creates a lock object. - - @param name a name that processes will use to identify this lock object - */ - InterProcessLock (const String& name) throw(); - - /** Destructor. - - This will also release the lock if it's currently held by this process. - */ - ~InterProcessLock() throw(); - - /** Attempts to lock the critical section. - - @param timeOutMillisecs how many milliseconds to wait if the lock - is already held by another process - a value of - 0 will return immediately, negative values will wait - forever - @returns true if the lock could be gained within the timeout period, or - false if the timeout expired. - */ - bool enter (int timeOutMillisecs = -1) throw(); - - /** Releases the lock if it's currently held by this process. - */ - void exit() throw(); - - juce_UseDebuggingNewOperator - -private: - - void* internal; - String name; - int reentrancyLevel; - - InterProcessLock (const InterProcessLock&); - const InterProcessLock& operator= (const InterProcessLock&); -}; - -#endif // __JUCE_INTERPROCESSLOCK_JUCEHEADER__ -/********* End of inlined file: juce_InterProcessLock.h *********/ - -#endif -#ifndef __JUCE_PROCESS_JUCEHEADER__ - -/********* Start of inlined file: juce_Process.h *********/ -#ifndef __JUCE_PROCESS_JUCEHEADER__ -#define __JUCE_PROCESS_JUCEHEADER__ - -/** Represents the current executable's process. - - This contains methods for controlling the current application at the - process-level. - - @see Thread, JUCEApplication -*/ -class JUCE_API Process -{ -public: - - enum ProcessPriority - { - LowPriority = 0, - NormalPriority = 1, - HighPriority = 2, - RealtimePriority = 3 - }; - - /** Changes the current process's priority. - - @param priority the process priority, where - 0=low, 1=normal, 2=high, 3=realtime - */ - static void setPriority (const ProcessPriority priority); - - /** Kills the current process immediately. - - This is an emergency process terminator that kills the application - immediately - it's intended only for use only when something goes - horribly wrong. - - @see JUCEApplication::quit - */ - static void terminate(); - - /** Returns true if this application process is the one that the user is - currently using. - */ - static bool isForegroundProcess() throw(); - - /** Raises the current process's privilege level. - - Does nothing if this isn't supported by the current OS, or if process - privilege level is fixed. - */ - static void raisePrivilege(); - - /** Lowers the current process's privilege level. - - Does nothing if this isn't supported by the current OS, or if process - privilege level is fixed. - */ - static void lowerPrivilege(); - - /** Returns true if this process is being hosted by a debugger. - */ - static bool JUCE_CALLTYPE isRunningUnderDebugger() throw(); - - /** Loads a dynamically-linked library into the process's address space. - - @param pathOrFilename the platform-dependent name and search path - @returns a handle which can be used by getProcedureEntryPoint(), or - zero if it fails. - @see freeDynamicLibrary, getProcedureEntryPoint - */ - static void* loadDynamicLibrary (const String& pathOrFilename); - - /** Frees a dynamically-linked library. - - @param libraryHandle a handle created by loadDynamicLibrary - @see loadDynamicLibrary, getProcedureEntryPoint - */ - static void freeDynamicLibrary (void* libraryHandle); - - /** Finds a procedure call in a dynamically-linked library. - - @param libraryHandle a library handle returned by loadDynamicLibrary - @param procedureName the name of the procedure call to try to load - @returns a pointer to the function if found, or 0 if it fails - @see loadDynamicLibrary - */ - static void* getProcedureEntryPoint (void* libraryHandle, - const String& procedureName); - -}; - -#endif // __JUCE_PROCESS_JUCEHEADER__ -/********* End of inlined file: juce_Process.h *********/ - -#endif -#ifndef __JUCE_READWRITELOCK_JUCEHEADER__ - -/********* Start of inlined file: juce_ReadWriteLock.h *********/ -#ifndef __JUCE_READWRITELOCK_JUCEHEADER__ -#define __JUCE_READWRITELOCK_JUCEHEADER__ +/********* Start of inlined file: juce_Thread.h *********/ +#ifndef __JUCE_THREAD_JUCEHEADER__ +#define __JUCE_THREAD_JUCEHEADER__ /********* Start of inlined file: juce_WaitableEvent.h *********/ #ifndef __JUCE_WAITABLEEVENT_JUCEHEADER__ @@ -13862,330 +13792,6 @@ private: #endif // __JUCE_WAITABLEEVENT_JUCEHEADER__ /********* End of inlined file: juce_WaitableEvent.h *********/ -/** - A critical section that allows multiple simultaneous readers. - - Features of this type of lock are: - - - Multiple readers can hold the lock at the same time, but only one writer - can hold it at once. - - Writers trying to gain the lock will be blocked until all readers and writers - have released it - - Readers trying to gain the lock while a writer is waiting to acquire it will be - blocked until the writer has obtained and released it - - If a thread already has a read lock and tries to obtain a write lock, it will succeed if - there are no other readers - - If a thread already has the write lock and tries to obtain a read lock, this will succeed. - - Recursive locking is supported. - - @see ScopedReadLock, ScopedWriteLock, CriticalSection -*/ -class JUCE_API ReadWriteLock -{ -public: - - /** - Creates a ReadWriteLock object. - */ - ReadWriteLock() throw(); - - /** Destructor. - - If the object is deleted whilst locked, any subsequent behaviour - is unpredictable. - */ - ~ReadWriteLock() throw(); - - /** Locks this object for reading. - - Multiple threads can simulaneously lock the object for reading, but if another - thread has it locked for writing, then this will block until it releases the - lock. - - @see exitRead, ScopedReadLock - */ - void enterRead() const throw(); - - /** Releases the read-lock. - - If the caller thread hasn't got the lock, this can have unpredictable results. - - If the enterRead() method has been called multiple times by the thread, each - call must be matched by a call to exitRead() before other threads will be allowed - to take over the lock. - - @see enterRead, ScopedReadLock - */ - void exitRead() const throw(); - - /** Locks this object for writing. - - This will block until any other threads that have it locked for reading or - writing have released their lock. - - @see exitWrite, ScopedWriteLock - */ - void enterWrite() const throw(); - - /** Tries to lock this object for writing. - - This is like enterWrite(), but doesn't block - it returns true if it manages - to obtain the lock. - - @see enterWrite - */ - bool tryEnterWrite() const throw(); - - /** Releases the write-lock. - - If the caller thread hasn't got the lock, this can have unpredictable results. - - If the enterWrite() method has been called multiple times by the thread, each - call must be matched by a call to exit() before other threads will be allowed - to take over the lock. - - @see enterWrite, ScopedWriteLock - */ - void exitWrite() const throw(); - - juce_UseDebuggingNewOperator - -private: - - CriticalSection accessLock; - WaitableEvent waitEvent; - mutable int numWaitingWriters, numWriters; - mutable int writerThreadId; - mutable Array readerThreads; - - ReadWriteLock (const ReadWriteLock&); - const ReadWriteLock& operator= (const ReadWriteLock&); -}; - -#endif // __JUCE_READWRITELOCK_JUCEHEADER__ -/********* End of inlined file: juce_ReadWriteLock.h *********/ - -#endif -#ifndef __JUCE_SCOPEDLOCK_JUCEHEADER__ - -#endif -#ifndef __JUCE_SCOPEDREADLOCK_JUCEHEADER__ - -/********* Start of inlined file: juce_ScopedReadLock.h *********/ -#ifndef __JUCE_SCOPEDREADLOCK_JUCEHEADER__ -#define __JUCE_SCOPEDREADLOCK_JUCEHEADER__ - -/** - Automatically locks and unlocks a ReadWriteLock object. - - Use one of these as a local variable to control access to a ReadWriteLock. - - e.g. @code - - ReadWriteLock myLock; - - for (;;) - { - const ScopedReadLock myScopedLock (myLock); - // myLock is now locked - - ...do some stuff... - - // myLock gets unlocked here. - } - @endcode - - @see ReadWriteLock, ScopedWriteLock -*/ -class JUCE_API ScopedReadLock -{ -public: - - /** Creates a ScopedReadLock. - - As soon as it is created, this will call ReadWriteLock::enterRead(), and - when the ScopedReadLock object is deleted, the ReadWriteLock will - be unlocked. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline ScopedReadLock (const ReadWriteLock& lock) throw() : lock_ (lock) { lock.enterRead(); } - - /** Destructor. - - The ReadWriteLock's exitRead() method will be called when the destructor is called. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! - */ - inline ~ScopedReadLock() throw() { lock_.exitRead(); } - -private: - - const ReadWriteLock& lock_; - - ScopedReadLock (const ScopedReadLock&); - const ScopedReadLock& operator= (const ScopedReadLock&); -}; - -#endif // __JUCE_SCOPEDREADLOCK_JUCEHEADER__ -/********* End of inlined file: juce_ScopedReadLock.h *********/ - -#endif -#ifndef __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ - -/********* Start of inlined file: juce_ScopedTryLock.h *********/ -#ifndef __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ -#define __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ - -/** - Automatically tries to lock and unlock a CriticalSection object. - - Use one of these as a local variable to control access to a CriticalSection. - - e.g. @code - - CriticalSection myCriticalSection; - - for (;;) - { - const ScopedTryLock myScopedTryLock (myCriticalSection); - - // Unlike using a ScopedLock, this may fail to actually get the lock, so you - // should test this with the isLocked() method before doing your thread-unsafe - // action.. - if (myScopedTryLock.isLocked()) - { - ...do some stuff... - } - else - { - ..our attempt at locking failed because another thread had already locked it.. - } - - // myCriticalSection gets unlocked here (if it was locked) - } - @endcode - - @see CriticalSection::tryEnter, ScopedLock, ScopedUnlock, ScopedReadLock -*/ -class JUCE_API ScopedTryLock -{ -public: - - /** Creates a ScopedTryLock. - - As soon as it is created, this will try to lock the CriticalSection, and - when the ScopedTryLock object is deleted, the CriticalSection will - be unlocked if the lock was successful. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline ScopedTryLock (const CriticalSection& lock) throw() : lock_ (lock), lockWasSuccessful (lock.tryEnter()) {} - - /** Destructor. - - The CriticalSection will be unlocked (if locked) when the destructor is called. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! - */ - inline ~ScopedTryLock() throw() { if (lockWasSuccessful) lock_.exit(); } - - /** Lock state - - @return True if the CriticalSection is locked. - */ - bool isLocked() const throw() { return lockWasSuccessful; } - -private: - - const CriticalSection& lock_; - const bool lockWasSuccessful; - - ScopedTryLock (const ScopedTryLock&); - const ScopedTryLock& operator= (const ScopedTryLock&); -}; - -#endif // __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ -/********* End of inlined file: juce_ScopedTryLock.h *********/ - -#endif -#ifndef __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ - -/********* Start of inlined file: juce_ScopedWriteLock.h *********/ -#ifndef __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ -#define __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ - -/** - Automatically locks and unlocks a ReadWriteLock object. - - Use one of these as a local variable to control access to a ReadWriteLock. - - e.g. @code - - ReadWriteLock myLock; - - for (;;) - { - const ScopedWriteLock myScopedLock (myLock); - // myLock is now locked - - ...do some stuff... - - // myLock gets unlocked here. - } - @endcode - - @see ReadWriteLock, ScopedReadLock -*/ -class JUCE_API ScopedWriteLock -{ -public: - - /** Creates a ScopedWriteLock. - - As soon as it is created, this will call ReadWriteLock::enterWrite(), and - when the ScopedWriteLock object is deleted, the ReadWriteLock will - be unlocked. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! Best just to use it - as a local stack object, rather than creating one with the new() operator. - */ - inline ScopedWriteLock (const ReadWriteLock& lock) throw() : lock_ (lock) { lock.enterWrite(); } - - /** Destructor. - - The ReadWriteLock's exitWrite() method will be called when the destructor is called. - - Make sure this object is created and deleted by the same thread, - otherwise there are no guarantees what will happen! - */ - inline ~ScopedWriteLock() throw() { lock_.exitWrite(); } - -private: - - const ReadWriteLock& lock_; - - ScopedWriteLock (const ScopedWriteLock&); - const ScopedWriteLock& operator= (const ScopedWriteLock&); -}; - -#endif // __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ -/********* End of inlined file: juce_ScopedWriteLock.h *********/ - -#endif -#ifndef __JUCE_THREAD_JUCEHEADER__ - -/********* Start of inlined file: juce_Thread.h *********/ -#ifndef __JUCE_THREAD_JUCEHEADER__ -#define __JUCE_THREAD_JUCEHEADER__ - /** Encapsulates a thread. @@ -14364,7 +13970,7 @@ public: @returns a unique identifier that identifies the calling thread. @see getThreadId */ - static int getCurrentThreadId() throw(); + static int64 getCurrentThreadId() throw(); /** Finds the thread object that is currently running. @@ -14382,7 +13988,7 @@ public: @see getCurrentThreadId */ - int getThreadId() const throw(); + int64 getThreadId() const throw(); /** Returns the name of the thread. @@ -14411,7 +14017,8 @@ private: CriticalSection startStopLock; WaitableEvent startSuspensionEvent_, defaultEvent_; - int threadPriority_, threadId_; + int threadPriority_; + int64 threadId_; uint32 affinityMask_; bool volatile threadShouldExit_; @@ -14425,13 +14032,6 @@ private: #endif // __JUCE_THREAD_JUCEHEADER__ /********* End of inlined file: juce_Thread.h *********/ -#endif -#ifndef __JUCE_THREADPOOL_JUCEHEADER__ - -/********* Start of inlined file: juce_ThreadPool.h *********/ -#ifndef __JUCE_THREADPOOL_JUCEHEADER__ -#define __JUCE_THREADPOOL_JUCEHEADER__ - class ThreadPool; class ThreadPoolThread; @@ -14782,9 +14382,467 @@ private: #endif // __JUCE_TIMESLICETHREAD_JUCEHEADER__ /********* End of inlined file: juce_TimeSliceThread.h *********/ +#endif +#ifndef __JUCE_CRITICALSECTION_JUCEHEADER__ + +#endif +#ifndef __JUCE_SCOPEDREADLOCK_JUCEHEADER__ + +/********* Start of inlined file: juce_ScopedReadLock.h *********/ +#ifndef __JUCE_SCOPEDREADLOCK_JUCEHEADER__ +#define __JUCE_SCOPEDREADLOCK_JUCEHEADER__ + +/********* Start of inlined file: juce_ReadWriteLock.h *********/ +#ifndef __JUCE_READWRITELOCK_JUCEHEADER__ +#define __JUCE_READWRITELOCK_JUCEHEADER__ + +/** + A critical section that allows multiple simultaneous readers. + + Features of this type of lock are: + + - Multiple readers can hold the lock at the same time, but only one writer + can hold it at once. + - Writers trying to gain the lock will be blocked until all readers and writers + have released it + - Readers trying to gain the lock while a writer is waiting to acquire it will be + blocked until the writer has obtained and released it + - If a thread already has a read lock and tries to obtain a write lock, it will succeed if + there are no other readers + - If a thread already has the write lock and tries to obtain a read lock, this will succeed. + - Recursive locking is supported. + + @see ScopedReadLock, ScopedWriteLock, CriticalSection +*/ +class JUCE_API ReadWriteLock +{ +public: + + /** + Creates a ReadWriteLock object. + */ + ReadWriteLock() throw(); + + /** Destructor. + + If the object is deleted whilst locked, any subsequent behaviour + is unpredictable. + */ + ~ReadWriteLock() throw(); + + /** Locks this object for reading. + + Multiple threads can simulaneously lock the object for reading, but if another + thread has it locked for writing, then this will block until it releases the + lock. + + @see exitRead, ScopedReadLock + */ + void enterRead() const throw(); + + /** Releases the read-lock. + + If the caller thread hasn't got the lock, this can have unpredictable results. + + If the enterRead() method has been called multiple times by the thread, each + call must be matched by a call to exitRead() before other threads will be allowed + to take over the lock. + + @see enterRead, ScopedReadLock + */ + void exitRead() const throw(); + + /** Locks this object for writing. + + This will block until any other threads that have it locked for reading or + writing have released their lock. + + @see exitWrite, ScopedWriteLock + */ + void enterWrite() const throw(); + + /** Tries to lock this object for writing. + + This is like enterWrite(), but doesn't block - it returns true if it manages + to obtain the lock. + + @see enterWrite + */ + bool tryEnterWrite() const throw(); + + /** Releases the write-lock. + + If the caller thread hasn't got the lock, this can have unpredictable results. + + If the enterWrite() method has been called multiple times by the thread, each + call must be matched by a call to exit() before other threads will be allowed + to take over the lock. + + @see enterWrite, ScopedWriteLock + */ + void exitWrite() const throw(); + + juce_UseDebuggingNewOperator + +private: + + CriticalSection accessLock; + WaitableEvent waitEvent; + mutable int numWaitingWriters, numWriters; + mutable int64 writerThreadId; + mutable Array readerThreads; + + ReadWriteLock (const ReadWriteLock&); + const ReadWriteLock& operator= (const ReadWriteLock&); +}; + +#endif // __JUCE_READWRITELOCK_JUCEHEADER__ +/********* End of inlined file: juce_ReadWriteLock.h *********/ + +/** + Automatically locks and unlocks a ReadWriteLock object. + + Use one of these as a local variable to control access to a ReadWriteLock. + + e.g. @code + + ReadWriteLock myLock; + + for (;;) + { + const ScopedReadLock myScopedLock (myLock); + // myLock is now locked + + ...do some stuff... + + // myLock gets unlocked here. + } + @endcode + + @see ReadWriteLock, ScopedWriteLock +*/ +class JUCE_API ScopedReadLock +{ +public: + + /** Creates a ScopedReadLock. + + As soon as it is created, this will call ReadWriteLock::enterRead(), and + when the ScopedReadLock object is deleted, the ReadWriteLock will + be unlocked. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! Best just to use it + as a local stack object, rather than creating one with the new() operator. + */ + inline ScopedReadLock (const ReadWriteLock& lock) throw() : lock_ (lock) { lock.enterRead(); } + + /** Destructor. + + The ReadWriteLock's exitRead() method will be called when the destructor is called. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! + */ + inline ~ScopedReadLock() throw() { lock_.exitRead(); } + +private: + + const ReadWriteLock& lock_; + + ScopedReadLock (const ScopedReadLock&); + const ScopedReadLock& operator= (const ScopedReadLock&); +}; + +#endif // __JUCE_SCOPEDREADLOCK_JUCEHEADER__ +/********* End of inlined file: juce_ScopedReadLock.h *********/ + +#endif +#ifndef __JUCE_PROCESS_JUCEHEADER__ + +/********* Start of inlined file: juce_Process.h *********/ +#ifndef __JUCE_PROCESS_JUCEHEADER__ +#define __JUCE_PROCESS_JUCEHEADER__ + +/** Represents the current executable's process. + + This contains methods for controlling the current application at the + process-level. + + @see Thread, JUCEApplication +*/ +class JUCE_API Process +{ +public: + + enum ProcessPriority + { + LowPriority = 0, + NormalPriority = 1, + HighPriority = 2, + RealtimePriority = 3 + }; + + /** Changes the current process's priority. + + @param priority the process priority, where + 0=low, 1=normal, 2=high, 3=realtime + */ + static void setPriority (const ProcessPriority priority); + + /** Kills the current process immediately. + + This is an emergency process terminator that kills the application + immediately - it's intended only for use only when something goes + horribly wrong. + + @see JUCEApplication::quit + */ + static void terminate(); + + /** Returns true if this application process is the one that the user is + currently using. + */ + static bool isForegroundProcess() throw(); + + /** Raises the current process's privilege level. + + Does nothing if this isn't supported by the current OS, or if process + privilege level is fixed. + */ + static void raisePrivilege(); + + /** Lowers the current process's privilege level. + + Does nothing if this isn't supported by the current OS, or if process + privilege level is fixed. + */ + static void lowerPrivilege(); + + /** Returns true if this process is being hosted by a debugger. + */ + static bool JUCE_CALLTYPE isRunningUnderDebugger() throw(); +}; + +#endif // __JUCE_PROCESS_JUCEHEADER__ +/********* End of inlined file: juce_Process.h *********/ + +#endif +#ifndef __JUCE_THREAD_JUCEHEADER__ + +#endif +#ifndef __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ + +/********* Start of inlined file: juce_ScopedTryLock.h *********/ +#ifndef __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ +#define __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ + +/** + Automatically tries to lock and unlock a CriticalSection object. + + Use one of these as a local variable to control access to a CriticalSection. + + e.g. @code + + CriticalSection myCriticalSection; + + for (;;) + { + const ScopedTryLock myScopedTryLock (myCriticalSection); + + // Unlike using a ScopedLock, this may fail to actually get the lock, so you + // should test this with the isLocked() method before doing your thread-unsafe + // action.. + if (myScopedTryLock.isLocked()) + { + ...do some stuff... + } + else + { + ..our attempt at locking failed because another thread had already locked it.. + } + + // myCriticalSection gets unlocked here (if it was locked) + } + @endcode + + @see CriticalSection::tryEnter, ScopedLock, ScopedUnlock, ScopedReadLock +*/ +class JUCE_API ScopedTryLock +{ +public: + + /** Creates a ScopedTryLock. + + As soon as it is created, this will try to lock the CriticalSection, and + when the ScopedTryLock object is deleted, the CriticalSection will + be unlocked if the lock was successful. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! Best just to use it + as a local stack object, rather than creating one with the new() operator. + */ + inline ScopedTryLock (const CriticalSection& lock) throw() : lock_ (lock), lockWasSuccessful (lock.tryEnter()) {} + + /** Destructor. + + The CriticalSection will be unlocked (if locked) when the destructor is called. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! + */ + inline ~ScopedTryLock() throw() { if (lockWasSuccessful) lock_.exit(); } + + /** Lock state + + @return True if the CriticalSection is locked. + */ + bool isLocked() const throw() { return lockWasSuccessful; } + +private: + + const CriticalSection& lock_; + const bool lockWasSuccessful; + + ScopedTryLock (const ScopedTryLock&); + const ScopedTryLock& operator= (const ScopedTryLock&); +}; + +#endif // __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ +/********* End of inlined file: juce_ScopedTryLock.h *********/ + +#endif +#ifndef __JUCE_SCOPEDLOCK_JUCEHEADER__ + +#endif +#ifndef __JUCE_INTERPROCESSLOCK_JUCEHEADER__ + +/********* Start of inlined file: juce_InterProcessLock.h *********/ +#ifndef __JUCE_INTERPROCESSLOCK_JUCEHEADER__ +#define __JUCE_INTERPROCESSLOCK_JUCEHEADER__ + +/** + Acts as a critical section which processes can use to block each other. + + @see CriticalSection +*/ +class JUCE_API InterProcessLock +{ +public: + + /** Creates a lock object. + + @param name a name that processes will use to identify this lock object + */ + InterProcessLock (const String& name) throw(); + + /** Destructor. + + This will also release the lock if it's currently held by this process. + */ + ~InterProcessLock() throw(); + + /** Attempts to lock the critical section. + + @param timeOutMillisecs how many milliseconds to wait if the lock + is already held by another process - a value of + 0 will return immediately, negative values will wait + forever + @returns true if the lock could be gained within the timeout period, or + false if the timeout expired. + */ + bool enter (int timeOutMillisecs = -1) throw(); + + /** Releases the lock if it's currently held by this process. + */ + void exit() throw(); + + juce_UseDebuggingNewOperator + +private: + + void* internal; + String name; + int reentrancyLevel; + + InterProcessLock (const InterProcessLock&); + const InterProcessLock& operator= (const InterProcessLock&); +}; + +#endif // __JUCE_INTERPROCESSLOCK_JUCEHEADER__ +/********* End of inlined file: juce_InterProcessLock.h *********/ + #endif #ifndef __JUCE_WAITABLEEVENT_JUCEHEADER__ +#endif +#ifndef __JUCE_READWRITELOCK_JUCEHEADER__ + +#endif +#ifndef __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ + +/********* Start of inlined file: juce_ScopedWriteLock.h *********/ +#ifndef __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ +#define __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ + +/** + Automatically locks and unlocks a ReadWriteLock object. + + Use one of these as a local variable to control access to a ReadWriteLock. + + e.g. @code + + ReadWriteLock myLock; + + for (;;) + { + const ScopedWriteLock myScopedLock (myLock); + // myLock is now locked + + ...do some stuff... + + // myLock gets unlocked here. + } + @endcode + + @see ReadWriteLock, ScopedReadLock +*/ +class JUCE_API ScopedWriteLock +{ +public: + + /** Creates a ScopedWriteLock. + + As soon as it is created, this will call ReadWriteLock::enterWrite(), and + when the ScopedWriteLock object is deleted, the ReadWriteLock will + be unlocked. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! Best just to use it + as a local stack object, rather than creating one with the new() operator. + */ + inline ScopedWriteLock (const ReadWriteLock& lock) throw() : lock_ (lock) { lock.enterWrite(); } + + /** Destructor. + + The ReadWriteLock's exitWrite() method will be called when the destructor is called. + + Make sure this object is created and deleted by the same thread, + otherwise there are no guarantees what will happen! + */ + inline ~ScopedWriteLock() throw() { lock_.exitWrite(); } + +private: + + const ReadWriteLock& lock_; + + ScopedWriteLock (const ScopedWriteLock&); + const ScopedWriteLock& operator= (const ScopedWriteLock&); +}; + +#endif // __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ +/********* End of inlined file: juce_ScopedWriteLock.h *********/ + #endif #endif @@ -14795,8 +14853,8 @@ private: #if ! JUCE_ONLY_BUILD_CORE_LIBRARY /********* Start of inlined file: juce_app_includes.h *********/ -#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__ @@ -20045,6 +20103,7 @@ class Graphics; #define __JUCE_MESSAGE_JUCEHEADER__ class MessageListener; +class MessageManager; /** The base class for objects that can be delivered to a MessageListener. @@ -20186,8 +20245,7 @@ public: windowHasTitleBar = (1 << 3), /**< Indicates that the window should have a normal OS-specific title bar and frame\. if not specified, the window will be borderless. */ - windowIsResizable = (1 << 4), /**< Indicates that the window should let mouse clicks pass - through it (may not be possible on some platforms). */ + windowIsResizable = (1 << 4), /**< Indicates that the window should have a resizable border. */ windowHasMinimiseButton = (1 << 5), /**< Indicates that if the window has a title bar, it should have a minimise button on it. */ windowHasMaximiseButton = (1 << 6), /**< Indicates that if the window has a title bar, it should have a @@ -20199,6 +20257,9 @@ public: windowRepaintedExplictly = (1 << 9), /**< Not intended for public use - this tells a window not to do its own repainting, but only to repaint when the performAnyPendingRepaintsNow() method is called. */ + windowIgnoresKeyPresses = (1 << 10), /**< Tells the window not to catch any keypresses. This can + be used for things like plugin windows, to stop them interfering + with the host's shortcut keys */ windowIsSemiTransparent = (1 << 31) /**< Not intended for public use - makes a window transparent. */ }; @@ -23191,12 +23252,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. @@ -23241,7 +23299,7 @@ private: int appReturnValue; bool stillInitialising; - static int shutdownAppAndClearUp (const bool useMaximumForce); + static int shutdownAppAndClearUp(); }; #endif // __JUCE_APPLICATION_JUCEHEADER__ @@ -26478,7 +26536,6 @@ public: class AudioFormatReader; class AudioFormatWriter; -const int maxNumAudioSampleBufferChannels = 32; /** A multi-channel buffer of 32-bit floating point audio samples. @@ -26807,7 +26864,7 @@ public: private: int numChannels, size, allocatedBytes; - float* channels [maxNumAudioSampleBufferChannels + 1]; + float** channels; float* allocatedData; }; @@ -26858,6 +26915,13 @@ public: void processSamples (float* const samples, const int numSamples) throw(); + /** Processes a single sample, without any locking or checking. + + Use this if you need fast processing of a single value, but be aware that + this isn't thread-safe in the way that processSamples() is. + */ + float processSingleSampleRaw (const float sample) throw(); + /** Sets the filter up to act as a low-pass filter. */ void makeLowPass (const double sampleRate, @@ -29535,6 +29599,7 @@ private: void timerCallback(); void showFor (Component* const c); + void hide(); TooltipWindow (const TooltipWindow&); const TooltipWindow& operator= (const TooltipWindow&); @@ -33077,6 +33142,14 @@ public: */ void setBorderSize (int horizontalBorder, int verticalBorder); + /** Returns the size of the horizontal gap being left around the text. + */ + int getHorizontalBorderSize() const throw() { return horizontalBorderSize; } + + /** Returns the size of the vertical gap being left around the text. + */ + int getVerticalBorderSize() const throw() { return verticalBorderSize; } + /** Makes this label "stick to" another component. This will cause the label to follow another component around, staying @@ -33103,6 +33176,15 @@ public: */ bool isAttachedOnLeft() const throw() { return leftOfOwnerComp; } + /** Specifies the minimum amount that the font can be squashed horizantally before it starts + using ellipsis. + + @see Graphics::drawFittedText + */ + void setMinimumHorizontalScale (const float newScale); + + float getMinimumHorizontalScale() const throw() { return minimumHorizontalScale; } + /** Registers a listener that will be called when the label's text changes. */ void addListener (LabelListener* const listener) throw(); @@ -33221,6 +33303,7 @@ private: Component* ownerComponent; ComponentDeletionWatcher* deletionWatcher; int horizontalBorderSize, verticalBorderSize; + float minimumHorizontalScale; bool editSingleClick : 1; bool editDoubleClick : 1; bool lossOfFocusDiscardsChanges : 1; @@ -37127,7 +37210,8 @@ private: #define __JUCE_MESSAGEMANAGER_JUCEHEADER__ class Thread; -class InternalTimerThread; +class Component; +class MessageManagerLock; /** See MessageManager::callFunctionOnMessageThread() for use of this function type */ @@ -37137,36 +37221,28 @@ typedef void* (MessageCallbackFunction) (void* userData); @see Message, MessageListener, MessageManagerLock, JUCEApplication */ -class JUCE_API MessageManager : private DeletedAtShutdown, - private Timer +class JUCE_API MessageManager : private DeletedAtShutdown { public: /** Returns the global instance of the MessageManager. */ static MessageManager* getInstance() throw(); - /** Synchronously dispatches up to a certain number of messages from the queue. + void runDispatchLoop(); + void stopDispatchLoop(); + bool hasStopMessageBeenSent() const throw() { return quitMessagePosted; } - This will return when the queue becomes empty, or when the given number of - messages has been sent. + /** Synchronously dispatches messages until a given time has elapsed. + + Returns false if a quit message has been posted, otherwise returns true. */ - void dispatchPendingMessages (int maxNumberOfMessagesToDispatch = 1000); + bool runDispatchLoopUntil (int millisecondsToRunFor); - /** Synchronously sends the next pending message. - - This must only be called by the message-thread. - - @param returnImmediatelyIfNoMessages if false, it will block indefinitely until a message - needs dispatching. If true, then if no messages are - pending, it will return immediately. - @param wasAMessageDispatched if this is non-zero, it will be set to true or false - depending on whether a message was actually sent or - not. - @returns false if the thing that's calling it should stop calling - i.e. if the - app is trying to quit. - */ - bool dispatchNextMessage (const bool returnImmediatelyIfNoMessages = false, - bool* const wasAMessageDispatched = 0); + /*int runModalLoop (Component* componentToBeModal); + bool makeComponentModal (Component* componentToBeModal); + bool isComponentModal (const Component* component) const; + Component* getCurrentModalComponent() const; + void exitModalLoop (int returnValue);*/ /** Calls a function using the message-thread. @@ -37204,7 +37280,7 @@ public: (Best to ignore this method unless you really know what you're doing..) @see setCurrentMessageThread */ - int getCurrentMessageThread() const throw() { return messageThreadId; } + int64 getCurrentMessageThread() const throw() { return messageThreadId; } /** Returns true if the caller thread has currenltly got the message manager locked. @@ -37235,37 +37311,10 @@ public: /** Deregisters a broadcast listener. */ void deregisterBroadcastListener (ActionListener* listener) throw(); - /** Sets a time-limit for the app to be 'busy' before an hourglass cursor will be shown. - - @param millisecs how long before the cursor is shown (the default time is 500ms). If the - value is 0 or less, the wait cursor will never be shown (although on the - Mac the system might still decide to show it after a while). - @see MouseCursor::showWaitCursor - */ - void setTimeBeforeShowingWaitCursor (const int millisecs) throw(); - - /** Returns the time-out before the 'busy' cursor is shown when the app is busy. - - @see setTimeBeforeShowingWaitCursor, MouseCursor::showWaitCursor - */ - int getTimeBeforeShowingWaitCursor() const throw(); - - /** Tells the message manager that the system isn't locked-up, even if the message - loop isn't active. - - Used internally, this is handy when an OS enters its own modal loop. - */ - static void delayWaitCursor() throw(); - - /** Returns true if JUCEApplication::quit() has been called. */ - bool hasQuitMessageBeenPosted() const throw(); - /** @internal */ void deliverMessage (void*); /** @internal */ void deliverBroadcastMessage (const String&); - /** @internal */ - void timerCallback(); juce_UseDebuggingNewOperator @@ -37282,28 +37331,20 @@ private: ActionListenerList* broadcastListeners; friend class JUCEApplication; - bool quitMessagePosted, quitMessageReceived, useMaximumForceWhenQuitting; + bool quitMessagePosted, quitMessageReceived; + int64 messageThreadId; - int messageThreadId; - int volatile messageCounter, lastMessageCounter, isInMessageDispatcher; - bool volatile needToGetRidOfWaitCursor; - int volatile timeBeforeWaitCursor; - unsigned int lastActivityCheckOkTime; + VoidArray modalComponents; + static void* exitModalLoopCallback (void*); - bool runDispatchLoop(); void postMessageToQueue (Message* const message); - void postQuitMessage (const bool useMaximumForce); static void doPlatformSpecificInitialisation(); static void doPlatformSpecificShutdown(); - friend class InternalTimerThread; - static void inactivityCheckCallback() throw(); - void inactivityCheckCallbackInt() throw(); - friend class MessageManagerLock; CriticalSection messageDispatchLock; - int currentLockingThreadId; + int64 currentLockingThreadId; MessageManager (const MessageManager&); const MessageManager& operator= (const MessageManager&); @@ -37406,7 +37447,7 @@ public: bool lockWasGained() const throw() { return locked; } private: - int lastLockingThreadId; + int64 lastLockingThreadId; bool locked; }; @@ -51740,6 +51781,13 @@ public: /** @internal */ void paint (Graphics& g); + /** Returns the native handle of an embedded heavyweight window, if there is one. + + E.g. On windows, this will return the HWND of the sub-window containing + the opengl context, on the mac it'll be the NSOpenGLView. + */ + void* getNativeWindowHandle() const; + juce_UseDebuggingNewOperator private: @@ -51895,20 +51943,82 @@ private: #if JUCE_WIN32 - typedef ActiveXControlComponent QTWinBaseClass; + typedef ActiveXControlComponent QTCompBaseClass; #else - typedef Component QTWinBaseClass; +/********* Start of inlined file: juce_NSViewComponent.h *********/ +#ifndef __JUCE_NSVIEWCOMPONENT_JUCEHEADER__ +#define __JUCE_NSVIEWCOMPONENT_JUCEHEADER__ + +#if ! DOXYGEN + class NSViewComponentInternal; +#endif + +#if JUCE_MAC || DOXYGEN + +/** + A Mac-specific class that can create and embed an NSView inside itself. + + To use it, create one of these, put it in place and make sure it's visible in a + window, then use setView() to assign an NSView to it. The view will then be + moved and resized to follow the movements of this component. + + Of course, since the view is a native object, it'll obliterate any + juce components that may overlap this component, but that's life. +*/ +class JUCE_API NSViewComponent : public Component +{ +public: + + /** Create an initially-empty container. */ + NSViewComponent(); + + /** Destructor. */ + ~NSViewComponent(); + + /** Assigns an NSView to this peer. + + The view will be retained and released by this component for as long as + it is needed. To remove the current view, just call setView (0). + + Note: a void* is used here to avoid including the cocoa headers as + part of the juce.h, but the method expects an NSView*. + */ + void setView (void* nsView); + + /** Returns the current NSView. + + Note: a void* is returned here to avoid including the cocoa headers as + a requirement of juce.h, so you should just cast the object to an NSView*. + */ + void* getView() const; + + /** @internal */ + void paint (Graphics& g); + + juce_UseDebuggingNewOperator + +private: + friend class NSViewComponentInternal; + NSViewComponentInternal* info; + + NSViewComponent (const NSViewComponent&); + const NSViewComponent& operator= (const NSViewComponent&); +}; + +#endif + +#endif // __JUCE_NSVIEWCOMPONENT_JUCEHEADER__ +/********* End of inlined file: juce_NSViewComponent.h *********/ + + typedef NSViewComponent QTCompBaseClass; #endif /** A window that can play back a QuickTime movie. */ -class JUCE_API QuickTimeMovieComponent : public QTWinBaseClass - #if JUCE_MAC - , private Timer - #endif +class JUCE_API QuickTimeMovieComponent : public QTCompBaseClass { public: @@ -52033,40 +52143,25 @@ public: /** @internal */ void paint (Graphics& g); - /** @internal */ - void parentHierarchyChanged(); - /** @internal */ - void visibilityChanged(); -#if JUCE_MAC - /** @internal */ - void handleMCEvent (void*); - /** @internal */ - void assignMovieToWindow(); - /** @internal */ - void timerCallback(); - /** @internal */ - void moved(); - /** @internal */ - void resized(); -#endif juce_UseDebuggingNewOperator private: File movieFile; - bool movieLoaded, controllerVisible; + bool movieLoaded, controllerVisible, looping; - void* internal; - -#if JUCE_MAC - void* associatedWindow; - Rectangle lastPositionApplied; - bool controllerAssignedToWindow, reentrant, looping; - void checkWindowAssociation(); -#endif +#if JUCE_WIN32 + /** @internal */ + void parentHierarchyChanged(); + /** @internal */ + void visibilityChanged(); void createControlIfNeeded(); bool isControlCreated() const; + void* internal; +#else + void* movie; +#endif QuickTimeMovieComponent (const QuickTimeMovieComponent&); const QuickTimeMovieComponent& operator= (const QuickTimeMovieComponent&); @@ -52141,6 +52236,8 @@ private: #ifndef __JUCE_WEBBROWSERCOMPONENT_JUCEHEADER__ #define __JUCE_WEBBROWSERCOMPONENT_JUCEHEADER__ +#if JUCE_WEB_BROWSER + class WebBrowserComponentInternal; /** @@ -52200,8 +52297,6 @@ public: /** @internal */ void paint (Graphics& g); /** @internal */ - void moved(); - /** @internal */ void resized(); /** @internal */ void parentHierarchyChanged(); @@ -52218,13 +52313,6 @@ private: StringArray lastHeaders; MemoryBlock lastPostData; -#if JUCE_MAC - void* associatedWindow; - void updateBrowserPosition(); - void createBrowser(); - void deleteBrowser(); -#endif - void reloadLastURL(); void checkWindowAssociation(); @@ -52232,6 +52320,7 @@ private: const WebBrowserComponent& operator= (const WebBrowserComponent&); }; +#endif #endif // __JUCE_WEBBROWSERCOMPONENT_JUCEHEADER__ /********* End of inlined file: juce_WebBrowserComponent.h *********/ @@ -52540,6 +52629,8 @@ public: virtual void positionComboBoxText (ComboBox& box, Label& labelToPosition); + virtual void drawLabel (Graphics& g, Label& label); + virtual void drawLinearSlider (Graphics& g, int x, int y, int width, int height, @@ -53323,7 +53414,7 @@ private: #endif -#endif +#endif // __JUCE_APP_INCLUDES_JUCEHEADER__ /********* End of inlined file: juce_app_includes.h *********/ #endif diff --git a/src/juce_amalgamated_template.cpp b/src/juce_amalgamated_template.cpp index d43074488b..eecfea8f6f 100644 --- a/src/juce_amalgamated_template.cpp +++ b/src/juce_amalgamated_template.cpp @@ -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 - #include - #include - - #if JUCE_QUICKTIME - #include - #include - #include - #include - #include - #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 - #include - #define __Point__ - #include - #include - #include - #include - #include - #include - #include - #include - - #include - #include - #include - #include + #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 diff --git a/src/juce_app_includes.h b/src/juce_app_includes.h index 00f3cc6e96..b955478566 100644 --- a/src/juce_app_includes.h +++ b/src/juce_app_includes.h @@ -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__ diff --git a/src/juce_appframework/application/juce_Application.cpp b/src/juce_appframework/application/juce_Application.cpp index 4c19436bcb..ecdaaa28c9 100644 --- a/src/juce_appframework/application/juce_Application.cpp +++ b/src/juce_appframework/application/juce_Application.cpp @@ -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(); diff --git a/src/juce_appframework/application/juce_Application.h b/src/juce_appframework/application/juce_Application.h index 3874467169..3e55a890df 100644 --- a/src/juce_appframework/application/juce_Application.h +++ b/src/juce_appframework/application/juce_Application.h @@ -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(); }; diff --git a/src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp b/src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp index 9e9af852d0..a8f39f7779 100644 --- a/src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp +++ b/src/juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.cpp @@ -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 diff --git a/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp b/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp index 41bf1fc3ee..b889796480 100644 --- a/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp +++ b/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp @@ -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; diff --git a/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.h b/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.h index 3ac000ac1f..dafd71229f 100644 --- a/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.h +++ b/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.h @@ -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; }; diff --git a/src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.mm b/src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.mm new file mode 100644 index 0000000000..b41685c7ca --- /dev/null +++ b/src/juce_appframework/audio/plugins/formats/juce_AudioUnitPluginFormat.mm @@ -0,0 +1,1332 @@ +/* + ============================================================================== + + 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_Config.h" + +#if JUCE_PLUGINHOST_AU && (! (defined (LINUX) || defined (_WIN32))) + +#include +#include + +#if JUCE_MAC && JUCE_32BIT + #define JUCE_SUPPORT_CARBON 1 +#endif + +#if JUCE_SUPPORT_CARBON +#include +#include +#endif + +#include "../../../../juce_core/basics/juce_StandardHeader.h" + +BEGIN_JUCE_NAMESPACE + +#include "juce_AudioUnitPluginFormat.h" +#include "../juce_PluginDescription.h" +#include "../../../../juce_core/threads/juce_ScopedLock.h" +#include "../../../../juce_appframework/events/juce_Timer.h" +#include "../../../../juce_core/misc/juce_PlatformUtilities.h" +#include "../../../../juce_appframework/gui/components/layout/juce_ComponentMovementWatcher.h" +#include "../../../../juce_appframework/gui/components/special/juce_NSViewComponent.h" + +#if JUCE_MAC + +#if MACOS_10_3_OR_EARLIER + #define kAudioUnitType_Generator 'augn' +#endif + +// Change this to disable logging of various activities +#ifndef AU_LOGGING + #define AU_LOGGING 1 +#endif + +#if AU_LOGGING + #define log(a) Logger::writeToLog(a); +#else + #define log(a) +#endif + +#if JUCE_SUPPORT_CARBON +#include "../../../../../build/macosx/platform_specific_code/juce_mac_CarbonViewWrapperComponent.h" +#endif + + +static int insideCallback = 0; + +//============================================================================== +class AudioUnitPluginWindowCarbon; +class AudioUnitPluginWindowCocoa; + +//============================================================================== +class AudioUnitPluginInstance : public AudioPluginInstance +{ +public: + //============================================================================== + ~AudioUnitPluginInstance(); + + //============================================================================== + // AudioPluginInstance methods: + + void fillInPluginDescription (PluginDescription& desc) const + { + desc.name = pluginName; + desc.file = file; + desc.uid = ((int) componentDesc.componentType) + ^ ((int) componentDesc.componentSubType) + ^ ((int) componentDesc.componentManufacturer); + desc.lastFileModTime = file.getLastModificationTime(); + desc.pluginFormatName = "AudioUnit"; + desc.category = getCategory(); + desc.manufacturerName = manufacturer; + desc.version = version; + desc.numInputChannels = getNumInputChannels(); + desc.numOutputChannels = getNumOutputChannels(); + desc.isInstrument = (componentDesc.componentType == kAudioUnitType_MusicDevice); + } + + const String getName() const { return pluginName; } + bool acceptsMidi() const { return wantsMidiMessages; } + bool producesMidi() const { return false; } + + //============================================================================== + // AudioProcessor methods: + + void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock); + void releaseResources(); + void processBlock (AudioSampleBuffer& buffer, + MidiBuffer& midiMessages); + + AudioProcessorEditor* createEditor(); + + const String getInputChannelName (const int index) const; + bool isInputChannelStereoPair (int index) const; + + const String getOutputChannelName (const int index) const; + bool isOutputChannelStereoPair (int index) const; + + //============================================================================== + int getNumParameters(); + float getParameter (int index); + void setParameter (int index, float newValue); + const String getParameterName (int index); + const String getParameterText (int index); + bool isParameterAutomatable (int index) const; + + //============================================================================== + int getNumPrograms(); + int getCurrentProgram(); + void setCurrentProgram (int index); + const String getProgramName (int index); + void changeProgramName (int index, const String& newName); + + //============================================================================== + void getStateInformation (MemoryBlock& destData); + void getCurrentProgramStateInformation (MemoryBlock& destData); + void setStateInformation (const void* data, int sizeInBytes); + void setCurrentProgramStateInformation (const void* data, int sizeInBytes); + + //============================================================================== + juce_UseDebuggingNewOperator + +private: + friend class AudioUnitPluginWindowCarbon; + friend class AudioUnitPluginWindowCocoa; + friend class AudioUnitPluginFormat; + + ComponentDescription componentDesc; + String pluginName, manufacturer, version; + File file; + CriticalSection lock; + bool initialised, wantsMidiMessages, wasPlaying; + + AudioBufferList* outputBufferList; + AudioTimeStamp timeStamp; + AudioSampleBuffer* currentBuffer; + + AudioUnit audioUnit; + Array parameterIds; + + //============================================================================== + bool getComponentDescFromFile (const File& file); + void initialise(); + + //============================================================================== + OSStatus renderGetInput (AudioUnitRenderActionFlags* ioActionFlags, + const AudioTimeStamp* inTimeStamp, + UInt32 inBusNumber, + UInt32 inNumberFrames, + AudioBufferList* ioData) const; + + static OSStatus renderGetInputCallback (void* inRefCon, + AudioUnitRenderActionFlags* ioActionFlags, + const AudioTimeStamp* inTimeStamp, + UInt32 inBusNumber, + UInt32 inNumberFrames, + AudioBufferList* ioData) + { + return ((AudioUnitPluginInstance*) inRefCon) + ->renderGetInput (ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, ioData); + } + + OSStatus getBeatAndTempo (Float64* outCurrentBeat, Float64* outCurrentTempo) const; + OSStatus getMusicalTimeLocation (UInt32* outDeltaSampleOffsetToNextBeat, Float32* outTimeSig_Numerator, + UInt32* outTimeSig_Denominator, Float64* outCurrentMeasureDownBeat) const; + OSStatus getTransportState (Boolean* outIsPlaying, Boolean* outTransportStateChanged, + Float64* outCurrentSampleInTimeLine, Boolean* outIsCycling, + Float64* outCycleStartBeat, Float64* outCycleEndBeat); + + static OSStatus getBeatAndTempoCallback (void* inHostUserData, Float64* outCurrentBeat, Float64* outCurrentTempo) + { + return ((AudioUnitPluginInstance*) inHostUserData)->getBeatAndTempo (outCurrentBeat, outCurrentTempo); + } + + static OSStatus getMusicalTimeLocationCallback (void* inHostUserData, UInt32* outDeltaSampleOffsetToNextBeat, + Float32* outTimeSig_Numerator, UInt32* outTimeSig_Denominator, + Float64* outCurrentMeasureDownBeat) + { + return ((AudioUnitPluginInstance*) inHostUserData) + ->getMusicalTimeLocation (outDeltaSampleOffsetToNextBeat, outTimeSig_Numerator, + outTimeSig_Denominator, outCurrentMeasureDownBeat); + } + + static OSStatus getTransportStateCallback (void* inHostUserData, Boolean* outIsPlaying, Boolean* outTransportStateChanged, + Float64* outCurrentSampleInTimeLine, Boolean* outIsCycling, + Float64* outCycleStartBeat, Float64* outCycleEndBeat) + { + return ((AudioUnitPluginInstance*) inHostUserData) + ->getTransportState (outIsPlaying, outTransportStateChanged, + outCurrentSampleInTimeLine, outIsCycling, + outCycleStartBeat, outCycleEndBeat); + } + + //============================================================================== + void getNumChannels (int& numIns, int& numOuts) + { + numIns = 0; + numOuts = 0; + + AUChannelInfo supportedChannels [128]; + UInt32 supportedChannelsSize = sizeof (supportedChannels); + + if (AudioUnitGetProperty (audioUnit, kAudioUnitProperty_SupportedNumChannels, kAudioUnitScope_Global, + 0, supportedChannels, &supportedChannelsSize) == noErr + && supportedChannelsSize > 0) + { + for (int i = 0; i < supportedChannelsSize / sizeof (AUChannelInfo); ++i) + { + numIns = jmax (numIns, supportedChannels[i].inChannels); + numOuts = jmax (numOuts, supportedChannels[i].outChannels); + } + } + else + { + // (this really means the plugin will take any number of ins/outs as long + // as they are the same) + numIns = numOuts = 2; + } + } + + const String getCategory() const; + + //============================================================================== + AudioUnitPluginInstance (const File& file); +}; + +//============================================================================== +AudioUnitPluginInstance::AudioUnitPluginInstance (const File& file_) + : file (file_), + initialised (false), + wantsMidiMessages (false), + audioUnit (0), + outputBufferList (0), + currentBuffer (0) +{ + try + { + ++insideCallback; + + log (T("Opening AU: ") + file.getFullPathName()); + + if (getComponentDescFromFile (file)) + { + ComponentRecord* const comp = FindNextComponent (0, &componentDesc); + + if (comp != 0) + { + audioUnit = (AudioUnit) OpenComponent (comp); + + wantsMidiMessages = componentDesc.componentType == kAudioUnitType_MusicDevice + || componentDesc.componentType == kAudioUnitType_MusicEffect; + } + } + + --insideCallback; + } + catch (...) + { + --insideCallback; + } +} + +AudioUnitPluginInstance::~AudioUnitPluginInstance() +{ + { + const ScopedLock sl (lock); + + jassert (insideCallback == 0); + + if (audioUnit != 0) + { + AudioUnitUninitialize (audioUnit); + CloseComponent (audioUnit); + audioUnit = 0; + } + } + + juce_free (outputBufferList); +} + +bool AudioUnitPluginInstance::getComponentDescFromFile (const File& file) +{ + zerostruct (componentDesc); + + if (! file.hasFileExtension (T(".component"))) + return false; + + const String filename (file.getFullPathName()); + const char* const utf8 = filename.toUTF8(); + CFURLRef url = CFURLCreateFromFileSystemRepresentation (0, (const UInt8*) utf8, + strlen (utf8), file.isDirectory()); + if (url != 0) + { + CFBundleRef bundleRef = CFBundleCreate (kCFAllocatorDefault, url); + CFRelease (url); + + if (bundleRef != 0) + { + CFTypeRef name = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleName")); + + if (name != 0 && CFGetTypeID (name) == CFStringGetTypeID()) + pluginName = PlatformUtilities::cfStringToJuceString ((CFStringRef) name); + + if (pluginName.isEmpty()) + pluginName = file.getFileNameWithoutExtension(); + + CFTypeRef versionString = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleVersion")); + + if (versionString != 0 && CFGetTypeID (versionString) == CFStringGetTypeID()) + version = PlatformUtilities::cfStringToJuceString ((CFStringRef) versionString); + + CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef, CFSTR("CFBundleGetInfoString")); + + if (manuString != 0 && CFGetTypeID (manuString) == CFStringGetTypeID()) + manufacturer = PlatformUtilities::cfStringToJuceString ((CFStringRef) manuString); + + short resFileId = CFBundleOpenBundleResourceMap (bundleRef); + UseResFile (resFileId); + + for (int i = 1; i <= Count1Resources ('thng'); ++i) + { + Handle h = Get1IndResource ('thng', i); + + if (h != 0) + { + HLock (h); + const uint32* const types = (const uint32*) *h; + + if (types[0] == kAudioUnitType_MusicDevice + || types[0] == kAudioUnitType_MusicEffect + || types[0] == kAudioUnitType_Effect + || types[0] == kAudioUnitType_Generator + || types[0] == kAudioUnitType_Panner) + { + componentDesc.componentType = types[0]; + componentDesc.componentSubType = types[1]; + componentDesc.componentManufacturer = types[2]; + break; + } + + HUnlock (h); + ReleaseResource (h); + } + } + + CFBundleCloseBundleResourceMap (bundleRef, resFileId); + CFRelease (bundleRef); + } + } + + return componentDesc.componentType != 0 && componentDesc.componentSubType != 0; +} + +//============================================================================== +void AudioUnitPluginInstance::initialise() +{ + if (initialised || audioUnit == 0) + return; + + log (T("Initialising AU: ") + pluginName); + + parameterIds.clear(); + + { + UInt32 paramListSize = 0; + AudioUnitGetProperty (audioUnit, kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, + 0, 0, ¶mListSize); + + if (paramListSize > 0) + { + parameterIds.insertMultiple (0, 0, paramListSize / sizeof (int)); + + AudioUnitGetProperty (audioUnit, kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, + 0, ¶meterIds.getReference(0), ¶mListSize); + } + } + + { + AURenderCallbackStruct info; + zerostruct (info); + info.inputProcRefCon = this; + info.inputProc = renderGetInputCallback; + + AudioUnitSetProperty (audioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, + 0, &info, sizeof (info)); + } + + { + HostCallbackInfo info; + zerostruct (info); + info.hostUserData = this; + info.beatAndTempoProc = getBeatAndTempoCallback; + info.musicalTimeLocationProc = getMusicalTimeLocationCallback; + info.transportStateProc = getTransportStateCallback; + + AudioUnitSetProperty (audioUnit, kAudioUnitProperty_HostCallbacks, kAudioUnitScope_Global, + 0, &info, sizeof (info)); + } + + int numIns, numOuts; + getNumChannels (numIns, numOuts); + setPlayConfigDetails (numIns, numOuts, 0, 0); + + initialised = AudioUnitInitialize (audioUnit) == noErr; + + setLatencySamples (0); +} + + +//============================================================================== +void AudioUnitPluginInstance::prepareToPlay (double sampleRate_, + int samplesPerBlockExpected) +{ + initialise(); + + if (initialised) + { + int numIns, numOuts; + getNumChannels (numIns, numOuts); + + setPlayConfigDetails (numIns, numOuts, sampleRate_, samplesPerBlockExpected); + + Float64 latencySecs = 0.0; + UInt32 latencySize = sizeof (latencySecs); + AudioUnitGetProperty (audioUnit, kAudioUnitProperty_Latency, kAudioUnitScope_Global, + 0, &latencySecs, &latencySize); + + setLatencySamples (roundDoubleToInt (latencySecs * sampleRate_)); + + AudioUnitReset (audioUnit, kAudioUnitScope_Input, 0); + AudioUnitReset (audioUnit, kAudioUnitScope_Output, 0); + AudioUnitReset (audioUnit, kAudioUnitScope_Global, 0); + + AudioStreamBasicDescription stream; + zerostruct (stream); + stream.mSampleRate = sampleRate_; + stream.mFormatID = kAudioFormatLinearPCM; + stream.mFormatFlags = kAudioFormatFlagsNativeFloatPacked | kAudioFormatFlagIsNonInterleaved; + stream.mFramesPerPacket = 1; + stream.mBytesPerPacket = 4; + stream.mBytesPerFrame = 4; + stream.mBitsPerChannel = 32; + stream.mChannelsPerFrame = numIns; + + OSStatus err = AudioUnitSetProperty (audioUnit, + kAudioUnitProperty_StreamFormat, + kAudioUnitScope_Input, + 0, &stream, sizeof (stream)); + + stream.mChannelsPerFrame = numOuts; + + err = AudioUnitSetProperty (audioUnit, + kAudioUnitProperty_StreamFormat, + kAudioUnitScope_Output, + 0, &stream, sizeof (stream)); + + juce_free (outputBufferList); + outputBufferList = (AudioBufferList*) juce_calloc (sizeof (AudioBufferList) + sizeof (AudioBuffer) * (numOuts + 1)); + outputBufferList->mNumberBuffers = numOuts; + + for (int i = numOuts; --i >= 0;) + outputBufferList->mBuffers[i].mNumberChannels = 1; + + zerostruct (timeStamp); + timeStamp.mSampleTime = 0; + timeStamp.mHostTime = AudioGetCurrentHostTime(); + timeStamp.mFlags = kAudioTimeStampSampleTimeValid | kAudioTimeStampHostTimeValid; + + currentBuffer = 0; + wasPlaying = false; + } +} + +void AudioUnitPluginInstance::releaseResources() +{ + if (initialised) + { + AudioUnitReset (audioUnit, kAudioUnitScope_Input, 0); + AudioUnitReset (audioUnit, kAudioUnitScope_Output, 0); + AudioUnitReset (audioUnit, kAudioUnitScope_Global, 0); + + juce_free (outputBufferList); + outputBufferList = 0; + currentBuffer = 0; + } +} + +OSStatus AudioUnitPluginInstance::renderGetInput (AudioUnitRenderActionFlags* ioActionFlags, + const AudioTimeStamp* inTimeStamp, + UInt32 inBusNumber, + UInt32 inNumberFrames, + AudioBufferList* ioData) const +{ + if (inBusNumber == 0 + && currentBuffer != 0) + { + jassert (inNumberFrames == currentBuffer->getNumSamples()); // if this ever happens, might need to add extra handling + + for (int i = 0; i < ioData->mNumberBuffers; ++i) + { + if (i < currentBuffer->getNumChannels()) + { + memcpy (ioData->mBuffers[i].mData, + currentBuffer->getSampleData (i, 0), + sizeof (float) * inNumberFrames); + } + else + { + zeromem (ioData->mBuffers[i].mData, sizeof (float) * inNumberFrames); + } + } + } + + return noErr; +} + +void AudioUnitPluginInstance::processBlock (AudioSampleBuffer& buffer, + MidiBuffer& midiMessages) +{ + const int numSamples = buffer.getNumSamples(); + + if (initialised) + { + AudioUnitRenderActionFlags flags = 0; + + timeStamp.mHostTime = AudioGetCurrentHostTime(); + + for (int i = getNumOutputChannels(); --i >= 0;) + { + outputBufferList->mBuffers[i].mDataByteSize = sizeof (float) * numSamples; + outputBufferList->mBuffers[i].mData = buffer.getSampleData (i, 0); + } + + currentBuffer = &buffer; + + if (wantsMidiMessages) + { + const uint8* midiEventData; + int midiEventSize, midiEventPosition; + MidiBuffer::Iterator i (midiMessages); + + while (i.getNextEvent (midiEventData, midiEventSize, midiEventPosition)) + { + if (midiEventSize <= 3) + MusicDeviceMIDIEvent (audioUnit, + midiEventData[0], midiEventData[1], midiEventData[2], + midiEventPosition); + else + MusicDeviceSysEx (audioUnit, midiEventData, midiEventSize); + } + + midiMessages.clear(); + } + + AudioUnitRender (audioUnit, &flags, &timeStamp, + 0, numSamples, outputBufferList); + + timeStamp.mSampleTime += numSamples; + } + else + { + // Not initialised, so just bypass.. + for (int i = getNumInputChannels(); i < getNumOutputChannels(); ++i) + buffer.clear (i, 0, buffer.getNumSamples()); + } +} + +//============================================================================== +OSStatus AudioUnitPluginInstance::getBeatAndTempo (Float64* outCurrentBeat, Float64* outCurrentTempo) const +{ + AudioPlayHead* const ph = getPlayHead(); + AudioPlayHead::CurrentPositionInfo result; + + if (ph != 0 && ph->getCurrentPosition (result)) + { + *outCurrentBeat = result.ppqPosition; + *outCurrentTempo = result.bpm; + } + else + { + *outCurrentBeat = 0; + *outCurrentTempo = 120.0; + } + + return noErr; +} + +OSStatus AudioUnitPluginInstance::getMusicalTimeLocation (UInt32* outDeltaSampleOffsetToNextBeat, + Float32* outTimeSig_Numerator, + UInt32* outTimeSig_Denominator, + Float64* outCurrentMeasureDownBeat) const +{ + AudioPlayHead* const ph = getPlayHead(); + AudioPlayHead::CurrentPositionInfo result; + + if (ph != 0 && ph->getCurrentPosition (result)) + { + *outTimeSig_Numerator = result.timeSigNumerator; + *outTimeSig_Denominator = result.timeSigDenominator; + + *outDeltaSampleOffsetToNextBeat = 0; //xxx + *outCurrentMeasureDownBeat = result.ppqPositionOfLastBarStart; //xxx wrong + } + else + { + *outDeltaSampleOffsetToNextBeat = 0; + *outTimeSig_Numerator = 4; + *outTimeSig_Denominator = 4; + *outCurrentMeasureDownBeat = 0; + } + + return noErr; +} + +OSStatus AudioUnitPluginInstance::getTransportState (Boolean* outIsPlaying, + Boolean* outTransportStateChanged, + Float64* outCurrentSampleInTimeLine, + Boolean* outIsCycling, + Float64* outCycleStartBeat, + Float64* outCycleEndBeat) +{ + AudioPlayHead* const ph = getPlayHead(); + AudioPlayHead::CurrentPositionInfo result; + + if (ph != 0 && ph->getCurrentPosition (result)) + { + if (outIsPlaying != 0) + *outIsPlaying = result.isPlaying; + + if (outTransportStateChanged != 0) + { + *outTransportStateChanged = result.isPlaying != wasPlaying; + wasPlaying = result.isPlaying; + } + + if (outCurrentSampleInTimeLine != 0) + *outCurrentSampleInTimeLine = roundDoubleToInt (result.timeInSeconds * getSampleRate()); + + if (outIsCycling != 0) + *outIsCycling = false; + + if (outCycleStartBeat != 0) + *outCycleStartBeat = 0; + + if (outCycleEndBeat != 0) + *outCycleEndBeat = 0; + } + else + { + if (outIsPlaying != 0) + *outIsPlaying = false; + + if (outTransportStateChanged != 0) + *outTransportStateChanged = false; + + if (outCurrentSampleInTimeLine != 0) + *outCurrentSampleInTimeLine = 0; + + if (outIsCycling != 0) + *outIsCycling = false; + + if (outCycleStartBeat != 0) + *outCycleStartBeat = 0; + + if (outCycleEndBeat != 0) + *outCycleEndBeat = 0; + } + + return noErr; +} + + +//============================================================================== +static VoidArray activeWindows; + +class AudioUnitPluginWindowCocoa : public AudioProcessorEditor +{ +public: + AudioUnitPluginWindowCocoa (AudioUnitPluginInstance& plugin_) + : AudioProcessorEditor (&plugin_), + plugin (plugin_), + wrapper (0) + { + addAndMakeVisible (wrapper = new NSViewComponent()); + + activeWindows.add (this); + + setOpaque (true); + setVisible (true); + setSize (100, 100); + + createView(); + } + + ~AudioUnitPluginWindowCocoa() + { + wrapper->setView (0); + activeWindows.removeValue (this); + if (isValid()) + plugin.editorBeingDeleted (this); + delete wrapper; + } + + bool isValid() const { return wrapper->getView() != 0; } + + void resized() + { + wrapper->setSize (getWidth(), getHeight()); + } + +private: + AudioUnitPluginInstance& plugin; + NSViewComponent* wrapper; + + bool createView() + { + UInt32 dataSize = 0; + Boolean isWritable = false; + if (AudioUnitGetPropertyInfo (plugin.audioUnit, kAudioUnitProperty_CocoaUI, kAudioUnitScope_Global, + 0, &dataSize, &isWritable) != noErr + || dataSize == 0) + { + return false; + } + + if (AudioUnitGetPropertyInfo (plugin.audioUnit, kAudioUnitProperty_CocoaUI, kAudioUnitScope_Global, + 0, &dataSize, &isWritable) != noErr) + { + return false; + } + + NSView* pluginView = 0; + AudioUnitCocoaViewInfo* info = (AudioUnitCocoaViewInfo*) juce_calloc (dataSize); + + if (AudioUnitGetProperty (plugin.audioUnit, kAudioUnitProperty_CocoaUI, kAudioUnitScope_Global, + 0, info, &dataSize) == noErr) + { + NSString* viewClassName = (NSString*) (info->mCocoaAUViewClass[0]); + NSString* path = (NSString*) CFURLCopyPath (info->mCocoaAUViewBundleLocation); + NSBundle* viewBundle = [NSBundle bundleWithPath: [path autorelease]]; + Class viewClass = [viewBundle classNamed: viewClassName]; + + if ([viewClass conformsToProtocol: @protocol (AUCocoaUIBase)] + && [viewClass instancesRespondToSelector: @selector (interfaceVersion)] + && [viewClass instancesRespondToSelector: @selector (uiViewForAudioUnit: withSize:)]) + { + id factory = [[[viewClass alloc] init] autorelease]; + pluginView = [factory uiViewForAudioUnit: plugin.audioUnit + withSize: NSMakeSize (getWidth(), getHeight())]; + } + + for (int i = (dataSize - sizeof (CFURLRef)) / sizeof (CFStringRef); --i >= 0;) + { + CFRelease (info->mCocoaAUViewClass[i]); + CFRelease (info->mCocoaAUViewBundleLocation); + } + } + + juce_free (info); + wrapper->setView (pluginView); + return pluginView != 0; + } +}; + +#if JUCE_SUPPORT_CARBON + +//============================================================================== +class AudioUnitPluginWindowCarbon : public AudioProcessorEditor +{ +public: + //============================================================================== + AudioUnitPluginWindowCarbon (AudioUnitPluginInstance& plugin_) + : AudioProcessorEditor (&plugin_), + plugin (plugin_), + viewComponent (0) + { + addAndMakeVisible (innerWrapper = new InnerWrapperComponent (this)); + + activeWindows.add (this); + + setOpaque (true); + setVisible (true); + setSize (400, 300); + + ComponentDescription viewList [16]; + UInt32 viewListSize = sizeof (viewList); + AudioUnitGetProperty (plugin.audioUnit, kAudioUnitProperty_GetUIComponentList, kAudioUnitScope_Global, + 0, &viewList, &viewListSize); + + componentRecord = FindNextComponent (0, &viewList[0]); + } + + ~AudioUnitPluginWindowCarbon() + { + deleteAndZero (innerWrapper); + + activeWindows.removeValue (this); + + if (isValid()) + plugin.editorBeingDeleted (this); + } + + bool isValid() const throw() { return componentRecord != 0; } + + //============================================================================== + void paint (Graphics& g) + { + g.fillAll (Colours::black); + } + + void resized() + { + innerWrapper->setSize (getWidth(), getHeight()); + } + + //============================================================================== + bool keyStateChanged() + { + return false; + } + + bool keyPressed (const KeyPress&) + { + return false; + } + + //============================================================================== + void broughtToFront() + { + activeWindows.removeValue (this); + activeWindows.add (this); + } + + //============================================================================== + AudioUnit getAudioUnit() const { return plugin.audioUnit; } + + AudioUnitCarbonView getViewComponent() + { + if (viewComponent == 0 && componentRecord != 0) + viewComponent = (AudioUnitCarbonView) OpenComponent (componentRecord); + + return viewComponent; + } + + void closeViewComponent() + { + if (viewComponent != 0) + { + CloseComponent (viewComponent); + viewComponent = 0; + } + } + + //============================================================================== + juce_UseDebuggingNewOperator + +private: + AudioUnitPluginInstance& plugin; + ComponentRecord* componentRecord; + AudioUnitCarbonView viewComponent; + + //============================================================================== + class InnerWrapperComponent : public CarbonViewWrapperComponent + { + public: + InnerWrapperComponent (AudioUnitPluginWindowCarbon* const owner_) + : owner (owner_) + { + } + + ~InnerWrapperComponent() + { + deleteWindow(); + } + + HIViewRef attachView (WindowRef windowRef, HIViewRef rootView) + { + log (T("Opening AU GUI: ") + owner->plugin.getName()); + + AudioUnitCarbonView viewComponent = owner->getViewComponent(); + + if (viewComponent == 0) + return 0; + + Float32Point pos = { 0, 0 }; + Float32Point size = { 250, 200 }; + + HIViewRef pluginView = 0; + + AudioUnitCarbonViewCreate (viewComponent, + owner->getAudioUnit(), + windowRef, + rootView, + &pos, + &size, + (ControlRef*) &pluginView); + + return pluginView; + } + + void removeView (HIViewRef) + { + log (T("Closing AU GUI: ") + owner->plugin.getName()); + + owner->closeViewComponent(); + } + + private: + AudioUnitPluginWindowCarbon* const owner; + }; + + friend class InnerWrapperComponent; + InnerWrapperComponent* innerWrapper; +}; + +#endif + +//============================================================================== +AudioProcessorEditor* AudioUnitPluginInstance::createEditor() +{ + AudioProcessorEditor* w = new AudioUnitPluginWindowCocoa (*this); + + if (! ((AudioUnitPluginWindowCocoa*) w)->isValid()) + deleteAndZero (w); + +#if JUCE_SUPPORT_CARBON + if (w == 0) + { + w = new AudioUnitPluginWindowCarbon (*this); + + if (! ((AudioUnitPluginWindowCarbon*) w)->isValid()) + deleteAndZero (w); + } +#endif + + return w; +} + + +//============================================================================== +const String AudioUnitPluginInstance::getCategory() const +{ + const char* result = 0; + + switch (componentDesc.componentType) + { + case kAudioUnitType_Effect: + case kAudioUnitType_MusicEffect: + result = "Effect"; + break; + case kAudioUnitType_MusicDevice: + result = "Synth"; + break; + case kAudioUnitType_Generator: + result = "Generator"; + break; + case kAudioUnitType_Panner: + result = "Panner"; + break; + default: + break; + } + + return result; +} + +//============================================================================== +int AudioUnitPluginInstance::getNumParameters() +{ + return parameterIds.size(); +} + +float AudioUnitPluginInstance::getParameter (int index) +{ + const ScopedLock sl (lock); + + Float32 value = 0.0f; + + if (audioUnit != 0 && ((unsigned int) index) < (unsigned int) parameterIds.size()) + { + AudioUnitGetParameter (audioUnit, + (UInt32) parameterIds.getUnchecked (index), + kAudioUnitScope_Global, 0, + &value); + } + + return value; +} + +void AudioUnitPluginInstance::setParameter (int index, float newValue) +{ + const ScopedLock sl (lock); + + if (audioUnit != 0 && ((unsigned int) index) < (unsigned int) parameterIds.size()) + { + AudioUnitSetParameter (audioUnit, + (UInt32) parameterIds.getUnchecked (index), + kAudioUnitScope_Global, 0, + newValue, 0); + } +} + +const String AudioUnitPluginInstance::getParameterName (int index) +{ + AudioUnitParameterInfo info; + zerostruct (info); + UInt32 sz = sizeof (info); + + String name; + + if (AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_ParameterInfo, + kAudioUnitScope_Global, + parameterIds [index], &info, &sz) == noErr) + { + if ((info.flags & kAudioUnitParameterFlag_HasCFNameString) != 0) + name = PlatformUtilities::cfStringToJuceString (info.cfNameString); + else + name = String (info.name, sizeof (info.name)); + } + + return name; +} + +const String AudioUnitPluginInstance::getParameterText (int index) +{ + return String (getParameter (index)); +} + +bool AudioUnitPluginInstance::isParameterAutomatable (int index) const +{ + AudioUnitParameterInfo info; + UInt32 sz = sizeof (info); + + if (AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_ParameterInfo, + kAudioUnitScope_Global, + parameterIds [index], &info, &sz) == noErr) + { + return (info.flags & kAudioUnitParameterFlag_NonRealTime) == 0; + } + + return true; +} + +//============================================================================== +int AudioUnitPluginInstance::getNumPrograms() +{ + CFArrayRef presets; + UInt32 sz = sizeof (CFArrayRef); + int num = 0; + + if (AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_FactoryPresets, + kAudioUnitScope_Global, + 0, &presets, &sz) == noErr) + { + num = (int) CFArrayGetCount (presets); + CFRelease (presets); + } + + return num; +} + +int AudioUnitPluginInstance::getCurrentProgram() +{ + AUPreset current; + current.presetNumber = 0; + UInt32 sz = sizeof (AUPreset); + + AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_FactoryPresets, + kAudioUnitScope_Global, + 0, ¤t, &sz); + + return current.presetNumber; +} + +void AudioUnitPluginInstance::setCurrentProgram (int newIndex) +{ + AUPreset current; + current.presetNumber = newIndex; + current.presetName = 0; + + AudioUnitSetProperty (audioUnit, + kAudioUnitProperty_FactoryPresets, + kAudioUnitScope_Global, + 0, ¤t, sizeof (AUPreset)); +} + +const String AudioUnitPluginInstance::getProgramName (int index) +{ + String s; + CFArrayRef presets; + UInt32 sz = sizeof (CFArrayRef); + + if (AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_FactoryPresets, + kAudioUnitScope_Global, + 0, &presets, &sz) == noErr) + { + for (CFIndex i = 0; i < CFArrayGetCount (presets); ++i) + { + const AUPreset* p = (const AUPreset*) CFArrayGetValueAtIndex (presets, i); + + if (p != 0 && p->presetNumber == index) + { + s = PlatformUtilities::cfStringToJuceString (p->presetName); + break; + } + } + + CFRelease (presets); + } + + return s; +} + +void AudioUnitPluginInstance::changeProgramName (int index, const String& newName) +{ + jassertfalse // xxx not implemented! +} + +//============================================================================== +const String AudioUnitPluginInstance::getInputChannelName (const int index) const +{ + if (((unsigned int) index) < (unsigned int) getNumInputChannels()) + return T("Input ") + String (index + 1); + + return String::empty; +} + +bool AudioUnitPluginInstance::isInputChannelStereoPair (int index) const +{ + if (((unsigned int) index) >= (unsigned int) getNumInputChannels()) + return false; + + + return true; +} + +const String AudioUnitPluginInstance::getOutputChannelName (const int index) const +{ + if (((unsigned int) index) < (unsigned int) getNumOutputChannels()) + return T("Output ") + String (index + 1); + + return String::empty; +} + +bool AudioUnitPluginInstance::isOutputChannelStereoPair (int index) const +{ + if (((unsigned int) index) >= (unsigned int) getNumOutputChannels()) + return false; + + return true; +} + +//============================================================================== +void AudioUnitPluginInstance::getStateInformation (MemoryBlock& destData) +{ + getCurrentProgramStateInformation (destData); +} + +void AudioUnitPluginInstance::getCurrentProgramStateInformation (MemoryBlock& destData) +{ + CFPropertyListRef propertyList = 0; + UInt32 sz = sizeof (CFPropertyListRef); + + if (AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_ClassInfo, + kAudioUnitScope_Global, + 0, &propertyList, &sz) == noErr) + { + CFWriteStreamRef stream = CFWriteStreamCreateWithAllocatedBuffers (kCFAllocatorDefault, kCFAllocatorDefault); + CFWriteStreamOpen (stream); + + CFIndex bytesWritten = CFPropertyListWriteToStream (propertyList, stream, kCFPropertyListBinaryFormat_v1_0, 0); + CFWriteStreamClose (stream); + + CFDataRef data = (CFDataRef) CFWriteStreamCopyProperty (stream, kCFStreamPropertyDataWritten); + + destData.setSize (bytesWritten); + destData.copyFrom (CFDataGetBytePtr (data), 0, destData.getSize()); + CFRelease (data); + + CFRelease (stream); + CFRelease (propertyList); + } +} + +void AudioUnitPluginInstance::setStateInformation (const void* data, int sizeInBytes) +{ + setCurrentProgramStateInformation (data, sizeInBytes); +} + +void AudioUnitPluginInstance::setCurrentProgramStateInformation (const void* data, int sizeInBytes) +{ + CFReadStreamRef stream = CFReadStreamCreateWithBytesNoCopy (kCFAllocatorDefault, + (const UInt8*) data, + sizeInBytes, + kCFAllocatorNull); + CFReadStreamOpen (stream); + + CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0; + CFPropertyListRef propertyList = CFPropertyListCreateFromStream (kCFAllocatorDefault, + stream, + 0, + kCFPropertyListImmutable, + &format, + 0); + CFRelease (stream); + + if (propertyList != 0) + AudioUnitSetProperty (audioUnit, + kAudioUnitProperty_ClassInfo, + kAudioUnitScope_Global, + 0, &propertyList, sizeof (propertyList)); +} + +//============================================================================== +//============================================================================== +AudioUnitPluginFormat::AudioUnitPluginFormat() +{ +} + +AudioUnitPluginFormat::~AudioUnitPluginFormat() +{ +} + +void AudioUnitPluginFormat::findAllTypesForFile (OwnedArray & results, + const File& file) +{ + if (! fileMightContainThisPluginType (file)) + return; + + PluginDescription desc; + desc.file = file; + desc.uid = 0; + + AudioUnitPluginInstance* instance = dynamic_cast (createInstanceFromDescription (desc)); + + if (instance == 0) + return; + + try + { + instance->fillInPluginDescription (desc); + results.add (new PluginDescription (desc)); + } + catch (...) + { + // crashed while loading... + } + + deleteAndZero (instance); +} + +AudioPluginInstance* AudioUnitPluginFormat::createInstanceFromDescription (const PluginDescription& desc) +{ + AudioUnitPluginInstance* result = 0; + + if (fileMightContainThisPluginType (desc.file)) + { + result = new AudioUnitPluginInstance (desc.file); + + if (result->audioUnit != 0) + { + result->initialise(); + } + else + { + deleteAndZero (result); + } + } + + return result; +} + +bool AudioUnitPluginFormat::fileMightContainThisPluginType (const File& f) +{ + return f.hasFileExtension (T(".component")) + && f.isDirectory(); +} + +const FileSearchPath AudioUnitPluginFormat::getDefaultLocationsToSearch() +{ + return FileSearchPath ("~/Library/Audio/Plug-Ins/Components;/Library/Audio/Plug-Ins/Components"); +} + +#endif + +END_JUCE_NAMESPACE + +#undef log + +#endif diff --git a/src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp b/src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp index 7b0411e582..c6febe9724 100644 --- a/src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp +++ b/src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.cpp @@ -31,7 +31,7 @@ #include "../../../../../juce_Config.h" -#if JUCE_PLUGINHOST_VST +#if JUCE_PLUGINHOST_VST && (JUCE_MAC || JUCE_WIN32) #ifdef _WIN32 #undef _WIN32_WINNT @@ -40,7 +40,7 @@ #define STRICT #include #include - #pragma warning (disable : 4312) + #pragma warning (disable : 4312 4355) #elif defined (LINUX) #include #include @@ -52,12 +52,20 @@ #undef Drawable #undef Time #else + #ifndef JUCE_MAC_VST_INCLUDED + // On the mac, this file needs to be compiled indirectly, by using + // juce_VSTPluginFormat.mm instead - that wraps it as an objective-C file for cocoa + #error + #endif + #include #include #endif //============================================================================== #include "../../../../juce_core/basics/juce_StandardHeader.h" +#if ! (JUCE_MAC && JUCE_64BIT) + BEGIN_JUCE_NAMESPACE #include "juce_VSTPluginFormat.h" @@ -71,6 +79,11 @@ BEGIN_JUCE_NAMESPACE #include "../../../application/juce_Application.h" #include "../../../../juce_core/misc/juce_PlatformUtilities.h" +#if JUCE_MAC + #include "../../../../../build/macosx/platform_specific_code/juce_mac_CarbonViewWrapperComponent.h" +#endif + + //============================================================================== #undef PRAGMA_ALIGN_SUPPORTED #define VST_FORCE_DEPRECATED 0 @@ -206,11 +219,7 @@ class VSTPluginWindow; #endif //============================================================================== -#if JUCE_MAC -extern bool juce_isHIViewCreatedByJuce (HIViewRef view); -extern bool juce_isWindowCreatedByJuce (WindowRef window); - -#if JUCE_PPC +#if JUCE_MAC && JUCE_PPC static void* NewCFMFromMachO (void* const machofp) throw() { void* result = juce_malloc (8); @@ -221,7 +230,6 @@ static void* NewCFMFromMachO (void* const machofp) throw() return result; } #endif -#endif //============================================================================== #if JUCE_LINUX @@ -425,12 +433,12 @@ public: pluginName = file.getFileNameWithoutExtension(); - hModule = Process::loadDynamicLibrary (file.getFullPathName()); + hModule = PlatformUtilities::loadDynamicLibrary (file.getFullPathName()); - moduleMain = (MainCall) Process::getProcedureEntryPoint (hModule, "VSTPluginMain"); + moduleMain = (MainCall) PlatformUtilities::getProcedureEntryPoint (hModule, "VSTPluginMain"); if (moduleMain == 0) - moduleMain = (MainCall) Process::getProcedureEntryPoint (hModule, "main"); + moduleMain = (MainCall) PlatformUtilities::getProcedureEntryPoint (hModule, "main"); return moduleMain != 0; } @@ -439,7 +447,7 @@ public: { _fpreset(); // (doesn't do any harm) - Process::freeDynamicLibrary (hModule); + PlatformUtilities::freeDynamicLibrary (hModule); } void closeEffect (AEffect* eff) @@ -1232,12 +1240,18 @@ static Array activeVSTWindows; //============================================================================== class VSTPluginWindow : public AudioProcessorEditor, + #if ! JUCE_MAC + public ComponentMovementWatcher, + #endif public Timer { public: //============================================================================== VSTPluginWindow (VSTPluginInstance& plugin_) : AudioProcessorEditor (&plugin_), +#if ! JUCE_MAC + ComponentMovementWatcher (this), +#endif plugin (plugin_), isOpen (false), wasShowing (false), @@ -1253,11 +1267,9 @@ public: pluginWindow = None; pluginProc = None; #else - pluginViewRef = 0; + addAndMakeVisible (innerWrapper = new InnerWrapperComponent (this)); #endif - movementWatcher = new CompMovementWatcher (this); - activeVSTWindows.add (this); setSize (1, 1); @@ -1267,16 +1279,18 @@ public: ~VSTPluginWindow() { - deleteAndZero (movementWatcher); - +#if JUCE_MAC + deleteAndZero (innerWrapper); +#else closePluginWindow(); - +#endif activeVSTWindows.removeValue (this); plugin.editorBeingDeleted (this); } //============================================================================== - void componentMovedOrResized() +#if ! JUCE_MAC + void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) { if (recursiveResize) return; @@ -1290,39 +1304,7 @@ public: recursiveResize = true; -#if JUCE_MAC - if (pluginViewRef != 0) - { - HIRect r; - r.origin.x = (float) x; - r.origin.y = (float) y; - r.size.width = (float) getWidth(); - r.size.height = (float) getHeight(); - HIViewSetFrame (pluginViewRef, &r); - } - else if (pluginWindowRef != 0) - { - Rect r; - r.left = getScreenX(); - r.top = getScreenY(); - r.right = r.left + getWidth(); - r.bottom = r.top + getHeight(); - - WindowGroupRef group = GetWindowGroup (pluginWindowRef); - WindowGroupAttributes atts; - GetWindowGroupAttributes (group, &atts); - ChangeWindowGroupAttributes (group, 0, kWindowGroupAttrMoveTogether); - - SetWindowBounds (pluginWindowRef, kWindowContentRgn, &r); - - if ((atts & kWindowGroupAttrMoveTogether) != 0) - ChangeWindowGroupAttributes (group, kWindowGroupAttrMoveTogether, 0); - } - else - { - repaint(); - } -#elif JUCE_WIN32 +#if JUCE_WIN32 if (pluginHWND != 0) MoveWindow (pluginHWND, x, y, getWidth(), getHeight(), TRUE); #elif JUCE_LINUX @@ -1338,7 +1320,7 @@ public: } } - void componentVisibilityChanged() + void componentVisibilityChanged (Component&) { const bool isShowingNow = isShowing(); @@ -1352,7 +1334,7 @@ public: closePluginWindow(); } - componentMovedOrResized(); + componentMovedOrResized (true, true); } void componentPeerChanged() @@ -1360,6 +1342,7 @@ public: closePluginWindow(); openPluginWindow(); } +#endif //============================================================================== bool keyStateChanged() @@ -1373,6 +1356,12 @@ public: } //============================================================================== +#if JUCE_MAC + void paint (Graphics& g) + { + g.fillAll (Colours::black); + } +#else void paint (Graphics& g) { if (isOpen) @@ -1385,18 +1374,7 @@ public: getScreenY() - peer->getScreenY(), getWidth(), getHeight()); -#if JUCE_MAC - if (pluginViewRef == 0) - { - ERect r; - r.left = getScreenX() - peer->getScreenX(); - r.right = r.left + getWidth(); - r.top = getScreenY() - peer->getScreenY(); - r.bottom = r.top + getHeight(); - - dispatch (effEditDraw, 0, 0, &r, 0); - } -#elif JUCE_LINUX +#if JUCE_LINUX if (pluginWindow != 0) { const Rectangle clip (g.getClipBounds()); @@ -1421,6 +1399,7 @@ public: g.fillAll (Colours::black); } } +#endif //============================================================================== void timerCallback() @@ -1452,20 +1431,7 @@ public: //============================================================================== void mouseDown (const MouseEvent& e) { -#if JUCE_MAC - if (! alreadyInside) - { - alreadyInside = true; - toFront (true); - dispatch (effEditMouse, e.x, e.y, 0, 0); - alreadyInside = false; - } - else - { - PostEvent (::mouseDown, 0); - } -#elif JUCE_LINUX - +#if JUCE_LINUX if (pluginWindow == 0) return; @@ -1487,7 +1453,7 @@ public: sendEventToChild (&ev); -#else +#elif JUCE_WIN32 (void) e; toFront (true); @@ -1516,15 +1482,56 @@ private: HWND pluginHWND; void* originalWndProc; int sizeCheckCount; -#elif JUCE_MAC - HIViewRef pluginViewRef; - WindowRef pluginWindowRef; #elif JUCE_LINUX Window pluginWindow; EventProcPtr pluginProc; #endif //============================================================================== +#if JUCE_MAC + void openPluginWindow (WindowRef parentWindow) + { + if (isOpen || parentWindow == 0) + return; + + isOpen = true; + + ERect* rect = 0; + dispatch (effEditGetRect, 0, 0, &rect, 0); + dispatch (effEditOpen, 0, 0, parentWindow, 0); + + // do this before and after like in the steinberg example + dispatch (effEditGetRect, 0, 0, &rect, 0); + dispatch (effGetProgram, 0, 0, 0, 0); // also in steinberg code + + // Install keyboard hooks + pluginWantsKeys = (dispatch (effKeysRequired, 0, 0, 0, 0) == 0); + + // double-check it's not too tiny + int w = 250, h = 150; + + if (rect != 0) + { + w = rect->right - rect->left; + h = rect->bottom - rect->top; + + if (w == 0 || h == 0) + { + w = 250; + h = 150; + } + } + + w = jmax (w, 32); + h = jmax (h, 32); + + setSize (w, h); + + startTimer (18 + JUCE_NAMESPACE::Random::getSystemRandom().nextInt (5)); + repaint(); + } + +#else void openPluginWindow() { if (isOpen || getWindowHandle() == 0) @@ -1598,44 +1605,6 @@ private: } } } -#elif JUCE_MAC - HIViewRef root = HIViewGetRoot ((WindowRef) getWindowHandle()); - HIViewFindByID (root, kHIViewWindowContentID, &root); - pluginViewRef = HIViewGetFirstSubview (root); - - while (pluginViewRef != 0 && juce_isHIViewCreatedByJuce (pluginViewRef)) - pluginViewRef = HIViewGetNextView (pluginViewRef); - - pluginWindowRef = 0; - - if (pluginViewRef == 0) - { - WindowGroupRef ourGroup = GetWindowGroup ((WindowRef) getWindowHandle()); - //DebugPrintWindowGroup (ourGroup); - //DebugPrintAllWindowGroups(); - - GetIndexedWindow (ourGroup, 1, - kWindowGroupContentsVisible, - &pluginWindowRef); - - if (pluginWindowRef == (WindowRef) getWindowHandle() - || juce_isWindowCreatedByJuce (pluginWindowRef)) - pluginWindowRef = 0; - } - - int w = 250, h = 150; - - if (rect != 0) - { - w = rect->right - rect->left; - h = rect->bottom - rect->top; - - if (w == 0 || h == 0) - { - w = 250; - h = 150; - } - } #elif JUCE_LINUX pluginWindow = getChildWindow ((Window) getWindowHandle()); @@ -1675,8 +1644,10 @@ private: startTimer (18 + JUCE_NAMESPACE::Random::getSystemRandom().nextInt (5)); repaint(); } +#endif //============================================================================== +#if ! JUCE_MAC void closePluginWindow() { if (isOpen) @@ -1701,10 +1672,6 @@ private: DestroyWindow (pluginHWND); pluginHWND = 0; -#elif JUCE_MAC - dispatch (effEditSleep, 0, 0, 0, 0); - pluginViewRef = 0; - stopTimer(); #elif JUCE_LINUX stopTimer(); pluginWindow = 0; @@ -1712,6 +1679,13 @@ private: #endif } } +#endif + + //============================================================================== + int dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) + { + return plugin.dispatch (opcode, index, value, ptr, opt); + } //============================================================================== #if JUCE_WIN32 @@ -1730,49 +1704,8 @@ private: sizeCheckCount = 0; } } -#endif - //============================================================================== - class CompMovementWatcher : public ComponentMovementWatcher - { - public: - CompMovementWatcher (VSTPluginWindow* const owner_) - : ComponentMovementWatcher (owner_), - owner (owner_) - { - } - - //============================================================================== - void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) - { - owner->componentMovedOrResized(); - } - - void componentPeerChanged() - { - owner->componentPeerChanged(); - } - - void componentVisibilityChanged (Component&) - { - owner->componentVisibilityChanged(); - } - - private: - VSTPluginWindow* const owner; - }; - - CompMovementWatcher* movementWatcher; - - //============================================================================== - int dispatch (const int opcode, const int index, const int value, void* const ptr, float opt) - { - return plugin.dispatch (opcode, index, value, ptr, opt); - } - - //============================================================================== // hooks to get keyboard events from VST windows.. -#if JUCE_WIN32 static LRESULT CALLBACK vstHookWndProc (HWND hW, UINT message, WPARAM wParam, LPARAM lParam) { for (int i = activeVSTWindows.size(); --i >= 0;) @@ -1965,6 +1898,86 @@ private: } #endif +#if JUCE_MAC + class InnerWrapperComponent : public CarbonViewWrapperComponent + { + public: + InnerWrapperComponent (VSTPluginWindow* const owner_) + : owner (owner_), + alreadyInside (false) + { + } + + ~InnerWrapperComponent() + { + deleteWindow(); + } + + HIViewRef attachView (WindowRef windowRef, HIViewRef rootView) + { + owner->openPluginWindow (windowRef); + return 0; + } + + void removeView (HIViewRef) + { + owner->dispatch (effEditClose, 0, 0, 0, 0); + owner->dispatch (effEditSleep, 0, 0, 0, 0); + } + + bool getEmbeddedViewSize (int& w, int& h) + { + ERect* rect = 0; + owner->dispatch (effEditGetRect, 0, 0, &rect, 0); + w = rect->right - rect->left; + h = rect->bottom - rect->top; + return true; + } + + void mouseDown (int x, int y) + { + if (! alreadyInside) + { + alreadyInside = true; + getTopLevelComponent()->toFront (true); + owner->dispatch (effEditMouse, x, y, 0, 0); + alreadyInside = false; + } + else + { + PostEvent (::mouseDown, 0); + } + } + + void paint() + { + ComponentPeer* const peer = getPeer(); + + if (peer != 0) + { + ERect r; + r.left = getScreenX() - peer->getScreenX(); + r.right = r.left + getWidth(); + r.top = getScreenY() - peer->getScreenY(); + r.bottom = r.top + getHeight(); + + owner->dispatch (effEditDraw, 0, 0, &r, 0); + } + } + + private: + VSTPluginWindow* const owner; + bool alreadyInside; + }; + + friend class InnerWrapperComponent; + InnerWrapperComponent* innerWrapper; + + void resized() + { + innerWrapper->setSize (getWidth(), getHeight()); + } +#endif }; //============================================================================== @@ -3041,6 +3054,8 @@ const FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() END_JUCE_NAMESPACE +#endif + #undef log #endif diff --git a/src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.mm b/src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.mm new file mode 100644 index 0000000000..ceeb1a3fc5 --- /dev/null +++ b/src/juce_appframework/audio/plugins/formats/juce_VSTPluginFormat.mm @@ -0,0 +1,35 @@ +/* + ============================================================================== + + 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 just wraps juce_VSTPluginFormat.cpp in an objective-C wrapper +#define JUCE_MAC_VST_INCLUDED 1 +#include "juce_VSTPluginFormat.cpp" + diff --git a/src/juce_appframework/audio/plugins/juce_PluginListComponent.cpp b/src/juce_appframework/audio/plugins/juce_PluginListComponent.cpp index 24e2c42025..c781736f37 100644 --- a/src/juce_appframework/audio/plugins/juce_PluginListComponent.cpp +++ b/src/juce_appframework/audio/plugins/juce_PluginListComponent.cpp @@ -270,7 +270,7 @@ void PluginListComponent::scanFor (AudioPluginFormat* format) aw.enterModalState(); - MessageManager::getInstance()->dispatchPendingMessages(); + MessageManager::getInstance()->runDispatchLoopUntil (300); PluginDirectoryScanner scanner (list, *format, path, true, deadMansPedalFile); @@ -279,7 +279,7 @@ void PluginListComponent::scanFor (AudioPluginFormat* format) aw.setMessage (TRANS("Testing:\n\n") + scanner.getNextPluginFileThatWillBeScanned().getFileName()); - MessageManager::getInstance()->dispatchPendingMessages (500); + MessageManager::getInstance()->runDispatchLoopUntil (20); if (! scanner.scanNextFile (true)) break; diff --git a/src/juce_appframework/events/juce_MessageManager.cpp b/src/juce_appframework/events/juce_MessageManager.cpp index 310807e8f8..914ef368f6 100644 --- a/src/juce_appframework/events/juce_MessageManager.cpp +++ b/src/juce_appframework/events/juce_MessageManager.cpp @@ -55,14 +55,7 @@ static const int quitMessageId = 0xfffff321; MessageManager::MessageManager() throw() : broadcastListeners (0), quitMessagePosted (false), - quitMessageReceived (false), - useMaximumForceWhenQuitting (true), - messageCounter (0), - lastMessageCounter (-1), - isInMessageDispatcher (0), - needToGetRidOfWaitCursor (false), - timeBeforeWaitCursor (0), - lastActivityCheckOkTime (0) + quitMessageReceived (false) { currentLockingThreadId = messageThreadId = Thread::getCurrentThreadId(); } @@ -82,8 +75,6 @@ MessageManager* MessageManager::getInstance() throw() { instance = new MessageManager(); doPlatformSpecificInitialisation(); - - instance->setTimeBeforeShowingWaitCursor (500); } return instance; @@ -111,108 +102,54 @@ void MessageManager::deliverMessage (void* message) recipient->handleMessage (*m); } JUCE_CATCH_EXCEPTION - - if (needToGetRidOfWaitCursor) - { - needToGetRidOfWaitCursor = false; - MouseCursor::hideWaitCursor(); - } - - ++messageCounter; } else if (recipient == 0 && m->intParameter1 == quitMessageId) { quitMessageReceived = true; - useMaximumForceWhenQuitting = (m->intParameter2 != 0); } delete m; } //============================================================================== -bool MessageManager::dispatchNextMessage (const bool returnImmediatelyIfNoMessages, - bool* const wasAMessageDispatched) -{ - if (quitMessageReceived) - { - if (wasAMessageDispatched != 0) - *wasAMessageDispatched = false; - - return false; - } - - ++isInMessageDispatcher; - - bool result = false; - - JUCE_TRY - { - result = juce_dispatchNextMessageOnSystemQueue (returnImmediatelyIfNoMessages); - - if (wasAMessageDispatched != 0) - *wasAMessageDispatched = result; - - if (instance == 0) - return false; - } - JUCE_CATCH_EXCEPTION - - --isInMessageDispatcher; - ++messageCounter; - - return result || ! returnImmediatelyIfNoMessages; -} - -void MessageManager::dispatchPendingMessages (int maxNumberOfMessagesToDispatch) +#if ! JUCE_MAC +void MessageManager::runDispatchLoop() { jassert (isThisTheMessageThread()); // must only be called by the message thread - while (--maxNumberOfMessagesToDispatch >= 0 && ! quitMessageReceived) - { - ++isInMessageDispatcher; - - bool carryOn = false; - - JUCE_TRY - { - carryOn = juce_dispatchNextMessageOnSystemQueue (true); - } - JUCE_CATCH_EXCEPTION - - --isInMessageDispatcher; - ++messageCounter; - - if (! carryOn) - break; - } + runDispatchLoopUntil (-1); } -bool MessageManager::runDispatchLoop() +void MessageManager::stopDispatchLoop() { - jassert (isThisTheMessageThread()); // must only be called by the message thread - - while (dispatchNextMessage()) - { - } - - return useMaximumForceWhenQuitting; -} - -//============================================================================== -void MessageManager::postQuitMessage (const bool useMaximumForce) -{ - Message* const m = new Message (quitMessageId, (useMaximumForce) ? 1 : 0, 0, 0); + Message* const m = new Message (quitMessageId, 0, 0, 0); m->messageRecipient = 0; postMessageToQueue (m); quitMessagePosted = true; } -bool MessageManager::hasQuitMessageBeenPosted() const throw() +bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) { - return quitMessagePosted; + jassert (isThisTheMessageThread()); // must only be called by the message thread + + const int64 endTime = Time::currentTimeMillis() + millisecondsToRunFor; + + while ((millisecondsToRunFor < 0 || endTime > Time::currentTimeMillis()) + && ! quitMessageReceived) + { + JUCE_TRY + { + juce_dispatchNextMessageOnSystemQueue (millisecondsToRunFor >= 0); + } + JUCE_CATCH_EXCEPTION + } + + return ! quitMessageReceived; } +#endif + //============================================================================== void MessageManager::deliverBroadcastMessage (const String& value) { @@ -235,78 +172,6 @@ void MessageManager::deregisterBroadcastListener (ActionListener* const listener } //============================================================================== -// This gets called occasionally by the timer thread (to save using an extra thread -// for it). -void MessageManager::inactivityCheckCallback() throw() -{ - if (instance != 0) - instance->inactivityCheckCallbackInt(); -} - -void MessageManager::inactivityCheckCallbackInt() throw() -{ - const unsigned int now = Time::getApproximateMillisecondCounter(); - - if (isInMessageDispatcher > 0 - && lastMessageCounter == messageCounter - && timeBeforeWaitCursor > 0 - && lastActivityCheckOkTime > 0 - && ! ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown()) - { - if (now >= lastActivityCheckOkTime + timeBeforeWaitCursor - && ! needToGetRidOfWaitCursor) - { - // been in the same message call too long.. - MouseCursor::showWaitCursor(); - needToGetRidOfWaitCursor = true; - } - } - else - { - lastActivityCheckOkTime = now; - lastMessageCounter = messageCounter; - } -} - -void MessageManager::delayWaitCursor() throw() -{ - if (instance != 0) - { - instance->messageCounter++; - - if (instance->needToGetRidOfWaitCursor) - { - instance->needToGetRidOfWaitCursor = false; - MouseCursor::hideWaitCursor(); - } - } -} - -void MessageManager::setTimeBeforeShowingWaitCursor (const int millisecs) throw() -{ - // if this is a bit too small you'll get a lot of unwanted hourglass cursors.. - jassert (millisecs <= 0 || millisecs > 200); - - timeBeforeWaitCursor = millisecs; - - if (millisecs > 0) - startTimer (millisecs / 2); // (see timerCallback() for explanation of this) - else - stopTimer(); -} - -void MessageManager::timerCallback() -{ - // dummy callback - the message manager is just a Timer to ensure that there are always - // some events coming in - otherwise it'll show the egg-timer/beachball-of-death. - ++messageCounter; -} - -int MessageManager::getTimeBeforeShowingWaitCursor() const throw() -{ - return timeBeforeWaitCursor; -} - bool MessageManager::isThisTheMessageThread() const throw() { return Thread::getCurrentThreadId() == messageThreadId; diff --git a/src/juce_appframework/events/juce_MessageManager.h b/src/juce_appframework/events/juce_MessageManager.h index 7757036b48..0a9287e91f 100644 --- a/src/juce_appframework/events/juce_MessageManager.h +++ b/src/juce_appframework/events/juce_MessageManager.h @@ -34,10 +34,11 @@ #include "../application/juce_DeletedAtShutdown.h" #include "../../juce_core/containers/juce_SortedSet.h" +#include "../../juce_core/containers/juce_VoidArray.h" #include "juce_ActionListenerList.h" -#include "juce_Timer.h" class Thread; -class InternalTimerThread; +class Component; +class MessageManagerLock; //============================================================================== @@ -51,8 +52,7 @@ typedef void* (MessageCallbackFunction) (void* userData); @see Message, MessageListener, MessageManagerLock, JUCEApplication */ -class JUCE_API MessageManager : private DeletedAtShutdown, - private Timer +class JUCE_API MessageManager : private DeletedAtShutdown { public: //============================================================================== @@ -60,28 +60,22 @@ public: static MessageManager* getInstance() throw(); //============================================================================== - /** Synchronously dispatches up to a certain number of messages from the queue. + void runDispatchLoop(); + void stopDispatchLoop(); + bool hasStopMessageBeenSent() const throw() { return quitMessagePosted; } - This will return when the queue becomes empty, or when the given number of - messages has been sent. + /** Synchronously dispatches messages until a given time has elapsed. + + Returns false if a quit message has been posted, otherwise returns true. */ - void dispatchPendingMessages (int maxNumberOfMessagesToDispatch = 1000); + bool runDispatchLoopUntil (int millisecondsToRunFor); - /** Synchronously sends the next pending message. - - This must only be called by the message-thread. - - @param returnImmediatelyIfNoMessages if false, it will block indefinitely until a message - needs dispatching. If true, then if no messages are - pending, it will return immediately. - @param wasAMessageDispatched if this is non-zero, it will be set to true or false - depending on whether a message was actually sent or - not. - @returns false if the thing that's calling it should stop calling - i.e. if the - app is trying to quit. - */ - bool dispatchNextMessage (const bool returnImmediatelyIfNoMessages = false, - bool* const wasAMessageDispatched = 0); + //============================================================================== + /*int runModalLoop (Component* componentToBeModal); + bool makeComponentModal (Component* componentToBeModal); + bool isComponentModal (const Component* component) const; + Component* getCurrentModalComponent() const; + void exitModalLoop (int returnValue);*/ //============================================================================== /** Calls a function using the message-thread. @@ -120,7 +114,7 @@ public: (Best to ignore this method unless you really know what you're doing..) @see setCurrentMessageThread */ - int getCurrentMessageThread() const throw() { return messageThreadId; } + int64 getCurrentMessageThread() const throw() { return messageThreadId; } /** Returns true if the caller thread has currenltly got the message manager locked. @@ -152,40 +146,11 @@ public: /** Deregisters a broadcast listener. */ void deregisterBroadcastListener (ActionListener* listener) throw(); - //============================================================================== - /** Sets a time-limit for the app to be 'busy' before an hourglass cursor will be shown. - - @param millisecs how long before the cursor is shown (the default time is 500ms). If the - value is 0 or less, the wait cursor will never be shown (although on the - Mac the system might still decide to show it after a while). - @see MouseCursor::showWaitCursor - */ - void setTimeBeforeShowingWaitCursor (const int millisecs) throw(); - - /** Returns the time-out before the 'busy' cursor is shown when the app is busy. - - @see setTimeBeforeShowingWaitCursor, MouseCursor::showWaitCursor - */ - int getTimeBeforeShowingWaitCursor() const throw(); - - /** Tells the message manager that the system isn't locked-up, even if the message - loop isn't active. - - Used internally, this is handy when an OS enters its own modal loop. - */ - static void delayWaitCursor() throw(); - - //============================================================================== - /** Returns true if JUCEApplication::quit() has been called. */ - bool hasQuitMessageBeenPosted() const throw(); - //============================================================================== /** @internal */ void deliverMessage (void*); /** @internal */ void deliverBroadcastMessage (const String&); - /** @internal */ - void timerCallback(); //============================================================================== juce_UseDebuggingNewOperator @@ -203,28 +168,20 @@ private: ActionListenerList* broadcastListeners; friend class JUCEApplication; - bool quitMessagePosted, quitMessageReceived, useMaximumForceWhenQuitting; + bool quitMessagePosted, quitMessageReceived; + int64 messageThreadId; - int messageThreadId; - int volatile messageCounter, lastMessageCounter, isInMessageDispatcher; - bool volatile needToGetRidOfWaitCursor; - int volatile timeBeforeWaitCursor; - unsigned int lastActivityCheckOkTime; + VoidArray modalComponents; + static void* exitModalLoopCallback (void*); - bool runDispatchLoop(); void postMessageToQueue (Message* const message); - void postQuitMessage (const bool useMaximumForce); static void doPlatformSpecificInitialisation(); static void doPlatformSpecificShutdown(); - friend class InternalTimerThread; - static void inactivityCheckCallback() throw(); - void inactivityCheckCallbackInt() throw(); - friend class MessageManagerLock; CriticalSection messageDispatchLock; - int currentLockingThreadId; + int64 currentLockingThreadId; MessageManager (const MessageManager&); const MessageManager& operator= (const MessageManager&); @@ -332,7 +289,7 @@ public: private: - int lastLockingThreadId; + int64 lastLockingThreadId; bool locked; }; diff --git a/src/juce_appframework/events/juce_Timer.cpp b/src/juce_appframework/events/juce_Timer.cpp index 37c32ce783..4cc9e40b5c 100644 --- a/src/juce_appframework/events/juce_Timer.cpp +++ b/src/juce_appframework/events/juce_Timer.cpp @@ -183,7 +183,6 @@ public: void run() { uint32 lastTime = Time::getMillisecondCounter(); - uint32 lastMessageManagerCallback = lastTime; while (! threadShouldExit()) { @@ -222,12 +221,6 @@ public: now = Time::getMillisecondCounter(); - if (now > lastMessageManagerCallback + 200) - { - lastMessageManagerCallback = now; - MessageManager::inactivityCheckCallback(); - } - if (now > messageDeliveryTimeout) break; } @@ -238,12 +231,6 @@ public: // Time::getApproximateMillisecondTimer value stay up-to-date wait (jlimit (1, 50, timeUntilFirstTimer)); } - - if (now > lastMessageManagerCallback + 200) - { - lastMessageManagerCallback = now; - MessageManager::inactivityCheckCallback(); - } } } diff --git a/src/juce_appframework/gui/components/controls/juce_Slider.cpp b/src/juce_appframework/gui/components/controls/juce_Slider.cpp index def3b94af0..c8665f268b 100644 --- a/src/juce_appframework/gui/components/controls/juce_Slider.cpp +++ b/src/juce_appframework/gui/components/controls/juce_Slider.cpp @@ -1,1392 +1,1392 @@ -/* - ============================================================================== - - 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_core/basics/juce_StandardHeader.h" - -BEGIN_JUCE_NAMESPACE - -#include "juce_Slider.h" -#include "../lookandfeel/juce_LookAndFeel.h" -#include "../menus/juce_PopupMenu.h" -#include "../juce_Desktop.h" -#include "../special/juce_BubbleComponent.h" -#include "../../../../juce_core/text/juce_LocalisedStrings.h" - - -//============================================================================== -class SliderPopupDisplayComponent : public BubbleComponent -{ -public: - //============================================================================== - SliderPopupDisplayComponent (Slider* const owner_) - : owner (owner_), - font (15.0f, Font::bold) - { - setAlwaysOnTop (true); - } - - ~SliderPopupDisplayComponent() - { - } - - void paintContent (Graphics& g, int w, int h) - { - g.setFont (font); - g.setColour (Colours::black); - - g.drawFittedText (text, 0, 0, w, h, Justification::centred, 1); - } - - void getContentSize (int& w, int& h) - { - w = font.getStringWidth (text) + 18; - h = (int) (font.getHeight() * 1.6f); - } - - void updatePosition (const String& newText) - { - if (text != newText) - { - text = newText; - repaint(); - } - - BubbleComponent::setPosition (owner); - } - - //============================================================================== - juce_UseDebuggingNewOperator - -private: - Slider* owner; - Font font; - String text; - - SliderPopupDisplayComponent (const SliderPopupDisplayComponent&); - const SliderPopupDisplayComponent& operator= (const SliderPopupDisplayComponent&); -}; - -//============================================================================== -Slider::Slider (const String& name) - : Component (name), - listeners (2), - currentValue (0.0), - valueMin (0.0), - valueMax (0.0), - minimum (0), - maximum (10), - interval (0), - skewFactor (1.0), - velocityModeSensitivity (1.0), - velocityModeOffset (0.0), - velocityModeThreshold (1), - rotaryStart (float_Pi * 1.2f), - rotaryEnd (float_Pi * 2.8f), - numDecimalPlaces (7), - sliderRegionStart (0), - sliderRegionSize (1), - sliderBeingDragged (-1), - pixelsForFullDragExtent (250), - style (LinearHorizontal), - textBoxPos (TextBoxLeft), - textBoxWidth (80), - textBoxHeight (20), - incDecButtonMode (incDecButtonsNotDraggable), - editableText (true), - doubleClickToValue (false), - isVelocityBased (false), - userKeyOverridesVelocity (true), - rotaryStop (true), - incDecButtonsSideBySide (false), - sendChangeOnlyOnRelease (false), - popupDisplayEnabled (false), - menuEnabled (false), - menuShown (false), - scrollWheelEnabled (true), - snapsToMousePos (true), - valueBox (0), - incButton (0), - decButton (0), - popupDisplay (0), - parentForPopupDisplay (0) -{ - setWantsKeyboardFocus (false); - setRepaintsOnMouseActivity (true); - - lookAndFeelChanged(); - updateText(); -} - -Slider::~Slider() -{ - deleteAndZero (popupDisplay); - deleteAllChildren(); -} - - -//============================================================================== -void Slider::handleAsyncUpdate() -{ - cancelPendingUpdate(); - - for (int i = listeners.size(); --i >= 0;) - { - ((SliderListener*) listeners.getUnchecked (i))->sliderValueChanged (this); - i = jmin (i, listeners.size()); - } -} - -void Slider::sendDragStart() -{ - startedDragging(); - - for (int i = listeners.size(); --i >= 0;) - { - ((SliderListener*) listeners.getUnchecked (i))->sliderDragStarted (this); - i = jmin (i, listeners.size()); - } -} - -void Slider::sendDragEnd() -{ - stoppedDragging(); - - sliderBeingDragged = -1; - - for (int i = listeners.size(); --i >= 0;) - { - ((SliderListener*) listeners.getUnchecked (i))->sliderDragEnded (this); - i = jmin (i, listeners.size()); - } -} - -void Slider::addListener (SliderListener* const listener) throw() -{ - jassert (listener != 0); - if (listener != 0) - listeners.add (listener); -} - -void Slider::removeListener (SliderListener* const listener) throw() -{ - listeners.removeValue (listener); -} - -//============================================================================== -void Slider::setSliderStyle (const SliderStyle newStyle) -{ - if (style != newStyle) - { - style = newStyle; - repaint(); - lookAndFeelChanged(); - } -} - -void Slider::setRotaryParameters (const float startAngleRadians, - const float endAngleRadians, - const bool stopAtEnd) -{ - // make sure the values are sensible.. - jassert (rotaryStart >= 0 && rotaryEnd >= 0); - jassert (rotaryStart < float_Pi * 4.0f && rotaryEnd < float_Pi * 4.0f); - jassert (rotaryStart < rotaryEnd); - - rotaryStart = startAngleRadians; - rotaryEnd = endAngleRadians; - rotaryStop = stopAtEnd; -} - -void Slider::setVelocityBasedMode (const bool velBased) throw() -{ - isVelocityBased = velBased; -} - -void Slider::setVelocityModeParameters (const double sensitivity, - const int threshold, - const double offset, - const bool userCanPressKeyToSwapMode) throw() -{ - jassert (threshold >= 0); - jassert (sensitivity > 0); - jassert (offset >= 0); - - velocityModeSensitivity = sensitivity; - velocityModeOffset = offset; - velocityModeThreshold = threshold; - userKeyOverridesVelocity = userCanPressKeyToSwapMode; -} - -void Slider::setSkewFactor (const double factor) throw() -{ - skewFactor = factor; -} - -void Slider::setSkewFactorFromMidPoint (const double sliderValueToShowAtMidPoint) throw() -{ - if (maximum > minimum) - skewFactor = log (0.5) / log ((sliderValueToShowAtMidPoint - minimum) - / (maximum - minimum)); -} - -void Slider::setMouseDragSensitivity (const int distanceForFullScaleDrag) -{ - jassert (distanceForFullScaleDrag > 0); - - pixelsForFullDragExtent = distanceForFullScaleDrag; -} - -void Slider::setIncDecButtonsMode (const IncDecButtonMode mode) -{ - if (incDecButtonMode != mode) - { - incDecButtonMode = mode; - lookAndFeelChanged(); - } -} - -void Slider::setTextBoxStyle (const TextEntryBoxPosition newPosition, - const bool isReadOnly, - const int textEntryBoxWidth, - const int textEntryBoxHeight) -{ - textBoxPos = newPosition; - editableText = ! isReadOnly; - textBoxWidth = textEntryBoxWidth; - textBoxHeight = textEntryBoxHeight; - - repaint(); - lookAndFeelChanged(); -} - -void Slider::setTextBoxIsEditable (const bool shouldBeEditable) throw() -{ - editableText = shouldBeEditable; - - if (valueBox != 0) - valueBox->setEditable (shouldBeEditable && isEnabled()); -} - -void Slider::showTextBox() -{ - jassert (editableText); // this should probably be avoided in read-only sliders. - - if (valueBox != 0) - valueBox->showEditor(); -} - -void Slider::hideTextBox (const bool discardCurrentEditorContents) -{ - if (valueBox != 0) - { - valueBox->hideEditor (discardCurrentEditorContents); - - if (discardCurrentEditorContents) - updateText(); - } -} - -void Slider::setChangeNotificationOnlyOnRelease (const bool onlyNotifyOnRelease) throw() -{ - sendChangeOnlyOnRelease = onlyNotifyOnRelease; -} - -void Slider::setSliderSnapsToMousePosition (const bool shouldSnapToMouse) throw() -{ - snapsToMousePos = shouldSnapToMouse; -} - -void Slider::setPopupDisplayEnabled (const bool enabled, - Component* const parentComponentToUse) throw() -{ - popupDisplayEnabled = enabled; - parentForPopupDisplay = parentComponentToUse; -} - -//============================================================================== -void Slider::colourChanged() -{ - lookAndFeelChanged(); -} - -void Slider::lookAndFeelChanged() -{ - const String previousTextBoxContent (valueBox != 0 ? valueBox->getText() - : getTextFromValue (currentValue)); - - deleteAllChildren(); - valueBox = 0; - - LookAndFeel& lf = getLookAndFeel(); - - if (textBoxPos != NoTextBox) - { - addAndMakeVisible (valueBox = getLookAndFeel().createSliderTextBox (*this)); - - valueBox->setWantsKeyboardFocus (false); - valueBox->setText (previousTextBoxContent, false); - - valueBox->setEditable (editableText && isEnabled()); - valueBox->addListener (this); - - if (style == LinearBar) - valueBox->addMouseListener (this, false); - } - - if (style == IncDecButtons) - { - addAndMakeVisible (incButton = lf.createSliderButton (true)); - incButton->addButtonListener (this); - - addAndMakeVisible (decButton = lf.createSliderButton (false)); - decButton->addButtonListener (this); - - if (incDecButtonMode != incDecButtonsNotDraggable) - { - incButton->addMouseListener (this, false); - decButton->addMouseListener (this, false); - } - else - { - incButton->setRepeatSpeed (300, 100, 20); - incButton->addMouseListener (decButton, false); - - decButton->setRepeatSpeed (300, 100, 20); - decButton->addMouseListener (incButton, false); - } - } - - setComponentEffect (lf.getSliderEffect()); - - resized(); - repaint(); -} - -//============================================================================== -void Slider::setRange (const double newMin, - const double newMax, - const double newInt) -{ - if (minimum != newMin - || maximum != newMax - || interval != newInt) - { - minimum = newMin; - maximum = newMax; - interval = newInt; - - // figure out the number of DPs needed to display all values at this - // interval setting. - numDecimalPlaces = 7; - - if (newInt != 0) - { - int v = abs ((int) (newInt * 10000000)); - - while ((v % 10) == 0) - { - --numDecimalPlaces; - v /= 10; - } - } - - // keep the current values inside the new range.. - if (style != TwoValueHorizontal && style != TwoValueVertical) - { - setValue (currentValue, false, false); - } - else - { - setMinValue (getMinValue(), false, false); - setMaxValue (getMaxValue(), false, false); - } - - updateText(); - } -} - -void Slider::triggerChangeMessage (const bool synchronous) -{ - if (synchronous) - handleAsyncUpdate(); - else - triggerAsyncUpdate(); - - valueChanged(); -} - -double Slider::getValue() const throw() -{ - // for a two-value style slider, you should use the getMinValue() and getMaxValue() - // methods to get the two values. - jassert (style != TwoValueHorizontal && style != TwoValueVertical); - - return currentValue; -} - -void Slider::setValue (double newValue, - const bool sendUpdateMessage, - const bool sendMessageSynchronously) -{ - // for a two-value style slider, you should use the setMinValue() and setMaxValue() - // methods to set the two values. - jassert (style != TwoValueHorizontal && style != TwoValueVertical); - - newValue = constrainedValue (newValue); - - if (style == ThreeValueHorizontal || style == ThreeValueVertical) - { - jassert (valueMin <= valueMax); - newValue = jlimit (valueMin, valueMax, newValue); - } - - if (currentValue != newValue) - { - if (valueBox != 0) - valueBox->hideEditor (true); - - currentValue = newValue; - updateText(); - repaint(); - - if (popupDisplay != 0) - { - ((SliderPopupDisplayComponent*) popupDisplay)->updatePosition (getTextFromValue (currentValue)); - popupDisplay->repaint(); - } - - if (sendUpdateMessage) - triggerChangeMessage (sendMessageSynchronously); - } -} - -double Slider::getMinValue() const throw() -{ - // The minimum value only applies to sliders that are in two- or three-value mode. - jassert (style == TwoValueHorizontal || style == TwoValueVertical - || style == ThreeValueHorizontal || style == ThreeValueVertical); - - return valueMin; -} - -double Slider::getMaxValue() const throw() -{ - // The maximum value only applies to sliders that are in two- or three-value mode. - jassert (style == TwoValueHorizontal || style == TwoValueVertical - || style == ThreeValueHorizontal || style == ThreeValueVertical); - - return valueMax; -} - -void Slider::setMinValue (double newValue, const bool sendUpdateMessage, const bool sendMessageSynchronously) -{ - // The minimum value only applies to sliders that are in two- or three-value mode. - jassert (style == TwoValueHorizontal || style == TwoValueVertical - || style == ThreeValueHorizontal || style == ThreeValueVertical); - - newValue = constrainedValue (newValue); - - if (style == TwoValueHorizontal || style == TwoValueVertical) - newValue = jmin (valueMax, newValue); - else - newValue = jmin (currentValue, newValue); - - if (valueMin != newValue) - { - valueMin = newValue; - repaint(); - - if (popupDisplay != 0) - { - ((SliderPopupDisplayComponent*) popupDisplay)->updatePosition (getTextFromValue (valueMin)); - popupDisplay->repaint(); - } - - if (sendUpdateMessage) - triggerChangeMessage (sendMessageSynchronously); - } -} - -void Slider::setMaxValue (double newValue, const bool sendUpdateMessage, const bool sendMessageSynchronously) -{ - // The maximum value only applies to sliders that are in two- or three-value mode. - jassert (style == TwoValueHorizontal || style == TwoValueVertical - || style == ThreeValueHorizontal || style == ThreeValueVertical); - - newValue = constrainedValue (newValue); - - if (style == TwoValueHorizontal || style == TwoValueVertical) - newValue = jmax (valueMin, newValue); - else - newValue = jmax (currentValue, newValue); - - if (valueMax != newValue) - { - valueMax = newValue; - repaint(); - - if (popupDisplay != 0) - { - ((SliderPopupDisplayComponent*) popupDisplay)->updatePosition (getTextFromValue (valueMax)); - popupDisplay->repaint(); - } - - if (sendUpdateMessage) - triggerChangeMessage (sendMessageSynchronously); - } -} - -void Slider::setDoubleClickReturnValue (const bool isDoubleClickEnabled, - const double valueToSetOnDoubleClick) throw() -{ - doubleClickToValue = isDoubleClickEnabled; - doubleClickReturnValue = valueToSetOnDoubleClick; -} - -double Slider::getDoubleClickReturnValue (bool& isEnabled_) const throw() -{ - isEnabled_ = doubleClickToValue; - return doubleClickReturnValue; -} - -void Slider::updateText() -{ - if (valueBox != 0) - valueBox->setText (getTextFromValue (currentValue), false); -} - -void Slider::setTextValueSuffix (const String& suffix) -{ - if (textSuffix != suffix) - { - textSuffix = suffix; - updateText(); - } -} - -const String Slider::getTextFromValue (double v) -{ - if (numDecimalPlaces > 0) - return String (v, numDecimalPlaces) + textSuffix; - else - return String (roundDoubleToInt (v)) + textSuffix; -} - -double Slider::getValueFromText (const String& text) -{ - String t (text.trimStart()); - - if (t.endsWith (textSuffix)) - t = t.substring (0, t.length() - textSuffix.length()); - - while (t.startsWithChar (T('+'))) - t = t.substring (1).trimStart(); - - return t.initialSectionContainingOnly (T("0123456789.,-")) - .getDoubleValue(); -} - -double Slider::proportionOfLengthToValue (double proportion) -{ - if (skewFactor != 1.0 && proportion > 0.0) - proportion = exp (log (proportion) / skewFactor); - - return minimum + (maximum - minimum) * proportion; -} - -double Slider::valueToProportionOfLength (double value) -{ - const double n = (value - minimum) / (maximum - minimum); - - return skewFactor == 1.0 ? n : pow (n, skewFactor); -} - -double Slider::snapValue (double attemptedValue, const bool) -{ - return attemptedValue; -} - -//============================================================================== -void Slider::startedDragging() -{ -} - -void Slider::stoppedDragging() -{ -} - -void Slider::valueChanged() -{ -} - -//============================================================================== -void Slider::enablementChanged() -{ - repaint(); -} - -void Slider::setPopupMenuEnabled (const bool menuEnabled_) throw() -{ - menuEnabled = menuEnabled_; -} - -void Slider::setScrollWheelEnabled (const bool enabled) throw() -{ - scrollWheelEnabled = enabled; -} - -//============================================================================== -void Slider::labelTextChanged (Label* label) -{ - const double newValue = snapValue (getValueFromText (label->getText()), false); - - if (getValue() != newValue) - { - sendDragStart(); - setValue (newValue, true, true); - sendDragEnd(); - } - - updateText(); // force a clean-up of the text, needed in case setValue() hasn't done this. -} - -void Slider::buttonClicked (Button* button) -{ - if (style == IncDecButtons) - { - sendDragStart(); - - if (button == incButton) - setValue (snapValue (getValue() + interval, false), true, true); - else if (button == decButton) - setValue (snapValue (getValue() - interval, false), true, true); - - sendDragEnd(); - } -} - -//============================================================================== -double Slider::constrainedValue (double value) const throw() -{ - if (interval > 0) - value = minimum + interval * floor ((value - minimum) / interval + 0.5); - - if (value <= minimum || maximum <= minimum) - value = minimum; - else if (value >= maximum) - value = maximum; - - return value; -} - -float Slider::getLinearSliderPos (const double value) -{ - double sliderPosProportional; - - if (maximum > minimum) - { - if (value < minimum) - { - sliderPosProportional = 0.0; - } - else if (value > maximum) - { - sliderPosProportional = 1.0; - } - else - { - sliderPosProportional = valueToProportionOfLength (value); - jassert (sliderPosProportional >= 0 && sliderPosProportional <= 1.0); - } - } - else - { - sliderPosProportional = 0.5; - } - - if (isVertical() || style == IncDecButtons) - sliderPosProportional = 1.0 - sliderPosProportional; - - return (float) (sliderRegionStart + sliderPosProportional * sliderRegionSize); -} - -bool Slider::isHorizontal() const throw() -{ - return style == LinearHorizontal - || style == LinearBar - || style == TwoValueHorizontal - || style == ThreeValueHorizontal; -} - -bool Slider::isVertical() const throw() -{ - return style == LinearVertical - || style == TwoValueVertical - || style == ThreeValueVertical; -} - -bool Slider::incDecDragDirectionIsHorizontal() const throw() -{ - return incDecButtonMode == incDecButtonsDraggable_Horizontal - || (incDecButtonMode == incDecButtonsDraggable_AutoDirection && incDecButtonsSideBySide); -} - -float Slider::getPositionOfValue (const double value) -{ - if (isHorizontal() || isVertical()) - { - return getLinearSliderPos (value); - } - else - { - jassertfalse // not a valid call on a slider that doesn't work linearly! - return 0.0f; - } -} - -//============================================================================== -void Slider::paint (Graphics& g) -{ - if (style != IncDecButtons) - { - if (style == Rotary || style == RotaryHorizontalDrag || style == RotaryVerticalDrag) - { - const float sliderPos = (float) valueToProportionOfLength (currentValue); - jassert (sliderPos >= 0 && sliderPos <= 1.0f); - - getLookAndFeel().drawRotarySlider (g, - sliderRect.getX(), - sliderRect.getY(), - sliderRect.getWidth(), - sliderRect.getHeight(), - sliderPos, - rotaryStart, rotaryEnd, - *this); - } - else - { - getLookAndFeel().drawLinearSlider (g, - sliderRect.getX(), - sliderRect.getY(), - sliderRect.getWidth(), - sliderRect.getHeight(), - getLinearSliderPos (currentValue), - getLinearSliderPos (valueMin), - getLinearSliderPos (valueMax), - style, - *this); - } - - if (style == LinearBar && valueBox == 0) - { - g.setColour (findColour (Slider::textBoxOutlineColourId)); - g.drawRect (0, 0, getWidth(), getHeight(), 1); - } - } -} - -void Slider::resized() -{ - int minXSpace = 0; - int minYSpace = 0; - - if (textBoxPos == TextBoxLeft || textBoxPos == TextBoxRight) - minXSpace = 30; - else - minYSpace = 15; - - const int tbw = jmax (0, jmin (textBoxWidth, getWidth() - minXSpace)); - const int tbh = jmax (0, jmin (textBoxHeight, getHeight() - minYSpace)); - - if (style == LinearBar) - { - if (valueBox != 0) - valueBox->setBounds (0, 0, getWidth(), getHeight()); - } - else - { - if (textBoxPos == NoTextBox) - { - sliderRect.setBounds (0, 0, getWidth(), getHeight()); - } - else if (textBoxPos == TextBoxLeft) - { - valueBox->setBounds (0, (getHeight() - tbh) / 2, tbw, tbh); - sliderRect.setBounds (tbw, 0, getWidth() - tbw, getHeight()); - } - else if (textBoxPos == TextBoxRight) - { - valueBox->setBounds (getWidth() - tbw, (getHeight() - tbh) / 2, tbw, tbh); - sliderRect.setBounds (0, 0, getWidth() - tbw, getHeight()); - } - else if (textBoxPos == TextBoxAbove) - { - valueBox->setBounds ((getWidth() - tbw) / 2, 0, tbw, tbh); - sliderRect.setBounds (0, tbh, getWidth(), getHeight() - tbh); - } - else if (textBoxPos == TextBoxBelow) - { - valueBox->setBounds ((getWidth() - tbw) / 2, getHeight() - tbh, tbw, tbh); - sliderRect.setBounds (0, 0, getWidth(), getHeight() - tbh); - } - } - - const int indent = getLookAndFeel().getSliderThumbRadius (*this); - - if (style == LinearBar) - { - const int barIndent = 1; - sliderRegionStart = barIndent; - sliderRegionSize = getWidth() - barIndent * 2; - - sliderRect.setBounds (sliderRegionStart, barIndent, - sliderRegionSize, getHeight() - barIndent * 2); - } - else if (isHorizontal()) - { - sliderRegionStart = sliderRect.getX() + indent; - sliderRegionSize = jmax (1, sliderRect.getWidth() - indent * 2); - - sliderRect.setBounds (sliderRegionStart, sliderRect.getY(), - sliderRegionSize, sliderRect.getHeight()); - } - else if (isVertical()) - { - sliderRegionStart = sliderRect.getY() + indent; - sliderRegionSize = jmax (1, sliderRect.getHeight() - indent * 2); - - sliderRect.setBounds (sliderRect.getX(), sliderRegionStart, - sliderRect.getWidth(), sliderRegionSize); - } - else - { - sliderRegionStart = 0; - sliderRegionSize = 100; - } - - if (style == IncDecButtons) - { - Rectangle buttonRect (sliderRect); - - if (textBoxPos == TextBoxLeft || textBoxPos == TextBoxRight) - buttonRect.expand (-2, 0); - else - buttonRect.expand (0, -2); - - incDecButtonsSideBySide = buttonRect.getWidth() > buttonRect.getHeight(); - - if (incDecButtonsSideBySide) - { - decButton->setBounds (buttonRect.getX(), - buttonRect.getY(), - buttonRect.getWidth() / 2, - buttonRect.getHeight()); - - decButton->setConnectedEdges (Button::ConnectedOnRight); - - incButton->setBounds (buttonRect.getCentreX(), - buttonRect.getY(), - buttonRect.getWidth() / 2, - buttonRect.getHeight()); - - incButton->setConnectedEdges (Button::ConnectedOnLeft); - } - else - { - incButton->setBounds (buttonRect.getX(), - buttonRect.getY(), - buttonRect.getWidth(), - buttonRect.getHeight() / 2); - - incButton->setConnectedEdges (Button::ConnectedOnBottom); - - decButton->setBounds (buttonRect.getX(), - buttonRect.getCentreY(), - buttonRect.getWidth(), - buttonRect.getHeight() / 2); - - decButton->setConnectedEdges (Button::ConnectedOnTop); - } - } -} - -void Slider::focusOfChildComponentChanged (FocusChangeType) -{ - repaint(); -} - -void Slider::mouseDown (const MouseEvent& e) -{ - mouseWasHidden = false; - incDecDragged = false; - - if (isEnabled()) - { - if (e.mods.isPopupMenu() && menuEnabled) - { - menuShown = true; - - PopupMenu m; - m.addItem (1, TRANS ("velocity-sensitive mode"), true, isVelocityBased); - m.addSeparator(); - - if (style == Rotary || style == RotaryHorizontalDrag || style == RotaryVerticalDrag) - { - PopupMenu rotaryMenu; - rotaryMenu.addItem (2, TRANS ("use circular dragging"), true, style == Rotary); - rotaryMenu.addItem (3, TRANS ("use left-right dragging"), true, style == RotaryHorizontalDrag); - rotaryMenu.addItem (4, TRANS ("use up-down dragging"), true, style == RotaryVerticalDrag); - - m.addSubMenu (TRANS ("rotary mode"), rotaryMenu); - } - - const int r = m.show(); - - if (r == 1) - { - setVelocityBasedMode (! isVelocityBased); - } - else if (r == 2) - { - setSliderStyle (Rotary); - } - else if (r == 3) - { - setSliderStyle (RotaryHorizontalDrag); - } - else if (r == 4) - { - setSliderStyle (RotaryVerticalDrag); - } - } - else if (maximum > minimum) - { - menuShown = false; - - if (valueBox != 0) - valueBox->hideEditor (true); - - sliderBeingDragged = 0; - - if (style == TwoValueHorizontal - || style == TwoValueVertical - || style == ThreeValueHorizontal - || style == ThreeValueVertical) - { - const float mousePos = (float) (isVertical() ? e.y : e.x); - - const float normalPosDistance = fabsf (getLinearSliderPos (currentValue) - mousePos); - const float minPosDistance = fabsf (getLinearSliderPos (valueMin) - 0.1f - mousePos); - const float maxPosDistance = fabsf (getLinearSliderPos (valueMax) + 0.1f - mousePos); - - if (style == TwoValueHorizontal || style == TwoValueVertical) - { - if (maxPosDistance <= minPosDistance) - sliderBeingDragged = 2; - else - sliderBeingDragged = 1; - } - else if (style == ThreeValueHorizontal || style == ThreeValueVertical) - { - if (normalPosDistance >= minPosDistance && maxPosDistance >= minPosDistance) - sliderBeingDragged = 1; - else if (normalPosDistance >= maxPosDistance) - sliderBeingDragged = 2; - } - } - - minMaxDiff = valueMax - valueMin; - - mouseXWhenLastDragged = e.x; - mouseYWhenLastDragged = e.y; - lastAngle = rotaryStart + (rotaryEnd - rotaryStart) - * valueToProportionOfLength (currentValue); - - if (sliderBeingDragged == 2) - valueWhenLastDragged = valueMax; - else if (sliderBeingDragged == 1) - valueWhenLastDragged = valueMin; - else - valueWhenLastDragged = currentValue; - - valueOnMouseDown = valueWhenLastDragged; - - if (popupDisplayEnabled) - { - SliderPopupDisplayComponent* const popup = new SliderPopupDisplayComponent (this); - popupDisplay = popup; - - if (parentForPopupDisplay != 0) - { - parentForPopupDisplay->addChildComponent (popup); - } - else - { - popup->addToDesktop (0); - } - - popup->setVisible (true); - } - - sendDragStart(); - - mouseDrag (e); - } - } -} - -void Slider::mouseUp (const MouseEvent&) -{ - if (isEnabled() - && (! menuShown) - && (maximum > minimum) - && (style != IncDecButtons || incDecDragged)) - { - restoreMouseIfHidden(); - - if (sendChangeOnlyOnRelease && valueOnMouseDown != currentValue) - triggerChangeMessage (false); - - sendDragEnd(); - - deleteAndZero (popupDisplay); - - if (style == IncDecButtons) - { - incButton->setState (Button::buttonNormal); - decButton->setState (Button::buttonNormal); - } - } -} - -void Slider::restoreMouseIfHidden() -{ - if (mouseWasHidden) - { - mouseWasHidden = false; - - Component* c = Component::getComponentUnderMouse(); - - if (c == 0) - c = this; - - c->enableUnboundedMouseMovement (false); - - const double pos = (sliderBeingDragged == 2) ? getMaxValue() - : ((sliderBeingDragged == 1) ? getMinValue() - : currentValue); - - if (style == RotaryHorizontalDrag || style == RotaryVerticalDrag) - { - int x, y, downX, downY; - Desktop::getMousePosition (x, y); - Desktop::getLastMouseDownPosition (downX, downY); - - if (style == RotaryHorizontalDrag) - { - const double posDiff = valueToProportionOfLength (pos) - valueToProportionOfLength (valueOnMouseDown); - x = pixelsForFullDragExtent * posDiff + downX; - y = downY; - } - else - { - const double posDiff = valueToProportionOfLength (valueOnMouseDown) - valueToProportionOfLength (pos); - x = downX; - y = pixelsForFullDragExtent * posDiff + downY; - } - - Desktop::setMousePosition (x, y); - } - else - { - const int pixelPos = (int) getLinearSliderPos (pos); - - int x = isHorizontal() ? pixelPos : (getWidth() / 2); - int y = isVertical() ? pixelPos : (getHeight() / 2); - - relativePositionToGlobal (x, y); - Desktop::setMousePosition (x, y); - } - } -} - -void Slider::modifierKeysChanged (const ModifierKeys& modifiers) -{ - if (isEnabled() - && style != IncDecButtons - && style != Rotary - && isVelocityBased == modifiers.isAnyModifierKeyDown()) - { - restoreMouseIfHidden(); - } -} - -static double smallestAngleBetween (double a1, double a2) -{ - return jmin (fabs (a1 - a2), - fabs (a1 + double_Pi * 2.0 - a2), - fabs (a2 + double_Pi * 2.0 - a1)); -} - -void Slider::mouseDrag (const MouseEvent& e) -{ - if (isEnabled() - && (! menuShown) - && (maximum > minimum)) - { - if (style == Rotary) - { - int dx = e.x - sliderRect.getCentreX(); - int dy = e.y - sliderRect.getCentreY(); - - if (dx * dx + dy * dy > 25) - { - double angle = atan2 ((double) dx, (double) -dy); - while (angle < 0.0) - angle += double_Pi * 2.0; - - if (rotaryStop && ! e.mouseWasClicked()) - { - if (fabs (angle - lastAngle) > double_Pi) - { - if (angle >= lastAngle) - angle -= double_Pi * 2.0; - else - angle += double_Pi * 2.0; - } - - if (angle >= lastAngle) - angle = jmin (angle, (double) jmax (rotaryStart, rotaryEnd)); - else - angle = jmax (angle, (double) jmin (rotaryStart, rotaryEnd)); - } - else - { - while (angle < rotaryStart) - angle += double_Pi * 2.0; - - if (angle > rotaryEnd) - { - if (smallestAngleBetween (angle, rotaryStart) <= smallestAngleBetween (angle, rotaryEnd)) - angle = rotaryStart; - else - angle = rotaryEnd; - } - } - - const double proportion = (angle - rotaryStart) / (rotaryEnd - rotaryStart); - - valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, proportion)); - - lastAngle = angle; - } - } - else - { - if (style == LinearBar && e.mouseWasClicked() - && valueBox != 0 && valueBox->isEditable()) - return; - - if (style == IncDecButtons) - { - if (! incDecDragged) - incDecDragged = e.getDistanceFromDragStart() > 10 && ! e.mouseWasClicked(); - - if (! incDecDragged) - return; - } - - - if ((isVelocityBased == (userKeyOverridesVelocity ? e.mods.testFlags (ModifierKeys::ctrlModifier | ModifierKeys::commandModifier | ModifierKeys::altModifier) - : false)) - || ((maximum - minimum) / sliderRegionSize < interval)) - { - const int mousePos = (isHorizontal() || style == RotaryHorizontalDrag) ? e.x : e.y; - - double scaledMousePos = (mousePos - sliderRegionStart) / (double) sliderRegionSize; - - if (style == RotaryHorizontalDrag - || style == RotaryVerticalDrag - || style == IncDecButtons - || ((style == LinearHorizontal || style == LinearVertical || style == LinearBar) - && ! snapsToMousePos)) - { - const int mouseDiff = (style == RotaryHorizontalDrag - || style == LinearHorizontal - || style == LinearBar - || (style == IncDecButtons && incDecDragDirectionIsHorizontal())) - ? e.getDistanceFromDragStartX() - : -e.getDistanceFromDragStartY(); - - double newPos = valueToProportionOfLength (valueOnMouseDown) - + mouseDiff * (1.0 / pixelsForFullDragExtent); - - valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, newPos)); - - if (style == IncDecButtons) - { - incButton->setState (mouseDiff < 0 ? Button::buttonNormal : Button::buttonDown); - decButton->setState (mouseDiff > 0 ? Button::buttonNormal : Button::buttonDown); - } - } - else - { - if (isVertical()) - scaledMousePos = 1.0 - scaledMousePos; - - valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, scaledMousePos)); - } - } - else - { - const int mouseDiff = (isHorizontal() || style == RotaryHorizontalDrag - || (style == IncDecButtons && incDecDragDirectionIsHorizontal())) - ? e.x - mouseXWhenLastDragged - : e.y - mouseYWhenLastDragged; - - const double maxSpeed = jmax (200, sliderRegionSize); - double speed = jlimit (0.0, maxSpeed, (double) abs (mouseDiff)); - - if (speed != 0) - { - speed = 0.2 * velocityModeSensitivity - * (1.0 + sin (double_Pi * (1.5 + jmin (0.5, velocityModeOffset - + jmax (0.0, (double) (speed - velocityModeThreshold)) - / maxSpeed)))); - - if (mouseDiff < 0) - speed = -speed; - - if (isVertical() || style == RotaryVerticalDrag - || (style == IncDecButtons && ! incDecDragDirectionIsHorizontal())) - speed = -speed; - - const double currentPos = valueToProportionOfLength (valueWhenLastDragged); - - valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, currentPos + speed)); - - e.originalComponent->enableUnboundedMouseMovement (true, false); - mouseWasHidden = true; - } - } - } - - valueWhenLastDragged = jlimit (minimum, maximum, valueWhenLastDragged); - - if (sliderBeingDragged == 0) - { - setValue (snapValue (valueWhenLastDragged, true), - ! sendChangeOnlyOnRelease, true); - } - else if (sliderBeingDragged == 1) - { - setMinValue (snapValue (valueWhenLastDragged, true), - ! sendChangeOnlyOnRelease, false); - - if (e.mods.isShiftDown()) - setMaxValue (getMinValue() + minMaxDiff, false); - else - minMaxDiff = valueMax - valueMin; - } - else - { - jassert (sliderBeingDragged == 2); - - setMaxValue (snapValue (valueWhenLastDragged, true), - ! sendChangeOnlyOnRelease, false); - - if (e.mods.isShiftDown()) - setMinValue (getMaxValue() - minMaxDiff, false); - else - minMaxDiff = valueMax - valueMin; - } - - mouseXWhenLastDragged = e.x; - mouseYWhenLastDragged = e.y; - } -} - -void Slider::mouseDoubleClick (const MouseEvent&) -{ - if (doubleClickToValue - && isEnabled() - && style != IncDecButtons - && minimum <= doubleClickReturnValue - && maximum >= doubleClickReturnValue) - { - sendDragStart(); - setValue (doubleClickReturnValue, true, true); - sendDragEnd(); - } -} - -void Slider::mouseWheelMove (const MouseEvent& e, float wheelIncrementX, float wheelIncrementY) -{ - if (scrollWheelEnabled && isEnabled() - && style != TwoValueHorizontal - && style != TwoValueVertical) - { - if (maximum > minimum && ! isMouseButtonDownAnywhere()) - { - if (valueBox != 0) - valueBox->hideEditor (false); - - const double proportionDelta = (wheelIncrementX != 0 ? -wheelIncrementX : wheelIncrementY) * 0.15f; - const double currentPos = valueToProportionOfLength (currentValue); - const double newValue = proportionOfLengthToValue (jlimit (0.0, 1.0, currentPos + proportionDelta)); - - double delta = (newValue != currentValue) - ? jmax (fabs (newValue - currentValue), interval) : 0; - - if (currentValue > newValue) - delta = -delta; - - sendDragStart(); - setValue (snapValue (currentValue + delta, false), true, true); - sendDragEnd(); - } - } - else - { - Component::mouseWheelMove (e, wheelIncrementX, wheelIncrementY); - } -} - -void SliderListener::sliderDragStarted (Slider*) -{ -} - -void SliderListener::sliderDragEnded (Slider*) -{ -} - - -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 "../../../../juce_core/basics/juce_StandardHeader.h" + +BEGIN_JUCE_NAMESPACE + +#include "juce_Slider.h" +#include "../lookandfeel/juce_LookAndFeel.h" +#include "../menus/juce_PopupMenu.h" +#include "../juce_Desktop.h" +#include "../special/juce_BubbleComponent.h" +#include "../../../../juce_core/text/juce_LocalisedStrings.h" + + +//============================================================================== +class SliderPopupDisplayComponent : public BubbleComponent +{ +public: + //============================================================================== + SliderPopupDisplayComponent (Slider* const owner_) + : owner (owner_), + font (15.0f, Font::bold) + { + setAlwaysOnTop (true); + } + + ~SliderPopupDisplayComponent() + { + } + + void paintContent (Graphics& g, int w, int h) + { + g.setFont (font); + g.setColour (Colours::black); + + g.drawFittedText (text, 0, 0, w, h, Justification::centred, 1); + } + + void getContentSize (int& w, int& h) + { + w = font.getStringWidth (text) + 18; + h = (int) (font.getHeight() * 1.6f); + } + + void updatePosition (const String& newText) + { + if (text != newText) + { + text = newText; + repaint(); + } + + BubbleComponent::setPosition (owner); + } + + //============================================================================== + juce_UseDebuggingNewOperator + +private: + Slider* owner; + Font font; + String text; + + SliderPopupDisplayComponent (const SliderPopupDisplayComponent&); + const SliderPopupDisplayComponent& operator= (const SliderPopupDisplayComponent&); +}; + +//============================================================================== +Slider::Slider (const String& name) + : Component (name), + listeners (2), + currentValue (0.0), + valueMin (0.0), + valueMax (0.0), + minimum (0), + maximum (10), + interval (0), + skewFactor (1.0), + velocityModeSensitivity (1.0), + velocityModeOffset (0.0), + velocityModeThreshold (1), + rotaryStart (float_Pi * 1.2f), + rotaryEnd (float_Pi * 2.8f), + numDecimalPlaces (7), + sliderRegionStart (0), + sliderRegionSize (1), + sliderBeingDragged (-1), + pixelsForFullDragExtent (250), + style (LinearHorizontal), + textBoxPos (TextBoxLeft), + textBoxWidth (80), + textBoxHeight (20), + incDecButtonMode (incDecButtonsNotDraggable), + editableText (true), + doubleClickToValue (false), + isVelocityBased (false), + userKeyOverridesVelocity (true), + rotaryStop (true), + incDecButtonsSideBySide (false), + sendChangeOnlyOnRelease (false), + popupDisplayEnabled (false), + menuEnabled (false), + menuShown (false), + scrollWheelEnabled (true), + snapsToMousePos (true), + valueBox (0), + incButton (0), + decButton (0), + popupDisplay (0), + parentForPopupDisplay (0) +{ + setWantsKeyboardFocus (false); + setRepaintsOnMouseActivity (true); + + lookAndFeelChanged(); + updateText(); +} + +Slider::~Slider() +{ + deleteAndZero (popupDisplay); + deleteAllChildren(); +} + + +//============================================================================== +void Slider::handleAsyncUpdate() +{ + cancelPendingUpdate(); + + for (int i = listeners.size(); --i >= 0;) + { + ((SliderListener*) listeners.getUnchecked (i))->sliderValueChanged (this); + i = jmin (i, listeners.size()); + } +} + +void Slider::sendDragStart() +{ + startedDragging(); + + for (int i = listeners.size(); --i >= 0;) + { + ((SliderListener*) listeners.getUnchecked (i))->sliderDragStarted (this); + i = jmin (i, listeners.size()); + } +} + +void Slider::sendDragEnd() +{ + stoppedDragging(); + + sliderBeingDragged = -1; + + for (int i = listeners.size(); --i >= 0;) + { + ((SliderListener*) listeners.getUnchecked (i))->sliderDragEnded (this); + i = jmin (i, listeners.size()); + } +} + +void Slider::addListener (SliderListener* const listener) throw() +{ + jassert (listener != 0); + if (listener != 0) + listeners.add (listener); +} + +void Slider::removeListener (SliderListener* const listener) throw() +{ + listeners.removeValue (listener); +} + +//============================================================================== +void Slider::setSliderStyle (const SliderStyle newStyle) +{ + if (style != newStyle) + { + style = newStyle; + repaint(); + lookAndFeelChanged(); + } +} + +void Slider::setRotaryParameters (const float startAngleRadians, + const float endAngleRadians, + const bool stopAtEnd) +{ + // make sure the values are sensible.. + jassert (rotaryStart >= 0 && rotaryEnd >= 0); + jassert (rotaryStart < float_Pi * 4.0f && rotaryEnd < float_Pi * 4.0f); + jassert (rotaryStart < rotaryEnd); + + rotaryStart = startAngleRadians; + rotaryEnd = endAngleRadians; + rotaryStop = stopAtEnd; +} + +void Slider::setVelocityBasedMode (const bool velBased) throw() +{ + isVelocityBased = velBased; +} + +void Slider::setVelocityModeParameters (const double sensitivity, + const int threshold, + const double offset, + const bool userCanPressKeyToSwapMode) throw() +{ + jassert (threshold >= 0); + jassert (sensitivity > 0); + jassert (offset >= 0); + + velocityModeSensitivity = sensitivity; + velocityModeOffset = offset; + velocityModeThreshold = threshold; + userKeyOverridesVelocity = userCanPressKeyToSwapMode; +} + +void Slider::setSkewFactor (const double factor) throw() +{ + skewFactor = factor; +} + +void Slider::setSkewFactorFromMidPoint (const double sliderValueToShowAtMidPoint) throw() +{ + if (maximum > minimum) + skewFactor = log (0.5) / log ((sliderValueToShowAtMidPoint - minimum) + / (maximum - minimum)); +} + +void Slider::setMouseDragSensitivity (const int distanceForFullScaleDrag) +{ + jassert (distanceForFullScaleDrag > 0); + + pixelsForFullDragExtent = distanceForFullScaleDrag; +} + +void Slider::setIncDecButtonsMode (const IncDecButtonMode mode) +{ + if (incDecButtonMode != mode) + { + incDecButtonMode = mode; + lookAndFeelChanged(); + } +} + +void Slider::setTextBoxStyle (const TextEntryBoxPosition newPosition, + const bool isReadOnly, + const int textEntryBoxWidth, + const int textEntryBoxHeight) +{ + textBoxPos = newPosition; + editableText = ! isReadOnly; + textBoxWidth = textEntryBoxWidth; + textBoxHeight = textEntryBoxHeight; + + repaint(); + lookAndFeelChanged(); +} + +void Slider::setTextBoxIsEditable (const bool shouldBeEditable) throw() +{ + editableText = shouldBeEditable; + + if (valueBox != 0) + valueBox->setEditable (shouldBeEditable && isEnabled()); +} + +void Slider::showTextBox() +{ + jassert (editableText); // this should probably be avoided in read-only sliders. + + if (valueBox != 0) + valueBox->showEditor(); +} + +void Slider::hideTextBox (const bool discardCurrentEditorContents) +{ + if (valueBox != 0) + { + valueBox->hideEditor (discardCurrentEditorContents); + + if (discardCurrentEditorContents) + updateText(); + } +} + +void Slider::setChangeNotificationOnlyOnRelease (const bool onlyNotifyOnRelease) throw() +{ + sendChangeOnlyOnRelease = onlyNotifyOnRelease; +} + +void Slider::setSliderSnapsToMousePosition (const bool shouldSnapToMouse) throw() +{ + snapsToMousePos = shouldSnapToMouse; +} + +void Slider::setPopupDisplayEnabled (const bool enabled, + Component* const parentComponentToUse) throw() +{ + popupDisplayEnabled = enabled; + parentForPopupDisplay = parentComponentToUse; +} + +//============================================================================== +void Slider::colourChanged() +{ + lookAndFeelChanged(); +} + +void Slider::lookAndFeelChanged() +{ + const String previousTextBoxContent (valueBox != 0 ? valueBox->getText() + : getTextFromValue (currentValue)); + + deleteAllChildren(); + valueBox = 0; + + LookAndFeel& lf = getLookAndFeel(); + + if (textBoxPos != NoTextBox) + { + addAndMakeVisible (valueBox = getLookAndFeel().createSliderTextBox (*this)); + + valueBox->setWantsKeyboardFocus (false); + valueBox->setText (previousTextBoxContent, false); + + valueBox->setEditable (editableText && isEnabled()); + valueBox->addListener (this); + + if (style == LinearBar) + valueBox->addMouseListener (this, false); + } + + if (style == IncDecButtons) + { + addAndMakeVisible (incButton = lf.createSliderButton (true)); + incButton->addButtonListener (this); + + addAndMakeVisible (decButton = lf.createSliderButton (false)); + decButton->addButtonListener (this); + + if (incDecButtonMode != incDecButtonsNotDraggable) + { + incButton->addMouseListener (this, false); + decButton->addMouseListener (this, false); + } + else + { + incButton->setRepeatSpeed (300, 100, 20); + incButton->addMouseListener (decButton, false); + + decButton->setRepeatSpeed (300, 100, 20); + decButton->addMouseListener (incButton, false); + } + } + + setComponentEffect (lf.getSliderEffect()); + + resized(); + repaint(); +} + +//============================================================================== +void Slider::setRange (const double newMin, + const double newMax, + const double newInt) +{ + if (minimum != newMin + || maximum != newMax + || interval != newInt) + { + minimum = newMin; + maximum = newMax; + interval = newInt; + + // figure out the number of DPs needed to display all values at this + // interval setting. + numDecimalPlaces = 7; + + if (newInt != 0) + { + int v = abs ((int) (newInt * 10000000)); + + while ((v % 10) == 0) + { + --numDecimalPlaces; + v /= 10; + } + } + + // keep the current values inside the new range.. + if (style != TwoValueHorizontal && style != TwoValueVertical) + { + setValue (currentValue, false, false); + } + else + { + setMinValue (getMinValue(), false, false); + setMaxValue (getMaxValue(), false, false); + } + + updateText(); + } +} + +void Slider::triggerChangeMessage (const bool synchronous) +{ + if (synchronous) + handleAsyncUpdate(); + else + triggerAsyncUpdate(); + + valueChanged(); +} + +double Slider::getValue() const throw() +{ + // for a two-value style slider, you should use the getMinValue() and getMaxValue() + // methods to get the two values. + jassert (style != TwoValueHorizontal && style != TwoValueVertical); + + return currentValue; +} + +void Slider::setValue (double newValue, + const bool sendUpdateMessage, + const bool sendMessageSynchronously) +{ + // for a two-value style slider, you should use the setMinValue() and setMaxValue() + // methods to set the two values. + jassert (style != TwoValueHorizontal && style != TwoValueVertical); + + newValue = constrainedValue (newValue); + + if (style == ThreeValueHorizontal || style == ThreeValueVertical) + { + jassert (valueMin <= valueMax); + newValue = jlimit (valueMin, valueMax, newValue); + } + + if (currentValue != newValue) + { + if (valueBox != 0) + valueBox->hideEditor (true); + + currentValue = newValue; + updateText(); + repaint(); + + if (popupDisplay != 0) + { + ((SliderPopupDisplayComponent*) popupDisplay)->updatePosition (getTextFromValue (currentValue)); + popupDisplay->repaint(); + } + + if (sendUpdateMessage) + triggerChangeMessage (sendMessageSynchronously); + } +} + +double Slider::getMinValue() const throw() +{ + // The minimum value only applies to sliders that are in two- or three-value mode. + jassert (style == TwoValueHorizontal || style == TwoValueVertical + || style == ThreeValueHorizontal || style == ThreeValueVertical); + + return valueMin; +} + +double Slider::getMaxValue() const throw() +{ + // The maximum value only applies to sliders that are in two- or three-value mode. + jassert (style == TwoValueHorizontal || style == TwoValueVertical + || style == ThreeValueHorizontal || style == ThreeValueVertical); + + return valueMax; +} + +void Slider::setMinValue (double newValue, const bool sendUpdateMessage, const bool sendMessageSynchronously) +{ + // The minimum value only applies to sliders that are in two- or three-value mode. + jassert (style == TwoValueHorizontal || style == TwoValueVertical + || style == ThreeValueHorizontal || style == ThreeValueVertical); + + newValue = constrainedValue (newValue); + + if (style == TwoValueHorizontal || style == TwoValueVertical) + newValue = jmin (valueMax, newValue); + else + newValue = jmin (currentValue, newValue); + + if (valueMin != newValue) + { + valueMin = newValue; + repaint(); + + if (popupDisplay != 0) + { + ((SliderPopupDisplayComponent*) popupDisplay)->updatePosition (getTextFromValue (valueMin)); + popupDisplay->repaint(); + } + + if (sendUpdateMessage) + triggerChangeMessage (sendMessageSynchronously); + } +} + +void Slider::setMaxValue (double newValue, const bool sendUpdateMessage, const bool sendMessageSynchronously) +{ + // The maximum value only applies to sliders that are in two- or three-value mode. + jassert (style == TwoValueHorizontal || style == TwoValueVertical + || style == ThreeValueHorizontal || style == ThreeValueVertical); + + newValue = constrainedValue (newValue); + + if (style == TwoValueHorizontal || style == TwoValueVertical) + newValue = jmax (valueMin, newValue); + else + newValue = jmax (currentValue, newValue); + + if (valueMax != newValue) + { + valueMax = newValue; + repaint(); + + if (popupDisplay != 0) + { + ((SliderPopupDisplayComponent*) popupDisplay)->updatePosition (getTextFromValue (valueMax)); + popupDisplay->repaint(); + } + + if (sendUpdateMessage) + triggerChangeMessage (sendMessageSynchronously); + } +} + +void Slider::setDoubleClickReturnValue (const bool isDoubleClickEnabled, + const double valueToSetOnDoubleClick) throw() +{ + doubleClickToValue = isDoubleClickEnabled; + doubleClickReturnValue = valueToSetOnDoubleClick; +} + +double Slider::getDoubleClickReturnValue (bool& isEnabled_) const throw() +{ + isEnabled_ = doubleClickToValue; + return doubleClickReturnValue; +} + +void Slider::updateText() +{ + if (valueBox != 0) + valueBox->setText (getTextFromValue (currentValue), false); +} + +void Slider::setTextValueSuffix (const String& suffix) +{ + if (textSuffix != suffix) + { + textSuffix = suffix; + updateText(); + } +} + +const String Slider::getTextFromValue (double v) +{ + if (numDecimalPlaces > 0) + return String (v, numDecimalPlaces) + textSuffix; + else + return String (roundDoubleToInt (v)) + textSuffix; +} + +double Slider::getValueFromText (const String& text) +{ + String t (text.trimStart()); + + if (t.endsWith (textSuffix)) + t = t.substring (0, t.length() - textSuffix.length()); + + while (t.startsWithChar (T('+'))) + t = t.substring (1).trimStart(); + + return t.initialSectionContainingOnly (T("0123456789.,-")) + .getDoubleValue(); +} + +double Slider::proportionOfLengthToValue (double proportion) +{ + if (skewFactor != 1.0 && proportion > 0.0) + proportion = exp (log (proportion) / skewFactor); + + return minimum + (maximum - minimum) * proportion; +} + +double Slider::valueToProportionOfLength (double value) +{ + const double n = (value - minimum) / (maximum - minimum); + + return skewFactor == 1.0 ? n : pow (n, skewFactor); +} + +double Slider::snapValue (double attemptedValue, const bool) +{ + return attemptedValue; +} + +//============================================================================== +void Slider::startedDragging() +{ +} + +void Slider::stoppedDragging() +{ +} + +void Slider::valueChanged() +{ +} + +//============================================================================== +void Slider::enablementChanged() +{ + repaint(); +} + +void Slider::setPopupMenuEnabled (const bool menuEnabled_) throw() +{ + menuEnabled = menuEnabled_; +} + +void Slider::setScrollWheelEnabled (const bool enabled) throw() +{ + scrollWheelEnabled = enabled; +} + +//============================================================================== +void Slider::labelTextChanged (Label* label) +{ + const double newValue = snapValue (getValueFromText (label->getText()), false); + + if (getValue() != newValue) + { + sendDragStart(); + setValue (newValue, true, true); + sendDragEnd(); + } + + updateText(); // force a clean-up of the text, needed in case setValue() hasn't done this. +} + +void Slider::buttonClicked (Button* button) +{ + if (style == IncDecButtons) + { + sendDragStart(); + + if (button == incButton) + setValue (snapValue (getValue() + interval, false), true, true); + else if (button == decButton) + setValue (snapValue (getValue() - interval, false), true, true); + + sendDragEnd(); + } +} + +//============================================================================== +double Slider::constrainedValue (double value) const throw() +{ + if (interval > 0) + value = minimum + interval * floor ((value - minimum) / interval + 0.5); + + if (value <= minimum || maximum <= minimum) + value = minimum; + else if (value >= maximum) + value = maximum; + + return value; +} + +float Slider::getLinearSliderPos (const double value) +{ + double sliderPosProportional; + + if (maximum > minimum) + { + if (value < minimum) + { + sliderPosProportional = 0.0; + } + else if (value > maximum) + { + sliderPosProportional = 1.0; + } + else + { + sliderPosProportional = valueToProportionOfLength (value); + jassert (sliderPosProportional >= 0 && sliderPosProportional <= 1.0); + } + } + else + { + sliderPosProportional = 0.5; + } + + if (isVertical() || style == IncDecButtons) + sliderPosProportional = 1.0 - sliderPosProportional; + + return (float) (sliderRegionStart + sliderPosProportional * sliderRegionSize); +} + +bool Slider::isHorizontal() const throw() +{ + return style == LinearHorizontal + || style == LinearBar + || style == TwoValueHorizontal + || style == ThreeValueHorizontal; +} + +bool Slider::isVertical() const throw() +{ + return style == LinearVertical + || style == TwoValueVertical + || style == ThreeValueVertical; +} + +bool Slider::incDecDragDirectionIsHorizontal() const throw() +{ + return incDecButtonMode == incDecButtonsDraggable_Horizontal + || (incDecButtonMode == incDecButtonsDraggable_AutoDirection && incDecButtonsSideBySide); +} + +float Slider::getPositionOfValue (const double value) +{ + if (isHorizontal() || isVertical()) + { + return getLinearSliderPos (value); + } + else + { + jassertfalse // not a valid call on a slider that doesn't work linearly! + return 0.0f; + } +} + +//============================================================================== +void Slider::paint (Graphics& g) +{ + if (style != IncDecButtons) + { + if (style == Rotary || style == RotaryHorizontalDrag || style == RotaryVerticalDrag) + { + const float sliderPos = (float) valueToProportionOfLength (currentValue); + jassert (sliderPos >= 0 && sliderPos <= 1.0f); + + getLookAndFeel().drawRotarySlider (g, + sliderRect.getX(), + sliderRect.getY(), + sliderRect.getWidth(), + sliderRect.getHeight(), + sliderPos, + rotaryStart, rotaryEnd, + *this); + } + else + { + getLookAndFeel().drawLinearSlider (g, + sliderRect.getX(), + sliderRect.getY(), + sliderRect.getWidth(), + sliderRect.getHeight(), + getLinearSliderPos (currentValue), + getLinearSliderPos (valueMin), + getLinearSliderPos (valueMax), + style, + *this); + } + + if (style == LinearBar && valueBox == 0) + { + g.setColour (findColour (Slider::textBoxOutlineColourId)); + g.drawRect (0, 0, getWidth(), getHeight(), 1); + } + } +} + +void Slider::resized() +{ + int minXSpace = 0; + int minYSpace = 0; + + if (textBoxPos == TextBoxLeft || textBoxPos == TextBoxRight) + minXSpace = 30; + else + minYSpace = 15; + + const int tbw = jmax (0, jmin (textBoxWidth, getWidth() - minXSpace)); + const int tbh = jmax (0, jmin (textBoxHeight, getHeight() - minYSpace)); + + if (style == LinearBar) + { + if (valueBox != 0) + valueBox->setBounds (0, 0, getWidth(), getHeight()); + } + else + { + if (textBoxPos == NoTextBox) + { + sliderRect.setBounds (0, 0, getWidth(), getHeight()); + } + else if (textBoxPos == TextBoxLeft) + { + valueBox->setBounds (0, (getHeight() - tbh) / 2, tbw, tbh); + sliderRect.setBounds (tbw, 0, getWidth() - tbw, getHeight()); + } + else if (textBoxPos == TextBoxRight) + { + valueBox->setBounds (getWidth() - tbw, (getHeight() - tbh) / 2, tbw, tbh); + sliderRect.setBounds (0, 0, getWidth() - tbw, getHeight()); + } + else if (textBoxPos == TextBoxAbove) + { + valueBox->setBounds ((getWidth() - tbw) / 2, 0, tbw, tbh); + sliderRect.setBounds (0, tbh, getWidth(), getHeight() - tbh); + } + else if (textBoxPos == TextBoxBelow) + { + valueBox->setBounds ((getWidth() - tbw) / 2, getHeight() - tbh, tbw, tbh); + sliderRect.setBounds (0, 0, getWidth(), getHeight() - tbh); + } + } + + const int indent = getLookAndFeel().getSliderThumbRadius (*this); + + if (style == LinearBar) + { + const int barIndent = 1; + sliderRegionStart = barIndent; + sliderRegionSize = getWidth() - barIndent * 2; + + sliderRect.setBounds (sliderRegionStart, barIndent, + sliderRegionSize, getHeight() - barIndent * 2); + } + else if (isHorizontal()) + { + sliderRegionStart = sliderRect.getX() + indent; + sliderRegionSize = jmax (1, sliderRect.getWidth() - indent * 2); + + sliderRect.setBounds (sliderRegionStart, sliderRect.getY(), + sliderRegionSize, sliderRect.getHeight()); + } + else if (isVertical()) + { + sliderRegionStart = sliderRect.getY() + indent; + sliderRegionSize = jmax (1, sliderRect.getHeight() - indent * 2); + + sliderRect.setBounds (sliderRect.getX(), sliderRegionStart, + sliderRect.getWidth(), sliderRegionSize); + } + else + { + sliderRegionStart = 0; + sliderRegionSize = 100; + } + + if (style == IncDecButtons) + { + Rectangle buttonRect (sliderRect); + + if (textBoxPos == TextBoxLeft || textBoxPos == TextBoxRight) + buttonRect.expand (-2, 0); + else + buttonRect.expand (0, -2); + + incDecButtonsSideBySide = buttonRect.getWidth() > buttonRect.getHeight(); + + if (incDecButtonsSideBySide) + { + decButton->setBounds (buttonRect.getX(), + buttonRect.getY(), + buttonRect.getWidth() / 2, + buttonRect.getHeight()); + + decButton->setConnectedEdges (Button::ConnectedOnRight); + + incButton->setBounds (buttonRect.getCentreX(), + buttonRect.getY(), + buttonRect.getWidth() / 2, + buttonRect.getHeight()); + + incButton->setConnectedEdges (Button::ConnectedOnLeft); + } + else + { + incButton->setBounds (buttonRect.getX(), + buttonRect.getY(), + buttonRect.getWidth(), + buttonRect.getHeight() / 2); + + incButton->setConnectedEdges (Button::ConnectedOnBottom); + + decButton->setBounds (buttonRect.getX(), + buttonRect.getCentreY(), + buttonRect.getWidth(), + buttonRect.getHeight() / 2); + + decButton->setConnectedEdges (Button::ConnectedOnTop); + } + } +} + +void Slider::focusOfChildComponentChanged (FocusChangeType) +{ + repaint(); +} + +void Slider::mouseDown (const MouseEvent& e) +{ + mouseWasHidden = false; + incDecDragged = false; + + if (isEnabled()) + { + if (e.mods.isPopupMenu() && menuEnabled) + { + menuShown = true; + + PopupMenu m; + m.addItem (1, TRANS ("velocity-sensitive mode"), true, isVelocityBased); + m.addSeparator(); + + if (style == Rotary || style == RotaryHorizontalDrag || style == RotaryVerticalDrag) + { + PopupMenu rotaryMenu; + rotaryMenu.addItem (2, TRANS ("use circular dragging"), true, style == Rotary); + rotaryMenu.addItem (3, TRANS ("use left-right dragging"), true, style == RotaryHorizontalDrag); + rotaryMenu.addItem (4, TRANS ("use up-down dragging"), true, style == RotaryVerticalDrag); + + m.addSubMenu (TRANS ("rotary mode"), rotaryMenu); + } + + const int r = m.show(); + + if (r == 1) + { + setVelocityBasedMode (! isVelocityBased); + } + else if (r == 2) + { + setSliderStyle (Rotary); + } + else if (r == 3) + { + setSliderStyle (RotaryHorizontalDrag); + } + else if (r == 4) + { + setSliderStyle (RotaryVerticalDrag); + } + } + else if (maximum > minimum) + { + menuShown = false; + + if (valueBox != 0) + valueBox->hideEditor (true); + + sliderBeingDragged = 0; + + if (style == TwoValueHorizontal + || style == TwoValueVertical + || style == ThreeValueHorizontal + || style == ThreeValueVertical) + { + const float mousePos = (float) (isVertical() ? e.y : e.x); + + const float normalPosDistance = fabsf (getLinearSliderPos (currentValue) - mousePos); + const float minPosDistance = fabsf (getLinearSliderPos (valueMin) - 0.1f - mousePos); + const float maxPosDistance = fabsf (getLinearSliderPos (valueMax) + 0.1f - mousePos); + + if (style == TwoValueHorizontal || style == TwoValueVertical) + { + if (maxPosDistance <= minPosDistance) + sliderBeingDragged = 2; + else + sliderBeingDragged = 1; + } + else if (style == ThreeValueHorizontal || style == ThreeValueVertical) + { + if (normalPosDistance >= minPosDistance && maxPosDistance >= minPosDistance) + sliderBeingDragged = 1; + else if (normalPosDistance >= maxPosDistance) + sliderBeingDragged = 2; + } + } + + minMaxDiff = valueMax - valueMin; + + mouseXWhenLastDragged = e.x; + mouseYWhenLastDragged = e.y; + lastAngle = rotaryStart + (rotaryEnd - rotaryStart) + * valueToProportionOfLength (currentValue); + + if (sliderBeingDragged == 2) + valueWhenLastDragged = valueMax; + else if (sliderBeingDragged == 1) + valueWhenLastDragged = valueMin; + else + valueWhenLastDragged = currentValue; + + valueOnMouseDown = valueWhenLastDragged; + + if (popupDisplayEnabled) + { + SliderPopupDisplayComponent* const popup = new SliderPopupDisplayComponent (this); + popupDisplay = popup; + + if (parentForPopupDisplay != 0) + { + parentForPopupDisplay->addChildComponent (popup); + } + else + { + popup->addToDesktop (0); + } + + popup->setVisible (true); + } + + sendDragStart(); + + mouseDrag (e); + } + } +} + +void Slider::mouseUp (const MouseEvent&) +{ + if (isEnabled() + && (! menuShown) + && (maximum > minimum) + && (style != IncDecButtons || incDecDragged)) + { + restoreMouseIfHidden(); + + if (sendChangeOnlyOnRelease && valueOnMouseDown != currentValue) + triggerChangeMessage (false); + + sendDragEnd(); + + deleteAndZero (popupDisplay); + + if (style == IncDecButtons) + { + incButton->setState (Button::buttonNormal); + decButton->setState (Button::buttonNormal); + } + } +} + +void Slider::restoreMouseIfHidden() +{ + if (mouseWasHidden) + { + mouseWasHidden = false; + + Component* c = Component::getComponentUnderMouse(); + + if (c == 0) + c = this; + + c->enableUnboundedMouseMovement (false); + + const double pos = (sliderBeingDragged == 2) ? getMaxValue() + : ((sliderBeingDragged == 1) ? getMinValue() + : currentValue); + + if (style == RotaryHorizontalDrag || style == RotaryVerticalDrag) + { + int x, y, downX, downY; + Desktop::getMousePosition (x, y); + Desktop::getLastMouseDownPosition (downX, downY); + + if (style == RotaryHorizontalDrag) + { + const double posDiff = valueToProportionOfLength (pos) - valueToProportionOfLength (valueOnMouseDown); + x = roundDoubleToInt (pixelsForFullDragExtent * posDiff + downX); + y = downY; + } + else + { + const double posDiff = valueToProportionOfLength (valueOnMouseDown) - valueToProportionOfLength (pos); + x = downX; + y = roundDoubleToInt (pixelsForFullDragExtent * posDiff + downY); + } + + Desktop::setMousePosition (x, y); + } + else + { + const int pixelPos = (int) getLinearSliderPos (pos); + + int x = isHorizontal() ? pixelPos : (getWidth() / 2); + int y = isVertical() ? pixelPos : (getHeight() / 2); + + relativePositionToGlobal (x, y); + Desktop::setMousePosition (x, y); + } + } +} + +void Slider::modifierKeysChanged (const ModifierKeys& modifiers) +{ + if (isEnabled() + && style != IncDecButtons + && style != Rotary + && isVelocityBased == modifiers.isAnyModifierKeyDown()) + { + restoreMouseIfHidden(); + } +} + +static double smallestAngleBetween (double a1, double a2) +{ + return jmin (fabs (a1 - a2), + fabs (a1 + double_Pi * 2.0 - a2), + fabs (a2 + double_Pi * 2.0 - a1)); +} + +void Slider::mouseDrag (const MouseEvent& e) +{ + if (isEnabled() + && (! menuShown) + && (maximum > minimum)) + { + if (style == Rotary) + { + int dx = e.x - sliderRect.getCentreX(); + int dy = e.y - sliderRect.getCentreY(); + + if (dx * dx + dy * dy > 25) + { + double angle = atan2 ((double) dx, (double) -dy); + while (angle < 0.0) + angle += double_Pi * 2.0; + + if (rotaryStop && ! e.mouseWasClicked()) + { + if (fabs (angle - lastAngle) > double_Pi) + { + if (angle >= lastAngle) + angle -= double_Pi * 2.0; + else + angle += double_Pi * 2.0; + } + + if (angle >= lastAngle) + angle = jmin (angle, (double) jmax (rotaryStart, rotaryEnd)); + else + angle = jmax (angle, (double) jmin (rotaryStart, rotaryEnd)); + } + else + { + while (angle < rotaryStart) + angle += double_Pi * 2.0; + + if (angle > rotaryEnd) + { + if (smallestAngleBetween (angle, rotaryStart) <= smallestAngleBetween (angle, rotaryEnd)) + angle = rotaryStart; + else + angle = rotaryEnd; + } + } + + const double proportion = (angle - rotaryStart) / (rotaryEnd - rotaryStart); + + valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, proportion)); + + lastAngle = angle; + } + } + else + { + if (style == LinearBar && e.mouseWasClicked() + && valueBox != 0 && valueBox->isEditable()) + return; + + if (style == IncDecButtons) + { + if (! incDecDragged) + incDecDragged = e.getDistanceFromDragStart() > 10 && ! e.mouseWasClicked(); + + if (! incDecDragged) + return; + } + + + if ((isVelocityBased == (userKeyOverridesVelocity ? e.mods.testFlags (ModifierKeys::ctrlModifier | ModifierKeys::commandModifier | ModifierKeys::altModifier) + : false)) + || ((maximum - minimum) / sliderRegionSize < interval)) + { + const int mousePos = (isHorizontal() || style == RotaryHorizontalDrag) ? e.x : e.y; + + double scaledMousePos = (mousePos - sliderRegionStart) / (double) sliderRegionSize; + + if (style == RotaryHorizontalDrag + || style == RotaryVerticalDrag + || style == IncDecButtons + || ((style == LinearHorizontal || style == LinearVertical || style == LinearBar) + && ! snapsToMousePos)) + { + const int mouseDiff = (style == RotaryHorizontalDrag + || style == LinearHorizontal + || style == LinearBar + || (style == IncDecButtons && incDecDragDirectionIsHorizontal())) + ? e.getDistanceFromDragStartX() + : -e.getDistanceFromDragStartY(); + + double newPos = valueToProportionOfLength (valueOnMouseDown) + + mouseDiff * (1.0 / pixelsForFullDragExtent); + + valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, newPos)); + + if (style == IncDecButtons) + { + incButton->setState (mouseDiff < 0 ? Button::buttonNormal : Button::buttonDown); + decButton->setState (mouseDiff > 0 ? Button::buttonNormal : Button::buttonDown); + } + } + else + { + if (isVertical()) + scaledMousePos = 1.0 - scaledMousePos; + + valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, scaledMousePos)); + } + } + else + { + const int mouseDiff = (isHorizontal() || style == RotaryHorizontalDrag + || (style == IncDecButtons && incDecDragDirectionIsHorizontal())) + ? e.x - mouseXWhenLastDragged + : e.y - mouseYWhenLastDragged; + + const double maxSpeed = jmax (200, sliderRegionSize); + double speed = jlimit (0.0, maxSpeed, (double) abs (mouseDiff)); + + if (speed != 0) + { + speed = 0.2 * velocityModeSensitivity + * (1.0 + sin (double_Pi * (1.5 + jmin (0.5, velocityModeOffset + + jmax (0.0, (double) (speed - velocityModeThreshold)) + / maxSpeed)))); + + if (mouseDiff < 0) + speed = -speed; + + if (isVertical() || style == RotaryVerticalDrag + || (style == IncDecButtons && ! incDecDragDirectionIsHorizontal())) + speed = -speed; + + const double currentPos = valueToProportionOfLength (valueWhenLastDragged); + + valueWhenLastDragged = proportionOfLengthToValue (jlimit (0.0, 1.0, currentPos + speed)); + + e.originalComponent->enableUnboundedMouseMovement (true, false); + mouseWasHidden = true; + } + } + } + + valueWhenLastDragged = jlimit (minimum, maximum, valueWhenLastDragged); + + if (sliderBeingDragged == 0) + { + setValue (snapValue (valueWhenLastDragged, true), + ! sendChangeOnlyOnRelease, true); + } + else if (sliderBeingDragged == 1) + { + setMinValue (snapValue (valueWhenLastDragged, true), + ! sendChangeOnlyOnRelease, false); + + if (e.mods.isShiftDown()) + setMaxValue (getMinValue() + minMaxDiff, false); + else + minMaxDiff = valueMax - valueMin; + } + else + { + jassert (sliderBeingDragged == 2); + + setMaxValue (snapValue (valueWhenLastDragged, true), + ! sendChangeOnlyOnRelease, false); + + if (e.mods.isShiftDown()) + setMinValue (getMaxValue() - minMaxDiff, false); + else + minMaxDiff = valueMax - valueMin; + } + + mouseXWhenLastDragged = e.x; + mouseYWhenLastDragged = e.y; + } +} + +void Slider::mouseDoubleClick (const MouseEvent&) +{ + if (doubleClickToValue + && isEnabled() + && style != IncDecButtons + && minimum <= doubleClickReturnValue + && maximum >= doubleClickReturnValue) + { + sendDragStart(); + setValue (doubleClickReturnValue, true, true); + sendDragEnd(); + } +} + +void Slider::mouseWheelMove (const MouseEvent& e, float wheelIncrementX, float wheelIncrementY) +{ + if (scrollWheelEnabled && isEnabled() + && style != TwoValueHorizontal + && style != TwoValueVertical) + { + if (maximum > minimum && ! isMouseButtonDownAnywhere()) + { + if (valueBox != 0) + valueBox->hideEditor (false); + + const double proportionDelta = (wheelIncrementX != 0 ? -wheelIncrementX : wheelIncrementY) * 0.15f; + const double currentPos = valueToProportionOfLength (currentValue); + const double newValue = proportionOfLengthToValue (jlimit (0.0, 1.0, currentPos + proportionDelta)); + + double delta = (newValue != currentValue) + ? jmax (fabs (newValue - currentValue), interval) : 0; + + if (currentValue > newValue) + delta = -delta; + + sendDragStart(); + setValue (snapValue (currentValue + delta, false), true, true); + sendDragEnd(); + } + } + else + { + Component::mouseWheelMove (e, wheelIncrementX, wheelIncrementY); + } +} + +void SliderListener::sliderDragStarted (Slider*) +{ +} + +void SliderListener::sliderDragEnded (Slider*) +{ +} + + +END_JUCE_NAMESPACE diff --git a/src/juce_appframework/gui/components/juce_Component.cpp b/src/juce_appframework/gui/components/juce_Component.cpp index ad586e3597..e98c4bd8bd 100644 --- a/src/juce_appframework/gui/components/juce_Component.cpp +++ b/src/juce_appframework/gui/components/juce_Component.cpp @@ -1425,7 +1425,7 @@ int Component::runModalLoop() { while (flags.currentlyModalFlag && flags.visibleFlag) { - if (! MessageManager::getInstance()->dispatchNextMessage()) + if (! MessageManager::getInstance()->runDispatchLoopUntil (20)) break; // check whether this component was deleted during the last message diff --git a/src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp b/src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp index 47e4a61bd7..c01e957997 100644 --- a/src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp +++ b/src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp @@ -954,15 +954,15 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& const bool showChannelsAsStereoPairs_, const bool hideAdvancedOptionsWithButton_) : deviceManager (deviceManager_), + deviceTypeDropDown (0), + deviceTypeDropDownLabel (0), + audioDeviceSettingsComp (0), minOutputChannels (minOutputChannels_), maxOutputChannels (maxOutputChannels_), minInputChannels (minInputChannels_), maxInputChannels (maxInputChannels_), showChannelsAsStereoPairs (showChannelsAsStereoPairs_), - hideAdvancedOptionsWithButton (hideAdvancedOptionsWithButton_), - deviceTypeDropDown (0), - deviceTypeDropDownLabel (0), - audioDeviceSettingsComp (0) + hideAdvancedOptionsWithButton (hideAdvancedOptionsWithButton_) { jassert (minOutputChannels >= 0 && minOutputChannels <= maxOutputChannels); jassert (minInputChannels >= 0 && minInputChannels <= maxInputChannels); diff --git a/src/juce_appframework/gui/components/special/juce_NSViewComponent.h b/src/juce_appframework/gui/components/special/juce_NSViewComponent.h new file mode 100644 index 0000000000..935f8de930 --- /dev/null +++ b/src/juce_appframework/gui/components/special/juce_NSViewComponent.h @@ -0,0 +1,96 @@ +/* + ============================================================================== + + 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_NSVIEWCOMPONENT_JUCEHEADER__ +#define __JUCE_NSVIEWCOMPONENT_JUCEHEADER__ + +#include "../juce_Component.h" +#if ! DOXYGEN + class NSViewComponentInternal; +#endif + +#if JUCE_MAC || DOXYGEN + +//============================================================================== +/** + A Mac-specific class that can create and embed an NSView inside itself. + + To use it, create one of these, put it in place and make sure it's visible in a + window, then use setView() to assign an NSView to it. The view will then be + moved and resized to follow the movements of this component. + + Of course, since the view is a native object, it'll obliterate any + juce components that may overlap this component, but that's life. +*/ +class JUCE_API NSViewComponent : public Component +{ +public: + //============================================================================== + /** Create an initially-empty container. */ + NSViewComponent(); + + /** Destructor. */ + ~NSViewComponent(); + + /** Assigns an NSView to this peer. + + The view will be retained and released by this component for as long as + it is needed. To remove the current view, just call setView (0). + + Note: a void* is used here to avoid including the cocoa headers as + part of the juce.h, but the method expects an NSView*. + */ + void setView (void* nsView); + + /** Returns the current NSView. + + Note: a void* is returned here to avoid including the cocoa headers as + a requirement of juce.h, so you should just cast the object to an NSView*. + */ + void* getView() const; + + //============================================================================== + /** @internal */ + void paint (Graphics& g); + + juce_UseDebuggingNewOperator + +private: + friend class NSViewComponentInternal; + NSViewComponentInternal* info; + + NSViewComponent (const NSViewComponent&); + const NSViewComponent& operator= (const NSViewComponent&); +}; + +#endif + +#endif // __JUCE_NSVIEWCOMPONENT_JUCEHEADER__ diff --git a/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h b/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h index fd0fddfda9..0cc0624805 100644 --- a/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h +++ b/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h @@ -328,6 +328,13 @@ public: /** @internal */ void paint (Graphics& g); + /** Returns the native handle of an embedded heavyweight window, if there is one. + + E.g. On windows, this will return the HWND of the sub-window containing + the opengl context, on the mac it'll be the NSOpenGLView. + */ + void* getNativeWindowHandle() const; + juce_UseDebuggingNewOperator private: diff --git a/src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.cpp b/src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.cpp deleted file mode 100644 index 595ffa2136..0000000000 --- a/src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.cpp +++ /dev/null @@ -1,1115 +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_Config.h" - -#if JUCE_QUICKTIME - -#ifdef _MSC_VER - #pragma warning (disable: 4514) -#endif - -#ifdef _WIN32 - #include - - #ifdef _MSC_VER - #pragma warning (push) - #pragma warning (disable : 4100) - #endif - - /* 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 - #include - #include - #include - #include - - #ifdef _MSC_VER - #pragma warning (pop) - #endif - - // 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 - #import - - using namespace QTOLibrary; - using namespace QTOControlLib; -#else - #include - #include - #include - #include -#endif - -#include "../../../../juce_core/basics/juce_StandardHeader.h" - -BEGIN_JUCE_NAMESPACE - -#include "juce_QuickTimeMovieComponent.h" -#include "../../../../juce_core/io/files/juce_FileInputStream.h" - -bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle); - -static bool hasLoadedQT = false; -static bool isQTAvailable = false; - - -//============================================================================== -struct QTMovieCompInternal -{ - QTMovieCompInternal() - : dataHandle (0) - { -#if JUCE_MAC - movie = 0; - controller = 0; -#endif - } - - ~QTMovieCompInternal() - { - clearHandle(); - } - -#if JUCE_MAC - Movie movie; - MovieController controller; -#else - IQTControlPtr qtControlInternal; - IQTMoviePtr qtMovieInternal; -#endif - - Handle dataHandle; - - void clearHandle() - { - if (dataHandle != 0) - { - DisposeHandle (dataHandle); - dataHandle = 0; - } - } -}; - -#if JUCE_WIN32 - -#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(); - QTWinBaseClass::parentHierarchyChanged(); -} - -void QuickTimeMovieComponent::visibilityChanged() -{ - createControlIfNeeded(); - QTWinBaseClass::visibilityChanged(); -} - -void QuickTimeMovieComponent::paint (Graphics& g) -{ - if (! isControlCreated()) - g.fillAll (Colours::black); -} - -#endif - -//============================================================================== -#if JUCE_MAC - -#include "../../../../juce_core/misc/juce_PlatformUtilities.h" -#include "../../../events/juce_MessageManager.h" -#include "../../graphics/geometry/juce_RectangleList.h" - -static VoidArray activeQTWindows (2); - -struct MacClickEventData -{ - ::Point where; - long when; - long modifiers; -}; - -void OfferMouseClickToQuickTime (WindowRef window, - ::Point where, long when, long modifiers, - Component* topLevelComp) -{ - if (hasLoadedQT) - { - for (int i = activeQTWindows.size(); --i >= 0;) - { - QuickTimeMovieComponent* const qtw = (QuickTimeMovieComponent*) activeQTWindows[i]; - - if (qtw->isVisible() && topLevelComp->isParentOf (qtw)) - { - MacClickEventData data; - data.where = where; - data.when = when; - data.modifiers = modifiers; - - qtw->handleMCEvent (&data); - } - } - } -} - -//============================================================================== -QuickTimeMovieComponent::QuickTimeMovieComponent() - : internal (new QTMovieCompInternal()), - associatedWindow (0), - controllerVisible (false), - controllerAssignedToWindow (false), - reentrant (false) -{ - if (! hasLoadedQT) - { - hasLoadedQT = true; - isQTAvailable = EnterMovies() == noErr; - } - - setOpaque (true); - setVisible (true); - - activeQTWindows.add (this); -} - -QuickTimeMovieComponent::~QuickTimeMovieComponent() -{ - closeMovie(); - - activeQTWindows.removeValue ((void*) this); - - QTMovieCompInternal* const i = (QTMovieCompInternal*) internal; - delete i; - - if (activeQTWindows.size() == 0 && isQTAvailable) - { - isQTAvailable = false; - hasLoadedQT = false; - - ExitMovies(); - } -} - -bool QuickTimeMovieComponent::isQuickTimeAvailable() throw() -{ - if (! hasLoadedQT) - { - hasLoadedQT = true; - isQTAvailable = EnterMovies() == noErr; - } - - return isQTAvailable; -} - -bool QuickTimeMovieComponent::loadMovie (InputStream* movieStream, - const bool controllerVisible_) -{ - if (! isQTAvailable) - return false; - - closeMovie(); - movieFile = File::nonexistent; - - 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; - } - - controllerVisible = controllerVisible_; - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - GrafPtr savedPort; - GetPort (&savedPort); - bool result = false; - - if (juce_OpenQuickTimeMovieFromStream (movieStream, qmci->movie, qmci->dataHandle)) - { - qmci->controller = 0; - - void* window = getWindowHandle(); - - if (window != associatedWindow && window != 0) - associatedWindow = window; - - assignMovieToWindow(); - - SetMovieActive (qmci->movie, true); - SetMovieProgressProc (qmci->movie, (MovieProgressUPP) -1, 0); - - startTimer (1000 / 50); // this needs to be quite a high frequency for smooth playback - result = true; - - repaint(); - } - - MacSetPort (savedPort); - - return result; -} - -void QuickTimeMovieComponent::closeMovie() -{ - stop(); - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0) - { - DisposeMovieController (qmci->controller); - qmci->controller = 0; - } - - if (qmci->movie != 0) - { - DisposeMovie (qmci->movie); - qmci->movie = 0; - } - - qmci->clearHandle(); - - stopTimer(); - movieFile = File::nonexistent; -} - -bool QuickTimeMovieComponent::isMovieOpen() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - return qmci->movie != 0 && qmci->controller != 0; -} - -const File QuickTimeMovieComponent::getCurrentMovieFile() const -{ - return movieFile; -} - -static GrafPtr getPortForWindow (void* window) -{ - if (window == 0) - return 0; - - return (GrafPtr) GetWindowPort ((WindowRef) window); -} - -void QuickTimeMovieComponent::assignMovieToWindow() -{ - if (reentrant) - return; - - reentrant = true; - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - if (qmci->controller != 0) - { - DisposeMovieController (qmci->controller); - qmci->controller = 0; - } - - controllerAssignedToWindow = false; - - void* window = getWindowHandle(); - GrafPtr port = getPortForWindow (window); - - if (port != 0) - { - GrafPtr savedPort; - GetPort (&savedPort); - - SetMovieGWorld (qmci->movie, (CGrafPtr) port, 0); - MacSetPort (port); - - Rect r; - r.top = 0; - r.left = 0; - r.right = (short) jmax (1, getWidth()); - r.bottom = (short) jmax (1, getHeight()); - SetMovieBox (qmci->movie, &r); - - // create the movie controller - qmci->controller = NewMovieController (qmci->movie, &r, - controllerVisible ? mcTopLeftMovie - : mcNotVisible); - - if (qmci->controller != 0) - { - MCEnableEditing (qmci->controller, true); - - MCDoAction (qmci->controller, mcActionSetUseBadge, (void*) false); - MCDoAction (qmci->controller, mcActionSetLoopIsPalindrome, (void*) false); - setLooping (looping); - - MCDoAction (qmci->controller, mcActionSetFlags, - (void*) (pointer_sized_int) (mcFlagSuppressMovieFrame | (controllerVisible ? 0 : (mcFlagSuppressStepButtons | mcFlagSuppressSpeakerButton)))); - - MCSetControllerBoundsRect (qmci->controller, &r); - - controllerAssignedToWindow = true; - - resized(); - } - - MacSetPort (savedPort); - } - else - { - SetMovieGWorld (qmci->movie, 0, 0); - } - - reentrant = false; -} - -void QuickTimeMovieComponent::play() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - StartMovie (qmci->movie); -} - -void QuickTimeMovieComponent::stop() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - StopMovie (qmci->movie); -} - -bool QuickTimeMovieComponent::isPlaying() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - return qmci->movie != 0 && GetMovieRate (qmci->movie) != 0; -} - -void QuickTimeMovieComponent::setPosition (const double seconds) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0) - { - TimeRecord time; - time.base = GetMovieTimeBase (qmci->movie); - time.scale = 100000; - const uint64 t = (uint64) (100000.0 * seconds); - time.value.lo = (UInt32) (t & 0xffffffff); - time.value.hi = (UInt32) (t >> 32); - - SetMovieTime (qmci->movie, &time); - timerCallback(); // to call MCIdle - } - else - { - jassertfalse // no movie is open, so can't set the position. - } -} - -double QuickTimeMovieComponent::getPosition() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - { - TimeRecord time; - GetMovieTime (qmci->movie, &time); - - return ((int64) (((uint64) time.value.hi << 32) | (uint64) time.value.lo)) - / (double) time.scale; - } - - return 0.0; -} - -void QuickTimeMovieComponent::setSpeed (const float newSpeed) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - SetMovieRate (qmci->movie, (Fixed) (newSpeed * (Fixed) 0x00010000L)); -} - -double QuickTimeMovieComponent::getMovieDuration() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - return GetMovieDuration (qmci->movie) / (double) GetMovieTimeScale (qmci->movie); - - return 0.0; -} - -void QuickTimeMovieComponent::setLooping (const bool shouldLoop) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - looping = shouldLoop; - - if (qmci->controller != 0) - MCDoAction (qmci->controller, mcActionSetLooping, (void*) shouldLoop); -} - -bool QuickTimeMovieComponent::isLooping() const -{ - return looping; -} - -void QuickTimeMovieComponent::setMovieVolume (const float newVolume) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - SetMovieVolume (qmci->movie, jlimit ((short) 0, (short) 0x100, (short) (newVolume * 0x0100))); -} - -float QuickTimeMovieComponent::getMovieVolume() const -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - return jmax (0.0f, GetMovieVolume (qmci->movie) / (float) 0x0100); - - return 0.0f; -} - -void QuickTimeMovieComponent::getMovieNormalSize (int& width, int& height) const -{ - width = 0; - height = 0; - - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie != 0) - { - Rect r; - GetMovieNaturalBoundsRect (qmci->movie, &r); - width = r.right - r.left; - height = r.bottom - r.top; - } -} - -void QuickTimeMovieComponent::paint (Graphics& g) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->movie == 0 || qmci->controller == 0) - { - g.fillAll (Colours::black); - return; - } - - GrafPtr savedPort; - GetPort (&savedPort); - - MacSetPort (getPortForWindow (getWindowHandle())); - MCDraw (qmci->controller, (WindowRef) getWindowHandle()); - - MacSetPort (savedPort); - - ComponentPeer* const peer = getPeer(); - - if (peer != 0) - { - peer->addMaskedRegion (getScreenX() - peer->getScreenX(), - getScreenY() - peer->getScreenY(), - getWidth(), getHeight()); - } - - timerCallback(); -} - -static const Rectangle getMoviePos (Component* const c) -{ - return Rectangle (c->getScreenX() - c->getTopLevelComponent()->getScreenX(), - c->getScreenY() - c->getTopLevelComponent()->getScreenY(), - jmax (1, c->getWidth()), - jmax (1, c->getHeight())); -} - -void QuickTimeMovieComponent::moved() -{ - resized(); -} - -void QuickTimeMovieComponent::resized() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0 && isShowing()) - { - checkWindowAssociation(); - - GrafPtr port = getPortForWindow (getWindowHandle()); - - if (port != 0) - { - GrafPtr savedPort; - GetPort (&savedPort); - - SetMovieGWorld (qmci->movie, (CGrafPtr) port, 0); - MacSetPort (port); - - lastPositionApplied = getMoviePos (this); - - Rect r; - r.left = (short) lastPositionApplied.getX(); - r.top = (short) lastPositionApplied.getY(); - r.right = (short) lastPositionApplied.getRight(); - r.bottom = (short) lastPositionApplied.getBottom(); - - if (MCGetVisible (qmci->controller)) - MCSetControllerBoundsRect (qmci->controller, &r); - else - SetMovieBox (qmci->movie, &r); - - if (! isPlaying()) - timerCallback(); - - MacSetPort (savedPort); - - repaint(); - } - } -} - -void QuickTimeMovieComponent::visibilityChanged() -{ - checkWindowAssociation(); - QTWinBaseClass::visibilityChanged(); -} - -void QuickTimeMovieComponent::timerCallback() -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0) - { - if (isTimerRunning()) - startTimer (getTimerInterval()); - - MCIdle (qmci->controller); - - if (lastPositionApplied != getMoviePos (this)) - resized(); - } -} - -void QuickTimeMovieComponent::checkWindowAssociation() -{ - void* const window = getWindowHandle(); - - if (window != associatedWindow - || (window != 0 && ! controllerAssignedToWindow)) - { - associatedWindow = window; - assignMovieToWindow(); - } -} - -void QuickTimeMovieComponent::parentHierarchyChanged() -{ - checkWindowAssociation(); -} - -void QuickTimeMovieComponent::handleMCEvent (void* ev) -{ - QTMovieCompInternal* const qmci = (QTMovieCompInternal*) internal; - - if (qmci->controller != 0 && isShowing()) - { - MacClickEventData* data = (MacClickEventData*) ev; - - data->where.h -= getTopLevelComponent()->getScreenX(); - data->where.v -= getTopLevelComponent()->getScreenY(); - - Boolean b = false; - MCPtInController (qmci->controller, data->where, &b); - - if (b) - { - const int oldTimeBeforeWaitCursor = MessageManager::getInstance()->getTimeBeforeShowingWaitCursor(); - MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (0); - - MCClick (qmci->controller, - (WindowRef) getWindowHandle(), - data->where, - data->when, - data->modifiers); - - MessageManager::getInstance()->setTimeBeforeShowingWaitCursor (oldTimeBeforeWaitCursor); - } - } -} - -#endif - -//============================================================================== -// (methods common to both platforms..) - -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; - -#if JUCE_MAC - SetPort (0); -#else - MacSetPort (0); -#endif - - 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 (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); - } -} - - -END_JUCE_NAMESPACE - -#endif diff --git a/src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.h b/src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.h index 3aeb7b7c50..a99ce99a59 100644 --- a/src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.h +++ b/src/juce_appframework/gui/components/special/juce_QuickTimeMovieComponent.h @@ -39,11 +39,10 @@ #if JUCE_WIN32 #include "juce_ActiveXControlComponent.h" - typedef ActiveXControlComponent QTWinBaseClass; + typedef ActiveXControlComponent QTCompBaseClass; #else - #include "../juce_Component.h" - #include "../../../events/juce_Timer.h" - typedef Component QTWinBaseClass; + #include "juce_NSViewComponent.h" + typedef NSViewComponent QTCompBaseClass; #endif //============================================================================== @@ -51,10 +50,7 @@ A window that can play back a QuickTime movie. */ -class JUCE_API QuickTimeMovieComponent : public QTWinBaseClass - #if JUCE_MAC - , private Timer - #endif +class JUCE_API QuickTimeMovieComponent : public QTCompBaseClass { public: //============================================================================== @@ -182,40 +178,25 @@ public: //============================================================================== /** @internal */ void paint (Graphics& g); - /** @internal */ - void parentHierarchyChanged(); - /** @internal */ - void visibilityChanged(); -#if JUCE_MAC - /** @internal */ - void handleMCEvent (void*); - /** @internal */ - void assignMovieToWindow(); - /** @internal */ - void timerCallback(); - /** @internal */ - void moved(); - /** @internal */ - void resized(); -#endif juce_UseDebuggingNewOperator private: File movieFile; - bool movieLoaded, controllerVisible; + bool movieLoaded, controllerVisible, looping; - void* internal; - -#if JUCE_MAC - void* associatedWindow; - Rectangle lastPositionApplied; - bool controllerAssignedToWindow, reentrant, looping; - void checkWindowAssociation(); -#endif +#if JUCE_WIN32 + /** @internal */ + void parentHierarchyChanged(); + /** @internal */ + void visibilityChanged(); void createControlIfNeeded(); bool isControlCreated() const; + void* internal; +#else + void* movie; +#endif QuickTimeMovieComponent (const QuickTimeMovieComponent&); const QuickTimeMovieComponent& operator= (const QuickTimeMovieComponent&); diff --git a/src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h b/src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h index 782388175d..880f8c4046 100644 --- a/src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h +++ b/src/juce_appframework/gui/components/special/juce_WebBrowserComponent.h @@ -33,6 +33,9 @@ #define __JUCE_WEBBROWSERCOMPONENT_JUCEHEADER__ #include "../juce_Component.h" + +#if JUCE_WEB_BROWSER + class WebBrowserComponentInternal; @@ -98,8 +101,6 @@ public: /** @internal */ void paint (Graphics& g); /** @internal */ - void moved(); - /** @internal */ void resized(); /** @internal */ void parentHierarchyChanged(); @@ -117,13 +118,6 @@ private: StringArray lastHeaders; MemoryBlock lastPostData; -#if JUCE_MAC - void* associatedWindow; - void updateBrowserPosition(); - void createBrowser(); - void deleteBrowser(); -#endif - void reloadLastURL(); void checkWindowAssociation(); @@ -132,4 +126,5 @@ private: }; +#endif #endif // __JUCE_WEBBROWSERCOMPONENT_JUCEHEADER__ diff --git a/src/juce_appframework/gui/components/windows/juce_ComponentPeer.h b/src/juce_appframework/gui/components/windows/juce_ComponentPeer.h index 24989c573c..b30c007180 100644 --- a/src/juce_appframework/gui/components/windows/juce_ComponentPeer.h +++ b/src/juce_appframework/gui/components/windows/juce_ComponentPeer.h @@ -80,6 +80,9 @@ public: windowRepaintedExplictly = (1 << 9), /**< Not intended for public use - this tells a window not to do its own repainting, but only to repaint when the performAnyPendingRepaintsNow() method is called. */ + windowIgnoresKeyPresses = (1 << 10), /**< Tells the window not to catch any keypresses. This can + be used for things like plugin windows, to stop them interfering + with the host's shortcut keys */ windowIsSemiTransparent = (1 << 31) /**< Not intended for public use - makes a window transparent. */ }; diff --git a/src/juce_appframework/gui/components/windows/juce_SplashScreen.cpp b/src/juce_appframework/gui/components/windows/juce_SplashScreen.cpp index dddee37a14..99ca7c9f67 100644 --- a/src/juce_appframework/gui/components/windows/juce_SplashScreen.cpp +++ b/src/juce_appframework/gui/components/windows/juce_SplashScreen.cpp @@ -96,7 +96,7 @@ void SplashScreen::show (const String& title, addToDesktop (useDropShadow ? ComponentPeer::windowHasDropShadow : 0); toFront (false); - MessageManager::getInstance()->dispatchPendingMessages(); + MessageManager::getInstance()->runDispatchLoopUntil (300); repaint(); diff --git a/src/juce_appframework/gui/components/windows/juce_TooltipWindow.cpp b/src/juce_appframework/gui/components/windows/juce_TooltipWindow.cpp index a8446f14ad..08e1f16232 100644 --- a/src/juce_appframework/gui/components/windows/juce_TooltipWindow.cpp +++ b/src/juce_appframework/gui/components/windows/juce_TooltipWindow.cpp @@ -58,19 +58,12 @@ TooltipWindow::TooltipWindow (Component* const parentComponent, setOpaque (true); if (parentComponent != 0) - { parentComponent->addChildComponent (this); - } - else - { - setSize (1, 1); // to keep the OS happy by not having zero-size windows - addToDesktop (ComponentPeer::windowHasDropShadow - | ComponentPeer::windowIsTemporary); - } } TooltipWindow::~TooltipWindow() { + hide(); } void TooltipWindow::paint (Graphics& g) @@ -80,7 +73,7 @@ void TooltipWindow::paint (Graphics& g) void TooltipWindow::mouseEnter (const MouseEvent&) { - setVisible (false); + hide(); } void TooltipWindow::showFor (Component* const c) @@ -94,7 +87,7 @@ void TooltipWindow::showFor (Component* const c) if (tip.isEmpty()) { - setVisible (false); + hide(); } else { @@ -119,10 +112,23 @@ void TooltipWindow::showFor (Component* const c) setBounds (x, y, w, h); setVisible (true); + + if (getParentComponent() == 0) + { + addToDesktop (ComponentPeer::windowHasDropShadow + | ComponentPeer::windowIsTemporary); + } + toFront (false); } } +void TooltipWindow::hide() +{ + removeFromDesktop(); + setVisible (false); +} + void TooltipWindow::timerCallback() { int mx, my; @@ -143,7 +149,7 @@ void TooltipWindow::timerCallback() if (isVisible()) { lastHideTime = now; - setVisible (false); + hide(); } changedCompsSinceShown = changedCompsSinceShown || changedComp; diff --git a/src/juce_appframework/gui/components/windows/juce_TooltipWindow.h b/src/juce_appframework/gui/components/windows/juce_TooltipWindow.h index a8b9c2f03b..2fe185ec48 100644 --- a/src/juce_appframework/gui/components/windows/juce_TooltipWindow.h +++ b/src/juce_appframework/gui/components/windows/juce_TooltipWindow.h @@ -111,6 +111,7 @@ private: void timerCallback(); void showFor (Component* const c); + void hide(); TooltipWindow (const TooltipWindow&); const TooltipWindow& operator= (const TooltipWindow&); diff --git a/src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp b/src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp index 5611fa52fa..384d3c0770 100644 --- a/src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp +++ b/src/juce_appframework/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp @@ -926,8 +926,8 @@ static void transformedImageRender (Image& destImage, for (int y = 0; y < destClipH; ++y) { - double sx = srcX - 0.5; - double sy = srcY - 0.5; + double sx = srcX - (srcClipWidth == destClipW ? 0.0 : 0.5); + double sy = srcY - (srcClipHeight == destClipH ? 0.0 : 0.5); DestPixelType* dest = (DestPixelType*) (destPixels + destStride * y); for (int x = 0; x < destClipW; ++x) diff --git a/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp b/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp index 57eac0892f..d2d7bbae42 100644 --- a/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp +++ b/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp @@ -116,7 +116,7 @@ namespace jpeglibNamespace #else #define JPEG_INTERNALS #undef FAR - #include + #include #endif } diff --git a/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_PNGLoader.cpp b/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_PNGLoader.cpp index 35a8381e70..5ebeb58e96 100644 --- a/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_PNGLoader.cpp +++ b/src/juce_appframework/gui/graphics/imaging/image_file_formats/juce_PNGLoader.cpp @@ -38,7 +38,7 @@ namespace zlibNamespace { -#if JUCE_INCLUDE_ZLIB_CODE +#if JUCE_INCLUDE_ZLIB_CODE #undef OS_CODE #undef fdopen #include "../../../../../juce_core/io/streams/zlib/zlib.h" @@ -52,7 +52,7 @@ namespace pnglibNamespace { using namespace zlibNamespace; -#if JUCE_INCLUDE_PNGLIB_CODE +#if JUCE_INCLUDE_PNGLIB_CODE using ::malloc; using ::free; @@ -89,7 +89,7 @@ namespace pnglibNamespace #include #include -#endif +#endif } #ifdef _MSC_VER diff --git a/src/juce_appframework/gui/graphics/imaging/image_file_formats/pnglib/pngrutil.c b/src/juce_appframework/gui/graphics/imaging/image_file_formats/pnglib/pngrutil.c index 56eeef7858..e966a27c56 100644 --- a/src/juce_appframework/gui/graphics/imaging/image_file_formats/pnglib/pngrutil.c +++ b/src/juce_appframework/gui/graphics/imaging/image_file_formats/pnglib/pngrutil.c @@ -2912,7 +2912,7 @@ png_read_finish_row(png_structp png_ptr) char extra; int ret; - png_ptr->zstream.next_out = (Byte *)&extra; + png_ptr->zstream.next_out = (Bytef *)&extra; png_ptr->zstream.avail_out = (uInt)1; for(;;) { diff --git a/src/juce_core/basics/juce_SystemStats.cpp b/src/juce_core/basics/juce_SystemStats.cpp index 7dd3a8ccf2..1edc7c1683 100644 --- a/src/juce_core/basics/juce_SystemStats.cpp +++ b/src/juce_core/basics/juce_SystemStats.cpp @@ -40,6 +40,7 @@ BEGIN_JUCE_NAMESPACE #include "juce_Atomic.h" #include "../threads/juce_Thread.h" #include "../text/juce_LocalisedStrings.h" +#include "../../juce_core/misc/juce_PlatformUtilities.h" void juce_initialiseStrings(); @@ -57,6 +58,10 @@ void JUCE_PUBLIC_FUNCTION initialiseJuce_NonGUI() { if (! juceInitialisedNonGUI) { +#if JUCE_MAC + const ScopedAutoReleasePool pool; +#endif + #ifdef JUCE_DEBUG // Some simple test code to keep an eye on things and make sure these functions // work ok on all platforms. Let me know if any of these assertions fail! @@ -99,6 +104,10 @@ void JUCE_PUBLIC_FUNCTION shutdownJuce_NonGUI() { if (juceInitialisedNonGUI) { +#if JUCE_MAC + const ScopedAutoReleasePool pool; +#endif + #if JUCE_WIN32 // need to shut down sockets if they were used.. if (juce_CloseWin32SocketLib != 0) diff --git a/src/juce_core/io/network/juce_Socket.cpp b/src/juce_core/io/network/juce_Socket.cpp index 5b34850949..eec04353bd 100644 --- a/src/juce_core/io/network/juce_Socket.cpp +++ b/src/juce_core/io/network/juce_Socket.cpp @@ -30,7 +30,6 @@ */ #ifdef _WIN32 - #include "../../../../build/win32/platform_specific_code/win32_headers.h" #include #ifdef _MSC_VER diff --git a/src/juce_core/io/network/juce_URL.cpp b/src/juce_core/io/network/juce_URL.cpp index f9231c9766..f3fa37251f 100644 --- a/src/juce_core/io/network/juce_URL.cpp +++ b/src/juce_core/io/network/juce_URL.cpp @@ -109,9 +109,9 @@ static const String getMangledParameters (const StringPairArray& parameters) if (i > 0) p += T("&"); - p << URL::addEscapeChars (parameters.getAllKeys() [i]) + p << URL::addEscapeChars (parameters.getAllKeys() [i], true) << T("=") - << URL::addEscapeChars (parameters.getAllValues() [i]); + << URL::addEscapeChars (parameters.getAllValues() [i], true); } return p; @@ -495,11 +495,13 @@ const String URL::removeEscapeChars (const String& s) return stringResult; } -const String URL::addEscapeChars (const String& s) +const String URL::addEscapeChars (const String& s, const bool isParameter) { String result; result.preallocateStorage (s.length() + 8); const char* utf8 = s.toUTF8(); + const char* legalChars = isParameter ? "_-.*!'()" + : "_-$.*!'(),"; while (*utf8 != 0) { @@ -510,7 +512,7 @@ const String URL::addEscapeChars (const String& s) result += T('+'); } else if (CharacterFunctions::isLetterOrDigit (c) - || CharacterFunctions::indexOfChar ("_-$.*!'(),", c, false) >= 0) + || CharacterFunctions::indexOfChar (legalChars, c, false) >= 0) { result << c; } diff --git a/src/juce_core/io/network/juce_URL.h b/src/juce_core/io/network/juce_URL.h index 2870ce8f40..6505b1ec08 100644 --- a/src/juce_core/io/network/juce_URL.h +++ b/src/juce_core/io/network/juce_URL.h @@ -223,9 +223,14 @@ public: This is the opposite of removeEscapeChars(). + If isParameter is true, it means that the string is going to be used + as a parameter, so it also encodes '$' and ',' (which would otherwise + be legal in a URL. + @see removeEscapeChars */ - static const String addEscapeChars (const String& stringToAddEscapeCharsTo); + static const String addEscapeChars (const String& stringToAddEscapeCharsTo, + const bool isParameter); /** Replaces any escape character sequences in a string with their original character codes. diff --git a/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp b/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp index 84e9537ac1..bae0c5254b 100644 --- a/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp +++ b/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp @@ -33,7 +33,7 @@ namespace zlibNamespace { -#if JUCE_INCLUDE_ZLIB_CODE +#if JUCE_INCLUDE_ZLIB_CODE #undef OS_CODE #undef fdopen #include "zlib/zlib.h" diff --git a/src/juce_core/misc/juce_PlatformUtilities.h b/src/juce_core/misc/juce_PlatformUtilities.h index 2320aa8d84..e64f1df004 100644 --- a/src/juce_core/misc/juce_PlatformUtilities.h +++ b/src/juce_core/misc/juce_PlatformUtilities.h @@ -54,23 +54,12 @@ public: #if JUCE_MAC || DOXYGEN //============================================================================== - /** MAC ONLY - Turns a String into a pascal string. */ - static void copyToStr255 (Str255& d, const String& s); - /** MAC ONLY - Turns a String into a pascal string. */ - static void copyToStr63 (Str63& d, const String& s); - /** MAC ONLY - Turns a Core CF String into a juce one. */ static const String cfStringToJuceString (CFStringRef cfString); /** MAC ONLY - Turns a juce string into a Core CF one. */ static CFStringRef juceStringToCFString (const String& s); - /** MAC ONLY - Converts a UTF16 string to a Juce String. */ - static const String convertUTF16ToString (const UniChar* utf16); - - /** MAC ONLY - Turns a file path into an FSSpec, returning true if it succeeds. */ - static bool makeFSSpecFromPath (FSSpec* destFSSpec, const String& path); - /** MAC ONLY - Turns a file path into an FSRef, returning true if it succeeds. */ static bool makeFSRefFromPath (FSRef* destFSRef, const String& path); @@ -153,6 +142,35 @@ public: static void fpuReset(); +#if JUCE_LINUX || JUCE_WIN32 + //============================================================================== + /** Loads a dynamically-linked library into the process's address space. + + @param pathOrFilename the platform-dependent name and search path + @returns a handle which can be used by getProcedureEntryPoint(), or + zero if it fails. + @see freeDynamicLibrary, getProcedureEntryPoint + */ + static void* loadDynamicLibrary (const String& pathOrFilename); + + /** Frees a dynamically-linked library. + + @param libraryHandle a handle created by loadDynamicLibrary + @see loadDynamicLibrary, getProcedureEntryPoint + */ + static void freeDynamicLibrary (void* libraryHandle); + + /** Finds a procedure call in a dynamically-linked library. + + @param libraryHandle a library handle returned by loadDynamicLibrary + @param procedureName the name of the procedure call to try to load + @returns a pointer to the function if found, or 0 if it fails + @see loadDynamicLibrary + */ + static void* getProcedureEntryPoint (void* libraryHandle, + const String& procedureName); +#endif + #if JUCE_LINUX || DOXYGEN //============================================================================== @@ -162,6 +180,20 @@ public: #if JUCE_MAC +//============================================================================== +/** A handy C++ wrapper that creates and deletes an NSAutoreleasePool object + using RAII. +*/ +class ScopedAutoReleasePool +{ +public: + ScopedAutoReleasePool(); + ~ScopedAutoReleasePool(); + +private: + void* pool; +}; + //============================================================================== /** A wrapper class for picking up events from an Apple IR remote control device. diff --git a/src/juce_core/text/juce_XmlElement.cpp b/src/juce_core/text/juce_XmlElement.cpp index d0b2be54e8..e94c94880c 100644 --- a/src/juce_core/text/juce_XmlElement.cpp +++ b/src/juce_core/text/juce_XmlElement.cpp @@ -267,7 +267,8 @@ static void writeSpaces (OutputStream& out, int numSpaces) throw() } void XmlElement::writeElementAsText (OutputStream& outputStream, - const int indentationLevel) const throw() + const int indentationLevel, + const int lineWrapLength) const throw() { writeSpaces (outputStream, indentationLevel); @@ -283,7 +284,7 @@ void XmlElement::writeElementAsText (OutputStream& outputStream, const XmlAttributeNode* att = attributes; while (att != 0) { - if (lineLen > 60 && indentationLevel >= 0) + if (lineLen > lineWrapLength && indentationLevel >= 0) { outputStream.write ("\r\n", 2); writeSpaces (outputStream, attIndent); @@ -336,11 +337,11 @@ void XmlElement::writeElementAsText (OutputStream& outputStream, if (lastWasTextNode) outputStream.write ("\r\n", 2); - child->writeElementAsText (outputStream, indentationLevel + 2); + child->writeElementAsText (outputStream, indentationLevel + 2, lineWrapLength); } else { - child->writeElementAsText (outputStream, indentationLevel); + child->writeElementAsText (outputStream, indentationLevel, lineWrapLength); } lastWasTextNode = false; @@ -386,7 +387,8 @@ void XmlElement::writeElementAsText (OutputStream& outputStream, const String XmlElement::createDocument (const String& dtd, const bool allOnOneLine, const bool includeXmlHeader, - const tchar* const encoding) const throw() + const tchar* const encoding, + const int lineWrapLength) const throw() { String doc; doc.preallocateStorage (1024); @@ -411,7 +413,7 @@ const String XmlElement::createDocument (const String& dtd, } MemoryOutputStream mem (2048, 4096); - writeElementAsText (mem, allOnOneLine ? -1 : 0); + writeElementAsText (mem, allOnOneLine ? -1 : 0, lineWrapLength); return doc + String (mem.getData(), mem.getDataSize()); @@ -419,7 +421,8 @@ const String XmlElement::createDocument (const String& dtd, bool XmlElement::writeToFile (const File& f, const String& dtd, - const tchar* const encoding) const throw() + const tchar* const encoding, + const int lineWrapLength) const throw() { if (f.hasWriteAccess()) { @@ -432,7 +435,7 @@ bool XmlElement::writeToFile (const File& f, *out << "\r\n\r\n" << dtd << "\r\n"; - writeElementAsText (*out, 0); + writeElementAsText (*out, 0, lineWrapLength); delete out; diff --git a/src/juce_core/text/juce_XmlElement.h b/src/juce_core/text/juce_XmlElement.h index 713f90ed60..4ae166b602 100644 --- a/src/juce_core/text/juce_XmlElement.h +++ b/src/juce_core/text/juce_XmlElement.h @@ -190,12 +190,16 @@ public: document @param encodingType the character encoding format string to put into the xml header + @param lineWrapLength the line length that will be used before items get placed on + a new line. This isn't an absolute maximum length, it just + determines how lists of attributes get broken up @see writeToFile */ const String createDocument (const String& dtdToUse, const bool allOnOneLine = false, const bool includeXmlHeader = true, - const tchar* const encodingType = JUCE_T("UTF-8")) const throw(); + const tchar* const encodingType = JUCE_T("UTF-8"), + const int lineWrapLength = 60) const throw(); /** Writes the element to a file as an XML document. @@ -209,13 +213,17 @@ public: @param dtdToUse the DTD to add to the document @param encodingType the character encoding format string to put into the xml header + @param lineWrapLength the line length that will be used before items get placed on + a new line. This isn't an absolute maximum length, it just + determines how lists of attributes get broken up @returns true if the file is written successfully; false if something goes wrong in the process @see createDocument */ bool writeToFile (const File& destinationFile, const String& dtdToUse, - const tchar* const encodingType = JUCE_T("UTF-8")) const throw(); + const tchar* const encodingType = JUCE_T("UTF-8"), + const int lineWrapLength = 60) const throw(); //============================================================================== /** Returns this element's tag type name. @@ -675,7 +683,9 @@ private: void copyChildrenAndAttributesFrom (const XmlElement& other) throw(); - void writeElementAsText (OutputStream& out, const int indentationLevel) const throw(); + void writeElementAsText (OutputStream& out, + const int indentationLevel, + const int lineWrapLength) const throw(); XmlElement** getChildElementsAsArray (const int) const throw(); void reorderChildElements (XmlElement** const, const int) throw(); diff --git a/src/juce_core/threads/juce_Process.h b/src/juce_core/threads/juce_Process.h index 0b52eef848..62729e1f69 100644 --- a/src/juce_core/threads/juce_Process.h +++ b/src/juce_core/threads/juce_Process.h @@ -97,34 +97,6 @@ public: /** Returns true if this process is being hosted by a debugger. */ static bool JUCE_CALLTYPE isRunningUnderDebugger() throw(); - - //============================================================================== - /** Loads a dynamically-linked library into the process's address space. - - @param pathOrFilename the platform-dependent name and search path - @returns a handle which can be used by getProcedureEntryPoint(), or - zero if it fails. - @see freeDynamicLibrary, getProcedureEntryPoint - */ - static void* loadDynamicLibrary (const String& pathOrFilename); - - /** Frees a dynamically-linked library. - - @param libraryHandle a handle created by loadDynamicLibrary - @see loadDynamicLibrary, getProcedureEntryPoint - */ - static void freeDynamicLibrary (void* libraryHandle); - - /** Finds a procedure call in a dynamically-linked library. - - @param libraryHandle a library handle returned by loadDynamicLibrary - @param procedureName the name of the procedure call to try to load - @returns a pointer to the function if found, or 0 if it fails - @see loadDynamicLibrary - */ - static void* getProcedureEntryPoint (void* libraryHandle, - const String& procedureName); - }; diff --git a/src/juce_core/threads/juce_ReadWriteLock.cpp b/src/juce_core/threads/juce_ReadWriteLock.cpp index 7a62680b83..a43a19e7c6 100644 --- a/src/juce_core/threads/juce_ReadWriteLock.cpp +++ b/src/juce_core/threads/juce_ReadWriteLock.cpp @@ -56,7 +56,7 @@ ReadWriteLock::~ReadWriteLock() throw() //============================================================================== void ReadWriteLock::enterRead() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); for (;;) @@ -92,14 +92,14 @@ void ReadWriteLock::enterRead() const throw() void ReadWriteLock::exitRead() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); for (int i = 0; i < readerThreads.size(); i += 2) { if (readerThreads.getUnchecked(i) == threadId) { - const int newCount = readerThreads.getUnchecked (i + 1) - 1; + const int newCount = ((int) readerThreads.getUnchecked (i + 1)) - 1; if (newCount == 0) { @@ -121,7 +121,7 @@ void ReadWriteLock::exitRead() const throw() //============================================================================== void ReadWriteLock::enterWrite() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); for (;;) @@ -146,7 +146,7 @@ void ReadWriteLock::enterWrite() const throw() bool ReadWriteLock::tryEnterWrite() const throw() { - const int threadId = Thread::getCurrentThreadId(); + const int64 threadId = Thread::getCurrentThreadId(); const ScopedLock sl (accessLock); if (readerThreads.size() + numWriters == 0 diff --git a/src/juce_core/threads/juce_ReadWriteLock.h b/src/juce_core/threads/juce_ReadWriteLock.h index 258221d8bd..2ca4f78541 100644 --- a/src/juce_core/threads/juce_ReadWriteLock.h +++ b/src/juce_core/threads/juce_ReadWriteLock.h @@ -134,8 +134,8 @@ private: CriticalSection accessLock; WaitableEvent waitEvent; mutable int numWaitingWriters, numWriters; - mutable int writerThreadId; - mutable Array readerThreads; + mutable int64 writerThreadId; + mutable Array readerThreads; ReadWriteLock (const ReadWriteLock&); const ReadWriteLock& operator= (const ReadWriteLock&); diff --git a/src/juce_core/threads/juce_Thread.cpp b/src/juce_core/threads/juce_Thread.cpp index f4234ecd0a..7ac476dc6b 100644 --- a/src/juce_core/threads/juce_Thread.cpp +++ b/src/juce_core/threads/juce_Thread.cpp @@ -225,7 +225,7 @@ void Thread::setAffinityMask (const uint32 affinityMask) throw() affinityMask_ = affinityMask; } -int Thread::getThreadId() const throw() +int64 Thread::getThreadId() const throw() { return threadId_; } @@ -249,7 +249,7 @@ int Thread::getNumRunningThreads() throw() Thread* Thread::getCurrentThread() throw() { - const int thisId = getCurrentThreadId(); + const int64 thisId = getCurrentThreadId(); Thread* result = 0; runningThreadsLock.enter(); diff --git a/src/juce_core/threads/juce_Thread.h b/src/juce_core/threads/juce_Thread.h index 0c8806661b..a8a3926c32 100644 --- a/src/juce_core/threads/juce_Thread.h +++ b/src/juce_core/threads/juce_Thread.h @@ -223,7 +223,7 @@ public: @returns a unique identifier that identifies the calling thread. @see getThreadId */ - static int getCurrentThreadId() throw(); + static int64 getCurrentThreadId() throw(); /** Finds the thread object that is currently running. @@ -241,7 +241,7 @@ public: @see getCurrentThreadId */ - int getThreadId() const throw(); + int64 getThreadId() const throw(); /** Returns the name of the thread. @@ -273,7 +273,8 @@ private: CriticalSection startStopLock; WaitableEvent startSuspensionEvent_, defaultEvent_; - int threadPriority_, threadId_; + int threadPriority_; + int64 threadId_; uint32 affinityMask_; bool volatile threadShouldExit_; diff --git a/src/juce_core_includes.h b/src/juce_core_includes.h index 14291fc3d2..5438978091 100644 --- a/src/juce_core_includes.h +++ b/src/juce_core_includes.h @@ -32,56 +32,53 @@ #ifndef __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__ #define __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__ -#ifndef __JUCE_ATOMIC_JUCEHEADER__ - #include "juce_core/basics/juce_Atomic.h" -#endif -#ifndef __JUCE_DATACONVERSIONS_JUCEHEADER__ - #include "juce_core/basics/juce_DataConversions.h" -#endif -#ifndef __JUCE_FILELOGGER_JUCEHEADER__ - #include "juce_core/basics/juce_FileLogger.h" -#endif -#ifndef __JUCE_INITIALISATION_JUCEHEADER__ - #include "juce_core/basics/juce_Initialisation.h" -#endif -#ifndef __JUCE_LOGGER_JUCEHEADER__ - #include "juce_core/basics/juce_Logger.h" -#endif -#ifndef __JUCE_MATHSFUNCTIONS_JUCEHEADER__ - #include "juce_core/basics/juce_MathsFunctions.h" -#endif -#ifndef __JUCE_MEMORY_JUCEHEADER__ - #include "juce_core/basics/juce_Memory.h" -#endif -#ifndef __JUCE_PLATFORMDEFS_JUCEHEADER__ - #include "juce_core/basics/juce_PlatformDefs.h" -#endif -#ifndef __JUCE_RANDOM_JUCEHEADER__ - #include "juce_core/basics/juce_Random.h" -#endif -#ifndef __JUCE_RELATIVETIME_JUCEHEADER__ - #include "juce_core/basics/juce_RelativeTime.h" -#endif #ifndef __JUCE_SINGLETON_JUCEHEADER__ #include "juce_core/basics/juce_Singleton.h" #endif -#ifndef __JUCE_STANDARDHEADER_JUCEHEADER__ - #include "juce_core/basics/juce_StandardHeader.h" -#endif #ifndef __JUCE_SYSTEMSTATS_JUCEHEADER__ #include "juce_core/basics/juce_SystemStats.h" #endif +#ifndef __JUCE_MATHSFUNCTIONS_JUCEHEADER__ + #include "juce_core/basics/juce_MathsFunctions.h" +#endif +#ifndef __JUCE_PLATFORMDEFS_JUCEHEADER__ + #include "juce_core/basics/juce_PlatformDefs.h" +#endif +#ifndef __JUCE_ATOMIC_JUCEHEADER__ + #include "juce_core/basics/juce_Atomic.h" +#endif +#ifndef __JUCE_LOGGER_JUCEHEADER__ + #include "juce_core/basics/juce_Logger.h" +#endif +#ifndef __JUCE_FILELOGGER_JUCEHEADER__ + #include "juce_core/basics/juce_FileLogger.h" +#endif +#ifndef __JUCE_RANDOM_JUCEHEADER__ + #include "juce_core/basics/juce_Random.h" +#endif +#ifndef __JUCE_INITIALISATION_JUCEHEADER__ + #include "juce_core/basics/juce_Initialisation.h" +#endif +#ifndef __JUCE_STANDARDHEADER_JUCEHEADER__ + #include "juce_core/basics/juce_StandardHeader.h" +#endif +#ifndef __JUCE_RELATIVETIME_JUCEHEADER__ + #include "juce_core/basics/juce_RelativeTime.h" +#endif #ifndef __JUCE_TIME_JUCEHEADER__ #include "juce_core/basics/juce_Time.h" #endif -#ifndef __JUCE_ARRAY_JUCEHEADER__ - #include "juce_core/containers/juce_Array.h" +#ifndef __JUCE_DATACONVERSIONS_JUCEHEADER__ + #include "juce_core/basics/juce_DataConversions.h" #endif -#ifndef __JUCE_ARRAYALLOCATIONBASE_JUCEHEADER__ - #include "juce_core/containers/juce_ArrayAllocationBase.h" +#ifndef __JUCE_MEMORY_JUCEHEADER__ + #include "juce_core/basics/juce_Memory.h" #endif -#ifndef __JUCE_BITARRAY_JUCEHEADER__ - #include "juce_core/containers/juce_BitArray.h" +#ifndef __JUCE_PROPERTYSET_JUCEHEADER__ + #include "juce_core/containers/juce_PropertySet.h" +#endif +#ifndef __JUCE_VOIDARRAY_JUCEHEADER__ + #include "juce_core/containers/juce_VoidArray.h" #endif #ifndef __JUCE_ELEMENTCOMPARATOR_JUCEHEADER__ #include "juce_core/containers/juce_ElementComparator.h" @@ -89,26 +86,29 @@ #ifndef __JUCE_MEMORYBLOCK_JUCEHEADER__ #include "juce_core/containers/juce_MemoryBlock.h" #endif -#ifndef __JUCE_OWNEDARRAY_JUCEHEADER__ - #include "juce_core/containers/juce_OwnedArray.h" -#endif -#ifndef __JUCE_PROPERTYSET_JUCEHEADER__ - #include "juce_core/containers/juce_PropertySet.h" -#endif -#ifndef __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ - #include "juce_core/containers/juce_ReferenceCountedArray.h" -#endif #ifndef __JUCE_REFERENCECOUNTEDOBJECT_JUCEHEADER__ #include "juce_core/containers/juce_ReferenceCountedObject.h" #endif -#ifndef __JUCE_SORTEDSET_JUCEHEADER__ - #include "juce_core/containers/juce_SortedSet.h" -#endif #ifndef __JUCE_SPARSESET_JUCEHEADER__ #include "juce_core/containers/juce_SparseSet.h" #endif -#ifndef __JUCE_VOIDARRAY_JUCEHEADER__ - #include "juce_core/containers/juce_VoidArray.h" +#ifndef __JUCE_OWNEDARRAY_JUCEHEADER__ + #include "juce_core/containers/juce_OwnedArray.h" +#endif +#ifndef __JUCE_SORTEDSET_JUCEHEADER__ + #include "juce_core/containers/juce_SortedSet.h" +#endif +#ifndef __JUCE_BITARRAY_JUCEHEADER__ + #include "juce_core/containers/juce_BitArray.h" +#endif +#ifndef __JUCE_ARRAY_JUCEHEADER__ + #include "juce_core/containers/juce_Array.h" +#endif +#ifndef __JUCE_ARRAYALLOCATIONBASE_JUCEHEADER__ + #include "juce_core/containers/juce_ArrayAllocationBase.h" +#endif +#ifndef __JUCE_REFERENCECOUNTEDARRAY_JUCEHEADER__ + #include "juce_core/containers/juce_ReferenceCountedArray.h" #endif #ifndef __JUCE_INPUTSTREAM_JUCEHEADER__ #include "juce_core/io/juce_InputStream.h" @@ -116,18 +116,18 @@ #ifndef __JUCE_OUTPUTSTREAM_JUCEHEADER__ #include "juce_core/io/juce_OutputStream.h" #endif -#ifndef __JUCE_DIRECTORYITERATOR_JUCEHEADER__ - #include "juce_core/io/files/juce_DirectoryIterator.h" -#endif -#ifndef __JUCE_FILE_JUCEHEADER__ - #include "juce_core/io/files/juce_File.h" -#endif #ifndef __JUCE_FILEINPUTSTREAM_JUCEHEADER__ #include "juce_core/io/files/juce_FileInputStream.h" #endif #ifndef __JUCE_FILEOUTPUTSTREAM_JUCEHEADER__ #include "juce_core/io/files/juce_FileOutputStream.h" #endif +#ifndef __JUCE_DIRECTORYITERATOR_JUCEHEADER__ + #include "juce_core/io/files/juce_DirectoryIterator.h" +#endif +#ifndef __JUCE_FILE_JUCEHEADER__ + #include "juce_core/io/files/juce_File.h" +#endif #ifndef __JUCE_FILESEARCHPATH_JUCEHEADER__ #include "juce_core/io/files/juce_FileSearchPath.h" #endif @@ -137,38 +137,20 @@ #ifndef __JUCE_BLOWFISH_JUCEHEADER__ #include "juce_core/cryptography/juce_BlowFish.h" #endif -#ifndef __JUCE_MD5_JUCEHEADER__ - #include "juce_core/cryptography/juce_MD5.h" -#endif #ifndef __JUCE_PRIMES_JUCEHEADER__ #include "juce_core/cryptography/juce_Primes.h" #endif +#ifndef __JUCE_MD5_JUCEHEADER__ + #include "juce_core/cryptography/juce_MD5.h" +#endif #ifndef __JUCE_RSAKEY_JUCEHEADER__ #include "juce_core/cryptography/juce_RSAKey.h" #endif -#ifndef __JUCE_SOCKET_JUCEHEADER__ - #include "juce_core/io/network/juce_Socket.h" -#endif #ifndef __JUCE_URL_JUCEHEADER__ #include "juce_core/io/network/juce_URL.h" #endif -#ifndef __JUCE_BUFFEREDINPUTSTREAM_JUCEHEADER__ - #include "juce_core/io/streams/juce_BufferedInputStream.h" -#endif -#ifndef __JUCE_FILEINPUTSOURCE_JUCEHEADER__ - #include "juce_core/io/streams/juce_FileInputSource.h" -#endif -#ifndef __JUCE_GZIPCOMPRESSOROUTPUTSTREAM_JUCEHEADER__ - #include "juce_core/io/streams/juce_GZIPCompressorOutputStream.h" -#endif -#ifndef __JUCE_GZIPDECOMPRESSORINPUTSTREAM_JUCEHEADER__ - #include "juce_core/io/streams/juce_GZIPDecompressorInputStream.h" -#endif -#ifndef __JUCE_INPUTSOURCE_JUCEHEADER__ - #include "juce_core/io/streams/juce_InputSource.h" -#endif -#ifndef __JUCE_MEMORYINPUTSTREAM_JUCEHEADER__ - #include "juce_core/io/streams/juce_MemoryInputStream.h" +#ifndef __JUCE_SOCKET_JUCEHEADER__ + #include "juce_core/io/network/juce_Socket.h" #endif #ifndef __JUCE_MEMORYOUTPUTSTREAM_JUCEHEADER__ #include "juce_core/io/streams/juce_MemoryOutputStream.h" @@ -176,65 +158,56 @@ #ifndef __JUCE_SUBREGIONSTREAM_JUCEHEADER__ #include "juce_core/io/streams/juce_SubregionStream.h" #endif +#ifndef __JUCE_BUFFEREDINPUTSTREAM_JUCEHEADER__ + #include "juce_core/io/streams/juce_BufferedInputStream.h" +#endif +#ifndef __JUCE_FILEINPUTSOURCE_JUCEHEADER__ + #include "juce_core/io/streams/juce_FileInputSource.h" +#endif +#ifndef __JUCE_INPUTSOURCE_JUCEHEADER__ + #include "juce_core/io/streams/juce_InputSource.h" +#endif +#ifndef __JUCE_GZIPCOMPRESSOROUTPUTSTREAM_JUCEHEADER__ + #include "juce_core/io/streams/juce_GZIPCompressorOutputStream.h" +#endif +#ifndef __JUCE_GZIPDECOMPRESSORINPUTSTREAM_JUCEHEADER__ + #include "juce_core/io/streams/juce_GZIPDecompressorInputStream.h" +#endif +#ifndef __JUCE_MEMORYINPUTSTREAM_JUCEHEADER__ + #include "juce_core/io/streams/juce_MemoryInputStream.h" +#endif #ifndef __JUCE_PERFORMANCECOUNTER_JUCEHEADER__ #include "juce_core/misc/juce_PerformanceCounter.h" #endif +#ifndef __JUCE_ZIPFILE_JUCEHEADER__ + #include "juce_core/misc/juce_ZipFile.h" +#endif #ifndef __JUCE_PLATFORMUTILITIES_JUCEHEADER__ #include "juce_core/misc/juce_PlatformUtilities.h" #endif #ifndef __JUCE_UUID_JUCEHEADER__ #include "juce_core/misc/juce_Uuid.h" #endif -#ifndef __JUCE_ZIPFILE_JUCEHEADER__ - #include "juce_core/misc/juce_ZipFile.h" +#ifndef __JUCE_XMLELEMENT_JUCEHEADER__ + #include "juce_core/text/juce_XmlElement.h" #endif #ifndef __JUCE_CHARACTERFUNCTIONS_JUCEHEADER__ #include "juce_core/text/juce_CharacterFunctions.h" #endif -#ifndef __JUCE_LOCALISEDSTRINGS_JUCEHEADER__ - #include "juce_core/text/juce_LocalisedStrings.h" -#endif -#ifndef __JUCE_STRING_JUCEHEADER__ - #include "juce_core/text/juce_String.h" -#endif #ifndef __JUCE_STRINGARRAY_JUCEHEADER__ #include "juce_core/text/juce_StringArray.h" #endif -#ifndef __JUCE_STRINGPAIRARRAY_JUCEHEADER__ - #include "juce_core/text/juce_StringPairArray.h" +#ifndef __JUCE_LOCALISEDSTRINGS_JUCEHEADER__ + #include "juce_core/text/juce_LocalisedStrings.h" #endif #ifndef __JUCE_XMLDOCUMENT_JUCEHEADER__ #include "juce_core/text/juce_XmlDocument.h" #endif -#ifndef __JUCE_XMLELEMENT_JUCEHEADER__ - #include "juce_core/text/juce_XmlElement.h" +#ifndef __JUCE_STRINGPAIRARRAY_JUCEHEADER__ + #include "juce_core/text/juce_StringPairArray.h" #endif -#ifndef __JUCE_CRITICALSECTION_JUCEHEADER__ - #include "juce_core/threads/juce_CriticalSection.h" -#endif -#ifndef __JUCE_INTERPROCESSLOCK_JUCEHEADER__ - #include "juce_core/threads/juce_InterProcessLock.h" -#endif -#ifndef __JUCE_PROCESS_JUCEHEADER__ - #include "juce_core/threads/juce_Process.h" -#endif -#ifndef __JUCE_READWRITELOCK_JUCEHEADER__ - #include "juce_core/threads/juce_ReadWriteLock.h" -#endif -#ifndef __JUCE_SCOPEDLOCK_JUCEHEADER__ - #include "juce_core/threads/juce_ScopedLock.h" -#endif -#ifndef __JUCE_SCOPEDREADLOCK_JUCEHEADER__ - #include "juce_core/threads/juce_ScopedReadLock.h" -#endif -#ifndef __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ - #include "juce_core/threads/juce_ScopedTryLock.h" -#endif -#ifndef __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ - #include "juce_core/threads/juce_ScopedWriteLock.h" -#endif -#ifndef __JUCE_THREAD_JUCEHEADER__ - #include "juce_core/threads/juce_Thread.h" +#ifndef __JUCE_STRING_JUCEHEADER__ + #include "juce_core/text/juce_String.h" #endif #ifndef __JUCE_THREADPOOL_JUCEHEADER__ #include "juce_core/threads/juce_ThreadPool.h" @@ -242,8 +215,35 @@ #ifndef __JUCE_TIMESLICETHREAD_JUCEHEADER__ #include "juce_core/threads/juce_TimeSliceThread.h" #endif +#ifndef __JUCE_CRITICALSECTION_JUCEHEADER__ + #include "juce_core/threads/juce_CriticalSection.h" +#endif +#ifndef __JUCE_SCOPEDREADLOCK_JUCEHEADER__ + #include "juce_core/threads/juce_ScopedReadLock.h" +#endif +#ifndef __JUCE_PROCESS_JUCEHEADER__ + #include "juce_core/threads/juce_Process.h" +#endif +#ifndef __JUCE_THREAD_JUCEHEADER__ + #include "juce_core/threads/juce_Thread.h" +#endif +#ifndef __JUCE_SCOPEDTRYLOCK_JUCEHEADER__ + #include "juce_core/threads/juce_ScopedTryLock.h" +#endif +#ifndef __JUCE_SCOPEDLOCK_JUCEHEADER__ + #include "juce_core/threads/juce_ScopedLock.h" +#endif +#ifndef __JUCE_INTERPROCESSLOCK_JUCEHEADER__ + #include "juce_core/threads/juce_InterProcessLock.h" +#endif #ifndef __JUCE_WAITABLEEVENT_JUCEHEADER__ #include "juce_core/threads/juce_WaitableEvent.h" #endif +#ifndef __JUCE_READWRITELOCK_JUCEHEADER__ + #include "juce_core/threads/juce_ReadWriteLock.h" +#endif +#ifndef __JUCE_SCOPEDWRITELOCK_JUCEHEADER__ + #include "juce_core/threads/juce_ScopedWriteLock.h" +#endif #endif