1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-04 03:40:07 +00:00

More internal message class refactoring/decoupling.

This commit is contained in:
jules 2012-03-24 18:37:44 +00:00
parent 31209dadfc
commit e905f52014
14 changed files with 170 additions and 218 deletions

View file

@ -59,7 +59,7 @@ public:
}
//==============================================================================
void postMessage (Message* msg)
void postMessage (MessageManager::MessageBase* const msg)
{
const int maxBytesInSocketQueue = 128;
@ -133,7 +133,7 @@ public:
private:
CriticalSection lock;
ReferenceCountedArray <Message> queue;
ReferenceCountedArray <MessageManager::MessageBase> queue;
int fd[2];
int bytesInSocket;
int totalEventCount;
@ -173,7 +173,7 @@ private:
return true;
}
Message::Ptr popNextMessage()
MessageManager::MessageBase::Ptr popNextMessage()
{
const ScopedLock sl (lock);
@ -192,12 +192,17 @@ private:
bool dispatchNextInternalMessage()
{
const Message::Ptr msg (popNextMessage());
const MessageManager::MessageBase::Ptr msg (popNextMessage());
if (msg == nullptr)
return false;
MessageManager::getInstance()->deliverMessage (msg);
JUCE_TRY
{
msg->messageCallback();
}
JUCE_CATCH_EXCEPTION
return true;
}
};
@ -346,7 +351,7 @@ void MessageManager::doPlatformSpecificShutdown()
}
}
bool MessageManager::postMessageToSystemQueue (Message* message)
bool MessageManager::postMessageToSystemQueue (MessageManager::MessageBase* const message)
{
if (LinuxErrorHandling::errorOccurred)
return false;