| @@ -241,6 +241,9 @@ any compilation problems if, for example, you don't have the appropriate SDK for | |||
| - As for the PC, you'll need to make sure your project contains a correctly set-up JucePluginCharacteristics.h | |||
| file - start with a copy of the one in the demo plugin project, and go through it making sure that | |||
| all the values make sense for your plugin. | |||
| - The JucePluginCharacteristics.h file is included not only by the code, but also by the resources files - so it | |||
| needs to be locatable on both your normal header search path, and also on your resource include path, which is | |||
| the project setting called 'Rez Search Paths' | |||
| - Because of the flat naming structure used by Objective-C, if a host loads several different plugins which | |||
| all contain slightly different versions of the juce library, you can get nasty situations where all their obj-C | |||
| classes are cross-linked to the similarly-named class in other modules, and everything turns into a big mess... | |||
| @@ -782,6 +782,18 @@ public: | |||
| setEmbeddedWindowToOurSize(); | |||
| } | |||
| static void recursiveHIViewRepaint (HIViewRef view) throw() | |||
| { | |||
| HIViewSetNeedsDisplay (view, true); | |||
| HIViewRef child = HIViewGetFirstSubview (view); | |||
| while (child != 0) | |||
| { | |||
| recursiveHIViewRepaint (child); | |||
| child = HIViewGetNextView (child); | |||
| } | |||
| } | |||
| void timerCallback() | |||
| { | |||
| setOurSizeToEmbeddedViewSize(); | |||
| @@ -789,7 +801,7 @@ public: | |||
| // To avoid strange overpainting problems when the UI is first opened, we'll | |||
| // repaint it a few times during the first second that it's on-screen.. | |||
| if ((Time::getCurrentTime() - creationTime).inMilliseconds() < 1000) | |||
| HIViewSetNeedsDisplay (embeddedView, true); | |||
| recursiveHIViewRepaint (HIViewGetRoot (wrapperWindow)); | |||
| } | |||
| OSStatus carbonEventHandler (EventHandlerCallRef nextHandlerRef, | |||
| @@ -60024,29 +60036,19 @@ void Viewport::updateVisibleRegion() | |||
| verticalScrollBar->setVisible (false); | |||
| } | |||
| if ((contentComp->getWidth() > 0) && showHScrollbar | |||
| && getHeight() > getScrollBarThickness()) | |||
| { | |||
| horizontalScrollBar->setRangeLimits (0.0, contentComp->getWidth()); | |||
| horizontalScrollBar->setCurrentRange (newVX, getMaximumVisibleWidth()); | |||
| horizontalScrollBar->setSingleStepSize (singleStepX); | |||
| } | |||
| else | |||
| { | |||
| horizontalScrollBar->setRangeLimits (0.0, contentComp->getWidth()); | |||
| horizontalScrollBar->setCurrentRange (newVX, getMaximumVisibleWidth()); | |||
| horizontalScrollBar->setSingleStepSize (singleStepX); | |||
| if (! (contentComp->getWidth() > 0 && showHScrollbar && getHeight() > getScrollBarThickness())) | |||
| horizontalScrollBar->setVisible (false); | |||
| } | |||
| if ((contentComp->getHeight() > 0) && showVScrollbar | |||
| && getWidth() > getScrollBarThickness()) | |||
| { | |||
| verticalScrollBar->setRangeLimits (0.0, contentComp->getHeight()); | |||
| verticalScrollBar->setCurrentRange (newVY, getMaximumVisibleHeight()); | |||
| verticalScrollBar->setSingleStepSize (singleStepY); | |||
| } | |||
| else | |||
| { | |||
| verticalScrollBar->setRangeLimits (0.0, contentComp->getHeight()); | |||
| verticalScrollBar->setCurrentRange (newVY, getMaximumVisibleHeight()); | |||
| verticalScrollBar->setSingleStepSize (singleStepY); | |||
| if (! (contentComp->getHeight() > 0 && showVScrollbar && getWidth() > getScrollBarThickness())) | |||
| verticalScrollBar->setVisible (false); | |||
| } | |||
| if (verticalScrollBar->isVisible()) | |||
| { | |||
| @@ -122969,17 +122971,17 @@ public: | |||
| } | |||
| else | |||
| { | |||
| if (startSampleInFile < reservoirStart | |||
| || startSampleInFile > reservoirStart + jmax (samplesInReservoir, 511)) | |||
| if (startSampleInFile >= (int) lengthInSamples) | |||
| { | |||
| samplesInReservoir = 0; | |||
| if (startSampleInFile >= (int) lengthInSamples) | |||
| break; | |||
| } | |||
| else if (startSampleInFile < reservoirStart | |||
| || startSampleInFile > reservoirStart + jmax (samplesInReservoir, 511)) | |||
| { | |||
| // had some problems with flac crashing if the read pos is aligned more | |||
| // accurately than this. Probably fixed in newer versions of the library, though. | |||
| reservoirStart = (int) (startSampleInFile & ~511); | |||
| samplesInReservoir = 0; | |||
| FLAC__stream_decoder_seek_absolute (decoder, (FLAC__uint64) reservoirStart); | |||
| } | |||
| else | |||
| @@ -123240,9 +123242,13 @@ public: | |||
| return FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED; | |||
| } | |||
| static FLAC__StreamEncoderTellStatus encodeTellCallback (const FLAC__StreamEncoder*, FLAC__uint64*, void*) | |||
| static FLAC__StreamEncoderTellStatus encodeTellCallback (const FLAC__StreamEncoder*, FLAC__uint64* absolute_byte_offset, void* client_data) | |||
| { | |||
| return FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED; | |||
| if (client_data == 0) | |||
| return FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED; | |||
| *absolute_byte_offset = (FLAC__uint64) ((FlacWriter*) client_data)->output->getPosition(); | |||
| return FLAC__STREAM_ENCODER_TELL_STATUS_OK; | |||
| } | |||
| static void encodeMetadataCallback (const FLAC__StreamEncoder*, | |||
| @@ -239115,11 +239121,13 @@ private: | |||
| IConnectionPoint* connectionPoint; | |||
| DWORD adviseCookie; | |||
| class EventHandler : public IDispatch | |||
| class EventHandler : public IDispatch, | |||
| public ComponentMovementWatcher | |||
| { | |||
| public: | |||
| EventHandler (WebBrowserComponent* owner_) | |||
| : owner (owner_), | |||
| : ComponentMovementWatcher (owner_), | |||
| owner (owner_), | |||
| refCount (0) | |||
| { | |||
| } | |||
| @@ -239180,6 +239188,14 @@ private: | |||
| return E_NOTIMPL; | |||
| } | |||
| void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) {} | |||
| void componentPeerChanged() {} | |||
| void componentVisibilityChanged (Component&) | |||
| { | |||
| owner->visibilityChanged(); | |||
| } | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| @@ -177,17 +177,17 @@ public: | |||
| } | |||
| else | |||
| { | |||
| if (startSampleInFile < reservoirStart | |||
| || startSampleInFile > reservoirStart + jmax (samplesInReservoir, 511)) | |||
| if (startSampleInFile >= (int) lengthInSamples) | |||
| { | |||
| samplesInReservoir = 0; | |||
| if (startSampleInFile >= (int) lengthInSamples) | |||
| break; | |||
| } | |||
| else if (startSampleInFile < reservoirStart | |||
| || startSampleInFile > reservoirStart + jmax (samplesInReservoir, 511)) | |||
| { | |||
| // had some problems with flac crashing if the read pos is aligned more | |||
| // accurately than this. Probably fixed in newer versions of the library, though. | |||
| reservoirStart = (int) (startSampleInFile & ~511); | |||
| samplesInReservoir = 0; | |||
| FLAC__stream_decoder_seek_absolute (decoder, (FLAC__uint64) reservoirStart); | |||
| } | |||
| else | |||
| @@ -454,9 +454,13 @@ public: | |||
| return FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED; | |||
| } | |||
| static FLAC__StreamEncoderTellStatus encodeTellCallback (const FLAC__StreamEncoder*, FLAC__uint64*, void*) | |||
| static FLAC__StreamEncoderTellStatus encodeTellCallback (const FLAC__StreamEncoder*, FLAC__uint64* absolute_byte_offset, void* client_data) | |||
| { | |||
| return FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED; | |||
| if (client_data == 0) | |||
| return FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED; | |||
| *absolute_byte_offset = (FLAC__uint64) ((FlacWriter*) client_data)->output->getPosition(); | |||
| return FLAC__STREAM_ENCODER_TELL_STATUS_OK; | |||
| } | |||
| static void encodeMetadataCallback (const FLAC__StreamEncoder*, | |||
| @@ -151,29 +151,19 @@ void Viewport::updateVisibleRegion() | |||
| verticalScrollBar->setVisible (false); | |||
| } | |||
| if ((contentComp->getWidth() > 0) && showHScrollbar | |||
| && getHeight() > getScrollBarThickness()) | |||
| { | |||
| horizontalScrollBar->setRangeLimits (0.0, contentComp->getWidth()); | |||
| horizontalScrollBar->setCurrentRange (newVX, getMaximumVisibleWidth()); | |||
| horizontalScrollBar->setSingleStepSize (singleStepX); | |||
| } | |||
| else | |||
| { | |||
| horizontalScrollBar->setRangeLimits (0.0, contentComp->getWidth()); | |||
| horizontalScrollBar->setCurrentRange (newVX, getMaximumVisibleWidth()); | |||
| horizontalScrollBar->setSingleStepSize (singleStepX); | |||
| if (! (contentComp->getWidth() > 0 && showHScrollbar && getHeight() > getScrollBarThickness())) | |||
| horizontalScrollBar->setVisible (false); | |||
| } | |||
| if ((contentComp->getHeight() > 0) && showVScrollbar | |||
| && getWidth() > getScrollBarThickness()) | |||
| { | |||
| verticalScrollBar->setRangeLimits (0.0, contentComp->getHeight()); | |||
| verticalScrollBar->setCurrentRange (newVY, getMaximumVisibleHeight()); | |||
| verticalScrollBar->setSingleStepSize (singleStepY); | |||
| } | |||
| else | |||
| { | |||
| verticalScrollBar->setRangeLimits (0.0, contentComp->getHeight()); | |||
| verticalScrollBar->setCurrentRange (newVY, getMaximumVisibleHeight()); | |||
| verticalScrollBar->setSingleStepSize (singleStepY); | |||
| if (! (contentComp->getHeight() > 0 && showVScrollbar && getWidth() > getScrollBarThickness())) | |||
| verticalScrollBar->setVisible (false); | |||
| } | |||
| if (verticalScrollBar->isVisible()) | |||
| { | |||
| @@ -202,6 +202,18 @@ public: | |||
| setEmbeddedWindowToOurSize(); | |||
| } | |||
| static void recursiveHIViewRepaint (HIViewRef view) throw() | |||
| { | |||
| HIViewSetNeedsDisplay (view, true); | |||
| HIViewRef child = HIViewGetFirstSubview (view); | |||
| while (child != 0) | |||
| { | |||
| recursiveHIViewRepaint (child); | |||
| child = HIViewGetNextView (child); | |||
| } | |||
| } | |||
| void timerCallback() | |||
| { | |||
| setOurSizeToEmbeddedViewSize(); | |||
| @@ -209,7 +221,7 @@ public: | |||
| // To avoid strange overpainting problems when the UI is first opened, we'll | |||
| // repaint it a few times during the first second that it's on-screen.. | |||
| if ((Time::getCurrentTime() - creationTime).inMilliseconds() < 1000) | |||
| HIViewSetNeedsDisplay (embeddedView, true); | |||
| recursiveHIViewRepaint (HIViewGetRoot (wrapperWindow)); | |||
| } | |||
| OSStatus carbonEventHandler (EventHandlerCallRef nextHandlerRef, | |||
| @@ -129,11 +129,13 @@ private: | |||
| DWORD adviseCookie; | |||
| //============================================================================== | |||
| class EventHandler : public IDispatch | |||
| class EventHandler : public IDispatch, | |||
| public ComponentMovementWatcher | |||
| { | |||
| public: | |||
| EventHandler (WebBrowserComponent* owner_) | |||
| : owner (owner_), | |||
| : ComponentMovementWatcher (owner_), | |||
| owner (owner_), | |||
| refCount (0) | |||
| { | |||
| } | |||
| @@ -195,6 +197,14 @@ private: | |||
| return E_NOTIMPL; | |||
| } | |||
| void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) {} | |||
| void componentPeerChanged() {} | |||
| void componentVisibilityChanged (Component&) | |||
| { | |||
| owner->visibilityChanged(); | |||
| } | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||