mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
490de6b6a2
commit
a47ddae4a3
10 changed files with 1086 additions and 1065 deletions
|
|
@ -37,7 +37,7 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <linux/if.h>
|
#include <linux/if.h>
|
||||||
|
|
||||||
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
|
#include "../../../src/juce_core/basics/juce_StandardHeader.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,7 @@
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
/*
|
|
||||||
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.
|
||||||
|
|
||||||
It gets included directly in the cpp files for these platforms.
|
It gets included directly in the cpp files for these platforms.
|
||||||
|
|
@ -432,7 +431,7 @@ bool InterProcessLock::enter (const int timeOutMillisecs) throw()
|
||||||
|
|
||||||
if (errno != EINTR)
|
if (errno != EINTR)
|
||||||
{
|
{
|
||||||
if (timeOutMillisecs == 0
|
if (timeOutMillisecs == 0
|
||||||
|| (timeOutMillisecs > 0 && Time::currentTimeMillis() >= endTime))
|
|| (timeOutMillisecs > 0 && Time::currentTimeMillis() >= endTime))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -463,4 +462,3 @@ void InterProcessLock::exit() throw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -428,8 +428,8 @@ void AudioDeviceSelectorComponent::comboBoxChanged (ComboBox* comboBoxThatHasCha
|
||||||
if (deviceManager.getInputChannels().countNumberOfSetBits() > 0
|
if (deviceManager.getInputChannels().countNumberOfSetBits() > 0
|
||||||
&& deviceManager.getOutputChannels().countNumberOfSetBits() > 0)
|
&& deviceManager.getOutputChannels().countNumberOfSetBits() > 0)
|
||||||
{
|
{
|
||||||
// in DSound, some machines lose their primary input device when a mic
|
// in DSound, some machines lose their primary input device when a mic
|
||||||
// is removed, and this also buggers up our attempt at opening an output
|
// is removed, and this also buggers up our attempt at opening an output
|
||||||
// device, so this is a workaround that doesn't fail in that case.
|
// device, so this is a workaround that doesn't fail in that case.
|
||||||
BitArray noInputs;
|
BitArray noInputs;
|
||||||
error = deviceManager.setAudioDevice (audioDeviceDropDown->getText(),
|
error = deviceManager.setAudioDevice (audioDeviceDropDown->getText(),
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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&);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue