1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2008-03-20 14:28:32 +00:00
parent 490de6b6a2
commit a47ddae4a3
10 changed files with 1086 additions and 1065 deletions

View file

@ -181,6 +181,7 @@ bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAdd
OSAError err = OSACompileExecute (comp, &source, OSAError err = OSACompileExecute (comp, &source,
kOSANullScript, kOSAModeNull, kOSANullScript, kOSAModeNull,
&resultID); &resultID);
(void) err;
AEDisposeDesc (&source); AEDisposeDesc (&source);
CloseComponent (comp); CloseComponent (comp);

View file

@ -29,7 +29,6 @@
============================================================================== ==============================================================================
*/ */
/* /*
This file contains posix routines that are common to both the Linux and Mac builds. This file contains posix routines that are common to both the Linux and Mac builds.
@ -463,4 +462,3 @@ void InterProcessLock::exit() throw()
} }
} }
} }

View file

@ -53,6 +53,10 @@
#pragma comment(lib, "OpenGL32.Lib") #pragma comment(lib, "OpenGL32.Lib")
#pragma comment(lib, "GlU32.Lib") #pragma comment(lib, "GlU32.Lib")
#endif #endif
#if JUCE_QUICKTIME_AUDIOFORMAT
#pragma comment(lib, "QTMLClient.lib")
#endif
#endif #endif

View file

@ -25,6 +25,7 @@ Changelist for version 1.46
- new classes: InputSource and FileInputSource. These encapsulate some kind of resource, and also replace the XmlInputSource class. - new classes: InputSource and FileInputSource. These encapsulate some kind of resource, and also replace the XmlInputSource class.
- moved some of the posix code that was the same in the mac and linux builds into a single, shared file - moved some of the posix code that was the same in the mac and linux builds into a single, shared file
- fixed InterprocessLock on mac/linux so that it can't get stuck when an app quits unexpectedly - fixed InterprocessLock on mac/linux so that it can't get stuck when an app quits unexpectedly
- added an option to splash screens to close themselves when the mouse is clicked
============================================================================== ==============================================================================
Changelist for version 1.45 Changelist for version 1.45

View file

@ -79,10 +79,10 @@ void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer,
const ScopedLock sl (lock); const ScopedLock sl (lock);
if (firstMessage == 0) if (firstMessage == 0 || firstMessage->message.getTimeStamp() > eventTime)
{ {
m->next = firstMessage;
firstMessage = m; firstMessage = m;
m->next = 0;
} }
else else
{ {

View file

@ -36,6 +36,7 @@ BEGIN_JUCE_NAMESPACE
#include "juce_SplashScreen.h" #include "juce_SplashScreen.h"
#include "../../../events/juce_MessageManager.h" #include "../../../events/juce_MessageManager.h"
#include "../../graphics/imaging/juce_ImageCache.h" #include "../../graphics/imaging/juce_ImageCache.h"
#include "../juce_Desktop.h"
//============================================================================== //==============================================================================
@ -58,7 +59,8 @@ SplashScreen::~SplashScreen()
void SplashScreen::show (const String& title, void SplashScreen::show (const String& title,
Image* const backgroundImage_, Image* const backgroundImage_,
const int minimumTimeToDisplayFor, const int minimumTimeToDisplayFor,
const bool useDropShadow) const bool useDropShadow,
const bool removeOnMouseClick)
{ {
backgroundImage = backgroundImage_; backgroundImage = backgroundImage_;
@ -74,7 +76,8 @@ void SplashScreen::show (const String& title,
backgroundImage_->getWidth(), backgroundImage_->getWidth(),
backgroundImage_->getHeight(), backgroundImage_->getHeight(),
minimumTimeToDisplayFor, minimumTimeToDisplayFor,
useDropShadow); useDropShadow,
removeOnMouseClick);
} }
} }
@ -82,7 +85,8 @@ void SplashScreen::show (const String& title,
const int width, const int width,
const int height, const int height,
const int minimumTimeToDisplayFor, const int minimumTimeToDisplayFor,
const bool useDropShadow) const bool useDropShadow,
const bool removeOnMouseClick)
{ {
setName (title); setName (title);
setAlwaysOnTop (true); setAlwaysOnTop (true);
@ -97,8 +101,13 @@ void SplashScreen::show (const String& title,
repaint(); repaint();
originalClickCounter = removeOnMouseClick
? Desktop::getMouseButtonClickCounter()
: INT_MAX;
earliestTimeToDelete = Time::getCurrentTime() + RelativeTime::milliseconds (minimumTimeToDisplayFor); earliestTimeToDelete = Time::getCurrentTime() + RelativeTime::milliseconds (minimumTimeToDisplayFor);
startTimer (200);
startTimer (50);
} }
//============================================================================== //==============================================================================
@ -116,7 +125,8 @@ void SplashScreen::paint (Graphics& g)
void SplashScreen::timerCallback() void SplashScreen::timerCallback()
{ {
if (Time::getCurrentTime() > earliestTimeToDelete) if (Time::getCurrentTime() > earliestTimeToDelete
|| Desktop::getMouseButtonClickCounter() > originalClickCounter)
{ {
delete this; delete this;
} }

View file

@ -99,11 +99,14 @@ public:
disappearing, but if initialisation is very quick, this lets disappearing, but if initialisation is very quick, this lets
you make sure that people get a good look at your splash. you make sure that people get a good look at your splash.
@param useDropShadow if true, the window will have a drop shadow @param useDropShadow if true, the window will have a drop shadow
@param removeOnMouseClick if true, the window will go away as soon as the user clicks
the mouse (anywhere)
*/ */
void show (const String& title, void show (const String& title,
Image* const backgroundImage, Image* const backgroundImage,
const int minimumTimeToDisplayFor, const int minimumTimeToDisplayFor,
const bool useDropShadow); const bool useDropShadow,
const bool removeOnMouseClick = true);
/** Creates a SplashScreen object with a specified size. /** Creates a SplashScreen object with a specified size.
@ -124,12 +127,15 @@ public:
disappearing, but if initialisation is very quick, this lets disappearing, but if initialisation is very quick, this lets
you make sure that people get a good look at your splash. you make sure that people get a good look at your splash.
@param useDropShadow if true, the window will have a drop shadow @param useDropShadow if true, the window will have a drop shadow
@param removeOnMouseClick if true, the window will go away as soon as the user clicks
the mouse (anywhere)
*/ */
void show (const String& title, void show (const String& title,
const int width, const int width,
const int height, const int height,
const int minimumTimeToDisplayFor, const int minimumTimeToDisplayFor,
const bool useDropShadow); const bool useDropShadow,
const bool removeOnMouseClick = true);
//============================================================================== //==============================================================================
/** @internal */ /** @internal */
@ -143,6 +149,7 @@ public:
private: private:
Image* backgroundImage; Image* backgroundImage;
Time earliestTimeToDelete; Time earliestTimeToDelete;
int originalClickCounter;
bool isImageInCache; bool isImageInCache;
SplashScreen (const SplashScreen&); SplashScreen (const SplashScreen&);