| @@ -101,7 +101,7 @@ namespace FileHelpers | |||||
| } | } | ||||
| #if JUCE_IOS | #if JUCE_IOS | ||||
| String getIOSSystemLocation (NSSearchPathDirectory type) | |||||
| static String getIOSSystemLocation (NSSearchPathDirectory type) | |||||
| { | { | ||||
| return nsStringToJuce ([NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES) | return nsStringToJuce ([NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES) | ||||
| objectAtIndex: 0]); | objectAtIndex: 0]); | ||||
| @@ -392,7 +392,7 @@ bool DirectoryIterator::NativeIterator::next (String& filenameFound, | |||||
| //============================================================================== | //============================================================================== | ||||
| bool JUCE_CALLTYPE Process::openDocument (const String& fileName, const String& parameters) | |||||
| bool JUCE_CALLTYPE Process::openDocument (const String& fileName, const String& /*parameters*/) | |||||
| { | { | ||||
| JUCE_AUTORELEASEPOOL | JUCE_AUTORELEASEPOOL | ||||
| { | { | ||||
| @@ -59,6 +59,11 @@ bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& targetEmailA | |||||
| const StringArray& filesToAttach) | const StringArray& filesToAttach) | ||||
| { | { | ||||
| #if JUCE_IOS | #if JUCE_IOS | ||||
| (void) targetEmailAddress; | |||||
| (void) emailSubject; | |||||
| (void) bodyText; | |||||
| (void) filesToAttach; | |||||
| //xxx probably need to use MFMailComposeViewController | //xxx probably need to use MFMailComposeViewController | ||||
| jassertfalse; | jassertfalse; | ||||
| return false; | return false; | ||||
| @@ -40,7 +40,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) | |||||
| { | { | ||||
| jassert (isThisTheMessageThread()); // must only be called by the message thread | jassert (isThisTheMessageThread()); // must only be called by the message thread | ||||
| uint32 endTime = Time::getMillisecondCounter() + millisecondsToRunFor; | |||||
| uint32 startTime = Time::getMillisecondCounter(); | |||||
| NSDate* endDate = [NSDate dateWithTimeIntervalSinceNow: millisecondsToRunFor * 0.001]; | NSDate* endDate = [NSDate dateWithTimeIntervalSinceNow: millisecondsToRunFor * 0.001]; | ||||
| while (! quitMessagePosted) | while (! quitMessagePosted) | ||||
| @@ -50,7 +50,8 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) | |||||
| [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode | [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode | ||||
| beforeDate: endDate]; | beforeDate: endDate]; | ||||
| if (millisecondsToRunFor >= 0 && Time::getMillisecondCounter() >= endTime) | |||||
| if (millisecondsToRunFor >= 0 | |||||
| && Time::getMillisecondCounter() >= startTime + (uint32) millisecondsToRunFor) | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -287,11 +287,16 @@ private: | |||||
| - (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation | - (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation | ||||
| duration: (NSTimeInterval) duration | duration: (NSTimeInterval) duration | ||||
| { | { | ||||
| (void) toInterfaceOrientation; | |||||
| (void) duration; | |||||
| [UIView setAnimationsEnabled: NO]; // disable this because it goes the wrong way and looks like crap. | [UIView setAnimationsEnabled: NO]; // disable this because it goes the wrong way and looks like crap. | ||||
| } | } | ||||
| - (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation | - (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation | ||||
| { | { | ||||
| (void) fromInterfaceOrientation; | |||||
| JuceUIView* juceView = (JuceUIView*) [self view]; | JuceUIView* juceView = (JuceUIView*) [self view]; | ||||
| jassert (juceView != nil && juceView->owner != nullptr); | jassert (juceView != nil && juceView->owner != nullptr); | ||||
| juceView->owner->updateTransformAndScreenBounds(); | juceView->owner->updateTransformAndScreenBounds(); | ||||
| @@ -308,11 +313,13 @@ private: | |||||
| - (void) viewWillAppear: (BOOL) animated | - (void) viewWillAppear: (BOOL) animated | ||||
| { | { | ||||
| (void) animated; | |||||
| [self viewDidLoad]; | [self viewDidLoad]; | ||||
| } | } | ||||
| - (void) viewDidAppear: (BOOL) animated | - (void) viewDidAppear: (BOOL) animated | ||||
| { | { | ||||
| (void) animated; | |||||
| [self viewDidLoad]; | [self viewDidLoad]; | ||||
| } | } | ||||
| @@ -354,18 +361,24 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| - (void) touchesBegan: (NSSet*) touches withEvent: (UIEvent*) event | - (void) touchesBegan: (NSSet*) touches withEvent: (UIEvent*) event | ||||
| { | { | ||||
| (void) touches; | |||||
| if (owner != nullptr) | if (owner != nullptr) | ||||
| owner->handleTouches (event, true, false, false); | owner->handleTouches (event, true, false, false); | ||||
| } | } | ||||
| - (void) touchesMoved: (NSSet*) touches withEvent: (UIEvent*) event | - (void) touchesMoved: (NSSet*) touches withEvent: (UIEvent*) event | ||||
| { | { | ||||
| (void) touches; | |||||
| if (owner != nullptr) | if (owner != nullptr) | ||||
| owner->handleTouches (event, false, false, false); | owner->handleTouches (event, false, false, false); | ||||
| } | } | ||||
| - (void) touchesEnded: (NSSet*) touches withEvent: (UIEvent*) event | - (void) touchesEnded: (NSSet*) touches withEvent: (UIEvent*) event | ||||
| { | { | ||||
| (void) touches; | |||||
| if (owner != nullptr) | if (owner != nullptr) | ||||
| owner->handleTouches (event, false, true, false); | owner->handleTouches (event, false, true, false); | ||||
| } | } | ||||
| @@ -402,7 +415,8 @@ private: | |||||
| - (BOOL) textView: (UITextView*) textView shouldChangeTextInRange: (NSRange) range replacementText: (NSString*) text | - (BOOL) textView: (UITextView*) textView shouldChangeTextInRange: (NSRange) range replacementText: (NSString*) text | ||||
| { | { | ||||
| return owner->textViewReplaceCharacters (Range<int> (range.location, range.location + range.length), | |||||
| (void) textView; | |||||
| return owner->textViewReplaceCharacters (Range<int> ((int) range.location, (int) (range.location + range.length)), | |||||
| nsStringToJuce (text)); | nsStringToJuce (text)); | ||||
| } | } | ||||
| @@ -432,7 +446,7 @@ private: | |||||
| namespace juce | namespace juce | ||||
| { | { | ||||
| bool KeyPress::isKeyCurrentlyDown (const int keyCode) | |||||
| bool KeyPress::isKeyCurrentlyDown (int) | |||||
| { | { | ||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -534,7 +548,7 @@ void UIViewComponentPeer::setVisible (bool shouldBeVisible) | |||||
| window.hidden = ! shouldBeVisible; | window.hidden = ! shouldBeVisible; | ||||
| } | } | ||||
| void UIViewComponentPeer::setTitle (const String& title) | |||||
| void UIViewComponentPeer::setTitle (const String&) | |||||
| { | { | ||||
| // xxx is this possible? | // xxx is this possible? | ||||
| } | } | ||||
| @@ -669,7 +683,7 @@ void UIViewComponentPeer::toFront (bool makeActiveWindow) | |||||
| if (isSharedWindow) | if (isSharedWindow) | ||||
| [[view superview] bringSubviewToFront: view]; | [[view superview] bringSubviewToFront: view]; | ||||
| if (window != nil && component.isVisible()) | |||||
| if (makeActiveWindow && window != nil && component.isVisible()) | |||||
| [window makeKeyAndVisible]; | [window makeKeyAndVisible]; | ||||
| } | } | ||||
| @@ -876,14 +890,14 @@ bool UIViewComponentPeer::canBecomeKeyWindow() | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool allowMenusAndBars) | |||||
| void Desktop::setKioskComponent (Component* kioskModeComp, bool enableOrDisable, bool /*allowMenusAndBars*/) | |||||
| { | { | ||||
| [[UIApplication sharedApplication] setStatusBarHidden: enableOrDisable | [[UIApplication sharedApplication] setStatusBarHidden: enableOrDisable | ||||
| withAnimation: UIStatusBarAnimationSlide]; | withAnimation: UIStatusBarAnimationSlide]; | ||||
| displays->refresh(); | displays->refresh(); | ||||
| if (ComponentPeer* const peer = kioskModeComponent->getPeer()) | |||||
| if (ComponentPeer* const peer = kioskModeComp->getPeer()) | |||||
| peer->setFullScreen (enableOrDisable); | peer->setFullScreen (enableOrDisable); | ||||
| } | } | ||||
| @@ -39,6 +39,7 @@ | |||||
| - (void) applicationDidFinishLaunching: (UIApplication*) application | - (void) applicationDidFinishLaunching: (UIApplication*) application | ||||
| { | { | ||||
| (void) application; | |||||
| initialiseJuce_GUI(); | initialiseJuce_GUI(); | ||||
| JUCEApplicationBase* app = JUCEApplicationBase::createInstance(); | JUCEApplicationBase* app = JUCEApplicationBase::createInstance(); | ||||
| @@ -49,17 +50,20 @@ | |||||
| - (void) applicationWillTerminate: (UIApplication*) application | - (void) applicationWillTerminate: (UIApplication*) application | ||||
| { | { | ||||
| (void) application; | |||||
| JUCEApplicationBase::appWillTerminateByForce(); | JUCEApplicationBase::appWillTerminateByForce(); | ||||
| } | } | ||||
| - (void) applicationDidEnterBackground: (UIApplication*) application | - (void) applicationDidEnterBackground: (UIApplication*) application | ||||
| { | { | ||||
| (void) application; | |||||
| if (JUCEApplicationBase* const app = JUCEApplicationBase::getInstance()) | if (JUCEApplicationBase* const app = JUCEApplicationBase::getInstance()) | ||||
| app->suspended(); | app->suspended(); | ||||
| } | } | ||||
| - (void) applicationWillEnterForeground: (UIApplication*) application | - (void) applicationWillEnterForeground: (UIApplication*) application | ||||
| { | { | ||||
| (void) application; | |||||
| if (JUCEApplicationBase* const app = JUCEApplicationBase::getInstance()) | if (JUCEApplicationBase* const app = JUCEApplicationBase::getInstance()) | ||||
| app->resumed(); | app->resumed(); | ||||
| } | } | ||||
| @@ -69,6 +73,7 @@ | |||||
| namespace juce | namespace juce | ||||
| { | { | ||||
| int juce_iOSMain (int argc, const char* argv[]); | |||||
| int juce_iOSMain (int argc, const char* argv[]) | int juce_iOSMain (int argc, const char* argv[]) | ||||
| { | { | ||||
| return UIApplicationMain (argc, const_cast<char**> (argv), nil, @"JuceAppStartupDelegate"); | return UIApplicationMain (argc, const_cast<char**> (argv), nil, @"JuceAppStartupDelegate"); | ||||
| @@ -177,9 +182,9 @@ namespace juce | |||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_MODAL_LOOPS_PERMITTED | #if JUCE_MODAL_LOOPS_PERMITTED | ||||
| void JUCE_CALLTYPE NativeMessageBox::showMessageBox (AlertWindow::AlertIconType iconType, | |||||
| void JUCE_CALLTYPE NativeMessageBox::showMessageBox (AlertWindow::AlertIconType /*iconType*/, | |||||
| const String& title, const String& message, | const String& title, const String& message, | ||||
| Component* associatedComponent) | |||||
| Component* /*associatedComponent*/) | |||||
| { | { | ||||
| JUCE_AUTORELEASEPOOL | JUCE_AUTORELEASEPOOL | ||||
| { | { | ||||
| @@ -189,17 +194,17 @@ void JUCE_CALLTYPE NativeMessageBox::showMessageBox (AlertWindow::AlertIconType | |||||
| } | } | ||||
| #endif | #endif | ||||
| void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType iconType, | |||||
| void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType /*iconType*/, | |||||
| const String& title, const String& message, | const String& title, const String& message, | ||||
| Component* associatedComponent, | |||||
| Component* /*associatedComponent*/, | |||||
| ModalComponentManager::Callback* callback) | ModalComponentManager::Callback* callback) | ||||
| { | { | ||||
| new iOSMessageBox (title, message, @"OK", nil, nil, callback, true); | new iOSMessageBox (title, message, @"OK", nil, nil, callback, true); | ||||
| } | } | ||||
| bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType iconType, | |||||
| bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType /*iconType*/, | |||||
| const String& title, const String& message, | const String& title, const String& message, | ||||
| Component* associatedComponent, | |||||
| Component* /*associatedComponent*/, | |||||
| ModalComponentManager::Callback* callback) | ModalComponentManager::Callback* callback) | ||||
| { | { | ||||
| ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"OK", | ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"OK", | ||||
| @@ -212,9 +217,9 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType | |||||
| return false; | return false; | ||||
| } | } | ||||
| int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType iconType, | |||||
| int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType /*iconType*/, | |||||
| const String& title, const String& message, | const String& title, const String& message, | ||||
| Component* associatedComponent, | |||||
| Component* /*associatedComponent*/, | |||||
| ModalComponentManager::Callback* callback) | ModalComponentManager::Callback* callback) | ||||
| { | { | ||||
| ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"Yes", @"No", callback, callback != nullptr)); | ScopedPointer<iOSMessageBox> mb (new iOSMessageBox (title, message, @"Cancel", @"Yes", @"No", callback, callback != nullptr)); | ||||
| @@ -227,13 +232,13 @@ int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconTy | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles) | |||||
| bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray&, bool) | |||||
| { | { | ||||
| jassertfalse; // no such thing on iOS! | jassertfalse; // no such thing on iOS! | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool DragAndDropContainer::performExternalDragDropOfText (const String& text) | |||||
| bool DragAndDropContainer::performExternalDragDropOfText (const String&) | |||||
| { | { | ||||
| jassertfalse; // no such thing on iOS! | jassertfalse; // no such thing on iOS! | ||||
| return false; | return false; | ||||
| @@ -257,7 +262,7 @@ bool juce_areThereAnyAlwaysOnTopWindows() | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| Image juce_createIconForFile (const File& file) | |||||
| Image juce_createIconForFile (const File&) | |||||
| { | { | ||||
| return Image::null; | return Image::null; | ||||
| } | } | ||||
| @@ -209,16 +209,16 @@ bool FileChooser::isPlatformDialogAvailable() | |||||
| return false; | return false; | ||||
| } | } | ||||
| void FileChooser::showPlatformDialog (Array<File>& results, | |||||
| const String& title, | |||||
| const File& currentFileOrDirectory, | |||||
| const String& filter, | |||||
| bool selectsDirectory, | |||||
| bool selectsFiles, | |||||
| bool isSaveDialogue, | |||||
| bool warnAboutOverwritingExistingFiles, | |||||
| bool selectMultipleFiles, | |||||
| FilePreviewComponent* extraInfoComponent) | |||||
| void FileChooser::showPlatformDialog (Array<File>&, | |||||
| const String& /*title*/, | |||||
| const File& /*currentFileOrDirectory*/, | |||||
| const String& /*filter*/, | |||||
| bool /*selectsDirectory*/, | |||||
| bool /*selectsFiles*/, | |||||
| bool /*isSaveDialogue*/, | |||||
| bool /*warnAboutOverwritingExistingFiles*/, | |||||
| bool /*selectMultipleFiles*/, | |||||
| FilePreviewComponent*) | |||||
| { | { | ||||
| jassertfalse; //there's no such thing in iOS | jassertfalse; //there's no such thing in iOS | ||||
| } | } | ||||
| @@ -146,8 +146,8 @@ void MouseCursor::showInWindow (ComponentPeer*) const | |||||
| #else | #else | ||||
| void* CustomMouseCursorInfo::create() const { return nullptr; } | void* CustomMouseCursorInfo::create() const { return nullptr; } | ||||
| void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType type) { return nullptr; } | |||||
| void MouseCursor::deleteMouseCursor (void* const cursorHandle, const bool isStandard) {} | |||||
| void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType) { return nullptr; } | |||||
| void MouseCursor::deleteMouseCursor (void*, bool) {} | |||||
| void MouseCursor::showInAllWindows() const {} | void MouseCursor::showInAllWindows() const {} | ||||
| void MouseCursor::showInWindow (ComponentPeer*) const {} | void MouseCursor::showInWindow (ComponentPeer*) const {} | ||||
| @@ -80,6 +80,8 @@ private: | |||||
| - (BOOL) gestureRecognizer: (UIGestureRecognizer*) gestureRecognizer | - (BOOL) gestureRecognizer: (UIGestureRecognizer*) gestureRecognizer | ||||
| shouldRecognizeSimultaneouslyWithGestureRecognizer: (UIGestureRecognizer*) otherGestureRecognizer | shouldRecognizeSimultaneouslyWithGestureRecognizer: (UIGestureRecognizer*) otherGestureRecognizer | ||||
| { | { | ||||
| (void) gestureRecognizer; | |||||
| (void) otherGestureRecognizer; | |||||
| return YES; | return YES; | ||||
| } | } | ||||
| @@ -106,6 +108,8 @@ private: | |||||
| - (BOOL) webView: (UIWebView*) webView shouldStartLoadWithRequest: (NSURLRequest*) request navigationType: (UIWebViewNavigationType) navigationType | - (BOOL) webView: (UIWebView*) webView shouldStartLoadWithRequest: (NSURLRequest*) request navigationType: (UIWebViewNavigationType) navigationType | ||||
| { | { | ||||
| (void) webView; | |||||
| (void) navigationType; | |||||
| return ownerComponent->pageAboutToLoad (nsStringToJuce (request.URL.absoluteString)); | return ownerComponent->pageAboutToLoad (nsStringToJuce (request.URL.absoluteString)); | ||||
| } | } | ||||
| @end | @end | ||||
| @@ -44,14 +44,14 @@ class OpenGLContext::NativeContext | |||||
| { | { | ||||
| public: | public: | ||||
| NativeContext (Component& component, | NativeContext (Component& component, | ||||
| const OpenGLPixelFormat& pixelFormat, | |||||
| void* contextToShareWith, | |||||
| bool useMultisampling) | |||||
| const OpenGLPixelFormat& pixFormat, | |||||
| void* contextToShare, | |||||
| bool multisampling) | |||||
| : frameBufferHandle (0), colorBufferHandle (0), depthBufferHandle (0), | : frameBufferHandle (0), colorBufferHandle (0), depthBufferHandle (0), | ||||
| msaaColorHandle (0), msaaBufferHandle (0), | msaaColorHandle (0), msaaBufferHandle (0), | ||||
| lastWidth (0), lastHeight (0), needToRebuildBuffers (false), | lastWidth (0), lastHeight (0), needToRebuildBuffers (false), | ||||
| swapFrames (0), useDepthBuffer (pixelFormat.depthBufferBits > 0), | |||||
| useMSAA (useMultisampling) | |||||
| swapFrames (0), useDepthBuffer (pixFormat.depthBufferBits > 0), | |||||
| useMSAA (multisampling) | |||||
| { | { | ||||
| JUCE_AUTORELEASEPOOL | JUCE_AUTORELEASEPOOL | ||||
| { | { | ||||
| @@ -78,8 +78,8 @@ public: | |||||
| const NSUInteger type = kEAGLRenderingAPIOpenGLES2; | const NSUInteger type = kEAGLRenderingAPIOpenGLES2; | ||||
| if (contextToShareWith != nullptr) | |||||
| [context initWithAPI: type sharegroup: [(EAGLContext*) contextToShareWith sharegroup]]; | |||||
| if (contextToShare != nullptr) | |||||
| [context initWithAPI: type sharegroup: [(EAGLContext*) contextToShare sharegroup]]; | |||||
| else | else | ||||
| [context initWithAPI: type]; | [context initWithAPI: type]; | ||||