| @@ -66,7 +66,9 @@ public: | |||||
| /** Creates an audio thumbnail. | /** Creates an audio thumbnail. | ||||
| @param sourceSamplesPerThumbnailSample when creating a stored, low-res version | @param sourceSamplesPerThumbnailSample when creating a stored, low-res version | ||||
| of the audio data, this is the scale at which it should be done | |||||
| of the audio data, this is the scale at which it should be done. (This | |||||
| number is the number of original samples that will be averaged for each | |||||
| low-res sample) | |||||
| @param formatManagerToUse the audio format manager that is used to open the file | @param formatManagerToUse the audio format manager that is used to open the file | ||||
| @param cacheToUse an instance of an AudioThumbnailCache - this provides a background | @param cacheToUse an instance of an AudioThumbnailCache - this provides a background | ||||
| thread and storage that is used to by the thumbnail, and the cache | thread and storage that is used to by the thumbnail, and the cache | ||||
| @@ -113,7 +115,7 @@ public: | |||||
| */ | */ | ||||
| int getNumChannels() const throw(); | int getNumChannels() const throw(); | ||||
| /** Returns the length of the audio file. | |||||
| /** Returns the length of the audio file, in seconds. | |||||
| */ | */ | ||||
| double getTotalLength() const throw(); | double getTotalLength() const throw(); | ||||
| @@ -129,8 +131,8 @@ public: | |||||
| */ | */ | ||||
| void drawChannel (Graphics& g, | void drawChannel (Graphics& g, | ||||
| int x, int y, int w, int h, | int x, int y, int w, int h, | ||||
| double startTime, | |||||
| double endTime, | |||||
| double startTimeSeconds, | |||||
| double endTimeSeconds, | |||||
| int channelNum, | int channelNum, | ||||
| const float verticalZoomFactor); | const float verticalZoomFactor); | ||||
| @@ -371,7 +371,7 @@ bool DrawablePath::readXml (const XmlElement& xml) | |||||
| const String jointStyle (xml.getStringAttribute (T("jointStyle"), String::empty)); | const String jointStyle (xml.getStringAttribute (T("jointStyle"), String::empty)); | ||||
| const String endStyle (xml.getStringAttribute (T("capStyle"), String::empty)); | const String endStyle (xml.getStringAttribute (T("capStyle"), String::empty)); | ||||
| strokeType = PathStrokeType (xml.getDoubleAttribute (T("strokeWidth"), 0.0), | |||||
| strokeType = PathStrokeType ((float) xml.getDoubleAttribute (T("strokeWidth"), 0.0), | |||||
| jointStyle.equalsIgnoreCase (T("curved")) ? PathStrokeType::curved | jointStyle.equalsIgnoreCase (T("curved")) ? PathStrokeType::curved | ||||
| : (jointStyle.equalsIgnoreCase (T("bevel")) ? PathStrokeType::beveled | : (jointStyle.equalsIgnoreCase (T("bevel")) ? PathStrokeType::beveled | ||||
| : PathStrokeType::mitered), | : PathStrokeType::mitered), | ||||
| @@ -33,7 +33,11 @@ using namespace JUCE_NAMESPACE; | |||||
| #define JuceFileChooserDelegate MakeObjCClassName(JuceFileChooserDelegate) | #define JuceFileChooserDelegate MakeObjCClassName(JuceFileChooserDelegate) | ||||
| #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | |||||
| @interface JuceFileChooserDelegate : NSObject <NSOpenSavePanelDelegate> | |||||
| #else | |||||
| @interface JuceFileChooserDelegate : NSObject | @interface JuceFileChooserDelegate : NSObject | ||||
| #endif | |||||
| { | { | ||||
| StringArray* filters; | StringArray* filters; | ||||
| } | } | ||||
| @@ -151,9 +151,15 @@ bool juce_copyFile (const String& src, const String& dst) throw() | |||||
| NSFileManager* fm = [NSFileManager defaultManager]; | NSFileManager* fm = [NSFileManager defaultManager]; | ||||
| return [fm fileExistsAtPath: juceStringToNS (src)] | return [fm fileExistsAtPath: juceStringToNS (src)] | ||||
| #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | |||||
| && [fm copyItemAtPath: juceStringToNS (src) | |||||
| toPath: juceStringToNS (dst) | |||||
| error: nil]; | |||||
| #else | |||||
| && [fm copyPath: juceStringToNS (src) | && [fm copyPath: juceStringToNS (src) | ||||
| toPath: juceStringToNS (dst) | toPath: juceStringToNS (dst) | ||||
| handler: nil]; | handler: nil]; | ||||
| #endif | |||||
| } | } | ||||
| const StringArray juce_getFileSystemRoots() throw() | const StringArray juce_getFileSystemRoots() throw() | ||||
| @@ -35,7 +35,11 @@ using namespace JUCE_NAMESPACE; | |||||
| #define JuceMenuCallback MakeObjCClassName(JuceMenuCallback) | #define JuceMenuCallback MakeObjCClassName(JuceMenuCallback) | ||||
| #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | |||||
| @interface JuceMenuCallback : NSObject <NSMenuDelegate> | |||||
| #else | |||||
| @interface JuceMenuCallback : NSObject | @interface JuceMenuCallback : NSObject | ||||
| #endif | |||||
| { | { | ||||
| JuceMainMenuHandler* owner; | JuceMainMenuHandler* owner; | ||||
| } | } | ||||
| @@ -149,7 +149,9 @@ void Desktop::setMousePosition (int x, int y) throw() | |||||
| // this rubbish needs to be done around the warp call, to avoid causing a | // this rubbish needs to be done around the warp call, to avoid causing a | ||||
| // bizarre glitch.. | // bizarre glitch.. | ||||
| CGAssociateMouseAndMouseCursorPosition (false); | CGAssociateMouseAndMouseCursorPosition (false); | ||||
| #if (! defined (MAC_OS_X_VERSION_10_6)) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 | |||||
| CGSetLocalEventsSuppressionInterval (0); | CGSetLocalEventsSuppressionInterval (0); | ||||
| #endif | |||||
| CGPoint pos = { x, y }; | CGPoint pos = { x, y }; | ||||
| CGWarpMouseCursorPosition (pos); | CGWarpMouseCursorPosition (pos); | ||||
| @@ -215,8 +217,13 @@ void Desktop::setScreenSaverEnabled (const bool isEnabled) throw() | |||||
| { | { | ||||
| if (screenSaverDisablerID == 0) | if (screenSaverDisablerID == 0) | ||||
| { | { | ||||
| IOPMAssertionCreate (kIOPMAssertionTypeNoIdleSleep, | |||||
| kIOPMAssertionLevelOn, &screenSaverDisablerID); | |||||
| #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | |||||
| IOPMAssertionCreateWithName (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, | |||||
| CFSTR ("Juce"), &screenSaverDisablerID); | |||||
| #else | |||||
| IOPMAssertionCreate (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, | |||||
| &screenSaverDisablerID); | |||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -91,7 +91,11 @@ END_JUCE_NAMESPACE | |||||
| //============================================================================== | //============================================================================== | ||||
| #define JuceNSWindow MakeObjCClassName(JuceNSWindow) | #define JuceNSWindow MakeObjCClassName(JuceNSWindow) | ||||
| #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | |||||
| @interface JuceNSWindow : NSWindow <NSWindowDelegate> | |||||
| #else | |||||
| @interface JuceNSWindow : NSWindow | @interface JuceNSWindow : NSWindow | ||||
| #endif | |||||
| { | { | ||||
| @private | @private | ||||
| NSViewComponentPeer* owner; | NSViewComponentPeer* owner; | ||||