diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm index 7c2bb18389..503efb7492 100644 --- a/modules/juce_core/native/juce_mac_Files.mm +++ b/modules/juce_core/native/juce_mac_Files.mm @@ -101,7 +101,7 @@ namespace FileHelpers } #if JUCE_IOS - String getIOSSystemLocation (NSSearchPathDirectory type) + static String getIOSSystemLocation (NSSearchPathDirectory type) { return nsStringToJuce ([NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES) 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 { diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index 55be8391bc..b042d0571b 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -59,6 +59,11 @@ bool JUCE_CALLTYPE Process::openEmailWithAttachments (const String& targetEmailA const StringArray& filesToAttach) { #if JUCE_IOS + (void) targetEmailAddress; + (void) emailSubject; + (void) bodyText; + (void) filesToAttach; + //xxx probably need to use MFMailComposeViewController jassertfalse; return false; diff --git a/modules/juce_events/native/juce_ios_MessageManager.mm b/modules/juce_events/native/juce_ios_MessageManager.mm index 70e61bd9b4..bdfed65999 100644 --- a/modules/juce_events/native/juce_ios_MessageManager.mm +++ b/modules/juce_events/native/juce_ios_MessageManager.mm @@ -40,7 +40,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) { 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]; while (! quitMessagePosted) @@ -50,7 +50,8 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor) [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode beforeDate: endDate]; - if (millisecondsToRunFor >= 0 && Time::getMillisecondCounter() >= endTime) + if (millisecondsToRunFor >= 0 + && Time::getMillisecondCounter() >= startTime + (uint32) millisecondsToRunFor) break; } } diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index 388792c53f..3b27b6109c 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -287,11 +287,16 @@ private: - (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration: (NSTimeInterval) duration { + (void) toInterfaceOrientation; + (void) duration; + [UIView setAnimationsEnabled: NO]; // disable this because it goes the wrong way and looks like crap. } - (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation { + (void) fromInterfaceOrientation; + JuceUIView* juceView = (JuceUIView*) [self view]; jassert (juceView != nil && juceView->owner != nullptr); juceView->owner->updateTransformAndScreenBounds(); @@ -308,11 +313,13 @@ private: - (void) viewWillAppear: (BOOL) animated { + (void) animated; [self viewDidLoad]; } - (void) viewDidAppear: (BOOL) animated { + (void) animated; [self viewDidLoad]; } @@ -354,18 +361,24 @@ private: //============================================================================== - (void) touchesBegan: (NSSet*) touches withEvent: (UIEvent*) event { + (void) touches; + if (owner != nullptr) owner->handleTouches (event, true, false, false); } - (void) touchesMoved: (NSSet*) touches withEvent: (UIEvent*) event { + (void) touches; + if (owner != nullptr) owner->handleTouches (event, false, false, false); } - (void) touchesEnded: (NSSet*) touches withEvent: (UIEvent*) event { + (void) touches; + if (owner != nullptr) owner->handleTouches (event, false, true, false); } @@ -402,7 +415,8 @@ private: - (BOOL) textView: (UITextView*) textView shouldChangeTextInRange: (NSRange) range replacementText: (NSString*) text { - return owner->textViewReplaceCharacters (Range (range.location, range.location + range.length), + (void) textView; + return owner->textViewReplaceCharacters (Range ((int) range.location, (int) (range.location + range.length)), nsStringToJuce (text)); } @@ -432,7 +446,7 @@ private: namespace juce { -bool KeyPress::isKeyCurrentlyDown (const int keyCode) +bool KeyPress::isKeyCurrentlyDown (int) { return false; } @@ -534,7 +548,7 @@ void UIViewComponentPeer::setVisible (bool shouldBeVisible) window.hidden = ! shouldBeVisible; } -void UIViewComponentPeer::setTitle (const String& title) +void UIViewComponentPeer::setTitle (const String&) { // xxx is this possible? } @@ -669,7 +683,7 @@ void UIViewComponentPeer::toFront (bool makeActiveWindow) if (isSharedWindow) [[view superview] bringSubviewToFront: view]; - if (window != nil && component.isVisible()) + if (makeActiveWindow && window != nil && component.isVisible()) [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 withAnimation: UIStatusBarAnimationSlide]; displays->refresh(); - if (ComponentPeer* const peer = kioskModeComponent->getPeer()) + if (ComponentPeer* const peer = kioskModeComp->getPeer()) peer->setFullScreen (enableOrDisable); } diff --git a/modules/juce_gui_basics/native/juce_ios_Windowing.mm b/modules/juce_gui_basics/native/juce_ios_Windowing.mm index fe06fbb40d..48999db688 100644 --- a/modules/juce_gui_basics/native/juce_ios_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_ios_Windowing.mm @@ -39,6 +39,7 @@ - (void) applicationDidFinishLaunching: (UIApplication*) application { + (void) application; initialiseJuce_GUI(); JUCEApplicationBase* app = JUCEApplicationBase::createInstance(); @@ -49,17 +50,20 @@ - (void) applicationWillTerminate: (UIApplication*) application { + (void) application; JUCEApplicationBase::appWillTerminateByForce(); } - (void) applicationDidEnterBackground: (UIApplication*) application { + (void) application; if (JUCEApplicationBase* const app = JUCEApplicationBase::getInstance()) app->suspended(); } - (void) applicationWillEnterForeground: (UIApplication*) application { + (void) application; if (JUCEApplicationBase* const app = JUCEApplicationBase::getInstance()) app->resumed(); } @@ -69,6 +73,7 @@ namespace juce { +int juce_iOSMain (int argc, const char* argv[]); int juce_iOSMain (int argc, const char* argv[]) { return UIApplicationMain (argc, const_cast (argv), nil, @"JuceAppStartupDelegate"); @@ -177,9 +182,9 @@ namespace juce //============================================================================== #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, - Component* associatedComponent) + Component* /*associatedComponent*/) { JUCE_AUTORELEASEPOOL { @@ -189,17 +194,17 @@ void JUCE_CALLTYPE NativeMessageBox::showMessageBox (AlertWindow::AlertIconType } #endif -void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType iconType, +void JUCE_CALLTYPE NativeMessageBox::showMessageBoxAsync (AlertWindow::AlertIconType /*iconType*/, const String& title, const String& message, - Component* associatedComponent, + Component* /*associatedComponent*/, ModalComponentManager::Callback* callback) { 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, - Component* associatedComponent, + Component* /*associatedComponent*/, ModalComponentManager::Callback* callback) { ScopedPointer mb (new iOSMessageBox (title, message, @"Cancel", @"OK", @@ -212,9 +217,9 @@ bool JUCE_CALLTYPE NativeMessageBox::showOkCancelBox (AlertWindow::AlertIconType return false; } -int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType iconType, +int JUCE_CALLTYPE NativeMessageBox::showYesNoCancelBox (AlertWindow::AlertIconType /*iconType*/, const String& title, const String& message, - Component* associatedComponent, + Component* /*associatedComponent*/, ModalComponentManager::Callback* callback) { ScopedPointer 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! return false; } -bool DragAndDropContainer::performExternalDragDropOfText (const String& text) +bool DragAndDropContainer::performExternalDragDropOfText (const String&) { jassertfalse; // no such thing on iOS! return false; @@ -257,7 +262,7 @@ bool juce_areThereAnyAlwaysOnTopWindows() } //============================================================================== -Image juce_createIconForFile (const File& file) +Image juce_createIconForFile (const File&) { return Image::null; } diff --git a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm index 11bd0ef4cc..3ac733aec6 100644 --- a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm @@ -209,16 +209,16 @@ bool FileChooser::isPlatformDialogAvailable() return false; } -void FileChooser::showPlatformDialog (Array& 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&, + 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 } diff --git a/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm b/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm index b685ca8f40..5686bfc17a 100644 --- a/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm +++ b/modules/juce_gui_basics/native/juce_mac_MouseCursor.mm @@ -146,8 +146,8 @@ void MouseCursor::showInWindow (ComponentPeer*) const #else 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::showInWindow (ComponentPeer*) const {} diff --git a/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm b/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm index c59476538d..a7997bb183 100644 --- a/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm +++ b/modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm @@ -80,6 +80,8 @@ private: - (BOOL) gestureRecognizer: (UIGestureRecognizer*) gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer: (UIGestureRecognizer*) otherGestureRecognizer { + (void) gestureRecognizer; + (void) otherGestureRecognizer; return YES; } @@ -106,6 +108,8 @@ private: - (BOOL) webView: (UIWebView*) webView shouldStartLoadWithRequest: (NSURLRequest*) request navigationType: (UIWebViewNavigationType) navigationType { + (void) webView; + (void) navigationType; return ownerComponent->pageAboutToLoad (nsStringToJuce (request.URL.absoluteString)); } @end diff --git a/modules/juce_opengl/native/juce_OpenGL_ios.h b/modules/juce_opengl/native/juce_OpenGL_ios.h index 6c63be6fb9..21f9fc241d 100644 --- a/modules/juce_opengl/native/juce_OpenGL_ios.h +++ b/modules/juce_opengl/native/juce_OpenGL_ios.h @@ -44,14 +44,14 @@ class OpenGLContext::NativeContext { public: NativeContext (Component& component, - const OpenGLPixelFormat& pixelFormat, - void* contextToShareWith, - bool useMultisampling) + const OpenGLPixelFormat& pixFormat, + void* contextToShare, + bool multisampling) : frameBufferHandle (0), colorBufferHandle (0), depthBufferHandle (0), msaaColorHandle (0), msaaBufferHandle (0), lastWidth (0), lastHeight (0), needToRebuildBuffers (false), - swapFrames (0), useDepthBuffer (pixelFormat.depthBufferBits > 0), - useMSAA (useMultisampling) + swapFrames (0), useDepthBuffer (pixFormat.depthBufferBits > 0), + useMSAA (multisampling) { JUCE_AUTORELEASEPOOL { @@ -78,8 +78,8 @@ public: 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 [context initWithAPI: type];