mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Misc tidying-up.
This commit is contained in:
parent
f86739b221
commit
4ce1908f79
28 changed files with 129 additions and 131 deletions
|
|
@ -43,7 +43,7 @@ public:
|
|||
IntrojucerApp() : isRunningCommandLine (false) {}
|
||||
|
||||
//==============================================================================
|
||||
void initialise (const String& commandLine)
|
||||
void initialise (const String& commandLine) override
|
||||
{
|
||||
LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);
|
||||
settings = new StoredSettings();
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
(new ModuleFolderChecker())->post();
|
||||
}
|
||||
|
||||
void shutdown()
|
||||
void shutdown() override
|
||||
{
|
||||
appearanceEditorWindow = nullptr;
|
||||
utf8Window = nullptr;
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
void systemRequestedQuit()
|
||||
void systemRequestedQuit() override
|
||||
{
|
||||
closeModalCompsAndQuit();
|
||||
}
|
||||
|
|
@ -152,15 +152,15 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
const String getApplicationName() { return "Introjucer"; }
|
||||
const String getApplicationVersion() { return ProjectInfo::versionString; }
|
||||
const String getApplicationName() override { return "Introjucer"; }
|
||||
const String getApplicationVersion() override { return ProjectInfo::versionString; }
|
||||
|
||||
bool moreThanOneInstanceAllowed()
|
||||
bool moreThanOneInstanceAllowed() override
|
||||
{
|
||||
return true; // this is handled manually in initialise()
|
||||
}
|
||||
|
||||
void anotherInstanceStarted (const String& commandLine)
|
||||
void anotherInstanceStarted (const String& commandLine) override
|
||||
{
|
||||
openFile (commandLine.unquoted());
|
||||
}
|
||||
|
|
@ -347,7 +347,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
void getAllCommands (Array <CommandID>& commands)
|
||||
void getAllCommands (Array <CommandID>& commands) override
|
||||
{
|
||||
JUCEApplication::getAllCommands (commands);
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ public:
|
|||
commands.addArray (ids, numElementsInArray (ids));
|
||||
}
|
||||
|
||||
void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result)
|
||||
void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) override
|
||||
{
|
||||
switch (commandID)
|
||||
{
|
||||
|
|
@ -404,7 +404,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool perform (const InvocationInfo& info)
|
||||
bool perform (const InvocationInfo& info) override
|
||||
{
|
||||
switch (info.commandID)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
~MainWindow();
|
||||
|
||||
//==============================================================================
|
||||
void closeButtonPressed();
|
||||
void closeButtonPressed() override;
|
||||
|
||||
//==============================================================================
|
||||
bool canOpenFile (const File& file) const;
|
||||
|
|
@ -58,23 +58,23 @@ public:
|
|||
|
||||
void showNewProjectWizard();
|
||||
|
||||
bool isInterestedInFileDrag (const StringArray& files);
|
||||
void filesDropped (const StringArray& filenames, int mouseX, int mouseY);
|
||||
bool isInterestedInFileDrag (const StringArray& files) override;
|
||||
void filesDropped (const StringArray& filenames, int mouseX, int mouseY) override;
|
||||
|
||||
void activeWindowStatusChanged();
|
||||
void activeWindowStatusChanged() override;
|
||||
|
||||
void updateTitle (const String& documentName);
|
||||
|
||||
ProjectContentComponent* getProjectContentComponent() const;
|
||||
|
||||
//==============================================================================
|
||||
ApplicationCommandTarget* getNextCommandTarget();
|
||||
void getAllCommands (Array <CommandID>& commands);
|
||||
void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result);
|
||||
bool perform (const InvocationInfo& info);
|
||||
ApplicationCommandTarget* getNextCommandTarget() override;
|
||||
void getAllCommands (Array <CommandID>& commands) override;
|
||||
void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) override;
|
||||
bool perform (const InvocationInfo& info) override;
|
||||
|
||||
bool shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::SourceDetails& sourceDetails,
|
||||
StringArray& files, bool& canMoveFiles);
|
||||
StringArray& files, bool& canMoveFiles) override;
|
||||
private:
|
||||
ScopedPointer <Project> currentProject;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
/** Implementation of the AudioFormatReader method. */
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples);
|
||||
int64 startSampleInFile, int numSamples) override;
|
||||
|
||||
/** Checks whether the CD has been removed from the drive. */
|
||||
bool isCDStillPresent() const;
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer,
|
||||
startSampleInFile, numSamples, lengthInSamples);
|
||||
|
|
@ -643,7 +643,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool write (const int** data, int numSamples)
|
||||
bool write (const int** data, int numSamples) override
|
||||
{
|
||||
jassert (data != nullptr && *data != nullptr); // the input must contain at least one channel!
|
||||
|
||||
|
|
@ -800,7 +800,7 @@ public:
|
|||
}
|
||||
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer,
|
||||
startSampleInFile, numSamples, lengthInSamples);
|
||||
|
|
|
|||
|
|
@ -57,28 +57,27 @@ public:
|
|||
static const char* const appleKey;
|
||||
|
||||
//==============================================================================
|
||||
Array<int> getPossibleSampleRates();
|
||||
Array<int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
Array<int> getPossibleSampleRates() override;
|
||||
Array<int> getPossibleBitDepths() override;
|
||||
bool canDoStereo() override;
|
||||
bool canDoMono() override;
|
||||
|
||||
#if JUCE_MAC
|
||||
bool canHandleFile (const File& fileToTest);
|
||||
bool canHandleFile (const File& fileToTest) override;
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream* sourceStream,
|
||||
bool deleteStreamIfOpeningFails);
|
||||
bool deleteStreamIfOpeningFails) override;
|
||||
|
||||
MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&);
|
||||
MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&) override;
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
|
||||
double sampleRateToUse,
|
||||
unsigned int numberOfChannels,
|
||||
int bitsPerSample,
|
||||
const StringPairArray& metadataValues,
|
||||
int qualityOptionIndex);
|
||||
|
||||
int qualityOptionIndex) override;
|
||||
|
||||
private:
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AiffAudioFormat)
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer,
|
||||
startSampleInFile, numSamples, lengthInSamples);
|
||||
|
|
|
|||
|
|
@ -52,21 +52,21 @@ public:
|
|||
static const char* const timeSig;
|
||||
|
||||
//==============================================================================
|
||||
Array<int> getPossibleSampleRates();
|
||||
Array<int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
Array<int> getPossibleSampleRates() override;
|
||||
Array<int> getPossibleBitDepths() override;
|
||||
bool canDoStereo() override;
|
||||
bool canDoMono() override;
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream*,
|
||||
bool deleteStreamIfOpeningFails);
|
||||
bool deleteStreamIfOpeningFails) override;
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream*,
|
||||
double sampleRateToUse,
|
||||
unsigned int numberOfChannels,
|
||||
int bitsPerSample,
|
||||
const StringPairArray& metadataValues,
|
||||
int qualityOptionIndex);
|
||||
int qualityOptionIndex) override;
|
||||
|
||||
private:
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioFormat)
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public:
|
|||
|
||||
// returns the number of samples read
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
using namespace FlacNamespace;
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool write (const int** samplesToWrite, int numSamples)
|
||||
bool write (const int** samplesToWrite, int numSamples) override
|
||||
{
|
||||
using namespace FlacNamespace;
|
||||
if (! ok)
|
||||
|
|
|
|||
|
|
@ -40,23 +40,23 @@ public:
|
|||
~FlacAudioFormat();
|
||||
|
||||
//==============================================================================
|
||||
Array<int> getPossibleSampleRates();
|
||||
Array<int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
bool isCompressed();
|
||||
StringArray getQualityOptions();
|
||||
Array<int> getPossibleSampleRates() override;
|
||||
Array<int> getPossibleBitDepths() override;
|
||||
bool canDoStereo() override;
|
||||
bool canDoMono() override;
|
||||
bool isCompressed() override;
|
||||
StringArray getQualityOptions() override;
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream* sourceStream,
|
||||
bool deleteStreamIfOpeningFails);
|
||||
bool deleteStreamIfOpeningFails) override;
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
|
||||
double sampleRateToUse,
|
||||
unsigned int numberOfChannels,
|
||||
int bitsPerSample,
|
||||
const StringPairArray& metadataValues,
|
||||
int qualityOptionIndex);
|
||||
int qualityOptionIndex) override;
|
||||
private:
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlacAudioFormat)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2954,7 +2954,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
jassert (destSamples != nullptr);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,19 +46,19 @@ public:
|
|||
~MP3AudioFormat();
|
||||
|
||||
//==============================================================================
|
||||
Array<int> getPossibleSampleRates();
|
||||
Array<int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
bool isCompressed();
|
||||
StringArray getQualityOptions();
|
||||
Array<int> getPossibleSampleRates() override;
|
||||
Array<int> getPossibleBitDepths() override;
|
||||
bool canDoStereo() override;
|
||||
bool canDoMono() override;
|
||||
bool isCompressed() override;
|
||||
StringArray getQualityOptions() override;
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails);
|
||||
AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails) override;
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream*, double sampleRateToUse,
|
||||
unsigned int numberOfChannels, int bitsPerSample,
|
||||
const StringPairArray& metadataValues, int qualityOptionIndex);
|
||||
const StringPairArray& metadataValues, int qualityOptionIndex) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
while (numSamples > 0)
|
||||
{
|
||||
|
|
@ -341,7 +341,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool write (const int** samplesToWrite, int numSamples)
|
||||
bool write (const int** samplesToWrite, int numSamples) override
|
||||
{
|
||||
if (ok)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@ public:
|
|||
~OggVorbisAudioFormat();
|
||||
|
||||
//==============================================================================
|
||||
Array<int> getPossibleSampleRates();
|
||||
Array<int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
bool isCompressed();
|
||||
StringArray getQualityOptions();
|
||||
Array<int> getPossibleSampleRates() override;
|
||||
Array<int> getPossibleBitDepths() override;
|
||||
bool canDoStereo() override;
|
||||
bool canDoMono() override;
|
||||
bool isCompressed() override;
|
||||
StringArray getQualityOptions() override;
|
||||
|
||||
//==============================================================================
|
||||
/** Tries to estimate the quality level of an ogg file based on its size.
|
||||
|
|
@ -76,14 +76,14 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream* sourceStream,
|
||||
bool deleteStreamIfOpeningFails);
|
||||
bool deleteStreamIfOpeningFails) override;
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
|
||||
double sampleRateToUse,
|
||||
unsigned int numberOfChannels,
|
||||
int bitsPerSample,
|
||||
const StringPairArray& metadataValues,
|
||||
int qualityOptionIndex);
|
||||
int qualityOptionIndex) override;
|
||||
|
||||
private:
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OggVorbisAudioFormat)
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer,
|
||||
startSampleInFile, numSamples, lengthInSamples);
|
||||
|
|
@ -870,7 +870,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool write (const int** data, int numSamples)
|
||||
bool write (const int** data, int numSamples) override
|
||||
{
|
||||
jassert (data != nullptr && *data != nullptr); // the input must contain at least one channel!
|
||||
|
||||
|
|
@ -1066,7 +1066,7 @@ public:
|
|||
}
|
||||
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer,
|
||||
startSampleInFile, numSamples, lengthInSamples);
|
||||
|
|
@ -1084,7 +1084,7 @@ public:
|
|||
}
|
||||
|
||||
void readMaxLevels (int64 startSampleInFile, int64 numSamples,
|
||||
float& min0, float& max0, float& min1, float& max1)
|
||||
float& min0, float& max0, float& min1, float& max1) override
|
||||
{
|
||||
if (numSamples <= 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -132,23 +132,23 @@ public:
|
|||
static const char* const acidTempo;
|
||||
|
||||
//==============================================================================
|
||||
Array<int> getPossibleSampleRates();
|
||||
Array<int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
Array<int> getPossibleSampleRates() override;
|
||||
Array<int> getPossibleBitDepths() override;
|
||||
bool canDoStereo() override;
|
||||
bool canDoMono() override;
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream* sourceStream,
|
||||
bool deleteStreamIfOpeningFails);
|
||||
bool deleteStreamIfOpeningFails) override;
|
||||
|
||||
MemoryMappedAudioFormatReader* createMemoryMappedReader (const File& file);
|
||||
MemoryMappedAudioFormatReader* createMemoryMappedReader (const File& file) override;
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
|
||||
double sampleRateToUse,
|
||||
unsigned int numberOfChannels,
|
||||
int bitsPerSample,
|
||||
const StringPairArray& metadataValues,
|
||||
int qualityOptionIndex);
|
||||
int qualityOptionIndex) override;
|
||||
|
||||
//==============================================================================
|
||||
/** Utility function to replace the metadata in a wav file with a new set of values.
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ public:
|
|||
}
|
||||
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples)
|
||||
int64 startSampleInFile, int numSamples) override
|
||||
{
|
||||
if (sampleRate <= 0)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -36,17 +36,17 @@ public:
|
|||
~WindowsMediaAudioFormat();
|
||||
|
||||
//==============================================================================
|
||||
Array<int> getPossibleSampleRates();
|
||||
Array<int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
Array<int> getPossibleSampleRates() override;
|
||||
Array<int> getPossibleBitDepths() override;
|
||||
bool canDoStereo() override;
|
||||
bool canDoMono() override;
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails);
|
||||
AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails) override;
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream*, double sampleRateToUse,
|
||||
unsigned int numberOfChannels, int bitsPerSample,
|
||||
const StringPairArray& metadataValues, int qualityOptionIndex);
|
||||
const StringPairArray& metadataValues, int qualityOptionIndex) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -67,14 +67,14 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples);
|
||||
int64 startSampleInFile, int numSamples) override;
|
||||
|
||||
void readMaxLevels (int64 startSample,
|
||||
int64 numSamples,
|
||||
float& lowestLeft,
|
||||
float& highestLeft,
|
||||
float& lowestRight,
|
||||
float& highestRight);
|
||||
float& highestRight) override;
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
void setReadTimeout (int timeoutMilliseconds) noexcept;
|
||||
|
||||
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
|
||||
int64 startSampleInFile, int numSamples);
|
||||
int64 startSampleInFile, int numSamples) override;
|
||||
|
||||
private:
|
||||
ScopedPointer<AudioFormatReader> source;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ namespace SocketHelpers
|
|||
#if JUCE_WINDOWS
|
||||
bytesThisTime = recv (handle, static_cast<char*> (destBuffer) + bytesRead, maxBytesToRead - bytesRead, 0);
|
||||
#else
|
||||
while ((bytesThisTime = (int) ::read (handle, addBytesToPointer (destBuffer, bytesRead), (size_t) (maxBytesToRead - bytesRead))) < 0
|
||||
while ((bytesThisTime = (int) ::read (handle, addBytesToPointer (destBuffer, bytesRead),
|
||||
(size_t) (maxBytesToRead - bytesRead))) < 0
|
||||
&& errno == EINTR
|
||||
&& connected)
|
||||
{
|
||||
|
|
@ -274,17 +275,15 @@ StreamingSocket::StreamingSocket()
|
|||
SocketHelpers::initSockets();
|
||||
}
|
||||
|
||||
StreamingSocket::StreamingSocket (const String& hostName_,
|
||||
const int portNumber_,
|
||||
const int handle_)
|
||||
: hostName (hostName_),
|
||||
portNumber (portNumber_),
|
||||
handle (handle_),
|
||||
StreamingSocket::StreamingSocket (const String& host, int portNum, int h)
|
||||
: hostName (host),
|
||||
portNumber (portNum),
|
||||
handle (h),
|
||||
connected (true),
|
||||
isListener (false)
|
||||
{
|
||||
SocketHelpers::initSockets();
|
||||
SocketHelpers::resetSocketOptions (handle_, false, false);
|
||||
SocketHelpers::resetSocketOptions (h, false, false);
|
||||
}
|
||||
|
||||
StreamingSocket::~StreamingSocket()
|
||||
|
|
@ -293,9 +292,11 @@ StreamingSocket::~StreamingSocket()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
int StreamingSocket::read (void* destBuffer, const int maxBytesToRead, const bool blockUntilSpecifiedAmountHasArrived)
|
||||
int StreamingSocket::read (void* destBuffer, const int maxBytesToRead,
|
||||
const bool blockUntilSpecifiedAmountHasArrived)
|
||||
{
|
||||
return (connected && ! isListener) ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, connected, blockUntilSpecifiedAmountHasArrived)
|
||||
return (connected && ! isListener) ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead,
|
||||
connected, blockUntilSpecifiedAmountHasArrived)
|
||||
: -1;
|
||||
}
|
||||
|
||||
|
|
@ -433,8 +434,9 @@ bool StreamingSocket::createListener (const int newPortNumber, const String& loc
|
|||
|
||||
StreamingSocket* StreamingSocket::waitForNextConnection() const
|
||||
{
|
||||
jassert (isListener || ! connected); // to call this method, you first have to use createListener() to
|
||||
// prepare this socket as a listener.
|
||||
// To call this method, you first have to use createListener() to
|
||||
// prepare this socket as a listener.
|
||||
jassert (isListener || ! connected);
|
||||
|
||||
if (connected && isListener)
|
||||
{
|
||||
|
|
@ -458,11 +460,11 @@ bool StreamingSocket::isLocal() const noexcept
|
|||
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
DatagramSocket::DatagramSocket (const int localPortNumber, const bool allowBroadcast_)
|
||||
DatagramSocket::DatagramSocket (const int localPortNumber, const bool canBroadcast)
|
||||
: portNumber (0),
|
||||
handle (-1),
|
||||
connected (true),
|
||||
allowBroadcast (allowBroadcast_),
|
||||
allowBroadcast (canBroadcast),
|
||||
serverAddress (nullptr)
|
||||
{
|
||||
SocketHelpers::initSockets();
|
||||
|
|
@ -471,18 +473,18 @@ DatagramSocket::DatagramSocket (const int localPortNumber, const bool allowBroad
|
|||
bindToPort (localPortNumber);
|
||||
}
|
||||
|
||||
DatagramSocket::DatagramSocket (const String& hostName_, const int portNumber_,
|
||||
const int handle_, const int localPortNumber)
|
||||
: hostName (hostName_),
|
||||
portNumber (portNumber_),
|
||||
handle (handle_),
|
||||
DatagramSocket::DatagramSocket (const String& host, const int portNum,
|
||||
const int h, const int localPortNumber)
|
||||
: hostName (host),
|
||||
portNumber (portNum),
|
||||
handle (h),
|
||||
connected (true),
|
||||
allowBroadcast (false),
|
||||
serverAddress (nullptr)
|
||||
{
|
||||
SocketHelpers::initSockets();
|
||||
|
||||
SocketHelpers::resetSocketOptions (handle_, true, allowBroadcast);
|
||||
SocketHelpers::resetSocketOptions (h, true, allowBroadcast);
|
||||
bindToPort (localPortNumber);
|
||||
}
|
||||
|
||||
|
|
@ -564,7 +566,8 @@ int DatagramSocket::waitUntilReady (const bool readyForReading,
|
|||
|
||||
int DatagramSocket::read (void* destBuffer, const int maxBytesToRead, const bool blockUntilSpecifiedAmountHasArrived)
|
||||
{
|
||||
return connected ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, connected, blockUntilSpecifiedAmountHasArrived)
|
||||
return connected ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead,
|
||||
connected, blockUntilSpecifiedAmountHasArrived)
|
||||
: -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
void actionListenerCallback (const String& message)
|
||||
void actionListenerCallback (const String& message) override
|
||||
{
|
||||
if (JUCEApplication* const app = JUCEApplication::getInstance())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,13 +95,11 @@ public:
|
|||
protected:
|
||||
//==============================================================================
|
||||
/** @internal */
|
||||
void clicked();
|
||||
void clicked() override;
|
||||
/** @internal */
|
||||
void colourChanged();
|
||||
void colourChanged() override;
|
||||
/** @internal */
|
||||
void paintButton (Graphics& g,
|
||||
bool isMouseOverButton,
|
||||
bool isButtonDown);
|
||||
void paintButton (Graphics&, bool isMouseOver, bool isButtonDown) override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -129,11 +129,9 @@ public:
|
|||
protected:
|
||||
//==============================================================================
|
||||
/** @internal */
|
||||
bool hitTest (int x, int y);
|
||||
bool hitTest (int x, int y) override;
|
||||
/** @internal */
|
||||
void paintButton (Graphics& g,
|
||||
bool isMouseOverButton,
|
||||
bool isButtonDown);
|
||||
void paintButton (Graphics&, bool isMouseOver, bool isButtonDown) override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ protected:
|
|||
/** @internal */
|
||||
void transformContextToCorrectOrigin (Graphics&);
|
||||
/** @internal */
|
||||
void parentHierarchyChanged();
|
||||
void parentHierarchyChanged() override;
|
||||
/** @internal */
|
||||
void setBoundsToEnclose (const Rectangle<float>&);
|
||||
|
||||
|
|
|
|||
|
|
@ -107,11 +107,11 @@ public:
|
|||
/** @internal */
|
||||
Rectangle<float> getDrawableBounds() const;
|
||||
/** @internal */
|
||||
void childBoundsChanged (Component*);
|
||||
void childBoundsChanged (Component*) override;
|
||||
/** @internal */
|
||||
void childrenChanged();
|
||||
void childrenChanged() override;
|
||||
/** @internal */
|
||||
void parentHierarchyChanged();
|
||||
void parentHierarchyChanged() override;
|
||||
/** @internal */
|
||||
MarkerList* getMarkers (bool xAxis);
|
||||
|
||||
|
|
|
|||
|
|
@ -296,9 +296,9 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** @internal */
|
||||
void resized();
|
||||
void resized() override;
|
||||
/** @internal */
|
||||
void lookAndFeelChanged();
|
||||
void lookAndFeelChanged() override;
|
||||
|
||||
protected:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -140,15 +140,15 @@ protected:
|
|||
|
||||
//==============================================================================
|
||||
/** @internal */
|
||||
void focusOfChildComponentChanged (FocusChangeType cause);
|
||||
void focusOfChildComponentChanged (FocusChangeType) override;
|
||||
/** @internal */
|
||||
void parentHierarchyChanged();
|
||||
void parentHierarchyChanged() override;
|
||||
/** @internal */
|
||||
virtual int getDesktopWindowStyleFlags() const;
|
||||
/** @internal */
|
||||
void recreateDesktopWindow();
|
||||
/** @internal */
|
||||
void visibilityChanged();
|
||||
void visibilityChanged() override;
|
||||
|
||||
private:
|
||||
friend class TopLevelWindowManager;
|
||||
|
|
|
|||
|
|
@ -205,8 +205,8 @@ private:
|
|||
bool movieLoaded, controllerVisible, looping;
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
void parentHierarchyChanged();
|
||||
void visibilityChanged();
|
||||
void parentHierarchyChanged() override;
|
||||
void visibilityChanged() override;
|
||||
|
||||
void createControlIfNeeded();
|
||||
bool isControlCreated() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue