mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Dragged the singleton macros into the 21st century.. Cleaned up their implementation and gave them new upper-case names to match juce official style. The old names are still defined to avoid breaking old code, but please update before they get deprecated!
This commit is contained in:
parent
c6ed2626e1
commit
58a99ff139
30 changed files with 211 additions and 214 deletions
|
|
@ -34,7 +34,7 @@ DECLARE_JNI_CLASS (JNIHandler, "android/os/Handler");
|
|||
//==============================================================================
|
||||
namespace Android
|
||||
{
|
||||
class Runnable : public juce::AndroidInterfaceImplementer
|
||||
class Runnable : public juce::AndroidInterfaceImplementer
|
||||
{
|
||||
public:
|
||||
virtual void run() = 0;
|
||||
|
|
@ -58,7 +58,7 @@ namespace Android
|
|||
|
||||
struct Handler
|
||||
{
|
||||
juce_DeclareSingleton (Handler, false)
|
||||
JUCE_DECLARE_SINGLETON (Handler, false)
|
||||
|
||||
Handler() : nativeHandler (getEnv()->NewObject (JNIHandler, JNIHandler.constructor)) {}
|
||||
|
||||
|
|
@ -70,13 +70,13 @@ namespace Android
|
|||
GlobalRef nativeHandler;
|
||||
};
|
||||
|
||||
juce_ImplementSingleton (Handler);
|
||||
JUCE_IMPLEMENT_SINGLETON (Handler)
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
struct AndroidMessageQueue : private Android::Runnable
|
||||
{
|
||||
juce_DeclareSingleton_SingleThreaded (AndroidMessageQueue, true)
|
||||
JUCE_DECLARE_SINGLETON_SINGLETHREADED (AndroidMessageQueue, true)
|
||||
|
||||
AndroidMessageQueue()
|
||||
: self (CreateJavaInterface (this, "java/lang/Runnable").get())
|
||||
|
|
@ -118,7 +118,7 @@ private:
|
|||
Android::Handler handler;
|
||||
};
|
||||
|
||||
juce_ImplementSingleton_SingleThreaded (AndroidMessageQueue);
|
||||
JUCE_IMPLEMENT_SINGLETON (AndroidMessageQueue)
|
||||
|
||||
//==============================================================================
|
||||
void MessageManager::doPlatformSpecificInitialisation() { AndroidMessageQueue::getInstance(); }
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
juce_DeclareSingleton_SingleThreaded_Minimal (InternalMessageQueue)
|
||||
JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL (InternalMessageQueue)
|
||||
|
||||
private:
|
||||
CriticalSection lock;
|
||||
|
|
@ -165,7 +165,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
juce_ImplementSingleton_SingleThreaded (InternalMessageQueue)
|
||||
JUCE_IMPLEMENT_SINGLETON (InternalMessageQueue)
|
||||
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@
|
|||
|
||||
namespace juce
|
||||
{
|
||||
juce_ImplementSingleton (WinRTWrapper)
|
||||
JUCE_IMPLEMENT_SINGLETON (WinRTWrapper)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace juce
|
|||
class WinRTWrapper : public DeletedAtShutdown
|
||||
{
|
||||
public:
|
||||
juce_DeclareSingleton (WinRTWrapper, true)
|
||||
JUCE_DECLARE_SINGLETON (WinRTWrapper, true)
|
||||
|
||||
class ScopedHString
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue