|
|
|
@@ -41477,7 +41477,7 @@ public: |
|
|
|
&& comp.hitTest (localPoint.getX(), localPoint.getY()); |
|
|
|
} |
|
|
|
|
|
|
|
static const Point<int> convertFromParentSpace (const Component& comp, const Point<int>& pointInParentSpace) |
|
|
|
static Point<int> convertFromParentSpace (const Component& comp, const Point<int>& pointInParentSpace) |
|
|
|
{ |
|
|
|
if (comp.affineTransform == nullptr) |
|
|
|
return pointInParentSpace - comp.getPosition(); |
|
|
|
@@ -41485,7 +41485,7 @@ public: |
|
|
|
return pointInParentSpace.toFloat().transformedBy (comp.affineTransform->inverted()).toInt() - comp.getPosition(); |
|
|
|
} |
|
|
|
|
|
|
|
static const Rectangle<int> convertFromParentSpace (const Component& comp, const Rectangle<int>& areaInParentSpace) |
|
|
|
static Rectangle<int> convertFromParentSpace (const Component& comp, const Rectangle<int>& areaInParentSpace) |
|
|
|
{ |
|
|
|
if (comp.affineTransform == nullptr) |
|
|
|
return areaInParentSpace - comp.getPosition(); |
|
|
|
@@ -41493,7 +41493,7 @@ public: |
|
|
|
return areaInParentSpace.toFloat().transformed (comp.affineTransform->inverted()).getSmallestIntegerContainer() - comp.getPosition(); |
|
|
|
} |
|
|
|
|
|
|
|
static const Point<int> convertToParentSpace (const Component& comp, const Point<int>& pointInLocalSpace) |
|
|
|
static Point<int> convertToParentSpace (const Component& comp, const Point<int>& pointInLocalSpace) |
|
|
|
{ |
|
|
|
if (comp.affineTransform == nullptr) |
|
|
|
return pointInLocalSpace + comp.getPosition(); |
|
|
|
@@ -41501,7 +41501,7 @@ public: |
|
|
|
return (pointInLocalSpace + comp.getPosition()).toFloat().transformedBy (*comp.affineTransform).toInt(); |
|
|
|
} |
|
|
|
|
|
|
|
static const Rectangle<int> convertToParentSpace (const Component& comp, const Rectangle<int>& areaInLocalSpace) |
|
|
|
static Rectangle<int> convertToParentSpace (const Component& comp, const Rectangle<int>& areaInLocalSpace) |
|
|
|
{ |
|
|
|
if (comp.affineTransform == nullptr) |
|
|
|
return areaInLocalSpace + comp.getPosition(); |
|
|
|
@@ -41510,7 +41510,7 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
template <typename Type> |
|
|
|
static const Type convertFromDistantParentSpace (const Component* parent, const Component& target, Type coordInParent) |
|
|
|
static Type convertFromDistantParentSpace (const Component* parent, const Component& target, const Type& coordInParent) |
|
|
|
{ |
|
|
|
const Component* const directParent = target.getParentComponent(); |
|
|
|
jassert (directParent != nullptr); |
|
|
|
@@ -41522,7 +41522,7 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
template <typename Type> |
|
|
|
static const Type convertCoordinate (const Component* target, const Component* source, Type p) |
|
|
|
static Type convertCoordinate (const Component* target, const Component* source, Type p) |
|
|
|
{ |
|
|
|
while (source != nullptr) |
|
|
|
{ |
|
|
|
@@ -43528,66 +43528,41 @@ void Component::internalMouseEnter (MouseInputSource& source, const Point<int>& |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (! flags.mouseInsideFlag) |
|
|
|
{ |
|
|
|
flags.mouseInsideFlag = true; |
|
|
|
flags.mouseOverFlag = true; |
|
|
|
flags.mouseDownFlag = false; |
|
|
|
|
|
|
|
BailOutChecker checker (this); |
|
|
|
if (flags.repaintOnMouseActivityFlag) |
|
|
|
repaint(); |
|
|
|
|
|
|
|
if (flags.repaintOnMouseActivityFlag) |
|
|
|
repaint(); |
|
|
|
BailOutChecker checker (this); |
|
|
|
|
|
|
|
const MouseEvent me (source, relativePos, source.getCurrentModifiers(), |
|
|
|
this, this, time, relativePos, time, 0, false); |
|
|
|
mouseEnter (me); |
|
|
|
const MouseEvent me (source, relativePos, source.getCurrentModifiers(), |
|
|
|
this, this, time, relativePos, time, 0, false); |
|
|
|
mouseEnter (me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
Desktop& desktop = Desktop::getInstance(); |
|
|
|
desktop.resetTimer(); |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseEnter, me); |
|
|
|
Desktop::getInstance().getMouseListeners().callChecked (checker, &MouseListener::mouseEnter, me); |
|
|
|
|
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseEnter, me); |
|
|
|
} |
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseEnter, me); |
|
|
|
} |
|
|
|
|
|
|
|
void Component::internalMouseExit (MouseInputSource& source, const Point<int>& relativePos, const Time& time) |
|
|
|
{ |
|
|
|
BailOutChecker checker (this); |
|
|
|
|
|
|
|
if (flags.mouseDownFlag) |
|
|
|
{ |
|
|
|
internalMouseUp (source, relativePos, time, source.getCurrentModifiers().getRawFlags()); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
} |
|
|
|
if (flags.repaintOnMouseActivityFlag) |
|
|
|
repaint(); |
|
|
|
|
|
|
|
if (flags.mouseInsideFlag || flags.mouseOverFlag) |
|
|
|
{ |
|
|
|
flags.mouseInsideFlag = false; |
|
|
|
flags.mouseOverFlag = false; |
|
|
|
flags.mouseDownFlag = false; |
|
|
|
BailOutChecker checker (this); |
|
|
|
|
|
|
|
if (flags.repaintOnMouseActivityFlag) |
|
|
|
repaint(); |
|
|
|
const MouseEvent me (source, relativePos, source.getCurrentModifiers(), |
|
|
|
this, this, time, relativePos, time, 0, false); |
|
|
|
|
|
|
|
const MouseEvent me (source, relativePos, source.getCurrentModifiers(), |
|
|
|
this, this, time, relativePos, time, 0, false); |
|
|
|
mouseExit (me); |
|
|
|
mouseExit (me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
Desktop& desktop = Desktop::getInstance(); |
|
|
|
desktop.resetTimer(); |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseExit, me); |
|
|
|
Desktop::getInstance().getMouseListeners().callChecked (checker, &MouseListener::mouseExit, me); |
|
|
|
|
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseExit, me); |
|
|
|
} |
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseExit, me); |
|
|
|
} |
|
|
|
|
|
|
|
void Component::internalMouseDown (MouseInputSource& source, const Point<int>& relativePos, const Time& time) |
|
|
|
@@ -43612,8 +43587,7 @@ void Component::internalMouseDown (MouseInputSource& source, const Point<int>& r |
|
|
|
this, this, time, relativePos, time, |
|
|
|
source.getNumberOfMultipleClicks(), false); |
|
|
|
|
|
|
|
desktop.resetTimer(); |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseDown, me); |
|
|
|
desktop.getMouseListeners().callChecked (checker, &MouseListener::mouseDown, me); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -43643,9 +43617,6 @@ void Component::internalMouseDown (MouseInputSource& source, const Point<int>& r |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
flags.mouseDownFlag = true; |
|
|
|
flags.mouseOverFlag = true; |
|
|
|
|
|
|
|
if (flags.repaintOnMouseActivityFlag) |
|
|
|
repaint(); |
|
|
|
|
|
|
|
@@ -43657,84 +43628,70 @@ void Component::internalMouseDown (MouseInputSource& source, const Point<int>& r |
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
desktop.resetTimer(); |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseDown, me); |
|
|
|
desktop.getMouseListeners().callChecked (checker, &MouseListener::mouseDown, me); |
|
|
|
|
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseDown, me); |
|
|
|
} |
|
|
|
|
|
|
|
void Component::internalMouseUp (MouseInputSource& source, const Point<int>& relativePos, const Time& time, const ModifierKeys& oldModifiers) |
|
|
|
{ |
|
|
|
if (flags.mouseDownFlag) |
|
|
|
{ |
|
|
|
flags.mouseDownFlag = false; |
|
|
|
BailOutChecker checker (this); |
|
|
|
|
|
|
|
BailOutChecker checker (this); |
|
|
|
if (flags.repaintOnMouseActivityFlag) |
|
|
|
repaint(); |
|
|
|
|
|
|
|
if (flags.repaintOnMouseActivityFlag) |
|
|
|
repaint(); |
|
|
|
const MouseEvent me (source, relativePos, |
|
|
|
oldModifiers, this, this, time, |
|
|
|
getLocalPoint (nullptr, source.getLastMouseDownPosition()), |
|
|
|
source.getLastMouseDownTime(), |
|
|
|
source.getNumberOfMultipleClicks(), |
|
|
|
source.hasMouseMovedSignificantlySincePressed()); |
|
|
|
|
|
|
|
const MouseEvent me (source, relativePos, |
|
|
|
oldModifiers, this, this, time, |
|
|
|
getLocalPoint (nullptr, source.getLastMouseDownPosition()), |
|
|
|
source.getLastMouseDownTime(), |
|
|
|
source.getNumberOfMultipleClicks(), |
|
|
|
source.hasMouseMovedSignificantlySincePressed()); |
|
|
|
mouseUp (me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
mouseUp (me); |
|
|
|
Desktop& desktop = Desktop::getInstance(); |
|
|
|
desktop.getMouseListeners().callChecked (checker, &MouseListener::mouseUp, me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseUp, me); |
|
|
|
|
|
|
|
Desktop& desktop = Desktop::getInstance(); |
|
|
|
desktop.resetTimer(); |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseUp, me); |
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseUp, me); |
|
|
|
// check for double-click |
|
|
|
if (me.getNumberOfClicks() >= 2) |
|
|
|
{ |
|
|
|
mouseDoubleClick (me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
// check for double-click |
|
|
|
if (me.getNumberOfClicks() >= 2) |
|
|
|
{ |
|
|
|
mouseDoubleClick (me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseDoubleClick, me); |
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseDoubleClick, me); |
|
|
|
} |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseDoubleClick, me); |
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseDoubleClick, me); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void Component::internalMouseDrag (MouseInputSource& source, const Point<int>& relativePos, const Time& time) |
|
|
|
{ |
|
|
|
if (flags.mouseDownFlag) |
|
|
|
{ |
|
|
|
flags.mouseOverFlag = reallyContains (relativePos, false); |
|
|
|
|
|
|
|
BailOutChecker checker (this); |
|
|
|
BailOutChecker checker (this); |
|
|
|
|
|
|
|
const MouseEvent me (source, relativePos, |
|
|
|
source.getCurrentModifiers(), this, this, time, |
|
|
|
getLocalPoint (nullptr, source.getLastMouseDownPosition()), |
|
|
|
source.getLastMouseDownTime(), |
|
|
|
source.getNumberOfMultipleClicks(), |
|
|
|
source.hasMouseMovedSignificantlySincePressed()); |
|
|
|
const MouseEvent me (source, relativePos, |
|
|
|
source.getCurrentModifiers(), this, this, time, |
|
|
|
getLocalPoint (nullptr, source.getLastMouseDownPosition()), |
|
|
|
source.getLastMouseDownTime(), |
|
|
|
source.getNumberOfMultipleClicks(), |
|
|
|
source.hasMouseMovedSignificantlySincePressed()); |
|
|
|
|
|
|
|
mouseDrag (me); |
|
|
|
mouseDrag (me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
Desktop& desktop = Desktop::getInstance(); |
|
|
|
desktop.resetTimer(); |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseDrag, me); |
|
|
|
Desktop::getInstance().getMouseListeners().callChecked (checker, &MouseListener::mouseDrag, me); |
|
|
|
|
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseDrag, me); |
|
|
|
} |
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseDrag, me); |
|
|
|
} |
|
|
|
|
|
|
|
void Component::internalMouseMove (MouseInputSource& source, const Point<int>& relativePos, const Time& time) |
|
|
|
@@ -43752,15 +43709,12 @@ void Component::internalMouseMove (MouseInputSource& source, const Point<int>& r |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
flags.mouseOverFlag = true; |
|
|
|
|
|
|
|
mouseMove (me); |
|
|
|
|
|
|
|
if (checker.shouldBailOut()) |
|
|
|
return; |
|
|
|
|
|
|
|
desktop.resetTimer(); |
|
|
|
desktop.mouseListeners.callChecked (checker, &MouseListener::mouseMove, me); |
|
|
|
desktop.getMouseListeners().callChecked (checker, &MouseListener::mouseMove, me); |
|
|
|
|
|
|
|
MouseListenerList::sendMouseEvent (*this, checker, &MouseListener::mouseMove, me); |
|
|
|
} |
|
|
|
@@ -44138,27 +44092,47 @@ void Component::giveAwayFocus (const bool sendFocusLossEvent) |
|
|
|
|
|
|
|
bool Component::isMouseOver (const bool includeChildren) const |
|
|
|
{ |
|
|
|
if (flags.mouseOverFlag) |
|
|
|
return true; |
|
|
|
const Desktop& desktop = Desktop::getInstance(); |
|
|
|
|
|
|
|
if (includeChildren) |
|
|
|
for (int i = desktop.getNumMouseSources(); --i >= 0;) |
|
|
|
{ |
|
|
|
Desktop& desktop = Desktop::getInstance(); |
|
|
|
const MouseInputSource* const mi = desktop.getMouseSource(i); |
|
|
|
|
|
|
|
for (int i = desktop.getNumMouseSources(); --i >= 0;) |
|
|
|
{ |
|
|
|
Component* const c = desktop.getMouseSource(i)->getComponentUnderMouse(); |
|
|
|
Component* const c = mi->getComponentUnderMouse(); |
|
|
|
|
|
|
|
if (isParentOf (c) && c->flags.mouseOverFlag) // (mouseOverFlag checked in case it's being dragged outside the comp) |
|
|
|
return true; |
|
|
|
} |
|
|
|
if ((c == this || (includeChildren && isParentOf (c))) |
|
|
|
&& c->reallyContains (c->getLocalPoint (nullptr, mi->getScreenPosition()), false)) |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
bool Component::isMouseButtonDown() const |
|
|
|
{ |
|
|
|
const Desktop& desktop = Desktop::getInstance(); |
|
|
|
|
|
|
|
for (int i = desktop.getNumMouseSources(); --i >= 0;) |
|
|
|
{ |
|
|
|
const MouseInputSource* const mi = desktop.getMouseSource(i); |
|
|
|
|
|
|
|
if (mi->isDragging() && mi->getComponentUnderMouse() == this) |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
bool Component::isMouseButtonDown() const noexcept { return flags.mouseDownFlag; } |
|
|
|
bool Component::isMouseOverOrDragging() const noexcept { return flags.mouseOverFlag || flags.mouseDownFlag; } |
|
|
|
bool Component::isMouseOverOrDragging() const |
|
|
|
{ |
|
|
|
const Desktop& desktop = Desktop::getInstance(); |
|
|
|
|
|
|
|
for (int i = desktop.getNumMouseSources(); --i >= 0;) |
|
|
|
if (desktop.getMouseSource(i)->getComponentUnderMouse() == this) |
|
|
|
return true; |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
bool JUCE_CALLTYPE Component::isMouseButtonDownAnywhere() noexcept |
|
|
|
{ |
|
|
|
@@ -44566,6 +44540,22 @@ void Desktop::handleAsyncUpdate() |
|
|
|
focusListeners.call (&FocusChangeListener::globalFocusChanged, currentFocus); |
|
|
|
} |
|
|
|
|
|
|
|
void Desktop::resetTimer() |
|
|
|
{ |
|
|
|
if (mouseListeners.size() == 0) |
|
|
|
stopTimer(); |
|
|
|
else |
|
|
|
startTimer (100); |
|
|
|
|
|
|
|
lastFakeMouseMove = getMousePosition(); |
|
|
|
} |
|
|
|
|
|
|
|
ListenerList <MouseListener>& Desktop::getMouseListeners() |
|
|
|
{ |
|
|
|
resetTimer(); |
|
|
|
return mouseListeners; |
|
|
|
} |
|
|
|
|
|
|
|
void Desktop::addGlobalMouseListener (MouseListener* const listener) |
|
|
|
{ |
|
|
|
mouseListeners.add (listener); |
|
|
|
@@ -44611,16 +44601,6 @@ void Desktop::sendMouseMove() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void Desktop::resetTimer() |
|
|
|
{ |
|
|
|
if (mouseListeners.size() == 0) |
|
|
|
stopTimer(); |
|
|
|
else |
|
|
|
startTimer (100); |
|
|
|
|
|
|
|
lastFakeMouseMove = getMousePosition(); |
|
|
|
} |
|
|
|
|
|
|
|
void Desktop::setKioskModeComponent (Component* componentToUse, const bool allowMenusAndBars) |
|
|
|
{ |
|
|
|
if (kioskModeComponent != componentToUse) |
|
|
|
@@ -63082,7 +63062,7 @@ ModifierKeys& ModifierKeys::operator= (const ModifierKeys& other) noexcept |
|
|
|
|
|
|
|
ModifierKeys ModifierKeys::currentModifiers; |
|
|
|
|
|
|
|
const ModifierKeys ModifierKeys::getCurrentModifiers() noexcept |
|
|
|
ModifierKeys ModifierKeys::getCurrentModifiers() noexcept |
|
|
|
{ |
|
|
|
return currentModifiers; |
|
|
|
} |
|
|
|
@@ -73580,7 +73560,7 @@ public: |
|
|
|
return static_cast <Component*> (componentUnderMouse); |
|
|
|
} |
|
|
|
|
|
|
|
const ModifierKeys getCurrentModifiers() const |
|
|
|
ModifierKeys getCurrentModifiers() const |
|
|
|
{ |
|
|
|
return ModifierKeys::getCurrentModifiers().withoutMouseButtons().withFlags (buttonState.getRawFlags()); |
|
|
|
} |
|
|
|
@@ -73610,7 +73590,7 @@ public: |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
|
|
|
|
const Point<int> getScreenPosition() const |
|
|
|
Point<int> getScreenPosition() const |
|
|
|
{ |
|
|
|
// This needs to return the live position if possible, but it mustn't update the lastScreenPos |
|
|
|
// value, because that can cause continuity problems. |
|
|
|
@@ -73716,8 +73696,12 @@ public: |
|
|
|
|
|
|
|
if (current != nullptr) |
|
|
|
{ |
|
|
|
WeakReference<Component> safeOldComp (current); |
|
|
|
setButtons (screenPos, time, ModifierKeys()); |
|
|
|
sendMouseExit (current, screenPos, time); |
|
|
|
|
|
|
|
if (safeOldComp != nullptr) |
|
|
|
sendMouseExit (current, screenPos, time); |
|
|
|
|
|
|
|
buttonState = originalButtonState; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -74019,8 +74003,8 @@ bool MouseInputSource::canHover() const { return isMouse(); } |
|
|
|
bool MouseInputSource::hasMouseWheel() const { return isMouse(); } |
|
|
|
int MouseInputSource::getIndex() const { return pimpl->index; } |
|
|
|
bool MouseInputSource::isDragging() const { return pimpl->isDragging(); } |
|
|
|
const Point<int> MouseInputSource::getScreenPosition() const { return pimpl->getScreenPosition(); } |
|
|
|
const ModifierKeys MouseInputSource::getCurrentModifiers() const { return pimpl->getCurrentModifiers(); } |
|
|
|
Point<int> MouseInputSource::getScreenPosition() const { return pimpl->getScreenPosition(); } |
|
|
|
ModifierKeys MouseInputSource::getCurrentModifiers() const { return pimpl->getCurrentModifiers(); } |
|
|
|
Component* MouseInputSource::getComponentUnderMouse() const { return pimpl->getComponentUnderMouse(); } |
|
|
|
void MouseInputSource::triggerFakeMove() const { pimpl->triggerFakeMove(); } |
|
|
|
int MouseInputSource::getNumberOfMultipleClicks() const noexcept { return pimpl->getNumberOfMultipleClicks(); } |
|
|
|
@@ -93447,7 +93431,7 @@ void GlyphArrangement::stretchRangeOfGlyphs (int startIndex, int num, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const Rectangle<float> GlyphArrangement::getBoundingBox (int startIndex, int num, const bool includeWhitespace) const |
|
|
|
Rectangle<float> GlyphArrangement::getBoundingBox (int startIndex, int num, const bool includeWhitespace) const |
|
|
|
{ |
|
|
|
jassert (startIndex >= 0); |
|
|
|
|
|
|
|
@@ -108537,6 +108521,21 @@ public: |
|
|
|
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, |
|
|
|
int64 startSampleInFile, int numSamples) |
|
|
|
{ |
|
|
|
jassert (destSamples != nullptr); |
|
|
|
const int64 samplesAvailable = lengthInSamples - startSampleInFile; |
|
|
|
|
|
|
|
if (samplesAvailable < numSamples) |
|
|
|
{ |
|
|
|
for (int i = numDestChannels; --i >= 0;) |
|
|
|
if (destSamples[i] != nullptr) |
|
|
|
zeromem (destSamples[i] + startOffsetInDestBuffer, sizeof (int) * numSamples); |
|
|
|
|
|
|
|
numSamples = (int) samplesAvailable; |
|
|
|
} |
|
|
|
|
|
|
|
if (numSamples <= 0) |
|
|
|
return true; |
|
|
|
|
|
|
|
OSStatus status = ExtAudioFileSeek (audioFileRef, startSampleInFile); |
|
|
|
if (status != noErr) |
|
|
|
return false; |
|
|
|
@@ -251296,7 +251295,7 @@ void ModifierKeys::updateCurrentModifiers() noexcept |
|
|
|
currentModifiers = Win32ComponentPeer::currentModifiers; |
|
|
|
} |
|
|
|
|
|
|
|
const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
{ |
|
|
|
Win32ComponentPeer::updateKeyModifiers(); |
|
|
|
|
|
|
|
@@ -251499,7 +251498,7 @@ void Desktop::createMouseInputSources() |
|
|
|
mouseSources.add (new MouseInputSource (0, true)); |
|
|
|
} |
|
|
|
|
|
|
|
const Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
{ |
|
|
|
POINT mousePos; |
|
|
|
GetCursorPos (&mousePos); |
|
|
|
@@ -268009,7 +268008,7 @@ void ModifierKeys::updateCurrentModifiers() noexcept |
|
|
|
currentModifiers = LinuxComponentPeer::currentModifiers; |
|
|
|
} |
|
|
|
|
|
|
|
const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
{ |
|
|
|
Window root, child; |
|
|
|
int x, y, winx, winy; |
|
|
|
@@ -268184,7 +268183,7 @@ bool Desktop::canUseSemiTransparentWindows() noexcept |
|
|
|
&& (matchedDepth == desiredDepth); |
|
|
|
} |
|
|
|
|
|
|
|
const Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
{ |
|
|
|
Window root, child; |
|
|
|
int x, y, winx, winy; |
|
|
|
@@ -271048,6 +271047,16 @@ namespace |
|
|
|
{ |
|
|
|
return [NSString stringWithUTF8String: s.toUTF8()]; |
|
|
|
} |
|
|
|
|
|
|
|
NSString* nsStringLiteral (const char* const s) noexcept |
|
|
|
{ |
|
|
|
return [NSString stringWithUTF8String: s]; |
|
|
|
} |
|
|
|
|
|
|
|
NSString* nsEmptyString() noexcept |
|
|
|
{ |
|
|
|
return [NSString string]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif // __JUCE_OSX_OBJCHELPERS_JUCEHEADER__ |
|
|
|
@@ -271795,7 +271804,7 @@ private: |
|
|
|
if (req == nil) |
|
|
|
return nil; |
|
|
|
|
|
|
|
[req setHTTPMethod: isPost ? @"POST" : @"GET"]; |
|
|
|
[req setHTTPMethod: nsStringLiteral (isPost ? "POST" : "GET")]; |
|
|
|
//[req setCachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheData]; |
|
|
|
|
|
|
|
StringArray headerLines; |
|
|
|
@@ -273219,7 +273228,7 @@ String File::getVersion() const |
|
|
|
|
|
|
|
if (info != nil) |
|
|
|
{ |
|
|
|
NSString* name = [info valueForKey: @"CFBundleShortVersionString"]; |
|
|
|
NSString* name = [info valueForKey: nsStringLiteral ("CFBundleShortVersionString")]; |
|
|
|
|
|
|
|
if (name != nil) |
|
|
|
result = nsStringToJuce (name); |
|
|
|
@@ -273260,7 +273269,7 @@ bool File::moveToTrash() const |
|
|
|
return [[NSWorkspace sharedWorkspace] |
|
|
|
performFileOperation: NSWorkspaceRecycleOperation |
|
|
|
source: [p stringByDeletingLastPathComponent] |
|
|
|
destination: @"" |
|
|
|
destination: nsEmptyString() |
|
|
|
files: [NSArray arrayWithObject: [p lastPathComponent]] |
|
|
|
tag: nil ]; |
|
|
|
#endif |
|
|
|
@@ -273383,7 +273392,7 @@ void File::revealToUser() const |
|
|
|
{ |
|
|
|
#if ! JUCE_IOS |
|
|
|
if (exists()) |
|
|
|
[[NSWorkspace sharedWorkspace] selectFile: juceStringToNS (getFullPathName()) inFileViewerRootedAtPath: @""]; |
|
|
|
[[NSWorkspace sharedWorkspace] selectFile: juceStringToNS (getFullPathName()) inFileViewerRootedAtPath: nsEmptyString()]; |
|
|
|
else if (getParentDirectory().exists()) |
|
|
|
getParentDirectory().revealToUser(); |
|
|
|
#endif |
|
|
|
@@ -274467,13 +274476,13 @@ void Font::getPlatformDefaultFontNames (String& defaultSans, String& defaultSeri |
|
|
|
namespace |
|
|
|
{ |
|
|
|
template <class RectType> |
|
|
|
const Rectangle<int> convertToRectInt (const RectType& r) |
|
|
|
Rectangle<int> convertToRectInt (const RectType& r) |
|
|
|
{ |
|
|
|
return Rectangle<int> ((int) r.origin.x, (int) r.origin.y, (int) r.size.width, (int) r.size.height); |
|
|
|
} |
|
|
|
|
|
|
|
template <class RectType> |
|
|
|
const Rectangle<float> convertToRectFloat (const RectType& r) |
|
|
|
Rectangle<float> convertToRectFloat (const RectType& r) |
|
|
|
{ |
|
|
|
return Rectangle<float> (r.origin.x, r.origin.y, r.size.width, r.size.height); |
|
|
|
} |
|
|
|
@@ -275618,7 +275627,7 @@ bool KeyPress::isKeyCurrentlyDown (const int keyCode) |
|
|
|
|
|
|
|
ModifierKeys UIViewComponentPeer::currentModifiers; |
|
|
|
|
|
|
|
const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
{ |
|
|
|
return UIViewComponentPeer::currentModifiers; |
|
|
|
} |
|
|
|
@@ -276558,7 +276567,7 @@ bool Desktop::canUseSemiTransparentWindows() noexcept |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
const Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
{ |
|
|
|
return juce_lastMousePos; |
|
|
|
} |
|
|
|
@@ -277422,7 +277431,7 @@ END_JUCE_NAMESPACE |
|
|
|
(void) request; |
|
|
|
(void) frame; |
|
|
|
|
|
|
|
NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"]; |
|
|
|
NSURL* url = [actionInformation valueForKey: nsStringLiteral ("WebActionOriginalURLKey")]; |
|
|
|
|
|
|
|
if (ownerComponent->pageAboutToLoad (nsStringToJuce ([url absoluteString]))) |
|
|
|
[listener use]; |
|
|
|
@@ -277440,8 +277449,8 @@ public: |
|
|
|
WebBrowserComponentInternal (WebBrowserComponent* owner) |
|
|
|
{ |
|
|
|
webView = [[WebView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f) |
|
|
|
frameName: @"" |
|
|
|
groupName: @""]; |
|
|
|
frameName: nsEmptyString() |
|
|
|
groupName: nsEmptyString()]; |
|
|
|
setView (webView); |
|
|
|
|
|
|
|
clickListener = [[DownloadClickDetector alloc] initWithWebBrowserOwner: owner]; |
|
|
|
@@ -277466,7 +277475,7 @@ public: |
|
|
|
|
|
|
|
if (postData != nullptr && postData->getSize() > 0) |
|
|
|
{ |
|
|
|
[r setHTTPMethod: @"POST"]; |
|
|
|
[r setHTTPMethod: nsStringLiteral ("POST")]; |
|
|
|
[r setHTTPBody: [NSData dataWithBytes: postData->getData() |
|
|
|
length: postData->getSize()]]; |
|
|
|
} |
|
|
|
@@ -279051,7 +279060,7 @@ using namespace JUCE_NAMESPACE; |
|
|
|
- (void) broadcastMessageCallback: (NSNotification*) n |
|
|
|
{ |
|
|
|
NSDictionary* dict = (NSDictionary*) [n userInfo]; |
|
|
|
const String messageString (nsStringToJuce ((NSString*) [dict valueForKey: @"message"])); |
|
|
|
const String messageString (nsStringToJuce ((NSString*) [dict valueForKey: nsStringLiteral ("message")])); |
|
|
|
MessageManager::getInstance()->deliverBroadcastMessage (messageString); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -279170,7 +279179,7 @@ bool MessageManager::postMessageToSystemQueue (Message* message) |
|
|
|
void MessageManager::broadcastMessage (const String& message) |
|
|
|
{ |
|
|
|
NSDictionary* info = [NSDictionary dictionaryWithObject: juceStringToNS (message) |
|
|
|
forKey: @"message"]; |
|
|
|
forKey: nsStringLiteral ("message")]; |
|
|
|
|
|
|
|
[[NSDistributedNotificationCenter defaultCenter] postNotificationName: AppDelegateRedirector::getBroacastEventName() |
|
|
|
object: nil |
|
|
|
@@ -279973,13 +279982,13 @@ void Font::getPlatformDefaultFontNames (String& defaultSans, String& defaultSeri |
|
|
|
namespace |
|
|
|
{ |
|
|
|
template <class RectType> |
|
|
|
const Rectangle<int> convertToRectInt (const RectType& r) |
|
|
|
Rectangle<int> convertToRectInt (const RectType& r) |
|
|
|
{ |
|
|
|
return Rectangle<int> ((int) r.origin.x, (int) r.origin.y, (int) r.size.width, (int) r.size.height); |
|
|
|
} |
|
|
|
|
|
|
|
template <class RectType> |
|
|
|
const Rectangle<float> convertToRectFloat (const RectType& r) |
|
|
|
Rectangle<float> convertToRectFloat (const RectType& r) |
|
|
|
{ |
|
|
|
return Rectangle<float> (r.origin.x, r.origin.y, r.size.width, r.size.height); |
|
|
|
} |
|
|
|
@@ -281736,7 +281745,7 @@ void NSViewComponentPeer::updateKeysDown (NSEvent* ev, bool isKeyDown) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
{ |
|
|
|
return NSViewComponentPeer::currentModifiers; |
|
|
|
} |
|
|
|
@@ -282369,7 +282378,7 @@ BOOL NSViewComponentPeer::sendDragCallback (const int type, id <NSDraggingInfo> |
|
|
|
NSPasteboard* pasteBoard = [sender draggingPasteboard]; |
|
|
|
StringArray files; |
|
|
|
|
|
|
|
NSString* iTunesPasteboardType = @"CorePasteboardFlavorType 0x6974756E"; // 'itun' |
|
|
|
NSString* iTunesPasteboardType = nsStringLiteral ("CorePasteboardFlavorType 0x6974756E"); // 'itun' |
|
|
|
|
|
|
|
if (bestType == NSFilesPromisePboardType |
|
|
|
&& [[pasteBoard types] containsObject: iTunesPasteboardType]) |
|
|
|
@@ -282379,13 +282388,13 @@ BOOL NSViewComponentPeer::sendDragCallback (const int type, id <NSDraggingInfo> |
|
|
|
if ([list isKindOfClass: [NSDictionary class]]) |
|
|
|
{ |
|
|
|
NSDictionary* iTunesDictionary = (NSDictionary*) list; |
|
|
|
NSArray* tracks = [iTunesDictionary valueForKey: @"Tracks"]; |
|
|
|
NSArray* tracks = [iTunesDictionary valueForKey: nsStringLiteral ("Tracks")]; |
|
|
|
NSEnumerator* enumerator = [tracks objectEnumerator]; |
|
|
|
NSDictionary* track; |
|
|
|
|
|
|
|
while ((track = [enumerator nextObject]) != nil) |
|
|
|
{ |
|
|
|
NSURL* url = [NSURL URLWithString: [track valueForKey: @"Location"]]; |
|
|
|
NSURL* url = [NSURL URLWithString: [track valueForKey: nsStringLiteral ("Location")]]; |
|
|
|
|
|
|
|
if ([url isFileURL]) |
|
|
|
files.add (nsStringToJuce ([url path])); |
|
|
|
@@ -282769,7 +282778,7 @@ void JUCE_CALLTYPE NativeMessageBox::showMessageBox (AlertWindow::AlertIconType |
|
|
|
const String& title, const String& message, |
|
|
|
Component* associatedComponent) |
|
|
|
{ |
|
|
|
OSXMessageBox box (iconType, title, message, @"OK", nil, nil, 0, false); |
|
|
|
OSXMessageBox box (iconType, title, message, nsStringLiteral ("OK"), nil, nil, 0, false); |
|
|
|
(void) box.getResult(); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -282777,7 +282786,7 @@ void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIcon |
|
|
|
const String& title, const String& message, |
|
|
|
Component* associatedComponent) |
|
|
|
{ |
|
|
|
new OSXMessageBox (iconType, title, message, @"OK", nil, nil, 0, true); |
|
|
|
new OSXMessageBox (iconType, title, message, nsStringLiteral ("OK"), nil, nil, 0, true); |
|
|
|
} |
|
|
|
|
|
|
|
bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType iconType, |
|
|
|
@@ -282786,7 +282795,9 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType |
|
|
|
ModalComponentManager::Callback* callback) |
|
|
|
{ |
|
|
|
ScopedPointer<OSXMessageBox> mb (new OSXMessageBox (iconType, title, message, |
|
|
|
@"OK", @"Cancel", nil, callback, callback != nullptr)); |
|
|
|
nsStringLiteral ("OK"), |
|
|
|
nsStringLiteral ("Cancel"), |
|
|
|
nil, callback, callback != nullptr)); |
|
|
|
if (callback == nullptr) |
|
|
|
return mb->getResult() == 1; |
|
|
|
|
|
|
|
@@ -282800,7 +282811,10 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconTy |
|
|
|
ModalComponentManager::Callback* callback) |
|
|
|
{ |
|
|
|
ScopedPointer<OSXMessageBox> mb (new OSXMessageBox (iconType, title, message, |
|
|
|
@"Yes", @"Cancel", @"No", callback, callback != nullptr)); |
|
|
|
nsStringLiteral ("Yes"), |
|
|
|
nsStringLiteral ("Cancel"), |
|
|
|
nsStringLiteral ("No"), |
|
|
|
callback, callback != nullptr)); |
|
|
|
if (callback == nullptr) |
|
|
|
return mb->getResult(); |
|
|
|
|
|
|
|
@@ -282874,7 +282888,7 @@ bool Desktop::canUseSemiTransparentWindows() noexcept |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
const Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
{ |
|
|
|
JUCE_AUTORELEASEPOOL |
|
|
|
const NSPoint p ([NSEvent mouseLocation]); |
|
|
|
@@ -283226,7 +283240,7 @@ public: |
|
|
|
componentPeerChanged(); |
|
|
|
} |
|
|
|
|
|
|
|
const Rectangle<int> getViewBounds() const |
|
|
|
Rectangle<int> getViewBounds() const |
|
|
|
{ |
|
|
|
NSRect r = [view frame]; |
|
|
|
return Rectangle<int> (0, 0, (int) r.size.width, (int) r.size.height); |
|
|
|
@@ -284122,7 +284136,7 @@ public: |
|
|
|
{ |
|
|
|
NSMenuItem* item = [parent addItemWithTitle: juceStringToNS (name) |
|
|
|
action: nil |
|
|
|
keyEquivalent: @""]; |
|
|
|
keyEquivalent: nsEmptyString()]; |
|
|
|
[item setTag: tag]; |
|
|
|
|
|
|
|
NSMenu* sub = createMenu (child, name, menuId, tag); |
|
|
|
@@ -284226,7 +284240,7 @@ public: |
|
|
|
NSString* text = juceStringToNS (iter.itemName.upToFirstOccurrenceOf ("<end>", false, true)); |
|
|
|
|
|
|
|
if (text == nil) |
|
|
|
text = @""; |
|
|
|
text = nsEmptyString(); |
|
|
|
|
|
|
|
if (iter.isSeparator) |
|
|
|
{ |
|
|
|
@@ -284236,7 +284250,7 @@ public: |
|
|
|
{ |
|
|
|
NSMenuItem* item = [menuToAddTo addItemWithTitle: text |
|
|
|
action: nil |
|
|
|
keyEquivalent: @""]; |
|
|
|
keyEquivalent: nsEmptyString()]; |
|
|
|
|
|
|
|
[item setEnabled: false]; |
|
|
|
} |
|
|
|
@@ -284244,7 +284258,7 @@ public: |
|
|
|
{ |
|
|
|
NSMenuItem* item = [menuToAddTo addItemWithTitle: text |
|
|
|
action: nil |
|
|
|
keyEquivalent: @""]; |
|
|
|
keyEquivalent: nsEmptyString()]; |
|
|
|
|
|
|
|
[item setTag: iter.itemId]; |
|
|
|
[item setEnabled: iter.isEnabled]; |
|
|
|
@@ -284258,7 +284272,7 @@ public: |
|
|
|
{ |
|
|
|
NSMenuItem* item = [menuToAddTo addItemWithTitle: text |
|
|
|
action: @selector (menuItemInvoked:) |
|
|
|
keyEquivalent: @""]; |
|
|
|
keyEquivalent: nsEmptyString()]; |
|
|
|
|
|
|
|
[item setTag: iter.itemId]; |
|
|
|
[item setEnabled: iter.isEnabled]; |
|
|
|
@@ -284341,7 +284355,7 @@ private: |
|
|
|
|
|
|
|
static void flashMenuBar (NSMenu* menu) |
|
|
|
{ |
|
|
|
if ([[menu title] isEqualToString: @"Apple"]) |
|
|
|
if ([[menu title] isEqualToString: nsStringLiteral ("Apple")]) |
|
|
|
return; |
|
|
|
|
|
|
|
[menu retain]; |
|
|
|
@@ -284349,7 +284363,7 @@ private: |
|
|
|
const unichar f35Key = NSF35FunctionKey; |
|
|
|
NSString* f35String = [NSString stringWithCharacters: &f35Key length: 1]; |
|
|
|
|
|
|
|
NSMenuItem* item = [[NSMenuItem alloc] initWithTitle: @"x" |
|
|
|
NSMenuItem* item = [[NSMenuItem alloc] initWithTitle: nsStringLiteral ("x") |
|
|
|
action: nil |
|
|
|
keyEquivalent: f35String]; |
|
|
|
[item setTarget: nil]; |
|
|
|
@@ -284504,11 +284518,11 @@ namespace MainMenuHelpers |
|
|
|
NSMenuItem* item; |
|
|
|
|
|
|
|
// Services... |
|
|
|
item = [[NSMenuItem alloc] initWithTitle: NSLocalizedString (@"Services", nil) |
|
|
|
action: nil keyEquivalent: @""]; |
|
|
|
item = [[NSMenuItem alloc] initWithTitle: NSLocalizedString (nsStringLiteral ("Services"), nil) |
|
|
|
action: nil keyEquivalent: nsEmptyString()]; |
|
|
|
[menu addItem: item]; |
|
|
|
[item release]; |
|
|
|
NSMenu* servicesMenu = [[NSMenu alloc] initWithTitle: @"Services"]; |
|
|
|
NSMenu* servicesMenu = [[NSMenu alloc] initWithTitle: nsStringLiteral ("Services")]; |
|
|
|
[menu setSubmenu: servicesMenu forItem: item]; |
|
|
|
[NSApp setServicesMenu: servicesMenu]; |
|
|
|
[servicesMenu release]; |
|
|
|
@@ -284516,20 +284530,20 @@ namespace MainMenuHelpers |
|
|
|
|
|
|
|
// Hide + Show stuff... |
|
|
|
item = [[NSMenuItem alloc] initWithTitle: juceStringToNS ("Hide " + appName) |
|
|
|
action: @selector (hide:) keyEquivalent: @"h"]; |
|
|
|
action: @selector (hide:) keyEquivalent: nsStringLiteral ("h")]; |
|
|
|
[item setTarget: NSApp]; |
|
|
|
[menu addItem: item]; |
|
|
|
[item release]; |
|
|
|
|
|
|
|
item = [[NSMenuItem alloc] initWithTitle: NSLocalizedString (@"Hide Others", nil) |
|
|
|
action: @selector (hideOtherApplications:) keyEquivalent: @"h"]; |
|
|
|
item = [[NSMenuItem alloc] initWithTitle: NSLocalizedString (nsStringLiteral ("Hide Others"), nil) |
|
|
|
action: @selector (hideOtherApplications:) keyEquivalent: nsStringLiteral ("h")]; |
|
|
|
[item setKeyEquivalentModifierMask: NSCommandKeyMask | NSAlternateKeyMask]; |
|
|
|
[item setTarget: NSApp]; |
|
|
|
[menu addItem: item]; |
|
|
|
[item release]; |
|
|
|
|
|
|
|
item = [[NSMenuItem alloc] initWithTitle: NSLocalizedString (@"Show All", nil) |
|
|
|
action: @selector (unhideAllApplications:) keyEquivalent: @""]; |
|
|
|
item = [[NSMenuItem alloc] initWithTitle: NSLocalizedString (nsStringLiteral ("Show All"), nil) |
|
|
|
action: @selector (unhideAllApplications:) keyEquivalent: nsEmptyString()]; |
|
|
|
[item setTarget: NSApp]; |
|
|
|
[menu addItem: item]; |
|
|
|
[item release]; |
|
|
|
@@ -284538,7 +284552,7 @@ namespace MainMenuHelpers |
|
|
|
|
|
|
|
// Quit item.... |
|
|
|
item = [[NSMenuItem alloc] initWithTitle: juceStringToNS ("Quit " + appName) |
|
|
|
action: @selector (terminate:) keyEquivalent: @"q"]; |
|
|
|
action: @selector (terminate:) keyEquivalent: nsStringLiteral ("q")]; |
|
|
|
|
|
|
|
[item setTarget: NSApp]; |
|
|
|
[menu addItem: item]; |
|
|
|
@@ -284557,10 +284571,10 @@ namespace MainMenuHelpers |
|
|
|
{ |
|
|
|
JUCE_AUTORELEASEPOOL |
|
|
|
|
|
|
|
NSMenu* mainMenu = [[NSMenu alloc] initWithTitle: @"MainMenu"]; |
|
|
|
NSMenuItem* item = [mainMenu addItemWithTitle: @"Apple" action: nil keyEquivalent: @""]; |
|
|
|
NSMenu* mainMenu = [[NSMenu alloc] initWithTitle: nsStringLiteral ("MainMenu")]; |
|
|
|
NSMenuItem* item = [mainMenu addItemWithTitle: nsStringLiteral ("Apple") action: nil keyEquivalent: nsEmptyString()]; |
|
|
|
|
|
|
|
NSMenu* appMenu = [[NSMenu alloc] initWithTitle: @"Apple"]; |
|
|
|
NSMenu* appMenu = [[NSMenu alloc] initWithTitle: nsStringLiteral ("Apple")]; |
|
|
|
|
|
|
|
[NSApp performSelector: @selector (setAppleMenu:) withObject: appMenu]; |
|
|
|
[mainMenu setSubmenu: appMenu forItem: item]; |
|
|
|
@@ -284874,7 +284888,7 @@ static QTMovie* openMovieFromStream (InputStream* movieStream, File& movieFile) |
|
|
|
movie = [QTMovie movieWithDataReference: [QTDataReference dataReferenceWithReferenceToData: [NSData dataWithBytes: temp.getData() |
|
|
|
length: temp.getSize()] |
|
|
|
name: [NSString stringWithUTF8String: suffixesToTry[i]] |
|
|
|
MIMEType: @""] |
|
|
|
MIMEType: nsEmptyString()] |
|
|
|
error: nil]; |
|
|
|
|
|
|
|
if (movie != 0) |
|
|
|
@@ -285937,7 +285951,7 @@ END_JUCE_NAMESPACE |
|
|
|
(void) request; |
|
|
|
(void) frame; |
|
|
|
|
|
|
|
NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"]; |
|
|
|
NSURL* url = [actionInformation valueForKey: nsStringLiteral ("WebActionOriginalURLKey")]; |
|
|
|
|
|
|
|
if (ownerComponent->pageAboutToLoad (nsStringToJuce ([url absoluteString]))) |
|
|
|
[listener use]; |
|
|
|
@@ -285955,8 +285969,8 @@ public: |
|
|
|
WebBrowserComponentInternal (WebBrowserComponent* owner) |
|
|
|
{ |
|
|
|
webView = [[WebView alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f) |
|
|
|
frameName: @"" |
|
|
|
groupName: @""]; |
|
|
|
frameName: nsEmptyString() |
|
|
|
groupName: nsEmptyString()]; |
|
|
|
setView (webView); |
|
|
|
|
|
|
|
clickListener = [[DownloadClickDetector alloc] initWithWebBrowserOwner: owner]; |
|
|
|
@@ -285981,7 +285995,7 @@ public: |
|
|
|
|
|
|
|
if (postData != nullptr && postData->getSize() > 0) |
|
|
|
{ |
|
|
|
[r setHTTPMethod: @"POST"]; |
|
|
|
[r setHTTPMethod: nsStringLiteral ("POST")]; |
|
|
|
[r setHTTPBody: [NSData dataWithBytes: postData->getData() |
|
|
|
length: postData->getSize()]]; |
|
|
|
} |
|
|
|
@@ -288217,7 +288231,7 @@ END_JUCE_NAMESPACE |
|
|
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 |
|
|
|
NSNumber* hosttime = (NSNumber*) [sampleBuffer attributeForKey: QTSampleBufferHostTimeAttribute]; |
|
|
|
#else |
|
|
|
NSNumber* hosttime = (NSNumber*) [sampleBuffer attributeForKey: @"hostTime"]; |
|
|
|
NSNumber* hosttime = (NSNumber*) [sampleBuffer attributeForKey: nsStringLiteral ("hostTime")]; |
|
|
|
#endif |
|
|
|
|
|
|
|
int64 presentationTime = (hosttime != nil) |
|
|
|
@@ -288314,10 +288328,10 @@ void CameraDevice::startRecordingToFile (const File& file, int quality) |
|
|
|
|
|
|
|
if ([mediaType isEqualToString: QTMediaTypeVideo]) |
|
|
|
options = [QTCompressionOptions compressionOptionsWithIdentifier: |
|
|
|
quality >= 1 ? @"QTCompressionOptionsSD480SizeH264Video" |
|
|
|
: @"QTCompressionOptions240SizeH264Video"]; |
|
|
|
quality >= 1 ? nsStringLiteral ("QTCompressionOptionsSD480SizeH264Video")_ |
|
|
|
nsStringLiteral ("QTCompressionOptions240SizeH264Video")]; |
|
|
|
else if ([mediaType isEqualToString: QTMediaTypeSound]) |
|
|
|
options = [QTCompressionOptions compressionOptionsWithIdentifier: @"QTCompressionOptionsHighQualityAACAudio"]; |
|
|
|
options = [QTCompressionOptions compressionOptionsWithIdentifier: nsStringLiteral ("QTCompressionOptionsHighQualityAACAudio")]; |
|
|
|
|
|
|
|
[d->fileOutput setCompressionOptions: options forConnection: connection]; |
|
|
|
} |
|
|
|
@@ -292296,7 +292310,7 @@ void Desktop::createMouseInputSources() |
|
|
|
mouseSources.add (new MouseInputSource (i, false)); |
|
|
|
} |
|
|
|
|
|
|
|
const Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
Point<int> MouseInputSource::getCurrentMousePosition() |
|
|
|
{ |
|
|
|
return AndroidComponentPeer::lastMousePos; |
|
|
|
} |
|
|
|
@@ -292317,7 +292331,7 @@ void ModifierKeys::updateCurrentModifiers() noexcept |
|
|
|
currentModifiers = AndroidComponentPeer::currentModifiers; |
|
|
|
} |
|
|
|
|
|
|
|
const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept |
|
|
|
{ |
|
|
|
return AndroidComponentPeer::currentModifiers; |
|
|
|
} |
|
|
|
|